openatc-components 0.3.79 → 0.3.80
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 +7 -5
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +145 -46
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
- package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +5 -6
- package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +5 -9
- package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +3 -3
- package/package/kisscomps/components/OptimizeKanban/index.js +2 -0
- package/package/kisscomps/components/OptimizeKanban/index.vue +369 -0
- package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +4 -28
- package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +11 -9
- package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +1 -21
- package/package/kisscomps/index.js +1 -3
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/i18n/language/en.js +0 -7
- package/src/i18n/language/zh.js +0 -7
- package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +7 -5
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +145 -46
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
- package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +5 -6
- package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +5 -9
- package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +3 -3
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +4 -28
- package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +11 -9
- package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +1 -21
- package/src/kisscomps/index.js +1 -3
- package/src/node_modules/.package_versions.json +1 -0
- package/src/utils/conflct.js +33 -24
- package/src/views/intersection.vue +5 -6
- package/src/views/intersection2.vue +2 -2
- package/src/views/overView.vue +4 -17
- package/static/styles/common.scss +3 -3
- package/static/styles/dark/theme/element-dark.scss +1 -1
- package/static/styles/intersection.scss +15 -5
- package/static/styles/light/theme/element-light.scss +1 -1
- package/static/styles/schemeconfig.scss +3 -6
- package/package/kisscomps/components/OverviewComponent/index.js +0 -2
- package/package/kisscomps/components/OverviewComponent/index.vue +0 -794
- package/src/kisscomps/components/OverviewComponent/index.js +0 -2
- package/src/kisscomps/components/OverviewComponent/index.vue +0 -794
|
@@ -212,8 +212,8 @@ export default {
|
|
|
212
212
|
Detector: [], // 管理所有检测器
|
|
213
213
|
DetectorChart: [], // 管理所有检测器统计图
|
|
214
214
|
motorwayicon: '',
|
|
215
|
-
IconLengh:
|
|
216
|
-
IconWdith:
|
|
215
|
+
IconLengh: 60,
|
|
216
|
+
IconWdith: 134,
|
|
217
217
|
textareaW: 200,
|
|
218
218
|
textareaH: 100,
|
|
219
219
|
pedW: 206,
|
|
@@ -389,8 +389,8 @@ export default {
|
|
|
389
389
|
h: this.IconWdith,
|
|
390
390
|
angle: 0
|
|
391
391
|
}
|
|
392
|
-
this.IconLengh =
|
|
393
|
-
this.IconWdith =
|
|
392
|
+
this.IconLengh = 60
|
|
393
|
+
this.IconWdith = 134
|
|
394
394
|
let Motorwaysitem = {
|
|
395
395
|
index: this.index,
|
|
396
396
|
id: this.motorid,
|
|
@@ -315,11 +315,10 @@ export default {
|
|
|
315
315
|
},
|
|
316
316
|
agentId: {
|
|
317
317
|
handler: function (val1, val2) {
|
|
318
|
-
if (val1 !== val2
|
|
318
|
+
if (val1 !== val2) {
|
|
319
319
|
this.init()
|
|
320
320
|
}
|
|
321
|
-
}
|
|
322
|
-
immediate: true
|
|
321
|
+
}
|
|
323
322
|
}
|
|
324
323
|
},
|
|
325
324
|
data () {
|
|
@@ -703,7 +702,7 @@ export default {
|
|
|
703
702
|
},
|
|
704
703
|
getIntersectionInfo () {
|
|
705
704
|
// 获取路口信息
|
|
706
|
-
const agentid = this.agentId
|
|
705
|
+
const agentid = this.agentId || '0'
|
|
707
706
|
getIntersectionInfo(agentid).then(res => {
|
|
708
707
|
if (!res.data.success) {
|
|
709
708
|
this.isLoaded = false
|
|
@@ -1054,8 +1053,8 @@ export default {
|
|
|
1054
1053
|
},
|
|
1055
1054
|
handleRepeatRealdir (channelList) {
|
|
1056
1055
|
// 按realdir去掉重复方向的数据
|
|
1057
|
-
let dirChannelList = channelList.filter(ele => ele.type === 0 || ele.type === 1 || ele.type === 3)
|
|
1058
|
-
let pedDirChannelList = channelList.filter(ele => ele.type === 2)
|
|
1056
|
+
let dirChannelList = channelList.filter(ele => ele.realdir !== undefined && (ele.type === 0 || ele.type === 1 || ele.type === 3))
|
|
1057
|
+
let pedDirChannelList = channelList.filter(ele => ele.realdir !== undefined && ele.type === 2)
|
|
1059
1058
|
let map = new Map()
|
|
1060
1059
|
let map2 = new Map()
|
|
1061
1060
|
dirChannelList.forEach(ele => {
|
|
@@ -74,7 +74,8 @@ export default {
|
|
|
74
74
|
// default: 0
|
|
75
75
|
// },
|
|
76
76
|
agentId: {
|
|
77
|
-
type: String
|
|
77
|
+
type: String,
|
|
78
|
+
default: '0'
|
|
78
79
|
},
|
|
79
80
|
graphicMode: {
|
|
80
81
|
type: Boolean,
|
|
@@ -154,13 +155,6 @@ export default {
|
|
|
154
155
|
this.reset = true
|
|
155
156
|
}
|
|
156
157
|
}
|
|
157
|
-
},
|
|
158
|
-
agentId: {
|
|
159
|
-
handler: function (val1, val2) {
|
|
160
|
-
if (val1 !== val2 && val1 !== undefined) {
|
|
161
|
-
this.resetCrossDiagram()
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
158
|
}
|
|
165
159
|
},
|
|
166
160
|
created () {
|
|
@@ -170,7 +164,9 @@ export default {
|
|
|
170
164
|
},
|
|
171
165
|
mounted () {
|
|
172
166
|
this.getParentSize()
|
|
173
|
-
this.
|
|
167
|
+
if (this.isVipRoute || this.channelType) {
|
|
168
|
+
this.reset = true
|
|
169
|
+
}
|
|
174
170
|
},
|
|
175
171
|
updated () {
|
|
176
172
|
},
|
package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue
CHANGED
|
@@ -59,7 +59,8 @@ export default {
|
|
|
59
59
|
default: ''
|
|
60
60
|
},
|
|
61
61
|
AgentId: {
|
|
62
|
-
type: String
|
|
62
|
+
type: String,
|
|
63
|
+
default: '0'
|
|
63
64
|
},
|
|
64
65
|
Token: {
|
|
65
66
|
type: String,
|
|
@@ -92,7 +93,7 @@ export default {
|
|
|
92
93
|
},
|
|
93
94
|
watch: {
|
|
94
95
|
AgentId: {
|
|
95
|
-
handler: function (val) {
|
|
96
|
+
handler: function (val, oldVal) {
|
|
96
97
|
this.agentId = val
|
|
97
98
|
},
|
|
98
99
|
// 深度观察监听
|
|
@@ -242,7 +243,6 @@ export default {
|
|
|
242
243
|
_this.port = String(devParams.port)
|
|
243
244
|
_this.protocol = res.data.data.protocol
|
|
244
245
|
_this.agentId = res.data.data.agentid
|
|
245
|
-
console.log('%%%%%%', res.data.data)
|
|
246
246
|
if (res.data.data.name) {
|
|
247
247
|
_this.agentName = res.data.data.name
|
|
248
248
|
}
|
|
@@ -0,0 +1,369 @@
|
|
|
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="kanbanOptimize">
|
|
14
|
+
<div v-if="this.nowNumber === 1" class="optimizetype">
|
|
15
|
+
<span>{{$t('openatccomponents.pattern.optimizetype')}}</span>
|
|
16
|
+
<el-select v-model="value" clearable :placeholder="$t('openatccomponents.common.select')">
|
|
17
|
+
<el-option
|
|
18
|
+
v-for="item in typeOptions"
|
|
19
|
+
:key="item.value"
|
|
20
|
+
:label="$t('openatccomponents.overview.type' + item.value)"
|
|
21
|
+
:value="item.value"
|
|
22
|
+
>
|
|
23
|
+
</el-option>
|
|
24
|
+
</el-select>
|
|
25
|
+
<span class="optimiNum">{{$t('openatccomponents.pattern.optimizecycle')}}</span>
|
|
26
|
+
<el-input v-model="optimizecycle" clearable :placeholder="$t('openatccomponents.common.enter')"></el-input>
|
|
27
|
+
<!-- <el-button type="primary" @click="onOptimizeClick()">{{$t('openatccomponents.pattern.inoptimize')}}</el-button> -->
|
|
28
|
+
</div>
|
|
29
|
+
<div class="common-board-column" :style="{marginTop:this.nowNumber === 1 ? 0 : '50px',marginLeft:this.nowNumber === 1 ? 0 : 0}">
|
|
30
|
+
<div class="common-board-column-header">
|
|
31
|
+
{{headerText}}
|
|
32
|
+
</div>
|
|
33
|
+
<div class="openatccomponents-board-table-header">
|
|
34
|
+
<el-row :gutter="13">
|
|
35
|
+
<el-col :span="4">{{this.$t('openatccomponents.overview.phase')}}
|
|
36
|
+
</el-col>
|
|
37
|
+
<el-col :span="10">{{this.$t('openatccomponents.overview.flow')}}
|
|
38
|
+
</el-col>
|
|
39
|
+
<el-col :span="10">{{this.$t('openatccomponents.overview.saturationflow')}}
|
|
40
|
+
</el-col>
|
|
41
|
+
</el-row>
|
|
42
|
+
</div>
|
|
43
|
+
<draggable
|
|
44
|
+
class="common-board-column-content"
|
|
45
|
+
:list="list"
|
|
46
|
+
:options="options">
|
|
47
|
+
<div class="common-board-item" v-for="element in list" :key="element.id">
|
|
48
|
+
<el-row :gutter="13">
|
|
49
|
+
<el-col :span="4">
|
|
50
|
+
<el-tooltip class="item" effect="dark" placement="left">
|
|
51
|
+
<div slot="content">{{element.name}}</div>
|
|
52
|
+
<div class="common-phase-description">
|
|
53
|
+
<xdrdirselector Width="70px" Height="70px" Widths="58px" Heights="58px" :Datas="styles" :Data="showStyle" :showlist="element.desc" :ISActiveMask="ISActiveMask" :MaskColor="MaskColor"></xdrdirselector>
|
|
54
|
+
</div>
|
|
55
|
+
</el-tooltip>
|
|
56
|
+
</el-col>
|
|
57
|
+
<el-col :span="10">
|
|
58
|
+
<el-input-number :controls="false" class="col-content" size="small" :step="1" v-model.number="element.flowperhour" ref="type" :disabled="element.mode === 7"></el-input-number>
|
|
59
|
+
</el-col>
|
|
60
|
+
<el-col :span="10">
|
|
61
|
+
<el-input-number :controls="false" class="col-content" size="small" :step="1" v-model.number="element.saturation" ref="types" :disabled="element.mode === 7"></el-input-number>
|
|
62
|
+
</el-col>
|
|
63
|
+
</el-row>
|
|
64
|
+
</div>
|
|
65
|
+
</draggable>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
<script>
|
|
70
|
+
import draggable from 'vuedraggable'
|
|
71
|
+
import { getDuration } from '@/api/cross'
|
|
72
|
+
import xdrdirselector from '@/components/XRDDirSelector'
|
|
73
|
+
|
|
74
|
+
export default {
|
|
75
|
+
name: 'patternOptimize',
|
|
76
|
+
components: {
|
|
77
|
+
draggable,
|
|
78
|
+
xdrdirselector
|
|
79
|
+
},
|
|
80
|
+
data () {
|
|
81
|
+
return {
|
|
82
|
+
showStyle: {
|
|
83
|
+
left: '7px',
|
|
84
|
+
top: '0px'
|
|
85
|
+
},
|
|
86
|
+
styles: {
|
|
87
|
+
left: '7px',
|
|
88
|
+
top: '0px'
|
|
89
|
+
},
|
|
90
|
+
typeOptions: [{
|
|
91
|
+
value: 'flow-split-opt'
|
|
92
|
+
}, {
|
|
93
|
+
value: 'cycle-opt'
|
|
94
|
+
}],
|
|
95
|
+
value: 'flow-split-opt',
|
|
96
|
+
optimizecycle: 0
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
props: {
|
|
100
|
+
headerText: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: 'Header'
|
|
103
|
+
},
|
|
104
|
+
id: {
|
|
105
|
+
type: Number
|
|
106
|
+
},
|
|
107
|
+
rings: {
|
|
108
|
+
type: Array
|
|
109
|
+
},
|
|
110
|
+
nowNumber: {
|
|
111
|
+
type: Number
|
|
112
|
+
},
|
|
113
|
+
phaseList: {
|
|
114
|
+
type: Array
|
|
115
|
+
},
|
|
116
|
+
options: {
|
|
117
|
+
type: Object,
|
|
118
|
+
default () {
|
|
119
|
+
return {}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
list: {
|
|
123
|
+
type: Array,
|
|
124
|
+
default () {
|
|
125
|
+
return []
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
// index: {
|
|
129
|
+
// type: Number
|
|
130
|
+
// },
|
|
131
|
+
ISActiveMask: {
|
|
132
|
+
type: Boolean,
|
|
133
|
+
default: true
|
|
134
|
+
},
|
|
135
|
+
// 当phase的描述为空时,显示的图形颜色。
|
|
136
|
+
MaskColor: {
|
|
137
|
+
type: String,
|
|
138
|
+
default: '#000000'
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
created () {
|
|
142
|
+
// this.addMinSplit()
|
|
143
|
+
this.addMin()
|
|
144
|
+
},
|
|
145
|
+
computed () {
|
|
146
|
+
|
|
147
|
+
},
|
|
148
|
+
watch: {
|
|
149
|
+
list: {
|
|
150
|
+
handler: function () {
|
|
151
|
+
// let list = this.$refs.type
|
|
152
|
+
// let flow = this.$refs.types
|
|
153
|
+
// console.log(this.list, 'list')
|
|
154
|
+
// let cycle = 0
|
|
155
|
+
// let n = this.index
|
|
156
|
+
// for (let i = 0; i < list.length; i++) {
|
|
157
|
+
// cycle = cycle + Number(list[i].currentValue)
|
|
158
|
+
// }
|
|
159
|
+
// const globalParamModel = this.$store.getters.globalParamModel
|
|
160
|
+
// // let MaxCycle = globalParamModel.getParamsByType('patternList')[n].cycle
|
|
161
|
+
// let pattern = globalParamModel.getParamsByType('patternList')[n]
|
|
162
|
+
// globalParamModel.getParamsByType('patternList')[n].cycle = this.getMaxCycle(pattern)
|
|
163
|
+
// this.addMinSplit()
|
|
164
|
+
// this.$emit('handleSplit', n)
|
|
165
|
+
},
|
|
166
|
+
deep: true
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
methods: {
|
|
170
|
+
onOptimizeClick () {
|
|
171
|
+
let msg = this.$t('openatccomponents.pattern.algorithmEngineOptimization')
|
|
172
|
+
const loading = this.$loading({
|
|
173
|
+
lock: true,
|
|
174
|
+
text: msg,
|
|
175
|
+
spinner: 'el-icon-loading',
|
|
176
|
+
background: 'rgba(0, 0, 0, 0.7)'
|
|
177
|
+
})
|
|
178
|
+
setTimeout(() => {
|
|
179
|
+
loading.close()
|
|
180
|
+
this.handeleOptimizeClick()
|
|
181
|
+
}, 1000)
|
|
182
|
+
},
|
|
183
|
+
handeleOptimizeClick () {
|
|
184
|
+
let newPha = []
|
|
185
|
+
for (let i = 0; i < this.rings.length; i++) {
|
|
186
|
+
newPha.push(...this.rings[i])
|
|
187
|
+
}
|
|
188
|
+
let phaseData = newPha.map(item => {
|
|
189
|
+
return {
|
|
190
|
+
id: item.id,
|
|
191
|
+
flowperhour: item.flowperhour,
|
|
192
|
+
saturation: item.saturation
|
|
193
|
+
}
|
|
194
|
+
})
|
|
195
|
+
let patternList = this.$store.state.globalParam.tscParam.patternList
|
|
196
|
+
let pattern = patternList.filter((item) => item.id === this.id)[0]
|
|
197
|
+
let reqData = {
|
|
198
|
+
'type': this.value,
|
|
199
|
+
'optcycle': this.optimizecycle ? this.optimizecycle : 0,
|
|
200
|
+
'phaseList': this.phaseList,
|
|
201
|
+
'pattern': pattern,
|
|
202
|
+
'phases': phaseData
|
|
203
|
+
}
|
|
204
|
+
let isValidata = []
|
|
205
|
+
for (let j = 0; j < newPha.length; j++) {
|
|
206
|
+
let comNum = (newPha[j].length / 4) * 1700 * 0.8
|
|
207
|
+
isValidata.push(newPha[j].flowperhour > comNum)
|
|
208
|
+
}
|
|
209
|
+
if (isValidata.includes(true)) {
|
|
210
|
+
this.$confirm(this.$t('openatccomponents.overview.maxFlow'),
|
|
211
|
+
this.$t('openatccomponents.common.alarm'), {
|
|
212
|
+
confirmButtonText: this.$t('eopenatccomponentsdge.common.confirm'),
|
|
213
|
+
cancelButtonText: this.$t('openatccomponents.common.cancel'),
|
|
214
|
+
type: 'warning'
|
|
215
|
+
}).then(() => {
|
|
216
|
+
getDuration(reqData).then(data => {
|
|
217
|
+
if (data.data.success) {
|
|
218
|
+
this.$message({
|
|
219
|
+
type: 'success',
|
|
220
|
+
message: this.$t('openatccomponents.pattern.success')
|
|
221
|
+
})
|
|
222
|
+
for (let i = 0; i < this.rings.length; i++) {
|
|
223
|
+
for (let j = 0; j < this.rings[i].length; j++) {
|
|
224
|
+
for (let h = 0; h < data.data.data.phase.length; h++) {
|
|
225
|
+
if (this.rings[i][j].id === data.data.data.phase[h].id) {
|
|
226
|
+
this.rings[i][j].value = data.data.data.phase[h].duration
|
|
227
|
+
// this.rings[i][j].cycle = data.data.data.phase[h].cycle
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}).catch(error => {
|
|
234
|
+
console.log(error)
|
|
235
|
+
})
|
|
236
|
+
}).catch(() => {
|
|
237
|
+
})
|
|
238
|
+
} else {
|
|
239
|
+
getDuration(reqData).then(data => {
|
|
240
|
+
if (data.data.success) {
|
|
241
|
+
this.$message({
|
|
242
|
+
type: 'success',
|
|
243
|
+
message: this.$t('openatccomponents.pattern.success')
|
|
244
|
+
})
|
|
245
|
+
for (let i = 0; i < this.rings.length; i++) {
|
|
246
|
+
for (let j = 0; j < this.rings[i].length; j++) {
|
|
247
|
+
for (let h = 0; h < data.data.data.phase.length; h++) {
|
|
248
|
+
if (this.rings[i][j].id === data.data.data.phase[h].id) {
|
|
249
|
+
this.rings[i][j].value = data.data.data.phase[h].duration
|
|
250
|
+
// this.rings[i][j].cycle = data.data.data.phase[h].cycle
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}).catch(error => {
|
|
257
|
+
console.log(error)
|
|
258
|
+
})
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
addMin () {
|
|
262
|
+
for (let i of this.list) {
|
|
263
|
+
if (!i.flowperhour || !i.saturation) {
|
|
264
|
+
i.length = this.list.length
|
|
265
|
+
i.flowperhour = 0
|
|
266
|
+
i.saturation = 1700
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
// addMinSplit () {
|
|
271
|
+
// const globalParamModel = this.$store.getters.globalParamModel
|
|
272
|
+
// let phaseList = globalParamModel.getParamsByType('phaseList')
|
|
273
|
+
// for (let ls of this.list) {
|
|
274
|
+
// let phase = phaseList.filter((item) => {
|
|
275
|
+
// return item.id === ls.id
|
|
276
|
+
// })[0]
|
|
277
|
+
// if (!phase.redyellow) {
|
|
278
|
+
// phase.redyellow = 0
|
|
279
|
+
// }
|
|
280
|
+
// if (!phase.yellow) {
|
|
281
|
+
// phase.yellow = 0
|
|
282
|
+
// }
|
|
283
|
+
// if (!phase.redclear) {
|
|
284
|
+
// phase.redclear = 0
|
|
285
|
+
// }
|
|
286
|
+
// if (!phase.flashgreen) {
|
|
287
|
+
// phase.flashgreen = 0
|
|
288
|
+
// }
|
|
289
|
+
// if (!phase.phasewalk) {
|
|
290
|
+
// phase.phasewalk = 0
|
|
291
|
+
// }
|
|
292
|
+
// if (!phase.pedclear) {
|
|
293
|
+
// phase.pedclear = 0
|
|
294
|
+
// }
|
|
295
|
+
// // let temp1 = phase.redyellow + phase.yellow + phase.redclear + phase.flashgreen // 绿信比的最小值要大于最小绿+黄灯+全红+绿闪
|
|
296
|
+
// // let temp2 = phase.phasewalk + phase.pedclear
|
|
297
|
+
// // if (temp1 > temp2) {
|
|
298
|
+
// // ls.minSplit = temp1
|
|
299
|
+
// // } else {
|
|
300
|
+
// // ls.minSplit = temp2
|
|
301
|
+
// // }
|
|
302
|
+
// // if (ls.mode !== 7 && ls.value < ls.minSplit) {
|
|
303
|
+
// // ls.value = ls.minSplit
|
|
304
|
+
// // }
|
|
305
|
+
// // let temp1 = phase.yellow + phase.redclear + phase.flashgreen // 绿信比的最小值要大于最小绿+黄灯+全红+绿闪
|
|
306
|
+
// let temp1 = phase.yellow + phase.redclear + phase.mingreen
|
|
307
|
+
// let temp2 = phase.yellow + phase.redclear + phase.phasewalk + phase.pedclear
|
|
308
|
+
// ls.minSplit = temp1 > temp2 ? temp1 : temp2
|
|
309
|
+
// if (ls.mode !== 7 && ls.value < ls.minSplit) {
|
|
310
|
+
// ls.value = ls.minSplit
|
|
311
|
+
// this.$message.error(this.$t('openatccomponents.pattern.splitCheckMsg'))
|
|
312
|
+
// }
|
|
313
|
+
// }
|
|
314
|
+
// },
|
|
315
|
+
// getMaxCycle (pattern) {
|
|
316
|
+
// let rings = pattern.rings
|
|
317
|
+
// let maxCycle = 0
|
|
318
|
+
// for (let ring of rings) {
|
|
319
|
+
// if (ring.length === 0) continue
|
|
320
|
+
// let cycle = 0
|
|
321
|
+
// for (let r of ring) {
|
|
322
|
+
// if (r.mode === 7) { // 忽略相位不计周期
|
|
323
|
+
// continue
|
|
324
|
+
// }
|
|
325
|
+
// cycle = cycle + r.value
|
|
326
|
+
// }
|
|
327
|
+
// if (cycle > maxCycle) {
|
|
328
|
+
// maxCycle = cycle
|
|
329
|
+
// }
|
|
330
|
+
// }
|
|
331
|
+
// return maxCycle
|
|
332
|
+
// },
|
|
333
|
+
// doChange (val) {
|
|
334
|
+
// // if (val.mode === 7) {
|
|
335
|
+
// // val.value = 0
|
|
336
|
+
// // } else {
|
|
337
|
+
// // val.value = 30
|
|
338
|
+
// // }
|
|
339
|
+
// }
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
</script>
|
|
343
|
+
<style lang="scss" scoped>
|
|
344
|
+
.col-content {
|
|
345
|
+
width: 100%;
|
|
346
|
+
}
|
|
347
|
+
.kanbanOptimize {
|
|
348
|
+
.common-board-column {
|
|
349
|
+
max-width: unset !important;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
.optimizetype{
|
|
353
|
+
// float: left;
|
|
354
|
+
font-size: 14PX;
|
|
355
|
+
margin:0 0 10PX 0;
|
|
356
|
+
.el-input {
|
|
357
|
+
width: 80PX;
|
|
358
|
+
}
|
|
359
|
+
.el-select{
|
|
360
|
+
width: 145PX;
|
|
361
|
+
}
|
|
362
|
+
.el-button {
|
|
363
|
+
margin-left: 10PX;
|
|
364
|
+
}
|
|
365
|
+
.optimiNum {
|
|
366
|
+
padding-left: 10PX;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
</style>
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
:leave-active-class="toPage === 1 ? 'animated fadeOutRight' : 'animated fadeOutLeft' ">
|
|
20
20
|
<div class="new" style="position: absolute;width: 100%;height:100%;" v-show="(isOperation && !isClosePhase)">
|
|
21
21
|
<ManualControlModalNew
|
|
22
|
-
v-if="resetcomponent"
|
|
23
22
|
ref="ManualControlModalNew"
|
|
24
23
|
:residentControlList="residentControlList"
|
|
25
24
|
:specialControlList="specialControlList"
|
|
@@ -82,7 +81,6 @@
|
|
|
82
81
|
<div v-else style="height: 100%;">
|
|
83
82
|
<div class="new" style="position: absolute;width: 100%;height:100%;" v-show="(isOperation && !isClosePhase)">
|
|
84
83
|
<ManualControlModalNew
|
|
85
|
-
v-if="resetcomponent"
|
|
86
84
|
ref="ManualControlModalNew"
|
|
87
85
|
:residentControlList="residentControlList"
|
|
88
86
|
:specialControlList="specialControlList"
|
|
@@ -462,17 +460,13 @@ export default {
|
|
|
462
460
|
patternAll: [],
|
|
463
461
|
patternSelect: [], // 所有方案id
|
|
464
462
|
specialPage: '', // 哪一个特殊控制页面
|
|
465
|
-
nextcycleefficcontrol: [5, 6, 9, 10, 12, 19]
|
|
466
|
-
resetcomponent: false
|
|
463
|
+
nextcycleefficcontrol: [5, 6, 9, 10, 12, 19] // 下周期生效的控制方式
|
|
467
464
|
}
|
|
468
465
|
},
|
|
469
466
|
watch: {
|
|
470
467
|
agentId: {
|
|
471
|
-
handler: function (
|
|
472
|
-
|
|
473
|
-
this.resetComponent()
|
|
474
|
-
}
|
|
475
|
-
this.getIntersectionInfo(val1)
|
|
468
|
+
handler: function (val) {
|
|
469
|
+
this.getIntersectionInfo(val)
|
|
476
470
|
},
|
|
477
471
|
// 深度观察监听
|
|
478
472
|
deep: true
|
|
@@ -509,10 +503,9 @@ export default {
|
|
|
509
503
|
this.setHost(this.reqUrl)
|
|
510
504
|
this.PhaseDataModel = new PhaseDataModel(this.roadDirection)
|
|
511
505
|
this.CrossDiagramMgr = new CrossDiagramMgr()
|
|
506
|
+
this.getIntersectionInfo(this.agentId)
|
|
512
507
|
},
|
|
513
508
|
async mounted () {
|
|
514
|
-
this.resetcomponent = true
|
|
515
|
-
this.init()
|
|
516
509
|
if (this.realtimeStatusModalvisible === false) {
|
|
517
510
|
this.changeStatus()
|
|
518
511
|
}
|
|
@@ -523,23 +516,6 @@ export default {
|
|
|
523
516
|
this.initData()
|
|
524
517
|
},
|
|
525
518
|
methods: {
|
|
526
|
-
resetComponent () {
|
|
527
|
-
this.resetcomponent = false
|
|
528
|
-
this.$nextTick(() => {
|
|
529
|
-
this.resetcomponent = true
|
|
530
|
-
this.init()
|
|
531
|
-
})
|
|
532
|
-
},
|
|
533
|
-
init () {
|
|
534
|
-
this.getIntersectionInfo(this.agentId)
|
|
535
|
-
if (this.realtimeStatusModalvisible === false) {
|
|
536
|
-
this.changeStatus()
|
|
537
|
-
}
|
|
538
|
-
this.setPropsToken(this.Token)
|
|
539
|
-
// await this.getPhase()
|
|
540
|
-
this.getFault()
|
|
541
|
-
this.initData()
|
|
542
|
-
},
|
|
543
519
|
setHost (host) {
|
|
544
520
|
// 获取组件外传入的token,便于独立组件调用接口
|
|
545
521
|
if (host && host !== '') {
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
:model="manualInfo"
|
|
21
21
|
label-width="90px">
|
|
22
22
|
<el-form-item
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
:label="$t('openatccomponents.overview.greenclear')"
|
|
24
|
+
prop="intersection">
|
|
25
|
+
<el-input-number :min="0" :max="65535" :precision="0" :step="1" :controls="false" v-model.number="manualInfo.tempGreenflash" size="small"></el-input-number>
|
|
26
|
+
</el-form-item>
|
|
27
27
|
|
|
28
28
|
<el-form-item
|
|
29
29
|
:label="$t('openatccomponents.overview.yellowflash')"
|
|
@@ -44,11 +44,13 @@
|
|
|
44
44
|
label-position="left"
|
|
45
45
|
:model="manualInfo"
|
|
46
46
|
label-width="90px">
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
|
|
48
|
+
<el-form-item
|
|
49
|
+
:label="$t('openatccomponents.overview.duration')"
|
|
50
|
+
prop="count">
|
|
51
|
+
<el-input-number :min="0" :max="65535" :precision="0" :step="1" :controls="false" v-model.number="manualInfo.tempDuration" size="small"></el-input-number>
|
|
52
|
+
</el-form-item>
|
|
53
|
+
|
|
52
54
|
<el-form-item
|
|
53
55
|
:label="$t('openatccomponents.overview.allred')"
|
|
54
56
|
prop="intersection">
|
|
@@ -160,8 +160,7 @@
|
|
|
160
160
|
<div class="cross-content">
|
|
161
161
|
<div class="cross-name">{{$t('openatccomponents.overview.currentstage')}}:</div>
|
|
162
162
|
<div>
|
|
163
|
-
<Stages
|
|
164
|
-
:crossStatusData="crossStatusData"
|
|
163
|
+
<Stages :crossStatusData="crossStatusData"
|
|
165
164
|
:phaseList="phaseList"
|
|
166
165
|
@onSelectStages="onSelectStages"></Stages>
|
|
167
166
|
</div>
|
|
@@ -261,27 +260,8 @@ export default {
|
|
|
261
260
|
}
|
|
262
261
|
|
|
263
262
|
},
|
|
264
|
-
watch: {
|
|
265
|
-
agentId: {
|
|
266
|
-
handler: function (val1, val2) {
|
|
267
|
-
this.$nextTick(() => {
|
|
268
|
-
setTimeout(() => {
|
|
269
|
-
if (val1 !== val2) {
|
|
270
|
-
this.resetcomponent = false
|
|
271
|
-
this.$nextTick(() => {
|
|
272
|
-
this.resetcomponent = true
|
|
273
|
-
})
|
|
274
|
-
}
|
|
275
|
-
}, 100)
|
|
276
|
-
})
|
|
277
|
-
},
|
|
278
|
-
// 深度观察监听
|
|
279
|
-
deep: true
|
|
280
|
-
}
|
|
281
|
-
},
|
|
282
263
|
data () {
|
|
283
264
|
return {
|
|
284
|
-
resetcomponent: true
|
|
285
265
|
}
|
|
286
266
|
},
|
|
287
267
|
methods: {
|
|
@@ -32,7 +32,6 @@ import XiaoKanBan from './components/XiaoKanBan/index.vue'
|
|
|
32
32
|
import DirectionListConfiguration from './components/DirectionListConfiguration/index.js'
|
|
33
33
|
import IntersectionDirectionSelection from './components/IntersectionDirectionSelection/index.js'
|
|
34
34
|
import PhaseLegend from './components/PhaseLegend/index.js'
|
|
35
|
-
import OverviewComponent from './components/OverviewComponent/index.js'
|
|
36
35
|
import { setToken, setHost, setIsCheckPermission, setUserRoles, setPermissions } from '../utils/auth.js'
|
|
37
36
|
import componentsGlobalParam from '../store/modules/globalParam'
|
|
38
37
|
|
|
@@ -74,8 +73,7 @@ const components = {
|
|
|
74
73
|
PhaseDirectionSelect,
|
|
75
74
|
DirectionListConfiguration,
|
|
76
75
|
IntersectionDirectionSelection,
|
|
77
|
-
PhaseLegend
|
|
78
|
-
OverviewComponent
|
|
76
|
+
PhaseLegend
|
|
79
77
|
}
|
|
80
78
|
|
|
81
79
|
const language = {
|