|
@@ -1,5 +1,5 @@
|
|
<template>
|
|
<template>
|
|
- <div class="h-full flex flex-col teamstyle overflow-hidden">
|
|
|
|
|
|
+ <div class="h-full flex flex-col teamstyle overflow-hidden temaClass">
|
|
<!-- 头部 -->
|
|
<!-- 头部 -->
|
|
<div class="bg-white flex justify-between team-header">
|
|
<div class="bg-white flex justify-between team-header">
|
|
<div class="flex items-center">
|
|
<div class="flex items-center">
|
|
@@ -7,7 +7,7 @@
|
|
@click="dialogFromCli('addDeptDialogVisible')">创建部门</el-link>
|
|
@click="dialogFromCli('addDeptDialogVisible')">创建部门</el-link>
|
|
<el-link class="text-nowrap textFont textFont mr-10" type="primary" :icon="Edit"
|
|
<el-link class="text-nowrap textFont textFont mr-10" type="primary" :icon="Edit"
|
|
@click="updateDepartment('addDeptDialogVisible')">{{ deptListItem.label || '全部人员' }}</el-link>
|
|
@click="updateDepartment('addDeptDialogVisible')">{{ deptListItem.label || '全部人员' }}</el-link>
|
|
- <span class="textSpan">共 0 人</span>
|
|
|
|
|
|
+ <span class="textSpan textFont">共 0 人</span>
|
|
</div>
|
|
</div>
|
|
<div class="teamForm flex items-center">
|
|
<div class="teamForm flex items-center">
|
|
<el-input v-model="teamForm.keyword" style="max-width: 650px" size="default" placeholder="请输入姓名搜索" class="mr-6"
|
|
<el-input v-model="teamForm.keyword" style="max-width: 650px" size="default" placeholder="请输入姓名搜索" class="mr-6"
|
|
@@ -61,13 +61,11 @@
|
|
<el-tree style="max-width: 600px" :data="deptList" :props="treeProps" @node-click="treeNode">
|
|
<el-tree style="max-width: 600px" :data="deptList" :props="treeProps" @node-click="treeNode">
|
|
<template #default="{ node, data }">
|
|
<template #default="{ node, data }">
|
|
<div class="flex justify-between treeContent">
|
|
<div class="flex justify-between treeContent">
|
|
- <div class="custom-tree-node">
|
|
|
|
|
|
+ <div class="custom-tree-node" @mouseleave="mouseleave(data,$event)" @mouseover="mouseover(data,$event)">
|
|
<div class="treeLabel">{{ node.label }}</div>
|
|
<div class="treeLabel">{{ node.label }}</div>
|
|
- <div class="treeIcon" v-if="data.id > 0">
|
|
|
|
- <el-link type="primary" :icon="CirclePlus" :underline="false"
|
|
|
|
- @click.stop="dialogFromCli('addDeptDialogVisible', data, true)"></el-link>
|
|
|
|
- <el-link type="primary" :icon="Delete" :underline="false" style="margin-left: 6px;"
|
|
|
|
- @click.stop="deteleDept(data)"></el-link>
|
|
|
|
|
|
+ <div class="treeIcon nodeEle" id="treeIcon" v-if="data.id > 0">
|
|
|
|
+ <el-link type="primary" :icon="CirclePlus" :underline="false" @click.stop="dialogFromCli('addDeptDialogVisible', data, true)"></el-link>
|
|
|
|
+ <el-link type="primary" :icon="Delete" :underline="false" style="margin-left: 6px;" @click.stop="deteleDept(data)"></el-link>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -562,6 +560,25 @@ function getUserList() {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+function mouseleave(data: any, $event: Event) {
|
|
|
|
+ if (data.id <= 0) return;
|
|
|
|
+ const target = $event.currentTarget as HTMLElement;
|
|
|
|
+ const iconElement = target.querySelector('#treeIcon');
|
|
|
|
+ if (iconElement) {
|
|
|
|
+ iconElement.setAttribute("class", "treeIcon nodeEle");
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+function mouseover(data: any, $event: MouseEvent) {
|
|
|
|
+ if (data.id <= 0) return;
|
|
|
|
+ const target = $event.currentTarget as HTMLElement;
|
|
|
|
+ const iconElement = target.querySelector('#treeIcon');
|
|
|
|
+ if (iconElement) {
|
|
|
|
+ iconElement.setAttribute("class", "treeIcon");
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+
|
|
function dialogFromCli(type: string, data: any = {}, flag: boolean = false) {
|
|
function dialogFromCli(type: string, data: any = {}, flag: boolean = false) {
|
|
resetDialog()
|
|
resetDialog()
|
|
if (flag) {
|
|
if (flag) {
|
|
@@ -641,7 +658,7 @@ onMounted(() => {
|
|
}
|
|
}
|
|
|
|
|
|
.textFont {
|
|
.textFont {
|
|
- font-size: 20px;
|
|
|
|
|
|
+ font-size: 16px;
|
|
}
|
|
}
|
|
|
|
|
|
.textSpan {
|
|
.textSpan {
|
|
@@ -674,10 +691,19 @@ onMounted(() => {
|
|
align-items: center;
|
|
align-items: center;
|
|
justify-self: flex-end;
|
|
justify-self: flex-end;
|
|
}
|
|
}
|
|
|
|
+ .nodeEle {
|
|
|
|
+ display: none;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
.operation {
|
|
.operation {
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|
|
|
|
+</style>
|
|
|
|
+
|
|
|
|
+<style>
|
|
|
|
+ .temaClass .el-tree-node {
|
|
|
|
+ padding: 4px 0;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|