tanghaolin
2025-03-09 2839044a1269268e277f23f66cf2b86dcf85de3b
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
<template>
  <div class="PumpDetailBody" v-loading="state.m_isShowLoadingFrm">
    <div style="width: 100%; margin: 0 auto; height: 100%" class="page-content">
      <el-row style="width: 100; height: 100%" class="homeBox">
        <!-- 左侧导航菜单 -->
        <el-col :span="3" class="leftBox">
          <!-- 左侧导航菜单one -->
          <el-menu id="one" :default-active="state.currentLeftMeunId" :default-opened="state.defaultLeftMeunId"
            class="el-menu-vertical-demo" @select="onSelectLeftMenu">
            <!-- 性能曲线 -->
            <el-menu-item index="featCurve">{{
              t("detailPage.performanceCurve.TR")
            }}</el-menu-item>
            <!-- 变速曲线 -->
            <el-menu-item index="multiSpeedCurve" v-show="state.mainSetting.multiSpeedCurve.tabVisible">
              <template #title>
                <span>{{ t("detailPage.variableSpeedCurve.TR") }}</span>
              </template>
            </el-menu-item>
            <!-- 串并联曲线 -->
            <el-menu-item index="connCurve" v-show="state.mainSetting.connCurve.tabVisible">
              <template #title>
                <span>{{ t("detailPage.seriesParallelConnection.TR") }}</span>
              </template>
            </el-menu-item>
            <!-- 安装图 -->
            <el-menu-item index="assemFilePart" v-show="state.mainSetting.assemFilePart.tabVisible">
              <template #title>
                <span>{{ state.mainSetting.assemFilePart.tabText }}</span>
              </template>
            </el-menu-item>
            <!-- 安装机组图 -->
            <el-menu-item index="assemFileSys" v-show="state.mainSetting.assemFileSys.tabVisible">
              <template #title>
                <span>{{ state.mainSetting.assemFileSys.tabText }}</span>
              </template>
            </el-menu-item>
            <!-- 动态安装机组图 -->
            <el-menu-item index="dynamicAssemFileSys" v-show="state.mainSetting.dynamicAssemFileSys.tabVisible">
              <template #title>
                <span>{{ state.mainSetting.dynamicAssemFileSys.tabText }}</span>
              </template>
            </el-menu-item>
            <!-- cad三维模型 -->
            <el-menu-item index="cadModel" v-show="state.mainSetting.cadModel.tabVisible">
              <template #title>
                <span>{{ t("ebookPage.model_3D.TR") }}</span>
              </template>
            </el-menu-item>
            <!-- BIM模型 -->
            <el-menu-item index="model3d" v-show="state.mainSetting.model3d.tabVisible">
              <template #title>
                <span>{{ t("detailPage.model_3D.TR") }}</span>
              </template>
            </el-menu-item>
            <!-- 尺寸图  -->
            <el-menu-item index="productFilePart" v-show="state.mainSetting.productFilePart.tabVisible">
              <template #title>
                <span>{{ state.mainSetting.productFilePart.tabText }}</span>
              </template>
            </el-menu-item>
            <!-- 结构图/爆炸图 (二维)  -->
            <el-menu-item index="structFilePart" v-show="state.mainSetting.structFilePart.tabVisible">
              <template #title>
                <span>{{ state.mainSetting.structFilePart.tabText }}</span>
              </template>
            </el-menu-item>
            <!-- 结构图 (三维) -->
            <el-menu-item index="seriesStructure3d" v-show="state.mainSetting.seriesStructure3d.tabVisible">
              <template #title>
                <span>{{ t("detailPage.structureDrawing.TR") }}</span>
              </template>
            </el-menu-item>
            <!-- 接线图 -->
            <el-menu-item index="elecFile" v-show="state.mainSetting.elecFile.tabVisible">
              <template #title>
                <span>{{ state.mainSetting.elecFile.tabText }}</span>
              </template>
            </el-menu-item>
            <!-- 实物图(系统)  -->
            <el-menu-item index="realFilePart" v-show="state.mainSetting.realFilePart.tabVisible">
              <template #title>
                <span>{{ t("detailPage.modelDrawing.TR") }}</span>
              </template>
            </el-menu-item>
            <el-menu-item index="JieZhi" v-show="state.mainSetting.jiezhi.tabVisible">
              <template #title>
                <span>{{ t("detailPage.medium.TR") }}</span>
              </template>
            </el-menu-item>
            <!-- 文档 -->
            <el-menu-item index="seriesDoc" v-show="state.mainSetting.seriesDoc.tabVisible">
              <template #title>
                <span>{{ t("detailPage.documents.TR") }}</span>
              </template>
            </el-menu-item>
            <!-- 视频 -->
            <el-menu-item index="seriesVideo" v-show="state.mainSetting.seriesVideo.tabVisible">
              <template #title>
                <span>{{ t("detailPage.video.TR") }}</span>
              </template>
            </el-menu-item>
          </el-menu>
        </el-col>
        <!-- 中间显示部分 -->
        <el-col id="middleDivBody" :span="14" class="midBox">
          <!-- 离心泵曲线图 -->
          <LXBChart v-show="state.mainSetting.featCurve.ctrVisible && state.m_pumpStyle == 0
            " ref="lxbChartCtrl" @cbChangeChartQueryStatus="cbChangeChartQueryStatus"
            @cbChangeChartQueryData="cbChangeChartQueryData">
          </LXBChart>
          <!-- 轴流泵曲线图 -->
          <ZLBChart v-show="state.mainSetting.featCurve.ctrVisible && state.m_pumpStyle == 1
            " ref="zlbChartCtrl" @cbChangeChartQueryStatus="cbChangeChartQueryStatus"
            @cbChangeChartQueryData="cbChangeChartQueryData">
          </ZLBChart>
          <!-- 变频曲线图 -->
          <MultiSpeedChart ref="multiSpeedChartCtrl" @cbChangeChartQueryData="cbChangeQueryDataByMultiSpeedChart"
            @cbSetDispMSChartQueryData="cbSetDispMSChartQueryData"
            v-show="state.mainSetting.multiSpeedCurve.ctrVisible">
          </MultiSpeedChart>
          <!-- 串并联曲线 -->
          <conn-chart ref="connChartCtrl" v-show="state.mainSetting.connCurve.ctrVisible">
          </conn-chart>
          <!-- 电气图 -->
          <PictureViver v-show="state.mainSetting.elecFile.ctrVisible" :path="state.mainComponentData.elecFile.path"
            :width="300" :height="300"></PictureViver>
          <!-- 实物图 -->
          <PictureViver v-show="state.mainSetting.realFilePart.ctrVisible"
            :path="state.mainComponentData.realFilePart.path" :width="300" :height="300"></PictureViver>
          <!-- 结构图 -->
          <RealPicture v-show="state.mainSetting.structFilePart.ctrVisible"
            :sid="state.m_pumpInfoData.BaseInfo.SeriesID" :pid="state.m_pumpInfoData.BaseInfo.PumpID"
            :path="state.mainComponentData.structFilePart.path" :cad="state.mainComponentData.structFilePart.cad"
            :width="300" :height="300">
          </RealPicture>
          <!-- 产品尺寸图 -->
          <RealPicture v-show="state.mainSetting.productFilePart.ctrVisible"
            :sid="state.m_pumpInfoData.BaseInfo.SeriesID" :pid="state.m_pumpInfoData.BaseInfo.PumpID"
            :path="state.mainComponentData.productFilePart.path" :cad="state.mainComponentData.productFilePart.cad"
            :width="300" :height="300">
          </RealPicture>
          <!-- 安装图(泵头尺寸图) -->
          <RealPicture v-show="state.mainSetting.assemFilePart.ctrVisible" tag="assemFilePart"
            :sid="state.m_pumpInfoData.BaseInfo.SeriesID" :pid="state.m_pumpInfoData.BaseInfo.PumpID"
            :path="state.mainComponentData.assemFilePart.path" :cad="state.mainComponentData.assemFilePart.cad"
            :width="300" :height="300">
          </RealPicture>
          <!-- 安装图机组(安装尺寸图) -->
          <RealPicture v-show="state.mainSetting.assemFileSys.ctrVisible" :sid="state.m_pumpInfoData.BaseInfo.SeriesID"
            :pid="state.m_pumpInfoData.BaseInfo.PumpID" :path="state.mainComponentData.assemFileSys.path"
            :cad="state.mainComponentData.assemFileSys.cad" :width="300" :height="300">
          </RealPicture>
          <!-- 安装图机组(动态图) -->
          <dynamic-picture v-if="state.m_dynPict4Sys != null" dom-id="dynamicAssemFileSys" ref="DynamicAssemFileSysRef">
          </dynamic-picture>
          <attache-file ref="attachFileCtrl" v-show="state.mainSetting.seriesDoc.ctrVisible"></attache-file>
          <!-- <SeriesStructure3d v-show="mainSetting.seriesStructure3d.ctrVisible" ref="seriesStructureCtrl">
            </SeriesStructure3d> -->
          <!-- <SeriesVideo v-if="mainSetting.seriesVideo.ctrVisible" ref="seriesVideoCtrl"></SeriesVideo> -->
          <CadModel ref="cadModelCtrl" v-show="state.mainSetting.cadModel.ctrVisible"
            :dispCtrl="state.Product3d.DispCtrl">
          </CadModel>
          <model3D v-show="state.mainSetting.model3d.ctrVisible" ref="model3dCtrl"></model3D>
        </el-col>
        <!-- 右侧参数表格 -->
        <el-col :span="7" class="rightBox">
          <div class="tab_panel_box">
            <div class="tab_panel_box_continer">
              <el-tabs ref="rightTabs" class="h100" v-model="state.currentRightMeunId" :before-leave="tabBeforeLeave"
                @tab-click="onSelectRightMenu" type="card">
                <!-- 运行参数 -->
                <el-tab-pane id="params_tab_pane" class="h100" :label="t('detailPage.operatingParameters.TR')"
                  name="chartPoint">
                  <template #label>
                    <span name="chartPoint">
                      <i class="iconfont iconyunhangcanshu"></i>
                      {{ t("detailPage.operatingParameters.TR") }}
                    </span>
                  </template>
 
                  <div class="h100" style="overflow: auto">
                    <LXBSelectMainPoint v-show="state.m_pumpStyle == 0" ref="lxbSelectPointCtrl"
                      @cbChangeMotorPower="cbChangeMotorPowerInMainGrid" @cbRefreshByDp="refreshByDp"
                      @cbOpenErrorTips="cbOpenErrorTips" @cbCloseErrorTips="cbCloseErrorTips">
                    </LXBSelectMainPoint>
                    <LXBChartPointParas v-show="state.m_pumpStyle == 0" ref="lxbChartPointParasCtrl"
                      @refreshRegionByFlow="refreshRegionByFlow">
                    </LXBChartPointParas>
 
                    <ZLBSelectMainPoint v-show="state.m_pumpStyle == 1" ref="zlbSelectPointCtrl"
                      @cbChangeMotorPower="cbChangeMotorPowerInMainGrid" @cbRefreshByDp="refreshByDp">
                    </ZLBSelectMainPoint>
 
                    <ZLBChartPointParas v-show="state.m_pumpStyle == 1" ref="zlbChartPointParasCtrl"
                        @cbUpdateConstantLine="updateZlpConstantLine">
                    </ZLBChartPointParas>
                  </div>
                </el-tab-pane>
                <!-- 属性 -->
                <el-tab-pane id="prop_tab_pane" style="height: 100%" :label="t('detailPage.properties.TR')" name="prop">
                  <template #label>
                    <span name="prop">
                      <i class="iconfont iconshuxing1"></i>
                      {{ t("detailPage.properties.TR") }}
                    </span>
                  </template>
                  <Prop ref="propCtrl" @cbOpenErrorTips="cbOpenErrorTips" @cbCloseErrorTips="cbCloseErrorTips"
                    @updateSelectMainPoint="cbUpdateSelectMainPoint"></Prop>
                </el-tab-pane>
                <!-- 材质 -->
                <el-tab-pane id="material_tab_pane" class="h100" :label="t('detailPage.material.TR')" name="material">
                  <template #label>
                    <span name="material">
                      <i class="iconfont iconcaizhi"></i>
                      {{ t("detailPage.material.TR") }}
                    </span>
                  </template>
                  <Material ref="materialCtrl"></Material>
                </el-tab-pane>
                <!-- 变速曲线查询参数 -->
                <el-tab-pane id="multiSpeedChart_tab_pane" class="h100" :label="t('detailPage.queryParams.TR')"
                  name="multiSpeedChartQueryTable">
                  <template #label>
                    <span name="queryParams">
                      <i class="iconfont iconxiangqing1"></i>
                      {{ t("detailPage.queryParams.TR") }}
                    </span>
                  </template>
                  <multi-speed-chart-query-table v-show="state.dispMulSpeedChartQueryTable"
                    ref="multiSpeedChartQueryTableRef"></multi-speed-chart-query-table>
                </el-tab-pane>
                <!-- 介质列表 -->
                <el-tab-pane id="medium_tab_pane" class="h100" :label="t('detailPage.medium.TR')" name="mediumTable"
                  v-if="state.dispMediumTabPane">
                  <template #label>
                    <span name="medium">
                      <i class="iconfont iconjiezhi"></i>
                      {{ t("detailPage.medium.TR") }}
                    </span>
                  </template>
                  <medium ref="JieZhiFormRef"></medium>
                </el-tab-pane>
              </el-tabs>
            </div>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>
 
