|
@@ -43,10 +43,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="检查范围:" prop="data4">
|
|
|
+ <el-form-item label="检查范围:" prop="checkRange">
|
|
|
<div class="dialog-range-max-box">
|
|
|
<div class="dialog-range-select-box">
|
|
|
- <el-select :disabled="lookInfoType" v-model="dialogForm.data4" placeholder="请选择检查范围" style="width:450px;">
|
|
|
+ <el-select :disabled="lookInfoType" @change="rangeChange"
|
|
|
+ v-model="dialogForm.checkRange" placeholder="请选择检查范围" style="width:450px;">
|
|
|
<el-option
|
|
|
v-for="item in dialogRangeOptions"
|
|
|
:key="item.value"
|
|
@@ -56,10 +57,10 @@
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="dialog-range-text-box">
|
|
|
- <p class="inquire-button-one button-p" v-if="dialogForm.data4 == 2" @click="dialogClickType(2)">{{lookInfoType?'查看':'选择学院'}}</p>
|
|
|
- <p class="inquire-button-one button-p" v-if="dialogForm.data4 == 3" @click="dialogClickType(3)">{{lookInfoType?'查看':'选择实验室'}}</p>
|
|
|
- <p class="text-p" v-if="dialogForm.data4 == 2">已选择{{deptCheckNum}}个学院,共{{subCheckNum}}间实验室</p>
|
|
|
- <p class="text-p" v-if="dialogForm.data4 != 2">已选择{{subCheckNum}}间实验室</p>
|
|
|
+ <p class="inquire-button-one button-p" v-if="dialogForm.checkRange == 2" @click="dialogClickType(2)">{{lookInfoType?'查看':'选择学院'}}</p>
|
|
|
+ <p class="inquire-button-one button-p" v-if="dialogForm.checkRange == 3" @click="dialogClickType(3)">{{lookInfoType?'查看':'选择实验室'}}</p>
|
|
|
+ <p class="text-p" v-if="dialogForm.checkRange == 2">已选择{{deptCheckNum}}个学院,共{{deptSubCheckNum}}间实验室</p>
|
|
|
+ <p class="text-p" v-if="dialogForm.checkRange != 2">已选择{{subCheckNum}}间实验室</p>
|
|
|
</div>
|
|
|
</div>
|
|
|
</el-form-item>
|
|
@@ -122,8 +123,8 @@
|
|
|
</div>
|
|
|
<el-table border :data="dialogTableList">
|
|
|
<el-table-column label="序号" align="center" type="index" width="140"/>
|
|
|
- <el-table-column label="工号" align="center" prop="deptName" show-overflow-tooltip/>
|
|
|
- <el-table-column label="姓名" align="center" prop="deptName" show-overflow-tooltip width="150"/>
|
|
|
+ <el-table-column label="工号" align="center" prop="jobNum" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="姓名" align="center" prop="name" show-overflow-tooltip width="150"/>
|
|
|
<el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="150"/>
|
|
|
<el-table-column label="操作" align="center" prop="deptName" width="150" v-if="!lookInfoType">
|
|
|
<template slot-scope="scope">
|
|
@@ -164,7 +165,7 @@
|
|
|
<p class="inquire-button-one" @click="deptResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table border :data="deptTableListLeft" @selection-change="deptChange" :row-key="getRowKeys">
|
|
|
+ <el-table ref="leftDeptTable" border :data="deptTableListLeft" @selection-change="deptChange" :row-key="getDeptRowKeys">
|
|
|
<el-table-column v-if="!lookInfoType" type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
<el-table-column label="学院" align="center" prop="deptName" show-overflow-tooltip/>
|
|
|
</el-table>
|
|
@@ -201,9 +202,9 @@
|
|
|
<el-select v-model="deptQueryParamsRight.deptId" clearable placeholder="选择学院" style="width: 120px">
|
|
|
<el-option
|
|
|
v-for="item in deptSelectList"
|
|
|
- :key="item.key"
|
|
|
- :label="item.label"
|
|
|
- :value="item.key">
|
|
|
+ :key="item.deptId"
|
|
|
+ :label="item.deptName"
|
|
|
+ :value="item.deptId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -270,9 +271,9 @@
|
|
|
<el-select v-model="subQueryParamsLeft.deptId" clearable placeholder="学院" style="width: 80px">
|
|
|
<el-option
|
|
|
v-for="item in deptSelectList"
|
|
|
- :key="item.key"
|
|
|
- :label="item.label"
|
|
|
- :value="item.key">
|
|
|
+ :key="item.deptId"
|
|
|
+ :label="item.deptName"
|
|
|
+ :value="item.deptId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -290,7 +291,7 @@
|
|
|
<p class="inquire-button-one" @click="subResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table border :data="subTableListLeft" @selection-change="subChangeLeft" :row-key="getRowKeys">
|
|
|
+ <el-table border :data="subTableListLeft" @selection-change="subChangeLeft" :row-key="getSubRowKeys">
|
|
|
<el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
<el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip/>
|
|
|
<el-table-column label="分类分级" align="center" prop="deptName" show-overflow-tooltip width="120"/>
|
|
@@ -340,9 +341,9 @@
|
|
|
<el-select v-model="subQueryParamsRight.deptId" clearable placeholder="学院" style="width: 80px">
|
|
|
<el-option
|
|
|
v-for="item in deptSelectList"
|
|
|
- :key="item.key"
|
|
|
- :label="item.label"
|
|
|
- :value="item.key">
|
|
|
+ :key="item.deptId"
|
|
|
+ :label="item.deptName"
|
|
|
+ :value="item.deptId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
@@ -360,7 +361,7 @@
|
|
|
<p class="inquire-button-one" @click="subResetQueryRight" style="width:60px;margin-right:0;">重置</p>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table border :data="subTableListRight" @selection-change="subChangeRight" :row-key="getRowKeys">
|
|
|
+ <el-table border :data="subTableListRight" @selection-change="subChangeRight" :row-key="getSubRowKeys">
|
|
|
<el-table-column v-if="!lookInfoType" type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
<el-table-column label="实验室" align="center" prop="deptName" show-overflow-tooltip/>
|
|
|
<el-table-column label="分类分级" align="center" prop="deptName" show-overflow-tooltip width="120"/>
|
|
@@ -386,16 +387,16 @@
|
|
|
<el-form-item label="" prop="deptId">
|
|
|
<el-select v-model="userQueryParamsLeft.deptId" clearable placeholder="选择部门" style="width: 110px">
|
|
|
<el-option
|
|
|
- v-for="item in classTypeList"
|
|
|
- :key="item.key"
|
|
|
- :label="item.label"
|
|
|
- :value="item.key">
|
|
|
+ v-for="item in deptSelectList"
|
|
|
+ :key="item.deptId"
|
|
|
+ :label="item.deptName"
|
|
|
+ :value="item.deptId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="" prop="searchValue" class="form-index">
|
|
|
<el-input
|
|
|
- maxLength="30"
|
|
|
+ maxLength="20"
|
|
|
v-model="userQueryParamsLeft.searchValue"
|
|
|
placeholder="搜索姓名/工号"
|
|
|
clearable
|
|
@@ -404,20 +405,21 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="margin-right:0;">
|
|
|
- <p class="inquire-button-one" @click="userResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
|
|
|
+ <p class="reset-button-one" @click="userResetQueryLeft" style="width:60px;">重置</p>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
|
|
|
+ <el-table ref="leftUserTable" border :data="userTableListLeft" @selection-change="userChangeLeft" :row-key="getRowKeys">
|
|
|
<el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
- <el-table-column label="姓名" align="center" prop="deptName" show-overflow-tooltip/>
|
|
|
- <el-table-column label="工号" align="center" prop="deptName" show-overflow-tooltip width="150"/>
|
|
|
+ <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
|
|
|
<el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
|
|
|
</el-table>
|
|
|
- <pagination :page-sizes="[20, 30, 40, 50]"
|
|
|
+ <pagination layout="total, prev, pager, next, jumper"
|
|
|
v-show="userTotalLeft>0"
|
|
|
:total="userTotalLeft"
|
|
|
- :page.sync="userTableListLeft.pageNum"
|
|
|
- :limit.sync="userTableListLeft.pageSize"
|
|
|
+ :pager-count="5"
|
|
|
+ :page.sync="userQueryParamsLeft.pageNum"
|
|
|
+ :limit.sync="userQueryParamsLeft.pageSize"
|
|
|
@pagination="userGetListLeft"/>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -436,15 +438,15 @@
|
|
|
<el-select v-model="userQueryParamsRight.deptId" clearable placeholder="选择部门" style="width: 110px">
|
|
|
<el-option
|
|
|
v-for="item in deptSelectList"
|
|
|
- :key="item.key"
|
|
|
- :label="item.label"
|
|
|
- :value="item.key">
|
|
|
+ :key="item.deptId"
|
|
|
+ :label="item.deptName"
|
|
|
+ :value="item.deptId">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="" prop="searchValue" class="form-index">
|
|
|
<el-input
|
|
|
- maxLength="30"
|
|
|
+ maxLength="20"
|
|
|
v-model="userQueryParamsRight.searchValue"
|
|
|
placeholder="搜索姓名/工号"
|
|
|
clearable
|
|
@@ -453,20 +455,21 @@
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="margin-right:0;">
|
|
|
- <p class="inquire-button-one" @click="userResetQueryRight" style="width:60px;margin-right:0;">重置</p>
|
|
|
+ <p class="reset-button-one" @click="userResetQueryRight" style="width:60px;">重置</p>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
- <el-table border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
|
|
|
+ <el-table ref="rightUserTable" border :data="userTableListRight" @selection-change="userChangeRight" :row-key="getRowKeys">
|
|
|
<el-table-column type="selection" width="50" :reserve-selection="true" align="center"/>
|
|
|
- <el-table-column label="姓名" align="center" prop="deptName" show-overflow-tooltip/>
|
|
|
- <el-table-column label="工号" align="center" prop="deptName" show-overflow-tooltip width="150"/>
|
|
|
+ <el-table-column label="姓名" align="center" prop="nickName" show-overflow-tooltip/>
|
|
|
+ <el-table-column label="工号" align="center" prop="userName" show-overflow-tooltip width="150"/>
|
|
|
<el-table-column label="所在部门" align="center" prop="deptName" show-overflow-tooltip width="168"/>
|
|
|
</el-table>
|
|
|
- <pagination :page-sizes="[20, 30, 40, 50]"
|
|
|
+ <pagination layout="total, prev, pager, next, jumper"
|
|
|
v-show="userTotalRight>0"
|
|
|
:total="userTotalRight"
|
|
|
- :page.sync="userTableListRight.pageNum"
|
|
|
- :limit.sync="userTableListRight.pageSize"
|
|
|
+ :pager-count="5"
|
|
|
+ :page.sync="userQueryParamsRight.pageNum"
|
|
|
+ :limit.sync="userQueryParamsRight.pageSize"
|
|
|
@pagination="userGetListRight"/>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -480,7 +483,7 @@
|
|
|
<div slot="footer" class="dialog-footer dialog-footer-box" style="display: flex">
|
|
|
<p class="dialog-footer-button-null"></p>
|
|
|
<p class="dialog-footer-button-info" @click="addDialogOff">{{addDialogBoxType==1?'取消':'返回'}}</p>
|
|
|
- <p class="dialog-footer-button-primary" v-if="!lookInfoType">确定</p>
|
|
|
+ <p class="dialog-footer-button-primary" v-if="!lookInfoType" @click="addUserButton">确定</p>
|
|
|
<p class="dialog-footer-button-null"></p>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -488,7 +491,8 @@
|
|
|
|
|
|
<script>
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
- import { getHistoryPlanTitles,findGroupList,checkGroupFind } from '@/api/safetyCheck/index'
|
|
|
+ import { listDepartments } from "@/api/system/dept";
|
|
|
+ import { getHistoryPlanTitles,findGroupList,checkGroupFind,findUserList,getAllSubNum,conditionCollegeInfo,findSubInfoByDeptIds } from '@/api/safetyCheck/index'
|
|
|
export default {
|
|
|
name: 'addDialog',
|
|
|
props:{
|
|
@@ -533,6 +537,7 @@
|
|
|
dialogRangeOptions:[{label:"全校",value:"1"},{label:"学院",value:"2"},{label:"实验室",value:"3"}],
|
|
|
//巡查院系数量
|
|
|
deptCheckNum:0,
|
|
|
+ deptSubCheckNum:0,
|
|
|
//巡查院系列表
|
|
|
deptList:[],
|
|
|
//巡查实验室数量
|
|
@@ -544,7 +549,7 @@
|
|
|
data1:"",
|
|
|
data2:"",
|
|
|
data3:[],
|
|
|
- data4:"1",
|
|
|
+ checkRange:"",
|
|
|
data5:"",
|
|
|
data6:"",
|
|
|
},
|
|
@@ -557,7 +562,7 @@
|
|
|
data3: [
|
|
|
{ required: true, message: "请选择检查周期", trigger: "change" },
|
|
|
],
|
|
|
- data4: [
|
|
|
+ checkRange: [
|
|
|
{ required: true, message: "请选择检查范围", trigger: "change" },
|
|
|
],
|
|
|
},
|
|
@@ -574,7 +579,13 @@
|
|
|
deptTotalLeft:0,
|
|
|
deptNumLeft:0,
|
|
|
deptIdsLeft:[],
|
|
|
- deptQueryParamsRight:{},
|
|
|
+ deptQueryParamsRight:{
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:20,
|
|
|
+ deptId:"",
|
|
|
+ level:"",
|
|
|
+ searchValue:"",
|
|
|
+ },
|
|
|
deptTableListRight:[{}],
|
|
|
deptTotalRight:0,
|
|
|
/*===================================实验室选择相关===================================*/
|
|
@@ -600,21 +611,28 @@
|
|
|
subIdsRight:[],
|
|
|
/*===================================人员选择相关===================================*/
|
|
|
userQueryParamsLeft:{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
deptId:"",
|
|
|
searchValue:"",
|
|
|
+ filtType:1
|
|
|
},
|
|
|
- userTableListLeft:[{}],
|
|
|
+ userTableListLeft:[],
|
|
|
userTotalLeft:0,
|
|
|
userNumLeft:0,
|
|
|
userIdsLeft:[],
|
|
|
userQueryParamsRight:{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
deptId:"",
|
|
|
searchValue:"",
|
|
|
+ filtType:2
|
|
|
},
|
|
|
- userTableListRight:[{}],
|
|
|
+ userTableListRight:[],
|
|
|
userTotalRight:0,
|
|
|
userNumRight:0,
|
|
|
userIdsRight:[],
|
|
|
+ dialogTableDataList:[],
|
|
|
/*===================================文档预览===================================*/
|
|
|
iframeSrc:"",
|
|
|
/*===================================弹窗相关结束===================================*/
|
|
@@ -648,13 +666,71 @@
|
|
|
findGroupList({checkLevel:0}).then(response => {
|
|
|
this.$set(this,'dialogOptions',response.data);
|
|
|
});
|
|
|
+ //获取学院列表
|
|
|
+ listDepartments().then(response => {
|
|
|
+ this.deptSelectList = response.data;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //选中检查范围
|
|
|
+ rangeChange(val){
|
|
|
+ if(val == 1){
|
|
|
+ //全校
|
|
|
+ getAllSubNum().then(response => {
|
|
|
+ this.$set(this,'subCheckNum',response.data.subCount);
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
//选中巡察组
|
|
|
groupChange(val){
|
|
|
- checkGroupFind({id:val}).then(response => {
|
|
|
+ checkGroupFind({id:val,selectEnable:1}).then(response => {
|
|
|
this.$set(this,'dialogTableList',response.data.checkGroupMemberList);
|
|
|
});
|
|
|
},
|
|
|
+ //确定
|
|
|
+ addUserButton(){
|
|
|
+ let self = this;
|
|
|
+ if(this.addDialogBoxType == 1){
|
|
|
+
|
|
|
+ }else if(this.addDialogBoxType == 4){
|
|
|
+ //人员选择确定
|
|
|
+ let list = [];
|
|
|
+ let newObj = {};
|
|
|
+ for(let o=0;o<self.dialogTableDataList.length;o++){
|
|
|
+ let num = 0;
|
|
|
+ for(let i=0;i<self.dialogTableList.length;i++){
|
|
|
+ if(self.dialogTableList[i].userId == self.dialogTableDataList[o].userId){
|
|
|
+ num++
|
|
|
+ newObj = JSON.parse(JSON.stringify(self.dialogTableList[i]))
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(num == 0){
|
|
|
+ let obj = {
|
|
|
+ userId:self.dialogTableDataList[o].userId,
|
|
|
+ name:self.dialogTableDataList[o].name,
|
|
|
+ jobNum:self.dialogTableDataList[o].jobNum,
|
|
|
+ deptName:self.dialogTableDataList[o].deptName,
|
|
|
+ deptId:self.dialogTableDataList[o].deptId,
|
|
|
+ userType:self.dialogTableDataList[o].userType,
|
|
|
+ enable:1,
|
|
|
+ };
|
|
|
+ list.push(obj)
|
|
|
+ }else{
|
|
|
+ let obj = {
|
|
|
+ userId:self.dialogTableDataList[o].userId,
|
|
|
+ name:self.dialogTableDataList[o].name,
|
|
|
+ jobNum:self.dialogTableDataList[o].jobNum,
|
|
|
+ deptName:self.dialogTableDataList[o].deptName,
|
|
|
+ deptId:self.dialogTableDataList[o].deptId,
|
|
|
+ userType:self.dialogTableDataList[o].userType,
|
|
|
+ enable:newObj.enable,
|
|
|
+ };
|
|
|
+ list.push(obj)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this,'dialogTableList',list);
|
|
|
+ this.dialogClickType(1);
|
|
|
+ }
|
|
|
+ },
|
|
|
/*===================================弹窗相关===================================*/
|
|
|
//弹窗关闭
|
|
|
addDialogAllOff(){
|
|
@@ -669,9 +745,23 @@
|
|
|
},
|
|
|
//弹窗状态切换
|
|
|
dialogClickType(type,item){
|
|
|
+ let self = this;
|
|
|
if(type == 5){
|
|
|
this.$set(this,'iframeSrc',this.urlJudge(item.url));
|
|
|
this.$set(this,'addDialogBoxType',type);
|
|
|
+ }else if(type == 4){
|
|
|
+ //添加成员
|
|
|
+ this.$set(self,'dialogTableDataList',JSON.parse(JSON.stringify(this.dialogTableList)));
|
|
|
+ this.userResetQueryLeft();
|
|
|
+ this.userResetQueryRight();
|
|
|
+ this.$set(this,'addDialogBoxType',type);
|
|
|
+ }else if(type == 2){
|
|
|
+ //选择学院
|
|
|
+ this.deptResetQueryLeft();
|
|
|
+ this.$set(this,'addDialogBoxType',type);
|
|
|
+ }else if(type == 3){
|
|
|
+ //选择实验室
|
|
|
+ this.$set(this,'addDialogBoxType',type);
|
|
|
}else{
|
|
|
this.$set(this,'addDialogBoxType',type);
|
|
|
}
|
|
@@ -739,25 +829,25 @@
|
|
|
//重置
|
|
|
deptResetQueryLeft(){
|
|
|
this.$set(this,'deptQueryParamsLeft',{ searchValue:"", });
|
|
|
+ this.$set(this,'deptNumLeft',0);
|
|
|
+ this.$set(this,'deptIdsLeft',[]);
|
|
|
+ this.$refs.leftDeptTable.clearSelection();
|
|
|
this.deptGetListLeft();
|
|
|
},
|
|
|
//查询接口
|
|
|
deptGetListLeft(){
|
|
|
-
|
|
|
+ conditionCollegeInfo(this.deptQueryParamsLeft).then(response => {
|
|
|
+ this.$set(this,'deptTableListLeft',response.data);
|
|
|
+ this.$set(this,'deptTotalLeft',response.data.length);
|
|
|
+ })
|
|
|
},
|
|
|
//查询
|
|
|
deptHandleQueryRight(){
|
|
|
- this.$set(this.deptQueryParamsRight,'pageNum',1);
|
|
|
this.deptGetListRight();
|
|
|
},
|
|
|
//重置
|
|
|
deptResetQueryRight(){
|
|
|
this.$set(this,'deptQueryParamsRight',{
|
|
|
- pageNum:1,
|
|
|
- pageSize:20,
|
|
|
- classType:"",
|
|
|
- classified:"",
|
|
|
- deptId:"",
|
|
|
searchValue:"",
|
|
|
});
|
|
|
this.deptHandleQueryRight();
|
|
@@ -765,6 +855,12 @@
|
|
|
//查询接口
|
|
|
deptGetListRight(){
|
|
|
|
|
|
+ console.log('selection',selection);
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
|
|
|
+ findSubInfoByDeptIds(obj).then(response => {
|
|
|
+ this.userTotalLeft = response.total;
|
|
|
+ this.userTableListLeft = response.rows;
|
|
|
+ });
|
|
|
},
|
|
|
/*===================================实验室选择相关===================================*/
|
|
|
//查询
|
|
@@ -817,46 +913,114 @@
|
|
|
//查询
|
|
|
userHandleQueryLeft(){
|
|
|
this.$set(this.userQueryParamsLeft,'pageNum',1);
|
|
|
+ this.$set(this,'userNumLeft',0);
|
|
|
+ this.$set(this,'userIdsLeft',[]);
|
|
|
+ this.$refs.leftUserTable.clearSelection();
|
|
|
this.userGetListLeft();
|
|
|
},
|
|
|
//重置
|
|
|
userResetQueryLeft(){
|
|
|
- this.$set(this,'userQueryParamsLeft',{ searchValue:"", });
|
|
|
+ this.$set(this,'userQueryParamsLeft',{
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ deptId:"",
|
|
|
+ searchValue:"",
|
|
|
+ filtType:1
|
|
|
+ });
|
|
|
this.userHandleQueryLeft();
|
|
|
},
|
|
|
//查询接口
|
|
|
userGetListLeft(){
|
|
|
-
|
|
|
+ let self = this;
|
|
|
+ let leftObj = JSON.parse(JSON.stringify(this.userQueryParamsLeft));
|
|
|
+ leftObj.selectedUserIds = [];
|
|
|
+ for(let i=0;i<self.dialogTableDataList.length;i++){
|
|
|
+ leftObj.selectedUserIds.push(self.dialogTableDataList[i].userId);
|
|
|
+ }
|
|
|
+ findUserList(leftObj).then(response => {
|
|
|
+ this.userTotalLeft = response.total;
|
|
|
+ this.userTableListLeft = response.rows;
|
|
|
+ });
|
|
|
},
|
|
|
//查询
|
|
|
userHandleQueryRight(){
|
|
|
this.$set(this.userQueryParamsRight,'pageNum',1);
|
|
|
+ this.$set(this,'userNumRight',0);
|
|
|
+ this.$set(this,'userIdsRight',[]);
|
|
|
+ this.$refs.rightUserTable.clearSelection();
|
|
|
this.userGetListRight();
|
|
|
},
|
|
|
//重置
|
|
|
userResetQueryRight(){
|
|
|
this.$set(this,'userQueryParamsRight',{
|
|
|
- pageNum:1,
|
|
|
- pageSize:20,
|
|
|
- classType:"",
|
|
|
- classified:"",
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 20,
|
|
|
deptId:"",
|
|
|
searchValue:"",
|
|
|
+ filtType:2
|
|
|
});
|
|
|
this.userHandleQueryRight();
|
|
|
},
|
|
|
//查询接口
|
|
|
userGetListRight(){
|
|
|
-
|
|
|
+ let self = this;
|
|
|
+ let rightObj = JSON.parse(JSON.stringify(this.userQueryParamsRight));
|
|
|
+ rightObj.userIds = [];
|
|
|
+ for(let i=0;i<self.dialogTableDataList.length;i++){
|
|
|
+ rightObj.userIds.push(self.dialogTableDataList[i].userId);
|
|
|
+ }
|
|
|
+ findUserList(rightObj).then(response => {
|
|
|
+ this.userTotalRight = response.total;
|
|
|
+ this.userTableListRight = response.rows;
|
|
|
+ });
|
|
|
},
|
|
|
+ //穿梭按钮
|
|
|
userArrowButton(type){
|
|
|
+ let self = this;
|
|
|
if(type == 1){
|
|
|
+ //右至左
|
|
|
if(this.userIdsRight[0]){
|
|
|
-
|
|
|
+ let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
|
|
|
+ for(let i=0;i<self.userIdsRight.length;i++){
|
|
|
+ for(let s=0;s<list.length;s++){
|
|
|
+ if(self.userIdsRight[i] == list[s].userId){
|
|
|
+ list.splice(s,1);
|
|
|
+ s--
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this,'dialogTableDataList',list);
|
|
|
+ this.$refs.rightUserTable.clearSelection();
|
|
|
+ this.userGetListLeft();
|
|
|
+ this.userGetListRight();
|
|
|
+ }else{
|
|
|
+ this.msgError('请先勾选右侧列表')
|
|
|
}
|
|
|
}else if(type == 2){
|
|
|
+ //左至右
|
|
|
if(this.userIdsLeft[0]){
|
|
|
-
|
|
|
+ let list = JSON.parse(JSON.stringify(this.dialogTableDataList));
|
|
|
+ for(let i=0;i<self.userIdsLeft.length;i++){
|
|
|
+ for(let o=0;o<self.userTableListLeft.length;o++){
|
|
|
+ if(self.userIdsLeft[i] == self.userTableListLeft[o].userId){
|
|
|
+ let obj = {
|
|
|
+ userId:self.userTableListLeft[o].userId,
|
|
|
+ name:self.userTableListLeft[o].nickName,
|
|
|
+ jobNum:self.userTableListLeft[o].userName,
|
|
|
+ deptName:self.userTableListLeft[o].deptName,
|
|
|
+ deptId:self.userTableListLeft[o].deptId,
|
|
|
+ userType:self.userTableListLeft[o].userType,
|
|
|
+ }
|
|
|
+ list.push(obj);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$set(this,'dialogTableDataList',list);
|
|
|
+ this.$refs.leftUserTable.clearSelection();
|
|
|
+ this.userGetListLeft();
|
|
|
+ this.userGetListRight();
|
|
|
+ }else{
|
|
|
+ this.msgError('请先勾选左侧列表')
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -900,6 +1064,12 @@
|
|
|
getRowKeys(row) {
|
|
|
return row.userId
|
|
|
},
|
|
|
+ getDeptRowKeys(row) {
|
|
|
+ return row.deptId
|
|
|
+ },
|
|
|
+ getSubRowKeys(row) {
|
|
|
+ return row.subId
|
|
|
+ },
|
|
|
deptChange(selection){
|
|
|
this.deptNumLeft = selection.length;
|
|
|
this.deptIdsLeft = selection.map(item => item.userId);
|