Slipping magnetic reconnection and complex evolution of a flux rope and flare ribbons