<script setup name="pumpDetail">
import { ref, reactive, nextTick } from "vue";
import { useRoute, useRouter } from "vue-router";
import {
  ElMenu,
  ElMenuItem,
  ElRow,
  ElCol,
  ElTabs,
  ElTabPane,
  ElMessage,
} from "element-plus";
import { useI18n } from "vue-i18n";
import LXBChart from "./LXBChart.vue";
import ZLBChart from "./ZLBChart.vue";
import LXBSelectMainPoint from "./LXBSelectMainPoint.vue"; //右侧详情顶部参数选型表格 -- 离心泵
import LXBChartPointParas from "./LXBChartPointParas.vue"; //右侧详情底部工作点、最有区域表格 -- 离心泵
import ZLBSelectMainPoint from "./ZLBSelectMainPoint.vue"; //右侧详情顶部参数选型表格 -- 轴流泵
import ZLBChartPointParas from "./ZLBChartPointParas.vue"; //右侧详情底部工作点、最有区域表格 -- 轴流泵
import ConnChart from "./ConnChart.vue"; //串并联曲线
import MultiSpeedChartQueryTable from "./MultiSpeedChartQueryTable.vue"; //变速曲线查询参数
import Medium from "./Medium.vue";
import CadModel from "@/components/CADModel.vue"; //3D秀秀
import Prop from "./Prop.vue"; //属性
import Material from "./Material.vue"; //材质
import MultiSpeedChart from "./MultiSpeedChart.vue"; //变速曲线
import waterMarkHelper from "@/utils/waterMarkHelper.js";
import AttacheFile from "@/components/attachFile.vue";
 
 
import ConstParas from "@/utils/constParas.js";
import UserSettingsHelper from "@/utils/userSetting.js";
import coordinateHelper from "@/utils/coordinateHelper.js";
import axiosHelper from "@/utils/axiosHelper.js";
import PictureViver from "@/components/picture.vue";
import DynamicPicture from "@/components/dynamicPicture.vue";
 
import model3D from "@/components/model3DContainer.vue";
import RealPicture from "@/components/realPicture.vue";
import { useLogin } from "@/stores/useLogin";
import utils from "@/utils/utils.js";
const loginStore = useLogin();
const userInfo = loginStore.getUserInfo();
const route = useRoute();
const rightTabs = ref("");
const propCtrl = ref("");
const materialCtrl = ref("");
const JieZhiFormRef = ref("");
const lxbChartCtrl = ref("");
const lxbSelectPointCtrl = ref("");
const lxbChartPointParasCtrl = ref("");
const zlbSelectPointCtrl = ref("");
const zlbChartCtrl = ref("");
const zlbChartPointParasCtrl = ref("");
const multiSpeedChartCtrl = ref("");
const multiSpeedChartQueryTableRef = ref("");
const connChartCtrl = ref("");
const attachFileCtrl = ref("");
const seriesVideoCtrl = ref("");
const seriesStructureCtrl = ref("");
const model3dCtrl = ref("");
const cadModelCtrl = ref("");
 
const DynamicAssemFileSysRef = ref();
const { t } = useI18n();
 
const m_currentLanguage = 0;
 
const emit = defineEmits([
  "cbOpenDetailIndexErrorTips",
  "cbCloseDetailIndexErrorTips",
]);
 
let state = reactive({
  m_corpShortName: "", //公司名称
  dispPropTabPane: false,
  dispMaterialTabPane: false,
  dispMediumTabPane: false,
  isShowLccCmd: true,
  isShowLccDialog: false,
  isShowShareCmd: true,
  isShowShareDialog: false,
  isShowReportDialog: false,
  isShowInQuiryPriceDialog: false,
  m_motorAllowMaxPtDict: null, //不同电机 对应不同最大运行区域点
  m_pageFrom: 0, //页面来源
  m_pagePurpose: 0, //打开的目的
 
  m_userUnitSetting: null, //用户全局单位配置 Q H E P D2 这几个变量
  m_pumpInfoData: {
    BaseInfo: {
      SeriesID: 0,
      PumpID: 0,
    },
  }, //泵信息
  m_pumpBaseInfo: {
    DispPumpName: "",
    PumpName: "",
    SeriesName: "",
    CatalogName: "",
  },
 
  m_pumpStyle: 0, //当前泵的类型 0表示离心泵 1 表示轴流泵
  m_selMotorPower: 0, //电机功率
  m_calcMotorPowerPtPosi: 5, //电机功率匹配方式   5 设计点功率乘以一个系数(固定)  7 产品编号和切割型号名简单匹配
 
  m_isShowLoadingFrm: false, //等待框
 
  jieZhiParas: {
    ID: 0,
    MiDu: 1000,
    NianDu: 1,
    Name: "water",
    isNdCor: false,
  },
 
  ChartPointGridQuery: [], //接口返回的参数信息
 
  defaultLeftMeunId: ["featCurve"], //左侧菜单 默认展开的菜单的索引
  currentLeftMeunId: "featCurve", //当前左侧上部分菜单默认展开的菜单索引
 
  currentRightMeunId: "chartPoint", //当前右侧菜单默认激活的菜单名称
  m_dynPict4Sys: null, //机组动态图配置
  m_model3dSetting: {
    //三维模型设置
    BimFileLaws: null,
    CurrentViewModelPath: null, //fbx文件
    NextViewModelPath: null, //
    CurrentDsModelPath: null, //rfa文件
    isInitialFinish: false, //是否加载过
    IsHaveDim: false, //是否有尺寸
    LawID: 0,
  },
 
  m_toleranceParas: null, //容差
  mainSetting: {
    featCurve: { tabVisible: true, ctrVisible: true, tabText: "曲线" },
    multiSpeedCurve: {
      tabVisible: true,
      ctrVisible: false,
      tabText: "变速曲线",
    },
    connCurve: {
      tabVisible: true,
      ctrVisible: false,
      tabText: "串并联曲线",
    },
    assemFilePart: {
      tabVisible: true,
      ctrVisible: false,
      tabText: "安装图",
    },
    assemFileSys: {
      tabVisible: false,
      ctrVisible: false,
      tabText: "安装图(机组)",
    },
    dynamicAssemFileSys: {
      tabVisible: false,
      ctrVisible: false,
      tabText: "安装图(机组)",
    },
    structFilePart: {
      tabVisible: true,
      ctrVisible: false,
      tabText: "结构图",
    },
    productFilePart: {
      tabVisible: false,
      ctrVisible: false,
      tabText: "产品尺寸图",
    },
    realFilePart: {
      tabVisible: true,
      ctrVisible: false,
      tabText: " ",
    },
    elecFile: {
      tabVisible: false,
      ctrVisible: false,
      tabText: "电气图",
    },
    seriesStructure3d: {
      tabVisible: false,
      ctrVisible: false,
      tabText: " ",
    },
    seriesVideo: {
      tabVisible: false,
      ctrVisible: false,
      tabText: " ",
    },
    jiezhi: { tabVisible: false, ctrVisible: false, tabText: " " },
    seriesDoc: { tabVisible: true, ctrVisible: false, tabText: " " },
    material: { tabVisible: false, ctrVisible: false, tabText: " " },
    chartPoint: { tabVisible: false, ctrVisible: true, tabText: " " },
    prop: { tabVisible: true, ctrVisible: false, tabText: " " },
    cadModel: { tabVisible: false, ctrVisible: false, tabText: " " },
    model3d: {
      tabVisible: false,
      ctrVisible: false,
      tabText: " ",
      isInitialOK: false,
      url: "",
    },
  },
  mainComponentData: {
    assemFilePart: {
      cad: "",
      path: "",
    },
    assemFileSys: {
      cad: "",
      path: "",
    },
    structFilePart: {
      cad: "",
      path: "",
    },
    productFilePart: {
      cad: "",
      path: "",
    },
    realFilePart: {
      path: "",
    },
    elecFile: {
      cad: "",
      path: "",
    },
    seriesStructure3d: {
      path: "",
    },
    seriesVideo: {
      path: "",
    },
  },
  Product3d: {
    DispCtrl: ConstParas.Disp3dMethod.CAD_3DShowShow, //默认是3d秀秀
  },
 
  m_IsShowRight: {
    report: false,
    share: false,
    lcc: false,
  }, //头部按钮是否显示在右边
  m_IsInitPropData: false, //判断是否初始化了属性数据
  dispMulSpeedChartQueryTable: false,
});
 
