openatc-components 0.1.138 → 0.1.141

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.
Files changed (29) hide show
  1. package/package/kisscomps/components/PatternOptimize/PatternOptimize.vue +1 -1
  2. package/package/kisscomps/components/SchemeConfig/SchemeConfig.vue +1 -1
  3. package/package/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +54 -13
  4. package/package/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +8 -8
  5. package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +2 -0
  6. package/package/kisscomps/components/Stages/index.vue +32 -2
  7. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +7 -4
  8. package/package/kisscomps/components/XiaoKanban/index.vue +2 -1
  9. package/package/kisscomps/components/patternConfig/index.vue +35 -45
  10. package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +10 -52
  11. package/package/kissui.min.js +1 -1
  12. package/package.json +1 -1
  13. package/src/api/control.js +4 -0
  14. package/src/i18n/language/en.js +25 -1
  15. package/src/i18n/language/zh.js +9 -1
  16. package/src/kisscomps/components/PatternOptimize/PatternOptimize.vue +1 -1
  17. package/src/kisscomps/components/SchemeConfig/SchemeConfig.vue +1 -1
  18. package/src/kisscomps/components/SchemeConfig/azimuthlocking/index.vue +54 -13
  19. package/src/kisscomps/components/SchemeConfig/azimuthlocking/utils.js +8 -8
  20. package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +2 -0
  21. package/src/kisscomps/components/Stages/index.vue +32 -2
  22. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +7 -4
  23. package/src/kisscomps/components/XiaoKanban/index.vue +2 -1
  24. package/src/kisscomps/components/patternConfig/index.vue +35 -45
  25. package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +10 -52
  26. package/src/utils/auth.js +13 -5
  27. package/src/views/patternConfig.vue +10 -3
  28. package/static/apiconfig.json +5 -0
  29. package/src/kisscomps/components/patternConfig/components/planExecute.vue +0 -972
@@ -12,10 +12,10 @@
12
12
  <template>
13
13
  <div class="app-container" ref="pattern-container">
14
14
  <el-table :data="newPatternList" :max-height="tableHeight" id="footerBtn">
15
- <el-table-column type="expand">
15
+ <el-table-column type="expand" v-if="isAllowedExpand">
16
16
  <template slot-scope="scope">
17
17
  <div class="components-container board">
18
- <XiaoKanBan v-for="n in scope.row.ringCount" :key="n" class="kanban todo" :list="scope.row.rings[n-1]" :header-text="' '+n" :index="scope.$index" @fatherMethod="fatherMethod"/>
18
+ <XiaoKanBan v-for="n in scope.row.ringCount" :key="n" class="kanban todo" :list="scope.row.rings[n-1]" :header-text="$t('openatccomponents.pattern.ring') +' '+n" :index="scope.$index" @fatherMethod="fatherMethod"/>
19
19
  </div>
20
20
  </template>
21
21
  </el-table-column>
@@ -65,8 +65,10 @@
65
65
  </el-table-column> -->
66
66
  <el-table-column align="center" :label="$t('openatccomponents.greenwaveoptimize.offset')" width="120" prop="offset">
67
67
  <template slot-scope="scope">
68
- <!-- <el-input size="small" v-model.number="scope.row.offset"></el-input> -->
69
- <el-input-number :controls="false" :min="0" :step="1" v-model.number="scope.row.offset" size="small" style="width:70%;"></el-input-number>
68
+ <el-input-number v-if="isAllowedExpand" :controls="false" :min="0" :step="1" v-model.number="scope.row.offset" size="small" style="width:70%;"></el-input-number>
69
+ <span v-else>
70
+ {{ scope.row.offset }}
71
+ </span>
70
72
  </template>
71
73
  </el-table-column>
72
74
  <el-table-column align="center" :label="$t('openatccomponents.greenwaveoptimize.cycle')" width="80" prop="cycle">
