Coherent perfect absorber and laser induced by directional emissions in the non-Hermitian photonic crystals