openatc-components 0.2.36 → 0.2.38

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 (23) hide show
  1. package/package/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +49 -49
  2. package/package/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +39 -8
  3. package/package/kisscomps/components/PatternStatus/PatternStatus.vue +1 -1
  4. package/package/kisscomps/components/SchemeConfig/manualControlModal/index.vue +1 -1
  5. package/package/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +26 -17
  6. package/package/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1 -0
  7. package/package/kisscomps/components/patternConfig/pattern/patternTable.vue +73 -13
  8. package/package/kisscomps/components/patternConfig/planContent.vue +3 -0
  9. package/package/kissui.min.js +1 -1
  10. package/package.json +2 -2
  11. package/src/i18n/language/en.js +1 -0
  12. package/src/i18n/language/zh.js +1 -0
  13. package/src/kisscomps/components/DirectionListConfiguration/DirectionListConfiguration.vue +49 -49
  14. package/src/kisscomps/components/IntersectionDirectionSelection/IntersectionDirectionSelection.vue +39 -8
  15. package/src/kisscomps/components/PatternStatus/PatternStatus.vue +1 -1
  16. package/src/kisscomps/components/SchemeConfig/manualControlModal/index.vue +1 -1
  17. package/src/kisscomps/components/SchemeConfig/tentativeplancontrolmodal/index.vue +26 -17
  18. package/src/kisscomps/components/XRDDirSelector/XRDDirSelector.vue +1 -0
  19. package/src/kisscomps/components/patternConfig/pattern/patternTable.vue +73 -13
  20. package/src/kisscomps/components/patternConfig/planContent.vue +3 -0
  21. package/src/views/intersection.vue +11 -5
  22. package/src/views/patternConfig.vue +7 -970
  23. package/src/views/schemeconfig.vue +50 -19
@@ -20,12 +20,12 @@
20
20
  :close-on-click-modal="false"
21
21
  @close="oncancle"
22
22
  append-to-body>
23
- <!-- <scheme-config
24
- :agentId="agentId"
25
- :statusData="crossStatusData"
26
- :realtimeStatusModalvisible="false"
27
- @patternCommitCallback="patternCommitCallback"/> -->
28
23
  <scheme-config
24
+ ref="rightpanel"
25
+ :agentId="agentId"
26
+ :statusData="crossStatusData"
27
+ :phaseList="phaseList2"/>
28
+ <!-- <scheme-config
29
29
  ref="rightpanel"
30
30
  :agentId="agentId"
31
31
  :lockPhaseBtnName="lockPhaseBtnName"
@@ -33,8 +33,7 @@
33
33
  :phaseList="phaseList"
34
34
  :realtimeStatusModalvisible="true"
35
35
  roadDirection="left"
36
- />
37
- <!-- funcSort="basicFunc" -->
36
+ /> -->
38
37
  </el-dialog>
39
38
  </div>
40
39
  </template>
@@ -42,6 +41,7 @@
42
41
  import { getTscControl } from '../api/control.js'
43
42
  import { getMessageByCode } from '../utils/responseMessage.js'
44
43
  import { getIntersectionInfo } from '../api/template'
44
+ import { getTscPhase } from '../api/cross.js'
45
45
  import {
46
46
  setToken
47
47
  } from '../utils/auth'
@@ -51,14 +51,16 @@ export default {
51
51
  },
