A data-driven partitioned approach for the resolution of time-dependent optimal control problems with dynamic mode decomposition