Electronic and optical properties of van der Waals vertical heterostructures based on two-dimensional transition metal dichalcogenides: First-principles calculations