openatc-components 0.4.62 → 0.4.63
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/.babelrc +18 -18
- package/.editorconfig +9 -9
- package/.eslintignore +5 -5
- package/.eslintrc.js +31 -31
- package/.postcssrc.js +10 -10
- package/README.md +30 -30
- package/build/build.js +41 -41
- package/build/check-versions.js +54 -54
- package/build/package.config.js +58 -58
- package/build/package.dev.config.js +107 -107
- package/build/package.prod.config.js +160 -160
- package/build/utils.js +101 -101
- package/build/vue-loader.conf.js +22 -22
- package/build/webpack.base.conf.js +120 -120
- package/build/webpack.dev.conf.js +95 -95
- package/build/webpack.prod.conf.js +149 -149
- package/config/dev.env.js +8 -8
- package/config/index.js +94 -94
- package/config/prod.env.js +5 -5
- package/config/test.env.js +7 -7
- package/index.html +12 -12
- package/package/kisscomps/components/BoardCard/BoardCard.vue +133 -133
- package/package/kisscomps/components/ChannelRealtimeIntersection/ChannelRealtimeIntersection.vue +123 -123
- package/package/kisscomps/components/Channelization/Channelization.vue +585 -585
- package/package/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +360 -360
- package/package/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +518 -518
- package/package/kisscomps/components/CommonKanban/CommonKanban.vue +132 -132
- package/package/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +456 -456
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-east-bottom.vue +41 -41
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-east-top.vue +60 -60
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-ewped.vue +105 -105
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-north-left.vue +60 -60
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-north-right.vue +60 -60
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-snped.vue +105 -105
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-south-left.vue +60 -60
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-south-right.vue +60 -60
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-west-bottom.vue +60 -60
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-west-top.vue +60 -60
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-xlped.vue +30 -30
- package/package/kisscomps/components/DirectionListConfiguration/svg/ped-xrped.vue +30 -30
- package/package/kisscomps/components/DirectionListConfiguration/svg/pedSvg.vue +78 -78
- package/package/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +181 -181
- package/package/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
- package/package/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -152
- package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -91
- package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +194 -194
- package/package/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -108
- package/package/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +51 -51
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +236 -236
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +247 -247
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +210 -210
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +72 -72
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +368 -368
- package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +230 -230
- package/package/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +74 -74
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +1022 -1022
- package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +144 -144
- package/package/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +707 -707
- package/package/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +172 -172
- package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +172 -172
- package/package/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -99
- package/package/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +87 -87
- package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -32
- package/package/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -20
- package/package/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -278
- package/package/kisscomps/components/ExpendConfig/ExpendConfig.vue +118 -118
- package/package/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +178 -178
- package/package/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +162 -162
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +629 -629
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +447 -447
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +341 -341
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +497 -497
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +353 -353
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +359 -359
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +443 -443
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkClickSvg.vue +1302 -1302
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1190 -1190
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +498 -498
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +484 -484
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +488 -488
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +566 -566
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +640 -640
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +497 -497
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +486 -486
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +490 -490
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +575 -575
- package/package/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
- package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
- package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
- package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
- package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
- package/package/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
- package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +1598 -1598
- package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +197 -197
- package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +200 -196
- package/package/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +122 -122
- package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
- package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
- package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/effectPos.json +115 -115
- package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +115 -115
- package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +115 -115
- package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
- package/package/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +219 -219
- package/package/kisscomps/components/IntersectionMap/crossDirection/utils.js +91 -91
- package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +220 -220
- package/package/kisscomps/components/IntersectionMapDirSelect/customCrossDiagram.vue +711 -0
- package/package/kisscomps/components/IntersectionMapDirSelect/customintersectionmap.vue +188 -0
- package/package/kisscomps/components/IntersectionMapDirSelect/index.js +2 -0
- package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +534 -534
- package/package/kisscomps/components/KanBan/kanban.vue +231 -231
- package/package/kisscomps/components/MessageBox/index.vue +96 -96
- package/package/kisscomps/components/OverLap/OverLap.vue +237 -237
- package/package/kisscomps/components/OverviewComponent/index.vue +853 -853
- package/package/kisscomps/components/PatternOptimize/PatternOptimize.vue +329 -329
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +1843 -1843
- package/package/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
- package/package/kisscomps/components/PhaseDirectionSelect/PhaseDirectionSelect.vue +126 -126
- package/package/kisscomps/components/PhaseDirectionText/PhaseDirectionText.vue +106 -106
- package/package/kisscomps/components/PhaseLegend/PhaseLegend.vue +286 -286
- package/package/kisscomps/components/PhaseMarker/index.js +6 -6
- package/package/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
- package/package/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
- package/package/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
- package/package/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
- package/package/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
- package/package/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
- package/package/kisscomps/components/PhasePedSelect/index.vue +206 -206
- package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +1027 -1027
- package/package/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +365 -365
- package/package/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +92 -92
- package/package/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +214 -214
- package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +235 -235
- package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +235 -235
- package/package/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +131 -131
- package/package/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +470 -470
- package/package/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +871 -871
- package/package/kisscomps/components/SchemeConfig/manualControlModalNew/othersIcon.vue +151 -151
- package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +215 -215
- package/package/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
- package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +308 -308
- package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1293 -1293
- package/package/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +95 -95
- package/package/kisscomps/components/SelectCrossPhase/index.vue +418 -418
- package/package/kisscomps/components/SelectCrossPhase/utils.js +142 -142
- package/package/kisscomps/components/StageBord/StageBord.vue +303 -303
- package/package/kisscomps/components/StageOptimize/StageOptimize.vue +367 -367
- package/package/kisscomps/components/StageOptimize/index.js +2 -2
- package/package/kisscomps/components/StageOptimize/index.vue +310 -0
- package/package/kisscomps/components/StageStatus/StageStatus.vue +341 -341
- package/package/kisscomps/components/Stages/index.vue +307 -307
- package/package/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
- package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1041 -1041
- package/package/kisscomps/components/XiaoKanban/DirSelector.vue +356 -356
- package/package/kisscomps/components/XiaoKanban/index.vue +122 -122
- package/package/kisscomps/components/overView/index.vue +676 -676
- package/package/kisscomps/components/patternConfig/index.vue +802 -802
- package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +599 -599
- package/package/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -665
- package/package/kisscomps/components/patternConfig/planContent.vue +604 -604
- package/package/kisscomps/components/patternConfig/planMenu.vue +329 -329
- package/package/kisscomps/components/patternConfig/utils.js +152 -152
- package/package/kisscomps/components/patternList/patternList.vue +606 -606
- package/package/kisscomps/index.js +133 -131
- package/package/kissui.min.js +1 -1
- package/package/static/img/CrossRoadsSvg.66a6236.svg +529 -0
- package/package.json +126 -126
- package/src/App.vue +24 -24
- package/src/EdgeMgr/EdgeModelBase.js +16 -16
- package/src/EdgeMgr/controller/crossDiagramMgr.js +125 -125
- package/src/api/authapi.js +31 -31
- package/src/api/config.js +21 -21
- package/src/api/control.js +110 -110
- package/src/api/cross.js +62 -62
- package/src/api/device.js +135 -135
- package/src/api/fault.js +66 -66
- package/src/api/index.js +24 -24
- package/src/api/login.js +46 -46
- package/src/api/optimize.js +72 -72
- package/src/api/param.js +165 -165
- package/src/api/passwdAssest.js +101 -101
- package/src/api/permission.js +33 -33
- package/src/api/route.js +171 -171
- package/src/api/template.js +27 -27
- package/src/assets/font/LICENSE.txt +202 -202
- package/src/assets/font/font.css +6 -6
- package/src/i18n/index.js +26 -26
- package/src/i18n/language/en.js +1493 -1493
- package/src/i18n/language/index.js +25 -25
- package/src/i18n/language/zh.js +1493 -1493
- package/src/icons/demo_index.html +8445 -8445
- package/src/icons/iconfont.css +1451 -1451
- package/src/icons/iconfont.json +2522 -2522
- package/src/icons/index.js +20 -20
- package/src/icons/svg/azimuthlocking.svg +26 -26
- package/src/icons/svg/bendi.svg +110 -110
- package/src/icons/svg/bujin.svg +36 -36
- package/src/icons/svg/connectBlue.svg +7 -7
- package/src/icons/svg/currentvolume.svg +0 -0
- package/src/icons/svg/custom-BRTlane.svg +40 -40
- package/src/icons/svg/custom-buslane.svg +40 -40
- package/src/icons/svg/custom-detector.svg +12 -12
- package/src/icons/svg/custom-east-bottom.svg +32 -32
- package/src/icons/svg/custom-east-top.svg +32 -32
- package/src/icons/svg/custom-ewped.svg +35 -35
- package/src/icons/svg/custom-nonmotorizedlane.svg +40 -40
- package/src/icons/svg/custom-north-left.svg +32 -32
- package/src/icons/svg/custom-north-right.svg +32 -32
- package/src/icons/svg/custom-peddetector.svg +17 -17
- package/src/icons/svg/custom-snped.svg +35 -35
- package/src/icons/svg/custom-south-left.svg +32 -32
- package/src/icons/svg/custom-south-right.svg +32 -32
- package/src/icons/svg/custom-tramlane.svg +40 -40
- package/src/icons/svg/custom-vehiclebranch.svg +40 -40
- package/src/icons/svg/custom-vehiclemainroad.svg +41 -41
- package/src/icons/svg/custom-west-bottom.svg +32 -32
- package/src/icons/svg/custom-west-top.svg +32 -32
- package/src/icons/svg/custom-xlped.svg +14 -14
- package/src/icons/svg/custom-xrped.svg +14 -14
- package/src/icons/svg/cutRed.svg +7 -7
- package/src/icons/svg/cycle.svg +0 -0
- package/src/icons/svg/dingzhouqi.svg +34 -34
- package/src/icons/svg/ganyingkongzhi.svg +30 -30
- package/src/icons/svg/guandeng.svg +81 -81
- package/src/icons/svg/huangshan.svg +71 -71
- package/src/icons/svg/maincontrol.svg +0 -0
- package/src/icons/svg/manualcontrolbackground.svg +51 -51
- package/src/icons/svg/manualcontrolbackground1.svg +62 -62
- package/src/icons/svg/manualcontrolbackgrounden.svg +62 -62
- package/src/icons/svg/model.svg +0 -0
- package/src/icons/svg/phasediff.svg +0 -0
- package/src/icons/svg/prioritycontrol.svg +21 -21
- package/src/icons/svg/quanhong.svg +86 -86
- package/src/icons/svg/shanghe.svg +11 -11
- package/src/icons/svg/shoudong.svg +103 -103
- package/src/icons/svg/tentativeplan.svg +28 -28
- package/src/icons/svg/time.svg +0 -0
- package/src/icons/svg/wuxianlan.svg +46 -46
- package/src/icons/svg/xiala.svg +11 -11
- package/src/icons/svg/xingrenguojie.svg +33 -33
- package/src/icons/svg/xitong.svg +89 -89
- package/src/icons/svg/youxian.svg +41 -41
- package/src/icons/svg/zizhukongzhi.svg +43 -43
- package/src/kisscomps/components/BoardCard/BoardCard.vue +133 -133
- package/src/kisscomps/components/ChannelRealtimeIntersection/ChannelRealtimeIntersection.vue +123 -123
- package/src/kisscomps/components/Channelization/Channelization.vue +585 -585
- package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +360 -360
- package/src/kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface.vue +518 -518
- package/src/kisscomps/components/CommonKanban/CommonKanban.vue +132 -132
- package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +456 -456
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-bottom.vue +41 -41
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-east-top.vue +60 -60
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-ewped.vue +105 -105
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-left.vue +60 -60
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-north-right.vue +60 -60
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-snped.vue +105 -105
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-left.vue +60 -60
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-south-right.vue +60 -60
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-bottom.vue +60 -60
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-west-top.vue +60 -60
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xlped.vue +30 -30
- package/src/kisscomps/components/DirectionListConfiguration/svg/ped-xrped.vue +30 -30
- package/src/kisscomps/components/DirectionListConfiguration/svg/pedSvg.vue +78 -78
- package/src/kisscomps/components/DrawChannelization/drawsvg/basicCoordInfo.vue +181 -181
- package/src/kisscomps/components/DrawChannelization/drawsvg/channelizationElements.vue +255 -255
- package/src/kisscomps/components/DrawChannelization/drawsvg/detectorAssociatedComponent.vue +152 -152
- package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/TextBox.vue +91 -91
- package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/crossMap.vue +194 -194
- package/src/kisscomps/components/DrawChannelization/drawsvg/drawElement/editText.vue +108 -108
- package/src/kisscomps/components/DrawChannelization/drawsvg/firstImportCrossmap.vue +51 -51
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/countdownSvg.vue +236 -236
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorChart.vue +247 -247
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/detectorIconSvg.vue +210 -210
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/laneIcon.vue +72 -72
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +368 -368
- package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/pedroadIconSvg.vue +230 -230
- package/src/kisscomps/components/DrawChannelization/drawsvg/importDialog.vue +74 -74
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +1022 -1022
- package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +144 -144
- package/src/kisscomps/components/DrawChannelization/drawsvg/laneEditPanel.vue +707 -707
- package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +172 -172
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +172 -172
- package/src/kisscomps/components/DrawChannelization/drawsvg/table.vue +99 -99
- package/src/kisscomps/components/DrawChannelization/drawsvg/utils/loadutils.js +87 -87
- package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phaseDataModel.js +32 -32
- package/src/kisscomps/components/DrawChannelization/drawsvg/utils/phasePos.json +20 -20
- package/src/kisscomps/components/DrawChannelization/phaseDataMgr.js +278 -278
- package/src/kisscomps/components/ExpendConfig/ExpendConfig.vue +118 -118
- package/src/kisscomps/components/FaultDetailModal/FaultDetailModal.vue +178 -178
- package/src/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +162 -162
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CrossRoadsSvg.vue +629 -629
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/CustomRoadsSvg.vue +46 -46
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionEWSvg.vue +447 -447
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/PedSectionSNSvg.vue +341 -341
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampEastSvg.vue +497 -497
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampNorthSvg.vue +353 -353
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampSouthSvg.vue +359 -359
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/RampWestSvg.vue +443 -443
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkClickSvg.vue +1302 -1302
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/SidewalkSvg.vue +1190 -1190
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeEastRoadsSvg.vue +498 -498
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeNorthRoadsSvg.vue +484 -484
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeSouthRoadsSvg.vue +488 -488
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/TShapeWestRoadsSvg.vue +566 -566
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LCrossRoadsSvg.vue +640 -640
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeEastRoadsSvg.vue +497 -497
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeNorthRoadsSvg.vue +486 -486
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeSouthRoadsSvg.vue +490 -490
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/leftroad/LTShapeWestRoadsSvg.vue +575 -575
- package/src/kisscomps/components/IntersectionMap/crossDirection/baseImg/refreshSvg.vue +63 -63
- package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/busMapSvg.vue +50 -50
- package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/eastBusSvg.vue +167 -167
- package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/northBusSvg.vue +168 -168
- package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/southBusSvg.vue +168 -168
- package/src/kisscomps/components/IntersectionMap/crossDirection/busIcon/westBusSvg.vue +169 -169
- package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +1598 -1598
- package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/LphaseIconSvg.vue +197 -197
- package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/phaseIconSvg.vue +200 -196
- package/src/kisscomps/components/IntersectionMap/crossDirection/phaseIcon/rampPhaseIconSvg.vue +122 -122
- package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.json +196 -196
- package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/busPos.left.json +196 -196
- package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/effectPos.json +115 -115
- package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.json +115 -115
- package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/phasePos.left.json +115 -115
- package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/rampPos.json +52 -52
- package/src/kisscomps/components/IntersectionMap/crossDirection/posJson/sidePos.json +219 -219
- package/src/kisscomps/components/IntersectionMap/crossDirection/utils.js +91 -91
- package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +220 -220
- package/src/kisscomps/components/IntersectionMapDirSelect/customCrossDiagram.vue +711 -0
- package/src/kisscomps/components/IntersectionMapDirSelect/customintersectionmap.vue +188 -0
- package/src/kisscomps/components/IntersectionMapDirSelect/index.js +2 -0
- package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +534 -534
- package/src/kisscomps/components/KanBan/kanban.vue +231 -231
- package/src/kisscomps/components/MessageBox/index.vue +96 -96
- package/src/kisscomps/components/OverLap/OverLap.vue +237 -237
- package/src/kisscomps/components/OverviewComponent/index.vue +853 -853
- package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +329 -329
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +1843 -1843
- package/src/kisscomps/components/PatternWalkSvg/PatternWalkSvg.vue +423 -423
- package/src/kisscomps/components/PhaseDirectionSelect/PhaseDirectionSelect.vue +126 -126
- package/src/kisscomps/components/PhaseDirectionText/PhaseDirectionText.vue +106 -106
- package/src/kisscomps/components/PhaseLegend/PhaseLegend.vue +286 -286
- package/src/kisscomps/components/PhaseMarker/index.js +6 -6
- package/src/kisscomps/components/PhaseMarker/phasemarker.vue +215 -215
- package/src/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -121
- package/src/kisscomps/components/PhaseMarker/svg/phase.vue +60 -60
- package/src/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -62
- package/src/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -62
- package/src/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -117
- package/src/kisscomps/components/PhasePedSelect/index.vue +206 -206
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +1027 -1027
- package/src/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +365 -365
- package/src/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +92 -92
- package/src/kisscomps/components/SchemeConfig/closePhaselControlModal/index.vue +214 -214
- package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +235 -235
- package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +235 -235
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +131 -131
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +470 -470
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +871 -871
- package/src/kisscomps/components/SchemeConfig/manualControlModalNew/othersIcon.vue +151 -151
- package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +215 -215
- package/src/kisscomps/components/SchemeConfig/priorityControl/utils.js +163 -163
- package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +308 -308
- package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1293 -1293
- package/src/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +95 -95
- package/src/kisscomps/components/SelectCrossPhase/index.vue +418 -418
- package/src/kisscomps/components/SelectCrossPhase/utils.js +142 -142
- package/src/kisscomps/components/StageBord/StageBord.vue +303 -303
- package/src/kisscomps/components/StageOptimize/StageOptimize.vue +367 -367
- package/src/kisscomps/components/StageOptimize/index.js +2 -2
- package/src/kisscomps/components/StageStatus/StageStatus.vue +341 -341
- package/src/kisscomps/components/Stages/index.vue +307 -307
- package/src/kisscomps/components/SvgIcon/SvgIcon.vue +53 -53
- package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1041 -1041
- package/src/kisscomps/components/XiaoKanban/DirSelector.vue +356 -356
- package/src/kisscomps/components/XiaoKanban/index.vue +122 -122
- package/src/kisscomps/components/overView/index.vue +676 -676
- package/src/kisscomps/components/patternConfig/index.vue +802 -802
- package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +599 -599
- package/src/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -665
- package/src/kisscomps/components/patternConfig/planContent.vue +604 -604
- package/src/kisscomps/components/patternConfig/planMenu.vue +329 -329
- package/src/kisscomps/components/patternConfig/utils.js +152 -152
- package/src/kisscomps/components/patternList/patternList.vue +606 -606
- package/src/kisscomps/index.js +133 -131
- package/src/lib/publicjs/ArryListUtil.js +38 -38
- package/src/lib/publicjs/HttpurlMgr.js +45 -45
- package/src/lib/publicjs/KissApi.js +158 -158
- package/src/lib/publicjs/KissWSSub/Heartcheck.js +128 -128
- package/src/lib/publicjs/KissWSSub/KissWsSub.js +91 -91
- package/src/lib/publicjs/KissWSSub/KissWsSubByType.js +152 -152
- package/src/lib/publicjs/KissWSSub/SimuWsSubByType.js +44 -44
- package/src/lib/publicjs/KissWSSub/Sub.js +51 -51
- package/src/lib/publicjs/KissWSSub/SubChannel.js +119 -119
- package/src/lib/publicjs/basecomponents.js +65 -65
- package/src/lib/publicjs/localStorage.js +112 -112
- package/src/lib/publicjs/objdeepcopy.js +32 -32
- package/src/lib/publicjs/pageScroll.js +30 -30
- package/src/lib/publicjs/passwdAssest.js +101 -101
- package/src/lib/publicjs/styleclassfactory.js +32 -32
- package/src/main.js +51 -51
- package/src/router/index.js +63 -63
- package/src/store/index.js +26 -26
- package/src/store/modules/globalParam.js +67 -67
- package/src/utils/ControlFormat.js +68 -68
- package/src/utils/RingDataModel.js +335 -335
- package/src/utils/auth.js +199 -199
- package/src/utils/conflct.js +268 -268
- package/src/utils/conflictList.js +87 -87
- package/src/utils/dateFormat.js +41 -41
- package/src/utils/fault.js +196 -196
- package/src/utils/faultcode.js +225 -225
- package/src/utils/index.js +69 -69
- package/src/utils/pedphasedesc.js +119 -119
- package/src/utils/phaseList.js +203 -203
- package/src/utils/phasedesc.js +144 -144
- package/src/utils/responseMessage.js +21 -21
- package/src/utils/validate.js +43 -43
- package/src/views/customchannelization.vue +49 -49
- package/src/views/home.1.vue +479 -479
- package/src/views/home.vue +93 -93
- package/src/views/intersection.vue +537 -527
- package/src/views/intersection2.vue +328 -328
- package/src/views/overView.vue +63 -63
- package/src/views/patternConfig.vue +14792 -14792
- package/src/views/schemeconfig.vue +205 -205
- package/static/apiconfig.json +471 -471
- package/static/img/CrossRoadsSvg.svg +529 -0
- package/static/styles/channelizatioon.scss +433 -433
- package/static/styles/common.scss +30 -30
- package/static/styles/commonkanban.scss +168 -168
- package/static/styles/dark/index.scss +2 -2
- package/static/styles/dark/theme/element-dark.scss +44 -44
- package/static/styles/index.scss +84 -84
- package/static/styles/intersection.scss +180 -180
- package/static/styles/light/index.scss +2 -2
- package/static/styles/light/theme/element-light.scss +44 -44
- package/static/styles/overview.scss +146 -146
- package/static/styles/patternConfig.scss +56 -56
- package/static/styles/phasePedSelect.scss +71 -71
- package/static/styles/schemeconfig.scss +558 -558
- package/static/styles/stages.scss +57 -57
- package/static/styles/uiComponents.scss +57 -57
- package/static/styles/xiaokanban.scss +61 -61
- package/static/token.json +2 -2
- package/test/e2e/custom-assertions/elementCount.js +27 -27
- package/test/e2e/nightwatch.conf.js +46 -46
- package/test/e2e/runner.js +48 -48
- package/test/e2e/specs/test.js +19 -19
- package/test/unit/.eslintrc +7 -7
- package/test/unit/jest.conf.js +30 -30
- package/test/unit/setup.js +3 -3
- package/test/unit/specs/HelloWorld.spec.js +11 -11
- package/package/kissui.js +0 -216608
- package/pnpm-lock.yaml +0 -16362
- package/src/utils/errorcode.js +0 -231
|
@@ -1,1293 +1,1293 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="tentativeplan-control manual-common-content">
|
|
3
|
-
<!-- <div class="title" style="margin-bottom: 18px">
|
|
4
|
-
{{ $t('openatccomponents.overview.tentativeplan') }}
|
|
5
|
-
</div> -->
|
|
6
|
-
<el-row>
|
|
7
|
-
<el-col :span="12">
|
|
8
|
-
<el-form
|
|
9
|
-
ref="manual"
|
|
10
|
-
label-position="left"
|
|
11
|
-
:model="manualInfo"
|
|
12
|
-
label-width="90px"
|
|
13
|
-
>
|
|
14
|
-
<el-form-item
|
|
15
|
-
:label="$t('openatccomponents.overview.patternid')"
|
|
16
|
-
prop="count"
|
|
17
|
-
>
|
|
18
|
-
<el-select
|
|
19
|
-
@change="selectPattern()"
|
|
20
|
-
v-model="manualInfo.tempPatternid"
|
|
21
|
-
class="col-inner"
|
|
22
|
-
size="small"
|
|
23
|
-
:placeholder="$t('openatccomponents.common.select')"
|
|
24
|
-
>
|
|
25
|
-
<el-option
|
|
26
|
-
v-for="item in patternSelect"
|
|
27
|
-
:key="item.value"
|
|
28
|
-
:label="item.label"
|
|
29
|
-
:value="item.value"
|
|
30
|
-
>
|
|
31
|
-
</el-option>
|
|
32
|
-
</el-select>
|
|
33
|
-
<!-- <el-input v-model="manualInfo.tempDuration" size="small" :placeholder="$t('openatccomponents.common.input')"></el-input> -->
|
|
34
|
-
</el-form-item>
|
|
35
|
-
<el-form-item
|
|
36
|
-
:label="$t('openatccomponents.overview.delay')"
|
|
37
|
-
prop="intersection"
|
|
38
|
-
>
|
|
39
|
-
<el-input-number
|
|
40
|
-
:placeholder="$t('openatccomponents.common.input')"
|
|
41
|
-
:min="0"
|
|
42
|
-
:max="65535"
|
|
43
|
-
:precision="0"
|
|
44
|
-
:step="1"
|
|
45
|
-
:controls="false"
|
|
46
|
-
v-model.number="manualInfo.tempDelay"
|
|
47
|
-
size="small"
|
|
48
|
-
></el-input-number>
|
|
49
|
-
<!-- <el-input v-model="manualInfo.tempDelay" size="small" :placeholder="$t('openatccomponents.common.input')"></el-input> -->
|
|
50
|
-
</el-form-item>
|
|
51
|
-
</el-form>
|
|
52
|
-
</el-col>
|
|
53
|
-
<el-col :span="12">
|
|
54
|
-
<el-form
|
|
55
|
-
ref="manual"
|
|
56
|
-
label-position="left"
|
|
57
|
-
:model="manualInfo"
|
|
58
|
-
label-width="90px"
|
|
59
|
-
>
|
|
60
|
-
<el-form-item
|
|
61
|
-
:label="$t('openatccomponents.overview.patternoffset')"
|
|
62
|
-
prop="count"
|
|
63
|
-
>
|
|
64
|
-
<el-input-number
|
|
65
|
-
:placeholder="$t('openatccomponents.common.input')"
|
|
66
|
-
:min="0"
|
|
67
|
-
:max="65535"
|
|
68
|
-
:precision="0"
|
|
69
|
-
:step="1"
|
|
70
|
-
:controls="false"
|
|
71
|
-
v-model.number="manualInfo.offset"
|
|
72
|
-
size="small"
|
|
73
|
-
></el-input-number>
|
|
74
|
-
<!-- <el-input v-model="manualInfo.offset" size="small" :placeholder="$t('openatccomponents.common.input')"></el-input> -->
|
|
75
|
-
</el-form-item>
|
|
76
|
-
<el-form-item
|
|
77
|
-
:label="$t('openatccomponents.overview.duration')"
|
|
78
|
-
prop="intersection"
|
|
79
|
-
>
|
|
80
|
-
<el-input-number
|
|
81
|
-
:placeholder="$t('openatccomponents.common.input')"
|
|
82
|
-
:min="0"
|
|
83
|
-
:max="65535"
|
|
84
|
-
:precision="0"
|
|
85
|
-
:step="1"
|
|
86
|
-
:controls="false"
|
|
87
|
-
v-model.number="manualInfo.duration"
|
|
88
|
-
size="small"
|
|
89
|
-
></el-input-number>
|
|
90
|
-
<!-- <el-input v-model="manualInfo.duration" size="small" :placeholder="$t('openatccomponents.common.input')"></el-input> -->
|
|
91
|
-
</el-form-item>
|
|
92
|
-
</el-form>
|
|
93
|
-
</el-col>
|
|
94
|
-
</el-row>
|
|
95
|
-
<el-row style="margin-top: 20px;">
|
|
96
|
-
<el-radio v-model="isRing" :label="false" @change="changeRing">{{
|
|
97
|
-
$t('openatccomponents.common.ringStyle')
|
|
98
|
-
}}</el-radio>
|
|
99
|
-
<el-radio v-model="isRing" :label="true" @change="changeStage">{{
|
|
100
|
-
$t('openatccomponents.common.stageStyle')
|
|
101
|
-
}}</el-radio>
|
|
102
|
-
<!-- <div class="title" style="margin-top:18px; margin-bottom:10px">{{$t('openatccomponents.overview.patternstate')}}:
|
|
103
|
-
<span>({{$t('openatccomponents.overview.cycle')}}: {{cycle}} {{$t('openatccomponents.overview.patternoffset')}}: {{offset}})</span>
|
|
104
|
-
</div> -->
|
|
105
|
-
<!-- <stage-status
|
|
106
|
-
:patternStatusList="patternOne.length===0?planPattern.rings:patternOne[0].rings"
|
|
107
|
-
>
|
|
108
|
-
</stage-status> -->
|
|
109
|
-
<pattern-list
|
|
110
|
-
:key="keyChange"
|
|
111
|
-
:allPatternList="allPatternList"
|
|
112
|
-
:contrloType="contrloType"
|
|
113
|
-
:stagesChange="
|
|
114
|
-
patternOne.length === 0
|
|
115
|
-
? planPattern.stagesList
|
|
116
|
-
: patternOne[0].stagesList
|
|
117
|
-
"
|
|
118
|
-
:patternList="patternOne.length === 0 ? planPattern.rings : patternOne"
|
|
119
|
-
:patternStatusList="
|
|
120
|
-
patternOne.length === 0 ? planPattern.rings : patternOne[0].rings
|
|
121
|
-
"
|
|
122
|
-
:cycles="
|
|
123
|
-
patternOne.length === 0 ? planPattern.cycle : patternOne[0].cycle
|
|
124
|
-
"
|
|
125
|
-
:phaseList="phaseList"
|
|
126
|
-
>
|
|
127
|
-
</pattern-list>
|
|
128
|
-
</el-row>
|
|
129
|
-
<el-row style="margin-top: 20px;">
|
|
130
|
-
<el-tabs v-model="activeTab" type="card">
|
|
131
|
-
<el-tab-pane
|
|
132
|
-
v-if="!isRing"
|
|
133
|
-
:label="$t('openatccomponents.pattern.ringConfig')"
|
|
134
|
-
name="kanban"
|
|
135
|
-
>
|
|
136
|
-
<div style="width: 100%; overflow: hidden;">
|
|
137
|
-
<kan-ban
|
|
138
|
-
v-for="n in ringCount"
|
|
139
|
-
:key="n"
|
|
140
|
-
class="closephasekanban"
|
|
141
|
-
:index="n"
|
|
142
|
-
:options="options"
|
|
143
|
-
:list="
|
|
144
|
-
patternOne.length === 0
|
|
145
|
-
? planPattern.rings[n - 1]
|
|
146
|
-
: patternOne[0].rings[n - 1]
|
|
147
|
-
"
|
|
148
|
-
:phaseList="phaseList"
|
|
149
|
-
:header-text="$t('openatccomponents.pattern.ring') + n"
|
|
150
|
-
@handleSplit="handleSplit"
|
|
151
|
-
>
|
|
152
|
-
</kan-ban>
|
|
153
|
-
</div>
|
|
154
|
-
</el-tab-pane>
|
|
155
|
-
<!-- <el-tab-pane v-if="isRing" :label="$t('openatccomponents.pattern.stageConfig')" name="kanban">
|
|
156
|
-
<div class="stage-panel-contener">
|
|
157
|
-
<StageKanban
|
|
158
|
-
v-for="(stage, index) in scope.row.stagesList"
|
|
159
|
-
class="kanban todo"
|
|
160
|
-
:key="index"
|
|
161
|
-
:stage="stage"
|
|
162
|
-
:stageInfo="scope.row.stagesList"
|
|
163
|
-
:isRing="isRing"
|
|
164
|
-
:options="scope.row.options"
|
|
165
|
-
:coordphaseOption="coordphaseOption"
|
|
166
|
-
:rowIndex="scope.$index"
|
|
167
|
-
:subIndex="index"
|
|
168
|
-
@onStageSplitChange="onStageSplitChange"
|
|
169
|
-
@stageSplitChange="stageSplitChange"
|
|
170
|
-
@onStageDelaystartChange="onStageDelaystartChange"
|
|
171
|
-
@onStageAdvanceendChange="onStageAdvanceendChange"
|
|
172
|
-
/>
|
|
173
|
-
<div v-if="isRing" style="margin-left: 20px">
|
|
174
|
-
<el-button
|
|
175
|
-
type="primary"
|
|
176
|
-
@click="addStage(scope.row.stagesList)"
|
|
177
|
-
icon="el-icon-plus"
|
|
178
|
-
circle
|
|
179
|
-
></el-button>
|
|
180
|
-
</div>
|
|
181
|
-
</div>
|
|
182
|
-
</el-tab-pane> -->
|
|
183
|
-
<el-tab-pane
|
|
184
|
-
v-if="isRing"
|
|
185
|
-
:label="$t('openatccomponents.pattern.stageConfig')"
|
|
186
|
-
name="ring"
|
|
187
|
-
>
|
|
188
|
-
<div class="stage-panel-contener">
|
|
189
|
-
<stage-bord
|
|
190
|
-
v-for="(stage, index) in patternOne.length === 0
|
|
191
|
-
? planPattern.stagesList
|
|
192
|
-
: patternOne[0].stagesList"
|
|
193
|
-
class="kanban todo"
|
|
194
|
-
:key="index"
|
|
195
|
-
:stage="stage"
|
|
196
|
-
:options="options"
|
|
197
|
-
:isRing="isRing"
|
|
198
|
-
:stageInfo="
|
|
199
|
-
patternOne.length === 0
|
|
200
|
-
? planPattern.stagesList
|
|
201
|
-
: patternOne[0].stagesList
|
|
202
|
-
"
|
|
203
|
-
:coordphaseOption="coordphaseOption"
|
|
204
|
-
:subIndex="index"
|
|
205
|
-
@onStageSplitChange="onStageSplitChange"
|
|
206
|
-
@stageSplitChange="stageSplitChange"
|
|
207
|
-
@onStageDelaystartChange="onStageDelaystartChange"
|
|
208
|
-
@onStageAdvanceendChange="onStageAdvanceendChange"
|
|
209
|
-
>
|
|
210
|
-
</stage-bord>
|
|
211
|
-
<div v-if="isRing" style="margin-left: 10px">
|
|
212
|
-
<el-button
|
|
213
|
-
type="primary"
|
|
214
|
-
@click="
|
|
215
|
-
addStage(
|
|
216
|
-
patternOne.length === 0
|
|
217
|
-
? planPattern.stagesList
|
|
218
|
-
: patternOne[0].stagesList
|
|
219
|
-
)
|
|
220
|
-
"
|
|
221
|
-
icon="el-icon-plus"
|
|
222
|
-
circle
|
|
223
|
-
></el-button>
|
|
224
|
-
</div>
|
|
225
|
-
</div>
|
|
226
|
-
</el-tab-pane>
|
|
227
|
-
<el-tab-pane
|
|
228
|
-
v-if="!isRing"
|
|
229
|
-
:label="$t('openatccomponents.pattern.parameters')"
|
|
230
|
-
name="parame"
|
|
231
|
-
>
|
|
232
|
-
<el-row>
|
|
233
|
-
<expend-config
|
|
234
|
-
v-for="(j, index) in ringCounts"
|
|
235
|
-
:key="index"
|
|
236
|
-
class="expendkanban"
|
|
237
|
-
:options="options"
|
|
238
|
-
:header-text="$t('openatccomponents.pattern.ring') + j"
|
|
239
|
-
:list="
|
|
240
|
-
patternOne.length === 0
|
|
241
|
-
? planPattern.rings[j - 1]
|
|
242
|
-
: patternOne[0].rings[j - 1]
|
|
243
|
-
"
|
|
244
|
-
>
|
|
245
|
-
</expend-config>
|
|
246
|
-
<div class="forbiddenstage">
|
|
247
|
-
{{ $t('openatccomponents.pattern.forbiddenstage') }}
|
|
248
|
-
<el-input
|
|
249
|
-
class="stage-value"
|
|
250
|
-
size="small"
|
|
251
|
-
v-model="forbiddenstage"
|
|
252
|
-
></el-input>
|
|
253
|
-
</div>
|
|
254
|
-
<div class="forbiddenstage">
|
|
255
|
-
{{ $t('openatccomponents.pattern.screenstage') }}
|
|
256
|
-
<el-input
|
|
257
|
-
class="stage-value"
|
|
258
|
-
size="small"
|
|
259
|
-
v-model="screenstage"
|
|
260
|
-
></el-input>
|
|
261
|
-
</div>
|
|
262
|
-
<div class="forbiddenstage">
|
|
263
|
-
{{ $t('openatccomponents.pattern.coordinatestage') }}
|
|
264
|
-
<el-input
|
|
265
|
-
class="stage-value"
|
|
266
|
-
size="small"
|
|
267
|
-
v-model="coordinatestage"
|
|
268
|
-
></el-input>
|
|
269
|
-
</div>
|
|
270
|
-
</el-row>
|
|
271
|
-
</el-tab-pane>
|
|
272
|
-
<el-tab-pane
|
|
273
|
-
v-if="!isRing"
|
|
274
|
-
:label="$t('openatccomponents.pattern.overLap')"
|
|
275
|
-
name="overlap"
|
|
276
|
-
>
|
|
277
|
-
<el-row :gutter="20">
|
|
278
|
-
<el-col :span="24">
|
|
279
|
-
<over-lap
|
|
280
|
-
:stageList="stagesList"
|
|
281
|
-
:overlap="overlap"
|
|
282
|
-
:checked="true"
|
|
283
|
-
:tentative="true"
|
|
284
|
-
:cycleChange="false"
|
|
285
|
-
:cycle="overLapCycle"
|
|
286
|
-
>
|
|
287
|
-
</over-lap>
|
|
288
|
-
</el-col>
|
|
289
|
-
</el-row>
|
|
290
|
-
</el-tab-pane>
|
|
291
|
-
<el-tab-pane
|
|
292
|
-
v-if="!isRing"
|
|
293
|
-
:label="$t('openatccomponents.pattern.patternOptimize')"
|
|
294
|
-
name="patternOptimize"
|
|
295
|
-
>
|
|
296
|
-
<pattern-optimize
|
|
297
|
-
class="expendkanban"
|
|
298
|
-
:rings="patternOne.length === 0 ? planPattern : patternOne[0]"
|
|
299
|
-
:phaseList="phaseList"
|
|
300
|
-
:tableRing="tableRing"
|
|
301
|
-
:showStyle="showStyle"
|
|
302
|
-
:styles="styles"
|
|
303
|
-
:isTentative="true"
|
|
304
|
-
@handleSplit="handleSplit"
|
|
305
|
-
>
|
|
306
|
-
</pattern-optimize>
|
|
307
|
-
<!-- ref="patternOptimize"
|
|
308
|
-
:tableRing="tableRing"
|
|
309
|
-
:id="selectedRow.id"
|
|
310
|
-
@optimizesucess="optimizesucess" -->
|
|
311
|
-
</el-tab-pane>
|
|
312
|
-
</el-tabs>
|
|
313
|
-
</el-row>
|
|
314
|
-
<div class="footer">
|
|
315
|
-
<el-button v-if="isShowBack" @click="handleClose()">{{$t('openatccomponents.button.Back')}}</el-button>
|
|
316
|
-
<el-button v-if="isShowRecovery && isHasPermission('configer:manual:renew')" @click="toAutoControl()">{{$t('openatccomponents.overview.recovery')}}</el-button>
|
|
317
|
-
<el-button v-if="isShowImplement" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.implement')}}</el-button>
|
|
318
|
-
<el-button v-if="!isShowImplement" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
|
|
319
|
-
</div>
|
|
320
|
-
</div>
|
|
321
|
-
</template>
|
|
322
|
-
|
|
323
|
-
<script>
|
|
324
|
-
import { hasPermission } from '../../../../utils/auth'
|
|
325
|
-
import PhaseDataModel from '../../IntersectionMap/crossDirection/utils.js'
|
|
326
|
-
import CrossDiagramMgr from '../../../../EdgeMgr/controller/crossDiagramMgr.js'
|
|
327
|
-
export default {
|
|
328
|
-
name: 'tentativeplancontrol',
|
|
329
|
-
props: {
|
|
330
|
-
realtimeStatusModalvisible: {
|
|
331
|
-
type: Boolean,
|
|
332
|
-
default: true
|
|
333
|
-
},
|
|
334
|
-
controlData: {
|
|
335
|
-
type: Object
|
|
336
|
-
},
|
|
337
|
-
phaseList: {
|
|
338
|
-
type: Array
|
|
339
|
-
},
|
|
340
|
-
overlap: {
|
|
341
|
-
type: Array
|
|
342
|
-
},
|
|
343
|
-
allPatternList: {
|
|
344
|
-
type: Array
|
|
345
|
-
},
|
|
346
|
-
patternSelect: {
|
|
347
|
-
type: Array
|
|
348
|
-
},
|
|
349
|
-
isShowBack: {
|
|
350
|
-
type: Boolean,
|
|
351
|
-
default: true
|
|
352
|
-
},
|
|
353
|
-
isShowRecovery: {
|
|
354
|
-
type: Boolean,
|
|
355
|
-
default: true
|
|
356
|
-
},
|
|
357
|
-
isShowImplement: {
|
|
358
|
-
type: Boolean,
|
|
359
|
-
default: true
|
|
360
|
-
}
|
|
361
|
-
},
|
|
362
|
-
watch: {
|
|
363
|
-
isRing (newVal) {
|
|
364
|
-
this.activeTab = newVal ? 'ring' : 'kanban'
|
|
365
|
-
}
|
|
366
|
-
},
|
|
367
|
-
computed: {
|
|
368
|
-
computedActiveTab () {
|
|
369
|
-
return this.isRing ? 'ring' : 'kanban'
|
|
370
|
-
},
|
|
371
|
-
rings () {
|
|
372
|
-
return this.patternOne.length === 0 ? this.planPattern.rings : this.patternOne[0].rings
|
|
373
|
-
},
|
|
374
|
-
cycle () {
|
|
375
|
-
return this.patternOne.length === 0 ? this.max : (this.patternOne.length > 0 && (this.patternOne[0].cycle < this.max)) ? this.max : this.patternOne[0].cycle
|
|
376
|
-
},
|
|
377
|
-
offset () {
|
|
378
|
-
return Number((this.patternOne.length === 0 || this.manualInfo.offset > 0) ? this.manualInfo.offset : this.patternOne[0].offset)
|
|
379
|
-
},
|
|
380
|
-
forbiddenstage () {
|
|
381
|
-
return this.patternOne.length === 0 ? this.allPatternList[0].forbiddenstage : this.patternOne[0].forbiddenstage
|
|
382
|
-
},
|
|
383
|
-
screenstage () {
|
|
384
|
-
return this.patternOne.length === 0 ? this.allPatternList[0].screenstage : this.patternOne[0].screenstage
|
|
385
|
-
},
|
|
386
|
-
coordinatestage () {
|
|
387
|
-
return this.patternOne.length === 0 ? this.allPatternList[0].coordinatestage : this.patternOne[0].coordinatestage
|
|
388
|
-
}
|
|
389
|
-
},
|
|
390
|
-
data () {
|
|
391
|
-
return {
|
|
392
|
-
stagesList: [],
|
|
393
|
-
phaseRings: [],
|
|
394
|
-
keyChange: false,
|
|
395
|
-
overLapCycle: 0,
|
|
396
|
-
options: {
|
|
397
|
-
group: 'pattern'
|
|
398
|
-
},
|
|
399
|
-
styles: {
|
|
400
|
-
left: '2px',
|
|
401
|
-
top: 0
|
|
402
|
-
},
|
|
403
|
-
showStyle: {
|
|
404
|
-
left: '2px',
|
|
405
|
-
top: 0
|
|
406
|
-
},
|
|
407
|
-
max: '',
|
|
408
|
-
tableRing: [],
|
|
409
|
-
contrloType: '',
|
|
410
|
-
patternCycleEqual: true,
|
|
411
|
-
// activeList: 'ring',
|
|
412
|
-
activeTab: 'kanban',
|
|
413
|
-
isRing: false,
|
|
414
|
-
// isChange: false,
|
|
415
|
-
ringCount: 1,
|
|
416
|
-
ringCounts: 1,
|
|
417
|
-
barriers: [],
|
|
418
|
-
optimizes: 1,
|
|
419
|
-
coordphaseOption: [],
|
|
420
|
-
patternOne: [],
|
|
421
|
-
planPattern: {},
|
|
422
|
-
manualInfo: {
|
|
423
|
-
tempPatternid: '',
|
|
424
|
-
offset: 0,
|
|
425
|
-
duration: 300,
|
|
426
|
-
tempDelay: 0 // 控制方式手动操作的情况下的延迟时间的临时值。
|
|
427
|
-
// tempDuration: 300 // 控制方式手动操作的情况下的持续时间的临时值。
|
|
428
|
-
}
|
|
429
|
-
}
|
|
430
|
-
},
|
|
431
|
-
created () {
|
|
432
|
-
this.PhaseDataModel = new PhaseDataModel()
|
|
433
|
-
this.CrossDiagramMgr = new CrossDiagramMgr()
|
|
434
|
-
this.patternPlan()
|
|
435
|
-
this.getCycle()
|
|
436
|
-
if (this.patternOne.length === 0) {
|
|
437
|
-
this.handleStageData(this.planPattern.rings)
|
|
438
|
-
}
|
|
439
|
-
this.initData()
|
|
440
|
-
if (!this.allPatternList[0].contrloType && this.allPatternList[0].rings.length > 0) {
|
|
441
|
-
this.contrloType = 'ring'
|
|
442
|
-
} else if (!this.allPatternList[0].contrloType && this.allPatternList[0].rings.length === 0) {
|
|
443
|
-
this.contrloType = 'stage'
|
|
444
|
-
} else {
|
|
445
|
-
this.contrloType = this.allPatternList[0].contrloType
|
|
446
|
-
}
|
|
447
|
-
for (let i = 0; i < this.allPatternList.length; i++) {
|
|
448
|
-
if (this.allPatternList[i].contrloType === 'stage' || (this.isRing && !this.allPatternList[i].contrloType)) {
|
|
449
|
-
this.isRing = true
|
|
450
|
-
// this.setStageList(this.allPatternList[i].stagesList, this.allPatternList[i].id)
|
|
451
|
-
} else if (this.allPatternList[i].contrloType === 'ring' || (!this.isRing && !this.allPatternList[i].contrloType && this.allPatternList[i].rings.length > 0)) {
|
|
452
|
-
this.isRing = false
|
|
453
|
-
// this.handleStageData(this.allPatternList[i].rings)
|
|
454
|
-
} else if (this.allPatternList[i].rings.length === 0 && this.allPatternList[i].stagesList.length > 0) {
|
|
455
|
-
this.isRing = true
|
|
456
|
-
// this.setStageList(this.allPatternList[i].stagesList, this.allPatternList[i].id)
|
|
457
|
-
}
|
|
458
|
-
}
|
|
459
|
-
},
|
|
460
|
-
methods: {
|
|
461
|
-
addStage (row) {
|
|
462
|
-
// this.isChange = false
|
|
463
|
-
if (row.length > 15) {
|
|
464
|
-
this.$message.error(
|
|
465
|
-
this.$t('edge.pattern.mostlist')
|
|
466
|
-
)
|
|
467
|
-
return
|
|
468
|
-
}
|
|
469
|
-
if (this.patternOne.length !== 0) {
|
|
470
|
-
this.patternOne[0].stagesList.push({
|
|
471
|
-
key: row.length,
|
|
472
|
-
green: 25,
|
|
473
|
-
yellow: 3,
|
|
474
|
-
red: 2,
|
|
475
|
-
stageNo: 0,
|
|
476
|
-
phases: [],
|
|
477
|
-
stageSplit: 30
|
|
478
|
-
})
|
|
479
|
-
} else {
|
|
480
|
-
this.planPattern.stagesList.push({
|
|
481
|
-
key: row.length,
|
|
482
|
-
green: 25,
|
|
483
|
-
yellow: 3,
|
|
484
|
-
red: 2,
|
|
485
|
-
phases: [],
|
|
486
|
-
stageSplit: 30
|
|
487
|
-
})
|
|
488
|
-
}
|
|
489
|
-
},
|
|
490
|
-
changeRing () {
|
|
491
|
-
this.contrloType = 'ring'
|
|
492
|
-
this.isRing = false
|
|
493
|
-
// const globalParamModel = this.$store.getters.globalParamModel
|
|
494
|
-
// let pattern = globalParamModel.getParamsByType('patternList')
|
|
495
|
-
// let pattern = this.allPatternList
|
|
496
|
-
this.getCycle()
|
|
497
|
-
this.patternOne = this.allPatternList.filter(item => {
|
|
498
|
-
return item.id === Number(this.manualInfo.tempPatternid)
|
|
499
|
-
})
|
|
500
|
-
// if (this.isChange) {
|
|
501
|
-
// for (let i = 0; i < pattern.length; i++) {
|
|
502
|
-
this.handleStageData(this.patternOne.rings)
|
|
503
|
-
// }
|
|
504
|
-
// } else {
|
|
505
|
-
// for (let i = 0; i < pattern.length; i++) {
|
|
506
|
-
// this.setStageList(pattern[i].stagesList, pattern[i].id)
|
|
507
|
-
// }
|
|
508
|
-
// }
|
|
509
|
-
},
|
|
510
|
-
changeStage () {
|
|
511
|
-
this.contrloType = 'stage'
|
|
512
|
-
this.isRing = true
|
|
513
|
-
// this.patternOne = this.allPatternList.filter(item => {
|
|
514
|
-
// return item.id === Number(this.manualInfo.tempPatternid)
|
|
515
|
-
// })
|
|
516
|
-
// this.getStageCycle()
|
|
517
|
-
},
|
|
518
|
-
getStageCycle () {
|
|
519
|
-
// this.patternOne.length === 0 ? this.allPatternList this.patternOne
|
|
520
|
-
if (this.patternOne.length === 0) {
|
|
521
|
-
// this.setStageList(this.planPattern.stagesList, this.planPattern.id)
|
|
522
|
-
// this.planPattern.stagesList = []
|
|
523
|
-
} else {
|
|
524
|
-
// this.patternOne = this.allPatternList.filter(item => {
|
|
525
|
-
// return item.id === Number(this.manualInfo.tempPatternid)
|
|
526
|
-
// })
|
|
527
|
-
// this.setStageList(this.patternOne[0].stagesList, this.patternOne[0].id)
|
|
528
|
-
}
|
|
529
|
-
},
|
|
530
|
-
setStageList (stageChange, id) {
|
|
531
|
-
// let patternList = this.globalParamModel.getParamsByType('patternList')
|
|
532
|
-
// let patternList = this.allPatternList
|
|
533
|
-
let stagesList = []
|
|
534
|
-
for (let i = 0; i < stageChange.length; i++) {
|
|
535
|
-
let stage = JSON.parse(JSON.stringify(stageChange[i]))
|
|
536
|
-
let stageItem = this.getStageItems(stage.phases, i, stageChange)
|
|
537
|
-
stagesList.push(JSON.parse(JSON.stringify(stageItem)))
|
|
538
|
-
}
|
|
539
|
-
(this.patternOne.length === 0 ? this.planPattern : this.patternOne).map(item => { // 添加特征参数stage
|
|
540
|
-
if (item.id === id) {
|
|
541
|
-
if (this.isRing) {
|
|
542
|
-
item.contrloType = 'stage'
|
|
543
|
-
} else {
|
|
544
|
-
item.contrloType = 'ring'
|
|
545
|
-
}
|
|
546
|
-
item.stagesList = JSON.parse(JSON.stringify(stagesList.filter(item => item.stageSplit)))
|
|
547
|
-
}
|
|
548
|
-
})
|
|
549
|
-
this.stagesList = stagesList.filter(item => item.stageSplit)
|
|
550
|
-
},
|
|
551
|
-
getStageItems (stageArr, i, stageChange) {
|
|
552
|
-
let res = {
|
|
553
|
-
key: i,
|
|
554
|
-
split: this.narr[i], // 阶段绿性比
|
|
555
|
-
phases: stageArr,
|
|
556
|
-
delaystart: 0,
|
|
557
|
-
advanceend: 0
|
|
558
|
-
}
|
|
559
|
-
for (let rings of stageChange) {
|
|
560
|
-
if (i === rings.key) {
|
|
561
|
-
res.green = rings.green ? rings.green : rings.green === 0 ? 0 : 25
|
|
562
|
-
res.yellow = rings.yellow ? rings.yellow : rings.yellow === 0 ? 0 : 3
|
|
563
|
-
res.red = rings.red ? rings.red : rings.red === 0 ? 0 : 2
|
|
564
|
-
res.phases = rings.phases ? rings.phases : stageArr
|
|
565
|
-
res.stageNo = rings.stageNo ? rings.stageNo : 0
|
|
566
|
-
// res.stageSplit = rings.split ? rings.split : 30
|
|
567
|
-
if (rings.split) {
|
|
568
|
-
res.stageSplit = rings.split
|
|
569
|
-
} else if (rings.stageSplit) {
|
|
570
|
-
res.stageSplit = rings.stageSplit
|
|
571
|
-
} else {
|
|
572
|
-
res.stageSplit = 0
|
|
573
|
-
}
|
|
574
|
-
}
|
|
575
|
-
}
|
|
576
|
-
return res
|
|
577
|
-
},
|
|
578
|
-
tranform (arr) { // 分barrier
|
|
579
|
-
let newMap = new Map()
|
|
580
|
-
arr.forEach(({ id, current }) => {
|
|
581
|
-
const find = newMap.get(current.join())
|
|
582
|
-
if (find) newMap.get(current.join()).push(id)
|
|
583
|
-
else newMap.set(current.join(), [id])
|
|
584
|
-
})
|
|
585
|
-
let ret = []
|
|
586
|
-
newMap.forEach((value, key) => {
|
|
587
|
-
ret.push(Array.from(new Set(key.split(',').map(Number).concat(value))))
|
|
588
|
-
})
|
|
589
|
-
const result = []
|
|
590
|
-
for (const a of ret) {
|
|
591
|
-
let merged = false
|
|
592
|
-
for (const r of result) {
|
|
593
|
-
if (this.check([...r], a)) {
|
|
594
|
-
a.forEach(item => r.add(item))
|
|
595
|
-
merged = true
|
|
596
|
-
}
|
|
597
|
-
}
|
|
598
|
-
if (!merged) {
|
|
599
|
-
result.push(new Set(a))
|
|
600
|
-
}
|
|
601
|
-
merged = false
|
|
602
|
-
}
|
|
603
|
-
return result.map(s => [...s])
|
|
604
|
-
},
|
|
605
|
-
check (arr1, arr2) {
|
|
606
|
-
return arr1.some(a1 => arr2.some(a2 => a1 === a2))
|
|
607
|
-
},
|
|
608
|
-
handleCurrentChange (val) { // 两个ring的数据
|
|
609
|
-
if (val === null || val.length === 0) return
|
|
610
|
-
// 按环序分组
|
|
611
|
-
let ringlength = []
|
|
612
|
-
let ringsequence = val.map(item => {
|
|
613
|
-
if (item.length === 0) return
|
|
614
|
-
ringlength.push(item.length)
|
|
615
|
-
return item.map(k => {
|
|
616
|
-
return k.id
|
|
617
|
-
})
|
|
618
|
-
})
|
|
619
|
-
let newRings = ringsequence.filter(item => item)
|
|
620
|
-
let minLength = Math.min(...ringlength)
|
|
621
|
-
let resultArrs = [] // 环1分组
|
|
622
|
-
let resultArr = [] // 环2分组
|
|
623
|
-
for (let j = 0; j < ringsequence[0].length; j += minLength) {
|
|
624
|
-
resultArrs.push(ringsequence[0].slice(j, j + minLength))
|
|
625
|
-
if (ringsequence[0].length === minLength) {
|
|
626
|
-
resultArrs.push([])
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
if (newRings.length > 1) {
|
|
630
|
-
for (let i = 0; i < ringsequence[1].length; i += minLength) {
|
|
631
|
-
resultArr.push(ringsequence[1].slice(i, i + minLength))
|
|
632
|
-
}
|
|
633
|
-
}
|
|
634
|
-
// this.patternInfo = []
|
|
635
|
-
// this.barrierList = []
|
|
636
|
-
let currentArr = []
|
|
637
|
-
let newPattern = []
|
|
638
|
-
val.map(i => {
|
|
639
|
-
newPattern.push(...i)
|
|
640
|
-
})
|
|
641
|
-
if (this.phaseList.length === 0) return
|
|
642
|
-
for (let patternStatus of val[0]) {
|
|
643
|
-
// if (patternStatus.mode !== 7) {
|
|
644
|
-
let concurrent = this.phaseList.filter((item) => {
|
|
645
|
-
return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
|
|
646
|
-
})[0].concurrent// 当前相位的并发相位
|
|
647
|
-
if (concurrent) {
|
|
648
|
-
let obj = {
|
|
649
|
-
id: patternStatus.id,
|
|
650
|
-
current: concurrent.sort()
|
|
651
|
-
}
|
|
652
|
-
currentArr.push(obj)
|
|
653
|
-
}
|
|
654
|
-
// }
|
|
655
|
-
}
|
|
656
|
-
if (currentArr.length !== 0) {
|
|
657
|
-
let newCurrent = this.tranform(currentArr)
|
|
658
|
-
// 取没个环与环关系的并集
|
|
659
|
-
let barrierRing1 = []
|
|
660
|
-
let barrierRing2 = []
|
|
661
|
-
let ring1 = [] // 环1与关系1的并集
|
|
662
|
-
for (let h = 0; h < newCurrent.length; h++) {
|
|
663
|
-
let adds = [...new Set(resultArrs[0])].filter(item => newCurrent[h].includes(item))
|
|
664
|
-
ring1.push(adds)
|
|
665
|
-
}
|
|
666
|
-
let ring1s = [] // 环1与关系2的并集
|
|
667
|
-
for (let h = 0; h < newCurrent.length; h++) {
|
|
668
|
-
let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
|
|
669
|
-
ring1s.push(addRing1)
|
|
670
|
-
}
|
|
671
|
-
barrierRing1.push(...ring1, ...ring1s)
|
|
672
|
-
let resultList = []
|
|
673
|
-
if (newRings.length > 1) {
|
|
674
|
-
let ring2s = [] // 环2与关系1的并集
|
|
675
|
-
for (let h = 0; h < newCurrent.length; h++) {
|
|
676
|
-
let addRing2 = [...new Set(resultArr[1])].filter(item => newCurrent[h].includes(item))
|
|
677
|
-
ring2s.push(addRing2)
|
|
678
|
-
}
|
|
679
|
-
let ring2 = [] // 环2与关系1的并集
|
|
680
|
-
for (let h = 0; h < newCurrent.length; h++) {
|
|
681
|
-
let add = [...new Set(resultArr[0])].filter(item => newCurrent[h].includes(item))
|
|
682
|
-
ring2.push(add)
|
|
683
|
-
}
|
|
684
|
-
barrierRing2.push(...ring2, ...ring2s)
|
|
685
|
-
for (let k = 0; k < barrierRing1.length; k++) {
|
|
686
|
-
resultList.push(barrierRing1[k].concat(barrierRing2[k]))
|
|
687
|
-
}
|
|
688
|
-
}
|
|
689
|
-
let resultLists = resultList.filter(item => item.length !== 0)
|
|
690
|
-
let ringArr = []
|
|
691
|
-
for (let l = 0; l < resultLists.length; l++) {
|
|
692
|
-
for (let d = 0; d < newCurrent.length; d++) {
|
|
693
|
-
if (newCurrent[d].filter(item => resultLists[l].includes(item)).length > 0) {
|
|
694
|
-
ringArr.push({
|
|
695
|
-
data: resultLists[l],
|
|
696
|
-
id: d + 1,
|
|
697
|
-
index: l
|
|
698
|
-
})
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
for (var i = 0; i < ringArr.length; i++) {
|
|
703
|
-
for (var j = i + 1; j < ringArr.length; j++) {
|
|
704
|
-
if (ringArr[i].id === ringArr[j].id && ringArr[i].index + 1 === ringArr[j].index) {
|
|
705
|
-
ringArr[i].data = ringArr[i].data.concat(ringArr[j].data)
|
|
706
|
-
ringArr.splice(ringArr.indexOf(ringArr[j].id), 1)
|
|
707
|
-
}
|
|
708
|
-
}
|
|
709
|
-
}
|
|
710
|
-
let resArr = ringArr.map(item => item.data)
|
|
711
|
-
let ringTeam = this.step1(this.phaseList, resArr)
|
|
712
|
-
let ringTeams = ringTeam.filter(item => item.length !== 0)
|
|
713
|
-
return this.setBarrier(ringTeams, val)
|
|
714
|
-
}
|
|
715
|
-
},
|
|
716
|
-
setBarrier (ringTeam, val) {
|
|
717
|
-
const patternObjs = {}
|
|
718
|
-
val.forEach(l => {
|
|
719
|
-
l.map(k => {
|
|
720
|
-
patternObjs[k.id] = k.value
|
|
721
|
-
})
|
|
722
|
-
})
|
|
723
|
-
let ret = ringTeam.map((y, index) => {
|
|
724
|
-
if (!y || y.length === 0) return
|
|
725
|
-
y.map(n => {
|
|
726
|
-
n.length = n.data.length > 1 ? n.data.reduce((pre, cur) => pre + patternObjs[cur], 0) : patternObjs[n.data[0]]
|
|
727
|
-
})
|
|
728
|
-
return {
|
|
729
|
-
barrier: index + 1,
|
|
730
|
-
length: y[0].length,
|
|
731
|
-
items: y.map(j => {
|
|
732
|
-
return {
|
|
733
|
-
ring: j.ring,
|
|
734
|
-
data: j.data
|
|
735
|
-
}
|
|
736
|
-
})
|
|
737
|
-
}
|
|
738
|
-
})
|
|
739
|
-
return ret
|
|
740
|
-
},
|
|
741
|
-
step1 (list, arr) { // 各个环包含的相位
|
|
742
|
-
const ret = []
|
|
743
|
-
const listObj = {}
|
|
744
|
-
list.forEach(l => {
|
|
745
|
-
listObj[l.id] = l.ring
|
|
746
|
-
})
|
|
747
|
-
arr.forEach(a => {
|
|
748
|
-
const retItem = []
|
|
749
|
-
a.forEach(b => {
|
|
750
|
-
if (listObj[b]) {
|
|
751
|
-
const find = retItem.find(r => r.ring === listObj[b])
|
|
752
|
-
if (find) find.data.push(b)
|
|
753
|
-
else retItem.push({ ring: listObj[b], data: [b] })
|
|
754
|
-
}
|
|
755
|
-
})
|
|
756
|
-
ret.push(retItem)
|
|
757
|
-
})
|
|
758
|
-
return ret
|
|
759
|
-
},
|
|
760
|
-
patternPlan () {
|
|
761
|
-
let Pattern = {
|
|
762
|
-
offset: 0,
|
|
763
|
-
cycle: 0,
|
|
764
|
-
stagesList: [],
|
|
765
|
-
rings: [[], [], [], []]
|
|
766
|
-
}
|
|
767
|
-
var newPattern = JSON.parse(JSON.stringify(Pattern))
|
|
768
|
-
for (let phase of this.phaseList) {
|
|
769
|
-
let ring = {}
|
|
770
|
-
ring.name = 'Phase ' + phase.id
|
|
771
|
-
ring.desc = this.getPhaseDescription(phase)
|
|
772
|
-
ring.id = phase.id
|
|
773
|
-
ring.value = 30
|
|
774
|
-
ring.mode = 2
|
|
775
|
-
ring.options = []
|
|
776
|
-
ring.delaystart = 0
|
|
777
|
-
ring.advanceend = 0
|
|
778
|
-
if (phase.ring === 1) {
|
|
779
|
-
newPattern.rings[0].push(ring)
|
|
780
|
-
} else if (phase.ring === 2) {
|
|
781
|
-
newPattern.rings[1].push(ring)
|
|
782
|
-
} else if (phase.ring === 3) {
|
|
783
|
-
newPattern.rings[2].push(ring)
|
|
784
|
-
} else if (phase.ring === 4) {
|
|
785
|
-
newPattern.rings[3].push(ring)
|
|
786
|
-
}
|
|
787
|
-
}
|
|
788
|
-
let barrier = this.handleCurrentChange(newPattern.rings)
|
|
789
|
-
newPattern.barriers = barrier
|
|
790
|
-
this.planPattern = newPattern
|
|
791
|
-
const flatArray = this.planPattern.rings.flat().filter(item => item !== null)
|
|
792
|
-
this.tableRing = flatArray.map(item => {
|
|
793
|
-
return {
|
|
794
|
-
id: item.id,
|
|
795
|
-
desc: item.desc,
|
|
796
|
-
flowperhour: item.flowperhour ? item.flowperhour : 0,
|
|
797
|
-
saturation: item.saturation ? item.saturation : 0
|
|
798
|
-
}
|
|
799
|
-
})
|
|
800
|
-
},
|
|
801
|
-
getCycle () {
|
|
802
|
-
for (let rings of this.planPattern.rings) {
|
|
803
|
-
let num = 0
|
|
804
|
-
for (let i = 0; i < rings.length; i++) {
|
|
805
|
-
if (rings[i].length !== 0) {
|
|
806
|
-
if (rings[i].mode === 7) { // 忽略相位不计周期
|
|
807
|
-
continue
|
|
808
|
-
}
|
|
809
|
-
num = num + Number(rings[i].value)
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
if (num !== 0) {
|
|
813
|
-
this.planPattern.cycle = num
|
|
814
|
-
break
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
},
|
|
818
|
-
getCycles () {
|
|
819
|
-
if (!this.patternOne[0].stages) return
|
|
820
|
-
let stages = this.patternOne[0].stages
|
|
821
|
-
let modeId = stages.filter(item => item.length === 1)[0]
|
|
822
|
-
for (let rings of this.patternOne[0].rings) {
|
|
823
|
-
let num = 0
|
|
824
|
-
for (let i = 0; i < rings.length; i++) {
|
|
825
|
-
if (rings[i].length !== 0) {
|
|
826
|
-
if (rings[i].mode === 7 && (modeId && modeId[0] === rings[i].id)) { // 忽略相位不计周期
|
|
827
|
-
continue
|
|
828
|
-
}
|
|
829
|
-
num = num + Number(rings[i].value)
|
|
830
|
-
}
|
|
831
|
-
}
|
|
832
|
-
if (num !== 0) {
|
|
833
|
-
this.patternOne[0].cycle = num
|
|
834
|
-
break
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
},
|
|
838
|
-
// getPhaseDescription (phaseList) {
|
|
839
|
-
// if (!phaseList) return
|
|
840
|
-
// let list = []
|
|
841
|
-
// for (let id of phaseList) {
|
|
842
|
-
// let obj = {}
|
|
843
|
-
// obj.id = id
|
|
844
|
-
// obj.color = '#454545'
|
|
845
|
-
// list.push(obj)
|
|
846
|
-
// }
|
|
847
|
-
// return list
|
|
848
|
-
// },
|
|
849
|
-
getPedPhasePos () {
|
|
850
|
-
// 行人相位信息
|
|
851
|
-
this.sidewalkPhaseData = []
|
|
852
|
-
// let phaseList = this.globalParamModel.getParamsByType('phaseList')
|
|
853
|
-
this.phaseList.forEach((ele, i) => {
|
|
854
|
-
if (ele.peddirection) {
|
|
855
|
-
ele.peddirection.forEach((dir, index) => {
|
|
856
|
-
// 行人相位
|
|
857
|
-
if (this.PhaseDataModel.getSidePos(dir)) {
|
|
858
|
-
this.sidewalkPhaseData.push({
|
|
859
|
-
key: this.CrossDiagramMgr.getUniqueKey('pedphase'),
|
|
860
|
-
phaseid: ele.id, // 相位id,用于对应相位状态
|
|
861
|
-
id: dir,
|
|
862
|
-
name: this.PhaseDataModel.getSidePos(dir).name
|
|
863
|
-
})
|
|
864
|
-
}
|
|
865
|
-
})
|
|
866
|
-
}
|
|
867
|
-
})
|
|
868
|
-
return this.sidewalkPhaseData
|
|
869
|
-
},
|
|
870
|
-
getPhaseDescription (phaseList) {
|
|
871
|
-
let list = []
|
|
872
|
-
let peddirections = []
|
|
873
|
-
let sidewalkPhaseData = this.getPedPhasePos()
|
|
874
|
-
for (let walk of sidewalkPhaseData) {
|
|
875
|
-
if (phaseList.peddirection) {
|
|
876
|
-
for (let ped of phaseList.peddirection) {
|
|
877
|
-
// if (stg === walk.phaseid) {
|
|
878
|
-
let obj = {}
|
|
879
|
-
obj.name = walk.name
|
|
880
|
-
obj.id = walk.id
|
|
881
|
-
if (ped === walk.id) {
|
|
882
|
-
peddirections.push(obj)
|
|
883
|
-
peddirections = Array.from(new Set(peddirections))
|
|
884
|
-
}
|
|
885
|
-
// }
|
|
886
|
-
}
|
|
887
|
-
} else {
|
|
888
|
-
peddirections = []
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
if (phaseList.direction.length > 0) {
|
|
892
|
-
for (let id of phaseList.direction) {
|
|
893
|
-
let obj = {}
|
|
894
|
-
obj.id = id
|
|
895
|
-
obj.peddirection = peddirections
|
|
896
|
-
obj.color = '#454545'
|
|
897
|
-
list.push(obj)
|
|
898
|
-
}
|
|
899
|
-
} else {
|
|
900
|
-
let obj = {}
|
|
901
|
-
obj.id = ''
|
|
902
|
-
obj.peddirection = peddirections
|
|
903
|
-
obj.color = '#454545'
|
|
904
|
-
list.push(obj)
|
|
905
|
-
}
|
|
906
|
-
return list
|
|
907
|
-
},
|
|
908
|
-
handleClose () {
|
|
909
|
-
this.$emit('closePhaseBack')
|
|
910
|
-
},
|
|
911
|
-
onStageSplitChange (diff, rowIndex, subIndex) {
|
|
912
|
-
let stageArr = this.stagesList[subIndex].stages
|
|
913
|
-
let row = this.patternList[rowIndex]
|
|
914
|
-
let ringsList = row.rings
|
|
915
|
-
for (let rings of ringsList) {
|
|
916
|
-
for (let ring of rings) {
|
|
917
|
-
if (stageArr.includes(ring.id)) {
|
|
918
|
-
ring.value = (ring.value ? ring.value : 0) + diff
|
|
919
|
-
continue
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
},
|
|
924
|
-
stageSplitChange (diff, rowIndex, subIndex) {
|
|
925
|
-
let row = this.patternOne.length === 0 ? this.planPattern : this.patternOne
|
|
926
|
-
let ringsList = this.patternOne.length === 0 ? row.stagesList : row[0].stagesList
|
|
927
|
-
for (let rings of ringsList) {
|
|
928
|
-
// if (subIndex === rings.key) {
|
|
929
|
-
rings.stageSplit = (rings.green ? rings.green : 0) + (rings.yellow ? rings.yellow : 0) + (rings.red ? rings.red : 0)
|
|
930
|
-
continue
|
|
931
|
-
// }
|
|
932
|
-
}
|
|
933
|
-
},
|
|
934
|
-
onStageDelaystartChange (diff, rowIndex, subIndex) {
|
|
935
|
-
let stageArr = this.stagesList[subIndex].stages
|
|
936
|
-
let row = this.patternList[rowIndex]
|
|
937
|
-
let ringsList = row.rings
|
|
938
|
-
for (let rings of ringsList) {
|
|
939
|
-
for (let ring of rings) {
|
|
940
|
-
if (stageArr.includes(ring.id)) {
|
|
941
|
-
ring.delaystart = (ring.delaystart ? ring.delaystart : 0) + diff
|
|
942
|
-
continue
|
|
943
|
-
}
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
},
|
|
947
|
-
onStageAdvanceendChange (diff, rowIndex, subIndex) {
|
|
948
|
-
let stageArr = this.stagesList[subIndex].stages
|
|
949
|
-
let row = this.patternList[rowIndex]
|
|
950
|
-
let ringsList = row.rings
|
|
951
|
-
for (let rings of ringsList) {
|
|
952
|
-
for (let ring of rings) {
|
|
953
|
-
if (stageArr.includes(ring.id)) {
|
|
954
|
-
ring.advanceend = (ring.advanceend ? ring.advanceend : 0) + diff
|
|
955
|
-
continue
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
},
|
|
960
|
-
handleSplit (index) {
|
|
961
|
-
if (this.patternOne.length > 0) {
|
|
962
|
-
let currPattern = this.patternOne[0].rings
|
|
963
|
-
setTimeout(() => {
|
|
964
|
-
this.handleStageData(currPattern)
|
|
965
|
-
this.getCycles()
|
|
966
|
-
// this.patternOne[0].stagesList = this.stagesList
|
|
967
|
-
}, 50)
|
|
968
|
-
} else {
|
|
969
|
-
let currPattern = this.planPattern.rings
|
|
970
|
-
setTimeout(() => {
|
|
971
|
-
this.handleStageData(currPattern)
|
|
972
|
-
this.getCycle()
|
|
973
|
-
// this.allPatternList[0].stagesList = this.stagesList
|
|
974
|
-
}, 50)
|
|
975
|
-
}
|
|
976
|
-
},
|
|
977
|
-
selectPattern () {
|
|
978
|
-
this.manualInfo.offset = 0
|
|
979
|
-
let selectId = Number(this.manualInfo.tempPatternid)
|
|
980
|
-
this.patternOne = this.allPatternList.filter(item => {
|
|
981
|
-
return item.id === selectId
|
|
982
|
-
})
|
|
983
|
-
// if (this.patternOne[0].contrloType === 'stage') {
|
|
984
|
-
// this.changeStage()
|
|
985
|
-
// }
|
|
986
|
-
const flatArray = this.patternOne[0].rings.flat().filter(item => item !== null)
|
|
987
|
-
this.tableRing = flatArray.map(item => {
|
|
988
|
-
return {
|
|
989
|
-
id: item.id,
|
|
990
|
-
desc: item.desc,
|
|
991
|
-
flowperhour: item.flowperhour ? item.flowperhour : 0,
|
|
992
|
-
saturation: item.saturation ? item.saturation : 0
|
|
993
|
-
}
|
|
994
|
-
})
|
|
995
|
-
this.manualInfo.offset = this.offset
|
|
996
|
-
for (let rings of this.patternOne[0].rings) {
|
|
997
|
-
if (rings.length === 0) continue
|
|
998
|
-
for (let ring of rings) {
|
|
999
|
-
if (ring.value === 0) continue
|
|
1000
|
-
let currPhase = this.phaseList.filter((item) => {
|
|
1001
|
-
return item.id === ring.id
|
|
1002
|
-
})[0]
|
|
1003
|
-
ring.desc = currPhase.direction.map(item => {
|
|
1004
|
-
return {
|
|
1005
|
-
id: item,
|
|
1006
|
-
color: '#454545'
|
|
1007
|
-
}
|
|
1008
|
-
})
|
|
1009
|
-
}
|
|
1010
|
-
}
|
|
1011
|
-
this.handleStageData(this.patternOne[0].rings)
|
|
1012
|
-
},
|
|
1013
|
-
handleStageData (rings) { // stagesList
|
|
1014
|
-
if (!rings) return
|
|
1015
|
-
for (let i = 0; i < rings.length; i++) {
|
|
1016
|
-
if (rings[i].length > 0) {
|
|
1017
|
-
let phaseList = []
|
|
1018
|
-
let stagesList = []
|
|
1019
|
-
// rings = JSON.parse(JSON.stringify(rings))
|
|
1020
|
-
let mapAdd = rings.map(item => {
|
|
1021
|
-
return item.map(val => {
|
|
1022
|
-
// if (val.mode !== 7) {
|
|
1023
|
-
return val.value + (val.sum ? val.sum : 0)
|
|
1024
|
-
// } else {
|
|
1025
|
-
// return 0
|
|
1026
|
-
// }
|
|
1027
|
-
})
|
|
1028
|
-
})
|
|
1029
|
-
let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
|
|
1030
|
-
return item.length > 0 ? item.reduce((a, b) => {
|
|
1031
|
-
return a + b
|
|
1032
|
-
}) : 0
|
|
1033
|
-
}) : 0
|
|
1034
|
-
this.max = Math.max(...maxCycle)// 每个环的周期最大值
|
|
1035
|
-
this.stateList = [0]
|
|
1036
|
-
this.narr = []
|
|
1037
|
-
let currentIds = ''
|
|
1038
|
-
let lastCurrentIds = ''
|
|
1039
|
-
for (let j = 0; j <= this.max; j++) { // 指针长度
|
|
1040
|
-
for (let i = 0; i < rings.length; i++) { // 环列表
|
|
1041
|
-
let ring = rings[i]// 每个环对象
|
|
1042
|
-
let sum = 0
|
|
1043
|
-
for (let n = 0; n < ring.length; n++) { // 相位累计长度
|
|
1044
|
-
// if (ring[n].mode !== 7) {
|
|
1045
|
-
sum = sum + ring[n].value + (ring[n].sum ? ring[n].sum : 0)
|
|
1046
|
-
if (j < sum) {
|
|
1047
|
-
let phaseId = ring[n].id
|
|
1048
|
-
currentIds = currentIds + '-' + phaseId
|
|
1049
|
-
break
|
|
1050
|
-
}
|
|
1051
|
-
// }
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
if (lastCurrentIds !== currentIds && lastCurrentIds !== '') { // 当前相位id和上一个相比不同说明相位变化了
|
|
1055
|
-
phaseList.push(lastCurrentIds)
|
|
1056
|
-
this.stateList.push(j)// 阶段累计长度的集合
|
|
1057
|
-
}
|
|
1058
|
-
lastCurrentIds = currentIds
|
|
1059
|
-
currentIds = ''
|
|
1060
|
-
}
|
|
1061
|
-
let newPhaselist = []
|
|
1062
|
-
phaseList.forEach(i => {
|
|
1063
|
-
let rangeArr = i.split('-').map(Number)
|
|
1064
|
-
if (rangeArr.length > 2) {
|
|
1065
|
-
newPhaselist.push([
|
|
1066
|
-
JSON.parse(JSON.stringify(rangeArr[1])),
|
|
1067
|
-
JSON.parse(JSON.stringify(rangeArr[2]))
|
|
1068
|
-
])
|
|
1069
|
-
} else {
|
|
1070
|
-
newPhaselist.push([
|
|
1071
|
-
JSON.parse(JSON.stringify(rangeArr[1]))
|
|
1072
|
-
])
|
|
1073
|
-
}
|
|
1074
|
-
})
|
|
1075
|
-
for (let i = this.stateList.length - 1; i >= 1; i--) {
|
|
1076
|
-
this.narr.push(this.stateList[i] - this.stateList[i - 1])
|
|
1077
|
-
}
|
|
1078
|
-
// newPhaselist
|
|
1079
|
-
this.narr.reverse()// 阶段差
|
|
1080
|
-
for (let i = 0; i < newPhaselist.length; i++) {
|
|
1081
|
-
let stage = JSON.parse(JSON.stringify(newPhaselist[i]))
|
|
1082
|
-
let newStage = []
|
|
1083
|
-
stage.map(item => {
|
|
1084
|
-
for (let ring of rings) {
|
|
1085
|
-
for (let ringItem of ring) {
|
|
1086
|
-
if (item === ringItem.id && (ringItem.mode !== 7 && ringItem.mode !== 8 && ringItem.mode !== 9)) {
|
|
1087
|
-
newStage.push(item)
|
|
1088
|
-
}
|
|
1089
|
-
}
|
|
1090
|
-
}
|
|
1091
|
-
})
|
|
1092
|
-
let stageItem = this.getStageItem(newStage, stage, rings, i)
|
|
1093
|
-
stagesList.push(JSON.parse(JSON.stringify(stageItem)))
|
|
1094
|
-
}
|
|
1095
|
-
this.overLapCycle = stagesList.reduce((prev, curr) => prev + parseInt(curr.split), 0)
|
|
1096
|
-
this.stagesList = JSON.parse(JSON.stringify(stagesList))
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
},
|
|
1100
|
-
getStageItem (stageArr, stage, ringsList, i) {
|
|
1101
|
-
let res = {
|
|
1102
|
-
key: i,
|
|
1103
|
-
split: this.narr[i], // 阶段绿性比
|
|
1104
|
-
phases: stageArr,
|
|
1105
|
-
stageKanban: stage,
|
|
1106
|
-
delaystart: 0,
|
|
1107
|
-
advanceend: 0
|
|
1108
|
-
}
|
|
1109
|
-
// let splitArr = []
|
|
1110
|
-
let delaystartArr = []
|
|
1111
|
-
let advanceendArr = []
|
|
1112
|
-
for (let rings of ringsList) {
|
|
1113
|
-
for (let ring of rings) {
|
|
1114
|
-
if (stageArr.includes(ring.id)) {
|
|
1115
|
-
// let split = ring.value
|
|
1116
|
-
let delaystart = ring.delaystart
|
|
1117
|
-
let advanceend = ring.advanceend
|
|
1118
|
-
// splitArr.push(split)
|
|
1119
|
-
delaystartArr.push(delaystart)
|
|
1120
|
-
advanceendArr.push(advanceend)
|
|
1121
|
-
}
|
|
1122
|
-
}
|
|
1123
|
-
}
|
|
1124
|
-
// splitArr.sort(function (a, b) { return a - b })
|
|
1125
|
-
delaystartArr.sort(function (a, b) { return b - a })
|
|
1126
|
-
advanceendArr.sort(function (a, b) { return a - b })
|
|
1127
|
-
// res.split = splitArr.length > 0 ? splitArr[0] : 0
|
|
1128
|
-
res.delaystart = delaystartArr.length > 0 ? delaystartArr[0] : 0
|
|
1129
|
-
res.advanceend = advanceendArr.length > 0 ? advanceendArr[0] : 0
|
|
1130
|
-
return res
|
|
1131
|
-
},
|
|
1132
|
-
initData () {
|
|
1133
|
-
// 判断有几个环,就创建几个看板
|
|
1134
|
-
// let phaseList = this.globalParamModel.getParamsByType('phaseList')
|
|
1135
|
-
// this.coordphaseOption = this.phaseList.map(ele => {
|
|
1136
|
-
// return {
|
|
1137
|
-
// value: ele.id
|
|
1138
|
-
// }
|
|
1139
|
-
// })
|
|
1140
|
-
this.coordphaseOption = this.phaseList
|
|
1141
|
-
// this.overlap = this.globalParamModel.getParamsByType('overlaplList')
|
|
1142
|
-
// this.agentId = getIframdevid()
|
|
1143
|
-
let rings = []
|
|
1144
|
-
if (this.phaseList.length === 0) {
|
|
1145
|
-
// this.$store.getters.tscParam.patternList = []
|
|
1146
|
-
return
|
|
1147
|
-
}
|
|
1148
|
-
for (let phase of this.phaseList) {
|
|
1149
|
-
rings.push(phase.ring)
|
|
1150
|
-
}
|
|
1151
|
-
this.ringCount = Array.from(new Set(rings)) // 去除数组重复的元素
|
|
1152
|
-
this.ringCount = this.ringCount.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
|
|
1153
|
-
this.ringCounts = Array.from(new Set(rings)) // 去除数组重复的元素
|
|
1154
|
-
this.ringCounts = this.ringCounts.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
|
|
1155
|
-
this.optimizes = Array.from(new Set(rings)) // 去除数组重复的元素
|
|
1156
|
-
this.optimizes = this.optimizes.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
|
|
1157
|
-
// this.increaseId()
|
|
1158
|
-
// this.getCycle()
|
|
1159
|
-
// this.updatePhaseDescription()
|
|
1160
|
-
// this.getOptionsOfRing()
|
|
1161
|
-
},
|
|
1162
|
-
sortNumbers (a, b) {
|
|
1163
|
-
return a - b
|
|
1164
|
-
},
|
|
1165
|
-
isRingCycleEqual (rings) {
|
|
1166
|
-
let isequal = true
|
|
1167
|
-
// this.patternmsg = []
|
|
1168
|
-
let maxCycle = 0
|
|
1169
|
-
for (let ring of rings) {
|
|
1170
|
-
if (ring.length === 0) continue
|
|
1171
|
-
let cycle = 0
|
|
1172
|
-
for (let r of ring) {
|
|
1173
|
-
if (r.mode === 7) { // 忽略相位不计周期
|
|
1174
|
-
continue
|
|
1175
|
-
}
|
|
1176
|
-
cycle = cycle + r.value
|
|
1177
|
-
}
|
|
1178
|
-
if (cycle > maxCycle && maxCycle === 0) {
|
|
1179
|
-
maxCycle = cycle
|
|
1180
|
-
}
|
|
1181
|
-
if (cycle !== maxCycle) {
|
|
1182
|
-
// this.patternmsg.push(rings.id)
|
|
1183
|
-
isequal = false
|
|
1184
|
-
}
|
|
1185
|
-
}
|
|
1186
|
-
return isequal
|
|
1187
|
-
},
|
|
1188
|
-
getMaxCycleStage (pattern) {
|
|
1189
|
-
let rings = pattern.stagesList
|
|
1190
|
-
let stageCycleList = rings.map(item => {
|
|
1191
|
-
if (item.stageSplit) {
|
|
1192
|
-
return item.stageSplit
|
|
1193
|
-
} else {
|
|
1194
|
-
return 0
|
|
1195
|
-
}
|
|
1196
|
-
})
|
|
1197
|
-
let maxCycle = stageCycleList.reduce((a, b) => {
|
|
1198
|
-
return a + b
|
|
1199
|
-
}, 0)
|
|
1200
|
-
return maxCycle
|
|
1201
|
-
},
|
|
1202
|
-
getMaxCycle (pattern) {
|
|
1203
|
-
let rings = pattern.rings
|
|
1204
|
-
let maxCycle = 0
|
|
1205
|
-
for (let ring of rings) {
|
|
1206
|
-
if (ring.length === 0) continue
|
|
1207
|
-
let cycle = 0
|
|
1208
|
-
for (let r of ring) {
|
|
1209
|
-
if (r.mode === 7) { // 忽略相位不计周期
|
|
1210
|
-
continue
|
|
1211
|
-
}
|
|
1212
|
-
cycle = cycle + r.value
|
|
1213
|
-
}
|
|
1214
|
-
if (cycle > maxCycle) {
|
|
1215
|
-
maxCycle = cycle
|
|
1216
|
-
}
|
|
1217
|
-
}
|
|
1218
|
-
return maxCycle
|
|
1219
|
-
},
|
|
1220
|
-
// checkPatternRules (rings) {
|
|
1221
|
-
// if (!this.isRingCycleEqual(rings)) {
|
|
1222
|
-
// this.patternCycleEqual = false
|
|
1223
|
-
// } else {
|
|
1224
|
-
// this.patternCycleEqual = true
|
|
1225
|
-
// }
|
|
1226
|
-
// if (!this.patternCycleEqual) {
|
|
1227
|
-
// let mess = `方案中存在环周期时长不一致`
|
|
1228
|
-
// if (this.$i18n.locale === 'en') {
|
|
1229
|
-
// mess = `Inconsistent loop cycle durations exist in the scheme`
|
|
1230
|
-
// }
|
|
1231
|
-
// this.$message({
|
|
1232
|
-
// message: mess,
|
|
1233
|
-
// type: 'error',
|
|
1234
|
-
// dangerouslyUseHTMLString: true
|
|
1235
|
-
// })
|
|
1236
|
-
// return false
|
|
1237
|
-
// }
|
|
1238
|
-
// },
|
|
1239
|
-
handleManualControl () {
|
|
1240
|
-
let submitdata = {
|
|
1241
|
-
control: 100,
|
|
1242
|
-
delay: this.manualInfo.tempDelay !== undefined ? Number(this.manualInfo.tempDelay) : 0,
|
|
1243
|
-
duration: Number(this.manualInfo.duration),
|
|
1244
|
-
// duration: this.manualInfo.tempDuration !== undefined ? Number(this.manualInfo.tempDuration) : 0,
|
|
1245
|
-
data: {}
|
|
1246
|
-
}
|
|
1247
|
-
if (this.manualInfo.tempPatternid) {
|
|
1248
|
-
submitdata.terminal = Number(this.manualInfo.tempPatternid)
|
|
1249
|
-
}
|
|
1250
|
-
if (this.patternOne.length === 0) {
|
|
1251
|
-
if (this.isRing) {
|
|
1252
|
-
submitdata.data.cycle = this.getMaxCycleStage(this.planPattern)
|
|
1253
|
-
} else {
|
|
1254
|
-
submitdata.data.cycle = this.getMaxCycle(this.planPattern)
|
|
1255
|
-
}
|
|
1256
|
-
submitdata.data.stagesList = this.planPattern.stagesList
|
|
1257
|
-
} else {
|
|
1258
|
-
if (this.isRing) {
|
|
1259
|
-
submitdata.data.cycle = this.getMaxCycleStage(this.patternOne[0])
|
|
1260
|
-
} else {
|
|
1261
|
-
submitdata.data.cycle = this.getMaxCycle(this.patternOne[0])
|
|
1262
|
-
}
|
|
1263
|
-
this.patternOne[0].stagesList.forEach((stage) => {
|
|
1264
|
-
delete stage.split
|
|
1265
|
-
})
|
|
1266
|
-
submitdata.data.stagesList = this.patternOne[0].stagesList
|
|
1267
|
-
}
|
|
1268
|
-
submitdata.data.offset = this.offset
|
|
1269
|
-
if (this.patternOne.length === 0) {
|
|
1270
|
-
submitdata.data.rings = this.planPattern.rings
|
|
1271
|
-
} else {
|
|
1272
|
-
submitdata.data.rings = this.patternOne[0].rings
|
|
1273
|
-
}
|
|
1274
|
-
// submitdata.data.rings = this.patternOne.length === 0 ? this.planPattern.rings : this.patternOne[0].rings
|
|
1275
|
-
// this.checkPatternRules(submitdata.data.rings)
|
|
1276
|
-
if (this.patternCycleEqual) {
|
|
1277
|
-
this.$emit('closePhaseControl', submitdata)
|
|
1278
|
-
}
|
|
1279
|
-
},
|
|
1280
|
-
toAutoControl () {
|
|
1281
|
-
this.$emit('toAutoControl')
|
|
1282
|
-
},
|
|
1283
|
-
isHasPermission (path) {
|
|
1284
|
-
let res = hasPermission(path)
|
|
1285
|
-
return res
|
|
1286
|
-
}
|
|
1287
|
-
}
|
|
1288
|
-
}
|
|
1289
|
-
</script>
|
|
1290
|
-
|
|
1291
|
-
<style>
|
|
1292
|
-
|
|
1293
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="tentativeplan-control manual-common-content">
|
|
3
|
+
<!-- <div class="title" style="margin-bottom: 18px">
|
|
4
|
+
{{ $t('openatccomponents.overview.tentativeplan') }}
|
|
5
|
+
</div> -->
|
|
6
|
+
<el-row>
|
|
7
|
+
<el-col :span="12">
|
|
8
|
+
<el-form
|
|
9
|
+
ref="manual"
|
|
10
|
+
label-position="left"
|
|
11
|
+
:model="manualInfo"
|
|
12
|
+
label-width="90px"
|
|
13
|
+
>
|
|
14
|
+
<el-form-item
|
|
15
|
+
:label="$t('openatccomponents.overview.patternid')"
|
|
16
|
+
prop="count"
|
|
17
|
+
>
|
|
18
|
+
<el-select
|
|
19
|
+
@change="selectPattern()"
|
|
20
|
+
v-model="manualInfo.tempPatternid"
|
|
21
|
+
class="col-inner"
|
|
22
|
+
size="small"
|
|
23
|
+
:placeholder="$t('openatccomponents.common.select')"
|
|
24
|
+
>
|
|
25
|
+
<el-option
|
|
26
|
+
v-for="item in patternSelect"
|
|
27
|
+
:key="item.value"
|
|
28
|
+
:label="item.label"
|
|
29
|
+
:value="item.value"
|
|
30
|
+
>
|
|
31
|
+
</el-option>
|
|
32
|
+
</el-select>
|
|
33
|
+
<!-- <el-input v-model="manualInfo.tempDuration" size="small" :placeholder="$t('openatccomponents.common.input')"></el-input> -->
|
|
34
|
+
</el-form-item>
|
|
35
|
+
<el-form-item
|
|
36
|
+
:label="$t('openatccomponents.overview.delay')"
|
|
37
|
+
prop="intersection"
|
|
38
|
+
>
|
|
39
|
+
<el-input-number
|
|
40
|
+
:placeholder="$t('openatccomponents.common.input')"
|
|
41
|
+
:min="0"
|
|
42
|
+
:max="65535"
|
|
43
|
+
:precision="0"
|
|
44
|
+
:step="1"
|
|
45
|
+
:controls="false"
|
|
46
|
+
v-model.number="manualInfo.tempDelay"
|
|
47
|
+
size="small"
|
|
48
|
+
></el-input-number>
|
|
49
|
+
<!-- <el-input v-model="manualInfo.tempDelay" size="small" :placeholder="$t('openatccomponents.common.input')"></el-input> -->
|
|
50
|
+
</el-form-item>
|
|
51
|
+
</el-form>
|
|
52
|
+
</el-col>
|
|
53
|
+
<el-col :span="12">
|
|
54
|
+
<el-form
|
|
55
|
+
ref="manual"
|
|
56
|
+
label-position="left"
|
|
57
|
+
:model="manualInfo"
|
|
58
|
+
label-width="90px"
|
|
59
|
+
>
|
|
60
|
+
<el-form-item
|
|
61
|
+
:label="$t('openatccomponents.overview.patternoffset')"
|
|
62
|
+
prop="count"
|
|
63
|
+
>
|
|
64
|
+
<el-input-number
|
|
65
|
+
:placeholder="$t('openatccomponents.common.input')"
|
|
66
|
+
:min="0"
|
|
67
|
+
:max="65535"
|
|
68
|
+
:precision="0"
|
|
69
|
+
:step="1"
|
|
70
|
+
:controls="false"
|
|
71
|
+
v-model.number="manualInfo.offset"
|
|
72
|
+
size="small"
|
|
73
|
+
></el-input-number>
|
|
74
|
+
<!-- <el-input v-model="manualInfo.offset" size="small" :placeholder="$t('openatccomponents.common.input')"></el-input> -->
|
|
75
|
+
</el-form-item>
|
|
76
|
+
<el-form-item
|
|
77
|
+
:label="$t('openatccomponents.overview.duration')"
|
|
78
|
+
prop="intersection"
|
|
79
|
+
>
|
|
80
|
+
<el-input-number
|
|
81
|
+
:placeholder="$t('openatccomponents.common.input')"
|
|
82
|
+
:min="0"
|
|
83
|
+
:max="65535"
|
|
84
|
+
:precision="0"
|
|
85
|
+
:step="1"
|
|
86
|
+
:controls="false"
|
|
87
|
+
v-model.number="manualInfo.duration"
|
|
88
|
+
size="small"
|
|
89
|
+
></el-input-number>
|
|
90
|
+
<!-- <el-input v-model="manualInfo.duration" size="small" :placeholder="$t('openatccomponents.common.input')"></el-input> -->
|
|
91
|
+
</el-form-item>
|
|
92
|
+
</el-form>
|
|
93
|
+
</el-col>
|
|
94
|
+
</el-row>
|
|
95
|
+
<el-row style="margin-top: 20px;">
|
|
96
|
+
<el-radio v-model="isRing" :label="false" @change="changeRing">{{
|
|
97
|
+
$t('openatccomponents.common.ringStyle')
|
|
98
|
+
}}</el-radio>
|
|
99
|
+
<el-radio v-model="isRing" :label="true" @change="changeStage">{{
|
|
100
|
+
$t('openatccomponents.common.stageStyle')
|
|
101
|
+
}}</el-radio>
|
|
102
|
+
<!-- <div class="title" style="margin-top:18px; margin-bottom:10px">{{$t('openatccomponents.overview.patternstate')}}:
|
|
103
|
+
<span>({{$t('openatccomponents.overview.cycle')}}: {{cycle}} {{$t('openatccomponents.overview.patternoffset')}}: {{offset}})</span>
|
|
104
|
+
</div> -->
|
|
105
|
+
<!-- <stage-status
|
|
106
|
+
:patternStatusList="patternOne.length===0?planPattern.rings:patternOne[0].rings"
|
|
107
|
+
>
|
|
108
|
+
</stage-status> -->
|
|
109
|
+
<pattern-list
|
|
110
|
+
:key="keyChange"
|
|
111
|
+
:allPatternList="allPatternList"
|
|
112
|
+
:contrloType="contrloType"
|
|
113
|
+
:stagesChange="
|
|
114
|
+
patternOne.length === 0
|
|
115
|
+
? planPattern.stagesList
|
|
116
|
+
: patternOne[0].stagesList
|
|
117
|
+
"
|
|
118
|
+
:patternList="patternOne.length === 0 ? planPattern.rings : patternOne"
|
|
119
|
+
:patternStatusList="
|
|
120
|
+
patternOne.length === 0 ? planPattern.rings : patternOne[0].rings
|
|
121
|
+
"
|
|
122
|
+
:cycles="
|
|
123
|
+
patternOne.length === 0 ? planPattern.cycle : patternOne[0].cycle
|
|
124
|
+
"
|
|
125
|
+
:phaseList="phaseList"
|
|
126
|
+
>
|
|
127
|
+
</pattern-list>
|
|
128
|
+
</el-row>
|
|
129
|
+
<el-row style="margin-top: 20px;">
|
|
130
|
+
<el-tabs v-model="activeTab" type="card">
|
|
131
|
+
<el-tab-pane
|
|
132
|
+
v-if="!isRing"
|
|
133
|
+
:label="$t('openatccomponents.pattern.ringConfig')"
|
|
134
|
+
name="kanban"
|
|
135
|
+
>
|
|
136
|
+
<div style="width: 100%; overflow: hidden;">
|
|
137
|
+
<kan-ban
|
|
138
|
+
v-for="n in ringCount"
|
|
139
|
+
:key="n"
|
|
140
|
+
class="closephasekanban"
|
|
141
|
+
:index="n"
|
|
142
|
+
:options="options"
|
|
143
|
+
:list="
|
|
144
|
+
patternOne.length === 0
|
|
145
|
+
? planPattern.rings[n - 1]
|
|
146
|
+
: patternOne[0].rings[n - 1]
|
|
147
|
+
"
|
|
148
|
+
:phaseList="phaseList"
|
|
149
|
+
:header-text="$t('openatccomponents.pattern.ring') + n"
|
|
150
|
+
@handleSplit="handleSplit"
|
|
151
|
+
>
|
|
152
|
+
</kan-ban>
|
|
153
|
+
</div>
|
|
154
|
+
</el-tab-pane>
|
|
155
|
+
<!-- <el-tab-pane v-if="isRing" :label="$t('openatccomponents.pattern.stageConfig')" name="kanban">
|
|
156
|
+
<div class="stage-panel-contener">
|
|
157
|
+
<StageKanban
|
|
158
|
+
v-for="(stage, index) in scope.row.stagesList"
|
|
159
|
+
class="kanban todo"
|
|
160
|
+
:key="index"
|
|
161
|
+
:stage="stage"
|
|
162
|
+
:stageInfo="scope.row.stagesList"
|
|
163
|
+
:isRing="isRing"
|
|
164
|
+
:options="scope.row.options"
|
|
165
|
+
:coordphaseOption="coordphaseOption"
|
|
166
|
+
:rowIndex="scope.$index"
|
|
167
|
+
:subIndex="index"
|
|
168
|
+
@onStageSplitChange="onStageSplitChange"
|
|
169
|
+
@stageSplitChange="stageSplitChange"
|
|
170
|
+
@onStageDelaystartChange="onStageDelaystartChange"
|
|
171
|
+
@onStageAdvanceendChange="onStageAdvanceendChange"
|
|
172
|
+
/>
|
|
173
|
+
<div v-if="isRing" style="margin-left: 20px">
|
|
174
|
+
<el-button
|
|
175
|
+
type="primary"
|
|
176
|
+
@click="addStage(scope.row.stagesList)"
|
|
177
|
+
icon="el-icon-plus"
|
|
178
|
+
circle
|
|
179
|
+
></el-button>
|
|
180
|
+
</div>
|
|
181
|
+
</div>
|
|
182
|
+
</el-tab-pane> -->
|
|
183
|
+
<el-tab-pane
|
|
184
|
+
v-if="isRing"
|
|
185
|
+
:label="$t('openatccomponents.pattern.stageConfig')"
|
|
186
|
+
name="ring"
|
|
187
|
+
>
|
|
188
|
+
<div class="stage-panel-contener">
|
|
189
|
+
<stage-bord
|
|
190
|
+
v-for="(stage, index) in patternOne.length === 0
|
|
191
|
+
? planPattern.stagesList
|
|
192
|
+
: patternOne[0].stagesList"
|
|
193
|
+
class="kanban todo"
|
|
194
|
+
:key="index"
|
|
195
|
+
:stage="stage"
|
|
196
|
+
:options="options"
|
|
197
|
+
:isRing="isRing"
|
|
198
|
+
:stageInfo="
|
|
199
|
+
patternOne.length === 0
|
|
200
|
+
? planPattern.stagesList
|
|
201
|
+
: patternOne[0].stagesList
|
|
202
|
+
"
|
|
203
|
+
:coordphaseOption="coordphaseOption"
|
|
204
|
+
:subIndex="index"
|
|
205
|
+
@onStageSplitChange="onStageSplitChange"
|
|
206
|
+
@stageSplitChange="stageSplitChange"
|
|
207
|
+
@onStageDelaystartChange="onStageDelaystartChange"
|
|
208
|
+
@onStageAdvanceendChange="onStageAdvanceendChange"
|
|
209
|
+
>
|
|
210
|
+
</stage-bord>
|
|
211
|
+
<div v-if="isRing" style="margin-left: 10px">
|
|
212
|
+
<el-button
|
|
213
|
+
type="primary"
|
|
214
|
+
@click="
|
|
215
|
+
addStage(
|
|
216
|
+
patternOne.length === 0
|
|
217
|
+
? planPattern.stagesList
|
|
218
|
+
: patternOne[0].stagesList
|
|
219
|
+
)
|
|
220
|
+
"
|
|
221
|
+
icon="el-icon-plus"
|
|
222
|
+
circle
|
|
223
|
+
></el-button>
|
|
224
|
+
</div>
|
|
225
|
+
</div>
|
|
226
|
+
</el-tab-pane>
|
|
227
|
+
<el-tab-pane
|
|
228
|
+
v-if="!isRing"
|
|
229
|
+
:label="$t('openatccomponents.pattern.parameters')"
|
|
230
|
+
name="parame"
|
|
231
|
+
>
|
|
232
|
+
<el-row>
|
|
233
|
+
<expend-config
|
|
234
|
+
v-for="(j, index) in ringCounts"
|
|
235
|
+
:key="index"
|
|
236
|
+
class="expendkanban"
|
|
237
|
+
:options="options"
|
|
238
|
+
:header-text="$t('openatccomponents.pattern.ring') + j"
|
|
239
|
+
:list="
|
|
240
|
+
patternOne.length === 0
|
|
241
|
+
? planPattern.rings[j - 1]
|
|
242
|
+
: patternOne[0].rings[j - 1]
|
|
243
|
+
"
|
|
244
|
+
>
|
|
245
|
+
</expend-config>
|
|
246
|
+
<div class="forbiddenstage">
|
|
247
|
+
{{ $t('openatccomponents.pattern.forbiddenstage') }}
|
|
248
|
+
<el-input
|
|
249
|
+
class="stage-value"
|
|
250
|
+
size="small"
|
|
251
|
+
v-model="forbiddenstage"
|
|
252
|
+
></el-input>
|
|
253
|
+
</div>
|
|
254
|
+
<div class="forbiddenstage">
|
|
255
|
+
{{ $t('openatccomponents.pattern.screenstage') }}
|
|
256
|
+
<el-input
|
|
257
|
+
class="stage-value"
|
|
258
|
+
size="small"
|
|
259
|
+
v-model="screenstage"
|
|
260
|
+
></el-input>
|
|
261
|
+
</div>
|
|
262
|
+
<div class="forbiddenstage">
|
|
263
|
+
{{ $t('openatccomponents.pattern.coordinatestage') }}
|
|
264
|
+
<el-input
|
|
265
|
+
class="stage-value"
|
|
266
|
+
size="small"
|
|
267
|
+
v-model="coordinatestage"
|
|
268
|
+
></el-input>
|
|
269
|
+
</div>
|
|
270
|
+
</el-row>
|
|
271
|
+
</el-tab-pane>
|
|
272
|
+
<el-tab-pane
|
|
273
|
+
v-if="!isRing"
|
|
274
|
+
:label="$t('openatccomponents.pattern.overLap')"
|
|
275
|
+
name="overlap"
|
|
276
|
+
>
|
|
277
|
+
<el-row :gutter="20">
|
|
278
|
+
<el-col :span="24">
|
|
279
|
+
<over-lap
|
|
280
|
+
:stageList="stagesList"
|
|
281
|
+
:overlap="overlap"
|
|
282
|
+
:checked="true"
|
|
283
|
+
:tentative="true"
|
|
284
|
+
:cycleChange="false"
|
|
285
|
+
:cycle="overLapCycle"
|
|
286
|
+
>
|
|
287
|
+
</over-lap>
|
|
288
|
+
</el-col>
|
|
289
|
+
</el-row>
|
|
290
|
+
</el-tab-pane>
|
|
291
|
+
<el-tab-pane
|
|
292
|
+
v-if="!isRing"
|
|
293
|
+
:label="$t('openatccomponents.pattern.patternOptimize')"
|
|
294
|
+
name="patternOptimize"
|
|
295
|
+
>
|
|
296
|
+
<pattern-optimize
|
|
297
|
+
class="expendkanban"
|
|
298
|
+
:rings="patternOne.length === 0 ? planPattern : patternOne[0]"
|
|
299
|
+
:phaseList="phaseList"
|
|
300
|
+
:tableRing="tableRing"
|
|
301
|
+
:showStyle="showStyle"
|
|
302
|
+
:styles="styles"
|
|
303
|
+
:isTentative="true"
|
|
304
|
+
@handleSplit="handleSplit"
|
|
305
|
+
>
|
|
306
|
+
</pattern-optimize>
|
|
307
|
+
<!-- ref="patternOptimize"
|
|
308
|
+
:tableRing="tableRing"
|
|
309
|
+
:id="selectedRow.id"
|
|
310
|
+
@optimizesucess="optimizesucess" -->
|
|
311
|
+
</el-tab-pane>
|
|
312
|
+
</el-tabs>
|
|
313
|
+
</el-row>
|
|
314
|
+
<div class="footer">
|
|
315
|
+
<el-button v-if="isShowBack" @click="handleClose()">{{$t('openatccomponents.button.Back')}}</el-button>
|
|
316
|
+
<el-button v-if="isShowRecovery && isHasPermission('configer:manual:renew')" @click="toAutoControl()">{{$t('openatccomponents.overview.recovery')}}</el-button>
|
|
317
|
+
<el-button v-if="isShowImplement" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.implement')}}</el-button>
|
|
318
|
+
<el-button v-if="!isShowImplement" type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.comfirm')}}</el-button>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
</template>
|
|
322
|
+
|
|
323
|
+
<script>
|
|
324
|
+
import { hasPermission } from '../../../../utils/auth'
|
|
325
|
+
import PhaseDataModel from '../../IntersectionMap/crossDirection/utils.js'
|
|
326
|
+
import CrossDiagramMgr from '../../../../EdgeMgr/controller/crossDiagramMgr.js'
|
|
327
|
+
export default {
|
|
328
|
+
name: 'tentativeplancontrol',
|
|
329
|
+
props: {
|
|
330
|
+
realtimeStatusModalvisible: {
|
|
331
|
+
type: Boolean,
|
|
332
|
+
default: true
|
|
333
|
+
},
|
|
334
|
+
controlData: {
|
|
335
|
+
type: Object
|
|
336
|
+
},
|
|
337
|
+
phaseList: {
|
|
338
|
+
type: Array
|
|
339
|
+
},
|
|
340
|
+
overlap: {
|
|
341
|
+
type: Array
|
|
342
|
+
},
|
|
343
|
+
allPatternList: {
|
|
344
|
+
type: Array
|
|
345
|
+
},
|
|
346
|
+
patternSelect: {
|
|
347
|
+
type: Array
|
|
348
|
+
},
|
|
349
|
+
isShowBack: {
|
|
350
|
+
type: Boolean,
|
|
351
|
+
default: true
|
|
352
|
+
},
|
|
353
|
+
isShowRecovery: {
|
|
354
|
+
type: Boolean,
|
|
355
|
+
default: true
|
|
356
|
+
},
|
|
357
|
+
isShowImplement: {
|
|
358
|
+
type: Boolean,
|
|
359
|
+
default: true
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
watch: {
|
|
363
|
+
isRing (newVal) {
|
|
364
|
+
this.activeTab = newVal ? 'ring' : 'kanban'
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
computed: {
|
|
368
|
+
computedActiveTab () {
|
|
369
|
+
return this.isRing ? 'ring' : 'kanban'
|
|
370
|
+
},
|
|
371
|
+
rings () {
|
|
372
|
+
return this.patternOne.length === 0 ? this.planPattern.rings : this.patternOne[0].rings
|
|
373
|
+
},
|
|
374
|
+
cycle () {
|
|
375
|
+
return this.patternOne.length === 0 ? this.max : (this.patternOne.length > 0 && (this.patternOne[0].cycle < this.max)) ? this.max : this.patternOne[0].cycle
|
|
376
|
+
},
|
|
377
|
+
offset () {
|
|
378
|
+
return Number((this.patternOne.length === 0 || this.manualInfo.offset > 0) ? this.manualInfo.offset : this.patternOne[0].offset)
|
|
379
|
+
},
|
|
380
|
+
forbiddenstage () {
|
|
381
|
+
return this.patternOne.length === 0 ? this.allPatternList[0].forbiddenstage : this.patternOne[0].forbiddenstage
|
|
382
|
+
},
|
|
383
|
+
screenstage () {
|
|
384
|
+
return this.patternOne.length === 0 ? this.allPatternList[0].screenstage : this.patternOne[0].screenstage
|
|
385
|
+
},
|
|
386
|
+
coordinatestage () {
|
|
387
|
+
return this.patternOne.length === 0 ? this.allPatternList[0].coordinatestage : this.patternOne[0].coordinatestage
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
data () {
|
|
391
|
+
return {
|
|
392
|
+
stagesList: [],
|
|
393
|
+
phaseRings: [],
|
|
394
|
+
keyChange: false,
|
|
395
|
+
overLapCycle: 0,
|
|
396
|
+
options: {
|
|
397
|
+
group: 'pattern'
|
|
398
|
+
},
|
|
399
|
+
styles: {
|
|
400
|
+
left: '2px',
|
|
401
|
+
top: 0
|
|
402
|
+
},
|
|
403
|
+
showStyle: {
|
|
404
|
+
left: '2px',
|
|
405
|
+
top: 0
|
|
406
|
+
},
|
|
407
|
+
max: '',
|
|
408
|
+
tableRing: [],
|
|
409
|
+
contrloType: '',
|
|
410
|
+
patternCycleEqual: true,
|
|
411
|
+
// activeList: 'ring',
|
|
412
|
+
activeTab: 'kanban',
|
|
413
|
+
isRing: false,
|
|
414
|
+
// isChange: false,
|
|
415
|
+
ringCount: 1,
|
|
416
|
+
ringCounts: 1,
|
|
417
|
+
barriers: [],
|
|
418
|
+
optimizes: 1,
|
|
419
|
+
coordphaseOption: [],
|
|
420
|
+
patternOne: [],
|
|
421
|
+
planPattern: {},
|
|
422
|
+
manualInfo: {
|
|
423
|
+
tempPatternid: '',
|
|
424
|
+
offset: 0,
|
|
425
|
+
duration: 300,
|
|
426
|
+
tempDelay: 0 // 控制方式手动操作的情况下的延迟时间的临时值。
|
|
427
|
+
// tempDuration: 300 // 控制方式手动操作的情况下的持续时间的临时值。
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
},
|
|
431
|
+
created () {
|
|
432
|
+
this.PhaseDataModel = new PhaseDataModel()
|
|
433
|
+
this.CrossDiagramMgr = new CrossDiagramMgr()
|
|
434
|
+
this.patternPlan()
|
|
435
|
+
this.getCycle()
|
|
436
|
+
if (this.patternOne.length === 0) {
|
|
437
|
+
this.handleStageData(this.planPattern.rings)
|
|
438
|
+
}
|
|
439
|
+
this.initData()
|
|
440
|
+
if (!this.allPatternList[0].contrloType && this.allPatternList[0].rings.length > 0) {
|
|
441
|
+
this.contrloType = 'ring'
|
|
442
|
+
} else if (!this.allPatternList[0].contrloType && this.allPatternList[0].rings.length === 0) {
|
|
443
|
+
this.contrloType = 'stage'
|
|
444
|
+
} else {
|
|
445
|
+
this.contrloType = this.allPatternList[0].contrloType
|
|
446
|
+
}
|
|
447
|
+
for (let i = 0; i < this.allPatternList.length; i++) {
|
|
448
|
+
if (this.allPatternList[i].contrloType === 'stage' || (this.isRing && !this.allPatternList[i].contrloType)) {
|
|
449
|
+
this.isRing = true
|
|
450
|
+
// this.setStageList(this.allPatternList[i].stagesList, this.allPatternList[i].id)
|
|
451
|
+
} else if (this.allPatternList[i].contrloType === 'ring' || (!this.isRing && !this.allPatternList[i].contrloType && this.allPatternList[i].rings.length > 0)) {
|
|
452
|
+
this.isRing = false
|
|
453
|
+
// this.handleStageData(this.allPatternList[i].rings)
|
|
454
|
+
} else if (this.allPatternList[i].rings.length === 0 && this.allPatternList[i].stagesList.length > 0) {
|
|
455
|
+
this.isRing = true
|
|
456
|
+
// this.setStageList(this.allPatternList[i].stagesList, this.allPatternList[i].id)
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
},
|
|
460
|
+
methods: {
|
|
461
|
+
addStage (row) {
|
|
462
|
+
// this.isChange = false
|
|
463
|
+
if (row.length > 15) {
|
|
464
|
+
this.$message.error(
|
|
465
|
+
this.$t('edge.pattern.mostlist')
|
|
466
|
+
)
|
|
467
|
+
return
|
|
468
|
+
}
|
|
469
|
+
if (this.patternOne.length !== 0) {
|
|
470
|
+
this.patternOne[0].stagesList.push({
|
|
471
|
+
key: row.length,
|
|
472
|
+
green: 25,
|
|
473
|
+
yellow: 3,
|
|
474
|
+
red: 2,
|
|
475
|
+
stageNo: 0,
|
|
476
|
+
phases: [],
|
|
477
|
+
stageSplit: 30
|
|
478
|
+
})
|
|
479
|
+
} else {
|
|
480
|
+
this.planPattern.stagesList.push({
|
|
481
|
+
key: row.length,
|
|
482
|
+
green: 25,
|
|
483
|
+
yellow: 3,
|
|
484
|
+
red: 2,
|
|
485
|
+
phases: [],
|
|
486
|
+
stageSplit: 30
|
|
487
|
+
})
|
|
488
|
+
}
|
|
489
|
+
},
|
|
490
|
+
changeRing () {
|
|
491
|
+
this.contrloType = 'ring'
|
|
492
|
+
this.isRing = false
|
|
493
|
+
// const globalParamModel = this.$store.getters.globalParamModel
|
|
494
|
+
// let pattern = globalParamModel.getParamsByType('patternList')
|
|
495
|
+
// let pattern = this.allPatternList
|
|
496
|
+
this.getCycle()
|
|
497
|
+
this.patternOne = this.allPatternList.filter(item => {
|
|
498
|
+
return item.id === Number(this.manualInfo.tempPatternid)
|
|
499
|
+
})
|
|
500
|
+
// if (this.isChange) {
|
|
501
|
+
// for (let i = 0; i < pattern.length; i++) {
|
|
502
|
+
this.handleStageData(this.patternOne.rings)
|
|
503
|
+
// }
|
|
504
|
+
// } else {
|
|
505
|
+
// for (let i = 0; i < pattern.length; i++) {
|
|
506
|
+
// this.setStageList(pattern[i].stagesList, pattern[i].id)
|
|
507
|
+
// }
|
|
508
|
+
// }
|
|
509
|
+
},
|
|
510
|
+
changeStage () {
|
|
511
|
+
this.contrloType = 'stage'
|
|
512
|
+
this.isRing = true
|
|
513
|
+
// this.patternOne = this.allPatternList.filter(item => {
|
|
514
|
+
// return item.id === Number(this.manualInfo.tempPatternid)
|
|
515
|
+
// })
|
|
516
|
+
// this.getStageCycle()
|
|
517
|
+
},
|
|
518
|
+
getStageCycle () {
|
|
519
|
+
// this.patternOne.length === 0 ? this.allPatternList this.patternOne
|
|
520
|
+
if (this.patternOne.length === 0) {
|
|
521
|
+
// this.setStageList(this.planPattern.stagesList, this.planPattern.id)
|
|
522
|
+
// this.planPattern.stagesList = []
|
|
523
|
+
} else {
|
|
524
|
+
// this.patternOne = this.allPatternList.filter(item => {
|
|
525
|
+
// return item.id === Number(this.manualInfo.tempPatternid)
|
|
526
|
+
// })
|
|
527
|
+
// this.setStageList(this.patternOne[0].stagesList, this.patternOne[0].id)
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
setStageList (stageChange, id) {
|
|
531
|
+
// let patternList = this.globalParamModel.getParamsByType('patternList')
|
|
532
|
+
// let patternList = this.allPatternList
|
|
533
|
+
let stagesList = []
|
|
534
|
+
for (let i = 0; i < stageChange.length; i++) {
|
|
535
|
+
let stage = JSON.parse(JSON.stringify(stageChange[i]))
|
|
536
|
+
let stageItem = this.getStageItems(stage.phases, i, stageChange)
|
|
537
|
+
stagesList.push(JSON.parse(JSON.stringify(stageItem)))
|
|
538
|
+
}
|
|
539
|
+
(this.patternOne.length === 0 ? this.planPattern : this.patternOne).map(item => { // 添加特征参数stage
|
|
540
|
+
if (item.id === id) {
|
|
541
|
+
if (this.isRing) {
|
|
542
|
+
item.contrloType = 'stage'
|
|
543
|
+
} else {
|
|
544
|
+
item.contrloType = 'ring'
|
|
545
|
+
}
|
|
546
|
+
item.stagesList = JSON.parse(JSON.stringify(stagesList.filter(item => item.stageSplit)))
|
|
547
|
+
}
|
|
548
|
+
})
|
|
549
|
+
this.stagesList = stagesList.filter(item => item.stageSplit)
|
|
550
|
+
},
|
|
551
|
+
getStageItems (stageArr, i, stageChange) {
|
|
552
|
+
let res = {
|
|
553
|
+
key: i,
|
|
554
|
+
split: this.narr[i], // 阶段绿性比
|
|
555
|
+
phases: stageArr,
|
|
556
|
+
delaystart: 0,
|
|
557
|
+
advanceend: 0
|
|
558
|
+
}
|
|
559
|
+
for (let rings of stageChange) {
|
|
560
|
+
if (i === rings.key) {
|
|
561
|
+
res.green = rings.green ? rings.green : rings.green === 0 ? 0 : 25
|
|
562
|
+
res.yellow = rings.yellow ? rings.yellow : rings.yellow === 0 ? 0 : 3
|
|
563
|
+
res.red = rings.red ? rings.red : rings.red === 0 ? 0 : 2
|
|
564
|
+
res.phases = rings.phases ? rings.phases : stageArr
|
|
565
|
+
res.stageNo = rings.stageNo ? rings.stageNo : 0
|
|
566
|
+
// res.stageSplit = rings.split ? rings.split : 30
|
|
567
|
+
if (rings.split) {
|
|
568
|
+
res.stageSplit = rings.split
|
|
569
|
+
} else if (rings.stageSplit) {
|
|
570
|
+
res.stageSplit = rings.stageSplit
|
|
571
|
+
} else {
|
|
572
|
+
res.stageSplit = 0
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
return res
|
|
577
|
+
},
|
|
578
|
+
tranform (arr) { // 分barrier
|
|
579
|
+
let newMap = new Map()
|
|
580
|
+
arr.forEach(({ id, current }) => {
|
|
581
|
+
const find = newMap.get(current.join())
|
|
582
|
+
if (find) newMap.get(current.join()).push(id)
|
|
583
|
+
else newMap.set(current.join(), [id])
|
|
584
|
+
})
|
|
585
|
+
let ret = []
|
|
586
|
+
newMap.forEach((value, key) => {
|
|
587
|
+
ret.push(Array.from(new Set(key.split(',').map(Number).concat(value))))
|
|
588
|
+
})
|
|
589
|
+
const result = []
|
|
590
|
+
for (const a of ret) {
|
|
591
|
+
let merged = false
|
|
592
|
+
for (const r of result) {
|
|
593
|
+
if (this.check([...r], a)) {
|
|
594
|
+
a.forEach(item => r.add(item))
|
|
595
|
+
merged = true
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
if (!merged) {
|
|
599
|
+
result.push(new Set(a))
|
|
600
|
+
}
|
|
601
|
+
merged = false
|
|
602
|
+
}
|
|
603
|
+
return result.map(s => [...s])
|
|
604
|
+
},
|
|
605
|
+
check (arr1, arr2) {
|
|
606
|
+
return arr1.some(a1 => arr2.some(a2 => a1 === a2))
|
|
607
|
+
},
|
|
608
|
+
handleCurrentChange (val) { // 两个ring的数据
|
|
609
|
+
if (val === null || val.length === 0) return
|
|
610
|
+
// 按环序分组
|
|
611
|
+
let ringlength = []
|
|
612
|
+
let ringsequence = val.map(item => {
|
|
613
|
+
if (item.length === 0) return
|
|
614
|
+
ringlength.push(item.length)
|
|
615
|
+
return item.map(k => {
|
|
616
|
+
return k.id
|
|
617
|
+
})
|
|
618
|
+
})
|
|
619
|
+
let newRings = ringsequence.filter(item => item)
|
|
620
|
+
let minLength = Math.min(...ringlength)
|
|
621
|
+
let resultArrs = [] // 环1分组
|
|
622
|
+
let resultArr = [] // 环2分组
|
|
623
|
+
for (let j = 0; j < ringsequence[0].length; j += minLength) {
|
|
624
|
+
resultArrs.push(ringsequence[0].slice(j, j + minLength))
|
|
625
|
+
if (ringsequence[0].length === minLength) {
|
|
626
|
+
resultArrs.push([])
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
if (newRings.length > 1) {
|
|
630
|
+
for (let i = 0; i < ringsequence[1].length; i += minLength) {
|
|
631
|
+
resultArr.push(ringsequence[1].slice(i, i + minLength))
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
// this.patternInfo = []
|
|
635
|
+
// this.barrierList = []
|
|
636
|
+
let currentArr = []
|
|
637
|
+
let newPattern = []
|
|
638
|
+
val.map(i => {
|
|
639
|
+
newPattern.push(...i)
|
|
640
|
+
})
|
|
641
|
+
if (this.phaseList.length === 0) return
|
|
642
|
+
for (let patternStatus of val[0]) {
|
|
643
|
+
// if (patternStatus.mode !== 7) {
|
|
644
|
+
let concurrent = this.phaseList.filter((item) => {
|
|
645
|
+
return item.id === patternStatus.id // patternStatus.id当前相位id concurrent当前相位的并发相位
|
|
646
|
+
})[0].concurrent// 当前相位的并发相位
|
|
647
|
+
if (concurrent) {
|
|
648
|
+
let obj = {
|
|
649
|
+
id: patternStatus.id,
|
|
650
|
+
current: concurrent.sort()
|
|
651
|
+
}
|
|
652
|
+
currentArr.push(obj)
|
|
653
|
+
}
|
|
654
|
+
// }
|
|
655
|
+
}
|
|
656
|
+
if (currentArr.length !== 0) {
|
|
657
|
+
let newCurrent = this.tranform(currentArr)
|
|
658
|
+
// 取没个环与环关系的并集
|
|
659
|
+
let barrierRing1 = []
|
|
660
|
+
let barrierRing2 = []
|
|
661
|
+
let ring1 = [] // 环1与关系1的并集
|
|
662
|
+
for (let h = 0; h < newCurrent.length; h++) {
|
|
663
|
+
let adds = [...new Set(resultArrs[0])].filter(item => newCurrent[h].includes(item))
|
|
664
|
+
ring1.push(adds)
|
|
665
|
+
}
|
|
666
|
+
let ring1s = [] // 环1与关系2的并集
|
|
667
|
+
for (let h = 0; h < newCurrent.length; h++) {
|
|
668
|
+
let addRing1 = [...new Set(resultArrs[1])].filter(item => newCurrent[h].includes(item))
|
|
669
|
+
ring1s.push(addRing1)
|
|
670
|
+
}
|
|
671
|
+
barrierRing1.push(...ring1, ...ring1s)
|
|
672
|
+
let resultList = []
|
|
673
|
+
if (newRings.length > 1) {
|
|
674
|
+
let ring2s = [] // 环2与关系1的并集
|
|
675
|
+
for (let h = 0; h < newCurrent.length; h++) {
|
|
676
|
+
let addRing2 = [...new Set(resultArr[1])].filter(item => newCurrent[h].includes(item))
|
|
677
|
+
ring2s.push(addRing2)
|
|
678
|
+
}
|
|
679
|
+
let ring2 = [] // 环2与关系1的并集
|
|
680
|
+
for (let h = 0; h < newCurrent.length; h++) {
|
|
681
|
+
let add = [...new Set(resultArr[0])].filter(item => newCurrent[h].includes(item))
|
|
682
|
+
ring2.push(add)
|
|
683
|
+
}
|
|
684
|
+
barrierRing2.push(...ring2, ...ring2s)
|
|
685
|
+
for (let k = 0; k < barrierRing1.length; k++) {
|
|
686
|
+
resultList.push(barrierRing1[k].concat(barrierRing2[k]))
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
let resultLists = resultList.filter(item => item.length !== 0)
|
|
690
|
+
let ringArr = []
|
|
691
|
+
for (let l = 0; l < resultLists.length; l++) {
|
|
692
|
+
for (let d = 0; d < newCurrent.length; d++) {
|
|
693
|
+
if (newCurrent[d].filter(item => resultLists[l].includes(item)).length > 0) {
|
|
694
|
+
ringArr.push({
|
|
695
|
+
data: resultLists[l],
|
|
696
|
+
id: d + 1,
|
|
697
|
+
index: l
|
|
698
|
+
})
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
for (var i = 0; i < ringArr.length; i++) {
|
|
703
|
+
for (var j = i + 1; j < ringArr.length; j++) {
|
|
704
|
+
if (ringArr[i].id === ringArr[j].id && ringArr[i].index + 1 === ringArr[j].index) {
|
|
705
|
+
ringArr[i].data = ringArr[i].data.concat(ringArr[j].data)
|
|
706
|
+
ringArr.splice(ringArr.indexOf(ringArr[j].id), 1)
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
let resArr = ringArr.map(item => item.data)
|
|
711
|
+
let ringTeam = this.step1(this.phaseList, resArr)
|
|
712
|
+
let ringTeams = ringTeam.filter(item => item.length !== 0)
|
|
713
|
+
return this.setBarrier(ringTeams, val)
|
|
714
|
+
}
|
|
715
|
+
},
|
|
716
|
+
setBarrier (ringTeam, val) {
|
|
717
|
+
const patternObjs = {}
|
|
718
|
+
val.forEach(l => {
|
|
719
|
+
l.map(k => {
|
|
720
|
+
patternObjs[k.id] = k.value
|
|
721
|
+
})
|
|
722
|
+
})
|
|
723
|
+
let ret = ringTeam.map((y, index) => {
|
|
724
|
+
if (!y || y.length === 0) return
|
|
725
|
+
y.map(n => {
|
|
726
|
+
n.length = n.data.length > 1 ? n.data.reduce((pre, cur) => pre + patternObjs[cur], 0) : patternObjs[n.data[0]]
|
|
727
|
+
})
|
|
728
|
+
return {
|
|
729
|
+
barrier: index + 1,
|
|
730
|
+
length: y[0].length,
|
|
731
|
+
items: y.map(j => {
|
|
732
|
+
return {
|
|
733
|
+
ring: j.ring,
|
|
734
|
+
data: j.data
|
|
735
|
+
}
|
|
736
|
+
})
|
|
737
|
+
}
|
|
738
|
+
})
|
|
739
|
+
return ret
|
|
740
|
+
},
|
|
741
|
+
step1 (list, arr) { // 各个环包含的相位
|
|
742
|
+
const ret = []
|
|
743
|
+
const listObj = {}
|
|
744
|
+
list.forEach(l => {
|
|
745
|
+
listObj[l.id] = l.ring
|
|
746
|
+
})
|
|
747
|
+
arr.forEach(a => {
|
|
748
|
+
const retItem = []
|
|
749
|
+
a.forEach(b => {
|
|
750
|
+
if (listObj[b]) {
|
|
751
|
+
const find = retItem.find(r => r.ring === listObj[b])
|
|
752
|
+
if (find) find.data.push(b)
|
|
753
|
+
else retItem.push({ ring: listObj[b], data: [b] })
|
|
754
|
+
}
|
|
755
|
+
})
|
|
756
|
+
ret.push(retItem)
|
|
757
|
+
})
|
|
758
|
+
return ret
|
|
759
|
+
},
|
|
760
|
+
patternPlan () {
|
|
761
|
+
let Pattern = {
|
|
762
|
+
offset: 0,
|
|
763
|
+
cycle: 0,
|
|
764
|
+
stagesList: [],
|
|
765
|
+
rings: [[], [], [], []]
|
|
766
|
+
}
|
|
767
|
+
var newPattern = JSON.parse(JSON.stringify(Pattern))
|
|
768
|
+
for (let phase of this.phaseList) {
|
|
769
|
+
let ring = {}
|
|
770
|
+
ring.name = 'Phase ' + phase.id
|
|
771
|
+
ring.desc = this.getPhaseDescription(phase)
|
|
772
|
+
ring.id = phase.id
|
|
773
|
+
ring.value = 30
|
|
774
|
+
ring.mode = 2
|
|
775
|
+
ring.options = []
|
|
776
|
+
ring.delaystart = 0
|
|
777
|
+
ring.advanceend = 0
|
|
778
|
+
if (phase.ring === 1) {
|
|
779
|
+
newPattern.rings[0].push(ring)
|
|
780
|
+
} else if (phase.ring === 2) {
|
|
781
|
+
newPattern.rings[1].push(ring)
|
|
782
|
+
} else if (phase.ring === 3) {
|
|
783
|
+
newPattern.rings[2].push(ring)
|
|
784
|
+
} else if (phase.ring === 4) {
|
|
785
|
+
newPattern.rings[3].push(ring)
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
let barrier = this.handleCurrentChange(newPattern.rings)
|
|
789
|
+
newPattern.barriers = barrier
|
|
790
|
+
this.planPattern = newPattern
|
|
791
|
+
const flatArray = this.planPattern.rings.flat().filter(item => item !== null)
|
|
792
|
+
this.tableRing = flatArray.map(item => {
|
|
793
|
+
return {
|
|
794
|
+
id: item.id,
|
|
795
|
+
desc: item.desc,
|
|
796
|
+
flowperhour: item.flowperhour ? item.flowperhour : 0,
|
|
797
|
+
saturation: item.saturation ? item.saturation : 0
|
|
798
|
+
}
|
|
799
|
+
})
|
|
800
|
+
},
|
|
801
|
+
getCycle () {
|
|
802
|
+
for (let rings of this.planPattern.rings) {
|
|
803
|
+
let num = 0
|
|
804
|
+
for (let i = 0; i < rings.length; i++) {
|
|
805
|
+
if (rings[i].length !== 0) {
|
|
806
|
+
if (rings[i].mode === 7) { // 忽略相位不计周期
|
|
807
|
+
continue
|
|
808
|
+
}
|
|
809
|
+
num = num + Number(rings[i].value)
|
|
810
|
+
}
|
|
811
|
+
}
|
|
812
|
+
if (num !== 0) {
|
|
813
|
+
this.planPattern.cycle = num
|
|
814
|
+
break
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
getCycles () {
|
|
819
|
+
if (!this.patternOne[0].stages) return
|
|
820
|
+
let stages = this.patternOne[0].stages
|
|
821
|
+
let modeId = stages.filter(item => item.length === 1)[0]
|
|
822
|
+
for (let rings of this.patternOne[0].rings) {
|
|
823
|
+
let num = 0
|
|
824
|
+
for (let i = 0; i < rings.length; i++) {
|
|
825
|
+
if (rings[i].length !== 0) {
|
|
826
|
+
if (rings[i].mode === 7 && (modeId && modeId[0] === rings[i].id)) { // 忽略相位不计周期
|
|
827
|
+
continue
|
|
828
|
+
}
|
|
829
|
+
num = num + Number(rings[i].value)
|
|
830
|
+
}
|
|
831
|
+
}
|
|
832
|
+
if (num !== 0) {
|
|
833
|
+
this.patternOne[0].cycle = num
|
|
834
|
+
break
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
// getPhaseDescription (phaseList) {
|
|
839
|
+
// if (!phaseList) return
|
|
840
|
+
// let list = []
|
|
841
|
+
// for (let id of phaseList) {
|
|
842
|
+
// let obj = {}
|
|
843
|
+
// obj.id = id
|
|
844
|
+
// obj.color = '#454545'
|
|
845
|
+
// list.push(obj)
|
|
846
|
+
// }
|
|
847
|
+
// return list
|
|
848
|
+
// },
|
|
849
|
+
getPedPhasePos () {
|
|
850
|
+
// 行人相位信息
|
|
851
|
+
this.sidewalkPhaseData = []
|
|
852
|
+
// let phaseList = this.globalParamModel.getParamsByType('phaseList')
|
|
853
|
+
this.phaseList.forEach((ele, i) => {
|
|
854
|
+
if (ele.peddirection) {
|
|
855
|
+
ele.peddirection.forEach((dir, index) => {
|
|
856
|
+
// 行人相位
|
|
857
|
+
if (this.PhaseDataModel.getSidePos(dir)) {
|
|
858
|
+
this.sidewalkPhaseData.push({
|
|
859
|
+
key: this.CrossDiagramMgr.getUniqueKey('pedphase'),
|
|
860
|
+
phaseid: ele.id, // 相位id,用于对应相位状态
|
|
861
|
+
id: dir,
|
|
862
|
+
name: this.PhaseDataModel.getSidePos(dir).name
|
|
863
|
+
})
|
|
864
|
+
}
|
|
865
|
+
})
|
|
866
|
+
}
|
|
867
|
+
})
|
|
868
|
+
return this.sidewalkPhaseData
|
|
869
|
+
},
|
|
870
|
+
getPhaseDescription (phaseList) {
|
|
871
|
+
let list = []
|
|
872
|
+
let peddirections = []
|
|
873
|
+
let sidewalkPhaseData = this.getPedPhasePos()
|
|
874
|
+
for (let walk of sidewalkPhaseData) {
|
|
875
|
+
if (phaseList.peddirection) {
|
|
876
|
+
for (let ped of phaseList.peddirection) {
|
|
877
|
+
// if (stg === walk.phaseid) {
|
|
878
|
+
let obj = {}
|
|
879
|
+
obj.name = walk.name
|
|
880
|
+
obj.id = walk.id
|
|
881
|
+
if (ped === walk.id) {
|
|
882
|
+
peddirections.push(obj)
|
|
883
|
+
peddirections = Array.from(new Set(peddirections))
|
|
884
|
+
}
|
|
885
|
+
// }
|
|
886
|
+
}
|
|
887
|
+
} else {
|
|
888
|
+
peddirections = []
|
|
889
|
+
}
|
|
890
|
+
}
|
|
891
|
+
if (phaseList.direction.length > 0) {
|
|
892
|
+
for (let id of phaseList.direction) {
|
|
893
|
+
let obj = {}
|
|
894
|
+
obj.id = id
|
|
895
|
+
obj.peddirection = peddirections
|
|
896
|
+
obj.color = '#454545'
|
|
897
|
+
list.push(obj)
|
|
898
|
+
}
|
|
899
|
+
} else {
|
|
900
|
+
let obj = {}
|
|
901
|
+
obj.id = ''
|
|
902
|
+
obj.peddirection = peddirections
|
|
903
|
+
obj.color = '#454545'
|
|
904
|
+
list.push(obj)
|
|
905
|
+
}
|
|
906
|
+
return list
|
|
907
|
+
},
|
|
908
|
+
handleClose () {
|
|
909
|
+
this.$emit('closePhaseBack')
|
|
910
|
+
},
|
|
911
|
+
onStageSplitChange (diff, rowIndex, subIndex) {
|
|
912
|
+
let stageArr = this.stagesList[subIndex].stages
|
|
913
|
+
let row = this.patternList[rowIndex]
|
|
914
|
+
let ringsList = row.rings
|
|
915
|
+
for (let rings of ringsList) {
|
|
916
|
+
for (let ring of rings) {
|
|
917
|
+
if (stageArr.includes(ring.id)) {
|
|
918
|
+
ring.value = (ring.value ? ring.value : 0) + diff
|
|
919
|
+
continue
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
},
|
|
924
|
+
stageSplitChange (diff, rowIndex, subIndex) {
|
|
925
|
+
let row = this.patternOne.length === 0 ? this.planPattern : this.patternOne
|
|
926
|
+
let ringsList = this.patternOne.length === 0 ? row.stagesList : row[0].stagesList
|
|
927
|
+
for (let rings of ringsList) {
|
|
928
|
+
// if (subIndex === rings.key) {
|
|
929
|
+
rings.stageSplit = (rings.green ? rings.green : 0) + (rings.yellow ? rings.yellow : 0) + (rings.red ? rings.red : 0)
|
|
930
|
+
continue
|
|
931
|
+
// }
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
onStageDelaystartChange (diff, rowIndex, subIndex) {
|
|
935
|
+
let stageArr = this.stagesList[subIndex].stages
|
|
936
|
+
let row = this.patternList[rowIndex]
|
|
937
|
+
let ringsList = row.rings
|
|
938
|
+
for (let rings of ringsList) {
|
|
939
|
+
for (let ring of rings) {
|
|
940
|
+
if (stageArr.includes(ring.id)) {
|
|
941
|
+
ring.delaystart = (ring.delaystart ? ring.delaystart : 0) + diff
|
|
942
|
+
continue
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
onStageAdvanceendChange (diff, rowIndex, subIndex) {
|
|
948
|
+
let stageArr = this.stagesList[subIndex].stages
|
|
949
|
+
let row = this.patternList[rowIndex]
|
|
950
|
+
let ringsList = row.rings
|
|
951
|
+
for (let rings of ringsList) {
|
|
952
|
+
for (let ring of rings) {
|
|
953
|
+
if (stageArr.includes(ring.id)) {
|
|
954
|
+
ring.advanceend = (ring.advanceend ? ring.advanceend : 0) + diff
|
|
955
|
+
continue
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
}
|
|
959
|
+
},
|
|
960
|
+
handleSplit (index) {
|
|
961
|
+
if (this.patternOne.length > 0) {
|
|
962
|
+
let currPattern = this.patternOne[0].rings
|
|
963
|
+
setTimeout(() => {
|
|
964
|
+
this.handleStageData(currPattern)
|
|
965
|
+
this.getCycles()
|
|
966
|
+
// this.patternOne[0].stagesList = this.stagesList
|
|
967
|
+
}, 50)
|
|
968
|
+
} else {
|
|
969
|
+
let currPattern = this.planPattern.rings
|
|
970
|
+
setTimeout(() => {
|
|
971
|
+
this.handleStageData(currPattern)
|
|
972
|
+
this.getCycle()
|
|
973
|
+
// this.allPatternList[0].stagesList = this.stagesList
|
|
974
|
+
}, 50)
|
|
975
|
+
}
|
|
976
|
+
},
|
|
977
|
+
selectPattern () {
|
|
978
|
+
this.manualInfo.offset = 0
|
|
979
|
+
let selectId = Number(this.manualInfo.tempPatternid)
|
|
980
|
+
this.patternOne = this.allPatternList.filter(item => {
|
|
981
|
+
return item.id === selectId
|
|
982
|
+
})
|
|
983
|
+
// if (this.patternOne[0].contrloType === 'stage') {
|
|
984
|
+
// this.changeStage()
|
|
985
|
+
// }
|
|
986
|
+
const flatArray = this.patternOne[0].rings.flat().filter(item => item !== null)
|
|
987
|
+
this.tableRing = flatArray.map(item => {
|
|
988
|
+
return {
|
|
989
|
+
id: item.id,
|
|
990
|
+
desc: item.desc,
|
|
991
|
+
flowperhour: item.flowperhour ? item.flowperhour : 0,
|
|
992
|
+
saturation: item.saturation ? item.saturation : 0
|
|
993
|
+
}
|
|
994
|
+
})
|
|
995
|
+
this.manualInfo.offset = this.offset
|
|
996
|
+
for (let rings of this.patternOne[0].rings) {
|
|
997
|
+
if (rings.length === 0) continue
|
|
998
|
+
for (let ring of rings) {
|
|
999
|
+
if (ring.value === 0) continue
|
|
1000
|
+
let currPhase = this.phaseList.filter((item) => {
|
|
1001
|
+
return item.id === ring.id
|
|
1002
|
+
})[0]
|
|
1003
|
+
ring.desc = currPhase.direction.map(item => {
|
|
1004
|
+
return {
|
|
1005
|
+
id: item,
|
|
1006
|
+
color: '#454545'
|
|
1007
|
+
}
|
|
1008
|
+
})
|
|
1009
|
+
}
|
|
1010
|
+
}
|
|
1011
|
+
this.handleStageData(this.patternOne[0].rings)
|
|
1012
|
+
},
|
|
1013
|
+
handleStageData (rings) { // stagesList
|
|
1014
|
+
if (!rings) return
|
|
1015
|
+
for (let i = 0; i < rings.length; i++) {
|
|
1016
|
+
if (rings[i].length > 0) {
|
|
1017
|
+
let phaseList = []
|
|
1018
|
+
let stagesList = []
|
|
1019
|
+
// rings = JSON.parse(JSON.stringify(rings))
|
|
1020
|
+
let mapAdd = rings.map(item => {
|
|
1021
|
+
return item.map(val => {
|
|
1022
|
+
// if (val.mode !== 7) {
|
|
1023
|
+
return val.value + (val.sum ? val.sum : 0)
|
|
1024
|
+
// } else {
|
|
1025
|
+
// return 0
|
|
1026
|
+
// }
|
|
1027
|
+
})
|
|
1028
|
+
})
|
|
1029
|
+
let maxCycle = mapAdd.length > 0 ? mapAdd.map(item => {
|
|
1030
|
+
return item.length > 0 ? item.reduce((a, b) => {
|
|
1031
|
+
return a + b
|
|
1032
|
+
}) : 0
|
|
1033
|
+
}) : 0
|
|
1034
|
+
this.max = Math.max(...maxCycle)// 每个环的周期最大值
|
|
1035
|
+
this.stateList = [0]
|
|
1036
|
+
this.narr = []
|
|
1037
|
+
let currentIds = ''
|
|
1038
|
+
let lastCurrentIds = ''
|
|
1039
|
+
for (let j = 0; j <= this.max; j++) { // 指针长度
|
|
1040
|
+
for (let i = 0; i < rings.length; i++) { // 环列表
|
|
1041
|
+
let ring = rings[i]// 每个环对象
|
|
1042
|
+
let sum = 0
|
|
1043
|
+
for (let n = 0; n < ring.length; n++) { // 相位累计长度
|
|
1044
|
+
// if (ring[n].mode !== 7) {
|
|
1045
|
+
sum = sum + ring[n].value + (ring[n].sum ? ring[n].sum : 0)
|
|
1046
|
+
if (j < sum) {
|
|
1047
|
+
let phaseId = ring[n].id
|
|
1048
|
+
currentIds = currentIds + '-' + phaseId
|
|
1049
|
+
break
|
|
1050
|
+
}
|
|
1051
|
+
// }
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
if (lastCurrentIds !== currentIds && lastCurrentIds !== '') { // 当前相位id和上一个相比不同说明相位变化了
|
|
1055
|
+
phaseList.push(lastCurrentIds)
|
|
1056
|
+
this.stateList.push(j)// 阶段累计长度的集合
|
|
1057
|
+
}
|
|
1058
|
+
lastCurrentIds = currentIds
|
|
1059
|
+
currentIds = ''
|
|
1060
|
+
}
|
|
1061
|
+
let newPhaselist = []
|
|
1062
|
+
phaseList.forEach(i => {
|
|
1063
|
+
let rangeArr = i.split('-').map(Number)
|
|
1064
|
+
if (rangeArr.length > 2) {
|
|
1065
|
+
newPhaselist.push([
|
|
1066
|
+
JSON.parse(JSON.stringify(rangeArr[1])),
|
|
1067
|
+
JSON.parse(JSON.stringify(rangeArr[2]))
|
|
1068
|
+
])
|
|
1069
|
+
} else {
|
|
1070
|
+
newPhaselist.push([
|
|
1071
|
+
JSON.parse(JSON.stringify(rangeArr[1]))
|
|
1072
|
+
])
|
|
1073
|
+
}
|
|
1074
|
+
})
|
|
1075
|
+
for (let i = this.stateList.length - 1; i >= 1; i--) {
|
|
1076
|
+
this.narr.push(this.stateList[i] - this.stateList[i - 1])
|
|
1077
|
+
}
|
|
1078
|
+
// newPhaselist
|
|
1079
|
+
this.narr.reverse()// 阶段差
|
|
1080
|
+
for (let i = 0; i < newPhaselist.length; i++) {
|
|
1081
|
+
let stage = JSON.parse(JSON.stringify(newPhaselist[i]))
|
|
1082
|
+
let newStage = []
|
|
1083
|
+
stage.map(item => {
|
|
1084
|
+
for (let ring of rings) {
|
|
1085
|
+
for (let ringItem of ring) {
|
|
1086
|
+
if (item === ringItem.id && (ringItem.mode !== 7 && ringItem.mode !== 8 && ringItem.mode !== 9)) {
|
|
1087
|
+
newStage.push(item)
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
})
|
|
1092
|
+
let stageItem = this.getStageItem(newStage, stage, rings, i)
|
|
1093
|
+
stagesList.push(JSON.parse(JSON.stringify(stageItem)))
|
|
1094
|
+
}
|
|
1095
|
+
this.overLapCycle = stagesList.reduce((prev, curr) => prev + parseInt(curr.split), 0)
|
|
1096
|
+
this.stagesList = JSON.parse(JSON.stringify(stagesList))
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
},
|
|
1100
|
+
getStageItem (stageArr, stage, ringsList, i) {
|
|
1101
|
+
let res = {
|
|
1102
|
+
key: i,
|
|
1103
|
+
split: this.narr[i], // 阶段绿性比
|
|
1104
|
+
phases: stageArr,
|
|
1105
|
+
stageKanban: stage,
|
|
1106
|
+
delaystart: 0,
|
|
1107
|
+
advanceend: 0
|
|
1108
|
+
}
|
|
1109
|
+
// let splitArr = []
|
|
1110
|
+
let delaystartArr = []
|
|
1111
|
+
let advanceendArr = []
|
|
1112
|
+
for (let rings of ringsList) {
|
|
1113
|
+
for (let ring of rings) {
|
|
1114
|
+
if (stageArr.includes(ring.id)) {
|
|
1115
|
+
// let split = ring.value
|
|
1116
|
+
let delaystart = ring.delaystart
|
|
1117
|
+
let advanceend = ring.advanceend
|
|
1118
|
+
// splitArr.push(split)
|
|
1119
|
+
delaystartArr.push(delaystart)
|
|
1120
|
+
advanceendArr.push(advanceend)
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
// splitArr.sort(function (a, b) { return a - b })
|
|
1125
|
+
delaystartArr.sort(function (a, b) { return b - a })
|
|
1126
|
+
advanceendArr.sort(function (a, b) { return a - b })
|
|
1127
|
+
// res.split = splitArr.length > 0 ? splitArr[0] : 0
|
|
1128
|
+
res.delaystart = delaystartArr.length > 0 ? delaystartArr[0] : 0
|
|
1129
|
+
res.advanceend = advanceendArr.length > 0 ? advanceendArr[0] : 0
|
|
1130
|
+
return res
|
|
1131
|
+
},
|
|
1132
|
+
initData () {
|
|
1133
|
+
// 判断有几个环,就创建几个看板
|
|
1134
|
+
// let phaseList = this.globalParamModel.getParamsByType('phaseList')
|
|
1135
|
+
// this.coordphaseOption = this.phaseList.map(ele => {
|
|
1136
|
+
// return {
|
|
1137
|
+
// value: ele.id
|
|
1138
|
+
// }
|
|
1139
|
+
// })
|
|
1140
|
+
this.coordphaseOption = this.phaseList
|
|
1141
|
+
// this.overlap = this.globalParamModel.getParamsByType('overlaplList')
|
|
1142
|
+
// this.agentId = getIframdevid()
|
|
1143
|
+
let rings = []
|
|
1144
|
+
if (this.phaseList.length === 0) {
|
|
1145
|
+
// this.$store.getters.tscParam.patternList = []
|
|
1146
|
+
return
|
|
1147
|
+
}
|
|
1148
|
+
for (let phase of this.phaseList) {
|
|
1149
|
+
rings.push(phase.ring)
|
|
1150
|
+
}
|
|
1151
|
+
this.ringCount = Array.from(new Set(rings)) // 去除数组重复的元素
|
|
1152
|
+
this.ringCount = this.ringCount.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
|
|
1153
|
+
this.ringCounts = Array.from(new Set(rings)) // 去除数组重复的元素
|
|
1154
|
+
this.ringCounts = this.ringCounts.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
|
|
1155
|
+
this.optimizes = Array.from(new Set(rings)) // 去除数组重复的元素
|
|
1156
|
+
this.optimizes = this.optimizes.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
|
|
1157
|
+
// this.increaseId()
|
|
1158
|
+
// this.getCycle()
|
|
1159
|
+
// this.updatePhaseDescription()
|
|
1160
|
+
// this.getOptionsOfRing()
|
|
1161
|
+
},
|
|
1162
|
+
sortNumbers (a, b) {
|
|
1163
|
+
return a - b
|
|
1164
|
+
},
|
|
1165
|
+
isRingCycleEqual (rings) {
|
|
1166
|
+
let isequal = true
|
|
1167
|
+
// this.patternmsg = []
|
|
1168
|
+
let maxCycle = 0
|
|
1169
|
+
for (let ring of rings) {
|
|
1170
|
+
if (ring.length === 0) continue
|
|
1171
|
+
let cycle = 0
|
|
1172
|
+
for (let r of ring) {
|
|
1173
|
+
if (r.mode === 7) { // 忽略相位不计周期
|
|
1174
|
+
continue
|
|
1175
|
+
}
|
|
1176
|
+
cycle = cycle + r.value
|
|
1177
|
+
}
|
|
1178
|
+
if (cycle > maxCycle && maxCycle === 0) {
|
|
1179
|
+
maxCycle = cycle
|
|
1180
|
+
}
|
|
1181
|
+
if (cycle !== maxCycle) {
|
|
1182
|
+
// this.patternmsg.push(rings.id)
|
|
1183
|
+
isequal = false
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
return isequal
|
|
1187
|
+
},
|
|
1188
|
+
getMaxCycleStage (pattern) {
|
|
1189
|
+
let rings = pattern.stagesList
|
|
1190
|
+
let stageCycleList = rings.map(item => {
|
|
1191
|
+
if (item.stageSplit) {
|
|
1192
|
+
return item.stageSplit
|
|
1193
|
+
} else {
|
|
1194
|
+
return 0
|
|
1195
|
+
}
|
|
1196
|
+
})
|
|
1197
|
+
let maxCycle = stageCycleList.reduce((a, b) => {
|
|
1198
|
+
return a + b
|
|
1199
|
+
}, 0)
|
|
1200
|
+
return maxCycle
|
|
1201
|
+
},
|
|
1202
|
+
getMaxCycle (pattern) {
|
|
1203
|
+
let rings = pattern.rings
|
|
1204
|
+
let maxCycle = 0
|
|
1205
|
+
for (let ring of rings) {
|
|
1206
|
+
if (ring.length === 0) continue
|
|
1207
|
+
let cycle = 0
|
|
1208
|
+
for (let r of ring) {
|
|
1209
|
+
if (r.mode === 7) { // 忽略相位不计周期
|
|
1210
|
+
continue
|
|
1211
|
+
}
|
|
1212
|
+
cycle = cycle + r.value
|
|
1213
|
+
}
|
|
1214
|
+
if (cycle > maxCycle) {
|
|
1215
|
+
maxCycle = cycle
|
|
1216
|
+
}
|
|
1217
|
+
}
|
|
1218
|
+
return maxCycle
|
|
1219
|
+
},
|
|
1220
|
+
// checkPatternRules (rings) {
|
|
1221
|
+
// if (!this.isRingCycleEqual(rings)) {
|
|
1222
|
+
// this.patternCycleEqual = false
|
|
1223
|
+
// } else {
|
|
1224
|
+
// this.patternCycleEqual = true
|
|
1225
|
+
// }
|
|
1226
|
+
// if (!this.patternCycleEqual) {
|
|
1227
|
+
// let mess = `方案中存在环周期时长不一致`
|
|
1228
|
+
// if (this.$i18n.locale === 'en') {
|
|
1229
|
+
// mess = `Inconsistent loop cycle durations exist in the scheme`
|
|
1230
|
+
// }
|
|
1231
|
+
// this.$message({
|
|
1232
|
+
// message: mess,
|
|
1233
|
+
// type: 'error',
|
|
1234
|
+
// dangerouslyUseHTMLString: true
|
|
1235
|
+
// })
|
|
1236
|
+
// return false
|
|
1237
|
+
// }
|
|
1238
|
+
// },
|
|
1239
|
+
handleManualControl () {
|
|
1240
|
+
let submitdata = {
|
|
1241
|
+
control: 100,
|
|
1242
|
+
delay: this.manualInfo.tempDelay !== undefined ? Number(this.manualInfo.tempDelay) : 0,
|
|
1243
|
+
duration: Number(this.manualInfo.duration),
|
|
1244
|
+
// duration: this.manualInfo.tempDuration !== undefined ? Number(this.manualInfo.tempDuration) : 0,
|
|
1245
|
+
data: {}
|
|
1246
|
+
}
|
|
1247
|
+
if (this.manualInfo.tempPatternid) {
|
|
1248
|
+
submitdata.terminal = Number(this.manualInfo.tempPatternid)
|
|
1249
|
+
}
|
|
1250
|
+
if (this.patternOne.length === 0) {
|
|
1251
|
+
if (this.isRing) {
|
|
1252
|
+
submitdata.data.cycle = this.getMaxCycleStage(this.planPattern)
|
|
1253
|
+
} else {
|
|
1254
|
+
submitdata.data.cycle = this.getMaxCycle(this.planPattern)
|
|
1255
|
+
}
|
|
1256
|
+
submitdata.data.stagesList = this.planPattern.stagesList
|
|
1257
|
+
} else {
|
|
1258
|
+
if (this.isRing) {
|
|
1259
|
+
submitdata.data.cycle = this.getMaxCycleStage(this.patternOne[0])
|
|
1260
|
+
} else {
|
|
1261
|
+
submitdata.data.cycle = this.getMaxCycle(this.patternOne[0])
|
|
1262
|
+
}
|
|
1263
|
+
this.patternOne[0].stagesList.forEach((stage) => {
|
|
1264
|
+
delete stage.split
|
|
1265
|
+
})
|
|
1266
|
+
submitdata.data.stagesList = this.patternOne[0].stagesList
|
|
1267
|
+
}
|
|
1268
|
+
submitdata.data.offset = this.offset
|
|
1269
|
+
if (this.patternOne.length === 0) {
|
|
1270
|
+
submitdata.data.rings = this.planPattern.rings
|
|
1271
|
+
} else {
|
|
1272
|
+
submitdata.data.rings = this.patternOne[0].rings
|
|
1273
|
+
}
|
|
1274
|
+
// submitdata.data.rings = this.patternOne.length === 0 ? this.planPattern.rings : this.patternOne[0].rings
|
|
1275
|
+
// this.checkPatternRules(submitdata.data.rings)
|
|
1276
|
+
if (this.patternCycleEqual) {
|
|
1277
|
+
this.$emit('closePhaseControl', submitdata)
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
toAutoControl () {
|
|
1281
|
+
this.$emit('toAutoControl')
|
|
1282
|
+
},
|
|
1283
|
+
isHasPermission (path) {
|
|
1284
|
+
let res = hasPermission(path)
|
|
1285
|
+
return res
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
</script>
|
|
1290
|
+
|
|
1291
|
+
<style>
|
|
1292
|
+
|
|
1293
|
+
</style>
|