dedsudiyu 5 月之前
父節點
當前提交
802a5dee04

+ 15 - 0
src/api/hierarchicalControl/index.js

@@ -1,5 +1,6 @@
 import request from '@/utils/request'
 
+//分级管控-条件设置-列表
 export function laboratoryGradeManageList(data) {
   return request({
     url: '/laboratory/gradeManage/list',
@@ -7,3 +8,17 @@ export function laboratoryGradeManageList(data) {
     data: data
   })
 }
+export function systemUserDropDateAuthList(data) {
+  return request({
+    url: '/system/user/dropDateAuthList',
+    method: 'post',
+    data: data
+  })
+}
+export function systemPostSelect(data) {
+  return request({
+    url: '/system/post/select',
+    method: 'post',
+    data: data
+  })
+}

+ 70 - 36
src/views/hierarchicalControl/gradeManage/addPage.vue

@@ -5,7 +5,7 @@
         <div class="top-max-box">
           <div class="top-title-box">
             <p class="color_one">基本信息</p>
-            <p class="reset-button-one" @click="backPage">返回</p>
+            <p class="page-out-common-style-button" @click="backPage">返回</p>
           </div>
           <div class="info-max-box">
             <el-form-item label="管控名称" prop="name" label-width="80px" style="margin-bottom:20px;">
@@ -31,10 +31,10 @@
             <el-form-item label="实验室类型" prop="moldId" label-width="100px" style="margin-bottom:20px;">
               <el-select v-model="form.moldId" placeholder="请选择实验室类型" clearable style="width:180px;">
                 <el-option
-                  v-for="dict in labMoldList"
-                  :key="dict.id"
+                  v-for="dict in moldIdOptionList"
+                  :key="dict.moldId"
                   :label="dict.moldName"
-                  :value="dict.id"
+                  :value="dict.moldId"
                 ></el-option>
               </el-select>
             </el-form-item>
@@ -158,13 +158,13 @@
               </div>
               <p class="info-for-min-del el-icon-delete" style="position:absolute;top:50%;right:40px;margin-top:-10px;font-size:24px;" v-if="item.ruleUserList[1]" @click="delFormMinList(item,minIndex)"></p>
             </div>
-            <p class="add-user-button reset-button-one" @click="addFormMinList(item)">+ 新增确认人员</p>
+            <p class="add-user-button reset-button-one" style="cursor: pointer" @click="addFormMinList(item)">+ 新增确认人员</p>
           </div>
         </div>
-        <p class="addBigButton" @click="addFormBigList">+ 新增管控规则</p>
+        <p class="addBigButton" style="cursor: pointer" @click="addFormBigList">+ 新增管控规则</p>
         <div class="add-button-bottom-box">
-          <p class="reset-button-one" @click="backPage">取消</p>
-          <p class="inquire-button-one" @click="submitForm">保存</p>
+          <p class="page-reset-common-style-button" @click="backPage">取消</p>
+          <p class="page-inquire-common-style-button" @click="submitForm">保存</p>
         </div>
       </el-form>
       <div v-if="pageType == 2" class="user-list-page">
@@ -174,11 +174,11 @@
         </div>
         <div class="button-top-box">
           <p></p>
-          <p class="add-button-two-90" @click="addUser">+ 新增管控人员</p>
-          <p class="inquire-button-one" @click="okUserClick">确定</p>
+          <p class="page-add-common-style-button" style="cursor: pointer" @click="addUser">+ 新增管控人员</p>
+          <p class="page-inquire-common-style-button" @click="okUserClick">确定</p>
         </div>
         <div class="table-user-list-box">
-          <el-table border :data="tableUserListMin">
+          <el-table class="table-box" border :data="tableUserListMin">
             <el-table-column label="身份" align="left" prop="positionName"/>
             <el-table-column label="名称" align="left" prop="nickName"/>
             <el-table-column label="联系方式" align="left" prop="phonenumber"/>
@@ -213,7 +213,6 @@
           />
         </div>
       </div>
-      <subject-list ref="subjectOpen"></subject-list>
       <user-list ref="userOpen"></user-list>
     </div>
 </template>
@@ -221,20 +220,19 @@
 <script>
   import {
     addGradeManage,getGradeManage,
-    updateGradeManage,listInfo, queryOption,
+    updateGradeManage,listInfo,
     listUser
   } from "@/api/hierarchicalControl/indexDemo";
   import {
     getDeptDropList,
     laboratoryClassLevelGetList,
     laboratoryClassTypeGetList,
+    laboratoryClassMoldGetList,
   } from '@/api/commonality/permission'
   import userList from "./userList.vue"
-  import subjectList from "./subjectList.vue"
   export default {
     name: "addPage",
     components: {
-      subjectList,
       userList
     },
     props:{
@@ -320,7 +318,7 @@
         //学院数据
         deptList:[],
         //实验室类型
-        labMoldList:[],
+        moldIdOptionList:[],
         //分类数据
         typeList:[],
         //分级数据
@@ -343,7 +341,7 @@
       this.getDeptDropList();
       this.laboratoryClassLevelGetList();
       this.laboratoryClassTypeGetList();
-      this.queryOption();
+      this.laboratoryClassMoldGetList();
       if(this.propsType){
         this.getGradeManage();
       }
@@ -403,10 +401,10 @@
           this.msgError('同一个规则下确认周期不能相同')
         }
       },
-      queryOption(){
-        queryOption({}).then(response=>{
+      laboratoryClassMoldGetList(){
+        laboratoryClassMoldGetList({}).then(response=>{
           if(response.code==200){
-            this.labMoldList=response.data
+            this.$set(this,'moldIdOptionList',response.data);
           }
         })
       },
@@ -477,12 +475,6 @@
           });
         });
       },
