浏览代码

修改权限

zhaoke 2 年之前
父节点
当前提交
d9345e1512

二进制
src/assets/nav/ic_list_nav_group_check.png


二进制
src/assets/nav/ic_list_nav_group_default.png


+ 2 - 2
src/components/permissiontree/index.vue

@@ -235,8 +235,8 @@ export default {
     //获取权限列表
     getDataList() {
       Query({
-        id: DATACONTENT_ID.authTreeId,
-        dataContent: [""],
+        id: DATACONTENT_ID.authTreeNewId,
+        dataContent: [sessionStorage.getItem("User_Id")],
       }).then((result) => {
         // this.getDefaultDataList();
         //this.setUnDisabledData(result.returnData.listValues);

+ 51 - 83
src/layout/components/Sidebar/SidebarItem.vue

@@ -16,9 +16,7 @@
           </el-tooltip> -->
           <el-tooltip class="item" effect="dark" :content="onlyOneChild.meta.title" placement="right" v-if="!leup"><span class="pathName" :class="getClass(item.path)"></span></el-tooltip>
           <span class="pathNamecosy" v-if="leup" :class="getClass(item.path)"></span>
-          <span class="pathNameer" v-if="leup">{{
-            onlyOneChild.meta.title
-          }}</span>
+          <span class="pathNameer" v-if="leup">{{ onlyOneChild.meta.title }}</span>
         </el-menu-item>
       </app-link>
     </template>
@@ -64,41 +62,33 @@ export default {
       default: true,
     },
   },
-  data () {
+  data() {
     // To fix https://github.com/PanJiaChen/vue-admin-template/issues/237
     // TODO: refactor with render function
     this.onlyOneChild = null;
     return {};
   },
-  mounted () {
+  mounted() {
     // console.log(this.item, 'item')
     // const vnodes
     // vnodes.push(<span slot='title'>{(title)}</span>)
   },
   methods: {
-    hasOneShowingChild (children = [], parent) {
+    hasOneShowingChild(children = [], parent) {
       // console.log(this.item,'item')
       const showingChildren = children.filter((item) => {
         if (item.hidden) {
           return false;
         } else {
           // Temp set(will be used if only has one showing child)
-          item.meta.imgstyle = item.meta.imgstyle
-            ? item.meta.imgstyle
-            : "ic_home_nav_default.png";
-          item.meta.imgstyleup = item.meta.imgstyleup
-            ? item.meta.imgstyleup
-            : "ic_home_nav_check.png";
+          item.meta.imgstyle = item.meta.imgstyle ? item.meta.imgstyle : "ic_home_nav_default.png";
+          item.meta.imgstyleup = item.meta.imgstyleup ? item.meta.imgstyleup : "ic_home_nav_check.png";
           this.onlyOneChild = item;
-          const matched = this.$route.matched.some(
-            (raw) => raw.path === item.path
-          );
+          const matched = this.$route.matched.some((raw) => raw.path === item.path);
           if (matched) {
-            this.onlyOneChild.meta.imger = require("@/assets/nav/" +
-              item.meta.imgstyleup);
+            this.onlyOneChild.meta.imger = require("@/assets/nav/" + item.meta.imgstyleup);
           } else {
-            this.onlyOneChild.meta.imger = require("@/assets/nav/" +
-              item.meta.imgstyle);
+            this.onlyOneChild.meta.imger = require("@/assets/nav/" + item.meta.imgstyle);
           }
           // console.log(this.$route,'router')
           return true;
@@ -117,7 +107,7 @@ export default {
 
       return false;
     },
-    resolvePath (routePath) {
+    resolvePath(routePath) {
       if (isExternal(routePath)) {
         return routePath;
       }
@@ -126,7 +116,7 @@ export default {
       }
       return path.resolve(this.basePath, routePath);
     },
-    getClass (path) {
+    getClass(path) {
       const p = path.split("/").join("");
       if (p) {
         return p;
@@ -166,6 +156,9 @@ export default {
   .account {
     background: url("../../../assets/nav/ic_list_nav_account_check.png");
   }
+  .accountgroup {
+    background: url("../../../assets/nav/ic_list_nav_group_check.png");
+  }
   .role {
     background: url("../../../assets/nav/ic_list_nav_character_check.png");
   }
@@ -212,8 +205,7 @@ export default {
   }
 
   .BasicsData {
-    background: url("../../../assets/nav/ic_data_collection_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_data_collection_check.png") no-repeat;
   }
 
   .systemSettings {
@@ -221,12 +213,10 @@ export default {
   }
 
   .statisticsCharts {
-    background: url("../../../assets/nav/ic_list_nav_statistical_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_statistical_check.png") no-repeat;
   }
   .statisticalAnalysis {
-    background: url("../../../assets/nav/ic_list_nav_screen_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_screen_check.png") no-repeat;
   }
 }
 // ::v-deep .el-menu-item {
@@ -282,43 +272,39 @@ export default {
   display: none;
 }
 .account {
-  background: url("../../../assets/nav/ic_list_nav_account_default.png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_list_nav_account_default.png") no-repeat;
+  &:hover {
+    background: url("../../../assets/nav/ic_list_nav_account_check.png") no-repeat;
+  }
+}
+.accountgroup {
+  background: url("../../../assets/nav/ic_list_nav_group_default.png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_list_nav_account_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_group_check.png") no-repeat;
   }
 }
 .role {
-  background: url("../../../assets/nav/ic_list_nav_character_default.png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_list_nav_character_default.png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_list_nav_character_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_character_check.png") no-repeat;
   }
 }
 .authority {
-  background: url("../../../assets/nav/ic_list_nav_permissions_default.png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_list_nav_permissions_default.png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_list_nav_permissions_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_permissions_check.png") no-repeat;
   }
 }
 .transfer {
-  background: url("../../../assets/nav/ic_list_nav_transit_default.png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_list_nav_transit_default.png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_list_nav_transit_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_transit_check.png") no-repeat;
   }
 }
 .arrival {
-  background: url("../../../assets/nav/ic_list_nav_arrive_default.png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_list_nav_arrive_default.png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_list_nav_arrive_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_arrive_check.png") no-repeat;
   }
 }
 .departure {
@@ -328,19 +314,15 @@ export default {
   }
 }
 .dataCollection {
-  background: url("../../../assets/nav/ic_data_collection_default .png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_data_collection_default .png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_data_collection_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_data_collection_check.png") no-repeat;
   }
 }
 .dataParser {
-  background: url("../../../assets/nav/ic_data_governance_default.png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_data_governance_default.png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_data_governance_check .png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_data_governance_check .png") no-repeat;
   }
 }
 .dataStore {
@@ -356,27 +338,21 @@ export default {
   }
 }
 .advance {
-  background: url("../../../assets/nav/ic_list_nav_search_default.png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_list_nav_search_default.png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_list_nav_search_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_search_check.png") no-repeat;
   }
 }
 .integration {
-  background: url("../../../assets/nav/ic_data_governance_default.png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_data_governance_default.png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_data_governance_check .png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_data_governance_check .png") no-repeat;
   }
 }
 .protocol {
-  background: url("../../../assets/nav/ic_list_nav_agreement_default.png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_list_nav_agreement_default.png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_list_nav_agreement_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_agreement_check.png") no-repeat;
   }
 }
 
@@ -388,20 +364,16 @@ export default {
 }
 
 .sourceDataItem {
-  background: url("../../../assets/nav/ic_list_nav_source_default.png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_list_nav_source_default.png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_list_nav_source_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_source_check.png") no-repeat;
   }
 }
 
 .BasicsData {
-  background: url("../../../assets/nav/ic_data_collection_default .png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_data_collection_default .png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_data_collection_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_data_collection_check.png") no-repeat;
   }
 }
 
@@ -413,20 +385,16 @@ export default {
 }
 
 .statisticsCharts {
-  background: url("../../../assets/nav/ic_list_nav_statistical_default .png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_list_nav_statistical_default .png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_list_nav_statistical_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_statistical_check.png") no-repeat;
   }
 }
 
 .statisticalAnalysis {
-  background: url("../../../assets/nav/ic_list_nav_screen_default.png")
-    no-repeat;
+  background: url("../../../assets/nav/ic_list_nav_screen_default.png") no-repeat;
   &:hover {
-    background: url("../../../assets/nav/ic_list_nav_screen_check.png")
-      no-repeat;
+    background: url("../../../assets/nav/ic_list_nav_screen_check.png") no-repeat;
   }
 }
 

+ 38 - 44
src/layout/components/Sidebar/index.vue

@@ -2,7 +2,17 @@
   <div :class="{ 'has-logo': showLogo }">
     <logo v-if="showLogo" :collapse="isCollapse" />
     <el-scrollbar wrap-class="scrollbar-wrapper">
-      <el-menu class="navMenu" :default-active="activeMenu" :collapse="isCollapse" :background-color="variables.menusBg" :text-color="variables.menuText" :unique-opened="false" :active-text-color="variables.menuActiveText" :collapse-transition="false" mode="vertical">
+      <el-menu
+        class="navMenu"
+        :default-active="activeMenu"
+        :collapse="isCollapse"
+        :background-color="variables.menusBg"
+        :text-color="variables.menuText"
+        :unique-opened="false"
+        :active-text-color="variables.menuActiveText"
+        :collapse-transition="false"
+        mode="vertical"
+      >
         <sidebar-item v-for="(route, index) in permission_routes" :key="index" :item="route" :base-path="route.path" :leup="leup" />
       </el-menu>
     </el-scrollbar>
@@ -21,7 +31,7 @@ import SidebarItem from "./SidebarItem";
 import variables from "@/styles/variables.scss";
 
 export default {
-  data () {
+  data() {
     return {
       leup: true,
     };
@@ -29,11 +39,8 @@ export default {
   components: { SidebarItem, Logo },
   computed: {
     ...mapGetters(["sidebar", "permission_routes"]),
-    routes () {
-      const power =
-        typeof this.userPowerList == "string"
-          ? JSON.parse(this.userPowerList)
-          : this.userPowerList;
+    routes() {
+      const power = typeof this.userPowerList == "string" ? JSON.parse(this.userPowerList) : this.userPowerList;
       return power;
       // const datas = this.$router.options.routes;
       // const arrs = [];
@@ -56,7 +63,7 @@ export default {
       //   return datas;
       // }
     },
-    activeMenu () {
+    activeMenu() {
       const route = this.$route;
       const { meta, path } = route;
       // if set path, the sidebar will highlight the path you set
@@ -65,18 +72,18 @@ export default {
       }
       return path;
     },
-    showLogo () {
+    showLogo() {
       return this.$store.state.settings.sidebarLogo;
     },
-    variables () {
+    variables() {
       return variables;
     },
-    isCollapse () {
+    isCollapse() {
       return !this.sidebar.opened;
     },
   },
   methods: {
-    updata () {
+    updata() {
       this.leup = !this.leup;
       this.$emit("leup", this.leup);
     },
@@ -136,36 +143,31 @@ export default {
 ::v-deep .navMenu {
   .router-link-active {
     .account {
-      background: url("../../../assets/nav/ic_list_nav_account_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_account_check.png") no-repeat;
+    }
+    .accountgroup {
+      background: url("../../../assets/nav/ic_list_nav_group_check.png") no-repeat;
     }
     .role {
-      background: url("../../../assets/nav/ic_list_nav_character_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_character_check.png") no-repeat;
     }
     .authority {
-      background: url("../../../assets/nav/ic_list_nav_permissions_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_permissions_check.png") no-repeat;
     }
     .transfer {
-      background: url("../../../assets/nav/ic_list_nav_transit_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_transit_check.png") no-repeat;
     }
     .arrival {
-      background: url("../../../assets/nav/ic_list_nav_arrive_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_arrive_check.png") no-repeat;
     }
     .departure {
-      background: url("../../../assets/nav/ic_list_nav_leave_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_leave_check.png") no-repeat;
     }
     .dataCollection {
-      background: url("../../../assets/nav/ic_data_collection_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_data_collection_check.png") no-repeat;
     }
     .dataParser {
-      background: url("../../../assets/nav/ic_data_governance_check .png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_data_governance_check .png") no-repeat;
     }
     .dataStore {
       background: url("../../../assets/nav/ic_data_save_check.png") no-repeat;
@@ -174,40 +176,32 @@ export default {
       background: url("../../../assets/nav/ic_setting_nav_check.png") no-repeat;
     }
     .advance {
-      background: url("../../../assets/nav/ic_list_nav_search_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_search_check.png") no-repeat;
     }
     .integration {
-      background: url("../../../assets/nav/ic_data_governance_check .png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_data_governance_check .png") no-repeat;
     }
     .protocol {
-      background: url("../../../assets/nav/ic_list_nav_agreement_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_agreement_check.png") no-repeat;
     }
     .deployNode {
-      background: url("../../../assets/nav/ic_list_nav_node_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_node_check.png") no-repeat;
     }
     .sourceDataItem {
-      background: url("../../../assets/nav/ic_list_nav_source_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_source_check.png") no-repeat;
     }
     .BasicsData {
-      background: url("../../../assets/nav/ic_data_collection_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_data_collection_check.png") no-repeat;
     }
 
     .systemSettings {
       background: url("../../../assets/nav/ic_setting_nav_check.png") no-repeat;
     }
     .statisticsCharts {
-      background: url("../../../assets/nav/ic_list_nav_statistical_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_statistical_check.png") no-repeat;
     }
     .statisticalAnalysis {
-      background: url("../../../assets/nav/ic_list_nav_screen_check.png")
-        no-repeat;
+      background: url("../../../assets/nav/ic_list_nav_screen_check.png") no-repeat;
     }
   }
 }

+ 163 - 124
src/router/routes/routes-file-four.js

@@ -7,203 +7,242 @@
  * have a nice day!
  */
 
-import Layout from '@/layout'
+import Layout from "@/layout";
 
 // 权限管理
 const authorityRoutes = {
-  path: '/authority',
+  path: "/authority",
   component: Layout,
-  meta: { roles: ['authority_menu'], keepAlive: false },
+  meta: { roles: ["authority_menu"], keepAlive: false },
   children: [
     {
-      path: '/authority',
-      component: () => import('@/views/authorityManagement/index'),
+      path: "/authority",
+      component: () => import("@/views/authorityManagement/index"),
       meta: {
-        title: '权限管理',
-        icon: 'authority',
-        imgstyle: 'ic_list_nav_permissions_default.png',
-        imgstyleup: 'ic_list_nav_permissions_check.png',
+        title: "权限管理",
+        icon: "authority",
+        imgstyle: "ic_list_nav_permissions_default.png",
+        imgstyleup: "ic_list_nav_permissions_check.png",
         keepAlive: false,
       },
       children: [
         {
-          path: '/',
-          name: 'AuthorityHome',
+          path: "/",
+          name: "AuthorityHome",
           component: {
-            render (c) {
-              return c('router-view')
-            }
+            render(c) {
+              return c("router-view");
+            },
           },
-          redirect: '/',
-          meta: { title: '权限项管理', isPage: 'authority_page', keepAlive: false, roles: ['authority_page'] },
+          redirect: "/",
+          meta: { title: "权限项管理", isPage: "authority_page", keepAlive: false, roles: ["authority_page"] },
           children: [
             {
-              path: '/',
-              meta: { title: '权限项管理', isPage: 'authority_page', keepAlive: false },
-              component: () => import('@/views/authorityManagement/components/authorityHome')
+              path: "/",
+              meta: { title: "权限项管理", isPage: "authority_page", keepAlive: false },
+              component: () => import("@/views/authorityManagement/components/authorityHome"),
             },
             {
-              path: 'appAdd',
-              name: 'AuthorityAppAdd',
-              component: () => import('@/views/authorityManagement/components/authorityAppAdd'),
-              meta: { title: '新增应用', keepAlive: false }
+              path: "appAdd",
+              name: "AuthorityAppAdd",
+              component: () => import("@/views/authorityManagement/components/authorityAppAdd"),
+              meta: { title: "新增应用", keepAlive: false },
             },
             {
-              path: 'appEdit',
-              name: 'AuthorityAppEdit',
-              component: () => import('@/views/authorityManagement/components/authorityAppEdit'),
-              meta: { title: '编辑应用', keepAlive: false }
+              path: "appEdit",
+              name: "AuthorityAppEdit",
+              component: () => import("@/views/authorityManagement/components/authorityAppEdit"),
+              meta: { title: "编辑应用", keepAlive: false },
             },
             {
-              path: 'addPower',
-              name: 'AuthorityPowerAdd',
-              component: () => import('@/views/authorityManagement/components/authorityPowerAdd'),
-              meta: { title: '新增权限项', keepAlive: false }
+              path: "addPower",
+              name: "AuthorityPowerAdd",
+              component: () => import("@/views/authorityManagement/components/authorityPowerAdd"),
+              meta: { title: "新增权限项", keepAlive: false },
             },
             {
-              path: 'editPower',
-              name: 'AuthorityPowerEdit',
-              component: () => import('@/views/authorityManagement/components/authorityPowerEdit'),
-              meta: { title: '编辑权限项', keepAlive: false }
-            }
-          ]
-        }
-      ]
-    }
-  ]
-}
+              path: "editPower",
+              name: "AuthorityPowerEdit",
+              component: () => import("@/views/authorityManagement/components/authorityPowerEdit"),
+              meta: { title: "编辑权限项", keepAlive: false },
+            },
+          ],
+        },
+      ],
+    },
+  ],
+};
 
 // 角色管理
 const roleRoutes = {
-  path: '/role',
+  path: "/role",
   component: Layout,
-  meta: { roles: ['role_menu'], keepAlive: false },
+  meta: { roles: ["role_menu"], keepAlive: false },
   children: [
     {
-      path: '/role',
-      component: () => import('@/views/authorityManagement/components/authorityRole'),
+      path: "/role",
+      component: () => import("@/views/authorityManagement/components/authorityRole"),
       meta: {
-        title: '角色管理',
-        icon: 'role',
-        imgstyle: 'ic_list_nav_character_default.png',
-        imgstyleup: 'ic_list_nav_character_check.png',
-        keepAlive: false
+        title: "角色管理",
+        icon: "role",
+        imgstyle: "ic_list_nav_character_default.png",
+        imgstyleup: "ic_list_nav_character_check.png",
+        keepAlive: false,
       },
       children: [
         {
-          path: '/',
-          name: 'AuthorityRoleHome',
+          path: "/",
+          name: "AuthorityRoleHome",
           component: {
-            render (c) {
-              return c('router-view')
-            }
+            render(c) {
+              return c("router-view");
+            },
           },
-          redirect: '/',
-          meta: { title: '角色管理', isPage: 'role_page', keepAlive: false, roles: ['role_page'] },
+          redirect: "/",
+          meta: { title: "角色管理", isPage: "role_page", keepAlive: false, roles: ["role_page"] },
           children: [
             {
-              path: '/',
-              component: () => import('@/views/authorityManagement/components/authorityRoleHome'),
-              meta: { title: '角色管理', keepAlive: false },
+              path: "/",
+              component: () => import("@/views/authorityManagement/components/authorityRoleHome"),
+              meta: { title: "角色管理", keepAlive: false },
             },
             {
-              path: 'addRole',
-              name: 'AuthorityRoleAdd',
-              component: () => import('@/views/authorityManagement/components/authorityRoleAdd'),
-              meta: { title: '新增角色', keepAlive: false }
+              path: "addRole",
+              name: "AuthorityRoleAdd",
+              component: () => import("@/views/authorityManagement/components/authorityRoleAdd"),
+              meta: { title: "新增角色", keepAlive: false },
             },
             {
-              path: 'editRole',
-              name: 'AuthorityRoleEdit',
-              component: () => import('@/views/authorityManagement/components/authorityRoleEdit'),
-              meta: { title: '账号权限', keepAlive: false }
-            }
-          ]
-        }
-      ]
-    }
-  ]
-}
+              path: "editRole",
+              name: "AuthorityRoleEdit",
+              component: () => import("@/views/authorityManagement/components/authorityRoleEdit"),
+              meta: { title: "账号权限", keepAlive: false },
+            },
+          ],
+        },
+      ],
+    },
+  ],
+};
 
 // 账号管理
 const accountRoutes = {
-  path: '/account',
+  path: "/account",
   component: Layout,
-  meta: { roles: ['account_menu'], keepAlive: false },
+  meta: { roles: ["account_menu"], keepAlive: false },
   children: [
     {
-      path: '/account',
-      name: 'accountManagement',
-      component: () => import('@/views/accountManagement'),
+      path: "/account",
+      name: "accountManagement",
+      component: () => import("@/views/accountManagement"),
       meta: {
-        title: '账号管理',
-        icon: 'account',
-        imgstyle: 'ic_list_nav_account_default.png',
-        imgstyleup: 'ic_list_nav_account_check.png',
-        keepAlive: false
+        title: "账号管理",
+        icon: "account",
+        imgstyle: "ic_list_nav_account_default.png",
+        imgstyleup: "ic_list_nav_account_check.png",
+        keepAlive: false,
       },
       children: [
         {
-          path: '/account',
-          name: 'accountHome',
+          path: "/account",
+          name: "accountHome",
           component: {
-            render (c) {
-              return c('router-view')
-            }
+            render(c) {
+              return c("router-view");
+            },
           },
-          redirect: '/account',
+          redirect: "/account",
           // meta: {
           //   title: '账号管理',
           //   roles: ['account_page']
           // },
           meta: {
-            title: '账号管理',
+            title: "账号管理",
             keepAlive: false,
-            roles: ['account_page']
+            roles: ["account_page"],
           },
           children: [
             {
-              path: '/account',
-              component: () => import('@/views/accountManagement/components/accountHome'),
+              path: "/account",
+              component: () => import("@/views/accountManagement/components/accountHome"),
               meta: {
-                title: '账号管理',
-                keepAlive: false
+                title: "账号管理",
+                keepAlive: false,
               },
             },
             {
-              path: 'accountAdd',
-              name: 'accountAdd',
-              component: () => import('@/views/accountManagement/components/accountEdit'),
+              path: "accountAdd",
+              name: "accountAdd",
+              component: () => import("@/views/accountManagement/components/accountEdit"),
               meta: {
-                title: '新增账号', keepAlive: false
-              }
+                title: "新增账号",
+                keepAlive: false,
+              },
             },
             {
-              path: 'accountEdit',
-              name: 'accountEdit',
-              component: () => import('@/views/accountManagement/components/accountEdit'),
+              path: "accountEdit",
+              name: "accountEdit",
+              component: () => import("@/views/accountManagement/components/accountEdit"),
               meta: {
-                title: '编辑账号',
+                title: "编辑账号",
                 doesAccountExist: true,
-                keepAlive: false
-              }
+                keepAlive: false,
+              },
             },
             {
-              path: 'accountAuth',
-              name: 'accountAuth',
-              component: () => import('@/views/accountManagement/components/accountAuth'),
+              path: "accountAuth",
+              name: "accountAuth",
+              component: () => import("@/views/accountManagement/components/accountAuth"),
               meta: {
-                title: '账号权限',
-                keepAlive: false
-              }
-            }
-          ]
-        }
-      ]
-    }
-  ]
-}
-
+                title: "账号权限",
+                keepAlive: false,
+              },
+            },
+          ],
+        },
+      ],
+    },
+  ],
+};
 
