openatc-components 0.0.103 → 0.0.106
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 +11 -14
- package/package/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +348 -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 +7 -3
- package/src/i18n/language/zh.js +6 -2
- package/src/kisscomps/components/Channelization/Channelization.vue +11 -14
- package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +348 -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/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +0 -191
- package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +0 -331
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +0 -191
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +0 -331
package/package.json
CHANGED
package/src/i18n/language/en.js
CHANGED
|
@@ -1184,6 +1184,7 @@ const en = {
|
|
|
1184
1184
|
'xpedestrian': 'X Pedestrian',
|
|
1185
1185
|
'sectionpedestrian': 'Section Pedestrian',
|
|
1186
1186
|
'delete': 'Delete',
|
|
1187
|
+
'clone': 'Clone',
|
|
1187
1188
|
'drawtips': 'Click add on the intersection map after selection',
|
|
1188
1189
|
'canclesetting': 'Cancel the channelization setting of the current intersection?',
|
|
1189
1190
|
'phaseassociated': 'Phase Associated',
|
|
@@ -1197,8 +1198,8 @@ const en = {
|
|
|
1197
1198
|
'pedestriandetector': 'Pedestrian Detector',
|
|
1198
1199
|
'detectorassociated': 'Detector Associated',
|
|
1199
1200
|
'detectorthreshold': 'Detector Threshold',
|
|
1200
|
-
'occupancythreshold': '
|
|
1201
|
-
'saturationthreshold': 'Flow Saturation
|
|
1201
|
+
'occupancythreshold': 'Greenlight Utilization Threshold',
|
|
1202
|
+
'saturationthreshold': 'Flow Saturation Threshold',
|
|
1202
1203
|
'checkthreshold': 'The threshold value cannot be blank. Please fill in a positive integer within the range of 0-100!',
|
|
1203
1204
|
'pedestriancrossing': 'Pedestrian crossing',
|
|
1204
1205
|
'pedestriansecondarycrossing': 'Pedestrian secondary crossing',
|
|
@@ -1206,7 +1207,10 @@ const en = {
|
|
|
1206
1207
|
'sectionpedestriancrossing': 'Section pedestrian crossing',
|
|
1207
1208
|
'flipdisplay': 'Flip display',
|
|
1208
1209
|
'vehiclelane': 'Vehicle lane',
|
|
1209
|
-
'sidewalk': 'Sidewalk'
|
|
1210
|
+
'sidewalk': 'Sidewalk',
|
|
1211
|
+
'angle': 'Angle',
|
|
1212
|
+
'basicinfo': 'Basic information',
|
|
1213
|
+
'importfilesuccess': 'Import of JSON file succeeded!'
|
|
1210
1214
|
}
|
|
1211
1215
|
}
|
|
1212
1216
|
}
|
package/src/i18n/language/zh.js
CHANGED
|
@@ -1183,6 +1183,7 @@ const zh = {
|
|
|
1183
1183
|
'xpedestrian': '斜向行人',
|
|
1184
1184
|
'sectionpedestrian': '路段行人',
|
|
1185
1185
|
'delete': '删除',
|
|
1186
|
+
'clone': '克隆',
|
|
1186
1187
|
'drawtips': '选择后在路口图上点击添加',
|
|
1187
1188
|
'canclesetting': '是否取消当前路口渠化设置?',
|
|
1188
1189
|
'phaseassociated': '相位关联',
|
|
@@ -1196,7 +1197,7 @@ const zh = {
|
|
|
1196
1197
|
'pedestriandetector': '行人检测器',
|
|
1197
1198
|
'detectorassociated': '检测器关联',
|
|
1198
1199
|
'detectorthreshold': '检测器阈值',
|
|
1199
|
-
'occupancythreshold': '
|
|
1200
|
+
'occupancythreshold': '绿灯利用率阈值',
|
|
1200
1201
|
'saturationthreshold': '流量饱和度阈值',
|
|
1201
1202
|
'checkthreshold': '阈值不可为空,请填0-100范围内的正整数!',
|
|
1202
1203
|
'pedestriancrossing': '行人过街',
|
|
@@ -1205,7 +1206,10 @@ const zh = {
|
|
|
1205
1206
|
'sectionpedestriancrossing': '路段行人过街',
|
|
1206
1207
|
'flipdisplay': '翻转显示',
|
|
1207
1208
|
'vehiclelane': '车道',
|
|
1208
|
-
'sidewalk': '人行道'
|
|
1209
|
+
'sidewalk': '人行道',
|
|
1210
|
+
'angle': '旋转角度',
|
|
1211
|
+
'basicinfo': '基础信息',
|
|
1212
|
+
'importfilesuccess': '导入参数文件成功!'
|
|
1209
1213
|
}
|
|
1210
1214
|
}
|
|
1211
1215
|
}
|
|
@@ -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
|
}
|
|
@@ -345,7 +342,7 @@ export default {
|
|
|
345
342
|
this.handleReset()
|
|
346
343
|
return new Promise((resolve, reject) => {
|
|
347
344
|
getChannelizatonChart(this.AgentId).then(data => {
|
|
348
|
-
this.$emit('getChannelizationSetting', data)
|
|
345
|
+
// this.$emit('getChannelizationSetting', data)
|
|
349
346
|
if (!data.data.success) {
|
|
350
347
|
// let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
|
|
351
348
|
// if (data.data.data) {
|
|
@@ -0,0 +1,348 @@
|
|
|
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
|
+
if (!data.data.success) {
|
|
245
|
+
// let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
|
|
246
|
+
// if (data.data.data) {
|
|
247
|
+
// // 子类型错误
|
|
248
|
+
// let childErrorCode = data.data.data.errorCode
|
|
249
|
+
// if (childErrorCode) {
|
|
250
|
+
// let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
|
|
251
|
+
// this.$message.error(parrenterror + ',' + childerror)
|
|
252
|
+
// }
|
|
253
|
+
// } else {
|
|
254
|
+
// this.$message.error(parrenterror)
|
|
255
|
+
// }
|
|
256
|
+
return
|
|
257
|
+
}
|
|
258
|
+
if (JSON.stringify(data.data.data) === '{}') return
|
|
259
|
+
// if (this.isfromatc === true) {
|
|
260
|
+
// this.$store.dispatch('SetShowHomePage', 'Channelization')
|
|
261
|
+
// }
|
|
262
|
+
this.handleReset()
|
|
263
|
+
let channelizatondata = data.data.data
|
|
264
|
+
resolve(channelizatondata)
|
|
265
|
+
})
|
|
266
|
+
})
|
|
267
|
+
},
|
|
268
|
+
getParentSize () {
|
|
269
|
+
// 获取最外层dom尺寸,适配准备
|
|
270
|
+
var _this = this
|
|
271
|
+
this.$nextTick(function () {
|
|
272
|
+
if (this.$el.parentElement === null || this.$el.parentElement === undefined) return
|
|
273
|
+
this.bodyDomSize.width = this.$el.parentElement.clientWidth
|
|
274
|
+
this.bodyDomWidth = this.bodyDomSize.width
|
|
275
|
+
window.addEventListener('resize', () => {
|
|
276
|
+
// 定义窗口大小变更通知事件
|
|
277
|
+
_this.bodyDomSize.width = _this.$el.parentElement.clientWidth
|
|
278
|
+
this.bodyDomWidth = this.bodyDomSize.width
|
|
279
|
+
console.log('resize this.bodyDomSize.width', _this.bodyDomSize.width)
|
|
280
|
+
}, false)
|
|
281
|
+
})
|
|
282
|
+
}
|
|
283
|
+
},
|
|
284
|
+
created () {
|
|
285
|
+
this.load()
|
|
286
|
+
},
|
|
287
|
+
mounted () {
|
|
288
|
+
this.getParentSize()
|
|
289
|
+
this.phasesStatisticsData = JSON.parse(JSON.stringify(this.phasesStatisticsList))
|
|
290
|
+
this.createPhaseStatisticsMap()
|
|
291
|
+
},
|
|
292
|
+
destroyed () {
|
|
293
|
+
this.handleReset()
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
</script>
|
|
297
|
+
|
|
298
|
+
<style lang="css" rel="stylesheet/scss">
|
|
299
|
+
.show-channelization {
|
|
300
|
+
position: relative;
|
|
301
|
+
}
|
|
302
|
+
.superlargeCrossImg {
|
|
303
|
+
zoom: 1;
|
|
304
|
+
}
|
|
305
|
+
.largeCrossImg {
|
|
306
|
+
zoom: 0.9;
|
|
307
|
+
|
|
308
|
+
}
|
|
309
|
+
.middleCrossImg {
|
|
310
|
+
zoom: 0.8;
|
|
311
|
+
}
|
|
312
|
+
.smallCrossImg {
|
|
313
|
+
zoom: 0.65;
|
|
314
|
+
}
|
|
315
|
+
.miniCrossImg {
|
|
316
|
+
zoom: 0.5;
|
|
317
|
+
}
|
|
318
|
+
.superminiCrossImg {
|
|
319
|
+
zoom: 0.45;
|
|
320
|
+
}
|
|
321
|
+
.minimumCrossImg {
|
|
322
|
+
zoom: 0.35;
|
|
323
|
+
}
|
|
324
|
+
.transMiddleCrossImg {
|
|
325
|
+
-webkit-transform-origin-y: 0;
|
|
326
|
+
transform: scale(0.55);
|
|
327
|
+
margin-top: 3%;
|
|
328
|
+
padding: 0PX;
|
|
329
|
+
}
|
|
330
|
+
.transMiddleCrossImg2 {
|
|
331
|
+
-webkit-transform-origin-y: 0;
|
|
332
|
+
transform: scale(0.38);
|
|
333
|
+
margin-top: -1.5%;
|
|
334
|
+
padding: 0PX;
|
|
335
|
+
}
|
|
336
|
+
.transMiddleCrossImg3 {
|
|
337
|
+
-webkit-transform-origin-y: 0;
|
|
338
|
+
transform: scale(0.32);
|
|
339
|
+
margin-top: -1%;
|
|
340
|
+
padding: 0PX;
|
|
341
|
+
}
|
|
342
|
+
.transMiniCrossImg {
|
|
343
|
+
-webkit-transform-origin-y: 0;
|
|
344
|
+
transform: scale(0.28);
|
|
345
|
+
margin-top: -1.6%;
|
|
346
|
+
padding: 0PX;
|
|
347
|
+
}
|
|
348
|
+
</style>
|
|
@@ -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="
|
|
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"
|
|
@@ -78,6 +68,9 @@
|
|
|
78
68
|
:isSeletable="isSeletable"
|
|
79
69
|
:CountdownList="CountdownList"
|
|
80
70
|
:isHasPhase="isHasPhase"
|
|
71
|
+
:bcgColor="bcgColor"
|
|
72
|
+
:customText="customText"
|
|
73
|
+
:textFontSize="textFontSize"
|
|
81
74
|
@changeTimeItem="changeTimeItem"
|
|
82
75
|
@handleSelectIcon="handleSelectIcon"
|
|
83
76
|
/>
|
|
@@ -105,15 +98,16 @@
|
|
|
105
98
|
@changeDetectorItem="changeDetectorItem"
|
|
106
99
|
@handleSelectIcon="handleSelectIcon"
|
|
107
100
|
/>
|
|
108
|
-
<DetectorChart
|
|
101
|
+
<!-- <DetectorChart
|
|
109
102
|
:UsageMode="UsageMode"
|
|
110
103
|
v-for="detchartitem in DetectorChart"
|
|
111
104
|
:key="'detectorchart-' + detchartitem.index"
|
|
112
105
|
:chooseIndex="curChooseIconIndex"
|
|
113
106
|
:DetectorChartData="detchartitem"
|
|
107
|
+
:Detector="Detector"
|
|
114
108
|
:isSeletable="isSeletable"
|
|
115
109
|
@changeDetectorChartItem="changeDetectorChartItem"
|
|
116
|
-
@handleSelectIcon="handleSelectIcon" />
|
|
110
|
+
@handleSelectIcon="handleSelectIcon" /> -->
|
|
117
111
|
</drr>
|
|
118
112
|
</div>
|
|
119
113
|
</template>
|
|
@@ -133,7 +127,6 @@ export default {
|
|
|
133
127
|
CrossMap,
|
|
134
128
|
EditableText,
|
|
135
129
|
MotorwayIconSvg,
|
|
136
|
-
// BicyclelanesIconSvg,
|
|
137
130
|
CountdownIcon,
|
|
138
131
|
PedroadIconSvg,
|
|
139
132
|
DetectorIconSvg,
|
|
@@ -192,6 +185,19 @@ export default {
|
|
|
192
185
|
},
|
|
193
186
|
CurChooseIcon: {
|
|
194
187
|
type: Object
|
|
188
|
+
},
|
|
189
|
+
isLockedCrossMap: { // 是否锁定底图(是否允许编辑底图位置,角度等)
|
|
190
|
+
type: Boolean,
|
|
191
|
+
default: true
|
|
192
|
+
},
|
|
193
|
+
customText: {
|
|
194
|
+
type: String
|
|
195
|
+
},
|
|
196
|
+
bcgColor: {
|
|
197
|
+
type: String
|
|
198
|
+
},
|
|
199
|
+
textFontSize: {
|
|
200
|
+
type: String
|
|
195
201
|
}
|
|
196
202
|
},
|
|
197
203
|
data () {
|
|
@@ -206,8 +212,8 @@ export default {
|
|
|
206
212
|
changeMotorwayItem (MotorwayItem, fields) {
|
|
207
213
|
this.$emit('changeMotorwayItem', MotorwayItem, fields)
|
|
208
214
|
},
|
|
209
|
-
handleSelectIcon (iconobj) {
|
|
210
|
-
this.$emit('handleSelectIcon', iconobj)
|
|
215
|
+
handleSelectIcon (iconobj, isCrossMap) {
|
|
216
|
+
this.$emit('handleSelectIcon', iconobj, isCrossMap)
|
|
211
217
|
},
|
|
212
218
|
changeText (textobj, fields) {
|
|
213
219
|
this.$emit('changeText', textobj, fields)
|