//获取整个页面初始的详情数据
const initDetailPageData = (pageData) => {
  //设置控件配置
  setCtrlConfig();
  var waterName = "water";
  if (m_currentLanguage == 0) {
    waterName = "清水";
  }
 
  var jieZhiParas = {
    ID: 0,
    MiDu: 1000,
    NianDu: 1,
    Name: waterName,
    isNdCor: false,
    V_C: 100, //体积浓度
  };
  let jzkey = ["jzid", "jzmd", "jznd", "jzmz", "isndc", "jzvc"];
  jzkey.forEach((item) => {
    if (Object.keys(route.query).includes(item)) {
      state.dispMediumTabPane = true;
    }
  });
  jieZhiParas.ID = route.query.jzid || "0";
  jieZhiParas.MiDu = route.query.jzmd || 1000;
  jieZhiParas.NianDu = route.query.jznd || 1;
  jieZhiParas.Name = route.query.jzmz || waterName;
  jieZhiParas.isNdCor = route.query.isndc || false;
  jieZhiParas.V_C = route.query.jzvc || 100;
  state.jieZhiParas = jieZhiParas;
 
  let requestData = {
    DpQ: route.query.DpQ || "",
    DpH: route.query.DpH || "",
    DpQu: route.query.DpQu,
    DpHu: route.query.DpHu,
    TolGrade: route.query.TGrade || 0,
    TolRatioMinQ: route.query.TRatioMinQ || 0,
    TolRatioMaxQ: route.query.TRatioMaxQ || 0,
    TolRatioMinH: route.query.TRatioMinH || 0,
    TolRatioMaxH: route.query.TRatioMaxH || 0,
  };
 
  if (requestData.TolGrade > 0) {
    let m_toleranceParas = {};
    m_toleranceParas.Grade = requestData.TolGrade;
    m_toleranceParas.RatioMinQ = requestData.TolRatioMinQ;
    m_toleranceParas.RatioMaxQ = requestData.TolRatioMaxQ;
    m_toleranceParas.RatioMinH = requestData.TolRatioMinH;
    m_toleranceParas.RatioMaxH = requestData.TolRatioMaxH;
 
    state.m_toleranceParas = m_toleranceParas;
  }
 
  state.m_isShowLoadingFrm = false;
 
  const pumpInfoData = pageData; //泵详细所有数据
  if (pumpInfoData == null) {
    return;
  }
 
  state.m_pumpInfoData = pumpInfoData;
  const pumpBaseInfo = pumpInfoData.BaseInfo;
  if (pumpBaseInfo == null) {
    return;
  }
 
  //设置单位,根据用户设置
  setUnitByUserSetting(pumpInfoData, requestData);
 
  //
  if (state.m_designPointParas != null) {
    state.m_designPointParas.WrkSpeed = pumpBaseInfo.WrkSpeed;
    state.m_designPointParas.WrkD2 = pumpBaseInfo.WrkD2;
  }
  let pumpBaseInfo_g = {};
  pumpBaseInfo_g.SeriesID = pumpBaseInfo.SeriesID;
  pumpBaseInfo_g.PumpID = pumpBaseInfo.PumpID; //主ID
  pumpBaseInfo_g.SubID = pumpBaseInfo.SubID; //切割
  pumpBaseInfo_g.CatalogName = pumpBaseInfo.CatalogName || "";
  pumpBaseInfo_g.SeriesName = pumpBaseInfo.SeriesName || "";
  pumpBaseInfo_g.PumpName = pumpBaseInfo.PumpName || "";
  pumpBaseInfo_g.FirePumpType = pumpBaseInfo.FirePumpType || 0;
  pumpBaseInfo_g.DriveType = requestData.DriveType; //驱动方式
  pumpBaseInfo_g.DriveSpeed = requestData.DriveSpeed; //柴油机转速
  pumpBaseInfo_g.PumpStyle = pumpBaseInfo.PumpStyle;
  pumpBaseInfo_g.IsMainModel = pumpBaseInfo.IsMainModel;
  pumpBaseInfo_g.SubPumpName = pumpBaseInfo.SubPumpName;
  pumpBaseInfo_g.DispPumpName = pumpBaseInfo.PumpName;
  pumpBaseInfo_g.AssemFilePageVisible = pumpBaseInfo.AssemFilePageVisible;
  pumpBaseInfo_g.DimFilePageVisible = pumpBaseInfo.DimFilePageVisible;
  pumpBaseInfo_g.ElecFilePageVisible = pumpBaseInfo.ElecFilePageVisible;
  pumpBaseInfo_g.StructFilePageVisible = pumpBaseInfo.StructFilePageVisible;
  if (pumpBaseInfo.IsMainModel == false) {
    pumpBaseInfo_g.DispPumpName = pumpBaseInfo.SubPumpName;
  }
  if (pumpInfoData.ReportSetting) {
    pumpBaseInfo_g.ReportSetting = pumpInfoData.ReportSetting;
  }
  //
  state.m_pumpBaseInfo = pumpBaseInfo_g;
 
  // 设置tab按钮的翻译
  state.mainSetting.assemFilePart.tabText = pumpBaseInfo.AssemFileLabelName
    ? pumpBaseInfo.AssemFileLabelName
    : state.mainSetting.assemFilePart.tabText;
  state.mainSetting.structFilePart.tabText = pumpBaseInfo.StructFileLabelName
    ? pumpBaseInfo.StructFileLabelName
    : state.mainSetting.structFilePart.tabText;
  state.mainSetting.productFilePart.tabText = pumpBaseInfo.DimFileLabelName
    ? pumpBaseInfo.DimFileLabelName
    : state.mainSetting.productFilePart.tabText;
  state.mainSetting.elecFile.tabText = pumpBaseInfo.ElecFileLabelName
    ? pumpBaseInfo.ElecFileLabelName
    : state.mainSetting.elecFile.tabText;
 
  // 设置左侧tab按钮的显示隐藏
  state.mainSetting.assemFilePart.tabVisible =
    state.m_pumpBaseInfo.AssemFilePageVisible;
  state.mainSetting.structFilePart.tabVisible =
    state.m_pumpBaseInfo.StructFilePageVisible;
  state.mainSetting.productFilePart.tabVisible =
    state.m_pumpBaseInfo.DimFilePageVisible;
  state.mainSetting.elecFile.tabVisible =
    state.m_pumpBaseInfo.ElecFilePageVisible;
 
  // 判断左侧tab菜单的安装图(机组)是否是动态图
  if (pumpInfoData.DynFileAssemSys) {
    state.mainSetting.dynamicAssemFileSys.tabVisible = true;
    state.m_dynPict4Sys = {};
    (state.m_dynPict4Sys.isSuccess = pumpInfoData.DynFileAssemSys.IsSuccess),
      (state.m_dynPict4Sys.TemplateImageFilePath =
        pumpInfoData.DynFileAssemSys.TemplateImageFilePath);
    (state.m_dynPict4Sys.criticalItem4Template =
      pumpInfoData.DynFileAssemSys.CriticalItem4Template),
      (state.m_dynPict4Sys.criticalItem4CsvRow =
        pumpInfoData.DynFileAssemSys.CriticalItem4CsvRow);
 
    let dyn_data_info = {
      pumpBaseInfo: state.m_pumpBaseInfo,
      isSuccess: pumpInfoData.DynFileAssemSys.IsSuccess,
      filepath: pumpInfoData.DynFileAssemSys.TemplateImageFilePath,
      allTextInfo: pumpInfoData.DynFileAssemSys.AllTextInfo,
      note: pumpInfoData.DynFileAssemSys.Info,
    };
    nextTick(() => {
      DynamicAssemFileSysRef.value.initDynamicPictureData(dyn_data_info);
    });
  }
  //console.log(pumpBaseInfo_g);
 
  // 设置变速曲线左侧菜单按钮是否显示
  if (pumpInfoData.SettingInfo.IsDispSpeedSimuCurve != undefined) {
    state.mainSetting.multiSpeedCurve.tabVisible =
      pumpInfoData.SettingInfo.IsDispSpeedSimuCurve;
  }
 
  document.title = state.m_pumpBaseInfo.DispPumpName;
 
  state.m_calcMotorPowerPtPosi = pumpInfoData.SettingInfo.CalcMotorPowerPtPosi;
  //
  state.m_pumpStyle = pumpBaseInfo.PumpStyle;
 
  //三维模型
  state.m_model3dSetting.BimFileLaws = pumpInfoData.BimFileLaws;
 
  //判断是否有产品结构图(三维)
  if (
    pumpInfoData.Struct3d != null &&
    pumpInfoData.Struct3d.DispCtrl == ConstParas.Disp3dMethod.NONE
  ) {
    state.mainSetting.seriesStructure3d.tabVisible = true;
    let url =
      window.globalConfig.WebApiUrl.FileUrl + 
      pumpInfoData.Struct3d.Info;
    createAsyncTask().then(() => {
      initSeriesStructureByThreeD(url);
    });
  } else {
    if (!pumpInfoData.Product3d) {
      state.Product3d.DispCtrl = ConstParas.Disp3dMethod.CAD_3DShowShow;
    }
    //3D
    if (pumpInfoData.Product3d != null && pumpInfoData.Product3d.Info != null) {
      if (pumpInfoData.Product3d.DispCtrl) {
        state.Product3d.DispCtrl = pumpInfoData.Product3d.DispCtrl;
        if (
          pumpInfoData.Product3d.DispCtrl ==
          ConstParas.Disp3dMethod.CAD_3DShowShow
        ) {
          state.mainSetting.cadModel.tabVisible = true;
          state.mainSetting.cadModel.url =
            "http://www.3dxiuxiu.cn/web/view_admin.html?modelId=" +
            pumpInfoData.Product3d.Info;
        }
        if (
          pumpInfoData.Product3d.DispCtrl == ConstParas.Disp3dMethod.CAD_51JM
        ) {
          state.mainSetting.cadModel.tabVisible = true;
          state.mainSetting.cadModel.url =
            "https://www.51jianmo.com/newModel/?code=" +
            pumpInfoData.Product3d.Info +
            "&desc=1&icon=1&type=1&quick=0&opacity=1&full=0&isxcx=0";
        }
      }
    }
  }
  //判断是否有视频
  if (pumpInfoData.Video != null) {
    if (window.pageConfig.PumpDetailPage.LeftMenuBar.Video.isShow) {
      state.mainSetting.seriesVideo.tabVisible = true;
      state.mainComponentData.seriesVideo.path =
        pumpInfoData.Video.AddressContent;
    }
  }
  // 初始化介质
  if (state.dispMediumTabPane) {
    initMedium();
  }
  //材料
  if (pumpInfoData.MaterialGrpList && pumpInfoData.MaterialGrpList.length > 0) {
    createAsyncTask()
      .then(() => {
        initMaterial(pumpInfoData);
      })
      .catch();
  } else {
    state.mainSetting.material.tabVisible = false;
    document.getElementById("tab-material").style.display = "none";
  }
  //如果没有图表参数就隐藏掉参数表格
  if (!pumpInfoData.ChartPointPara) {
    state.mainSetting.chartPoint.tabVisible = false;
    state.currentRightMeunId = "prop";
    document.getElementById("tab-chartPoint").style.display = "none";
  }
 
  // 默认隐藏变速曲线查询参数
  if (!state.mainSetting.multiSpeedCurve.ctrVisible) {
    settingMSChartQueryTableDisp(false);
  }
  //电机(轴流泵 暂时没有)
  if (pumpInfoData.ChartPointPara != null) {
    state.m_motorAllowMaxPtDict =
      pumpInfoData.ChartPointPara.MotorAllowMaxPtDict;
  }
 
  //刷新了产品属性列表
  propCtrl.value.setRefreshPropListCb((propList) => {
    setBimFileByPropList(propList); //BIM 文件
  });
  //修改了所选产品
  propCtrl.value.setChangeSelectPartCb((sel_part) => {
    //刷新动态图
    refreshDynPicture4Part(sel_part);
  });
  //修改了所选产品
  propCtrl.value.setRefreshPropValueCb((prop, method) => {
    //刷新动态图
    refreshDynPicture4Prop(prop);
  });
  //修改了产品图片回调
  propCtrl.value.setImageFilePathCb((type, file) => {
    setImageFile(type, file);
  });
 
  createAsyncTask().then(() => {
    let pumpBaseInfo = state.m_pumpInfoData.BaseInfo;
    let pumpInfoData = state.m_pumpInfoData;
 
    //附件
    initAttachFile(pumpBaseInfo, pumpInfoData);
 
    //初始化属性控件
    propCtrl.value.initialData(
      m_currentLanguage,
      pumpBaseInfo,
      pumpInfoData.PartFullInfo,
      pumpInfoData.SettingInfo
    );
 
    //propCtrl.value.setBaseInfo(pumpBaseInfo, pumpInfoData.SettingInfo);
    // propCtrl.value.setLaw4(pumpInfoData.PartFullInfo);
    // // 初始化图片构建
    // let PartList = pumpInfoData.PartFullInfo.PartList;
    // if (PartList && PartList.length > 0) {
    //     let defaultPart = PartList[0];
    //     propCtrl.value.setCurrentPartInfo(defaultPart);
    // } else {
    //     propCtrl.value.BuildAllPictureFile();
    // }
  });
 
  // 初始化属性和图表
  createAsyncTask()
    .then(() => {
      initCurve(pumpBaseInfo, pumpInfoData);
    })
    .catch((err) => {
      console.log(err);
    });
};
//刷新动态图,修改产品
const refreshDynPicture4Part = (sel_part) => {
  if (state.m_dynPict4Sys == null || sel_part == null) return;
 
  var isRefresData = false;
  if (state.m_dynPict4Sys.criticalItem4CsvRow != null) {
    for (var i = 0; i < state.m_dynPict4Sys.criticalItem4CsvRow.length; i++) {
      if (state.m_dynPict4Sys.criticalItem4CsvRow[i].Type == 0) {
        isRefresData = true;
      }
    }
  }
  if (state.m_dynPict4Sys.criticalItem4Template != null) {
    for (var i = 0; i < state.m_dynPict4Sys.criticalItem4Template.length; i++) {
      if (state.m_dynPict4Sys.criticalItem4Template[i].Type == 0) {
        isRefresData = true;
      }
    }
  }
  console.log("refreshDynPicture4Part isRefresData:" + isRefresData);
  if (!isRefresData) {
    return;
  }
 
  refreshDynPictData(sel_part);
};
//刷新动态图,修改产品
const refreshDynPicture4Prop = (prop) => {
  if (prop == null) return;
 
  if (state.m_dynPict4Sys == null) return;
  //
  DynamicAssemFileSysRef.value.refreshPropValue(prop);
 
  if (prop.Tag == null) return;
 
  var isRefresData = false;
  if (state.m_dynPict4Sys.criticalItem4CsvRow != null) {
    for (var i = 0; i < state.m_dynPict4Sys.criticalItem4CsvRow.length; i++) {
      if (state.m_dynPict4Sys.criticalItem4CsvRow[i].Type == 2) {
        if (state.m_dynPict4Sys.criticalItem4CsvRow[i].Tag == prop.Tag)
          isRefresData = true;
      }
    }
  }
  if (state.m_dynPict4Sys.criticalItem4Template != null) {
    for (var i = 0; i < state.m_dynPict4Sys.criticalItem4Template.length; i++) {
      if (state.m_dynPict4Sys.criticalItem4Template[i].Type == 2) {
        if (state.m_dynPict4Sys.criticalItem4Template[i].Tag == prop.Tag)
          isRefresData = true;
      }
    }
  }
 
  if (!isRefresData) {
    return;
  }
  var sel_part = propCtrl.value.GetCurrentPartEntity();
 
  refreshDynPictData(sel_part);
};
const refreshDynPictData = (sel_part) => {
  if (sel_part == null || sel_part.PartPropList == null) return;
 
  var propStore = propCtrl.value.GetPartProp4Store2(sel_part.PartPropList);
 
  let requestData = {
    SeriesID: state.m_pumpBaseInfo.SeriesID,
    ProductID: state.m_pumpBaseInfo.PumpID,
    SubID: state.m_pumpBaseInfo.SubID,
    PartID: sel_part.PartID,
    PartProp: propStore,
  };
 
  state.m_isShowLoadingFrm = true;
  axiosHelper
    .post({
      version: 3,
      lang: m_currentLanguage,
      //isAddLangParam : "false",
      controller: "PumpDetailByPara",
      action: "RefreshDynPict",
      data: requestData,
      apiUrlType: "main",
    })
    .then((res) => {
      state.m_isShowLoadingFrm = false;
      let resdata = res.data;
      if (resdata.Code != 0) {
        ElMessage(resdata.Message);
        return;
      }
 
      let reponstData = resdata.Data;
      if (reponstData == null) {
        ElMessage("error:684");
        return;
      }
      let dyn_data_info = {
        pumpBaseInfo: state.m_pumpBaseInfo,
        isSuccess: reponstData.IsSuccess,
        filepath: reponstData.TemplateImageFilePath,
        allTextInfo: reponstData.AllTextInfo,
        note: reponstData.Info,
      };
      nextTick(() => {
        DynamicAssemFileSysRef.value.updateDrawView(dyn_data_info);
      });
      //console.log(reponstData);
    });
};
// 初始化属性
const initProp = () => {
  // let pumpBaseInfo = state.m_pumpInfoData.BaseInfo;
  // let pumpInfoData = state.m_pumpInfoData;
  // //初始化属性控件
  // propCtrl.value.initialData(
  //     m_currentLanguage,
  //     pumpBaseInfo,
  //     pumpInfoData.PartFullInfo,
  //     pumpInfoData.SettingInfo
  // );
};
// 初始化曲线
const initCurve = (pumpBaseInfo, pumpInfoData) => {
  //图表控件
  if (pumpBaseInfo.PumpStyle == ConstParas.PumpStyle.LXP) {
    //判断当前是否是离心泵
    var cb_dict = {
      //设置曲线修改回调函数
      setChangeWrkCurveCb: function (curve) {
        var dp = lxbSelectPointCtrl.value.getDesignParas();
 
        if (multiSpeedChartCtrl.value != null)
          multiSpeedChartCtrl.value.setWrkCurveInfo(dp, curve);
 
        if (connChartCtrl.value != null)
          connChartCtrl.value.setWrkCurveInfo(dp, curve);
      },
    };
 
    if (pumpInfoData.ChartPointPara !== null) {
      state.m_motorAllowMaxPtDict =
        pumpInfoData.ChartPointPara.MotorAllowMaxPtDict;
    }
 
    //获取中间部分的尺寸,由于变频曲线开始时隐藏的,内部无法获取尺寸,只能传入进去
    var chart_diagram_size = lxbChartCtrl.value.getDiagramSize();
    //
    multiSpeedChartCtrl.value.initPumpInfoData(
      //放在lxbChartCtrl.initPumpInfoData 之前
      m_currentLanguage,
      pumpInfoData,
      chart_diagram_size
    );
 
    connChartCtrl.value.initPumpInfoData(
      m_currentLanguage,
      pumpInfoData,
      chart_diagram_size
    );
 
    lxbChartCtrl.value.initPumpInfoData(
      m_currentLanguage,
      pumpInfoData,
      cb_dict,
      state.m_userUnitSetting
    );
    initLxbSelectPoint(pumpInfoData);
 
    initLxbChartPointParas(pumpInfoData);
  } else if (pumpBaseInfo.PumpStyle == ConstParas.PumpStyle.ZLP) {
    //轴流泵
    var cb_dict = {
      //设置曲线修改回调函数
      setChangeWrkCurveCb: function (curve) {
        // if (_this.$refs.multiSpeedChartCtrl == null) return;
        // _this.$refs.multiSpeedChartCtrl.setWrkCurveInfo(curve);
      },
    };
 
    state.mainSetting.multiSpeedCurve.tabVisible = false; // 轴流泵 暂时不开放
    state.mainSetting.connCurve.tabVisible = false; //轴流泵 暂不开放串并联曲线
 
    zlbSelectPointCtrl.value.initPumpInfoData(m_currentLanguage, pumpInfoData);
    zlbChartPointParasCtrl.value.initPumpInfoData(
      m_currentLanguage,
      pumpInfoData
    );
    zlbChartCtrl.value.initPumpInfoData(
      m_currentLanguage,
      pumpInfoData,
      cb_dict,
      state.m_userUnitSetting
    );
  }
};
// 初始化离心泵选型点
const initLxbSelectPoint = (pumpInfoData) => {
  lxbSelectPointCtrl.value.initPumpInfoData(m_currentLanguage, pumpInfoData);
};
// 初始化离心泵图表参数点
const initLxbChartPointParas = (pumpInfoData) => {
  lxbChartPointParasCtrl.value.initPumpInfoData(
    m_currentLanguage,
    pumpInfoData
  );
};
// 初始化附件
const initAttachFile = (pumpBaseInfo, pumpInfoData) => {
  nextTick(() => {
    attachFileCtrl.value.initialFileList(
      pumpBaseInfo.SeriesID,
      pumpInfoData.AttachFiles
    );
  });
};
// 初始化材料
const initMaterial = (pumpInfoData) => {
  state.mainSetting.material.tabVisible = true;
  materialCtrl.value.initialData(pumpInfoData.MaterialGrpList);
};
const initMedium = () => {
  nextTick(() => {
    JieZhiFormRef.value &&
      JieZhiFormRef.value.initJieZhiParas(state.jieZhiParas);
  });
};
// 初始化视频路径
const initVideoSrc = (src) => {
  nextTick(() => {
    seriesVideoCtrl.value.initVideoSrc(src);
  });
};
//  初始化爆炸图(三维)
const initSeriesStructureByThreeD = (url) => {
  seriesStructureCtrl.value.initFrameUrl(url);
};
//到登陆界面
const gotoLoginPage = () => {
  loginStore.preLoginPageRoute(route.fullPath);
  loginStore.login(route.fullPath);
};
//设置控件配置
const setCtrlConfig = () => {
  state.mainSetting.multiSpeedCurve.tabVisible = true;
 
  let leftMenuBar = window.pageConfig.PumpDetailPage.LeftMenuBar;
 
  state.mainSetting.seriesVideo.tabVisible = leftMenuBar.Video.isShow;
  // 设置左侧菜单文字是爆炸图还是结构图
  if (
    leftMenuBar.StructFile &&
    leftMenuBar.StructFile.tabText == "explosionDiagram"
  ) {
    state.mainSetting.structFilePart.tabText = `${t(
      "detailPage.explosionDiagram.TR"
    )}`;
  } else {
    state.mainSetting.structFilePart.tabText = `${t(
      "detailPage.structureDrawing.TR"
    )}`;
  }
  //设置左侧菜单文字是安装图(单泵)还是泵头尺寸图
  if (
    leftMenuBar.assemFilePart &&
    leftMenuBar.assemFilePart.tabText == "pumpDimensions"
  ) {
    state.mainSetting.assemFilePart.tabText = `${t(
      "detailPage.pumpDimensions.TR"
    )}`;
  } else {
    state.mainSetting.assemFilePart.tabText = `${t(
      "detailPage.assemblyDrawing.TR"
    )}`;
  }
 
  //设置左侧菜单文字是安装图(机组)还是安装尺寸图
  if (
    leftMenuBar.assemFileSys &&
    leftMenuBar.assemFileSys.tabText == "outlineDrawing"
  ) {
    state.mainSetting.assemFileSys.tabText = `${t(
      "detailPage.outlineDrawing.TR"
    )}`;
    state.mainSetting.dynamicAssemFileSys.tabText = `${t(
      "detailPage.outlineDrawing.TR"
    )}`;
  } else {
    state.mainSetting.dynamicAssemFileSys.tabText = `${t(
      "detailPage.assemblyDrawingSys.TR"
    )}`;
  }
};
//修改了区域参数的流量(m3h单位下)
const refreshRegionByFlow = (flow_m3h, tag) => {
  if (flow_m3h == null) return;
  //判断当前是否是离心泵
  if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
    var grp_pt = lxbChartCtrl.value.refreshRegionByFlow(flow_m3h, tag);
    if (grp_pt != null) {
      lxbChartPointParasCtrl.value.refreshRegionPtParas(grp_pt, tag);
    }
    // _this.calcChartPointGrid();
  }
};
//子组件 修改设计点 刷新页面
const refreshByDp = (designPointParas) => {
  //
  if (designPointParas == null) return;
  if (designPointParas.DpQ == null || designPointParas.DpQ == "") return;
  if (designPointParas.DpH == null || designPointParas.DpH == "") return;
 
  var zeroH = 0;
  if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
    if (lxbChartCtrl.value != null) zeroH = lxbChartCtrl.value.getEquipCurveZeroH();
  }
 
  var jieZhiParas = state.jieZhiParas;
 
  let isAllowSpeed = true;
  let isAllowCut = true;
 
  if (route.query.isspeed != undefined) {
    isAllowSpeed = Number(route.query.isspeed) ? true : false;
  }
  if (route.query.iscut != undefined) {
    isAllowCut = Number(route.query.iscut) ? true : false;
  }
 
  let requestData = {
    SID: state.m_pumpBaseInfo.SeriesID,
    PID: state.m_pumpBaseInfo.PumpID,
    SubID: state.m_pumpBaseInfo.SubID,
 
    DpQ: designPointParas.DpQ + "",
    DpH: designPointParas.DpH + "",
    DpQu: designPointParas.DpQu + "",
    DpHu: designPointParas.DpHu + "",
 
    FirePumpType: state.m_pumpBaseInfo.FirePumpType || "0",
    DriveType: state.m_pumpBaseInfo.DriveType || "", //驱动方式
    DriveSpeed: state.m_pumpBaseInfo.DriveSpeed || "", //柴油机转速
 
    WorkSpeed: designPointParas.WrkSpeed,
    IsChangeSpeed: false,
 
    jzID: Number(jieZhiParas.ID),
    jzMiDu: jieZhiParas.MiDu.toString(),
    jzNianDu: jieZhiParas.NianDu.toString(),
    jzName: jieZhiParas.Name.toString(),
    isNdCor: jieZhiParas.isNdCor,
 
    EquipCurveZeroH: zeroH,
    IsAllowSpeed: isAllowSpeed,
    IsAllowCut: isAllowCut
  };
 
  var isChangeSpeed = false;
  if (requestData.WorkSpeed && requestData.WorkSpeed > 10) {
    if (state.m_pumpInfoData.BaseInfo.WrkSpeed != requestData.WorkSpeed) {
      state.m_pumpInfoData.BaseInfo.WrkSpeed = requestData.WorkSpeed;
      isChangeSpeed = true;
    }
  }
  requestData.IsChangeSpeed = isChangeSpeed;
 
 
  state.m_isShowLoadingFrm = true;
  axiosHelper
    .post({
      version: 3,
      lang: m_currentLanguage,
      controller: "PumpDetailByPara",
      action: "CalcByDp",
      data: requestData,
      apiUrlType: "main",
    })
    .then(function (res) {
      state.m_isShowLoadingFrm = false;
      let resdata = res.data;
      if (resdata.Code != 0) {
        ElMessage(resdata.Message);
        return;
      }
 
      let pumpInfoData = resdata.Data;
      if (pumpInfoData == null) {
        ElMessage("error:684");
        return;
      }
      var baseInfo = pumpInfoData.BaseInfo;
      //判断是否是切割型
      state.m_pumpBaseInfo.IsMainModel = baseInfo.IsMainModel;
      state.m_pumpBaseInfo.SubID = baseInfo.SubID;
      state.m_pumpBaseInfo.SubPumpName = baseInfo.SubPumpName;
      state.m_pumpBaseInfo.DispPumpName = baseInfo.PumpName;
      if (baseInfo.IsMainModel == false) {
        state.m_pumpBaseInfo.DispPumpName = baseInfo.SubPumpName;
      }
      if (state.m_calcMotorPowerPtPosi == 7) {
        propCtrl.value.setCurrentPartByPartNO(
          state.m_pumpBaseInfo.DispPumpName
        );
      }
      if (pumpInfoData.ChartPointPara) {
        state.m_motorAllowMaxPtDict =
          pumpInfoData.ChartPointPara.MotorAllowMaxPtDict;
      }
      //获取数据后调用离心泵图表组件的方法重新绘制图表
      if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
        lxbChartCtrl.value.refreshByDp(pumpInfoData);
        lxbSelectPointCtrl.value.refreshPumpInfoData(pumpInfoData);
        lxbChartPointParasCtrl.value.refreshPumpInfoData(
          designPointParas,
          pumpInfoData
        );
      }
      //获取数据后调用离心泵图表组件的方法重新绘制图表
      else if (state.m_pumpStyle == ConstParas.PumpStyle.ZLP) {
        if (
          pumpInfoData.ChartObjectDict == null ||
          pumpInfoData.ChartObjectDict.WorkCurve == null
        ) {
          ElMessage("此参数已超出曲线范围");
        }
        zlbChartCtrl.value.refreshByDp(pumpInfoData);
        zlbSelectPointCtrl.value.refreshPumpInfoData(pumpInfoData);
        zlbChartPointParasCtrl.value.refreshPumpInfoData(
          designPointParas,
          pumpInfoData
        );
      }
    });
};
/**
 * 入参为数组格式,例:['错误1','错误2']
 * @param arr
 */
