openatc-components 0.0.23 → 0.0.26

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 (78) hide show
  1. package/config/index.js +1 -1
  2. package/package/kisscomps/components/BoardCard/BoardCard.vue +4 -0
  3. package/package/kisscomps/components/ExpendConfig/ExpendConfig.vue +93 -0
  4. package/package/kisscomps/components/ExpendConfig/index.js +2 -0
  5. package/package/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +22 -0
  6. package/package/kisscomps/components/IntersectionMap/intersectionmap.vue +16 -12
  7. package/package/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +244 -4
  8. package/package/kisscomps/components/KanBan/index.js +2 -0
  9. package/package/kisscomps/components/KanBan/kanban.vue +219 -0
  10. package/package/kisscomps/components/OverLap/OverLap.vue +11 -1
  11. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +14 -3
  12. package/package/kisscomps/components/PhaseMarker/index.js +6 -0
  13. package/package/kisscomps/components/PhaseMarker/phasemarker.vue +215 -0
  14. package/package/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -0
  15. package/package/kisscomps/components/PhaseMarker/svg/phase.vue +60 -0
  16. package/package/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -0
  17. package/package/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -0
  18. package/package/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -0
  19. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +30 -3
  20. package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +21 -2
  21. package/package/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +5 -47
  22. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1304 -0
  23. package/package/kisscomps/components/StageBord/StageBord.vue +242 -0
  24. package/package/kisscomps/components/StageBord/index.js +2 -0
  25. package/package/kisscomps/components/StageStatus/StageStatus.vue +4 -2
  26. package/package/kisscomps/components/Stages/index.vue +86 -0
  27. package/package/kisscomps/components/overView/index.vue +656 -0
  28. package/package/kisscomps/components/patternList/patternList.vue +4 -0
  29. package/package/kisscomps/index.js +15 -1
  30. package/package/kissui.min.js +1 -1
  31. package/package.json +2 -2
  32. package/src/api/authapi.js +1 -1
  33. package/src/i18n/language/en.js +4 -1
  34. package/src/i18n/language/zh.js +4 -1
  35. package/src/icons/svg/tentativeplan.svg +33 -0
  36. package/src/kisscomps/components/BoardCard/BoardCard.vue +4 -0
  37. package/src/kisscomps/components/ExpendConfig/ExpendConfig.vue +93 -0
  38. package/src/kisscomps/components/ExpendConfig/index.js +2 -0
  39. package/src/kisscomps/components/IntersectionMap/crossDirection/crossDiagram.vue +22 -0
  40. package/src/kisscomps/components/IntersectionMap/intersectionmap.vue +16 -12
  41. package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +244 -4
  42. package/src/kisscomps/components/KanBan/index.js +2 -0
  43. package/src/kisscomps/components/KanBan/kanban.vue +219 -0
  44. package/src/kisscomps/components/OverLap/OverLap.vue +11 -1
  45. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +14 -3
  46. package/src/kisscomps/components/PhaseMarker/index.js +6 -0
  47. package/src/kisscomps/components/PhaseMarker/phasemarker.vue +215 -0
  48. package/src/kisscomps/components/PhaseMarker/svg/patternSvg.vue +121 -0
  49. package/src/kisscomps/components/PhaseMarker/svg/phase.vue +60 -0
  50. package/src/kisscomps/components/PhaseMarker/svg/phaseCount.vue +62 -0
  51. package/src/kisscomps/components/PhaseMarker/svg/phaseCountCycle.vue +62 -0
  52. package/src/kisscomps/components/PhaseMarker/svg/phaseSvg.vue +117 -0
  53. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +30 -3
  54. package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +21 -2
  55. package/src/kisscomps/components/SchemeConfig/realtimeStatusModal/index.vue +5 -47
  56. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1304 -0
  57. package/src/kisscomps/components/StageBord/StageBord.vue +242 -0
  58. package/src/kisscomps/components/StageBord/index.js +2 -0
  59. package/src/kisscomps/components/StageStatus/StageStatus.vue +4 -2
  60. package/src/kisscomps/components/Stages/index.vue +86 -0
  61. package/src/kisscomps/components/overView/index.vue +656 -0
  62. package/src/kisscomps/components/patternList/patternList.vue +4 -0
  63. package/src/kisscomps/index.js +15 -1
  64. package/src/lib/publicjs/KissApi.js +2 -0
  65. package/src/main.js +2 -0
  66. package/src/router/index.js +15 -8
  67. package/src/utils/ControlFormat.js +68 -0
  68. package/src/utils/RingDataModel.js +1 -1
  69. package/src/utils/auth.js +8 -0
  70. package/src/views/home.vue +16 -1
  71. package/src/views/intersection.vue +188 -6
  72. package/src/views/overView.vue +33 -0
  73. package/src/views/schemeconfig.vue +6 -5
  74. package/static/styles/common.scss +2 -0
  75. package/static/styles/intersection.scss +18 -0
  76. package/static/styles/overview.scss +372 -0
  77. package/static/styles/schemeconfig.scss +99 -1
  78. package/static/styles/stages.scss +65 -0
