wanggaokun 10 сар өмнө
parent
commit
3db051dbda

+ 1 - 1
src/api/modules/manage/dataDown.ts

@@ -75,7 +75,7 @@ export const exportApi = (data: any) => {
  * @returns returns
  * @returns returns
  */
  */
 export const dataDownApi = (data: any) => {
 export const dataDownApi = (data: any) => {
-  return http.get<any>(`/data/down`, data, { loading: true })
+  return http.get<any>(`/netty/down`, data, { loading: true })
 }
 }
 
 
 /**
 /**

+ 10 - 10
src/components/ProFormOld/index.vue

@@ -2,7 +2,7 @@
   <el-form @submit.prevent :model="formModel" v-bind="_options" ref="formRef">
   <el-form @submit.prevent :model="formModel" v-bind="_options" ref="formRef">
     <el-row :gutter="5">
     <el-row :gutter="5">
       <template v-for="(item, index) in fieldList" :key="index">
       <template v-for="(item, index) in fieldList" :key="index">
-        <el-col :span="item.span || 24" v-if="show(item.show)">
+        <el-col :span="item.span || 24">
           <el-form-item :rules="item.rules" :prop="[item.field]">
           <el-form-item :rules="item.rules" :prop="[item.field]">
             <template #label>
             <template #label>
               <el-space :size="1">
               <el-space :size="1">
@@ -147,15 +147,15 @@ interface EmitEvent {
   (e: 'cancel'): void
   (e: 'cancel'): void
 }
 }
 
 
-const show = (showFunction: any) => {
-  if (!showFunction) return true
-  if (typeof showFunction == 'function') {
-    // 直接调用 showFunction 函数,并传入 formModel.value
-    return showFunction(formModel.value)
-  }
-  // 如果 showFunction 不是函数,直接返回 true 显示该表单项
-  return true
-}
+// const show = (showFunction: any) => {
+//   if (!showFunction) return true
+//   if (typeof showFunction == 'function') {
+//     // 直接调用 showFunction 函数,并传入 formModel.value
+//     return showFunction(formModel.value)
+//   }
+//   // 如果 showFunction 不是函数,直接返回 true 显示该表单项
+//   return true
+// }
 const enumMap = ref(new Map<string, { [key: string]: any }[]>())
 const enumMap = ref(new Map<string, { [key: string]: any }[]>())
 const setEnumMap = async ({ field, enum: enumValue }: Form.FieldItem) => {
 const setEnumMap = async ({ field, enum: enumValue }: Form.FieldItem) => {
   if (!enumValue) return
   if (!enumValue) return

+ 10 - 4
src/utils/websocket.ts

@@ -140,10 +140,16 @@ export const websocketOnmessage = () => {
       useAirStore().setAirResult(result[1])
       useAirStore().setAirResult(result[1])
       return
       return
     }
     }
-    // if (e.data.indexOf('机载PHM指令') >= 0) {
-    //   useInstStore().setAirResult(e.data)
-    //   return
-    // }
+    if (e.data.indexOf('数据下载已完成') >= 0) {
+      ElNotification({
+        title,
+        message: e.data,
+        type: 'success',
+        duration: 3000
+      })
+      playSound()
+      return
+    }
     useNoticeStore().addNotice({
     useNoticeStore().addNotice({
       message: e.data,
       message: e.data,
       read: false,
       read: false,

+ 14 - 14
src/views/manage/dataDown/index.vue

@@ -39,7 +39,7 @@ import FormDialog from '@/components/FormDialog/index.vue'
 import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
 import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
 import { Download, View, Delete } from '@element-plus/icons-vue'
 import { Download, View, Delete } from '@element-plus/icons-vue'
 import { listSortieParameterApi, getSortieParameterApi, delSortieParameterApi } from '@/api/modules/manage/sortieParameter'
 import { listSortieParameterApi, getSortieParameterApi, delSortieParameterApi } from '@/api/modules/manage/sortieParameter'
-// import { listAircraftAllApi } from '@/api/modules/manage/aircraft'
+import { listAircraftAllApi } from '@/api/modules/manage/aircraft'
 import { getDictsApi } from '@/api/modules/system/dictData'
 import { getDictsApi } from '@/api/modules/system/dictData'
 import { listSortieAllApi } from '@/api/modules/manage/sortie'
 import { listSortieAllApi } from '@/api/modules/manage/sortie'
 import { dataDownApi, dataUploadApi } from '@/api/modules/manage/dataDown'
 import { dataDownApi, dataUploadApi } from '@/api/modules/manage/dataDown'
@@ -249,20 +249,20 @@ const setOnlineDownFieldList = () => {
         allowCreate: true
         allowCreate: true
       },
       },
       placeholder: '请选择架次'
       placeholder: '请选择架次'
+    },
+    {
+      label: '机号',
+      field: 'aircraftNumber',
+      span: 20,
+      enum: listAircraftAllApi,
+      type: 'select',
+      clearable: true,
+      options: {
+        labelKey: 'number',
+        valueKey: 'number'
+      },
+      placeholder: '请选择架次'
     }
     }
-    // {
-    //   label: '机号',
-    //   field: 'aircraftNumber',
-    //   span: 20,
-    //   enum: listAircraftAllApi,
-    //   type: 'select',
-    //   clearable: true,
-    //   options: {
-    //     labelKey: 'number',
-    //     valueKey: 'number'
-    //   },
-    //   placeholder: '请选择架次'
-    // }
   ]
   ]
 }
 }
 // 在线下载表单项
 // 在线下载表单项