openatc-components 0.0.57 → 0.0.62
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/IntersectionWithInterface/IntersectionWithInterface.vue +1 -1
- package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +12 -1
- package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +5 -3
- package/package/kisscomps/components/overView/index.vue +1 -1
- package/package/kisscomps/index.js +8 -1
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/kisscomps/components/IntersectionWithInterface/IntersectionWithInterface.vue +1 -1
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +12 -1
- package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +5 -3
- package/src/kisscomps/components/overView/index.vue +1 -1
- package/src/kisscomps/index.js +8 -1
- package/src/utils/auth.js +2 -1
|
@@ -116,7 +116,7 @@ import { getMessageByCode } from '../../../utils/responseMessage'
|
|
|
116
116
|
import { GetAllFaultRange } from '../../../api/fault'
|
|
117
117
|
import PhaseDataModel from '../IntersectionMap/crossDirection/utils.js'
|
|
118
118
|
import CrossDiagramMgr from '../../../EdgeMgr/controller/crossDiagramMgr.js'
|
|
119
|
-
import { setToken } from '../../../utils/auth.js'
|
|
119
|
+
import { setToken, setHost } from '../../../utils/auth.js'
|
|
120
120
|
import RingDataModel from '../../../utils/RingDataModel.js'
|
|
121
121
|
import { getIntersectionInfo } from '../../../api/template'
|
|
122
122
|
export default {
|
|
@@ -129,6 +129,10 @@ export default {
|
|
|
129
129
|
TentativePlanControlModal
|
|
130
130
|
},
|
|
131
131
|
props: {
|
|
132
|
+
reqUrl: {
|
|
133
|
+
type: String,
|
|
134
|
+
default: ''
|
|
135
|
+
},
|
|
132
136
|
responseTime: {
|
|
133
137
|
type: Number,
|
|
134
138
|
default: 0
|
|
@@ -327,6 +331,7 @@ export default {
|
|
|
327
331
|
}
|
|
328
332
|
},
|
|
329
333
|
created () {
|
|
334
|
+
this.setHost(this.reqUrl)
|
|
330
335
|
this.PhaseDataModel = new PhaseDataModel(this.roadDirection)
|
|
331
336
|
this.CrossDiagramMgr = new CrossDiagramMgr()
|
|
332
337
|
if (this.realtimeStatusModalvisible === false) {
|
|
@@ -342,6 +347,12 @@ export default {
|
|
|
342
347
|
this.realtimeStages()
|
|
343
348
|
},
|
|
344
349
|
methods: {
|
|
350
|
+
setHost (host) {
|
|
351
|
+
// 获取组件外传入的token,便于独立组件调用接口
|
|
352
|
+
if (host && host !== '') {
|
|
353
|
+
setHost(host)
|
|
354
|
+
}
|
|
355
|
+
},
|
|
345
356
|
getIntersectionInfo (agentid) {
|
|
346
357
|
// 获取路口信息
|
|
347
358
|
getIntersectionInfo(agentid).then(res => {
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
<el-form-item
|
|
37
37
|
:label="$t('openatccomponents.overview.patternoffset') + ':'"
|
|
38
38
|
prop="count">
|
|
39
|
-
<el-input v-model="offset" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input>
|
|
39
|
+
<el-input v-model="manualInfo.offset" size="mini" :placeholder="$t('openatccomponents.common.input')"></el-input>
|
|
40
40
|
</el-form-item>
|
|
41
41
|
<el-form-item
|
|
42
42
|
:label="$t('openatccomponents.overview.duration') + ':'"
|
|
@@ -186,7 +186,7 @@ export default {
|
|
|
186
186
|
return this.patternOne.length === 0 ? this.max : (this.patternOne.length > 0 && (this.patternOne[0].cycle < this.max)) ? this.max : this.patternOne[0].cycle
|
|
187
187
|
},
|
|
188
188
|
offset () {
|
|
189
|
-
return this.patternOne.length === 0
|
|
189
|
+
return Number((this.patternOne.length === 0 || this.manualInfo.offset > 0) ? this.manualInfo.offset : this.patternOne[0].offset)
|
|
190
190
|
},
|
|
191
191
|
forbiddenstage () {
|
|
192
192
|
return this.patternOne.length === 0 ? this.allPatternList[0].forbiddenstage : this.patternOne[0].forbiddenstage
|
|
@@ -1247,9 +1247,11 @@ export default {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
},
|
|
1249
1249
|
selectPattern () {
|
|
1250
|
+
this.manualInfo.offset = 0
|
|
1250
1251
|
this.patternOne = this.allPatternList.filter(item => {
|
|
1251
1252
|
return item.id === this.manualInfo.tempPatternid
|
|
1252
1253
|
})
|
|
1254
|
+
this.manualInfo.offset = this.offset
|
|
1253
1255
|
for (let rings of this.patternOne[0].rings) {
|
|
1254
1256
|
if (rings.length === 0) continue
|
|
1255
1257
|
for (let ring of rings) {
|
|
@@ -1403,7 +1405,7 @@ export default {
|
|
|
1403
1405
|
let submitdata = {
|
|
1404
1406
|
control: 100,
|
|
1405
1407
|
delay: this.manualInfo.tempDelay !== undefined ? Number(this.manualInfo.tempDelay) : 0,
|
|
1406
|
-
duration: this.manualInfo.duration,
|
|
1408
|
+
duration: Number(this.manualInfo.duration),
|
|
1407
1409
|
// duration: this.manualInfo.tempDuration !== undefined ? Number(this.manualInfo.tempDuration) : 0,
|
|
1408
1410
|
data: {}
|
|
1409
1411
|
}
|
|
@@ -19,6 +19,7 @@ import StageBord from './components/StageBord/index'
|
|
|
19
19
|
import ExpendConfig from './components/ExpendConfig/index'
|
|
20
20
|
import PatternWalkSvg from './components/PatternWalkSvg/index'
|
|
21
21
|
import tentativeplancontrolmodal from './components/SchemeConfig/tentativeplancontrolmodal/index'
|
|
22
|
+
import { setToken, setHost } from '../utils/auth.js'
|
|
22
23
|
|
|
23
24
|
import en from '../i18n/language/en'
|
|
24
25
|
import zh from '../i18n/language/zh'
|
|
@@ -53,6 +54,11 @@ const language = {
|
|
|
53
54
|
zh
|
|
54
55
|
}
|
|
55
56
|
|
|
57
|
+
const func = {
|
|
58
|
+
setHost,
|
|
59
|
+
setToken
|
|
60
|
+
}
|
|
61
|
+
|
|
56
62
|
const requireAll = requireContext => requireContext.keys().map(requireContext)
|
|
57
63
|
const install = function (Vue) {
|
|
58
64
|
if (install.installed) return
|
|
@@ -79,7 +85,8 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
79
85
|
const API = {
|
|
80
86
|
install,
|
|
81
87
|
...components,
|
|
82
|
-
language
|
|
88
|
+
language,
|
|
89
|
+
func
|
|
83
90
|
}
|
|
84
91
|
|
|
85
92
|
export default API
|