openatc-components 0.3.86 → 0.3.88
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.
|
@@ -51,14 +51,14 @@
|
|
|
51
51
|
<span>{{scope.row.agentid}}</span>
|
|
52
52
|
</template>
|
|
53
53
|
</el-table-column>
|
|
54
|
-
<el-table-column align="center" :label="$t('openatccomponents.
|
|
54
|
+
<el-table-column align="center" :label="$t('openatccomponents.overview.crossname')" width="120" minWidth="40" v-if="isShowColumn('name')">
|
|
55
55
|
<template slot-scope="scope">
|
|
56
|
-
<span>{{
|
|
56
|
+
<span>{{getDevName(scope.row)}}</span>
|
|
57
57
|
</template>
|
|
58
58
|
</el-table-column>
|
|
59
|
-
<el-table-column align="center" :label="$t('openatccomponents.
|
|
59
|
+
<el-table-column align="center" :label="$t('openatccomponents.greenwaveoptimize.period')" width="100" minWidth="40" v-if="isShowColumn('period')">
|
|
60
60
|
<template slot-scope="scope">
|
|
61
|
-
<span>{{
|
|
61
|
+
<span>{{getPeriod(scope.row)}}</span>
|
|
62
62
|
</template>
|
|
63
63
|
</el-table-column>
|
|
64
64
|
<el-table-column property="isValid" :label="$t('openatccomponents.token.isValid')" align="center" width="80" prop="isused" v-if="isShowColumn('isused')">
|
|
@@ -200,7 +200,9 @@ export default {
|
|
|
200
200
|
},
|
|
201
201
|
watch: {
|
|
202
202
|
maxTableHeight: function () {
|
|
203
|
-
this
|
|
203
|
+
this.$nextTick(() => {
|
|
204
|
+
this.tableHeight = this.maxTableHeight // 动态更新高度
|
|
205
|
+
})
|
|
204
206
|
},
|
|
205
207
|
optList: {
|
|
206
208
|
handler: function (val) {
|
|
@@ -221,11 +223,6 @@ export default {
|
|
|
221
223
|
}
|
|
222
224
|
},
|
|
223
225
|
mounted: function () {
|
|
224
|
-
// var _this = this
|
|
225
|
-
// _this.$nextTick(function () {
|
|
226
|
-
// _this.tableHeight = _this.maxTableHeight
|
|
227
|
-
// })
|
|
228
|
-
// _this.tableHeight = _this.maxTableHeight
|
|
229
226
|
},
|
|
230
227
|
methods: {
|
|
231
228
|
onOptimizeClick (row, index) {
|
|
@@ -316,7 +313,7 @@ export default {
|
|
|
316
313
|
return res
|
|
317
314
|
},
|
|
318
315
|
getPeriod (row) {
|
|
319
|
-
let period = row.
|
|
316
|
+
let period = row.timeperiodrange || row.period
|
|
320
317
|
let res = ''
|
|
321
318
|
if (period && period.length > 0) {
|
|
322
319
|
res = period[0].substring(0, 5) + '-' + period[1].substring(0, 5)
|
|
@@ -345,9 +342,30 @@ export default {
|
|
|
345
342
|
// this.phaseList = phaseList
|
|
346
343
|
this.handlePatternList(routeData, patternList, phaseList)
|
|
347
344
|
},
|
|
345
|
+
// 依据anengid获取设备信息,同时兼容单路口数据按序index取值
|
|
346
|
+
getDevFromDevsOrIndex (devs, agentid, index) {
|
|
347
|
+
let res
|
|
348
|
+
// check special
|
|
349
|
+
let isSingleCrossMode = false
|
|
350
|
+
if (devs && devs.length > 1 && devs[0].agentid === devs[1].agentid) {
|
|
351
|
+
isSingleCrossMode = true
|
|
352
|
+
// check errData
|
|
353
|
+
if (index === undefined || index === null) {
|
|
354
|
+
console.log('getDevFromDevsOrIndex Err: index is null')
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
if (!isSingleCrossMode) {
|
|
358
|
+
res = devs.filter(ist => ist.agentid === agentid)[0]
|
|
359
|
+
} else {
|
|
360
|
+
res = devs[index]
|
|
361
|
+
console.log('getDevByIndex:', res)
|
|
362
|
+
}
|
|
363
|
+
return res
|
|
364
|
+
},
|
|
348
365
|
handlePatternList (routeData, patternList, phaseList) {
|
|
349
366
|
this.newPatternList = []
|
|
350
367
|
let devs = routeData.devs
|
|
368
|
+
let index = 0
|
|
351
369
|
for (let pattern of patternList) {
|
|
352
370
|
let obj = {}
|
|
353
371
|
let id = pattern.agentid
|
|
@@ -355,7 +373,9 @@ export default {
|
|
|
355
373
|
let count = [] // 计算相位有几个环
|
|
356
374
|
if (pattern.feature !== undefined && pattern.feature.patternList.length !== 0) {
|
|
357
375
|
let currPatternList = pattern.feature.patternList
|
|
358
|
-
let dev = devs.filter(ist => ist.agentid === id)[0]
|
|
376
|
+
// let dev = devs.filter(ist => ist.agentid === id)[0]
|
|
377
|
+
let dev = this.getDevFromDevsOrIndex(devs, id, index)
|
|
378
|
+
index = index + 1
|
|
359
379
|
let patternId = dev.patternid
|
|
360
380
|
let currPattern
|
|
361
381
|
if (Array.isArray(currPatternList)) {
|