The concepts of weighted reciprocal of temperature and weighted thermal flux are proposed for a heat engine operating between two heat baths and outputting mechanical work. With the aid of these two concepts, the generalized thermodynamic fluxes and forces can be expressed in a consistent way within the framework of irreversible thermodynamics. Then the efficiency at maximum power output for a heat engine, one of key topics in finite-time thermodynamics, is investigated on the basis of a generic model under the tight-coupling condition. The corresponding results have the same forms as those of low-dissipation heat engines [ M. Esposito, R. Kawai, K. Lindenberg and C. Van den Broeck Phys. Rev. Lett. 105 150603 (2010)]. The mappings from two kinds of typical heat engines, such as the low-dissipation heat engine and the Feynman ratchet, into the present generic model are constructed. The universal efficiency at maximum power output up to the quadratic order is found to be valid for a heat engine coupled symmetrically and tightly with two baths. The concepts of weighted reciprocal of temperature and weighted thermal flux are also transplanted to the optimization of refrigerators.