tanghaolin
2022-08-31 244c4241427b9f3316f06f1e0ae2ee571edc1a23
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
<template>
  <div ref="pagebox" class="DetailByParamsBox">
    <!-- 头部导航栏 -->
    <van-nav-bar style="position: fixed; top: 0px; width: 100%">
      <template #left>
        <van-icon @click="pageBack" name="arrow-left" size="18" />
      </template>
      <template #title>
        <label>{{ pagetitle }}</label>
      </template>
      <template #right>
        <!-- <van-icon name="search" size="18" /> -->
        <van-icon
          @click="popupShow = true"
          size="16"
          style="line-height: 24px"
          name="ellipsis"
        />
      </template>
    </van-nav-bar>
    <div class="DetailByParamsMain">
      <van-overlay style="z-index: 999" :show="isShowLoadingFrm">
        <div class="wrapper">
          <van-loading
            style="
              position: fixed;
              top: calc(50% - 25px);
              left: calc(50% - 25px);
            "
            type="spinner"
            color="#1989fa"
            size="24px"
            vertical
            >Loading...</van-loading
          >
        </div>
      </van-overlay>
 
      <div class="swipe_box" v-if="isShowSwiperImg">
        <van-swipe
          class="picture_swiper"
          width="100%"
          height="100%"
          :autoplay="3000"
          indicator-color="white"
        >
          <van-swipe-item
            v-if="mainSetting.structFilePart.path"
            style="positiion: relative; background: #fff"
          >
            <van-image
              :src="mainSetting.structFilePart.path"
              @click="previewImg(mainSetting.structFilePart.path)"
              fit="scale-down"
            />
            <p class="slider-title">
              {{ $t("detailPage.structureDrawing.TR") }}
            </p>
          </van-swipe-item>
          <van-swipe-item
            v-if="mainSetting.realFilePart.path"
            style="positiion: relative; background: #fff"
          >
            <van-image
              :src="mainSetting.realFilePart.path"
              @click="previewImg(mainSetting.realFilePart.path)"
              fit="scale-down"
            />
            <p class="slider-title">{{ $t("detailPage.modelDrawing.TR") }}</p>
          </van-swipe-item>
 
          <van-swipe-item v-if="false"></van-swipe-item>
        </van-swipe>
      </div>
      <van-tabs offset-top="46px" v-model="active" scrollspy sticky>
        <van-tab
          v-if="mainSetting.featCurve.ctrVisible"
          :title="$t('detailPage.curve.TR')"
        >
          <LXBChart
            ref="lxbChartCtrl"
            v-show="PumpStyle == 0"
            @cbChangeChartQueryStatus="cbChangeChartQueryStatus"
            @cbChangeChartQueryData="cbChangeChartQueryData"
          ></LXBChart>
 
          <ZLBChart v-show="PumpStyle == 1" ref="zlbChartCtrl"></ZLBChart>
        </van-tab>
        <van-tab :title="$t('detailPage.parameter.TR')">
          <LXBSelectMainPoint
            v-show="PumpStyle == 0"
            ref="lxbSelectPointCtrl"
            @cbChangeMotorPower="cbChangeMotorPowerInMainGrid"
            @cbRefreshByDp="refreshByDp"
          ></LXBSelectMainPoint>
          <LXBChartPointParas
            v-show="PumpStyle == 0"
            ref="lxbChartPointParasCtrl"
          ></LXBChartPointParas>
        </van-tab>
        <van-tab :title="$t('detailPage.properties.TR')">
          <Prop ref="propCtrl"></Prop>
        </van-tab>
        <van-tab
          :title="$t('detailPage.modelDrawing.TR')"
          v-if="!isShowSwiperImg"
        >
          <van-image
            :src="mainSetting.realFilePart.path"
            style="height: 242px"
            @click="previewImg(mainSetting.realFilePart.path)"
            fit="scale-down"
          />
        </van-tab>
        <van-tab :title="$t('detailPage.assemblyDrawing.TR')">
          <van-image
            :src="mainSetting.assemFilePart.path"
            style="min-height: 200px"
            @click="previewImg(mainSetting.assemFilePart.path)"
            fit="scale-down"
          />
        </van-tab>
        <van-tab
          :title="$t('detailPage.material.TR')"
          v-if="mainSetting.material.tabVisible"
        >
          <Material ref="materialCtrl"></Material>
        </van-tab>
        <van-tab
          :title="
            mainSetting.seriesDoc.ctrVisible
              ? $t('detailPage.document.TR')
              : $t('detailPage.DocumentNone.TR')
          "
        >
          <Doc v-show="mainSetting.seriesDoc.ctrVisible" ref="docCtrl"></Doc>
        </van-tab>
        <van-tab
          v-show="mainSetting.model3d.tabVisible"
          :title="$t('detailPage.Model.TR')"
        >
          <model3D
            style="width: 100%; height: 560px"
            ref="model3dCtrl"
          ></model3D>
        </van-tab>
        <!-- <van-tab title="产品属性">
        </van-tab>-->
      </van-tabs>
      <van-popup
        v-model:show="popupShow"
        position="right"
        :style="{
          height: '100%',
          width: '200px',
          overflow: 'auto',
          backgroundColor: '#ebedf0',
        }"
      >
        <div>
          <van-collapse v-model="popupActiveNames">
            <van-collapse-item :title="$t('header.collect.TR')" name="1">
              <div class="leftMenuItem">
                <van-cell
                  is-link
                  :title="$t('header.addCollect.TR')"
                  @click="addCollectLocalStorage"
                  icon="add-o"
                />
                <van-cell
                  is-link
                  :title="$t('header.deleteCollect.TR')"
                  @click="deleteCollectLocalStorage"
                  icon="delete-o"
                />
                <van-cell
                  is-link
                  :title="$t('indexPage.myCollection.TR')"
                  @click="toCollectList"
                  icon="star-o"
                />
              </div>
            </van-collapse-item>
            <van-collapse-item :title="$t('header.compare.TR')" name="2">
              <div class="leftMenuItem">
                <van-cell
                  is-link
                  :title="$t('header.addCompare.TR')"
                  @click="addCompareLocalStorage"
                  icon="add-o"
                />
                <van-cell
                  is-link
                  :title="$t('header.deleteCompare.TR')"
                  @click="deleteCompareLocalStorage"
                  icon="delete-o"
                />
                <van-cell
                  is-link
                  :title="
                    $t('indexPage.compareList.TR') +
                    '(' +
                    compareList.length +
                    ')'
                  "
                  @click="toCompareList"
                >
                  <template #icon>
                    <i class="iconfont iconplus-listview" />
                  </template>
                </van-cell>
              </div>
            </van-collapse-item>
          </van-collapse>
          <van-cell
            v-show="isVisibleReport"
            title="报告"
            @click="clickToReport"
            is-link
          >
            <template #icon>
              <i class="iconfont iconplus-listview" />
            </template>
          </van-cell>
        </div>
      </van-popup>
    </div>
    <div
      class="compare_icon"
      v-if="!isAddCompare"
      @click.stop="addCompareLocalStorage"
    >
      <van-icon style="font-size: 28px" name="add-o" />
    </div>
    <div class="compare_icon" v-else @click.stop="deleteCompareLocalStorage">
      <van-icon style="font-size: 28px" name="delete-o" />
    </div>
    <div class="backTop" v-show="backtopshow" @click="backTop">
      <div class="iconfont iconfanhuidingbu3"></div>
      <div>{{ $t("indexPage.top.TR") }}</div>
    </div>
  </div>
