openatc-components 0.0.102 → 0.0.105
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/BoardCard/BoardCard.vue +6 -1
- package/package/kisscomps/components/Channelization/Channelization.vue +11 -0
- package/package/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +349 -0
- package/package/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -0
- package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +12 -0
- package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +12 -9
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +22 -3
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +83 -17
- package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +11 -0
- package/package/kisscomps/components/KanBan/kanban.vue +7 -7
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +153 -38
- package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +16 -0
- package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +190 -0
- package/package/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -0
- package/package/kisscomps/components/StageStatus/StageStatus.vue +6 -2
- package/package/kisscomps/components/patternList/patternList.vue +5 -0
- package/package/kisscomps/index.js +4 -0
- package/package/kissui.min.js +1 -1
- package/package.json +13 -12
- package/src/i18n/language/en.js +31 -2
- package/src/i18n/language/zh.js +31 -2
- package/src/kisscomps/components/BoardCard/BoardCard.vue +6 -1
- package/src/kisscomps/components/Channelization/Channelization.vue +11 -0
- package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +349 -0
- package/src/kisscomps/components/ChannelizationFlowStatistic/index.js +2 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +12 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +12 -9
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +22 -3
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +83 -17
- package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +11 -0
- package/src/kisscomps/components/KanBan/kanban.vue +7 -7
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +153 -38
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +16 -0
- package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +190 -0
- package/src/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -0
- package/src/kisscomps/components/StageStatus/StageStatus.vue +6 -2
- package/src/kisscomps/components/patternList/patternList.vue +5 -0
- package/src/kisscomps/index.js +4 -0
- package/src/router/index.js +7 -8
- package/src/views/customchannelization.vue +1 -1
- package/src/views/intersection.vue +67 -43
- package/src/views/schemeconfig.vue +2 -2
- package/static/styles/channelizatioon.scss +9 -0
- package/static/styles/commonkanban.scss +27 -27
- package/static/styles/schemeconfig.scss +52 -0
- package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +0 -191
- package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +0 -331
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openatc-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.105",
|
|
4
4
|
"description": "A Vue.js project",
|
|
5
5
|
"author": "openatc developer",
|
|
6
6
|
"private": false,
|
|
@@ -21,24 +21,25 @@
|
|
|
21
21
|
"npm2yuanqu": "npm config set registry http://nexus.ctsp.kedacom.com/content/groups/npm-host-yuanqu/"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
+
"@minogin/vue-drag-resize-rotate": "^1.0.5",
|
|
25
|
+
"@openatc/edgebase-front": "^2.4.0",
|
|
26
|
+
"animate.css": "^3.7.2",
|
|
27
|
+
"axios": "0.21.1",
|
|
28
|
+
"echarts": "^4.9.0",
|
|
29
|
+
"element-ui": "^2.7.2",
|
|
24
30
|
"flatpickr": "^4.5.1",
|
|
25
31
|
"jquery": "^3.3.1",
|
|
32
|
+
"js-cookie": "2.2.0",
|
|
33
|
+
"localStorage": "^1.0.4",
|
|
34
|
+
"moment": "^2.24.0",
|
|
26
35
|
"pend": "^1.2.0",
|
|
36
|
+
"scss-loader": "0.0.1",
|
|
27
37
|
"v-tooltip": "^2.0.0-rc.33",
|
|
28
38
|
"vue": "^2.5.2",
|
|
29
|
-
"vue-router": "^3.0.1",
|
|
30
|
-
"element-ui": "^2.7.2",
|
|
31
|
-
"moment": "^2.24.0",
|
|
32
|
-
"axios": "0.21.1",
|
|
33
|
-
"js-cookie": "2.2.0",
|
|
34
|
-
"localStorage": "^1.0.4",
|
|
35
39
|
"vue-i18n": "^8.7.0",
|
|
36
|
-
"
|
|
37
|
-
"scss-loader": "0.0.1",
|
|
40
|
+
"vue-router": "^3.0.1",
|
|
38
41
|
"vuedraggable": "^2.16.0",
|
|
39
|
-
"
|
|
40
|
-
"echarts": "^4.9.0",
|
|
41
|
-
"@minogin/vue-drag-resize-rotate": "^1.0.5"
|
|
42
|
+
"vuex": "3.0.1"
|
|
42
43
|
},
|
|
43
44
|
"devDependencies": {
|
|
44
45
|
"autoprefixer": "^7.1.2",
|
package/src/i18n/language/en.js
CHANGED
|
@@ -129,6 +129,7 @@ const en = {
|
|
|
129
129
|
'phaseclose': 'Close Phase',
|
|
130
130
|
'phaselocking': 'Priority Control',
|
|
131
131
|
'tentativeplan': 'Tentative Plan',
|
|
132
|
+
'prioritycontrol': 'Priority Control',
|
|
132
133
|
'implement': 'Execute',
|
|
133
134
|
'comfirm': 'Comfirm',
|
|
134
135
|
'ipaddress': 'IP',
|
|
@@ -206,7 +207,34 @@ const en = {
|
|
|
206
207
|
'modelList22': 'Priority Control',
|
|
207
208
|
'modelList23': 'Close Phase',
|
|
208
209
|
'modelList100': 'Tentative Plan',
|
|
209
|
-
'modelList24': '
|
|
210
|
+
'modelList24': 'Priority Control',
|
|
211
|
+
'priorityType': 'Priority Type',
|
|
212
|
+
'priorityPhase': 'Priority Phase',
|
|
213
|
+
'typeOption0': 'Regular Priority',
|
|
214
|
+
'typeOption1': 'Urgent Priority',
|
|
215
|
+
'es': 'East-Straight',
|
|
216
|
+
'el': 'East-Left',
|
|
217
|
+
'er': 'East-Right',
|
|
218
|
+
'eb': 'East-Back',
|
|
219
|
+
'ws': 'West-Straight',
|
|
220
|
+
'wl': 'West-Left',
|
|
221
|
+
'wr': 'West-Right',
|
|
222
|
+
'wb': 'West-Back',
|
|
223
|
+
'ns': 'North-Straight',
|
|
224
|
+
'nl': 'North-Left',
|
|
225
|
+
'nr': 'North-Right',
|
|
226
|
+
'nb': 'North-Back',
|
|
227
|
+
'ss': 'South-Straight',
|
|
228
|
+
'sl': 'South-Left',
|
|
229
|
+
'sr': 'South-Right',
|
|
230
|
+
'sb': 'South-Back',
|
|
231
|
+
'level': 'Level',
|
|
232
|
+
'levelOption': 'LevelOption',
|
|
233
|
+
'levelOption1': '1',
|
|
234
|
+
'levelOption2': '2',
|
|
235
|
+
'levelOption3': '3',
|
|
236
|
+
'levelOption4': '4',
|
|
237
|
+
'levelOption5': '5',
|
|
210
238
|
'modelList99': 'Device Mantenance',
|
|
211
239
|
'tips': 'Tips',
|
|
212
240
|
'exitmanul': 'It is necessary to restore self-control before exiting. Do you want to exit?',
|
|
@@ -1181,7 +1209,8 @@ const en = {
|
|
|
1181
1209
|
'vehiclelane': 'Vehicle lane',
|
|
1182
1210
|
'sidewalk': 'Sidewalk',
|
|
1183
1211
|
'angle': 'Angle',
|
|
1184
|
-
'basicinfo': 'Basic information'
|
|
1212
|
+
'basicinfo': 'Basic information',
|
|
1213
|
+
'importfilesuccess': 'Import of JSON file succeeded!'
|
|
1185
1214
|
}
|
|
1186
1215
|
}
|
|
1187
1216
|
}
|
package/src/i18n/language/zh.js
CHANGED
|
@@ -129,6 +129,34 @@ const zh = {
|
|
|
129
129
|
'phaseclose': '相位关断',
|
|
130
130
|
'phaselocking': '相位锁定',
|
|
131
131
|
'tentativeplan': '临时方案',
|
|
132
|
+
'prioritycontrol': '优先控制',
|
|
133
|
+
'priorityType': '优先类型',
|
|
134
|
+
'priorityPhase': '优先相位',
|
|
135
|
+
'typeOption0': '常规优先',
|
|
136
|
+
'typeOption1': '紧急优先',
|
|
137
|
+
'es': '东直行',
|
|
138
|
+
'el': '东左转',
|
|
139
|
+
'er': '东右转',
|
|
140
|
+
'eb': '东掉头',
|
|
141
|
+
'ws': '西直行',
|
|
142
|
+
'wl': '西左转',
|
|
143
|
+
'wr': '西右转',
|
|
144
|
+
'wb': '西掉头',
|
|
145
|
+
'ns': '北直行',
|
|
146
|
+
'nl': '北左转',
|
|
147
|
+
'nr': '北右转',
|
|
148
|
+
'nb': '北掉头',
|
|
149
|
+
'ss': '南直行',
|
|
150
|
+
'sl': '南左转',
|
|
151
|
+
'sr': '南右转',
|
|
152
|
+
'sb': '南掉头',
|
|
153
|
+
'level': '优先级',
|
|
154
|
+
'levelOption': 'levelOption',
|
|
155
|
+
'levelOption1': '1',
|
|
156
|
+
'levelOption2': '2',
|
|
157
|
+
'levelOption3': '3',
|
|
158
|
+
'levelOption4': '4',
|
|
159
|
+
'levelOption5': '5',
|
|
132
160
|
'implement': '执行',
|
|
133
161
|
'comfirm': '确定',
|
|
134
162
|
'ipaddress': 'IP地址',
|
|
@@ -206,7 +234,7 @@ const zh = {
|
|
|
206
234
|
'modelList22': '相位锁定',
|
|
207
235
|
'modelList23': '相位关断',
|
|
208
236
|
'modelList100': '临时方案',
|
|
209
|
-
'modelList24': '
|
|
237
|
+
'modelList24': '优先控制',
|
|
210
238
|
'modelList99': '设备维护',
|
|
211
239
|
'tips': '提示',
|
|
212
240
|
'exitmanul': '退出前需要先恢复自主控制, 是否退出?',
|
|
@@ -1180,7 +1208,8 @@ const zh = {
|
|
|
1180
1208
|
'vehiclelane': '车道',
|
|
1181
1209
|
'sidewalk': '人行道',
|
|
1182
1210
|
'angle': '旋转角度',
|
|
1183
|
-
'basicinfo': '基础信息'
|
|
1211
|
+
'basicinfo': '基础信息',
|
|
1212
|
+
'importfilesuccess': '导入参数文件成功!'
|
|
1184
1213
|
}
|
|
1185
1214
|
}
|
|
1186
1215
|
}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
:patternStatusList="patternStatusList">
|
|
9
9
|
</StageStatus>
|
|
10
10
|
<PatternStatus
|
|
11
|
+
:showBarrier="showBarrier"
|
|
11
12
|
:localPatternList="localPatternList"
|
|
12
13
|
:contrloType="contrloType"
|
|
13
14
|
:stagesChange="stagesChange"
|
|
@@ -17,7 +18,7 @@
|
|
|
17
18
|
:phaseList="phaseList"
|
|
18
19
|
:cycle="cycle"
|
|
19
20
|
:syncTime="syncTime"
|
|
20
|
-
:style="{'margin-top':cycle ? '25px':'0'}"
|
|
21
|
+
:style="{'margin-top':(cycle || !showBarrier)? '25px':'0'}"
|
|
21
22
|
:patternStatusList="patternStatusList"
|
|
22
23
|
:patternId="patternId"
|
|
23
24
|
:cycles="cycles">
|
|
@@ -52,6 +53,10 @@ export default {
|
|
|
52
53
|
stagesChange: {
|
|
53
54
|
type: Array
|
|
54
55
|
},
|
|
56
|
+
showBarrier: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false
|
|
59
|
+
},
|
|
55
60
|
phaseList: {
|
|
56
61
|
type: Array
|
|
57
62
|
},
|
|
@@ -70,6 +70,10 @@ export default {
|
|
|
70
70
|
AgentId: {
|
|
71
71
|
type: String,
|
|
72
72
|
default: '0'
|
|
73
|
+
},
|
|
74
|
+
resizeMap: { // 重新获取容器大小,调整底图大小
|
|
75
|
+
type: Boolean,
|
|
76
|
+
default: false
|
|
73
77
|
}
|
|
74
78
|
},
|
|
75
79
|
watch: {
|
|
@@ -116,6 +120,13 @@ export default {
|
|
|
116
120
|
this.load('all')
|
|
117
121
|
},
|
|
118
122
|
deep: true
|
|
123
|
+
},
|
|
124
|
+
resizeMap: {
|
|
125
|
+
handler: function (newval, oldval) {
|
|
126
|
+
if (newval === true && oldval === false) {
|
|
127
|
+
this.getParentSize()
|
|
128
|
+
}
|
|
129
|
+
}
|
|
119
130
|
}
|
|
120
131
|
},
|
|
121
132
|
data () {
|
|
@@ -0,0 +1,349 @@
|
|
|
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
|
+
<!--流量统计渠化路口图-->
|
|
13
|
+
<template>
|
|
14
|
+
<div class="show-channelization channelization-base-map" :class="{
|
|
15
|
+
'superlargeCrossImg': bodyDomWidth <= 1680 && bodyDomWidth > 1440,
|
|
16
|
+
'largeCrossImg': bodyDomWidth <= 1440 && bodyDomWidth > 1280,
|
|
17
|
+
'middleCrossImg': bodyDomWidth <= 1280 && bodyDomWidth > 960,
|
|
18
|
+
'smallCrossImg': bodyDomWidth <= 960 && bodyDomWidth > 720,
|
|
19
|
+
'miniCrossImg': bodyDomWidth <= 720 && bodyDomWidth > 650,
|
|
20
|
+
'superminiCrossImg': bodyDomWidth <= 650 && bodyDomWidth > 450,
|
|
21
|
+
'transMiddleCrossImg': bodyDomWidth <= 450 && bodyDomWidth > 350,
|
|
22
|
+
'transMiddleCrossImg2': bodyDomWidth <= 350 && bodyDomWidth > 300,
|
|
23
|
+
'transMiddleCrossImg3': bodyDomWidth <= 300 && bodyDomWidth > 260,
|
|
24
|
+
'transMiniCrossImg': bodyDomWidth <= 260,
|
|
25
|
+
'changePaddingBottom': true }">
|
|
26
|
+
<ChannelizationElements
|
|
27
|
+
ref="channelizationElements"
|
|
28
|
+
UsageMode="show"
|
|
29
|
+
:allitem="allitem"
|
|
30
|
+
:CrossMapVisible="CrossMapVisible"
|
|
31
|
+
:CrossMapData="CrossMapData"
|
|
32
|
+
:isSeletable="isSeletable"
|
|
33
|
+
:Motorways="LanePhaseStatisticsData"
|
|
34
|
+
:Pedwalk="sidewalkPhaseData"
|
|
35
|
+
:Countdown="Countdown"
|
|
36
|
+
:customText="customText"
|
|
37
|
+
:textFontSize="textFontSize"
|
|
38
|
+
:Detector="DetectorData"
|
|
39
|
+
:bcgColor="bcgColor"
|
|
40
|
+
/>
|
|
41
|
+
</div>
|
|
42
|
+
</template>
|
|
43
|
+
|
|
44
|
+
<script>
|
|
45
|
+
import ChannelizationElements from '../DrawChannelization/drawsvg/channelizationElements'
|
|
46
|
+
import { getChannelizatonChart } from '../../../api/cross'
|
|
47
|
+
|
|
48
|
+
export default {
|
|
49
|
+
name: 'channelization-flow-statistic',
|
|
50
|
+
components: {
|
|
51
|
+
ChannelizationElements
|
|
52
|
+
},
|
|
53
|
+
computed: {
|
|
54
|
+
},
|
|
55
|
+
props: {
|
|
56
|
+
phasesStatisticsList: {
|
|
57
|
+
type: Array,
|
|
58
|
+
default: () => []
|
|
59
|
+
},
|
|
60
|
+
AgentId: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: '0'
|
|
63
|
+
},
|
|
64
|
+
resizeMap: { // 重新获取容器大小,调整底图大小
|
|
65
|
+
type: Boolean,
|
|
66
|
+
default: false
|
|
67
|
+
},
|
|
68
|
+
customText: {
|
|
69
|
+
type: String
|
|
70
|
+
},
|
|
71
|
+
bcgColor: {
|
|
72
|
+
type: String
|
|
73
|
+
},
|
|
74
|
+
textFontSize: {
|
|
75
|
+
type: String
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
watch: {
|
|
79
|
+
phasesStatisticsList: {
|
|
80
|
+
handler: function (val) {
|
|
81
|
+
// 相位统计数据数据
|
|
82
|
+
this.phasesStatisticsData = JSON.parse(JSON.stringify(val))
|
|
83
|
+
this.createPhaseStatisticsMap()
|
|
84
|
+
this.getLanePhaseStatusData()
|
|
85
|
+
},
|
|
86
|
+
// 深度观察监听
|
|
87
|
+
deep: true
|
|
88
|
+
},
|
|
89
|
+
AgentId: {
|
|
90
|
+
handler: function (val) {
|
|
91
|
+
// 平台设备切换时,重载当前路口保存的渠化配置
|
|
92
|
+
this.load('all')
|
|
93
|
+
},
|
|
94
|
+
deep: true
|
|
95
|
+
},
|
|
96
|
+
resizeMap: {
|
|
97
|
+
handler: function (newval, oldval) {
|
|
98
|
+
if (newval === true && oldval === false) {
|
|
99
|
+
this.getParentSize()
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
data () {
|
|
105
|
+
return {
|
|
106
|
+
isSeletable: false,
|
|
107
|
+
bodyDomWidth: 352,
|
|
108
|
+
bodyDomSize: {
|
|
109
|
+
width: 1920,
|
|
110
|
+
height: 1080
|
|
111
|
+
},
|
|
112
|
+
CrossMapVisible: true, // 控制底图显示隐藏
|
|
113
|
+
CrossMapData: {
|
|
114
|
+
x: 400,
|
|
115
|
+
y: 100,
|
|
116
|
+
w: 800,
|
|
117
|
+
h: 200,
|
|
118
|
+
angle: 0,
|
|
119
|
+
svgstr: '',
|
|
120
|
+
imgfilesrc: ''
|
|
121
|
+
}, // 管理底图数据
|
|
122
|
+
Motorways: [],
|
|
123
|
+
Texts: [],
|
|
124
|
+
Pedwalk: [],
|
|
125
|
+
Countdown: [],
|
|
126
|
+
Detector: [],
|
|
127
|
+
allitem: {
|
|
128
|
+
x: 435,
|
|
129
|
+
y: 325,
|
|
130
|
+
w: 870,
|
|
131
|
+
h: 650,
|
|
132
|
+
angle: 0
|
|
133
|
+
},
|
|
134
|
+
LanePhaseStatisticsData: [], // 车道相位数据
|
|
135
|
+
phasesStatisticsMap: new Map(), // 相位统计数据映射
|
|
136
|
+
colorMap: new Map([['A', '#009900'], ['B', '#00FF00'], ['C', '#FFFF00'], ['D', '#FF9900'], ['E', '#FF0000'], ['F', '#990000']]),
|
|
137
|
+
sidewalkPhaseData: [], // 行人相位
|
|
138
|
+
DetectorData: [] // 检测器数据(包括车辆和行人)
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
methods: {
|
|
142
|
+
createPhaseStatisticsMap () {
|
|
143
|
+
// 生成相位id和相位状态对应数据结构
|
|
144
|
+
this.phasesStatisticsData.map(phase => {
|
|
145
|
+
let phaseId = phase.phaseno
|
|
146
|
+
let phaseInfo = {
|
|
147
|
+
time: phase.time,
|
|
148
|
+
...phase.phasestatistics
|
|
149
|
+
}
|
|
150
|
+
this.phasesStatisticsMap.set(phaseId, phaseInfo)
|
|
151
|
+
})
|
|
152
|
+
},
|
|
153
|
+
getLanePhaseStatusData () {
|
|
154
|
+
let curLanePhaseData = []
|
|
155
|
+
for (let i = 0; i < this.LanePhaseStatisticsData.length; i++) {
|
|
156
|
+
let curPhaseStatus
|
|
157
|
+
if (this.LanePhaseStatisticsData[i].phasetype === 'phase') {
|
|
158
|
+
console.log(this.phasesStatisticsMap)
|
|
159
|
+
curPhaseStatus = this.phasesStatisticsMap.get(this.LanePhaseStatisticsData[i].phaseid)
|
|
160
|
+
}
|
|
161
|
+
// if (!curPhaseStatus) continue // 没有关联相位的车道不显示
|
|
162
|
+
let data
|
|
163
|
+
if (curPhaseStatus) {
|
|
164
|
+
data = {
|
|
165
|
+
...this.LanePhaseStatisticsData[i],
|
|
166
|
+
congestionindex: curPhaseStatus.congestionindex,
|
|
167
|
+
color: this.colorMap.get(curPhaseStatus.congestionindex)
|
|
168
|
+
}
|
|
169
|
+
} else {
|
|
170
|
+
// 没有关联的,或者没有对应状态的,车道显示默认白色
|
|
171
|
+
data = {
|
|
172
|
+
...this.LanePhaseStatisticsData[i],
|
|
173
|
+
congestionindex: undefined,
|
|
174
|
+
color: '#fff'
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
curLanePhaseData.push(data)
|
|
178
|
+
}
|
|
179
|
+
this.LanePhaseStatisticsData = JSON.parse(JSON.stringify(curLanePhaseData))
|
|
180
|
+
},
|
|
181
|
+
// 加载
|
|
182
|
+
load (type) {
|
|
183
|
+
this.getChannelizatonChart().then((channelizatondata) => {
|
|
184
|
+
console.log(channelizatondata)
|
|
185
|
+
let savedTemp = JSON.parse(JSON.stringify(channelizatondata))
|
|
186
|
+
for (const [key, value] of Object.entries(savedTemp)) {
|
|
187
|
+
if (key === 'vehile') {
|
|
188
|
+
this.Motorways = value
|
|
189
|
+
}
|
|
190
|
+
if (key === 'text') {
|
|
191
|
+
this.Texts = value
|
|
192
|
+
}
|
|
193
|
+
if (key === 'ped') {
|
|
194
|
+
this.Pedwalk = value
|
|
195
|
+
}
|
|
196
|
+
if (key === 'countdown') {
|
|
197
|
+
this.Countdown = value
|
|
198
|
+
}
|
|
199
|
+
if (key === 'detector') {
|
|
200
|
+
this.Detector = value.filter(ele => ele.detailtype === 'detector')
|
|
201
|
+
}
|
|
202
|
+
if (key === 'crossMap') {
|
|
203
|
+
this.CrossMapData = JSON.parse(JSON.stringify(value))
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
this.isSeletable = false
|
|
207
|
+
// 从接口得到所有渠化车道和人行道数据
|
|
208
|
+
this.LanePhaseStatisticsData = JSON.parse(JSON.stringify(this.Motorways))
|
|
209
|
+
this.sidewalkPhaseData = JSON.parse(JSON.stringify(this.Pedwalk))
|
|
210
|
+
this.DetectorData = JSON.parse(JSON.stringify(this.Detector))
|
|
211
|
+
this.getLanePhaseStatusData()
|
|
212
|
+
})
|
|
213
|
+
},
|
|
214
|
+
// 重置
|
|
215
|
+
handleReset () {
|
|
216
|
+
this.Texts = []
|
|
217
|
+
this.Motorways = []
|
|
218
|
+
this.Countdown = []
|
|
219
|
+
this.phaseCountdownList = []
|
|
220
|
+
this.Pedwalk = []
|
|
221
|
+
this.Detector = []
|
|
222
|
+
this.CrossMapData = {
|
|
223
|
+
x: 400,
|
|
224
|
+
y: 100,
|
|
225
|
+
w: 800,
|
|
226
|
+
h: 200,
|
|
227
|
+
angle: 0,
|
|
228
|
+
svgstr: '',
|
|
229
|
+
imgfilesrc: ''
|
|
230
|
+
}
|
|
231
|
+
this.LanePhaseStatisticsData = []
|
|
232
|
+
this.sidewalkPhaseData = []
|
|
233
|
+
this.DetectorData = []
|
|
234
|
+
},
|
|
235
|
+
getChannelizatonChart () {
|
|
236
|
+
// let agentid = getIframdevid()
|
|
237
|
+
// 路口已设置渠化,则总览默认显示渠化路口,未设置显示模版路口
|
|
238
|
+
// if (this.isfromatc === true) {
|
|
239
|
+
// this.$store.dispatch('SetShowHomePage', 'Graphical')
|
|
240
|
+
// }
|
|
241
|
+
this.handleReset()
|
|
242
|
+
return new Promise((resolve, reject) => {
|
|
243
|
+
getChannelizatonChart(this.AgentId).then(data => {
|
|
244
|
+
this.$emit('getChannelizationSetting', data)
|
|
245
|
+
if (!data.data.success) {
|
|
246
|
+
// let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
|
|
247
|
+
// if (data.data.data) {
|
|
248
|
+
// // 子类型错误
|
|
249
|
+
// let childErrorCode = data.data.data.errorCode
|
|
250
|
+
// if (childErrorCode) {
|
|
251
|
+
// let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
|
|
252
|
+
// this.$message.error(parrenterror + ',' + childerror)
|
|
253
|
+
// }
|
|
254
|
+
// } else {
|
|
255
|
+
// this.$message.error(parrenterror)
|
|
256
|
+
// }
|
|
257
|
+
return
|
|
258
|
+
}
|
|
259
|
+
if (JSON.stringify(data.data.data) === '{}') return
|
|
260
|
+
// if (this.isfromatc === true) {
|
|
261
|
+
// this.$store.dispatch('SetShowHomePage', 'Channelization')
|
|
262
|
+
// }
|
|
263
|
+
this.handleReset()
|
|
264
|
+
let channelizatondata = data.data.data
|
|
265
|
+
resolve(channelizatondata)
|
|
266
|
+
})
|
|
267
|
+
})
|
|
268
|
+
},
|
|
269
|
+
getParentSize () {
|
|
270
|
+
// 获取最外层dom尺寸,适配准备
|
|
271
|
+
var _this = this
|
|
272
|
+
this.$nextTick(function () {
|
|
273
|
+
if (this.$el.parentElement === null || this.$el.parentElement === undefined) return
|
|
274
|
+
this.bodyDomSize.width = this.$el.parentElement.clientWidth
|
|
275
|
+
this.bodyDomWidth = this.bodyDomSize.width
|
|
276
|
+
window.addEventListener('resize', () => {
|
|
277
|
+
// 定义窗口大小变更通知事件
|
|
278
|
+
_this.bodyDomSize.width = _this.$el.parentElement.clientWidth
|
|
279
|
+
this.bodyDomWidth = this.bodyDomSize.width
|
|
280
|
+
console.log('resize this.bodyDomSize.width', _this.bodyDomSize.width)
|
|
281
|
+
}, false)
|
|
282
|
+
})
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
created () {
|
|
286
|
+
this.load()
|
|
287
|
+
},
|
|
288
|
+
mounted () {
|
|
289
|
+
this.getParentSize()
|
|
290
|
+
this.phasesStatisticsData = JSON.parse(JSON.stringify(this.phasesStatisticsList))
|
|
291
|
+
this.createPhaseStatisticsMap()
|
|
292
|
+
},
|
|
293
|
+
destroyed () {
|
|
294
|
+
this.handleReset()
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
</script>
|
|
298
|
+
|
|
299
|
+
<style lang="css" rel="stylesheet/scss">
|
|
300
|
+
.show-channelization {
|
|
301
|
+
position: relative;
|
|
302
|
+
}
|
|
303
|
+
.superlargeCrossImg {
|
|
304
|
+
zoom: 1;
|
|
305
|
+
}
|
|
306
|
+
.largeCrossImg {
|
|
307
|
+
zoom: 0.9;
|
|
308
|
+
|
|
309
|
+
}
|
|
310
|
+
.middleCrossImg {
|
|
311
|
+
zoom: 0.8;
|
|
312
|
+
}
|
|
313
|
+
.smallCrossImg {
|
|
314
|
+
zoom: 0.65;
|
|
315
|
+
}
|
|
316
|
+
.miniCrossImg {
|
|
317
|
+
zoom: 0.5;
|
|
318
|
+
}
|
|
319
|
+
.superminiCrossImg {
|
|
320
|
+
zoom: 0.45;
|
|
321
|
+
}
|
|
322
|
+
.minimumCrossImg {
|
|
323
|
+
zoom: 0.35;
|
|
324
|
+
}
|
|
325
|
+
.transMiddleCrossImg {
|
|
326
|
+
-webkit-transform-origin-y: 0;
|
|
327
|
+
transform: scale(0.55);
|
|
328
|
+
margin-top: 3%;
|
|
329
|
+
padding: 0PX;
|
|
330
|
+
}
|
|
331
|
+
.transMiddleCrossImg2 {
|
|
332
|
+
-webkit-transform-origin-y: 0;
|
|
333
|
+
transform: scale(0.38);
|
|
334
|
+
margin-top: -1.5%;
|
|
335
|
+
padding: 0PX;
|
|
336
|
+
}
|
|
337
|
+
.transMiddleCrossImg3 {
|
|
338
|
+
-webkit-transform-origin-y: 0;
|
|
339
|
+
transform: scale(0.32);
|
|
340
|
+
margin-top: -1%;
|
|
341
|
+
padding: 0PX;
|
|
342
|
+
}
|
|
343
|
+
.transMiniCrossImg {
|
|
344
|
+
-webkit-transform-origin-y: 0;
|
|
345
|
+
transform: scale(0.28);
|
|
346
|
+
margin-top: -1.6%;
|
|
347
|
+
padding: 0PX;
|
|
348
|
+
}
|
|
349
|
+
</style>
|
|
@@ -68,6 +68,9 @@
|
|
|
68
68
|
:isSeletable="isSeletable"
|
|
69
69
|
:CountdownList="CountdownList"
|
|
70
70
|
:isHasPhase="isHasPhase"
|
|
71
|
+
:bcgColor="bcgColor"
|
|
72
|
+
:customText="customText"
|
|
73
|
+
:textFontSize="textFontSize"
|
|
71
74
|
@changeTimeItem="changeTimeItem"
|
|
72
75
|
@handleSelectIcon="handleSelectIcon"
|
|
73
76
|
/>
|
|
@@ -186,6 +189,15 @@ export default {
|
|
|
186
189
|
isLockedCrossMap: { // 是否锁定底图(是否允许编辑底图位置,角度等)
|
|
187
190
|
type: Boolean,
|
|
188
191
|
default: true
|
|
192
|
+
},
|
|
193
|
+
customText: {
|
|
194
|
+
type: String
|
|
195
|
+
},
|
|
196
|
+
bcgColor: {
|
|
197
|
+
type: String
|
|
198
|
+
},
|
|
199
|
+
textFontSize: {
|
|
200
|
+
type: String
|
|
189
201
|
}
|
|
190
202
|
},
|
|
191
203
|
data () {
|
|
@@ -119,15 +119,18 @@ export default {
|
|
|
119
119
|
this.handleChangeData()
|
|
120
120
|
},
|
|
121
121
|
synchroSVGSize () {
|
|
122
|
-
let
|
|
123
|
-
if (
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
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
|
+
}
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
136
|
},
|
|
@@ -28,12 +28,12 @@
|
|
|
28
28
|
@rotatestop="boxRotateStop(item, ...arguments)"
|
|
29
29
|
>
|
|
30
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'}">
|
|
31
|
-
<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'}">
|
|
32
32
|
{{$t('openatccomponents.channelizationmap.countdown')}}
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
35
|
-
<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'}">
|
|
36
|
-
<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'}">
|
|
37
37
|
<div v-if="phaseCountdownList.length > 0">
|
|
38
38
|
<div v-for="curPhase in phaseCountdownList" :key="curPhase.id" :style="{color: curPhase.phaseCountdownColor}">
|
|
39
39
|
<span style="float: left;color: #fff;margin-right: 5px;">{{$t('openatccomponents.overview.phase')}}{{curPhase.id}}:</span>
|
|
@@ -42,6 +42,11 @@
|
|
|
42
42
|
</div>
|
|
43
43
|
</div>
|
|
44
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>
|
|
45
50
|
</drr>
|
|
46
51
|
</div>
|
|
47
52
|
</template>
|
|
@@ -111,6 +116,19 @@ export default {
|
|
|
111
116
|
isHasPhase: {
|
|
112
117
|
type: Boolean,
|
|
113
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
|
|
114
132
|
}
|
|
115
133
|
},
|
|
116
134
|
methods: {
|
|
@@ -139,6 +157,7 @@ export default {
|
|
|
139
157
|
},
|
|
140
158
|
culculateFontsize () {
|
|
141
159
|
// 根据倒计时图标大小,动态计算内部文字大小
|
|
160
|
+
if (this.textFontSize) return
|
|
142
161
|
this.Fontsize = Math.floor(this.CountdownData.w / 140 * 20)
|
|
143
162
|
if (this.Fontsize < 14) {
|
|
144
163
|
this.Fontsize = 14
|