|
@@ -2,7 +2,7 @@
|
|
<template>
|
|
<template>
|
|
<div class="page-container add-whitelist">
|
|
<div class="page-container add-whitelist">
|
|
<div class="page-top-title-box">
|
|
<div class="page-top-title-box">
|
|
- <p class="page-top-title-name-p">新增准入白名单</p>
|
|
|
|
|
|
+ <p class="page-top-title-name-p">{{pageData.whiteId?'编辑':'新增'}}准入白名单</p>
|
|
<p class="page-top-title-out-p" @click="backPage">返回</p>
|
|
<p class="page-top-title-out-p" @click="backPage">返回</p>
|
|
<p class="page-top-title-submit-p" @click="upButton">提交</p>
|
|
<p class="page-top-title-submit-p" @click="upButton">提交</p>
|
|
</div>
|
|
</div>
|
|
@@ -19,33 +19,34 @@
|
|
placeholder="请输入姓名"
|
|
placeholder="请输入姓名"
|
|
:remote-method="userSelectList"
|
|
:remote-method="userSelectList"
|
|
@change="selectChange"
|
|
@change="selectChange"
|
|
- :loading="loading">
|
|
|
|
|
|
+ clearable>
|
|
<el-option
|
|
<el-option
|
|
v-for="item in optionsUser"
|
|
v-for="item in optionsUser"
|
|
:key="item.userId"
|
|
:key="item.userId"
|
|
- :label="item.nickName"
|
|
|
|
|
|
+ :label="item.userName"
|
|
:value="item.userId">
|
|
:value="item.userId">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <div class="for-max-box">
|
|
|
|
- <div class="for-box" v-for="(item,index) in userList" :key="index">
|
|
|
|
- <div class="for-min-box">
|
|
|
|
- <p>{{item.deptName ? item.deptName+'-'+item.userName:item.userName}}</p>
|
|
|
|
- <img src="@/assets/ZDimages/secureAccess/off.png" @click="delItem(index)" v-if="!isEdit">
|
|
|
|
- </div>
|
|
|
|
|
|
+ </el-form>
|
|
|
|
+ <div class="for-max-box scrollbar-box">
|
|
|
|
+ <div class="for-box" v-for="(item,index) in userList" :key="index">
|
|
|
|
+ <div class="for-min-box">
|
|
|
|
+ <p>{{item.deptName ? item.deptName+'-'+item.userName:item.userName}}</p>
|
|
|
|
+ <img src="@/assets/ZDimages/secureAccess/off.png" @click="delItem(index)" v-if="!isEdit">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- </el-form>
|
|
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="right-max-box">
|
|
<div class="right-max-box">
|
|
- <div style="text-align: right;margin: 20px;" class="right_t">
|
|
|
|
- <p class="inquire-button-one" style="width: 150px" @click="newAdmittance">新增准入实验室</p>
|
|
|
|
|
|
+ <div class="right-table-button-box">
|
|
|
|
+ <p class="right-table-button-null-p"></p>
|
|
|
|
+ <p class="page-add-common-style-button" style="width: 150px" @click="newAdmittance">新增准入实验室</p>
|
|
</div>
|
|
</div>
|
|
- <el-table class="table-box" border v-loading="loading" :data="subjectList">
|
|
|
|
- <el-table-column label="申请实验室" align="left" prop="name" />
|
|
|
|
- <el-table-column label="楼栋" align="left" prop="building" />
|
|
|
|
- <el-table-column label="楼层" align="left" prop="buildName" />
|
|
|
|
|
|
+ <el-table class="table-box" border v-loading="loading" :data="subjectList" :row-key="getRowKeys">
|
|
|
|
+ <el-table-column label="申请实验室" align="left" prop="subName" />
|
|
|
|
+ <el-table-column label="楼栋" align="left" prop="buildName" />
|
|
|
|
+ <el-table-column label="楼层" align="left" prop="floorName" />
|
|
<el-table-column label="学院" align="left" prop="deptName" />
|
|
<el-table-column label="学院" align="left" prop="deptName" />
|
|
<el-table-column label="实验室负责人" align="left" prop="adminName" />
|
|
<el-table-column label="实验室负责人" align="left" prop="adminName" />
|
|
<el-table-column label="安全分级" align="left" prop="levelName" />
|
|
<el-table-column label="安全分级" align="left" prop="levelName" />
|
|
@@ -62,75 +63,81 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!--关联实验室弹框-->
|
|
<!--关联实验室弹框-->
|
|
- <el-dialog title='新增准入实验室' @close="handleClose" :visible.sync="dialogVisible" width="80%" :close-on-click-modal="false">
|
|
|
|
- <el-form :model="dialogForm" ref="dialogForm" :inline="true" label-width="140px">
|
|
|
|
- <el-form-item label="实验室名称" prop="name" >
|
|
|
|
- <el-input
|
|
|
|
- v-model="dialogForm.name"
|
|
|
|
- placeholder="请输入实验室名称"
|
|
|
|
- clearable
|
|
|
|
- size="small"
|
|
|
|
- />
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="楼栋" prop="buildId">
|
|
|
|
- <el-select v-model="dialogForm.buildId" placeholder="请选择楼栋" @change="buildChange">
|
|
|
|
- <el-option v-for="(item,index) in buildsDataList" :key="index" :label="item.name" :value="item.id" />
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
- <el-form-item label="楼层" prop="floorId">
|
|
|
|
- <el-select v-model="dialogForm.floorId" placeholder="请选择楼层" >
|
|
|
|
- <el-option
|
|
|
|
- v-for="dict in floorList"
|
|
|
|
- :key="dict.id"
|
|
|
|
- :label="dict.name"
|
|
|
|
- :value="dict.id"
|
|
|
|
- ></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+ <el-dialog title='新增准入实验室' @close="handleClose" :visible.sync="dialogVisible" width="80%"
|
|
|
|
+ class="whiteListAdd-dialog" :close-on-click-modal="false" append-to-body :close-on-press-escape="false">
|
|
|
|
+ <div class="whiteListAdd-dialog-box">
|
|
|
|
+ <div class="page-form-title-box" style="border-bottom:none;">
|
|
|
|
+ <el-form :model="dialogForm" ref="dialogForm" :inline="true" label-width="140px">
|
|
|
|
+ <el-form-item label="" prop="subName" >
|
|
|
|
+ <el-input
|
|
|
|
+ v-model="dialogForm.subName"
|
|
|
|
+ placeholder="请输入实验室名称"
|
|
|
|
+ clearable
|
|
|
|
+ size="small"
|
|
|
|
+ />
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="" prop="buildId">
|
|
|
|
+ <el-select v-model="dialogForm.buildId" placeholder="请选择楼栋" @change="(e)=>systemBuildingGetOptList(3,e)">
|
|
|
|
+ <el-option v-for="(item,index) in buildsDataList" :key="index" :label="item.name" :value="item.id" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="" prop="floorId">
|
|
|
|
+ <el-select v-model="dialogForm.floorId" placeholder="请选择楼层" >
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="dict in floorList"
|
|
|
|
+ :key="dict.id"
|
|
|
|
+ :label="dict.name"
|
|
|
|
+ :value="dict.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <p class="page-inquire-common-style-button" @click="onSearch">查询</p>
|
|
|
|
+ <p class="page-reset-common-style-button" @click="resetForm">重置</p>
|
|
|
|
+ </el-form>
|
|
|
|
+ </div>
|
|
|
|
+ <div class="page-content-box">
|
|
|
|
+ <div class="btn_list">
|
|
|
|
+ <i class="el-icon-warning"></i>
|
|
|
|
+ <i>已选择 {{whiteJoinSubList.length}} 项</i>
|
|
|
|
+ <i @click="toggleSelection(dialogTable)">全选本页</i>
|
|
|
|
+ <!-- <i>选择全部</i>-->
|
|
|
|
+ <i></i>
|
|
|
|
+ <i @click="toggleSelection()">清除选项</i>
|
|
|
|
+ <!--<div class="bottom-button-box">-->
|
|
|
|
+ <!--<el-button class="color_99" @click="closeDialog(1)">关闭</el-button>-->
|
|
|
|
+ <!--<el-button class="color_ff back_one" @click="closeDialog(2)">提交</el-button>-->
|
|
|
|
+ <!--</div>-->
|
|
|
|
+ </div>
|
|
|
|
+ <el-table class="table-box" ref="multipleTable" border tooltip-effect="dark" :row-key="getRowKeys" :data="dialogTable"
|
|
|
|
+ highlight-current-row @selection-change="handleSelectionChange" style="cursor: pointer;height:500px;">
|
|
|
|
+ <el-table-column type="selection" width="55" :reserve-selection="true" align="center"></el-table-column>
|
|
|
|
+ <el-table-column label="申请实验室名称" show-overflow-tooltip align="left" prop="subName"/>
|
|
|
|
+ <el-table-column label="楼栋" align="left" prop="buildName" />
|
|
|
|
+ <el-table-column label="楼层" align="left" prop="floorName" />
|
|
|
|
+ <el-table-column label="学院" align="left" prop="deptName" />
|
|
|
|
+ <el-table-column label="实验室负责人" align="left" prop="adminName" />
|
|
|
|
+ <el-table-column label="安全分级" align="left" prop="levelName" >
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span :style="'color:'+scope.row.fiedColor+';'">{{scope.row.levelName}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
|
|
- <el-form-item>
|
|
|
|
- <p class="inquire-button-one" style="margin-left:20px;" @click="onSearch">查询</p>
|
|
|
|
- <p class="reset-button-one" style="margin-left:20px;" @click="resetForm">重置</p>
|
|
|
|
- </el-form-item>
|
|
|
|
- </el-form>
|
|
|
|
- <div class="btn_list">
|
|
|
|
- <i class="el-icon-warning"></i>
|
|
|
|
- <i>已选择 {{labWhiteJoinSubList.length}} 项</i>
|
|
|
|
- <i @click="toggleSelection(dialogTable)">全选本页</i>
|
|
|
|
- <!-- <i>选择全部</i>-->
|
|
|
|
- <i></i>
|
|
|
|
- <i @click="toggleSelection()">清除选项</i>
|
|
|
|
- <div class="bottom-button-box">
|
|
|
|
- <el-button class="color_99" @click="closeDialog(1)">关闭</el-button>
|
|
|
|
- <el-button class="color_ff back_one" @click="closeDialog(2)">提交</el-button>
|
|
|
|
|
|
+ </el-table>
|
|
|
|
+ <pagination :page-sizes="[20, 30, 40, 50]"
|
|
|
|
+ v-show="total>0"
|
|
|
|
+ :total="total"
|
|
|
|
+ :page.sync="dialogForm.page"
|
|
|
|
+ :limit.sync="dialogForm.pageSize"
|
|
|
|
+ @pagination="getUserRoleBySub"
|
|
|
|
+ />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <el-table class="table-box" ref="multipleTable" border tooltip-effect="dark" :row-key="getRowKeys" :data="dialogTable"
|
|
|
|
- highlight-current-row @selection-change="handleSelectionChange" style="cursor: pointer;height:500px;">
|
|
|
|
- <el-table-column type="selection" width="55" :reserve-selection="true" align="center"></el-table-column>
|
|
|
|
- <el-table-column label="申请实验室名称" show-overflow-tooltip align="left" prop="name"/>
|
|
|
|
- <el-table-column label="楼栋" align="left" prop="building" />
|
|
|
|
- <el-table-column label="楼层" align="left" prop="buildName" />
|
|
|
|
- <el-table-column label="学院" align="left" prop="deptName" />
|
|
|
|
- <el-table-column label="实验室负责人" align="left" prop="adminName" />
|
|
|
|
- <el-table-column label="安全分级" align="left" prop="levelName" >
|
|
|
|
- <template slot-scope="scope">
|
|
|
|
- <span :style="'color:'+scope.row.fiedColor+';'">{{scope.row.levelName}}</span>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
-
|
|
|
|
- </el-table>
|
|
|
|
- <pagination :page-sizes="[20, 30, 40, 50]"
|
|
|
|
- v-show="total>0"
|
|
|
|
- :total="total"
|
|
|
|
- :page.sync="dialogForm.pageNum"
|
|
|
|
- :limit.sync="dialogForm.pageSize"
|
|
|
|
- @pagination="getUserRoleBySub"
|
|
|
|
- />
|
|
|
|
- <!-- <div class="bottom-button-box" style="padding-top: 20px;text-align: right;">
|
|
|
|
- <el-button class="color_99" @click="closeDialog()">取消</el-button>
|
|
|
|
- <el-button class="color_ff back_one" @click="confirmDialog()">提交</el-button>
|
|
|
|
- </div>-->
|
|
|
|
|
|
+ <div slot="footer" class="dialog-footer dialog-footer-box">
|
|
|
|
+ <p class="dialog-footer-button-null"></p>
|
|
|
|
+ <p class="dialog-footer-button-info" @click="closeDialog(1)">取消</p>
|
|
|
|
+ <p class="dialog-footer-button-primary" @click="closeDialog(2)">提交</p>
|
|
|
|
+ <p class="dialog-footer-button-null"></p>
|
|
|
|
+ </div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -144,9 +151,9 @@ import {
|
|
whitelistList,
|
|
whitelistList,
|
|
whitelistSubListEdit
|
|
whitelistSubListEdit
|
|
} from "@/apiDemo/secureAccess/index";
|
|
} from "@/apiDemo/secureAccess/index";
|
|
-import { listInfo } from "@/api/commonality/permission";
|
|
|
|
-import { buildFloorGetlist } from "@/api/commonality/noPermission";
|
|
|
|
// V3
|
|
// V3
|
|
|
|
+import { laboratorySubRelInfoSelectUserBySubPage,systemBuildingGetOptList } from "@/api/commonality/permission";
|
|
|
|
+import { laboratoryWhiteAdd,laboratoryWhiteEditWhiteBySubJoin,laboratoryWhiteSelectUserByNotWhite,laboratoryWhiteDetail,laboratoryWhiteSubList } from "@/api/secureAccess/index";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "add-whitelist",
|
|
name: "add-whitelist",
|
|
@@ -170,75 +177,77 @@ export default {
|
|
//搜索角色数组
|
|
//搜索角色数组
|
|
optionsUser:[],
|
|
optionsUser:[],
|
|
queryParams:{
|
|
queryParams:{
|
|
- pageNum:1,
|
|
|
|
|
|
+ page:1,
|
|
pageSize:20,
|
|
pageSize:20,
|
|
},
|
|
},
|
|
total:0,
|
|
total:0,
|
|
- subjectList:[{}],
|
|
|
|
|
|
+ subjectList:[],
|
|
dialogVisible:false,
|
|
dialogVisible:false,
|
|
dialogForm:{
|
|
dialogForm:{
|
|
- pageNum: 1,
|
|
|
|
|
|
+ page: 1,
|
|
pageSize:20,
|
|
pageSize:20,
|
|
- name: null,
|
|
|
|
|
|
+ subName: null,
|
|
|
|
+ buildId: null,
|
|
floorId: null,
|
|
floorId: null,
|
|
whiteUserId:null,
|
|
whiteUserId:null,
|
|
- deptId:JSON.parse(localStorage.getItem('user')).deptId,
|
|
|
|
-
|
|
|
|
},
|
|
},
|
|
dialogTable:[],
|
|
dialogTable:[],
|
|
buildsDataList:[],
|
|
buildsDataList:[],
|
|
floorList:[],
|
|
floorList:[],
|
|
- labWhiteJoinSubList:[],
|
|
|
|
|
|
+ whiteJoinSubList:[],
|
|
arr:[],
|
|
arr:[],
|
|
|
|
+ labWhiteJoinSubList:[],
|
|
|
|
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- // if(this.pageData.id){
|
|
|
|
- // this.isEdit=true;
|
|
|
|
- // this.whitelistEdit();
|
|
|
|
- // this.whitelistSubListEdit();
|
|
|
|
- // this.dialogForm.whiteUserId=this.pageData.userId;
|
|
|
|
- // this.getUserRoleBySub();
|
|
|
|
- // }else{
|
|
|
|
- // this.isEdit=false;
|
|
|
|
- // this.getUserRoleBySub();
|
|
|
|
- // }
|
|
|
|
- // this.buildsList();
|
|
|
|
|
|
+ if(this.pageData.whiteId){
|
|
|
|
+ this.isEdit=true;
|
|
|
|
+ this.laboratoryWhiteDetail();
|
|
|
|
+ this.laboratoryWhiteSubList();
|
|
|
|
+ this.dialogForm.whiteUserId=this.pageData.userId;
|
|
|
|
+ this.getUserRoleBySub();
|
|
|
|
+ }else{
|
|
|
|
+ this.isEdit=false;
|
|
|
|
+ this.getUserRoleBySub();
|
|
|
|
+ }
|
|
|
|
+ this.systemBuildingGetOptList(2);
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
-
|
|
|
|
getRowKeys(row) {
|
|
getRowKeys(row) {
|
|
- return row.subjectId; //指定row-key的一个标识
|
|
|
|
|
|
+ return row.subId; //指定row-key的一个标识
|
|
},
|
|
},
|
|
//关闭实验室弹窗
|
|
//关闭实验室弹窗
|
|
closeDialog(type){
|
|
closeDialog(type){
|
|
if(type == 1){
|
|
if(type == 1){
|
|
this.dialogVisible=false;
|
|
this.dialogVisible=false;
|
|
}else if(type == 2){
|
|
}else if(type == 2){
|
|
- this.subjectList = JSON.parse(JSON.stringify(this.labWhiteJoinSubList));
|
|
|
|
|
|
+ let list = [];
|
|
|
|
+ this.labWhiteJoinSubList.forEach((item1)=>{
|
|
|
|
+ let num = 0;
|
|
|
|
+ this.labWhiteJoinSubList.forEach((item2)=>{
|
|
|
|
+ if(item1.subId == item2.subId){
|
|
|
|
+ num++
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ if(num == 1){
|
|
|
|
+ list.push(item1)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.$set(this,'subjectList',list);
|
|
|
|
+ // this.subjectList = JSON.parse(JSON.stringify(this.labWhiteJoinSubList));
|
|
this.dialogVisible=false;
|
|
this.dialogVisible=false;
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//监听关联记录弹窗关闭
|
|
//监听关联记录弹窗关闭
|
|
handleClose(){
|
|
handleClose(){
|
|
- /*if(this.arr){
|
|
|
|
- this.$nextTick(() => {
|
|
|
|
- this.arr.forEach(row => {
|
|
|
|
- this.$refs.multipleTable.toggleRowSelection(row,true);
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- }*/
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
//取消选中
|
|
//取消选中
|
|
toggleSelection(rows) {
|
|
toggleSelection(rows) {
|
|
- let _this=this;
|
|
|
|
if (rows) {
|
|
if (rows) {
|
|
- // this.$refs.multipleTable.clearSelection();
|
|
|
|
rows.forEach(row => {
|
|
rows.forEach(row => {
|
|
this.$refs.multipleTable.toggleRowSelection(row,true);
|
|
this.$refs.multipleTable.toggleRowSelection(row,true);
|
|
- //_this.arr.push(row)
|
|
|
|
- //_this.subjectList.push(row)
|
|
|
|
});
|
|
});
|
|
|
|
|
|
} else {
|
|
} else {
|
|
@@ -247,36 +256,17 @@ export default {
|
|
},
|
|
},
|
|
//选中实验室
|
|
//选中实验室
|
|
handleSelectionChange(val){
|
|
handleSelectionChange(val){
|
|
- let _this=this;
|
|
|
|
- this.labWhiteJoinSubList=[];
|
|
|
|
- this.labWhiteJoinSubList=val;
|
|
|
|
-
|
|
|
|
- // _this.subjectList=this.labWhiteJoinSubList
|
|
|
|
- _this.arr=this.labWhiteJoinSubList
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- //查询楼栋
|
|
|
|
- buildsList(){
|
|
|
|
- buildFloorGetlist({type:2}).then(response => {
|
|
|
|
- this.$set(this,'buildsDataList', response.rows)
|
|
|
|
- });
|
|
|
|
- },
|
|
|
|
- //选择楼栋
|
|
|
|
- buildChange(e){
|
|
|
|
- //根据学院获取楼栋
|
|
|
|
- buildFloorGetlist({type:3,parentId:this.dialogForm.buildId}).then(response => {
|
|
|
|
- this.$set(this,'floorList', response.rows)
|
|
|
|
- this.$set(this.dialogForm,'floorId', "")
|
|
|
|
- });
|
|
|
|
|
|
+ this.$set(this,'labWhiteJoinSubList',JSON.parse(JSON.stringify(val)));
|
|
|
|
+ this.$set(this,'arr',JSON.parse(JSON.stringify(val)));
|
|
},
|
|
},
|
|
//查询
|
|
//查询
|
|
onSearch() {
|
|
onSearch() {
|
|
- this.dialogForm.pageNo = 1;
|
|
|
|
|
|
+ this.dialogForm.page = 1;
|
|
this.getUserRoleBySub();
|
|
this.getUserRoleBySub();
|
|
},
|
|
},
|
|
//重置
|
|
//重置
|
|
resetForm() {
|
|
resetForm() {
|
|
- this.dialogForm.name = '';
|
|
|
|
|
|
+ this.dialogForm.subName = '';
|
|
this.dialogForm.floorId = '';
|
|
this.dialogForm.floorId = '';
|
|
this.dialogForm.buildId = '';
|
|
this.dialogForm.buildId = '';
|
|
this.floorList=[];
|
|
this.floorList=[];
|
|
@@ -299,39 +289,14 @@ export default {
|
|
_this.$refs.multipleTable.clearSelection();
|
|
_this.$refs.multipleTable.clearSelection();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // if(this.arr){
|
|
|
|
- // if(_this.arr.length==0){
|
|
|
|
- // if(_this.$refs.multipleTable){
|
|
|
|
- // _this.$refs.multipleTable.clearSelection();
|
|
|
|
- // }
|
|
|
|
- // }else{
|
|
|
|
- // _this.$nextTick(() => {
|
|
|
|
- // setTimeout(function(){
|
|
|
|
- // _this.subjectList.forEach(row => {
|
|
|
|
- // _this.$refs.multipleTable.toggleRowSelection(row,true);
|
|
|
|
- // });
|
|
|
|
- // },300);
|
|
|
|
- // })
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- },
|
|
|
|
- //确认按钮
|
|
|
|
- confirmDialog(){
|
|
|
|
- let _this=this;
|
|
|
|
- /*if(_this.labWhiteJoinSubList){
|
|
|
|
- _this.subjectList= _this.labWhiteJoinSubList
|
|
|
|
- _this.arr= _this.labWhiteJoinSubList
|
|
|
|
- _this.dialogVisible=false;
|
|
|
|
- }*/
|
|
|
|
},
|
|
},
|
|
//编辑查询人员信息
|
|
//编辑查询人员信息
|
|
- whitelistEdit(){
|
|
|
|
- whitelistEdit(this.pageData.id).then(response => {
|
|
|
|
|
|
+ laboratoryWhiteDetail(){
|
|
|
|
+ laboratoryWhiteDetail({whiteId:this.pageData.whiteId}).then(response => {
|
|
let data=response.data;
|
|
let data=response.data;
|
|
if(data.userId){
|
|
if(data.userId){
|
|
this.$set(this.form,'userIds',data.userName)
|
|
this.$set(this.form,'userIds',data.userName)
|
|
this.userSelectList(data.userName);
|
|
this.userSelectList(data.userName);
|
|
- //this.userList=data
|
|
|
|
let obj = {
|
|
let obj = {
|
|
deptId:data.deptId,
|
|
deptId:data.deptId,
|
|
deptName:data.deptName,
|
|
deptName:data.deptName,
|
|
@@ -346,43 +311,39 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//编辑-查询实验室信息
|
|
//编辑-查询实验室信息
|
|
- whitelistSubListEdit(){
|
|
|
|
- whitelistSubListEdit(this.pageData.userId).then(response => {
|
|
|
|
|
|
+ laboratoryWhiteSubList(){
|
|
|
|
+ laboratoryWhiteSubList({userId:this.pageData.userId}).then(response => {
|
|
if(response.code==200){
|
|
if(response.code==200){
|
|
- let data=response.rows;
|
|
|
|
- this.subjectList=data
|
|
|
|
|
|
+ this.$set(this,'subjectList',response.data);
|
|
}
|
|
}
|
|
-
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
/** 查询实验室列表 */
|
|
/** 查询实验室列表 */
|
|
getUserRoleBySub() {
|
|
getUserRoleBySub() {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
let _this=this;
|
|
let _this=this;
|
|
- getAllSubjectByParame(this.dialogForm).then(response => {
|
|
|
|
|
|
+ laboratorySubRelInfoSelectUserBySubPage(this.dialogForm).then(response => {
|
|
if(response.code==200){
|
|
if(response.code==200){
|
|
- this.dialogTable = response.rows;
|
|
|
|
- this.total = response.total;
|
|
|
|
|
|
+ this.$set(this,'dialogTable',response.data.records);
|
|
|
|
+ this.$set(this,'total',response.data.total);
|
|
this.loading = false;
|
|
this.loading = false;
|
|
if(_this.arr.length==0){
|
|
if(_this.arr.length==0){
|
|
_this.dialogTable.forEach(function (item,index){
|
|
_this.dialogTable.forEach(function (item,index){
|
|
_this.subjectList.forEach(function (item2,index2){
|
|
_this.subjectList.forEach(function (item2,index2){
|
|
- if(item.subjectId==item2.subjectId){
|
|
|
|
|
|
+ if(item.subId==item2.subId){
|
|
_this.arr.push(item)
|
|
_this.arr.push(item)
|
|
if(_this.$refs.multipleTable){
|
|
if(_this.$refs.multipleTable){
|
|
_this.$nextTick(() => {
|
|
_this.$nextTick(() => {
|
|
_this.$refs.multipleTable.toggleRowSelection(item,true);
|
|
_this.$refs.multipleTable.toggleRowSelection(item,true);
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
}else{
|
|
}else{
|
|
-
|
|
|
|
_this.dialogTable.forEach(function (item,index){
|
|
_this.dialogTable.forEach(function (item,index){
|
|
_this.arr.forEach(function (item2,index2){
|
|
_this.arr.forEach(function (item2,index2){
|
|
- if(item.subjectId==item2.subjectId){
|
|
|
|
|
|
+ if(item.subId==item2.subId){
|
|
if(_this.$refs.multipleTable){
|
|
if(_this.$refs.multipleTable){
|
|
_this.$nextTick(() => {
|
|
_this.$nextTick(() => {
|
|
_this.$refs.multipleTable.toggleRowSelection(item,true);
|
|
_this.$refs.multipleTable.toggleRowSelection(item,true);
|
|
@@ -393,13 +354,10 @@ export default {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
-
|
|
|
|
},
|
|
},
|
|
-
|
|
|
|
- // 上传按钮
|
|
|
|
|
|
+ // 提交按钮
|
|
upButton(){
|
|
upButton(){
|
|
let self = this;
|
|
let self = this;
|
|
if(!this.userList[0]){
|
|
if(!this.userList[0]){
|
|
@@ -411,25 +369,25 @@ export default {
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
type: "warning"
|
|
type: "warning"
|
|
}).then(function() {
|
|
}).then(function() {
|
|
- if(self.pageData.id){
|
|
|
|
- self.whitelistEditList();
|
|
|
|
|
|
+ if(self.pageData.whiteId){
|
|
|
|
+ self.laboratoryWhiteEditWhiteBySubJoin();
|
|
}else{
|
|
}else{
|
|
- self.whitelistAddList();
|
|
|
|
|
|
+ self.laboratoryWhiteAdd();
|
|
}
|
|
}
|
|
}).then(() => {}).catch(() => {});
|
|
}).then(() => {}).catch(() => {});
|
|
},
|
|
},
|
|
//新增提交
|
|
//新增提交
|
|
- whitelistAddList(){
|
|
|
|
|
|
+ laboratoryWhiteAdd(){
|
|
let self = this;
|
|
let self = this;
|
|
- let labWhiteJoinSubList=[];
|
|
|
|
|
|
+ let whiteJoinSubList=[];
|
|
self.subjectList.forEach(function (item,index){
|
|
self.subjectList.forEach(function (item,index){
|
|
- labWhiteJoinSubList.push({'subjectId':item.subjectId})
|
|
|
|
|
|
+ whiteJoinSubList.push({'subId':item.subId})
|
|
})
|
|
})
|
|
let obj = {
|
|
let obj = {
|
|
- labWhitelist:self.userList,
|
|
|
|
- labWhiteJoinSubList:labWhiteJoinSubList
|
|
|
|
|
|
+ whiteModelList:self.userList,
|
|
|
|
+ whiteJoinSubList:whiteJoinSubList
|
|
}
|
|
}
|
|
- whitelistAddList(obj).then(response => {
|
|
|
|
|
|
+ laboratoryWhiteAdd(obj).then(response => {
|
|
if(response.code==200){
|
|
if(response.code==200){
|
|
self.msgSuccess("操作成功")
|
|
self.msgSuccess("操作成功")
|
|
self.backPage();
|
|
self.backPage();
|
|
@@ -449,17 +407,17 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//编辑提交
|
|
//编辑提交
|
|
- whitelistEditList(){
|
|
|
|
- let labWhiteJoinSubList=[];
|
|
|
|
|
|
+ laboratoryWhiteEditWhiteBySubJoin(){
|
|
|
|
+ let whiteJoinSubList=[];
|
|
//循环取出实验室id
|
|
//循环取出实验室id
|
|
this.subjectList.forEach(function (item,index){
|
|
this.subjectList.forEach(function (item,index){
|
|
- labWhiteJoinSubList.push({'subjectId':item.subjectId})
|
|
|
|
|
|
+ whiteJoinSubList.push({'subId':item.subId})
|
|
})
|
|
})
|
|
let obj = {
|
|
let obj = {
|
|
- userId:this.userList[0].userId,
|
|
|
|
- labWhiteJoinSubList:labWhiteJoinSubList
|
|
|
|
|
|
+ whiteUserId:this.userList[0].userId,
|
|
|
|
+ labWhiteJoinsubModelList:whiteJoinSubList
|
|
}
|
|
}
|
|
- whitelistEditList(obj).then(response => {
|
|
|
|
|
|
+ laboratoryWhiteEditWhiteBySubJoin(obj).then(response => {
|
|
this.msgSuccess("操作成功")
|
|
this.msgSuccess("操作成功")
|
|
this.backPage();
|
|
this.backPage();
|
|
});
|
|
});
|
|
@@ -475,25 +433,20 @@ export default {
|
|
if(_this.$refs.multipleTable){
|
|
if(_this.$refs.multipleTable){
|
|
_this.$refs.multipleTable.toggleRowSelection(row,false);
|
|
_this.$refs.multipleTable.toggleRowSelection(row,false);
|
|
}
|
|
}
|
|
- //this.subjectList.splice(this.subjectList.indexOf(row),1);
|
|
|
|
let index = this.subjectList.indexOf(row);
|
|
let index = this.subjectList.indexOf(row);
|
|
if(index!=-1){
|
|
if(index!=-1){
|
|
this.subjectList.splice(index,1);
|
|
this.subjectList.splice(index,1);
|
|
return
|
|
return
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
_this.arr=[];
|
|
_this.arr=[];
|
|
_this.subjectList.forEach(function (item,index){
|
|
_this.subjectList.forEach(function (item,index){
|
|
_this.dialogTable.forEach(function (item2,index2){
|
|
_this.dialogTable.forEach(function (item2,index2){
|
|
- if(item.subjectId==item2.subjectId){
|
|
|
|
|
|
+ if(item.subId==item2.subId){
|
|
_this.arr.push(item2)
|
|
_this.arr.push(item2)
|
|
}else{
|
|
}else{
|
|
}
|
|
}
|
|
})
|
|
})
|
|
})
|
|
})
|
|
-
|
|
|
|
-
|
|
|
|
this.msgSuccess("删除成功");
|
|
this.msgSuccess("删除成功");
|
|
}).catch(() => {
|
|
}).catch(() => {
|
|
this.msgInfo("取消成功");
|
|
this.msgInfo("取消成功");
|
|
@@ -520,9 +473,9 @@ export default {
|
|
deptId:self.optionsUser[o].deptId,
|
|
deptId:self.optionsUser[o].deptId,
|
|
deptName:self.optionsUser[o].deptName,
|
|
deptName:self.optionsUser[o].deptName,
|
|
userId:self.optionsUser[o].userId,
|
|
userId:self.optionsUser[o].userId,
|
|
- userName:self.optionsUser[o].nickName,
|
|
|
|
- userNumber:self.optionsUser[o].userName,
|
|
|
|
- userTelephone:self.optionsUser[o].phonenumber,
|
|
|
|
|
|
+ userName:self.optionsUser[o].userName,
|
|
|
|
+ userNumber:self.optionsUser[o].account,
|
|
|
|
+ userTelephone:self.optionsUser[o].mobile,
|
|
userType:self.optionsUser[o].userType,
|
|
userType:self.optionsUser[o].userType,
|
|
}
|
|
}
|
|
self.userList.push(obj);
|
|
self.userList.push(obj);
|
|
@@ -540,15 +493,24 @@ export default {
|
|
userSelectList(query) {
|
|
userSelectList(query) {
|
|
if (query !== '' && query.length>1) {
|
|
if (query !== '' && query.length>1) {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- this.userSelectList.nickName=query;
|
|
|
|
- selectUserListByName(query).then(response => {
|
|
|
|
- this.optionsUser = response.data;
|
|
|
|
|
|
+ laboratoryWhiteSelectUserByNotWhite({userName:query}).then(response => {
|
|
|
|
+ this.$set(this,'optionsUser',response.data);
|
|
this.loading = false;
|
|
this.loading = false;
|
|
});
|
|
});
|
|
} else {
|
|
} else {
|
|
this.optionsUser = [];
|
|
this.optionsUser = [];
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ //查询楼栋/楼层数据
|
|
|
|
+ systemBuildingGetOptList(type,id){
|
|
|
|
+ systemBuildingGetOptList({type:type}).then(response => {
|
|
|
|
+ if(type == 2){
|
|
|
|
+ this.$set(this,'buildsDataList',response.data);
|
|
|
|
+ }else if(type == 3){
|
|
|
|
+ this.$set(this,'floorList',response.data);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
}
|
|
}
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -556,15 +518,21 @@ export default {
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
.add-whitelist {
|
|
.add-whitelist {
|
|
.form-max-box{
|
|
.form-max-box{
|
|
- padding:20px;
|
|
|
|
flex:1;
|
|
flex:1;
|
|
display: flex;
|
|
display: flex;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
.left-max-box{
|
|
.left-max-box{
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ overflow: hidden;
|
|
width:370px;
|
|
width:370px;
|
|
- margin-right:20px;
|
|
|
|
|
|
+ border-right:1px dashed #dedede;
|
|
|
|
+ padding-left:20px;
|
|
|
|
+ margin:20px 0;
|
|
.for-max-box{
|
|
.for-max-box{
|
|
|
|
+ flex: 1;
|
|
margin-left:40px;
|
|
margin-left:40px;
|
|
|
|
+ padding-right:20px;
|
|
.for-box{
|
|
.for-box{
|
|
border-radius:6px;
|
|
border-radius:6px;
|
|
background: rgba(1,131,250,0.2);
|
|
background: rgba(1,131,250,0.2);
|
|
@@ -590,89 +558,113 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.right-max-box{
|
|
.right-max-box{
|
|
|
|
+ padding:20px;
|
|
flex:1;
|
|
flex:1;
|
|
display: flex;
|
|
display: flex;
|
|
|
|
+ flex-direction: column;
|
|
overflow: hidden;
|
|
overflow: hidden;
|
|
position: relative;
|
|
position: relative;
|
|
- .right_t{
|
|
|
|
- position: absolute;
|
|
|
|
- right: 20px;
|
|
|
|
|
|
+ .right-table-button-box{
|
|
|
|
+ display: flex;
|
|
|
|
+ margin-bottom:20px;
|
|
|
|
+ .right-table-button-null-p{
|
|
|
|
+ flex:1;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
.right_b{
|
|
.right_b{
|
|
margin-top: 80px;
|
|
margin-top: 80px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-.btn_list{
|
|
|
|
- width: 100%;
|
|
|
|
- height: 40px;
|
|
|
|
- background: rgba(1,131,250,0.1);
|
|
|
|
- border-radius: 6px;
|
|
|
|
- display: flex;
|
|
|
|
- justify-content: flex-start;
|
|
|
|
- align-items: center;
|
|
|
|
- margin-bottom: 32px;
|
|
|
|
- >i{
|
|
|
|
- font-style: normal;
|
|
|
|
- display: inline-block;
|
|
|
|
- cursor: pointer;
|
|
|
|
- }
|
|
|
|
- >i:nth-of-type(1){
|
|
|
|
- font-size: 20px;
|
|
|
|
- color: #0045AF;
|
|
|
|
- margin: 0 16px 0 14px;
|
|
|
|
- }
|
|
|
|
- >i:nth-of-type(2){
|
|
|
|
- font-size: 16px;
|
|
|
|
- font-family: Source Han Sans CN;
|
|
|
|
- font-weight: bold;
|
|
|
|
- color: #999999;
|
|
|
|
- line-height: 16px;
|
|
|
|
- }
|
|
|
|
- >i:nth-of-type(3){
|
|
|
|
- font-size: 16px;
|
|
|
|
- font-family: Source Han Sans CN;
|
|
|
|
- font-weight: bold;
|
|
|
|
- color: #0045AF;
|
|
|
|
- line-height: 16px;
|
|
|
|
- margin: 0 28px 0 46px;
|
|
|
|
- }
|
|
|
|
- >i:nth-of-type(4){
|
|
|
|
- font-size: 16px;
|
|
|
|
- font-family: Source Han Sans CN;
|
|
|
|
- font-weight: bold;
|
|
|
|
- color: #0045AF;
|
|
|
|
- line-height: 16px;
|
|
|
|
- }
|
|
|
|
- >i:nth-of-type(5){
|
|
|
|
- font-size: 16px;
|
|
|
|
- font-family: Source Han Sans CN;
|
|
|
|
- font-weight: bold;
|
|
|
|
- color: #FFA312;
|
|
|
|
- line-height: 16px;
|
|
|
|
- margin: 0 40px 0 28px;
|
|
|
|
- }
|
|
|
|
- .bottom-button-box{
|
|
|
|
- display: flex;
|
|
|
|
- width:220px;
|
|
|
|
- margin: 0;
|
|
|
|
- p{
|
|
|
|
- font-size:14px;
|
|
|
|
- height:30px;
|
|
|
|
- width:100px;
|
|
|
|
- line-height:30px;
|
|
|
|
- text-align: center;
|
|
|
|
- border-radius:4px;
|
|
|
|
- }
|
|
|
|
- p:nth-child(1){
|
|
|
|
- border:1px solid #E0E0E0;
|
|
|
|
- margin-right:20px;
|
|
|
|
|
|
+</style>
|
|
|
|
+<style lang="scss">
|
|
|
|
+ .whiteListAdd-dialog{
|
|
|
|
+ .el-dialog__body{
|
|
|
|
+ padding:20px;
|
|
}
|
|
}
|
|
- p:nth-child(2){
|
|
|
|
- border:1px solid #0045AF;
|
|
|
|
|
|
+ .whiteListAdd-dialog-box{
|
|
|
|
+ height:600px;
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ .page-form-title-box{
|
|
|
|
+ height:60px;
|
|
|
|
+ padding:0;
|
|
|
|
+ }
|
|
|
|
+ .page-content-box{
|
|
|
|
+ padding:0;
|
|
|
|
+ }
|
|
|
|
+ .btn_list{
|
|
|
|
+ width: 100%;
|
|
|
|
+ height: 40px;
|
|
|
|
+ background: rgba(1,131,250,0.1);
|
|
|
|
+ border-radius: 6px;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
+ >i{
|
|
|
|
+ font-style: normal;
|
|
|
|
+ display: inline-block;
|
|
|
|
+ cursor: pointer;
|
|
|
|
+ }
|
|
|
|
+ >i:nth-of-type(1){
|
|
|
|
+ font-size: 20px;
|
|
|
|
+ color: #0045AF;
|
|
|
|
+ margin: 0 16px 0 14px;
|
|
|
|
+ }
|
|
|
|
+ >i:nth-of-type(2){
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ color: #999999;
|
|
|
|
+ line-height: 16px;
|
|
|
|
+ }
|
|
|
|
+ >i:nth-of-type(3){
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ color: #0045AF;
|
|
|
|
+ line-height: 16px;
|
|
|
|
+ margin: 0 28px 0 46px;
|
|
|
|
+ }
|
|
|
|
+ >i:nth-of-type(4){
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ color: #0045AF;
|
|
|
|
+ line-height: 16px;
|
|
|
|
+ }
|
|
|
|
+ >i:nth-of-type(5){
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-family: Source Han Sans CN;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ color: #FFA312;
|
|
|
|
+ line-height: 16px;
|
|
|
|
+ margin: 0 40px 0 28px;
|
|
|
|
+ }
|
|
|
|
+ .bottom-button-box{
|
|
|
|
+ display: flex;
|
|
|
|
+ width:220px;
|
|
|
|
+ margin: 0;
|
|
|
|
+ p{
|
|
|
|
+ font-size:14px;
|
|
|
|
+ height:30px;
|
|
|
|
+ width:100px;
|
|
|
|
+ line-height:30px;
|
|
|
|
+ text-align: center;
|
|
|
|
+ border-radius:4px;
|
|
|
|
+ }
|
|
|
|
+ p:nth-child(1){
|
|
|
|
+ border:1px solid #E0E0E0;
|
|
|
|
+ margin-right:20px;
|
|
|
|
+ }
|
|
|
|
+ p:nth-child(2){
|
|
|
|
+ border:1px solid #0045AF;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-}
|
|
|
|
</style>
|
|
</style>
|