openatc-components 0.0.103 → 0.0.104
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.
- package/package/kisscomps/components/Channelization/Channelization.vue +10 -13
- package/package/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +349 -0
- package/package/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -0
- package/package/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +113 -0
- package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +24 -18
- package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +72 -54
- package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +4 -1
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +56 -14
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +26 -1
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +37 -18
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +0 -6
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +50 -28
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +53 -29
- package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +4 -1
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +213 -164
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +6 -5
- package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +144 -43
- package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +52 -8
- package/package/kisscomps/index.js +2 -0
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/i18n/language/en.js +6 -3
- package/src/i18n/language/zh.js +5 -2
- package/src/kisscomps/components/Channelization/Channelization.vue +10 -13
- package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +349 -0
- package/src/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +113 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +24 -18
- package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +72 -54
- package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +4 -1
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +56 -14
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +26 -1
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +37 -18
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +0 -6
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +50 -28
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +53 -29
- package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +4 -1
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +213 -164
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +6 -5
- package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +144 -43
- package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +52 -8
- package/src/kisscomps/index.js +2 -0
- package/src/router/index.js +9 -10
- package/src/views/customchannelization.vue +1 -1
- package/src/views/intersection.vue +67 -45
- package/src/views/schemeconfig.vue +2 -2
- package/static/styles/channelizatioon.scss +49 -2
- package/static/styles/commonkanban.scss +27 -27
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +0 -191
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +0 -331
|
@@ -12,31 +12,30 @@
|
|
|
12
12
|
<template>
|
|
13
13
|
<!-- 自定义底图 -->
|
|
14
14
|
<div class="cross-map-part" ref="crossmap">
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
35
|
-
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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 === '') {
|
|
@@ -90,22 +83,13 @@ export default {
|
|
|
90
83
|
}
|
|
91
84
|
this.mapreset = true
|
|
92
85
|
}
|
|
86
|
+
this.$nextTick(() => {
|
|
87
|
+
// 底图大小改变后,需要同步svg的宽高
|
|
88
|
+
this.synchroSVGSize()
|
|
89
|
+
})
|
|
93
90
|
},
|
|
94
91
|
deep: true
|
|
95
92
|
},
|
|
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
|
-
},
|
|
109
93
|
pointchange: {
|
|
110
94
|
handler: function (val) {
|
|
111
95
|
// 解决光标样式被选区样式覆盖问题
|
|
@@ -132,17 +116,39 @@ export default {
|
|
|
132
116
|
mapDragStop (origin, final) {
|
|
133
117
|
// 底图拖动停止
|
|
134
118
|
this.crossmapitem = JSON.parse(JSON.stringify(final))
|
|
119
|
+
this.handleChangeData()
|
|
135
120
|
},
|
|
121
|
+
synchroSVGSize () {
|
|
122
|
+
let svgdoms = document.querySelectorAll('.cross-map svg')
|
|
123
|
+
if (svgdoms) {
|
|
124
|
+
for (let i = 0; i < svgdoms.length; i++) {
|
|
125
|
+
let svgdom = svgdoms[i]
|
|
126
|
+
// 解决svg源文件里有宽高属性,此时对svg父容器改变宽高,svg尺寸不会改变的问题
|
|
127
|
+
// 因此要修改svg文件的宽高属性
|
|
128
|
+
if (svgdom.getAttribute('width')) {
|
|
129
|
+
svgdom.setAttribute('width', this.crossmapitem.w + 'px')
|
|
130
|
+
}
|
|
131
|
+
if (svgdom.getAttribute('height')) {
|
|
132
|
+
svgdom.setAttribute('height', this.crossmapitem.h + 'px')
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
|
|
136
138
|
mapResizeStop (origin, final) {
|
|
137
139
|
// 底图改变大小停止
|
|
138
140
|
this.resetMapSvg()
|
|
139
141
|
this.crossmapitem = JSON.parse(JSON.stringify(final))
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
this.synchroSVGSize()
|
|
143
|
+
this.handleChangeData()
|
|
142
144
|
},
|
|
143
145
|
mapRotateStop (origin, final) {
|
|
144
146
|
// 底图旋转停止
|
|
145
|
-
this.crossmapitem = JSON.parse(JSON.stringify(final))
|
|
147
|
+
this.crossmapitem = JSON.parse(JSON.stringify(final))// 第四象限的角度是负值(开源组件接口返回),转化为正值便于理解
|
|
148
|
+
if (this.crossmapitem.angle < 0) {
|
|
149
|
+
this.crossmapitem.angle = this.crossmapitem.angle + 360
|
|
150
|
+
}
|
|
151
|
+
this.handleChangeData()
|
|
146
152
|
},
|
|
147
153
|
resetMapSvg () {
|
|
148
154
|
// 重绘底图svg
|
|
@@ -166,6 +172,18 @@ export default {
|
|
|
166
172
|
}
|
|
167
173
|
}
|
|
168
174
|
return true
|
|
175
|
+
},
|
|
176
|
+
handleSelectIcon (iconparams) {
|
|
177
|
+
this.$emit('handleSelectIcon', this.CrossMapData, 'crossmap')
|
|
178
|
+
},
|
|
179
|
+
handleChangeData () {
|
|
180
|
+
let data = {
|
|
181
|
+
...this.CrossMapData,
|
|
182
|
+
...this.crossmapitem
|
|
183
|
+
}
|
|
184
|
+
let fields = Object.keys(this.crossmapitem)
|
|
185
|
+
this.$emit('changeCrossMap', data, fields)
|
|
186
|
+
this.handleSelectIcon()
|
|
169
187
|
}
|
|
170
188
|
}
|
|
171
189
|
}
|
|
@@ -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,18 +21,19 @@
|
|
|
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)"
|
|
27
28
|
@rotatestop="boxRotateStop(item, ...arguments)"
|
|
28
29
|
>
|
|
29
30
|
<div v-if="UsageMode === 'draw'" class="centerText" :class="{'defaultBg': chooseIndex !== CountdownData.index, 'highlightBg': chooseIndex === CountdownData.index }" :style="{'width': item.w + 'px', 'height': item.h + 'px'}">
|
|
30
|
-
<div class="phaseCountdown drawPhaseCountdown" :style="{'width': item.w + 'px', 'fontSize': Fontsize + 'px'}">
|
|
31
|
+
<div class="phaseCountdown drawPhaseCountdown" :style="{'width': item.w + 'px', 'fontSize': textFontSize ? textFontSize + 'px' : Fontsize + 'px'}">
|
|
31
32
|
{{$t('openatccomponents.channelizationmap.countdown')}}
|
|
32
33
|
</div>
|
|
33
34
|
</div>
|
|
34
|
-
<div v-if="UsageMode === 'show' && isHasPhase" class="centerText showCenterText" :class="{'defaultBg': chooseIndex !== CountdownData.index, 'highlightBg': chooseIndex === CountdownData.index }" :style="{'width': item.w + 'px', 'height': item.h + 'px'}">
|
|
35
|
-
<div class="phaseCountdown" :style="{'width': item.w + 'px', 'fontSize': Fontsize + 'px'}">
|
|
35
|
+
<div v-if="UsageMode === 'show' && isHasPhase && !customText" class="centerText showCenterText" :class="{'defaultBg': chooseIndex !== CountdownData.index, 'highlightBg': chooseIndex === CountdownData.index }" :style="{'width': item.w + 'px', 'height': item.h + 'px', 'backgroundColor': bcgColor}">
|
|
36
|
+
<div class="phaseCountdown" :style="{'width': item.w + 'px', 'fontSize': textFontSize ? textFontSize + 'px' : Fontsize + 'px'}">
|
|
36
37
|
<div v-if="phaseCountdownList.length > 0">
|
|
37
38
|
<div v-for="curPhase in phaseCountdownList" :key="curPhase.id" :style="{color: curPhase.phaseCountdownColor}">
|
|
38
39
|
<span style="float: left;color: #fff;margin-right: 5px;">{{$t('openatccomponents.overview.phase')}}{{curPhase.id}}:</span>
|
|
@@ -41,6 +42,11 @@
|
|
|
41
42
|
</div>
|
|
42
43
|
</div>
|
|
43
44
|
</div>
|
|
45
|
+
<div v-if="UsageMode === 'show' && customText"
|
|
46
|
+
class="defaultBg"
|
|
47
|
+
:style="{'width': item.w + 'px', 'height': item.h + 'px', 'fontSize': textFontSize ? textFontSize + 'px' : Fontsize + 'px', 'backgroundColor': bcgColor}">
|
|
48
|
+
<div class="customText">{{customText}}</div>
|
|
49
|
+
</div>
|
|
44
50
|
</drr>
|
|
45
51
|
</div>
|
|
46
52
|
</template>
|
|
@@ -58,18 +64,28 @@ export default {
|
|
|
58
64
|
}
|
|
59
65
|
},
|
|
60
66
|
watch: {
|
|
61
|
-
item: {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
// item: {
|
|
68
|
+
// handler: function (newval, oldval) {
|
|
69
|
+
// if ((JSON.stringify(oldval) !== '{}')) {
|
|
70
|
+
// // 更改原数据的位置大小数据
|
|
71
|
+
// let data = {
|
|
72
|
+
// ...this.CountdownData,
|
|
73
|
+
// ...newval
|
|
74
|
+
// }
|
|
75
|
+
// let fields = Object.keys(newval)
|
|
76
|
+
// this.$emit('changeTimeItem', data, fields)
|
|
77
|
+
// }
|
|
78
|
+
// }
|
|
79
|
+
// },
|
|
80
|
+
CountdownData: {
|
|
81
|
+
handler: function (val) {
|
|
82
|
+
if (this.UsageMode === 'draw') {
|
|
83
|
+
this.item.x = val.x
|
|
84
|
+
this.item.y = val.y
|
|
85
|
+
this.item.angle = val.angle
|
|
71
86
|
}
|
|
72
|
-
}
|
|
87
|
+
},
|
|
88
|
+
deep: true
|
|
73
89
|
},
|
|
74
90
|
CountdownList: {
|
|
75
91
|
handler: function (val) {
|
|
@@ -100,19 +116,35 @@ export default {
|
|
|
100
116
|
isHasPhase: {
|
|
101
117
|
type: Boolean,
|
|
102
118
|
default: true
|
|
119
|
+
},
|
|
120
|
+
showCustomText: {
|
|
121
|
+
type: Boolean
|
|
122
|
+
},
|
|
123
|
+
customText: { // 圆内所显示自定义文字内容,如果传了,显示优先级高于倒计时文字
|
|
124
|
+
type: String
|
|
125
|
+
},
|
|
126
|
+
bcgColor: { // 圆背景色
|
|
127
|
+
type: String,
|
|
128
|
+
default: 'rgba(94, 90, 90, 0.8)'
|
|
129
|
+
},
|
|
130
|
+
textFontSize: { // 所显示文字大小,如果传了,优先级高于文字按宽度适配大小
|
|
131
|
+
type: String
|
|
103
132
|
}
|
|
104
133
|
},
|
|
105
134
|
methods: {
|
|
106
135
|
boxDragStop (origin, final) {
|
|
107
136
|
this.item = JSON.parse(JSON.stringify(final))
|
|
108
137
|
this.$emit('handleSelectIcon', this.CountdownData)
|
|
138
|
+
this.handleChangeData()
|
|
109
139
|
},
|
|
110
140
|
boxResizeStop (origin, final) {
|
|
111
141
|
this.resetSvg()
|
|
112
142
|
this.item = JSON.parse(JSON.stringify(final))
|
|
143
|
+
this.handleChangeData()
|
|
113
144
|
},
|
|
114
145
|
boxRotateStop (origin, final) {
|
|
115
146
|
this.item = JSON.parse(JSON.stringify(final))
|
|
147
|
+
this.handleChangeData()
|
|
116
148
|
},
|
|
117
149
|
resetSvg () {
|
|
118
150
|
this.reset = false
|
|
@@ -125,10 +157,20 @@ export default {
|
|
|
125
157
|
},
|
|
126
158
|
culculateFontsize () {
|
|
127
159
|
// 根据倒计时图标大小,动态计算内部文字大小
|
|
160
|
+
if (this.textFontSize) return
|
|
128
161
|
this.Fontsize = Math.floor(this.CountdownData.w / 140 * 20)
|
|
129
162
|
if (this.Fontsize < 14) {
|
|
130
163
|
this.Fontsize = 14
|
|
131
164
|
}
|
|
165
|
+
},
|
|
166
|
+
handleChangeData () {
|
|
167
|
+
let data = {
|
|
168
|
+
...this.CountdownData,
|
|
169
|
+
...this.item
|
|
170
|
+
}
|
|
171
|
+
let fields = Object.keys(this.item)
|
|
172
|
+
this.$emit('changeTimeItem', data, fields)
|
|
173
|
+
this.handleSelectIcon()
|
|
132
174
|
}
|
|
133
175
|
},
|
|
134
176
|
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
|
}, {
|
|
@@ -64,26 +64,29 @@ export default {
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
watch: {
|
|
67
|
-
item: {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
67
|
+
// item: {
|
|
68
|
+
// handler: function (newval, oldval) {
|
|
69
|
+
// if ((JSON.stringify(oldval) !== '{}')) {
|
|
70
|
+
// // 更改原数据的位置大小数据
|
|
71
|
+
// let data = {
|
|
72
|
+
// ...this.DetectorData,
|
|
73
|
+
// ...newval
|
|
74
|
+
// }
|
|
75
|
+
// let fields = Object.keys(newval)
|
|
76
|
+
// this.$emit('changeDetectorItem', data, fields)
|
|
77
|
+
// }
|
|
78
|
+
// }
|
|
79
|
+
// }
|
|
80
|
+
DetectorData: {
|
|
81
|
+
handler: function (val) {
|
|
82
|
+
if (this.UsageMode === 'draw') {
|
|
83
|
+
this.item.x = val.x
|
|
84
|
+
this.item.y = val.y
|
|
85
|
+
this.item.angle = val.angle
|
|
77
86
|
}
|
|
78
|
-
}
|
|
87
|
+
},
|
|
88
|
+
deep: true
|
|
79
89
|
}
|
|
80
|
-
// DetectorData: {
|
|
81
|
-
// 监听失效,不明原因,有时间可以看下
|
|
82
|
-
// handler: function (val) {
|
|
83
|
-
// debugger
|
|
84
|
-
// },
|
|
85
|
-
// deep: true
|
|
86
|
-
// }
|
|
87
90
|
|
|
88
91
|
// CurChooseIcon: {
|
|
89
92
|
// handler: function (data) {
|
|
@@ -114,10 +117,12 @@ export default {
|
|
|
114
117
|
boxDragStop (origin, final) {
|
|
115
118
|
this.item = JSON.parse(JSON.stringify(final))
|
|
116
119
|
this.$emit('handleSelectIcon', this.DetectorData)
|
|
120
|
+
this.handleChangeData()
|
|
117
121
|
},
|
|
118
122
|
boxResize (final) {
|
|
119
123
|
// this.resetSvg()
|
|
120
124
|
this.item = JSON.parse(JSON.stringify(final))
|
|
125
|
+
this.handleChangeData()
|
|
121
126
|
},
|
|
122
127
|
boxResizeStop (origin, final) {
|
|
123
128
|
// this.resetSvg()
|
|
@@ -125,6 +130,11 @@ export default {
|
|
|
125
130
|
},
|
|
126
131
|
boxRotateStop (origin, final) {
|
|
127
132
|
this.item = JSON.parse(JSON.stringify(final))
|
|
133
|
+
// 第四象限的角度是负值(开源组件接口返回),转化为正值便于理解
|
|
134
|
+
if (this.item.angle < 0) {
|
|
135
|
+
this.item.angle = this.item.angle + 360
|
|
136
|
+
}
|
|
137
|
+
this.handleChangeData()
|
|
128
138
|
},
|
|
129
139
|
resetSvg () {
|
|
130
140
|
this.reset = false
|
|
@@ -138,6 +148,15 @@ export default {
|
|
|
138
148
|
culculateFontsize () {
|
|
139
149
|
// 根据倒计时图标大小,动态计算内部文字大小
|
|
140
150
|
this.Fontsize = Math.floor(this.DetectorData.w / 140 * 20)
|
|
151
|
+
},
|
|
152
|
+
handleChangeData () {
|
|
153
|
+
let data = {
|
|
154
|
+
...this.DetectorData,
|
|
155
|
+
...this.item
|
|
156
|
+
}
|
|
157
|
+
let fields = Object.keys(this.item)
|
|
158
|
+
this.$emit('changeDetectorItem', data, fields)
|
|
159
|
+
this.handleSelectIcon()
|
|
141
160
|
}
|
|
142
161
|
},
|
|
143
162
|
created () {
|
|
@@ -23,12 +23,6 @@
|
|
|
23
23
|
d="M13.473,12.000 L13.473,-0.000 L16.000,-0.000 L16.000,12.000 L13.473,12.000 ZM8.982,-0.000 L11.508,-0.000 L11.508,12.000 L8.982,12.000 L8.982,-0.000 ZM4.491,-0.000 L7.017,-0.000 L7.017,12.000 L4.491,12.000 L4.491,-0.000 ZM-0.000,-0.000 L2.526,-0.000 L2.526,12.000 L-0.000,12.000 L-0.000,-0.000 Z"/>
|
|
24
24
|
</svg>
|
|
25
25
|
</div>
|
|
26
|
-
<!-- <div :class="laneicon.type === 'bicyclelane' ? '' : 'hide'">
|
|
27
|
-
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" :width="laneicon.width ? laneicon.width : iconw" :height="laneicon.height ? laneicon.height : iconh">
|
|
28
|
-
<path fill-rule="evenodd" :fill="laneicon.active === true ? highlightColor : defaultColor"
|
|
29
|
-
d="M6.994,6.074 L3.495,0.003 L-0.004,6.074 L2.091,6.074 L2.091,16.007 L4.898,16.007 L4.898,6.074 L6.994,6.074 Z"/>
|
|
30
|
-
</svg>
|
|
31
|
-
</div> -->
|
|
32
26
|
<div :class="laneicon.type === 'countdown' ? '' : 'hide'">
|
|
33
27
|
<svg version="1.1" id="图层_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" :width="laneicon.width ? laneicon.width : iconw" :height="laneicon.height ? laneicon.height : iconh">
|
|
34
28
|
<path fill-rule="evenodd" :fill="laneicon.active === true ? highlightColor : defaultColor"
|
|
@@ -323,41 +323,48 @@ export default {
|
|
|
323
323
|
}
|
|
324
324
|
},
|
|
325
325
|
watch: {
|
|
326
|
-
item: {
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
},
|
|
326
|
+
// item: {
|
|
327
|
+
// handler: function (newval, oldval) {
|
|
328
|
+
// if (JSON.stringify(oldval) !== '{}') {
|
|
329
|
+
// // 更改原数据的位置大小数据
|
|
330
|
+
// let data = {
|
|
331
|
+
// ...this.Data,
|
|
332
|
+
// ...newval
|
|
333
|
+
// }
|
|
334
|
+
// let fields = Object.keys(newval)
|
|
335
|
+
// this.$emit('changeMotorwayItem', data, fields)
|
|
336
|
+
// }
|
|
337
|
+
// }
|
|
338
|
+
// },
|
|
339
339
|
Data: {
|
|
340
340
|
handler: function (val) {
|
|
341
341
|
this.iconnameArr = val.icondirename
|
|
342
|
-
if (
|
|
342
|
+
if (this.UsageMode === 'draw') {
|
|
343
|
+
this.item.x = val.x
|
|
344
|
+
this.item.y = val.y
|
|
345
|
+
this.item.angle = val.angle
|
|
346
|
+
}
|
|
347
|
+
if (this.UsageMode === 'show') {
|
|
348
|
+
if (val.type === 4 && this.lastType === '') {
|
|
343
349
|
// 绿闪:绿-》灰-》绿 循环效果
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
350
|
+
this.GreenFlashColor = '#77fb65'
|
|
351
|
+
this.GreenIntervalId = setInterval(() => {
|
|
352
|
+
this.GreenFlashColor =
|
|
347
353
|
!this.GreenFlashColor || this.GreenFlashColor === '#828282'
|
|
348
354
|
? '#77fb65'
|
|
349
355
|
: '#828282'
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
356
|
+
}, 500)
|
|
357
|
+
this.lastType = val.type
|
|
358
|
+
}
|
|
359
|
+
if (
|
|
360
|
+
this.GreenIntervalId &&
|
|
355
361
|
val.type !== 4 &&
|
|
356
362
|
val.type !== this.lastType
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
363
|
+
) {
|
|
364
|
+
clearInterval(this.GreenIntervalId)
|
|
365
|
+
this.GreenFlashColor = undefined
|
|
366
|
+
this.lastType = ''
|
|
367
|
+
}
|
|
361
368
|
}
|
|
362
369
|
},
|
|
363
370
|
deep: true
|
|
@@ -388,16 +395,22 @@ export default {
|
|
|
388
395
|
methods: {
|
|
389
396
|
boxDragStop (origin, final) {
|
|
390
397
|
this.item = JSON.parse(JSON.stringify(final))
|
|
391
|
-
this
|
|
398
|
+
this.handleChangeData()
|
|
392
399
|
},
|
|
393
400
|
boxResizeStop (origin, final) {
|
|
394
401
|
this.IconW = final.w + 'px'
|
|
395
402
|
this.IconH = final.h + 'px'
|
|
396
403
|
this.resetSvg()
|
|
397
404
|
this.item = JSON.parse(JSON.stringify(final))
|
|
405
|
+
this.handleChangeData()
|
|
398
406
|
},
|
|
399
407
|
boxRotateStop (origin, final) {
|
|
400
408
|
this.item = JSON.parse(JSON.stringify(final))
|
|
409
|
+
// 第四象限的角度是负值(开源组件接口返回),转化为正值便于理解
|
|
410
|
+
if (this.item.angle < 0) {
|
|
411
|
+
this.item.angle = this.item.angle + 360
|
|
412
|
+
}
|
|
413
|
+
this.handleChangeData()
|
|
401
414
|
},
|
|
402
415
|
resetSvg () {
|
|
403
416
|
this.reset = false
|
|
@@ -405,8 +418,17 @@ export default {
|
|
|
405
418
|
this.reset = true
|
|
406
419
|
})
|
|
407
420
|
},
|
|
408
|
-
handleSelectIcon (
|
|
421
|
+
handleSelectIcon () {
|
|
409
422
|
this.$emit('handleSelectIcon', this.Data)
|
|
423
|
+
},
|
|
424
|
+
handleChangeData () {
|
|
425
|
+
let data = {
|
|
426
|
+
...this.Data,
|
|
427
|
+
...this.item
|
|
428
|
+
}
|
|
429
|
+
let fields = Object.keys(this.item)
|
|
430
|
+
this.$emit('changeMotorwayItem', data, fields)
|
|
431
|
+
this.handleSelectIcon()
|
|
410
432
|
}
|
|
411
433
|
},
|
|
412
434
|
created () {
|