You roll any dice twice, but add flat modifiers only once
As the basic rules describe:
When you score a critical hit, you get to roll extra dice for the attack's damage against the target. Roll all of the attack's damage dice twice and add them together. Then add any relevant modifiers as normal.
Any damage expressed as dice gets to be rolled twice, but other modifiers are added only once. In the case of a vicious weapon, since the damage bonus it grants is a flat number (7) rather than bonus dice, it doesn't deal any extra damage on a critical hit.
If you're using the version of the vicious weapon found in your SRD document - which adds 2d6 damage, and seem roughly congruent with the version in the published books, as 7 is the average of 2d6 - you would indeed double those 2d6 bonus damage dice to 4d6 if you critically hit, just like you do with sneak attacks or smites.
Which version of vicious weapon is correct has been discussed before - according to the developers, what's actually printed in the books/core rules takes precedence over any content in the SRD:
@JeremyECrawford @mikemearls vicious wpn: DMG says +7 damage, srd says 2d6, which is correct. if dice: double on crit?
core rules take precedence over SRD
My guess would be in this case that the content of the SRD was an earlier version of the effect, where the intention was a for a weapon that got to do +2d6 bonus damage on a critical hit, before it was realised that a critical hit would also double these bonus damage dice and make the ability more powerful than intended (as well as being confusingly worded). Rather than write an exception for this edge case (by clarifying "This bonus damage is not rolled twice because of a critical hit"), I suspect they chose to simply change it to an equivalent flat modifier instead, so as to remain consistent with the general rules about critical hits.