Aiming at the development demand of bidirectional interconnection for combined natural-gas and electricity system, a bidirectional optimal dispatching model was proposed in this paper. In the two directions of power-to-gas and gas-to-power, the capacity allocation model of power-to-gas with the maximum net benefit and the model with the minimum total cost of power generation considering the cost of wind abandoning and the thermoelectric decoupling of gas turbine were established respectively, the contradiction between the net benefit of power-to-gas equipment and the total cost of power generation of the system was solved by using the weighted minimum modulus function and genetic algorithm. The results show that the power-to-gas equipment can improve the capacity of wind power consumption and produce higher net benefits, the thermoelectric decoupling improves the flexibility of gas turbine power generation and reduces the cost of power generation.