浏览代码

feat: dev

allen 1 年之前
父节点
当前提交
c0383ffdf4

+ 181 - 0
src/api/interface/task/bizProcess.ts

@@ -0,0 +1,181 @@
+import { PageQuery, BaseEntity } from '@/api/interface/index'
+export interface BizProcessVO extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id: string | number
+
+  /**
+   * 子任务id
+   */
+  subTaskId: string | number
+
+  /**
+   * 任务名称
+   */
+  name: string
+
+  /**
+   * 任务类型
+   */
+  type: string
+
+  /**
+   * 任务状态
+   */
+  status: string
+
+  /**
+   * 算法
+   */
+  algorithmId: string | number
+
+  /**
+   * 模型
+   */
+  modelId: string | number
+
+  /**
+   * 调用算法时所用的参数
+   */
+  parameters: string
+
+  /**
+   * 预处理数据路径
+   */
+  preprocessPath: string
+
+  /**
+   * 结果数据路径
+   */
+  resultPath: string
+
+  /**
+   * 序号
+   */
+  index: number
+
+  /**
+   * 开始时间
+   */
+  startTime: string
+
+  /**
+   * 结束时间
+   */
+  endTime: string
+
+  /**
+   * 耗时
+   */
+  costSecond: number
+
+  /**
+   * 日志
+   */
+  log: string
+}
+
+export interface BizProcessForm {
+  /**
+   * 主键ID
+   */
+  id?: string | number
+
+  /**
+   * 子任务id
+   */
+  subTaskId?: string | number
+
+  /**
+   * 任务名称
+   */
+  name?: string
+
+  /**
+   * 任务类型
+   */
+  type?: string
+
+  /**
+   * 任务状态
+   */
+  status?: string
+
+  /**
+   * 算法
+   */
+  algorithmId?: string | number
+
+  /**
+   * 模型
+   */
+  modelId?: string | number
+
+  /**
+   * 调用算法时所用的参数
+   */
+  parameters?: string
+
+  /**
+   * 预处理数据路径
+   */
+  preprocessPath?: string
+
+  /**
+   * 结果数据路径
+   */
+  resultPath?: string
+
+  /**
+   * 序号
+   */
+  index?: number
+
+  /**
+   * 开始时间
+   */
+  startTime?: string
+
+  /**
+   * 结束时间
+   */
+  endTime?: string
+
+  /**
+   * 耗时
+   */
+  costSecond?: number
+
+  /**
+   * 日志
+   */
+  log?: string
+}
+
+export interface BizProcessQuery extends PageQuery {
+  /**
+   * 子任务id
+   */
+  subTaskId?: string | number
+
+  /**
+   * 任务名称
+   */
+  name?: string
+
+  /**
+   * 任务类型
+   */
+  type?: string
+
+  /**
+   * 任务状态
+   */
+  status?: string
+
+  /**
+   * 日期范围参数
+   */
+  params?: any
+}

+ 171 - 0
src/api/interface/task/dataProcess.ts

@@ -0,0 +1,171 @@
+import { PageQuery, BaseEntity } from '@/api/interface/index'
+export interface DataProcessVO extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id: string | number
+
+  /**
+   * 子任务id
+   */
+  subTaskId: string | number
+
+  /**
+   * 任务名称
+   */
+  name: string
+
+  /**
+   * 任务类型
+   */
+  type: string
+
+  /**
+   * 任务状态
+   */
+  status: string
+
+  /**
+   * 算法
+   */
+  algorithmId: string | number
+
+  /**
+   * 调用算法时所用的参数
+   */
+  parameters: string
+
+  /**
+   * 预处理数据路径
+   */
+  preprocessPath: string
+
+  /**
+   * 结果数据路径
+   */
+  resultPath: string
+
+  /**
+   * 开始时间
+   */
+  startTime: string
+
+  /**
+   * 序号
+   */
+  index: number
+
+  /**
+   * 结束时间
+   */
+  endTime: string
+
+  /**
+   * 耗时
+   */
+  costSecond: number
+
+  /**
+   * 日志
+   */
+  log: string
+}
+
+export interface DataProcessForm {
+  /**
+   * 主键ID
+   */
+  id?: string | number
+
+  /**
+   * 子任务id
+   */
+  subTaskId?: string | number
+
+  /**
+   * 任务名称
+   */
+  name?: string
+
+  /**
+   * 任务类型
+   */
+  type?: string
+
+  /**
+   * 任务状态
+   */
+  status?: string
+
+  /**
+   * 算法
+   */
+  algorithmId?: string | number
+
+  /**
+   * 调用算法时所用的参数
+   */
+  parameters?: string
+
+  /**
+   * 预处理数据路径
+   */
+  preprocessPath?: string
+
+  /**
+   * 结果数据路径
+   */
+  resultPath?: string
+
+  /**
+   * 开始时间
+   */
+  startTime?: string
+
+  /**
+   * 序号
+   */
+  index?: number
+
+  /**
+   * 结束时间
+   */
+  endTime?: string
+
+  /**
+   * 耗时
+   */
+  costSecond?: number
+
+  /**
+   * 日志
+   */
+  log?: string
+}
+
+export interface DataProcessQuery extends PageQuery {
+  /**
+   * 子任务id
+   */
+  subTaskId?: string | number
+
+  /**
+   * 任务名称
+   */
+  name?: string
+
+  /**
+   * 任务类型
+   */
+  type?: string
+
+  /**
+   * 任务状态
+   */
+  status?: string
+
+  /**
+   * 日期范围参数
+   */
+  params?: any
+}

+ 151 - 0
src/api/interface/task/dataSet.ts

