openatc-components 0.3.25 → 0.3.26
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/kisscomps/components/BoardCard/BoardCard.vue +5 -0
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +5 -1
- package/package/kisscomps/components/patternConfig/index.vue +0 -100
- package/package/kisscomps/components/patternConfig/planContent.vue +0 -1
- package/package/kisscomps/components/patternList/patternList.vue +5 -0
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/kisscomps/components/BoardCard/BoardCard.vue +5 -0
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +5 -1
- package/src/kisscomps/components/patternConfig/index.vue +0 -100
- package/src/kisscomps/components/patternConfig/planContent.vue +0 -1
- package/src/kisscomps/components/patternList/patternList.vue +5 -0
- package/src/node_modules/.package_versions.json +1 -0
package/package.json
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
<PatternStatus
|
|
11
11
|
:showBarrier="showBarrier"
|
|
12
12
|
:controlPhase="controlPhase"
|
|
13
|
+
:isShowTip="isShowTip"
|
|
13
14
|
:localPatternList="localPatternList"
|
|
14
15
|
:showCondition="showCondition"
|
|
15
16
|
:contrloType="contrloType"
|
|
@@ -71,6 +72,10 @@ export default {
|
|
|
71
72
|
stagesChange: {
|
|
72
73
|
type: Array
|
|
73
74
|
},
|
|
75
|
+
isShowTip: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: true
|
|
78
|
+
},
|
|
74
79
|
showBarrier: {
|
|
75
80
|
type: Boolean,
|
|
76
81
|
default: false
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<div style="position: relative;" :style="{'height': '34px','float':'left','width':((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%'}" v-for="(item,index2) in list" :key="index2" :class="item.mode===7?'direction': ''">
|
|
18
18
|
<div class="first-1" :class="item.mode === 8 ? 'mask' : item.mode === 9 ? 'yellowClass' : ''" :style="{'width':Number(item.greenWidth.replace('%', ''))/Number((((item.split+(item.sum?item.sum:0)) / (max?max:item.cycle) * 100) + '%').replace('%', ''))*100+'%','height':'34px','background':'#7ccc66'}">
|
|
19
19
|
<el-tooltip placement="top-start" effect="light">
|
|
20
|
-
<div slot="content">{{$t('openatccomponents.phase.phase')}}{{item.id}}:{{item.split}}</div>
|
|
20
|
+
<div slot="content" v-if="isShowTip">{{$t('openatccomponents.phase.phase')}}{{item.id}}:{{item.split}}</div>
|
|
21
21
|
<div style="cursor:pointer;">
|
|
22
22
|
<div class="ring-phase">
|
|
23
23
|
<!-- <patternwalksvg :showWalk="item.peddirection" :Width="'32'" :Height="'34'"></patternwalksvg> -->
|
|
@@ -131,6 +131,10 @@ export default {
|
|
|
131
131
|
}
|
|
132
132
|
},
|
|
133
133
|
props: {
|
|
134
|
+
isShowTip: {
|
|
135
|
+
type: Boolean,
|
|
136
|
+
default: true
|
|
137
|
+
},
|
|
134
138
|
cycleChange: {
|
|
135
139
|
type: Boolean,
|
|
136
140
|
default: true
|
|
@@ -12,7 +12,6 @@
|
|
|
12
12
|
<template>
|
|
13
13
|
<div class="patternConfig">
|
|
14
14
|
<el-container v-if="!isShowSingle" >
|
|
15
|
-
<!-- <el-main> -->
|
|
16
15
|
<div class="main-container" style="height: 100%;width: 100%;">
|
|
17
16
|
<el-tabs v-model="editableTabsValue" type="card" @edit="handleTabsEdit" :before-leave="beforeLeave" style="height: 100%;">
|
|
18
17
|
<el-tab-pane
|
|
@@ -53,14 +52,6 @@
|
|
|
53
52
|
</el-tab-pane>
|
|
54
53
|
</el-tabs>
|
|
55
54
|
</div>
|
|
56
|
-
<!-- <div style="display:flex;justify-content:center;">
|
|
57
|
-
<el-button type="primary" @click="onChartClick" plain>{{$t('openatccomponents.greenwaveoptimize.spaceGraph')}}</el-button>
|
|
58
|
-
<el-button type="primary" @click="onGenerateClick" plain>{{$t('openatccomponents.greenwaveoptimize.generate')}}</el-button>
|
|
59
|
-
<el-button type="primary" @click="onSaveClick" plain>{{$t('openatccomponents.common.save')}}</el-button>
|
|
60
|
-
<el-button type="primary" @click="onExecuteClick" plain>{{$t('openatc.dutyroute.executen')}}</el-button>
|
|
61
|
-
<el-button type="primary" @click="onDownloadClick" plain>{{$t('openatc.button.download')}}</el-button>
|
|
62
|
-
</div> -->
|
|
63
|
-
<!-- </el-main> -->
|
|
64
55
|
</el-container>
|
|
65
56
|
<div v-if="isShowSingle" style="height: 94%;" class="table-container">
|
|
66
57
|
<PatternTable ref="patterntable"
|
|
@@ -78,33 +69,22 @@
|
|
|
78
69
|
@handlePatternTable="handlePatternTable"
|
|
79
70
|
@ErrorOcurrred='onErrorOcurrred'
|
|
80
71
|
@resetContentComponent="resetContentComponent"/>
|
|
81
|
-
<!-- <chartDialog ref="chartDialog" ></chartDialog> -->
|
|
82
|
-
<!-- <PlanExecute ref="planExecute" ></PlanExecute> -->
|
|
83
72
|
</div>
|
|
84
73
|
</template>
|
|
85
74
|
|
|
86
75
|
<script>
|
|
87
|
-
// import PlanMenu from './planMenu'
|
|
88
76
|
import PlanContent from './planContent'
|
|
89
|
-
// import { GetAllRoute } from '../../../api/route'
|
|
90
|
-
// import chartDialog from './pattern/planChart/chartDialog'
|
|
91
77
|
import { getMessageByCode } from '../../../utils/responseMessage'
|
|
92
78
|
import PatternTable from './pattern/patternTable'
|
|
93
79
|
import dateObj from './utils.js'
|
|
94
|
-
// import routeChart from './pattern/planChart/index'
|
|
95
|
-
// import PlanExecute from './components/planExecute'
|
|
96
80
|
import { GetDeviceByIds } from '../../../api/device.js'
|
|
97
81
|
import { getAllPatternOfDevs } from '../../../api/route'
|
|
98
82
|
const { monthsModel, daysModelCh, daysModelEn, datesModel, monthsModelEn, datesModelEn } = dateObj
|
|
99
83
|
export default {
|
|
100
84
|
name: 'PatternConfig',
|
|
101
85
|
components: {
|
|
102
|
-
// routeChart,
|
|
103
86
|
PatternTable,
|
|
104
|
-
// PlanMenu,
|
|
105
87
|
PlanContent
|
|
106
|
-
// chartDialog,
|
|
107
|
-
// PlanExecute
|
|
108
88
|
},
|
|
109
89
|
props: {
|
|
110
90
|
agentids: {
|
|
@@ -273,29 +253,16 @@ export default {
|
|
|
273
253
|
devs: devs
|
|
274
254
|
}
|
|
275
255
|
let optPatternList
|
|
276
|
-
// console.log('_this.opt', _this.opt)
|
|
277
|
-
// console.log('_this.optPatternList', _this.opt.optPatternList)
|
|
278
|
-
// console.log('_this.length', _this.opt.optPatternList.length)
|
|
279
256
|
if (_this.opt && _this.opt.optPatternList && _this.opt.optPatternList.length > 0) {
|
|
280
257
|
route = _this.opt.optPatternList[0]
|
|
281
258
|
let arr = []
|
|
282
259
|
for (let dev of route.devs) {
|
|
283
260
|
arr.push(dev.agentid)
|
|
284
261
|
}
|
|
285
|
-
// console.log('arr.length', arr)
|
|
286
|
-
// console.log('this.agentids', this.agentids)
|
|
287
|
-
// console.log('this.len', arr.length === this.agentids.length)
|
|
288
|
-
// console.log('this.jon', arr.join('') !== this.agentids.join(''))
|
|
289
|
-
// console.log('this.jon', arr.join(''), this.agentids.join(''))
|
|
290
|
-
// if (arr.length === this.agentids.length && arr.join('') !== this.agentids.join('')) {
|
|
291
262
|
if (arr.length === this.agentids.length) {
|
|
292
263
|
optPatternList = _this.opt.optPatternList
|
|
293
|
-
// check and reset data
|
|
294
|
-
// console.log('checkAndResetListBefore', optPatternList)
|
|
295
264
|
let opt = await this.checkAndResetList(optPatternList)
|
|
296
|
-
// console.log('checkAndResetListAfter.opt', optPatternList)
|
|
297
265
|
optPatternList = opt.optPatternList
|
|
298
|
-
// console.log('checkAndResetListAfter', optPatternList)
|
|
299
266
|
}
|
|
300
267
|
}
|
|
301
268
|
this.route = route
|
|
@@ -445,60 +412,14 @@ export default {
|
|
|
445
412
|
if (this.chooseId === 0) {
|
|
446
413
|
return false
|
|
447
414
|
}
|
|
448
|
-
// let {routeData, patternList, greenwave, allPatternList} = {...this.chartData}
|
|
449
|
-
// this.$refs.routeChart.onPlanChart(routeData, patternList, greenwave, allPatternList)
|
|
450
|
-
},
|
|
451
|
-
onChartClick () {
|
|
452
|
-
let routeData = this.editableTabs[this.currentIndex]
|
|
453
|
-
let check = this.checkData([routeData], false)
|
|
454
|
-
if (!check) {
|
|
455
|
-
return false
|
|
456
|
-
}
|
|
457
|
-
this.getDeviceByIds(routeData)
|
|
458
|
-
},
|
|
459
|
-
onGenerateClick () {
|
|
460
|
-
let routeData = this.editableTabs[this.currentIndex]
|
|
461
|
-
// check
|
|
462
|
-
let check = this.checkData([routeData], false)
|
|
463
|
-
if (!check) {
|
|
464
|
-
return false
|
|
465
|
-
}
|
|
466
|
-
let planContent = this.$refs.planContent
|
|
467
|
-
planContent.handleCreate(routeData)
|
|
468
415
|
},
|
|
469
416
|
checkData (tabs, isCheckName = true) {
|
|
470
417
|
let res = true
|
|
471
|
-
// if (this.chooseId === 0) {
|
|
472
418
|
if (this.agentids.length === 0) {
|
|
473
419
|
this.$message.warning(this.$t('openatccomponents.greenwaveoptimize.chooseRoute'))
|
|
474
420
|
return false
|
|
475
421
|
}
|
|
476
422
|
for (let tab of tabs) {
|
|
477
|
-
// if (!tab.optstrategy) {
|
|
478
|
-
// this.$message.warning(this.$t('openatccomponents.greenwaveoptimize.pleaseChoseOptstrategy'))
|
|
479
|
-
// return false
|
|
480
|
-
// }
|
|
481
|
-
// if (isCheckName && !tab.name) {
|
|
482
|
-
// this.$message.warning(this.$t('openatccomponents.greenwaveoptimize.pleaseInputPatternName'))
|
|
483
|
-
// return false
|
|
484
|
-
// }
|
|
485
|
-
// let filterList = tabs.filter(item => item.name === tab.name)
|
|
486
|
-
// if (filterList.length > 1) {
|
|
487
|
-
// this.$message.warning(this.$t('openatccomponents.greenwaveoptimize.repeatPatternName'))
|
|
488
|
-
// return false
|
|
489
|
-
// }
|
|
490
|
-
// if (!tab.keyintsid) {
|
|
491
|
-
// this.$message.warning(this.$t('openatccomponents.greenwaveoptimize.pleaseChoseKeyintersection'))
|
|
492
|
-
// return false
|
|
493
|
-
// }
|
|
494
|
-
// if (!tab.upspeed) {
|
|
495
|
-
// this.$message.warning(this.$t('openatccomponents.greenwaveoptimize.pleaseInputUpspeed'))
|
|
496
|
-
// return false
|
|
497
|
-
// }
|
|
498
|
-
// if (!tab.downspeed) {
|
|
499
|
-
// this.$message.warning(this.$t('openatccomponents.greenwaveoptimize.pleaseInputDownspeed'))
|
|
500
|
-
// return false
|
|
501
|
-
// }
|
|
502
423
|
if (!tab.devs || tab.devs.length === 0) {
|
|
503
424
|
this.$message.warning(this.$t('openatccomponents.greenwaveoptimize.abnormalIntersections'))
|
|
504
425
|
return false
|
|
@@ -726,10 +647,6 @@ export default {
|
|
|
726
647
|
this.$message.warning(this.$t('openatccomponents.greenwaveoptimize.onlyOneTab'))
|
|
727
648
|
return false
|
|
728
649
|
}
|
|
729
|
-
// if (!this.route || !this.route.id) {
|
|
730
|
-
// this.$message.warning(this.$t('openatccomponents.greenwaveoptimize.routeDeviceNotOnline'))
|
|
731
|
-
// return false
|
|
732
|
-
// }
|
|
733
650
|
this.addTab()
|
|
734
651
|
return false
|
|
735
652
|
}
|
|
@@ -829,17 +746,6 @@ export default {
|
|
|
829
746
|
this.reset = true
|
|
830
747
|
})
|
|
831
748
|
},
|
|
832
|
-
// getAllPlan () {
|
|
833
|
-
// this.loading = true
|
|
834
|
-
// GetAllRoute().then(res => {
|
|
835
|
-
// this.loading = false
|
|
836
|
-
// if (!res.data.success) {
|
|
837
|
-
// this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
|
|
838
|
-
// return
|
|
839
|
-
// }
|
|
840
|
-
// this.planData = res.data.data
|
|
841
|
-
// })
|
|
842
|
-
// },
|
|
843
749
|
resetTab () {
|
|
844
750
|
this.editableTabs = [
|
|
845
751
|
{
|
|
@@ -889,12 +795,6 @@ export default {
|
|
|
889
795
|
this.editableTabs[0].devs = this.route.devs
|
|
890
796
|
}
|
|
891
797
|
this.tabIndex = this.editableTabs.length
|
|
892
|
-
// this.keyintsidOptions = route.devs.map(item => {
|
|
893
|
-
// return {
|
|
894
|
-
// label: item.name,
|
|
895
|
-
// value: item.agentid
|
|
896
|
-
// }
|
|
897
|
-
// })
|
|
898
798
|
this.initPatternList(id, agentids)
|
|
899
799
|
},
|
|
900
800
|
chooseRoute (id, route, agentids) {
|
|
@@ -46,7 +46,6 @@ import PatternTable from './pattern/patternTable'
|
|
|
46
46
|
// import PlanChart from './pattern/planChart/index'
|
|
47
47
|
import { GetRouteInfo,
|
|
48
48
|
getAllPatternOfDevs, getAllPhaseOfDevs,
|
|
49
|
-
// getAllPatternOfRoute, getAllPhaseOfRoute,
|
|
50
49
|
generateRoute, updateRoutePattern, downloadRoutePattern, deleteRoutePattern } from '../../../api/route'
|
|
51
50
|
import Messagebox from '../../components/MessageBox/index'
|
|
52
51
|
import { getMessageByCode } from '../../../utils/responseMessage'
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
:patternId="patternId"
|
|
5
5
|
:contrloType="contrloType"
|
|
6
6
|
:stagesChange="stagesChange"
|
|
7
|
+
:isShowTip="isShowTip"
|
|
7
8
|
:patternStatusList="patternStatusList"
|
|
8
9
|
:cycles="cycles"
|
|
9
10
|
:cycle="cycle"
|
|
@@ -497,6 +498,10 @@ export default {
|
|
|
497
498
|
}
|
|
498
499
|
},
|
|
499
500
|
props: {
|
|
501
|
+
isShowTip: {
|
|
502
|
+
type: Boolean,
|
|
503
|
+
default: true
|
|
504
|
+
},
|
|
500
505
|
contrloType: {
|
|
501
506
|
type: String
|
|
502
507
|
},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|