@@ -0,0 +1,1304 @@
1
+ <template>
2
+ <div class="tentativeplan-control">
3
+ <div class="title" style="margin-bottom: 18px;">{{$t('openatccomponents.overview.tentativeplan')}}</div>
4
+ <el-row>
5
+ <el-col :span="12">
6
+ <el-form
7
+ ref="manual"
8
+ label-position="left"
9
+ :model="manualInfo"
10
+ label-width="100px">
11
+ <el-form-item
12
+ :label="$t('openatccomponents.overview.patternid') + ':'"
13
+ prop="count">
14
+ <el-select @change="selectPattern()" v-model="manualInfo.tempPatternid" class="col-inner" size="small" :placeholder="$t('openatccomponents.common.select')">
15
+ <el-option
16
+ v-for="item in patternSelect"
17
+ :key="item.value"
18
+ :value="item.value">
19
+ </el-option>
20
+ </el-select>
21
+ <!-- <el-input v-model="manualInfo.tempDuration" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input> -->
22
+ </el-form-item>
23
+ <el-form-item
24
+ :label="$t('openatccomponents.overview.delay') + ':'"
25
+ prop="intersection">
26
+ <el-input v-model="manualInfo.tempDelay" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input>
27
+ </el-form-item>
28
+ </el-form>
29
+ </el-col>
30
+ <el-col :span="12">
31
+ <el-form
32
+ ref="manual"
33
+ label-position="left"
34
+ :model="manualInfo"
35
+ label-width="100px">
36
+ <el-form-item
37
+ :label="$t('openatccomponents.overview.patternoffset') + ':'"
38
+ prop="count">
39
+ <el-input v-model="offset" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input>
40
+ </el-form-item>
41
+ <el-form-item
42
+ :label="$t('openatccomponents.overview.duration') + ':'"
43
+ prop="intersection">
44
+ <el-input v-model="manualInfo.duration" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input>
45
+ </el-form-item>
46
+ </el-form>
47
+ </el-col>
48
+ </el-row>
49
+ <el-row>
50
+ <div class="title" style="margin-top:18px; margin-bottom:10px">{{$t('openatccomponents.overview.patternstate')}}:
51
+ <span>({{$t('openatccomponents.overview.cycle')}}: {{patternOne.length===0?allPatternList[0].cycle:patternOne[0].cycle}} {{$t('openatccomponents.overview.patternoffset')}}: {{controlData.patternoffset}})</span>
52
+ </div>
53
+ <stage-status
54
+ :patternStatusList="patternOne.length===0?allPatternList[0].rings:patternOne[0].rings"
55
+ >
56
+ </stage-status>
57
+ <pattern-list
58
+ :patternList="patternOne.length===0?allPatternList:patternOne"
59
+ :patternStatusList="patternOne.length===0?allPatternList[0].rings:patternOne[0].rings"
60
+ :cycles="patternOne.length===0?allPatternList[0].cycle:patternOne[0].cycle"
61
+ :phaseList="phaseList">
62
+ </pattern-list>
63
+ </el-row>
64
+ <el-row>
65
+ <el-tabs v-model="activeList" type="card">
66
+ <el-tab-pane :label="$t('openatccomponents.pattern.ringConfig')" name="ring">
67
+ <!-- <el-row :gutter="20"> -->
68
+ <!-- <el-col :span="12" > -->
69
+ <!-- <div class="components-container board" > -->
70
+ <div style="width: 100%; overflow: hidden;margin-top: 20px;">
71
+ <kan-ban v-for="n in ringCount"
72
+ :key="n" class="closephasekanban"
73
+ :index="n"
74
+ :options="patternOne.length===0?allPatternList[0].options:patternOne[0].options"
75
+ :list="patternOne.length===0?allPatternList[0].rings[n-1]:patternOne[0].rings[n-1]"
76
+ :phaseList="phaseList"
77
+ :header-text="$t('openatccomponents.pattern.ring')+n"
78
+ @handleSplit="handleSplit">
79
+ </kan-ban>
80
+ </div>
81
+ <!-- </el-col> -->
82
+ <!-- </el-row> -->
83
+ </el-tab-pane>
84
+ <el-tab-pane :label="$t('openatccomponents.pattern.stageConfig')" name="kanban">
85
+ <el-scrollbar :vertical="false">
86
+ <div class="stage-panel-contener">
87
+ <stage-board v-for="(stage,index) in patternOne.length===0?allPatternList[0].stagesList:patternOne[0].stagesList"
88
+ class="closephasekanban"
89
+ :key="index"
90
+ :stage="stage"
91
+ :options="patternOne.length===0?allPatternList[0].options:patternOne[0].options"
92
+ :stageInfo="patternOne.length===0?allPatternList[0].stagesList:patternOne[0].stagesList"
93
+ :coordphaseOption="coordphaseOption"
94
+ :subIndex="index"
95
+ @onStageSplitChange="onStageSplitChange"
96
+ @stageSplitChange="stageSplitChange"
97
+ @onStageDelaystartChange="onStageDelaystartChange"
98
+ @onStageAdvanceendChange="onStageAdvanceendChange"
99
+ >
100
+ </stage-board>
101
+ </div>
102
+ </el-scrollbar>
103
+ </el-tab-pane>
104
+ <el-tab-pane :label="$t('openatccomponents.pattern.parameters')" name="parame">
105
+ <el-row>
106
+ <!-- <el-col :span="12"> -->
107
+ <expend-config
108
+ v-for="(j,index) in ringCounts"
109
+ :key="index"
110
+ class="closephasekanban"
111
+ :options="patternOne.length===0?allPatternList[0].options:patternOne[0].options"
112
+ :header-text="$t('openatccomponents.pattern.ring')+j"
113
+ :list="patternOne.length===0?allPatternList[0].rings[j-1]:patternOne[0].rings[j-1]"
114
+ >
115
+ </expend-config>
116
+ <!-- </el-col> -->
117
+ <!-- <el-col :span="12"> -->
118
+ <el-row style="width: 60%;margin: 10px auto;">
119
+ {{$t('openatccomponents.pattern.forbiddenstage')}}
120
+ <el-input class="stage-value" size="small" v-model="forbiddenstage"></el-input>
121
+ </el-row>
122
+ <el-row style="width: 60%;margin: 10px auto;">
123
+ {{$t('openatccomponents.pattern.screenstage')}}
124
+ <el-input class="stage-value" size="small" v-model="screenstage"></el-input>
125
+ </el-row>
126
+ <el-row style="width: 60%;margin: 10px auto;">
127
+ <!-- <el-col :span="8"> -->
128
+ {{$t('openatccomponents.pattern.coordinatestage')}}
129
+ <el-input class="stage-value" size="small" v-model="coordinatestage"></el-input>
130
+ <!-- </el-col> -->
131
+ </el-row>
132
+ <!-- </el-col> -->
133
+ </el-row>
134
+ </el-tab-pane>
135
+ <el-tab-pane :label="$t('openatccomponents.pattern.overLap')" name="overlap">
136
+ <el-row :gutter="20">
137
+ <el-col :span="24" >
138
+ <over-lap
139
+ :stageList="patternOne.length===0?allPatternList[0].stagesList:patternOne[0].stagesList"
140
+ :overlap="overlap"
141
+ :checked="true"
142
+ :tentative="true"
143
+ :cycle="patternOne.length===0?allPatternList[0].cycle:patternOne[0].cycle"
144
+ >
145
+ </over-lap>
146
+ </el-col>
147
+ </el-row>
148
+ </el-tab-pane>
149
+ </el-tabs>
150
+ </el-row>
151
+ <div class="footer">
152
+ <el-button @click="handleClose()">{{$t('openatccomponents.button.Back')}}</el-button>
153
+ <el-button type="primary" @click="handleManualControl()">{{$t('openatccomponents.overview.implement')}}</el-button>
154
+ </div>
155
+ </div>
156
+ </template>
157
+
158
+ <script>
159
+ export default {
160
+ name: 'tentativeplancontrol',
161
+ props: {
162
+ controlData: {
163
+ type: Object
164
+ },
165
+ phaseList: {
166
+ type: Array
167
+ },
168
+ overlap: {
169
+ type: Array
170
+ },
171
+ allPatternList: {
172
+ type: Array
173
+ },
174
+ // phaseRings: {
175
+ // type: Array
176
+ // }
177
+ // planPattern: {
178
+ // type: Array
179
+ // }
180
+ patternSelect: {
181
+ type: Array
182
+ }
183
+ },
184
+ computed: {
185
+ offset () {
186
+ return this.patternOne.length === 0 ? 0 : this.patternOne[0].offset
187
+ },
188
+ forbiddenstage () {
189
+ return this.patternOne.length === 0 ? this.allPatternList[0].forbiddenstage : this.patternOne[0].forbiddenstage
190
+ },
191
+ screenstage () {
192
+ return this.patternOne.length === 0 ? this.allPatternList[0].screenstage : this.patternOne[0].screenstage
193
+ },
194
+ coordinatestage () {
195
+ return this.patternOne.length === 0 ? this.allPatternList[0].coordinatestage : this.patternOne[0].coordinatestage
196
+ }
197
+ },
198
+ data () {
199
+ return {
200
+ // patternSelect: [{
201
+ // value: 1
202
+ // }, {
203
+ // value: 2
204
+ // }, {
205
+ // value: 3
206
+ // }],
207
+ options: {
208
+ group: 'pattern'
209
+ },
210
+ // overlap: [
211
+ // {
212
+ // 'id': 1,
213
+ // 'desc': '东方向南半测行人相位',
214
+ // 'includedphases': [
215
+ // 1,
216
+ // 8
217
+ // ],
218
+ // 'peddirection': [
219
+ // 6
220
+ // ]
221
+ // },
222
+ // {
223
+ // 'id': 2,
224
+ // 'desc': '东方向北半测行人相位',
225
+ // 'includedphases': [
226
+ // 1,
227
+ // 2
228
+ // ],
229
+ // 'peddirection': [
230
+ // 5
231
+ // ]
232
+ // },
233
+ // {
234
+ // 'id': 3,
235
+ // 'desc': '西方向南半测行人相位',
236
+ // 'includedphases': [
237
+ // 5,
238
+ // 6
239
+ // ],
240
+ // 'peddirection': [
241
+ // 8
242
+ // ]
243
+ // },
244
+ // {
245
+ // 'id': 4,
246
+ // 'desc': '西方向北半测行人相位',
247
+ // 'includedphases': [
248
+ // 4,
249
+ // 5
250
+ // ],
251
+ // 'peddirection': [
252
+ // 7
253
+ // ]
254
+ // },
255
+ // {
256
+ // 'id': 5,
257
+ // 'desc': '南方向东半测行人相位',
258
+ // 'includedphases': [
259
+ // 7,
260
+ // 8
261
+ // ],
262
+ // 'peddirection': [
263
+ // 10
264
+ // ]
265
+ // },
266
+ // {
267
+ // 'id': 6,
268
+ // 'desc': '南方向西半测行人相位',
269
+ // 'includedphases': [
270
+ // 6,
271
+ // 7
272
+ // ],
273
+ // 'peddirection': [
274
+ // 9
275
+ // ]
276
+ // },
277
+ // {
278
+ // 'id': 7,
279
+ // 'desc': '北方向东半测行人相位',
280
+ // 'includedphases': [
281
+ // 2,
282
+ // 3
283
+ // ],
284
+ // 'peddirection': [
285
+ // 12
286
+ // ]
287
+ // },
288
+ // {
289
+ // 'id': 8,
290
+ // 'desc': '北方向西半测行人相位',
291
+ // 'includedphases': [
292
+ // 3,
293
+ // 4
294
+ // ],
295
+ // 'peddirection': [
296
+ // 11
297
+ // ]
298
+ // }
299
+ // ],
300
+ activeList: 'ring',
301
+ ringCount: 1,
302
+ ringCounts: 1,
303
+ coordphaseOption: [],
304
+ patternOne: [],
305
+ // planPattern: [
306
+ // [
307
+ // {
308
+ // 'name': 'Phase 1',
309
+ // 'desc': [
310
+ // {
311
+ // 'id': 13,
312
+ // 'color': '#454545'
313
+ // }
314
+ // ],
315
+ // 'id': 1,
316
+ // 'value': 30,
317
+ // 'mode': 2,
318
+ // 'options': [],
319
+ // 'delaystart': 0,
320
+ // 'advanceend': 0
321
+ // },
322
+ // {
323
+ // 'name': 'Phase 2',
324
+ // 'desc': [
325
+ // {
326
+ // 'id': 3,
327
+ // 'color': '#454545'
328
+ // },
329
+ // {
330
+ // 'id': 12,
331
+ // 'color': '#454545'
332
+ // }
333
+ // ],
334
+ // 'id': 2,
335
+ // 'value': 30,
336
+ // 'mode': 2,
337
+ // 'options': [],
338
+ // 'delaystart': 0,
339
+ // 'advanceend': 0
340
+ // },
341
+ // {
342
+ // 'name': 'Phase 3',
343
+ // 'desc': [
344
+ // {
345
+ // 'id': 1,
346
+ // 'color': '#454545'
347
+ // }
348
+ // ],
349
+ // 'id': 3,
350
+ // 'value': 30,
351
+ // 'mode': 2,
352
+ // 'options': [],
353
+ // 'delaystart': 0,
354
+ // 'advanceend': 0
355
+ // },
356
+ // {
357
+ // 'name': 'Phase 4',
358
+ // 'desc': [
359
+ // {
360
+ // 'id': 6,
361
+ // 'color': '#454545'
362
+ // },
363
+ // {
364
+ // 'id': 8,
365
+ // 'color': '#454545'
366
+ // }
367
+ // ],
368
+ // 'id': 4,
369
+ // 'value': 30,
370
+ // 'mode': 2,
371
+ // 'options': [],
372
+ // 'delaystart': 0,
373
+ // 'advanceend': 0
374
+ // }
375
+ // ],
376
+ // [
377
+ // {
378
+ // 'name': 'Phase 5',
379
+ // 'desc': [
380
+ // {
381
+ // 'id': 9,
382
+ // 'color': '#454545'
383
+ // }
384
+ // ],
385
+ // 'id': 5,
386
+ // 'value': 30,
387
+ // 'mode': 2,
388
+ // 'options': [],
389
+ // 'delaystart': 0,
390
+ // 'advanceend': 0
391
+ // },
392
+ // {
393
+ // 'name': 'Phase 6',
394
+ // 'desc': [
395
+ // {
396
+ // 'id': 14,
397
+ // 'color': '#454545'
398
+ // },
399
+ // {
400
+ // 'id': 16,
401
+ // 'color': '#454545'
402
+ // }
403
+ // ],
404
+ // 'id': 6,
405
+ // 'value': 30,
406
+ // 'mode': 2,
407
+ // 'options': [],
408
+ // 'delaystart': 0,
409
+ // 'advanceend': 0
410
+ // },
411
+ // {
412
+ // 'name': 'Phase 7',
413
+ // 'desc': [],
414
+ // 'id': 7,
415
+ // 'value': 30,
416
+ // 'mode': 2,
417
+ // 'options': [],
418
+ // 'delaystart': 0,
419
+ // 'advanceend': 0
420
+ // },
421
+ // {
422
+ // 'name': 'Phase 8',
423
+ // 'desc': [
424
+ // {
425
+ // 'id': 2,
426
+ // 'color': '#454545'
427
+ // },
428
+ // {
429
+ // 'id': 4,
430
+ // 'color': '#454545'
431
+ // }
432
+ // ],
433
+ // 'id': 8,
434
+ // 'value': 30,
435
+ // 'mode': 2,
436
+ // 'options': [],
437
+ // 'delaystart': 0,
438
+ // 'advanceend': 0
439
+ // }
440
+ // ],
441
+ // [],
442
+ // []
443
+ // ],
444
+ // allPatternList: [
445
+ // {
446
+ // 'id': 1,
447
+ // 'desc': '',
448
+ // 'offset': 10,
449
+ // 'cycle': 120,
450
+ // 'rings': [
451
+ // [
452
+ // {
453
+ // 'name': 'phase1',
454
+ // 'id': 1,
455
+ // 'value': 30,
456
+ // 'mode': 2,
457
+ // 'options': [],
458
+ // 'minSplit': 20,
459
+ // 'desc': [
460
+ // {
461
+ // 'id': 13,
462
+ // 'color': '#454545'
463
+ // }
464
+ // ]
465
+ // },
466
+ // {
467
+ // 'name': 'phase2',
468
+ // 'id': 2,
469
+ // 'value': 30,
470
+ // 'mode': 2,
471
+ // 'options': [],
472
+ // 'minSplit': 20,
473
+ // 'desc': [
474
+ // {
475
+ // 'id': 10,
476
+ // 'color': '#454545'
477
+ // },
478
+ // {
479
+ // 'id': 12,
480
+ // 'color': '#454545'
481
+ // }
482
+ // ]
483
+ // },
484
+ // {
485
+ // 'name': 'phase3',
486
+ // 'id': 3,
487
+ // 'value': 30,
488
+ // 'mode': 2,
489
+ // 'options': [],
490
+ // 'minSplit': 20,
491
+ // 'desc': [
492
+ // {
493
+ // 'id': 1,
494
+ // 'color': '#454545'
495
+ // }
496
+ // ]
497
+ // },
498
+ // {
499
+ // 'name': 'phase4',
500
+ // 'id': 4,
501
+ // 'value': 30,
502
+ // 'mode': 2,
503
+ // 'options': [],
504
+ // 'minSplit': 20,
505
+ // 'desc': [
506
+ // {
507
+ // 'id': 6,
508
+ // 'color': '#454545'
509
+ // },
510
+ // {
511
+ // 'id': 8,
512
+ // 'color': '#454545'
513
+ // }
514
+ // ]
515
+ // }
516
+ // ],
517
+ // [
518
+ // {
519
+ // 'name': 'phase5',
520
+ // 'id': 5,
521
+ // 'value': 30,
522
+ // 'mode': 2,
523
+ // 'options': [],
524
+ // 'minSplit': 20,
525
+ // 'desc': [
526
+ // {
527
+ // 'id': 9,
528
+ // 'color': '#454545'
529
+ // }
530
+ // ]
531
+ // },
532
+ // {
533
+ // 'name': 'phase6',
534
+ // 'id': 6,
535
+ // 'value': 30,
536
+ // 'mode': 2,
537
+ // 'options': [],
538
+ // 'minSplit': 20,
539
+ // 'desc': [
540
+ // {
541
+ // 'id': 14,
542
+ // 'color': '#454545'
543
+ // },
544
+ // {
545
+ // 'id': 16,
546
+ // 'color': '#454545'
547
+ // }
548
+ // ]
549
+ // },
550
+ // {
551
+ // 'name': 'phase7',
552
+ // 'id': 7,
553
+ // 'value': 30,
554
+ // 'mode': 2,
555
+ // 'options': [],
556
+ // 'minSplit': 20,
557
+ // 'desc': [
558
+ // {
559
+ // 'id': 5,
560
+ // 'color': '#454545'
561
+ // }
562
+ // ]
563
+ // },
564
+ // {
565
+ // 'name': 'phase8',
566
+ // 'id': 8,
567
+ // 'value': 30,
568
+ // 'mode': 2,
569
+ // 'options': [],
570
+ // 'minSplit': 20,
571
+ // 'desc': [
572
+ // {
573
+ // 'id': 2,
574
+ // 'color': '#454545'
575
+ // },
576
+ // {
577
+ // 'id': 4,
578
+ // 'color': '#454545'
579
+ // }
580
+ // ]
581
+ // }
582
+ // ],
583
+ // [],
584
+ // []
585
+ // ],
586
+ // 'barriers': [
587
+ // {
588
+ // 'barrier': 1,
589
+ // 'length': 60,
590
+ // 'items': [
591
+ // {
592
+ // 'ring': 2,
593
+ // 'data': [
594
+ // 5,
595
+ // 6
596
+ // ]
597
+ // },
598
+ // {
599
+ // 'ring': 1,
600
+ // 'data': [
601
+ // 1,
602
+ // 2
603
+ // ]
604
+ // }
605
+ // ]
606
+ // },
607
+ // {
608
+ // 'barrier': 2,
609
+ // 'length': 60,
610
+ // 'items': [
611
+ // {
612
+ // 'ring': 2,
613
+ // 'data': [
614
+ // 7,
615
+ // 8
616
+ // ]
617
+ // },
618
+ // {
619
+ // 'ring': 1,
620
+ // 'data': [
621
+ // 3,
622
+ // 4
623
+ // ]
624
+ // }
625
+ // ]
626
+ // }
627
+ // ],
628
+ // 'stagesList': [
629
+ // {
630
+ // 'key': 0,
631
+ // 'split': 30,
632
+ // 'stages': [
633
+ // 1,
634
+ // 5
635
+ // ]
636
+ // },
637
+ // {
638
+ // 'key': 1,
639
+ // 'split': 30,
640
+ // 'stages': [
641
+ // 2,
642
+ // 6
643
+ // ]
644
+ // },
645
+ // {
646
+ // 'key': 2,
647
+ // 'split': 30,
648
+ // 'stages': [
649
+ // 3,
650
+ // 7
651
+ // ]
652
+ // },
653
+ // {
654
+ // 'key': 3,
655
+ // 'split': 30,
656
+ // 'stages': [
657
+ // 4,
658
+ // 8
659
+ // ]
660
+ // }
661
+ // ],
662
+ // 'stages': [
663
+ // [
664
+ // 1,
665
+ // 5
666
+ // ],
667
+ // [
668
+ // 2,
669
+ // 6
670
+ // ],
671
+ // [
672
+ // 3,
673
+ // 7
674
+ // ],
675
+ // [
676
+ // 4,
677
+ // 8
678
+ // ]
679
+ // ]
680
+ // },
681
+ // {
682
+ // 'id': 2,
683
+ // 'desc': '方案2',
684
+ // 'offset': 0,
685
+ // 'cycle': 110,
686
+ // 'rings': [
687
+ // [
688
+ // {
689
+ // 'name': 'phase1',
690
+ // 'id': 1,
691
+ // 'value': 20,
692
+ // 'mode': 2,
693
+ // 'options': [
694
+ // 0,
695
+ // 0,
696
+ // 0
697
+ // ],
698
+ // 'minSplit': 13,
699
+ // 'delaystart': 0,
700
+ // 'advanceend': 0
701
+ // },
702
+ // {
703
+ // 'name': 'phase2',
704
+ // 'id': 2,
705
+ // 'value': 35,
706
+ // 'mode': 2,
707
+ // 'options': [
708
+ // 0,
709
+ // 0,
710
+ // 0
711
+ // ],
712
+ // 'minSplit': 13,
713
+ // 'delaystart': 0,
714
+ // 'advanceend': 0
715
+ // },
716
+ // {
717
+ // 'name': 'phase3',
718
+ // 'id': 3,
719
+ // 'value': 30,
720
+ // 'mode': 2,
721
+ // 'options': [
722
+ // 0,
723
+ // 0,
724
+ // 0
725
+ // ],
726
+ // 'minSplit': 13,
727
+ // 'delaystart': 0,
728
+ // 'advanceend': 0
729
+ // },
730
+ // {
731
+ // 'name': 'phase4',
732
+ // 'id': 4,
733
+ // 'value': 25,
734
+ // 'mode': 2,
735
+ // 'options': [
736
+ // 0,
737
+ // 0,
738
+ // 0
739
+ // ],
740
+ // 'minSplit': 13,
741
+ // 'delaystart': 0,
742
+ // 'advanceend': 0
743
+ // }
744
+ // ],
745
+ // [
746
+ // {
747
+ // 'name': 'Phase 5',
748
+ // 'id': 5,
749
+ // 'value': 27,
750
+ // 'mode': 2,
751
+ // 'options': [
752
+ // 0,
753
+ // 0,
754
+ // 0
755
+ // ],
756
+ // 'minSplit': 13,
757
+ // 'delaystart': 0,
758
+ // 'advanceend': 0
759
+ // },
760
+ // {
761
+ // 'name': 'Phase 6',
762
+ // 'id': 6,
763
+ // 'value': 28,
764
+ // 'mode': 2,
765
+ // 'options': [
766
+ // 0,
767
+ // 0,
768
+ // 0
769
+ // ],
770
+ // 'minSplit': 13,
771
+ // 'delaystart': 0,
772
+ // 'advanceend': 0
773
+ // },
774
+ // {
775
+ // 'name': 'Phase 7',
776
+ // 'id': 7,
777
+ // 'value': 35,
778
+ // 'mode': 2,
779
+ // 'options': [
780
+ // 0,
781
+ // 0,
782
+ // 0
783
+ // ],
784
+ // 'minSplit': 13,
785
+ // 'delaystart': 0,
786
+ // 'advanceend': 0
787
+ // },
788
+ // {
789
+ // 'name': 'Phase 8',
790
+ // 'id': 8,
791
+ // 'value': 20,
792
+ // 'mode': 2,
793
+ // 'options': [
794
+ // 0,
795
+ // 0,
796
+ // 0
797
+ // ],
798
+ // 'minSplit': 13,
799
+ // 'delaystart': 0,
800
+ // 'advanceend': 0
801
+ // }
802
+ // ],
803
+ // [],
804
+ // []
805
+ // ],
806
+ // 'stagesList': [
807
+ // {
808
+ // 'key': 0,
809
+ // 'split': 20,
810
+ // 'stages': [
811
+ // 1,
812
+ // 5
813
+ // ],
814
+ // 'delaystart': 0,
815
+ // 'advanceend': 0
816
+ // },
817
+ // {
818
+ // 'key': 1,
819
+ // 'split': 7,
820
+ // 'stages': [
821
+ // 2,
822
+ // 5
823
+ // ],
824
+ // 'delaystart': 0,
825
+ // 'advanceend': 0
826
+ // },
827
+ // {
828
+ // 'key': 2,
829
+ // 'split': 28,
830
+ // 'stages': [
831
+ // 2,
832
+ // 6
833
+ // ],
834
+ // 'delaystart': 0,
835
+ // 'advanceend': 0
836
+ // },
837
+ // {
838
+ // 'key': 3,
839
+ // 'split': 30,
840
+ // 'stages': [
841
+ // 3,
842
+ // 7
843
+ // ],
844
+ // 'delaystart': 0,
845
+ // 'advanceend': 0
846
+ // },
847
+ // {
848
+ // 'key': 4,
849
+ // 'split': 5,
850
+ // 'stages': [
851
+ // 4,
852
+ // 7
853
+ // ],
854
+ // 'delaystart': 0,
855
+ // 'advanceend': 0
856
+ // },
857
+ // {
858
+ // 'key': 5,
859
+ // 'split': 20,
860
+ // 'stages': [
861
+ // 4,
862
+ // 8
863
+ // ],
864
+ // 'delaystart': 0,
865
+ // 'advanceend': 0
866
+ // }
867
+ // ],
868
+ // 'stages': [
869
+ // [
870
+ // 1,
871
+ // 5
872
+ // ],
873
+ // [
874
+ // 2,
875
+ // 5
876
+ // ],
877
+ // [
878
+ // 2,
879
+ // 6
880
+ // ],
881
+ // [
882
+ // 3,
883
+ // 7
884
+ // ],
885
+ // [
886
+ // 4,
887
+ // 7
888
+ // ],
889
+ // [
890
+ // 4,
891
+ // 8
892
+ // ]
893
+ // ],
894
+ // 'barriers': [
895
+ // {
896
+ // 'barrier': 1,
897
+ // 'length': 55,
898
+ // 'items': [
899
+ // {
900
+ // 'ring': 2,
901
+ // 'data': [
902
+ // 5,
903
+ // 6
904
+ // ]
905
+ // },
906
+ // {
907
+ // 'ring': 1,
908
+ // 'data': [
909
+ // 1,
910
+ // 2
911
+ // ]
912
+ // }
913
+ // ]
914
+ // },
915
+ // {
916
+ // 'barrier': 2,
917
+ // 'length': 55,
918
+ // 'items': [
919
+ // {
920
+ // 'ring': 2,
921
+ // 'data': [
922
+ // 7,
923
+ // 8
924
+ // ]
925
+ // },
926
+ // {
927
+ // 'ring': 1,
928
+ // 'data': [
929
+ // 3,
930
+ // 4
931
+ // ]
932
+ // }
933
+ // ]
934
+ // }
935
+ // ]
936
+ // },
937
+ // {
938
+ // 'id': 3,
939
+ // 'desc': '方案3',
940
+ // 'offset': 0,
941
+ // 'cycle': 120,
942
+ // 'rings': [
943
+ // [
944
+ // {
945
+ // 'name': 'phase1',
946
+ // 'id': 1,
947
+ // 'value': 40,
948
+ // 'mode': 2,
949
+ // 'options': [
950
+ // 0,
951
+ // 0,
952
+ // 0
953
+ // ],
954
+ // 'minSplit': 13,
955
+ // 'delaystart': 0,
956
+ // 'advanceend': 0
957
+ // },
958
+ // {
959
+ // 'name': 'phase2',
960
+ // 'id': 2,
961
+ // 'value': 20,
962
+ // 'mode': 2,
963
+ // 'options': [
964
+ // 0,
965
+ // 0,
966
+ // 0
967
+ // ],
968
+ // 'minSplit': 13,
969
+ // 'delaystart': 0,
970
+ // 'advanceend': 0
971
+ // },
972
+ // {
973
+ // 'name': 'phase3',
974
+ // 'id': 3,
975
+ // 'value': 30,
976
+ // 'mode': 2,
977
+ // 'options': [
978
+ // 0,
979
+ // 0,
980
+ // 0
981
+ // ],
982
+ // 'minSplit': 13,
983
+ // 'delaystart': 0,
984
+ // 'advanceend': 0
985
+ // },
986
+ // {
987
+ // 'name': 'phase4',
988
+ // 'id': 4,
989
+ // 'value': 30,
990
+ // 'mode': 2,
991
+ // 'options': [
992
+ // 0,
993
+ // 0,
994
+ // 0
995
+ // ],
996
+ // 'minSplit': 13,
997
+ // 'delaystart': 0,
998
+ // 'advanceend': 0
999
+ // }
1000
+ // ],
1001
+ // [
1002
+ // {
1003
+ // 'name': 'Phase 5',
1004
+ // 'id': 5,
1005
+ // 'value': 20,
1006
+ // 'mode': 2,
1007
+ // 'options': [
1008
+ // 0,
1009
+ // 0,
1010
+ // 0
1011
+ // ],
1012
+ // 'minSplit': 13,
1013
+ // 'delaystart': 0,
1014
+ // 'advanceend': 0
1015
+ // },
1016
+ // {
1017
+ // 'name': 'Phase 6',
1018
+ // 'id': 6,
1019
+ // 'value': 40,
1020
+ // 'mode': 2,
1021
+ // 'options': [
1022
+ // 0,
1023
+ // 0,
1024
+ // 0
1025
+ // ],
1026
+ // 'minSplit': 13,
1027
+ // 'delaystart': 0,
1028
+ // 'advanceend': 0
1029
+ // },
1030
+ // {
1031
+ // 'name': 'Phase 7',
1032
+ // 'id': 7,
1033
+ // 'value': 30,
1034
+ // 'mode': 2,
1035
+ // 'options': [
1036
+ // 0,
1037
+ // 0,
1038
+ // 0
1039
+ // ],
1040
+ // 'minSplit': 13,
1041
+ // 'delaystart': 0,
1042
+ // 'advanceend': 0
1043
+ // },
1044
+ // {
1045
+ // 'name': 'Phase 8',
1046
+ // 'id': 8,
1047
+ // 'value': 30,
1048
+ // 'mode': 2,
1049
+ // 'options': [
1050
+ // 0,
1051
+ // 0,
1052
+ // 0
1053
+ // ],
1054
+ // 'minSplit': 13,
1055
+ // 'delaystart': 0,
1056
+ // 'advanceend': 0
1057
+ // }
1058
+ // ],
1059
+ // [],
1060
+ // []
1061
+ // ],
1062
+ // 'stagesList': [
1063
+ // {
1064
+ // 'key': 0,
1065
+ // 'split': 20,
1066
+ // 'stages': [
1067
+ // 1,
1068
+ // 5
1069
+ // ],
1070
+ // 'delaystart': 0,
1071
+ // 'advanceend': 0
1072
+ // },
1073
+ // {
1074
+ // 'key': 1,
1075
+ // 'split': 20,
1076
+ // 'stages': [
1077
+ // 1,
1078
+ // 6
1079
+ // ],
1080
+ // 'delaystart': 0,
1081
+ // 'advanceend': 0
1082
+ // },
1083
+ // {
1084
+ // 'key': 2,
1085
+ // 'split': 20,
1086
+ // 'stages': [
1087
+ // 2,
1088
+ // 6
1089
+ // ],
1090
+ // 'delaystart': 0,
1091
+ // 'advanceend': 0
1092
+ // },
1093
+ // {
1094
+ // 'key': 3,
1095
+ // 'split': 30,
1096
+ // 'stages': [
1097
+ // 3,
1098
+ // 7
1099
+ // ],
1100
+ // 'delaystart': 0,
1101
+ // 'advanceend': 0
1102
+ // },
1103
+ // {
1104
+ // 'key': 4,
1105
+ // 'split': 30,
1106
+ // 'stages': [
1107
+ // 4,
1108
+ // 8
1109
+ // ],
1110
+ // 'delaystart': 0,
1111
+ // 'advanceend': 0
1112
+ // }
1113
+ // ],
1114
+ // 'stages': [
1115
+ // [
1116
+ // 1,
1117
+ // 5
1118
+ // ],
1119
+ // [
1120
+ // 1,
1121
+ // 6
1122
+ // ],
1123
+ // [
1124
+ // 2,
1125
+ // 6
1126
+ // ],
1127
+ // [
1128
+ // 3,
1129
+ // 7
1130
+ // ],
1131
+ // [
1132
+ // 4,
1133
+ // 8
1134
+ // ]
1135
+ // ],
1136
+ // 'barriers': [
1137
+ // {
1138
+ // 'barrier': 1,
1139
+ // 'length': 60,
1140
+ // 'items': [
1141
+ // {
1142
+ // 'ring': 2,
1143
+ // 'data': [
1144
+ // 5,
1145
+ // 6
1146
+ // ]
1147
+ // },
1148
+ // {
1149
+ // 'ring': 1,
1150
+ // 'data': [
1151
+ // 1,
1152
+ // 2
1153
+ // ]
1154
+ // }
1155
+ // ]
1156
+ // },
1157
+ // {
1158
+ // 'barrier': 2,
1159
+ // 'length': 60,
1160
+ // 'items': [
1161
+ // {
1162
+ // 'ring': 2,
1163
+ // 'data': [
1164
+ // 7,
1165
+ // 8
1166
+ // ]
1167
+ // },
1168
+ // {
1169
+ // 'ring': 1,
1170
+ // 'data': [
1171
+ // 3,
1172
+ // 4
1173
+ // ]
1174
+ // }
1175
+ // ]
1176
+ // }
1177
+ // ]
1178
+ // }
1179
+ // ],
1180
+ manualInfo: {
1181
+ tempPatternid: '',
1182
+ offset: 0,
1183
+ duration: 300,
1184
+ tempDelay: 0 // 控制方式手动操作的情况下的延迟时间的临时值。
1185
+ // tempDuration: 300 // 控制方式手动操作的情况下的持续时间的临时值。
1186
+ }
1187
+ }
1188
+ },
1189
+ created () {
1190
+ this.initData()
1191
+ },
1192
+ methods: {
1193
+ handleClose () {
1194
+ this.$emit('closePhaseBack')
1195
+ },
1196
+ onStageSplitChange (diff, rowIndex, subIndex) {
1197
+ let stageArr = this.stagesList[subIndex].stages
1198
+ let row = this.patternList[rowIndex]
1199
+ let ringsList = row.rings
1200
+ for (let rings of ringsList) {
1201
+ for (let ring of rings) {
1202
+ if (stageArr.includes(ring.id)) {
1203
+ ring.value = (ring.value ? ring.value : 0) + diff
1204
+ continue
1205
+ }
1206
+ }
1207
+ }
1208
+ },
1209
+ stageSplitChange (diff, rowIndex, subIndex) {
1210
+ let row = this.patternList[rowIndex]
1211
+ let ringsList = row.stagesList
1212
+ for (let rings of ringsList) {
1213
+ if (subIndex === rings.key) {
1214
+ rings.stageSplit = (rings.green ? rings.green : 0) + (rings.yellow ? rings.yellow : 0) + (rings.red ? rings.red : 0)
1215
+ continue
1216
+ }
1217
+ }
1218
+ },
1219
+ onStageDelaystartChange (diff, rowIndex, subIndex) {
1220
+ let stageArr = this.stagesList[subIndex].stages
1221
+ let row = this.patternList[rowIndex]
1222
+ let ringsList = row.rings
1223
+ for (let rings of ringsList) {
1224
+ for (let ring of rings) {
1225
+ if (stageArr.includes(ring.id)) {
1226
+ ring.delaystart = (ring.delaystart ? ring.delaystart : 0) + diff
1227
+ continue
1228
+ }
1229
+ }
1230
+ }
1231
+ },
1232
+ onStageAdvanceendChange (diff, rowIndex, subIndex) {
1233
+ let stageArr = this.stagesList[subIndex].stages
1234
+ let row = this.patternList[rowIndex]
1235
+ let ringsList = row.rings
1236
+ for (let rings of ringsList) {
1237
+ for (let ring of rings) {
1238
+ if (stageArr.includes(ring.id)) {
1239
+ ring.advanceend = (ring.advanceend ? ring.advanceend : 0) + diff
1240
+ continue
1241
+ }
1242
+ }
1243
+ }
1244
+ },
1245
+ handleSplit (index, newList) {
1246
+ // this.allPatternList[index - 1].rings[index - 1] = newList
1247
+ // this.planPattern[index - 1] = newList
1248
+ // let currPattern = this.patternList[index]
1249
+ // setTimeout(() => {
1250
+ // this.handleStageData(currPattern.rings, this.patternList[index].id, currPattern.stagesList)
1251
+ // }, 50)
1252
+ },
1253
+ selectPattern () {
1254
+ this.patternOne = this.allPatternList.filter(item => {
1255
+ return item.id === this.manualInfo.tempPatternid
1256
+ })
1257
+ },
1258
+ initData () {
1259
+ // 判断有几个环,就创建几个看板
1260
+ // let phaseList = this.globalParamModel.getParamsByType('phaseList')
1261
+ this.coordphaseOption = this.phaseList.map(ele => {
1262
+ return {
1263
+ value: ele.id
1264
+ }
1265
+ })
1266
+ // this.overlap = this.globalParamModel.getParamsByType('overlaplList')
1267
+ // this.agentId = getIframdevid()
1268
+ let rings = []
1269
+ if (this.phaseList.length === 0) {
1270
+ // this.$store.getters.tscParam.patternList = []
1271
+ return
1272
+ }
1273
+ for (let phase of this.phaseList) {
1274
+ rings.push(phase.ring)
1275
+ }
1276
+ this.ringCount = Array.from(new Set(rings)) // 去除数组重复的元素
1277
+ this.ringCount = this.ringCount.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
1278
+ this.ringCounts = Array.from(new Set(rings)) // 去除数组重复的元素
1279
+ this.ringCounts = this.ringCounts.sort(this.sortNumbers) // 把数组中的值按照从小到大的顺序重新排序
1280
+ // this.increaseId()
1281
+ // this.getCycle()
1282
+ // this.updatePhaseDescription()
1283
+ // this.getOptionsOfRing()
1284
+ },
1285
+ sortNumbers (a, b) {
1286
+ return a - b
1287
+ },
1288
+ handleManualControl () {
1289
+ let submitdata = {
1290
+ control: 100,
1291
+ delay: this.manualInfo.tempDelay !== undefined ? Number(this.manualInfo.tempDelay) : 0,
1292
+ duration: this.manualInfo.tempDuration !== undefined ? Number(this.manualInfo.tempDuration) : 0,
1293
+ data: {}
1294
+ }
1295
+ // submitdata.data.phases = this.handleSubmitPhaseClose()
1296
+ this.$emit('closePhaseControl', submitdata)
1297
+ }
1298
+ }
1299
+ }
1300
+ </script>
1301
+
1302
+ <style>
1303
+
1304
+ </style>