Quellcode durchsuchen

fix: 算法任务管理

wanggaokun vor 10 Monaten
Ursprung
Commit
7ef1e18abc
3 geänderte Dateien mit 112 neuen und 37 gelöschten Zeilen
  1. 40 10
      src/api/interface/als/task.ts
  2. 5 6
      src/api/modules/als/task.ts
  3. 67 21
      src/views/als/task/index.vue

+ 40 - 10
src/api/interface/als/task.ts

@@ -25,6 +25,26 @@ export interface TaskVO extends BaseEntity {
    */
   dataId: string | number
 
+  /**
+   * 预处理编号
+   */
+  preId: string | number
+
+  /**
+   * 虚警编号
+   */
+  falseAlarmId: string | number
+
+  /**
+   * 故障诊断编号
+   */
+  faultId: string | number
+
+  /**
+   * 决策编号
+   */
+  decisionId: string | number
+
   /**
    * 创建人
    */
@@ -76,6 +96,26 @@ export interface TaskForm {
    * 数据编号
    */
   dataId?: string | number
+
+  /**
+   * 预处理编号
+   */
+  preId?: string | number
+
+  /**
+   * 虚警编号
+   */
+  falseAlarmId?: string | number
+
+  /**
+   * 故障诊断编号
+   */
+  faultId?: string | number
+
+  /**
+   * 决策编号
+   */
+  decisionId?: string | number
 }
 
 export interface TaskQuery extends PageQuery {
@@ -94,16 +134,6 @@ export interface TaskQuery extends PageQuery {
    */
   sortieNo?: number
 
-  /**
-   * 机号
-   */
-  aircraftId?: string | number
-
-  /**
-   * 数据编号
-   */
-  dataId?: string | number
-
   /**
    * 日期范围参数
    */

+ 5 - 6
src/api/modules/als/task.ts

@@ -1,7 +1,7 @@
 import http from '@/api'
 import { TaskVO, TaskForm, TaskQuery } from '@/api/interface/als/task'
 /**
- * @name 查询任务管理列表
+ * @name 查询任务信息列表
  * @param query 参数
  * @returns 返回列表
  */
@@ -10,7 +10,7 @@ export const listTaskApi = (query: TaskQuery) => {
 }
 
 /**
- * @name 查询任务管理详细
+ * @name 查询任务信息详细
  * @param id id
  * @returns returns
  */
@@ -19,7 +19,7 @@ export const getTaskApi = (id: string | number) => {
 }
 
 /**
- * @name 新增任务管理
+ * @name 新增任务信息
  * @param data data
  * @returns returns
  */
@@ -28,7 +28,7 @@ export const addTaskApi = (data: TaskForm) => {
 }
 
 /**
- * @name 修改任务管理
+ * @name 修改任务信息
  * @param data data
  * @returns returns
  */
@@ -37,14 +37,13 @@ export const updateTaskApi = (data: TaskForm) => {
 }
 
 /**
- * @name 删除任务管理
+ * @name 删除任务信息
  * @param id id
  * @returns returns
  */
 export const delTaskApi = (id: string | number | Array<string | number>) => {
   return http.delete<any>(`/als/task/${id}`)
 }
-
 /**
  * @name 导出数据
  * @returns returns

+ 67 - 21
src/views/als/task/index.vue

@@ -3,7 +3,7 @@
     <ProTable ref="proTable" :columns="columns" row-key="id" :request-api="listTaskApi">
       <!-- 表格 header 按钮 -->
       <template #tableHeader="scope">
-        <el-button type="primary" v-auth="['als:task:add']" icon="CirclePlus" @click="openDialog(1, '任务管理新增')"> 新增 </el-button>
+        <el-button type="primary" v-auth="['als:task:add']" icon="CirclePlus" @click="openDialog(1, '任务信息新增')"> 新增 </el-button>
         <el-button type="primary" v-auth="['als:task:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button>
         <el-button
           type="danger"
@@ -18,8 +18,8 @@
       </template>
       <!-- 表格操作 -->
       <template #operation="scope">
-        <el-button type="primary" link icon="View" v-auth="['als:task:query']" @click="openDialog(3, '任务管理查看', scope.row)"> 查看 </el-button>
-        <el-button type="primary" link icon="EditPen" v-auth="['als:task:edit']" @click="openDialog(2, '任务管理编辑', scope.row)"> 编辑 </el-button>
+        <el-button type="primary" link icon="View" v-auth="['als:task:query']" @click="openDialog(3, '任务信息查看', scope.row)"> 查看 </el-button>
+        <el-button type="primary" link icon="EditPen" v-auth="['als:task:edit']" @click="openDialog(2, '任务信息编辑', scope.row)"> 编辑 </el-button>
         <el-button type="primary" link icon="Delete" v-auth="['als:task:remove']" @click="deleteTask(scope.row)"> 删除 </el-button>
       </template>
     </ProTable>
@@ -35,33 +35,34 @@ import TaskDialog from '@/components/TaskDialog/index.vue'
 import FormDialog from '@/components/FormDialog/index.vue'
 import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
 import { listTaskApi, delTaskApi, addTaskApi, updateTaskApi, exportTaskApi, getTaskApi } from '@/api/modules/als/task'
+const { proxy } = getCurrentInstance() as ComponentInternalInstance
+const { common_type } = toRefs<any>(proxy?.useDict('common_type'))
 
 // ProTable 实例
 const proTable = ref<ProTableInstance>()
 // 表单model
 const model = ref({})
-// 删除任务管理信息
+// 删除任务信息信息
 const deleteTask = async (params: any) => {
-  await useHandleData(delTaskApi, params.id, '删除【' + params.id + '】任务管理')
+  await useHandleData(delTaskApi, params.id, '删除【' + params.id + '】任务信息')
   proTable.value?.getTableList()
 }
 
-// 批量删除任务管理信息
+// 批量删除任务信息信息
 const batchDelete = async (ids: string[]) => {
-  await useHandleData(delTaskApi, ids, '删除所选任务管理信息')
+  await useHandleData(delTaskApi, ids, '删除所选任务信息信息')
   proTable.value?.clearSelection()
   proTable.value?.getTableList()
 }
 
 const taskDialogRef = ref<InstanceType<typeof TaskDialog> | null>(null)
-// 导出任务管理列表
+// 导出任务信息列表
 const downloadFile = async () => {
-  ElMessageBox.confirm('确认导出任务管理数据?', '温馨提示', { type: 'warning' }).then(async () => {
+  ElMessageBox.confirm('确认导出任务信息数据?', '温馨提示', { type: 'warning' }).then(async () => {
     exportTaskApi(proTable.value?.searchParam)
     taskDialogRef.value?.openExportDialog()
   })
 }
-
 const formDialogRef = ref<InstanceType<typeof FormDialog> | null>(null)
 // 打开弹框的功能
 const openDialog = async (type: number, title: string, row?: any) => {
@@ -85,7 +86,7 @@ const openDialog = async (type: number, title: string, row?: any) => {
 // 表格配置项
 const columns = reactive<ColumnProps<any>[]>([
   { type: 'selection', fixed: 'left', width: 70 },
-  { prop: 'id', label: '任务编号' },
+  { prop: 'id', label: '任务编号', width: 120 },
   {
     prop: 'name',
     label: '任务名称',
@@ -97,10 +98,11 @@ const columns = reactive<ColumnProps<any>[]>([
   {
     prop: 'source',
     label: '数据源',
+    tag: true,
+    enum: common_type,
     search: {
-      el: 'input'
-    },
-    width: 120
+      el: 'select'
+    }
   },
   {
     prop: 'sortieNo',
@@ -113,17 +115,31 @@ const columns = reactive<ColumnProps<any>[]>([
   {
     prop: 'aircraftId',
     label: '机号',
-    search: {
-      el: 'input'
-    },
     width: 120
   },
   {
     prop: 'dataId',
     label: '数据编号',
-    search: {
-      el: 'input'
-    },
+    width: 120
+  },
+  {
+    prop: 'preId',
+    label: '预处理编号',
+    width: 120
+  },
+  {
+    prop: 'falseAlarmId',
+    label: '虚警编号',
+    width: 120
+  },
+  {
+    prop: 'faultId',
+    label: '故障诊断编号',
+    width: 120
+  },
+  {
+    prop: 'decisionId',
+    label: '决策编号',
     width: 120
   },
   {
@@ -164,7 +180,9 @@ const setItemsOptions = () => {
       label: '数据源',
       prop: 'source',
       compOptions: {
-        placeholder: '请输入数据源'
+        elTagName: 'select',
+        enum: common_type.value,
+        placeholder: '请选择数据源'
       }
     },
     {
@@ -187,6 +205,34 @@ const setItemsOptions = () => {
       compOptions: {
         placeholder: '请输入数据编号'
       }
+    },
+    {
+      label: '预处理编号',
+      prop: 'preId',
+      compOptions: {
+        placeholder: '请输入预处理编号'
+      }
+    },
+    {
+      label: '虚警编号',
+      prop: 'falseAlarmId',
+      compOptions: {
+        placeholder: '请输入虚警编号'
+      }
+    },
+    {
+      label: '故障诊断编号',
+      prop: 'faultId',
+      compOptions: {
+        placeholder: '请输入故障诊断编号'
+      }
+    },
+    {
+      label: '决策编号',
+      prop: 'decisionId',
+      compOptions: {
+        placeholder: '请输入决策编号'
+      }
     }
   ]
 }