-      //接收实验室列表数据
-      takeSubjectData(ids,data){
-        this.$set(this.form,'subs',ids);
-        this.$set(this.form,'subsData',data);
-        this.$refs.subjectOpen.show();
-      },
       //接收人员列表数据
       takeUserData(ids,data){
         let self = this;
@@ -494,14 +486,6 @@
         this.$refs.userOpen.show();
         this.pageLit();
       },
-      //选择实验室
-      subjectTypeClick(){
-        if(this.form.subs[0]){
-          this.$refs.subjectOpen.show(this.form.subsData);
-        }else{
-          this.$refs.subjectOpen.show();
-        }
-      },
       outUserClick(){
         this.pageType = 1;
       },
@@ -618,6 +602,10 @@
       },
       //新增管控规则
       addFormBigList(){
+        if(this.form.ruleList[9]){
+          this.msgError('管控规则最大数量为10条')
+          return
+        }
         let obj = {
           name:"",
           remark:"",
@@ -644,6 +632,10 @@
       },
       //添加人员选项
       addFormMinList(item){
+        if(item.ruleUserList[9]){
+          this.msgError('管控规则下确认人员最多10人')
+          return
+        }
         let obj = {
           type:"",//人员类型 1 实验室负责人,2 当天进入实验室人员,3 选择人员
           isAll:"",
@@ -701,6 +693,8 @@
             flex:1;
             line-height:80px;
             font-size:18px;
+            color:#0045af;
+            font-weight:700;
           }
           p:nth-child(2){
             width:100px;
@@ -713,7 +707,6 @@
         }
         .info-max-box{
           padding:30px 0;
-          margin:0 20px;
           display: flex;
           flex-wrap: wrap;
           .subjectButton{
@@ -739,7 +732,7 @@
         }
       }
       .bottom-max-box{
-        margin:0 20px 20px 10px;
+        margin:5px 20px 20px 10px;
         padding:0 20px 20px;
         box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);
         border-radius:10px;
@@ -750,6 +743,8 @@
             flex:1;
             line-height:80px;
             font-size:18px;
+            color:#0045af;
+            font-weight:700;
           }
           p:nth-child(2){
             width:100px;
@@ -829,6 +824,7 @@
         background:#fff;
         cursor: pointer;
         text-align: center;
+        font-weight:700;
       }
       .add-button-bottom-box{
         width:260px;
@@ -900,5 +896,43 @@
         flex-direction: column
       }
     }
