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){ // 静态