openatc-components 0.0.102 → 0.0.103

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/package/kisscomps/components/BoardCard/BoardCard.vue +6 -1
  2. package/package/kisscomps/components/Channelization/Channelization.vue +13 -10
  3. package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +18 -12
  4. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +54 -69
  5. package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +1 -4
  6. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +11 -34
  7. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +1 -26
  8. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +18 -37
  9. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +6 -0
  10. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +28 -50
  11. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +29 -53
  12. package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +1 -4
  13. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +147 -130
  14. package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +5 -6
  15. package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +43 -144
  16. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +8 -52
  17. package/package/kisscomps/components/KanBan/kanban.vue +7 -7
  18. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +153 -38
  19. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +16 -0
  20. package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +190 -0
  21. package/package/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -0
  22. package/package/kisscomps/components/StageStatus/StageStatus.vue +6 -2
  23. package/package/kisscomps/components/patternList/patternList.vue +5 -0
  24. package/package/kisscomps/index.js +2 -0
  25. package/package/kissui.min.js +1 -1
  26. package/package.json +13 -12
  27. package/src/i18n/language/en.js +32 -7
  28. package/src/i18n/language/zh.js +31 -6
  29. package/src/kisscomps/components/BoardCard/BoardCard.vue +6 -1
  30. package/src/kisscomps/components/Channelization/Channelization.vue +13 -10
  31. package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +18 -12
  32. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +54 -69
  33. package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +1 -4
  34. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +11 -34
  35. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +1 -26
  36. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +18 -37
  37. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +6 -0
  38. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +28 -50
  39. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +29 -53
  40. package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +1 -4
  41. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +147 -130
  42. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +5 -6
  43. package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +43 -144
  44. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +191 -0
  45. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +331 -0
  46. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +8 -52
  47. package/src/kisscomps/components/KanBan/kanban.vue +7 -7
  48. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +153 -38
  49. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +16 -0
  50. package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +190 -0
  51. package/src/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -0
  52. package/src/kisscomps/components/StageStatus/StageStatus.vue +6 -2
  53. package/src/kisscomps/components/patternList/patternList.vue +5 -0
  54. package/src/kisscomps/index.js +2 -0
  55. package/src/router/index.js +2 -2
  56. package/src/views/intersection.vue +5 -3
  57. package/static/styles/channelizatioon.scss +2 -40
  58. package/static/styles/schemeconfig.scss +52 -0
  59. package/package/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +0 -113
  60. package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +0 -113
@@ -12,7 +12,7 @@
12
12
  <!--渠化绘制功能-->
13
13
  <template>
14
14
  <div class="custom-cross" v-if="visible">
15
- <ImportDialog ref="importDialog" @loadSvgString="loadSvgString" @loadMapSize="loadMapSize" />
15
+ <ImportDialog ref="importDialog" @loadSvgString="loadSvgString"/>
16
16
  <Messagebox :visible="canclesettingvisible" :text="$t('openatccomponents.channelizationmap.canclesetting')" @cancle="cancleSetting" @ok="completeSetting"/>
17
17
  <div class="custom-main" ref="custommain">
18
18
  <div class="custom-group drawPanelAnimation" ref="customGroup">
@@ -26,8 +26,6 @@
26
26
  :disabled="!isSeletable"
27
27
  @click="clickOpen"
28
28
  >{{$t('openatccomponents.channelizationmap.againimport')}}</el-button>
29
- <i class="lock-map el-icon-unlock" v-if="isLockedCrossMap" @click="handleLockCrossMap()"></i>
30
- <i class="lock-map el-icon-lock" v-if="!isLockedCrossMap" @click="handleLockCrossMap()"></i>
31
29
  </div>
32
30
 
33
31
  <div class="draw-to-sketchpad">
@@ -55,6 +53,17 @@
55
53
  </div>
56
54
  <!-- 画板区域 -->
57
55
  <div class="sketchpad-area" id="sketchpadgroup" ref="sketchpadgroup">
