High-efficiency terahertz dual-function devices based on the dielectric metasurface