openatc-components 0.2.25 → 0.2.27
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/DirectionListConfiguration/DirectionListConfiguration.vue +49 -49
- package/package/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +39 -8
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +1 -1
- package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +3 -0
- package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +49 -2
- package/package/kisscomps/components/patternConfig/planContent.vue +3 -0
- package/package/kissui.min.js +1 -1
- package/package.json +2 -2
- package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +49 -49
- package/src/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +39 -8
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +1 -1
- package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +3 -0
- package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +49 -2
- package/src/kisscomps/components/patternConfig/planContent.vue +3 -0
- package/src/views/intersection.vue +11 -5
- package/src/views/patternConfig.vue +6 -969
package/package/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue
CHANGED
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
import xdrdirselector from '../XRDDirSelector/XRDDirSelector'
|
|
48
48
|
import { uploadSingleTscParam } from '../../../api/param.js'
|
|
49
49
|
import { getMessageByCode } from '../../../utils/responseMessage.js'
|
|
50
|
-
import { getIntersectionInfo } from '../../../api/template.js'
|
|
50
|
+
// import { getIntersectionInfo } from '../../../api/template.js'
|
|
51
51
|
import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
|
|
52
52
|
import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
|
|
53
53
|
// import { getTheme } from '../../../utils/auth'
|
|
@@ -100,57 +100,57 @@ export default {
|
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
102
|
methods: {
|
|
103
|
-
init () {
|
|
103
|
+
init (IntersectionInfo) {
|
|
104
104
|
this.CrossDiagramMgr = new CrossDiagramMgr()
|
|
105
105
|
this.PhaseDataModel = new PhaseDataModel(this.roadDirection)
|
|
106
|
-
this.getIntersectionInfo() // 获取路口信息
|
|
106
|
+
this.getIntersectionInfo(IntersectionInfo) // 获取路口信息
|
|
107
107
|
},
|
|
108
|
-
getIntersectionInfo () {
|
|
108
|
+
getIntersectionInfo (res) {
|
|
109
109
|
// 获取路口信息
|
|
110
|
-
const agentid = this.agentId || '0'
|
|
111
|
-
getIntersectionInfo(agentid).then(res => {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
})
|
|
110
|
+
// const agentid = this.agentId || '0'
|
|
111
|
+
// getIntersectionInfo(agentid).then(res => {
|
|
112
|
+
// if (!res.data.success) {
|
|
113
|
+
// this.isLoaded = false
|
|
114
|
+
// let commomMsg = this.$t('openatccomponents.overview.signalID') + ' : ' + agentid
|
|
115
|
+
// let msg = getMessageByCode(res.data.code, this.$i18n.locale)
|
|
116
|
+
// if (res.data.data) {
|
|
117
|
+
// // 子类型错误
|
|
118
|
+
// let childErrorCode = res.data.data.errorCode
|
|
119
|
+
// if (childErrorCode) {
|
|
120
|
+
// let childerror = getMessageByCode(res.data.data.errorCode, this.$i18n.locale)
|
|
121
|
+
// msg = msg + ' - ' + childerror
|
|
122
|
+
// }
|
|
123
|
+
// }
|
|
124
|
+
// msg = msg + ' - ' + commomMsg
|
|
125
|
+
// this.$message.error(msg)
|
|
126
|
+
// return
|
|
127
|
+
// }
|
|
128
|
+
this.tempType = res.data.data.type
|
|
129
|
+
// 获取车道相位、行人相位信息(坐标、名称)
|
|
130
|
+
this.mainType = this.tempType.split('-')[0]
|
|
131
|
+
this.mainDirection = this.tempType.split('-')[1]
|
|
132
|
+
if (!this.isThirdSignal) {
|
|
133
|
+
// 可点击模式下,非第三方设备,按通道显示相位方向
|
|
134
|
+
this.getChannelInfo()
|
|
135
|
+
return
|
|
136
|
+
}
|
|
137
|
+
this.crossInfo = res.data.data.param
|
|
138
|
+
// 城市道路加载车道相位坐标和人行道坐标
|
|
139
|
+
this.getPhasePos()
|
|
140
|
+
this.getOverlapPhasePos()
|
|
141
|
+
this.getPedPhasePos()
|
|
142
|
+
this.getOverlapPedPhasePos()
|
|
143
|
+
if (this.isThirdSignal) {
|
|
144
|
+
// 第三方设备,按相位方向显示相位方向
|
|
145
|
+
this.compLanePhaseData = this.CrossDiagramMgr.compare(this.LanePhaseData, this.overlapLanePhaseData, 'type', 'nostatus')
|
|
146
|
+
this.compSidewalkPhaseData = this.CrossDiagramMgr.compare(this.sidewalkPhaseData, this.overlapsidewalkPhaseData, 'pedtype', 'nostatus')
|
|
147
|
+
let allDir = this.compLanePhaseData.map(ele => ele.id)
|
|
148
|
+
let allPedDir = this.compSidewalkPhaseData.map(ele => ele.id)
|
|
149
|
+
this.inneChoosedDirection = this.choosedDirection.filter(dir => allDir.indexOf(dir) !== -1)
|
|
150
|
+
this.inneChoosedPedDirection = this.choosedPedDirection.filter(dir => allPedDir.indexOf(dir) !== -1)
|
|
151
|
+
this.drawPhaseIcon()
|
|
152
|
+
}
|
|
153
|
+
// })
|
|
154
154
|
},
|
|
155
155
|
getPhasePos () {
|
|
156
156
|
// 车道相位信息
|
|
@@ -448,7 +448,7 @@ export default {
|
|
|
448
448
|
}
|
|
449
449
|
},
|
|
450
450
|
mounted () {
|
|
451
|
-
this.init()
|
|
451
|
+
// this.init()
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
454
|
</script>
|
|
@@ -1,19 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="intersection-direction-selection">
|
|
2
|
+
<div class="intersection-direction-selection" v-if="isSpecialIntersection !== undefined">
|
|
3
3
|
<intersection-base-map
|
|
4
|
-
v-if="!isSpecialIntersection"
|
|
4
|
+
v-if="!isSpecialIntersection && reset"
|
|
5
5
|
ref="intersectionMap2"
|
|
6
6
|
:crossStatusData="crossStatusData"
|
|
7
7
|
:agentId="agentId"
|
|
8
8
|
isVipRoute
|
|
9
|
-
clickMode
|
|
9
|
+
:clickMode="clickMode"
|
|
10
10
|
:isThirdSignal="isThirdSignal"
|
|
11
11
|
:choosedDirection="choosedDirection"
|
|
12
12
|
:choosedPedDirection="choosedPedDirection"
|
|
13
13
|
:roadDirection="roadDirection"
|
|
14
14
|
@handleClickCrossIcon="handleClickCrossIcon" />
|
|
15
15
|
<direction-list-configuration
|
|
16
|
-
v-if="isSpecialIntersection"
|
|
16
|
+
v-if="isSpecialIntersection && clickMode && reset"
|
|
17
|
+
ref="listConfiguration"
|
|
17
18
|
:agentId="agentId"
|
|
18
19
|
:isThirdSignal="isThirdSignal"
|
|
19
20
|
:choosedDirection="choosedDirection"
|
|
@@ -34,8 +35,9 @@ export default {
|
|
|
34
35
|
data () {
|
|
35
36
|
return {
|
|
36
37
|
crossStatusData: {},
|
|
37
|
-
isSpecialIntersection:
|
|
38
|
-
isThirdSignal: false
|
|
38
|
+
isSpecialIntersection: undefined,
|
|
39
|
+
isThirdSignal: false,
|
|
40
|
+
reset: true
|
|
39
41
|
}
|
|
40
42
|
},
|
|
41
43
|
props: {
|
|
@@ -55,6 +57,23 @@ export default {
|
|
|
55
57
|
},
|
|
56
58
|
thirdSignal: { // 是否是第三方平台(可以直接传,也可以内部接口判断)
|
|
57
59
|
type: Boolean
|
|
60
|
+
},
|
|
61
|
+
clickMode: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: true
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
watch: {
|
|
67
|
+
agentId: {
|
|
68
|
+
handler: function (val, oldVal) {
|
|
69
|
+
if (val) {
|
|
70
|
+
this.reset = false
|
|
71
|
+
this.$nextTick(() => {
|
|
72
|
+
this.reset = true
|
|
73
|
+
this.initSelection()
|
|
74
|
+
})
|
|
75
|
+
}
|
|
76
|
+
}
|
|
58
77
|
}
|
|
59
78
|
},
|
|
60
79
|
methods: {
|
|
@@ -87,6 +106,11 @@ export default {
|
|
|
87
106
|
this.mainType = this.tempType.split('-')[0]
|
|
88
107
|
if (this.mainType === '999') {
|
|
89
108
|
this.isSpecialIntersection = true
|
|
109
|
+
if (this.clickMode) {
|
|
110
|
+
this.$nextTick(() => {
|
|
111
|
+
this.$refs.listConfiguration.init(res)
|
|
112
|
+
})
|
|
113
|
+
}
|
|
90
114
|
} else {
|
|
91
115
|
this.isSpecialIntersection = false
|
|
92
116
|
}
|
|
@@ -113,15 +137,22 @@ export default {
|
|
|
113
137
|
},
|
|
114
138
|
handleClickCrossIcon (allChoosedDir, curClickedPhase) {
|
|
115
139
|
this.$emit('handleClickCrossIcon', allChoosedDir, curClickedPhase)
|
|
140
|
+
},
|
|
141
|
+
initSelection () {
|
|
142
|
+
this.getIntersectionInfo()
|
|
143
|
+
this.getPlatform()
|
|
116
144
|
}
|
|
117
145
|
},
|
|
118
146
|
mounted () {
|
|
119
|
-
this.
|
|
120
|
-
this.getPlatform()
|
|
147
|
+
this.initSelection()
|
|
121
148
|
},
|
|
122
149
|
destroyed () {
|
|
123
150
|
}
|
|
124
151
|
}
|
|
125
152
|
</script>
|
|
126
153
|
<style lang='scss'>
|
|
154
|
+
.intersection-direction-selection {
|
|
155
|
+
width: 100%;
|
|
156
|
+
height: 100%
|
|
157
|
+
}
|
|
127
158
|
</style>
|
|
@@ -433,7 +433,7 @@ export default {
|
|
|
433
433
|
getStage () {
|
|
434
434
|
if (!this.stagesChange) return
|
|
435
435
|
const globalParamModel = this.$store.getters.globalParamModel
|
|
436
|
-
let pattern =
|
|
436
|
+
let pattern = this.allPatternList ? this.allPatternList : globalParamModel.getParamsByType('patternList')
|
|
437
437
|
let mapAdd = pattern.map(item => item.stagesList).map(item => {
|
|
438
438
|
return item.map(val => {
|
|
439
439
|
return val.stageSplit ? val.stageSplit : val.split
|
|
@@ -1162,6 +1162,9 @@ export default {
|
|
|
1162
1162
|
} else {
|
|
1163
1163
|
submitdata.data.cycle = this.getMaxCycle(this.patternOne[0])
|
|
1164
1164
|
}
|
|
1165
|
+
this.patternOne[0].stagesList.forEach((stage) => {
|
|
1166
|
+
delete stage.split
|
|
1167
|
+
})
|
|
1165
1168
|
submitdata.data.stagesList = this.patternOne[0].stagesList
|
|
1166
1169
|
}
|
|
1167
1170
|
submitdata.data.offset = this.offset
|
|
@@ -76,13 +76,28 @@
|
|
|
76
76
|
<el-table-column align="center" :label="$t('openatccomponents.pattern.plan')">
|
|
77
77
|
<template slot-scope="scope">
|
|
78
78
|
<div class="pattern-figure">
|
|
79
|
-
<pattern-list
|
|
79
|
+
<!-- <pattern-list
|
|
80
80
|
:patternStatusList="scope.row.rings"
|
|
81
81
|
:cycles="scope.row.cycle"
|
|
82
82
|
:phaseList="scope.row.currPhase"
|
|
83
|
+
:contrloType="controlType"
|
|
83
84
|
>
|
|
85
|
+
</pattern-list> -->
|
|
86
|
+
<pattern-list
|
|
87
|
+
:patternId="scope.row.patternid"
|
|
88
|
+
:contrloType="getControlType(scope.row)"
|
|
89
|
+
:index="scope.$index"
|
|
90
|
+
:cycleChange="true"
|
|
91
|
+
:stagesChange="getSelectedPattern(scope.row).stagesList"
|
|
92
|
+
:patternStatusList="getSelectedPattern(scope.row).rings"
|
|
93
|
+
:patternList="scope.row.allPatterns"
|
|
94
|
+
:allPatternList="scope.row.allPatterns"
|
|
95
|
+
:cycles="scope.row.cycle"
|
|
96
|
+
:phaseList="scope.row.currPhase"
|
|
97
|
+
:agentId="scope.row.agentid"
|
|
98
|
+
:showBarrier="false">
|
|
84
99
|
</pattern-list>
|
|
85
|
-
|
|
100
|
+
</div>
|
|
86
101
|
</template>
|
|
87
102
|
</el-table-column>
|
|
88
103
|
</el-table>
|
|
@@ -114,6 +129,7 @@ export default {
|
|
|
114
129
|
},
|
|
115
130
|
data () {
|
|
116
131
|
return {
|
|
132
|
+
controlType: 'stage',
|
|
117
133
|
loading: true,
|
|
118
134
|
tableHeight: 460,
|
|
119
135
|
screenHeight: window.innerHeight, // 屏幕高度
|
|
@@ -179,6 +195,9 @@ export default {
|
|
|
179
195
|
let currPattern
|
|
180
196
|
if (Array.isArray(currPatternList)) {
|
|
181
197
|
currPattern = currPatternList.filter(cpl => cpl.id === patternId)[0]
|
|
198
|
+
if (!currPattern) {
|
|
199
|
+
currPattern = currPatternList[0]
|
|
200
|
+
}
|
|
182
201
|
} else {
|
|
183
202
|
currPattern = currPatternList
|
|
184
203
|
}
|
|
@@ -292,6 +311,34 @@ export default {
|
|
|
292
311
|
}
|
|
293
312
|
return res
|
|
294
313
|
},
|
|
314
|
+
getControlType (row) {
|
|
315
|
+
let contrloType = 'ring'
|
|
316
|
+
let allPatternList = row.feature && row.feature.patternList ? row.feature.patternList : row.allPatterns
|
|
317
|
+
if (
|
|
318
|
+
!allPatternList[0].contrloType &&
|
|
319
|
+
allPatternList[0].rings.length > 0
|
|
320
|
+
) {
|
|
321
|
+
contrloType = 'ring'
|
|
322
|
+
} else if (
|
|
323
|
+
!allPatternList[0].contrloType &&
|
|
324
|
+
allPatternList[0].rings.length === 0
|
|
325
|
+
) {
|
|
326
|
+
contrloType = 'stage'
|
|
327
|
+
} else {
|
|
328
|
+
contrloType = allPatternList[0].contrloType
|
|
329
|
+
}
|
|
330
|
+
let res = contrloType
|
|
331
|
+
return res
|
|
332
|
+
},
|
|
333
|
+
getSelectedPattern (row) {
|
|
334
|
+
let res = []
|
|
335
|
+
let patternList = row.feature && row.feature.patternList ? row.feature.patternList : row.allPatterns
|
|
336
|
+
let pattern = patternList.find(item => item.id === row.patternid)
|
|
337
|
+
if (pattern) {
|
|
338
|
+
res = pattern
|
|
339
|
+
}
|
|
340
|
+
return res
|
|
341
|
+
},
|
|
295
342
|
getCurPattern (agentid) {
|
|
296
343
|
// 获取当前设备所有可选方案
|
|
297
344
|
this.loading = true
|
|
@@ -170,6 +170,9 @@ export default {
|
|
|
170
170
|
let currPattern
|
|
171
171
|
if (Array.isArray(currPatternList)) {
|
|
172
172
|
currPattern = currPatternList.filter(cpl => cpl.id === patternId)[0]
|
|
173
|
+
if (!currPattern) {
|
|
174
|
+
currPattern = currPatternList[0]
|
|
175
|
+
}
|
|
173
176
|
} else {
|
|
174
177
|
currPattern = currPatternList
|
|
175
178
|
}
|