+    ::v-deep {
+      .switch {
+        .el-switch{
+          height:26px;
+          line-height: 26px;
+        }
+        .el-switch__label {
+          position: absolute;
+          display: none;
+          color: #fff !important;
+        }
+        .el-switch__label--right {
+          z-index: 1;
+        }
+        .el-switch__label--right span{
+          margin-left: 4px;
+        }
+        .el-switch__label--left {
+          z-index: 1;
+        }
+        .el-switch__label--left span{
+          margin-left: 30px;
+        }
+        .el-switch__label.is-active {
+          display: block;
+        }
+        .el-switch__core{
+          width:60px!important;
+        }
+        .el-switch__core:after{
+          top: 1px;
+          left: 2px;
+        }
+        .el-switch.is-checked .el-switch__core::after{
+          margin-left:-39px;
+        }
+      }
+    }
   }
 </style>

+ 129 - 124
src/views/hierarchicalControl/gradeManage/index.vue

@@ -1,124 +1,126 @@
 <!--分级管控管理-->
 <template>
-  <div class="app-container gradeManage">
-    <div class="page-container gradeManage-page" v-if="pageType == 1">
-      <div class="page-form-title-box">
-        <el-form :model="queryParams" class="form-box" ref="queryForm"
-                 :inline="true" style="width:100%;">
-          <el-form-item label="" prop="searchValue">
-            <el-input
-              maxLength="30"
-              v-model="queryParams.searchValue"
-              placeholder="请输入名称/学院"
-              style="width: 200px"
-            />
-          </el-form-item>
-          <el-form-item label="" prop="deptId">
-            <el-select v-model="queryParams.deptId" placeholder="请选择学院" style="width: 200px">
-              <el-option
-                v-for="dict in deptIdOptionList"
-                :key="dict.deptId"
-                :label="dict.deptName"
-                :value="dict.deptId"
+  <div class="gradeManage">
+    <div class="app-container" v-if="pageType == 1">
+      <div class="page-container gradeManage-page">
+        <div class="page-form-title-box">
+          <el-form :model="queryParams" class="form-box" ref="queryForm"
+                   :inline="true" style="width:100%;">
+            <el-form-item label="" prop="searchValue">
+              <el-input
+                maxLength="30"
+                v-model="queryParams.searchValue"
+                placeholder="请输入名称/学院"
+                style="width: 200px"
               />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="typeId">
