Controlling self-healing of optical field based on moiré