56
+ <!-- <drr
57
+ id="sketchpadArea"
58
+ :resizable="false"
59
+ :x="allitem.x"
60
+ :y="allitem.y"
61
+ :w="allitem.w"
62
+ :h="allitem.h"
63
+ :angle="allitem.angle"
64
+ :selectable="false"
65
+ :aspectRatio="true"
66
+ > -->
58
67
  <ChannelizationElements
59
68
  id="channelizationElements"
60
69
  :allitem="allitem"
@@ -77,8 +86,8 @@
77
86
  :DetectorChart="DetectorChart"
78
87
  :CurChooseIcon="curChooseIcon"
79
88
  @changeDetectorChartItem="changeDetectorChartItem"
80
- :isLockedCrossMap="isLockedCrossMap"
81
89
  />
90
+ <!-- </drr> -->
82
91
  </div>
83
92
  <div class="draw-end-function">
84
93
  <el-button type="primary" @click="handleReset()">{{$t('openatccomponents.button.reset')}}</el-button>
@@ -94,7 +103,6 @@
94
103
  @handleChooseDire="handleChooseDire"
95
104
  @handleChoosePed="handleChoosePed"
96
105
  @deleteItem="deleteItem"
97
- @cloneItem="cloneItem"
98
106
  @changeIconDataByType="changeIconDataByType"
99
107
  @handleDisassociatePhase="handleDisassociatePhase"
100
108
  />
@@ -147,6 +155,8 @@ export default {
147
155
  ...mapState({
148
156
  phaseList: state => state.globalParam.tscParam.phaseList,
149
157
  PhaseDataMgr: state => state.globalParam.PhaseDataMgr
158
+ // ,curBodyWidth: state => state.globalParam.curBodyWidth
159
+ // ,curOpenatcAgentid: state => state.globalParam.curOpenatcAgentid
150
160
  })
151
161
  },
152
162
  props: {
@@ -159,6 +169,21 @@ export default {
159
169
  }
160
170
  },
