openatc-components 0.3.30 → 0.3.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openatc-components",
3
- "version": "0.3.30",
3
+ "version": "0.3.32",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -10,9 +10,9 @@
10
10
  <PatternStatus
11
11
  :showBarrier="showBarrier"
12
12
  :controlPhase="controlPhase"
13
+ :isShowTip="isShowTip"
13
14
  :localPatternList="localPatternList"
14
15
  :showCondition="showCondition"
15
- :patternType="patternType"
16
16
  :contrloType="contrloType"
17
17
  :allPatternList="allPatternList"
18
18
  :stagesChange="stagesChange"
@@ -72,6 +72,10 @@ export default {
72
72
  stagesChange: {
73
73
  type: Array
74
74
  },
75
+ isShowTip: {
76
+ type: Boolean,
77
+ default: true
78
+ },
75
79
  showBarrier: {
76
80
  type: Boolean,
77
81
  default: false
@@ -88,9 +92,6 @@ export default {
88
92
  patternId: {
89
93
  type: Number
90
94
  },
91
- patternType: {
92
- type: String
93
- },
94
95
  agentId: {
95
96
  type: String
96
97
  },
@@ -21,7 +21,7 @@
21
21
  @change="handleChangePosY" @input.native="eventChange('y')" />
22
22
  </el-form-item>
23
23
  <el-form-item v-if="showAngle" :label="$t('openatccomponents.channelizationmap.angle') + ':'">
24
- <el-input-number :min="0" :max="360" :controls="false" ref="refNumber-angle" v-model="basicCoodInfo.angle"
24
+ <el-input-number :min="0" :max="360" :precision="0" :step="1" :controls="false" ref="refNumber-angle" v-model="basicCoodInfo.angle"
25
25
  @change="handleChangeAngle" @input.native="eventChange('angle')" />
26
26
  </el-form-item>
27
27
  <el-form-item v-if="showKeyId" label="ID:">
@@ -26,8 +26,8 @@
26
26
  :disabled="!isSeletable"
27
27
  @click="clickOpen"
28
28
  >{{$t('openatccomponents.channelizationmap.againimport')}}</el-button>
29
- <i class="lock-map el-icon-unlock" v-if="isLockedCrossMap" @click="handleLockCrossMap()"></i>
30
- <i class="lock-map el-icon-lock" v-if="!isLockedCrossMap" @click="handleLockCrossMap()"></i>
29
+ <i class="lock-map el-icon-unlock" v-if="!isLockedCrossMap" @click="handleLockCrossMap()"></i>
30
+ <i class="lock-map el-icon-lock" v-if="isLockedCrossMap" @click="handleLockCrossMap()"></i>
31
31
  </div>
32
32
 
33
33
  <div class="draw-to-sketchpad">
@@ -11,33 +11,8 @@
11
11
  **/
12
12
  <template>
13
13
  <div class="main-patternstatus">
14
- <!-- rcp模式 -->
15
- <div v-if="patternType === 'rcp'">
16
- <div class="ring-first" v-for="(list, index1) in patternRcp" :key="index1">
17
- <div style="position: relative" :style="{height: '34px',paddingRight: '1px',float: 'left',width:
18
- ((item.split + (item.sum ? item.sum : 0)) /(item.cycle > cycles ? item.cycle : cycles)) *100 +'%',}"
19
- v-for="(item, index2) in list" :key="index2">
20
- <div class="first-1" :style="{ width:
21
- (Number(item.greenWidth.replace('%', '')) /
22
- Number((((item.split + (item.sum ? item.sum : 0)) /
23
- (item.cycle > cycles ? item.cycle : cycles)) * 100 + '%').replace('%', ''))) * 100 + '%', height: '34px',background: '#7ccc66'}">
24
- </div>
25
- <el-tooltip placement="top-start" effect="light">
26
- <div v-if="item.id" slot="content">P{{ item.id }}:{{ item.split }}</div>
27
- <div v-if="item.id" style="cursor: pointer">
28
- <div
29
- class="box"
30
- style="position: absolute; width:40px; left: 0; top: 5px"
31
- >
32
- <div class="ring-nums">P{{ item.id }}:{{ item.split }}</div>
33
- </div>
34
- </div>
35
- </el-tooltip>
36
- </div>
37
- </div>
38
- </div>
39
14
  <!-- 环模式true -->
40
- <div v-if="(this.contrloType === 'ring' || !this.contrloType) && patternType !== 'rcp'">
15
+ <div v-if="this.contrloType === 'ring' || !this.contrloType">
41
16
  <div class="ring-first" v-for="(list, index1) in patternInfo" :key="index1">
42
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': ''">
43
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'}">
@@ -48,7 +23,7 @@
48
23
  <!-- <patternwalksvg :showWalk="item.peddirection" :Width="'32'" :Height="'34'"></patternwalksvg> -->
49
24
  <xdrdirselector Width="60px" Height="60px" Widths="50px" Heights="50px" :showlist="item.direction"></xdrdirselector>
50
25
  </div>
51
- <div class="box" style="position: absolute; left:40px; width:40px; top: -1px;">
26
+ <div v-if="isShowTip" class="box" style="position: absolute; left:40px; width:40px; top: -1px;">
52
27
  <div class="ring-nums">{{$t('openatccomponents.phase.phase')}}{{item.id}}</div>
53
28
  <div class="ring-nums">{{item.split}}</div>
54
29
  </div>
@@ -142,7 +117,6 @@ export default {
142
117
  newCycle: this.cycles,
143
118
  patternIds: this.patternId,
144
119
  newPatterns: [],
145
- patternRcp: [],
146
120
  newList: [],
147
121
  isControl: true,
148
122
  contrloCycle: 0,
@@ -157,6 +131,10 @@ export default {
157
131
  }
158
132
  },
159
133
  props: {
134
+ isShowTip: {
135
+ type: Boolean,
136
+ default: true
137
+ },
160
138
  cycleChange: {
161
139
  type: Boolean,
162
140
  default: true
@@ -167,9 +145,6 @@ export default {
167
145
  controlPhase: {
168
146
  type: Object
169
147
  },
170
- patternType: {
171
- type: String
172
- },
173
148
  contrloType: {
174
149
  type: String
175
150
  },
@@ -342,9 +317,6 @@ export default {
342
317
  cycles: {
343
318
  handler: function (val, oldVal) {
344
319
  this.newCycle = this.cycles
345
- if (this.patternType === 'rcp') {
346
- this.handleRcp(this.patternStatusList)
347
- }
348
320
  },
349
321
  // 深度观察监听
350
322
  deep: true
@@ -369,9 +341,6 @@ export default {
369
341
  },
370
342
  patternStatusList: {
371
343
  handler: function (val, oldVal) {
372
- if (this.patternType === 'rcp') {
373
- this.handleRcp(this.patternStatusList)
374
- }
375
344
  this.handleBarrierHeight() // 计算屏障高度
376
345
  if (this.patternStatusList && this.newCycle) {
377
346
  setTimeout(() => {
@@ -404,9 +373,6 @@ export default {
404
373
  if (this.contrloType === 'stage') {
405
374
  this.getStage()
406
375
  }
407
- if (this.patternType === 'rcp') {
408
- this.handleRcp(this.patternStatusList)
409
- }
410
376
  },
411
377
  methods: {
412
378
  getPed (data) {
@@ -435,48 +401,6 @@ export default {
435
401
  }
436
402
  return ped
437
403
  },
438
- handleRcp (val) {
439
- this.patternRcp = []
440
- let valSplit = val.map(item => {
441
- return item.map(val => {
442
- return val.splitchain
443
- })
444
- })
445
- let splitCycle = valSplit.length > 0 ? valSplit.map(item => {
446
- return item.length > 0 ? item.reduce((a, b) => {
447
- return a + b
448
- }) : 0
449
- }) : 0
450
- let cycle = Math.max(...splitCycle)// 每个环的周期最大值
451
- for (let rings of val) {
452
- if (rings.length === 0) continue
453
- let list = []
454
- for (let ring of rings) {
455
- if (ring.splitchain === 0) continue
456
- let obj = {}
457
- let split = ring.splitchain
458
- obj.split = split
459
- obj.cycle = cycle
460
- obj.id = ring.phases
461
- // if (ring.sum) {
462
- // obj.sum = ring.sum
463
- // obj.redWidth = ((currPhase.redclear + ring.sum) / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
464
- // } else {
465
- // obj.redWidth = (currPhase.redclear / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
466
- // }
467
- // obj.mode = ring.mode
468
- obj.greenWidth = (split / (cycle > this.cycles ? cycle : this.cycles)) * 100 + '%'
469
- // obj.flashgreen = (currPhase.flashgreen / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
470
- // obj.yellowWidth = (currPhase.yellow / (this.fixCycle ? this.fixCycle : this.max ? this.max : this.newCycle) * 100) + '%'
471
- // 忽略相位不显示
472
- // let mode = ring.mode
473
- // if (mode !== 7) { // 忽略相位不显示
474
- list.push(obj)
475
- // }
476
- }
477
- this.patternRcp.push(list)
478
- }
479
- },
480
404
  handleStageData (data) {
481
405
  if (!data) return
482
406
  let peddirections = this.getPed(data)
@@ -13,84 +13,36 @@ PURPOSE. * See the Mulan PSL v2 for more details. **/
13
13
  <svg
14
14
  v-if="type === '相位关断'"
15
15
  xmlns="http://www.w3.org/2000/svg"
16
- viewBox="0 0 45.08 24.79"
16
+ viewBox="0 0 54 29.1"
17
17
  :width="iconWidth"
18
18
  :height="iconHeight"
19
19
  >
20
- <g id="图层_2" data-name="图层 2">
21
- <g id="图层_3" data-name="图层 3" :class="themeColor">
22
- <rect class="cls-1" y="13.52" width="27.08" height="7.46" />
23
- <rect class="cls-2" x="27" y="13.52" width="18.08" height="7.46" />
24
- <rect class="cls-2" x="27" y="9.71" width="1.38" height="15.08" />
25
- <path class="cls-3" d="M24.35.35,31,7.05Z" />
26
- <path class="cls-3" d="M31,.35l-6.69,6.7Z" />
27
- </g>
20
+ <g :class="themeColor">
21
+ <rect y="15.8" class="st0" width="32.4" height="9"/>
22
+ <rect x="32.3" y="15.8" class="st3" width="21.7" height="9"/>
23
+ <rect x="32.3" y="11.3" class="st3" width="1.7" height="17.7"/>
24
+ <g>
25
+ <path class="st4" d="M29.2,0.4l8,8L29.2,0.4z"/>
26
+ <path class="st4" d="M37.2,0.4l-8,8L37.2,0.4z"/>
28
27
  </g>
28
+ </g>
29
29
  </svg>
30
30
  <svg
31
31
  v-if="type === '临时方案'"
32
32
  xmlns="http://www.w3.org/2000/svg"
33
- viewBox="0 0 54 9"
33
+ viewBox="0 0 54 29.1"
34
34
  :width="iconWidth"
35
35
  :height="iconHeight"
36
36
  >
37
- <g id="图层_2" data-name="图层 2" :class="themeColor">
38
- <rect
39
- id="矩形_683_拷贝_3"
40
- data-name="矩形 683 拷贝 3"
41
- class="cls-1"
42
- width="39"
43
- height="9"
44
- />
45
- <rect
46
- id="矩形_683_拷贝_3-2"
47
- data-name="矩形 683 拷贝 3"
48
- class="cls-5"
49
- x="39"
50
- width="8"
51
- height="9"
52
- />
53
- <rect
54
- id="矩形_686_拷贝_4"
55
- data-name="矩形 686 拷贝 4"
56
- class="cls-6"
57
- x="37"
58
- width="1"
59
- height="9"
60
- />
61
- <rect
62
- id="矩形_686_拷贝_4-2"
63
- data-name="矩形 686 拷贝 4"
64
- class="cls-6"
65
- x="35"
66
- width="1"
67
- height="9"
68
- />
69
- <rect
70
- id="矩形_686_拷贝_4-3"
71
- data-name="矩形 686 拷贝 4"
72
- class="cls-6"
73
- x="33"
74
- width="1"
75
- height="9"
76
- />
77
- <rect
78
- id="矩形_686_拷贝_4-4"
79
- data-name="矩形 686 拷贝 4"
80
- class="cls-6"
81
- x="31"
82
- width="1"
83
- height="9"
84
- />
85
- <rect
86
- id="矩形_683_拷贝_3-3"
87
- data-name="矩形 683 拷贝 3"
88
- class="cls-2"
89
- x="46"
90
- width="8"
91
- height="9"
92
- />
93
- </g>
37
+ <g :class="themeColor">
38
+ <rect id="矩形_683_拷贝_3" x="0" y="15.8" class="st0" width="39" height="9"/>
39
+ <rect id="矩形_683_拷贝_3-2" x="39" y="15.8" class="st1" width="8" height="9"/>
40
+ <rect id="矩形_686_拷贝_4" x="37" y="15.8" class="st2" width="1" height="9"/>
41
+ <rect id="矩形_686_拷贝_4-2" x="35" y="15.8" class="st2" width="1" height="9"/>
42
+ <rect id="矩形_686_拷贝_4-3" x="33" y="15.8" class="st2" width="1" height="9"/>
43
+ <rect id="矩形_686_拷贝_4-4" x="31" y="15.8" class="st2" width="1" height="9"/>
44
+ <rect id="矩形_683_拷贝_3-3" x="46" y="15.8" class="st3" width="8" height="9"/>
45
+ </g>
94
46
  </svg>
95
47
  <svg
96
48
  v-if="type === '优先控制'"
@@ -191,4 +143,9 @@ export default {
191
143
  .cls-6 {
192
144
  fill: #fff;
193
145
  }
146
+ .st0{fill:#7CCC66;}
147
+ .st1{fill:#F9DC6A;}
148
+ .st2{fill:#FFFFFF;}
149
+ .st3{fill:#F27979;}
150
+ .st4{fill:none;stroke:#F27979;stroke-width:1.1979;stroke-miterlimit:10;}
194
151
  </style>
@@ -3,8 +3,8 @@
3
3
  <BoardCard
4
4
  :patternId="patternId"
5
5
  :contrloType="contrloType"
6
- :patternType="patternType"
7
6
  :stagesChange="stagesChange"
7
+ :isShowTip="isShowTip"
8
8
  :patternStatusList="patternStatusList"
9
9
  :cycles="cycles"
10
10
  :cycle="cycle"
@@ -498,6 +498,10 @@ export default {
498
498
  }
499
499
  },
500
500
  props: {
501
+ isShowTip: {
502
+ type: Boolean,
503
+ default: true
504
+ },
501
505
  contrloType: {
502
506
  type: String
503
507
  },
@@ -537,9 +541,6 @@ export default {
537
541
  patternStatusList: {
538
542
  type: Array
539
543
  },
540
- patternType: {
541
- type: String
542
- },
543
544
  patternId: {
544
545
  type: Number
545
546
  },
@@ -1 +0,0 @@
1
- {}