openatc-components 0.0.105 → 0.0.108

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.105",
3
+ "version": "0.0.108",
4
4
  "description": "A Vue.js project",
5
5
  "author": "openatc developer",
6
6
  "private": false,
@@ -70,10 +70,6 @@ export default {
70
70
  AgentId: {
71
71
  type: String,
72
72
  default: '0'
73
- },
74
- resizeMap: { // 重新获取容器大小,调整底图大小
75
- type: Boolean,
76
- default: false
77
73
  }
78
74
  },
79
75
  watch: {
@@ -120,13 +116,6 @@ export default {
120
116
  this.load('all')
121
117
  },
122
118
  deep: true
123
- },
124
- resizeMap: {
125
- handler: function (newval, oldval) {
126
- if (newval === true && oldval === false) {
127
- this.getParentSize()
128
- }
129
- }
130
119
  }
131
120
  },
132
121
  data () {
@@ -353,7 +342,7 @@ export default {
353
342
  this.handleReset()
354
343
  return new Promise((resolve, reject) => {
355
344
  getChannelizatonChart(this.AgentId).then(data => {
356
- this.$emit('getChannelizationSetting', data)
345
+ // this.$emit('getChannelizationSetting', data)
357
346
  if (!data.data.success) {
358
347
  // let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
359
348
  // if (data.data.data) {
@@ -482,6 +471,7 @@ export default {
482
471
  this.bodyDomWidth = this.bodyDomSize.width
483
472
  window.addEventListener('resize', () => {
484
473
  // 定义窗口大小变更通知事件
474
+ if (_this.$el.parentElement === null || _this.$el.parentElement === undefined) return
485
475
  _this.bodyDomSize.width = _this.$el.parentElement.clientWidth
486
476
  this.bodyDomWidth = this.bodyDomSize.width
487
477
  console.log('resize this.bodyDomSize.width', _this.bodyDomSize.width)
@@ -241,7 +241,6 @@ export default {
241
241
  this.handleReset()
242
242
  return new Promise((resolve, reject) => {
243
243
  getChannelizatonChart(this.AgentId).then(data => {
244
- this.$emit('getChannelizationSetting', data)
245
244
  if (!data.data.success) {
246
245
  // let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
247
246
  // if (data.data.data) {
@@ -275,6 +274,7 @@ export default {
275
274
  this.bodyDomWidth = this.bodyDomSize.width
276
275
  window.addEventListener('resize', () => {
277
276
  // 定义窗口大小变更通知事件
277
+ if (_this.$el.parentElement === null || _this.$el.parentElement === undefined) return
278
278
  _this.bodyDomSize.width = _this.$el.parentElement.clientWidth
279
279
  this.bodyDomWidth = this.bodyDomSize.width
280
280
  console.log('resize this.bodyDomSize.width', _this.bodyDomSize.width)
@@ -95,10 +95,6 @@ export default {
95
95
  controlName: {
96
96
  type: String,
97
97
  default: ''
98
- },
99
- resizeMap: { // 重新获取容器大小,调整底图大小
100
- type: Boolean,
101
- default: false
102
98
  }
103
99
  },
104
100
  watch: {
@@ -110,13 +106,6 @@ export default {
110
106
  },
111
107
  // 深度观察监听
112
108
  deep: true
113
- },
114
- resizeMap: {
115
- handler: function (newval, oldval) {
116
- if (newval === true && oldval === false) {
117
- this.getParentSize()
118
- }
119
- }
120
109
  }
121
110
  },
122
111
  created () {
@@ -145,6 +134,7 @@ export default {
145
134
  this.bodyDomWidth = this.bodyDomSize.width
146
135
  window.addEventListener('resize', () => {
147
136
  // 定义窗口大小变更通知事件
137
+ if (_this.$el.parentElement === null || _this.$el.parentElement === undefined) return
148
138
  _this.bodyDomSize.width = _this.$el.parentElement.clientWidth
149
139
  this.bodyDomWidth = this.bodyDomSize.width
150
140
  console.log('resize this.bodyDomSize.width', _this.bodyDomSize.width)
@@ -411,12 +411,10 @@ export default {
411
411
  this.newList = []
412
412
  if (Object.keys(this.controlData).length === 0 || this.phaseList.length === 0) return
413
413
  if (!this.controlData.phase) return
414
- // let cycle = this.controlData.cycle
415
414
  if (!this.controlData.rings) return
416
415
  let newValue = []
417
416
  for (let rings of this.controlData.rings) {
418
417
  let phase = this.controlData.phase
419
- // let list = []
420
418
  let obj = {}
421
419
  for (let key in rings.sequence) {
422
420
  obj[key] = rings.sequence[key]
@@ -438,45 +436,7 @@ export default {
438
436
  }
439
437
  })
440
438
  })
441
- // let currPhase = this.phaseList.filter((item) => {
442
- // if (item.id === sequ && item.controltype === 99) {
443
- // obj.controltype = item.controltype
444
- // }
445
- // return item.id === sequ
446
- // })[0]
447
- // if (currPhase) {
448
- // obj.redWidth = (currPhase.redclear / cycle * 100).toFixed(3) + '%'
449
- // obj.yellowWidth = (currPhase.yellow / cycle * 100).toFixed(3) + '%'
450
- // obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / cycle * 100).toFixed(3) + '%'
451
- // obj.flashgreen = (currPhase.flashgreen / cycle * 100).toFixed(3) + '%'
452
- // // obj.peddirection = currPhase.peddirection
453
- // let peddirections = []
454
- // for (let walk of this.sidewalkPhaseData) {
455
- // for (let ped of currPhase.peddirection) {
456
- // // if (stg === walk.phaseid) {
457
- // let objs = {}
458
- // objs.name = walk.name
459
- // objs.id = walk.id
460
- // if (ped === walk.id) {
461
- // peddirections.push(objs)
462
- // peddirections = Array.from(new Set(peddirections))
463
- // }
464
- // // }
465
- // }
466
- // }
467
- // obj.peddirection = peddirections
468
- // obj.split = split
469
- // obj.direction = currPhase.direction.map(item => {
470
- // return {
471
- // id: item,
472
- // color: '#454545'
473
- // }
474
- // })
475
- // list.push(obj)
476
- // }
477
439
  }
478
- // this.newList.push(list)
479
- // this.patternInfo = [...this.newList]
480
440
  }
481
441
  this.handleOverViewChange(newValue)
482
442
  },
@@ -544,11 +504,10 @@ export default {
544
504
  }
545
505
  })
546
506
  }
507
+ obj.split = split
547
508
  if (ring.sum) {
548
- obj.split = split
549
- obj.redWidth = (currPhase.redclear + ring.sum / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
509
+ obj.redWidth = ((currPhase.redclear + ring.sum) / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
550
510
  } else {
551
- obj.split = split
552
511
  obj.redWidth = (currPhase.redclear / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
553
512
  }
554
513
  obj.flashgreen = (currPhase.flashgreen / (this.max ? this.max : cycle) * 100).toFixed(3) + '%'
@@ -96,7 +96,7 @@ export default {
96
96
  // reqUrl: 'http://192.168.13.103:10003/openatc',
97
97
  agentId: '13001-460',
98
98
  reqUrl: 'http://192.168.13.105:11003/openatc',
99
- Token: 'eyJraWQiOiIxNjYwNjQwMDMyMzc0IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc0NzAzOTk3OCwiaWF0IjoxNjYwNjM5OTc4fQ.I2O7bJPOFWDU9ZE8BqE6p-fsn-Kuj2i0z5lRgvvkzgA',
99
+ Token: 'eyJraWQiOiIxNjYwMjgzMzQwMzM4IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc0NjY4MzM0MCwiaWF0IjoxNjYwMjgzMzQwfQ.xmgkrjwcdwT_miC3krjqL27Tv4txJ9FQuDEKlfWdtzU',
100
100
  // agentId: '30003-352',
101
101
  // reqUrl: 'https://kints-dev.devdolphin.com/openatc',
102
102
  // Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',