  Monolayer 2H-NbSe2 has recently been shown to be a 2-dimensional
superconductor, with a coexisting charge-density wave (CDW). As both phenomena
are intimately related to electron-lattice interaction, a natural question is
how superconductivity and CDW are interrelated through electron-phonon coupling
(EPC), which is important to the understanding of 2-dimensional
superconductivity. This work investigates the superconductivity of monolayer
NbSe2 in CDW phase using the anisotropic Migdal-Eliashberg formalism based on
first principles calculations. The mechanism of the competition between and
coexistence of the superconductivity and CDW is studied in detail by analyzing
EPC. It is found that the intra-pocket scattering is related to
superconductivity, leading to almost constant value of superconducting gaps on
parts of the Fermi surface. The inter-pocket scattering is found to be
responsible for CDW, leading to partial or full bandgap on the remaining Fermi
surface. Recent experiment indicates that there is transitioning from regular
superconductivity in thin-film NbSe2 to two-gap superconductivity in the bulk,
which is shown here to have its origin in the extent of Fermi surface gapping
of K and K' pockets induced by CDW. Overall blue shifts of the phonons and
sharp decrease of Eliashberg spectrum are found when the CDW forms.
