In this paper, we consider a class of optimal switching control problems with multiple time-delays and a cost on changing control and subject to terminal state constraints. A computational method involving three stages is developed to solve this class of optimal control problems. First, by parameterizing the control function with piecewise-constant functions, the optimal switching control problem is approximated by a sequence of finite-dimensional optimization problems, where the original switching times, the control heights and the control switching times are decision variables. Second, by introducing new variables, the total variation of the control variables is transformed into an equivalently smooth function. Third, we convert the constrained optimization problem into one only with box constraints by an exact penalty function method. The gradients of the cost functional are then derived, which can be combined with any gradient-based optimization method to determine the optimal solution. Finally, a numerical example is given to illustrate the effectiveness of the proposed algorithm.