| | |
| | | deviceScopeSearch, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/performance/class"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "addVerificationYearPlanDia", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | |
| | | examinePlanDetailsList: [], |
| | | } |
| | | this.examinePlanDetailsList = [] |
| | | this.$nextTick(() => { |
| | | this.draftRestore('addVerificationYearPlanDiaForm', 'form', '', 'applicationForm') |
| | | this.draftRestore('addVerificationYearPlanDiaRows', 'examinePlanDetailsList', '', 'applicationForm') |
| | | }) |
| | | } else { |
| | | this.getRowInfo(row) |
| | | } |
| | |
| | | this.form.planName = res.data.planName |
| | | this.form.planYear = res.data.planYear |
| | | this.form.planId = res.data.planId |
| | | this.$nextTick(() => { |
| | | this.draftRestore('addVerificationYearPlanDiaForm', 'form', this.form.planId, 'applicationForm') |
| | | this.draftRestore('addVerificationYearPlanDiaRows', 'examinePlanDetailsList', this.form.planId, 'applicationForm') |
| | | }) |
| | | } |
| | | }).catch(error => { |
| | | this.yearTableLoading = false |
| | |
| | | addDeviceExaminePlan(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('addVerificationYearPlanDiaForm') |
| | | this.draftClear('addVerificationYearPlanDiaRows') |
| | | this.closeDialog() |
| | | this.$emit('closeDia') |
| | | } |
| | |
| | | updateDeviceExaminePlan(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('addVerificationYearPlanDiaForm') |
| | | this.draftClear('addVerificationYearPlanDiaRows') |
| | | this.closeDialog() |
| | | this.$emit('closeDia') |
| | | } |
| | |
| | | } |
| | | }, |
| | | closeDialog() { |
| | | this.draftStop('addVerificationYearPlanDiaForm') |
| | | this.draftStop('addVerificationYearPlanDiaRows') |
| | | this.applicationForm = false |
| | | }, |
| | | // 获取所有设备 |