The department, officer, or officers of a county who are charged with the enforcement of ordinances or laws regulating the erection, construction, or alteration of buildings shall enforce this chapter within the county but outside the territorial limits of any city.