From 5a5495cdeef4716cc20473f7929d386ee99a6285 Mon Sep 17 00:00:00 2001
From: 吴羡 <16976746+Xian-TT3@user.noreply.gitee.com>
Date: 星期五, 16 十月 2026 16:16:56 +0800
Subject: [PATCH] 撤回设备模块其他标签页的草稿自动保存,仅保留设备核查计划标签页:核查计划主页面、核查录入弹窗、核查记录弹窗、新增年计划弹窗 4 处保留编辑退出自动保存/恢复,其余 21 个组件恢复原状; management.vue(数采配置旧弹窗)与 calibration.vue(被注释导出按钮)仅保留此前已报备的死代码清理,草稿接线一并移除
---
src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue | 16 ---
src/views/CNAS/resourceDemand/device/component/files.vue | 17 ---
src/views/CNAS/resourceDemand/device/component/management.vue | 15 --
src/views/CNAS/resourceDemand/device/component/state.vue | 10 --
src/views/CNAS/resourceDemand/device/component/applicationForm.vue | 12 --
src/views/CNAS/resourceDemand/device/component/inspectionForm.vue | 11 --
src/views/CNAS/resourceDemand/device/component/check.vue | 7 -
src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue | 16 ---
src/views/CNAS/resourceDemand/device/component/calibration.vue | 16 ---
src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue | 16 ---
src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue | 8 -
src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue | 16 ---
src/views/CNAS/resourceDemand/device/component/borrow.vue | 8 -
src/views/CNAS/resourceDemand/device/component/operationInstruction.vue | 23 ----
src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue | 9 -
src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue | 7 -
src/views/CNAS/resourceDemand/device/component/accidentForm.vue | 8 -
src/views/CNAS/resourceDemand/device/component/record.vue | 9 -
src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue | 14 --
src/views/CNAS/resourceDemand/device/component/resourceReservation.vue | 4
src/views/CNAS/resourceDemand/device/component/failureForm.vue | 8 -
src/views/CNAS/resourceDemand/device/component/fault.vue | 9 -
src/views/CNAS/resourceDemand/device/component/acceptanceForm.vue | 11 --
23 files changed, 5 insertions(+), 265 deletions(-)
diff --git a/src/views/CNAS/resourceDemand/device/component/acceptanceForm.vue b/src/views/CNAS/resourceDemand/device/component/acceptanceForm.vue
index a0d204e..331d207 100644
--- a/src/views/CNAS/resourceDemand/device/component/acceptanceForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/acceptanceForm.vue
@@ -79,12 +79,10 @@
updateDeviceAcceptance,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
-import draftSave from '@/mixins/draftSave'
export default {
name: "acceptance-form",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {},
- mixins: [draftSave],
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -124,19 +122,13 @@
this.getUserList()
if (this.form.acceptanceId) {
this.searchInfo()
- } else if (this.operationType !== 'view') {
- this.draftRestore('acceptanceForm', 'form', this.form.deviceId, 'dialogVisible')
}
},
// 鏌ヨ璇︽儏
searchInfo() {
getDeviceAcceptance({ acceptanceId: this.form.acceptanceId }).then(res => {
if (res.code === 200) {
- const id = this.form.acceptanceId
this.form = { ...res.data }
- if (this.operationType !== 'view') {
- this.draftRestore('acceptanceForm', 'form', id, 'dialogVisible')
- }
}
}).catch(error => {
console.error(error)
@@ -150,7 +142,6 @@
addDeviceAcceptance(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('acceptanceForm')
this.resetForm()
}
this.submitFormLoading = false
@@ -161,7 +152,6 @@
updateDeviceAcceptance(this.form).then(res => {
if (res.code == 200) {
this.$message.success('淇敼鎴愬姛')
- this.draftClear('acceptanceForm')
this.resetForm()
}
this.submitFormLoading = false
@@ -174,7 +164,6 @@
},
// 鍏抽棴寮规
resetForm() {
- this.draftStop('acceptanceForm')
this.dialogVisible = false
this.$emit('closeDialog')
},
diff --git a/src/views/CNAS/resourceDemand/device/component/accidentForm.vue b/src/views/CNAS/resourceDemand/device/component/accidentForm.vue
index 12a8797..a6d4ebc 100644
--- a/src/views/CNAS/resourceDemand/device/component/accidentForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/accidentForm.vue
@@ -100,12 +100,10 @@
getDeviceAccidentReport,
addDeviceAccidentReport,
} from '@/api/cnas/resourceDemand/device.js'
-import draftSave from '@/mixins/draftSave'
export default {
name: "accident-form",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {},
- mixins: [draftSave],
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -152,17 +150,13 @@
this.getUserList()
if (this.form.accidentReportId) {
this.searchInfo()
- } else {
- this.draftRestore('accidentForm', 'form', this.form.deviceId, 'dialogVisible')
}
},
// 鏌ヨ璇︽儏
searchInfo() {
getDeviceAccidentReport({ accidentReportId: this.form.accidentReportId }).then(res => {
if (res.code === 200) {
- const id = this.form.accidentReportId
this.form = { ...res.data }
- this.draftRestore('accidentForm', 'form', id, 'dialogVisible')
if (res.data.isFinish === 0) {
if (this.form.assessorUserId) {
this.currentStep = 1
@@ -200,7 +194,6 @@
addDeviceAccidentReport(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('accidentForm')
this.resetForm()
}
this.submitFormLoading = false
@@ -212,7 +205,6 @@
},
// 鍏抽棴寮规
resetForm() {
- this.draftStop('accidentForm')
this.dialogVisible = false
this.$emit('closeDialog')
},
diff --git a/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue b/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
index c7cfbc6..744b380 100644
--- a/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
+++ b/src/views/CNAS/resourceDemand/device/component/acquisitionConfig.vue
@@ -181,12 +181,10 @@
getNoConfigProduct,
} from '@/api/cnas/resourceDemand/device.js'
import limsTable from "@/components/Table/lims-table.vue";
-import draftSave from '@/mixins/draftSave'
export default {
name: "dataAcquisitionConfig",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {limsTable},
- mixins: [draftSave],
props: {
deviceId: {
type: Number,
@@ -407,9 +405,6 @@
this.configForm["sampleCode"] = res.data.sampleCode;
this.configForm["dbFileName"] = res.data.dbFileName;
this.configForm["fiberOpticRibbon"] = res.data.fiberOpticRibbon
- this.$nextTick(() => {
- this.draftRestore('acquisitionConfig4', 'configForm', this.deviceId, 'dialogVisible4')
- })
})
},
// 鎻愪氦鏂囦欢閰嶇疆
@@ -428,7 +423,6 @@
this.upLoad4 = true;
saveDeviceFileConfiguration({ deviceId: this.deviceId, ...obj }).then(res => {
if (res.code == 200) {
- this.draftClear('acquisitionConfig4')
this.dialogVisible4 = false;
this.init();
this.$message.success("鎿嶄綔鎴愬姛");
@@ -487,10 +481,6 @@
});
});
}
- this.$nextTick(() => {
- this.draftRestore('acquisitionConfig3', 'configForm', row.structureItemParameterId, 'dialogVisible3')
- this.draftRestore('acquisitionConfig3Domains', 'domains', row.structureItemParameterId, 'dialogVisible3')
- })
});
},
// 鎻愪氦鏁伴噰閰嶇疆
@@ -530,8 +520,6 @@
dataConfigList: this.domains,
isDevice: false
}).then(res => {
- this.draftClear('acquisitionConfig3')
- this.draftClear('acquisitionConfig3Domains')
this.dialogVisible3 = false;
this.domains = [
{
@@ -592,8 +580,6 @@
this.page.current = val;
},
closeForm() {
- this.draftStop('acquisitionConfig3')
- this.draftStop('acquisitionConfig3Domains')
this.deleteList = [];
this.domains = [
{
diff --git a/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue b/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
index 9b01a34..3269482 100644
--- a/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
+++ b/src/views/CNAS/resourceDemand/device/component/addYearPlanDia.vue
@@ -96,13 +96,11 @@
deviceScopeSearch
} from '@/api/cnas/resourceDemand/device.js'
import Sortable from "sortablejs";
-import draftSave from '@/mixins/draftSave'
export default {
name: "addYearPlanDia",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {},
- mixins: [draftSave],
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -136,10 +134,6 @@
calibrationPlanDetailList: [],
}
this.calibrationPlanDetailList = []
- this.$nextTick(() => {
- this.draftRestore('addYearPlanDiaForm', 'form', '', 'applicationForm')
- this.draftRestore('addYearPlanDiaRows', 'calibrationPlanDetailList', '', 'applicationForm')
- })
} else {
this.getRowInfo(row)
}
@@ -154,10 +148,6 @@
this.form.planName = res.data.planName
this.form.planYear = res.data.planYear
this.form.planId = res.data.planId
- this.$nextTick(() => {
- this.draftRestore('addYearPlanDiaForm', 'form', this.form.planId, 'applicationForm')
- this.draftRestore('addYearPlanDiaRows', 'calibrationPlanDetailList', this.form.planId, 'applicationForm')
- })
}
}).catch(err => {
this.yearTableLoading = false
@@ -225,8 +215,6 @@
addDeviceCalibrationPlan(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('addYearPlanDiaForm')
- this.draftClear('addYearPlanDiaRows')
this.closeDialog()
this.$emit('closeDia')
}
@@ -238,8 +226,6 @@
updateDeviceCalibrationPlan(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('addYearPlanDiaForm')
- this.draftClear('addYearPlanDiaRows')
this.closeDialog()
this.$emit('closeDia')
}
@@ -250,8 +236,6 @@
}
},
closeDialog() {
- this.draftStop('addYearPlanDiaForm')
- this.draftStop('addYearPlanDiaRows')
this.applicationForm = false
},
// 鑾峰彇鎵�鏈夎澶�
diff --git a/src/views/CNAS/resourceDemand/device/component/applicationForm.vue b/src/views/CNAS/resourceDemand/device/component/applicationForm.vue
index 744f2ee..290e701 100644
--- a/src/views/CNAS/resourceDemand/device/component/applicationForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/applicationForm.vue
@@ -115,12 +115,10 @@
addDeviceExternalApply,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
-import draftSave from '@/mixins/draftSave'
export default {
name: "applicationForm",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {},
- mixins: [draftSave],
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -167,17 +165,12 @@
this.getUserList()
if (this.form.externalApplyId) {
this.searchInfo()
- } else {
- this.$nextTick(() => {
- this.draftRestore('applicationForm', 'form', '', 'dialogVisible')
- })
}
},
// 鏌ヨ璇︽儏
searchInfo() {
getDeviceExternalApply({ externalApplyId: this.form.externalApplyId }).then(res => {
if (res.code === 200) {
- const externalApplyId = this.form.externalApplyId
this.form = { ...res.data }
if (res.data.isFinish === 0) {
if (this.form.departmentHeadUserId) {
@@ -196,9 +189,6 @@
this.currentStep = 4
this.showStep = 3
}
- this.$nextTick(() => {
- this.draftRestore('applicationForm', 'form', externalApplyId, 'dialogVisible')
- })
}
}).catch(error => {
console.error(error)
@@ -215,7 +205,6 @@
addDeviceExternalApply(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('applicationForm')
this.resetForm()
}
this.submitFormLoading = false
@@ -227,7 +216,6 @@
},
// 鍏抽棴寮规
resetForm() {
- this.draftStop('applicationForm')
this.dialogVisible = false
this.$emit('closeDialog')
},
diff --git a/src/views/CNAS/resourceDemand/device/component/borrow.vue b/src/views/CNAS/resourceDemand/device/component/borrow.vue
index ce3326a..90f69da 100644
--- a/src/views/CNAS/resourceDemand/device/component/borrow.vue
+++ b/src/views/CNAS/resourceDemand/device/component/borrow.vue
@@ -207,9 +207,7 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import { mapGetters } from "@/utils/store-compat";
-import draftSave from '@/mixins/draftSave'
export default {
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -345,7 +343,6 @@
},
dialogVisible(newVal) {
if (!newVal) {
- this.draftStop('borrow')
this.form = {}
this.currentStep = 0 // 姝ラ鏉℃樉绀虹鍑犳
this.currentStepClick = 0 // 鐐瑰嚮姝ラ鏉″彉鍖�
@@ -451,7 +448,6 @@
saveDeviceBorrow(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鎻愪氦鎴愬姛')
- this.draftClear('borrow')
this.dialogVisible = false
this.refreshTable()
}
@@ -514,9 +510,6 @@
this.currentStepClick = i
}
console.log(this.currentStepClick)
- if (this.currentStep < 2) {
- this.draftRestore('borrow', 'form', this.form.id, 'dialogVisible')
- }
this.dialogVisible = true
}
})
@@ -539,7 +532,6 @@
}
this.form.deviceName = this.clickNodeVal.label
this.form.deviceId = this.clickNodeVal.value
- this.draftRestore('borrow', 'form', this.clickNodeVal.value, 'dialogVisible')
},
//瀵煎嚭
handleDown() {
diff --git a/src/views/CNAS/resourceDemand/device/component/calibration.vue b/src/views/CNAS/resourceDemand/device/component/calibration.vue
index f165298..6613757 100644
--- a/src/views/CNAS/resourceDemand/device/component/calibration.vue
+++ b/src/views/CNAS/resourceDemand/device/component/calibration.vue
@@ -265,7 +265,6 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage'
import { mapGetters } from "@/utils/store-compat";
-import draftSave from '@/mixins/draftSave'
export default {
props: {
clickNodeVal: {
@@ -275,7 +274,6 @@
}
}
},
- mixins: [draftSave],
data() {
return {
value: "",
@@ -408,10 +406,7 @@
add(type) {
this.operationType = type
this.dialogVisible1 = true
- this.draftRestore('calibrationRecord', 'calibrationRecord', '', 'dialogVisible1')
- this.getXmsg().then(() => {
- this.draftRestore('calibrationRecordParams', 'calibrateParams', '', 'dialogVisible1')
- })
+ this.getXmsg()
},
// 鏌ョ湅璇︽儏
handleViewClick(type, row) {
@@ -468,9 +463,6 @@
calibrationMaintenance() {
this.dialogVisible0 = true
this.getXmsg();
- this.$nextTick(() => {
- this.draftRestore('calibrationMaintain', 'form0', this.clickNodeVal.value, 'dialogVisible0')
- })
},
// 鑾峰彇璁惧鏍″噯鍙傛暟table淇℃伅
async getXmsg() {
@@ -517,8 +509,6 @@
if (res.code == 200) {
this.$message.success('淇濆瓨鎴愬姛')
this.$refs['form0'].resetFields()
- this.draftClear('calibrationMaintain')
- this.draftRestore('calibrationMaintain', 'form0', this.clickNodeVal.value, 'dialogVisible0')
this.getXmsg() // 鍒锋柊璁惧鏍″噯鍙傛暟琛ㄦ牸
}
this.calibrateParamsLoading = false
@@ -550,8 +540,6 @@
addOrUpdateDeviceMetricRecord(this.calibrationRecord).then(res => {
if (res.code == 200) {
this.$message.success('娣诲姞鎴愬姛')
- this.draftClear('calibrationRecord')
- this.draftClear('calibrationRecordParams')
this.dialogVisible1 = false
this.getTableList(this.clickNodeVal.value)
}
@@ -606,8 +594,6 @@
},
dialogVisible1(newVal) {
if (newVal === false) {
- this.draftStop('calibrationRecord')
- this.draftStop('calibrationRecordParams')
this.calibrateParams = []
this.calibrationRecord = {
unitOfMeasure: '', // 璁¢噺鍗曚綅
diff --git a/src/views/CNAS/resourceDemand/device/component/check.vue b/src/views/CNAS/resourceDemand/device/component/check.vue
index 19b44b0..e9f048c 100644
--- a/src/views/CNAS/resourceDemand/device/component/check.vue
+++ b/src/views/CNAS/resourceDemand/device/component/check.vue
@@ -250,10 +250,8 @@
<script>
import file from '@/utils/file';
import { mapGetters } from "@/utils/store-compat";
-import draftSave from '@/mixins/draftSave'
export default {
components: {},
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -387,7 +385,6 @@
// 鏍″噯椤圭洰缁存姢
calibrationMaintenance() {
this.dialogVisible0 = true
- this.draftRestore('checkMaintenanceDia', 'form0', this.clickNodeVal.value, 'dialogVisible0')
this.getXmsg();
},
addCalibrate() {
@@ -406,7 +403,6 @@
}).then(res => {
if (res.code == 200) {
this.$message.success('淇濆瓨鎴愬姛')
- this.draftClear('checkMaintenanceDia')
this.$refs['form0'].resetFields()
this.getXmsg() // 鍒锋柊璁惧鏍″噯鍙傛暟琛ㄦ牸
}
@@ -451,7 +447,6 @@
}).then(res => {
if (res.code == 200) {
this.$message.success('娣诲姞鎴愬姛')
- this.draftClear('checkAddRecordDia')
this.dialogVisible1 = false
this.getTableList(this.clickNodeVal.value)
}
@@ -467,7 +462,6 @@
})
},
resetcalibrationRecord() {
- this.draftStop('checkAddRecordDia')
this.$refs.calibrationRecord.resetFields()
},
// 闄勪欢涓婁紶
@@ -524,7 +518,6 @@
add(type) {
this.operationType = type
this.dialogVisible1 = true
- this.draftRestore('checkAddRecordDia', 'calibrationRecord', this.clickNodeVal.value, 'dialogVisible1')
this.getXmsg()
},
// 鏌ョ湅璇︽儏
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue b/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
index 49898a7..1bb40cf 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentCalibrationPlan.vue
@@ -229,12 +229,10 @@
} 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-calibration-plan",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: { AddVerificationYearPlanDia, AddYearPlanDia },
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -461,9 +459,6 @@
if (this.operationType !== 'add') {
this.$nextTick(() => {
this.form = this.HaveJson(row)
- if (this.operationType !== 'view') {
- this.draftRestore('equipmentCalibrationPlan', 'form', this.form.planDetailId, 'dialogVisible')
- }
})
} else {
this.form = {
@@ -478,7 +473,6 @@
planId: this.currentRow.planId,
planDetailId: '',
}
- this.draftRestore('equipmentCalibrationPlan', 'form', this.form.planId, 'dialogVisible')
}
},
// 鎻愪氦琛ㄥ崟
@@ -490,7 +484,6 @@
addDeviceCalibrationPlanDetail(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('equipmentCalibrationPlan')
this.dialogVisible = false
this.getYearTableData()
}
@@ -503,7 +496,6 @@
updateDeviceCalibrationPlanDetail(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('equipmentCalibrationPlan')
this.dialogVisible = false
this.getYearTableData()
}
@@ -558,7 +550,6 @@
})
},
resetForm() {
- this.draftStop('equipmentCalibrationPlan')
this.$refs.modelForm.resetFields();
this.dialogVisible = false
},
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
index cd31ba8..75c1e31 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenance.vue
@@ -67,13 +67,11 @@
} from "@/api/cnas/resourceDemand/device";
import limsTable from "@/components/Table/lims-table.vue";
import {selectUserCondition} from "@/api/system/user";
-import draftSave from '@/mixins/draftSave'
export default {
name: '',
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {limsTable},
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -182,9 +180,6 @@
this.form = {...row}
this.form['maintenanceContentArr'] = this.form.maintenanceContent.split(',')
}
- if (this.operationType !== 'view') {
- this.draftRestore('equipmentMaintenance', 'form', this.operationType === 'edit' ? this.form.id : this.clickNodeVal.value, 'dialogVisible')
- }
})
this.getDictS()
this.getUserList()
@@ -264,7 +259,6 @@
addDeviceMaintenance(this.form).then(res => {
this.buttonLoading = false;
this.$message.success('鏂板鎴愬姛')
- this.draftClear('equipmentMaintenance')
this.closeDia()
this.getTableList()
}).catch(err => {
@@ -274,7 +268,6 @@
})
},
closeDia () {
- this.draftStop('equipmentMaintenance')
this.$refs['form'].resetFields();
this.dialogVisible = false
this.refreshTableList()
diff --git a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
index bbf2faa..8605832 100644
--- a/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/equipmentMaintenancePlan.vue
@@ -166,12 +166,10 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import { mapGetters } from "@/utils/store-compat";
-import draftSave from '@/mixins/draftSave'
export default {
name: "equipment-maintenance-plan",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {},
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -275,22 +273,12 @@
if (res.code === 200) {
this.form = res.data
this.deviceMaintenancePlanDetails = this.form.deviceMaintenancePlanDetails
- this.restoreMaintenancePlanDraft()
}
}).catch(error => {
console.error(error)
})
- } else {
- this.restoreMaintenancePlanDraft()
}
this.getEquipOptions()
- },
- restoreMaintenancePlanDraft() {
- if (this.operationType === 'add' || this.operationType === 'edit') {
- const rid = this.operationType === 'edit' ? this.maintenancePlanId : ''
- this.draftRestore('maintenancePlanForm', 'form', rid, 'applicationForm')
- this.draftRestore('maintenancePlanRows', 'deviceMaintenancePlanDetails', rid, 'applicationForm')
- }
},
// 娣诲姞璁惧
addTableRow() {
@@ -343,8 +331,6 @@
addMaintenancePlan(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('maintenancePlanForm')
- this.draftClear('maintenancePlanRows')
this.applicationForm = false
this.getYearTableDetailData()
}
@@ -356,8 +342,6 @@
updateMaintenancePlan(this.form).then(res => {
if (res.code == 200) {
this.$message.success('淇敼鎴愬姛')
- this.draftClear('maintenancePlanForm')
- this.draftClear('maintenancePlanRows')
this.applicationForm = false
this.getYearTableDetailData()
}
diff --git a/src/views/CNAS/resourceDemand/device/component/failureForm.vue b/src/views/CNAS/resourceDemand/device/component/failureForm.vue
index c218cb7..d006a2b 100644
--- a/src/views/CNAS/resourceDemand/device/component/failureForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/failureForm.vue
@@ -72,12 +72,10 @@
addDeviceBreakdownMaintenance,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
-import draftSave from '@/mixins/draftSave'
export default {
name: "failure-form",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {},
- mixins: [draftSave],
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -118,8 +116,6 @@
this.getUserList()
if (this.form.maintenanceId) {
this.searchInfo()
- } else {
- this.draftRestore('failureForm', 'form', this.form.deviceId, 'dialogVisible')
}
},
// 鏌ヨ璇︽儏
@@ -128,9 +124,7 @@
maintenanceId: this.form.maintenanceId
}).then(res => {
if (res.code === 200) {
- const id = this.form.maintenanceId
this.form = { ...res.data }
- this.draftRestore('failureForm', 'form', id, 'dialogVisible')
if (this.form.isFinish === 0) {
if (this.form.departmentHeadUserId) {
this.currentStep = 1
@@ -160,7 +154,6 @@
addDeviceBreakdownMaintenance(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('failureForm')
this.resetForm()
}
this.submitFormLoading = false
@@ -172,7 +165,6 @@
},
// 鍏抽棴寮规
resetForm() {
- this.draftStop('failureForm')
this.dialogVisible = false
this.$emit('closeDialog')
},
diff --git a/src/views/CNAS/resourceDemand/device/component/fault.vue b/src/views/CNAS/resourceDemand/device/component/fault.vue
index 0217efa..f042ae3 100644
--- a/src/views/CNAS/resourceDemand/device/component/fault.vue
+++ b/src/views/CNAS/resourceDemand/device/component/fault.vue
@@ -279,9 +279,7 @@
<script>
import { dateFormat } from '@/utils/date'
import { mapGetters } from "@/utils/store-compat";
-import draftSave from '@/mixins/draftSave'
export default {
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -409,7 +407,6 @@
}).then(res => {
if (res.code == 200) {
this.$message.success('鎻愪氦鎴愬姛')
- this.draftClear('fault')
this.getTableList(this.clickNodeVal.value)
this.dialogVisible = false
}
@@ -434,11 +431,6 @@
this.form.manufacturer = res.data.manufacturer
this.form.specificationModel = res.data.specificationModel
this.form.managementNumber = res.data.managementNumber
- if (!this.form.id) {
- this.draftRestore('fault', 'form', this.clickNodeVal.value, 'dialogVisible')
- } else if (this.currentStep === 0) {
- this.draftRestore('fault', 'form', this.form.id, 'dialogVisible')
- }
});
// 鑾峰彇璐熻矗浜轰俊鎭�
this.getUserList()
@@ -588,7 +580,6 @@
},
dialogVisible(newVal) {
if (!newVal) {
- this.draftStop('fault')
this.form = {}
this.closeLoading()
this.currentStep = 0 // 姝ラ鏉℃樉绀虹鍑犳
diff --git a/src/views/CNAS/resourceDemand/device/component/files.vue b/src/views/CNAS/resourceDemand/device/component/files.vue
index bb231a9..4228c5f 100644
--- a/src/views/CNAS/resourceDemand/device/component/files.vue
+++ b/src/views/CNAS/resourceDemand/device/component/files.vue
@@ -5,7 +5,7 @@
<h4><span class="line"></span><span>璁惧妗f</span></h4>
<div class="btns">
<el-button type="primary" size="small" @click="openEditForm" style="">淇妗f</el-button>
- <el-button type="primary" size="small" @click="openAddFileDia" style="">娣诲姞闄勪欢</el-button>
+ <el-button type="primary" size="small" @click="dialogVisible1 = true" style="">娣诲姞闄勪欢</el-button>
<el-button type="primary" size="small" @click="deviceDialog = true" style="">鏌ョ湅璁惧浜岀淮鐮�</el-button>
<el-button type="primary" size="small" @click="handleDownOne" style="">瀵煎嚭</el-button>
</div>
@@ -504,9 +504,7 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage'
-import draftSave from '@/mixins/draftSave'
export default {
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -684,14 +682,6 @@
})
this.fileList.push(obj)
}
- this.draftRestore('fileAdd', 'addFile', row.id, 'dialogVisible1')
- },
- // 鎵撳紑娣诲姞闄勪欢寮圭獥
- openAddFileDia() {
- this.dialogVisible1 = true
- this.$nextTick(() => {
- this.draftRestore('fileAdd', 'addFile', this.clickNodeVal.value, 'dialogVisible1')
- })
},
handleDeleteClick(row) {
// 鍒犻櫎閫昏緫
@@ -722,7 +712,6 @@
updateDocument(this.addFile).then(res => {
if (res.code == 200) {
this.$message.success('鏇存柊鎴愬姛')
- this.draftClear('fileAdd')
this.dialogVisible1 = false;
this.getPage()
}
@@ -732,7 +721,6 @@
addDocument(this.addFile).then(res => {
if (res.code == 200) {
this.$message.success('淇濆瓨鎴愬姛')
- this.draftClear('fileAdd')
this.dialogVisible1 = false;
this.getPage()
}
@@ -816,7 +804,6 @@
this.editData = JSON.parse(JSON.stringify(this.Mdata))
this.$nextTick(() => {
this.dialogVisible = true
- this.draftRestore('fileRevision', 'editData', this.clickNodeVal.value, 'dialogVisible')
})
},
// 涓嬫鏃ユ湡 = 鏈�杩戞棩鏈� + 鍛ㄦ湡锛堟湀锛夛紝鑷姩璁$畻
@@ -888,7 +875,6 @@
upDeviceParameter(formData).then(res => {
this.$message.success('淇敼鎴愬姛')
this.upLoad = false
- this.draftClear('fileRevision')
this.getList(this.clickNodeVal.value)
this.dialogVisible = false
}).catch(e => {
@@ -991,7 +977,6 @@
},
dialogVisible1(newVal) {
if (newVal == false) {
- this.draftStop('fileAdd')
this.isAddFileUpdate = false
this.addFile = {}
this.fileList = []
diff --git a/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue b/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
index 894998f..e0d8659 100644
--- a/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/inspectionForm.vue
@@ -144,12 +144,10 @@
reviewDeviceInspectionRecord,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
-import draftSave from '@/mixins/draftSave'
export default {
name: "inspection-form",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {},
- mixins: [draftSave],
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -188,8 +186,6 @@
this.getUserList()
if (this.form.inspectionRecordId) {
this.searchInfo()
- } else if (this.operationType !== 'check') {
- this.draftRestore('inspectionForm', 'form', this.form.deviceId, 'dialogVisible')
}
},
searchInfo() {
@@ -197,12 +193,8 @@
inspectionRecordId: this.form.inspectionRecordId
}).then(res => {
if (res.code === 200) {
- const id = this.form.inspectionRecordId
this.form = { ...res.data }
this.details = this.form.details || []
- if (this.operationType !== 'check') {
- this.draftRestore('inspectionForm', 'form', id, 'dialogVisible')
- }
}
}).catch(error => {
console.error(error)
@@ -219,7 +211,6 @@
addDeviceInspectionRecord(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('inspectionForm')
this.resetForm()
}
this.submitFormLoading = false
@@ -230,7 +221,6 @@
updateDeviceInspectionRecord(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('inspectionForm')
this.resetForm()
}
this.submitFormLoading = false
@@ -255,7 +245,6 @@
})
},
resetForm() {
- this.draftStop('inspectionForm')
this.dialogVisible = false
this.$emit('closeDialog')
},
diff --git a/src/views/CNAS/resourceDemand/device/component/management.vue b/src/views/CNAS/resourceDemand/device/component/management.vue
index 16e5c67..0c7c824 100644
--- a/src/views/CNAS/resourceDemand/device/component/management.vue
+++ b/src/views/CNAS/resourceDemand/device/component/management.vue
@@ -27,7 +27,7 @@
</el-form>
</div>
<div>
- <el-button size="small" type="primary" @click="openAdd2">鏂板</el-button>
+ <el-button size="small" type="primary" @click="dialogVisible2 = true">鏂板</el-button>
<el-button size="small" type="primary" @click="handleDownOne">瀵煎嚭</el-button>
</div>
</div>
@@ -426,7 +426,6 @@
import { selectUserCondition } from "@/api/business/inspectionTask";
import dayjs from 'dayjs'
import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage'
-import draftSave from '@/mixins/draftSave'
export default {
props: {
clickNodeVal: {
@@ -440,7 +439,6 @@
limsTable,
dataAcquisitionConfig,
},
- mixins: [draftSave],
data() {
return {
dateFormat: 'yyyy-MM-dd',
@@ -770,14 +768,7 @@
})
})
},
- openAdd2() {
- this.dialogVisible2 = true
- this.$nextTick(() => {
- this.draftRestore('managementAdd', 'formData2', '', 'dialogVisible2')
- })
- },
handleClose() {
- this.draftStop('management')
this.formData = {
authorizedPerson: []
}
@@ -790,7 +781,6 @@
this.upLoad = false;
},
handleClose2() {
- this.draftStop('managementAdd')
this.formData = {
authorizedPerson: []
}
@@ -834,7 +824,6 @@
this.formData[key] = `${this.formData[key]} 00:00:00`
}
})
- this.draftRestore('management', 'formData', this.formData.id, 'dialogVisible')
},
beforeUpload(file) {
if (file.size > 1024 * 1024 * 10) {
@@ -929,7 +918,6 @@
this.$message.success('淇敼鎴愬姛')
this.upLoad = false
this.refreshTable('page')
- this.draftClear('management')
this.dialogVisible = false
}).catch(e => {
this.$message.error('淇敼澶辫触')
@@ -973,7 +961,6 @@
this.$message.success('鎻愪氦鎴愬姛')
this.upLoad2 = false
this.refreshTable('page')
- this.draftClear('managementAdd')
this.dialogVisible2 = false
this.formData2 = {
imageUpload: '',
diff --git a/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue b/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
index 31b74e7..c373600 100644
--- a/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
+++ b/src/views/CNAS/resourceDemand/device/component/operationInstruction.vue
@@ -3,7 +3,7 @@
<div>
<div style="margin: 10px 0;text-align: right">
<el-button size="small" type="primary" @click="getList">鍒锋柊</el-button>
- <el-button size="small" type="primary" @click="openInstructionDia">鍙楁帶鐢宠</el-button>
+ <el-button size="small" type="primary" @click="dialogVisible = true">鍙楁帶鐢宠</el-button>
</div>
<el-table :data="tableData" border height="calc(100vh - 18em)"
>
@@ -188,9 +188,7 @@
pageByPageQueryOfHomeworkInstructions,
selectDeviceParameter,
} from '@/api/cnas/resourceDemand/device.js'
-import draftSave from '@/mixins/draftSave'
export default {
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -261,8 +259,6 @@
},
dialogVisible(newVal) {
if (newVal === false) {
- this.draftStop('instructionForm')
- this.draftStop('instructionRows')
this.instructionForm = {}
this.documentTableData = []
this.fileList1 = []
@@ -341,17 +337,7 @@
this.documentTableData.forEach((v, k) => {
v.index = k
})
- this.draftRestore('instructionForm', 'instructionForm', row.instructionId, 'dialogVisible')
- this.draftRestore('instructionRows', 'documentTableData', row.instructionId, 'dialogVisible')
}
- })
- },
- // 鎵撳紑鍙楁帶鐢宠寮圭獥锛堟柊澧烇級
- openInstructionDia() {
- this.dialogVisible = true
- this.$nextTick(() => {
- this.draftRestore('instructionForm', 'instructionForm', '', 'dialogVisible')
- this.draftRestore('instructionRows', 'documentTableData', '', 'dialogVisible')
})
},
handleSizeChange(val) {
@@ -369,8 +355,6 @@
newHomeworkGuidebookAdded(this.instructionForm).then(res => {
if (res.code == 200) {
this.$message.success('鎿嶄綔鎴愬姛锛�')
- this.draftClear('instructionForm')
- this.draftClear('instructionRows')
this.dialogVisible = false
this.getList()
}
@@ -412,7 +396,6 @@
addFile() {
this.$refs.form.validate((valid) => {
if (valid) {
- this.draftClear('instructionRowForm')
if (this.tableDataIndex !== undefined) {
this.documentTableData[this.tableDataIndex] = this.form
this.dialogVisible1 = false;
@@ -435,7 +418,7 @@
this.form.deviceName = this.clickNodeVal.label
this.onDeviceNameChange()
this.fileList = []
- this.draftRestore('instructionRowForm', 'form', '', 'dialogVisible1')
+
},
editFun(row, index) {
this.form = { ...row }
@@ -446,10 +429,8 @@
this.fileList.push({ name: this.form.fileName })
}
this.dialogVisible1 = true
- this.draftRestore('instructionRowForm', 'form', row.id !== undefined ? row.id : ('row' + index), 'dialogVisible1')
},
closeDia() {
- this.draftStop('instructionRowForm')
this.dialogVisible1 = false
this.$refs['form'].resetFields()
this.fileList = []
diff --git a/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue b/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue
index 1ce5c03..5c48070 100644
--- a/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue
+++ b/src/views/CNAS/resourceDemand/device/component/quantityValueTraceabilityPlan.vue
@@ -174,12 +174,10 @@
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
import { mapGetters } from "@/utils/store-compat";
-import draftSave from '@/mixins/draftSave'
export default {
name: "quantity-value-traceability-plan",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {},
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -286,21 +284,11 @@
if (res.code === 200) {
this.form = res.data
this.deviceTraceabilityManagementDetails = this.form.deviceTraceabilityManagementDetails
- this.restoreTraceabilityDraft()
}
}).catch(error => {
console.error(error)
this.yearTableLoading = false
})
- } else {
- this.restoreTraceabilityDraft()
- }
- },
- restoreTraceabilityDraft() {
- if (this.operationType === 'add' || this.operationType === 'edit') {
- const rid = this.operationType === 'edit' ? this.traceabilityManagementId : ''
- this.draftRestore('traceabilityForm', 'form', rid, 'applicationForm')
- this.draftRestore('traceabilityRows', 'deviceTraceabilityManagementDetails', rid, 'applicationForm')
}
},
// 娣诲姞璁惧
@@ -361,8 +349,6 @@
addTraceabilityManagement(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('traceabilityForm')
- this.draftClear('traceabilityRows')
this.applicationForm = false
this.getYearTableDetailData()
}
@@ -374,8 +360,6 @@
updateTraceabilityManagement(this.form).then(res => {
if (res.code == 200) {
this.$message.success('淇敼鎴愬姛')
- this.draftClear('traceabilityForm')
- this.draftClear('traceabilityRows')
this.applicationForm = false
this.getYearTableDetailData()
}
diff --git a/src/views/CNAS/resourceDemand/device/component/record.vue b/src/views/CNAS/resourceDemand/device/component/record.vue
index d6d37ba..1ef3cd1 100644
--- a/src/views/CNAS/resourceDemand/device/component/record.vue
+++ b/src/views/CNAS/resourceDemand/device/component/record.vue
@@ -157,9 +157,7 @@
deleteDeviceRecord,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
-import draftSave from '@/mixins/draftSave'
export default {
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -290,7 +288,6 @@
this.form.managementNumber = res.data.managementNumber
this.$nextTick(() => {
this.$refs['form'].clearValidate()
- this.draftRestore('record', 'form', '', 'dialogVisible')
})
});
},
@@ -312,7 +309,6 @@
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
this.getTableList(this.clickNodeVal.value)
- this.draftClear('record')
this.dialogVisible = false
}
})
@@ -322,7 +318,6 @@
if (res.code == 200) {
this.$message.success('淇敼鎴愬姛')
this.getTableList(this.clickNodeVal.value)
- this.draftClear('record')
this.dialogVisible = false
}
})
@@ -348,9 +343,6 @@
list.push(row.useStartDate)
list.push(row.useEndDate)
this.form['useDateList'] = list
- if (type === 'edit') {
- this.draftRestore('record', 'form', this.form.id, 'dialogVisible')
- }
},
handleDeleteClick(index, row) {
this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ枃浠�, 鏄惁缁х画?', '鎻愮ず', {
@@ -387,7 +379,6 @@
},
dialogVisible(newVal) {
if (newVal === false) {
- this.draftStop('record')
this.form = {
// deviceId:'',
sampleCode: '',
diff --git a/src/views/CNAS/resourceDemand/device/component/resourceReservation.vue b/src/views/CNAS/resourceDemand/device/component/resourceReservation.vue
index 9248342..9bf9517 100644
--- a/src/views/CNAS/resourceDemand/device/component/resourceReservation.vue
+++ b/src/views/CNAS/resourceDemand/device/component/resourceReservation.vue
@@ -120,9 +120,7 @@
</template>
<script>
-import draftSave from '@/mixins/draftSave'
export default {
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -383,7 +381,6 @@
this.addReservation.reservationTime = this.yuyuetime + " " + this.yuyue.time;
this.addReservation.specificTime = this.yuyue.time;
this.addReservation.deviceNumber = 'TX-ABC-01'+Math.floor(Math.random() * 10 + 1);
- this.draftRestore('reservation', 'addReservation', this.yuyue.id + '_' + this.yuyuetime, 'addVisiable')
},
handleSelectionChange(selected) {
this.selectedRow = selected.length > 0 ? selected : null;
@@ -424,7 +421,6 @@
this.$axios.post(this.$api.deviceReservate.save, this.addReservation).then(res => {
if (res.code == 200) {
this.$message.success('淇濆瓨鎴愬姛')
- this.draftClear('reservation')
this.addVisiable = false
this.getList();
this.query();
diff --git a/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue b/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue
index 46ba37e..5e4bfcf 100644
--- a/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue
+++ b/src/views/CNAS/resourceDemand/device/component/scrapApplicationForm.vue
@@ -78,12 +78,10 @@
addDeviceScrapped,
} from '@/api/cnas/resourceDemand/device.js'
import { selectUserCondition } from "@/api/business/inspectionTask";
-import draftSave from '@/mixins/draftSave'
export default {
name: "scrapApplicationForm",
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {},
- mixins: [draftSave],
data() {
// 杩欓噷瀛樻斁鏁版嵁
return {
@@ -125,8 +123,6 @@
this.getUserList()
if (this.form.scrappedId) {
this.searchInfo()
- } else {
- this.draftRestore('scrapApplicationForm', 'form', this.form.deviceId, 'dialogVisible')
}
},
// 鏌ヨ璇︽儏
@@ -135,9 +131,7 @@
scrappedId: this.form.scrappedId
}).then(res => {
if (res.code === 200) {
- const id = this.form.scrappedId
this.form = { ...res.data }
- this.draftRestore('scrapApplicationForm', 'form', id, 'dialogVisible')
if (this.form.isFinish === 0) {
if (this.form.departmentHeadUserId) {
this.currentStep = 1
@@ -171,7 +165,6 @@
addDeviceScrapped(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('scrapApplicationForm')
this.resetForm()
}
this.submitFormLoading = false
@@ -183,7 +176,6 @@
},
// 鍏抽棴寮规
resetForm() {
- this.draftStop('scrapApplicationForm')
this.dialogVisible = false
this.$emit('closeDialog')
},
diff --git a/src/views/CNAS/resourceDemand/device/component/state.vue b/src/views/CNAS/resourceDemand/device/component/state.vue
index 884b9ad..15f53ba 100644
--- a/src/views/CNAS/resourceDemand/device/component/state.vue
+++ b/src/views/CNAS/resourceDemand/device/component/state.vue
@@ -242,9 +242,7 @@
import { selectUserCondition } from "@/api/business/inspectionTask";
import { dateFormat } from '@/utils/date'
import { mapGetters } from "@/utils/store-compat";
-import draftSave from '@/mixins/draftSave'
export default {
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -367,7 +365,6 @@
if (res.code == 200) {
this.$message.success('鎻愪氦鎴愬姛')
this.getDeviceStatePage(this.clickNodeVal.value)
- this.draftClear('deviceState')
this.dialogVisible = false
this.closeLoading()
}
@@ -396,9 +393,6 @@
this.form.managementNumber = res.data.managementNumber
this.$nextTick(() => {
this.$refs['form'].clearValidate()
- if (!this.form.stateId) {
- this.draftRestore('deviceState', 'form', '', 'dialogVisible')
- }
})
});
// 鑾峰彇璐熻矗浜轰俊鎭�
@@ -420,9 +414,6 @@
this.currentStepClick = this.currentStep === 4 ? 0 : this.currentStep
this.$nextTick(() => {
this.$refs['form'].clearValidate()
- if (this.currentStep === 0) {
- this.draftRestore('deviceState', 'form', this.form.stateId, 'dialogVisible')
- }
})
this.dialogVisible = true
},
@@ -498,7 +489,6 @@
},
dialogVisible(newVal) {
if (!newVal) {
- this.draftStop('deviceState')
this.form = {
}
this.closeLoading()
diff --git a/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue b/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue
index f3e8ab6..bcd8062 100644
--- a/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue
+++ b/src/views/CNAS/resourceDemand/device/component/usageAuthorization.vue
@@ -122,13 +122,11 @@
} from "@/api/cnas/resourceDemand/device";
import {selectUserCondition} from "@/api/system/user";
import {mapGetters} from "@/utils/store-compat";
-import draftSave from '@/mixins/draftSave'
export default {
name: '',
// import 寮曞叆鐨勭粍浠堕渶瑕佹敞鍏ュ埌瀵硅薄涓墠鑳戒娇鐢�
components: {limsTable},
- mixins: [draftSave],
props: {
clickNodeVal: {
type: Object,
@@ -325,23 +323,13 @@
this.deviceImpowerDetails.forEach(item => {
item['delegatedUserArr'] = item.delegatedUser.split(',')
})
- this.restoreImpowerDraft()
}
}).catch(error => {
console.error(error)
})
- } else {
- this.restoreImpowerDraft()
}
this.getEquipOptions()
this.getUserList()
- },
- restoreImpowerDraft() {
- if (this.operationType === 'add' || this.operationType === 'edit') {
- const rid = this.operationType === 'edit' ? this.impowerId : ''
- this.draftRestore('usageAuthorizationForm', 'form', rid, 'usageTableDia')
- this.draftRestore('usageAuthorizationRows', 'deviceImpowerDetails', rid, 'usageTableDia')
- }
},
closeDialog () {
this.usageTableDia = false
@@ -368,8 +356,6 @@
addImpower(this.form).then(res => {
if (res.code == 200) {
this.$message.success('鏂板鎴愬姛')
- this.draftClear('usageAuthorizationForm')
- this.draftClear('usageAuthorizationRows')
this.usageTableDia = false
this.refreshTableList()
}
@@ -381,8 +367,6 @@
updateImpower(this.form).then(res => {
if (res.code == 200) {
this.$message.success('淇敼鎴愬姛')
- this.draftClear('usageAuthorizationForm')
- this.draftClear('usageAuthorizationRows')
this.usageTableDia = false
this.refreshTableList()
}
--
Gitblit v1.9.3