openatc-components 0.3.114 → 0.3.116

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.
Files changed (58) hide show
  1. package/package/kisscomps/components/BoardCard/BoardCard.vue +11 -0
  2. package/package/kisscomps/components/Channelization/Channelization.vue +1 -1
  3. package/package/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +1 -1
  4. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +46 -145
  5. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
  6. package/package/kisscomps/components/DrawChannelization/drawsvg/index.vue +1 -1
  7. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +63 -0
  8. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +1 -1
  9. package/package/kisscomps/components/OverLap/OverLap.vue +1 -1
  10. package/package/kisscomps/components/OverviewComponent/index.vue +11 -7
  11. package/package/kisscomps/components/PatternOptimize/PatternOptimize.vue +11 -2
  12. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +84 -9
  13. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +11 -4
  14. package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +9 -11
  15. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +34 -2
  16. package/package/kisscomps/components/StageOptimize/StageOptimize.vue +310 -0
  17. package/package/kisscomps/components/StageOptimize/index.js +2 -0
  18. package/package/kisscomps/components/StageOptimize/index.vue +310 -0
  19. package/package/kisscomps/components/overView/index.vue +2 -2
  20. package/package/kisscomps/components/patternList/patternList.vue +11 -0
  21. package/package/kisscomps/index.js +2 -0
  22. package/package/kissui.min.js +1 -1
  23. package/package.json +1 -1
  24. package/src/i18n/language/en.js +12 -12
  25. package/src/i18n/language/zh.js +17 -17
  26. package/src/kisscomps/components/BoardCard/BoardCard.vue +11 -0
  27. package/src/kisscomps/components/Channelization/Channelization.vue +1 -1
  28. package/src/kisscomps/components/ChannelizationFlowStatistic/ChannelizationFlowStatistic.vue +1 -1
  29. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +46 -145
  30. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
  31. package/src/kisscomps/components/DrawChannelization/drawsvg/index.vue +1 -1
  32. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +63 -0
  33. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +1 -1
  34. package/src/kisscomps/components/OverLap/OverLap.vue +1 -1
  35. package/src/kisscomps/components/OverviewComponent/index.vue +11 -7
  36. package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +11 -2
  37. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +84 -9
  38. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +11 -4
  39. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +9 -11
  40. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/icon.vue +34 -2
  41. package/src/kisscomps/components/StageOptimize/StageOptimize.vue +310 -0
  42. package/src/kisscomps/components/StageOptimize/index.js +2 -0
  43. package/src/kisscomps/components/StageOptimize/index.vue +310 -0
  44. package/src/kisscomps/components/overView/index.vue +2 -2
  45. package/src/kisscomps/components/patternList/patternList.vue +11 -0
  46. package/src/kisscomps/index.js +2 -0
  47. package/src/utils/ControlFormat.js +2 -2
  48. package/src/views/intersection.vue +7 -6
  49. package/src/views/intersection2.vue +4 -4
  50. package/src/views/overView.vue +27 -5
  51. package/static/styles/common.scss +3 -3
  52. package/static/styles/dark/theme/element-dark.scss +1 -1
  53. package/static/styles/intersection.scss +5 -15
  54. package/static/styles/light/theme/element-light.scss +1 -1
  55. package/static/styles/schemeconfig.scss +6 -3
  56. package/package/kisscomps/components/OptimizeKanban/index.js +0 -2
  57. package/package/kisscomps/components/OptimizeKanban/index.vue +0 -369
  58. package/src/node_modules/.package_versions.json +0 -1
@@ -212,8 +212,8 @@ export default {
212
212
  Detector: [], // 管理所有检测器
213
213
  DetectorChart: [], // 管理所有检测器统计图
214
214
  motorwayicon: '',
215
- IconLengh: 60,
216
- IconWdith: 134,
215
+ IconLengh: 33,
216
+ IconWdith: 109,
217
217
  textareaW: 200,
218
218
  textareaH: 100,
219
219
  pedW: 206,
@@ -389,8 +389,8 @@ export default {
389
389
  h: this.IconWdith,
390
390
  angle: 0
391
391
  }
392
- this.IconLengh = 60
393
- this.IconWdith = 134
392
+ this.IconLengh = 33
393
+ this.IconWdith = 109
394
394
  let Motorwaysitem = {
395
395
  index: this.index,
396
396
  id: this.motorid,
@@ -92,7 +92,7 @@ export default {
92
92
  // }
93
93
  return
94
94
  }
95
- if (JSON.stringify(data.data.data) === '{}') return
95
+ if (data.data.data === undefined || JSON.stringify(data.data.data) === '{}') return
96
96
  _this.pageindex = 2
97
97
  _this.loadedChannelizatonData = JSON.parse(JSON.stringify(data.data.data))
98
98
  })
@@ -43,6 +43,18 @@
43
43
  </div>
44
44
  </div>
45
45
  </div>
