From cd8d5018368f739c6e63a5b16e5278033c766871 Mon Sep 17 00:00:00 2001 From: yangjun <1173114630@qq.com> Date: Tue, 6 May 2025 08:58:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ConfigMaterial/ConfigMaterialInfoList.vue | 67 +++++++++++++++---- 1 file changed, 54 insertions(+), 13 deletions(-) diff --git a/src/views/invoicing/ConfigMaterial/ConfigMaterialInfoList.vue b/src/views/invoicing/ConfigMaterial/ConfigMaterialInfoList.vue index f1af149..ccffc6b 100644 --- a/src/views/invoicing/ConfigMaterial/ConfigMaterialInfoList.vue +++ b/src/views/invoicing/ConfigMaterial/ConfigMaterialInfoList.vue @@ -59,16 +59,40 @@ -
- - - - +
+ + + + + + + + +
@@ -111,6 +135,7 @@ import type { TreeProps } from 'ant-design-vue'; import { DownOutlined } from '@ant-design/icons-vue'; import { defHttp } from '/@/utils/http/axios'; +import type { CollapseProps } from 'ant-design-vue'; const formRef = ref(); const queryParam = reactive({}); @@ -118,6 +143,11 @@ import { defHttp } from '/@/utils/http/axios'; const registerModal = ref(); const userStore = useUserStore(); let treeData = ref([]); + const activeKey = ref(0); + const activeKey2 = ref(0); + const rootSubmenuKeys= ['sub1'] + const openKeys= [] + const selectedKeys= [] //注册table数据 const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ tableProps: { @@ -157,9 +187,20 @@ import { defHttp } from '/@/utils/http/axios'; sm: 20, }); - function onSelect(ids, e) { - let id = ids[0]; - queryParam.treeId =id; + function onOpenChange (openKeys: string[]){ + const latestOpenKey = openKeys.find(key => openKeys.indexOf(key) === -1); + if (rootSubmenuKeys.indexOf(latestOpenKey!) === -1) { + openKeys = openKeys; + } else { + openKeys = latestOpenKey ? [latestOpenKey] : []; + } + }; + + function onSelect({ key, domEvent }) { + // console.log(ids); + // console.log(e); + // let id = ids[0]; + queryParam.treeId =key; reload(); } /**