In this paper, we consider the inverse source problem for the time-fractional diffusion equation, which has been known to be an ill-posed problem. To deal with the ill-posedness of the problem, we propose to transform the problem into a regularized problem with L^2 and total variational (TV) regularization terms. Differing from the classical Tikhonov regularization with L^2 penalty terms, the TV regularization is beneficial for reconstructing discontinuous or piecewise constant solutions. The regularized problem is then approximated by a fully discrete scheme. Our theoretical results include: estimate of the error order between the discrete problem and the continuous direct problem; the convergence rate of the discrete regularized solution to the target source term; and the convergence of the regularized solution with respect to the noise level. Then we propose an accelerated primal-dual iterative algorithm based on an equivalent saddle-point reformulation of the discrete regularized model. Finally, a series of numerical tests are carried out to demonstrate the efficiency and accuracy of the algorithm.