46
+ <!-- 阶段倒计时 -->
47
+ <div class="phaseCountdown" v-show="isShowInterval" v-if="isLoaded && contrloType === 'stage'" :class="{'countdownBg': isLoaded}">
48
+ <div v-for="curStage in stageCountdownList" :key="curStage.id" :style="{color: curStage.phaseCountdownColor}">
49
+ <div style="overflow: hidden;margin-bottom: 4px;">
50
+ <span style="float: left;width: 42px;height: 42px;position: relative;border: 1px solid rgba(255, 255, 255, 0.1);margin-right: 5px;">
51
+ <xdr-dir-selector :Data="xdrData" :Datas="xdrpedData" Width="55px" Height="55px" Widths="55px" Heights="55px" :showlist="curStage.showlist" :roadDirection="roadDirection"></xdr-dir-selector>
52
+ </span>
53
+ <span style="float: left;color: #fff;margin-right: 8px;width: 30px;">S{{crossStatusData.current_stage}}:</span>
54
+ <span style="float: left;font-size: 25px;">{{crossStatusData.current_stagecd}}</span>
55
+ </div>
56
+ </div>
57
+ </div>
46
58
  <!-- 手动刷新 -->
47
59
  <div v-if="!isLoaded">
48
60
  <RefreshSvg @click.native="refresh"/>
@@ -108,6 +120,18 @@
108
120
  </div>
109
121
  </div>
110
122
  </div>
123
+ <!-- 阶段倒计时 -->
124
+ <div class="phaseCountdown" v-show="isShowInterval" v-if="isLoaded && contrloType === 'stage'" :class="{'countdownBg': isLoaded}">
125
+ <div v-for="curStage in stageCountdownList" :key="curStage.id" :style="{color: curStage.phaseCountdownColor}">
126
+ <div style="overflow: hidden;margin-bottom: 4px;">
127
+ <span style="float: left;width: 42px;height: 42px;position: relative;border: 1px solid rgba(255, 255, 255, 0.1);margin-right: 5px;">
128
+ <xdr-dir-selector :Data="xdrData" :Datas="xdrpedData" Width="55px" Height="55px" Widths="55px" Heights="55px" :showlist="curStage.showlist" :roadDirection="roadDirection"></xdr-dir-selector>
129
+ </span>
130
+ <span style="float: left;color: #fff;margin-right: 8px;width: 30px;">S{{crossStatusData.current_stage}}:</span>
131
+ <span style="float: left;font-size: 25px;">{{crossStatusData.current_stagecd}}</span>
132
+ </div>
133
+ </div>
134
+ </div>
111
135
  <!-- 手动刷新 -->
112
136
  <div v-if="!isLoaded">
113
137
  <RefreshSvg @click.native="refresh"/>
@@ -330,6 +354,7 @@ export default {
330
354
  return {
331
355
  roadDir: 'right', // 道路行车方向,默认右行
332
356
  phaseCountdownList: [], // 相位倒计时列表
357
+ stageCountdownList: [], // 阶段倒计时列表
333
358
  statusData: null, // 信号机状态
334
359
  LanePhaseData: [], // 车道相位数据
335
360
  overlapLanePhaseData: [], // 车道跟随相位数据
@@ -397,12 +422,14 @@ export default {
397
422
  return
398
423
  }
399
424
  this.curPhase = val.current_phase
425
+ this.curStage = val.current_stage
400
426
  this.isHasPhase = true
401
427
  this.createPhaseStatusMap()
402
428
  // 正常情况下,获取车道相位、车道跟随相位、相位倒计时、行人相位、行人跟随相位 的状态
403
429
  this.getPhaseStatus()
404
430
  this.getOverlapPhaseStatus()
405
431
  this.getCurPhaseCountdown()
432
+ this.getCurStageCountdown()
406
433
  this.getBusPhaseStatus()
407
434
  if (this.mainType === '100' || this.mainType === '101' || this.mainType === '104') {
408
435
  // 城市道路和路段行人过街才显示人行道状态
@@ -486,6 +513,7 @@ export default {
486
513
  })
487
514
  }
488
515
  this.phaseCountdownList = []
516
+ this.stageCountdownList = []
489
517
  this.resetPhaseStatus()
490
518
  },
491
519
  handleSpecialControlStatus (Control) {
@@ -498,6 +526,11 @@ export default {
498
526
  item.id = ''
499
527
  item.phaseCountdownColor = '#fff'
500
528
  })
529
+ this.stageCountdownList.forEach(item => {
530
+ item.phaseCountdown = ''
531
+ item.id = ''
532
+ item.phaseCountdownColor = '#fff'
533
+ })
501
534
  }
502
535
  if (this.compLanePhaseData.length) {
503
536
  const compLanePhaseData = this.compLanePhaseData.map(data => ({
@@ -697,6 +730,31 @@ export default {
697
730
  })
698
731
  })
699
732
  },