const cbOpenErrorTips = (arr) => {
  emit("cbOpenDetailIndexErrorTips", arr);
};
const cbCloseErrorTips = () => {
  emit("cbOpenDetailIndexErrorTips");
};
//设置单位,根据用户设置
const setUnitByUserSetting = (pumpInfoData, requestData) => {
  var series_unit_q = pumpInfoData.SettingInfo.SeriesUnitQ; //表示后台传的单位
  var series_unit_h = pumpInfoData.SettingInfo.SeriesUnitH;
  var series_unit_p = pumpInfoData.SettingInfo.SeriesUnitP;
  var series_unit_npsh = 0; //m 默认
 
  //系列单位(标准单位)
  pumpInfoData.SettingInfo.StdUnitQ = series_unit_q;
  pumpInfoData.SettingInfo.StdUnitH = series_unit_h;
  pumpInfoData.SettingInfo.StdUnitP = series_unit_p;
  pumpInfoData.SettingInfo.StdUnitNPSH = 0;
 
  pumpInfoData.SettingInfo.UserUnitQ = series_unit_q;
  pumpInfoData.SettingInfo.UserUnitH = series_unit_h;
  pumpInfoData.SettingInfo.UserUnitP = series_unit_p;
  pumpInfoData.SettingInfo.UserUnitNPSH = 0;
 
  pumpInfoData.SettingInfo.UserUnitD2 = 0;
  pumpInfoData.SettingInfo.StdUnitD2 = 0;
 
  var isChangeCoordinateUnit = false; //是否改变了坐标的单位
  var userUnitSetting = {};
  if (pumpInfoData.SettingInfo) {
    var q_unit_setting =
      UserSettingsHelper.getFlowUnitSetting(m_currentLanguage);
    if (q_unit_setting >= 0) {
      userUnitSetting.Q = q_unit_setting;
      if (pumpInfoData.SettingInfo.UserUnitQ != q_unit_setting) {
        pumpInfoData.SettingInfo.UserUnitQ = q_unit_setting;
        isChangeCoordinateUnit = true;
      }
    }
    var h_unit_setting =
      UserSettingsHelper.getHeadUnitSetting(m_currentLanguage);
    if (h_unit_setting >= 0) {
      userUnitSetting.H = h_unit_setting;
      if (pumpInfoData.SettingInfo.UserUnitH != h_unit_setting) {
        pumpInfoData.SettingInfo.UserUnitH = h_unit_setting;
        isChangeCoordinateUnit = true;
      }
    }
    var p_unit_setting =
      UserSettingsHelper.getPowerUnitSetting(m_currentLanguage);
 
    if (p_unit_setting >= 0) {
      userUnitSetting.P = p_unit_setting;
      pumpInfoData.SettingInfo.UserUnitP = p_unit_setting;
    }
 
    var npsh_unit_setting =
      UserSettingsHelper.getNpshUnitSetting(m_currentLanguage);
    if (npsh_unit_setting >= 0) {
      userUnitSetting.NPSH = npsh_unit_setting;
      pumpInfoData.SettingInfo.UserUnitNPSH = npsh_unit_setting;
    }
 
    var d2_unit_setting =
      UserSettingsHelper.getD2UnitSetting(m_currentLanguage);
    if (d2_unit_setting >= 0) {
      userUnitSetting.D2 = d2_unit_setting;
      pumpInfoData.SettingInfo.UserUnitD2 = d2_unit_setting;
    }
  }
  //最后以选型单位为准
  if (requestData.DpQ && requestData.DpH) {
    pumpInfoData.SettingInfo.UserUnitQ = parseInt(requestData.DpQu);
    pumpInfoData.SettingInfo.UserUnitH = parseInt(requestData.DpHu);
  }
 
  var isAdjustCoordUnitByUserSetting = false; //是否根据用户设置的单位修改图表坐标
  var detailPageConfig = window.pageConfig.PumpDetailPage;
  if (
    detailPageConfig.Chart &&
    detailPageConfig.Chart.IsAdjustCoordUnitByUserSetting
  ) {
    isAdjustCoordUnitByUserSetting = true;
  }
 
  //根据单位换算坐标
  if (isChangeCoordinateUnit && isAdjustCoordUnitByUserSetting) {
    var coord = pumpInfoData.ChartObjectDict.Coordinate;
 
    coordinateHelper.CalcOptimalByUnitQ(
      series_unit_q,
      pumpInfoData.SettingInfo.UserUnitQ,
      coord
    );
    //console.log(pumpInfoData.ChartObjectDict.Coordinate)
    coordinateHelper.CalcOptimalByUnitH(
      series_unit_h,
      pumpInfoData.SettingInfo.UserUnitH,
      coord
    );
    coordinateHelper.CalcOptimalByUnitP(
      series_unit_p,
      pumpInfoData.SettingInfo.UserUnitP,
      coord
    );
    coordinateHelper.CalcOptimalByUnitNPSH(
      series_unit_npsh,
      pumpInfoData.SettingInfo.UserUnitNPSH,
      coord
    );
 
    pumpInfoData.ChartObjectDict.Coordinate = coord;
  }
  userUnitSetting.isAdjustCoordUnitByUserSetting =
    isAdjustCoordUnitByUserSetting;
  state.m_userUnitSetting = userUnitSetting; //保存一份
};
//修改查询状态(给子控件调用)
const cbChangeChartQueryStatus = (val) => {
  if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
    lxbChartPointParasCtrl.value.setChartQueryStatus(val);
  }
};
//修改查询值(给子控件调用)
const cbChangeChartQueryData = (val) => {
  if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
    lxbChartPointParasCtrl.value.buildChartQueryData(val);
  }
};
// 变速曲线查询数据回调
const cbChangeQueryDataByMultiSpeedChart = (val) => {
  // console.log(val,678)
  multiSpeedChartQueryTableRef.value.updateQueryData(val);
};
// 设置变速曲线查询参数显示状态(给子组件使用)
const cbSetDispMSChartQueryData = (status) => {
  state.dispMulSpeedChartQueryTable = status;
  if (status) {
    state.currentRightMeunId = "multiSpeedChartQueryTable";
  } else {
    state.currentRightMeunId = "chartPoint";
  }
  settingMSChartQueryTableDisp(status);
};
// 设置变速曲线查询标的显示
const settingMSChartQueryTableDisp = (status) => {
  let display = status ? "block" : "none";
  document.getElementById("tab-multiSpeedChartQueryTable").style.display =
    display;
};
//根据流量计算功率
const calcPowerByFlow = (flow = null, unit = null) => {
  if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
    var power = lxbChartCtrl.value.calcPowerByFlow(flow, unit);
    return power;
  }
  return -1;
};
//根据流量计算效率
const calcEtaByFlow = (flow, unit) => {
  if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
    var eta = lxbChartCtrl.value.calcEtaByFlow(flow, unit);
    return eta;
  }
  return -1;
};
//修改参数选型电机功率下拉的值
const cbChangeMotorPowerInMainGrid = (val) => {
  state.m_selMotorPower = val;
 
  if (state.m_pumpStyle == ConstParas.PumpStyle.LXP) {
    //通知属性
    createAsyncTask()
      .then(() => {
        propCtrl.value.setMotorPowerValue(val);
      })
      .catch();
 
    if (state.m_motorAllowMaxPtDict != null) {
      var allowMaxPointQ = state.m_motorAllowMaxPtDict[val];
      if (allowMaxPointQ != null) {
        refreshRegionByFlow(allowMaxPointQ, "AllowMaxPointQ");
      }
    }
 
    var wrkPt = lxbChartPointParasCtrl.value.getWorkPtStdUnit();
    if (wrkPt == null) return;
    var coeff = propCtrl.value.getMotorPowerCalcCoeff();
    if (coeff <= 0.1) return;
    var min_power = wrkPt.P * coeff;
    if (val < wrkPt.P * coeff) {
      cbOpenErrorTips(
        "电机功率" +
        val +
        ", 不能小于最小轴功率 " +
        min_power +
        " ( " +
        wrkPt.P +
        " x " +
        coeff +
        ")"
      );
    } else {
      cbCloseErrorTips();
    }
  }
  if (state.m_pumpStyle == ConstParas.PumpStyle.ZLP) {
    //通知属性
    propCtrl.value.setMotorPowerValue(val);
 
    if (state.m_motorAllowMaxPtDict != null) {
      var allowMaxPointQ = state.m_motorAllowMaxPtDict[val];
      if (allowMaxPointQ != null) {
        refreshRegionByFlow(allowMaxPointQ, "AllowMaxPointQ");
      }
    }
  }
};
//设置BIM文件
const setBimFileByPropList = (propList) => {
  var bimFileLaws = state.m_model3dSetting.BimFileLaws;
  if (bimFileLaws == null || bimFileLaws.length == 0) return;
  if (propList == null || propList.length == 0) return;
 
  var ok_bimFileLaw = null;
  if (bimFileLaws.length == 1) {
    ok_bimFileLaw = bimFileLaws[0];
  } else {
    bimFileLaws.forEach((bimFileLaw) => {
      var propFilters = bimFileLaw.PropFilters;
      var isAllAcoord = true;
      if (propFilters != null) {
        for (var i = 0; i < propFilters.length; i++) {
          var isAccordPropValue = false;
          for (var j = 0; j < propList.length; j++) {
            if (
              propFilters[i].ID == propList[j].ID &&
              propFilters[i].Value == propList[j].PropValue
            ) {
              isAccordPropValue = true;
              break;
            }
          }
          if (!isAccordPropValue) {
            isAllAcoord = false;
            break;
          }
        }
      }
      if (isAllAcoord) {
        ok_bimFileLaw = bimFileLaw;
        return false;
      }
    });
  }
  if (ok_bimFileLaw == null) return;
  if (ok_bimFileLaw.FileLaw4View == null) return;
 
  var isHaveDim = ok_bimFileLaw.IsHaveDim;
 
  var view_file_path = BuildBimFilePath(propList, ok_bimFileLaw.FileLaw4View);
  var ds_file_path = BuildBimFilePath(propList, ok_bimFileLaw.FileLaw4Ds);
  if (view_file_path == null || view_file_path == "") return;
  if (view_file_path.indexOf(".") <= 0) {
    view_file_path = view_file_path + ".fbx";
  }
  if (isHaveDim == null) state.m_model3dSetting.IsHaveDim = false;
  else state.m_model3dSetting.IsHaveDim = isHaveDim;
  state.m_model3dSetting.LawID = ok_bimFileLaw.ID;
  state.m_model3dSetting.NextViewModelPath =
    window.globalConfig.WebApiUrl.FileUrl + 
    "Series" +
    state.m_pumpBaseInfo.SeriesID +
    "/BIM/" +
    view_file_path;
 
  if (ds_file_path) {
    if (!ds_file_path.endsWith(".rfa")) {
      ds_file_path = ds_file_path + ".rfa";
    }
    state.m_model3dSetting.CurrentDsModelPath =
      window.globalConfig.WebApiUrl.FileUrl + 
      "Series" +
      state.m_pumpBaseInfo.SeriesID +
      "/BIM/" +
      ds_file_path;
  } else {
    state.m_model3dSetting.CurrentDsModelPath = null;
  }
  state.mainSetting.model3d.tabVisible = true;
  if (state.mainSetting.model3d.ctrVisible) {
    nextTick(() => {
      loadModel3DFile();
    });
  }
};
//模型组件内点击下载按钮调用函数
const downloadModel3D = () => {
  let FilePath = state.m_model3dSetting.CurrentViewModelPath;
  if (FilePath == null) return false;
  var uToken = userInfo.Token;
  var userType = userInfo.UserType;
  if (uToken == null || uToken == "") {
    gotoLoginPage();
    return;
  }
  //
  if (userType != ConstParas.UserType.Employee) {
    ElMessage("你没有下载权限,请联系 管理员 开通权限后下载");
    return;
  }
  checkDownBimRfaFile();
};
//检查下载三维模型文件
const checkDownBimRfaFile = () => {
  let requestData = {
    SeriesID: state.m_pumpInfoData.BaseInfo.SeriesID,
    ProductID: state.m_pumpInfoData.BaseInfo.PumpID,
    FilePath: state.m_model3dSetting.CurrentViewModelPath,
  };
  axiosHelper
    .get({
      version: 3,
      controller: "UserAuthor",
      action: "CheckDownBimRfaFile",
      data: requestData,
      apiUrlType: "main",
      isAddUrlSoftType: "false",
    })
    .then((res) => {
      let result = res.data;
      if (result.Code != 0) {
        ElMessage.error(result.Message);
        return;
      }
      let a = document.createElement("a"); // 生成一个a元素
      let event = new MouseEvent("click"); // 创建一个单击事件
      a.href = requestData.FilePath; // 将生成的URL设置为a.href属性
      a.dispatchEvent(event); // 触发a的单击事件
      setTimeout(() => {
        a.remove();
      }, 500);
    })
    .catch((err) => {
      new Error(err.toString());
    });
};
//构建BIM路径
const BuildBimFilePath = (propList, fileLawList) => {
  if (fileLawList == null) return null;
  if (fileLawList == null) return null;
 
  var fileName_law = "";
  for (var i in fileLawList) {
    var law = fileLawList[i];
 
    if (law.ItemType == 0 && law.PropID != null) {
      //产品属性
    }
    if (law.ItemType == 1 && state.m_pumpBaseInfo.PumpName) {
      //产品型号
      var pumpName = state.m_pumpBaseInfo.PumpName.replace("/", "-")
        .replace("\\", "-")
        .replace("*", "-");
      fileName_law += pumpName;
      if (fileLawList.length > 1) {
        fileName_law += GetFilePrefix(law);
      }
    }
    if (law.ItemType == 2 && state.m_pumpBaseInfo.PartNO) {
      //产品编号
      fileName_law += state.m_pumpBaseInfo.PartNO;
      if (fileLawList.length > 1) {
        fileName_law += GetFilePrefix(law);
      }
    }
    if (law.ItemType == 3 && state.m_pumpBaseInfo.PartCode) {
      //产品图号
      fileName_law += state.m_pumpBaseInfo.PartCode;
      if (fileLawList.length > 1) {
        fileName_law += GetFilePrefix(law);
      }
    }
    if (law.ItemType == 4) {
      //固定
      if (law.CodeLawList != null && law.CodeLawList.length > 0) {
        fileName_law += law.CodeLawList[0].Key;
        fileName_law += GetFilePrefix(law);
      }
    }
  }
 
  var lastStr = fileName_law[fileName_law.length - 1];
  if (lastStr == "\\" || lastStr == "/" || lastStr == "_" || lastStr == "-") {
    fileName_law = fileName_law.substring(0, fileName_law.length - 1);
  }
 
  return fileName_law;
};
//
const GetFilePrefix = (law) => {
  var FilePrefix = law.FilePrefix;
  if (FilePrefix == "\\") return "/";
  else return FilePrefix;
};
//设置图片
const setImageFile = (type, file) => {
  let currentLangName = "CN";
  // 安装图
  if (type == "AssemImagePart") {
    if (file) {
      const callBack = (newFile) => {
        state.mainSetting.assemFilePart.tabVisible = true;
        state.mainComponentData.assemFilePart.cad = newFile;
        const TextContent = state.m_pumpInfoData.BaseInfo.PumpName;
        const TextWaterMarkOps = {
          content: TextContent,
          position: "right",
        };
        waterMarkHelper.addImage(
          newFile,
          null,
          (base64Url) => {
            state.mainComponentData.assemFilePart.path = base64Url;
          },
          TextWaterMarkOps
        );
      };
      utils.checkImgPathByLang(currentLangName, file, callBack);
    } else {
      state.mainSetting.assemFilePart.tabVisible =
        state.m_pumpBaseInfo.AssemFilePageVisible;
    }
  }
  // 安装图机组
  if (type == "AssemImageSys") {
    if (file) {
      state.mainSetting.assemFileSys.tabVisible = true;
      state.mainComponentData.assemFileSys.cad = file;
      waterMarkHelper.addImage(file, null, (base64Url) => {
        state.mainComponentData.assemFileSys.path = base64Url;
      });
    }
  }
  // 实物图
  if (type == "RealImagePart") {
    if (file) {
      waterMarkHelper.addImage(file, null, (base64Url) => {
        state.mainComponentData.realFilePart.path = base64Url;
      });
    }
  }
  // 结构图
  if (type == "StructImagePart") {
    if (file) {
      // let newFile = utils.checkImgPathByLang(currentLangName, file)
      const callBack = (newFile) => {
        state.mainSetting.structFilePart.tabVisible = true;
        state.mainComponentData.structFilePart.cad = newFile;
        waterMarkHelper.addImage(newFile, null, (base64Url) => {
          state.mainComponentData.structFilePart.path = base64Url;
        });
      };
      utils.checkImgPathByLang(currentLangName, file, callBack);
    } else {
      state.mainSetting.structFilePart.tabVisible =
        state.m_pumpBaseInfo.StructFilePageVisible;
    }
  }
  // 产品尺寸图
  if (type == "ProductImagePart") {
    if (file) {
      state.mainSetting.productFilePart.tabVisible = true;
      state.mainComponentData.productFilePart.cad = file;
      waterMarkHelper.addImage(file, null, (base64Url) => {
        state.mainComponentData.productFilePart.path = base64Url;
      });
    } else {
      state.mainSetting.productFilePart.tabVisible =
        state.m_pumpBaseInfo.DimFilePageVisible;
    }
  }
  // 电气图
  if (type == "ElectricImagePart") {
    if (file) {
      state.mainComponentData.elecFile.cad = file;
      state.mainSetting.elecFile.tabVisible = true;
      waterMarkHelper.addImage(file, null, (base64Url) => {
        state.mainComponentData.elecFile.path = base64Url;
      });
    } else {
      state.mainSetting.elecFile.tabVisible =
        state.m_pumpBaseInfo.ElecFilePageVisible;
    }
  }
};
 
