Competitions of magnetism and superconductivity in FeAs-based materials