index.html 154.9 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 2497 2498 2499 2500 2501 2502 2503 2504 2505 2506 2507 2508 2509 2510 2511 2512 2513 2514 2515 2516 2517 2518 2519 2520 2521 2522 2523 2524 2525 2526 2527 2528 2529 2530 2531 2532 2533 2534 2535 2536 2537 2538 2539 2540 2541 2542 2543 2544 2545 2546 2547 2548 2549 2550 2551 2552 2553 2554 2555 2556 2557 2558 2559 2560 2561 2562 2563 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 2579 2580 2581 2582 2583 2584 2585 2586 2587 2588 2589 2590 2591 2592 2593 2594 2595 2596 2597 2598 2599 2600 2601 2602 2603 2604 2605 2606 2607 2608 2609 2610 2611 2612 2613 2614 2615 2616 2617 2618 2619 2620 2621 2622 2623 2624 2625 2626 2627 2628 2629 2630 2631 2632 2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 2727 2728 2729 2730 2731 2732 2733 2734 2735 2736 2737 2738 2739 2740 2741 2742 2743 2744 2745 2746 2747 2748 2749 2750 2751 2752 2753 2754 2755 2756 2757 2758 2759 2760 2761 2762 2763 2764 2765 2766 2767 2768 2769 2770 2771 2772 2773 2774 2775 2776 2777 2778 2779 2780 2781 2782 2783 2784 2785 2786 2787 2788 2789 2790 2791 2792 2793 2794 2795 2796 2797 2798 2799 2800 2801 2802 2803 2804 2805 2806 2807 2808 2809 2810 2811 2812 2813 2814 2815 2816 2817 2818 2819 2820 2821 2822 2823 2824 2825 2826 2827 2828 2829 2830 2831 2832 2833 2834 2835 2836 2837 2838 2839 2840 2841 2842 2843 2844 2845 2846 2847 2848 2849 2850 2851 2852 2853 2854 2855 2856 2857 2858 2859 2860 2861 2862 2863 2864 2865 2866 2867 2868 2869 2870 2871 2872 2873 2874 2875 2876 2877 2878 2879 2880 2881 2882 2883 2884 2885 2886 2887 2888 2889 2890 2891 2892 2893 2894 2895 2896 2897 2898 2899 2900 2901 2902 2903 2904 2905 2906 2907 2908 2909 2910 2911 2912 2913 2914 2915 2916 2917 2918 2919 2920 2921 2922 2923 2924 2925 2926 2927 2928 2929 2930 2931 2932 2933 2934 2935 2936 2937 2938 2939 2940 2941 2942 2943 2944 2945 2946 2947 2948 2949 2950 2951 2952 2953 2954 2955 2956 2957 2958 2959 2960 2961 2962 2963 2964 2965 2966 2967 2968 2969 2970 2971 2972 2973 2974 2975 2976 2977 2978 2979 2980 2981 2982 2983 2984 2985 2986 2987 2988 2989 2990 2991 2992 2993 2994 2995 2996 2997 2998 2999 3000 3001 3002 3003 3004 3005 3006 3007 3008 3009 3010 3011 3012 3013 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 3026 3027 3028 3029 3030 3031 3032 3033 3034 3035 3036 3037 3038 3039 3040 3041 3042 3043 3044 3045 3046 3047 3048 3049 3050 3051 3052 3053 3054 3055 3056 3057 3058 3059 3060 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 3073 3074 3075 3076 3077 3078 3079 3080 3081 3082 3083 3084 3085 3086 3087 3088 3089 3090 3091 3092 3093 3094 3095 3096 3097 3098 3099 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 3119 3120 3121 3122 3123 3124 3125 3126 3127 3128 3129 3130 3131 3132 3133 3134 3135 3136 3137 3138 3139 3140 3141 3142 3143 3144 3145 3146 3147 3148 3149 3150 3151 3152 3153 3154 3155 3156 3157 3158 3159 3160 3161 3162 3163 3164 3165 3166 3167 3168 3169 3170 3171 3172 3173 3174 3175 3176 3177 3178 3179 3180 3181 3182 3183 3184 3185 3186 3187 3188 3189 3190 3191 3192 3193 3194 3195 3196 3197 3198 3199 3200 3201 3202 3203 3204 3205 3206 3207 3208 3209 3210 3211 3212 3213 3214 3215 3216 3217 3218 3219 3220 3221 3222 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232 3233 3234 3235 3236 3237 3238 3239 3240 3241 3242 3243 3244 3245 3246 3247 3248 3249 3250 3251 3252 3253 3254 3255 3256 3257 3258 3259 3260 3261 3262 3263 3264 3265 3266 3267 3268 3269 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279 3280 3281 3282 3283 3284 3285 3286 3287 3288 3289 3290 3291 3292 3293 3294 3295 3296 3297 3298 3299 3300 3301 3302 3303 3304 3305 3306 3307 3308 3309 3310 3311 3312 3313 3314 3315 3316 3317 3318 3319 3320 3321 3322 3323 3324 3325 3326 3327 3328 3329 3330 3331 3332 3333 3334 3335 3336 3337 3338 3339 3340 3341 3342 3343 3344 3345 3346 3347 3348 3349 3350 3351 3352 3353 3354 3355 3356 3357 3358 3359 3360 3361 3362 3363 3364 3365 3366 3367 3368 3369 3370 3371 3372 3373 3374 3375 3376 3377 3378 3379 3380 3381 3382 3383 3384 3385 3386 3387 3388 3389 3390 3391 3392 3393 3394 3395 3396 3397 3398 3399 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3412 3413 3414 3415 3416
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title></title>

    <script src="/assets/js/vue/vue.min.js"></script>

    <link rel="stylesheet" href="/assets/js/vue/elementui.css">
    <!-- 引入组件库 -->
    <script src="/assets/js/vue/elementui.js"></script>

    <script src="/assets/js/vue/axios.js"></script>
    <script type="text/javascript"
        src="https://webapi.amap.com/maps?v=2.0&key=4e220859563e721df285919ca294a386&plugin=AMap.MapType,AMap.Adaptor,AMap.ControlBar,AMap.ToolBar,AMap.Scale,AMap.HawkEye,AMap.Geolocation,AMap.MouseTool,AMap.RangingTool,AMap.Label,AMap.PolygonEditor">
        </script>


    <style>
        .el-tree-node:focus>.el-tree-node__content {
           
            
        }

        .el-select-dropdown .el-select-dropdown__item span {
            white-space: pre;
        }

        #mapContainer {
            width: 100vw;
            height: calc(100vh - 30px);
            /* background-color: red; */

        }


        .disFlexSw {
            display: flex;
            justify-content: space-between;
            align-items: center;

        }

        .disFlexSw1 {
            margin-bottom: 16px;
            margin-left: 16px;
        }

        .myClass {
            margin-top: 5vh !important;
        }

        .el-dialog__body {
            padding: 10px 20px 10px 20px !important;
        }

        .el-dialog__footer {
            padding: 0px 20px 10px 20px !important;
        }

        .myClass1 {
            margin-top: 2vh !important;
        }

        .tool_box {
            z-index: 99;
            position: absolute;
            top: 24px;
            right: 24px;
        }

        .toolTopBox {
            width: 286px;
            padding: 20px;
            background: #fff;
            border-radius: 11px;
        }

        .toolTopBoxBtn {
            display: flex;
            flex-wrap: wrap;
            align-items: center;
        }

        .toolTopBoxBtnItemAction {
            background: #f5f8ff;
        }

        .toolTopBoxBtnItemText1 {
            color: #1f5bff !important;
        }

        .toolTopBoxBtnItem {
            width: 33%;
            height: 54px;
            padding: 2px 0;
            margin: 0 0 8px 0;
            cursor: pointer;
        }

        .toolTopBoxBtnItemImg {
            display: block;
            width: 24px;
            height: 24px;
            margin: 0 auto;
        }

        .toolTopBoxBtnItemText {
            margin-top: 2px;
            color: #192c4e;
            text-align: center;
            font-size: 14px;
        }

        .toolTopBoxHistory {
            height: 0;
            opacity: 0;
            border-top: 1px solid #e9e9e9;
            margin-top: 4px;
            padding: 16px 0 0 0;
            overflow: hidden;
            transition: 0.4s all;
        }

        .toolTopBoxHistorySelect {}

        .toolTopBoxHistoryItemBox {
            margin-top: 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
        }

        .toolTopBoxHistoryItem {
            cursor: pointer;
            border-radius: 3px;
            width: 117px;
            padding: 5px 12px;
            color: #192c4e;
            text-align: center;
            font-size: 14px;
            background: #f5f5fa;
            margin-bottom: 12px;
        }

        .toolTopBoxHistoryItemBtn {
            margin: 0 auto;
            width: 100px;
            padding: 5px;
            text-align: center;
            background: #1677ff;
            color: #fff;
            border-radius: 10px;
            cursor: pointer;
        }

        .toolBottomBox {
            width: 286px;
            padding: 20px;
            background: #fff;
            border-radius: 11px;
            /* margin-top: 12px; */
            margin-top: 50px;
        }

        .toolBottomBox2 {
            width: 286px;
            padding: 20px;
            background: #fff;
            border-radius: 11px;
            /* margin-top: 12px; */
            margin-top: 50px;
        }

        .toolBottomBox2_div {
            width: 100%;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .toolBottomBox2_div1 {
            width: 80px;
            height: 30px;
            border-radius: 6px;
            background: #1677ff;
            font-size: 16px;
            color: #fff;
            text-align: center;
            line-height: 30px;
            cursor: pointer;
        }

        .toolBottomBoxTitle {
            color: #000b28;
            font-size: 18px;
            font-weight: bold;
        }

        .toolBottomBoxSelect {
            margin-top: 8px;
        }

        .toolBottomBoxSelectitem {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
        }

        .toolBottomBoxSelectitemLeft {
            display: flex;
            align-items: center;
        }

        .toolBottomBoxSelectitemDian {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }

        .toolBottomBoxSelectitemText {
            color: #192c4e;
            font-size: 14px;
            margin-left: 8px;
        }

        .toolBottomBoxSelectitemInput {}

        .drawBtn {
            display: flex;
            align-items: center;
            position: absolute;
            bottom: 50px;
            left: 50%;
            transform: translate(-50%, 0);
            z-index: 99;
        }

        .drawBtn_div {
            margin: 0 50px;
            border-radius: 5px;
            width: 100px;
            padding: 10px;
            text-align: center;
            font-size: 18px;
            color: #fff;
        }

        /* .el-form-item {
            display: flex;
        } */

        .markerbtn {
            margin: 0 auto;
            width: 135px;
            padding: 5px;
            border-radius: 5px;
            color: #ffffff;
            text-align: center;
            font-size: 14px;
            background: #1f71ff;
            cursor: pointer;
        }

        .el-date-editor {
            width: 240px !important;
        }

        .el-range-separator {
            width: 15% !important;
        }
    </style>

</head>

<body>
    <!-- 创建一个根元素 -->
    <div class="home" id="home">

        <div id="mapContainer"></div>

        <!-- !isDrawLine -->
        <div class="tool_box" v-if="infoFlag !== 3 && !isDrawRegion">
            <div class="toolTopBox">
                <div class="toolTopBoxBtn" style="display: flex; justify-content: space-between;">
                    <el-button size="mini" type="primary" icon="el-icon-add-location"
                        @click="inspectionHandleOpen">添加巡检点</el-button>

                    <el-button size="mini" type="primary" icon="el-icon-add-location"
                        @click="addArea()">添加巡检区域</el-button>


                </div>

                <div style="margin-top: 20px;">
                    <div class="toolBottomBoxTitle">巡检区域</div>
                    <div v-if="curAreaid" style="display: flex; justify-content: space-between;">
                        <div class="toolBottomBox2_div1" @click="createPolygon()">绘制区域</div>
                        <div class="toolBottomBox2_div1" @click="createPolygon()">编辑区域</div>
                        <div class="toolBottomBox2_div1" @click="saveRegion()">保存区域</div>

                    </div>


                    <el-tree :data="areas" :props="defaultProps">

                        <div style="display: flex; justify-content: space-between; width:100%" class="custom-tree-node"
                            slot-scope="{ node, data }">

                            <el-tooltip class="item" effect="dark" :content="node.label" placement="top">
                                <span>{{ node.label | ellipsis }}</span>
                            </el-tooltip>


                            <span style="float:right">
                                <el-button type="text" size="mini" @click="addArea(data)">
                                    添加
                                </el-button>
                                <el-button type="text" size="mini" @click="editArea(data)">
                                    编辑
                                </el-button>
                            </span>
                        </div>


                    </el-tree>

                </div>


            </div>






            <!--<div class="toolTopBox">
        <div class="toolTopBoxBtn">
        <div :class="statusType == 'addMark'
        ? 'toolTopBoxBtnItem toolTopBoxBtnItemAction'
        : 'toolTopBoxBtnItem'
    " @click="statusChange('addMark')">
    <div class="toolTopBoxBtnItemImg">
        <img class="toolTopBoxBtnItemImg"
    src="https://qiniu.ynzhsk.cn/uploads/20231219/FhhSrATfAS2-z8t1pk5m_Am6M57E.png" />
        </div>
        <div
    :class="statusType == 'addMark'?'toolTopBoxBtnItemText toolTopBoxBtnItemText1':'toolTopBoxBtnItemText'">
        添加放水口</div>
        </div>
        <div class="toolTopBoxBtnItem" @click="statusChange('startLine')">
        <div class="toolTopBoxBtnItemImg">
        <img class="toolTopBoxBtnItemImg"
    src="https://qiniu.ynzhsk.cn/uploads/20231219/FgwTC0Fc-jSceSzZARhp92DYKUKJ.png" />
        </div>
        <div class="toolTopBoxBtnItemText">描画</div>
        </div>
        <div :class="
    statusType == 'addLine'
        ? 'toolTopBoxBtnItem toolTopBoxBtnItemAction'
        : 'toolTopBoxBtnItem'
    " @click="statusChange('addLine')">
    <div class="toolTopBoxBtnItemImg">
        <img class="toolTopBoxBtnItemImg"
    src="https://qiniu.ynzhsk.cn/uploads/20231226/FnoHbeSNp7IcdwROMvJHyhfJh42g.png">
        </div>
        <div
    :class="statusType == 'addLine'?' toolTopBoxBtnItemText toolTopBoxBtnItemText1':'toolTopBoxBtnItemText'">
        添加管线</div>
        </div>
        <div :class="
    statusType == 'history'
        ? 'toolTopBoxBtnItem toolTopBoxBtnItemAction'
        : 'toolTopBoxBtnItem'
    " @click="statusChange('history')">
    <div class="toolTopBoxBtnItemImg">
        <img class="toolTopBoxBtnItemImg"
    src="https://qiniu.ynzhsk.cn/uploads/20231219/FnoHbeSNp7IcdwROMvJHyhfJh42g.png" />
        </div>
        <div
    :class="statusType == 'history'?'toolTopBoxBtnItemText toolTopBoxBtnItemText1':'toolTopBoxBtnItemText'">历史
        </div>
        </div>
        </div> -->
            <!-- <div class="toolTopBoxHistory" :style="isHistory ? { height: '230px', opacity: '1' } : {}">
        <div class="toolTopBoxHistorySelect">
        <el-date-picker v-model="historyValue" type="daterange" size="mini" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
        </el-date-picker>
        </div>
        <div class="toolTopBoxHistoryItemBox">
        <div class="toolTopBoxHistoryItem" :style="dateClickClass == 1 ? 'background:blue' : ''"
    @click="dateClick('1')">
        近一个月
        </div>
        <div class="toolTopBoxHistoryItem" :style="dateClickClass == 3 ? 'background:blue' : ''"
    @click="dateClick('3')">
        近三个月
        </div>
        <div class="toolTopBoxHistoryItem" :style="dateClickClass == 6 ? 'background:blue' : ''"
    @click="dateClick('6')">
        近半年
        </div>
        <div class="toolTopBoxHistoryItem" :style="dateClickClass == 12 ? 'background:blue' : ''"
    @click="dateClick('12')">
        近一年
        </div>
        <div class="toolTopBoxHistoryItem" :style="dateClickClass == 36 ? 'background:blue' : ''"
    @click="dateClick('36')">
        近三年
        </div>
        </div>

        <div class="toolTopBoxHistoryItemBtn" @click="dateAnimation">
        确定
        </div>
        </div>
        </div> -->
            <div class="toolBottomBox2">
                <div class="toolBottomBox2_div">
                    <div class="toolBottomBox2_div1" v-if="infoFlag==0" @click="oninfoFlag(1)">管段信息</div>
                    <div class="toolBottomBox2_div1" v-else @click="oninfoFlag(0)">路线信息</div>

                    <div class="toolBottomBox2_div1" v-if="chartFlag==0" @click="onchartFlag(1)">卫星地图</div>
                    <div class="toolBottomBox2_div1" v-else @click="onchartFlag(0)">标准地图</div>


                    <!--   <div class="toolBottomBox2_div1" @click="onRegion()">巡检区域</div> -->

                </div>
                <!-- <div class="toolBottomBox2_div" style="margin-top: 10px;" v-if="infoFlag==1">
            <div class="toolBottomBox2_div1" v-if="modeFlag==0" @click="onmodeFlag(1)">编辑模式</div>
            <div class="toolBottomBox2_div1" v-else @click="onmodeFlag(0)">预览模式</div>
            </div> -->
            </div>
            <div class="toolBottomBox" v-if="!isDrawRegion">
                <div class="toolBottomBoxSelect" v-if="infoFlag==0">
                    <div class="toolBottomBoxSelectitem" v-for="(el, index) in legendData2" :key="index">
                        <div class="toolBottomBoxSelectitemLeft">
                            <div class="toolBottomBoxSelectitemText">{{ el.title }}</div>
                        </div>
                        <div class="toolBottomBoxSelectitemInput">
                            <el-checkbox :name="el.title" v-model:checked="el.checked"
                                @change="checkChange1(el)"></el-checkbox>
                        </div>
                    </div>
                </div>
                <div v-if="infoFlag==1">
                    <div class="toolBottomBoxTitle">图例(单位:mm)</div>
                    <div class="toolBottomBoxSelect">
                        <div class="toolBottomBoxSelectitem" v-for="(el, index) in legendData" :key="index">
                            <div class="toolBottomBoxSelectitemLeft">
                                <div class="toolBottomBoxSelectitemDian" :style="{ background: el.color }"></div>
                                <div class="toolBottomBoxSelectitemText">{{ el.title }}</div>
                            </div>
                            <div class="toolBottomBoxSelectitemInput">
                                <el-checkbox :name="el.title" v-model:checked="el.checked"
                                    @change="checkChange(el)"></el-checkbox>
                            </div>
                        </div>
                    </div>
                </div>






            </div>

        </div>

        <div class="drawBtn" v-if="isDrawLine">
            <div class="drawBtn_div" style="background: #169bd5 ;width: 150px;" @click="lineFun(true)">
                保存绘制管线
            </div>
            <div class="drawBtn_div" style="background: #eb2709" @click="lineFun(false)">
                撤销
            </div>
            <div class="drawBtn_div" style="background: #f59a24" @click="returnFun">
                回退
            </div>
        </div>


        <div class="drawBtn" v-if="isDrawRegion">
            <div class="drawBtn_div" style="background: #169bd5 ;width: 150px;" @click="saveRegion">
                保存绘制
            </div>
            <div class="drawBtn_div" style="background: #eb2709" @click="resetRegion">
                重新绘制
            </div>

        </div>


        <!-- 添加管线弹出 -->
        <el-dialog :width="lineFlag?'1250px':'750px'" title="添加管线" custom-class="myClass1" :visible.sync="dialogVisible"
            @close="lineClose">
            <div style="display: flex; height: 100%;width: 100%;">
                <div style="width:750px; height: 100%;">

                    <el-form :model="formState" :rules="rules" ref="ruleForm" label-width="150px" class="demo-ruleForm">
                        <div class="disFlexSw1">
                            <!-- <el-form-item label="" prop="code">
                        <el-input v-model:value="formState.code" placeholder="请输入所属机构编号" />

                        </el-form-item> -->
                            <el-button type="primary" icon="el-icon-edit" @click="onPifc">导入上次数据</el-button>

                        </div>
                        <div class="disFlexSw">
                            <el-form-item label="所属里程段" prop="">
                                <el-select v-model="value3" placeholder="请选择" @change="liDuan()">
                                    <el-option v-for="item in options3" :key="item.value" :label="item.label"
                                        :value="item.value">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </div>
                        <div class="disFlexSw">
                            <el-form-item label="所属管网" prop="network_id">
                                <el-select v-model="value2" placeholder="请选择">
                                    <el-option v-for="item in options" :key="item.value" :label="item.label"
                                        :value="item.value">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                            <el-form-item label="所属路线" prop="route_id">
                                <el-select v-model="value1" placeholder="请选择">
                                    <el-option v-for="item in options1" :key="item.value" :label="item.label"
                                        :value="item.value">
                                    </el-option>
                                </el-select>
                            </el-form-item>
                        </div>
                        <div class="disFlexSw">
                            <el-form-item label="起点名称" prop="bName">
                                <el-input v-model:value="formState.bName" placeholder="请输入起点名称" />
                            </el-form-item>
                            <el-form-item label="终点名称" prop="eName">
                                <el-input v-model:value="formState.eName" placeholder="请输入终点名称" />
                            </el-form-item>
                        </div>
                        <div class="disFlexSw">
                            <el-form-item label="起点埋深" prop="bDepth">
                                <el-input v-model:value="formState.bDepth" type="number" placeholder="请输入起点埋深" />
                            </el-form-item>
                            <el-form-item label="终点埋深" prop="eDepth">
                                <el-input v-model:value="formState.eDepth" type="number" placeholder="请输入终点埋深" />
                            </el-form-item>
                        </div>
                        <div class="disFlexSw">
                            <el-form-item label="起点高程" prop="bElevation">
                                <el-input v-model:value="formState.bElevation" type="number" placeholder="请输入起点高程" />
                            </el-form-item>
                            <el-form-item label="终点高程" prop="eElevation">
                                <el-input v-model:value="formState.eElevation" type="number" placeholder="请输入终点高程" />
                            </el-form-item>
                        </div>
                        <div class="disFlexSw">
                            <el-form-item label="管线里程(km)" prop="diameter">
                                <el-input v-model:value="formState.diameter" type="number" placeholder="请输入管线里程" />
                            </el-form-item>
                            <el-form-item label="建设日期" prop="buildTime2">
                                <el-date-picker type="date" @change="dateChange" v-model:value="formState.buildTime2"
                                    placeholder="请输入建设日期" />

                            </el-form-item>
                        </div>
                        <div class="disFlexSw">
                            <el-form-item label="材质" prop="material">
                                <el-input v-model:value="formState.material" placeholder="请输入材质" />
                            </el-form-item>
                            <el-form-item label="所属区域" prop="areaCode">
                                <el-input v-model:value="formState.areaCode" placeholder="请输入所属区域" />
                            </el-form-item>
                        </div>
                        <div class="disFlexSw">
                            <el-form-item label="管线壁厚(mm)" prop="lineCode">
                                <el-input v-model:value="formState.lineCode" placeholder="请输入管线壁厚" />
                            </el-form-item>
                            <el-form-item label="管线外径(mm)" prop="pipeCode">
                                <el-input v-model:value="formState.pipeCode" placeholder="请输入管线外径" />
                            </el-form-item>
                        </div>
                        <div class="disFlexSw">
                            <el-form-item label="起点经度" prop="bLng">
                                <el-input v-model:value="formState.bLng" type="number" placeholder="请输入起点经度" />
                            </el-form-item>
                            <el-form-item label="起点纬度" prop="bLat">
                                <el-input v-model:value="formState.bLat" type="number" placeholder="请输入起点纬度" />
                            </el-form-item>
                        </div>
                        <div class="disFlexSw">
                            <el-form-item label="终点经度" prop="eLng">
                                <el-input v-model:value="formState.eLng" type="number" placeholder="请输入终点经度" />
                            </el-form-item>
                            <el-form-item label="终点纬度" prop="eLat">
                                <el-input v-model:value="formState.eLat" type="number" placeholder="请输入终点纬度" />
                            </el-form-item>
                        </div>


                        <!-- <el-button type="primary" @click="submitForm('ruleForm')">立即创建</el-button>
                    <el-button @click="resetForm('ruleForm')">重置</el-button> -->

                    </el-form>
                </div>
                <div style="width: 400px;height: 1;margin-left: 20px;" id="mapContainer2" v-if="lineFlag"></div>
            </div>

            <span slot="footer" class="dialog-footer">
                <el-button @click="lineClose">取 消</el-button>
                <el-button type="primary" @click="pipelineSure1" v-if="lineList.length>1">下一个</el-button>
                <el-button type="primary" @click="pipelineSure" v-else>确 定</el-button>

            </span>
        </el-dialog>

        <!--放水口弹出-->
        <el-dialog width="700px" :visible.sync="confirmLoading" custom-class="myClass" @close="wellClose" title="添加放水口">
            <el-form ref="formMarkerRef" :model="formMarker" :rules="rulesMarker" ref="ruleForm" label-width="120px"
                class="demo-ruleForm">
                <div class="disFlexSw">
                    <el-form-item label="所属管网" prop="code">
                        <el-select v-model="value" placeholder="请选择">
                            <el-option v-for="item in options" :key="item.value" :label="item.label"
                                :value="item.value">
                            </el-option>
                        </el-select>
                    </el-form-item>
                </div>
                <div class="disFlexSw">
                    <el-form-item label="放水口名称" prop="name">
                        <el-input v-model:value="formMarker.name" placeholder="请输入放水口名称" />
                    </el-form-item>
                    <el-form-item label="放水口附属物" prop="attach">
                        <el-input v-model:value="formMarker.attach" placeholder="请输入放水口附属物" />
                    </el-form-item>
                </div>
                <div class="disFlexSw">
                    <el-form-item label="放水口高程" prop="wblElevation">
                        <el-input v-model:value="formMarker.wblElevation" placeholder="请输入放水口高程" />
                    </el-form-item>
                    <el-form-item label="所在位置" prop="addr">
                        <el-input v-model:value="formMarker.addr" placeholder="请输入所在位置" />
                    </el-form-item>
                </div>
                <div class="disFlexSw">
                    <el-form-item label="放水口埋深" prop="depth">
                        <el-input v-model:value="formMarker.depth" placeholder="请输入放水口埋深" />
                    </el-form-item>
                    <el-form-item label="材质" prop="material">
                        <el-input v-model:value="formMarker.material" placeholder="请输入材质" />
                    </el-form-item>
                </div>
                <div class="disFlexSw">
                    <el-form-item label="所属区域" prop="area">
                        <el-input v-model:value="formMarker.area" placeholder="请输入所属区域" />
                    </el-form-item>
                    <el-form-item label="建设日期" prop="buildTime2">
                        <el-date-picker @change="dateChange2" v-model:value="formMarker.buildTime2"
                            placeholder="请输入建设日期" />
                    </el-form-item>
                </div>
                <div class="disFlexSw">
                    <el-form-item label="所属点位" prop="point">
                        <el-input v-model:value="formMarker.point" placeholder="请输入所属点位" />
                    </el-form-item>
                    <el-form-item label="机构编号" prop="pipeCode">
                        <el-input v-model:value="formMarker.pipeCode" placeholder="请输入所属机构编号" />
                    </el-form-item>
                </div>
                <div class="disFlexSw">
                    <el-form-item label="纬度" prop="lat">
                        <el-input v-model:value="formMarker.lat" placeholder="请输入纬度" />
                    </el-form-item>
                    <el-form-item label="经度" prop="lng">
                        <el-input v-model:value="formMarker.lng" placeholder="请输入经度" />
                    </el-form-item>
                </div>
                <div>
                    <div class="markerbtn" @click="markerDraw">地图绘制</div>
                </div>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="wellClose">取 消</el-button>
                <el-button type="primary" @click="tubewell">确 定</el-button>
            </span>
        </el-dialog>

        <!--巡检点弹出-->
        <el-dialog title="添加巡检点" :visible.sync="inspectionDialogVisible" width="60%"
            :before-close="inspectionHandleClose">
            <el-form ref="areaSiteForm" :model="areaSiteForm" label-width="120px">
                <el-form-item label="巡检区域">
                    <!--  <el-select @change="changeArea" v-model="areaSiteForm.area_id" placeholder="请选择巡检区域">
                        <el-option v-for="(item,index) in inspectionAreaList" :label="toBlank(item.area_name)" :value="index">

                        </el-option>
                    </el-select> -->


                    <el-select @change="changeArea" v-model="area_id" placeholder="请选择巡检区域">
                        <el-option v-for="(item,index) in inspectionAreaList" :label="toBlank(item.area_name)"
                            :key="item.id" :value="item.id">

                        </el-option>
                    </el-select>

                </el-form-item>
                <el-form-item label="巡检点名称">
                    <el-input v-model="areaSiteForm.site_name" placeholder="请输入名称"></el-input>
                </el-form-item>
                <el-form-item label="经纬度">
                    <el-col :span="6">
                        <el-input v-model="areaSiteForm.lng" placeholder="请输入经度"></el-input>
                    </el-col>
                    <el-col :span="6">
                        <el-input v-model="areaSiteForm.lat" placeholder="请输入纬度"></el-input>
                    </el-col>
                    <el-col :span="6">
                        <el-button type="primary" icon="el-icon-map-location" @click="selectLngLat">选择坐标</el-button>
                    </el-col>
                </el-form-item>
                <el-form-item label="验证方式">
                    <el-radio-group v-model="areaSiteForm.verify">
                        <el-radio label="0">不验证打卡范围</el-radio>
                        <el-radio label="1">验证打卡范围</el-radio>
                    </el-radio-group>
                </el-form-item>
                <el-form-item label="有效距离(米)" v-show="showDistanceFormItem">
                    <el-input v-model="areaSiteForm.distance" placeholder="请输有效距离" type="number"></el-input>
                </el-form-item>
                <el-form-item label="排序值">
                    <el-input v-model="areaSiteForm.weigh" placeholder="请输排序值" type="number"></el-input>
                </el-form-item>
                <el-form-item label="检查项">
                    <table class="table table-bordered">
                        <thead>
                            <tr>
                                <th>检查项名称</th>
                                <th>检查项类型</th>
                                <th>排序</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr v-for="(item,index) in cItemList">
                                <td>{{ item.item_name }}</td>
                                <td>{{ item.type == 1 ? "正常/异常" : "数据" }}</td>
                                <td>{{ item.weigh }}</td>
                                <td>
                                    <span class="btn btn-danger btn-xs glyphicon glyphicon-remove"
                                        @click="delItem(item)"></span>
                                </td>
                            </tr>
                            <tr>
                                <td><input type="text" class="form-control" id="itemName" name="itemName"
                                        placeholder="名称" v-model.trim="formData.item_name"></td>
                                <td>
                                    <select class="form-control" id="itemType" name="itemType"
                                        v-model.trim="formData.type">
                                        <option value="1">正常/异常</option>
                                        <option value="2">数据</option>
                                    </select>
                                </td>
                                <td><input type="number" class="form-control" id="itemOrder" name="itemOrder"
                                        placeholder="排序值" v-model.trim="formData.weigh"></td>
                                <td><span class="btn btn-success" @click="addItem">确认添加</span></td>
                            </tr>
                        </tbody>
                    </table>
                </el-form-item>
            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="inspectionDialogVisible = false">取 消</el-button>
                <el-button type="primary" @click="areaSiteSubmit">确 定</el-button>
            </span>
        </el-dialog>



        <!--区域弹出-->
        <el-dialog title="添加巡检点" :visible.sync="addAreaDialogVisible" width="60%"
            :before-close="closeAreaDialogVisible">
            <el-form  ref="areaForm" :model="areaForm" label-width="120px">

                <el-form-item label="巡检点名称">
                    <el-input v-model="areaForm.area_name" placeholder="请输入名称"></el-input>
                </el-form-item>

                <el-form-item :inline="true" label="巡检区域">
                    <div style="display: flex;">
                        <el-input disabled v-model="areaForm.lnglat"></el-input>
                        <el-button type="primary" @click="addDraw">绘制区域</el-button>
                    </div>
                    
                </el-form-item>

            </el-form>
            <span slot="footer" class="dialog-footer">
                <el-button @click="addAreaDialogVisible = false">取 消</el-button>
                <el-button type="primary" @click="areaSubmit">确 定</el-button>
            </span>
        </el-dialog>


    </div>
    <script>
        var root_url = "{:get_root_url()}";
        // 将vue挂载到id为home的根元素上
        var vm = new Vue({
            el: "#home",
            data: {
                area_id: '',
                region: [],
                polyEditor: null,
                areas: [],
                defaultProps: {
                    children: 'childlist',
                    label: 'area_name'
                },
                curAreaid: '', // 选中区域id
                addAreaDialogVisible: false,
                isDrawRegion: false, //绘制状态


                polygon: null,
                value3: '',
                options3: [],
                options3List: [],
                route_ids: [],
                chartFlag: 0,
                modeFlag: 0,
                infoFlag: 1,
                options: [],//管网选择数组
                value: '', //管网选中的,默认选中第一个,在放水口中用
                options1: [],//管网选择数组
                value1: '', //管网选中的,默认选中第一个,在管线中用
                value2: '', //管网选中的,默认选中第一个,在管线中用
                url: root_url, //请求数据前缀
                map: null, //地图
                map2: null, //地图
                polyline: null,
                dialogVisible: false, //弹出层管线
                isDrawLine: false,//用来监听当前是否是描画的状态
                statusType: '', //记录点击的操作按钮用于样式的控制以及事件的绑定
                isHistory: false, //控制历史记录的弹出层
                dateFormat: 'YYYY-MM-DD',
                historyValue: '', //时间选择框的值
                confirmLoading: false, //弹出层放水口
                dateClickClass: '',
                markOpen: false, //是否弹出添加管线的弹出层
                mapItemData: {}, //修改放水口的那个数据
                lineOpenEdit: false, //编辑
                mouseTool: null,//鼠标划线要用的全局变量
                lineFlag: false, //编辑
                // 管线
                formState: {
                    network_id: '',//管网id
                    route_id: '',//线路id,
                    code: '', ///机构编号 必填
                    bName: '', //起点名称
                    eName: '', //终点名称,
                    diameter: '', //管里程 必填
                    lineCode: '', //管壁厚
                    pipeCode: '', //管外径
                    bDepth: '', //起点埋深,必填,
                    eDepth: '', //终点埋深,必填,
                    bElevation: '', //起点高程,必填,
                    eElevation: '', //终点高程,必填,
                    material: '', //材质,必填
                    areaCode: '红河县', //所属区域,
                    bLng: '', //起点经度,必填,
                    bLat: '', //起点纬度,必填,
                    eLng: '', //终点经度 必填
                    eLat: '', //终点纬度 必填
                    buildTime: '', //建设日期,必填
                    buildTime2: '',
                    bMaster: 0, //是否主干0=否1=是,必填
                    bPress: 0, //是否加压0=否1=是
                    approval: 0,
                },
                //图例筛选的选项数据
                legendData: [
                    {
                        title: '管径<500',
                        color: '#C0D7FF',
                        value: '0,500',
                        islineCheck: true,
                        checked: true,
                    },
                    {
                        title: '500<管径<600',
                        color: '#A4C6FA',
                        value: '500,600',
                        islineCheck: true,
                        checked: true,
                    },
                    {
                        title: '600<管径<700',
                        color: '#89B4F9',
                        value: '600,700',
                        islineCheck: true,
                        checked: true,
                    },
                    {
                        title: '700<管径<800',
                        color: '#5693F7',
                        value: '700,800',
                        islineCheck: true,
                        checked: true,
                    },
                    {
                        title: '管径>800',
                        color: '#1F5BFF',
                        value: '800,999999',
                        islineCheck: true,
                        checked: true,
                    },
                    {
                        title: '放水口',
                        color: '#08CC71',
                        value: '放水口',
                        islineCheck: false,
                        checked: true,
                    }
                    // {
                    // 	title: '泵机',
                    // 	color: '#9B838C',
                    // 	value: '泵机',
                    // 	islineCheck: false,
                    // 	checked: true,
                    // },
                ],
                //图例筛选的选项数据
                legendData2: [
                    {
                        title: '利博河至土鲁白输水管',
                        value: '1',
                        islineCheck: true,
                        checked: true,
                    },
                    {
                        title: '石榴山输水管',
                        value: '2',
                        islineCheck: true,
                        checked: true,
                    },
                    {
                        title: '阿扎河水库至他龙倒虹吸补水管道',
                        value: '3',
                        islineCheck: true,
                        checked: true,
                    }
                ],
                rules: {
                    code: [{
                        required: true,
                        message: '请输入管线编号哦~',
                        trigger: 'blur',
                    },],
                    bName: [{
                        required: true,
                        message: '请输入起点名称哦~',
                        trigger: 'blur',
                    },],
                    eName: [{
                        required: true,
                        message: '请输入终点名称哦~',
                        trigger: 'blur',
                    },],
                    areaCode: [{
                        required: true,
                        message: '请输入所属区域哦~',
                        trigger: 'blur',
                    },],
                    lineCode: [{
                        required: true,
                        message: '请输入所属路线哦~',
                        trigger: 'blur',
                    },],
                    diameter: [{
                        required: true,
                        message: '请输入管直径哦~',
                        trigger: 'blur',
                    },],
                    bDepth: [{
                        required: true,
                        message: '请输入起点埋深哦~',
                        trigger: 'blur',
                    },],
                    eDepth: [{
                        required: true,
                        message: '请输入终点埋深哦~',
                        trigger: 'blur',
                    },],
                    bElevation: [{
                        required: true,
                        message: '请输入起点高程哦~',
                        trigger: 'blur',
                    },],
                    eElevation: [{
                        required: true,
                        message: '请输入终点高程哦~',
                        trigger: 'blur',
                    },],
                    buildTime2: [{
                        required: true,
                        message: '请输入建设日期哦~',
                        trigger: 'blur',
                    },],
                    material: [{
                        required: true,
                        message: '请输入材质哦~',
                        trigger: 'blur',
                    },],
                    pipeCode: [{
                        required: true,
                        message: '请输入所属管网编号哦~',
                        trigger: 'blur',
                    },],
                    bLng: [{
                        required: true,
                        message: '请输入起点经度哦~',
                        trigger: 'blur',
                    },],
                    bLat: [{
                        required: true,
                        message: '请输入起点纬度哦~',
                        trigger: 'blur',
                    },],
                    eLng: [{
                        required: true,
                        message: '请输入终点经度哦~',
                        trigger: 'blur',
                    },],
                    eLat: [{
                        required: true,
                        message: '请输入终点纬度哦~',
                        trigger: 'blur',
                    },],
                    bMaster: [{
                        required: true,
                        message: '请输入终点纬度哦~',
                        trigger: 'blur',
                    },],
                    bPress: [{
                        required: true,
                        message: '请输入终点纬度哦~',
                        trigger: 'blur',
                    },],
                },

                tubeWellList: [],
                formMarker: {
                    // oid: '', //机构编号 必填
                    code: '', ///放水口编号 必填
                    name: '', //放水口名称 必填
                    attach: '无', //放水口附属物
                    wblElevation: '0', //放水口高程,必填,
                    addr: '红河县', //所在位置,必填,
                    depth: '0', ///放水口埋深,必填,
                    buildTime: '', //建设日期,必填
                    buildTime2: '',
                    material: '无', //材质,必填
                    area: '红河县', //所属区域,
                    point: '无', //所属点位
                    lng: '', //经度,必填,
                    lat: '', //纬度,必填,
                    pipeCode: '无', //所属管网编号,必填
                },
                // 放水口验证
                rulesMarker: {
                    area: [
                        {
                            required: true,
                            message: '请输入所属区域哦~',
                            trigger: 'blur',
                        },
                    ],
                    code: [
                        {
                            required: true,
                            message: '请输入放水口编号哦~',
                            trigger: 'blur',
                        },
                    ],
                    attach: [
                        {
                            required: true,
                            message: '请输入放水口覆盖物哦~',
                            trigger: 'blur',
                        },
                    ],
                    addr: [
                        {
                            required: true,
                            message: '请输入所属位置哦~',
                            trigger: 'blur',
                        },
                    ],
                    point: [
                        {
                            required: true,
                            message: '请输入所属点位哦~',
                            trigger: 'blur',
                        },
                    ],
                    name: [
                        {
                            required: true,
                            message: '请输入放水口名称哦~',
                            trigger: 'blur',
                        },
                    ],
                    wblElevation: [
                        {
                            required: true,
                            message: '请输入放水口高程哦~',
                            trigger: 'blur',
                        },
                    ],
                    depth: [
                        {
                            required: true,
                            message: '请输入放水口埋深哦~',
                            trigger: 'blur',
                        },
                    ],
                    material: [
                        {
                            required: true,
                            message: '请输入材质哦~',
                            trigger: 'blur',
                        },
                    ],
                    buildTime2: [
                        {
                            required: true,
                            message: '请输入建设日期哦~',
                            trigger: 'blur',
                        },
                    ],
                    lng: [
                        {
                            required: true,
                            message: '请输入起点经度哦~',
                            trigger: 'blur',
                        },
                    ],
                    lat: [
                        {
                            required: true,
                            message: '请输入起点纬度哦~',
                            trigger: 'blur',
                        },
                    ],
                    pipeCode: [
                        {
                            required: true,
                            message: '请输入所属管网编号哦~',
                            trigger: 'blur',
                        },
                    ],
                },
                wellTypes: 1, //用来判断点击的是修改还是添加 0:修改 1:填加
                wellLatLng: [],// 管网数据
                labelLatLng: [],
                drawType: '',//绘制
                lineDrawData: [],//绘制地图线的坐标数组
                lineList: [],//线段树组
                // 创建弹窗里面的线段
                linePolyline: null,
                linePolyindex: 0,
                lineTypes: 1,
                lineLatLng: [],
                screenList: [],
                LatestObj: {}, // 获取最新数据
                lineData: '',
                lineData2: '',
                letpipeline: [], //管线

                //巡检点相关数据
                inspectionDialogVisible: false,
                inspectionAreaList: [],
                areaSiteForm: {
                    area_id: '',//区域ID
                    site_name: '',//巡检点名称
                    lng: '',//经度
                    lat: '',//纬度
                    verify: '0',//验证方式
                    distance: 0,//有效距离
                    weigh: 0,//排序
                    item_json: '',//检查项
                },

                areaForm: {
                    pid: '',
                    area_name: '',
                    lnglat: []
                },

                showDistanceFormItem: false,//是否显示有效距离文本框
                formData: {
                    item_name: '',
                    type: 1,
                    weigh: '0',
                },
                cItemList: [],//当前的检查项列表
            },




            filters: {
                ellipsis(value) {
                    if (!value) return ''
                    if (value.length > 8) {
                        return value.slice(0, 8) + '...'
                    }
                    return value
                }
            },
            created() {
            },
            mounted() {

                this.getArea();

                // setTimeout(() => {
                this.getCategory()
                this.initMap();
                this.getSectionList()
                this.wellList()
                // this.wellList()
                // this.routeList()
                this.networkList()
                this.getLatest()
                // }, 1000)
                this.getAreaList();
            },
            watch: {
                wellTypes: function (val, old) {
                    if (val == 1 && old == 0) {
                        this.formMarker = {
                            // oid: '', //机构编号 必填
                            code: '', ///放水口编号 必填
                            name: '', //放水口名称 必填
                            attach: '无', //放水口附属物
                            wblElevation: '0', //放水口高程,必填,
                            addr: '红河县', //所在位置,必填,
                            depth: '0', ///放水口埋深,必填,
                            buildTime: '', //建设日期,必填
                            buildTime2: '',
                            material: '无', //材质,必填
                            area: '红河县', //所属区域,
                            point: '无', //所属点位
                            lng: '', //经度,必填,
                            lat: '', //纬度,必填,
                            pipeCode: 'NzWiSE', //所属管网编号,必填
                        }
                    }
                },
                linePolyindex: function (val, old) {
                    if (val == 0 && old == 1) {
                        this.formState = {
                            network_id: '',//管网id
                            route_id: '',//线路id,
                            code: '', ///机构编号 必填
                            bName: '', //起点名称
                            eName: '', //终点名称,
                            diameter: '', //管里程 必填
                            lineCode: '', //管壁厚
                            pipeCode: '', //管外径
                            bDepth: '', //起点埋深,必填,
                            eDepth: '', //终点埋深,必填,
                            bElevation: '', //起点高程,必填,
                            eElevation: '', //终点高程,必填,
                            material: '', //材质,必填
                            areaCode: '红河县', //所属区域,
                            bLng: '', //起点经度,必填,
                            bLat: '', //起点纬度,必填,
                            eLng: '', //终点经度 必填
                            eLat: '', //终点纬度 必填
                            buildTime: '', //建设日期,必填
                            buildTime2: '',
                            bMaster: 0, //是否主干0=否1=是,必填
                            bPress: 0, //是否加压0=否1=是
                            approval: 0,
                        }
                    }
                },
                "areaSiteForm.verify": function (val, old) {
                    if (parseInt(val) === 0) {
                        this.showDistanceFormItem = false;
                    } else {
                        this.showDistanceFormItem = true;
                    }
                },
            },
            methods: {

                //选择区域
                changeArea(e) {

                    console.log('abc---', e, this.inspectionAreaList)
                    let obj = this.inspectionAreaList.find(item => {
                        return item.id == e;
                    })





                    this.areaSiteForm.area_id = obj.id;

                    this.region = JSON.parse(obj['lnglat'])
                    console.log('obj---', this.areaSiteForm.area_id)


                },


                //把&nbsp;转成空格实体

                toBlank(str) {

                    let data = encodeURI(str);

                    data = data.replace(/&nbsp;/g, ' ');

                    return decodeURI(data);

                },
                //开启巡检弹窗初始化表单
                inspectionHandleOpen() {
                    this.inspectionDialogVisible = true;
                },

                //添加区域
                addArea(e) {
                    this.areaForm.id = '';
                    if (e) {
                        this.areaForm.pid = e.id
                    } else {
                        this.areaForm.pid = 0;
                    }

                    this.addAreaDialogVisible = true;
                },

                //编辑区域
                editArea(e) {
                    this.areaForm.id = e.id;
                    this.areaForm.pid = e.pid;
                    this.areaForm.lnglat = e.lnglat;
                    this.areaForm.area_name = e.area_name;

                    this.addAreaDialogVisible = true;


                },

                //关闭巡检弹窗前操作
                inspectionHandleClose(done) {
                    this.inspectionDialogVisible = false;
                },


                closeAreaDialogVisible() {
                    this.addAreaDialogVisible = false;
                },

                //地图绘制拾取坐标,在放水口中用
                selectLngLat() {
                    this.inspectionDialogVisible = false;
                    console.log("点击获取经纬度11111111111111")
                    this.oninfoFlag(3)
                    this.draw2()

                    this.polygon.on('click', function (e) {
                        console.log(e, "点击获取经纬度")
                        vm.areaSiteForm.lng = e.lnglat.lng
                        vm.areaSiteForm.lat = e.lnglat.lat
                        vm.inspectionDialogVisible = true
                        vm.oninfoFlag(vm.oldType)
                        vm.map.remove(vm.polygon);

                        vm.map.setCenter([102.366527, 23.361086])

                    })

                    this.map.on('click', function (e) {
                        console.log(e, "点击获取经纬度")
                        vm.areaSiteForm.lng = e.lnglat.lng
                        vm.areaSiteForm.lat = e.lnglat.lat
                        vm.inspectionDialogVisible = true
                        vm.oninfoFlag(vm.oldType)
                        vm.map.remove(vm.polygon);
                        vm.map.setCenter([102.366527, 23.361086])
                    })

                },


                //绘制区域
                draw(type) {
                    var path1 = []
                    if (!Array.isArray(this.areaForm.lnglat)) {
                        path1 = JSON.parse(this.areaForm.lnglat);
                    } else {
                        path1 = this.areaForm.lnglat
                    }

                    console.log('绘制坐标---', path1)

                    this.polygon = new AMap.Polygon({
                        path: path1,
                        zIndex: 500,
                    })

                    this.map.add([this.polygon]);
                    this.map.setFitView();

                    this.polyEditor.addAdsorbPolygons([this.polygon]);


                    setTimeout(() => {
                        this.polyEditor.setTarget(this.polygon);
                        this.polyEditor.open();
                    }, 1000)






                    this.polygon.on('dblclick', () => {
                        this.polyEditor.setTarget(this.polygon);
                        this.polyEditor.open();
                    })



                },

                draw2() {
                    var path1 = this.region;
                    console.log('----绘制---', this.region)

                    this.polygon = new AMap.Polygon({
                        path: path1,
                        zIndex: 500,
                    })

                    this.map.add([this.polygon]);
                    this.map.setFitView();

                    this.polyEditor.addAdsorbPolygons([this.polygon]);
                },

                //保存区域
                saveRegion() {
                    this.polyEditor.close()
                    this.addAreaDialogVisible = true;
                    this.isDrawRegion = false;
                    this.map.remove(this.polygon)

                },

                areaSubmit() {




                    if (!this.areaForm.area_name) {
                        this.$message({
                            message: '区域名称不能为空',
                            type: 'error'
                        });
                        return false;
                    }

                    if (this.areaForm.lnglat.length < 1) {
                        this.$message({
                            message: '请先绘制区域',
                            type: 'error'
                        });
                        return false;
                    }

                    if (Array.isArray(this.areaForm.lnglat)) {
                        this.areaForm.lnglat = JSON.stringify(this.areaForm.lnglat)
                    }



                    axios.post(`${this.url}/api/inspection/areasite/saveArea`, this.areaForm).then(res => {
                        console.log('返回---', res.data.data)
                        this.addAreaDialogVisible = false;

                        this.getArea()
                        this.getAreaList()

                        this.areaForm = {
                            pid: '',
                            area_name: '',
                            lnglat: []
                        }

                    })

                },

                addDraw() {



                    this.addAreaDialogVisible = false;
                    this.isDrawRegion = true;
                    this.createPolygon()
                },


                //重置区域
                resetRegion() {
                    if (this.polygon) {
                        this.map.remove(this.polygon)
                    }
                    this.polyEditor.setTarget();
                    this.polyEditor.open();
                },

                createPolygon() {

                    if (this.areaForm.lnglat && this.areaForm.lnglat.length > 0) {
                        this.draw();
                    }

                    //  this.polyEditor.close();
                    this.polyEditor.setTarget();
                    this.polyEditor.open();
                },



                getArea() {
                    axios.get(`${this.url}/api/inspection/areasite/area`).then(res => {
                        console.log('区域树---', res.data.data)
                        this.areas = res.data.data
                    })
                },

                handleNodeClick(e) {

                    if (this.polygon) {
                        this.map.remove(this.polygon)
                    }

                    console.log('区域--', e)
                    this.curAreaid = e.id;
                    this.region = JSON.parse(e.lnglat)
                    this.draw()
                },





                //保存巡检点
                areaSiteSubmit() {
                    this.areaSiteForm.item_json = this.cItemList
                    axios.post(`${this.url}/api/inspection/areasite/add`, this.areaSiteForm).then((res) => {
                        if (res.data.code === 1) {
                            this.inspectionDialogVisible = false;
                            this.areaSiteForm = {
                                area_id: '',//区域ID
                                site_name: '',//巡检点名称
                                lng: '',//经度
                                lat: '',//纬度
                                verify: '0',//验证方式
                                distance: 0,//有效距离
                                weigh: 0,//排序
                                item_json: '',//检查项
                            };
                        }
                        layer.msg(res.data.msg);
                    })
                },
                //获取巡检区域列表
                getAreaList() {
                    axios({
                        method: 'GET',
                        url: this.url + '/api/inspection/areasite/areaList',
                        headers: {
                            "Access-Control-Allow-Origin": "*",
                        },
                    }).then(res => {
                        this.inspectionAreaList = res.data.data;
                    })
                },
                //添加检查项
                addItem: function () {
                    if (!this.formData.item_name) {
                        layer.msg('请填写名称');
                        return;
                    }
                    if (!this.formData.weigh) {
                        layer.msg('请填写排序值');
                        return;
                    }
                    // 检查是否重名
                    for (let i = 0; i < this.cItemList.length; i++) {
                        if (this.cItemList[i].item_name === this.formData.item_name) {
                            layer.msg('检查项:' + this.formData.item_name + ' 已存在')
                            return;
                        }
                    }
                    this.cItemList.push({ ...this.formData });
                    // 根据排序值从小到大排序
                    this.cItemList.sort((a, b) => a.weigh - b.weigh);
                    // 更新areaSiteForm.item_json
                    this.areaSiteForm.item_json = JSON.stringify(this.cItemList);
                },
                //删除检查项
                delItem: function (obj) {
                    let index = this.cItemList.findIndex(item => item.item_name === obj.item_name);
                    if (index > -1) {
                        this.cItemList.splice(index, 1); // 删除找到的对象
                    }
                    // 更新areaSiteForm.item_json
                    this.areaSiteForm.item_json = JSON.stringify(this.cItemList);
                },
                // 切换地图

                onroute() {
                    axios({
                        method: 'POST',
                        url: this.url + '/api/pipes/line/route',
                        data: { route_ids: this.route_ids },
                        headers: {
                            "Access-Control-Allow-Origin": "*",
                        },
                    }).then(res => {
                        console.log(res.data.data, "里程段")
                        this.letpipeline = res.data.data
                        this.configPline3(this.letpipeline)
                    })
                },
                onchartFlag(type) {
                    if (this.infoWindow) {
                        this.closeInfo()
                    }
                    this.chartFlag = type
                    if (type == 1) {  //1卫星图  2普通地图
                        layers = [
                            new AMap.TileLayer.Satellite(),
                            new AMap.TileLayer.RoadNet()
                        ]
                    } else {
                        layers = [
                            new AMap.TileLayer.RoadNet()
                        ]
                    }
                    this.map.setLayers(layers);
                },

                onRegion() {
                    this.draw()
                },

                oninfoFlag(type) {
                    this.oldType = this.infoFlag;
                    this.infoFlag = type

                    if (this.infoWindow) {
                        this.closeInfo()
                    }
                    this.map.remove(this.lineLatLng);
                    this.lineLatLng = []
                    this.map.remove(this.wellLatLng);
                    this.wellLatLng = []
                    this.map.remove(this.labelLatLng);
                    if (this.polygon) {
                        this.map.remove(this.polygon);
                    }

                    this.labelLatLng = []
                    if (type == 0) {
                        this.onroute()
                    } else if (type == 1) {
                        this.wellList()
                        if (this.modeFlag == 0) {
                            this.sw_pipe_web2()
                        } else {
                            this.sw_pipe_web1()
                        }
                    } else if (type == 4) {  //巡检区域


                    }
                },
                liDuan(e) {
                    let arr = this.options3List.filter((item) => {
                        if (this.value3 == item.id) {
                            return item
                        }
                    })
                    let data = arr[0]
                    this.formState.pipeCode = data.line_diameter_out
                    this.formState.lineCode = data.line_thickness
                    this.formState.material = data.line_material
                },
                onmodeFlag(type) {
                    if (this.infoWindow) {
                        this.closeInfo()
                    }

                    this.modeFlag = type
                    this.map.remove(this.lineLatLng);
                    this.lineLatLng = []
                    if (type == 1) {
                        this.sw_pipe_web()
                    } else {
                        this.sw_pipe_web2()

                    }
                },
                getCategory() {
                    axios({
                        method: 'GET',
                        url: this.url + '/api/pipes/line/category',
                        headers: {
                            "Access-Control-Allow-Origin": "*",
                        },
                    }).then(res => {
                        let arr = []
                        this.screenList = []
                        res.data.data.map((item, index) => {
                            arr.push({
                                title: item.title,
                                color: item.pipe_color,
                                value: `${item.start_diameter},${item.end_diameter}`,
                                islineCheck: true,
                                checked: true,
                            })
                        })
                        arr.map((item, index) => {
                            this.screenList.push(`${item.value}`)
                        })

                        this.legendData = [...arr, {
                            title: '放水口',
                            color: '#08CC71',
                            value: '放水口',
                            islineCheck: false,
                            checked: true,
                        }
                            // {
                            // 	title: '泵机',
                            // 	color: '#08CC71',
                            // 	value: '泵机',
                            // 	islineCheck: false,
                            // 	checked: true,
                            // },
                        ]
                        this.routeList()
                    })
                },

                // 获取里程段列表

                getSectionList() {
                    axios({
                        method: 'GET',
                        url: this.url + '/api/pipes/line/getSectionList',
                        headers: {
                            "Access-Control-Allow-Origin": "*",
                        },
                    }).then(res => {
                        console.log(res.data.data, "里程段")
                        this.options3List = res.data.data

                        this.options3 = res.data.data.map((item) => {
                            let Obj = {
                                value: item.id,
                                label: item.section_name
                            }
                            return Obj
                        })
                    })
                },


                // 获取最新一条管线信息
                getLatest() {
                    axios({
                        method: 'GET',
                        url: this.url + '/api/pipes/line/getLast',
                        headers: {
                            "Access-Control-Allow-Origin": "*",
                        },
                    }).then(res => {
                        this.LatestObj = res.data.data
                    })
                },
                // 导入上一次数据事件
                onPifc() {
                    let row = this.LatestObj
                    if (!row) {
                        this.$message({
                            message: '您还未添加信息',
                            type: 'warning'
                        });
                        return
                    }
                    let Time = this.getTime1(row.line_building_time)
                    this.formState.bName = row.line_start_name
                    this.formState.eName = row.line_end_name
                    this.formState.diameter = row.line_mileage
                    this.formState.pipeCode = row.line_diameter_out
                    this.formState.lineCode = row.line_thickness
                    this.formState.bDepth = row.line_start_depth
                    this.formState.eDepth = row.line_end_depth
                    this.formState.bElevation = row.line_start_height
                    this.formState.eElevation = row.line_end_height
                    this.formState.material = row.line_material
                    this.formState.areaCode = row.line_area
                    this.formState.buildTime = row.line_building_time
                    this.formState.buildTime2 = Time
                },
                // 请求管网数据
                networkList() {
                    axios({
                        method: 'GET',
                        url: this.url + '/api/pipes/network/lists',
                        headers: {
                            "Access-Control-Allow-Origin": "*",
                        },
                    }).then(res => {
                        this.value = res.data.data[0].id
                        this.value2 = res.data.data[0].id
                        this.options = res.data.data.map((item) => {
                            let Obj = {
                                value: item.id,
                                label: item.network_name
                            }
                            return Obj
                        })
                    })
                },
                // 请求线路数据
                routeList() {
                    axios({
                        method: 'GET',
                        url: this.url + "/api/pipes/route/lists",
                        headers: {
                            "Access-Control-Allow-Origin": "*",
                        },
                    }).then(res => {
                        // 处理登录成功的情况
                        this.value1 = res.data.data[0].id
                        this.legendData2 = res.data.data.map((item) => {
                            let Obj = {
                                title: item.route_name,
                                value: item.id,
                                islineCheck: true,
                                checked: true,
                            }
                            return Obj
                        })
                        this.route_ids = []
                        this.options1 = res.data.data.map((item) => {
                            this.route_ids.push(item.id)
                            let Obj = {
                                value: item.id,
                                label: item.route_name
                            }
                            return Obj
                        })

                        this.sw_pipe_web2();
                    })
                },
                // 请求放水口数据
                wellList() {
                    axios({
                        method: 'GET',
                        url: this.url + '/api/pipes/well/lists',
                        headers: {
                            "Access-Control-Allow-Origin": "*",
                        },
                    }).then(res => {
                        // 处理登录成功的情况
                        this.tubeWellList = res.data.data
                        this.onMarker(this.tubeWellList)
                    })
                },
                // 请求管线数据
                sw_pipe_web() {
                    axios.post(this.url + '/api/pipes/line/lists', { line_diameter_out: this.screenList }).then(res => {
                        if (res.data.code == 1) {
                            this.lineData = res.data.data
                            console.log(res.data.data)
                            this.configPline(this.lineData)
                        }
                    })
                },
                sw_pipe_web2() {
                    axios.post(this.url + '/api/pipes/line/section', { line_diameter_out: this.screenList }).then(res => {
                        if (res.data.code == 1) {
                            this.lineData2 = res.data.data
                            this.configPline2(this.lineData2)
                        }
                    })
                },
                // 初始化地图
                initMap() {
                    this.map = new AMap.Map("mapContainer", {
                        zoom: 12,
                        center: [102.366527, 23.361086], //初始化地图中心点位置
                        resizeEnable: true
                    });
                    this.mouseTool = new window.AMap.MouseTool(this.map)
                    this.ListenToCompleteDrawing()
                    this.polyEditor = new AMap.PolygonEditor(this.map);

                    this.polyEditor.on('end', function (data) {
                        //vm.save(data['target']['_opts']['path']);
                        // vm.addAreaDialogVisible = true;
                        vm.areaForm.lnglat = data['target']['_opts']['path'];

                    });

                    this.polyEditor.on('add', function (data) {
                        /* if (polygon) {
                            map.remove(polygon);
                        } */
                        // console.log(data);
                        console.log('数据1----', JSON.stringify(data['target']['_opts']['path']));

                        vm.polygon = data.target;
                        vm.polyEditor.addAdsorbPolygons(vm.polygon);
                        vm.polygon.on('dblclick', () => {
                            vm.polyEditor.setTarget(vm.polygon);
                            vm.polyEditor.open();
                        })
                    })

                },




                // 初试化小地图
                initMap2(arr) {
                    this.map2 = new AMap.Map("mapContainer2", {
                        zoom: 16,
                        center: arr[0], //初始化地图中心点位置
                        resizeEnable: true
                    });
                    this.cpmAddline(arr)
                    this.cpmAdddot(arr)
                },
                // 创建放水口标点
                onMarker(row) {
                    row.map((item, index) => {

                        const marker = new AMap.CircleMarker({
                            center: [item.well_lng, item.well_lat],
                            radius: 10, //3D视图下,CircleMarker半径不要超过64px
                            strokeColor: 'white',
                            strokeWeight: 2,
                            strokeOpacity: 1,
                            fillColor: '#08CC71',
                            zIndex: 100,
                            bubble: true,
                            cursor: 'pointer',
                            zooms: [10, 20],
                            extData: item,
                            clickable: true,
                        });
                        const label = new AMap.Text({
                            position: [item.well_lng, item.well_lat],  // 设置标签的位置,这里设为圆形标记的中心
                            offset: new AMap.Pixel(0, -35),  // 设置标签的偏移量,这里让标签稍微向上偏移一些
                            text: item.well_name,  // 设置标签的内容
                            bubble: true,
                            anchor: 'top-center',
                            extData: item,
                            style: {
                                'padding': '2px 8px',
                                'border-radius': '8px',
                                'background': 'linear-gradient(90deg,#409eff,#1ad7b3)',
                                'border-width': 0,
                                'text-align': 'center',
                                'font-size': '12px',
                                'color': '#fff'
                            },
                        });
                        this.map.add(label);
                        this.map.add(marker);
                        this.wellLatLng.push(marker)
                        this.labelLatLng.push(label)
                        marker.on('click', this.mapClick)
                        label.on('click', this.mapClick)
                    })
                },
                // 添加放水口
                wellAdd() {
                    let row = this.formMarker
                    axios.post(`${this.url}/api/pipes/well/add`, {
                        network_id: this.value,
                        well_name: row.name,
                        well_org_code: row.pipeCode,
                        well_subsidiary: row.attach,
                        well_bottom_height: row.wblElevation,
                        well_depth: row.depth,
                        well_material: row.material,
                        well_position: row.addr,
                        well_area: row.area,
                        well_site: row.point,
                        well_lng: row.lng,
                        well_lat: row.lat,
                        well_building_time: row.buildTime,
                    }).then((res) => {
                        const h = this.$createElement;
                        this.$notify({
                            title: '添加放水口',
                            message: res.data.msg
                        });
                        if (res.data.code == 1) {
                            this.confirmLoading = false
                            this.wellRedraw()
                            this.formMarker = {
                                // oid: '', //机构编号 必填
                                code: '', ///放水口编号 必填
                                name: '', //放水口名称 必填
                                attach: '无', //放水口附属物
                                wblElevation: '0', //放水口高程,必填,
                                addr: '红河县', //所在位置,必填,
                                depth: '0', ///放水口埋深,必填,
                                buildTime: '', //建设日期,必填
                                buildTime2: '',
                                material: '无', //材质,必填
                                area: '红河县', //所属区域,
                                point: '无', //所属点位
                                lng: '', //经度,必填,
                                lat: '', //纬度,必填,
                                pipeCode: 'NzWiSE', //所属管网编号,必填
                            }
                        }
                    })
                },
                // 修改放水口
                wellEdit() {
                    let row = this.formMarker
                    axios.post(`${this.url}/api/pipes/well/edit`, {
                        id: row.ids,
                        network_id: this.value,
                        well_name: row.name,
                        well_org_code: row.code,
                        well_subsidiary: row.attach,
                        well_bottom_height: row.wblElevation,
                        well_depth: row.depth,
                        well_material: row.material,
                        well_position: row.addr,
                        well_area: row.area,
                        well_site: row.point,
                        well_lng: row.lng,
                        well_lat: row.lat,
                        well_building_time: row.buildTime,
                    }).then((res) => {
                        const h = this.$createElement;
                        this.$notify({
                            title: '修改放水口',
                            message: res.data.msg
                        });
                        if (res.data.code == 1) {
                            this.wellRedraw()
                            this.confirmLoading = false
                            this.formMarker = {
                                // oid: '', //机构编号 必填
                                code: '', ///放水口编号 必填
                                name: '', //放水口名称 必填
                                attach: '无', //放水口附属物
                                wblElevation: '0', //放水口高程,必填,
                                addr: '红河县', //所在位置,必填,
                                depth: '0', ///放水口埋深,必填,
                                buildTime: '', //建设日期,必填
                                buildTime2: '',
                                material: '无', //材质,必填
                                area: '红河县', //所属区域,
                                point: '无', //所属点位
                                lng: '', //经度,必填,
                                lat: '', //纬度,必填,
                                pipeCode: 'NzWiSE', //所属管网编号,必填
                            }
                        }
                    })
                },
                // 放水口确定事件
                tubewell(e) {
                    // this.lineLatLng.map((res) => {
                    // 	res.on('click', this.mapClick)
                    // })
                    if (this.wellTypes == '1') {
                        this.wellAdd()
                    } else if (this.wellTypes == '0') {
                        this.wellEdit()
                    }
                },
                // 添加编辑管线
                configPline2(arr) {
                    let that = this;
                    // [
                    // 	[item.line_start_lng, item.line_start_lat],
                    // 	[item.line_end_lng, item.line_end_lat],

                    // ],
                    arr.map((item) => {
                        var polyline = new window.AMap.Polyline({
                            path: item.position_arr,
                            extData: item,
                            strokeColor: item.pipe_color,
                            strokeOpacity: 1,
                            bubble: true,
                            strokeWeight: 6,
                            strokeStyle: 'solid',
                            cursor: 'pointer',
                        })
                        this.map.add(polyline)
                        this.lineLatLng.push(polyline)
                    })

                    this.lineLatLng.map((res) => {
                        res.on('click', that.mapClick)
                    })

                    // polyline.on('click', that.mapClick)
                },
                configPline3(arr) {
                    let that = this;
                    arr.map((item) => {
                        var polyline = new window.AMap.Polyline({
                            path: item.position_arr,
                            extData: item,
                            strokeColor: '#1677ff',
                            strokeOpacity: 1,
                            strokeWeight: 6,
                            bubble: true,
                            strokeStyle: 'solid',
                            cursor: 'pointer',
                        })
                        this.map.add(polyline)
                        this.lineLatLng.push(polyline)
                    })

                    this.lineLatLng.map((res) => {
                        res.on('click', that.mapClick)
                    })

                    // polyline.on('click', that.mapClick)
                },
                //创建线并绑定点击事件
                configPline(arr) {
                    let that = this;
                    arr.map((item) => {
                        var polyline = new window.AMap.Polyline({
                            path: [
                                [item.line_start_lng, item.line_start_lat],
                                [item.line_end_lng, item.line_end_lat],
                            ],
                            extData: item,
                            strokeColor: item.pipe_color,
                            strokeOpacity: 1,
                            strokeWeight: 6,
                            bubble: true,
                            strokeStyle: 'solid',
                            cursor: 'pointer',
                        })
                        this.map.add(polyline)
                        this.lineLatLng.push(polyline)
                    })

                    this.lineLatLng.map((res) => {
                        res.on('click', that.mapClick)
                    })
                },
                // 添加管线
                PostaddLine(flag) {
                    let row = this.formState
                    axios.post(`${this.url}/api/pipes/line/add`, {
                        section_id: this.value3,
                        network_id: this.value2,
                        route_id: this.value1,
                        line_start_name: row.bName,
                        line_end_name: row.eName,
                        line_mileage: row.diameter,
                        line_diameter_out: row.pipeCode,
                        line_thickness: row.lineCode,
                        line_start_depth: row.bDepth,
                        line_end_depth: row.eDepth,
                        line_start_height: row.bElevation,
                        line_end_height: row.eElevation,
                        line_material: row.material,
                        line_area: row.areaCode,
                        line_start_lng: row.bLng,
                        line_start_lat: row.bLat,
                        line_end_lng: row.eLng,
                        line_end_lat: row.eLat,
                        line_building_time: row.buildTime,
                    }).then((res) => {
                        const h = this.$createElement;
                        this.$notify({
                            title: '添加管线',
                            message: res.data.msg
                        });
                        if (res.data.code == 1) {
                            this.formState = {
                                network_id: '',//管网id
                                route_id: '',//线路id,
                                code: '', ///机构编号 必填
                                bName: '', //起点名称
                                eName: '', //终点名称,
                                diameter: '', //管里程 必填
                                lineCode: '', //管壁厚
                                pipeCode: '', //管外径
                                bDepth: '', //起点埋深,必填,
                                eDepth: '', //终点埋深,必填,
                                bElevation: '', //起点高程,必填,
                                eElevation: '', //终点高程,必填,
                                material: '', //材质,必填
                                areaCode: '红河县', //所属区域,
                                bLng: '', //起点经度,必填,
                                bLat: '', //起点纬度,必填,
                                eLng: '', //终点经度 必填
                                eLat: '', //终点纬度 必填
                                buildTime: '', //建设日期,必填
                                buildTime2: '',
                                bMaster: 0, //是否主干0=否1=是,必填
                                bPress: 0, //是否加压0=否1=是
                                approval: 0,
                            }
                            this.value3 = ''
                            if (flag) {

                                this.lineList.splice(0, 1)
                                this.lookUserPath(this.lineList[0])

                                this.cpmDeleteline()
                                console.log(this.lineList[0], "this.lineList[0]")
                                this.cpmAddline(this.lineList[0])
                                this.cpmAdddot(this.lineList[0])
                                this.formState.bLng = this.lineList[0][0][0]
                                this.formState.bLat = this.lineList[0][0][1]
                                this.formState.eLng = this.lineList[0][1][0]
                                this.formState.eLat = this.lineList[0][1][1]
                            } else {
                                this.lineRedraw()
                                this.dialogVisible = false
                            }

                            this.getLatest()
                        }
                    })
                },
                lookUserPath(arr) {
                    let linePoly = new window.AMap.Polyline({
                        path: arr,
                        strokeColor: '#C21A00',
                        strokeOpacity: 1,
                        strokeWeight: 4,
                        strokeStyle: 'solid',
                    })
                    this.map2.setFitView([linePoly])
                },


                // 修改管线
                PostaddEnid() {
                    let row = this.formState
                    axios.post(`${this.url}/api/pipes/line/edit`, {
                        section_id: this.value3,
                        id: row.ids,
                        network_id: this.value2,
                        route_id: this.value1,
                        line_org_code: row.code,
                        line_start_name: row.bName,
                        line_end_name: row.eName,
                        line_mileage: row.diameter,
                        line_diameter_out: row.pipeCode,
                        line_thickness: row.lineCode,
                        line_start_depth: row.bDepth,
                        line_end_depth: row.eDepth,
                        line_start_height: row.bElevation,
                        line_end_height: row.eElevation,
                        line_material: row.material,
                        line_area: row.areaCode,
                        line_start_lng: row.bLng,
                        line_start_lat: row.bLat,
                        line_end_lng: row.eLng,
                        line_end_lat: row.eLat,
                        line_building_time: row.buildTime,
                    }).then((res) => {
                        const h = this.$createElement;
                        this.$notify({
                            title: '修改管线',
                            message: res.data.msg
                        });
                        this.lineRedraw()
                        this.dialogVisible = false
                        this.formState = {
                            network_id: '',//管网id
                            route_id: '',//线路id,
                            code: '', ///机构编号 必填
                            bName: '', //起点名称
                            eName: '', //终点名称,
                            diameter: '', //管里程 必填
                            lineCode: '', //管壁厚
                            pipeCode: '', //管外径
                            bDepth: '', //起点埋深,必填,
                            eDepth: '', //终点埋深,必填,
                            bElevation: '', //起点高程,必填,
                            eElevation: '', //终点高程,必填,
                            material: '', //材质,必填
                            areaCode: '红河县', //所属区域,
                            bLng: '', //起点经度,必填,
                            bLat: '', //起点纬度,必填,
                            eLng: '', //终点经度 必填
                            eLat: '', //终点纬度 必填
                            buildTime: '', //建设日期,必填
                            buildTime2: '',
                            bMaster: 0, //是否主干0=否1=是,必填
                            bPress: 0, //是否加压0=否1=是
                            approval: 0,
                        }
                    })
                },
                //管线确定事件
                pipelineSure() {
                    console.log(this.formState, "管线数据")
                    if (this.lineTypes == '1') {
                        this.PostaddEnid()
                    } else if (this.lineTypes == '0') {
                        this.PostaddLine(false)
                    }
                },
                // 管线下一个的操作
                pipelineSure1() {
                    this.PostaddLine(true)
                },
                // 绘制弹窗里面管线
                cpmAddline(arr) {
                    console.log(arr, "arrr")
                    let that = this;
                    linePolyline = new window.AMap.Polyline({
                        path: arr,
                        strokeColor: '#C21A00',
                        strokeOpacity: 1,
                        strokeWeight: 4,
                        strokeStyle: 'solid',
                    })
                    this.map2.add(linePolyline)
                    this.map2.setFitView([linePolyline])
                },
                cpmAdddot(arr) {
                    // 起点
                    var endIcon = new AMap.Icon({
                        size: new AMap.Size(32, 32),
                        image: 'https://qiniu.ynzhsk.cn/uploads/20231222/FmNRUzh5UxVI4suZhuWk4ruZ6xgf.png',
                        imageSize: new AMap.Size(32, 32),
                        imageOffset: new AMap.Pixel(0, 0)
                    });
                    // 终点
                    var endIcon1 = new AMap.Icon({
                        size: new AMap.Size(32, 32),
                        image: 'https://qiniu.ynzhsk.cn/uploads/20231222/FodyCsTLnp445FQjod94j5rWG0-6.png',
                        imageSize: new AMap.Size(32, 32),
                        imageOffset: new AMap.Pixel(0, 0)
                    });
                    const marker = new AMap.Marker({
                        position: arr[0],
                        icon: endIcon,
                        offset: new AMap.Pixel(-15, -30),
                    });
                    const marker2 = new AMap.Marker({
                        position: arr[1],
                        icon: endIcon1,
                        offset: new AMap.Pixel(-15, -30),
                    });
                    this.map2.add(marker)
                    this.map2.add(marker2)

                    // let	linePolydot = new window.AMap.Polyline({
                    // 		path: arr,
                    // 		strokeColor: '#C21A00',
                    // 		strokeOpacity: 1,
                    // 		strokeWeight: 4,
                    // 		strokeStyle: 'solid',
                    // 	})
                    // 	this.map2.add(linePolyline)
                    // 	this.map2.setFitView([linePolyline])
                },
                // 删除地图里面管线
                cpmDeleteline() {
                    this.map2.remove(linePolyline);
                },

                //地图绘制拾取坐标,在放水口中用
                markerDraw() {
                    this.markerClose(true)
                    console.log(this.lineLatLng, "this.lineLatLng")
                    // this.lineLatLng.map((res) => {
                    // 	res.off('click', this.mapClick)
                    // })
                    console.log(this.lineLatLng, "this.lineLatLng")
                    this.map.on('click', this.showInfoClick)
                },
                //添加放水口相关事件
                markerClose(status) {
                    if (status) {
                        this.confirmLoading = false
                    }
                },
                // 拾取后赋值函数
                // 添加放水口操作
                showInfoClick(e) {
                    console.log(e.lnglat.lat, e.lnglat.lng)
                    this.confirmLoading = true
                    this.formMarker.lng = e.lnglat.lng
                    this.formMarker.lat = e.lnglat.lat
                    setTimeout(() => {
                        this.map.off('click', this.showInfoClick)
                    }, 200)
                },

                //右侧的操作按钮根据传进来的type进行区分
                statusChange(type) {
                    this.statusType = type
                    type != 'history' ? (this.isHistory = false) : ''
                    switch (type) {
                        case 'addMark':
                            //添加放水口操作
                            this.markOpen = true
                            this.wellTypes = 1
                            this.confirmLoading = true

                            break
                        case 'startLine':
                            //描画操作
                            this.StartDrawingLines()
                            break
                        case 'addLine':
                            //添加管线操作
                            this.value3 = ''
                            this.linePolyindex = 0
                            this.lineTypes = 0
                            this.dialogVisible = true
                            this.lineFlag = false
                            break
                        case 'history':
                            if (this.isHistory) {
                                this.isHistory = false
                                this.statusType = ''
                                // 在历史播放窗口关闭时清楚管线回放列表,刷新数据
                                this.dateClickClass = ''
                                this.map.remove(lineRetrunData)
                                lineRetrunData = []
                                this.getData()
                            } else {
                                this.isHistory = true
                            }
                            //历史操作
                            break
                        default:
                            console.log('传错了吧')
                    }
                },

                // 开始绘制折线
                StartDrawingLines() {
                    this.drawType = 'line'
                    this.isDrawLine = true
                    this.mouseTool.polyline({
                        strokeColor: '#3366FF',
                        strokeOpacity: 1,
                        strokeWeight: 6,
                        // 线样式还支持 'dashed'
                        strokeStyle: 'solid',
                    })
                },
                //绘画中退回事件
                returnFun() {
                    console.log('回退')
                    //回退操作
                    if (this.lineDrawData.length > 0) {
                        let a = this.lineDrawData[this.lineDrawData.length - 1].getPath()
                        if (a.length > 1) {
                            a.splice(a.length - 1, 1)
                            this.lineDrawData[this.lineDrawData.length - 1].setPath(a)
                        } else if (a.length == 1) {
                            a.splice(a.length - 1, 1)
                            this.map.remove(this.lineDrawData[this.lineDrawData.length - 1])
                            this.lineDrawData.splice(this.lineDrawData.length - 1, 1)
                            this.lineDrawData = []
                        }
                    } else {
                        message.error('没有可以回退的操作~')
                    }
                },
                //绘画中的两个按钮事件
                lineFun(status) {

                    //判断点击的是不是保存按钮
                    if (status) {
                        let arrList = []
                        this.lineDrawData.map((line, i) => {
                            let arr1 = []
                            line.$x[0].map((lin) => {
                                arr1.push(lin)
                            })
                            arrList.push(arr1)
                        })
                        let arr2 = []
                        arrList.map((q) => {
                            q.map((w, index) => {
                                if (index + 1 != q.length) {
                                    let arr3 = [q[index], q[index + 1]]
                                    arr2.push(arr3)
                                }
                            })
                        })

                        this.lineList = arr2
                        if (this.lineList.length > 0) {
                            this.formState = {
                                network_id: '',//管网id
                                route_id: '',//线路id,
                                code: '', ///机构编号 必填
                                bName: '', //起点名称
                                eName: '', //终点名称,
                                diameter: '', //管里程 必填
                                lineCode: '', //管壁厚
                                pipeCode: '', //管外径
                                bDepth: '', //起点埋深,必填,
                                eDepth: '', //终点埋深,必填,
                                bElevation: '', //起点高程,必填,
                                eElevation: '', //终点高程,必填,
                                material: '', //材质,必填
                                areaCode: '红河县', //所属区域,
                                bLng: '', //起点经度,必填,
                                bLat: '', //起点纬度,必填,
                                eLng: '', //终点经度 必填
                                eLat: '', //终点纬度 必填
                                buildTime: '', //建设日期,必填
                                buildTime2: '',
                                bMaster: 0, //是否主干0=否1=是,必填
                                bPress: 0, //是否加压0=否1=是
                                approval: 0,
                            }
                            this.linePolyindex = 1
                            this.formState.bLng = this.lineList[0][0][0]
                            this.formState.bLat = this.lineList[0][0][1]
                            this.formState.eLng = this.lineList[0][1][0]
                            this.formState.eLat = this.lineList[0][1][1]
                            this.mouseTool.close(true) //把绘制中的画布清空
                            this.isDrawLine = false //控制右边的弹窗隐藏

                            this.dialogVisible = true
                            this.lineFlag = true
                            this.lineTypes = 0
                            setTimeout(() => {
                                this.initMap2(this.lineList[0])
                            }, 500)

                        } else {
                            this.$message({
                                message: '您未绘制线条',
                                type: 'warning'
                            });
                        }

                        // lineDrawData.forEach((item) => {
                        // 	let path = item.getPath()
                        // 	path.forEach((item2, index2) => {
                        // 		let pathItem = {
                        // 			oid: '', //机构编号 必填
                        // 			code: '', ///管线编号 必填
                        // 			diameter: '', //管直径 必填
                        // 			bName: '', //起点名称
                        // 			eName: '', //终点名称,
                        // 			bDepth: '', //起点埋深,必填,
                        // 			eDepth: '', //终点埋深,必填,
                        // 			bElevation: '', //起点高程,必填,
                        // 			eElevation: '', //终点高程,必填,
                        // 			buildTime: '', //建设日期,必填
                        // 			buildTime2: '', //建设日期,必填
                        // 			material: '', //材质,必填
                        // 			areaCode: '', //所属区域,
                        // 			lineCode: '', //所属路线
                        // 			pipeCode: '', //所属管网编号,必填
                        // 			bLng: '', //起点经度,必填,
                        // 			bLat: '', //起点纬度,必填,
                        // 			eLng: '', //终点经度 必填
                        // 			eLat: '', //终点纬度 必填
                        // 			bMaster: 0, //是否主干0=否1=是,必填
                        // 			bPress: 0, //是否加压0=否1=是
                        // 			approval: 0,
                        // 		}
                        // 		if (index2 == 0) {
                        // 			pathItem.bLng = item2.lng //起点经度,必填,
                        // 			pathItem.bLat = item2.lat //起点纬度,必填,
                        // 			pathItem.eLng = path[index2 + 1].lng //终点经度 必填
                        // 			pathItem.eLat = path[index2 + 1].lat //终点纬度 必填
                        // 		} else {
                        // 			pathItem.bLng = path[index2 - 1].lng //终点经度 必填
                        // 			pathItem.bLat = path[index2 - 1].lat //终点纬度 必填
                        // 			pathItem.eLng = item2.lng //起点经度,必填,
                        // 			pathItem.eLat = item2.lat //起点纬度,必填,
                        // 		}
                        // 		lineNewData.push(pathItem) // 获取绘制完成的数据添加到存最新线数据的地方
                        // 	})
                        // })
                        // lineNewData.splice(0, 1)
                        // //因为高德的bug所有会进到绘制完成的监听里面,这里需要判断长度,然后在绘制完成之后弹出信息弹窗来填写
                        // if (lineNewData.length > 0) {
                        // 	//表单结构赋值
                        // 	for (let key in formState) {
                        // 		formState[key] = lineNewData[lineNewDataLength.value][key]
                        // 	}
                        // 	plneOpen.value = true
                        // 	isFromOpen.value = true
                        // }

                    } else {
                        this.mouseTool.close(true) //把绘制中的画布清空
                        this.isDrawLine = false //控制右边的弹窗隐藏
                    }
                    this.lineDrawData = [] //为了避免出错这里就要把存绘制完成那一步的数组赋值空
                },

                // 监听完成绘制
                ListenToCompleteDrawing() {
                    this.mouseTool.on('draw', (e) => {
                        switch (this.drawType) {
                            case 'line':
                                this.lineDrawData.push(e.obj) //保存绘制好的线对象
                                console.log(this.lineDrawData)
                                //高德的bug绘制线的时候只有一个起点也算绘制,所以要判断一下然后干掉无用的数据
                                this.lineDrawData.forEach((item, index) => {
                                    if (item.$x[0].length == 1) {
                                        console.log(this.lineDrawData[index], "draw")
                                        // this.lineDrawData.splice(index, 1)
                                    }
                                })
                                break
                            default:
                                console.log('绘制了别的图像')
                        }
                    })
                },

                //筛选触发函数
                checkChange(el) {
                    if (el.title == '放水口') {
                        if (!el.checked) {
                            this.map.remove(this.wellLatLng);
                            this.wellLatLng = []
                            this.map.remove(this.labelLatLng);
                            this.labelLatLng = []
                        } else {
                            this.onMarker(this.tubeWellList,)
                        }
                    } else {
                        let arr1 = []
                        this.legendData.map((item) => {
                            if (item.title != "放水口") {
                                if (item.checked) {
                                    arr1.push(item.value)
                                }
                            }
                        })
                        this.screenList = arr1
                        this.lineRedraw()
                    }

                },
                checkChange1(e) {
                    let arr1 = []
                    this.legendData2.map((item) => {
                        if (item.checked) {
                            arr1.push(item.value)
                        }
                    })
                    this.route_ids = arr1
                    this.map.remove(this.lineLatLng);
                    this.lineLatLng = []
                    this.onroute()
                    // if (this.modeFlag == 1) {
                    // 	this.sw_pipe_web();
                    // } else {
                    // 	this.sw_pipe_web2()
                    // }

                },
                //开始播放历史回放
                dateAnimation() {
                    if (this.historyValue) {
                        console.log(this.historyValue)
                        //获取选择的时间范围并且格式化并且获取起始时间跟截止时间之间的所有时间段
                        const startDate = this.historyValue[0].format('YYYY-MM-DD') //原始时间值
                        const endDate = this.historyValue[1].format('YYYY-MM-DD')
                        console.log(startDate, endDate)
                        // 历史回放功能单独用时间,防止污染原数组
                        screenData.value.startYear = startDate
                        screenData.value.endDate = startDate
                        // let req = {
                        //     startYear: startDate,
                        //     endYear: endDate,
                        //     approval: 1,
                        //     getWell: 1,
                        //     lineDiameter: '0-50,50-100,100-200,200-400,400-0',
                        // }

                        let historyList = []
                        sw_pipe_web(screenData.value).then((res) => {
                            console.log(res)
                            // 获取数据后合并数组,方便异步计算是否是最后一个元素
                            res.data.line.forEach((el) => {
                                historyList.push(el)
                            })
                            res.data.well.forEach((el) => {
                                historyList.push(el)
                            })
                            //
                            if (historyList.length > 0) {
                                isPlay.value = true
                                map.clearMap()
                                var historyListLength = 0
                                let timerInt = setInterval(() => {
                                    if (historyList.length > historyListLength) {
                                        var polyline
                                        if (historyList[historyListLength].lng) {
                                            polyline = new window.AMap.CircleMarker({
                                                center: [historyList[historyListLength].lng, historyList[historyListLength].lat],
                                                radius: 10, //3D视图下,CircleMarker半径不要超过64px
                                                strokeColor: 'white',
                                                strokeWeight: 5,
                                                strokeOpacity: 1,
                                                fillColor: '#000',
                                                zIndex: 10,
                                                bubble: true,
                                                cursor: 'pointer',
                                                zooms: [10, 20],
                                                extData: historyList[historyListLength],
                                                clickable: true,
                                            })
                                        } else {
                                            polyline = new window.AMap.Polyline({
                                                path: [
                                                    [historyList[historyListLength].bLng, historyList[historyListLength].bLat],
                                                    [historyList[historyListLength].eLng, historyList[historyListLength].eLat],
                                                ],
                                                extData: historyList[historyListLength],
                                                strokeColor: '#3366FF',
                                                strokeOpacity: 1,
                                                strokeWeight: 6,
                                                // 线样式还支持 'dashed'
                                                strokeStyle: 'solid',
                                            })
                                        }
                                        lineRetrunData.push(polyline)
                                        map.add(polyline)

                                        historyListLength++
                                    } else {
                                        // 播放完后恢复时间筛选未默认
                                        clearInterval(timerInt)
                                        timerInt = null
                                        historyValue.value = undefined
                                        screenData.value.startYear = 0
                                        screenData.value.endDate = 0
                                        isPlay.value = false

                                        // lineExamineDataAdd()
                                    }
                                }, 500)
                                console.log('执行动画播放')
                            } else {
                                message.error('当前选择的时间范围没有匹配的管道哦~')
                            }
                        })
                    } else {
                        message.error('没有选择时间范围哦~')
                    }
                },
                // 关闭管线
                lineClose(e) {
                    this.lineList = []
                    this.dialogVisible = false
                    this.statusType = ''
                },
                // 关闭放水口
                wellClose() {
                    // this.lineLatLng.map((res) => {
                    // 	res.on('click', this.mapClick)
                    // })
                    this.confirmLoading = false
                    this.statusType = ''
                },


                // 放水口修改按钮
                marckEditFun() {
                    this.infoWindow.close()
                    let data = this.mapItemData
                    let Time = this.getTime1(data.well_building_time)
                    this.value = data.network_id
                    this.formMarker = {
                        ids: data.id,
                        code: data.well_org_code, ///
                        name: data.well_name, //放水口名称 必填
                        pipeCode: data.well_org_code, //机构编号 必填
                        attach: data.well_subsidiary, //放水口附属物
                        wblElevation: data.well_bottom_height, //放水口高程,必填,
                        depth: data.well_depth, ///放水口埋深,必填,
                        material: data.well_material, //材质,必填
                        addr: data.well_position, //所在位置,必填,
                        area: data.well_area, //所属区域,
                        point: data.well_site, //所属点位
                        lng: data.well_lng, //经度,必填,
                        lat: data.well_lat, //纬度,必填,
                        buildTime: data.well_building_time, //建设日期,必填
                        buildTime2: Time,
                    }
                    this.wellTypes = 0
                    this.confirmLoading = true
                },
                // 管线修改
                plinEditFun1() {
                    this.value3 = ''
                    this.infoWindow.close()
                    let data = this.mapItemData
                    console.log(data, "datadatadata")
                    this.lineFlag = true
                    let chushi = [[data.line_start_lng, data.line_start_lat], [data.line_end_lng, data.line_end_lat]]
                    setTimeout(() => {
                        this.initMap2(chushi)
                    }, 500)
                    let Time = this.getTime1(data.line_building_time)
                    this.value2 = data.network_id
                    this.value1 = data.route_id
                    this.value3 = data.section_id
                    this.formState = {
                        ids: data.id,
                        code: data.line_org_code,
                        bName: data.line_start_name,
                        eName: data.line_end_name,
                        diameter: data.line_mileage,
                        pipeCode: data.line_diameter_out,
                        lineCode: data.line_thickness,
                        bDepth: data.line_start_depth,
                        eDepth: data.line_end_depth,
                        bElevation: data.line_start_height,
                        eElevation: data.line_end_height,
                        material: data.line_material,
                        areaCode: data.line_area,
                        bLng: data.line_start_lng,
                        bLat: data.line_start_lat,
                        eLng: data.line_end_lng,
                        eLat: data.line_end_lat,
                        buildTime: data.line_building_time,
                        buildTime2: Time
                    }
                    this.linePolyindex = 1
                    this.lineTypes = 1
                    this.dialogVisible = true
                },

                // 地图点击事件
                mapClick(e) {
                    console.log(e.target.getExtData(), "点击")
                    mapItemEmt = e.target
                    let data = e.target.getExtData()
                    this.mapItemData = data
                    //构建信息窗体中显示的内容
                    var info
                    let Time
                    let Time1
                    if (data.types == "well") {
                        Time = this.getTime1(data.well_building_time)
                        info = ` <div style="background: #fff; width: 350px;padding: 20px;border-radius: 10px;position: relative">
					                <div style='display: flex;justify-content: space-between;align-items: center'>
					                    <div style="color: #17213c;font-size: 16px; font-style: normal;font-weight: 500;">放水口名称:${data.well_name}</div>
					                    <div id='closeMapOpen'>
					                        <img style='width: 20px;height: 20px' src='/assets/img/return.png' alt=''>
					                    </div>
					                </div>
					                <div style='margin-top: 14px'>
														 <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">所属管网:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.network_name}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">机构编号:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.well_org_code}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">所属点位:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.well_site}</div>
					                        </div>
					                    </div>

					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">放水口编号:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.well_code}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">放水口附属物:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.well_subsidiary}</div>
					                        </div>
					                    </div>

					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">放水口高程:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.well_bottom_height}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">所在位置:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.well_position}</div>
					                        </div>
					                    </div>

					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">放水口埋深:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.well_depth}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">材质:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.well_material}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">所属区域:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.well_area}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">建设日期:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${Time}</div>
					                        </div>
					                    </div>

					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">经度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.well_lng}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">纬度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.well_lat}</div>
					                        </div>
					                    </div>
					                </div>
					                <div style='width: 100%; display: flex;justify-content: flex-end;align-items: center;margin-top: 20px'>
					                    <div id='marckEdit' style='padding: 5px;background: #EABA60;color: #fff;margin-right: 20px;border-radius: 5px;cursor: pointer'>编辑</div>
					                    <div id='marckDelete' style='padding: 5px;background: #FEE4DF;color: #D74025;border-radius: 5px;cursor: pointer'>删除</div>
					                </div>
					                <div style='width: 0;height: 0;
					                    position: absolute;
					                    left: 50%;
					                    bottom: -30px;
					                    transform: translate(-50%,0);
					                    border-top: 15px solid #fff;
					                    border-right: 15px solid transparent;
					                    border-left: 15px solid transparent;border-bottom: 15px solid transparent;'></div>
					            </div>`
                    } else if (data.types == "line") {
                        Time1 = this.getTime1(data.createtime)

                        if (this.infoFlag == 0) {


                            info = ` <div style="background: #fff; width: 400px;padding: 20px;border-radius: 10px;position: relative">
					                <div style='display: flex;justify-content: space-between;align-items: center'>
					                    <div style="color: #17213c;font-size: 16px; font-style: normal;font-weight: 500;">路线名:${data.route_name}</div>
					                    <div id='closeMapOpen'>
					                        <img style='width: 20px;height: 20px' src='/assets/img/return.png' alt=''>
					                    </div>
					                </div>

					                   <div style="display: flex;justify-content: space-between;align-items: center;">
																<div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">路线编码:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.network_code}</div>
					                        </div>

					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">建设日期:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${Time1}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点名称:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_start_info.line_start_name}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点名称:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_end_info.line_end_name}</div>
					                        </div>
					                    </div>


					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点埋深:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_start_info.line_start_depth}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点埋深:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_end_info.line_end_depth}</div>
					                        </div>
					                    </div>

					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点经度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_start_info.line_start_lng}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点纬度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_start_info.line_start_lat}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点经度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_end_info.line_end_lng}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点纬度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_end_info.line_end_lat}</div>
					                        </div>
					                    </div>
					                </div>
					                <div style='width: 0;height: 0;
					                    position: absolute;
					                    left: 50%;
					                    bottom: -30px;
					                    transform: translate(-50%,0);
					                    border-top: 15px solid #fff;
					                    border-right: 15px solid transparent;
					                    border-left: 15px solid transparent;border-bottom: 15px solid transparent;'></div>
					            </div>`

                        } else {


                            if (this.modeFlag == 0) {
                                info = ` <div style="background: #fff; width: 400px;padding: 20px;border-radius: 10px;position: relative">
					                <div style='display: flex;justify-content: space-between;align-items: center'>
					                    <div style="color: #17213c;font-size: 16px; font-style: normal;font-weight: 500;">里程段名:${data.section_name}</div>
					                    <div id='closeMapOpen'>
					                        <img style='width: 20px;height: 20px' src='/assets/img/return.png' alt=''>
					                    </div>
					                </div>
					                <div style='margin-top: 14px'>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">里程段编号:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.section_code}</div>
					                        </div>
					                       <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">建设日期:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${Time1}</div>
					                        </div>
					                    </div>


					                    <div style="display: flex;justify-content: space-between;align-items: center;">
																 <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起始里程(km):</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_mileage_start}</div>
					                        </div>

					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">结束里程(km):</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_mileage_end}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点名称:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_start_info.line_start_name}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点名称:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_end_info.line_end_name}</div>
					                        </div>
					                    </div>

					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">管线外径(mm):</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_diameter_out}</div>
					                        </div>
					                         <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">管线内径 (mm):</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_diameter_in}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点埋深:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_start_info.line_start_depth}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点埋深:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_end_info.line_end_depth}</div>
					                        </div>
					                    </div>

					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">材质:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_material}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">管线壁厚(mm):</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_thickness}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点经度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_start_info.line_start_lng}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点纬度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_start_info.line_start_lat}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点经度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_end_info.line_end_lng}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点纬度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.position_end_info.line_end_lat}</div>
					                        </div>
					                    </div>
					                </div>
					                <div style='width: 0;height: 0;
					                    position: absolute;
					                    left: 50%;
					                    bottom: -30px;
					                    transform: translate(-50%,0);
					                    border-top: 15px solid #fff;
					                    border-right: 15px solid transparent;
					                    border-left: 15px solid transparent;border-bottom: 15px solid transparent;'></div>
					            </div>`

                            } else {
                                info = ` <div style="background: #fff; width: 400px;padding: 20px;border-radius: 10px;position: relative">
					                <div style='display: flex;justify-content: space-between;align-items: center'>
					                    <div style="color: #17213c;font-size: 16px; font-style: normal;font-weight: 500;">管线-${data.line_code}</div>
					                    <div id='closeMapOpen'>
					                        <img style='width: 20px;height: 20px' src='/assets/img/return.png' alt=''>
					                    </div>
					                </div>
					                <div style='margin-top: 14px'>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">所属管网:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.network_name}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">所属机构编号:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_org_code}</div>
					                        </div>
					                    </div>

					                    <div style="display: flex;justify-content: space-between;align-items: center;">
																 <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">所属路线:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.route_name}</div>
					                        </div>

					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">管线里程(km):</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_mileage}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点名称:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_start_name}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点名称:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_end_name}</div>
					                        </div>
					                    </div>

					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">管线外径(mm):</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_diameter_out}</div>
					                        </div>
					                         <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">管线内径 (mm):</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_diameter_in}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点埋深:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_start_depth}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点埋深:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_end_depth}</div>
					                        </div>
					                    </div>

					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">材质:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_material}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">所属区域:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_area}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
																<div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">管线壁厚(mm):</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_thickness}</div>
					                        </div>

					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">建设日期:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${Time1}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点经度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_start_lng}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">起点纬度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_start_lat}</div>
					                        </div>
					                    </div>
					                    <div style="display: flex;justify-content: space-between;align-items: center;">
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点经度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_end_lng}</div>
					                        </div>
					                        <div style='display: flex;align-items: center;'>
					                            <div style="color: #192c4e;font-size: 12px;">终点纬度:</div>
					                            <div style="margin-left: 8px;color: #748094;font-size: 12px;">${data.line_end_lat}</div>
					                        </div>
					                    </div>
					                </div>
					                <div style='width: 100%; display: flex;justify-content: flex-end;align-items: center;margin-top: 20px'>
					                    <div id='plinEdit' style='padding: 5px;background: #EABA60;color: #fff;margin-right: 20px;border-radius: 5px;cursor: pointer'>编辑</div>
					                    <div id='plinDelete' style='padding: 5px;background: #FEE4DF;color: #D74025;border-radius: 5px;cursor: pointer'>删除</div>
					                </div>
					                <div style='width: 0;height: 0;
					                    position: absolute;
					                    left: 50%;
					                    bottom: -30px;
					                    transform: translate(-50%,0);
					                    border-top: 15px solid #fff;
					                    border-right: 15px solid transparent;
					                    border-left: 15px solid transparent;border-bottom: 15px solid transparent;'></div>
					            </div>`

                            }
                        }

                    }
                    this.infoWindow = new window.AMap.InfoWindow({
                        isCustom: true,
                        content: info, //使用默认信息窗体框样式,显示信息内容
                        offset: [0, -20]
                    })
                    // 点击取消弹窗事件
                    this.infoWindow.open(this.map, [e.lnglat.getLng(), e.lnglat.getLat()])
                    document.getElementById('closeMapOpen').onclick = this.closeInfo
                    // console.log(data.types, "data.typesdata.typesdata.typesdata.types")
                    if (data.types == "well") {
                        // 放水口的修改删除
                        document.getElementById('marckEdit').onclick = this.marckEditFun
                        document.getElementById('marckDelete').onclick = this.marckDelete
                    } else if (data.types == "line") {
                        // 管线的修改删除
                        // document.getElementById('plinEdit').onclick = this.plinEditFun1
                        // document.getElementById('plinDelete').onclick = this.PlineDelete
                    }
                },
                // 删除放水口数据
                marckDelete() {
                    axios({
                        method: 'post',
                        url: this.url + '/api/pipes/well/del',
                        data: { id: this.mapItemData.id },
                        headers: {
                            "Access-Control-Allow-Origin": "*",
                        },
                    }).then(res => {
                        const h = this.$createElement;
                        this.$notify({
                            title: '删除放水口',
                            message: res.data.msg
                        });
                        if (res.data.code == 1) {
                            this.infoWindow.close()
                            this.wellRedraw()
                        }
                    })
                },
                // 删除管线
                PlineDelete() {
                    axios({
                        method: 'post',
                        url: this.url + '/api/pipes/line/del',
                        data: { id: this.mapItemData.id },
                        headers: {
                            "Access-Control-Allow-Origin": "*",
                        },
                    }).then(res => {
                        const h = this.$createElement;
                        this.$notify({
                            title: '删除管线',
                            message: res.data.msg
                        });
                        if (res.data.code == 1) {
                            this.infoWindow.close()
                            this.lineRedraw()
                        }
                    })
                },
                // 重绘地图放水口
                wellRedraw() {
                    this.map.remove(this.wellLatLng);
                    this.wellLatLng = []
                    this.map.remove(this.labelLatLng);
                    this.labelLatLng = []
                    this.wellList()
                },
                // 重绘地图管线
                lineRedraw() {
                    this.map.remove(this.lineLatLng);
                    this.lineLatLng = []
                    this.sw_pipe_web();
                },

                // 关闭弹窗
                closeInfo() {
                    this.infoWindow.close()
                },
                //管线时间
                dateChange(date) {
                    this.formState.buildTime = this.getTimeFormat(date)
                },
                // 放水口时间
                dateChange2(date) {
                    this.formMarker.buildTime = this.getTimeFormat(date)
                },
                // 时间转换成时间戳
                getTimeFormat(zcTime) {
                    let time = (new Date(zcTime).getTime()) / 1000; //除1000 是变成秒级的时间戳 不除就是毫秒级
                    return time;
                },
                // 时间戳转换成年月日
                getTime1(zcTime) {
                    //时间戳为10位需*1000,时间戳为13位的话不需乘1000
                    var date = new Date(zcTime * 1000);
                    var Y = date.getFullYear() + '-';
                    var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
                    var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
                    var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
                    var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()) + ':';
                    var s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
                    return Y + M + D;
                },
            },
        });
        // 监听父级页面弹窗关闭操作
        parent.window.$(".layui-layer-iframe").find(".layui-layer-close").on("click", function (data) {
            window.parent.$("a.btn-refresh").trigger("click");
            window.parent.$('#channeltree').jstree(true).refresh(); // 刷新树
        });
    </script>
</body>

</html>