Browse Source

提交相关代码

Lijy 8 months ago
parent
commit
66660659c8

+ 2 - 2
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/header/header.vue

@@ -4,11 +4,11 @@
     <div class="text-nowrap">客户管家</div>
   </div>
   <div class=" flex flex-row justify-start items-center text-white flex-1 parentDiv" ref="parentDiv">
-    <div v-for="(routerItem, routerItemIdex) in routerList"
+    <div v-for="(routerItem, routerItemIdex) in routerList" @click="setCurrentRouter(routerItem)"
       :class="`border-b-2 border-transparent hover:border-white p-2 mr-4 cursor-pointer multipleyHeader ${activeRouter?.path === routerItem.path ? 'border-white' : ''}`"
       :key="routerItem.path" ref="childDivs" v-show="visibleItems.includes(routerItemIdex)">
       <div v-if="routerItem.children && routerItem.children.length <= 0 && routerItem?.isMenu"
-        @click="setCurrentRouter(routerItem)" class="text-nowrap">
+         class="text-nowrap">
         {{ routerItem.name }}
       </div>
       <div v-if="routerItem.children && routerItem.children.length > 0" class="flex justify-center items-center">

+ 35 - 9
fhKeeper/formulahousekeeper/customerBuler-crm/src/pages/team/index.vue

@@ -1,5 +1,5 @@
 <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="flex items-center">
@@ -7,7 +7,7 @@
           @click="dialogFromCli('addDeptDialogVisible')">创建部门</el-link>
         <el-link class="text-nowrap textFont textFont mr-10" type="primary" :icon="Edit"
           @click="updateDepartment('addDeptDialogVisible')">{{ deptListItem.label || '全部人员' }}</el-link>
-        <span class="textSpan">共 0 人</span>
+        <span class="textSpan textFont">共 0 人</span>
       </div>
       <div class="teamForm flex items-center">
         <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">
               <template #default="{ node, data }">
                 <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="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>
@@ -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) {
   resetDialog()
   if (flag) {
@@ -641,7 +658,7 @@ onMounted(() => {
   }
 
   .textFont {
-    font-size: 20px;
+    font-size: 16px;
   }
 
   .textSpan {
@@ -674,10 +691,19 @@ onMounted(() => {
       align-items: center;
       justify-self: flex-end;
     }
+    .nodeEle {
+      display: none;
+    }
   }
 }
 
 .operation {
   cursor: pointer;
 }
+</style>
+
+<style>
+  .temaClass .el-tree-node {
+    padding: 4px 0;
+  }
 </style>