-            <el-select v-model="queryParams.typeId" placeholder="请选择安全分类" style="width: 200px">
-              <el-option
-                v-for="dict in typeOptionList"
-                :key="dict.typeId"
-                :label="dict.typeName"
-                :value="dict.typeId"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="level">
-            <el-select v-model="queryParams.level" placeholder="请选择安全分级" style="width: 200px">
-              <el-option
-                v-for="dict in levelOptionList"
-                :key="dict.levelId"
-                :label="dict.levelName"
-                :value="dict.levelId"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="state">
-            <el-select v-model="queryParams.state" placeholder="请选择状态" style="width: 200px">
-              <el-option
-                v-for="dict in statusOptionList"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-          <el-form-item label="" prop="moldId">
-            <el-select v-model="queryParams.moldId" placeholder="请选择类型" style="width: 200px">
-              <el-option
-                v-for="dict in moldIdOptionList"
-                :key="dict.moldId"
-                :label="dict.moldName"
-                :value="dict.moldId"
-              />
-            </el-select>
-          </el-form-item>
-          <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
-          <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-          <p class="page-add-common-style-button"
-             style="float: right;"
-             @click="clickPageType(2)"
-             v-hasPermiRouter="['laboratory:gradeManage:add']"
-          >新增</p>
-        </el-form>
-      </div>
-      <div class="page-content-box">
-        <el-table class="table-box" v-loading="loading" border :data="dataList" @selection-change="handleSelectionChange">
-          <!--<el-table-column type="selection" width="55" align="center" />-->
-          <el-table-column label="管控名称" align="left" prop="name" show-overflow-tooltip/>
-          <el-table-column label="学院" align="left" prop="deptName" width="149" show-overflow-tooltip/>
-          <el-table-column label="实验室类型" align="left" prop="moldName" width="149">
-            <template slot-scope="scope">{{scope.row.moldName?scope.row.moldName:'--'}}</template>
-          </el-table-column>
-          <el-table-column label="安全分类" align="left" prop="typeName" width="130">
-            <template slot-scope="scope">{{scope.row.typeName?scope.row.typeName:'--'}}</template>
-          </el-table-column>
-          <el-table-column label="安全分级" align="left" prop="levelName" width="130">
-            <template slot-scope="scope">{{scope.row.levelName?scope.row.levelName:'--'}}</template>
-          </el-table-column>
-          <el-table-column label="管控规则数" align="left" prop="ruleNum" width="130"/>
-          <el-table-column label="状态" align="left" prop="status" width="149">
-            <template slot-scope="scope">
-              <span :class="scope.row.status == 1?'tableTypeColorA':(scope.row.status == 0?'tableTypeColorB':'')">{{scope.row.status == 1?'开启':(scope.row.status == 0?'关闭':'')}}</span>
-            </template>
-          </el-table-column>
-          <el-table-column label="编辑人" align="left" prop="updateBy" width="149"/>
-          <el-table-column label="编辑时间" align="left" prop="updateTime" width="179"/>
-          <!--<el-table-column label="适配实验室数" align="left" prop="subNum" />-->
-          <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px" v-if="tableButtonType">
-            <template slot-scope="scope">
-              <div class="table-button-box">
-                <p class="table-button-null"></p>
-                <p class="table-button-p"
-                   @click="clickPageType(3,scope.row)"
-                   v-hasPermiAnd="['laboratory:gradeManage:query','laboratory:gradeManage:edit']"
-                >编辑</p>
-                <p class="table-button-p"
-                   @click="handleDelete(scope.row)"
-                   v-hasPermi="['laboratory:gradeManage:remove']"
-                >删除</p>
-                <p class="table-button-null"></p>
-              </div>
-            </template>
-          </el-table-column>
-        </el-table>
-        <pagination :page-sizes="[20, 30, 40, 50]"
-                    v-show="total>0"
-                    :total="total"
-                    :page.sync="queryParams.pageNum"
-                    :limit.sync="queryParams.pageSize"
-                    @pagination="getList"
-        />
+            </el-form-item>
+            <el-form-item label="" prop="deptId">
+              <el-select v-model="queryParams.deptId" placeholder="请选择学院" style="width: 200px">
+                <el-option
+                  v-for="dict in deptIdOptionList"
+                  :key="dict.deptId"
+                  :label="dict.deptName"
+                  :value="dict.deptId"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="typeId">
+              <el-select v-model="queryParams.typeId" placeholder="请选择安全分类" style="width: 200px">
+                <el-option
+                  v-for="dict in typeOptionList"
+                  :key="dict.typeId"
+                  :label="dict.typeName"
+                  :value="dict.typeId"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="level">
+              <el-select v-model="queryParams.level" placeholder="请选择安全分级" style="width: 200px">
+                <el-option
+                  v-for="dict in levelOptionList"
+                  :key="dict.levelId"
+                  :label="dict.levelName"
+                  :value="dict.levelId"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="state">
+              <el-select v-model="queryParams.state" placeholder="请选择状态" style="width: 200px">
+                <el-option
+                  v-for="dict in statusOptionList"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                />
+              </el-select>
+            </el-form-item>
+            <el-form-item label="" prop="moldId">
+              <el-select v-model="queryParams.moldId" placeholder="请选择类型" style="width: 200px">
+                <el-option
+                  v-for="dict in moldIdOptionList"
+                  :key="dict.moldId"
+                  :label="dict.moldName"
+                  :value="dict.moldId"
+                />
+              </el-select>
+            </el-form-item>
+            <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
+            <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
+            <p class="page-add-common-style-button"
+               style="float: right;"
+               @click="clickPageType(2)"
+               v-hasPermiRouter="['laboratory:gradeManage:add']"
+            >新增</p>
+          </el-form>
+        </div>
+        <div class="page-content-box">
+          <el-table class="table-box" v-loading="loading" border :data="dataList" @selection-change="handleSelectionChange">
+            <!--<el-table-column type="selection" width="55" align="center" />-->
+            <el-table-column label="管控名称" align="left" prop="name" show-overflow-tooltip/>
+            <el-table-column label="学院" align="left" prop="deptName" width="149" show-overflow-tooltip/>
+            <el-table-column label="实验室类型" align="left" prop="moldName" width="149">
+              <template slot-scope="scope">{{scope.row.moldName?scope.row.moldName:'--'}}</template>
+            </el-table-column>
+            <el-table-column label="安全分类" align="left" prop="typeName" width="130">
+              <template slot-scope="scope">{{scope.row.typeName?scope.row.typeName:'--'}}</template>
+            </el-table-column>
+            <el-table-column label="安全分级" align="left" prop="levelName" width="130">
+              <template slot-scope="scope">{{scope.row.levelName?scope.row.levelName:'--'}}</template>
+            </el-table-column>
+            <el-table-column label="管控规则数" align="left" prop="ruleNum" width="130"/>
+            <el-table-column label="状态" align="left" prop="status" width="149">
+              <template slot-scope="scope">
+                <span :class="scope.row.status == 1?'tableTypeColorA':(scope.row.status == 0?'tableTypeColorB':'')">{{scope.row.status == 1?'开启':(scope.row.status == 0?'关闭':'')}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column label="编辑人" align="left" prop="createName" width="149"/>
+            <el-table-column label="编辑时间" align="left" prop="createTime" width="179"/>
+            <!--<el-table-column label="适配实验室数" align="left" prop="subNum" />-->
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="160px" v-if="tableButtonType">
+              <template slot-scope="scope">
+                <div class="table-button-box">
+                  <p class="table-button-null"></p>
+                  <p class="table-button-p"
+                     @click="clickPageType(3,scope.row)"
+                     v-hasPermiAnd="['laboratory:gradeManage:query','laboratory:gradeManage:edit']"
+                  >编辑</p>
+                  <p class="table-button-p"
+                     @click="handleDelete(scope.row)"
+                     v-hasPermi="['laboratory:gradeManage:remove']"
+                  >删除</p>
+                  <p class="table-button-null"></p>
+                </div>
+              </template>
+            </el-table-column>
+          </el-table>
+          <pagination :page-sizes="[20, 30, 40, 50]"
+                      v-show="total>0"
+                      :total="total"
+                      :page.sync="queryParams.page"
+                      :limit.sync="queryParams.pageSize"
+                      @pagination="getList"
+          />
+        </div>
       </div>
     </div>
     <!-- 新增编辑 -->
@@ -194,7 +196,7 @@
         open: false,
         // 查询参数
         queryParams: {
-          pageNum: 1,
+          page: 1,
           pageSize:20,
           searchValue: null,
           status:null,
@@ -347,11 +349,11 @@
       },
       /** 查询分级管控管理列表 */
       getList() {
-        this.loading = true;
+        this.$set(this,'loading',true);
         laboratoryGradeManageList(this.queryParams).then( response => {
-          this.dataList =  response.rows;
-          this.total =  response.total;
-          this.loading = false;
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+          this.$set(this,'loading',false);
         });
       },
       // 取消按钮
@@ -379,7 +381,7 @@
       },
       /** 搜索按钮操作 */
       handleQuery() {
-        this.$set(this.queryParams,'pageNum',1);
+        this.$set(this.queryParams,'page',1);
         this.getList();
       },
       /** 重置按钮操作 */
