openatc-components 0.2.39 → 0.2.41

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.2.39",
3
+ "version": "0.2.41",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -28,18 +28,18 @@
28
28
  :showWalk="item[0].peddirection"
29
29
  :Width="'40'"
30
30
  :Height="'40'" /> -->
31
- <xdr-dir-selector Width="75PX" Height="75PX" Widths="65px" Heights="65px" :Data="showStyle" :Datas="showStyles" :showlist="dirListSetTheme(item)"></xdr-dir-selector>
32
- <div style="height:80px;display:flex;flex-direction:row;justify-content:center;align-items:end;">
33
- <div class="current-stage-num" style="width:20%;" :style="{color: themeColor}">{{index + 1}}</div>
31
+ <xdr-dir-selector :Width="dirWidth" :Height="dirHeight" :Widths="dirWidths" :Heights="dirHeights" :Data="showStyle" :Datas="showStyles" :showlist="dirListSetTheme(item)"></xdr-dir-selector>
32
+ <div style="display:flex;flex-direction:row;justify-content:center;align-items:end;" :style="{height: StageHeight}">
33
+ <div class="current-stage-num" style="width:20%;" :style="{color: themeColor, fontSize: numSize}">{{index + 1}}</div>
34
34
  <div style="width:70%;">
35
- <i class="iconfont icon-feijidongche" :style="{color: themeColor}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 6"></i>
36
- <i class="iconfont icon-lukouzhilu" :style="{color: themeColor2}" style="font-size:16PX;color:#454545;margin-left:10PX" v-if="item[item.length-1].controltype === 1"></i>
37
- <i class="iconfont icon-BRT" :style="{color: themeColor2}" style="font-size:11PX;color:#454545;margin-left:10PX" v-if="item[item.length-1].controltype === 4"></i>
35
+ <i class="iconfont icon-feijidongche" :style="{color: themeColor, fontSize: iconSize}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 6"></i>
36
+ <i class="iconfont icon-lukouzhilu" :style="{color: themeColor2, fontSize: iconSize2}" style="font-size:16PX;color:#454545;margin-left:10PX" v-if="item[item.length-1].controltype === 1"></i>
37
+ <i class="iconfont icon-BRT" :style="{color: themeColor2, fontSize: iconSize}" style="font-size:11PX;color:#454545;margin-left:10PX" v-if="item[item.length-1].controltype === 4"></i>
38
38
  <div style="transform:scale(0.65);margin-left:10PX">
39
39
  <i class="iconfont icon-xuxiangwei-xin" :style="{color: themeColor2}" style="font-size:5PX;color:#454545;" v-if="item[item.length-1].controltype === 99"></i>
40
40
  </div>
41
- <i class="iconfont icon-gongjiaoche" :style="{color: themeColor}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 3"></i>
42
- <i class="iconfont icon-youguidianche" :style="{color: themeColor}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 5"></i>
41
+ <i class="iconfont icon-gongjiaoche" :style="{color: themeColor, fontSize: iconSize}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 3"></i>
42
+ <i class="iconfont icon-youguidianche" :style="{color: themeColor, fontSize: iconSize}" style="font-size:11PX;color:#606266;margin-left:10PX" v-if="item[item.length-1].controltype === 5"></i>
43
43
  <div v-if="presetStageIndex === index + 1" style="color:red;width:50px;position:absolute;right:0px;bottom:5px;font-size:11px;">{{presetText}}</div>
44
44
  </div>
45
45
  </div>
