openatc-components 0.4.93 → 0.4.95

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.
@@ -12,8 +12,13 @@
12
12
  <!--通道实时状态路口图-->
13
13
  <template>
14
14
  <div class="channel-realtime-intersection">
15
+ <channelization
16
+ v-if="isDefaultShowQuhua && reset"
17
+ ref="channelization"
18
+ :AgentId="this.AgentId"
19
+ :crossStatusData="realTimeChannelData" />
15
20
  <IntersectionMap
16
- v-if="reset"
21
+ v-if="!isDefaultShowQuhua && reset"
17
22
  ref="intersectionMap"
18
23
  channelType
19
24
  :crossStatusData="crossStatusData"
@@ -28,6 +33,7 @@
28
33
  import IntersectionMap from '../IntersectionMap/intersectionmap'
29
34
  import { queryDevice } from '../../../api/control.js'
30
35
  import { getMessageByCode } from '../../../utils/responseMessage.js'
36
+ import { getChannelizatonChart } from '../../../api/cross'
31
37
 
32
38
  export default {
33
39
  name: 'channel-realtime-intersection',
@@ -81,7 +87,8 @@ export default {
81
87
  return {
82
88
  reset: true,
83
89
  crossStatusData: {},
84
- isThirdSignal: false
90
+ isThirdSignal: false,
91
+ isDefaultShowQuhua: true
85
92
  }
86
93
  },
87
94
  methods: {
@@ -102,6 +109,17 @@ export default {
102
109
  this.isThirdSignal = this.thirdSignal
103
110
  }
104
111
  })
112
+ },
113
+ async getChannelizatonChart () {
114
+ this.isDefaultShowQuhua = false
115
+ getChannelizatonChart(this.agentId).then(data => {
116
+ if (!data.data.success) {
117
+ return
118
+ }
119
+ if (data.data.success === true && data.data.data !== undefined && JSON.stringify(data.data.data) !== '{}' && data.data.data.isDefaultShowQuhua === true) {
120
+ this.isDefaultShowQuhua = true
121
+ }
122
+ })
105
123
  }
106
124
  },
107
125
  created () {
@@ -839,6 +839,8 @@ export default {
839
839
  this.curChooseIconIndex = -1
840
840
  let savedTemp = JSON.parse(JSON.stringify(this.LoadedChannelizatonData))
841
841
  let arr = []
842
+ this.isDefaultShowQuhua = savedTemp.isDefaultShowQuhua
843
+ delete savedTemp.isDefaultShowQuhua
842
844
  for (const [key, value] of Object.entries(savedTemp)) {
843
845
  if (key === 'vehile') {
844
846
  this.Motorways = value