Kaynağa Gözat

分组的分配成员部分完成

yxc 2 yıl önce
ebeveyn
işleme
b859e3d0e5

BIN
src/assets/img/Rectangle-431.png


+ 1 - 118
src/router/index.js

@@ -30,7 +30,6 @@ import Layout from '@/layout'
 
 // 公共路由
 export const constantRoutes = [{
-<<<<<<< HEAD
     path: '/redirect',
     component: Layout,
     hidden: true,
@@ -218,123 +217,7 @@ export const constantRoutes = [{
     hidden: true,
   },
 ]
-=======
-  path: '/redirect',
-  component: Layout,
-  hidden: true,
-  children: [{
-    path: '/redirect/:path(.*)',
-    component: () => import('@/views/redirect')
-  }]
-}, {
-  path: '/login',
-  component: () => import('@/views/login'),
-  hidden: true
-}, {
-  path: '/register',
-  component: () => import('@/views/register'),
-  hidden: true
-}, {
-  path: '/404',
-  component: () => import('@/views/error/404'),
-  hidden: true
-}, {
-  path: '/401',
-  component: () => import('@/views/error/401'),
-  hidden: true
-}, {
-  path: '',
-  component: Layout,
-  redirect: 'index',
-  children: [{
-    path: 'index',
-    component: () => import('@/views/index'),
-    name: 'Index',
-    meta: {
-      title: '首页',
-      icon: 'dashboard',
-      affix: true
-    }
-  }]
-}, {
-  path: '/user',
-  component: Layout,
-  hidden: true,
-  redirect: 'noredirect',
-  children: [{
-    path: 'profile',
-    component: () => import('@/views/system/user/profile/index'),
-    name: 'Profile',
-    meta: {
-      title: '个人中心',
-      icon: 'user'
-    }
-  }]
-}, {
-  path: '/home',
-  component: () => import('@/views1/HomeView.vue'),
-  hidden: true,
-  children: [{
-    path: "/home/page",
-    component: () => import('@/views1/Page/PageView.vue')
-  }, {
-    path: "/home/retrieval",
-    component: () => import('@/views1/Retrieval/RetrievalView.vue')
-  }, {
-    path: "/home/retrieval/list",
-    component: () => import('@/views1/Retrieval/List/ListView.vue')
-  }, {
-    path: "/home/file",
-    component: () => import('@/views1/File/FileView.vue')
-  }, {
-    path: "/home/file/part",
-    component: () => import('@/views1/File/Part/PartView.vue')
-  }, {
-    path: "/home/file/publi",
-    component: () => import('@/views1/File/Publi/PublicView.vue')
-  }, {
-    path: "/home/file/individual",
-    component: () => import('@/views1/File/Individual/IndividualView.vue')
-  }, {
-    path: "/home/file/set",
-    component: () => import('@/views1/File/Set/SetView.vue')
-  }, {
-    path: "/home/personal",
-    component: () => import('@/views1/Personal/PersonalView.vue')
-  }, {
-    path: "/home/personal/classify",
-    component: () => import('@/views1/Personal/Classify/ClassifyView.vue')
-  }, {
-    path: "/home/personal/space",
-    component: () => import('@/views1/Personal/Space/SpaceView.vue')
-  }, {
-    path: "/home/personal/modify",
-    component: () => import('@/views1/Personal/Modify/ModifyView.vue')
-  }, {
-    path: "/home/system",
-    component: () => import('@/views1/System/SystemView.vue')
-  }, {
-    path: "/home/system/organization",
-    component: () => import('@/views1/System/Organization/OrganizationView.vue')
-  }, {
-    path: "/home/system/user",
-    component: () => import('@/views1/System/User/UserView.vue')
-  }, {
-    path: "/home/system/authority",
-    component: () => import('@/views1/System/Authority/AuthorityView.vue')
-  }, {
-    path: "/home/system/notes",
-    component: () => import('@/views1/System/Notes/NotesView.vue')
-  }, {
-    path: "/home/system/space",
-    component: () => import('@/views1/System/Space/SpaceView.vue')
-  }],
-}, {
-  path: '/login1',
-  component: () => import('@/views1/LoginView.vue'),
-  hidden: true,
-}, ]
->>>>>>> 3c521e5fc8e805fdf1ee9d1b439275dd81d08d7c
+
 
 // 动态路由,基于用户权限动态去加载
 export const dynamicRoutes = [{

+ 25 - 51
src/views1/Group/Groups/GroupsView.vue

@@ -168,7 +168,8 @@
           :title="title"
           :visible.sync="open"
           width="500px"
-          append-to-body
+          
+          custom-class="el-dialog1"
         >
           <el-form ref="form" :model="form" :rules="rules" label-width="130px">
             <el-form-item label="分组名称" prop="groupName">
@@ -181,12 +182,12 @@
                 @click.native="select()"
               />  
             </el-form-item>
-            <el-form-item label="分组管理员姓名" prop="groupManagerName">
+            <!-- <el-form-item label="分组管理员姓名" prop="groupManagerName">
               <el-input
                 v-model="form.groupManagerName"
                 placeholder="请输入分组管理员姓名"
               />
-            </el-form-item>
+            </el-form-item> -->
             <el-form-item label="备注" prop="remark">
               <el-input v-model="form.remark" placeholder="请输入备注" />
             </el-form-item>
@@ -197,18 +198,7 @@
           </div>
         </el-dialog>
 
-
-        <!-- 添加分组管理员 -->
-        <div class="open1" v-if="opan">
-          <el-button icon="el-icon-close" @click="opan = false" circle class="el-close" size="mini"></el-button>
-          <div class="open1-main">
-
-          </div>
-          <span slot="footer" class="dialog-footer">
-          <el-button @click="opan = false">确 定</el-button>
-          <el-button @click="opan = false">取 消</el-button>
-  </span>
-        </div>
+        <select-user ref="select" :groupId="queryParams.groupId" @ok="handleQuery" />
 
       </div>
     </div>
@@ -216,6 +206,8 @@
 </template>
     
 <script>
+import selectUser from "./selectUser";
+
 import {
   listGroup,
   getGroup,
@@ -226,10 +218,11 @@ import {
 
 export default {
   name: "Group",
+   components: {
+      selectUser
+    },
   data() {
     return {
-       //添加分组管理员
-       opan:true,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -268,8 +261,14 @@ export default {
   methods: {
     // 分组管理员
     select(){
-      this.opan=true
+      this.$refs.select.show();
     },
+    
+//接收子组件内传递过来的数据进行处理
+  handleQuery (ids) {
+      this.queryParams.pageNum = 1;
+      this.getList();
+  },
 
     /** 查询分组列表 */
     getList() {
@@ -442,35 +441,7 @@ export default {
         background: transparent;
         overflow: auto;
       }
-      .open1{
-        width: calc(100vw * (900 / 1920));
-        height: calc(100vh * (800 / 1080));
-        background: url(../../../assets/img/Group-585.png);
-        background-size: calc(100vw * (900 / 1920)) calc(100vh * (800 / 1080));
-        position: absolute;
-        top: 5%;
-        left: 25%;
-        z-index: 99999999;
-        .el-close{
-         position: absolute;
-         right: 50px;
-         top: 55px; 
-         background: transparent !important;
-         border: 1px solid #02C2E3FF;
-        }
-        .open1-main{
-        width: calc(100vw * (700 / 1920));
-        height: calc(100vh * (600 / 1080));
-        background: salmon;
-        margin-top: calc(100vh * (80 / 1080));
-        margin-left: calc(100vw * (90 / 1920));
-        }
-        .dialog-footer{
-         position: absolute;
-         right: 50px;
-         bottom: 35px;
-        }
-      }
+    
     }
     //滚动条样式
     //   ::-webkit-scrollbar {
@@ -557,15 +528,18 @@ export default {
 ::v-deep .el-dialog__title {
     color: white;
 } 
-::v-deep .el-dialog{
+::v-deep .el-dialog1{
   width: calc(100vw * (750 / 1920)) !important;
-  height: calc(100vh * (750 / 1080)) !important;
+  height: calc(100vh * (650 / 1080)) !important;
   background: url(../../../assets/img/Group-585.png);
-  background-size: calc(100vw * (750 / 1920)) calc(100vh * (750 / 1080));
+  background-size: calc(100vw * (750 / 1920)) calc(100vh * (650 / 1080));
   padding-top: calc(100vh * (50 / 1080));
 }
 </style>
  
   
   
-  
+
+
+
+    

+ 293 - 0
src/views1/Group/Groups/selectUser.vue

@@ -0,0 +1,293 @@
+
+<template>
+  <!-- 授权用户 -->
+  <el-dialog
+    title="添加分组管理员"
+    :visible.sync="open"
+    width="800px"
+    top="5vh"
+    append-to-body
+    custom-class="el-dialog2"
+  >
+   <div class="dialog-main">
+  <el-row :gutter="20">
+  <!--部门数据-->
+  <el-col :span="6" :xs="24">
+    <div class="head-container">
+      <el-input
+        v-model="deptName"
+        placeholder="请输入部门名称"
+        clearable
+        size="small"
+        prefix-icon="el-icon-search"
+        style="margin-bottom: 20px"
+      />
+    </div>
+    <div class="head-container">
+      <el-tree
+        :data="deptOptions"
+        :props="defaultProps"
+        :expand-on-click-node="false"
+        :filter-node-method="filterNode"
+        ref="tree"
+        node-key="id"
+        default-expand-all
+        highlight-current
+        @node-click="handleNodeClick"
+      />
+    </div>
+  </el-col>
+ <!--用户数据-->
+ <el-col :span="18" :xs="24">
+   <el-form
+     :model="queryParams"
+     ref="queryForm"
+     size="small"
+     :inline="true"
+   >
+     <el-form-item label="用户名称" prop="userName">
+       <el-input
+         v-model="queryParams.userName"
+         placeholder="请输入用户名称"
+         clearable
+         @keyup.enter.native="handleQuery"
+       />
+     </el-form-item>
+    
+     <el-form-item>
+       <el-button
+         type="primary"
+         icon="el-icon-search"
+         size="mini"
+         @click="handleQuery"
+         class="aaa"
+         >搜索</el-button
+       >
+       <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" class="bbb"
+         >重置</el-button
+       >
+     </el-form-item>
+   </el-form>
+
+   <el-table
+     v-loading="loading"
+     :data="userList"
+     @selection-change="handleSelectionChange"
+   >
+     <el-table-column type="selection" width="50" align="center" />
+    
+     <el-table-column
+       label="用户名称"
+       align="center"
+       key="userName"
+       prop="userName"
+       v-if="columns[1].visible"
+       :show-overflow-tooltip="true"
+     />
+     <el-table-column
+       label="用户昵称"
+       align="center"
+       key="nickName"
+       prop="nickName"
+       v-if="columns[2].visible"
+       :show-overflow-tooltip="true"
+     />
+     <el-table-column
+       label="部门"
+       align="center"
+       key="deptName"
+       prop="dept.deptName"
+       v-if="columns[3].visible"
+       :show-overflow-tooltip="true"
+     />
+   </el-table>
+
+   <pagination
+     v-show="total > 0"
+     :total="total"
+     :page.sync="queryParams.pageNum"
+     :limit.sync="queryParams.pageSize"
+     @pagination="getList"
+   />
+ </el-col>
+</el-row>
+<div slot="footer" class="dialog-footer">
+ <el-button  @click="open = false">确 定</el-button>
+ <el-button @click="open = false">取 消</el-button>
+</div>
+   </div>
+  </el-dialog>
+</template>
+ 
+<script>
+import { unallocatedUserList, groupUserSelectAll } from "@/api/doc/groupUser";
+
+export default {
+  dicts: ['sys_normal_disable'],
+  props: {
+    // 角色编号
+    groupId: {
+      type: [String]
+    }
+  },
+  data() {
+    return {
+      open:true,
+      // 遮罩层
+      visible: false,
+      // 选中数组值
+      userIds: [],
+      // 总条数
+      total: 0,
+      // 未授权用户数据
+      userList: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        groupId: undefined,
+        // userName: undefined,
+        // phonenumber: undefined
+      }
+    };
+  },
+  methods: {
+    // 显示弹框
+    show() {
+      console.log(this.queryParams)
+      this.queryParams.groupId = parseInt(this.groupId);
+      this.getList();
+      this.visible = true;
+    },
+    clickRow(row) {
+      this.$refs.table.toggleRowSelection(row);
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.userIds = selection.map(item => item.userId);
+    },
+    // 查询表数据
+    getList() {
+      unallocatedUserList(this.queryParams).then(res => {
+        this.userList = res.rows;
+        this.total = res.total;
+      });
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    /** 选择授权用户操作 */
+    handleSelectUser() {
+      const groupId = this.queryParams.groupId;
+      const userIds = this.userIds.join(",");
+      if (userIds == "") {
+        this.$modal.msgError("请选择要分配的用户");
+        return;
+      }
+      authUserSelectAll({ groupId: groupId, userIds: userIds }).then(res => {
+        this.$modal.msgSuccess(res.msg);
+        if (res.code === 200) {
+          this.visible = false;
+          this.$emit("ok");
+        }
+      });
+    }
+  }
+};
+</script>
+
+<style scoped lang='scss'>
+//弹窗样式
+::v-deep .el-dialog2{
+  width: calc(100vw * (1000 / 1920)) !important;
+  height: calc(100vh * (850 / 1080)) !important;
+  background: url(../../../assets/img/Group-585.png);
+  background-size: calc(100vw * (1000 / 1920)) calc(100vh * (850 / 1080));
+
+  .el-dialog__headerbtn {
+    top: 3%;
+    right: 4%;
+    font-size: 20px;
+  }
+  .dialog-main{
+  width: calc(100vw * (815 / 1920));
+  height: calc(100vh * (820 / 1080));
+  // background: salmon;
+  margin-left: calc(100vw * (15 / 1920));
+  margin-top: calc(100vh * (20 / 1080));
+  .head-container{
+    .el-input{
+      width: calc(100vw * (190 / 1920)) !important;
+    }
+  }
+  .aaa,.bbb{
+    background-color: #002a5cff;
+    color: #1890ff;
+    border: none;
+  }
+  .dialog-footer{
+    position: absolute;
+    right: 10%;
+    bottom: 8%;
+  }
+  .el-table{
+background: transparent;
+color: #7EA4C8FF;
+ border: 1px solid #006C9AFF;
+  }
+  }
+}
+::v-deep .el-dialog:not(.is-fullscreen) {
+  margin-top: 20px !important;
+}
+//下面跳转
+::v-deep .pagination-container .el-pagination {
+  width: calc(100vw * (490 / 1920)) !important;
+}
+::v-deep .el-pagination .el-select .el-input {
+  width: calc(100vw * (100 / 1920)) !important;
+}
+::v-deep .el-pagination .el-select .el-input .el-input__inner {
+  width: calc(100vw * (100 / 1920)) !important;
+}
+//前往第几页
+::v-deep .el-pagination__editor.el-input {
+  width: calc(100vw * (50 / 1920)) !important;
+}
+//左边下拉框背景
+::v-deep .el-tree {
+ background: transparent;
+ color: #7EA4C8FF;
+ border: 1px solid #006C9AFF;
+}
+//选中时的样式
+::v-deep .el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content {
+ background: #002659FF;
+ color: #2E8AECFF;
+}
+::v-deep .el-tree-node__content:hover{
+ background: #002659FF;
+ color: #2E8AECFF;
+}
+//右边用户名称
+::v-deep .el-dialog .el-form-item {
+  margin: 0;
+  .el-input{
+      width: calc(100vw * (320 / 1920)) !important;
+    }
+}
+
+</style>
+
+
+
+
+
+