openatc-components 0.0.99 → 0.0.100

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 (59) hide show
  1. package/package/kisscomps/components/BoardCard/BoardCard.vue +1 -6
  2. package/package/kisscomps/components/Channelization/Channelization.vue +10 -13
  3. package/package/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +113 -0
  4. package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +11 -18
  5. package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +74 -54
  6. package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +4 -1
  7. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +34 -11
  8. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +26 -1
  9. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +37 -18
  10. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +0 -6
  11. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +50 -28
  12. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +53 -29
  13. package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +4 -1
  14. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +130 -147
  15. package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +6 -5
  16. package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +144 -43
  17. package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +45 -1
  18. package/package/kisscomps/components/KanBan/kanban.vue +6 -6
  19. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +38 -153
  20. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +0 -16
  21. package/package/kisscomps/components/StageStatus/StageStatus.vue +2 -6
  22. package/package/kisscomps/components/patternList/patternList.vue +0 -5
  23. package/package/kisscomps/index.js +0 -2
  24. package/package/kissui.min.js +1 -1
  25. package/package.json +12 -13
  26. package/src/i18n/language/en.js +7 -32
  27. package/src/i18n/language/zh.js +6 -31
  28. package/src/kisscomps/components/BoardCard/BoardCard.vue +1 -6
  29. package/src/kisscomps/components/Channelization/Channelization.vue +10 -13
  30. package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +113 -0
  31. package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +11 -18
  32. package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +74 -54
  33. package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +4 -1
  34. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +34 -11
  35. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +26 -1
  36. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +37 -18
  37. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +0 -6
  38. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +50 -28
  39. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +53 -29
  40. package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +4 -1
  41. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +130 -147
  42. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +6 -5
  43. package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +144 -43
  44. package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +45 -1
  45. package/src/kisscomps/components/KanBan/kanban.vue +6 -6
  46. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +38 -153
  47. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +0 -16
  48. package/src/kisscomps/components/StageStatus/StageStatus.vue +2 -6
  49. package/src/kisscomps/components/patternList/patternList.vue +0 -5
  50. package/src/kisscomps/index.js +0 -2
  51. package/src/router/index.js +2 -2
  52. package/static/styles/channelizatioon.scss +40 -2
  53. package/static/styles/schemeconfig.scss +0 -52
  54. package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +0 -190
  55. package/package/kisscomps/components/SchemeConfig/priorityControl/utils.js +0 -163
  56. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +0 -191
  57. package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +0 -331
  58. package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +0 -190
  59. package/src/kisscomps/components/SchemeConfig/priorityControl/utils.js +0 -163
@@ -8,7 +8,6 @@
8
8
  :patternStatusList="patternStatusList">
9
9
  </StageStatus>
10
10
  <PatternStatus
11
- :showBarrier="showBarrier"
12
11
  :localPatternList="localPatternList"
13
12
  :contrloType="contrloType"
14
13
  :stagesChange="stagesChange"
@@ -18,7 +17,7 @@
18
17
  :phaseList="phaseList"
19
18
  :cycle="cycle"
20
19
  :syncTime="syncTime"
21
- :style="{'margin-top':(cycle || !showBarrier)? '25px':'0'}"
20
+ :style="{'margin-top':cycle ? '25px':'0'}"
22
21
  :patternStatusList="patternStatusList"
23
22
  :patternId="patternId"
24
23
  :cycles="cycles">
