diff --git a/.env.development b/.env.development index 06c6a70..6480b17 100644 --- a/.env.development +++ b/.env.development @@ -8,18 +8,18 @@ VITE_OPEN = true ENV = 'development' # ADMIN 服务地址 -# VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 线上 +VITE_ADMIN_PROXY_PATH = http://123.156.230.15:8089/api/ # 线上 # VITE_ADMIN_PROXY_PATH = http://pjcloud.center.takin.cc/ # VITE_ADMIN_PROXY_PATH = http://localhost:9999/ -VITE_ADMIN_PROXY_PATH = http://192.168.101.50:9999/ # 邓-本地 +# VITE_ADMIN_PROXY_PATH = http://192.168.101.50:9999/ # 邓-本地 # VITE_ADMIN_PROXY_PATH = http://59.202.170.152:81/api # 正式环境 # 图片访问基础地址 -# VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api # 线上 +VITE_IMAGE_BASE_PATH = http://123.156.230.15:8089/api # 线上 # VITE_IMAGE_BASE_PATH = http://pjcloud.center.takin.cc # VITE_IMAGE_BASE_PATH = http://localhost:9999 -VITE_IMAGE_BASE_PATH = http://192.168.101.50:9999 # 邓-本地 +# VITE_IMAGE_BASE_PATH = http://192.168.101.50:9999 # 邓-本地 # VITE_IMAGE_BASE_PATH = http://59.202.170.152:81/api/ # 正式环境 # 代码生成服务地址 diff --git a/src/components/DraggableDepTree/index.vue b/src/components/DraggableDepTree/index.vue index acb7989..14f3148 100644 --- a/src/components/DraggableDepTree/index.vue +++ b/src/components/DraggableDepTree/index.vue @@ -1,13 +1,14 @@ diff --git a/src/views/admin/system/user/index.vue b/src/views/admin/system/user/index.vue index f9dddb1..11497c5 100644 --- a/src/views/admin/system/user/index.vue +++ b/src/views/admin/system/user/index.vue @@ -7,8 +7,8 @@ :query="deptData.queryList" :show-expand="true" @node-click="handleNodeClick" - @treeDeepSearch="treeDeepSearch" @treeNodeCheckChange="treeNodeCheckChange" + @treeDeepSearch="treeDeepSearch" switch-inactive-text="当前部门" switch-active-text="当前部门及子部门" :defaultTreeWidth="20" @@ -236,23 +236,17 @@ const deptData = reactive({ }, }) -// 是否深度搜索 -const treeDeepSearch = (isDeep: boolean) => { - state.queryForm.isDeepDept = isDeep - getDataList() -} - // 清空搜索条件 const resetQuery = () => { queryRef.value?.resetFields() state.queryForm.deptId = "" - draggableDepTreeRef.value.getTreeData() + draggableDepTreeRef.value.resetData() getDataList() } // 点击树 -const handleNodeClick = (e: any) => { - state.queryForm.deptId = e.id +const handleNodeClick = (clickedNode: any) => { + state.queryForm.deptId = clickedNode.id getDataList() } @@ -262,6 +256,12 @@ const treeNodeCheckChange = (checkedNodes: any) => { getDataList() } +// 是否深度搜索 +const treeDeepSearch = (isDeep: boolean) => { + state.queryForm.isDeepDept = isDeep + getDataList() +} + // 导出excel const exportExcel = () => { downBlobFile("/admin/user/export", Object.assign(state.queryForm, { ids: selectObjs }), "users.xlsx")