|
@@ -9,7 +9,7 @@
|
|
|
>
|
|
|
<div class="params-box">
|
|
|
<el-descriptions title="">
|
|
|
- <div v-for="item in airResult" :key="item.code">
|
|
|
+ <div v-for="item in useAirStore().airResult.params" :key="item.code">
|
|
|
<el-descriptions-item :label="getTitle(item.code)">
|
|
|
<el-switch v-model="item.value" disabled active-value="1" inactive-value="0" />
|
|
|
</el-descriptions-item>
|
|
@@ -25,17 +25,9 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts" name="airResult">
|
|
|
-import { ref, computed, onMounted } from 'vue'
|
|
|
+import { ref } from 'vue'
|
|
|
import { useAirStore } from '@/stores/modules/air'
|
|
|
import { getDictsApi } from '@/api/modules/system/dictData'
|
|
|
-import { useUserStore } from '@/stores/modules/user'
|
|
|
-import { initWebSocket } from '@/utils/websocket'
|
|
|
-onMounted(() => {
|
|
|
- const userStore = useUserStore()
|
|
|
- let protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://'
|
|
|
- // initWebSocket(protocol + 'localhost:8089' + '/resource/websocket')
|
|
|
- initWebSocket(protocol + window.location.host + import.meta.env.VITE_API_URL + '/websocket/message/' + userStore.name)
|
|
|
-})
|
|
|
let paramsDicts = ref()
|
|
|
getDictsApi('air_order_result').then(res => {
|
|
|
paramsDicts.value = res.data
|
|
@@ -46,9 +38,10 @@ export interface ParameterProps {
|
|
|
sortieNo?: any
|
|
|
parameters?: any[]
|
|
|
}
|
|
|
-const airResult = computed(() => {
|
|
|
- return useAirStore().airResult.params
|
|
|
-})
|
|
|
+// const airResult = computed(() => {
|
|
|
+// console.log(useAirStore().airResult.params)
|
|
|
+// return useAirStore().airResult.params
|
|
|
+// })
|
|
|
const getTitle = val => {
|
|
|
// console.log(val)
|
|
|
// console.log('paramsDict', paramsDicts.value)
|