A 31-year-old who beat and bit his ex-partner and then launched an attack on a PC has been locked up.