@@ -105,18 +105,40 @@ export default {
105
105
  StageHeight: {
106
106
  type: String,
107
107
  default: '80px'
108
- }
109
- },
110
- data () {
111
- return {
112
- showStyle:{
108
+ },
109
+ dirWidth: {
110
+ type: String,
111
+ default: '75PX'
112
+ },
113
+ dirHeight: {
114
+ type: String,
115
+ default: '75PX'
116
+ },
117
+ dirWidths: {
118
+ type: String,
119
+ default: '65PX'
120
+ },
121
+ dirHeights: {
122
+ type: String,
123
+ default: '65PX'
124
+ },
125
+ showStyle: {
126
+ type: Object,
127
+ default: () => ({
113
128
  top:'7PX',
114
129
  left:'13px'
115
- },
116
- showStyles:{
130
+ })
131
+ },
132
+ showStyles: {
133
+ type: Object,
134
+ default: () => ({
117
135
  top:'5PX',
118
136
  left:'12px'
119
- },
137
+ })
138
+ }
139
+ },
140
+ data () {
141
+ return {
120
142
  presetStageIndex: -1,
121
143
  side: {key: 'pedphase1653818707546719', phaseid: 1, id: 1, name: '东人行横道'},
122
144
  // stagesList: [],
@@ -150,9 +172,38 @@ export default {
150
172
  return {
151
173
  zoom: this.zoom
152
174
  }
175
+ },
176
+ iconSize () {
177
+ const fontsize = parseInt(this.dirWidth.replace(/px$/, ""));
178
+ return fontsize / 75 * 11 + 'px'
179
+ },
180
+ iconSize2 () {
181
+ const fontsize = parseInt(this.dirWidth.replace(/px$/, ""));
182
+ return fontsize / 75 * 16 + 'px'
183
+ },
184
+ numSize () {
185
+ const fontsize = parseInt(this.dirWidth.replace(/px$/, ""));
186
+ const newfontsize = fontsize / 75 * 12
187
+ if (newfontsize < 10) {
188
+ return 10 + 'px'
189
+ } else {
190
+ return newfontsize + 'px'
191
+ }
153
192
  }
154
193
  },
155
194
  watch: {
195
+ // phaseList: {
196
+ // handler: function (val, oldVal) {
197
+ // console.log(val, 'phaseList')
198
+ // // debugger
199
+ // }
200
+ // },
201
+ // crossStatusData: {
202
+ // handler: function (val, oldVal) {
203
+ // console.log(val, 'crossStatusData')
204
+ // // debugger
205
+ // }
206
+ // },
156
207
  preselectStages: {
157
208
  handler: function (val, oldVal) {
158
209
  if(this.preselectStages === -1 && this.preselectModel !== -1) {
@@ -1034,7 +1034,9 @@ export default {
1034
1034
  for (let j = 0; j < this.peoplestatus.length; j++) {
1035
1035
  if (showlist[0].peddirection[i].name === this.peoplestatus[j].name) {
1036
1036
  this.peoplestatus[j].isshow = true
1037
- this.peoplestatus[j].color = showlist[0].peddirection[i].color
1037
+ if (showlist[0].peddirection[i].color) {
1038
+ this.peoplestatus[j].color = showlist[0].peddirection[i].color
1039
+ }
1038
1040
  }
1039
1041
  }
1040
1042
  }
@@ -144,7 +144,7 @@ export default {
144
144
  // agentId: '12007_390',
145
145
  // agentId: '12014',
146
146
  reqUrl: 'http://192.168.13.103:10003/openatc',
147
- Token: 'eyJraWQiOiIxNzE1NzM1NTU3NjcxIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcxNTc3ODc1NywiaWF0IjoxNzE1NzM1NTU3fQ.7ED5tQWYBpdv7HcBjZ_KSZprkcstns9ybCCwcrj5qZQ',
147
+ Token: 'eyJraWQiOiIxNzE1ODM5MzY0NDQ2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcxNTg4MjU2NCwiaWF0IjoxNzE1ODM5MzY0fQ.WHWB7t9rw-GX8QkWq8TygTLSFpxSoG2QxUJTdblZVu8',
148
148
  // agentId: '30003-352',
149
149
  // reqUrl: 'https://kints-dev.devdolphin.com/openatc',
150
150
  // Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
@@ -19,8 +19,8 @@ export default {
19
19
  isShowMode: true,
20
20
  modeName: '交警遥控',
21
21
  controlName: '步进',
22
- agentId: 'jmlxhl',
23
- Token: 'eyJraWQiOiIxNzE1NzM1NTU3NjcxIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcxNTc3ODc1NywiaWF0IjoxNzE1NzM1NTU3fQ.7ED5tQWYBpdv7HcBjZ_KSZprkcstns9ybCCwcrj5qZQ',
22
+ agentId: 'cllzpl',
23
+ Token: 'eyJraWQiOiIxNzE1ODM5MzY0NDQ2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcxNTg4MjU2NCwiaWF0IjoxNzE1ODM5MzY0fQ.WHWB7t9rw-GX8QkWq8TygTLSFpxSoG2QxUJTdblZVu8',
24
24
  reqUrl: 'http://192.168.13.103:10003/openatc'
25
25
  }
26
26
  },