| | |
| | | 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, |
| | |
| | | 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: '维护计划' }) |
| | | |
| | |
| | | )], |
| | | } |
| | | 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') |