@@ -456,6 +458,9 @@
 
 <style lang="scss" scoped>
   .gradeManage{
+    flex:1;
+    display: flex;
+    overflow: hidden;
     .gradeManage-page{
       .button-box{
         margin:0 auto;

+ 0 - 240
src/views/hierarchicalControl/gradeManage/subjectList.vue

@@ -1,240 +0,0 @@
-<!--分级管控/实验室列表-->
-<template>
-  <div class="subjectList" v-if="subjectOpen">
-    <el-dialog title="选择实验室" :visible.sync="subjectOpen" width="1500px" append-to-body :close-on-click-modal="false">
-      <div class="gradeManage-subjectList" style="height:626px;display: flex;flex-direction: column">
-        <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch">
-          <el-form-item label="实验室" prop="name" label-width="80px">
-            <el-input
-              style="width:160px;"
-              maxlength="10"
-              v-model="queryParams.name"
-              placeholder="请输入实验室名称"
-              clearable
-              size="small"
-            />
-          </el-form-item>
-          <el-form-item label="学院" prop="deptId">
-            <el-select style="width:160px;" v-model="queryParams.deptId" placeholder="请选择学院" clearable label-width="80px">
-              <el-option
-                v-for="dict in deptList"
-                :key="dict.deptId"
-                :label="dict.deptName"
-                :value="dict.deptId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="安全分类" prop="typeId">
-            <el-select style="width:160px;" v-model="queryParams.typeId" placeholder="请选择安全分类" clearable label-width="80px">
-              <el-option
-                v-for="dict in typeList"
-                :key="dict.typeId"
-                :label="dict.typeName"
-                :value="dict.typeId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="安全分级" prop="level">
-            <el-select style="width:160px;" v-model="queryParams.level" placeholder="请选择安全分级" clearable label-width="80px">
-              <el-option
-                v-for="dict in levelList"
-                :key="dict.levelId"
-                :label="dict.levelName"
-                :value="dict.levelId"
-              ></el-option>
-            </el-select>
-          </el-form-item>
-          <el-form-item label="实验室负责人" prop="adminName" label-width="100px">
-            <el-input
-              style="width:160px;"
-              maxlength="10"
-              v-model="queryParams.adminName"
-              placeholder="请输入姓名"
-              clearable
-              size="small"
-            />
-          </el-form-item>
-          <el-form-item>
-            <p class="inquire-button-one" @click="handleQuery">查询</p>
-            <p class="reset-button-one" @click="resetQuery">重置</p>
-          </el-form-item>
-        </el-form>
-        <div class="sheet-expand-box" style="height:40px;display:flex;background:rgba(1,131,250,0.1);border-radius: 5px;margin-bottom:18px;font-size:14px;">
-          <i class="el-icon-warning" style="color:#0045AF;margin:10px 16px 0 14px;height:20px;width:20px;font-size:20px;display: block;"></i>
-          <p class="color_99" style="margin:0;width:132px;font-size:14px;height:40px;line-height:40px;">已选择 {{selectedNum}} 项</p>
-          <p class="color_one cursor_hover" style="margin:0;width:60px;font-size:14px;height:40px;line-height:40px;margin-right:20px;" @click="selectPage">全选本页</p>
-          <p class="color_warn cursor_hover" style="margin:0;width:60px;font-size:14px;height:40px;line-height:40px;margin-right:20px;" @click="clearSelection">清除选项</p>
-        </div>
-        <el-table v-loading="loading" border :data="subjectList" @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
-          <el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
-          <el-table-column label="实验室" align="left" prop="name" />
-          <el-table-column label="学院" align="left" prop="deptName" />
-          <el-table-column label="安全分类" align="left" prop="typeName" />
-          <el-table-column label="安全分级" align="left" prop="levelName" />
-          <el-table-column label="实验室负责人" align="left" prop="adminName" />
-        </el-table>
-        <pagination :page-sizes="[20, 30, 40, 50]"
-          v-show="total>0"
-          :total="total"
-          :page.sync="queryParams.pageNum"
-          :limit.sync="queryParams.pageSize"
-          @pagination="getList"
-        />
-        <div style="margin-top:30px;padding-top:20px;display: flex;border-top:1px solid #dedede">
-          <p style="flex:1;"></p>
-          <p style="margin-right:20px;" class="reset-button-one" @click="show(2)">取消</p>
-          <p class="inquire-button-one" @click="okButton">确定</p>
-        </div>
-      </div>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-  import {
-    listInfo
-  } from "@/api/hierarchicalControl/indexDemo";
-  import {
-    getDeptDropList,
-    laboratoryClassLevelGetList,
-    laboratoryClassTypeGetList,
-  } from '@/api/commonality/permission'
-  export default {
-    name: "subjectList",
-    props:{
-
-    },
-    data() {
-      return {
-        subjectOpen:false,
-        loading:false,
-        // 显示搜索条件
-        showSearch: true,
-        // 总条数
-        total: 0,
-        queryParams:{
-          pageNum:1,
-          pageSize:20,
-        },
-        subjectList:[],
-        //已选中数量
-        selectedNum:0,
-        //已选中
-        ids:[],
-        idData:[],
-        // 非单个禁用
-        single: true,
-        // 非多个禁用
-        multiple: true,
-        //分类数据
-        typeList:[],
-        //分级数据
-        levelList:[],
-      }
-    },
-    created(){
-
-    },
-    mounted(){
-      this.laboratoryClassTypeGetList();
-      this.laboratoryClassLevelGetList();
-      this.getDeptDropList();
-      this.getList();
-    },
-    methods:{
-      //确定按钮
-      okButton(){
-        if(!this.ids[0]){
-          this.msgError("请勾选实验室")
-          return
-        }
-        this.$parent.takeSubjectData(this.ids,this.idData);
-      },
-      //获取学院
-      getDeptDropList(){
-        getDeptDropList({level: 2, deptType: 1 }).then(response => {
-          this.$set(this,'deptList',response.data);
-        });
-      },
-      show(data){
-        let self = this;
-        this.subjectOpen = !this.subjectOpen;
-        if(data){
-          this.queryParams.pageNum = 1;
-          setTimeout(function(){
-            for(let i=0;i<data.length;i++){
-              self.$refs.multipleTable.toggleRowSelection(data[i],true)
-            }
-            self.getList();
-          },100);
-        }
-      },
-      //获取数据列表
-      getList(){
-        this.loading = true;
-        listInfo(this.queryParams).then(response => {
-          this.subjectList = response.rows;
-          this.total = response.total;
-          this.loading = false;
-        });
-      },
-      /** 搜索按钮操作 */
-      handleQuery() {
-        this.queryParams.pageNum = 1;
-        this.getList();
-      },
-      /** 重置按钮操作 */
-      resetQuery() {
-        this.queryParams = {};
-        this.handleQuery();
-      },
-      /*===记录勾选数据===
-        需要再el-table 添加  :row-key="getRowKeys"
-        需要在selection 添加 :reserve-selection="true"
-      */
-      getRowKeys(row) {
-        return row.id
-      },
-      //选择本页
-      selectPage(){
-        this.$refs.multipleTable.toggleAllSelection()
-      },
-      //清除选择
-      clearSelection(){
-        this.$refs.multipleTable.clearSelection()
-      },
-      // 多选框选中数据
-      handleSelectionChange(selection) {
-        this.selectedNum = selection.length;
-        this.ids = selection.map(item => item.id)
-        this.idData = selection.map(item => item)
-        this.single = selection.length!==1
-        this.multiple = !selection.length
-      },
-      //查询安全分级
-      laboratoryClassLevelGetList(){
-        laboratoryClassLevelGetList({}).then(response=>{
-          if(response.code==200){
-            this.$set(this,'levelList',response.data);
-          }
-        })
-      },
-      //查询安全分类
-      laboratoryClassTypeGetList(){
-        laboratoryClassTypeGetList({}).then(response=>{
-          if(response.code==200){
-            this.$set(this,'typeList',response.data);
-          }
-        });
-      },
-    }
-  }
-</script>
-
-<style lang="scss" scoped>
-  .subjectList{
-    height:700px;
-    display: flex!important;
-    flex-direction: column;
-  }
-</style>

+ 17 - 34
src/views/hierarchicalControl/gradeManage/userList.vue

@@ -14,11 +14,6 @@
               size="small"
             />
           </el-form-item>
-          <el-form-item label="身份" prop="position" label-width="50px">
-            <el-select style="width:200px;" v-model="queryParams.position" placeholder="请选择身份" clearable>
-              <el-option v-for="dict in typeList" :key="dict.postId" :label="dict.postName" :value="dict.postId"></el-option>
-            </el-select>
-          </el-form-item>
           <el-form-item label="学院" prop="deptId" label-width="50px">
             <el-select style="width:200px;" v-model="queryParams.deptId" placeholder="请选择学院" clearable>
               <el-option
@@ -30,8 +25,8 @@
             </el-select>
           </el-form-item>
           <el-form-item>
-            <p class="inquire-button-one" @click="handleQuery">查询</p>
-            <p class="reset-button-one" @click="resetQuery">重置</p>
+            <p class="page-reset-common-style-button" style="margin-right:10px;" @click="handleQuery">查询</p>
+            <p class="page-inquire-common-style-button" @click="resetQuery">重置</p>
           </el-form-item>
         </el-form>
         <div class="sheet-expand-box" style="height:40px;display:flex;background:rgba(1,131,250,0.1);border-radius: 5px;margin-bottom:18px;font-size:14px;">
@@ -40,7 +35,7 @@
           <p class="color_one cursor_hover" style="margin:0;width:60px;font-size:14px;height:40px;line-height:40px;margin-right:20px;" @click="selectPage">全选本页</p>
           <p class="color_warn cursor_hover" style="margin:0;width:60px;font-size:14px;height:40px;line-height:40px;margin-right:20px;" @click="clearSelection">清除选项</p>
         </div>
-        <el-table v-loading="loading" border :data="userList" @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
+        <el-table class="table-box" v-loading="loading" border :data="userList" @selection-change="handleSelectionChange" ref="multipleTable" :row-key="getRowKeys">
           <el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
           <el-table-column label="姓名" align="left" prop="nickName" />
           <el-table-column label="身份" align="left" prop="positionName" />
@@ -51,7 +46,7 @@
         <pagination :page-sizes="[20, 30, 40, 50]"
           v-show="total>0"
           :total="total"
-          :page.sync="queryParams.pageNum"
+          :page.sync="queryParams.page"
           :limit.sync="queryParams.pageSize"
           @pagination="getList"
         />
@@ -67,11 +62,8 @@
 
 <script>
   import {
-    optionselect,
-    listUser,
-  } from "@/api/hierarchicalControl/indexDemo";
-  import {
-    getDeptDropList
+    getDeptDropList,
+    systemUserDropDateAuthList,
   } from '@/api/commonality/permission'
   export default {
     name: "userList",
@@ -84,11 +76,10 @@
         // 总条数
         total: 0,
         queryParams:{
-          pageNum:1,
+          page:1,
           pageSize:20,
           searchValue:"",
-          position:"",
-          deptId:"",
+          deptId:null,
         },
         userList:[],
         //已选中数量
@@ -105,6 +96,7 @@
         //分级数据
         levelList:[],
         addUserList:[],
+        deptList:[],
       }
     },
     created(){
@@ -112,7 +104,6 @@
     },
     mounted(){
       this.getDeptDropList();
-      this.optionselect();
     },
     methods:{
       //确定按钮
@@ -127,7 +118,6 @@
         let self = this;
         this.resetQuery();
         this.getDeptDropList();
-        this.optionselect();
         this.userOpen = !this.userOpen;
         if(data){
           this.addUserList = data;
@@ -140,35 +130,28 @@
           this.$set(this,'deptList',response.data);
         });
       },
-      //获取身份
-      optionselect(){
-        optionselect().then(response => {
-          this.typeList = response.data;
-        });
-      },
       //获取数据列表
       getList(){
-        this.loading = true;
+        this.$set(this,'loading',true);
         let obj = JSON.parse(JSON.stringify(this.queryParams));
-        obj.ids = this.addUserList+'';
+        obj.ids = this.addUserList[0]?this.addUserList+'':null;
         obj.include = true;
-        listUser(obj).then(response => {
-          this.userList = response.rows;
-          this.total = response.total;
-          this.loading = false;
+        systemUserDropDateAuthList(obj).then(response => {
+          this.$set(this,'dataList',response.data.records);
+          this.$set(this,'total',response.data.total);
+          this.$set(this,'loading',false);
         });
       },
       /** 搜索按钮操作 */
       handleQuery() {
-        this.queryParams.pageNum = 1;
+        this.queryParams.page = 1;
         this.getList();
       },
       /** 重置按钮操作 */
       resetQuery() {
         // this.resetForm("queryForm");
         this.queryParams.searchValue = "";
-        this.queryParams.position = "";
-        this.queryParams.deptId = "";
+        this.queryParams.deptId = null;
         this.handleQuery();
       },
       /*===记录勾选数据===