@@ -0,0 +1,151 @@
+import { PageQuery, BaseEntity } from '@/api/interface/index'
+export interface DataSetVO extends BaseEntity {
+  /**
+   * 主键ID
+   */
+  id: string | number
+
+  /**
+   * 子任务id
+   */
+  subTaskId: string | number
+
+  /**
+   * 任务名称
+   */
+  name: string
+
+  /**
+   * 任务类型
+   */
+  type: string
+
+  /**
+   * 任务状态
+   */
+  status: string
+
+  /**
+   * 调用算法时所用的参数
+   */
+  parameters: string
+
+  /**
+   * 结果数据路径
+   */
+  resultPath: string
+
+  /**
+   * 开始时间
+   */
+  startTime: string
+
+  /**
+   * 序号
+   */
+  index: number
+
+  /**
+   * 结束时间
+   */
+  endTime: string
+
+  /**
+   * 耗时
+   */
+  costSecond: number
+
+  /**
+   * 日志
+   */
+  log: string
+}
+
+export interface DataSetForm {
+  /**
+   * 主键ID
+   */
+  id?: string | number
+
+  /**
+   * 子任务id
+   */
+  subTaskId?: string | number
+
+  /**
+   * 任务名称
+   */
+  name?: string
+
+  /**
+   * 任务类型
+   */
+  type?: string
+
+  /**
+   * 任务状态
+   */
+  status?: string
+
+  /**
+   * 调用算法时所用的参数
+   */
+  parameters?: string
+
+  /**
+   * 结果数据路径
+   */
+  resultPath?: string
+
+  /**
+   * 开始时间
+   */
+  startTime?: string
+
+  /**
+   * 序号
+   */
+  index?: number
+
+  /**
+   * 结束时间
+   */
+  endTime?: string
+
+  /**
+   * 耗时
+   */
+  costSecond?: number
+
+  /**
+   * 日志
+   */
+  log?: string
+}
+
+export interface DataSetQuery extends PageQuery {
+  /**
+   * 子任务id
+   */
+  subTaskId?: string | number
+
+  /**
+   * 任务名称
+   */
+  name?: string
+
+  /**
+   * 任务类型
+   */
+  type?: string
+
+  /**
+   * 任务状态
+   */
+  status?: string
+
+  /**
+   * 日期范围参数
+   */
+  params?: any
+}

+ 29 - 9
src/api/interface/task/subtask.ts

