openatc-components 0.3.98 → 0.3.100

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 (55) hide show
  1. package/config/index.js +1 -0
  2. package/package/kisscomps/components/BoardCard/BoardCard.vue +0 -11
  3. package/package/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +145 -46
  4. package/package/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
  5. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +7 -3
  6. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +5 -0
  7. package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +17 -12
  8. package/package/kisscomps/components/OverviewComponent/index.vue +28 -46
  9. package/package/kisscomps/components/PatternOptimize/PatternOptimize.vue +2 -11
  10. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +33 -92
  11. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +31 -13
  12. package/package/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +11 -9
  13. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +6 -2
  14. package/package/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +19 -6
  15. package/package/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +52 -0
  16. package/package/kisscomps/components/overView/index.vue +0 -23
  17. package/package/kisscomps/components/patternConfig/index.vue +1 -1
  18. package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +33 -13
  19. package/package/kisscomps/components/patternConfig/planContent.vue +3 -3
  20. package/package/kisscomps/components/patternList/patternList.vue +0 -11
  21. package/package/kissui.min.js +1 -1
  22. package/package.json +1 -1
  23. package/src/api/permission.js +33 -0
  24. package/src/i18n/language/en.js +3 -4
  25. package/src/i18n/language/zh.js +3 -4
  26. package/src/kisscomps/components/BoardCard/BoardCard.vue +0 -11
  27. package/src/kisscomps/components/DrawChannelization/drawsvg/iconSvg/motorwayIconSvg.vue +145 -46
  28. package/src/kisscomps/components/DrawChannelization/drawsvg/index.draw.vue +4 -4
  29. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +7 -3
  30. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +5 -0
  31. package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +17 -12
  32. package/src/kisscomps/components/OverviewComponent/index.vue +28 -46
  33. package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +2 -11
  34. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +33 -92
  35. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +31 -13
  36. package/src/kisscomps/components/SchemeConfig/lockingPhaselControlModal/index.vue +11 -9
  37. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/controlModelGroup.vue +6 -2
  38. package/src/kisscomps/components/SchemeConfig/manualControlModalNew/index.vue +19 -6
  39. package/src/kisscomps/components/SchemeConfig/utils/thirdPartypermission.js +52 -0
  40. package/src/kisscomps/components/overView/index.vue +0 -23
  41. package/src/kisscomps/components/patternConfig/index.vue +1 -1
  42. package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +33 -13
  43. package/src/kisscomps/components/patternConfig/planContent.vue +3 -3
  44. package/src/kisscomps/components/patternList/patternList.vue +0 -11
  45. package/src/views/intersection.vue +6 -7
  46. package/src/views/intersection2.vue +2 -2
  47. package/src/views/overView.vue +4 -17
  48. package/src/views/patternConfig.vue +38 -8
  49. package/src/views/schemeconfig.vue +4 -6
  50. package/static/apiconfig.json +10 -0
  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 +15 -5
  54. package/static/styles/light/theme/element-light.scss +1 -1
  55. package/static/styles/schemeconfig.scss +3 -6
@@ -212,8 +212,8 @@ export default {
212
212
  Detector: [], // 管理所有检测器
213
213
  DetectorChart: [], // 管理所有检测器统计图
214
214
  motorwayicon: '',
215
- IconLengh: 33,
216
- IconWdith: 109,
215
+ IconLengh: 60,
216
+ IconWdith: 134,
217
217
  textareaW: 200,
218
218
  textareaH: 100,
219
219
  pedW: 206,
@@ -389,8 +389,8 @@ export default {
389
389
  h: this.IconWdith,
390
390
  angle: 0
391
391
  }
392
- this.IconLengh = 33
393
- this.IconWdith = 109
392
+ this.IconLengh = 60
393
+ this.IconWdith = 134
394
394
  let Motorwaysitem = {
395
395
  index: this.index,
396
396
  id: this.motorid,
@@ -222,6 +222,10 @@ export default {
222
222
  type: Boolean,
223
223
  devault: true
224
224
  },
225
+ isShowMessage: {
226
+ type: Boolean,
227
+ default: true
228
+ },
225
229
  roadDirection: {
226
230
  type: String
227
231
  },
@@ -718,7 +722,7 @@ export default {
718
722
  }
719
723
  }
720
724
  msg = msg + ' - ' + commomMsg
721
- this.$message.error(msg)
725
+ this.isShowMessage && this.$message.error(msg)
722
726
  return
723
727
  }
