If you share files over the network these could be compromised by a virus.
As Routers do not have an operating system it is highly unlikely that it will get a virus. It is possible that the firmware running on the Router could be infected with a virus but the happens very rarely.