|
@@ -3,7 +3,7 @@ defineOptions({
|
|
// name 作为一种规范最好必须写上并且和路由的name保持一致
|
|
// name 作为一种规范最好必须写上并且和路由的name保持一致
|
|
name: "prosonDepartment"
|
|
name: "prosonDepartment"
|
|
});
|
|
});
|
|
-import { ref, reactive, watch } from "vue";
|
|
|
|
|
|
+import { ref, reactive, watch, nextTick } from "vue";
|
|
import { ElMessageBox, ElMessage } from "element-plus";
|
|
import { ElMessageBox, ElMessage } from "element-plus";
|
|
import { Search } from "@element-plus/icons-vue";
|
|
import { Search } from "@element-plus/icons-vue";
|
|
import prosonEditDrawer from "./components/prosonEditDrawer.vue";
|
|
import prosonEditDrawer from "./components/prosonEditDrawer.vue";
|
|
@@ -14,6 +14,8 @@ import changeRole from "./components/changeRole.vue";
|
|
import { postListTree, postDelDept } from "@/api/department";
|
|
import { postListTree, postDelDept } from "@/api/department";
|
|
import { postOrganizationUserPage, getDeleteUserApi } from "@/api/userSetting";
|
|
import { postOrganizationUserPage, getDeleteUserApi } from "@/api/userSetting";
|
|
import UserPageTable from "@/components/UserPageTable/index.vue";
|
|
import UserPageTable from "@/components/UserPageTable/index.vue";
|
|
|
|
+import { Plus } from "@element-plus/icons-vue";
|
|
|
|
+
|
|
// 添加部门
|
|
// 添加部门
|
|
const newDepartmentRef = ref(null);
|
|
const newDepartmentRef = ref(null);
|
|
const newDepartmentShow = ref(false);
|
|
const newDepartmentShow = ref(false);
|
|
@@ -53,7 +55,13 @@ const postListTreeApi = async () => {
|
|
const { code, data } = await postListTree();
|
|
const { code, data } = await postListTree();
|
|
if (code == 200) {
|
|
if (code == 200) {
|
|
console.log(data);
|
|
console.log(data);
|
|
|
|
+ if (data && data.length) {
|
|
|
|
+ data[0].id = 1;
|
|
|
|
+ }
|
|
dataTree.value = data;
|
|
dataTree.value = data;
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ handleNodeClick(dataTree.value[0]);
|
|
|
|
+ });
|
|
}
|
|
}
|
|
};
|
|
};
|
|
postListTreeApi();
|
|
postListTreeApi();
|
|
@@ -173,6 +181,7 @@ watch(realName, val => {
|
|
<prosonEditDrawer
|
|
<prosonEditDrawer
|
|
ref="prosonEditDrawerRef"
|
|
ref="prosonEditDrawerRef"
|
|
v-model="prosonEditDrawerShow"
|
|
v-model="prosonEditDrawerShow"
|
|
|
|
+ @handleClick="postListTreeApi"
|
|
/>
|
|
/>
|
|
<!-- 添加部门 -->
|
|
<!-- 添加部门 -->
|
|
<newDepartment
|
|
<newDepartment
|
|
@@ -216,7 +225,9 @@ watch(realName, val => {
|
|
<span>{{ node.label }}</span>
|
|
<span>{{ node.label }}</span>
|
|
<el-dropdown trigger="click" @click.stop>
|
|
<el-dropdown trigger="click" @click.stop>
|
|
<span>
|
|
<span>
|
|
- <el-icon><Operation /></el-icon>
|
|
|
|
|
|
+ <el-icon>
|
|
|
|
+ <Operation />
|
|
|
|
+ </el-icon>
|
|
</span>
|
|
</span>
|
|
<template #dropdown>
|
|
<template #dropdown>
|
|
<el-dropdown-menu class="setting">
|
|
<el-dropdown-menu class="setting">
|
|
@@ -253,8 +264,9 @@ watch(realName, val => {
|
|
class="w-full mt-4"
|
|
class="w-full mt-4"
|
|
type="primary"
|
|
type="primary"
|
|
plain
|
|
plain
|
|
|
|
+ :icon="Plus"
|
|
@click="addDepartment"
|
|
@click="addDepartment"
|
|
- >添加部门</el-button
|
|
|
|
|
|
+ >新增部门</el-button
|
|
>
|
|
>
|
|
</Auth>
|
|
</Auth>
|
|
</div>
|
|
</div>
|
|
@@ -268,11 +280,15 @@ watch(realName, val => {
|
|
<template #actions="{ row }">
|
|
<template #actions="{ row }">
|
|
<Auth :value="['编辑成员']">
|
|
<Auth :value="['编辑成员']">
|
|
<el-dropdown trigger="click" class="mr-2">
|
|
<el-dropdown trigger="click" class="mr-2">
|
|
- <el-icon @click="personDetails(row)"><View /></el-icon>
|
|
|
|
|
|
+ <el-icon @click="personDetails(row)">
|
|
|
|
+ <View />
|
|
|
|
+ </el-icon>
|
|
</el-dropdown>
|
|
</el-dropdown>
|
|
</Auth>
|
|
</Auth>
|
|
<el-dropdown trigger="click">
|
|
<el-dropdown trigger="click">
|
|
- <el-icon><Operation /></el-icon>
|
|
|
|
|
|
+ <el-icon>
|
|
|
|
+ <Operation />
|
|
|
|
+ </el-icon>
|
|
<template #dropdown>
|
|
<template #dropdown>
|
|
<el-dropdown-menu class="setting">
|
|
<el-dropdown-menu class="setting">
|
|
<Auth :value="['删除成员']">
|
|
<Auth :value="['删除成员']">
|
|
@@ -309,6 +325,7 @@ watch(realName, val => {
|
|
height: 100%;
|
|
height: 100%;
|
|
padding: 10px 20px;
|
|
padding: 10px 20px;
|
|
}
|
|
}
|
|
|
|
+
|
|
// ::v-deep .el-dropdown {
|
|
// ::v-deep .el-dropdown {
|
|
// line-height: 1;
|
|
// line-height: 1;
|
|
// }
|
|
// }
|