From 99faaf3dcb9080e811b393a80ddbefc6ca1af46c Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Mon, 30 Dec 2024 15:25:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9Ebug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/battery/monomer/index.vue | 33 +++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/views/battery/monomer/index.vue b/src/views/battery/monomer/index.vue index 49870c7..b0bb344 100644 --- a/src/views/battery/monomer/index.vue +++ b/src/views/battery/monomer/index.vue @@ -307,6 +307,17 @@ const butttondata = (row,$index) => { // 列表-操作按钮事件 const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 + + openForm('update', row) + } else if (val == 'delete') { // 删除 + handleDelete(row.id) + } +} + +/** 添加/修改操作 */ +const basicFormRef = ref() +const openForm = (type: string, row?: any) => { + if(type == 'update'){ // 设备 tableDataDevice.value = row.cellDeviceList // 环境 @@ -319,16 +330,20 @@ const buttonTableClick = async (val, row) => { tableDataProd.value = row.cellProdList // 单体直通率 tableDataPass.value = row.cellPassList - - openForm('update', row) - } else if (val == 'delete') { // 删除 - handleDelete(row.id) + }else{ + // 设备 + tableDataDevice.value = [] + // 环境 + tableDataEnv.value = [] + // 单体极片 + tableDataPlate.value = [] + // 单体卷芯或叠芯 + tableDataCore.value = [] + // 单体产品 + tableDataProd.value = [] + // 单体直通率 + tableDataPass.value = [] } -} - -/** 添加/修改操作 */ -const basicFormRef = ref() -const openForm = (type: string, row?: any) => { if(tableObject.tableList.length>0){ if(isStatic.value){ // 静态