//加载三维模型
const loadModel3DFile = () => {
  var model3dSetting = state.m_model3dSetting;
  if (model3dSetting.CurrentViewModelPath == model3dSetting.NextViewModelPath)
    return;
  model3dSetting.CurrentViewModelPath = model3dSetting.NextViewModelPath;
 
  state.m_model3dSetting = model3dSetting;
 
  if (state.m_model3dSetting.isInitialFinish == false) {
    //下载三维模型
    nextTick(() => {
      model3dCtrl.value.setLoadModelCommandCb(function () {
        return downloadModel3D();
      });
    });
  }
  state.m_isShowLoadingFrm = true;
  nextTick(() => {
    //加载三维模型
    model3dCtrl.value.loadModel(
      model3dSetting.CurrentViewModelPath,
      true,
      function (val) {
        state.mainSetting.model3d.isInitialFinish = true;
 
        if (model3dSetting.IsHaveDim && model3dSetting.LawID > 0) {
          let fileName = state.m_pumpBaseInfo.PumpName.replace("/", "-");
 
          var load_bim_dim_post_data = {
            SeriesID: state.m_pumpBaseInfo.SeriesID,
            LawID: model3dSetting.LawID,
            FileName: fileName,
          };
          axiosHelper
            .get({
              version: 3,
              // lang: _this.m_currentLanguage,
              isAddUrlSoftType: "false",
              controller: "ModelLibrary",
              action: "GetProductDimList",
              data: load_bim_dim_post_data,
              apiUrlType: "main",
            })
            .then((res) => {
              state.m_isShowLoadingFrm = false;
 
              if (res.data.Code != 0) {
                model3dCtrl.value.setDimDisplay(false);
                ElMessage(res.data.Message);
                return;
              }
 
              model3dCtrl.value.updateSizeValue(res.data.Data);
              model3dCtrl.value.setDimDisplay(true);
            })
            .catch((err) => {
              state.m_isShowLoadingFrm = false;
              console.log("校验失败");
              return;
            });
        } else {
          state.m_isShowLoadingFrm = false;
        }
      }
    );
  });
};
 
