  The X-ray afterglow of GRB 130831A shows an "internal plateau" with a decay
slope of $\sim$ 0.8, followed by a steep drop at around $10^5$ s with a slope
of $\sim$ 6. After the drop, the X-ray afterglow continues with a much
shallower decay. The optical afterglow exhibits two segments of plateaus
separated by a luminous optical flare, followed by a normal decay with a slope
basically consistent with that of the late-time X-ray afterglow. The decay of
the internal X-ray plateau is much steeper than what we expect in the simplest
magnetar model. We propose a scenario in which the magnetar undergoes
gravitational-wave-driven r-mode instability, and the spin-down is dominated by
gravitational wave losses up to the end of the steep plateau, so that such a
relatively steep plateau can be interpreted as the internal emission of the
magnetar wind and the sharp drop can be produced when the magnetar collapses
into a black hole. This scenario also predicts an initial X-ray plateau lasting
for hundreds of seconds with an approximately constant flux which is compatible
with observation. Assuming that the magnetar wind has a negligible contribution
in the optical band, we interpret the optical afterglow as the forward shock
emission by invoking the energy injection from a continuously refreshed shock
following the prompt emission phase. It is shown that our model can basically
describe the temporal evolution of the multi-band afterglow of GRB 130831A.
