openatc-components 0.1.115 → 0.1.117

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.
@@ -15,7 +15,7 @@
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
17
  <div style="position: relative;" :style="{'height': '34px','float':'left','width':((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%'}" v-for="(item,index2) in list" :key="index2" :class="item.mode===7?'direction': ''">
18
- <div class="first-1" :class="item.mode===8?'mask': ''" :style="{'width':Number(item.greenWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','background':'#7ccc66'}">
18
+ <div class="first-1" :class="item.mode===8?'masks': ''" :style="{'width':Number(item.greenWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','background':'#7ccc66'}">
19
19
  <el-tooltip placement="top-start" effect="light">
20
20
  <div slot="content">P{{item.id}}:{{item.split}}</div>
21
21
  <div style="cursor:pointer;">
@@ -38,9 +38,9 @@
38
38
  <i class="iconfont icon-youguidianche" style="position: absolute;top: 8px;left:60px;font-size:12px;color:#454545;" v-if="bus.controltype === 5 && bus.phaseid===item.id"></i>
39
39
  </div>
40
40
  </div>
41
- <div class="first-1" :class="item.mode===8?'mask': ''" :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
- <div class="first-1" :class="item.mode===8?'mask': ''" :style="{'width':Number(item.yellowWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f9dc6a'}"></div>
43
- <div class="first-1" :class="item.mode===8?'mask': ''" :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>
41
+ <div class="first-1" :class="item.mode===8?'masks': ''" :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
+ <div class="first-1" :class="item.mode===8?'masks': ''" :style="{'width':Number(item.yellowWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100).toFixed(3) + '%').replace('%', ''))*100+'%','height':'34px','background':'#f9dc6a'}"></div>
43
+ <div class="first-1" :class="item.mode===8?'masks': ''" :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
44
  </div>
45
45
  </div>
46
46
  <div v-if="showBarrier">
@@ -1355,7 +1355,7 @@ export default {
1355
1355
  .direction {
1356
1356
  filter: brightness(70%);
1357
1357
  }
1358
- .mask {
1358
+ .masks {
1359
1359
  background: rgb(242, 121, 121) !important;
1360
1360
  }
1361
1361
  .first-1 {
@@ -10,15 +10,15 @@
10
10
  * See the Mulan PSL v2 for more details.
11
11
  **/
12
12
  <template>
13
- <div class="cross-phase-dir">
14
- <el-select v-model="phaseid" style="width: 100%" clearable :placeholder="$t('openatccomponents.common.select')" :no-data-text="$t('openatccomponents.common.nodata')"
13
+ <div class="cross-phase-dir cross-phase-dir-select">
14
+ <el-select v-model="phaseId" style="width: 100%" clearable :placeholder="$t('openatccomponents.common.select')" :no-data-text="$t('openatccomponents.common.nodata')"
15
15
  @change="handleSelect"
16
16
  >
17
17
  <el-option
18
18
  v-for="(option, index) in phaseOption"
19
19
  :key="index"
20
20
  :label="option.phasedesc"
21
- :value="option.phaseid"
21
+ :value="option.phaseId"
22
22
  >
23
23
  <span>{{ option.phasedesc }}</span>
24
24
  </el-option>
@@ -36,12 +36,15 @@ export default {
36
36
  props: {
37
37
  agentid: {
38
38
  type: String
39
+ },
40
+ phaseid: {
41
+ type: String
39
42
  }
40
43
  },
41
44
  data () {
42
45
  return {
43
46
  phaseOption: [],
44
- phaseid: ''
47
+ phaseId: ''
45
48
  }
46
49
  },
47
50
  mounted () {
@@ -71,11 +74,14 @@ export default {
71
74
  this.$t('openatccomponents.overview.phase') +
72
75
  ele.id + '-' +
73
76
  this.getPhaseName(ele.direction).name,
74
- phaseid: ele.id
77
+ phaseId: ele.id
75
78
  }
76
79
  })
77
80
  console.log(options)
78
81
  this.phaseOption = options
82
+ if (this.phaseid !== undefined) {
83
+ this.phaseId = this.phaseid
84
+ }
79
85
  })
80
86
  },
81
87
  getName (status) {
@@ -108,7 +114,7 @@ export default {
108
114
  return this.getName(status)
109
115
  },
110
116
  handleSelect (val) {
111
- let phaseinfo = this.phaseOption.filter(ele => ele.phaseid === val)[0]
117
+ let phaseinfo = this.phaseOption.filter(ele => ele.phaseId === val)[0]
112
118
  this.$emit('getSelectPhaseId', val)
113
119
  this.$emit('getSelectPhaseInfo', phaseinfo)
114
120
  }
@@ -10,7 +10,7 @@
10
10
  * See the Mulan PSL v2 for more details.
11
11
  **/
12
12
  <template>
13
- <div class="cross-phase-dir">
13
+ <div class="cross-phase-dir cross-phase-dir-text">
14
14
  <div v-for="phase in phaselist" :key="phase.id">
15
15
  {{$t('openatccomponents.overview.phase')}}{{phase.id}} - {{phase.dirname}}
16
16
  </div>