//监听右侧选项的选中值
const onSelectRightMenu = (val) => {
  state.currentRightMeunId = val.name;
};
const tabBeforeLeave = (activeName, oldActiveName) => {
  if (activeName == "prop") {
    if (state.m_IsInitPropData) return;
    nextTick(() => {
      initProp();
      state.m_IsInitPropData = true;
    });
  }
};
//监听左侧菜单当前选择的索引
const onSelectLeftMenu = (key, keyPath) => {
  if (key == "prop_fix") {
    state.currentRightMeunId = "prop";
    return;
  } else if (key == "prop_motor") {
    state.currentRightMeunId = "prop";
    return;
  } else if (key == "material") {
    state.currentRightMeunId = "material";
    return;
  } else if (key == "ChartPoint_WrkPt") {
    state.currentRightMeunId = "chartPoint";
    return;
  } else if (key == "ChartPoint_QueryPt") {
    state.currentRightMeunId = "chartPoint";
    return;
  }
 
  state.mainSetting.featCurve.ctrVisible = false;
  state.mainSetting.assemFilePart.ctrVisible = false;
  state.mainSetting.assemFileSys.ctrVisible = false;
  state.mainSetting.dynamicAssemFileSys.ctrVisible = false;
  state.mainSetting.productFilePart.ctrVisible = false;
  state.mainSetting.structFilePart.ctrVisible = false;
  state.mainSetting.elecFile.ctrVisible = false;
  state.mainSetting.realFilePart.ctrVisible = false;
  state.mainSetting.model3d.ctrVisible = false;
  state.mainSetting.seriesDoc.ctrVisible = false;
  state.mainSetting.seriesStructure3d.ctrVisible = false;
  state.mainSetting.seriesVideo.ctrVisible = false;
  state.mainSetting.multiSpeedCurve.ctrVisible = false;
  state.mainSetting.connCurve.ctrVisible = false;
  state.mainSetting.cadModel.ctrVisible = false;
 
  // 判断如果有动态安装图(机组),切换其他菜单时默认隐藏
  if (state.m_dynPict4Sys != null) {
    DynamicAssemFileSysRef.value &&
      DynamicAssemFileSysRef.value.toggleDynamicPicVisible(false);
  }
 
  if (!state.mainSetting.multiSpeedCurve.ctrVisible) {
    settingMSChartQueryTableDisp(false);
    state.currentRightMeunId = "chartPoint";
  }
 
  if (key == "featCurve") {
    state.currentLeftMeunId = "featCurve";
    state.mainSetting.featCurve.ctrVisible = true;
  } else if (key == "cadModel") {
    state.currentLeftMeunId = "cadModel";
    state.mainSetting.cadModel.ctrVisible = true;
    // 判断是否已经加载过,如果已经加载过就不重复加载了
    if (state.mainSetting.cadModel.isInitialOK) {
      return;
    }
    nextTick(() => {
      cadModelCtrl.value.initIFrameUrl(state.mainSetting.cadModel.url);
    });
    state.mainSetting.cadModel.isInitialOK = true;
  } else if (key == "model3d") {
    state.currentLeftMeunId = "model3d";
    state.mainSetting.model3d.ctrVisible = true;
    nextTick(() => {
      loadModel3DFile();
    });
  } else if (key == "multiSpeedCurve") {
    state.mainSetting.multiSpeedCurve.ctrVisible = true;
    if (state.dispMulSpeedChartQueryTable) {
      settingMSChartQueryTableDisp(true);
      state.currentRightMeunId = "multiSpeedChartQueryTable";
    }
  } else if (key == "connCurve") {
    state.mainSetting.connCurve.ctrVisible = true;
  } else if (key == "assemFilePart") {
    state.mainSetting.assemFilePart.ctrVisible = true;
  } else if (key == "assemFileSys") {
    state.mainSetting.assemFileSys.ctrVisible = true;
  } else if (key == "dynamicAssemFileSys") {
    state.mainSetting.dynamicAssemFileSys.ctrVisible = true;
    if (state.m_dynPict4Sys != null) {
      nextTick(() => {
        DynamicAssemFileSysRef.value.toggleDynamicPicVisible(true);
      });
    }
  } else if (key == "structFilePart") {
    state.mainSetting.structFilePart.ctrVisible = true;
  } else if (key == "elecFile") {
    state.mainSetting.elecFile.ctrVisible = true;
  } else if (key == "productFilePart") {
    state.mainSetting.productFilePart.ctrVisible = true;
  } else if (key == "realFilePart") {
    state.mainSetting.realFilePart.ctrVisible = true;
  } else if (key == "seriesDoc") {
    state.currentLeftMeunId = "seriesDoc";
    state.mainSetting.seriesDoc.ctrVisible = true;
  } else if (key == "seriesStructure3d") {
    state.currentLeftMeunId = "seriesStructure3d";
    state.mainSetting.seriesStructure3d.ctrVisible = true;
  } else if (key == "seriesVideo") {
    state.currentLeftMeunId = "seriesVideo";
    state.mainSetting.seriesVideo.ctrVisible = true;
    initVideoSrc(state.mainSetting.seriesVideo.path);
  } else {
    state.currentLeftMeunId = "featCurve";
    state.mainSetting.featCurve.ctrVisible = true;
  }
};
 
