zhaoke 3 жил өмнө
parent
commit
e8cda189c5

+ 1 - 1
src/components/organization/index.vue

@@ -125,7 +125,7 @@ export default {
       return data;
     },
     currentChange (data, isChecked) {
-      if (this.orgType == 'orgType') {
+      if (this.orgType == 'org') {
         const { OrganId } = data
         this.$emit("getTreeData", this.$refs.tree.getCheckedNodes())
         if (isChecked) {

+ 12 - 29
src/components/usergrouptree/index.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author: zk
  * @Date: 2022-02-09 15:47:09
- * @LastEditTime: 2022-02-15 17:35:48
- * @LastEditors: your name
+ * @LastEditTime: 2022-02-16 11:45:24
+ * @LastEditors: Please set LastEditors
  * @Description: 用户组树
  * @FilePath: \Foshan4A4.0\src\components\usergrouptree\index.vue
 -->
@@ -11,27 +11,10 @@
     <div class="head">
       <p>{{ title }}</p>
     </div>
-    <div
-      :class="type ? 'radioBg':''"
-      class="content"
-    >
+    <div :class="type ? 'radioBg':''" class="content">
       <el-scrollbar style="height: 100%">
-        <el-tree
-          ref="tree"
-          :data="data"
-          show-checkbox
-          :check-strictly="true"
-          :default-props="defaultProps"
-          :expand-on-click-node="false"
-          node-key="GroupId"
-          default-expand-all
-          highlight-current
-          @check-change="currentChange"
-        >
-          <span
-            slot-scope="{ data }"
-            class="custom-tree-node"
-          >
+        <el-tree ref="tree" :data="data" show-checkbox :check-strictly="true" :default-props="defaultProps" :expand-on-click-node="false" node-key="GroupId" default-expand-all highlight-current @check-change="currentChange">
+          <span slot-scope="{ data }" class="custom-tree-node">
             {{ data.GroupName }}
           </span>
         </el-tree>
@@ -68,7 +51,7 @@ export default {
       })
     }
   },
-  data() {
+  data () {
     return {
       data: [], // tree数据
       checkedList: [], // 已选中数据
@@ -78,32 +61,32 @@ export default {
   },
   watch: {
     checkedKeys: {
-      handler(val) {
+      handler (val) {
         this.checkedList = val
         this.$refs.tree.setCheckedKeys(val)
       },
       deep: true
     }
   },
-  created() {
+  created () {
     this.getGroupTree()
   },
   methods: {
     // 复选框选中
-    currentChange(data, isChecked) {
+    currentChange (data, isChecked) {
       if (this.type) {
         const { GroupId } = data
-        this.$emit('get-tree-data', this.$refs.tree.getCheckedNodes())
+        this.$emit('getTreeData', this.$refs.tree.getCheckedNodes())
         if (isChecked) {
           const checked = [GroupId]
           this.$refs.tree.setCheckedKeys(checked)
         }
       } else {
         const arr = this.$refs.tree.getCheckedNodes()
-        this.$emit('get-tree-data', arr)
+        this.$emit('getTreeData', arr)
       }
     },
-    async getGroupTree() {
+    async getGroupTree () {
       const result = await GetGroupTree({
         QueryName: '',
         PageIndex: this.pageIndex,

+ 1 - 1
src/views/staffManagement/compontents/staffAdd.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-02-10 14:49:20
- * @LastEditTime: 2022-02-14 14:36:13
+ * @LastEditTime: 2022-02-16 11:46:02
  * @LastEditors: Please set LastEditors
  * @Description: 编辑职员
  * @FilePath: \Foshan4A4.0\src\views\staffManagement\compontents\staffEdit.vue

+ 2 - 2
src/views/staffManagement/compontents/staffEdit.vue

@@ -1,7 +1,7 @@
 <!--
  * @Author: your name
  * @Date: 2022-02-10 14:49:20
- * @LastEditTime: 2022-02-14 14:35:59
+ * @LastEditTime: 2022-02-16 11:50:56
  * @LastEditors: Please set LastEditors
  * @Description: 编辑职员
  * @FilePath: \Foshan4A4.0\src\views\staffManagement\compontents\staffEdit.vue
@@ -297,7 +297,7 @@ export default {
             this.roleCheckBoxs = RoleList;
             this.checkRoles = RoleList;
             if (this.openRole && this.OpenGroup && !this.OpenAuthData) {
-              this.roleType = 'role';
+              this.roleType = 'onlyRole';
             }
           }
           if (GroupList && GroupList.length) {