From dfc19df8392f950e4ca01c6ef82b98582355315b Mon Sep 17 00:00:00 2001 From: dearlin <1261008090@qq.com> Date: Mon, 5 Feb 2024 15:20:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E5=85=A8=E9=9A=90=E6=82=A3=E6=B8=85?= =?UTF-8?q?=E5=8D=95=E6=A3=80=E6=9F=A5=E6=A0=87=E5=87=86=E7=9A=84bug?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../inventory_management/add_custom.vue | 14 +++++++------- .../components/checkstandard_add.vue | 9 +++------ 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/views/hazard_investigation/inventory_management/add_custom.vue b/src/views/hazard_investigation/inventory_management/add_custom.vue index eac302d..f0c2612 100644 --- a/src/views/hazard_investigation/inventory_management/add_custom.vue +++ b/src/views/hazard_investigation/inventory_management/add_custom.vue @@ -168,10 +168,7 @@ > 选择其他检查标准 - + 添加检查标准 @@ -331,7 +328,6 @@ const troubleshootingCycleList = await layoutFnGetTroubleshootingCycle(); const inventoryTypeList = await layoutFnGetInventoryType(); const fnGetData = async () => { - console.log(WHETHER_HAZARDS); if (!ID) return; const resData = await getCheckStandardManagementView({ ID }); data.form = resData.pd; @@ -385,9 +381,13 @@ const fnTableSelection = async () => { tableRef.value.toggleRowSelection(item); }); }; +const addStandard = () => { + data.addOrEditDialog.visible = true; +}; const fnAddStandardSubmit = (item) => { - data.list.push(item); - data.listAll.push(item); + const obj = Object.assign({}, item); + data.list.push(obj); + data.listAll.push(JSON.stringify(obj)); fnTableSelection(); }; const fnSelectStandardSubmit = (listData) => { diff --git a/src/views/hazard_investigation/inventory_management/components/checkstandard_add.vue b/src/views/hazard_investigation/inventory_management/components/checkstandard_add.vue index 1052058..c0005ae 100644 --- a/src/views/hazard_investigation/inventory_management/components/checkstandard_add.vue +++ b/src/views/hazard_investigation/inventory_management/components/checkstandard_add.vue @@ -121,11 +121,6 @@ const props = defineProps({ required: true, default: () => [], }, - listData: { - type: Array, - required: true, - default: () => [], - }, type: { type: String, required: true, @@ -221,7 +216,9 @@ const rules = { ], }; const fnClose = () => { - // form.resetFields(); + formRef.value.resetFields(); + data.CHECK_CATEGORY_NAME = ""; + data.CHECK_ITEM_NAME = ""; visible.value = false; }; const fnSubmit = debounce(