openatc-components 0.1.3 → 0.1.5
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/DrawChannelization/drawsvg/basicCoordInfo.vue +52 -48
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -1
- package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +40 -7
- package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue +191 -0
- package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.syncOper.vue +331 -0
- package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +6 -0
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/i18n/language/en.js +2 -0
- package/src/i18n/language/zh.js +2 -0
- package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +52 -48
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -1
- package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +40 -7
- package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +6 -0
- package/static/styles/channelizatioon.scss +1 -1
- package/static/styles/schemeconfig.scss +5 -5
- package/static/styles/stages.scss +26 -26
|
@@ -1,59 +1,43 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
12
|
<template>
|
|
13
13
|
<div class="basic-coodinfo-component">
|
|
14
|
-
<el-form
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
<el-input-number :min="0" :controls="false"
|
|
31
|
-
ref="refNumber-y"
|
|
32
|
-
v-model="basicCoodInfo.y"
|
|
33
|
-
@change="handleChangePosY"
|
|
34
|
-
@input.native="eventChange('y')" />
|
|
35
|
-
</el-form-item>
|
|
36
|
-
<el-form-item
|
|
37
|
-
v-if="showAngle"
|
|
38
|
-
:label="$t('openatccomponents.channelizationmap.angle') + ':'"
|
|
39
|
-
prop="count">
|
|
40
|
-
<el-input-number :min="0" :max="360" :controls="false"
|
|
41
|
-
ref="refNumber-angle"
|
|
42
|
-
v-model="basicCoodInfo.angle"
|
|
43
|
-
@change="handleChangeAngle"
|
|
44
|
-
@input.native="eventChange('angle')" />
|
|
45
|
-
</el-form-item>
|
|
14
|
+
<el-form :inline="true" :model="basicCoodInfo" label-position="left">
|
|
15
|
+
<el-form-item label="X:">
|
|
16
|
+
<el-input-number :min="0" :controls="false" ref="refNumber-x" v-model="basicCoodInfo.x"
|
|
17
|
+
@change="handleChangePosX" @input.native="eventChange('x')" />
|
|
18
|
+
</el-form-item>
|
|
19
|
+
<el-form-item label="Y:">
|
|
20
|
+
<el-input-number :min="0" :controls="false" ref="refNumber-y" v-model="basicCoodInfo.y"
|
|
21
|
+
@change="handleChangePosY" @input.native="eventChange('y')" />
|
|
22
|
+
</el-form-item>
|
|
23
|
+
<el-form-item v-if="showAngle" :label="$t('openatccomponents.channelizationmap.angle') + ':'">
|
|
24
|
+
<el-input-number :min="0" :max="360" :controls="false" ref="refNumber-angle" v-model="basicCoodInfo.angle"
|
|
25
|
+
@change="handleChangeAngle" @input.native="eventChange('angle')" />
|
|
26
|
+
</el-form-item>
|
|
27
|
+
<el-form-item v-if="showKeyId" label="ID:">
|
|
28
|
+
<el-input v-model="basicCoodInfo.keyid" ref="keyid" @input="handleChangeKeyID" />
|
|
29
|
+
</el-form-item>
|
|
46
30
|
</el-form>
|
|
47
31
|
</div>
|
|
48
32
|
</template>
|
|
49
33
|
<script>
|
|
50
34
|
export default {
|
|
51
35
|
name: 'basic-coodinfo-component',
|
|
52
|
-
components: {
|
|
53
|
-
},
|
|
36
|
+
components: {},
|
|
54
37
|
data () {
|
|
55
38
|
return {
|
|
56
39
|
showAngle: true,
|
|
40
|
+
showKeyId: true,
|
|
57
41
|
basicCoodInfo: {
|
|
58
42
|
x: 0,
|
|
59
43
|
y: 0,
|
|
@@ -66,8 +50,7 @@ export default {
|
|
|
66
50
|
type: Object
|
|
67
51
|
}
|
|
68
52
|
},
|
|
69
|
-
computed: {
|
|
70
|
-
},
|
|
53
|
+
computed: {},
|
|
71
54
|
watch: {
|
|
72
55
|
drawingObjInfo: {
|
|
73
56
|
handler: function (obj) {
|
|
@@ -76,7 +59,11 @@ export default {
|
|
|
76
59
|
y: obj.y,
|
|
77
60
|
angle: obj.angle
|
|
78
61
|
}
|
|
62
|
+
if (obj.keyid !== undefined) {
|
|
63
|
+
this.basicCoodInfo.keyid = obj.keyid
|
|
64
|
+
}
|
|
79
65
|
this.isShowAngleSetting()
|
|
66
|
+
this.isShowKeyIdSetting()
|
|
80
67
|
},
|
|
81
68
|
deep: true
|
|
82
69
|
}
|
|
@@ -111,6 +98,10 @@ export default {
|
|
|
111
98
|
this.$emit('handleChangeBasicCoord', this.basicCoodInfo)
|
|
112
99
|
}
|
|
113
100
|
},
|
|
101
|
+
handleChangeKeyID (value) {
|
|
102
|
+
this.basicCoodInfo.keyid = value
|
|
103
|
+
this.$emit('handleChangeBasicCoord', this.basicCoodInfo)
|
|
104
|
+
},
|
|
114
105
|
checkOnlyNum (numString) {
|
|
115
106
|
// eslint-disable-next-line no-new-wrappers
|
|
116
107
|
let num = new Number(numString)
|
|
@@ -140,6 +131,15 @@ export default {
|
|
|
140
131
|
if (this.drawingObjInfo.icontype === 'detector' && this.drawingObjInfo.detailtype === 'detectorChart') {
|
|
141
132
|
this.showAngle = false
|
|
142
133
|
}
|
|
134
|
+
},
|
|
135
|
+
isShowKeyIdSetting () {
|
|
136
|
+
this.showKeyId = false
|
|
137
|
+
if (this.drawingObjInfo.icontype === 'vehile') {
|
|
138
|
+
this.showKeyId = true
|
|
139
|
+
}
|
|
140
|
+
if (this.drawingObjInfo.icontype === 'ped') {
|
|
141
|
+
this.showKeyId = true
|
|
142
|
+
}
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
145
|
mounted () {
|
|
@@ -150,12 +150,16 @@ export default {
|
|
|
150
150
|
y: this.drawingObjInfo.y,
|
|
151
151
|
angle: this.drawingObjInfo.angle
|
|
152
152
|
}
|
|
153
|
+
if (this.drawingObjInfo.keyid !== undefined) {
|
|
154
|
+
this.basicCoodInfo.keyid = this.drawingObjInfo.keyid
|
|
155
|
+
}
|
|
153
156
|
this.isShowAngleSetting()
|
|
157
|
+
this.isShowKeyIdSetting()
|
|
154
158
|
}
|
|
155
159
|
},
|
|
156
|
-
destroyed () {
|
|
157
|
-
}
|
|
160
|
+
destroyed () {}
|
|
158
161
|
}
|
|
162
|
+
|
|
159
163
|
</script>
|
|
160
164
|
<style lang="scss">
|
|
161
165
|
</style>
|
|
@@ -343,7 +343,7 @@ export default {
|
|
|
343
343
|
case 'crossmap':
|
|
344
344
|
this.changeCrossMap(iconObj, changefield)
|
|
345
345
|
}
|
|
346
|
-
console.log('this.customlist', this.customlist)
|
|
346
|
+
// console.log('this.customlist', this.customlist)
|
|
347
347
|
},
|
|
348
348
|
|
|
349
349
|
// 被删除的相位所关联的车道,解除相位关联
|
|
@@ -394,6 +394,7 @@ export default {
|
|
|
394
394
|
let Motorwaysitem = {
|
|
395
395
|
index: this.index,
|
|
396
396
|
id: this.motorid,
|
|
397
|
+
keyid: this.motorid, // 后端需要的id,默认指取索引,可修改
|
|
397
398
|
icontype: 'vehile',
|
|
398
399
|
icondireid: [1], // 前端区分箭头方向的标识
|
|
399
400
|
icondirename: [this.PhaseDataModel.getPhase(1).name],
|
|
@@ -460,6 +461,7 @@ export default {
|
|
|
460
461
|
let peditem = {
|
|
461
462
|
index: this.index,
|
|
462
463
|
id: this.pedid,
|
|
464
|
+
keyid: this.pedid, // 后端需要的id,默认指取索引,可修改
|
|
463
465
|
icontype: 'ped',
|
|
464
466
|
iconpedtypeid: 1,
|
|
465
467
|
iconpedposition: 1,
|
|
@@ -542,6 +544,7 @@ export default {
|
|
|
542
544
|
occupancythreshold: 80,
|
|
543
545
|
minflowsaturationthreshold: 30,
|
|
544
546
|
maxflowsaturationthreshold: 70,
|
|
547
|
+
associatedlaneid: '', // 检测器关联的车道索引
|
|
545
548
|
...defaultDetectorParam
|
|
546
549
|
}
|
|
547
550
|
this.curChooseIconIndex = detectoritem.index
|
|
@@ -151,8 +151,7 @@
|
|
|
151
151
|
label-position="left"
|
|
152
152
|
label-width="130px">
|
|
153
153
|
<el-form-item
|
|
154
|
-
:label="$t('openatccomponents.channelizationmap.occupancythreshold') + ':'"
|
|
155
|
-
prop="intersection">
|
|
154
|
+
:label="$t('openatccomponents.channelizationmap.occupancythreshold') + ':'">
|
|
156
155
|
<!-- <el-input-number :min="0" :max="100" :precision="0" :step="1" :controls="false"
|
|
157
156
|
:value="occupancythreshold" size="mini"
|
|
158
157
|
@change="handleChangeOccuthreshold" />
|
|
@@ -167,8 +166,7 @@
|
|
|
167
166
|
</el-select>
|
|
168
167
|
</el-form-item>
|
|
169
168
|
<el-form-item
|
|
170
|
-
:label="$t('openatccomponents.channelizationmap.saturationthreshold') + ':'"
|
|
171
|
-
prop="count">
|
|
169
|
+
:label="$t('openatccomponents.channelizationmap.saturationthreshold') + ':'">
|
|
172
170
|
<!-- <el-input-number :min="0" :max="100" :precision="0" :step="1" :controls="false"
|
|
173
171
|
:value="flowsaturationthreshold" size="mini"
|
|
174
172
|
@change="handleChangeFlowthreshold" />
|
|
@@ -195,6 +193,17 @@
|
|
|
195
193
|
</el-form-item>
|
|
196
194
|
</el-form>
|
|
197
195
|
</div>
|
|
196
|
+
<div class="detector-associated">
|
|
197
|
+
<div class="tittle">{{$t('openatccomponents.channelizationmap.laneassociated')}}</div>
|
|
198
|
+
<el-select filterable clearable :value="Data.associatedlaneid" @change="handleAssociatedLaneid">
|
|
199
|
+
<el-option
|
|
200
|
+
v-for="id in AssociatedLaneidOptions"
|
|
201
|
+
:key="'Laneid' + id"
|
|
202
|
+
:label="id"
|
|
203
|
+
:value="id">
|
|
204
|
+
</el-option>
|
|
205
|
+
</el-select>
|
|
206
|
+
</div>
|
|
198
207
|
</div>
|
|
199
208
|
<div class="basic-coord" v-if="JSON.stringify(Data) !== '{}' && Data.icontype !== 'countdown' && Data.icontype !== 'crossmap'">
|
|
200
209
|
<div class="tittle">{{$t('openatccomponents.channelizationmap.basicinfo')}}</div>
|
|
@@ -402,7 +411,8 @@ export default {
|
|
|
402
411
|
maxflowResholdOptions: [],
|
|
403
412
|
occupancythreshold: 80,
|
|
404
413
|
minflowsaturationthreshold: 30,
|
|
405
|
-
maxflowsaturationthreshold: 70
|
|
414
|
+
maxflowsaturationthreshold: 70,
|
|
415
|
+
AssociatedLaneidOptions: []
|
|
406
416
|
}
|
|
407
417
|
},
|
|
408
418
|
watch: {
|
|
@@ -428,11 +438,12 @@ export default {
|
|
|
428
438
|
if (data.maxflowsaturationthreshold !== undefined) {
|
|
429
439
|
this.maxflowsaturationthreshold = data.maxflowsaturationthreshold
|
|
430
440
|
}
|
|
431
|
-
this.handleDisabledMinflowOption(data.minflowsaturationthreshold)
|
|
432
|
-
this.handleDisabledMaxflowOption(data.maxflowsaturationthreshold)
|
|
433
441
|
if (data.flip !== undefined) {
|
|
434
442
|
this.flip = data.flip
|
|
435
443
|
}
|
|
444
|
+
if (this.Data.icontype === 'detector' && this.Data.detailtype === 'detector') {
|
|
445
|
+
this.handleDetectorSettings()
|
|
446
|
+
}
|
|
436
447
|
this.getCurPedPosList(data.iconpedtypeid)
|
|
437
448
|
},
|
|
438
449
|
deep: true
|
|
@@ -626,9 +637,31 @@ export default {
|
|
|
626
637
|
this.iconObj.y = basicCoord.y
|
|
627
638
|
this.iconObj.angle = basicCoord.angle
|
|
628
639
|
this.$emit('changeIconDataByType', this.iconObj, ['x', 'y', 'angle'])
|
|
640
|
+
if (basicCoord.keyid !== undefined) {
|
|
641
|
+
this.iconObj.keyid = basicCoord.keyid
|
|
642
|
+
this.$emit('changeIconDataByType', this.iconObj, ['keyid'])
|
|
643
|
+
}
|
|
629
644
|
},
|
|
630
645
|
handleClone () {
|
|
631
646
|
this.$emit('cloneItem', this.iconObj)
|
|
647
|
+
},
|
|
648
|
+
handleDetectorSettings () {
|
|
649
|
+
this.handleDisabledMinflowOption()
|
|
650
|
+
this.handleDisabledMaxflowOption()
|
|
651
|
+
this.getAssociatedLaneidOptions()
|
|
652
|
+
},
|
|
653
|
+
handleAssociatedLaneid (value) {
|
|
654
|
+
// 检测器关联车道索引
|
|
655
|
+
this.iconObj.associatedlaneid = value
|
|
656
|
+
this.$emit('changeIconDataByType', this.iconObj, ['associatedlaneid'])
|
|
657
|
+
},
|
|
658
|
+
getAssociatedLaneidOptions () {
|
|
659
|
+
// 获取当前所有车道的id(即索引)
|
|
660
|
+
let ids = this.Motorways.map(ele => ele.id)
|
|
661
|
+
ids.sort(function (a, b) {
|
|
662
|
+
return a - b
|
|
663
|
+
})
|
|
664
|
+
this.AssociatedLaneidOptions = ids
|
|
632
665
|
}
|
|
633
666
|
},
|
|
634
667
|
created () {
|
package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.check.vue
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
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="phase-associated-component">
|
|
14
|
+
<div class="phase-box" v-for="(item, index) in assophaseList" :key="index">
|
|
15
|
+
<div class="single-phase" :class="preselectPhase == item.id ? 'single-phase-select' : ''">
|
|
16
|
+
<!-- <div class="ped-icon">
|
|
17
|
+
<div v-for="(side, index) in item.peddirection" :key="'peddir-' + index">
|
|
18
|
+
<PatternWalkSvg :Data="getshowped(side)" Width="42" Height="44" />
|
|
19
|
+
</div>
|
|
20
|
+
</div> -->
|
|
21
|
+
|
|
22
|
+
<div class="phase-icon" @click="selectPhase(index, item)" v-if="item.direction">
|
|
23
|
+
<xdr-dir-selector Width="44px" Height="44px" :showlist="getShowlist(item.direction)" :roadDirection="roadDirection"></xdr-dir-selector>
|
|
24
|
+
</div>
|
|
25
|
+
<div class="delete-phase-icon" @click="handleDeletePhase(index, item)">
|
|
26
|
+
<i class="el-icon-close"></i>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="single-phase-name">{{$t('openatccomponents.channelizationmap.phase') + item.id}}</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="phase-box">
|
|
32
|
+
<div class="single-phase add-phase" @click="handleAddPhase()">
|
|
33
|
+
<i class="iconfont icon-fangda" :class="{'add-disabled': !isCanAdd}"></i>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
<script>
|
|
39
|
+
import { mapState } from 'vuex'
|
|
40
|
+
import PhaseDataModel from '../../IntersectionMap/crossDirection/utils.js'
|
|
41
|
+
export default {
|
|
42
|
+
name: 'phase-associated-component',
|
|
43
|
+
data () {
|
|
44
|
+
return {
|
|
45
|
+
assophaseList: [], // 渠化界面的相位列表
|
|
46
|
+
preselectPhase: -1,
|
|
47
|
+
id: 1,
|
|
48
|
+
isCanAdd: true
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
props: {
|
|
52
|
+
editData: {
|
|
53
|
+
type: Object
|
|
54
|
+
},
|
|
55
|
+
Motorways: {
|
|
56
|
+
type: Array
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
computed: {
|
|
60
|
+
...mapState({
|
|
61
|
+
associatedphaselist: state => state.globalParam.associatedPhaseList,
|
|
62
|
+
roadDirection: state => state.globalParam.roadDirection,
|
|
63
|
+
PhaseDataMgr: state => state.globalParam.PhaseDataMgr
|
|
64
|
+
})
|
|
65
|
+
},
|
|
66
|
+
watch: {
|
|
67
|
+
associatedphaselist: {
|
|
68
|
+
handler: function (list) {
|
|
69
|
+
this.assophaseList = JSON.parse(JSON.stringify(list))
|
|
70
|
+
},
|
|
71
|
+
deep: true
|
|
72
|
+
},
|
|
73
|
+
assophaseList: {
|
|
74
|
+
handler: function (list) {
|
|
75
|
+
if (list.length >= 40) {
|
|
76
|
+
this.isCanAdd = false
|
|
77
|
+
} else {
|
|
78
|
+
this.isCanAdd = true
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
deep: true
|
|
82
|
+
},
|
|
83
|
+
editData: {
|
|
84
|
+
handler: function (editobj) {
|
|
85
|
+
if (editobj.phaseid !== undefined) {
|
|
86
|
+
this.preselectPhase = editobj.phaseid
|
|
87
|
+
} else {
|
|
88
|
+
this.preselectPhase = -1
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
deep: true
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
methods: {
|
|
95
|
+
selectPhase (index, item) {
|
|
96
|
+
let direction = this.PhaseDataMgr.editDirPosToPhaseDireaciton(this.editData.icondireid, this.editData.lanePosition)
|
|
97
|
+
// 校验同方位车道不能关联不同相位
|
|
98
|
+
if (this.PhaseDataMgr.checkSameDirectionPhase(direction, item.id, this.editData.phaseid, this.Motorways, this.editData) === false) {
|
|
99
|
+
this.$message.error(this.$t('openatccomponents.channelizationmap.associatedphaseerror'))
|
|
100
|
+
return
|
|
101
|
+
}
|
|
102
|
+
// 关联相位
|
|
103
|
+
this.preselectPhase = item.id
|
|
104
|
+
let alldirection = direction
|
|
105
|
+
this.$emit('selectPhase', this.preselectPhase, alldirection)
|
|
106
|
+
},
|
|
107
|
+
changeDirection (choosedicon) {
|
|
108
|
+
for (let i = 0; i < this.assophaseList.length; i++) {
|
|
109
|
+
if (this.assophaseList[i].id === choosedicon.phaseid) {
|
|
110
|
+
let direction = this.PhaseDataMgr.editDirPosToPhaseDireaciton(choosedicon.icondireid, choosedicon.lanePosition, this.preselectPhase)
|
|
111
|
+
// 校验同方位车道不能关联不同相位
|
|
112
|
+
if (this.PhaseDataMgr.checkSameDirectionPhase(direction, choosedicon.phaseid) === false) {
|
|
113
|
+
this.$message.error(this.$t('openatccomponents.channelizationmap.associatedphaseerror'))
|
|
114
|
+
return
|
|
115
|
+
}
|
|
116
|
+
let alldirection = direction
|
|
117
|
+
this.$emit('selectPhase', this.preselectPhase, alldirection)
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
getShowlist (direction) {
|
|
122
|
+
return direction.map(dir => {
|
|
123
|
+
return {
|
|
124
|
+
id: dir,
|
|
125
|
+
color: '#606266'
|
|
126
|
+
}
|
|
127
|
+
})
|
|
128
|
+
},
|
|
129
|
+
getshowped (peddirection) {
|
|
130
|
+
return {
|
|
131
|
+
id: peddirection,
|
|
132
|
+
name: this.PhaseDataModel.getSidePos(peddirection).name
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
handleDeletePhase (index, row) {
|
|
136
|
+
// 更新模型内初始相位列表数据
|
|
137
|
+
this.PhaseDataMgr.deleteOriginPhase(index)
|
|
138
|
+
// 删除关联此相位的所有车道相位id
|
|
139
|
+
this.handleDisassociatePhase(row.id)
|
|
140
|
+
if (row.id === this.preselectPhase) {
|
|
141
|
+
this.preselectPhase = -1
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
handleDisassociatePhase (deletePhaseid) {
|
|
145
|
+
// 删除相位后,解除相位关联
|
|
146
|
+
this.$emit('handleDisassociatePhase', deletePhaseid)
|
|
147
|
+
},
|
|
148
|
+
handleAddPhase () {
|
|
149
|
+
if (this.assophaseList.length >= 40) {
|
|
150
|
+
this.$message.error(
|
|
151
|
+
this.$t('openatccomponents.phase.mostdata')
|
|
152
|
+
)
|
|
153
|
+
return
|
|
154
|
+
}
|
|
155
|
+
// 更新模型内初始相位列表数据
|
|
156
|
+
this.PhaseDataMgr.addOriginPhase()
|
|
157
|
+
},
|
|
158
|
+
getPedPhasePos () {
|
|
159
|
+
// 行人相位信息
|
|
160
|
+
this.sidewalkPhaseData = []
|
|
161
|
+
this.assophaseList.forEach((ele, i) => {
|
|
162
|
+
if (ele.peddirection) {
|
|
163
|
+
ele.peddirection.forEach((dir, index) => {
|
|
164
|
+
// 行人相位
|
|
165
|
+
if (this.PhaseDataModel.getSidePos(dir)) {
|
|
166
|
+
this.sidewalkPhaseData.push({
|
|
167
|
+
key: this.CrossDiagramMgr.getUniqueKey('pedphase'),
|
|
168
|
+
phaseid: ele.id, // 相位id,用于对应相位状态
|
|
169
|
+
id: dir,
|
|
170
|
+
name: this.PhaseDataModel.getSidePos(dir).name
|
|
171
|
+
})
|
|
172
|
+
}
|
|
173
|
+
})
|
|
174
|
+
}
|
|
175
|
+
})
|
|
176
|
+
return this.sidewalkPhaseData
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
created () {
|
|
180
|
+
this.globalParamModel = this.$store.getters.globalParamModel
|
|
181
|
+
this.PhaseDataModel = new PhaseDataModel()
|
|
182
|
+
},
|
|
183
|
+
mounted () {
|
|
184
|
+
this.assophaseList = JSON.parse(JSON.stringify(this.associatedphaselist))
|
|
185
|
+
},
|
|
186
|
+
destroyed () {
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
</script>
|
|
190
|
+
<style lang="scss">
|
|
191
|
+
</style>
|