733
+ getCurStageCountdown () {
734
+ // 获取当前相位倒计时颜色
735
+ this.stageCountdownList = []
736
+ this.phaseStatusList.forEach(phaseInfo => {
737
+ if (phaseInfo.id === this.curStage) {
738
+ let countdownObj = {}
739
+ countdownObj.id = phaseInfo.id
740
+ countdownObj.phaseCountdown = phaseInfo.countdown
741
+ countdownObj.phaseCountdownColor = this.ColorMap.get(phaseInfo.type)
742
+ let curphasedir = this.phaseDirMap.get(phaseInfo.id)
743
+ if (curphasedir !== undefined) {
744
+ countdownObj.showlist = curphasedir.direction.map(dir => {
745
+ return {
746
+ id: dir,
747
+ peddirection: this.getshowped(curphasedir.peddirection),
748
+ color: '#fff'
749
+ }
750
+ })
751
+ } else {
752
+ countdownObj.showlist = []
753
+ }
754
+ this.stageCountdownList.push(countdownObj)
755
+ }
756
+ })
757
+ },
700
758
  getshowped (peddirection) {
701
759
  let peddirarr = peddirection.map(peddir => ({
702
760
  id: peddir,
@@ -740,6 +798,11 @@ export default {
740
798
  return
741
799
  }
742
800
  this.getTempCrossInfo(res)
801
+ // 显示阶段的判断条件
802
+ this.allPatternList = res.data.data.param.patternList
803
+ if (this.allPatternList[0].rings === undefined || this.allPatternList[0].rings.length === 0) {
804
+ this.contrloType = 'stage'
805
+ }
743
806
  })
744
807
  },
745
808
  getTempCrossInfo (res) {
@@ -48,7 +48,7 @@
48
48
  </template>
49
49
 
50
50
  <script>
51
- import CrossDiagram from './crossDirection/crossDiagram'
51
+ import CrossDiagram from './crossDirection/crossDiagram.vue'
52
52
  import { setToken } from '../../../utils/auth.js'
53
53
  export default {
54
54
  name: 'intersection-base-map',
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="overLap" v-if="checked" :style="{'margin':this.controlData ? '20px 0 0 0' :tentative ? '0' : '0 107px 0 468px'}">
2
+ <div class="overLap" v-if="checked" :style="{'margin':this.controlData ? '20px 0 0 0' :tentative ? '0' : '0 147px 0 468px'}">
3
3
  <div class="ring-first" v-for="(list, index1) in this.overlapDatas" :key="index1">
4
4
  <div v-for="(item,index2) in list.stageLists" :key="index2" >
5
5
  <!-- {{list.peddirection}} -->
@@ -11,9 +11,9 @@
11
11
  **/
12
12
  <template>
13
13
  <div class="container-main">
14
- <div :style="{'transform': `scale(${shrink})`, 'transform-origin': 'left top', 'height': '100%'}">
14
+ <div class="overview-component-content" :style="{'transform': `scale(${shrink})`, 'transform-origin': 'left top', 'height': '100%'}">
15
15
  <div class="tuxingjiemian" v-show="curHomePage === 'Graphical' || curHomePage === 'Channelization'" :class="{'minifont': curBodyWidth <= 650}">
16
- <div class="tuxing-left" :class="{'changeWidth': graphicMode}" ref="tuxingLeft">
16
+ <div :class="{'changeWidth': graphicMode, 'tuxing-left': !onlyShowIntersectionMap}" ref="tuxingLeft">
17
17
  <intersection-base-map
18
18
  v-if="curHomePage === 'Graphical'"
19
19
  ref="intersectionMap"
@@ -29,7 +29,7 @@
29
29
  :AgentId="agentId"
30
30
  :crossStatusData="crossStatusData"
31
31
  :detectorStatusData="detectorStatusData" />
32
- <div class="pattern-status" v-if="!graphicMode && crossStatusData.control !== 1 && crossStatusData.control !== 2 && crossStatusData.control !== 3">
32
+ <div class="pattern-status" v-if="!graphicMode && !onlyShowIntersectionMap && crossStatusData.control !== 1 && crossStatusData.control !== 2 && crossStatusData.control !== 3">
33
33
  <div class="pattern-name cross-mess">{{$t('openatccomponents.overviewcomponent.patternstate')}}</div>
34
34
  <div class="pattern-message">({{$t('openatccomponents.overviewcomponent.cycle')}}: {{controlData.cycle}} {{$t('openatccomponents.overviewcomponent.patternoffset')}}: {{controlData.patternoffset}} {{$t('openatccomponents.overviewcomponent.coordinationtime')}}: {{controlData.offset}})</div>
35
35
  <span class="pattern-explain"><el-checkbox v-model="checked">{{$t('openatccomponents.overviewcomponent.overLap')}}</el-checkbox></span>
@@ -93,7 +93,7 @@
93
93
  </div>
94
94
  </div>
95
95
 
96
- <div ref="tuxingRight" class="tuxing-right" >
96
+ <div ref="tuxingRight" class="tuxing-right" v-if="!onlyShowIntersectionMap">
97
97
  <scheme-config
98
98
  ref="rightpanel"
99
99
  :statusData="crossStatusData"
@@ -144,6 +144,10 @@ export default {
144
144
  isfromatc: {
145
145
  type: Boolean,
146
146
  default: true
147
+ },
148
+ onlyShowIntersectionMap: {
149
+ type: Boolean,
150
+ default: false
147
151
  }
148
152
  },
149
153
  data () {
@@ -167,8 +171,8 @@ export default {
167
171
  detectorStatusTimer: null, // 检测器定时器
168
172
  ParamsMode: new Map([[0, '自主控制'], [1, '本地手动'], [2, '平台控制'], [3, '配置软件控制'], [4, '遥控器控制'], [5, '黄闪器控制'], [6, '降级控制'], [7, '脚本控制'], [8, '算法控制']]),
169
173
  ParamsModeEn: new Map([[0, 'Autonomous Control'], [1, 'Local Manual'], [2, 'Platform Control'], [3, 'Configuration Software Control'], [4, 'Remote Control'], [5, 'Yellow Flasher Control'], [6, 'Degradation Control'], [7, 'Script Control'], [8, 'Algorithm Control']]),
170
- ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '自适应'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '方案生成'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '预留18'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
171
- ParamsControlEn: new Map([[0, 'Multi Period'], [1, 'Yellow Flash Control'], [2, 'Red Control'], [3, 'Dark Control'], [4, 'Step'], [5, 'Fixed_Cycle Control'], [6, 'Free Control'], [7, 'Coordinated Induction Control'], [8, 'Pattern Selection Control'], [9, 'Adaptive Control'], [10, 'Wireless Control'], [11, 'Cable Control'], [12, 'Pedestrian Crossing Control'], [13, 'Pattern recovery'], [14, 'Phase dwell'], [15, 'Channel Detection'], [16, 'Direction lock'], [17, 'Webster Single Point Coordination'], [18, 'Reserving18'], [19, 'Inductive Pedestrian Crossing Control'], [20, 'Program Intervention'], [100, 'Program Intervention'], [21, 'Reserving21'], [22, 'Priority Control'], [23, 'Close Phase'], [24, 'Emergency Control'], [99, 'Device Mantenance']]),
174
+ ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '单点感应控制'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '自适应控制'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '感应式自适应'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
175
+ ParamsControlEn: new Map([[0, 'Multi Period'], [1, 'Yellow Flash Control'], [2, 'Red Control'], [3, 'Dark Control'], [4, 'Step'], [5, 'Fixed_Cycle Control'], [6, 'Free Control'], [7, 'Coordinated Induction Control'], [8, 'Pattern Selection Control'], [9, 'Adaptive Control'], [10, 'Wireless Control'], [11, 'Cable Control'], [12, 'Pedestrian Crossing Control'], [13, 'Pattern recovery'], [14, 'Phase dwell'], [15, 'Channel Detection'], [16, 'Direction lock'], [17, 'Webster Single Point Coordination'], [18, 'Inductive Adaptive'], [19, 'Inductive Pedestrian Crossing Control'], [20, 'Program Intervention'], [100, 'Program Intervention'], [21, 'Reserving21'], [22, 'Priority Control'], [23, 'Close Phase'], [24, 'Emergency Control'], [99, 'Device Mantenance']]),
172
176
  phaseType: new Map([[1, '红'], [2, '黄'], [3, '绿'], [4, '绿闪']]), // phaseType表示红,黄,绿
173
177
  phaseTypeEn: new Map([[1, 'Red'], [2, 'Yellow'], [3, 'Green'], [4, 'Greenclear']]), // phaseType表示红,黄,绿
174
178
  ip: '--',
@@ -335,7 +339,7 @@ export default {
335
339
  return
336
340
  }
337
341
  // 路口已设置渠化,则总览默认显示渠化路口,未设置显示模版路口
338
- if (_this.isfromatc === true && data.data.success === true && JSON.stringify(data.data.data) !== '{}') {
342
+ if (_this.isfromatc === true && data.data.success === true && data.data.data !== undefined && JSON.stringify(data.data.data) !== '{}') {
339
343
  _this.curHomePage = 'Channelization'
340
344
  } else {
341
345
  _this.curHomePage = 'Graphical'
@@ -50,7 +50,7 @@
50
50
  <el-tooltip class="item" effect="dark" placement="left">
51
51
  <div slot="content">{{element.name}}</div>
52
52
  <div class="common-phase-description">
53
- <xdrdirselector Width="70px" Height="70px" Widths="50px" Heights="50px" :Data="styles" :showlist="element.desc" :ISActiveMask="ISActiveMask" :MaskColor="MaskColor"></xdrdirselector>
53
+ <xdrdirselector Width="70px" Height="70px" Widths="58px" Heights="58px" :Datas="styles" :Data="showStyle" :showlist="element.desc" :ISActiveMask="ISActiveMask" :MaskColor="MaskColor"></xdrdirselector>
54
54
  </div>
55
55
  </el-tooltip>
56
56
  </el-col>
@@ -79,9 +79,13 @@ export default {
79
79
  },
80
80
  data () {
81
81
  return {
82
+ showStyle: {
83
+ left: '2px',
84
+ top: '0px'
85
+ },
82
86
  styles: {
83
87
  left: '1px',
84
- top: '0'
88
+ top: '0px'
85
89
  },
86
90
  typeOptions: [{
87
91
  value: 'flow-split-opt'
@@ -97,6 +101,9 @@ export default {
97
101
  type: String,
98
102
  default: 'Header'
99
103
  },
104
+ id: {
105
+ type: Number
106
+ },
100
107
  rings: {
101
108
  type: Object
102
109
  },
@@ -209,6 +216,7 @@ export default {
209
216
  }
210
217
  }
211
218
  }
219
+ this.$emit('optimizesucess', this.id)
212
220
  }
213
221
  }).catch(error => {
214
222
  console.log(error)
@@ -232,6 +240,7 @@ export default {
232
240
  }
233
241
  }
234
242
  }
243
+ this.$emit('optimizesucess', this.id)
235
244
  }
236
245
  }).catch(error => {
237
246
  console.log(error)
@@ -14,8 +14,9 @@
14
14
  <!-- 环模式true -->
15
15
  <div v-if="this.contrloType === 'ring' || !this.contrloType">
16
16
  <div class="ring-first" v-for="(list, index1) in patternInfo" :key="index1">
17
- <div style="position: relative;" :style="{'height': '34px','float':'left','width':((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%'}" v-for="(item,index2) in list" :key="index2" :class="item.mode===7?'direction': ''">
18
- <div class="first-1" :class="item.mode === 8 ? 'mask' : item.mode === 9 ? 'yellowClass' : ''" :style="{'width':Number(item.greenWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%').replace('%', ''))*100+'%','height':'34px','background':'#7ccc66'}">
17
+ <draggable :move="move" @end="endDrag(index1)" :disabled="isMove" :list="list">
18
+ <div style="position: relative;" :style="{'height': '34px','float':'left','width':((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%'}" v-for="(item,index2) in list" :key="index2" :class="item.mode===7?'direction': ''">
19
+ <div class="first-1" :class="item.mode === 8 ? 'mask' : item.mode === 9 ? 'yellowClass' : ''" :style="{'width':Number(item.greenWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%').replace('%', ''))*100+'%','height':'34px','background':'#7ccc66'}">
19
20
  <el-tooltip placement="top-start" effect="light">
20
21
  <div slot="content">{{$t('openatccomponents.phase.phase')}}{{item.id}}:{{item.split}}</div>
21
22
  <div style="cursor:pointer;">
@@ -25,7 +26,18 @@
25
26
  </div>
26
27
  <div v-if="isShowTip" class="box" style="position: absolute; left:40px; width:40px; top: -1px;">
27
28
  <div class="ring-nums">{{$t('openatccomponents.phase.phase')}}{{item.id}}</div>
28
- <div class="ring-nums">{{item.split}}</div>
29
+ <div v-if="isMove" class="ring-nums">{{item.split}}</div>
30
+ <el-input-number
31
+ v-if="!isMove"
32
+ class="ring-nums"
33
+ size="small"
34
+ :controls="false"
35
+ :min="0"
36
+ :step="1"
37
+ v-model.number="item.split"
38
+ @change="handleEdit(item)"
39
+ style="width: 24px"
40
+ ></el-input-number>
29
41
  </div>
30
42
  </div>
31
43
  </el-tooltip>
@@ -41,7 +53,8 @@
41
53
  <div class="first-1" :class="item.mode === 8 ? 'mask' : item.mode === 9 ? 'yellowClass' : ''" :style="{'width':Number(item.flashgreen.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','float':'left','background': 'linear-gradient(to right, #ffffff 50%, #7ccc66 0)','background-size': '4px 100%'}"></div>
42
54
  <div class="first-1" :class="item.mode === 8 ? 'mask' : item.mode === 9 ? 'yellowClass' : ''" :style="{'width':Number(item.yellowWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f9dc6a'}"></div>
43
55
  <div class="first-1" :class="item.mode === 8 ? 'mask' : item.mode === 9 ? 'yellowClass' : ''" :style="{'width':Number(item.redWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f27979'}"></div>
44
- </div>
56
+ </div>
57
+ </draggable>
45
58
  </div>
46
59
  <div v-if="showBarrier">
47
60
  <div v-for="(item, index) in barrierList" :key="index + '1'">
@@ -100,6 +113,7 @@
100
113
  <script>
101
114
  // import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
102
115
  import xdrdirselector from '../XRDDirSelector/XRDDirSelector'
116
+ import draggable from 'vuedraggable'
103
117
  // import PatternWalkSvg from '../IntersectionMap/crossDirection/baseImg/PatternWalkSvg'
104
118
  import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
105
119
  import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
@@ -107,6 +121,7 @@ export default {
107
121
  name: 'pattern-list',
108
122
  components: {
109
123
  // patternwalksvg,
124
+ draggable,
110
125
  xdrdirselector
111
126
  },
112
127
  data () {
@@ -114,6 +129,7 @@ export default {
114
129
  barrierHeight: '',
115
130
  stageCycle: '',
116
131
  barrierList: [],
132
+ barrierArr: [],
117
133
  newCycle: this.cycles,
118
134
  patternIds: this.patternId,
119
135
  newPatterns: [],
@@ -142,6 +158,10 @@ export default {
142
158
  stagesChange: {
143
159
  type: Array
144
160
  },
161
+ isMove: {
162
+ type: Boolean,
163
+ default: true
164
+ },
145
165
  controlPhase: {
146
166
  type: Object
147
167
  },
@@ -343,11 +363,11 @@ export default {
343
363
  handler: function (val, oldVal) {
344
364
  this.handleBarrierHeight() // 计算屏障高度
345
365
  if (this.patternStatusList && this.newCycle) {
346
- setTimeout(() => {
347
- this.handleCurrentChange(this.patternStatusList)
348
- this.handleBarrierHeight()
349
- }, 10)
366
+ // setTimeout(() => {
367
+ this.handleCurrentChange(this.patternStatusList)
350
368
  this.handleBarrierHeight()
369
+ // }, 10)
370
+ // this.handleBarrierHeight()
351
371
  }
352
372
  },
353
373
  // 深度观察监听
@@ -375,6 +395,60 @@ export default {
375
395
  }
376
396
  },
377
397
  methods: {
398
+ move (e) {
399
+ // 这里的e表示即将停靠的元素。
400
+ let result = this.barrierArr.filter(item => item.includes(e.relatedContext.element.id))[0]
401
+ if (!result.includes(e.draggedContext.element.id)) {
402
+ return false
403
+ }
404
+ },
405
+ endDrag (index) {
406
+ // 拖动后对原数据排序
407
+ const idIndexMap = {}
408
+ this.patternInfo.forEach((subArray, subArrayIndex) => {
409
+ subArray.forEach((item, index) => {
410
+ idIndexMap[item.id] = { subArrayIndex, index }
411
+ })
412
+ })
413
+ this.patternStatusList.forEach((subArray, subArrayIndex) => {
414
+ if (subArray.length > 0) {
415
+ subArray.sort((aItem, bItem) => {
416
+ const aIndex = idIndexMap[aItem.id] ? idIndexMap[aItem.id].index : Infinity
417
+ const bIndex = idIndexMap[bItem.id] ? idIndexMap[bItem.id].index : Infinity
418
+ return aIndex - bIndex
419
+ })
420
+ }
421
+ })
422
+ },
423
+ handleEdit (val) {
424
+ this.patternStatusList.map(d => {
425
+ d.map(r => {
426
+ if (r.id === val.id) {
427
+ r.value = val.split
428
+ }
429
+ })
430
+ })
431
+ // this.handleCurrentChange(this.patternStatusList)
432
+ this.$emit('handleSplitMove', this.patternId)
433
+ },
434
+ getMaxCycle (pattern) {
435
+ // let rings = pattern.rings
436
+ let maxCycle = 0
437
+ for (let ring of pattern) {
438
+ if (ring.length === 0) continue
439
+ let cycle = 0
440
+ for (let r of ring) {
441
+ if (r.mode === 7) { // 忽略相位不计周期
442
+ continue
443
+ }
444
+ cycle = cycle + r.value
445
+ }
446
+ if (cycle > maxCycle) {
447
+ maxCycle = cycle
448
+ }
449
+ }
450
+ return maxCycle
451
+ },
378
452
  getPed (data) {
379
453
  let ped = []
380
454
  for (let stg of data) {
@@ -1179,6 +1253,7 @@ export default {
1179
1253
  }
1180
1254
  }
1181
1255
  let resArr = ringArr.map(item => item.data)
1256
+ this.barrierArr = resArr
1182
1257
  let ringTeam = this.step1(this.phaseList, resArr)
1183
1258
  let ringTeams = ringTeam.filter(item => item.length !== 0)
1184
1259
  if (this.patternList) {
@@ -1266,7 +1341,7 @@ export default {
1266
1341
  }
1267
1342
  }
1268
1343
  obj.split = split
1269
- obj.cycle = this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle
1344
+ obj.cycle = cycle
1270
1345
  const isZero = split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen
1271
1346
  const allAdd = split + currPhase.redclear + currPhase.yellow + currPhase.flashgreen
1272
1347
  if (isZero <= 0) {
@@ -263,7 +263,7 @@ export default {
263
263
  faultTimer: null, // 当前故障定时器
264
264
  ParamsMode: new Map([[0, '自主控制'], [1, '本地手动'], [2, '平台控制'], [3, '配置软件控制'], [4, '遥控器控制'], [5, '黄闪器控制'], [6, '降级控制'], [7, '脚本控制'], [8, '算法控制']]),
265
265
  ParamsModeEn: new Map([[0, 'Autonomous Control'], [1, 'Local Manual'], [2, 'Platform Control'], [3, 'Configuration Software Control'], [4, 'Remote Control'], [5, 'Yellow Flasher Control'], [6, 'Degradation Control'], [7, 'Script Control'], [8, 'Algorithm Control']]),
266
- ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '自适应'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '方案生成'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '预留18'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
266
+ ParamsControl: new Map([[0, '多时段'], [1, '黄闪'], [2, '全红'], [3, '关灯'], [4, '步进'], [5, '定周期控制'], [6, '单点感应控制'], [7, '协调感应控制'], [8, '方案选择控制'], [9, '自适应控制'], [10, '无电缆控制'], [11, '有电缆控制'], [12, '行人过街控制'], [13, '方案恢复过渡'], [14, '相位驻留'], [15, '通道检测'], [16, '方向锁定'], [17, '韦伯斯特单点控制'], [18, '预留18'], [19, '感应式行人过街'], [20, '方案干预'], [100, '方案干预'], [21, '预留21'], [22, '相位锁定'], [23, '相位放行控制'], [24, '紧急控制'], [99, '设备维护']]),
267
267
  ParamsControlEn: new Map([[0, 'Multi Period'], [1, 'Yellow Flash Control'], [2, 'Red Control'], [3, 'Dark Control'], [4, 'Step'], [5, 'Fixed_Cycle Control'], [6, 'Free Control'], [7, 'Coordinated Induction Control'], [8, 'Pattern Selection Control'], [9, 'Adaptive Control'], [10, 'Wireless Control'], [11, 'Cable Control'], [12, 'Pedestrian Crossing Control'], [13, 'Pattern recovery'], [14, 'Phase dwell'], [15, 'Channel Detection'], [16, 'Direction lock'], [17, 'Webster Single Point Coordination'], [18, 'Reserving18'], [19, 'Inductive Pedestrian Crossing Control'], [20, 'Program Intervention'], [100, 'Program Intervention'], [21, 'Reserving21'], [22, 'Priority Control'], [23, 'Close Phase'], [24, 'Emergency Control'], [99, 'Device Mantenance']]),
268
268
  phaseType: new Map([[1, '红'], [2, '黄'], [3, '绿']]), // phaseType表示红,黄,绿
269
269
  phaseTypeEn: new Map([[1, 'Red'], [2, 'Yellow'], [3, 'Green']]), // phaseType表示红,黄,绿
@@ -303,7 +303,7 @@ export default {
303
303
  id: 9,
304
304
  iconClass: 'zishiying',
305
305
  permission: 'configer:manual:base',
306
- iconName: '方案生成'
306
+ iconName: '自适应控制'
307
307
  }, {
308
308
  id: 10,
309
309
  iconClass: 'wuxianlan',
@@ -387,14 +387,14 @@ export default {
387
387
  iconName: this.$t('openatccomponents.overview.modelList5'),
388
388
  bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
389
389
  }, {
390
- type: '自适应',
390
+ type: '单点感应',
391
391
  id: 6,
392
392
  iconClass: 'ganyingkongzhi',
393
393
  permission: 'configer:manual:base',
394
394
  iconName: this.$t('openatccomponents.overview.modelList6'),
395
395
  bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
396
396
  }, {
397
- type: '方案生成',
397
+ type: '自适应控制',
398
398
  id: 9,
399
399
  iconClass: 'zishiying',
400
400
  permission: 'configer:manual:base',
@@ -421,6 +421,13 @@ export default {
421
421
  permission: 'configer:manual:base',
422
422
  iconName: this.$t('openatccomponents.overview.modelList19'),
423
423
  bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
424
+ }, {
425
+ type: '感应式自适应',
426
+ id: 18,
427
+ iconClass: 'ganyingshizishiying',
428
+ permission: 'configer:manual:base',
429
+ iconName: this.$t('openatccomponents.overview.modelList18'),
430
+ bgcolor: getTheme() === 'light' ? '#edf6ff' : '#243d59'
424
431
  }
425
432
  ],
426
433
  othersControlList: [
@@ -20,10 +20,10 @@
20
20
  :model="manualInfo"
21
21
  label-width="90px">
22
22
  <el-form-item
23
- :label="$t('openatccomponents.overview.greenclear')"
24
- prop="intersection">
25
- <el-input-number :min="0" :max="65535" :precision="0" :step="1" :controls="false" v-model.number="manualInfo.tempGreenflash" size="small"></el-input-number>
26
- </el-form-item>
23
+ :label="$t('openatccomponents.overview.duration')"
24
+ prop="count">
25
+ <el-input-number :min="0" :max="65535" :precision="0" :step="1" :controls="false" v-model.number="manualInfo.tempDuration" size="small"></el-input-number>
26
+ </el-form-item>
27
27
 
28
28
  <el-form-item
29
29
  :label="$t('openatccomponents.overview.yellowflash')"
@@ -44,13 +44,11 @@
44
44
  label-position="left"
45
45
  :model="manualInfo"
46
46
  label-width="90px">
47
-
48
- <el-form-item
49
- :label="$t('openatccomponents.overview.duration')"
50
- prop="count">
51
- <el-input-number :min="0" :max="65535" :precision="0" :step="1" :controls="false" v-model.number="manualInfo.tempDuration" size="small"></el-input-number>
52
- </el-form-item>
53
-
47
+ <el-form-item
48
+ :label="$t('openatccomponents.overview.greenclear')"
49
+ prop="intersection">
50
+ <el-input-number :min="0" :max="65535" :precision="0" :step="1" :controls="false" v-model.number="manualInfo.tempGreenflash" size="small"></el-input-number>
51
+ </el-form-item>
54
52
  <el-form-item
55
53
  :label="$t('openatccomponents.overview.allred')"
56
54
  prop="intersection">
@@ -227,7 +227,7 @@ PURPOSE. * See the Mulan PSL v2 for more details. **/
227
227
  </g>
228
228
  </svg>
229
229
  <svg
230
- v-if="type === '自适应'"
230
+ v-if="type === '单点感应'"
231
231
  version="1.1"
232
232
  id="图层_1"
233
233
  xmlns="http://www.w3.org/2000/svg"
@@ -266,7 +266,7 @@ PURPOSE. * See the Mulan PSL v2 for more details. **/
266
266
  </svg>
267
267
 
268
268
  <svg
269
- v-if="type === '方案生成'"
269
+ v-if="type === '自适应控制'"
270
270
  xmlns="http://www.w3.org/2000/svg"
271
271
  viewBox="0 0 24.53 21.2"
272
272
  :width="iconWidth"
@@ -399,6 +399,38 @@ PURPOSE. * See the Mulan PSL v2 for more details. **/
399
399
  p-id="6532"
400
400
  ></path>
401
401
  </svg>
402
+
403
+ <svg
404
+ v-if="type === '感应式自适应'"
405
+ t="1734600340213"
406
+ class="icon"
407
+ viewBox="0 0 1252 1024"
408
+ version="1.1"
409
+ xmlns="http://www.w3.org/2000/svg"
410
+ p-id="12292"
411
+ xmlns:xlink="http://www.w3.org/1999/xlink"
412
+ :width="iconWidth"
413
+ :height="iconHeight"
414
+ >
415
+ <path
416
+ :class="themeColor"
417
+ d="M48.597631 254.131387c22.423358 0 44.846715-18.686131 44.846715-44.846715V85.956204h130.80292c18.686131 0 41.109489-18.686131 41.109489-41.109489C265.356755 18.686131 242.933398 0 220.51004 0H48.597631C22.437047 0 3.750916 18.686131 3.750916 44.846715v168.175183c0 22.423358 18.686131 41.109489 44.846715 41.109489zM1203.400551 0h-168.175183c-22.423358 0-44.846715 18.686131-44.846715 44.846715 0 22.423358 18.686131 44.846715 44.846715 44.846716h123.328467v130.802919c0 22.423358 18.686131 44.846715 44.846716 44.846716 22.423358 0 44.846715-18.686131 44.846715-44.846716V44.846715C1244.51004 18.686131 1225.823908 0 1203.400551 0zM1203.400551 766.131387c-22.423358 0-44.846715 18.686131-44.846716 44.846715V934.306569h-130.802919c-22.423358 3.737226-41.109489 22.423358-41.109489 48.583942 3.737226 22.423358 18.686131 37.372263 41.109489 41.109489H1199.663325c22.423358 0 44.846715-18.686131 44.846715-44.846715v-168.175183c0-26.160584-18.686131-44.846715-41.109489-44.846715zM213.035587 930.569343H89.70712v-130.80292c0-22.423358-18.686131-44.846715-44.846715-44.846715-22.423358 0-44.846715 18.686131-44.846716 44.846715V971.678832c0 22.423358 18.686131 44.846715 44.846716 44.846715h168.175182c22.423358-3.737226 41.109489-22.423358 41.109489-48.583941-3.737226-18.686131-18.686131-33.635036-41.109489-37.372263zM556.860405 186.861314H328.889602C284.042887 186.861314 250.40785 224.233577 250.40785 269.080292v485.839416c0 44.846715 33.635036 78.481752 78.481752 78.481752h227.970803c44.846715 0 78.481752-33.635036 78.481752-78.481752v-485.839416C635.342157 224.233577 601.70712 186.861314 556.860405 186.861314z m18.686131 568.058394c0 11.211679-7.474453 18.686131-18.686131 18.686131H328.889602c-11.211679 0-18.686131-7.474453-18.686132-18.686131v-485.839416c0-11.211679 7.474453-18.686131 18.686132-18.686131h227.970803c7.474453 0 14.948905 7.474453 18.686131 18.686131v485.839416zM881.999091 235.445255l-7.474453-7.474452c-11.211679-11.211679-29.89781-11.211679-41.109489 0-11.211679 11.211679-11.211679 29.89781 0 41.109489 130.80292 130.80292 134.540146 343.824818 3.737227 474.627737l-3.737227 3.737226c-11.211679 11.211679-11.211679 29.89781 0 41.10949 7.474453 3.737226 14.948905 7.474453 22.423358 7.474452 7.474453 0 14.948905-3.737226 22.423358-7.474452 153.226277-145.751825 156.963504-396.145985 3.737226-553.10949z"
418
+ fill="#606266"
419
+ p-id="12293"
420
+ ></path>
421
+ <path
422
+ :class="themeColor"
423
+ d="M784.831208 336.350365c-7.474453-14.948905-26.160584-18.686131-41.109489-7.474453-14.948905 11.211679-14.948905 29.89781-7.474453 41.109489 0 3.737226 3.737226 3.737226 7.474453 7.474453 37.372263 33.635036 56.058394 82.218978 56.058394 130.80292s-18.686131 97.167883-56.058394 130.802919c-11.211679 11.211679-11.211679 29.89781 0 41.109489 7.474453 3.737226 14.948905 7.474453 22.423357 7.474453s14.948905-3.737226 22.423358-7.474453c44.846715-44.846715 71.007299-108.379562 71.007299-171.912408s-26.160584-123.328467-74.744525-171.912409z"
424
+ fill="#606266"
425
+ p-id="12294"
426
+ ></path>
427
+ <path
428
+ :class="themeColor"
429
+ d="M702.61223 467.153285c-18.686131 0-29.89781 11.211679-29.897811 26.160584v29.89781c0 14.948905 11.211679 26.160584 26.160584 26.160584h3.737227c14.948905 0 26.160584-11.211679 26.160584-26.160584v-33.635037c3.737226-11.211679-11.211679-22.423358-26.160584-22.423357z"
430
+ fill="#606266"
431
+ p-id="12295"
432
+ ></path>
433
+ </svg>
402
434
  </span>
403
435
  </template>
404
436