Control of topological phase transitions in Dirac semimetal films by exchange fields