fix: 删除多余代码
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
b6ea9bc5bb
commit
0c71c9193b
@ -203,8 +203,6 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
}
|
}
|
||||||
modalApi.modalLoading(true);
|
modalApi.modalLoading(true);
|
||||||
const data = modalApi.getData();
|
const data = modalApi.getData();
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
detailIndex.value = data.index;
|
detailIndex.value = data.index;
|
||||||
// 新增:弹窗打开时同步 selectedIds
|
// 新增:弹窗打开时同步 selectedIds
|
||||||
selectedIds.value = data.selectedIds || [];
|
selectedIds.value = data.selectedIds || [];
|
||||||
@ -214,8 +212,6 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
} else if(data.add){
|
} else if(data.add){
|
||||||
//modalApi.getData()为空时表示添加
|
//modalApi.getData()为空时表示添加
|
||||||
isAdd.value = true;
|
isAdd.value = true;
|
||||||
console.log(123);
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
//表示编辑
|
//表示编辑
|
||||||
isUpdate.value = true;
|
isUpdate.value = true;
|
||||||
@ -235,8 +231,6 @@ async function handleConfirm() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const data = cloneDeep(await formApi.getValues());
|
const data = cloneDeep(await formApi.getValues());
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
// 获取选中的产品
|
// 获取选中的产品
|
||||||
const selectedService = plantListData.find(item => item.id === data.plantName);
|
const selectedService = plantListData.find(item => item.id === data.plantName);
|
||||||
if (selectedService) {
|
if (selectedService) {
|
||||||
@ -245,12 +239,8 @@ async function handleConfirm() {
|
|||||||
}
|
}
|
||||||
if (isUpdate.value) {
|
if (isUpdate.value) {
|
||||||
data.index = detailIndex.value;
|
data.index = detailIndex.value;
|
||||||
console.log(data);
|
|
||||||
|
|
||||||
emit('editReload', data);
|
emit('editReload', data);
|
||||||
}else if(isAdd.value){
|
}else if(isAdd.value){
|
||||||
console.log(12);
|
|
||||||
|
|
||||||
emit('reload', data);
|
emit('reload', data);
|
||||||
}
|
}
|
||||||
handleClosed()
|
handleClosed()
|
||||||
|
@ -72,7 +72,6 @@ const [BasicModal, modalApi] = useVbenModal({
|
|||||||
// 后端返回绿植产品包列表结构处理
|
// 后端返回绿植产品包列表结构处理
|
||||||
// detailTable.value = record.productList.map((item:any) => {...item.product,item.productNum,});
|
// detailTable.value = record.productList.map((item:any) => {...item.product,item.productNum,});
|
||||||
detailTable.value = record.productList.map((item: any) => ({ ...item.product, productNum: item.productNum,productId: item.productId }));
|
detailTable.value = record.productList.map((item: any) => ({ ...item.product, productNum: item.productNum,productId: item.productId }));
|
||||||
// console.log(detailTable.value);
|
|
||||||
|
|
||||||
await formApi.setValues(record);
|
await formApi.setValues(record);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user