吉安感知网项目-前端
罗广辉
2026-01-26 beb95fb5fc166804056abafd70fc01ac27de7621
applications/drone-command/src/views/basicManage/maintainRecord/FormDiaLog.vue
@@ -112,7 +112,7 @@
         </el-row>
      </el-form>
      <template #footer>
         <el-button color="#2B2B4C" @click="handleCancel">{{ dialogReadonly ? '关闭' : '取消' }}</el-button>
         <el-button v-if="dialogMode != 'view'" color="#2B2B4C" @click="handleCancel">{{ dialogReadonly ? '关闭' : '取消' }}</el-button>
         <el-button color="#284FE3" v-if="!dialogReadonly" type="primary" :loading="submitting"
            :disabled="submitting" @click="handleSubmit">
            保存
@@ -128,6 +128,8 @@
import { ElMessage } from 'element-plus'
import { fieldRules, getDictLabel } from '@ztzf/utils'
import { fwDeviceMaintainRecordPageApi } from '@/views/basicManage/maintainRecord/fwDeviceMaintainRecord'
import { saveOperationLog } from '@ztzf/apis'
import { useRoute } from 'vue-router'
import {
   fwDeviceMaintainPlanDetailApi,
   fwDeviceMaintainPlanSubmitApi,
@@ -153,6 +155,7 @@
const deviceList = ref([]) // 设备列表
const getPlanCycleLabel = inject('getPlanCycleLabel')
const dictObj = inject('dictObj')
const route = useRoute()
const dialogReadonly = computed(() => dialogMode.value === 'view')
const titleEnum = ref({ edit: '编辑', view: '查看', add: '维护计划' })
@@ -197,6 +200,12 @@
         )],
      }
      await fwDeviceMaintainPlanSubmitApi(payload)
      const actionText = dialogMode.value === 'add' ? '维护计划-新增' : '维护计划-编辑'
      saveOperationLog({
         requestUri: route.path,
         title: `${route.name || '维护记录管理'}-${actionText}`,
         type: 1
      })
      ElMessage.success(dialogMode.value === 'add' ? '新增成功' : '更新成功')
      visible.value = false
      emit('success')