Considering a grand canonical ensemble, we study the phase structures and transitions of RN black holes surrounded by quintessence dark energy on two different boundary conditions, namely AdS space and a Dirichlet wall. For AdS space, under the condition of fixed temperature and potential, as the temperature increases for lower potential, the black hole undergoes a first-order phase transition, while for higher potential, no phase transition occurs. There are two different regions in the parameter space. For the Dirichlet wall, on which the temperature and potential are fixed, the state parameter of quintessence
is analyzed in detail. Then, three different physically allowed regions in the parameter space of the black hole are well studied. As the temperature rises, first-order and second-order phase transitions may occur. In this case, there are nine regions in the parameter space, which is evidently distinct from the case of AdS space.