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(); } /**