+// 账号管理
+const accountGroupRoutes = {
+  path: "/accountgroup",
+  component: Layout,
+  meta: { roles: ["demo"], keepAlive: false },
+  children: [
+    {
+      path: "/accountgroup",
+      component: () => import("@/views/accountGroupManagement"),
+      meta: {
+        title: "账号组管理",
+        icon: "role",
+        imgstyle: "ic_list_nav_group_default.png",
+        imgstyleup: "ic_list_nav_group_check.png",
+        keepAlive: false,
+      },
+      children: [
+        {
+          path: "/",
+          name: "accountgroupHome",
+          component: {
+            render(c) {
+              return c("router-view");
+            },
+          },
+          redirect: "/",
+          meta: { title: "账号组管理", isPage: "role_page", keepAlive: false, roles: ["role_page"] },
+          children: [
+            {
+              path: "/",
+              component: () => import("@/views/accountGroupManagement/components/accountHome"),
+              meta: { title: "账号组管理", keepAlive: false },
+            },
+          ],
+        },
+      ],
+    },
+  ],
+};
 
-export default [authorityRoutes, roleRoutes, accountRoutes]
+export default [authorityRoutes, roleRoutes, accountRoutes, accountGroupRoutes];

+ 268 - 0
src/views/accountGroupManagement/components/accountAuth.vue

