Resonance transitions of Mg- and Zn-like ions from multiconfiguration relativistic random-phase approximation