// 更新运行参数--->选型参数
const cbUpdateSelectMainPoint = (data) => {
  if (data == null) return;
  if (data.name == "WorkSpeed" && lxbSelectPointCtrl.value != null) {
    lxbSelectPointCtrl.value.updateWorkSpeed(data.value);
  }
  if (data.name == "MotorPower" && lxbSelectPointCtrl.value != null) {
    lxbSelectPointCtrl.value.updateMotorPower(data.value);
  }
};
//更新 
const updateZlpConstantLine = (params) => {
  zlbChartCtrl.value.updateConstantLine(params)
}
 
// 获取动态安装图修改参数
const GetAssemDynFileSys = () => {
  if (state.m_dynPict4Sys == null) {
    return null;
  }
 
  return DynamicAssemFileSysRef.value.getAssemDynFileSys();
};
 
const getWorkFlow4Lcc = () => {
  if (lxbChartPointParasCtrl.value == null) return 0;
  return lxbChartPointParasCtrl.value.getWorkFlow4Lcc();
};
 
const GetCurrentPartEntity = () => {
  return propCtrl.value.GetCurrentPartEntity();
};
 
const GetPartProp4Store = () => {
  return propCtrl.value.GetPartProp4Store();
};
 
const getDesignParasByLXB = () => {
  return lxbSelectPointCtrl.value.getDesignParas();
};
 
