A trust has lifted visiting restrictions which were put in place at its hospitals last month following a rise in flu cases.