@@ -53,10 +52,6 @@ export default {
53
52
  stagesChange: {
54
53
  type: Array
55
54
  },
56
- showBarrier: {
57
- type: Boolean,
58
- default: false
59
- },
60
55
  phaseList: {
61
56
  type: Array
62
57
  },
@@ -128,6 +128,11 @@ export default {
128
128
  },
129
129
  CrossMapVisible: true, // 控制底图显示隐藏
130
130
  CrossMapData: {
131
+ x: 400,
132
+ y: 100,
133
+ w: 800,
134
+ h: 200,
135
+ angle: 0,
131
136
  svgstr: '',
132
137
  imgfilesrc: ''
133
138
  }, // 管理底图数据
@@ -297,19 +302,6 @@ export default {
297
302
  }
298
303
  if (key === 'crossMap') {
299
304
  this.CrossMapData = JSON.parse(JSON.stringify(value))
300
- if (value.type === 'vectorgraph') {
301
- // svg底图,只加载底图870*650区域范围内的元素
302
- let { svgstr, ...allitem } = value
303
- this.allitem = allitem
304
- } else {
305
- this.allitem = {
306
- x: 435,
307
- y: 325,
308
- w: 870,
309
- h: 650,
310
- angle: 0
311
- }
312
- }
313
305
  }
314
306
  }
315
307
  this.isSeletable = false