</template>
 
<script>
import ConstParas from "@/utils/constParas";
import Prop from "./components/Prop.vue"; //属性
import Material from "./components/Material.vue"; //材质
import LXBChart from "./components/LXBChart.vue";
import ZLBChart from "./components/ZLBChart.vue";
import LXBSelectMainPoint from "./components/LXBSelectMainPoint.vue"; //右侧详情顶部参数选型表格 -- 离心泵
import LXBChartPointParas from "./components/LXBChartPointParas.vue"; //右侧详情底部工作点、最有区域表格 -- 离心泵
import Doc from "./components/productDoc.vue"; //文档
import { ImagePreview } from "vant"; //图片预览
import waterMarkHelper from "@/utils/waterMarkHelper";
import model3D from "@/components/model3DContainer.vue";
import languageMixin from "@/mixin/language";
 
import spumpCorpHelper from "@/utils/spumpCorp";
 
export default {
  mixins: [languageMixin],
  data() {
    return {
      active: 0, //tabs 激活页面下标
      m_motorAllowMaxPtDict: null, //不同电机 对应不同最大运行区域点
 
      isAddCompare: false, //是否已经加入比较
      isVisibleReport: false,
      pagetitle: "详情", //当前页面的名称
      pageHeight: 0, //页面高度
      m_chartDiagram: null, //页面图表对象
      isShowLoadingFrm: true, //loading
      propList4Disp: [], //属性列表数据
      propList4DispOld: [], //属性列表数据
      backtopshow: false, //返回顶部按钮是否显示
      images: [],
      PumpStyle: 0, //当前泵的类型 0表示离心泵 1 表示轴流泵
      m_pumpBaseInfo: {},
      isShowSwiperImg: true,
      m_model3dSetting: {
        //三维模型设置
        BimFileLaws: null,
        CurrentViewModelPath: null, //fbx文件
        NextViewModelPath: null, //
        CurrentDsModelPath: null, //rfa文件
        isInitialFinish: false, //是否加载过
        IsHaveDim: false, //是否有尺寸
        LawID: 0,
      },
      mainSetting: {
        featCurve: { tabVisible: true, ctrVisible: true },
        assemFilePart: {
          isShowPictrue: false,
          tabVisible: true,
          ctrVisible: false,
          path: "",
          tabText: "安装图",
        },
        assemFileSys: {
          isShowPictrue: false,
          tabVisible: false,
          ctrVisible: false,
          path: "",
          tabText: "安装图(机组)",
        },
        structFilePart: {
          isShowPictrue: false,
          tabVisible: false,
          ctrVisible: false,
          path: "",
          tabText: "结构图",
        },
        realFilePart: {
          isShowPictrue: false,
          tabVisible: true,
          ctrVisible: false,
          path: "",
        },
        realFileSys: {
          isShowPictrue: false,
          tabVisible: false,
          ctrVisible: false,
          path: "",
        },
        jiezhi: { tabVisible: false, ctrVisible: false, tabText: " " },
        seriesDoc: { tabVisible: true, ctrVisible: false, tabText: "文档" },
 
        material: { tabVisible: false, ctrVisible: false, tabText: " " },
        chartPoint: { tabVisible: true, ctrVisible: true, tabText: " " },
        prop: { tabVisible: true, ctrVisible: false, tabText: " " },
        model3d: { tabVisible: false, ctrVisible: true, tabText: " " },
      },
 
      popupShow: false, //右侧弹出层是否显示
      popupActiveNames: ["1", "2"], //折叠面板展开列表
      collectList: [], //收藏列表
      compareList: [], //比较列表
    };
  },
  components: {
    Prop,
    Material,
    LXBChart,
    ZLBChart,
    LXBSelectMainPoint,
    LXBChartPointParas,
    Doc,
    model3D,
  },
  provide() {
    return {
      //cbRefreshByDp: this.refreshByDp, //给子窗体回调
      cbRefreshByRegionQ: this.refreshRegionByFlow, //给子窗体回调
    };
  },
  created() {
    let height = document.querySelector("body").clientHeight - 80;
    this.pageHeight = height > 0 ? height : 500;
    setTimeout(() => {
      this.images.splice(0, 1);
    }, 1000 * 5);
  },
  computed: {},
  mounted() {
    //判断是否登录
    var userID = this.$store.state.instante.account.UserID;
    var viewPageNumber = this.getPageViewNumber(); //浏览次数
    // if (window.pageConfig.PumpDetailPage.IsMustLogin || viewPageNumber == 0) {
    //   console.log("111")
    //   if (userID == null || userID == 0) {
    //     this.m_isShowLoadingFrm = false;
    //     this.$store.commit(
    //       "instante/account/preLoginPageRoute",
    //       this.$route.fullPath
    //     );
    //     this.$store.dispatch("instante/account/logout");
    //     return;
    //   }
    // }
    //从本地存储读取收藏数据
    let collectList = localStorage.getItem("collectList");
    collectList = collectList != null ? JSON.parse(collectList) : [];
    this.collectList = collectList;
 
    //从本地存储读取比较数据
    let compareList = localStorage.getItem("compareList");
    compareList = compareList != null ? JSON.parse(compareList) : [];
    this.compareList = compareList;
 
    this.isShowSwiperImg = window.pageConfig.PumpDetailPage.isShowSwiperImg;
    // console.log(this.$route.query, 22);
    this.intialPageDetailData();
 
    this.$nextTick(function () {
      //移除滚动事件
      document.removeEventListener("scroll", this.setBackShow, true);
      //添加滚动事件
      document.addEventListener("scroll", this.setBackShow, true);
    });
 
    // console.log(this.$route,344)
  },
  methods: {
    //修改了区域参数的流量(表示单位)
    refreshRegionByFlow(std_unit_flow, tag) {
      //console.log(user_unit_flow,tag,414)
      var _this = this;
      //判断当前是否是离心泵
      if (this.PumpStyle == ConstParas.PumpStyle.LXP) {
        var grp_pt = _this.$refs.lxbChartCtrl.refreshRegionByFlow(
          std_unit_flow,
          tag
        );
        // console.log("refreshRegionByFlow", grp_pt);
        if (grp_pt != null) {
          this.$refs.lxbChartPointParasCtrl.refreshRegionPtParas(grp_pt, tag);
        }
 
        // _this.calcChartPointGrid();
      }
    },
    getPageViewNumber() {
      //获取进入页面的次数
      //console.log(this.$route.fullPath,372)
      let ViewPageNumber = localStorage.getItem("ViewPageNumber");
      //console.log(ViewPageNumber, 300);
      if (ViewPageNumber) {
        if (ViewPageNumber > 0) {
          localStorage.setItem("ViewPageNumber", ViewPageNumber - 1);
        }
      } else {
        localStorage.setItem(
          "ViewPageNumber",
          window.pageConfig.PumpDetailPage.ViewPageNumber - 1
        );
        ViewPageNumber = localStorage.getItem("ViewPageNumber");
      }
      return ViewPageNumber;
    },
    //跳转到我的收藏页面
    toCollectList() {
      this.gotoPage("Collect/Index", "", null);
      // this.$router.push({
      //   path: `/${this.$getCurrentLanguageUrl()}/Collect/Index`
      // });
    },
    //加入收藏
    addCollectLocalStorage() {
      let userID = this.$store.state.instante.account.UserID;
      // if (userID == null || userID == 0) {
      //   this.$store.commit(
      //     "instante/account/preLoginPageRoute",
      //     this.$route.fullPath
      //   );
      //   this.$store.dispatch("instante/account/logout");
      //   return;
      // }
 
      let id = this.$route.query.PID;
      if (id == "") {
        return;
      }
      let collectItem = {
        PumpName: this.pagetitle,
        PID: id,
        SID: this.$route.query.SID,
        from: this.$route.query.from,
        pur: this.$route.query.pur,
      };
      // 获取
      let collectList = localStorage.getItem("collectList");
      collectList = collectList != null ? JSON.parse(collectList) : [];
      // console.log(collectList, 218);
      let ids = collectList.map((item) => {
        return item.PID;
      });
 
      let index = ids.indexOf(id);
      if (index != -1) {
        this.$toast({
          message: `${this.$t("header.collecExists.TR")}`,
          type: "fail",
        });
        return;
      }
      collectList.push(collectItem);
      if (collectList.length > 15) {
        // collectList.splice(0, 1);
      }
      let json = JSON.stringify(collectList);
      //存储
      localStorage.setItem("collectList", json);
      this.collectList = collectList;
      this.$toast({
        message: `${this.$t("header.collectSuccess.TR")}`,
        type: "success",
      });
    },
    //清除收藏
    deleteCollectLocalStorage() {
      this.$dialog
        .confirm({
          message: `${this.$t("header.confirmClearCollect.TR")}`,
        })
        .then(() => {
          localStorage.removeItem("collectList");
          this.collectList = [];
          this.$toast({
            message: `${this.$t("header.clearCollectSueecss.TR")}`,
            type: "success",
          });
        })
        .catch(() => {
          // on cancel
        });
    },
    //跳转比较列表页面
    toCompareList() {
      if (this.compareList.length < 2) {
        this.$toast({
          message: `${this.$t("header.compareTip.TR")}`,
          type: "fail",
        });
        return;
      }
      this.gotoPage("/Compare/Index", "", null);
 
      // this.$router.push({
      //   path: `/${this.$getCurrentLanguageUrl()}/Compare/Index`
      // });
    },
    //加入比较
    addCompareLocalStorage() {
      let userID = this.$store.state.instante.account.UserID;
      // if (userID == null || userID == 0) {
      //   this.$store.commit(
      //     "instante/account/preLoginPageRoute",
      //     this.$route.fullPath
      //   );
      //   this.$store.dispatch("instante/account/logout");
      //   return;
      // }
 
      let id = this.$route.query.PID;
      if (id == "") {
        return;
      }
      this.isAddCompare = true;
      let compareItem = {
        PumpName: this.pagetitle,
        PID: id,
        SID: this.$route.query.SID,
        from: this.$route.query.from,
        pur: this.$route.query.pur,
      };
      // 获取
      let compareList = localStorage.getItem("compareList");
      compareList = compareList != null ? JSON.parse(compareList) : [];
      // console.log(collectList, 218);
      let ids = compareList.map((item) => {
        return item.PID;
      });
 
      let index = ids.indexOf(id);
      if (index != -1) {
        this.$toast({
          message: `${this.$t("header.comparisonAdded.TR")}`,
          type: "fail",
        });
        return;
      }
      compareList.push(compareItem);
      if (compareList.length > 15) {
        // compareList.splice(0, 1);
      }
      let json = JSON.stringify(compareList);
      //存储
      localStorage.setItem("compareList", json);
      this.compareList = compareList;
      this.$toast({
        message: `${this.$t("header.addComparSueecss.TR")}`,
        type: "success",
      });
    },
    //清除比较
    deleteCompareLocalStorage() {
      this.$dialog
        .confirm({
          message: `${this.$t("header.clearComparList.TR")}`,
        })
        .then(() => {
          localStorage.removeItem("compareList");
          this.compareList = [];
          this.isAddCompare = false;
          this.$toast({
            message: `${this.$t("header.clearComparSuccess.TR")}`,
            type: "success",
          });
        })
        .catch(() => {
          // on cancel
        });
    },
 
    deleteCollect(i) {
      //删除单个收藏
      // console.log(i, 97);
      this.$dialog
        .confirm({
          message: `${this.$t("header.confirmDelCollect.TR")}?`,
        })
        .then(() => {
          this.collectList.splice(i, 1);
          let json = JSON.stringify(this.collectList);
          localStorage.setItem("collectList", json);
          this.$toast({
            message: `${this.$t("header.deleteSuccess.TR")}`,
            type: "success",
          });
        })
        .catch(() => {
          // on cancel
        });
    },
    //点击跳转到报告页面
    clickToReport() {
      this.gotoPage("/SelectReport", "", null);
 
      // this.$router.push({
      //   path: `/${this.$getCurrentLanguageUrl()}/SelectReport`
      // });
    },
 
    //获取整个页面初始的详情数据
    intialPageDetailData() {
      // console.log(this.$route.query,242)
      this.m_pageFrom = this.$route.query.from;
      this.m_pagePurpose = this.$route.query.pur;
 
      let _this = this;
      //var config = DetailConfig.detailPageConfig; //详情页面配置文件
 
      var jieZhiParas = {
        ID: 0,
        MiDu: 1000,
        NianDu: 1,
        Name: "water",
        isNdCor: false,
      };
 
      jieZhiParas.ID = this.$route.query.jzid || "0";
      jieZhiParas.MiDu = this.$route.query.jzmd || 1000;
      jieZhiParas.NianDu = this.$route.query.jznd || 1;
      jieZhiParas.Name = this.$route.query.jzmz || "water";
      jieZhiParas.isNdCor = this.$route.query.isndc || false;
 
      _this.jieZhiParas = jieZhiParas;
 
      let requestData = {
        Purpose: this.m_pagePurpose || "",
        SID: this.$route.query.SID || 2,
        PID: this.$route.query.PID || 1,
        SubID: this.$route.query.SubID || "",
 
        DpQ: this.$route.query.DpQ || "",
        DpH: this.$route.query.DpH || "",
        DpQu: this.$route.query.DpQu || "0",
        DpHu: this.$route.query.DpHu || "1",
 
        FirePumpType: this.$route.query.fpt || "0",
        DriveType: "",
        DriveSpeed: "",
        jzID: jieZhiParas.ID || "",
        jzMiDu: jieZhiParas.jzMiDu || "1000",
        jzNianDu: jieZhiParas.jzNianDu || "1",
        jzName: jieZhiParas.jzName || "",
        isNdCor: jieZhiParas.isNdCor || false,
 
        UID: this.$store.state.instante.account.UserID || 0,
        UType: this.$store.state.instante.account.UserType || 0,
        Lang: this.getCurrentLanguageType(),
        // TolGrade: this.$route.query.TGrade || 0,
        // TolRatioMinQ: this.$route.query.TRatioMinQ || 0,
        // TolRatioMaxQ: this.$route.query.TRatioMaxQ || 0,
        // TolRatioMinH: this.$route.query.TRatioMinH || 0,
        // TolRatioMaxH: this.$route.query.TRatioMaxH || 0,
 
        SoftType: this.$globalConfig.SoftType,
        SystemInfo: "",
      };
 
      let url =
        this.$globalConfig.WebApiUrl.MainUrl +
        "v1/Mobile/PumpDetailByPara/InitialInfo";
      //console.log(url,326)
      this.$axios({
        url: url,
        method: "post",
        data: requestData,
      }).then(function (res) {
        _this.isShowLoadingFrm = false;
 
        let resdata = res.data;
        // console.log(res.data, 462);
        if (resdata.Code != 0) {
          _this.$toast.fail(resdata.Message);
          return;
        }
        var pumpInfoData = resdata.Data; //泵详细所有数据
        if (pumpInfoData == null) {
          return;
        }
 
        let pumpBaseInfo = pumpInfoData.BaseInfo;
        if (pumpBaseInfo == null) {
          return;
        }
        //console.log(pumpInfoData, 467);
 
        var pumpBaseInfo_g = {};
        pumpBaseInfo_g.SeriesID = pumpBaseInfo.SeriesID;
        pumpBaseInfo_g.PumpID = pumpBaseInfo.PumpID;
        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.CorpID = pumpBaseInfo.CorpID;
 
        _this.m_pumpBaseInfo = pumpBaseInfo_g;
 
        _this.PumpStyle = pumpBaseInfo.PumpStyle;
        _this.pagetitle = pumpBaseInfo.PumpName;
        document.title = _this.pagetitle;
 
        //三维模型
        _this.m_model3dSetting.BimFileLaws = pumpInfoData.BimFileLaws;
 
        //产品属性
        _this.$refs.propCtrl.setImageFilePath(function (type, file) {
          // console.log(type,file,649)
          _this.setImageFile(type, file);
        });
        _this.$refs.propCtrl.setChangePartPropListCb(function (propList) {
          //修改了产品属性
          _this.setBimFileByChangeProp(propList); //BIM 文件
        });
        _this.$refs.propCtrl.initialData(
          pumpBaseInfo,
          pumpInfoData.PartFullInfo
        );
 
        //
        var attacheList = resdata.Data.AttachFiles;
        if (attacheList.length > 0) {
          //console.log(attacheList,403)
          _this.mainSetting.seriesDoc.tabVisible = true;
          _this.mainSetting.seriesDoc.ctrVisible = true;
          _this.$refs.docCtrl.initAttachFiles(
            attacheList,
            pumpBaseInfo.SeriesID
          );
          _this.$refs.docCtrl.getSeriesID(pumpBaseInfo.SeriesID);
        } else {
          _this.mainSetting.seriesDoc.tabVisible = false;
          _this.mainSetting.seriesDoc.ctrVisible = false;
        }
 
        //材料
        var allMaterialGrpList = pumpInfoData.MaterialGrpList;
        if (allMaterialGrpList && allMaterialGrpList.length > 0) {
          _this.mainSetting.material.tabVisible = true;
          _this.$nextTick(function () {
            _this.$refs.materialCtrl.initialData(allMaterialGrpList);
          });
        } else {
          _this.mainSetting.material.tabVisible = false;
        }
        //图表控件
        if (pumpBaseInfo.PumpStyle == ConstParas.PumpStyle.LXP) {
          //  _this.m_motorAllowMaxPtDict =
          //    pumpInfoData.ChartPointPara.MotorAllowMaxPtDict;
 
          _this.m_motorAllowMaxPtDict =
            pumpInfoData.ChartPointPara.MotorAllowMaxPtDict;
 
          //判断当前是否是离心泵
          _this.$refs.lxbChartCtrl.initPumpInfoData(pumpInfoData);
          _this.$refs.lxbSelectPointCtrl.initPumpInfoData(pumpInfoData);
          _this.$refs.lxbChartPointParasCtrl.initPumpInfoData(pumpInfoData);
        } else if (pumpBaseInfo.PumpStyle == ConstParas.PumpStyle.ZLP) {
          //判断当前是否是轴流泵
          //console.log( _this.$refs.zlbChartCtrl);
          _this.$refs.zlbChartCtrl.initPumpInfoData(pumpInfoData);
        }
      });
    },
    //子组件 修改设计点 刷新页面
    refreshByDp(designPointParas) {
      //console.log(designPointParas, 673);
      if (designPointParas == null) return;
      if (designPointParas.DpQ == null) return;
      if (designPointParas.DpH == null) return;
 
      let UserType = this.$store.state.instante.account.UserType;
      let UserID = this.$store.state.instante.account.UserID;
 
      let _this = this;
 
      //console.log(_this, 275);
 
      let requestData = {
        SID: _this.m_pumpBaseInfo.SeriesID,
        PID: _this.m_pumpBaseInfo.PumpID,
        SubID: _this.m_pumpBaseInfo.SubID,
 
        DpQ: designPointParas.DpQ,
        DpH: designPointParas.DpH,
        DpQu: designPointParas.DpQu,
        DpHu: designPointParas.DpHu,
 
        jzID: _this.jieZhiParas.jzID || "0",
        jzMiDu: _this.jieZhiParas.jzMiDu || "1000",
        jzNianDu: _this.jieZhiParas.jzNianDu || "1",
        jzName: _this.jieZhiParas.jzName || "",
        isNdCor: _this.jieZhiParas.isNdCor || false,
 
        FirePumpType: _this.m_pumpBaseInfo.FirePumpType || "0",
 
        DriveType: _this.m_pumpBaseInfo.DriveType || "", //驱动方式
        DriveSpeed: _this.m_pumpBaseInfo.DriveSpeed || "", //柴油机转速
 
        UID: UserID,
        UType: UserType,
        Lang: _this.getCurrentLanguageType(),
      };
      //console.log(requestData)
      let url =
        this.$globalConfig.WebApiUrl.MainUrl +
        "v1/Mobile/PumpDetailByPara/CalcByDp";
 
      _this.m_isShowLoadingFrm = true;
      this.$axios({
        url: url,
        method: "post",
        data: requestData,
      }).then(function (res) {
        _this.m_isShowLoadingFrm = false;
 
        let resdata = res.data;
        if (resdata.Code != 0) {
          _this.$message(resdata.Message);
          return;
        }
 
        let pumpInfoData = resdata.Data;
        if (pumpInfoData == null) {
          _this.$message("error:684");
          return;
        }
 
        if (pumpInfoData.ChartPointPara) {
          _this.m_motorAllowMaxPtDict =
            pumpInfoData.ChartPointPara.MotorAllowMaxPtDict;
        }
        //获取数据后调用离心泵图表组件的方法重新绘制图表
        if (_this.PumpStyle == ConstParas.PumpStyle.LXP) {
          //  console.log(pumpInfoData, "刷新后的数据");
          _this.$refs.lxbChartCtrl.refreshByDp(pumpInfoData);
          _this.$refs.lxbSelectPointCtrl.refreshPumpInfoData(pumpInfoData);
          _this.$refs.lxbChartPointParasCtrl.refreshPumpInfoData(pumpInfoData);
        }
        //获取数据后调用离心泵图表组件的方法重新绘制图表
        else if (_this.PumpStyle == ConstParas.PumpStyle.ZLP) {
          //  console.log(pumpInfoData, "刷新后的数据");
          _this.$refs.zlbChartCtrl.refreshByDp(pumpInfoData);
          _this.$refs.zlbSelectPointCtrl.refreshPumpInfoData(pumpInfoData);
          _this.$refs.zlbChartPointParasCtrl.refreshPumpInfoData(pumpInfoData);
        }
      });
    },
    //修改参数选型电机功率下拉的值
    cbChangeMotorPowerInMainGrid(val) {
      // console.log(val,762)
      if (this.PumpStyle == ConstParas.PumpStyle.LXP) {
        //通知属性
        this.$refs.propCtrl.setMotorPowerValue(val);
        if (this.m_motorAllowMaxPtDict != null) {
          var allowMaxPointQ = this.m_motorAllowMaxPtDict[val];
          if (allowMaxPointQ != null) {
            /*var userUnit_flow =
              this.$refs.lxbChartCtrl.convertFlowToUserUnit(allowMaxPointQ);*/
            this.refreshRegionByFlow(allowMaxPointQ, "AllowMaxPointQ");
          }
        }
      }
      if (this.PumpStyle == ConstParas.PumpStyle.ZLP) {
        //通知属性
        this.$refs.propCtrl.setMotorPowerValue(val);
 
        if (this.m_motorAllowMaxPtDict != null) {
          var allowMaxPointQ = this.m_motorAllowMaxPtDict[val];
          if (allowMaxPointQ != null) {
            /*var userUnit_flow =
              this.$refs.lxbChartCtrl.convertFlowToUserUnit(allowMaxPointQ);*/
            this.refreshRegionByFlow(allowMaxPointQ, "AllowMaxPointQ");
          }
        }
      }
    },
    //修改查询状态(给子控件调用)
    cbChangeChartQueryStatus(val) {
      if (this.PumpStyle == ConstParas.PumpStyle.LXP) {
        this.$refs.lxbChartPointParasCtrl.setChartQueryStatus(val);
      }
    },
    //修改查询值(给子控件调用)
    cbChangeChartQueryData(val) {
      if (this.PumpStyle == ConstParas.PumpStyle.LXP) {
        this.$refs.lxbSelectPointCtrl.buildChartQueryData(val);
      }
    },
    //设置BIM文件
    setBimFileByChangeProp(propList) {
      var bimFileLaws = this.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 = this.BuildBimFilePath(
        propList,
        ok_bimFileLaw.FileLaw4View
      );
      var ds_file_path = this.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) this.m_model3dSetting.IsHaveDim = false;
      else this.m_model3dSetting.IsHaveDim = isHaveDim;
      this.m_model3dSetting.LawID = ok_bimFileLaw.ID;
      this.m_model3dSetting.NextViewModelPath =
        spumpCorpHelper.buildSeriesFileUrl(
          this.m_pumpBaseInfo.SeriesID,
          "/BIM/" + view_file_path
        );
 
      if (ds_file_path) {
        if (!ds_file_path.endsWith(".rfa")) {
          ds_file_path = ds_file_path + ".rfa";
        }
        this.m_model3dSetting.CurrentDsModelPath =
          spumpCorpHelper.buildSeriesFileUrl(
            this.m_pumpBaseInfo.SeriesID,
            "/BIM/" + ds_file_path
          );
      } else {
        this.m_model3dSetting.CurrentDsModelPath = null;
      }
 
      this.mainSetting.model3d.tabVisible = true;
      if (this.mainSetting.model3d.ctrVisible) this.loadModel3DFile();
    },
    //模型组件内点击下载按钮调用函数
    downloadModel3D() {
      var _this = this;
      let FilePath = _this.m_model3dSetting.CurrentDsModelPath;
      if (FilePath == null) return false;
      var userID = this.$store.state.instante.account.UserID;
      var userType = this.$store.state.instante.account.UserType;
 
      if (userID == null || userID == 0) {
        this.gotoLoginPage();
        return;
      }
      //
      //if (userType != ConstParas.UserType.Employee) {
      this.$message("你没有下载权限,请联系 管理员 开通权限后下载");
      return;
      // }
 
      // let a = document.createElement("a"); // 生成一个a元素
      // let event = new MouseEvent("click"); // 创建一个单击事件
      // a.href = FilePath; // 将生成的URL设置为a.href属性
      // a.dispatchEvent(event); // 触发a的单击事件
    },
    //构建BIM路径
    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 && this.m_pumpBaseInfo.PumpName) {
          //产品型号
          var pumpName = this.m_pumpBaseInfo.PumpName.replace("/", "-")
            .replace("\\", "-")
            .replace("*", "-");
          fileName_law += pumpName;
          if (fileLawList.length > 1) {
            fileName_law += this.GetFilePrefix(law);
          }
        }
        if (law.ItemType == 2 && this.m_pumpBaseInfo.PartNO) {
          //产品编号
          fileName_law += this.m_pumpBaseInfo.PartNO;
          if (fileLawList.length > 1) {
            fileName_law += this.GetFilePrefix(law);
          }
        }
        if (law.ItemType == 3 && this.m_pumpBaseInfo.PartCode) {
          //产品图号
          fileName_law += this.m_pumpBaseInfo.PartCode;
          if (fileLawList.length > 1) {
            fileName_law += this.GetFilePrefix(law);
          }
        }
        if (law.ItemType == 4) {
          //固定
          if (law.CodeLawList != null && law.CodeLawList.length > 0) {
            fileName_law += law.CodeLawList[0].Key;
            fileName_law += this.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;
    },
    //
    GetFilePrefix(law) {
      var FilePrefix = law.FilePrefix;
      if (FilePrefix == "\\") return "/";
      else return FilePrefix;
    },
    //设置图片
    setImageFile(type, file) {
      //
      if (type == "AssemImagePart") {
        if (file) {
          this.mainSetting.assemFilePart.tabVisible = true;
          //console.log(file)
          waterMarkHelper.addImage(file, null, (base64Url) => {
            this.mainSetting.assemFilePart.path = base64Url;
          });
        }
      }
      if (type == "AssemImageSys") {
        if (file) {
          this.mainSetting.assemFileSys.tabVisible = true;
          waterMarkHelper.addImage(file, null, (base64Url) => {
            this.mainSetting.assemFileSys.path = base64Url;
          });
        } else {
          this.mainSetting.assemFileSys.tabVisible = false;
        }
      }
      if (type == "RealImagePart") {
        if (file) {
          //this.mainSetting.realFilePart.path = file;
          waterMarkHelper.addImage(file, null, (base64Url) => {
            this.mainSetting.realFilePart.path = base64Url;
          });
        }
      }
      if (type == "StructImagePart") {
        if (file) {
          // this.mainSetting.structFilePart.path = file;
          waterMarkHelper.addImage(file, null, (base64Url) => {
            this.mainSetting.structFilePart.path = base64Url;
          });
        }
      }
    },
    //加载三维模型
    loadModel3DFile() {
      let _this = this;
      var model3dSetting = this.m_model3dSetting;
      if (
        model3dSetting.CurrentViewModelPath == model3dSetting.NextViewModelPath
      )
        return;
      model3dSetting.CurrentViewModelPath = model3dSetting.NextViewModelPath;
      //console.log(model3dSetting.CurrentViewModelPath)
      this.m_model3dSetting = model3dSetting;
 
      if (this.m_model3dSetting.isInitialFinish == false) {
        //下载三维模型
        _this.$refs.model3dCtrl.setLoadModelCommandCb(function () {
          return _this.downloadModel3D();
        });
      }
      /*const loading = _this.$loading({
        target: document.querySelector("body"),
        lock: true,
        background: "rgba(0, 0, 0, 0.7)",
      });*/
 
      //加载三维模型
      this.$refs.model3dCtrl.loadModel(
        model3dSetting.CurrentViewModelPath,
        true,
        function (val) {
          // console.log(val);
          _this.mainSetting.model3d.isInitialFinish = true; //
          //loading.close();
          var corp_api_url = spumpCorpHelper.getCorpMainApiRurl(
            _this.m_pumpBaseInfo.CorpID
          );
          if (corp_api_url == null) {
            return;
          }
          var corp_sei_id = spumpCorpHelper.getIdByCSID(
            _this.m_pumpBaseInfo.SeriesID
          );
          if (corp_sei_id == null) {
            //loading_frm.close();
            return;
          }
 
          if (model3dSetting.IsHaveDim && model3dSetting.LawID > 0) {
            //console.log(corp_api_url + "v1/ModelLibrary/GetProductDimList");
            let fileName = _this.m_pumpBaseInfo.PumpName.replace("/", "-");
            _this
              .$axios({
                url: corp_api_url + "v1/ModelLibrary/GetProductDimList",
                method: "get",
                params: {
                  SeriesID: corp_sei_id.SeriesID,
                  LawID: model3dSetting.LawID,
                  FileName: fileName,
                  Lang: 0,
                },
              })
              .then((res) => {
                //
                if (res.data.Code != 0) {
                  _this.$refs.model3dCtrl.setDimDisplay(false);
                  _this.$message(res.data.Message);
                  return;
                }
 
                _this.$refs.model3dCtrl.updateSizeValue(res.data.Data);
                _this.$refs.model3dCtrl.setDimDisplay(true);
              })
              .catch((err) => {
                console.log("校验失败");
                return;
              });
          }
        }
      );
    },
 
    //图片预览
    previewImg(path) {
      // console.log(path,439)
      let imgViewList = [];
      imgViewList.push(path);
      ImagePreview({ images: imgViewList, closeable: true });
    },
    //返回上一页
    pageBack() {
      let routerPath = this.$route.query;
      // console.log(routerPath, 783);
      this.$router.go(-1);
    },
    setBackShow() {
      if (this.$refs.pagebox) {
        let top = this.$refs.pagebox.getBoundingClientRect().top;
        // console.log(top)
        if (top < -700) {
          this.backtopshow = true;
        } else {
          this.backtopshow = false;
        }
      }
    },
    backTop() {
      let timer = setInterval(function () {
        //获取滚动条的滚动高度
        var osTop =
          document.documentElement.scrollTop || document.body.scrollTop;
        //用于设置速度差,产生缓动的效果
        var speed = Math.floor(-osTop / 6);
        document.documentElement.scrollTop = document.body.scrollTop =
          osTop + speed;
        // let isTop = true; //用于阻止滚动事件清除定时器
        if (osTop == 0) {
          clearInterval(timer);
        }
      }, 30);
    },
  },
  watch: {
    $route(to, from) {
      // console.log(to, from, 714);
      if (to.fullPath != from.fullPath) {
        this.$router.go(0);
      }
    },
  },
};
</script>
 
