Thee-invariant and the spectrum of the Laplacian for compact nilmanifolds covered by Heisenberg groups