浏览代码

fix: 修改问题

wanggaokun 1 年之前
父节点
当前提交
197f0de569

+ 15 - 0
src/routers/modules/dynamicRouter.json

@@ -105,6 +105,21 @@
         "noCache": true
       }
     },
+    {
+      "path": "/task/update",
+      "name": "taskUpdate",
+      "component": "task/update",
+      "hidden": true,
+      "meta": {
+        "icon": "",
+        "title": "编辑任务任务",
+        "activeMenu": "/task/assignment",
+        "link": "",
+        "full": false,
+        "affix": false,
+        "noCache": true
+      }
+    },
     {
       "path": "/manage/execution/index/:sortieNo",
       "name": "ExecutionModel",

+ 1 - 1
src/views/manage/backupRestore/index.vue

@@ -11,7 +11,7 @@
       <!-- 表格 header 按钮 -->
       <template #tableHeader>
         <el-button type="primary" v-auth="['manage:backupRestore:sync']" @click="backup()"> 备份文件 </el-button>
-        <el-button type="primary" v-auth="['manage:faultCase:sync']" icon="Refresh" @click="syncFileData()"> 同步文件至服务器 </el-button>
+        <el-button type="primary" v-auth="['manage:backupRestore:sync']" icon="Refresh" @click="syncFileData()"> 同步文件至服务器 </el-button>
       </template>
       <!-- 表格操作 -->
       <template #operation="scope">

+ 0 - 138
src/views/manage/backupRestoreLog/index.vue

@@ -1,138 +0,0 @@
-<template>
-  <div class="table-box">
-    <ProTable ref="proTable" :columns="columns" row-key="id" :request-api="listBackupRestoreLogApi" :data-callback="dataCallback">
-      <!-- 表格 header 按钮 -->
-      <template #tableHeader>
-        <el-button type="primary" v-auth="['manage:backupRestore:sync']" @click="backup()"> 备份文件 </el-button>
-        <el-button type="primary" v-auth="['manage:faultCase:sync']" icon="Refresh" @click="syncFileData()"> 同步文件至服务器 </el-button>
-      </template>
-      <!-- 表格操作 -->
-      <template #operation="scope">
-        <el-button type="primary" link icon="View" v-auth="['manage:backupRestore:query']" @click="openDialog(3, '备份恢复日志查看', scope.row)">
-          查看
-        </el-button>
-        <el-button type="primary" v-if="scope.row.operateType === '备份'" link icon="View" @click="restore()"> 恢复 </el-button>
-      </template>
-    </ProTable>
-    <FormDialog ref="formDialogRef" />
-  </div>
-</template>
-
-<script setup lang="tsx" name="BackupRestore">
-import { ref, reactive } from 'vue'
-import { ElMessage } from 'element-plus'
-import ProTable from '@/components/ProTable/index.vue'
-import FormDialog from '@/components/FormDialog/index.vue'
-import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
-import { listBackupRestoreLogApi, backupApi, restoreApi, syncFileDataApi } from '@/api/modules/manage/backupRestore'
-
-// ProTable 实例
-const proTable = ref<ProTableInstance>()
-const dataCallback = (data: any) => {
-  const page = proTable.value!.pageable
-  return {
-    list: data.data,
-    total: data.total,
-    pageNum: page.pageNum,
-    pageSize: page.pageSize
-  }
-}
-const backup = () => {
-  backupApi().then(res => {
-    if (res.code === 200) {
-      proTable.value?.getTableList()
-      ElMessage.success('备份成功')
-    } else {
-      ElMessage.error(res.msg)
-    }
-  })
-}
-const restore = () => {
-  restoreApi().then(res => {
-    if (res.code === 200) {
-      proTable.value?.getTableList()
-      ElMessage.success('恢复成功')
-    } else {
-      ElMessage.error(res.msg)
-    }
-  })
-}
-const syncFileData = () => {
-  syncFileDataApi({}).then(res => {
-    if (res.code === 200) {
-      ElMessage.success('同步成功')
-      proTable.value?.getTableList()
-    } else {
-      ElMessage.error(res.msg)
-    }
-  })
-}
-
-const formDialogRef = ref<InstanceType<typeof FormDialog> | null>(null)
-// 打开弹框的功能
-const openDialog = async (type: number, title: string, row?: any) => {
-  // 重置表单
-  setItemsOptions()
-  const params = {
-    title,
-    width: 580,
-    isEdit: false,
-    itemsOptions: itemsOptions,
-    model: row,
-    getTableList: proTable.value?.getTableList
-  }
-  formDialogRef.value?.openDialog(params)
-}
-
-// 表格配置项
-const columns = reactive<ColumnProps<any>[]>([
-  {
-    prop: 'type',
-    label: '数据类型'
-  },
-  {
-    prop: 'operateType',
-    label: '操作方式',
-    search: {
-      el: 'input'
-    }
-  },
-  {
-    prop: 'status',
-    label: '备份状态'
-  },
-  {
-    prop: 'updateTime',
-    label: '更新时间'
-  },
-  { prop: 'operation', label: '操作', width: 230, fixed: 'right' }
-])
-// 表单配置项
-let itemsOptions: ProForm.ItemsOptions[] = []
-const setItemsOptions = () => {
-  itemsOptions = [
-    {
-      label: '数据类型',
-      prop: 'type',
-      compOptions: {
-        placeholder: '请输入数据类型'
-      }
-    },
-    {
-      label: '操作方式',
-      prop: 'operateType',
-      compOptions: {
-        placeholder: '请输入操作方式'
-      }
-    },
-    {
-      label: '备份状态',
-      prop: 'status',
-      compOptions: {
-        placeholder: '请输入备份状态'
-      }
-    }
-  ]
-}
-</script>
-@/api/modules/manage/backupRestore

+ 1 - 1
src/views/manage/dbBackupRestore/index.vue

@@ -11,7 +11,7 @@
       <!-- 表格 header 按钮 -->
       <template #tableHeader>
         <el-button type="primary" v-auth="['manage:backupRestore:sync']" @click="backupAll()"> 全量备份 </el-button>
-        <el-button type="primary" v-auth="['manage:faultCase:sync']" @click="backup()"> 增量备份 </el-button>
+        <el-button type="primary" v-auth="['manage:backupRestore:sync']" @click="backup()"> 增量备份 </el-button>
       </template>
       <!-- 表格操作 -->
       <template #operation="scope">

+ 1 - 1
src/views/manage/faultCase/index.vue

@@ -16,7 +16,7 @@
         >
           批量删除
         </el-button>
-        <el-button type="primary" v-auth="['manage:faultCase:add']" icon="Refresh" @click="syncEsData()"> 同步ES </el-button>
+        <el-button type="primary" v-auth="['manage:faultCase:add']" v-if="false" icon="Refresh" @click="syncEsData()"> 同步ES </el-button>
       </template>
       <!-- 表格操作 -->
       <template #operation="scope">

+ 12 - 12
src/views/manage/orderInfo/index.vue

@@ -7,10 +7,10 @@
       </template>
       <!-- 表格操作 -->
       <template #operation="scope">
-        <el-button type="primary" link v-auth="['manage:orderInfo:edit']" v-if="scope.row.status == '0'" @click="toExeDetail(scope.row)">
+        <!-- <el-button type="primary" link v-auth="['manage:orderInfo:edit']" v-if="scope.row.status == '0'" @click="toExeDetail(scope.row)">
           执行
-        </el-button>
-        <el-button type="primary" link v-auth="['manage:orderInfo:edit']" v-if="scope.row.status == '0'" @click="toExe(scope.row)"> 执行2 </el-button>
+        </el-button> -->
+        <el-button type="primary" link v-auth="['manage:orderInfo:edit']" v-if="scope.row.status == '0'" @click="toExe(scope.row)"> 执行 </el-button>
       </template>
     </ProTable>
     <FormDialog ref="formDialogRef" />
@@ -33,15 +33,15 @@ import { getDictsApi } from '@/api/modules/system/dictData'
 const router = useRouter()
 
 // 跳转执行
-const toExeDetail = async (row: { id: any; orderType: any; orderCode: any }) => {
-  if (!row.orderCode) return
-  const { data } = await getOrderConfigByCodeApi(row.orderCode)
-  if (!data) {
-    ElMessage.error('未找到对应的指令配置项,请核对指令配置信息。')
-    return
-  }
-  router.push({ path: `/manage/execution/index/${data.sortie}`, query: { type: row.orderType, orderId: row.id } })
-}
+// const toExeDetail = async (row: { id: any; orderType: any; orderCode: any }) => {
+//   if (!row.orderCode) return
+//   const { data } = await getOrderConfigByCodeApi(row.orderCode)
+//   if (!data) {
+//     ElMessage.error('未找到对应的指令配置项,请核对指令配置信息。')
+//     return
+//   }
+//   router.push({ path: `/manage/execution/index/${data.sortie}`, query: { type: row.orderType, orderId: row.id } })
+// }
 
 const toExe = async (row: any) => {
   if (!row.orderCode) return

+ 1 - 1
src/views/manage/orderInfo/task/index.vue

@@ -329,7 +329,7 @@ const setItemsOptions = () => {
       span: 24,
       rules: [{ required: true, message: '请选择数据', trigger: 'change' }],
       show: () => {
-        return type === '3'
+        return type === '3' && active.value === 3
       },
       compOptions: {
         elTagName: 'slot'

+ 2 - 2
src/views/task/assignment.vue

@@ -48,11 +48,11 @@ const handleUpdate = (params: any) => {
 const handleRunTask = async (params: any) => {
   const res = await runApi(params.id)
   if (res.code == 200) {
-    ElMessage.success('测试连接成功!')
+    ElMessage.success('同步成功!')
   } else {
     ElMessage({
       type: 'error',
-      message: '测试失败!'
+      message: '同步成功!'
     })
   }
 }