161
171
  watch: {
172
+ // curBodyWidth: {
173
+ // handler: function (oldval, newval) {
174
+ // if (newval !== oldval) {
175
+ // this.resizePanelWidth(newval)
176
+ // }
177
+ // }
178
+ // },
179
+ // sidebar: {
180
+ // handler: function (oldval, newval) {
181
+ // setTimeout(() => {
182
+ // this.resizePanelWidth(this.curBodyWidth)
183
+ // }, 200)
184
+ // },
185
+ // deep: true
186
+ // },
162
187
  AgentId: {
163
188
  handler: function (val) {
164
189
  // 平台设备切换时,清空上一个渠化配置
@@ -183,8 +208,8 @@ export default {
183
208
  index: 0,
184
209
  motorid: 1, // 车道id
185
210
  pedid: 1, // 人行道id
186
- detectorcoilid: 1, // 检测器线圈id(非关联检测器id)
187
211
  Motorways: [], // 管理所有自定义机动车图标数据
212
+ // Bicyclelanes: [], // 非机动车图标数据
188
213
  customlist: [], // 所有自定义的图标列表
189
214
  Texts: [], // 管理所有自定义文字数据
190
215
  Pedwalk: [], // 管理所有人行横道
@@ -199,19 +224,11 @@ export default {
199
224
  pedH: 22,
200
225
  MapW: 800,
201
226
  MapH: 200,
202
- detectorW: 20,
203
- detectorH: 20,
227
+ detectorW: 30,
228
+ detectorH: 30,
204
229
  detectorchartW: 70,
205
230
  detectorchartH: 100,
206
- isLockedCrossMap: true, // 底图是否是锁定状态
207
231
  CrossMapData: {
208
- index: -2,
209
- icontype: 'crossmap',
210
- x: 400,
211
- y: 100,
212
- w: 800,
213
- h: 200,
214
- angle: 0,
215
232
  svgstr: '',
216
233
  imgfilesrc: ''
217
234
  }, // 管理底图数据
@@ -241,7 +258,7 @@ export default {
241
258
  pointchange: false, // 控制选中时光标样式
242
259
  CrossMapVisible: true, // 控制底图显示隐藏
243
260
 
244
- curChooseIconIndex: -1, // 底图暂用-2代替,别的图标与递增的index相关
261
+ curChooseIconIndex: -1,
245
262
  curChooseIcon: {},
246
263
  editBtnGroup: [
247
264
  {
@@ -251,6 +268,13 @@ export default {
251
268
  width: '16px',
252
269
  height: '16px'
253
270
  },
271
+ // {
272
+ // label: this.$t('openatccomponents.channelizationmap.bicyclelane'),
273
+ // type: 'bicyclelane',
274
+ // active: false,
275
+ // width: '7px',
276
+ // height: '16px'
277
+ // },
254
278
  {
255
279
  label: this.$t('openatccomponents.channelizationmap.pedcrossing'),
256
280
  type: 'pedcrossing',
@@ -292,6 +316,7 @@ export default {
292
316
  // 改变鼠标样式
293
317
  changeMouse () {
294
318
  if (!this.isSeletable) return
319
+ // document.getElementById('sketchpadArea').style.cursor = 'url(resource/pic/icons/magnifier3.cur) 12 12,crosshair'
295
320
  document.getElementById('sketchpadArea').style.cursor =
296
321
  'url(resource/pic/icons/magnifier3.cur) 12 12,pointer'
297
322
  this.pointchange = true
@@ -321,8 +346,6 @@ export default {
321
346
  case 'detector':
322
347
  this.changeDetectorItem(iconObj, changefield)
323
348
  break
324
- case 'crossmap':
325
- this.changeCrossMap(iconObj, changefield)
326
349
  }
327
350
  console.log('this.customlist', this.customlist)
328
351
  },
@@ -402,13 +425,9 @@ export default {
402
425
  },
403
426
 
404
427
  // 选中图标
405
- handleSelectIcon (iconobj, isCrossMap) {
428
+ handleSelectIcon (iconobj) {
406
429
  // console.log('选中的图标', iconobj)
407
- if (isCrossMap === 'crossmap') {
408
- this.curChooseIconIndex = -2
409
- } else {
410
- this.curChooseIconIndex = iconobj.index
411
- }
430
+ this.curChooseIconIndex = iconobj.index
412
431
  this.curChooseIcon = JSON.parse(JSON.stringify(iconobj))
413
432
  },
414
433
  // 根据多选的车道,修改车道图标
@@ -427,6 +446,7 @@ export default {
427
446
  'icondirename'
428
447
  ])
429
448
  }
449
+ console.log(this.curChooseIcon)
430
450
  },
431
451
 
432
452
  addPedwalkIcon () {
@@ -501,9 +521,8 @@ export default {
501
521
 
502
522
  addAllDetector () {
503
523
  // 统计图暂留
504
- this.addDetector()
505
524
  // this.addDetectorChart()
506
- this.detectorcoilid = this.increaseId(this.Detector, 'id')
525
+ this.addDetector()
507
526
  },
508
527
  addDetector () {
509
528
  let defaultDetectorParam = {
@@ -513,18 +532,16 @@ export default {
513
532
  h: this.detectorH,
514
533
  angle: 0
515
534
  }
516
- this.detectorW = 20
517
- this.detectorH = 20
535
+ this.detectorW = 30
536
+ this.detectorH = 30
518
537
  let detectoritem = {
519
538
  index: this.index,
520
- id: this.detectorcoilid,
521
539
  icontype: 'detector',
522
540
  detailtype: 'detector',
523
541
  detectortype: 1, // 检测器类型: 1 车辆检测器 2 行人检测器
524
542
  detectorid: undefined,
525
543
  occupancythreshold: 80,
526
- minflowsaturationthreshold: 30,
527
- maxflowsaturationthreshold: 70,
544
+ flowsaturationthreshold: 20,
528
545
  ...defaultDetectorParam
529
546
  }
530
547
  this.curChooseIconIndex = detectoritem.index
@@ -549,7 +566,6 @@ export default {
549
566
  this.detectorchartH = 100
550
567
  let detectoritem = {
551
568
  index: this.index,
552
- id: this.detectorcoilid,
553
569
  icontype: 'detector',
554
570
  detailtype: 'detectorChart',
555
571
  ...defaultDetectorParam
@@ -605,109 +621,57 @@ export default {
605
621
  },
606
622
  deleteItem (row) {
607
623
  let index = row.index
608
- // let id = row.id
609
624
  this.customlist = this.customlist.filter(ele => ele.index !== index)
610
625
  switch (row.icontype) {
611
- // case 'text':
612
- // this.Texts = this.Texts.filter(ele => ele.index !== index)
613
- // break
626
+ case 'text':
627
+ this.Texts = this.Texts.filter(ele => ele.index !== index)
628
+ break
614
629
  case 'vehile':
615
630
  this.Motorways = this.Motorways.filter(ele => ele.index !== index)
616
- this.motorid = this.increaseId(this.Motorways, 'id')
617
631
  break
618
632
  case 'ped':
619
633
  this.Pedwalk = this.Pedwalk.filter(ele => ele.index !== index)
620
- this.pedid = this.increaseId(this.Pedwalk, 'id')
621
634
  break
622
635
  case 'countdown':
623
636
  this.Countdown = this.Countdown.filter(ele => ele.index !== index)
624
637
  break
625
638
  case 'detector':
626
639
  this.Detector = this.Detector.filter(ele => ele.index !== index)
627
- // this.DetectorChart = this.DetectorChart.filter(ele => ele.id !== id)
628
- this.detectorcoilid = this.increaseId(this.Detector, 'id')
640
+ this.DetectorChart = this.DetectorChart.filter(ele => ele.index !== index)
629
641
  }
630
642
  this.curChooseIconIndex = -1
631
643
  this.curChooseIcon = {}
632
644
  },
633
- cloneItem (row) {
634
- // 克隆元素
635
- let cloneObj = {
636
- ...row,
637
- index: this.index,
638
- x: 435,
639
- y: 325
640
- }
641
- switch (row.icontype) {
642
- case 'vehile':
643
- cloneObj.id = this.motorid
644
- this.Motorways.push(cloneObj)
645
- this.motorid = this.increaseId(this.Motorways, 'id')
646
- this.customlist.push(cloneObj)
647
- break
648
- case 'ped':
649
- cloneObj.id = this.pedid
650
- this.Pedwalk.push(cloneObj)
651
- this.pedid = this.increaseId(this.Pedwalk, 'id')
652
- this.customlist.push(cloneObj)
653
- break
654
- // case 'countdown':
655
- // this.Countdown.push(cloneObj)
656
- // this.customlist.push(cloneObj)
657
- // break
658
- case 'detector':
659
- cloneObj.id = this.detectorcoilid
660
- this.Detector.push(cloneObj)
661
- this.customlist.push(cloneObj)
662
- // 同时克隆统计图
663
- // this.index = this.increaseId(this.customlist, 'index')
664
- // let curchartobj = JSON.parse(JSON.stringify(this.DetectorChart)).filter(ele => ele.id === row.id)[0]
665
- // curchartobj.index = this.index
666
- // curchartobj.id = this.detectorcoilid
667
- // curchartobj.x = 435
668
- // curchartobj.y = 325 - 100
669
- // this.DetectorChart.push(curchartobj)
670
- // this.customlist.push(curchartobj)
671
- this.detectorcoilid = this.increaseId(this.Detector, 'id')
672
- }
673
- this.curChooseIconIndex = this.index
674
- this.curChooseIcon = JSON.parse(JSON.stringify(cloneObj))
675
- this.index = this.increaseId(this.customlist, 'index')
676
- },
677
645
 
678
646
  loadSvgString (type, imgstr) {
679
647
  // 加载用户上传的底图svg字符串
680
648
  if (type === 'vectorgraph') {
681
649
  // 导入矢量图
682
- // this.getCrossMapViewbox(imgstr)
650
+ this.getCrossMapViewbox(imgstr)
651
+ let defaultCrossMapParam = {
652
+ x: this.MapW / 2,
653
+ y: this.MapH / 2,
654
+ w: this.MapW,
655
+ h: this.MapH,
656
+ angle: 0
657
+ }
658
+ // (由于底图采用定位,导致脱离标准流,父元素高度塌陷,此处需要重新设置父元素高度,以防底图超出弹窗边界)
659
+ // this.$refs.crossmap.style.height = this.MapH
660
+ // this.$refs.crossmap.style.width = this.MapW
683
661
  this.CrossMapData = {
684
- ...this.CrossMapData,
685
662
  type,
686
- svgstr: imgstr
663
+ svgstr: imgstr,
664
+ ...defaultCrossMapParam
687
665
  }
688
666
  }
689
667
  if (type === 'picture') {
690
668
  // 导入图片
691
669
  this.CrossMapData = {
692
- ...this.CrossMapData,
693
670
  type,
694
671
  imgfilesrc: imgstr
695
672
  }
696
673
  }
697
674
  },
698
- loadMapSize (type, mapsize) {
699
- this.CrossMapData = {
700
- ...this.CrossMapData,
701
- angle: 0,
702
- x: Math.round(mapsize.width / 2),
703
- y: Math.round(mapsize.height / 2),
704
- w: Math.round(mapsize.width),
705
- h: Math.round(mapsize.height)
706
- }
707
- this.MapW = mapsize.width
708
- this.MapH = mapsize.height
709
- },
710
-
711
675
  getCrossMapViewbox (svgstr) {
712
676
  // 获取户上传svg的viewBox属性的大小
713
677
  let arr = svgstr.split('"')
@@ -737,13 +701,6 @@ export default {
737
701
  this.Detector = []
738
702
  this.DetectorChart = []
739
703
  this.CrossMapData = {
740
- index: -2, // 暂定为-2,用于复用图标判断逻辑
741
- icontype: 'crossmap',
742
- x: this.MapW / 2,
743
- y: this.MapH / 2,
744
- w: this.MapW,
745
- h: this.MapH,
746
- angle: 0,
747
704
  svgstr: '',
748
705
  imgfilesrc: ''
749
706
  }
@@ -772,7 +729,7 @@ export default {
772
729
  temp[item.icontype] = [item]
773
730
  }
774
731
  }
775
- if (this.CrossMapData.svgstr !== '' || this.CrossMapData.imgfilesrc !== '') {
732
+ if (this.CrossMapData.svgstr !== '') {
776
733
  temp.crossMap = this.CrossMapData
777
734
  }
778
735
  this.saveChannelizatonChart(temp)
@@ -780,6 +737,8 @@ export default {
780
737
  // 加载
781
738
  load (type) {
782
739
  this.curChooseIconIndex = -1
740
+ // this.getChannelizatonChart().then((channelizatondata) => {
741
+ // let savedTemp = JSON.parse(localStorage.getItem('savedTemp'))
783
742
  let savedTemp = JSON.parse(JSON.stringify(this.loadedChannelizatonData))
784
743
  let arr = []
785
744
  for (const [key, value] of Object.entries(savedTemp)) {
@@ -797,10 +756,15 @@ export default {
797
756
  }
798
757
  if (key === 'detector') {
799
758
  this.Detector = value.filter(ele => ele.detailtype === 'detector')
800
- // this.DetectorChart = value.filter(ele => ele.detailtype === 'detectorChart')
759
+ this.DetectorChart = value.filter(ele => ele.detailtype === 'detectorChart')
801
760
  }
802
761
  if (key === 'crossMap') {
803
762
  this.CrossMapData = JSON.parse(JSON.stringify(value))
763
+ // if (value.type === 'vectorgraph') {
764
+ // // svg底图,只加载底图区域870*650范围内的元素
765
+ // let { svgstr, ...allitem } = value
766
+ // this.allitem = allitem
767
+ // }
804
768
  } else {
805
769
  if (value.length > 1) {
806
770
  arr = [...arr, ...value]
@@ -810,18 +774,16 @@ export default {
810
774
  }
811
775
  }
812
776
  this.customlist = JSON.parse(JSON.stringify(arr))
813
- if (this.customlist.length > 0) {
814
- this.index = this.increaseId(this.customlist, 'index')
815
- }
816
- if (this.Motorways.length > 0) {
817
- this.motorid = this.increaseId(this.Motorways, 'id')
818
- }
819
- if (this.Pedwalk.length > 0) {
820
- this.pedid = this.increaseId(this.Pedwalk, 'id')
821
- }
822
- if (this.Detector.length > 0) {
823
- this.detectorcoilid = this.increaseId(this.Detector, 'id')
824
- }
777
+ this.index = this.increaseId(this.customlist, 'index')
778
+ this.motorid = this.increaseId(this.Motorways, 'id')
779
+ this.pedid = this.increaseId(this.Pedwalk, 'id')
780
+ // if (type === 'all') {
781
+ // // 加载整体模版后,默认切换到元素不可编辑状态,但整体可编辑
782
+ // this.isSeletable = false
783
+ // } else {
784
+ // this.isSeletable = true
785
+ // }
786
+ // })
825
787
  },
826
788
  increaseId (arr, field) { // 实现field对应的index或者id, 在arr的基础上寻找最小的
827
789
  let List = arr.map(ele => ele[field])
@@ -846,6 +808,25 @@ export default {
846
808
  return btn
847
809
  })
848
810
  },
811
+ resizePanelWidth (bodywidth) {
812
+ // 根据1920适配,右侧过宽
813
+ // this.drawpartWidth = ((1089 / 1980) * bodywidth).toFixed(0)
814
+ // this.mainWidth = this.$refs.custommain.offsetWidth
815
+ // this.editpartWidth = Number(this.mainWidth) - Number(this.drawpartWidth) - 20
816
+ // this.$refs.customGroup.style.width = this.drawpartWidth + 'px'
817
+ // this.$refs.customEdit.style.width = this.editpartWidth + 'px'
818
+ // this.allitem.w = this.drawpartWidth
819
+ // this.allitem.x = this.drawpartWidth / 2
820
+ // 编辑面板固定宽度600,左侧适配
821
+ this.mainWidth = this.$refs.custommain.offsetWidth
822
+ this.drawpartWidth = this.mainWidth - 545
823
+ this.$refs.customGroup.style.width = this.drawpartWidth + 'px'
824
+ this.$refs.customGroup.style.transition = 'width 0.5s ease-in-out'
825
+ if (this.mainWidth && this.drawpartWidth) {
826
+ this.allitem.w = this.drawpartWidth
827
+ this.allitem.x = this.drawpartWidth / 2
828
+ }
829
+ },
849
830
  saveChannelizatonChart (ChannelizatonData) {
850
831
  // let agentid = getIframdevid()
851
832
  let params = {
@@ -876,6 +857,31 @@ export default {
876
857
  })
877
858
  })
878
859
  },
860
+ // getChannelizatonChart () {
861
+ // let agentid = getIframdevid()
862
+ // return new Promise((resolve, reject) => {
863
+ // getChannelizatonChart(agentid).then(data => {
864
+ // if (!data.data.success) {
865
+ // let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
866
+ // if (data.data.data) {
867
+ // // 子类型错误
868
+ // let childErrorCode = data.data.data.errorCode
869
+ // if (childErrorCode) {
870
+ // let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
871
+ // this.$message.error(parrenterror + ',' + childerror)
872
+ // }
873
+ // } else {
874
+ // this.$message.error(parrenterror)
875
+ // }
876
+ // this.handleReset()
877
+ // return
878
+ // }
879
+ // this.handleReset()
880
+ // let channelizatondata = data.data.data
881
+ // resolve(channelizatondata)
882
+ // })
883
+ // })
884
+ // },
879
885
  handleClickSketchpad () {
880
886
  // 监听画板区域点击事件,改变图标放置的位置
881
887
  let sketchpadArea = document.getElementById('sketchpadArea')
@@ -885,10 +891,12 @@ export default {
885
891
  document.getElementById('sketchpadArea').style.cursor =
886
892
  'url(resource/pic/icons/magnifier3.cur) 12 12,default'
887
893
  _this.pointchange = false
888
- let boundingClientLeft = document.getElementById('channelizationElements').getBoundingClientRect().left
889
- let boundingClientTop = document.getElementById('channelizationElements').getBoundingClientRect().top
890
- _this.setLeft = Math.round(e.clientX - boundingClientLeft) // 四舍五入
891
- _this.setTop = Math.round(e.clientY - boundingClientTop)
894
+ _this.setLeft =
895
+ e.clientX -
896
+ document.getElementById('channelizationElements').getBoundingClientRect().left
897
+ _this.setTop =
898
+ e.clientY -
899
+ document.getElementById('channelizationElements').getBoundingClientRect().top
892
900
  if (_this.AddType === '') return
893
901
  switch (_this.AddType) {
894
902
  case 'motorway':
@@ -906,16 +914,25 @@ export default {
906
914
  _this.resetAddParams()
907
915
  }
908
916
  })
909
- },
910
- handleLockCrossMap () {
911
- this.isLockedCrossMap = !this.isLockedCrossMap
912
917
  }
913
918
  },
919
+ created () {},
914
920
  mounted () {
921
+ // this.resizePanelWidth(this.curBodyWidth)
915
922
  let PhaseData = new PhaseDataMgr(this.phaseList)
916
923
  this.$store.dispatch('InitPhaseDataMgr', PhaseData)
917
924
  this.handleClickSketchpad()
925
+ // 初始加载已保存的渠化图
926
+ // this.load('all')
918
927
  }
928
+ // updated () {
929
+ // if (this.$refs.sketchpadgroup.offsetWidth) {
930
+ // this.allitem.w = this.$refs.sketchpadgroup.offsetWidth
931
+ // this.allitem.x = this.$refs.sketchpadgroup.offsetWidth / 2
932
+ // this.allitem.h = this.$refs.sketchpadgroup.offsetHeight
933
+ // this.allitem.y = this.$refs.sketchpadgroup.offsetHeight / 2
934
+ // }
935
+ // }
919
936
  }
920
937
  </script>
921
938
 
@@ -13,7 +13,7 @@
13
13
  <template>
14
14
  <div class="custom-cross-part draw-channelization">
15
15
  <FirstImportCrossmap v-if="pageindex === 1"
16
- @loadSvgString="loadSvgString" @loadMapSize="loadMapSize" />
16
+ @loadSvgString="loadSvgString" />
17
17
  <CustomDraw v-show="pageindex === 2" ref="CustomDraw"
18
18
  :AgentId="AgentId"
19
19
  :loadedChannelizatonData="loadedChannelizatonData"
@@ -23,7 +23,10 @@
23
23
  <script>
24
24
  import FirstImportCrossmap from './firstImportCrossmap'
25
25
  import CustomDraw from './index.draw'
26
+ // import { mapState } from 'vuex'
27
+ // import { getIframdevid } from '../../../../utils/auth.js'
26
28
  import { getChannelizatonChart } from '../../../../api/cross'
29
+ // import { getMessageByCode } from '../../../utils/responseMessage.js'
27
30
 
28
31
  export default {
29
32
  name: 'custom-channelization',
@@ -69,12 +72,8 @@ export default {
69
72
  this.$refs.CustomDraw.loadSvgString(type, imgstr)
70
73
  })
71
74
  },
72
- loadMapSize (type, mapsize) {
73
- this.$nextTick(() => {
74
- this.$refs.CustomDraw.loadMapSize(type, mapsize)
75
- })
76
- },
77
75
  getChannelizatonChart () {
76
+ // let agentid = getIframdevid()
78
77
  let _this = this
79
78
  _this.pageindex = 1
80
79
  getChannelizatonChart(this.AgentId).then(data => {