Polyaniline coordinated with transition metal and preparation method thereof