52
52
  data () {
53
53
  return {
54
+ timer: 0,
55
+ phaseList2: [],
54
56
  phaseList: [],
55
57
  showWalk: [ 1, 2 ],
56
58
  sidewalkPhaseData: [{key: 'pedphase1653873194007699', phaseid: 1, id: 1, name: '东人行横道', isshow: false}],
57
59
  lockPhaseBtnName: this.$t('openatccomponents.overview.comfirm'),
58
- agentId: '12004-950',
59
- Token: 'eyJraWQiOiIxNjcwMzc0ODA4MTcyIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc1Njc3NDgwOCwiaWF0IjoxNjcwMzc0ODA4fQ.xsRoye_tk_Xf60w5Mpigm8vrPgQJCLN-W_IW4U7dafA',
60
+ agentId: 'cslsnl',
61
+ Token: 'eyJraWQiOiIxNzAxODMyOTQ3MTUwIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJxeXl0aCIsImV4cCI6MTc2OTc4ODgwMCwiaWF0IjoxNzAxMzYwMDAwfQ.RIQpNEkJibL-RYllirDeNLi8G9-t8PecM_m7KlZNQXg',
60
62
  Token103: 'eyJraWQiOiIxNjcwMzc0ODA4MTcyIiwidHlwIjoiSldUIiwiYWxnIjoiSFMyNTYifQ.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTc1Njc3NDgwOCwiaWF0IjoxNjcwMzc0ODA4fQ.xsRoye_tk_Xf60w5Mpigm8vrPgQJCLN-W_IW4U7dafA',
61
- boxVisible: false,
63
+ boxVisible: true,
62
64
  dialogWidth: '80%',
63
65
  crossStatusData: {} // 路口状态数据
64
66
  }
@@ -82,11 +84,10 @@ export default {
82
84
  this.dialogWidth = def + 'px'
83
85
  }
84
86
  },
85
- initData () {
86
- // let iframdevid = getIframdevid()
87
- this.getIntersectionInfo(this.agentId, '')
88
- getTscControl(this.agentId).then((data) => {
89
- if (!data.data.success) {
87
+ getPhase () {
88
+ getTscPhase(this.agentId).then(data => {
89
+ let res = data.data
90
+ if (!res.success) {
90
91
  if (data.data.code === '4002' && data.data.data.errorCode === '4209') {
91
92
  let success = data.data.data.content.success
92
93
  if (success !== 0) {
@@ -95,10 +96,31 @@ export default {
95
96
  return
96
97
  }
97
98
  }
98
- if (data.data.code === '4003') {
99
- this.$message.error(getMessageByCode(data.data.code, this.$i18n.locale))
100
- return
99
+ let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
100
+ if (data.data.data) {
101
+ // 子类型错误
102
+ let childErrorCode = data.data.data.errorCode
103
+ if (childErrorCode) {
104
+ let childerror = getMessageByCode(data.data.data.errorCode, this.$i18n.locale)
105
+ this.$message.error(parrenterror + ',' + childerror)
106
+ }
107
+ } else {
108
+ this.$message.error(parrenterror)
101
109
  }
110
+ return
111
+ }
112
+ if (res.data.data && res.data.data.phaseList) {
113
+ this.phaseList2 = res.data.data.phaseList
114
+ }
115
+ })
116
+ },
117
+ initData () {
118
+ // let iframdevid = getIframdevid()
119
+ this.getIntersectionInfo(this.agentId, '')
120
+ this.getPhase()
121
+ getTscControl(this.agentId).then((data) => {
122
+ // debugger
123
+ if (!data.data.success) {
102
124
  let parrenterror = getMessageByCode(data.data.code, this.$i18n.locale)
103
125
  if (data.data.data) {
104
126
  // 子类型错误
@@ -112,7 +134,11 @@ export default {
112
134
  }
113
135
  return
114
136
  }
137
+ console.log(data.data.data)
115
138
  this.crossStatusData = JSON.parse(JSON.stringify(data.data.data.data))
139
+ // debugger
140
+ console.log(this.crossStatusData)
141
+ // debugger
116
142
  }).catch(error => {
117
143
  console.log(error)
118
144
  })
@@ -136,9 +162,14 @@ export default {
136
162
  created () {
137
163
  this.setDialogWidth()
138
164
  },
165
+ beforeDestroy () {
166
+ clearInterval(this.timer)
167
+ },
139
168
  mounted () {
140
169
  this.setPropsToken(this.Token)
141
- this.initData()
170
+ this.timer = setInterval(() => {
171
+ this.initData()
172
+ }, 1000 * 2)
142
173
  window.onresize = () => {
143
174
  return (() => {
144
175
  this.setDialogWidth()