From 905dc07073a1a36a7243942dd72fb2a14185b5c4 Mon Sep 17 00:00:00 2001
From: zhang_li <2235006734@qqq.com>
Date: Fri, 8 Dec 2023 09:39:30 +0800
Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=82=B9=E8=AF=A6=E6=83=85=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Detail/src/Detail.vue | 19 +++-
.../DetailTable/src/DetailTable.vue | 12 ++-
.../countManage/count/countPlanMain/index.vue | 91 +++++++++++++++----
3 files changed, 98 insertions(+), 24 deletions(-)
diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue
index d39b6d795..dea1e0a86 100644
--- a/src/components/Detail/src/Detail.vue
+++ b/src/components/Detail/src/Detail.vue
@@ -67,6 +67,7 @@
:data="tableObjectRef.tableList"
:allList="allList"
:countScopeType="countScopeType"
+ :key="updateKey"
>
{
if (val == 'edit') {
// 编辑
openForm('update', row)
+ emit('detailOpenForm', row)
} else if (val == 'delete') {
// 删除
handleDelete(row.id)
@@ -455,6 +457,10 @@ const buttonTableClick = async (val, row) => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = async (type: string, row?: number) => {
+ console.log(row)
+ if(props.fromeWhere=='countPlan'){
+
+ }
formRef.value.open(type, row, masterParmas.value)
}
// form 提交
@@ -472,7 +478,8 @@ const submitForm = async (formType, data) => {
}
formRef.value.dialogVisible = false
// 刷新当前列表
- getList()
+ await getList()
+ updateKey.value += 1;
} finally {
formRef.value.formLoading = false
}
@@ -483,7 +490,7 @@ const searchTableSuccess = (formField, searchField, val, formRef) => {
emit('searchTableSuccessDetail', formField, searchField, val, formRef)
}
// 传递给父类
-const emit = defineEmits(['searchTableSuccessDetail', 'changeTabs','selectChangeDetail'])
+const emit = defineEmits(['searchTableSuccessDetail', 'changeTabs','selectChangeDetail','detailOpenForm'])
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
@@ -494,10 +501,11 @@ const handleDelete = async (id: number) => {
message.success(t('common.delSuccess'))
// 刷新列表
await getList()
+ updateKey.value += 1;
} catch {}
}
// 筛选提交
-const searchFormClick = (searchData) => {
+const searchFormClick =async (searchData) => {
const { tableObject, tableMethods } = useTable({
getListApi: props.apiPage // 分页接口
})
@@ -512,7 +520,8 @@ const searchFormClick = (searchData) => {
tableMethodsRef.value = tableMethods
tableObjectRef.value.tableList = []
const { getList } = tableMethods
- getList()
+ await getList()
+ updateKey.value += 1;
// tableObjectRef.value.params = {
// isSearch: true,
// filters: searchData.filters
diff --git a/src/components/DetailTable/src/DetailTable.vue b/src/components/DetailTable/src/DetailTable.vue
index 2b1216e75..b09facbf3 100644
--- a/src/components/DetailTable/src/DetailTable.vue
+++ b/src/components/DetailTable/src/DetailTable.vue
@@ -14,7 +14,10 @@
-
+
+
+
+
@@ -23,6 +26,11 @@