@@ -1,10 +1,5 @@
 import { PageQuery, BaseEntity } from '@/api/interface/index'
 export interface SubtaskVO extends BaseEntity {
-  /**
-   * 主键ID
-   */
-  id: string | number
-
   /**
    * 任务名称
    */
@@ -15,6 +10,11 @@ export interface SubtaskVO extends BaseEntity {
    */
   status: string
 
+  /**
+   * 任务类型
+   */
+  type: string
+
   /**
    * 调用算法时所用的参数
    */
@@ -38,9 +38,9 @@ export interface SubtaskVO extends BaseEntity {
 
 export interface SubtaskForm {
   /**
-   * 主键ID
+   * 任务ID
    */
-  id?: string | number
+  taskId?: string | number
 
   /**
    * 任务名称
@@ -52,6 +52,11 @@ export interface SubtaskForm {
    */
   status?: string
 
+  /**
+   * 任务类型
+   */
+  type?: string
+
   /**
    * 调用算法时所用的参数
    */
@@ -78,9 +83,9 @@ export interface SubtaskForm {
   log?: string
 
   /**
-   * 是否包含详情
+   * 序号
    */
-  hasDetails?: number
+  index?: number
 }
 
 export interface SubtaskQuery extends PageQuery {
@@ -94,6 +99,21 @@ export interface SubtaskQuery extends PageQuery {
    */
   status?: string
 
+  /**
+   * 任务类型
+   */
+  type?: string
+
+  /**
+   * 开始时间
+   */
+  startTime?: string
+
+  /**
+   * 结束时间
+   */
+  endTime?: string
+
   /**
    * 日期范围参数
    */

+ 9 - 9
src/api/modules/demo/data.ts

@@ -1,12 +1,12 @@
 import http from '@/api'
-
+import { DataVO, DataForm, DataQuery } from '@/api/interface/demo/data'
 /**
  * @name 查询数据管理列表
  * @param query 参数
  * @returns 返回列表
  */
-export const listDataApi = (query: any) => {
-  return http.get<any>('/demo/data/list', query, { loading: true })
+export const listDataApi = (query: DataQuery) => {
+  return http.get<DataVO[]>('/demo/data/list', query, { loading: true })
 }
 
 /**
@@ -14,8 +14,8 @@ export const listDataApi = (query: any) => {
  * @param id id
  * @returns returns
  */
-export const getDataApi = (id: any) => {
-  return http.get<any>(`/demo/data/${id}`)
+export const getDataApi = (id: string | number) => {
+  return http.get<DataVO>(`/demo/data/${id}`)
 }
 
 /**
@@ -23,7 +23,7 @@ export const getDataApi = (id: any) => {
  * @param data data
  * @returns returns
  */
-export const addDataApi = (data: any) => {
+export const addDataApi = (data: DataForm) => {
   return http.post<any>('/demo/data', data, { loading: false })
 }
 
@@ -32,7 +32,7 @@ export const addDataApi = (data: any) => {
  * @param data data
  * @returns returns
  */
-export const updateDataApi = (data: any) => {
+export const updateDataApi = (data: DataForm) => {
   return http.put<any>('/demo/data', data, { loading: false })
 }
 
@@ -41,7 +41,7 @@ export const updateDataApi = (data: any) => {
  * @param id id
  * @returns returns
  */
-export const delDataApi = (id: any) => {
+export const delDataApi = (id: string | number | Array<string | number>) => {
   return http.delete<any>(`/demo/data/${id}`)
 }
 
@@ -58,7 +58,7 @@ export const importTemplateApi = () => {
  * @returns returns
  */
 export const importDataDataApi = (data: any) => {
-  return http.post('/common/zip/upload', data)
+  return http.post('/demo/data/importData', data)
 }
 
 /**

+ 70 - 0
src/api/modules/task/bizProcess.ts

@@ -0,0 +1,70 @@
+import http from '@/api'
+import { BizProcessVO, BizProcessForm, BizProcessQuery } from '@/api/interface/task/bizProcess'
+/**
+ * @name 查询算法业务处理列表
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const listBizProcessApi = (query: BizProcessQuery) => {
+  return http.get<BizProcessVO[]>('/task/bizProcess/list', query, { loading: true })
+}
+
+/**
+ * @name 查询算法业务处理详细
+ * @param id id
+ * @returns returns
+ */
+export const getBizProcessApi = (id: string | number) => {
+  return http.get<BizProcessVO>(`/task/bizProcess/${id}`)
+}
+
+/**
+ * @name 新增算法业务处理
+ * @param data data
+ * @returns returns
+ */
+export const addBizProcessApi = (data: BizProcessForm) => {
+  return http.post<any>('/task/bizProcess', data, { loading: false })
+}
+
+/**
+ * @name 修改算法业务处理
+ * @param data data
+ * @returns returns
+ */
+export const updateBizProcessApi = (data: BizProcessForm) => {
+  return http.put<any>('/task/bizProcess', data, { loading: false })
+}
+
+/**
+ * @name 删除算法业务处理
+ * @param id id
+ * @returns returns
+ */
+export const delBizProcessApi = (id: string | number | Array<string | number>) => {
+  return http.delete<any>(`/task/bizProcess/${id}`)
+}
+
+/**
+ * @name 下载模板
+ * @returns returns
+ */
+export const importTemplateApi = () => {
+  return http.downloadPost('/task/bizProcess/importTemplate', {})
+}
+
+/**
+ * @name 导入数据
+ * @returns returns
+ */
+export const importBizProcessDataApi = (data: any) => {
+  return http.post('/task/bizProcess/importData', data)
+}
+
+/**
+ * @name 导出数据
+ * @returns returns
+ */
+export const exportBizProcessApi = (data: any) => {
+  return http.downloadPost('/task/bizProcess/export', data)
+}

+ 70 - 0
src/api/modules/task/dataProcess.ts

@@ -0,0 +1,70 @@
+import http from '@/api'
+import { DataProcessVO, DataProcessForm, DataProcessQuery } from '@/api/interface/task/dataProcess'
+/**
+ * @name 查询算法数据处理列表
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const listDataProcessApi = (query: DataProcessQuery) => {
+  return http.get<DataProcessVO[]>('/task/dataProcess/list', query, { loading: true })
+}
+
+/**
+ * @name 查询算法数据处理详细
+ * @param id id
+ * @returns returns
+ */
+export const getDataProcessApi = (id: string | number) => {
+  return http.get<DataProcessVO>(`/task/dataProcess/${id}`)
+}
+
+/**
+ * @name 新增算法数据处理
+ * @param data data
+ * @returns returns
+ */
+export const addDataProcessApi = (data: DataProcessForm) => {
+  return http.post<any>('/task/dataProcess', data, { loading: false })
+}
+
+/**
+ * @name 修改算法数据处理
+ * @param data data
+ * @returns returns
+ */
+export const updateDataProcessApi = (data: DataProcessForm) => {
+  return http.put<any>('/task/dataProcess', data, { loading: false })
+}
+
+/**
+ * @name 删除算法数据处理
+ * @param id id
+ * @returns returns
+ */
+export const delDataProcessApi = (id: string | number | Array<string | number>) => {
+  return http.delete<any>(`/task/dataProcess/${id}`)
+}
+
+/**
+ * @name 下载模板
+ * @returns returns
+ */
+export const importTemplateApi = () => {
+  return http.downloadPost('/task/dataProcess/importTemplate', {})
+}
+
+/**
+ * @name 导入数据
+ * @returns returns
+ */
+export const importDataProcessDataApi = (data: any) => {
+  return http.post('/task/dataProcess/importData', data)
+}
+
+/**
+ * @name 导出数据
+ * @returns returns
+ */
+export const exportDataProcessApi = (data: any) => {
+  return http.downloadPost('/task/dataProcess/export', data)
+}

+ 70 - 0
src/api/modules/task/dataSet.ts

@@ -0,0 +1,70 @@
+import http from '@/api'
+import { DataSetVO, DataSetForm, DataSetQuery } from '@/api/interface/task/dataSet'
+/**
+ * @name 查询算法数据集合列表
+ * @param query 参数
+ * @returns 返回列表
+ */
+export const listDataSetApi = (query: DataSetQuery) => {
+  return http.get<DataSetVO[]>('/task/dataSet/list', query, { loading: true })
+}
+
+/**
+ * @name 查询算法数据集合详细
+ * @param id id
+ * @returns returns
+ */
+export const getDataSetApi = (id: string | number) => {
+  return http.get<DataSetVO>(`/task/dataSet/${id}`)
+}
+
+/**
+ * @name 新增算法数据集合
+ * @param data data
+ * @returns returns
+ */
+export const addDataSetApi = (data: DataSetForm) => {
+  return http.post<any>('/task/dataSet', data, { loading: false })
+}
+
+/**
+ * @name 修改算法数据集合
+ * @param data data
+ * @returns returns
+ */
+export const updateDataSetApi = (data: DataSetForm) => {
+  return http.put<any>('/task/dataSet', data, { loading: false })
+}
+
+/**
+ * @name 删除算法数据集合
+ * @param id id
+ * @returns returns
+ */
+export const delDataSetApi = (id: string | number | Array<string | number>) => {
+  return http.delete<any>(`/task/dataSet/${id}`)
+}
+
+/**
+ * @name 下载模板
+ * @returns returns
+ */
+export const importTemplateApi = () => {
+  return http.downloadPost('/task/dataSet/importTemplate', {})
+}
+
+/**
+ * @name 导入数据
+ * @returns returns
+ */
+export const importDataSetDataApi = (data: any) => {
+  return http.post('/task/dataSet/importData', data)
+}
+
+/**
+ * @name 导出数据
+ * @returns returns
+ */
+export const exportDataSetApi = (data: any) => {
+  return http.downloadPost('/task/dataSet/export', data)
+}

+ 312 - 0
src/views/task/bizProcess/index.vue

@@ -0,0 +1,312 @@
+<template>
+  <div class="table-box">
+    <ProTable ref="proTable" :columns="columns" row-key="id" :request-api="listBizProcessApi">
+      <!-- 表格 header 按钮 -->
+      <template #tableHeader="scope">
+        <el-button type="primary" v-auth="['task:bizProcess:add']" icon="CirclePlus" @click="openDialog(1, '算法业务处理新增')"> 新增 </el-button>
+        <el-button type="primary" v-auth="['task:bizProcess:import']" icon="Upload" plain @click="batchAdd"> 导入 </el-button>
+        <el-button type="primary" v-auth="['task:bizProcess:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button>
+        <el-button
+          type="danger"
+          v-auth="['task:bizProcess:remove']"
+          icon="Delete"
+          plain
+          :disabled="!scope.isSelected"
+          @click="batchDelete(scope.selectedListIds)"
+        >
+          批量删除
+        </el-button>
+      </template>
+      <!-- 表格操作 -->
+      <template #operation="scope">
+        <el-button type="primary" link icon="View" v-auth="['task:bizProcess:query']" @click="openDialog(3, '算法业务处理查看', scope.row)">
+          查看
+        </el-button>
+        <el-button type="primary" link icon="EditPen" v-auth="['task:bizProcess:edit']" @click="openDialog(2, '算法业务处理编辑', scope.row)">
+          编辑
+        </el-button>
+        <el-button type="primary" link icon="Delete" v-auth="['task:bizProcess:remove']" @click="deleteBizProcess(scope.row)"> 删除 </el-button>
+      </template>
+    </ProTable>
+    <FormDialog ref="formDialogRef" />
+    <ImportExcel ref="dialogRef" />
+  </div>
+</template>
+
+<script setup lang="tsx" name="BizProcess">
+import { ref, reactive } from 'vue'
+import { useHandleData } from '@/hooks/useHandleData'
+import { useDownload } from '@/hooks/useDownload'
+import { ElMessageBox } from 'element-plus'
+import ProTable from '@/components/ProTable/index.vue'
+import ImportExcel from '@/components/ImportExcel/index.vue'
+import FormDialog from '@/components/FormDialog/index.vue'
+import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
+import {
+  listBizProcessApi,
+  delBizProcessApi,
+  addBizProcessApi,
+  updateBizProcessApi,
+  importTemplateApi,
+  importBizProcessDataApi,
+  exportBizProcessApi,
+  getBizProcessApi
+} from '@/api/modules/task/bizProcess'
+
+// ProTable 实例
+const proTable = ref<ProTableInstance>()
+
+// 删除算法业务处理信息
+const deleteBizProcess = async (params: any) => {
+  await useHandleData(delBizProcessApi, params.id, '删除【' + params.id + '】算法业务处理')
+  proTable.value?.getTableList()
+}
+
+// 批量删除算法业务处理信息
+const batchDelete = async (ids: string[]) => {
+  await useHandleData(delBizProcessApi, ids, '删除所选算法业务处理信息')
+  proTable.value?.clearSelection()
+  proTable.value?.getTableList()
+}
+
+// 导出算法业务处理列表
+const downloadFile = async () => {
+  ElMessageBox.confirm('确认导出算法业务处理数据?', '温馨提示', { type: 'warning' }).then(() =>
+    useDownload(exportBizProcessApi, '算法业务处理列表', proTable.value?.searchParam)
+  )
+}
+
+// 批量添加算法业务处理
+const dialogRef = ref<InstanceType<typeof ImportExcel> | null>(null)
+const batchAdd = () => {
+  const params = {
+    title: '算法业务处理',
+    tempApi: importTemplateApi,
+    importApi: importBizProcessDataApi,
+    getTableList: proTable.value?.getTableList
+  }
+  dialogRef.value?.acceptParams(params)
+}
+
+const formDialogRef = ref<InstanceType<typeof FormDialog> | null>(null)
+// 打开弹框的功能
+const openDialog = async (type: number, title: string, row?: any) => {
+  let res = { data: {} }
+  if (row?.id) {
+    res = await getBizProcessApi(row?.id || null)
+  }
+  // 重置表单
+  setItemsOptions()
+  const params = {
+    title,
+    width: 580,
+    isEdit: type !== 3,
+    itemsOptions: itemsOptions,
+    model: type == 1 ? {} : res.data,
+    api: type == 1 ? addBizProcessApi : updateBizProcessApi,
+    getTableList: proTable.value?.getTableList
+  }
+  formDialogRef.value?.openDialog(params)
+}
+
+// 表格配置项
+const columns = reactive<ColumnProps<any>[]>([
+  { type: 'selection', fixed: 'left', width: 70 },
+  { prop: 'id', label: '主键ID' },
+  {
+    prop: 'subTaskId',
+    label: '子任务id',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'name',
+    label: '任务名称',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'type',
+    label: '任务类型',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'status',
+    label: '任务状态',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'algorithmId',
+    label: '算法',
+    width: 120
+  },
+  {
+    prop: 'modelId',
+    label: '模型',
+    width: 120
+  },
+  {
+    prop: 'parameters',
+    label: '调用算法时所用的参数',
+    width: 120
+  },
+  {
+    prop: 'preprocessPath',
+    label: '预处理数据路径',
+    width: 120
+  },
+  {
+    prop: 'resultPath',
+    label: '结果数据路径',
+    width: 120
+  },
+  {
+    prop: 'index',
+    label: '序号',
+    width: 120
+  },
+  {
+    prop: 'startTime',
+    label: '开始时间',
+    width: 120
+  },
+  {
+    prop: 'endTime',
+    label: '结束时间',
+    width: 120
+  },
+  {
+    prop: 'costSecond',
+    label: '耗时',
+    width: 120
+  },
+  {
+    prop: 'log',
+    label: '日志',
+    width: 120
+  },
+  { prop: 'operation', label: '操作', width: 230, fixed: 'right' }
+])
+// 表单配置项
+let itemsOptions: ProForm.ItemsOptions[] = []
+const setItemsOptions = () => {
+  itemsOptions = [
+    {
+      label: '子任务id',
+      prop: 'subTaskId',
+      compOptions: {
+        placeholder: '请输入子任务id'
+      }
+    },
+    {
+      label: '任务名称',
+      prop: 'name',
+      compOptions: {
+        placeholder: '请输入任务名称'
+      }
+    },
+    {
+      label: '任务类型',
+      prop: 'type',
+      compOptions: {
+        placeholder: '请输入任务类型'
+      }
+    },
+    {
+      label: '任务状态',
+      prop: 'status',
+      compOptions: {
+        placeholder: '请输入任务状态'
+      }
+    },
+    {
+      label: '算法',
+      prop: 'algorithmId',
+      compOptions: {
+        placeholder: '请输入算法'
+      }
+    },
+    {
+      label: '模型',
+      prop: 'modelId',
+      compOptions: {
+        placeholder: '请输入模型'
+      }
+    },
+    {
+      label: '调用算法时所用的参数',
+      prop: 'parameters',
+      compOptions: {
+        type: 'textarea',
+        clearable: true,
+        placeholder: '请输入内容'
+      }
+    },
+    {
+      label: '预处理数据路径',
+      prop: 'preprocessPath',
+      compOptions: {
+        placeholder: '请输入预处理数据路径'
+      }
+    },
+    {
+      label: '结果数据路径',
+      prop: 'resultPath',
+      compOptions: {
+        placeholder: '请输入结果数据路径'
+      }
+    },
+    {
+      label: '序号',
+      prop: 'index',
+      compOptions: {
+        placeholder: '请输入序号'
+      }
+    },
+    {
+      label: '开始时间',
+      prop: 'startTime',
+      compOptions: {
+        elTagName: 'date-picker',
+        type: 'date',
+        placeholder: '请选择开始时间'
+      }
+    },
+    {
+      label: '结束时间',
+      prop: 'endTime',
+      compOptions: {
+        elTagName: 'date-picker',
+        type: 'date',
+        placeholder: '请选择结束时间'
+      }
+    },
+    {
+      label: '耗时',
+      prop: 'costSecond',
+      compOptions: {
+        placeholder: '请输入耗时'
+      }
+    },
+    {
+      label: '日志',
+      prop: 'log',
+      compOptions: {
+        type: 'textarea',
+        clearable: true,
+        placeholder: '请输入内容'
+      }
+    }
+  ]
+}
+</script>

+ 300 - 0
src/views/task/dataProcess/index.vue

@@ -0,0 +1,300 @@
+<template>
+  <div class="table-box">
+    <ProTable ref="proTable" :columns="columns" row-key="id" :request-api="listDataProcessApi">
+      <!-- 表格 header 按钮 -->
+      <template #tableHeader="scope">
+        <el-button type="primary" v-auth="['task:dataProcess:add']" icon="CirclePlus" @click="openDialog(1, '算法数据处理新增')"> 新增 </el-button>
+        <el-button type="primary" v-auth="['task:dataProcess:import']" icon="Upload" plain @click="batchAdd"> 导入 </el-button>
+        <el-button type="primary" v-auth="['task:dataProcess:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button>
+        <el-button
+          type="danger"
+          v-auth="['task:dataProcess:remove']"
+          icon="Delete"
+          plain
+          :disabled="!scope.isSelected"
+          @click="batchDelete(scope.selectedListIds)"
+        >
+          批量删除
+        </el-button>
+      </template>
+      <!-- 表格操作 -->
+      <template #operation="scope">
+        <el-button type="primary" link icon="View" v-auth="['task:dataProcess:query']" @click="openDialog(3, '算法数据处理查看', scope.row)">
+          查看
+        </el-button>
+        <el-button type="primary" link icon="EditPen" v-auth="['task:dataProcess:edit']" @click="openDialog(2, '算法数据处理编辑', scope.row)">
+          编辑
+        </el-button>
+        <el-button type="primary" link icon="Delete" v-auth="['task:dataProcess:remove']" @click="deleteDataProcess(scope.row)"> 删除 </el-button>
+      </template>
+    </ProTable>
+    <FormDialog ref="formDialogRef" />
+    <ImportExcel ref="dialogRef" />
+  </div>
+</template>
+
+<script setup lang="tsx" name="DataProcess">
+import { ref, reactive } from 'vue'
+import { useHandleData } from '@/hooks/useHandleData'
+import { useDownload } from '@/hooks/useDownload'
+import { ElMessageBox } from 'element-plus'
+import ProTable from '@/components/ProTable/index.vue'
+import ImportExcel from '@/components/ImportExcel/index.vue'
+import FormDialog from '@/components/FormDialog/index.vue'
+import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
+import {
+  listDataProcessApi,
+  delDataProcessApi,
+  addDataProcessApi,
+  updateDataProcessApi,
+  importTemplateApi,
+  importDataProcessDataApi,
+  exportDataProcessApi,
+  getDataProcessApi
+} from '@/api/modules/task/dataProcess'
+
+// ProTable 实例
+const proTable = ref<ProTableInstance>()
+
+// 删除算法数据处理信息
+const deleteDataProcess = async (params: any) => {
+  await useHandleData(delDataProcessApi, params.id, '删除【' + params.id + '】算法数据处理')
+  proTable.value?.getTableList()
+}
+
+// 批量删除算法数据处理信息
+const batchDelete = async (ids: string[]) => {
+  await useHandleData(delDataProcessApi, ids, '删除所选算法数据处理信息')
+  proTable.value?.clearSelection()
+  proTable.value?.getTableList()
+}
+
+// 导出算法数据处理列表
+const downloadFile = async () => {
+  ElMessageBox.confirm('确认导出算法数据处理数据?', '温馨提示', { type: 'warning' }).then(() =>
+    useDownload(exportDataProcessApi, '算法数据处理列表', proTable.value?.searchParam)
+  )
+}
+
+// 批量添加算法数据处理
+const dialogRef = ref<InstanceType<typeof ImportExcel> | null>(null)
+const batchAdd = () => {
+  const params = {
+    title: '算法数据处理',
+    tempApi: importTemplateApi,
+    importApi: importDataProcessDataApi,
+    getTableList: proTable.value?.getTableList
+  }
+  dialogRef.value?.acceptParams(params)
+}
+
+const formDialogRef = ref<InstanceType<typeof FormDialog> | null>(null)
+// 打开弹框的功能
+const openDialog = async (type: number, title: string, row?: any) => {
+  let res = { data: {} }
+  if (row?.id) {
+    res = await getDataProcessApi(row?.id || null)
+  }
+  // 重置表单
+  setItemsOptions()
+  const params = {
+    title,
+    width: 580,
+    isEdit: type !== 3,
+    itemsOptions: itemsOptions,
+    model: type == 1 ? {} : res.data,
+    api: type == 1 ? addDataProcessApi : updateDataProcessApi,
+    getTableList: proTable.value?.getTableList
+  }
+  formDialogRef.value?.openDialog(params)
+}
+
+// 表格配置项
+const columns = reactive<ColumnProps<any>[]>([
+  { type: 'selection', fixed: 'left', width: 70 },
+  { prop: 'id', label: '主键ID' },
+  {
+    prop: 'subTaskId',
+    label: '子任务id',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'name',
+    label: '任务名称',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'type',
+    label: '任务类型',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'status',
+    label: '任务状态',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'algorithmId',
+    label: '算法',
+    width: 120
+  },
+  {
+    prop: 'parameters',
+    label: '调用算法时所用的参数',
+    width: 120
+  },
+  {
+    prop: 'preprocessPath',
+    label: '预处理数据路径',
+    width: 120
+  },
+  {
+    prop: 'resultPath',
+    label: '结果数据路径',
+    width: 120
+  },
+  {
+    prop: 'startTime',
+    label: '开始时间',
+    width: 120
+  },
+  {
+    prop: 'index',
+    label: '序号',
+    width: 120
+  },
+  {
+    prop: 'endTime',
+    label: '结束时间',
+    width: 120
+  },
+  {
+    prop: 'costSecond',
+    label: '耗时',
+    width: 120
+  },
+  {
+    prop: 'log',
+    label: '日志',
+    width: 120
+  },
+  { prop: 'operation', label: '操作', width: 230, fixed: 'right' }
+])
+// 表单配置项
+let itemsOptions: ProForm.ItemsOptions[] = []
+const setItemsOptions = () => {
+  itemsOptions = [
+    {
+      label: '子任务id',
+      prop: 'subTaskId',
+      compOptions: {
+        placeholder: '请输入子任务id'
+      }
+    },
+    {
+      label: '任务名称',
+      prop: 'name',
+      compOptions: {
+        placeholder: '请输入任务名称'
+      }
+    },
+    {
+      label: '任务类型',
+      prop: 'type',
+      compOptions: {
+        placeholder: '请输入任务类型'
+      }
+    },
+    {
+      label: '任务状态',
+      prop: 'status',
+      compOptions: {
+        placeholder: '请输入任务状态'
+      }
+    },
+    {
+      label: '算法',
+      prop: 'algorithmId',
+      compOptions: {
+        placeholder: '请输入算法'
+      }
+    },
+    {
+      label: '调用算法时所用的参数',
+      prop: 'parameters',
+      compOptions: {
+        type: 'textarea',
+        clearable: true,
+        placeholder: '请输入内容'
+      }
+    },
+    {
+      label: '预处理数据路径',
+      prop: 'preprocessPath',
+      compOptions: {
+        placeholder: '请输入预处理数据路径'
+      }
+    },
+    {
+      label: '结果数据路径',
+      prop: 'resultPath',
+      compOptions: {
+        placeholder: '请输入结果数据路径'
+      }
+    },
+    {
+      label: '开始时间',
+      prop: 'startTime',
+      compOptions: {
+        elTagName: 'date-picker',
+        type: 'date',
+        placeholder: '请选择开始时间'
+      }
+    },
+    {
+      label: '序号',
+      prop: 'index',
+      compOptions: {
+        placeholder: '请输入序号'
+      }
+    },
+    {
+      label: '结束时间',
+      prop: 'endTime',
+      compOptions: {
+        elTagName: 'date-picker',
+        type: 'date',
+        placeholder: '请选择结束时间'
+      }
+    },
+    {
+      label: '耗时',
+      prop: 'costSecond',
+      compOptions: {
+        placeholder: '请输入耗时'
+      }
+    },
+    {
+      label: '日志',
+      prop: 'log',
+      compOptions: {
+        type: 'textarea',
+        clearable: true,
+        placeholder: '请输入内容'
+      }
+    }
+  ]
+}
+</script>

+ 276 - 0
src/views/task/dataSet/index.vue

@@ -0,0 +1,276 @@
+<template>
+  <div class="table-box">
+    <ProTable ref="proTable" :columns="columns" row-key="id" :request-api="listDataSetApi">
+      <!-- 表格 header 按钮 -->
+      <template #tableHeader="scope">
+        <el-button type="primary" v-auth="['task:dataSet:add']" icon="CirclePlus" @click="openDialog(1, '算法数据集合新增')"> 新增 </el-button>
+        <el-button type="primary" v-auth="['task:dataSet:import']" icon="Upload" plain @click="batchAdd"> 导入 </el-button>
+        <el-button type="primary" v-auth="['task:dataSet:export']" icon="Download" plain @click="downloadFile"> 导出 </el-button>
+        <el-button
+          type="danger"
+          v-auth="['task:dataSet:remove']"
+          icon="Delete"
+          plain
+          :disabled="!scope.isSelected"
+          @click="batchDelete(scope.selectedListIds)"
+        >
+          批量删除
+        </el-button>
+      </template>
+      <!-- 表格操作 -->
+      <template #operation="scope">
+        <el-button type="primary" link icon="View" v-auth="['task:dataSet:query']" @click="openDialog(3, '算法数据集合查看', scope.row)">
+          查看
+        </el-button>
+        <el-button type="primary" link icon="EditPen" v-auth="['task:dataSet:edit']" @click="openDialog(2, '算法数据集合编辑', scope.row)">
+          编辑
+        </el-button>
+        <el-button type="primary" link icon="Delete" v-auth="['task:dataSet:remove']" @click="deleteDataSet(scope.row)"> 删除 </el-button>
+      </template>
+    </ProTable>
+    <FormDialog ref="formDialogRef" />
+    <ImportExcel ref="dialogRef" />
+  </div>
+</template>
+
+<script setup lang="tsx" name="DataSet">
+import { ref, reactive } from 'vue'
+import { useHandleData } from '@/hooks/useHandleData'
+import { useDownload } from '@/hooks/useDownload'
+import { ElMessageBox } from 'element-plus'
+import ProTable from '@/components/ProTable/index.vue'
+import ImportExcel from '@/components/ImportExcel/index.vue'
+import FormDialog from '@/components/FormDialog/index.vue'
+import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
+import {
+  listDataSetApi,
+  delDataSetApi,
+  addDataSetApi,
+  updateDataSetApi,
+  importTemplateApi,
+  importDataSetDataApi,
+  exportDataSetApi,
+  getDataSetApi
+} from '@/api/modules/task/dataSet'
+
+// ProTable 实例
+const proTable = ref<ProTableInstance>()
+
+// 删除算法数据集合信息
+const deleteDataSet = async (params: any) => {
+  await useHandleData(delDataSetApi, params.id, '删除【' + params.id + '】算法数据集合')
+  proTable.value?.getTableList()
+}
+
+// 批量删除算法数据集合信息
+const batchDelete = async (ids: string[]) => {
+  await useHandleData(delDataSetApi, ids, '删除所选算法数据集合信息')
+  proTable.value?.clearSelection()
+  proTable.value?.getTableList()
+}
+
+// 导出算法数据集合列表
+const downloadFile = async () => {
+  ElMessageBox.confirm('确认导出算法数据集合数据?', '温馨提示', { type: 'warning' }).then(() =>
+    useDownload(exportDataSetApi, '算法数据集合列表', proTable.value?.searchParam)
+  )
+}
+
+// 批量添加算法数据集合
+const dialogRef = ref<InstanceType<typeof ImportExcel> | null>(null)
+const batchAdd = () => {
+  const params = {
+    title: '算法数据集合',
+    tempApi: importTemplateApi,
+    importApi: importDataSetDataApi,
+    getTableList: proTable.value?.getTableList
+  }
+  dialogRef.value?.acceptParams(params)
+}
+
+const formDialogRef = ref<InstanceType<typeof FormDialog> | null>(null)
+// 打开弹框的功能
+const openDialog = async (type: number, title: string, row?: any) => {
+  let res = { data: {} }
+  if (row?.id) {
+    res = await getDataSetApi(row?.id || null)
+  }
+  // 重置表单
+  setItemsOptions()
+  const params = {
+    title,
+    width: 580,
+    isEdit: type !== 3,
+    itemsOptions: itemsOptions,
+    model: type == 1 ? {} : res.data,
+    api: type == 1 ? addDataSetApi : updateDataSetApi,
+    getTableList: proTable.value?.getTableList
+  }
+  formDialogRef.value?.openDialog(params)
+}
+
+// 表格配置项
+const columns = reactive<ColumnProps<any>[]>([
+  { type: 'selection', fixed: 'left', width: 70 },
+  { prop: 'id', label: '主键ID' },
+  {
+    prop: 'subTaskId',
+    label: '子任务id',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'name',
+    label: '任务名称',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'type',
+    label: '任务类型',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'status',
+    label: '任务状态',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'parameters',
+    label: '调用算法时所用的参数',
+    width: 120
+  },
+  {
+    prop: 'resultPath',
+    label: '结果数据路径',
+    width: 120
+  },
+  {
+    prop: 'startTime',
+    label: '开始时间',
+    width: 120
+  },
+  {
+    prop: 'index',
+    label: '序号',
+    width: 120
+  },
+  {
+    prop: 'endTime',
+    label: '结束时间',
+    width: 120
+  },
+  {
+    prop: 'costSecond',
+    label: '耗时',
+    width: 120
+  },
+  {
+    prop: 'log',
+    label: '日志',
+    width: 120
+  },
+  { prop: 'operation', label: '操作', width: 230, fixed: 'right' }
+])
+// 表单配置项
+let itemsOptions: ProForm.ItemsOptions[] = []
+const setItemsOptions = () => {
+  itemsOptions = [
+    {
+      label: '子任务id',
+      prop: 'subTaskId',
+      compOptions: {
+        placeholder: '请输入子任务id'
+      }
+    },
+    {
+      label: '任务名称',
+      prop: 'name',
+      compOptions: {
+        placeholder: '请输入任务名称'
+      }
+    },
+    {
+      label: '任务类型',
+      prop: 'type',
+      compOptions: {
+        placeholder: '请输入任务类型'
+      }
+    },
+    {
+      label: '任务状态',
+      prop: 'status',
+      compOptions: {
+        placeholder: '请输入任务状态'
+      }
+    },
+    {
+      label: '调用算法时所用的参数',
+      prop: 'parameters',
+      compOptions: {
+        type: 'textarea',
+        clearable: true,
+        placeholder: '请输入内容'
+      }
+    },
+    {
+      label: '结果数据路径',
+      prop: 'resultPath',
+      compOptions: {
+        placeholder: '请输入结果数据路径'
+      }
+    },
+    {
+      label: '开始时间',
+      prop: 'startTime',
+      compOptions: {
+        elTagName: 'date-picker',
+        type: 'date',
+        placeholder: '请选择开始时间'
+      }
+    },
+    {
+      label: '序号',
+      prop: 'index',
+      compOptions: {
+        placeholder: '请输入序号'
+      }
+    },
+    {
+      label: '结束时间',
+      prop: 'endTime',
+      compOptions: {
+        elTagName: 'date-picker',
+        type: 'date',
+        placeholder: '请选择结束时间'
+      }
+    },
+    {
+      label: '耗时',
+      prop: 'costSecond',
+      compOptions: {
+        placeholder: '请输入耗时'
+      }
+    },
+    {
+      label: '日志',
+      prop: 'log',
+      compOptions: {
+        type: 'textarea',
+        clearable: true,
+        placeholder: '请输入内容'
+      }
+    }
+  ]
+}
+</script>

+ 44 - 7
src/views/task/subtask/index.vue

@@ -113,12 +113,14 @@ const openDialog = async (type: number, title: string, row?: any) => {
 // 表格配置项
 const columns = reactive<ColumnProps<any>[]>([
   { type: 'selection', fixed: 'left', width: 70 },
+  { prop: 'id', label: '主键ID' },
   {
     prop: 'name',
     label: '任务名称',
     search: {
       el: 'input'
-    }
+    },
+    width: 120
   },
   {
     prop: 'status',
@@ -128,18 +130,38 @@ const columns = reactive<ColumnProps<any>[]>([
     search: {
       el: 'tree-select'
     },
-    fieldNames: { label: 'dictLabel', value: 'dictValue' },
+    fieldNames: { label: 'dictLabel', value: 'dictValue' }
+  },
+  {
+    prop: 'type',
+    label: '任务类型',
+    search: {
+      el: 'input'
+    },
+    width: 120
+  },
+  {
+    prop: 'parameters',
+    label: '调用算法时所用的参数',
     width: 120
   },
   {
     prop: 'startTime',
     label: '开始时间',
-    width: 200
+    search: {
+      el: 'date-picker',
+      props: { type: 'datetimerange', valueFormat: 'YYYY-MM-DD HH:mm:ss' }
+    },
+    width: 120
   },
   {
     prop: 'endTime',
     label: '结束时间',
-    width: 200
+    search: {
+      el: 'date-picker',
+      props: { type: 'datetimerange', valueFormat: 'YYYY-MM-DD HH:mm:ss' }
+    },
+    width: 120
   },
   {
     prop: 'costSecond',
@@ -152,6 +174,13 @@ const columns = reactive<ColumnProps<any>[]>([
 let itemsOptions: ProForm.ItemsOptions[] = []
 const setItemsOptions = () => {
   itemsOptions = [
+    {
+      label: '任务ID',
+      prop: 'taskId',
+      compOptions: {
+        placeholder: '请输入任务ID'
+      }
+    },
     {
       label: '任务名称',
       prop: 'name',
@@ -172,6 +201,14 @@ const setItemsOptions = () => {
         placeholder: '请选择任务状态'
       }
     },
+    {
+      label: '任务类型',
+      prop: 'type',
+      rules: [{ required: true, message: '任务类型不能为空', trigger: 'blur' }],
+      compOptions: {
+        placeholder: '请输入任务类型'
+      }
+    },
     {
       label: '调用算法时所用的参数',
       prop: 'parameters',
@@ -216,10 +253,10 @@ const setItemsOptions = () => {
       }
     },
     {
-      label: '是否包含详情',
-      prop: 'hasDetails',
+      label: '序号',
+      prop: 'index',
       compOptions: {
-        placeholder: '请输入是否包含详情'
+        placeholder: '请输入序号'
       }
     }
   ]