openatc-components 0.0.13 → 0.0.16
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 +85 -0
- package/package/kisscomps/components/BoardCard/index.js +2 -0
- package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +1 -1
- package/package/kisscomps/components/OverLap/OverLap.vue +193 -0
- package/package/kisscomps/components/OverLap/index.js +2 -0
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +832 -0
- package/package/kisscomps/components/PatternStatus/index.js +2 -0
- package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +94 -78
- package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +22 -42
- package/package/kisscomps/components/StageStatus/StageStatus.vue +303 -0
- package/package/kisscomps/components/StageStatus/index.js +2 -0
- package/package/kisscomps/components/patternList/index.js +2 -0
- package/package/kisscomps/components/patternList/patternList.vue +558 -0
- package/package/kisscomps/index.js +12 -0
- package/package/kissui.min.js +1 -1
- package/package.json +3 -3
- package/src/api/control.js +2 -2
- package/src/api/param.js +2 -2
- package/src/kisscomps/components/BoardCard/BoardCard.vue +85 -0
- package/src/kisscomps/components/BoardCard/index.js +2 -0
- package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +1 -1
- package/src/kisscomps/components/OverLap/OverLap.vue +193 -0
- package/src/kisscomps/components/OverLap/index.js +2 -0
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +832 -0
- package/src/kisscomps/components/PatternStatus/index.js +2 -0
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +94 -78
- package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +22 -42
- package/src/kisscomps/components/StageStatus/StageStatus.vue +303 -0
- package/src/kisscomps/components/StageStatus/index.js +2 -0
- package/src/kisscomps/components/patternList/index.js +2 -0
- package/src/kisscomps/components/patternList/patternList.vue +558 -0
- package/src/kisscomps/index.js +12 -0
- package/src/utils/RingDataModel.js +98 -0
- package/src/views/intersection.vue +3 -2
- package/src/views/schemeconfig.vue +17 -2
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="boradCard">
|
|
3
|
+
<StageStatus
|
|
4
|
+
v-show="isPhase"
|
|
5
|
+
:localPatternList="localPatternList"
|
|
6
|
+
:contrloType="contrloType"
|
|
7
|
+
:controlData="controlData"
|
|
8
|
+
:patternStatusList="patternStatusList">
|
|
9
|
+
</StageStatus>
|
|
10
|
+
<PatternStatus
|
|
11
|
+
:localPatternList="localPatternList"
|
|
12
|
+
:contrloType="contrloType"
|
|
13
|
+
:stagesChange="stagesChange"
|
|
14
|
+
:agentId="agentId"
|
|
15
|
+
:controlData="controlData"
|
|
16
|
+
:phaseList="phaseList"
|
|
17
|
+
:cycle="cycle"
|
|
18
|
+
:syncTime="syncTime"
|
|
19
|
+
:style="{'margin-top':cycle ? '25px':'0'}"
|
|
20
|
+
:patternStatusList="patternStatusList"
|
|
21
|
+
:patternId="patternId"
|
|
22
|
+
:cycles="cycles">
|
|
23
|
+
</PatternStatus>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
import PatternStatus from '../PatternStatus'
|
|
29
|
+
import StageStatus from '../StageStatus'
|
|
30
|
+
export default {
|
|
31
|
+
name: 'board-card',
|
|
32
|
+
components: {
|
|
33
|
+
PatternStatus,
|
|
34
|
+
StageStatus
|
|
35
|
+
},
|
|
36
|
+
data () {
|
|
37
|
+
return {
|
|
38
|
+
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
props: {
|
|
42
|
+
contrloType: {
|
|
43
|
+
type: Boolean
|
|
44
|
+
},
|
|
45
|
+
localPatternList: {
|
|
46
|
+
type: Array
|
|
47
|
+
},
|
|
48
|
+
stagesChange: {
|
|
49
|
+
type: Array
|
|
50
|
+
},
|
|
51
|
+
phaseList: {
|
|
52
|
+
type: Array
|
|
53
|
+
},
|
|
54
|
+
controlData: {
|
|
55
|
+
type: Object
|
|
56
|
+
},
|
|
57
|
+
patternStatusList: {
|
|
58
|
+
type: Array
|
|
59
|
+
},
|
|
60
|
+
patternId: {
|
|
61
|
+
type: Number
|
|
62
|
+
},
|
|
63
|
+
agentId: {
|
|
64
|
+
type: String
|
|
65
|
+
},
|
|
66
|
+
isPhase: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: false
|
|
69
|
+
},
|
|
70
|
+
cycles: {
|
|
71
|
+
type: Number
|
|
72
|
+
},
|
|
73
|
+
cycle: {
|
|
74
|
+
type: Number
|
|
75
|
+
},
|
|
76
|
+
syncTime: {
|
|
77
|
+
type: Number
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
</script>
|
|
82
|
+
|
|
83
|
+
<style>
|
|
84
|
+
|
|
85
|
+
</style>
|
package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue
CHANGED
|
@@ -190,7 +190,7 @@ export default {
|
|
|
190
190
|
},
|
|
191
191
|
queryDevParams () {
|
|
192
192
|
let _this = this
|
|
193
|
-
queryDevice().then(res => {
|
|
193
|
+
queryDevice(this.agentid).then(res => {
|
|
194
194
|
if (!res.data.success) {
|
|
195
195
|
_this.$message.error(getMessageByCode(res.data.code, _this.$i18n.locale))
|
|
196
196
|
return
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="overLap" v-if="checked" style="margin-top:20px">
|
|
3
|
+
<div class="ring-first" v-for="(list, index1) in this.overlapDatas" :key="index1">
|
|
4
|
+
<div v-for="(item,index2) in list.stageLists" :key="index2" >
|
|
5
|
+
<div class="first-2">
|
|
6
|
+
<el-tooltip v-if="item.greenWidth" placement="top-start" effect="light">
|
|
7
|
+
<div slot="content">
|
|
8
|
+
O{{list.id}}-
|
|
9
|
+
<span v-for="(ids,index3) in list.includedphases" :key="index3">
|
|
10
|
+
P{{ids}}<span v-if="index3+1!==list.includedphases.length">,</span>
|
|
11
|
+
</span>
|
|
12
|
+
</div>
|
|
13
|
+
<div style="cursor:pointer;">
|
|
14
|
+
<div class="ring-phase">
|
|
15
|
+
<PatternWalkSvg v-if="item.peddirection" :Data="item.peddirection[0]" :Width="'32'" :Height="'34'" />
|
|
16
|
+
<xdrdirselector Width="36px" Height="34px" :showlist="item.direction"></xdrdirselector>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="box">
|
|
19
|
+
<div class="ring-nums">
|
|
20
|
+
O{{list.id}}-
|
|
21
|
+
<span v-for="(ids,index3) in list.includedphases" :key="index3">
|
|
22
|
+
P{{ids}}<span v-if="index3+1!==list.includedphases.length">,</span>
|
|
23
|
+
</span>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</el-tooltip>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="first-1" :style="{'width':item.greenWidth,'height':'34px','background':'#7ccc66'}"></div>
|
|
30
|
+
<div class="first-1" :style="{'width':item.redWidth,'height':'34px','background':'#f27979'}"></div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script>
|
|
37
|
+
import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
|
|
38
|
+
import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
|
|
39
|
+
import xdrdirselector from '../XRDDirSelector/XRDDirSelector'
|
|
40
|
+
import PatternWalkSvg from '../IntersectionMap/crossDirection/baseImg/PatternWalkSvg'
|
|
41
|
+
export default {
|
|
42
|
+
name: 'over-lap',
|
|
43
|
+
components: {
|
|
44
|
+
PatternWalkSvg,
|
|
45
|
+
xdrdirselector
|
|
46
|
+
},
|
|
47
|
+
data () {
|
|
48
|
+
return {
|
|
49
|
+
overlapDatas: []
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
props: {
|
|
53
|
+
overlap: {
|
|
54
|
+
type: Array,
|
|
55
|
+
default () {
|
|
56
|
+
return []
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
stageList: {
|
|
60
|
+
type: Array
|
|
61
|
+
},
|
|
62
|
+
checked: {
|
|
63
|
+
type: Boolean
|
|
64
|
+
},
|
|
65
|
+
cycle: {
|
|
66
|
+
type: Number
|
|
67
|
+
},
|
|
68
|
+
controlData: {
|
|
69
|
+
type: Object
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
watch: {
|
|
73
|
+
controlData: {
|
|
74
|
+
handler: function (val, oldVal) {
|
|
75
|
+
this.doAdd(this.stageList, this.overlap)
|
|
76
|
+
},
|
|
77
|
+
// 深度观察监听
|
|
78
|
+
deep: true
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
created () {
|
|
82
|
+
this.PhaseDataModel = new PhaseDataModel()
|
|
83
|
+
this.CrossDiagramMgr = new CrossDiagramMgr()
|
|
84
|
+
this.doAdd(this.stageList, this.overlap)
|
|
85
|
+
},
|
|
86
|
+
methods: {
|
|
87
|
+
getRoad (i) {
|
|
88
|
+
let direction = []
|
|
89
|
+
if (i) {
|
|
90
|
+
i.map(item => {
|
|
91
|
+
direction.push({
|
|
92
|
+
id: item,
|
|
93
|
+
color: '#454545'
|
|
94
|
+
})
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
return direction
|
|
98
|
+
},
|
|
99
|
+
getPedPhasePos (i) {
|
|
100
|
+
// 行人相位信息
|
|
101
|
+
let sidewalkPhaseData = []
|
|
102
|
+
if (i) {
|
|
103
|
+
i.forEach((dir, index) => {
|
|
104
|
+
// 行人相位
|
|
105
|
+
if (this.PhaseDataModel.getSidePos(dir)) {
|
|
106
|
+
sidewalkPhaseData.push({
|
|
107
|
+
key: this.CrossDiagramMgr.getUniqueKey('pedphase'),
|
|
108
|
+
phaseid: i.id, // 相位id,用于对应相位状态
|
|
109
|
+
id: dir,
|
|
110
|
+
name: this.PhaseDataModel.getSidePos(dir).name
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
})
|
|
114
|
+
}
|
|
115
|
+
return sidewalkPhaseData
|
|
116
|
+
},
|
|
117
|
+
doAdd (stageList, overlap) { // 阶段显示颜色
|
|
118
|
+
let overlapData = overlap.map(item => {
|
|
119
|
+
let findIndexs = []
|
|
120
|
+
item.includedphases.forEach(i => {
|
|
121
|
+
const findItems = stageList.filter(j => j.stages.includes(i))
|
|
122
|
+
if (findItems.length) findIndexs.push(...findItems.map(m => m.key))
|
|
123
|
+
})
|
|
124
|
+
findIndexs = Array.from(new Set(findIndexs))
|
|
125
|
+
return {
|
|
126
|
+
...item,
|
|
127
|
+
stageLists: stageList.map(sta => {
|
|
128
|
+
const find = findIndexs.includes(sta.key)
|
|
129
|
+
return {
|
|
130
|
+
...sta,
|
|
131
|
+
direction: this.getRoad(item.direction),
|
|
132
|
+
peddirection: this.getPedPhasePos(item.peddirection),
|
|
133
|
+
greenWidth: find ? (sta.split / this.cycle * 100).toFixed(3) + '%' : '0%',
|
|
134
|
+
redWidth: !find ? (sta.split / this.cycle * 100).toFixed(3) + '%' : '0%'
|
|
135
|
+
}
|
|
136
|
+
})
|
|
137
|
+
}
|
|
138
|
+
})
|
|
139
|
+
this.overlapDatas = overlapData
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<style lang="scss" scoped>
|
|
146
|
+
.ring-first {
|
|
147
|
+
margin-top: 1px;
|
|
148
|
+
width: 100%;
|
|
149
|
+
height: 34px;
|
|
150
|
+
.first-1 {
|
|
151
|
+
float: left;
|
|
152
|
+
// text-align: center;
|
|
153
|
+
}
|
|
154
|
+
.first-2{
|
|
155
|
+
position: absolute;
|
|
156
|
+
color: #333333;
|
|
157
|
+
}
|
|
158
|
+
.ring-nums {
|
|
159
|
+
// float: left;
|
|
160
|
+
// margin-top:7px;
|
|
161
|
+
// margin-left: 5px;
|
|
162
|
+
padding-top: 10px;
|
|
163
|
+
padding-left: 43px;
|
|
164
|
+
font-size: 12px;
|
|
165
|
+
height: 14px;
|
|
166
|
+
font-weight: normal;
|
|
167
|
+
font-stretch: normal;
|
|
168
|
+
// line-height: 22px;
|
|
169
|
+
letter-spacing: 0px;
|
|
170
|
+
color: #333333;//#33333361
|
|
171
|
+
}
|
|
172
|
+
.ring-phase {
|
|
173
|
+
position: relative;
|
|
174
|
+
float: left;
|
|
175
|
+
// margin-left: 5px;
|
|
176
|
+
height: 34px;
|
|
177
|
+
z-index: 999;
|
|
178
|
+
background: rgba(30, 96, 12, 0.07);
|
|
179
|
+
// margin-top:1px;
|
|
180
|
+
}
|
|
181
|
+
.ring-phase::after {
|
|
182
|
+
position: absolute;
|
|
183
|
+
display: block;
|
|
184
|
+
content: '';
|
|
185
|
+
height: 0;
|
|
186
|
+
width: 0;
|
|
187
|
+
top: 11px;
|
|
188
|
+
left: 36px;
|
|
189
|
+
border: 5px solid transparent;
|
|
190
|
+
border-left-color: rgba(30, 96, 12, 0.07);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
</style>
|