Aims: We consider a model of a two-dimensional curved solar coronal slab and explore the excitation and attenuation of fast magnetoacoustic vertical oscillations. We include a dense photosphere-like layer into the physical system. Methods: The time-dependent, ideal magnetohydrodynamic equations are solved numerically to determine the spatial and temporal signatures of the impulsively excited oscillations. Results: The numerical results reveal that the inclusion of the dense photosphere-like layer has a significant influence on the wave period (P) and attenuation time (τ ). The wave characteristics exhibit a stronger dependence on the mass density contrast between the loop and the photosphere than on the width of the transition layer, according to the parametric studies performed here. We find that P decreases and τ /P grows with the mass density contrast between the photosphere-like layer and solar corona, d_ph. At the limit of d_ph→ ∞ , P and τ /P attain their values which correspond to the case when the photosphere-like layer is removed from the system and its action is mimicked by implementation of line-tying boundary conditions at the bottom boundary. Conclusions: The inclusion of a dense photosphere-like layer results in more efficient excitation and attenuation of vertical waves oscillation, compared with the case of line-tying boundary conditions. The enhancement of the attenuation rate arises from energy leakage through the photosphere-like layer.