@@ -100,6 +102,10 @@ export default {
100
102
  props: {
101
103
  optList: {
102
104
  type: Array
105
+ },
106
+ isAllowedExpand: {
107
+ type: Boolean,
108
+ default: true
103
109
  }
104
110
  },
105
111
  data () {
@@ -287,54 +293,6 @@ export default {
287
293
  }
288
294
  return res
289
295
  },
290
- // getDirectionDesc (row, bizType) {
291
- // let res = ''
292
- // let desc = ''
293
- // let phseId = -1
294
- // let directions = []
295
- // if (bizType === 'up') {
296
- // desc = row.forwardphaseDesc
297
- // phseId = row.forwardphaseid
298
- // directions = row.forwardphasedirection
299
- // } else {
300
- // desc = row.backphaseDesc
301
- // phseId = row.backphaseid
302
- // directions = row.backphasedirection
303
- // }
304
- // if (!phseId) {
305
- // return res
306
- // }
307
- // if (!directions) {
308
- // directions = []
309
- // }
310
- // let list = directions.map(id => {
311
- // return {
312
- // id: id
313
- // }
314
- // })
315
- // let dirNames = getDirName(list)
316
- // if (!dirNames) {
317
- // dirNames = []
318
- // }
319
- // let _this = this
320
- // let names = dirNames.map(item => {
321
- // let name = _this.$t(item)
322
- // return name
323
- // })
324
- // desc = names.join(',')
325
- // res = this.$t('openatccomponents.greenwaveoptimize.phase') + phseId + ' ' + desc
326
- // return res
327
- // },
328
- // formatterForwardphaseDesc (row, column) {
329
- // let bizType = 'up'
330
- // let res = this.getDirectionDesc(row, bizType)
331
- // return res
332
- // },
333
- // formatterBackphaseDesc (row, column) {
334
- // let bizType = 'down'
335
- // let res = this.getDirectionDesc(row, bizType)
336
- // return res
337
- // },
338
296
  getCurPattern (agentid) {
339
297
  // 获取当前设备所有可选方案
340
298
  this.loading = true
package/src/utils/auth.js CHANGED
@@ -12,7 +12,7 @@
12
12
  var localStorage = require('../lib/publicjs/localStorage')
13
13
 
14
14
  const nameSpace = 'openatc_conponents_'
15
- let LoginKey = 'token'
15
+ const LoginKey = 'token'
16
16
  // eslint-disable-next-line camelcase
17
17
  let Prefix = 'Prefix'
18
18
  const LoginHost = nameSpace + 'kisshost'
@@ -27,13 +27,21 @@ const userRoles = 'kiss_userRoles'
27
27
  const isCheckPermission = 'kiss_isCheckPermission'
28
28
 
29
29
  export function getToken () {
30
- let key = getPrefix() + LoginKey
30
+ let key = LoginKey
31
+ if (getPrefix()) {
32
+ key = getPrefix() + LoginKey
33
+ console.log('get tkey:', key)
34
+ }
31
35
  return localStorage.getStorage(key)
32
36
  }
33
37
 
34
- export function setToken (token, prefix = '') {
35
- setPrefix(prefix)
36
- let key = getPrefix() + LoginKey
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
+ }
37
45
  return localStorage.setStorage(key, token)
38
46
  }
39
47
 
@@ -3,7 +3,8 @@
3
3
  <button @click="getSaveParam" >获取相位参数信息</button><br/>
4
4
  <div class="layout-container2">
5
5
  <PatternConfig
6
- :agentids="agentids"
6
+ :agentids="agentids2"
7
+ :isAllowedExpand="isAllowedExpand"
7
8
  :opt="opt2"
8
9
  ref="patternConfig"
9
10
  >
@@ -19,14 +20,18 @@ export default {
19
20
  name: 'PatternConfigTest',
20
21
  data () {
21
22
  return {
23
+ isAllowedExpand: false,
22
24
  // agentids: ['gjnlgjxl'],
23
- agentids2: ['12008_835', 'gjnlgjxl'],
25
+ agentids2: ['gjnlahql', 'gjnlgjxl', 'gjnljml', 'jabh', 'jaja', 'jmlfqbl'],
26
+ // agentids2: ['15001', '15001', '15003', '15004', '15005'],
24
27
  roadDirection: 'right',
25
28
  // reqUrl: 'http://192.168.13.103:10003/openatc',
26
29
  agentId: '12008_835',
27
30
  // agentId: '0351-01',
28
31
  reqUrl: 'http://192.168.13.103:10003/openatc',
29
- Token: 'eyJraWQiOiIxNjcwNTUzNTE1MDc3IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc1Njk1MzUxNSwiaWF0IjoxNjcwNTUzNTE1fQ.oR9e2Fn5mVmJ4CjZV6zUOdq_23Y84RkuyhK_WppsD_o',
32
+ Token: 'eyJraWQiOiIxNjg4MTA1MDcxMDQwIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6NDA4Njc3NzYwMCwiaWF0IjoxNjg1NTQ4ODAwfQ.GruSjtTc2hHdGTg9vSISAhq6sDIeQ0lxRe2JBFQoETo',
33
+ // reqUrl: 'http://192.168.13.113:10003/openatc',
34
+ // Token: 'eyJraWQiOiIxNjkxMzcxMTc5ODcxIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTcxNDE0NzIwMCwiaWF0IjoxNjkwODE5MjAwfQ.AhUj9taw4_IpP77AmP5bvCE87dDQ4-ZdsEJzrlWXKF8',
30
35
  // agentId: '30003-352',
31
36
  // reqUrl: 'https://kints-dev.devdolphin.com/openatc',
32
37
  // Token: 'eyJraWQiOiIxNjUwNTA5MDI2ODk2IiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJ4aWFvbWluZyIsImV4cCI6MTczNjkwOTAyNiwiaWF0IjoxNjUwNTA5MDI2fQ.-s4T-uMRmB2zf9yer87USKQXLY1a12Zq5lCOnqjNmfA',
@@ -1433,6 +1438,8 @@ export default {
1433
1438
  .layout-container2 {
1434
1439
  /* height: 600px; */
1435
1440
  width: 1020px;
1441
+ // height: 620px;
1442
+ height: 600px;
1436
1443
  border: 1PX solid yellow;
1437
1444
  position: relative;
1438
1445
  }
@@ -189,6 +189,11 @@
189
189
  "url": "/devs/direction/phases",
190
190
  "method": "post"
191
191
  },
192
+ {
193
+ "key": "allDerection",
194
+ "url": "/devs/direction/phases/all",
195
+ "method": "get"
196
+ },
192
197
  {
193
198
  "key": "lockPhase",
194
199
  "url": "/devs/direction/lockPhases",