openatc-components 0.1.139 → 0.1.142
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/CommonKanban/CommonKanban.vue +8 -4
- package/package/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +1 -1
- package/package/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +1 -1
- package/package/kisscomps/components/ExpendConfig/ExpendConfig.vue +1 -1
- package/package/kisscomps/components/KanBan/kanban.vue +1 -1
- package/package/kisscomps/components/OverLap/OverLap.vue +2 -2
- package/package/kisscomps/components/PatternOptimize/PatternOptimize.vue +1 -1
- package/package/kisscomps/components/PatternStatus/PatternStatus.vue +21 -20
- package/package/kisscomps/components/PhaseMarker/phasemarker.vue +1 -1
- package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +1 -1
- package/package/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +54 -13
- package/package/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +8 -8
- package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +2 -0
- package/package/kisscomps/components/SchemeConfig/priorityControl/index.vue +1 -1
- package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1 -1
- package/package/kisscomps/components/Stages/index.vue +32 -2
- package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +458 -626
- package/package/kisscomps/components/XiaoKanban/DirSelector.vue +356 -0
- package/package/kisscomps/components/XiaoKanban/index.vue +102 -0
- package/package/kisscomps/components/patternConfig/index.js +2 -0
- package/package/kisscomps/components/patternConfig/index.vue +1010 -0
- package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +349 -0
- package/package/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -0
- package/package/kisscomps/components/patternConfig/planContent.vue +572 -0
- package/package/kisscomps/components/patternConfig/planMenu.vue +329 -0
- package/package/kisscomps/components/patternConfig/utils.js +152 -0
- package/package/kisscomps/index.js +4 -0
- package/package/kissui.min.js +1 -1
- package/package.json +14 -13
- package/src/api/control.js +19 -0
- package/src/api/device.js +135 -0
- package/src/api/route.js +171 -0
- package/src/i18n/language/en.js +149 -0
- package/src/i18n/language/zh.js +133 -0
- package/src/kisscomps/components/CommonKanban/CommonKanban.vue +8 -4
- package/src/kisscomps/components/DrawChannelization/drawsvg/overlapAssociatedComponent.vue +1 -1
- package/src/kisscomps/components/DrawChannelization/drawsvg/phaseAssociatedComponent.vue +1 -1
- package/src/kisscomps/components/ExpendConfig/ExpendConfig.vue +1 -1
- package/src/kisscomps/components/KanBan/kanban.vue +1 -1
- package/src/kisscomps/components/OverLap/OverLap.vue +2 -2
- package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +1 -1
- package/src/kisscomps/components/PatternStatus/PatternStatus.vue +21 -20
- package/src/kisscomps/components/PhaseMarker/phasemarker.vue +1 -1
- package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +1 -1
- package/src/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +54 -13
- package/src/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +8 -8
- package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +2 -0
- package/src/kisscomps/components/SchemeConfig/priorityControl/index.vue +1 -1
- package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +1 -1
- package/src/kisscomps/components/Stages/index.vue +32 -2
- package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +458 -626
- package/src/kisscomps/components/XiaoKanban/DirSelector.vue +356 -0
- package/src/kisscomps/components/XiaoKanban/index.vue +102 -0
- package/src/kisscomps/components/patternConfig/index.js +2 -0
- package/src/kisscomps/components/patternConfig/index.vue +1010 -0
- package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +349 -0
- package/src/kisscomps/components/patternConfig/pattern/planChart/model/coordinationModel.js +665 -0
- package/src/kisscomps/components/patternConfig/planContent.vue +572 -0
- package/src/kisscomps/components/patternConfig/planMenu.vue +329 -0
- package/src/kisscomps/components/patternConfig/utils.js +152 -0
- package/src/kisscomps/index.js +4 -0
- package/src/lib/publicjs/KissApi.js +2 -2
- package/src/router/index.js +7 -0
- package/src/utils/auth.js +24 -3
- package/src/views/intersection.vue +1 -1
- package/src/views/patternConfig.vue +1468 -0
- package/static/apiconfig.json +85 -0
- package/static/styles/common.scss +2 -0
- package/static/styles/patternConfig.scss +57 -0
- package/static/styles/xiaokanban.scss +51 -0
|
@@ -0,0 +1,329 @@
|
|
|
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 class="openatc-planmanu">
|
|
14
|
+
<div class="title" style="display:flex;">{{$t('openatc.main.routeOptimize')}}</div>
|
|
15
|
+
<el-menu @select="selectPlan" v-loading="loading">
|
|
16
|
+
<el-menu-item :index="String(plan.id)" v-for="(plan, index) in planData" :key="index">
|
|
17
|
+
<span slot="title">{{plan.name}}</span>
|
|
18
|
+
</el-menu-item>
|
|
19
|
+
</el-menu>
|
|
20
|
+
<div class="btnGroup" v-show="false">
|
|
21
|
+
<div class="addbtn" :style="{zIndex: zIndexObj.addZIndex}">
|
|
22
|
+
<button slot="reference" class="btn" @click="onAdd" ref="addbtn">{{$t('openatc.common.add')}}</button>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="operate">
|
|
25
|
+
<el-dropdown trigger="click" @command="switchOperate">
|
|
26
|
+
<span class="el-dropdown-link">
|
|
27
|
+
{{$t('openatccomponents.greenwaveoptimize.operation')}}<i class="el-icon-arrow-down el-icon--right"></i>
|
|
28
|
+
</span>
|
|
29
|
+
<el-dropdown-menu slot="dropdown">
|
|
30
|
+
<el-dropdown-item icon="el-icon-edit" command="Edit">{{$t('openatc.common.edit')}}</el-dropdown-item>
|
|
31
|
+
<el-dropdown-item icon="el-icon-delete" command="Delete">{{$t('openatc.common.delete')}}</el-dropdown-item>
|
|
32
|
+
</el-dropdown-menu>
|
|
33
|
+
</el-dropdown>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
<!-- <Messagebox :visible="deleteDiologVisible" :text="`${$t('openatccomponents.greenwaveoptimize.isdelete')}${chooseName} ?`" @cancle="closeDeleteDialog" @ok="handleDelete"/> -->
|
|
37
|
+
<!-- <AddOptimizeDialog ref="addOptimizeDialog"
|
|
38
|
+
@closeDialog="closeAddDialog"
|
|
39
|
+
@updateRoute="updateRoute"/> -->
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script>
|
|
44
|
+
// import Messagebox from '../../components/MessageBox'
|
|
45
|
+
// import AddOptimizeDialog from './components/addOptimizeDialog'
|
|
46
|
+
import { AddRoute, DeleteRoute, UpdateRoute } from '../../../api/route'
|
|
47
|
+
import { getMessageByCode } from '../../../utils/responseMessage'
|
|
48
|
+
export default {
|
|
49
|
+
name: 'PlanMenu',
|
|
50
|
+
components: {
|
|
51
|
+
// Messagebox
|
|
52
|
+
// AddOptimizeDialog
|
|
53
|
+
},
|
|
54
|
+
props: {
|
|
55
|
+
planData: {
|
|
56
|
+
type: Array
|
|
57
|
+
},
|
|
58
|
+
zIndexObj: {
|
|
59
|
+
type: Object
|
|
60
|
+
},
|
|
61
|
+
loading: {
|
|
62
|
+
type: Boolean
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
watch: {
|
|
66
|
+
planData: {
|
|
67
|
+
handler: function (val) {
|
|
68
|
+
if (this.chooseId) {
|
|
69
|
+
this.chooseName = this.planData.filter(ele => ele.id === this.chooseId)[0].name
|
|
70
|
+
}
|
|
71
|
+
// if (val && !val.length) {
|
|
72
|
+
// // 模拟一次手动点击,触发tip显示
|
|
73
|
+
// this.$refs.addbtn.click()
|
|
74
|
+
// }
|
|
75
|
+
},
|
|
76
|
+
deep: true
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
data () {
|
|
80
|
+
return {
|
|
81
|
+
route: {},
|
|
82
|
+
chooseId: 0, // 选中的计划id
|
|
83
|
+
chooseName: '', // 选中的计划name
|
|
84
|
+
deleteDiologVisible: false,
|
|
85
|
+
addNum: 0,
|
|
86
|
+
isEdit: false
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
methods: {
|
|
90
|
+
selectPlan (id) {
|
|
91
|
+
// 选择某一方案
|
|
92
|
+
this.chooseId = Number(id)
|
|
93
|
+
let plan = this.planData.filter(ele => ele.id === this.chooseId)[0]
|
|
94
|
+
for (let dev of plan.devs) {
|
|
95
|
+
dev.isused = true
|
|
96
|
+
}
|
|
97
|
+
this.route = JSON.parse(JSON.stringify(plan))
|
|
98
|
+
this.chooseName = this.planData.filter(ele => ele.id === this.chooseId)[0].name
|
|
99
|
+
let ids = []
|
|
100
|
+
this.route.devs.forEach(item => {
|
|
101
|
+
ids.push(item.agentid)
|
|
102
|
+
})
|
|
103
|
+
this.$emit('chooseRoute', this.chooseId, this.route, ids)
|
|
104
|
+
this.$emit('resetContentComponent')
|
|
105
|
+
},
|
|
106
|
+
onAdd () {
|
|
107
|
+
this.isEdit = false
|
|
108
|
+
this.$refs.addOptimizeDialog.show()
|
|
109
|
+
this.$emit('editStart')
|
|
110
|
+
},
|
|
111
|
+
onEdit () {
|
|
112
|
+
if (!this.chooseId) {
|
|
113
|
+
this.$message({
|
|
114
|
+
message: this.$t('openatccomponents.greenwaveoptimize.nochooseplan'),
|
|
115
|
+
type: 'warning'
|
|
116
|
+
})
|
|
117
|
+
return
|
|
118
|
+
}
|
|
119
|
+
this.isEdit = true
|
|
120
|
+
this.$refs.addOptimizeDialog.show(this.route)
|
|
121
|
+
this.$emit('editStart')
|
|
122
|
+
},
|
|
123
|
+
onDelete () {
|
|
124
|
+
if (!this.chooseId) {
|
|
125
|
+
this.$message({
|
|
126
|
+
message: this.$t('openatccomponents.greenwaveoptimize.nochooseplan'),
|
|
127
|
+
type: 'warning'
|
|
128
|
+
})
|
|
129
|
+
return
|
|
130
|
+
}
|
|
131
|
+
this.deleteDiologVisible = true
|
|
132
|
+
},
|
|
133
|
+
handleDelete () {
|
|
134
|
+
DeleteRoute(this.chooseId).then(res => {
|
|
135
|
+
if (!res.data.success) {
|
|
136
|
+
this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
|
|
137
|
+
return
|
|
138
|
+
}
|
|
139
|
+
this.deleteDiologVisible = false
|
|
140
|
+
this.resetChooseId()
|
|
141
|
+
this.$message({
|
|
142
|
+
message: this.$t('openatc.common.deletesuccess'),
|
|
143
|
+
type: 'success',
|
|
144
|
+
duration: 1 * 1000,
|
|
145
|
+
onClose: () => {
|
|
146
|
+
this.$emit('refresh')
|
|
147
|
+
}
|
|
148
|
+
})
|
|
149
|
+
})
|
|
150
|
+
},
|
|
151
|
+
resetChooseId () {
|
|
152
|
+
// 重置为未选择状态
|
|
153
|
+
this.chooseId = 0
|
|
154
|
+
this.$emit('chooseRoute', this.chooseId)
|
|
155
|
+
},
|
|
156
|
+
closeDeleteDialog () {
|
|
157
|
+
this.deleteDiologVisible = false
|
|
158
|
+
},
|
|
159
|
+
updateRouteName (data) {
|
|
160
|
+
UpdateRoute(data).then(res => {
|
|
161
|
+
if (!res.data.success) {
|
|
162
|
+
if (res.data.code === '5001') {
|
|
163
|
+
this.$message.error(this.$t('openatccomponents.greenwaveoptimize.namerepeat'))
|
|
164
|
+
} else {
|
|
165
|
+
this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
|
|
166
|
+
}
|
|
167
|
+
return
|
|
168
|
+
}
|
|
169
|
+
this.closeAddDialog()
|
|
170
|
+
this.$message({
|
|
171
|
+
message: this.$t('openatc.common.updatesuccess'),
|
|
172
|
+
type: 'success',
|
|
173
|
+
duration: 1 * 1000,
|
|
174
|
+
onClose: () => {
|
|
175
|
+
this.$emit('refresh')
|
|
176
|
+
}
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
},
|
|
180
|
+
addRoute (data) {
|
|
181
|
+
AddRoute(data).then(res => {
|
|
182
|
+
if (!res.data.success) {
|
|
183
|
+
if (res.data.code === '5001') {
|
|
184
|
+
this.$message.error(this.$t('openatccomponents.greenwaveoptimize.addfail'))
|
|
185
|
+
} else {
|
|
186
|
+
this.$message.error(getMessageByCode(res.data.code, this.$i18n.locale))
|
|
187
|
+
}
|
|
188
|
+
return
|
|
189
|
+
}
|
|
190
|
+
this.closeAddDialog()
|
|
191
|
+
this.$message({
|
|
192
|
+
message: this.$t('openatc.common.addsuccess'),
|
|
193
|
+
type: 'success',
|
|
194
|
+
duration: 1 * 1000,
|
|
195
|
+
onClose: () => {
|
|
196
|
+
this.$emit('refresh')
|
|
197
|
+
}
|
|
198
|
+
})
|
|
199
|
+
})
|
|
200
|
+
},
|
|
201
|
+
updateRoute (data) {
|
|
202
|
+
if (this.isEdit) {
|
|
203
|
+
const obj = {
|
|
204
|
+
...data,
|
|
205
|
+
id: this.chooseId
|
|
206
|
+
}
|
|
207
|
+
this.updateRouteName(obj)
|
|
208
|
+
} else {
|
|
209
|
+
this.addRoute(data)
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
closeAddDialog () {
|
|
213
|
+
this.isEdit = false
|
|
214
|
+
this.$refs.addOptimizeDialog.close()
|
|
215
|
+
},
|
|
216
|
+
clickMask () {
|
|
217
|
+
// 点击其他地方关闭蒙层
|
|
218
|
+
this.maskVisible = false
|
|
219
|
+
},
|
|
220
|
+
switchOperate (command) {
|
|
221
|
+
switch (command) {
|
|
222
|
+
case 'Edit':
|
|
223
|
+
this.onEdit()
|
|
224
|
+
break
|
|
225
|
+
case 'Delete':
|
|
226
|
+
this.onDelete()
|
|
227
|
+
break
|
|
228
|
+
default:
|
|
229
|
+
console.log(command)
|
|
230
|
+
break
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
</script>
|
|
236
|
+
|
|
237
|
+
<style lang="scss">
|
|
238
|
+
// @import "../../styles/theme/element-variables.scss";
|
|
239
|
+
// .btnGroup .operate .el-dropdown-link {
|
|
240
|
+
// color: $--color-primary;
|
|
241
|
+
// cursor: pointer;
|
|
242
|
+
// }
|
|
243
|
+
</style>
|
|
244
|
+
|
|
245
|
+
<style lang="scss" scoped>
|
|
246
|
+
// @import "../../styles/theme/element-variables.scss";
|
|
247
|
+
.el-menu {
|
|
248
|
+
height: calc(100vh - 120px);
|
|
249
|
+
max-height: calc(100vh - 120px);
|
|
250
|
+
overflow-y: auto;
|
|
251
|
+
border-right: none;
|
|
252
|
+
}
|
|
253
|
+
// .el-menu-item.is-active {
|
|
254
|
+
// background: #eaeaea;
|
|
255
|
+
// }
|
|
256
|
+
/* 蒙层样式 */
|
|
257
|
+
// .mask {
|
|
258
|
+
// position: fixed;
|
|
259
|
+
// left: 0;
|
|
260
|
+
// top: 0;
|
|
261
|
+
// width: 100%;
|
|
262
|
+
// height: 100%;
|
|
263
|
+
// background: #000;
|
|
264
|
+
// opacity: 0.5;
|
|
265
|
+
// z-index: 97;
|
|
266
|
+
// }
|
|
267
|
+
// /* 原生按钮样式修改 */
|
|
268
|
+
// .btnGroup button {
|
|
269
|
+
// width: 70px;
|
|
270
|
+
// height: 40px;
|
|
271
|
+
// padding: 0;
|
|
272
|
+
// line-height: 40px;
|
|
273
|
+
// border: 1px solid #dcdfe6;
|
|
274
|
+
// white-space: nowrap;
|
|
275
|
+
// outline: 0;
|
|
276
|
+
// transition: .1s;
|
|
277
|
+
// font-size: 14px;
|
|
278
|
+
// border-radius: 4px;
|
|
279
|
+
// color: $--button-primary-font-color;
|
|
280
|
+
// background-color: $--color-primary;
|
|
281
|
+
// border-color: $--color-primary;
|
|
282
|
+
// cursor: pointer;
|
|
283
|
+
// }
|
|
284
|
+
// .btnGroup button:hover {
|
|
285
|
+
// color: $--button-primary-font-color;
|
|
286
|
+
// background-color: $--color-primary;
|
|
287
|
+
// border-color: $--color-primary;
|
|
288
|
+
// opacity: 0.8;
|
|
289
|
+
// }
|
|
290
|
+
// .deletebtn {
|
|
291
|
+
// position: fixed;
|
|
292
|
+
// bottom: 30px;
|
|
293
|
+
// left: 93px;
|
|
294
|
+
// }
|
|
295
|
+
// .btnGroup .addbtn {
|
|
296
|
+
// position: fixed;
|
|
297
|
+
// bottom: 30px;
|
|
298
|
+
// left: 17px;
|
|
299
|
+
// z-index: 98;
|
|
300
|
+
// }
|
|
301
|
+
// .btnGroup .addbtn button {
|
|
302
|
+
// font-weight: 500;
|
|
303
|
+
// }
|
|
304
|
+
// .btnGroup .operate{
|
|
305
|
+
// position: fixed;
|
|
306
|
+
// bottom: 30px;
|
|
307
|
+
// left: 108px;
|
|
308
|
+
// height: 40px;
|
|
309
|
+
// line-height: 40px;
|
|
310
|
+
// }
|
|
311
|
+
// /* 提示框相关 */
|
|
312
|
+
// .tipContent > div{
|
|
313
|
+
// float: left;
|
|
314
|
+
// }
|
|
315
|
+
// .tipContent div i {
|
|
316
|
+
// color: $--color-primary;
|
|
317
|
+
// font-size: 30px;
|
|
318
|
+
// }
|
|
319
|
+
// .tipContent .text {
|
|
320
|
+
// font-size: 14px;
|
|
321
|
+
// font-weight: normal;
|
|
322
|
+
// font-stretch: normal;
|
|
323
|
+
// line-height: 14px;
|
|
324
|
+
// letter-spacing: 1px;
|
|
325
|
+
// color: $--color-primary;
|
|
326
|
+
// margin-left: 7px;
|
|
327
|
+
// line-height: 42px;
|
|
328
|
+
// }
|
|
329
|
+
</style>
|
|
@@ -0,0 +1,152 @@
|
|
|
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
|
+
const monthsModel = [{
|
|
13
|
+
value: 0,
|
|
14
|
+
label: '全选'
|
|
15
|
+
}, {
|
|
16
|
+
value: 1,
|
|
17
|
+
label: '1'
|
|
18
|
+
}, {
|
|
19
|
+
value: 2,
|
|
20
|
+
label: '2'
|
|
21
|
+
}, {
|
|
22
|
+
value: 3,
|
|
23
|
+
label: '3'
|
|
24
|
+
}, {
|
|
25
|
+
value: 4,
|
|
26
|
+
label: '4'
|
|
27
|
+
}, {
|
|
28
|
+
value: 5,
|
|
29
|
+
label: '5'
|
|
30
|
+
}, {
|
|
31
|
+
value: 6,
|
|
32
|
+
label: '6'
|
|
33
|
+
}, {
|
|
34
|
+
value: 7,
|
|
35
|
+
label: '7'
|
|
36
|
+
}, {
|
|
37
|
+
value: 8,
|
|
38
|
+
label: '8'
|
|
39
|
+
}, {
|
|
40
|
+
value: 9,
|
|
41
|
+
label: '9'
|
|
42
|
+
}, {
|
|
43
|
+
value: 10,
|
|
44
|
+
label: '10'
|
|
45
|
+
}, {
|
|
46
|
+
value: 11,
|
|
47
|
+
label: '11'
|
|
48
|
+
}, {
|
|
49
|
+
value: 12,
|
|
50
|
+
label: '12'
|
|
51
|
+
}]
|
|
52
|
+
const monthsModelEn = [{
|
|
53
|
+
value: 0,
|
|
54
|
+
label: 'All'
|
|
55
|
+
}, {
|
|
56
|
+
value: 1,
|
|
57
|
+
label: '1'
|
|
58
|
+
}, {
|
|
59
|
+
value: 2,
|
|
60
|
+
label: '2'
|
|
61
|
+
}, {
|
|
62
|
+
value: 3,
|
|
63
|
+
label: '3'
|
|
64
|
+
}, {
|
|
65
|
+
value: 4,
|
|
66
|
+
label: '4'
|
|
67
|
+
}, {
|
|
68
|
+
value: 5,
|
|
69
|
+
label: '5'
|
|
70
|
+
}, {
|
|
71
|
+
value: 6,
|
|
72
|
+
label: '6'
|
|
73
|
+
}, {
|
|
74
|
+
value: 7,
|
|
75
|
+
label: '7'
|
|
76
|
+
}, {
|
|
77
|
+
value: 8,
|
|
78
|
+
label: '8'
|
|
79
|
+
}, {
|
|
80
|
+
value: 9,
|
|
81
|
+
label: '9'
|
|
82
|
+
}, {
|
|
83
|
+
value: 10,
|
|
84
|
+
label: '10'
|
|
85
|
+
}, {
|
|
86
|
+
value: 11,
|
|
87
|
+
label: '11'
|
|
88
|
+
}, {
|
|
89
|
+
value: 12,
|
|
90
|
+
label: '12'
|
|
91
|
+
}]
|
|
92
|
+
const daysModelCh = [{
|
|
93
|
+
value: 8,
|
|
94
|
+
label: '全选'
|
|
95
|
+
}, {
|
|
96
|
+
value: 0,
|
|
97
|
+
label: '星期日'
|
|
98
|
+
}, {
|
|
99
|
+
value: 1,
|
|
100
|
+
label: '星期一'
|
|
101
|
+
}, {
|
|
102
|
+
value: 2,
|
|
103
|
+
label: '星期二'
|
|
104
|
+
}, {
|
|
105
|
+
value: 3,
|
|
106
|
+
label: '星期三'
|
|
107
|
+
}, {
|
|
108
|
+
value: 4,
|
|
109
|
+
label: '星期四'
|
|
110
|
+
}, {
|
|
111
|
+
value: 5,
|
|
112
|
+
label: '星期五'
|
|
113
|
+
}, {
|
|
114
|
+
value: 6,
|
|
115
|
+
label: '星期六'
|
|
116
|
+
}]
|
|
117
|
+
const daysModelEn = [{
|
|
118
|
+
value: 8,
|
|
119
|
+
label: 'All'
|
|
120
|
+
}, {
|
|
121
|
+
value: 0,
|
|
122
|
+
label: 'Sun.'
|
|
123
|
+
}, {
|
|
124
|
+
value: 1,
|
|
125
|
+
label: 'Mon.'
|
|
126
|
+
}, {
|
|
127
|
+
value: 2,
|
|
128
|
+
label: 'Tues.'
|
|
129
|
+
}, {
|
|
130
|
+
value: 3,
|
|
131
|
+
label: 'Wed.'
|
|
132
|
+
}, {
|
|
133
|
+
value: 4,
|
|
134
|
+
label: 'Thur.'
|
|
135
|
+
}, {
|
|
136
|
+
value: 5,
|
|
137
|
+
label: 'Fir.'
|
|
138
|
+
}, {
|
|
139
|
+
value: 6,
|
|
140
|
+
label: 'Sat.'
|
|
141
|
+
}]
|
|
142
|
+
const datesModel = ['全选', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]
|
|
143
|
+
const datesModelEn = ['All', 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]
|
|
144
|
+
const dateObj = {
|
|
145
|
+
monthsModel,
|
|
146
|
+
monthsModelEn,
|
|
147
|
+
daysModelCh,
|
|
148
|
+
daysModelEn,
|
|
149
|
+
datesModel,
|
|
150
|
+
datesModelEn
|
|
151
|
+
}
|
|
152
|
+
export default dateObj
|
package/src/kisscomps/index.js
CHANGED
|
@@ -26,6 +26,8 @@ import tentativeplancontrolmodal from './components/SchemeConfig/tentativeplanco
|
|
|
26
26
|
import priorityControl from './components/SchemeConfig/priorityControl/index'
|
|
27
27
|
import PhaseDirectionText from './components/PhaseDirectionText/index'
|
|
28
28
|
import PhaseDirectionSelect from './components/PhaseDirectionSelect/index'
|
|
29
|
+
import patternConfig from './components/patternConfig/index.vue'
|
|
30
|
+
import XiaoKanBan from './components/XiaoKanBan/index.vue'
|
|
29
31
|
import { setToken, setHost, setIsCheckPermission, setUserRoles, setPermissions } from '../utils/auth.js'
|
|
30
32
|
import componentsGlobalParam from '../store/modules/globalParam'
|
|
31
33
|
|
|
@@ -61,6 +63,8 @@ const components = {
|
|
|
61
63
|
priorityControl,
|
|
62
64
|
tentativeplancontrolmodal,
|
|
63
65
|
PhaseDirectionText,
|
|
66
|
+
patternConfig,
|
|
67
|
+
XiaoKanBan,
|
|
64
68
|
PhaseDirectionSelect
|
|
65
69
|
}
|
|
66
70
|
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
} from './HttpurlMgr'
|
|
15
15
|
import axios from 'axios'
|
|
16
16
|
import * as localStorge from './localStorage'
|
|
17
|
-
import { removeToken } from '../../utils/auth'
|
|
17
|
+
import { removeToken, getToken } from '../../utils/auth'
|
|
18
18
|
|
|
19
19
|
axios.defaults.withCredentials = true
|
|
20
20
|
export const getAxios = () => {
|
|
@@ -39,7 +39,7 @@ export class KissApi {
|
|
|
39
39
|
获取token 需要在storage中设置 key=token的value
|
|
40
40
|
*/
|
|
41
41
|
GetToken () {
|
|
42
|
-
return
|
|
42
|
+
return getToken()
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
/*
|
package/src/router/index.js
CHANGED
|
@@ -17,6 +17,13 @@ export default new Router({
|
|
|
17
17
|
require(['@/views/intersection'], resolve)
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
+
{
|
|
21
|
+
path: '/pattern',
|
|
22
|
+
name: 'pattern',
|
|
23
|
+
component: (resolve) => {
|
|
24
|
+
require(['@/views/patternConfig'], resolve)
|
|
25
|
+
}
|
|
26
|
+
},
|
|
20
27
|
{
|
|
21
28
|
path: '/config',
|
|
22
29
|
name: 'config',
|
package/src/utils/auth.js
CHANGED
|
@@ -13,6 +13,8 @@ var localStorage = require('../lib/publicjs/localStorage')
|
|
|
13
13
|
|
|
14
14
|
const nameSpace = 'openatc_conponents_'
|
|
15
15
|
const LoginKey = 'token'
|
|
16
|
+
// eslint-disable-next-line camelcase
|
|
17
|
+
let Prefix = 'Prefix'
|
|
16
18
|
const LoginHost = nameSpace + 'kisshost'
|
|
17
19
|
const typeKey = 'type'
|
|
18
20
|
const type = 'edge'
|
|
@@ -25,11 +27,30 @@ const userRoles = 'kiss_userRoles'
|
|
|
25
27
|
const isCheckPermission = 'kiss_isCheckPermission'
|
|
26
28
|
|
|
27
29
|
export function getToken () {
|
|
28
|
-
|
|
30
|
+
let key = LoginKey
|
|
31
|
+
if (getPrefix()) {
|
|
32
|
+
key = getPrefix() + LoginKey
|
|
33
|
+
console.log('get tkey:', key)
|
|
34
|
+
}
|
|
35
|
+
return localStorage.getStorage(key)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function setToken (token, prefix) {
|
|
39
|
+
let key = LoginKey
|
|
40
|
+
if (prefix) {
|
|
41
|
+
setPrefix(prefix)
|
|
42
|
+
key = getPrefix() + LoginKey
|
|
43
|
+
console.log('set tkey:', key)
|
|
44
|
+
}
|
|
45
|
+
return localStorage.setStorage(key, token)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function getPrefix () {
|
|
49
|
+
return localStorage.getStorage(Prefix)
|
|
29
50
|
}
|
|
30
51
|
|
|
31
|
-
export function
|
|
32
|
-
return localStorage.setStorage(
|
|
52
|
+
export function setPrefix (prifix) {
|
|
53
|
+
return localStorage.setStorage(Prefix, prifix)
|
|
33
54
|
}
|
|
34
55
|
|
|
35
56
|
export function SetSimuUserKey (key) {
|
|
@@ -94,7 +94,7 @@ export default {
|
|
|
94
94
|
return {
|
|
95
95
|
roadDirection: 'right',
|
|
96
96
|
// reqUrl: 'http://192.168.13.103:10003/openatc',
|
|
97
|
-
agentId: '
|
|
97
|
+
agentId: '12006_423',
|
|
98
98
|
// agentId: '0351-01',
|
|
99
99
|
reqUrl: 'http://192.168.13.103:10003/openatc',
|
|
100
100
|
Token: 'eyJraWQiOiIxNjcwNTUzNTE1MDc3IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc1Njk1MzUxNSwiaWF0IjoxNjcwNTUzNTE1fQ.oR9e2Fn5mVmJ4CjZV6zUOdq_23Y84RkuyhK_WppsD_o',
|