724
728
  this.isLoaded = true
@@ -1040,10 +1044,10 @@ export default {
1040
1044
  let res = data.data
1041
1045
  if (!res.success) {
1042
1046
  if (res.code === '4003') {
1043
- this.$message.error(this.$t('openatccomponents.errorTip.devicenotonline'))
1047
+ this.isShowMessage && this.$message.error(this.$t('openatccomponents.errorTip.devicenotonline'))
1044
1048
  return
1045
1049
  }
1046
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
1050
+ this.isShowMessage && this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
1047
1051
  return
1048
1052
  }
1049
1053
  let channelList = res.data.data.channelList.filter(ele => ele.type !== undefined)
@@ -41,6 +41,7 @@
41
41
  :clickMode="clickMode"
42
42
  :isThirdSignal="isThirdSignal"
43
43
  :channelType="channelType"
44
+ :isShowMessage ="isShowMessage"
44
45
  @handleClickCrossIcon="handleClickCrossIcon" />
45
46
  </div>
46
47
  </div>
@@ -84,6 +85,10 @@ export default {
84
85
  type: Boolean,
85
86
  default: true
86
87
  },
88
+ isShowMessage: {
89
+ type: Boolean,
90
+ default: true
91
+ },
87
92
  roadDirection: {
88
93
  type: String,
89
94
  default: 'right'
@@ -23,6 +23,7 @@
23
23
  :stateName="stateName"
24
24
  :isShowMode="isShowMode"
25
25
  :isShowState="isShowState"
26
+ :isShowMessage ="isShowMessage"
26
27
  :isShowInterval="isShowInterval"
27
28
  @onSelectStages="onSelectStages"/>
28
29
  </div>
@@ -73,6 +74,10 @@ export default {
73
74
  type: Boolean,
74
75
  default: true
75
76
  },
77
+ isShowMessage: {
78
+ type: Boolean,
79
+ default: true
80
+ },
76
81
  isShowState: {
77
82
  type: Boolean,
78
83
  devault: false
@@ -140,7 +145,7 @@ export default {
140
145
  }
141
146
  }
142
147
  msg = msg + ' - ' + commomMsg
143
- this.$message.error(msg)
148
+ this.isShowMessage && this.$message.error(msg)
144
149
  if (this.isResend) {
145
150
  this.reSend()
146
151
  }
@@ -192,7 +197,7 @@ export default {
192
197
  // this.devStatus = 2
193
198
  this.clearPatternInterval() // 清除其他定时器
194
199
  this.clearVolumeInterval()
195
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale) + ' - ' + commomMsg)
200
+ this.isShowMessage && this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale) + ' - ' + commomMsg)
196
201
  if (this.isResend) {
197
202
  this.reSend()
198
203
  }
@@ -208,7 +213,7 @@ export default {
208
213
  }
209
214
  }
210
215
  msg = msg + ' - ' + commomMsg
211
- this.$message.error(msg)
216
+ this.isShowMessage && this.$message.error(msg)
212
217
  this.clearPatternInterval() // 清除其他定时器
213
218
  if (this.isResend) {
214
219
  this.reSend()
@@ -222,7 +227,7 @@ export default {
222
227
  this.controlData = this.controlFormat.handleGetData(param)
223
228
  this.$emit('getTscControl', data)
224
229
  }).catch(error => {
225
- this.$message.error(error)
230
+ this.isShowMessage && this.$message.error(error)
226
231
  console.log(error)
227
232
  })