@@ -328,6 +320,11 @@ export default {
328
320
  this.Pedwalk = []
329
321
  this.Detector = []
330
322
  this.CrossMapData = {
323
+ x: 400,
324
+ y: 100,
325
+ w: 800,
326
+ h: 200,
327
+ angle: 0,
331
328
  svgstr: '',
332
329
  imgfilesrc: ''
333
330
  }
@@ -0,0 +1,113 @@
1
+ /**
2
+ * Copyright (c) 2020 kedacom
3
+ * OpenATC is licensed under Mulan PSL v2.
4
+ * You can use this software according to the terms and conditions of the Mulan PSL v2.
5
+ * You may obtain a copy of Mulan PSL v2 at:
6
+ * http://license.coscl.org.cn/MulanPSL2
7
+ * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
8
+ * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
9
+ * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
10
+ * See the Mulan PSL v2 for more details.
11
+ **/
12
+ <template>
13
+ <div class="basic-coodinfo-component">
14
+ <el-form
15
+ :inline="true"
16
+ :model="basicCoodInfo"
17
+ label-position="left">
18
+ <el-form-item
19
+ label="X:"
20
+ prop="intersection">
21
+ <el-input-number :min="0" :controls="false"
22
+ ref="refNumber-x"
23
+ v-model="basicCoodInfo.x"
24
+ @input.native="eventChange('x')" />
25
+ </el-form-item>
26
+ <el-form-item
27
+ label="Y:"
28
+ prop="count">
29
+ <el-input-number :min="0" :controls="false"
30
+ ref="refNumber-y"
31
+ v-model="basicCoodInfo.y"
32
+ @input.native="eventChange('y')" />
33
+ </el-form-item>
34
+ <el-form-item
35
+ v-if="showAngle"
36
+ :label="$t('openatccomponents.channelizationmap.angle') + ':'"
37
+ prop="count">
38
+ <el-input-number :min="0" :max="360" :controls="false"
39
+ ref="refNumber-angle"
40
+ v-model="basicCoodInfo.angle"
41
+ @input.native="eventChange('angle')" />
42
+ </el-form-item>
43
+ </el-form>
44
+ </div>
45
+ </template>
46
+ <script>
47
+ export default {
48
+ name: 'basic-coodinfo-component',
49
+ components: {
50
+ },
51
+ data () {
52
+ return {
53
+ showAngle: true,
54
+ basicCoodInfo: {
55
+ x: 0,
56
+ y: 0,
57
+ angle: 0
58
+ }
59
+ }
60
+ },
61
+ props: {
62
+ drawingObjInfo: {
63
+ type: Object
64
+ }
65
+ },
66
+ computed: {
67
+ },
68
+ watch: {
69
+ drawingObjInfo: {
70
+ handler: function (obj) {
71
+ this.basicCoodInfo = {
72
+ x: obj.x,
73
+ y: obj.y,
74
+ angle: obj.angle
75
+ }
76
+ this.isShowAngleSetting()
77
+ },
78
+ deep: true
79
+ }
80
+ },
81
+ methods: {
82
+ eventChange (field) {
83
+ const key = this.$refs[`refNumber-${field}`].displayValue
84
+ this.basicCoodInfo[field] = Number(key)
85
+ this.$emit('handleChangeBasicCoord', this.basicCoodInfo)
86
+ },
87
+ isShowAngleSetting () {
88
+ this.showAngle = true
89
+ if (this.drawingObjInfo.icontype === 'countdown') {
90
+ this.showAngle = false
91
+ }
92
+ if (this.drawingObjInfo.icontype === 'detector' && this.drawingObjInfo.detailtype === 'detectorChart') {
93
+ this.showAngle = false
94
+ }
95
+ }
96
+ },
97
+ mounted () {
98
+ if (this.drawingObjInfo) {
99
+ this.icontype = this.drawingObjInfo.icontype
100
+ this.basicCoodInfo = {
101
+ x: this.drawingObjInfo.x,
102
+ y: this.drawingObjInfo.y,
103
+ angle: this.drawingObjInfo.angle
104
+ }
105
+ this.isShowAngleSetting()
106
+ }
107
+ },
108
+ destroyed () {
109
+ }
110
+ }
111
+ </script>
112
+ <style lang="scss">
113
+ </style>
@@ -30,9 +30,11 @@
30
30
  v-if="CrossMapVisible"
31
31
  :UsageMode="UsageMode"
32
32
  :CrossMapData="CrossMapData"
33
- :isSeletable="isSeletable"
33
+ :isSeletable="!isLockedCrossMap"
34
34
  :pointchange="pointchange"
35
+ :chooseIndex="curChooseIconIndex"
35
36
  @changeCrossMap="changeCrossMap"
37
+ @handleSelectIcon="handleSelectIcon"
36
38
  />
37
39
  <!-- 机动车图标 -->
38
40
  <div v-if="resetflag">
@@ -47,18 +49,6 @@
47
49
  @handleSelectIcon="handleSelectIcon"
48
50
  />
49
51
  </div>
50
-
51
- <!-- 非机动车图标 -->
52
- <!-- <BicyclelanesIconSvg
53
- :UsageMode="UsageMode"
54
- v-for="bicycleitem in Bicyclelanes"
55
- :key="bicycleitem.index"
56
- :chooseIndex="curChooseIconIndex"
57
- :Data="bicycleitem"
58
- :isSeletable="isSeletable"
59
- @changeBicyclelaneItem="changeBicyclelaneItem"
60
- @handleSelectIcon="handleSelectIcon"
61
- />-->
62
52
  <!-- 文字图标 -->
63
53
  <!-- <EditableText
64
54
  :UsageMode="UsageMode"
@@ -105,15 +95,16 @@
105
95
  @changeDetectorItem="changeDetectorItem"
106
96
  @handleSelectIcon="handleSelectIcon"
107
97
  />
108
- <DetectorChart
98
+ <!-- <DetectorChart
109
99
  :UsageMode="UsageMode"
110
100
  v-for="detchartitem in DetectorChart"
111
101
  :key="'detectorchart-' + detchartitem.index"
112
102
  :chooseIndex="curChooseIconIndex"
113
103
  :DetectorChartData="detchartitem"
104
+ :Detector="Detector"
114
105
  :isSeletable="isSeletable"
115
106
  @changeDetectorChartItem="changeDetectorChartItem"
116
- @handleSelectIcon="handleSelectIcon" />
107
+ @handleSelectIcon="handleSelectIcon" /> -->
117
108
  </drr>
118
109
  </div>
119
110
  </template>
@@ -133,7 +124,6 @@ export default {
133
124
  CrossMap,
134
125
  EditableText,
135
126
  MotorwayIconSvg,
136
- // BicyclelanesIconSvg,
137
127
  CountdownIcon,
138
128
  PedroadIconSvg,
139
129
  DetectorIconSvg,
@@ -192,6 +182,9 @@ export default {
192
182
  },
193
183
  CurChooseIcon: {
194
184
  type: Object
185
+ },
186
+ isLockedCrossMap: { // 是否锁定底图(是否允许编辑底图位置,角度等)
187
+ type: Boolean
195
188
  }
196
189
  },
197
190
  data () {
@@ -206,8 +199,8 @@ export default {
206
199
  changeMotorwayItem (MotorwayItem, fields) {
207
200
  this.$emit('changeMotorwayItem', MotorwayItem, fields)
208
201
  },
209
- handleSelectIcon (iconobj) {
210
- this.$emit('handleSelectIcon', iconobj)
202
+ handleSelectIcon (iconobj, isCrossMap) {
203
+ this.$emit('handleSelectIcon', iconobj, isCrossMap)
211
204
  },
212
205
  changeText (textobj, fields) {
213
206
  this.$emit('changeText', textobj, fields)
@@ -12,31 +12,30 @@
12
12
  <template>
13
13
  <!-- 自定义底图 -->
14
14
  <div class="cross-map-part" ref="crossmap">
15
- <div v-if="mapreset && CrossMapData.type === 'vectorgraph'">
16
- <!-- 底图可缩放 -->
17
- <!-- <drr
18
- id="crossmapdrr"
19
- :selectable="isSeletable"
20
- :x="crossmapitem.x"
21
- :y="crossmapitem.y"
22
- :w="crossmapitem.w"
23
- :h="crossmapitem.h"
24
- :angle="crossmapitem.angle"
25
- :aspectRatio="true"
26
- @dragstop="mapDragStop(crossmapitem, ...arguments)"
27
- @resizestop="mapResizeStop(crossmapitem, ...arguments)"
28
- @rotatestop="mapRotateStop(crossmapitem, ...arguments)"
29
- >
30
- <div class="cross-map" v-html="CrossMapData.svgstr"></div>
31
- </drr> -->
15
+ <!-- 底图可缩放 -->
16
+ <drr
17
+ id="crossmapdrr"
18
+ :x="crossmapitem.x"
19
+ :y="crossmapitem.y"
20
+ :w="crossmapitem.w"
21
+ :h="crossmapitem.h"
22
+ :angle="crossmapitem.angle"
23
+ :selected="chooseIndex === CrossMapData.index"
24
+ :selectable="isSeletable"
25
+ :aspectRatio="true"
26
+ @select="handleSelectIcon(crossmapitem)"
27
+ @dragstop="mapDragStop(crossmapitem, ...arguments)"
28
+ @resizestop="mapResizeStop(crossmapitem, ...arguments)"
29
+ @rotatestop="mapRotateStop(crossmapitem, ...arguments)"
30
+ >
31
+ <div v-if="mapreset && CrossMapData.type === 'vectorgraph'">
32
+ <div class="cross-map" :style="{'width': crossmapitem.w + 'px', 'height': crossmapitem.h + 'px'}" v-html="CrossMapData.svgstr"></div>
33
+ </div>
32
34
 
33
- <!-- 底图取消操作 -->
34
- <div class="cross-map" :style="{'width': crossmapitem.w + 'px', 'height': crossmapitem.h + 'px'}" v-html="CrossMapData.svgstr"></div>
35
- </div>
36
-
37
- <div v-if="mapreset && CrossMapData.type === 'picture'" class="cross-map">
38
- <img height="100%" :src="CrossMapData.imgfilesrc">
39
- </div>
35
+ <div v-if="mapreset && CrossMapData.type === 'picture'" class="cross-map" >
36
+ <img id="pngMap" :src="CrossMapData.imgfilesrc" :style="{'width': crossmapitem.w + 'px', 'height': crossmapitem.h + 'px'}">
37
+ </div>
38
+ </drr>
40
39
  </div>
41
40
  </template>
42
41
 
@@ -55,6 +54,9 @@ export default {
55
54
  isSeletable: {
56
55
  type: Boolean
57
56
  },
57
+ chooseIndex: {
58
+ type: Number
59
+ },
58
60
  pointchange: {
59
61
  type: Boolean
60
62
  }
@@ -62,26 +64,17 @@ export default {
62
64
  watch: {
63
65
  CrossMapData: {
64
66
  handler: function (val) {
65
- this.crossmapitem = {
66
- x: 0,
67
- y: 0,
68
- w: 0,
69
- h: 0,
70
- angle: 0
71
- }
67
+ this.crossmapitem.x = val.x
68
+ this.crossmapitem.y = val.y
69
+ this.crossmapitem.w = val.w
70
+ this.crossmapitem.h = val.h
71
+ this.crossmapitem.angle = val.angle
72
72
  if (val.type === 'vectorgraph') {
73
73
  if (val.svgstr === '') {
74
74
  this.mapreset = false
75
75
  return
76
76
  }
77
77
  this.mapreset = true
78
- this.crossmapitem = {
79
- x: val.x,
80
- y: val.y,
81
- w: val.w,
82
- h: val.h,
83
- angle: val.angle
84
- }
85
78
  }
86
79
  if (val.type === 'picture') {
87
80
  if (val.imgfilesrc === undefined || val.imgfilesrc === '') {
@@ -93,19 +86,19 @@ export default {
93
86
  },
94
87
  deep: true
95
88
  },
96
- crossmapitem: {
97
- handler: function (newval, oldval) {
98
- if ((JSON.stringify(oldval) !== '{}') && !this.isEqual(newval, oldval)) {
99
- // 更改原数据的位置大小数据
100
- let data = {
101
- ...this.CrossMapData,
102
- ...newval
103
- }
104
- let fields = Object.keys(newval)
105
- this.$emit('changeCrossMap', data, fields)
106
- }
107
- }
108
- },
89
+ // crossmapitem: {
90
+ // handler: function (newval, oldval) {
91
+ // if ((JSON.stringify(oldval) !== '{}') && !this.isEqual(newval, oldval)) {
92
+ // // 更改原数据的位置大小数据
93
+ // let data = {
94
+ // ...this.CrossMapData,
95
+ // ...newval
96
+ // }
97
+ // let fields = Object.keys(newval)
98
+ // this.$emit('changeCrossMap', data, fields)
99
+ // }
100
+ // }
101
+ // },
109
102
  pointchange: {
110
103
  handler: function (val) {
111
104
  // 解决光标样式被选区样式覆盖问题
@@ -132,17 +125,32 @@ export default {
132
125
  mapDragStop (origin, final) {
133
126
  // 底图拖动停止
134
127
  this.crossmapitem = JSON.parse(JSON.stringify(final))
128
+ this.handleChangeData()
135
129
  },
136
130
  mapResizeStop (origin, final) {
137
131
  // 底图改变大小停止
132
+ let svgdom = document.querySelector('.cross-map svg')
133
+ if (svgdom) {
134
+ // 解决svg源文件里有宽高属性,此时对svg父容器改变宽高,svg尺寸不会改变的问题
135
+ // 因此要修改svg文件的宽高属性
136
+ if (svgdom.getAttribute('width')) {
137
+ svgdom.setAttribute('width', final.w + 'px')
138
+ }
139
+ if (svgdom.getAttribute('height')) {
140
+ svgdom.setAttribute('height', final.h + 'px')
141
+ }
142
+ }
138
143
  this.resetMapSvg()
139
144
  this.crossmapitem = JSON.parse(JSON.stringify(final))
140
- // this.$refs.crossmap.style.height = final.w + 'px'
141
- // this.$refs.crossmap.style.width = final.h + 'px'
145
+ this.handleChangeData()
142
146
  },
143
147
  mapRotateStop (origin, final) {
144
148
  // 底图旋转停止
145
- this.crossmapitem = JSON.parse(JSON.stringify(final))
149
+ this.crossmapitem = JSON.parse(JSON.stringify(final))// 第四象限的角度是负值(开源组件接口返回),转化为正值便于理解
150
+ if (this.crossmapitem.angle < 0) {
151
+ this.crossmapitem.angle = this.crossmapitem.angle + 360
152
+ }
153
+ this.handleChangeData()
146
154
  },
147
155
  resetMapSvg () {
148
156
  // 重绘底图svg
@@ -166,6 +174,18 @@ export default {
166
174
  }
167
175
  }
168
176
  return true
177
+ },
178
+ handleSelectIcon (iconparams) {
179
+ this.$emit('handleSelectIcon', this.CrossMapData, 'crossmap')
180
+ },
181
+ handleChangeData () {
182
+ let data = {
183
+ ...this.CrossMapData,
184
+ ...this.crossmapitem
185
+ }
186
+ let fields = Object.keys(this.crossmapitem)
187
+ this.$emit('changeCrossMap', data, fields)
188
+ this.handleSelectIcon()
169
189
  }
170
190
  }
171
191
  }
@@ -11,7 +11,7 @@
11
11
  **/
12
12
  <template>
13
13
  <div class="first-import-crossmap">
14
- <ImportDialog ref="importDialog" @loadSvgString="loadSvgString" />
14
+ <ImportDialog ref="importDialog" @loadSvgString="loadSvgString" @loadMapSize="loadMapSize" />
15
15
  <div class="import-btn">
16
16
  <el-button type="primary" @click="clickOpen">{{$t('openatccomponents.channelizationmap.importpicture')}}</el-button>
17
17
  <div class="tip">{{$t('openatccomponents.channelizationmap.importtip')}}</div>
@@ -39,6 +39,9 @@ export default {
39
39
  },
40
40
  loadSvgString (type, imgstr) {
41
41
  this.$emit('loadSvgString', type, imgstr)
42
+ },
43
+ loadMapSize (type, mapsize) {
44
+ this.$emit('loadMapSize', type, mapsize)
42
45
  }
43
46
  },
44
47
  mounted () {}
@@ -21,6 +21,7 @@
21
21
  :selectable="isSeletable"
22
22
  :angle="item.angle"
23
23
  :aspectRatio="true"
24
+ :rotatable="false"
24
25
  @select="handleSelectIcon(item)"
25
26
  @dragstop="boxDragStop(item, ...arguments)"
26
27
  @resizestop="boxResizeStop(item, ...arguments)"
@@ -58,18 +59,28 @@ export default {
58
59
  }
59
60
  },
60
61
  watch: {
61
- item: {
62
- handler: function (newval, oldval) {
63
- if ((JSON.stringify(oldval) !== '{}')) {
64
- // 更改原数据的位置大小数据
65
- let data = {
66
- ...this.CountdownData,
67
- ...newval
68
- }
69
- let fields = Object.keys(newval)
70
- this.$emit('changeTimeItem', data, fields)
62
+ // item: {
63
+ // handler: function (newval, oldval) {
64
+ // if ((JSON.stringify(oldval) !== '{}')) {
65
+ // // 更改原数据的位置大小数据
66
+ // let data = {
67
+ // ...this.CountdownData,
68
+ // ...newval
69
+ // }
70
+ // let fields = Object.keys(newval)
71
+ // this.$emit('changeTimeItem', data, fields)
72
+ // }
73
+ // }
74
+ // },
75
+ CountdownData: {
76
+ handler: function (val) {
77
+ if (this.UsageMode === 'draw') {
78
+ this.item.x = val.x
79
+ this.item.y = val.y
80
+ this.item.angle = val.angle
71
81
  }
72
- }
82
+ },
83
+ deep: true
73
84
  },
74
85
  CountdownList: {
75
86
  handler: function (val) {
@@ -106,13 +117,16 @@ export default {
106
117
  boxDragStop (origin, final) {
107
118
  this.item = JSON.parse(JSON.stringify(final))
108
119
  this.$emit('handleSelectIcon', this.CountdownData)
120
+ this.handleChangeData()
109
121
  },
110
122
  boxResizeStop (origin, final) {
111
123
  this.resetSvg()
112
124
  this.item = JSON.parse(JSON.stringify(final))
125
+ this.handleChangeData()
113
126
  },
114
127
  boxRotateStop (origin, final) {
115
128
  this.item = JSON.parse(JSON.stringify(final))
129
+ this.handleChangeData()
116
130
  },
117
131
  resetSvg () {
118
132
  this.reset = false
@@ -129,6 +143,15 @@ export default {
129
143
  if (this.Fontsize < 14) {
130
144
  this.Fontsize = 14
131
145
  }
146
+ },
147
+ handleChangeData () {
148
+ let data = {
149
+ ...this.CountdownData,
150
+ ...this.item
151
+ }
152
+ let fields = Object.keys(this.item)
153
+ this.$emit('changeTimeItem', data, fields)
154
+ this.handleSelectIcon()
132
155
  }
133
156
  },
134
157
  created () {
@@ -27,6 +27,11 @@
27
27
  >
28
28
  <div v-if="UsageMode === 'draw'" class="centerText" :class="{'defaultBg': chooseIndex !== DetectorChartData.index, 'highlightBg': chooseIndex === DetectorChartData.index }" :style="{'width': item.w + 'px', 'height': item.h + 'px'}">
29
29
  <div class="detector-statistics-echarts" :id="'detectorStatisticsEcharts' + DetectorChartData.index"></div>
30
+ <!-- <div>
31
+ <div class="detector-rect"
32
+ :class="{'defaultVehicleBorder': DetectorData.detectortype === 1,
33
+ 'defaultPedBorder': DetectorData.detectortype === 2 }"></div>
34
+ </div> -->
30
35
  </div>
31
36
  <div v-if="UsageMode === 'show'" class="centerText" :class="{'defaultBg': chooseIndex !== DetectorChartData.index, 'highlightBg': chooseIndex === DetectorChartData.index }" :style="{'width': item.w + 'px', 'height': item.h + 'px'}">
32
37
  </div>
@@ -61,12 +66,20 @@ export default {
61
66
  this.$emit('changeDetectorItem', data, fields)
62
67
  }
63
68
  }
69
+ },
70
+ DetectorChartData: {
71
+ handler: function (newval, oldval) {
72
+ console.log(this.Detector)
73
+ }
64
74
  }
65
75
  },
66
76
  props: {
67
77
  DetectorChartData: {
68
78
  type: Object
69
79
  },
80
+ Detector: {
81
+ type: Array
82
+ },
70
83
  isSeletable: {
71
84
  type: Boolean
72
85
  },
@@ -114,16 +127,19 @@ export default {
114
127
  xAxis: {
115
128
  type: 'category',
116
129
  axisLabel: {
130
+ show: false,
117
131
  textStyle: {
118
132
  color: getTheme() === 'light' ? '#666666' : '#B9BABF'
119
133
  }
120
134
  },
121
135
  axisTick: {
136
+ show: false,
122
137
  lineStyle: {
123
138
  color: getTheme() === 'light' ? '#D7DFE1' : '#30384D'
124
139
  }
125
140
  },
126
141
  axisLine: {
142
+ show: false,
127
143
  lineStyle: {
128
144
  color: getTheme() === 'light' ? '#D7DFE1' : '#30384D'
129
145
  }
@@ -142,6 +158,7 @@ export default {
142
158
  // }
143
159
  },
144
160
  axisLine: {
161
+ show: false,
145
162
  lineStyle: {
146
163
  color: getTheme() === 'light' ? '#D7DFE1' : '#30384D'
147
164
  }
@@ -159,6 +176,7 @@ export default {
159
176
  // }
160
177
  },
161
178
  axisLabel: {
179
+ show: false,
162
180
  textStyle: {
163
181
  color: getTheme() === 'light' ? '#666666' : '#B9BABF'
164
182
  }
@@ -168,7 +186,14 @@ export default {
168
186
  type: 'bar',
169
187
  barWidth: '10',
170
188
  itemStyle: {
171
- color: 'red'
189
+ color: 'red',
190
+ borderWidth: 0,
191
+ shadowBlur: {
192
+ shadowColor: 'rgba(255,255,255,0.31)',
193
+ shadowBlur: 10,
194
+ shadowOffsetX: 0,
195
+ shadowOffsetY: 2
196
+ }
172
197
  },
173
198
  data: this.flowsaturation
174
199
  }, {