openatc-components 0.4.15 → 0.4.17
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/PatternOptimize/PatternOptimize.vue +3 -1
- package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +101 -16
- package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1 -1
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +3 -1
- package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +101 -16
- package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1 -1
- package/static/styles/schemeconfig.scss +2 -1
|
@@ -40,11 +40,13 @@
|
|
|
40
40
|
<el-table-column class="table-column" :label="$t('openatccomponents.overview.flow')" align="center">
|
|
41
41
|
<template slot-scope="scope">
|
|
42
42
|
<el-input-number :controls="false" class="col-content" size="small" :step="1" v-model.number="scope.row.flowperhour" ref="type"></el-input-number>
|
|
43
|
+
<!-- <span>{{scope.row.flowperhour}}</span> -->
|
|
43
44
|
</template>
|
|
44
45
|
</el-table-column>
|
|
45
46
|
<el-table-column align="center" :label="$t('openatccomponents.overview.saturationflow')">
|
|
46
47
|
<template slot-scope="scope">
|
|
47
48
|
<el-input-number :controls="false" class="col-content" size="small" :step="1" v-model.number="scope.row.saturation" ref="types"></el-input-number>
|
|
49
|
+
<!-- <span>{{scope.row.saturation}}</span> -->
|
|
48
50
|
</template>
|
|
49
51
|
</el-table-column>
|
|
50
52
|
</el-table>
|
|
@@ -96,7 +98,7 @@
|
|
|
96
98
|
<script>
|
|
97
99
|
import draggable from 'vuedraggable'
|
|
98
100
|
import { getDuration } from '../../../api/cross'
|
|
99
|
-
import xdrdirselector from '../XRDDirSelector/XRDDirSelector'
|
|
101
|
+
import xdrdirselector from '../XRDDirSelector/XRDDirSelector.vue'
|
|
100
102
|
|
|
101
103
|
export default {
|
|
102
104
|
name: 'patternOptimize',
|
|
@@ -294,23 +294,19 @@
|
|
|
294
294
|
name="patternOptimize"
|
|
295
295
|
>
|
|
296
296
|
<pattern-optimize
|
|
297
|
-
v-for="n in optimizes"
|
|
298
|
-
:key="n"
|
|
299
297
|
class="expendkanban"
|
|
300
|
-
:list="
|
|
301
|
-
patternOne.length === 0
|
|
302
|
-
? planPattern.rings[n - 1]
|
|
303
|
-
: patternOne[0].rings[n - 1]
|
|
304
|
-
"
|
|
305
298
|
:rings="patternOne.length === 0 ? planPattern : patternOne[0]"
|
|
306
299
|
:phaseList="phaseList"
|
|
307
|
-
:
|
|
308
|
-
:
|
|
309
|
-
:
|
|
310
|
-
:nowNumber="n"
|
|
300
|
+
:tableRing="tableRing"
|
|
301
|
+
:showStyle="showStyle"
|
|
302
|
+
:styles="styles"
|
|
311
303
|
@handleSplit="handleSplit"
|
|
312
304
|
>
|
|
313
305
|
</pattern-optimize>
|
|
306
|
+
<!-- ref="patternOptimize"
|
|
307
|
+
:tableRing="tableRing"
|
|
308
|
+
:id="selectedRow.id"
|
|
309
|
+
@optimizesucess="optimizesucess" -->
|
|
314
310
|
</el-tab-pane>
|
|
315
311
|
</el-tabs>
|
|
316
312
|
</el-row>
|
|
@@ -325,7 +321,8 @@
|
|
|
325
321
|
|
|
326
322
|
<script>
|
|
327
323
|
import { hasPermission } from '../../../../utils/auth'
|
|
328
|
-
|
|
324
|
+
import PhaseDataModel from '../../IntersectionMap/crossDirection/utils.js'
|
|
325
|
+
import CrossDiagramMgr from '../../../../EdgeMgr/controller/crossDiagramMgr.js'
|
|
329
326
|
export default {
|
|
330
327
|
name: 'tentativeplancontrol',
|
|
331
328
|
props: {
|
|
@@ -398,7 +395,16 @@ export default {
|
|
|
398
395
|
options: {
|
|
399
396
|
group: 'pattern'
|
|
400
397
|
},
|
|
398
|
+
styles: {
|
|
399
|
+
left: '2px',
|
|
400
|
+
top: 0
|
|
401
|
+
},
|
|
402
|
+
showStyle: {
|
|
403
|
+
left: '2px',
|
|
404
|
+
top: 0
|
|
405
|
+
},
|
|
401
406
|
max: '',
|
|
407
|
+
tableRing: [],
|
|
402
408
|
contrloType: '',
|
|
403
409
|
patternCycleEqual: true,
|
|
404
410
|
// activeList: 'ring',
|
|
@@ -422,6 +428,8 @@ export default {
|
|
|
422
428
|
}
|
|
423
429
|
},
|
|
424
430
|
created () {
|
|
431
|
+
this.PhaseDataModel = new PhaseDataModel()
|
|
432
|
+
this.CrossDiagramMgr = new CrossDiagramMgr()
|
|
425
433
|
this.patternPlan()
|
|
426
434
|
this.getCycle()
|
|
427
435
|
if (this.patternOne.length === 0) {
|
|
@@ -759,7 +767,7 @@ export default {
|
|
|
759
767
|
for (let phase of this.phaseList) {
|
|
760
768
|
let ring = {}
|
|
761
769
|
ring.name = 'Phase ' + phase.id
|
|
762
|
-
ring.desc = this.getPhaseDescription(phase
|
|
770
|
+
ring.desc = this.getPhaseDescription(phase)
|
|
763
771
|
ring.id = phase.id
|
|
764
772
|
ring.value = 30
|
|
765
773
|
ring.mode = 2
|
|
@@ -779,6 +787,15 @@ export default {
|
|
|
779
787
|
let barrier = this.handleCurrentChange(newPattern.rings)
|
|
780
788
|
newPattern.barriers = barrier
|
|
781
789
|
this.planPattern = newPattern
|
|
790
|
+
const flatArray = this.planPattern.rings.flat().filter(item => item !== null)
|
|
791
|
+
this.tableRing = flatArray.map(item => {
|
|
792
|
+
return {
|
|
793
|
+
id: item.id,
|
|
794
|
+
desc: item.desc,
|
|
795
|
+
flowperhour: item.flowperhour ? item.flowperhour : 0,
|
|
796
|
+
saturation: item.saturation ? item.saturation : 0
|
|
797
|
+
}
|
|
798
|
+
})
|
|
782
799
|
},
|
|
783
800
|
getCycle () {
|
|
784
801
|
for (let rings of this.planPattern.rings) {
|
|
@@ -817,12 +834,71 @@ export default {
|
|
|
817
834
|
}
|
|
818
835
|
}
|
|
819
836
|
},
|
|
837
|
+
// getPhaseDescription (phaseList) {
|
|
838
|
+
// if (!phaseList) return
|
|
839
|
+
// let list = []
|
|
840
|
+
// for (let id of phaseList) {
|
|
841
|
+
// let obj = {}
|
|
842
|
+
// obj.id = id
|
|
843
|
+
// obj.color = '#454545'
|
|
844
|
+
// list.push(obj)
|
|
845
|
+
// }
|
|
846
|
+
// return list
|
|
847
|
+
// },
|
|
848
|
+
getPedPhasePos () {
|
|
849
|
+
// 行人相位信息
|
|
850
|
+
this.sidewalkPhaseData = []
|
|
851
|
+
// let phaseList = this.globalParamModel.getParamsByType('phaseList')
|
|
852
|
+
this.phaseList.forEach((ele, i) => {
|
|
853
|
+
if (ele.peddirection) {
|
|
854
|
+
ele.peddirection.forEach((dir, index) => {
|
|
855
|
+
// 行人相位
|
|
856
|
+
if (this.PhaseDataModel.getSidePos(dir)) {
|
|
857
|
+
this.sidewalkPhaseData.push({
|
|
858
|
+
key: this.CrossDiagramMgr.getUniqueKey('pedphase'),
|
|
859
|
+
phaseid: ele.id, // 相位id,用于对应相位状态
|
|
860
|
+
id: dir,
|
|
861
|
+
name: this.PhaseDataModel.getSidePos(dir).name
|
|
862
|
+
})
|
|
863
|
+
}
|
|
864
|
+
})
|
|
865
|
+
}
|
|
866
|
+
})
|
|
867
|
+
return this.sidewalkPhaseData
|
|
868
|
+
},
|
|
820
869
|
getPhaseDescription (phaseList) {
|
|
821
|
-
if (!phaseList) return
|
|
822
870
|
let list = []
|
|
823
|
-
|
|
871
|
+
let peddirections = []
|
|
872
|
+
let sidewalkPhaseData = this.getPedPhasePos()
|
|
873
|
+
for (let walk of sidewalkPhaseData) {
|
|
874
|
+
if (phaseList.peddirection) {
|
|
875
|
+
for (let ped of phaseList.peddirection) {
|
|
876
|
+
// if (stg === walk.phaseid) {
|
|
877
|
+
let obj = {}
|
|
878
|
+
obj.name = walk.name
|
|
879
|
+
obj.id = walk.id
|
|
880
|
+
if (ped === walk.id) {
|
|
881
|
+
peddirections.push(obj)
|
|
882
|
+
peddirections = Array.from(new Set(peddirections))
|
|
883
|
+
}
|
|
884
|
+
// }
|
|
885
|
+
}
|
|
886
|
+
} else {
|
|
887
|
+
peddirections = []
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
if (phaseList.direction.length > 0) {
|
|
891
|
+
for (let id of phaseList.direction) {
|
|
892
|
+
let obj = {}
|
|
893
|
+
obj.id = id
|
|
894
|
+
obj.peddirection = peddirections
|
|
895
|
+
obj.color = '#454545'
|
|
896
|
+
list.push(obj)
|
|
897
|
+
}
|
|
898
|
+
} else {
|
|
824
899
|
let obj = {}
|
|
825
|
-
obj.id =
|
|
900
|
+
obj.id = ''
|
|
901
|
+
obj.peddirection = peddirections
|
|
826
902
|
obj.color = '#454545'
|
|
827
903
|
list.push(obj)
|
|
828
904
|
}
|
|
@@ -906,6 +982,15 @@ export default {
|
|
|
906
982
|
// if (this.patternOne[0].contrloType === 'stage') {
|
|
907
983
|
// this.changeStage()
|
|
908
984
|
// }
|
|
985
|
+
const flatArray = this.patternOne[0].rings.flat().filter(item => item !== null)
|
|
986
|
+
this.tableRing = flatArray.map(item => {
|
|
987
|
+
return {
|
|
988
|
+
id: item.id,
|
|
989
|
+
desc: item.desc,
|
|
990
|
+
flowperhour: item.flowperhour ? item.flowperhour : 0,
|
|
991
|
+
saturation: item.saturation ? item.saturation : 0
|
|
992
|
+
}
|
|
993
|
+
})
|
|
909
994
|
this.manualInfo.offset = this.offset
|
|
910
995
|
for (let rings of this.patternOne[0].rings) {
|
|
911
996
|
if (rings.length === 0) continue
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* See the Mulan PSL v2 for more details.
|
|
11
11
|
**/
|
|
12
12
|
<template>
|
|
13
|
-
<div :style="{position: 'relative'}">
|
|
13
|
+
<div :style="{position: 'relative',height: '40px'}">
|
|
14
14
|
<div :style="{position: 'absolute', left: Data?Data.left:0, top: Data?Data.top:0}">
|
|
15
15
|
<svg
|
|
16
16
|
version="1.1"
|