228
233
  },
@@ -235,7 +240,7 @@ export default {
235
240
  if (!res.data.success) {
236
241
  let commomMsg = this.$t('openatccomponents.overview.signalID') + ': ' + this.AgentId
237
242
  let msg = getMessageByCode(res.data.code, this.$i18n.locale) + ', ' + commomMsg
238
- this.$message.error(msg)
243
+ this.isShowMessage && this.$message.error(msg)
239
244
  return
240
245
  }
241
246
  let devParams = res.data.data.jsonparam
@@ -295,7 +300,7 @@ export default {
295
300
  let success = data.data.data.content.success
296
301
  if (success !== 0) {
297
302
  let errormsg = 'openatccomponents.overview.putTscControlError' + success
298
- this.$message.error(this.$t(errormsg))
303
+ this.isShowMessage && this.$message.error(this.$t(errormsg))
299
304
  return
300
305
  }
301
306
  }
@@ -330,7 +335,7 @@ export default {
330
335
  }
331
336
  if (!data.data.success) {
332
337
  if (data.data.code === '4003') {
333
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
338
+ this.isShowMessage && this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
334
339
  return
335
340
  }
336
341
  let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
@@ -339,10 +344,10 @@ export default {
339
344
  let childErrorCode = data.data.data.errorCode
340
345
  if (childErrorCode) {
341
346
  let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
342
- this.$message.error(parrenterror + ',' + childerror)
347
+ this.isShowMessage && this.$message.error(parrenterror + ',' + childerror)
343
348
  }
344
349
  } else {
345
- this.$message.error(parrenterror)
350
+ this.isShowMessage && this.$message.error(parrenterror)
346
351
  }
347
352
  return
348
353
  }
@@ -359,7 +364,7 @@ export default {
359
364
  controlData: controlData
360
365
  }
361
366
  }).catch(error => {
362
- this.$message.error(error)
367
+ this.isShowMessage && this.$message.error(error)
363
368
  console.log(error)
364
369
  })
365
370
  },