const getDesignParasByZLB = () => {
  return zlbSelectPointCtrl.value.getDesignParas();
};
// 把同步的任务转成异步任务
const createAsyncTask = () => {
  return new Promise((resolve) => {
    resolve();
  });
};
const getConstantPtValue4StoreByLXB = () => {
  return lxbChartPointParasCtrl.value.getConstantPtValue4Store();
};
const getConstantPtValue4StoreByZLB = () => {
  return zlbChartPointParasCtrl.value.getConstantPtValue4Store();
};
const getEquipCurveInfo = () => {
  return lxbChartCtrl.value.getEquipCurveInfo();
};
 
const getChartDispStyleByLXB = () => {
  return lxbChartCtrl.value.getChartDispStyle();
};
 
const getAssemFileSysDispStatus = () => {
  return state.mainSetting.assemFileSys.tabVisible;
};
 
const getMaterialDispStatus = () => {
  return state.mainSetting.material.tabVisible;
};
 
const getParas4StoreByMateria = () => {
  return materialCtrl.value.getParas4Store();
};
//获取变速曲线的速度列表
const getMultiSpeedCurveList = () => {
  return multiSpeedChartCtrl.value.getSpeedList();
};
 
const getLXBCtrlRef = () => {
  return lxbChartCtrl.value;
};
const getPropCtrl = () => {
  return propCtrl.value;
};
defineExpose({
  initDetailPageData,
  calcEtaByFlow,
  calcPowerByFlow,
  getWorkFlow4Lcc,
  GetCurrentPartEntity,
  GetPartProp4Store,
  getDesignParasByLXB,
  getDesignParasByZLB,
  getConstantPtValue4StoreByLXB,
  getConstantPtValue4StoreByZLB,
  getEquipCurveInfo,
  getChartDispStyleByLXB,
  getAssemFileSysDispStatus,
  getMaterialDispStatus,
  getParas4StoreByMateria,
  getPropCtrl,
  getLXBCtrlRef,
  getMultiSpeedCurveList,
  GetAssemDynFileSys,
});
</script>
<style lang="scss">
.PumpDetailBody {
  width: 100%;
  min-width: 1366px;
  height: 100%;
 
  button {
    border: 0;
  }
 
  .el-dialog__header {
    border-bottom: 1px solid #ccc;
    margin-right: unset;
 
    .el-dialog__headerbtn {
      &:focus {
        outline: unset;
      }
    }
  }
 
  .el-dialog__body {
    padding: 10px;
  }
 
  .page-content {
    width: 100%;
    height: 100%;
    margin-top: 0px;
    padding: 0px;
    background-color: #fff;
 
    .el-tabs--border-card>.el-tabs__content {
      padding: 5px;
      overflow: auto;
    }
 
    .tabs_item {
      display: flex;
      flex-direction: column;
      align-items: center;
    }
 
    .el-menu {
      border: unset;
    }
 
    .el-menu-item {
      margin-top: 5px;
      background: #eee;
      color: #409eff;
      width: 100%;
      justify-content: center;
    }
 
    .el-menu-vertical-demo {
      width: 100%;
    }
 
    .el-menu-item.is-active {
      color: #409eff;
      background: #ecf5ff !important;
    }
 
    .el-submenu .el-menu-item {
      padding: 0px !important;
      width: 180px;
      background: #eeee;
      // margin-bottom: 5px;
      text-align: center;
      margin-left: 34px;
      color: #409eff;
      min-width: unset;
    }
 
    .el-submenu__title {
      background: #eee;
      color: #409eff;
    }
 
    .el-menu-item-group__title {
      padding: 0px 0px 0px 20px;
    }
 
    .el-menu-item-group>ul {
      display: flex;
      flex-direction: column;
      align-items: flex-end;
    }
 
    .is-select {
      color: #409eff !important;
      background: #ecf5ff !important;
    }
 
    .no-select {
      color: #409eff !important;
      background: #eee !important;
    }
 
    .el-tabs__header {
      margin: unset;
      margin-bottom: 5px;
 
      .el-tabs__item {
        height: 30px !important;
        line-height: 30px !important;
        padding: 0 20px !important;
        font-size: 14px !important;
      }
 
      .el-tabs__item.is-active {
        background: #ecf5ff !important;
      }
    }
 
    .el-tabs__content {
      height: calc(100% - 46px);
      overflow: auto;
      padding: 0px 5px;
    }
 
    .right {
      transform: rotate(-90deg);
      transition: 0.2s;
      position: absolute;
      left: 10px;
      font-size: 12px;
    }
 
    .down {
      transition: 0.2s;
      transform: rotate(0deg);
      position: absolute;
      left: 10px;
      font-size: 12px;
    }
 
    .group_name {
      width: 100%;
      height: 40px;
      background: #eee;
      line-height: 40px;
      position: relative;
    }
 
    .resize {
      width: 8px;
      height: 100%;
      cursor: col-resize;
      float: left;
    }
 
    .el-col-6 {
      width: 24.3%;
    }
 
    .rightBox {
      width: 28.711111%;
      height: calc(100% - 0px);
      background-color: white;
 
      .tab_panel_box {
        overflow: hidden;
        height: 100%;
 
        .tab_panel_box_continer {
          border: 1px solid #ddd;
          margin-top: 1px;
          border-bottom: 0;
          height: 100%;
        }
      }
 
      .el-tabs__content {
        overflow: auto;
      }
    }
  }
 
  .mgl-8 {
    margin-left: 8px;
  }
 
  .leftBox {
    height: calc(100% - 0px);
    border-right: solid 1px #e6e6e6;
    overflow: auto;
  }
 
  .midBox {
    height: calc(100% - 0px);
    background-color: white;
  }
}
 
section {
  height: 100%;
}
</style>