<style lang="scss">
.DetailByParamsBox {
  background: #ebedf0;
  width: 100%;
  height: 100vh;
  .DetailByParamsMain {
    width: 100%;
    height: 100%;
    padding-top: 46px;
    box-sizing: border-box;
    .swipe_box {
      height: 250px;
      width: 100%;
      .van-image {
        height: 100%;
        width: 100%;
      }
      .picture_swiper {
        height: 100%;
        width: 100%;
        img {
          height: 100%;
          width: 100%;
        }
      }
    }
    .van-image__error,
    .van-image__loading {
      background: #fff;
    }
    .van-tabs__content {
      background: #ebedf0;
    }
 
    .van-tab__panel,
    .van-tab__panel-wrapper {
      margin: 10px;
      border: 1px solid #ccc;
      width: calc(100% - 20px);
      background-color: #fff;
      border-radius: 10px;
      padding: 5px;
    }
 
    .custom_table {
      border: 1px solid #cecece;
    }
 
    .custom_table > thead > tr > th {
      border: 1px solid #cecece;
      height: 30px;
      text-align: center;
      background-color: #f7f7f7;
    }
 
    .custom_table > tbody > tr > td {
      border: 1px solid #cecece;
      height: 30px;
      text-align: center;
    }
 
    .kuaiDiv {
      position: relative;
      width: 100%;
      border-top: 1px solid #ccc;
      padding: 0px;
      margin-bottom: 10px;
    }
    .kuaiDiv:first-of-type {
      border-top: 0px;
    }
    .chanPinTitle {
      margin-bottom: 0;
      margin-top: 0;
      padding: 4px;
      position: absolute;
      // border-top: 1px solid #ccc;
      padding-left: 10px;
      font-family: "Open Sans", sans-serif;
      font-weight: 600;
    }
    .chanPinDiv {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 100%;
      margin: 5px 0;
      padding: 0;
      font-weight: 500;
    }
    .chanPinContent {
      font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
      font-weight: 500;
      font-size: 14px;
      padding-left: 20px;
      line-height: 20px;
      .van-cell {
        padding: 0;
        line-height: 18px;
      }
    }
  }
  .backTop {
    position: fixed;
    width: 50px;
    height: 50px;
    right: 10px;
    bottom: 30px;
    border-radius: 100%;
    text-align: center;
    background-color: #fff;
  }
 
  .backTop > div:first-of-type {
    height: 25px;
    font-size: 28px;
    text-align: center;
  }
 
  .backTop > div:last-of-type {
    height: 20px;
    line-height: 18px;
    font-size: 10px;
    text-align: center;
  }
  .slider-title {
    position: absolute;
    line-height: 30px;
    font-size: 14px;
    background: #528abe;
    color: #ffffff;
    z-index: 10;
    bottom: 0px;
    margin: 0px;
    width: 100%;
    text-align: start;
    opacity: 0.6;
  }
  .compare_icon {
    position: fixed;
    right: 15px;
    font-size: 22px;
    bottom: 215px;
    width: 40px;
    height: 40px;
    color: #ffffff;
    border-radius: 50%;
    line-height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0.6;
  }
}
.DetailByParamsBox .DetailByParamsMain .van-tab__pane {
  margin: 10px;
  border: 1px solid #ccc;
  width: calc(100% - 20px);
  background-color: #fff;
  border-radius: 10px;
  padding: 5px;
}
</style>