@@ -368,10 +373,10 @@ export default {
368
373
  let res = data.data
369
374
  if (!res.success) {
370
375
  if (res.code === '4003') {
371
- this.$message.error(this.$t('openatccomponents.errorTip.devicenotonline'))
376
+ this.isShowMessage && this.$message.error(this.$t('openatccomponents.errorTip.devicenotonline'))
372
377
  return
373
378
  }
374
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
379
+ this.isShowMessage && this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
375
380
  return
376
381
  }
377
382
  this.phaseList = res.data.data.phaseList
@@ -11,22 +11,7 @@
11
11
  **/
12
12
  <template>
13
13
  <div class="container-main">
14
- <div v-if="onlyShowIntersectionMap" style="height: 100%;">
15
- <intersection-base-map
16
- v-if="curHomePage === 'Graphical'"
17
- ref="intersectionMap"
18
- :stateName="stateName"
19
- :crossStatusData="crossStatusData"
20
- :agentId="agentId"
21
- :roadDirection="roadDirection" />
22
- <channelization
23
- v-if="curHomePage === 'Channelization'"
24
- ref="channelization"
25
- :AgentId="agentId"
26
- :crossStatusData="crossStatusData"
27
- :detectorStatusData="detectorStatusData" />
28
- </div>
29
- <div v-if="!onlyShowIntersectionMap" :style="{'transform': `scale(${shrink})`, 'transform-origin': 'left top', 'height': '100%'}">
14
+ <div :style="{'transform': `scale(${shrink})`, 'transform-origin': 'left top', 'height': '100%'}">
30
15
  <div class="tuxingjiemian" v-show="curHomePage === 'Graphical' || curHomePage === 'Channelization'" :class="{'minifont': curBodyWidth <= 650}">
31
16
  <div class="tuxing-left" :class="{'changeWidth': graphicMode}" ref="tuxingLeft">
32
17
  <intersection-base-map
@@ -35,6 +20,8 @@
35
20
  :stateName="stateName"
36
21
  :crossStatusData="crossStatusData"
37
22
  :agentId="agentId"
23
+ :isShowMessage ="isShowMessage"
24
+ :isShowInterval="isShowInterval"
38
25
  :roadDirection="roadDirection" />
39
26
  <channelization
40
27
  v-if="curHomePage === 'Channelization'"
@@ -106,7 +93,7 @@
106
93
  </div>
107
94
  </div>
108
95
 
109
- <div ref="tuxingRight" class="tuxing-right">
96
+ <div ref="tuxingRight" class="tuxing-right" >
110
97
  <scheme-config
111
98
  ref="rightpanel"
112
99
  :statusData="crossStatusData"
@@ -116,7 +103,6 @@
116
103
  :agentId="agentId"
117
104
  :ip="ip"
118
105
  :platform="platform"
119
- :funcSort="FuncSort"
120
106
  :roadDirection="roadDirection"
121
107
  :isFromAtc="isfromatc" />
122
108
  </div>
@@ -147,18 +133,23 @@ export default {
147
133
  type: String,
148
134
  default: 'right'
149
135
  },
150
- isfromatc: {
136
+ isShowInterval: {
137
+ type: Boolean,
138
+ default: true
139
+ },
140
+ isShowMessage: {
151
141
  type: Boolean,
152
142
  default: true
153
143
  },
154
- onlyShowIntersectionMap: {
144
+ isfromatc: {
155
145
  type: Boolean,
156
- default: false
146
+ default: true
157
147
  }
158
148
  },
159
149
  data () {
160
150
  return {
161
151
  stateName: this.$t('openatccomponents.overview.offline'),
152
+ curBodyWidth: 1920,
162
153
  controlData: {},
163
154
  checked: false,
164
155
  overlap: [],
@@ -201,8 +192,7 @@ export default {
201
192
  commonHeight: undefined, // 左右侧面板的高度值
202
193
  graphicMode: false,
203
194
  resetcomponent: true,
204
- curHomePage: 'Graphical',
205
- FuncSort: 'allFunc'
195
+ curHomePage: 'Graphical'
206
196
  }
207
197
  },
208
198
  computed: {
@@ -336,10 +326,10 @@ export default {
336
326
  // let childErrorCode = data.data.data.errorCode
337
327
  // if (childErrorCode) {
338
328
  // let childerror = getMessageByCode(data.data.data.errorCode, _this.$i18n.locale)
339
- // _this.$message.error(parrenterror + ',' + childerror)
329
+ // _this.isShowMessage && _this.$message.error(parrenterror + ',' + childerror)
340
330
  // }
341
331
  // } else {
342
- // _this.$message.error(parrenterror)
332
+ // _this.isShowMessage && _this.$message.error(parrenterror)
343
333
  // }
344
334
  _this.curHomePage = 'Graphical'
345
335
  return
@@ -379,7 +369,7 @@ export default {
379
369
  let success = data.data.data.content.success
380
370
  if (success !== 0) {
381
371
  let errormsg = 'openatccomponents.overview.putTscControlError' + success
382
- this.$message.error(this.$t(errormsg))
372
+ this.isShowMessage && this.$message.error(this.$t(errormsg))
383
373
  return
384
374
  }
385
375
  }
@@ -389,10 +379,10 @@ export default {
389
379
  let childErrorCode = data.data.data.errorCode
390
380
  if (childErrorCode) {
391
381
  let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
392
- this.$message.error(parrenterror + ',' + childerror)
382
+ this.isShowMessage && this.$message.error(parrenterror + ',' + childerror)
393
383
  }
394
384
  } else {
395
- this.$message.error(parrenterror)
385
+ this.isShowMessage && this.$message.error(parrenterror)
396
386
  }
397
387
  if (this.isResend) {
398
388
  this.reSend()
@@ -454,7 +444,7 @@ export default {
454
444
  let success = data.data.data.content.success
455
445
  if (success !== 0) {
456
446
  let errormsg = 'openatccomponents.overview.putTscControlError' + success
457
- this.$message.error(this.$t(errormsg))
447
+ this.isShowMessage && this.$message.error(this.$t(errormsg))
458
448
  return
459
449
  }
460
450
  }
@@ -462,7 +452,7 @@ export default {
462
452
  // this.devStatus = 2
463
453
  this.clearPatternInterval() // 清除其他定时器
464
454
  this.clearVolumeInterval()
465
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
455
+ this.isShowMessage && this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
466
456
  if (this.isResend) {
467
457
  this.reSend()
468
458
  }
@@ -474,10 +464,10 @@ export default {
474
464
  let childErrorCode = data.data.data.errorCode
475
465
  if (childErrorCode) {
476
466
  let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
477
- this.$message.error(parrenterror + ',' + childerror)
467
+ this.isShowMessage && this.$message.error(parrenterror + ',' + childerror)
478
468
  }
479
469
  } else {
480
- this.$message.error(parrenterror)
470
+ this.isShowMessage && this.$message.error(parrenterror)
481
471
  }
482
472
  this.clearPatternInterval() // 清除其他定时器
483
473
  this.clearVolumeInterval()
@@ -497,7 +487,7 @@ export default {
497
487
  console.log('this.controlData', this.controlData)
498
488
  this.checkStage(this.controlData)
499
489
  }).catch(error => {
500
- // this.$message.error(error)
490
+ // this.isShowMessage && this.$message.error(error)
501
491
  console.log(error)
502
492
  })
503
493
  },
@@ -720,7 +710,7 @@ export default {
720
710
  queryDevParams () {
721
711
  queryDevice(this.AgentId).then(res => {
722
712
  if (!res.data.success) {
723
- this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
713
+ this.isShowMessage && this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
724
714
  return
725
715
  }
726
716
  let devParams = res.data.data.jsonparam
@@ -752,7 +742,7 @@ export default {
752
742
  let success = data.data.data.content.success
753
743
  if (success !== 0) {
754
744
  let errormsg = 'openatccomponents.overview.putTscControlError' + success
755
- this.$message.error(this.$t(errormsg))
745
+ this.isShowMessage && this.$message.error(this.$t(errormsg))
756
746
  return
757
747
  }
758
748
  }
@@ -762,10 +752,10 @@ export default {
762
752
  let childErrorCode = data.data.data.errorCode
763
753
  if (childErrorCode) {
764
754
  let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
765
- this.$message.error(parrenterror + ',' + childerror)
755
+ this.isShowMessage && this.$message.error(parrenterror + ',' + childerror)
766
756
  }
767
757
  } else {
768
- this.$message.error(parrenterror)
758
+ this.isShowMessage && this.$message.error(parrenterror)
769
759
  }
770
760
  return
771
761
  }
@@ -777,7 +767,7 @@ export default {
777
767
  getPlatform () {
778
768
  queryDevice(this.AgentId).then(res => {
779
769
  if (!res.data.success) {
780
- this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
770
+ this.isShowMessage && this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
781
771
  return
782
772
  }
783
773
  let devParams = res.data.data.jsonparam
@@ -789,14 +779,6 @@ export default {
789
779
  this.agentName = res.data.data.name
790
780
  }
791
781
  this.platform = res.data.data.platform
792
- let func = 'allFunc'
793
- if (this.platform === 'OpenATC') {
794
- func = 'allFunc'
795
- }
796
- if (this.platform === 'SCATS' || this.platform === 'HUATONG') {
797
- func = 'basicFunc'
798
- }
799
- this.FuncSort = func
800
782
  })
801
783
  }
802
784
  },
@@ -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="58px" Heights="58px" :Datas="styles" :Data="showStyle" :showlist="element.desc" :ISActiveMask="ISActiveMask" :MaskColor="MaskColor"></xdrdirselector>
53
+ <xdrdirselector Width="70px" Height="70px" Widths="50px" Heights="50px" :Data="styles" :showlist="element.desc" :ISActiveMask="ISActiveMask" :MaskColor="MaskColor"></xdrdirselector>
54
54
  </div>
55
55
  </el-tooltip>
56
56
  </el-col>
@@ -79,13 +79,9 @@ export default {
79
79
  },
80
80
  data () {
81
81
  return {
82
- showStyle: {
83
- left: '2px',
84
- top: '0px'
85
- },
86
82
  styles: {
87
83
  left: '1px',
88
- top: '0px'
84
+ top: '0'
89
85
  },
90
86
  typeOptions: [{
91
87
  value: 'flow-split-opt'
@@ -101,9 +97,6 @@ export default {
101
97
  type: String,
102
98
  default: 'Header'
103
99
  },
104
- id: {
105
- type: Number
106
- },
107
100
  rings: {
108
101
  type: Object
109
102
  },
@@ -216,7 +209,6 @@ export default {
216
209
  }
217
210
  }
218
211
  }
219
- this.$emit('optimizesucess', this.id)
220
212
  }
221
213
  }).catch(error => {
222
214
  console.log(error)
@@ -240,7 +232,6 @@ export default {
240
232
  }
241
233
  }
242
234
  }
243
- this.$emit('optimizesucess', this.id)
244
235
  }
245
236
  }).catch(error => {
246
237
  console.log(error)
@@ -14,9 +14,8 @@
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
- <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'}">
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'}">
20
19
  <el-tooltip placement="top-start" effect="light">
21
20
  <div slot="content">{{$t('openatccomponents.phase.phase')}}{{item.id}}:{{item.split}}</div>
22
21
  <div style="cursor:pointer;">
@@ -26,18 +25,7 @@
26
25
  </div>
27
26
  <div v-if="isShowTip" class="box" style="position: absolute; left:40px; width:40px; top: -1px;">
28
27
  <div class="ring-nums">{{$t('openatccomponents.phase.phase')}}{{item.id}}</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>
28
+ <div class="ring-nums">{{item.split}}</div>
41
29
  </div>
42
30
  </div>
43
31
  </el-tooltip>
@@ -53,8 +41,7 @@
53
41
  <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>
54
42
  <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>
55
43
  <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>
56
- </div>
57
- </draggable>
44
+ </div>
58
45
  </div>
59
46
  <div v-if="showBarrier">
60
47
  <div v-for="(item, index) in barrierList" :key="index + '1'">
@@ -113,7 +100,6 @@
113
100
  <script>
114
101
  // import patternwalksvg from '../PatternWalkSvg/PatternWalkSvg'
115
102
  import xdrdirselector from '../XRDDirSelector/XRDDirSelector'
116
- import draggable from 'vuedraggable'
117
103
  // import PatternWalkSvg from '../IntersectionMap/crossDirection/baseImg/PatternWalkSvg'
118
104
  import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
119
105
  import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
@@ -121,7 +107,6 @@ export default {
121
107
  name: 'pattern-list',
122
108
  components: {
123
109
  // patternwalksvg,
124
- draggable,
125
110
  xdrdirselector
126
111
  },
127
112
  data () {
@@ -129,7 +114,6 @@ export default {
129
114
  barrierHeight: '',
130
115
  stageCycle: '',
131
116
  barrierList: [],
132
- barrierArr: [],
133
117
  newCycle: this.cycles,
134
118
  patternIds: this.patternId,
135
119
  newPatterns: [],
@@ -158,10 +142,6 @@ export default {
158
142
  stagesChange: {
159
143
  type: Array
160
144
  },
161
- isMove: {
162
- type: Boolean,
163
- default: true
164
- },
165
145
  controlPhase: {
166
146
  type: Object
167
147
  },
@@ -363,11 +343,11 @@ export default {
363
343
  handler: function (val, oldVal) {
364
344
  this.handleBarrierHeight() // 计算屏障高度
365
345
  if (this.patternStatusList && this.newCycle) {
366
- // setTimeout(() => {
367
- this.handleCurrentChange(this.patternStatusList)
346
+ setTimeout(() => {
347
+ this.handleCurrentChange(this.patternStatusList)
348
+ this.handleBarrierHeight()
349
+ }, 10)
368
350
  this.handleBarrierHeight()
369
- // }, 10)
370
- // this.handleBarrierHeight()
371
351
  }
372
352
  },
373
353
  // 深度观察监听
@@ -395,60 +375,6 @@ export default {
395
375
  }
396
376
  },
397
377
  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
- },
452
378
  getPed (data) {
453
379
  let ped = []
454
380
  for (let stg of data) {
@@ -1253,7 +1179,6 @@ export default {
1253
1179
  }
1254
1180
  }
1255
1181
  let resArr = ringArr.map(item => item.data)
1256
- this.barrierArr = resArr
1257
1182
  let ringTeam = this.step1(this.phaseList, resArr)
1258
1183
  let ringTeams = ringTeam.filter(item => item.length !== 0)
1259
1184
  if (this.patternList) {
@@ -1342,16 +1267,30 @@ export default {
1342
1267
  }
1343
1268
  obj.split = split
1344
1269
  obj.cycle = cycle
1345
- if (ring.sum) {
1346
- obj.sum = ring.sum
1347
- obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100) + '%'
1270
+ const isZero = split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen
1271
+ const allAdd = split + currPhase.redclear + currPhase.yellow + currPhase.flashgreen
1272
+ if (isZero <= 0) {
1273
+ if (ring.sum) {
1274
+ obj.sum = ring.sum
1275
+ obj.redWidth = ((((currPhase.redclear + ring.sum) / allAdd) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle)) * 100) + '%'
1276
+ } else {
1277
+ obj.redWidth = (((currPhase.redclear / allAdd) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle)) * 100) + '%'
1278
+ }
1279
+ obj.greenWidth = (((split - (currPhase.redclear / allAdd) - (currPhase.yellow / allAdd) - (currPhase.flashgreen / allAdd)) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle)) * 100) + '%'
1280
+ obj.yellowWidth = (((currPhase.yellow / allAdd) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle)) * 100) + '%'
1281
+ obj.flashgreen = (((currPhase.flashgreen / allAdd) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle)) * 100) + '%'
1348
1282
  } else {
1349
- obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100) + '%'
1283
+ if (ring.sum) {
1284
+ obj.sum = ring.sum
1285
+ obj.redWidth = ((currPhase.redclear + ring.sum) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
1286
+ } else {
1287
+ obj.redWidth = (currPhase.redclear / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
1288
+ }
1289
+ obj.mode = ring.mode
1290
+ obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
1291
+ obj.flashgreen = (currPhase.flashgreen / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
1292
+ obj.yellowWidth = (currPhase.yellow / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
1350
1293
  }
1351
- obj.mode = ring.mode
1352
- obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / (this.max ? this.max : cycle) * 100) + '%'
1353
- obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100) + '%'
1354
- obj.yellowWidth = (currPhase.yellow / (this.max ? this.max : cycle) * 100) + '%'
1355
1294
  // 忽略相位不显示
1356
1295
  // let mode = ring.mode
1357
1296
  // if (mode !== 7) { // 忽略相位不显示
@@ -1517,7 +1456,9 @@ export default {
1517
1456
  newMin.push(minNum)
1518
1457
  let newmaxNum = Math.max.apply(Math, newMax)// 每组最大值
1519
1458
  let newminNum = Math.min.apply(Math, newMin)
1520
- this.newCycle = newmaxNum + newminNum
1459
+ if (newArr.length > 1) {
1460
+ this.newCycle = newmaxNum + newminNum
1461
+ }
1521
1462
  if (newmaxNum === newminNum) {
1522
1463
  this.max = newmaxNum + newminNum
1523
1464
  pattern.map(d => {