| | |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/performance/class"; |
| | | import { mapGetters } from "@/utils/store-compat"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "equipment-verification-plan", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: { AddVerificationYearPlanDia, CheckRecord, EquipmentCheck }, |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | if (this.operationType !== 'add') { |
| | | this.$nextTick(() => { |
| | | this.form = this.HaveJson(row) |
| | | if (this.operationType !== 'view') { |
| | | this.draftRestore('equipmentVerificationPlan', 'form', this.form.planDetailsId, 'dialogVisible') |
| | | } |
| | | }) |
| | | } else { |
| | | this.form = { |
| | |
| | | planId: this.currentRow.planId, |
| | | planDetailsId: '', |
| | | } |
| | | this.draftRestore('equipmentVerificationPlan', 'form', this.form.planId, 'dialogVisible') |
| | | } |
| | | }, |
| | | // 提交表单 |
| | |
| | | addDeviceExaminePlanDetail(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('equipmentVerificationPlan') |
| | | this.dialogVisible = false |
| | | this.getYearTableData() |
| | | } |
| | |
| | | updateDeviceExaminePlanDetail(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('equipmentVerificationPlan') |
| | | this.dialogVisible = false |
| | | this.getYearTableData() |
| | | } |
| | |
| | | }) |
| | | }, |
| | | resetForm() { |
| | | this.draftStop('equipmentVerificationPlan') |
| | | this.$refs.modelForm.resetFields(); |
| | | this.dialogVisible = false |
| | | }, |