Study on the coil–globule transition and dynamics of polymer chain confined in slit