openatc-components 0.3.16 → 0.3.18
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/PhaseLegend/PhaseLegend.vue +290 -0
- package/package/kisscomps/components/PhaseLegend/index.js +2 -0
- package/package/kisscomps/index.js +3 -1
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/api/cross.js +0 -4
- package/src/kisscomps/components/PhaseLegend/PhaseLegend.vue +290 -0
- package/src/kisscomps/components/PhaseLegend/index.js +2 -0
- package/src/kisscomps/index.js +3 -1
- package/src/utils/RingDataModel.js +18 -7
- package/src/views/intersection.vue +42 -3
- package/static/styles/phasePedSelect.scss +1 -0
- package/static/styles/stages.scss +2 -2
package/package.json
CHANGED
package/src/api/cross.js
CHANGED
|
@@ -22,10 +22,6 @@ export const getDuration = (data) => {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export const getChannelizatonChart = (agentid) => {
|
|
25
|
-
if (!agentid || agentid === '0') {
|
|
26
|
-
console.log('getChannelizatonChart agentid:', agentid)
|
|
27
|
-
return false
|
|
28
|
-
}
|
|
29
25
|
let api = new Authapi('getChannelizatonChart')
|
|
30
26
|
return api.Send({}, {}, [agentid])
|
|
31
27
|
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2020 kedacom
|
|
3
|
+
* OpenATC is licensed under Mulan PSL v2.
|
|
4
|
+
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
|
5
|
+
* You may obtain a copy of Mulan PSL v2 at:
|
|
6
|
+
* http://license.coscl.org.cn/MulanPSL2
|
|
7
|
+
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
|
8
|
+
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
|
9
|
+
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
|
10
|
+
* See the Mulan PSL v2 for more details.
|
|
11
|
+
**/
|
|
12
|
+
<template>
|
|
13
|
+
<div id="intersection-phases" class="intersection-phases" :style="PhaseStyle">
|
|
14
|
+
<div>
|
|
15
|
+
<div style="width: 100%; height: auto;">
|
|
16
|
+
<div class="control-model" v-for="(item, index) in PhaseList" :key="index">
|
|
17
|
+
<div style="position:relative;" :style="{...singleStyle, 'backgroundColor': item[0].bgcolor}" class="single-model" @click="selectLegend(index + 1)" :class="currentStage == index + 1 ? 'single-model-select' : ''">
|
|
18
|
+
<xdr-dir-selector :Width="dirWidth" :Height="dirHeight" :Widths="dirWidths" :Heights="dirHeights" :Data="showStyle" :Datas="showStyles" :showlist="dirListSetTheme(item)"></xdr-dir-selector>
|
|
19
|
+
<div style="display:flex;flex-direction:row;justify-content:center;align-items:end;" :style="{height: StageHeight}">
|
|
20
|
+
<div class="current-stage-num" style="width:25%;" :style="{color: themeColor, fontSize: numSize}">{{item[0].phaseid}}</div>
|
|
21
|
+
<div style="width:70%;">
|
|
22
|
+
<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>
|
|
23
|
+
<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>
|
|
24
|
+
<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>
|
|
25
|
+
<div style="transform:scale(0.65);margin-left:10PX">
|
|
26
|
+
<i class="iconfont icon-xuxiangwei-xin" :style="{color: themeColor2}" style="font-size:5PX;color:#454545;" v-if="item[item.length-1].controltype === 99"></i>
|
|
27
|
+
</div>
|
|
28
|
+
<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>
|
|
29
|
+
<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>
|
|
30
|
+
<div v-if="presetStageIndex === index + 1" style="color:red;width:50px;position:absolute;right:0px;bottom:5px;font-size:11px;">{{presetText}}</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script>
|
|
41
|
+
/* eslint-disable */
|
|
42
|
+
import RingDataModel from '../../../utils/RingDataModel.js'
|
|
43
|
+
import { getTheme } from '../../../utils/auth.js'
|
|
44
|
+
|
|
45
|
+
export default {
|
|
46
|
+
name: 'PhaseLegend',
|
|
47
|
+
props: {
|
|
48
|
+
isShowCurrentStage: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: true
|
|
51
|
+
},
|
|
52
|
+
crossStatusData: {
|
|
53
|
+
type: Object,
|
|
54
|
+
default: () => {}
|
|
55
|
+
},
|
|
56
|
+
phaseList: {
|
|
57
|
+
type: Array,
|
|
58
|
+
default: () => []
|
|
59
|
+
},
|
|
60
|
+
presetText: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: '预置'
|
|
63
|
+
},
|
|
64
|
+
presetIndex: {
|
|
65
|
+
type: Number,
|
|
66
|
+
default: -1
|
|
67
|
+
},
|
|
68
|
+
preselectStages:{
|
|
69
|
+
type: Number,
|
|
70
|
+
default: -1
|
|
71
|
+
},
|
|
72
|
+
preselectModel:{
|
|
73
|
+
type: Number,
|
|
74
|
+
default: -1
|
|
75
|
+
},
|
|
76
|
+
presetPhaseId: {
|
|
77
|
+
type: Number,
|
|
78
|
+
default: -1
|
|
79
|
+
},
|
|
80
|
+
zoom: {
|
|
81
|
+
type: Number,
|
|
82
|
+
default: 1
|
|
83
|
+
},
|
|
84
|
+
StageWidth: { // 图的大小样式
|
|
85
|
+
type: String,
|
|
86
|
+
default: '70px'
|
|
87
|
+
},
|
|
88
|
+
StageHeight: {
|
|
89
|
+
type: String,
|
|
90
|
+
default: '80px'
|
|
91
|
+
},
|
|
92
|
+
dirWidth: {
|
|
93
|
+
type: String,
|
|
94
|
+
default: '75PX'
|
|
95
|
+
},
|
|
96
|
+
dirHeight: {
|
|
97
|
+
type: String,
|
|
98
|
+
default: '75PX'
|
|
99
|
+
},
|
|
100
|
+
dirWidths: {
|
|
101
|
+
type: String,
|
|
102
|
+
default: '65PX'
|
|
103
|
+
},
|
|
104
|
+
dirHeights: {
|
|
105
|
+
type: String,
|
|
106
|
+
default: '65PX'
|
|
107
|
+
},
|
|
108
|
+
showStyle: { // 图内部方向的位置
|
|
109
|
+
type: Object,
|
|
110
|
+
default: () => ({
|
|
111
|
+
top:'7PX',
|
|
112
|
+
left:'13px'
|
|
113
|
+
})
|
|
114
|
+
},
|
|
115
|
+
showStyles: { // 图内部人行道的位置
|
|
116
|
+
type: Object,
|
|
117
|
+
default: () => ({
|
|
118
|
+
top:'5PX',
|
|
119
|
+
left:'12px'
|
|
120
|
+
})
|
|
121
|
+
},
|
|
122
|
+
noClick: { // 图是否可以点击
|
|
123
|
+
type: Boolean,
|
|
124
|
+
default: false
|
|
125
|
+
},
|
|
126
|
+
showDataType: { // 图展示的数据类型:默认按阶段展示,如果传phase则按相位维度展示
|
|
127
|
+
type: String
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
data () {
|
|
131
|
+
return {
|
|
132
|
+
presetStageIndex: -1,
|
|
133
|
+
side: {key: 'pedphase1653818707546719', phaseid: 1, id: 1, name: '东人行横道'},
|
|
134
|
+
// PhaseList: [],
|
|
135
|
+
currentStage: -1,
|
|
136
|
+
themeColor: getTheme() === 'light' ? '#606266' : '#fff',
|
|
137
|
+
themeColor2: getTheme() === 'light' ? '#454545' : '#fff'
|
|
138
|
+
};
|
|
139
|
+
},
|
|
140
|
+
computed: {
|
|
141
|
+
singleStyle () {
|
|
142
|
+
return {
|
|
143
|
+
width: this.StageWidth,
|
|
144
|
+
height: this.StageHeight
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
PhaseList () {
|
|
148
|
+
let list = []
|
|
149
|
+
if (this.crossStatusData && this.crossStatusData.stages && this.phaseList && this.phaseList.length > 0) {
|
|
150
|
+
let ringDataModel = new RingDataModel(this.crossStatusData, this.phaseList)
|
|
151
|
+
if (this.showDataType === 'phase') {
|
|
152
|
+
list = ringDataModel.getStageData('phase')
|
|
153
|
+
} else {
|
|
154
|
+
list = ringDataModel.getStageData()
|
|
155
|
+
}
|
|
156
|
+
if (this.isShowCurrentStage) {
|
|
157
|
+
this.currentStage = this.crossStatusData.current_stage
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
console.log(list,'list')
|
|
161
|
+
this.clickType(list, this.currentStage)
|
|
162
|
+
console.log(this.phaseList,'this.phaseList')
|
|
163
|
+
return list
|
|
164
|
+
},
|
|
165
|
+
PhaseStyle () {
|
|
166
|
+
return {
|
|
167
|
+
zoom: this.zoom
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
iconSize () {
|
|
171
|
+
const fontsize = parseInt(this.dirWidth.replace(/px$/, ""));
|
|
172
|
+
return fontsize / 75 * 11 + 'px'
|
|
173
|
+
},
|
|
174
|
+
iconSize2 () {
|
|
175
|
+
const fontsize = parseInt(this.dirWidth.replace(/px$/, ""));
|
|
176
|
+
return fontsize / 75 * 16 + 'px'
|
|
177
|
+
},
|
|
178
|
+
numSize () {
|
|
179
|
+
const fontsize = parseInt(this.dirWidth.replace(/px$/, ""));
|
|
180
|
+
const newfontsize = fontsize / 75 * 12
|
|
181
|
+
if (newfontsize < 10) {
|
|
182
|
+
return 10 + 'px'
|
|
183
|
+
} else {
|
|
184
|
+
return newfontsize + 'px'
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
},
|
|
188
|
+
watch: {
|
|
189
|
+
preselectStages: {
|
|
190
|
+
handler: function (val, oldVal) {
|
|
191
|
+
if(this.preselectStages === -1 && this.preselectModel !== -1) {
|
|
192
|
+
this.currentStage = -1
|
|
193
|
+
}
|
|
194
|
+
},
|
|
195
|
+
// 深度观察监听
|
|
196
|
+
deep: true
|
|
197
|
+
},
|
|
198
|
+
preselectModel: {
|
|
199
|
+
handler: function (val, oldVal) {
|
|
200
|
+
if(this.preselectStages === -1 && this.preselectModel !== -1) {
|
|
201
|
+
this.currentStage = -1
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
// 深度观察监听
|
|
205
|
+
deep: true
|
|
206
|
+
},
|
|
207
|
+
PhaseList: {
|
|
208
|
+
handler: function (val, oldVal) {
|
|
209
|
+
if (this.presetPhaseId > -1) {
|
|
210
|
+
this.presetStageIndex = this.getComputedPresetIndex()
|
|
211
|
+
} else {
|
|
212
|
+
this.presetStageIndex = this.presetIndex
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
// 深度观察监听
|
|
216
|
+
deep: true
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
methods: {
|
|
220
|
+
getComputedPresetIndex() {
|
|
221
|
+
let res = -1
|
|
222
|
+
for (let i = 0; i < this.PhaseList.length; i++) {
|
|
223
|
+
let stage = this.PhaseList[i]
|
|
224
|
+
for (let phase of stage) {
|
|
225
|
+
let phaseId = phase.id
|
|
226
|
+
if (phaseId === this.presetPhaseId) {
|
|
227
|
+
res = i
|
|
228
|
+
break
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
if (res > -1) {
|
|
232
|
+
res = res + 1
|
|
233
|
+
break
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
return res
|
|
237
|
+
},
|
|
238
|
+
selectLegend (value) {
|
|
239
|
+
if (this.noClick) return
|
|
240
|
+
if (this.isShowCurrentStage) {
|
|
241
|
+
return false
|
|
242
|
+
}
|
|
243
|
+
this.currentStage = value
|
|
244
|
+
this.$emit('onSelectStages', value)
|
|
245
|
+
this.clickType(this.PhaseList, value)
|
|
246
|
+
},
|
|
247
|
+
resetToDefaultThemeColor (List) {
|
|
248
|
+
for (let i = 0; i < List.length; i++) {
|
|
249
|
+
if (List[i].length) {
|
|
250
|
+
if (List[i][0].clicked) {
|
|
251
|
+
delete List[i][0].clicked
|
|
252
|
+
}
|
|
253
|
+
List[i][0].bgcolor = getTheme() === 'light' ? '#edf6ff' : '#243d59'
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
highlightThemeColor (List, index) {
|
|
258
|
+
for (let i = 0; i < List.length; i++) {
|
|
259
|
+
if (i === index) {
|
|
260
|
+
List[i][0].clicked = true
|
|
261
|
+
List[i][0].bgcolor = getTheme() === 'light' ? '#c1e0ff' : '#0082ac'
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
},
|
|
265
|
+
clickType (stagelist, value) {
|
|
266
|
+
this.resetToDefaultThemeColor(stagelist)
|
|
267
|
+
this.highlightThemeColor(stagelist, value - 1)
|
|
268
|
+
},
|
|
269
|
+
dirListSetTheme (list) {
|
|
270
|
+
let dirArr = []
|
|
271
|
+
let color = getTheme() === 'light' ? '#606266' : '#F1F3F4'
|
|
272
|
+
let pedColor = getTheme() === 'light' ? '#606266' : 'rgba(255, 255, 255, 0.6)'
|
|
273
|
+
for (let rec of list) {
|
|
274
|
+
let recd = {
|
|
275
|
+
...rec,
|
|
276
|
+
color: color
|
|
277
|
+
}
|
|
278
|
+
dirArr.push(recd)
|
|
279
|
+
for(let i=0;i<rec.peddirection.length;i++) {
|
|
280
|
+
rec.peddirection[i].color = pedColor
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
return dirArr
|
|
284
|
+
}
|
|
285
|
+
},
|
|
286
|
+
mounted () {
|
|
287
|
+
this.resetToDefaultThemeColor(this.PhaseList)
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
</script>
|
package/src/kisscomps/index.js
CHANGED
|
@@ -31,6 +31,7 @@ import patternConfig from './components/patternConfig/index.vue'
|
|
|
31
31
|
import XiaoKanBan from './components/XiaoKanBan/index.vue'
|
|
32
32
|
import DirectionListConfiguration from './components/DirectionListConfiguration/index.js'
|
|
33
33
|
import IntersectionDirectionSelection from './components/IntersectionDirectionSelection/index.js'
|
|
34
|
+
import PhaseLegend from './components/PhaseLegend/index.js'
|
|
34
35
|
import { setToken, setHost, setIsCheckPermission, setUserRoles, setPermissions } from '../utils/auth.js'
|
|
35
36
|
import componentsGlobalParam from '../store/modules/globalParam'
|
|
36
37
|
|
|
@@ -71,7 +72,8 @@ const components = {
|
|
|
71
72
|
XiaoKanBan,
|
|
72
73
|
PhaseDirectionSelect,
|
|
73
74
|
DirectionListConfiguration,
|
|
74
|
-
IntersectionDirectionSelection
|
|
75
|
+
IntersectionDirectionSelection,
|
|
76
|
+
PhaseLegend
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
const language = {
|
|
@@ -197,6 +197,7 @@ export default class RingDataModel {
|
|
|
197
197
|
for (let stage of stages) {
|
|
198
198
|
let tempList = []
|
|
199
199
|
let directionList = []
|
|
200
|
+
let currPhaseid = ''
|
|
200
201
|
let stageControType = 0
|
|
201
202
|
let peddirections = []
|
|
202
203
|
for (let stg of stage) {
|
|
@@ -207,6 +208,9 @@ export default class RingDataModel {
|
|
|
207
208
|
if (!currPhase) return
|
|
208
209
|
if (currPhase !== undefined && phaseMode[0].mode !== 1) {
|
|
209
210
|
directionList = [...currPhase.direction, ...directionList]
|
|
211
|
+
if (datatype === 'phase') {
|
|
212
|
+
currPhaseid = stg
|
|
213
|
+
}
|
|
210
214
|
}
|
|
211
215
|
if (currPhase.peddirection) {
|
|
212
216
|
for (let walk of sidewalkPhaseData) {
|
|
@@ -232,13 +236,20 @@ export default class RingDataModel {
|
|
|
232
236
|
}
|
|
233
237
|
}
|
|
234
238
|
directionList = [...new Set(directionList)]
|
|
235
|
-
tempList = directionList.map(dir =>
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
239
|
+
tempList = directionList.map(dir => {
|
|
240
|
+
let temp = {
|
|
241
|
+
id: dir,
|
|
242
|
+
phaseid: currPhaseid,
|
|
243
|
+
color: '#606266',
|
|
244
|
+
controltype: stageControType,
|
|
245
|
+
peddirection: peddirections,
|
|
246
|
+
sidewalkPhaseData: sidewalkPhaseData
|
|
247
|
+
}
|
|
248
|
+
if (datatype === 'phase') {
|
|
249
|
+
temp.phaseid = currPhaseid
|
|
250
|
+
}
|
|
251
|
+
return temp
|
|
252
|
+
})
|
|
242
253
|
if (directionList.length === 0) {
|
|
243
254
|
tempList = [
|
|
244
255
|
{
|
|
@@ -106,6 +106,22 @@
|
|
|
106
106
|
<!-- <Stages :stagesList="stagesList"
|
|
107
107
|
:currentStage="currentStage"
|
|
108
108
|
@onSelectStages="onSelectStages"></Stages> -->
|
|
109
|
+
<div style="height: 100px;">
|
|
110
|
+
<PhaseLegend :crossStatusData="tscControlData"
|
|
111
|
+
:phaseList="phaseList"
|
|
112
|
+
showDataType="phase"
|
|
113
|
+
:noClick="true"
|
|
114
|
+
:isShowCurrentStage="false"
|
|
115
|
+
StageWidth="46px"
|
|
116
|
+
StageHeight="52px"
|
|
117
|
+
dirWidth="46px"
|
|
118
|
+
dirHeight="52px"
|
|
119
|
+
dirWidths="46px"
|
|
120
|
+
dirHeights="52px"
|
|
121
|
+
:showStyle="{top:'2PX',left:'9px'}"
|
|
122
|
+
:showStyles="{top:'0PX',left:'7px'}"
|
|
123
|
+
></PhaseLegend>
|
|
124
|
+
</div>
|
|
109
125
|
|
|
110
126
|
<!-- <h2 style="color: #fff;">渠化图</h2>
|
|
111
127
|
<channelization-with-interface
|
|
@@ -133,18 +149,24 @@ import {
|
|
|
133
149
|
} from '../utils/auth'
|
|
134
150
|
import IntersectionWithInterface from '../kisscomps/components/IntersectionWithInterface'
|
|
135
151
|
import ChannelizationWithInterface from '../kisscomps/components/ChannelizationWithInterface/ChannelizationWithInterface'
|
|
152
|
+
import {
|
|
153
|
+
getTscPhase
|
|
154
|
+
} from '../api/cross.js'
|
|
155
|
+
import {
|
|
156
|
+
getTscControl
|
|
157
|
+
} from '../api/control.js'
|
|
136
158
|
export default {
|
|
137
159
|
name: 'demo',
|
|
138
160
|
data () {
|
|
139
161
|
return {
|
|
140
162
|
roadDirection: 'right',
|
|
141
163
|
// reqUrl: 'http://192.168.13.103:10003/openatc',
|
|
142
|
-
agentId: '
|
|
164
|
+
agentId: '12007_001',
|
|
143
165
|
// agentId: '13013',
|
|
144
166
|
// agentId: '12007_390',
|
|
145
167
|
// agentId: '12014',
|
|
146
168
|
reqUrl: 'http://192.168.13.103:10003/openatc',
|
|
147
|
-
Token: '
|
|
169
|
+
Token: 'eyJraWQiOiIxNzIxODAwODA0MzQxIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcyMTgwNDQwNCwiaWF0IjoxNzIxNzk3MjA0fQ.HrNlQ_mgyoHFwtyCO77W1efPcyAHH6BwgImWRXjGE-8',
|
|
148
170
|
// agentId: '30003-352',
|
|
149
171
|
// reqUrl: 'https://kints-dev.devdolphin.com/openatc',
|
|
150
172
|
// Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
|
|
@@ -234,7 +256,9 @@ export default {
|
|
|
234
256
|
'light': 3
|
|
235
257
|
}
|
|
236
258
|
]
|
|
237
|
-
}
|
|
259
|
+
},
|
|
260
|
+
tscControlData: {},
|
|
261
|
+
phaseList: []
|
|
238
262
|
}
|
|
239
263
|
},
|
|
240
264
|
components: {
|
|
@@ -325,6 +349,19 @@ export default {
|
|
|
325
349
|
// this.controlName = control
|
|
326
350
|
// this.modeName = mode
|
|
327
351
|
},
|
|
352
|
+
getTscControlData () {
|
|
353
|
+
this.tscControlData = {}
|
|
354
|
+
getTscControl(this.agentId).then((data) => {
|
|
355
|
+
this.tscControlData = data.data.data.data
|
|
356
|
+
}).catch(error => {
|
|
357
|
+
console.log(error)
|
|
358
|
+
})
|
|
359
|
+
},
|
|
360
|
+
getCurPhaseDirection () {
|
|
361
|
+
getTscPhase(this.agentId).then(res => {
|
|
362
|
+
this.phaseList = res.data.data.data.phaseList
|
|
363
|
+
})
|
|
364
|
+
},
|
|
328
365
|
registerMessage (res) {
|
|
329
366
|
console.log('registerMessage:', res)
|
|
330
367
|
},
|
|
@@ -363,6 +400,8 @@ export default {
|
|
|
363
400
|
this.setDialogWidth()
|
|
364
401
|
})()
|
|
365
402
|
}
|
|
403
|
+
this.getTscControlData()
|
|
404
|
+
this.getCurPhaseDirection()
|
|
366
405
|
},
|
|
367
406
|
destroyed () {
|
|
368
407
|
}
|