openatc-components 0.0.67 → 0.0.69

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.0.67",
3
+ "version": "0.0.69",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -11,6 +11,13 @@
11
11
  **/
12
12
  <template>
13
13
  <div class="crossImg">
14
+ <div v-show="isShowState">
15
+ <div class="stateText">
16
+ <div style="border:0px solid red;float:right;">
17
+ {{stateName }}
18
+ </div>
19
+ </div>
20
+ </div>
14
21
  <div v-show="isShowMode">
15
22
  <div class="controlText">
16
23
  <div style="border:0px solid red;float:right;">
@@ -204,6 +211,10 @@ export default {
204
211
  roadDirection: {
205
212
  type: String
206
213
  },
214
+ isShowState: {
215
+ type: Boolean,
216
+ devault: false
217
+ },
207
218
  isShowMode: {
208
219
  type: Boolean,
209
220
  devault: false
@@ -299,6 +310,7 @@ export default {
299
310
  },
300
311
  data () {
301
312
  return {
313
+ stateName: '',
302
314
  roadDir: 'right', // 道路行车方向,默认右行
303
315
  phaseCountdownList: [], // 相位倒计时列表
304
316
  statusData: null, // 信号机状态
@@ -541,6 +553,7 @@ export default {
541
553
  getIntersectionInfo(agentid).then(res => {
542
554
  if (!res.data.success) {
543
555
  this.isLoaded = false
556
+ this.stateName = this.$t('openatccomponents.overview.offline')
544
557
  let parrenterror = getMessageByCode(res.data.code, this.$i18n.locale)
545
558
  if (res.data.data) {
546
559
  // 子类型错误
@@ -554,6 +567,7 @@ export default {
554
567
  }
555
568
  return
556
569
  }
570
+ this.stateName = this.$t('openatccomponents.overview.online')
557
571
  this.isLoaded = true
558
572
  this.crossInfo = res.data.data.param
559
573
  this.tempType = res.data.data.type
@@ -27,6 +27,7 @@
27
27
  :crossStatusData="crossStatusData"
28
28
  :agentId="agentId"
29
29
  :isShowInterval="isShowInterval"
30
+ :isShowState="isShowState"
30
31
  :isShowMode="isShowMode"
31
32
  :modeName="modeName"
32
33
  :controlName="controlName"
@@ -79,6 +80,10 @@ export default {
79
80
  type: String,
80
81
  default: 'right'
81
82
  },
83
+ isShowState: {
84
+ type: Boolean,
85
+ devault: false
86
+ },
82
87
  isShowMode: {
83
88
  type: Boolean,
84
89
  default: false
@@ -22,6 +22,7 @@
22
22
  :modeName="modeName !== '' ? modeName : controlData.mode"
23
23
  :controlName="controlName !== '' ? controlName : controlData.control"
24
24
  :isShowMode="isShowMode"
25
+ :isShowState="isShowState"
25
26
  :isShowInterval="isShowInterval"
26
27
  @onSelectStages="onSelectStages"/>
27
28
  </div>
@@ -72,6 +73,10 @@ export default {
72
73
  type: Boolean,
73
74
  default: true
74
75
  },
76
+ isShowState: {
77
+ type: Boolean,
78
+ devault: false
79
+ },
75
80
  isShowMode: {
76
81
  type: Boolean,
77
82
  default: false
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="overLap" v-if="checked" :style="{'width':tentative?'100%':'852px','margin':this.controlData ? '20px 0 0 0' :tentative ? '0' : '0 40 0 327px'}">
2
+ <div class="overLap" v-if="checked" :style="{'width':'100%','margin':this.controlData ? '20px 0 0 0' :tentative ? '0' : '0 40px 0 327px'}">
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
  <div class="first-2">
@@ -23,7 +23,7 @@
23
23
  :label="$t('openatccomponents.overview.controlnumber') + ':'"
24
24
  prop="shape">
25
25
  <!-- <el-input-number v-model="manualInfo.tempPatternid" :controls="false" size="mini" :max="65535" :min="0" :precision="0" :step="1" :placeholder="$t('openatccomponents.common.input')"></el-input-number> -->
26
- <el-select v-model="manualInfo.tempPatternid" @change="changeStage" class="col-inner" size="small" :placeholder="$t('openatccomponents.common.select')">
26
+ <el-select v-model="manualInfo.tempPatternid" clearable @change="changeStage" class="col-inner" size="small" :placeholder="$t('openatccomponents.common.select')">
27
27
  <el-option
28
28
  v-for="item in patternSelect"
29
29
  :key="item.value"
@@ -174,14 +174,19 @@ export default {
174
174
  },
175
175
  methods: {
176
176
  changeStage (value) {
177
- this.manualsStage = {}
178
- this.manuals = true
179
- let stages = []
180
- let secletIds = isNaN(parseInt(value)) ? Number(value.replace(/[^0-9]/ig, '')) : value
181
- stages = this.patternAll.filter(item => {
182
- return item.id === secletIds
183
- })[0].stages
184
- this.manualsStage.stages = stages
177
+ if (value) {
178
+ this.manualsStage = {}
179
+ this.manuals = true
180
+ let stages = []
181
+ let secletIds = isNaN(parseInt(value)) ? Number(value.replace(/[^0-9]/ig, '')) : value
182
+ stages = this.patternAll.filter(item => {
183
+ return item.id === secletIds
184
+ })[0].stages
185
+ this.manualsStage.stages = stages
186
+ } else {
187
+ this.manuals = false
188
+ this.realtimeStage = JSON.parse(JSON.stringify(this.crossStatusData))
189
+ }
185
190
  },
186
191
  handleClose () {
187
192
  this.$emit('closeManualModal')
@@ -26,6 +26,10 @@
26
26
  <div class="tuxing-left" :class="{'changeWidth': graphicMode}" ref="tuxingLeft">
27
27
  <intersection-base-map
28
28
  ref="intersectionMap"
29
+ :modeName="modeName"
30
+ :controlName="controlName"
31
+ :isShowState="isShowState"
32
+ :isShowMode="isShowMode"
29
33
  :crossStatusData="crossStatusData"
30
34
  :devStatus="devStatus"
31
35
  :agentId="agentId"
@@ -112,6 +116,22 @@ export default {
112
116
  type: String,
113
117
  default: ''
114
118
  },
119
+ isShowState: {
120
+ type: Boolean,
121
+ devault: false
122
+ },
123
+ isShowMode: {
124
+ type: Boolean,
125
+ default: false
126
+ },
127
+ modeName: {
128
+ type: String,
129
+ default: ''
130
+ },
131
+ controlName: {
132
+ type: String,
133
+ default: ''
134
+ },
115
135
  roadDirection: {
116
136
  type: String,
117
137
  default: 'right'
@@ -3,6 +3,10 @@
3
3
  <overview
4
4
  :AgentId="agentId"
5
5
  :reqUrl="reqUrl"
6
+ :modeName="modeName"
7
+ :controlName="controlName"
8
+ :isShowState="isShowState"
9
+ :isShowMode="isShowMode"
6
10
  :Token="Token"></overview>
7
11
  </div>
8
12
  </template>
@@ -11,6 +15,10 @@
11
15
  export default {
12
16
  data () {
13
17
  return {
18
+ isShowState: true,
19
+ isShowMode: true,
20
+ modeName: '交警遥控',
21
+ controlName: '步进',
14
22
  agentId: '10002-994',
15
23
  Token: 'eyJraWQiOiIxNjUwNzMxMTY2NTQ2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTczNzEzMTE2NiwiaWF0IjoxNjUwNzMxMTY2fQ.qjp7-LyJdSLr29Jm0T8KAQIoPA8ldkpTg83vVvorg_s',
16
24
  reqUrl: 'http://192.168.13.105:11003/openatc'
@@ -159,4 +159,13 @@
159
159
  color: $--color-text-primary;
160
160
  font-size:30px;
161
161
  }
162
+ .stateText {
163
+ position:absolute;
164
+ top:12%;
165
+ left:50%;
166
+ width:25%;
167
+ height:50px;
168
+ color: $--color-text-primary;
169
+ font-size:30px;
170
+ }
162
171
  }
@@ -249,7 +249,7 @@
249
249
  // width: 50%;
250
250
  }
251
251
  .el-input-number--mini {
252
- width: 180px;
252
+ width: 44%;
253
253
  }
254
254
  .el-input-number {
255
255
  // width: 100%;