@@ -0,0 +1,268 @@
+<!--
+ * @Author: your name
+ * @Date: 2021-11-29 16:31:31
+ * @LastEditTime: 2022-03-02 13:51:29
+ * @LastEditors: Please set LastEditors
+ * @Description: 新增/编辑角色
+ * @FilePath: \Foshan4A2.0\src\views\authorityManagement\components\authorityRoleStatus.vue
+-->
+<template>
+  <div class="authorityPower">
+    <!--新增权限项-->
+    <div class="power-content flex-wrap">
+      <div class="r24 flex1 part">
+        <div style="padding: 27px 24px; height: 100%" class="addApp-form">
+          <div class="addApp-form-title flex">
+            <div class="manageTitle">账号信息</div>
+            <!-- <div class="title">
+              编辑角色
+              <span class="isqy">
+                <span>是否启用</span>
+                <el-radio v-model="radio" :label="1">是</el-radio>
+                <el-radio v-model="radio" :label="0">否</el-radio>
+              </span>
+            </div> -->
+            <!-- <div v-is="['role_edit save','admin']" class="btn">
+              <el-button @click="saveBtn('form')" size="small" type="primary">保存</el-button>
+            </div> -->
+          </div>
+          <div class="addApp-form-content dialog-public-background">
+            <el-form :inline="true" label-width="80px" ref="form" :rules="rules" class="form" :model="form">
+              <el-form-item prop="name" label="账号名称">
+                <el-input disabled placeholder="请输入角色名称" maxlength="32" v-model="form.name"></el-input>
+              </el-form-item>
+              <el-form-item label="账号描述">
+                <el-input style="width: 340px" disabled type="textarea" :rows="3" maxlength="200" placeholder="请输入描述" v-model="form.app"></el-input>
+              </el-form-item>
+              <el-form-item label="是否启用">
+                <el-radio disabled v-model="form.id" :label="1">是</el-radio>
+                <el-radio disabled v-model="form.id" :label="2">否</el-radio>
+              </el-form-item>
+            </el-form>
+          </div>
+        </div>
+      </div>
+      <div class="flex1 r24 part">
+        <Rolelist
+          v-loading="loading"
+          element-loading-text="数据加载中"
+          @checkChange="checkChange"
+          @checkClick="checkClick"
+          :roleType="roleType"
+          :checkBoxList="radioCheck"
+          :active="true"
+          class="hucRole"
+          :imageSize="80"
+          :number="8"
+          title="角色"
+        />
+      </div>
+      <div class="flex1 part">
+        <Permissionlist v-loading="permission" element-loading-text="数据加载中" :check="true" :imageSize="80" :RoleList="RoleList" class="hucPower" title="权限名称" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import Permissionlist from "@/components/permissionlist";
+import Rulesofcompetency from "@/components/rulesofcompetency";
+import Permissiontree from "@/components/permissiontree";
+import Rolelist from "@/components/rolelist";
+import { RoleDetails, EditRole, RoleAuths } from "@/api/apiAuthority";
+import { GeneralDataReception, Query } from "@/api/dataIntegration";
+export default {
+  name: "AuthorityRoleEdit",
+  components: { Permissionlist, Rulesofcompetency, Permissiontree, Rolelist },
+  data() {
+    return {
+      radio: 1,
+      form: {
+        //应用表单
+        name: "",
+        id: "",
+        app: "",
+      },
+      rules: {
+        //表单验证
+        name: [{ required: true, message: "请输入角色名称", trigger: "blur" }],
+      },
+      loading: false,
+      permission: false,
+      treeData: [],
+      arrs: [],
+      checkedKeys: [],
+      RoleList: [],
+      radioCheck: [],
+      checkedBoxs: [],
+      defRoleId: [],
+      roleId: null,
+      Status: null,
+      authTo: {},
+      authList: [],
+      authId: [],
+      type: null, //参数类型
+      roleType: "",
+    };
+  },
+  created() {
+    //this.getAuthTree();
+    const { userId } = this.$route.query;
+    this.roleId = userId;
+    this.getAccountInfo();
+    this.roleDetails();
+  },
+  mounted() {
+    this.roleType = "onlyRole";
+  },
+  methods: {
+    // 获取当前账号信息
+    async getAccountInfo() {
+      const res = await Query({
+        id: DATACONTENT_ID.accountDetailsId,
+        dataContent: [this.roleId],
+      });
+      if (res.code == 0) {
+        const { listValues } = res.returnData;
+        const obj = listValues[0];
+        const { user_name, user_status, user_comment } = obj;
+        this.form.name = user_name;
+        this.form.app = user_comment;
+        this.form.id = user_status;
+      } else {
+        this.$message.error(res.message);
+      }
+    },
+    //角色明细
+    async roleDetails() {
+      try {
+        // this.loading = true;
+        const res = await Query({
+          id: DATACONTENT_ID.accountRoleId,
+          dataContent: [this.roleId],
+        });
+        if (res.code == 0) {
+          const { listValues } = res.returnData;
+          if (listValues && listValues.length) {
+            this.checkedBoxs = listValues;
+            listValues.forEach((item) => {
+              item.flag = true;
+              item.RoleId = item.role_id;
+            });
+            this.radioCheck = listValues;
+            this.roleAuths(listValues[0].role_id);
+          }
+          this.checkedKeys.push(this.checkedBoxs);
+          this.loading = false;
+        } else {
+          this.$message.error(res.message);
+          this.loading = false;
+        }
+      } catch (error) {
+        console.log("出错了", error.message || error);
+        this.loading = false;
+      }
+    },
+    //删除
+    removeRole() {
+      this.deleteRole(this.roleId);
+    },
+    //获取权限树回调
+    getTreeData(arr) {
+      this.treeData = arr;
+    },
+    //获取权限规则回调
+    getData(obj) {
+      this.authTo = obj;
+    },
+    //互斥角色选中回调
+    async checkChange(arr) {
+      this.checkedKeys.push(arr);
+      const data1 = this.checkedKeys[this.checkedKeys.length - 1]; //最后一条数据
+      const data2 = this.checkedKeys[this.checkedKeys.length - 2]; //倒数第二条数据
+      if (data1.length > data2.length) {
+        this.checksBoxTs(data1, data2, "add");
+      } else {
+        this.checksBoxTs(data2, data1, "del");
+      }
+    },
+    async checksBoxTs(datas, arr, type) {
+      const res = datas.filter((item) => !arr.some((p) => item.role_id == p.role_id));
+      if (res && res.length) {
+        let obj = {
+          role_id: res[res.length - 1].role_id,
+          user_id: this.roleId,
+        };
+        if (type == "add") {
+          obj.event = 1;
+        } else {
+          obj.event = 3;
+        }
+        const result = await GeneralDataReception({
+          serviceId: SERVICE_ID.roleScId,
+          dataContent: JSON.stringify(obj),
+        });
+        if (result.code == 0) {
+          this.$message.success(result.message);
+        } else {
+          this.$message.error(result.message);
+        }
+      } else {
+        this.$message.error("未选中数据");
+      }
+    },
+    //互斥角色点击回调
+    checkClick(item) {
+      this.roleAuths(item.role_id);
+    },
+    async roleAuths(id) {
+      try {
+        this.permission = true;
+        const res = await Query({
+          id: DATACONTENT_ID.roleAuthId,
+          dataContent: [id],
+        });
+        if (res.code == 0) {
+          this.RoleList = res.returnData.listValues;
+          this.permission = false;
+        } else {
+          this.$message.error(res.message);
+          this.permission = false;
+        }
+      } catch (error) {
+        console.log("出错了", error.message || error);
+        this.permission = false;
+      }
+    },
+    //保存
+    saveBtn() {
+      this.editRole();
+    },
+    //确认保存
+    async editRole() {
+      try {
+        const res = await GeneralDataReception({
+          serviceId: SERVICE_ID.roleScId,
+          dataContent: JSON.stringify(this.ruleFormObj),
+        });
+        if (res.code === 0) {
+          this.$message.success(res.message);
+          this.$store.dispatch("tagsView/delView", this.$route);
+          this.$router.push("/role");
+        } else {
+          this.$message.error(res.message);
+        }
+      } catch (error) {
+        console.log("出错了", error.message || error);
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+@import "../../authorityManagement/css/role.scss";
+.part {
+  background-color: #fff;
+}
+</style>

+ 581 - 0
src/views/accountGroupManagement/components/accountEdit.vue

@@ -0,0 +1,581 @@
+<!--
+ * @Author: Badguy
+ * @Date: 2022-02-15 11:37:42
+ * @LastEditTime: 2022-05-10 18:03:53
+ * @LastEditors: your name
+ * @Description: 编辑账号
+ * have a nice day!
+-->
+
+<template>
+  <div class="account-edit">
+    <div class="account-edit-header">
+      <div class="title">
+        <div class="manageTitle">{{ pageTitle }}</div>
+        <!-- <div class="account-status">
+          是否启用
+          <el-radio-group v-model="accountForm.status">
+            <el-radio :label="1">是</el-radio>
+            <el-radio :label="0">否</el-radio>
+          </el-radio-group>
+        </div> -->
+        <div v-is="doesAccountExist ? ['userupdate_btn_save'] : []">
+          <!-- <el-button size="small" type="primary" class="btn-delete" @click="delate">删除</el-button> -->
+          <el-button size="small" type="primary" class="btn-save" @click="handleClickSave('accountForm')">保存</el-button>
+        </div>
+      </div>
+      <div class="title-content">
+        <el-form ref="accountForm" :inline="true" :model="accountForm" :rules="formRules">
+          <el-form-item label="账号名称" prop="name">
+            <el-input v-model="accountForm.name" maxlength="32" placeholder="请输入名称" size="small" />
+          </el-form-item>
+          <el-form-item label="登录密码" prop="pwd">
+            <el-input v-model="accountForm.pwd" placeholder="*******" size="small" disabled />
+          </el-form-item>
+          <el-form-item>
+            <el-button v-is="doesAccountExist ? ['userupdate_btn_re_pwd'] : []" size="small" type="primary" class="btn-reset-pwd" @click="resetPwd">重置密码</el-button>
+          </el-form-item>
+          <el-form-item label="描述" prop="desc">
+            <el-input v-model="accountForm.desc" class="desc" maxlength="128" placeholder="描述内容···" size="small" />
+          </el-form-item>
+        </el-form>
+      </div>
+    </div>
+
+    <div class="account-edit-main">
+      <!-- 用户组和角色未开启 -->
+      <el-row v-if="!openGroup && !openRole" :gutter="24">
+        <el-col :span="8">
+          <div class="content-card">
+            <PermissionTree title="权限树" :query-type="queryType" :checked-keys="permissionTreeChckedKeys" @getTreeData="getPermissionTreeChecked" />
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="content-card">
+            <RulesOfCompetency title="权限规则" margin-b="20px" @getData="getRulesOfCompetency" />
+          </div>
+        </el-col>
+        <el-col v-is="doesAccountExist ? ['account_edit_login_setting'] : ['account_add_login_setting']" :span="8">
+          <div class="content-card">
+            <LoginPolicy :checked-list="loginPolicyCheckedList" @getCheckedList="getLoginPolicyChecked" />
+          </div>
+        </el-col>
+      </el-row>
+      <!-- 角色和用户组都开启 -->
+      <el-row v-if="openGroup && openRole" :gutter="24">
+        <el-col :span="8">
+          <div class="content-card">
+            <AccountGroupTree title="所属账号组" nodekey="GroupId" :default-props="accountGroupTreeProps" :checked-keys="accountGroupTreeCheckedList" @getTreeData="getAccountGroupChecked" />
+          </div>
+        </el-col>
+        <el-col v-is="doesAccountExist ? ['account_edit_role_list'] : ['account_add_role_list']" :span="8">
+          <div class="content-card">
+            <RoleList
+              title="角色列表"
+              :role-type="roleType"
+              :group-ids="groupIds"
+              :check-box-list="roleListCheckedList"
+              :number="8"
+              :active="true"
+              @checkChange="getRoleListChecked"
+              @checkClick="selectRole"
+              @roleListChange="roleListCheckedChange"
+            />
+          </div>
+        </el-col>
+        <el-col v-is="doesAccountExist ? ['account_edit_auth_list', 'account_edit_login_setting'] : ['account_add_auth_list', 'account_add_login_setting']" :span="8">
+          <div v-is="doesAccountExist ? ['account_edit_auth_list'] : ['account_add_auth_list']" class="content-card">
+            <PermissionList title="权限列表" class="permission-list" :role-list="checkedRoles" :check="true" @Competen="Competen" />
+          </div>
+          <div v-is="doesAccountExist ? ['account_edit_login_setting'] : ['account_add_login_setting']" class="content-card">
+            <LoginPolicy :checked-list="loginPolicyCheckedList" @getCheckedList="getLoginPolicyChecked" />
+          </div>
+        </el-col>
+      </el-row>
+      <!-- 只开启用户组 -->
+      <el-row v-if="openGroup && !openRole" :gutter="24">
+        <el-col :span="8">
+          <div class="content-card">
+            <AccountGroupTree title="所属账号组" nodekey="GroupId" :default-props="accountGroupTreeProps" :checked-keys="accountGroupTreeCheckedList" @getTreeData="getAccountGroupChecked" />
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="content-card">
+            <PermissionTree title="权限树" :query-type="queryType" :query-ids="queryIds" :checked-keys="permissionTreeChckedKeys" @getTreeData="getPermissionTreeChecked" />
+          </div>
+        </el-col>
+        <el-col :span="8">
+          <div class="content-card">
+            <RulesOfCompetency title="权限规则" margin-b="20px" @getData="getRulesOfCompetency" />
+          </div>
+          <div v-is="doesAccountExist ? ['account_edit_login_setting'] : ['account_add_login_setting']" class="content-card">
+            <LoginPolicy :checked-list="loginPolicyCheckedList" @getCheckedList="getLoginPolicyChecked" />
+          </div>
+        </el-col>
+      </el-row>
+      <!-- 只开启角色 -->
+      <el-row v-if="!openGroup && openRole" :gutter="24">
+        <el-col v-is="doesAccountExist ? ['account_edit_role_list'] : ['account_add_role_list']" :span="12">
+          <div class="content-card">
+            <RoleList
+              title="角色列表"
+              :role-type="roleType"
+              :check-box-list="roleListCheckedList"
+              :number="6"
+              :active="true"
+              @checkChange="getRoleListChecked"
+              @checkClick="selectRole"
+              @roleListChange="roleListCheckedChange"
+            />
+          </div>
+        </el-col>
+        <el-col v-is="doesAccountExist ? ['account_edit_auth_list'] : ['account_add_auth_list']" :span="12">
+          <div class="content-card">
+            <PermissionList title="权限列表" :role-list="checkedRoles" :check="true" class="permission-list" @Competen="Competen" />
+          </div>
+        </el-col>
+        <!-- <el-col
+          v-is="doesAccountExist ? ['account_edit_login_setting'] : ['account_add_login_setting']"
+          :span="8"
+        >
+          <div class="content-card">
+            <LoginPolicy
+              :checked-list="loginPolicyCheckedList"
+              @getCheckedList="getLoginPolicyChecked"
+            />
+          </div>
+        </el-col> -->
+      </el-row>
+    </div>
+    <!-- <Dialog :flag="dialogVisible">
+      <div class="closeDialog">
+        <div class="title">删除账号</div>
+        <div class="content">是否确定要删除该账号?</div>
+        <div class="foot right t30">
+          <el-button
+            size="medium"
+            type="danger"
+            class="r24"
+          >删除</el-button>
+          <el-button size="medium">取消</el-button>
+        </div>
+      </div>
+    </Dialog> -->
+  </div>
+</template>
+
+<script>
+import AccountGroupTree from "@/components/usergrouptree/index.vue";
+import PermissionTree from "@/components/permissiontree/index.vue";
+import RulesOfCompetency from "@/components/rulesofcompetency/index.vue";
+import LoginPolicy from "@/components/loginpolicy/index.vue";
+import RoleList from "@/components/rolelist/index.vue";
+import PermissionList from "@/components/permissionlist/index.vue";
+// import Dialog from '@/layout/components/Dialog'
+
+import { RoleAuths } from "@/api/apiAuthority";
+import { getAccountDetails, editAccount, addAccount } from "@/api/Account.js";
+import { pwdProduce } from "@/utils/validate";
+import { mapGetters } from "vuex";
+
+export default {
+  components: {
+    AccountGroupTree,
+    PermissionTree,
+    RulesOfCompetency,
+    LoginPolicy,
+    RoleList,
+    PermissionList,
+    // Dialog
+  },
+  data() {
+    return {
+      doesAccountExist: this.$route.meta.doesAccountExist, // 控制账号新增/编辑
+      userId: "",
+      openRole: 0,
+      openGroup: 0,
+      pwdStruc: "",
+      pwdLengthBegin: 0,
+      pwdLengthEnd: 0,
+      permissionTreeChckedKeys: [], // 权限树初始勾选项
+      permissionTreeChckedTemp: [], // 权限树当前勾选项
+      rulesOfCompetency: null, // 当前编辑的权限规则
+      loginPolicyCheckedList: [], // 登录策略初始勾选项
+      loginPolicyCheckedTemp: [], // 登录策略当前勾选项
+      accountGroupTreeCheckedList: [], // 账号组树初始勾选项
+      accountGroupTreeCheckedTemp: [], // 账号组树当前勾选项
+      roleListCheckedList: [], // 角色列表初始勾选项
+      roleListCheckedTemp: [], // 角色列表当前勾选项
+      roleType: "",
+      queryType: "",
+      checkedRoles: [],
+      currentSelectedRoleId: 0,
+      groupIds: [],
+      queryIds: [],
+      // dialogVisible: false,
+      formRules: {
+        name: [
+          { required: true, message: "请输入账号名称", trigger: "blur" },
+          { min: 1, max: 32, message: "长度在 1到 32 个字符", trigger: "blur" },
+        ],
+        desc: [{ min: 1, max: 128, message: "长度最多128个字符", trigger: "blur" }],
+      },
+      accountForm: {
+        name: null,
+        pwd: null,
+        desc: null,
+        status: 0,
+      },
+      accountGroupTreeProps: {
+        children: "children",
+        label: "GroupName",
+      },
+    };
+  },
+  computed: {
+    ...mapGetters(["systemSet"]),
+    pageTitle() {
+      return this.doesAccountExist ? "编辑账号" : "新增账号";
+    },
+  },
+  created() {
+    // 获取系统配置
+    let obj;
+    if (typeof this.systemSet === "string") {
+      obj = JSON.parse(this.systemSet);
+    } else {
+      obj = this.systemSet;
+    }
+    // console.log(obj)
+    const { OpenRole, OpenGroup, PwdStruc, PwdLengthBegin, PwdLengthEnd } = obj;
+    this.openRole = OpenRole;
+    this.openGroup = OpenGroup;
+    this.pwdStruc = PwdStruc;
+    this.pwdLengthBegin = PwdLengthBegin;
+    this.pwdLengthEnd = PwdLengthEnd;
+  },
+  mounted() {
+    if (this.doesAccountExist) {
+      this.userId = this.$route.query.userId;
+      this.getAccountInfo();
+    } else {
+      this.resetPwd();
+      this.roleType = "onlyRole";
+      this.queryType = "all";
+    }
+  },
+  methods: {
+    // 获取当前账号信息
+    async getAccountInfo() {
+      try {
+        const res = await getAccountDetails({
+          UserId: this.userId,
+        });
+        if (res.code === 0) {
+          // console.log(res.returnData)
+          const { UserDesc, UserName, GroupList, TacList, AuthList, RoleList, Status } = res.returnData;
+          this.accountForm.name = UserName;
+          this.accountForm.desc = UserDesc;
+          this.accountForm.status = Status ?? 1;
+
+          AuthList &&
+            AuthList.length &&
+            AuthList.forEach((auth) => {
+              this.permissionTreeChckedKeys.push(auth.AuthId);
+              this.permissionTreeChckedTemp.push(auth);
+            });
+          if (GroupList && GroupList.length && GroupList[0] !== -1) {
+            this.roleType = this.openGroup ? "roleByUpId" : "onlyRole";
+            this.queryType = this.openGroup ? "group" : "all";
+            GroupList.forEach((group) => {
+              this.accountGroupTreeCheckedList.push(group.GroupId);
+              this.accountGroupTreeCheckedTemp.push(group.GroupId);
+              this.groupIds.push(group.GroupId);
+              this.queryIds.push(group.GroupId);
+            });
+          } else {
+            this.roleType = "onlyRole";
+            this.queryType = "all";
+            this.accountGroupTreeCheckedTemp.push(-1);
+          }
+
+          RoleList &&
+            RoleList.length &&
+            RoleList.forEach((role) => {
+              role.IsSelected && this.roleListCheckedTemp.push(role);
+            });
+          TacList &&
+            TacList &&
+            TacList.forEach((tac) => {
+              tac.IsSelected && this.loginPolicyCheckedList.push(tac);
+              tac.IsSelected && this.loginPolicyCheckedTemp.push(tac);
+            });
+        } else {
+          this.$message.error(res.message);
+        }
+      } catch (error) {
+        console.log("出错了", error.message || error);
+      }
+    },
+    // 随机生成密码
+    resetPwd() {
+      this.accountForm.pwd = pwdProduce(this.pwdLengthBegin, this.pwdLengthEnd, this.pwdStruc);
+    },
+    // 获取当前权限树勾选项
+    getPermissionTreeChecked(arr) {
+      this.permissionTreeChckedTemp = arr.map((auth) => auth.AuthList);
+    },
+    // 获取当前编辑的权限规则
+    getRulesOfCompetency(obj) {
+      this.rulesOfCompetency = obj;
+    },
+    // 获取当前勾选的登录策略
+    getLoginPolicyChecked(arr) {
+      this.loginPolicyCheckedTemp = arr;
+    },
+    // 获取当前勾选的账号组
+    getAccountGroupChecked(arr) {
+      if (arr && arr.length && arr[0] !== -1) {
+        const GroupIds = arr.map((item) => item.GroupId);
+        this.accountGroupTreeCheckedTemp = GroupIds;
+        this.roleType = "roleByUpId";
+        this.groupIds = GroupIds;
+        this.queryType = "group";
+        this.queryIds = GroupIds;
+      } else {
+        this.accountGroupTreeCheckedTemp = [-1];
+        this.roleType = "onlyRole";
+        this.queryType = "all";
+      }
+    },
+    // 获取当前勾选的角色列表
+    getRoleListChecked(arr) {
+      this.roleListCheckedTemp = arr;
+    },
+    roleListCheckedChange(arr) {
+      this.roleListCheckedTemp = this.roleListCheckedTemp.filter((role) => arr.some((data) => data.RoleId === role.RoleId));
+      this.roleListCheckedList = this.roleListCheckedTemp.map((role) => role.RoleId);
+    },
+    // 点击角色后显示对应权限列表
+    async selectRole(data) {
+      if (this.currentSelectedRoleId === data.RoleId) return;
+      try {
+        const params = {
+          RoleId: data.RoleId,
+        };
+        const result = await RoleAuths(params);
+        if (result.code === 0) {
+          this.checkedRoles = result.returnData;
+          this.currentSelectedRoleId = data.RoleId;
+        } else {
+          this.$message.error(result.message);
+        }
+      } catch (error) {
+        console.log("出错了", error.message || error);
+      }
+    },
+    // 修改权限规则
+    Competen(data) {
+      console.log(data);
+    },
+    // 账号编辑保存
+    handleClickSave(formName) {
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          this.handleSaveEdit();
+        } else {
+          console.log("error submit!!");
+          return false;
+        }
+      });
+    },
+    handleSaveEdit() {
+      const params = {
+        AuthList: this.permissionTreeChckedTemp,
+        GroupList: this.accountGroupTreeCheckedTemp.map((groupId) => ({ GroupId: groupId })),
+        RoleList: this.roleListCheckedTemp,
+        TacList: this.loginPolicyCheckedTemp,
+        UserDesc: this.accountForm.desc,
+        UserName: this.accountForm.name,
+        UserPwd: this.accountForm.pwd,
+      };
+      if (this.doesAccountExist) {
+        this.saveEditAccount({
+          ...params,
+          UserId: this.userId,
+          Status: this.accountForm.status,
+        });
+      } else {
+        this.saveAddAccount(params);
+      }
+    },
+    // 编辑账号
+    async saveEditAccount(params) {
+      try {
+        const res = await editAccount(params);
+        if (res.code === 0) {
+          this.$message.success(res.message);
+          setTimeout(() => {
+            this.$store.dispatch("tagsView/delView", this.$route);
+            this.$router.push("/account");
+          }, 1000);
+        } else {
+          this.$message.error(res.message);
+        }
+      } catch (error) {
+        console.log("出错了", error.message || error);
+      }
+    },
+    // 新增账号
+    async saveAddAccount(params) {
+      try {
+        const res = await addAccount(params);
+        if (res.code === 0) {
+          this.$message.success(res.message);
+          setTimeout(() => {
+            this.$store.dispatch("tagsView/delView", this.$route);
+            this.$router.push("/account");
+          }, 1000);
+        } else {
+          this.$message.error(res.message);
+        }
+      } catch (error) {
+        console.log("出错了", error.message || error);
+      }
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.account-edit {
+  padding: 23px 24px;
+  .account-edit-header {
+    box-sizing: border-box;
+    width: 100%;
+    margin-bottom: 24px;
+    border-radius: 4px;
+    padding: 24px 32px 32px 24px;
+    background-color: #fff;
+    .title {
+      display: flex;
+      justify-content: space-between;
+      flex-direction: row;
+      position: relative;
+      .manageTitle {
+        line-height: 30px;
+      }
+      .account-status {
+        flex: 1;
+        line-height: 32px;
+        font-family: Microsoft YaHei;
+        color: #303133;
+        ::v-deep .el-radio-group {
+          margin-left: 16px;
+          .el-radio__label {
+            font-family: Microsoft YaHei;
+            color: #303133;
+          }
+        }
+      }
+      .title-left {
+        font-size: 24px;
+        font-weight: bold;
+        color: #303133;
+      }
+      .btn-save {
+        width: 64px;
+        height: 32px;
+        border: none;
+        font-weight: 400;
+        font-size: 14px;
+      }
+      .btn-delete {
+        width: 64px;
+        height: 32px;
+        background: #f56c6c;
+        border: none;
+        margin-right: 24px;
+      }
+    }
+    .title-content {
+      width: 100%;
+      padding-top: 24px;
+      box-sizing: border-box;
+      .btn-reset-pwd {
+        width: 81px;
+        height: 32px;
+        padding: 0;
+        border: none;
+        text-align: center;
+        font-weight: 400;
+        border-radius: 2px;
+        font-size: 14px;
+      }
+      ::v-deep .el-form {
+        height: 32px;
+        display: flex;
+        .el-form-item {
+          margin-bottom: 0;
+          vertical-align: middle;
+          &:nth-child(1) {
+            margin-right: 79px;
+          }
+          &:nth-child(2) {
+            margin-right: 16px;
+          }
+          &:nth-child(3) {
+            margin-right: 80px;
+          }
+          &:nth-last-child(1) {
+            margin-right: 0;
+            flex: 1;
+            display: flex;
+            .el-form-item__content {
+              flex: 1;
+            }
+          }
+          .el-form-item__label {
+            padding-right: 16px;
+            height: 32px;
+            line-height: 32px;
+          }
+          .el-form-item__content {
+            height: 32px;
+            line-height: 32px;
+          }
+        }
+        .el-input__inner {
+          height: 32px;
+          line-height: 32px;
+          min-width: 240px;
+          background: #ffffff;
+          border: 1px solid #d2d6df;
+          border-radius: 2px;
+        }
+      }
+    }
+  }
+  .account-edit-main {
+    box-sizing: border-box;
+    ::v-deep .el-empty {
+      padding: 0;
+    }
+    .content-card {
+      width: 100%;
+      height: calc(100vh - 294px);
+      min-height: 300px;
+      max-height: 786px;
+      overflow: hidden;
+    }
+    .img-onlyRead {
+      pointer-events: none;
+    }
+    .last {
+      display: flex;
+      flex-direction: column;
+      justify-content: space-between;
+    }
+  }
+}
+</style>

+ 564 - 0
src/views/accountGroupManagement/components/accountHome.vue

@@ -0,0 +1,564 @@
+<template>
+  <div class="account-home">
+    <div class="account-header">
+      <div class="status flex-wrap">
+        <div class="manageTitle">账号组管理</div>
+      </div>
+      <Search :is-slot="true" :is-title="false" @getSearchData="getSearchData" @clearSearchData="clearSearchData">
+        <el-button class="btnAdd" @click="addAccount">新增</el-button>
+      </Search>
+    </div>
+    <div class="content-box scrollbar">
+      <template v-if="accountArr.length">
+        <el-row v-infinite-scroll="load" :infinite-scroll-disabled="disabled" :infinite-scroll-distance="20" :gutter="24">
+          <el-col v-for="(account, index) in accountArr" :key="index" :xs="24" :sm="12" :md="8" :lg="4" class="account-box">
+            <div class="account-box-wrap">
+              <div class="headOnline" />
+              <div>
+                <div class="nameBox flex">
+                  <div class="flex-wrap">
+                    <div class="name">{{ account.user_name }}</div>
+                    <div class="loger" @click="toEdit(account.user_id)" />
+                  </div>
+                  <div class="del" @click="deleteUser(account)">
+                    <i class="el-icon-close" />
+                  </div>
+                </div>
+
+                <!-- <el-row>
+                  <el-col :span="24">{{ account.group }}</el-col>
+                </el-row>
+
+                <el-row class="content">
+                  <el-col :span="12">登录次数:<span>{{ account.LoginCount }}</span></el-col>
+                  <el-col :span="12" class="flexLeft">异常登录:<span>{{ account.ExceptionCount }}</span></el-col>
+                </el-row> -->
+                <el-row class="content">
+                  <el-col :span="24"
+                    >账号数:<span>{{ account.AuthCount }}</span></el-col
+                  >
+                </el-row>
+              </div>
+            </div>
+          </el-col>
+        </el-row>
+        <template v-if="pages > 1">
+          <p v-if="loading" class="center">加载中...</p>
+          <p v-if="noMore" class="center">没有更多数据了~</p>
+        </template>
+      </template>
+      <template v-else>
+        <NoData />
+      </template>
+    </div>
+    <Dialog :flag="dialogVisible">
+      <div class="del-dialog">
+        <div class="title del-title">删除账号组</div>
+        <div class="content del-content">
+          <i class="el-icon-error error r10" />你确定要删除<span class="error l10">{{ deleteUserName }}</span
+          >?
+        </div>
+        <div class="foot Delfoot right t30">
+          <el-button size="medium" type="danger" class="r24" @click="del()">删除</el-button>
+
+          <el-button size="medium" @click="dialogVisible = false">取消</el-button>
+        </div>
+      </div>
+    </Dialog>
+    <!--新增/编辑-->
+    <Dialog :flag="editDialogVisible" width="508px" :show-flag="true">
+      <div class="airportInfoDialog dialog-public-background">
+        <div class="title">{{ editDialogTitle }}</div>
+        <div class="content">
+          <!-- <div class="ruleZf">特殊字符:`、!、@、#、$、%、^、&、*、(、)、_、+、{、}、"、:、?、>、&lt;、`、,、.、/、'、;、[、]、=、-、\、|</div> -->
+          <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="130px" class="demo-ruleForm">
+            <el-form-item label="账号组名称" prop="user_name">
+              <el-input v-model="ruleForm.user_name" size="medium" placeholder="请输入账号组名称" />
+            </el-form-item>
+            <el-form-item label="描述" prop="user_comment">
+              <el-input v-model="ruleForm.user_comment" size="medium" type="textarea" :rows="3" placeholder="请输入描述" />
+            </el-form-item>
+          </el-form>
+        </div>
+        <div class="foot center t30">
+          <el-button size="medium" type="primary" class="r25 r26" @click="submitClickHandler()">提交</el-button>
+          <el-button size="medium" class="r26" @click="resetForm('ruleForm')">取消</el-button>
+        </div>
+      </div>
+    </Dialog>
+  </div>
+</template>
+
+<script>
+import Search from "@/layout/components/Search";
+import Dialog from "@/layout/components/Dialog";
+import NoData from "@/components/nodata";
+import { GetAccountList, ChangeUserStatus, delAccount, getAccountDetails, editAccount, addAccount } from "@/api/Account";
+import { pwdProduce } from "@/utils/validate";
+import { mapGetters } from "vuex";
+import { GeneralDataReception, Query } from "@/api/dataIntegration";
+import MD5 from "blueimp-md5";
+export default {
+  components: { Search, Dialog, NoData },
+  data() {
+    return {
+      pwdStruc: "",
+      pwdLengthBegin: 0,
+      pwdLengthEnd: 0,
+      dialogVisible: false,
+      accountArr: [],
+      deleteUserId: "",
+      deleteUserName: "",
+      userId: "",
+      GroupId: "",
+      GroupUpid: "",
+      searchInfo: "", // 搜索内容
+      PageIndex: 1,
+      PageSize: 20,
+      pages: null,
+      loading: false,
+      editDialogVisible: false,
+      editDialogTitle: "新增账号组",
+      editType: "add",
+      ruleForm: {
+        // 协议信息表单
+        user_name: "",
+        user_status: "",
+        user_comment: "",
+        user_pwd: "",
+      },
+      rules: {
+        // 协议信息表单验证
+        user_name: [{ required: true, message: "请输入账号组名称", trigger: "blur" }],
+      },
+      ruleFormObj: {},
+      roleId: "",
+      msgIndex: null,
+      oldPwd: "",
+    };
+  },
+  computed: {
+    ...mapGetters(["systemSet"]),
+    noMore() {
+      return this.PageIndex >= this.pages;
+    },
+    disabled() {
+      return this.loading || this.noMore;
+    },
+  },
+  watch: {
+    searchInfo(val) {
+      val.length === 0 && this.pageInit();
+    },
+  },
+  created() {
+    // 获取系统配置
+    // if (this.systemSet) {
+    //   let obj
+    //   if (typeof this.systemSet === 'string') {
+    //     obj = JSON.parse(this.systemSet)
+    //   } else {
+    //     obj = this.systemSet
+    //   }
+    //   // console.log(obj)
+    //   const { PwdStruc, PwdLengthBegin, PwdLengthEnd } = obj
+    //   this.pwdStruc = PwdStruc
+    //   this.pwdLengthBegin = PwdLengthBegin
+    //   this.pwdLengthEnd = PwdLengthEnd
+    // }
+    if (!this.searchInfo) {
+      this.accountList();
+    } else {
+      console.log(this.searchInfo);
+      this.accountList();
+    }
+  },
+  methods: {
+    // 随机生成密码
+    resetPwd() {
+      this.ruleForm.PassWord = pwdProduce(this.pwdLengthBegin, this.pwdLengthEnd, this.pwdStruc);
+    },
+    // 编辑账号
+    async saveEditAccount() {
+      try {
+        if (this.oldPwd !== this.ruleForm.user_pwd) {
+          this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd);
+        }
+        const res = await GeneralDataReception({
+          serviceId: SERVICE_ID.accountScId,
+          dataContent: JSON.stringify(this.ruleForm),
+        });
+        if (res.code == 0) {
+          this.$message.success(res.message);
+          this.resetForm("ruleForm");
+          this.pageInit();
+        } else {
+          this.$message.error(res.message);
+        }
+      } catch (error) {
+        console.log("出错了", error.message || error);
+      }
+    },
+    // 新增账号
+    async saveAddAccount() {
+      try {
+        this.ruleForm.user_pwd = MD5(this.ruleForm.user_pwd);
+        const res = await GeneralDataReception({
+          serviceId: SERVICE_ID.accountScId,
+          dataContent: JSON.stringify(this.ruleForm),
+        });
+        if (res.code == 0) {
+          this.$message.success(res.message);
+          this.resetForm("ruleForm");
+          this.pageInit();
+        } else {
+          this.$message.error(res.message);
+        }
+      } catch (error) {
+        console.log("出错了", error.message || error);
+      }
+    },
+    // 获取当前账号信息
+    async getAccountInfo() {
+      const res = await Query({
+        id: DATACONTENT_ID.accountDetailsId,
+        dataContent: [this.roleId],
+      });
+      if (res.code == 0) {
+        const { listValues } = res.returnData;
+        const obj = listValues[0];
+        this.ruleForm = obj;
+        this.oldPwd = obj.user_pwd;
+        this.ruleForm.event = 2;
+      } else {
+        this.$message.error(res.message);
+      }
+    },
+    // 新增/编辑-确认
+    submitClickHandler() {
+      this.$refs["ruleForm"].validate((valid) => {
+        if (valid) {
+          if (this.editType == "add") {
+            this.saveAddAccount();
+          } else {
+            this.saveEditAccount();
+          }
+          this.editDialogVisible = false;
+        } else {
+          return false;
+        }
+      });
+    },
+    // 滚动加载
+    load() {
+      this.PageIndex += 1;
+      this.accountList();
+    },
+    // 回到第一页
+    pageInit() {
+      this.PageIndex = 1;
+      this.accountArr = [];
+      this.accountList();
+    },
+    // 查询
+    getSearchData(val) {
+      this.searchInfo = val;
+      this.pageInit();
+    },
+
+    // 清除查询
+    clearSearchData() {
+      this.searchInfo = "";
+      this.pageInit();
+    },
+    // 修改状态
+    async userActiveToggle(item) {
+      item.event = 2;
+      item.user_status = item.Flag ? 2 : 0;
+      try {
+        const result = await GeneralDataReception({
+          serviceId: SERVICE_ID.accountScId,
+          dataContent: JSON.stringify(item),
+        });
+        if (result.code == 0) {
+          this.pageInit();
+          this.$message.success(result.message);
+        } else {
+          this.$message.error(result.$message);
+        }
+      } catch (error) {
+        console.log("出错了", error.message || error);
+      }
+    },
+    deleteUser(user) {
+      this.dialogVisible = true;
+      this.deleteUserName = user.user_name;
+      this.ruleFormObj = user;
+    },
+    toEdit(userId) {
+      this.editDialogVisible = true;
+      this.editType = "edit";
+      this.editDialogTitle = "编辑账号组";
+      this.roleId = userId;
+      this.getAccountInfo();
+    },
+    addAccount() {
+      this.editDialogTitle = "新增账号组";
+      this.editDialogVisible = true;
+      this.editType = "add";
+      this.ruleForm = {};
+      this.ruleForm.event = 1;
+      // this.$router.push({
+      //   path: '/account/accountAdd'
+      // })
+    },
+    // 重置
+    resetForm(formName) {
+      this.$refs[formName].resetFields();
+      this.editDialogVisible = false;
+    },
+    // 获取列表
+    async accountList() {
+      try {
+        this.loading = true;
+        const result = await Query({
+          id: DATACONTENT_ID.accountTableId,
+          needPage: this.PageIndex,
+          dataContent: [this.searchInfo],
+        });
+        if (result.code == 0) {
+          this.loading = false;
+          const newDatas = result.returnData.listValues;
+          if (newDatas && newDatas.length) {
+            this.pages = result.returnData.pages;
+            newDatas.forEach((element) => {
+              element.Flag = element.user_status == 1 || element.user_status == 2 ? true : false;
+              this.accountArr.push(element);
+            });
+            this.msgIndex = this.PageIndex;
+          } else {
+            this.pages = this.msgIndex;
+            this.PageIndex = this.msgIndex;
+          }
+        } else {
+          this.$message.error(result.message);
+        }
+      } catch (error) {
+        console.log("出错了", error.message || error);
+      }
+    },
+
+    // 删除接口
+    async del() {
+      this.ruleFormObj.event = 3;
+      const result = await GeneralDataReception({
+        serviceId: SERVICE_ID.accountScId,
+        dataContent: JSON.stringify(this.ruleFormObj),
+      });
+      if (result.code == 0) {
+        this.dialogVisible = false;
+        this.$message.success(result.message);
+        this.pageInit();
+      } else if (result.code == -1) {
+        this.$message.error("后端错误,稍后请重试");
+      } else {
+        this.$message.success(result.message);
+      }
+    },
+
+    // 账号权限
+    authAccount(item) {
+      this.roleId = item.user_id;
+      this.$router.push({
+        path: "/account/accountAuth",
+        query: { userId: this.roleId },
+      });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.account-home {
+  padding: 16px 32px 32px 32px;
+  .account-header {
+    margin-bottom: 30px;
+    line-height: 32px;
+    width: 100%;
+    display: flex;
+    justify-content: space-between;
+    .btn-add {
+      width: 120px;
+      height: 48px;
+      background: #f5f7fa;
+      border: 1px solid #b4b7cb;
+      box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
+      border-radius: 6px;
+      font-size: 16px;
+      font-weight: bold;
+      color: #6f81bc;
+    }
+    .status {
+      align-items: center;
+      .icon {
+        width: 14px;
+        height: 14px;
+        background: #2d67e3;
+        border-radius: 2px;
+        display: inline-block;
+        vertical-align: middle;
+        margin-right: 10px;
+        position: relative;
+        top: -2px;
+      }
+      &:last-child {
+        margin-right: 0;
+      }
+      .status2 {
+        margin: 0 28px;
+        .icon {
+          background: #eb2f3b;
+        }
+      }
+      .status3 {
+        .icon {
+          background: #afb4bf;
+        }
+      }
+    }
+  }
+  .content-box {
+    height: calc(100vh - 256px);
+    overflow-y: auto;
+    overflow-x: hidden;
+    @media only screen and (min-width: 1920px) {
+      .el-col-xl-4-8 {
+        width: 20%;
+      }
+    }
+    .account-box {
+      margin-bottom: 24px;
+      .account-box-wrap {
+        position: relative;
+        padding: 24px;
+        background: #ffffff;
+        box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.1);
+        border-radius: 4px;
+        overflow: hidden;
+      }
+      .headOffline {
+        width: 100%;
+        height: 4px;
+        background: #f25555;
+        box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
+        border-radius: 4px;
+        position: absolute;
+        left: 0;
+        top: 0;
+      }
+      .headOnline {
+        background: #2d67e3;
+        width: 100%;
+        height: 4px;
+        box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
+        border-radius: 4px;
+        position: absolute;
+        left: 0;
+        top: 0;
+      }
+      .headDisabled {
+        background: #cfd6e2;
+        width: 100%;
+        height: 4px;
+        box-shadow: 0px 6px 7px 0px rgba(0, 0, 0, 0.06);
+        border-radius: 4px;
+        position: absolute;
+        left: 0;
+        top: 0;
+      }
+      .el-row {
+        margin: 8px 0;
+      }
+      .flexLeft {
+        display: flex;
+        justify-content: flex-end;
+        flex-direction: row;
+      }
+
+      .del {
+        cursor: pointer;
+        i {
+          font-size: 14px;
+          font-weight: 600;
+          color: #606266;
+        }
+      }
+      .nameBox {
+        display: flex;
+        .name {
+          font-size: 16px;
+          font-weight: bold;
+          color: #303133;
+          max-width: 120px;
+          white-space: nowrap;
+          overflow: hidden;
+          text-overflow: ellipsis;
+        }
+        .loger {
+          width: 14px;
+          height: 14px;
+          margin-left: 24px;
+          background: url("../../../assets/status/ic_edit_default.png") no-repeat;
+          background-size: 100% 100%;
+          cursor: pointer;
+        }
+        .loger:hover {
+          background: url("../../../assets/status/ic_edit_hovar.png") no-repeat;
+          background-size: 100% 100%;
+        }
+        .cap-auth {
+          margin-left: 12px;
+          background-image: url("../../../assets/status/ic_edit_authorization.png");
+          &:hover {
+            background-image: url("../../../assets/status/ic_edit_authorization_hover.png");
+          }
+        }
+      }
+
+      .content {
+        margin-top: 40px;
+        font-size: 14px;
+        margin-bottom: 0;
+      }
+      .used {
+        font-size: 14px;
+        font-weight: 400;
+        color: #2d67e3;
+      }
+      span {
+        font-size: 16px;
+        font-weight: 400;
+        color: #909399;
+      }
+    }
+  }
+  .del-dialog {
+    .del-content {
+      font-size: 16px;
+      font-family: Microsoft YaHei;
+      font-weight: 400;
+      color: #101611;
+      .el-icon-error {
+        vertical-align: sub;
+        font-size: 26px;
+      }
+    }
+  }
+  .ruleZf {
+    padding-left: 60px;
+    line-height: 2;
+    margin-bottom: 22px;
+    color: #101611;
+  }
+}
+</style>

+ 16 - 0
src/views/accountGroupManagement/components/accountHome_TABLE.vue

@@ -0,0 +1,16 @@
+<template>
+  <div>
+    <DataTable data-id="14" :rows="12" labelWidth="100px" />
+  </div>
+</template>
+
+<script>
+import DataTable from '@/components/Table'
+export default {
+  name: 'Account',
+  components: { DataTable },
+}
+</script>
+
+<style>
+</style>

+ 14 - 0
src/views/accountGroupManagement/index.vue

@@ -0,0 +1,14 @@
+<!--
+ * @Author: Badguy
+ * @Date: 2022-02-17 16:08:29
+ * @LastEditTime: 2022-02-21 10:58:55
+ * @LastEditors: your name
+ * @Description: 账号管理
+ * have a nice day!
+-->
+
+<template>
+  <div class="accountManagement">
+    <router-view />
+  </div>
+</template>

+ 1 - 1
src/views/authorityManagement/components/authorityRoleEdit.vue

@@ -165,7 +165,7 @@ export default {
       this.msgArrs.push(arr);
       const data1 = this.msgArrs[this.msgArrs.length - 1]; //最后一条数据
       const data2 = this.msgArrs[this.msgArrs.length - 2]; //倒数第二条数据
-      if (data1.length >= data2.length) {
+      if (data1.length > data2.length) {
         this.checksBoxTs(arr, "add");
       } else {
         this.checksBoxTs(arr, "del");

+ 2 - 2
src/views/authorityManagement/minixs/treeData.js

@@ -23,8 +23,8 @@ export default {
     async getAuthTree() {
       try {
         const result = await Query({
-          id: DATACONTENT_ID.authTreeId,
-          dataContent: [this.searchinfo],
+          id: DATACONTENT_ID.authTreeNewId,
+          dataContent: [sessionStorage.getItem("User_Id")],
         });
         if (result.code == 0 && result.returnData.listValues) {
           const obj = {