|
@@ -119,7 +119,7 @@
|
|
|
<p v-if="lookInfoType">{{deptNumLeft}}</p>
|
|
|
</div>
|
|
|
<div class="dept-table-max-box">
|
|
|
- <el-form v-if="!lookInfoType" :model="deptQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
|
|
|
+ <el-form :model="deptQueryParamsLeft" class="form-box" ref="queryForm" :inline="true" label-width="50px">
|
|
|
<el-form-item label="" prop="searchValue" class="form-index">
|
|
|
<el-input
|
|
|
maxLength="30"
|
|
@@ -127,16 +127,25 @@
|
|
|
placeholder="搜索学院"
|
|
|
clearable
|
|
|
style="width: 240px">
|
|
|
- <p class="el-icon-search" slot="append" @click="deptGetListLeft"></p>
|
|
|
+ <p v-if="!lookInfoType" class="el-icon-search" slot="append" @click="deptGetListLeft"></p>
|
|
|
+ <p v-if="lookInfoType" class="el-icon-search" slot="append" @click="lookDeptLeftSearch"></p>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="margin-right:0;">
|
|
|
- <p class="inquire-button-one" @click="deptResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
|
|
|
+ <p v-if="!lookInfoType" class="inquire-button-one" @click="deptResetQueryLeft" style="width:60px;margin-right:0;">重置</p>
|
|
|
+ <p v-if="lookInfoType" class="inquire-button-one" @click="lookDeptLeftReset" style="width:60px;margin-right:0;">重置</p>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-table ref="leftDeptTable" border :data="deptTableListLeft" @select-all="deptChange" @select="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-column label="学院" align="center" prop="deptName" show-overflow-tooltip>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <div style="display: flex;">
|
|
|
+ <p style="flex:1;">{{scope.row.deptName}}</p>
|
|
|
+ <p style="width:80px;text-align: center">共{{scope.row.subNum}}间</p>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -146,7 +155,7 @@
|
|
|
<p></p>
|
|
|
</div>
|
|
|
<div class="dept-table-max-box">
|
|
|
- <el-form v-if="!lookInfoType" :model="deptQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
|
|
|
+ <el-form :model="deptQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
|
|
|
<el-form-item label="" prop="typeId">
|
|
|
<el-select v-model="deptQueryParamsRight.typeId" clearable placeholder="选择分类" style="width: 120px">
|
|
|
<el-option
|
|
@@ -184,11 +193,13 @@
|
|
|
placeholder="实验室/房间号"
|
|
|
clearable
|
|
|
style="width: 190px">
|
|
|
- <p class="el-icon-search" slot="append" @click="deptHandleQueryRight"></p>
|
|
|
+ <p v-if="!lookInfoType" class="el-icon-search" slot="append" @click="deptHandleQueryRight"></p>
|
|
|
+ <p v-if="lookInfoType" class="el-icon-search" slot="append" @click="lookDeptRightSearch"></p>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
<el-form-item style="margin-right:0;">
|
|
|
- <p class="inquire-button-one" @click="deptResetQueryRight" style="width:60px;margin-right:0;">重置</p>
|
|
|
+ <p v-if="!lookInfoType" class="inquire-button-one" @click="deptResetQueryRight" style="width:60px;margin-right:0;">重置</p>
|
|
|
+ <p v-if="lookInfoType" class="inquire-button-one" @click="lookDeptRightReset" style="width:60px;margin-right:0;">重置</p>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<el-table border :data="deptTableListRight">
|
|
@@ -297,7 +308,7 @@
|
|
|
<p v-if="lookInfoType">{{subTotalRight}}</p>
|
|
|
</div>
|
|
|
<div class="dept-table-max-box">
|
|
|
- <el-form v-if="!lookInfoType" :model="subQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
|
|
|
+ <el-form :model="subQueryParamsRight" class="form-box" ref="queryForm" :inline="true" label-width="50px">
|
|
|
<el-form-item label="" prop="typeId">
|
|
|
<el-select v-model="subQueryParamsRight.typeId" clearable placeholder="选择分类" style="width: 110px">
|
|
|
<el-option
|
|
@@ -720,6 +731,15 @@
|
|
|
}
|
|
|
self.$set(self,'deptTableListLeft',response.data);
|
|
|
self.$set(self,'deptTotalLeft',response.data.length);
|
|
|
+ self.$set(self,'changeDeptSelectList',response.data);
|
|
|
+ this.$set(this,'deptQueryParamsRight',{
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:20,
|
|
|
+ searchValue:"",
|
|
|
+ deptId:"",
|
|
|
+ level:"",
|
|
|
+ typeId:"",
|
|
|
+ });
|
|
|
let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
|
|
|
obj.deptIds = self.dialogForm.collegeIds;
|
|
|
findSubInfoByDeptIds(obj).then(response => {
|
|
@@ -1093,6 +1113,118 @@
|
|
|
}).then(() => {
|
|
|
}).catch(() => {});
|
|
|
},
|
|
|
+ //查看时学院左侧搜索
|
|
|
+ lookDeptLeftSearch(){
|
|
|
+ let self = this;
|
|
|
+ conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
|
|
|
+ let list = [];
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ for(let o=0;o<self.dialogForm.collegeIds.length;o++){
|
|
|
+ if(response.data[i].deptId == self.dialogForm.collegeIds[o] && response.data[i].deptName.indexOf(this.deptQueryParamsLeft.searchValue)!= -1){
|
|
|
+ list.push(response.data[i]);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ self.$set(self,'deptTableListLeft',list);
|
|
|
+ self.$set(self,'deptTotalLeft',list.length);
|
|
|
+ self.$set(self,'changeDeptSelectList',list);
|
|
|
+ this.$set(this,'deptQueryParamsRight',{
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:20,
|
|
|
+ searchValue:"",
|
|
|
+ deptId:"",
|
|
|
+ level:"",
|
|
|
+ typeId:"",
|
|
|
+ });
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
|
|
|
+ let ids = [];
|
|
|
+ for(let o=0;o<list.length;o++){
|
|
|
+ ids.push(list[o].deptId)
|
|
|
+ }
|
|
|
+ obj.deptIds = ids;
|
|
|
+ findSubInfoByDeptIds(obj).then(response => {
|
|
|
+ this.deptTotalRight = response.total;
|
|
|
+ this.deptTableListRight = response.rows;
|
|
|
+ this.$set(this.deptCheckData,'subNum',response.total);
|
|
|
+ this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //查看时学院左侧重置
|
|
|
+ lookDeptLeftReset(){
|
|
|
+ let self = this;
|
|
|
+ this.$set(this,'deptQueryParamsLeft',{ searchValue:"", });
|
|
|
+ conditionCollegeInfo(self.deptQueryParamsLeft).then(response => {
|
|
|
+ //查看时
|
|
|
+ for(let i=0;i<response.data.length;i++){
|
|
|
+ let num = 0;
|
|
|
+ for(let o=0;o<self.dialogForm.collegeIds.length;o++){
|
|
|
+ if(response.data[i].deptId == self.dialogForm.collegeIds[o]){
|
|
|
+ num++
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(num == 0){
|
|
|
+ response.data.splice(i,1);
|
|
|
+ i--
|
|
|
+ }
|
|
|
+ }
|
|
|
+ self.$set(self,'deptTableListLeft',response.data);
|
|
|
+ self.$set(self,'deptTotalLeft',response.data.length);
|
|
|
+ self.$set(self,'changeDeptSelectList',response.data);
|
|
|
+ this.$set(this,'deptQueryParamsRight',{
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:20,
|
|
|
+ searchValue:"",
|
|
|
+ deptId:"",
|
|
|
+ level:"",
|
|
|
+ typeId:"",
|
|
|
+ });
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
|
|
|
+ obj.deptIds = self.dialogForm.collegeIds;
|
|
|
+ findSubInfoByDeptIds(obj).then(response => {
|
|
|
+ this.deptTotalRight = response.total;
|
|
|
+ this.deptTableListRight = response.rows;
|
|
|
+ this.$set(this.deptCheckData,'subNum',response.total);
|
|
|
+ this.$set(this,'deptNumLeft',self.dialogForm.collegeIds.length);
|
|
|
+ });
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //查看时学院右侧搜索
|
|
|
+ lookDeptRightSearch(){
|
|
|
+ let self = this;
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
|
|
|
+ let ids = [];
|
|
|
+ for(let o=0;o<self.deptTableListLeft.length;o++){
|
|
|
+ ids.push(self.deptTableListLeft[o].deptId)
|
|
|
+ }
|
|
|
+ obj.deptIds = ids;
|
|
|
+ findSubInfoByDeptIds(obj).then(response => {
|
|
|
+ this.deptTotalRight = response.total;
|
|
|
+ this.deptTableListRight = response.rows;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ //查看时学院右侧重置
|
|
|
+ lookDeptRightReset(){
|
|
|
+ let self = this;
|
|
|
+ this.$set(this,'deptQueryParamsRight',{
|
|
|
+ pageNum:1,
|
|
|
+ pageSize:20,
|
|
|
+ searchValue:"",
|
|
|
+ deptId:"",
|
|
|
+ level:"",
|
|
|
+ typeId:"",
|
|
|
+ });
|
|
|
+ let obj = JSON.parse(JSON.stringify(this.deptQueryParamsRight));
|
|
|
+ let ids = [];
|
|
|
+ for(let o=0;o<self.deptTableListLeft.length;o++){
|
|
|
+ ids.push(self.deptTableListLeft[o].deptId)
|
|
|
+ }
|
|
|
+ obj.deptIds = ids;
|
|
|
+ findSubInfoByDeptIds(obj).then(response => {
|
|
|
+ this.deptTotalRight = response.total;
|
|
|
+ this.deptTableListRight = response.rows;
|
|
|
+ });
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|