From ffaedf51d5205c97841db94f9fb404239c840fa9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com>
Date: Wed, 25 Oct 2023 08:51:49 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=A6=E6=83=85=E7=BB=84=E4=BB=B6=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/Detail/src/Detail.vue | 35 +++++++++++++++++++++++-----
1 file changed, 29 insertions(+), 6 deletions(-)
diff --git a/src/components/Detail/src/Detail.vue b/src/components/Detail/src/Detail.vue
index b868140a6..cf1629dde 100644
--- a/src/components/Detail/src/Detail.vue
+++ b/src/components/Detail/src/Detail.vue
@@ -13,7 +13,15 @@
-
-
-
@@ -62,6 +65,18 @@ const props = defineProps({
required: true,
default: null
},
+ // 明细列表相关信息
+ detailAllSchemas: {
+ type: Object,
+ required: true,
+ default: null
+ },
+ // 主表API
+ detailApi: {
+ type: Object,
+ required: true,
+ default: null
+ }
})
const isShowDrawer = ref(false)
@@ -170,6 +185,7 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
tableId: row.id,
tableName: tableName,
}
+ getList() // 加载明细列表
isShowDrawer.value = true
if (row) {
detailLoading.value = true
@@ -206,6 +222,13 @@ const getChangeRecordList = async () => {
changeRecordData.changeRecordList = await DetailApi.getChangeRecordPage(remarksData.data)
}
+
+const { tableObject, tableMethods } = useTable({
+ getListApi: props.detailApi?.getDetasListPage // 在主表API中添加根据主表ID获取明细列表分页方法
+})
+// 获得表格的各种操作
+const { getList } = tableMethods
+