openatc-components 0.0.58 → 0.0.61
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/SchemeConfig/SchemeConfig.vue +12 -1
- package/package/kisscomps/index.js +8 -1
- package/package/kissui.min.js +1 -1
- package/package.json +1 -1
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +12 -1
- package/src/kisscomps/index.js +8 -1
- package/src/utils/auth.js +2 -1
package/package.json
CHANGED
|
@@ -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 => {
|
package/src/kisscomps/index.js
CHANGED
|
@@ -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
|
package/src/utils/auth.js
CHANGED
|
@@ -11,8 +11,9 @@
|
|
|
11
11
|
**/
|
|
12
12
|
var localStorage = require('../lib/publicjs/localStorage')
|
|
13
13
|
|
|
14
|
+
const nameSpace = 'openatc_conponents_'
|
|
14
15
|
const LoginKey = 'token'
|
|
15
|
-
const LoginHost = 'kisshost'
|
|
16
|
+
const LoginHost = nameSpace + 'kisshost'
|
|
16
17
|
const typeKey = 'type'
|
|
17
18
|
const type = 'edge'
|
|
18
19
|
const simuKey = 'simu_key'
|