Phase portraits of SIR epidemic models with vertical transmissions and linear treatment