diff --git a/ui/dasadmin/package.json b/ui/dasadmin/package.json index e4456dca..1147f73f 100644 --- a/ui/dasadmin/package.json +++ b/ui/dasadmin/package.json @@ -53,15 +53,16 @@ "@types/node": "20.14.0", "@types/nprogress": "0.2.3", "@types/sortablejs": "1.15.8", - "@typescript-eslint/eslint-plugin": "^7.13.1", - "@typescript-eslint/parser": "^7.13.1", + "@typescript-eslint/eslint-plugin": "^8.9.0", + "@typescript-eslint/parser": "^8.9.0", "@vitejs/plugin-vue": "5.0.5", "async-validator": "4.2.5", "crypto-js": "^4.2.0", - "eslint": "^8.57.0", + "eslint": "^9.0.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-react": "^7.34.3", "eslint-plugin-vue": "9.26.0", + "glob": "^11.0.0", "globals": "^15.6.0", "prettier": "^3.3.2", "sass": "1.77.4", diff --git a/ui/dasadmin/src/views/backend/auth/org/index.vue b/ui/dasadmin/src/views/backend/auth/org/index.vue index 9779b841..5d464af1 100644 --- a/ui/dasadmin/src/views/backend/auth/org/index.vue +++ b/ui/dasadmin/src/views/backend/auth/org/index.vue @@ -322,7 +322,7 @@ const addInstitutional = (rightClick = false) => { const submitAddForm = () => { console.log(formModel.value) if (!formRef.value) return - formRef.value.validate((valid:boolean) => { + formRef.value.validate((valid: boolean) => { if (valid) { if (dialogTitle.value === '新增机构') { formModel.value.parentOrgId = formModel.value.parentOrgId ?? '0' @@ -330,7 +330,7 @@ const submitAddForm = () => { .then((res) => { if (res.success) { ElMessage.success('新增成功') - getInstitutionList() + getInstitutionList({parentOrgId:rightClickMenuData.value?.parentOrgId}) dialogVible.value = false refreshTreeData(formModel.value.parentOrgId) } else { @@ -345,7 +345,7 @@ const submitAddForm = () => { .then((res) => { if (res.success) { ElMessage.success('编辑成功') - getInstitutionList() + getInstitutionList({parentOrgId:rightClickMenuData.value?.parentOrgId}) dialogVible.value = false refreshTreeData(rightClickMenuData.value!.parentOrgId).then(() => { refreshTreeData(formModel.value.parentOrgId) @@ -368,7 +368,14 @@ const closeAddForm = () => { const getInstitutionList = (data: getDataType = { name: null }) => { getInstitutionalListReq(data).then((res) => { pageTotal.value = res.total - originData.value = res.rows + console.log(res.rows); + + originData.value = res.rows.map(item=>{ + return { + ...item, + parentOrgName:item.parentOrgName ? item.parentOrgName : '无' + } + }) }) } @@ -450,7 +457,7 @@ const delForm = (column: getTreeDataReturnType) => { .then((res) => { if (res.success) { ElMessage.success('删除成功') - getInstitutionList() + getInstitutionList({parentOrgId:rightClickMenuData.value?.parentOrgId}) refreshTreeData(column.parentOrgId) } else { ElMessage.error(res?.msg ?? '删除失败') @@ -470,6 +477,7 @@ const treeReplaceProps = { const treeSelectReplaceProps = { label: 'name', children: 'children', + isLeaf: 'isLeaf', } const loadTreeData = (node: Node, resolve: any) => { if (node.level === 0) { @@ -489,7 +497,6 @@ const loadTreeData = (node: Node, resolve: any) => { }) } const loadSelectTreeData = (node: Node, resolve: any) => { - console.log(node) if (node.level === 0) { return getTreeData(null) @@ -497,7 +504,8 @@ const loadSelectTreeData = (node: Node, resolve: any) => { if (!res.length) { node.data.isLeaf = true } - resolve(res) + + resolve([{ id: '0', name: '无', isLeaf: true }, ...res]) }) .catch((err) => { console.log(err) @@ -552,8 +560,6 @@ const refreshTreeData = (parentOrgId: string | number | null) => { return new Promise((resolve) => { const data = parentOrgId === 0 || parentOrgId === '0' ? null : parentOrgId getTreeData(data).then((res) => { - console.log('res,', res) - console.log(data) if (data) { treeRef.value?.updateKeyChildren(parentOrgId!, res) } else { diff --git a/ui/dasadmin/src/views/backend/auth/role/index.vue b/ui/dasadmin/src/views/backend/auth/role/index.vue index 07d94f44..56697eca 100644 --- a/ui/dasadmin/src/views/backend/auth/role/index.vue +++ b/ui/dasadmin/src/views/backend/auth/role/index.vue @@ -5,7 +5,7 @@