|
@@ -33,7 +33,7 @@
|
|
<p class="flex-p"></p>
|
|
<p class="flex-p"></p>
|
|
<!--<p class="all-button add-button-one-90" @click="allButton">{{allButtonType?'取消全选':'全选'}}</p>-->
|
|
<!--<p class="all-button add-button-one-90" @click="allButton">{{allButtonType?'取消全选':'全选'}}</p>-->
|
|
<p class="add-button page-submit-common-style-button" @click="addButton"
|
|
<p class="add-button page-submit-common-style-button" @click="addButton"
|
|
- v-hasPermiRouter="['laboratory:duty:add']">+ 新增</p>
|
|
|
|
|
|
+ v-hasPermiRouter="['laboratory:duty:add']">新增</p>
|
|
</div>
|
|
</div>
|
|
<div class="month-max-big-box scrollbar-box" v-if="yearMonthType === 1">
|
|
<div class="month-max-big-box scrollbar-box" v-if="yearMonthType === 1">
|
|
<div class="month-week-box">
|
|
<div class="month-week-box">
|
|
@@ -93,6 +93,7 @@
|
|
<el-form :model="formData" ref="upForm" :rules="rules">
|
|
<el-form :model="formData" ref="upForm" :rules="rules">
|
|
<el-form-item label="实验室:" prop="subCheckList" class="form-item" label-width="80px">
|
|
<el-form-item label="实验室:" prop="subCheckList" class="form-item" label-width="80px">
|
|
<el-cascader
|
|
<el-cascader
|
|
|
|
+ style="width:400px;"
|
|
@change="cascaderChange"
|
|
@change="cascaderChange"
|
|
ref="subCascader"
|
|
ref="subCascader"
|
|
v-model="formData.subCheckList"
|
|
v-model="formData.subCheckList"
|
|
@@ -131,15 +132,15 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<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-inquire-common-style-button" @click="handleQuery">查询</p>
|
|
|
|
+ <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-form>
|
|
</el-form>
|
|
- <el-table v-loading="loading" border :data="dataList">
|
|
|
|
|
|
+ <el-table class="table-box" v-loading="loading" border :data="dataList">
|
|
<el-table-column label="姓名" align="left" prop="nickName" show-overflow-tooltip/>
|
|
<el-table-column label="姓名" align="left" prop="nickName" show-overflow-tooltip/>
|
|
<el-table-column label="类别" align="left" prop="userType" width="124" show-overflow-tooltip>
|
|
<el-table-column label="类别" align="left" prop="userType" width="124" show-overflow-tooltip>
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{scope.row.userType ==11?'教职工':(scope.row.userType ==22?'学生':'未定义')}}</span>
|
|
|
|
|
|
+ <span>{{scope.row.userType ==1?'教职工':(scope.row.userType ==2?'学生':'未定义')}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="电话" align="left" prop="phonenumber" width="227" show-overflow-tooltip/>
|
|
<el-table-column label="电话" align="left" prop="phonenumber" width="227" show-overflow-tooltip/>
|
|
@@ -166,7 +167,7 @@
|
|
<p class="bottom-dialog-right-title-p">已选择人员({{userCheckList.length}}人)</p>
|
|
<p class="bottom-dialog-right-title-p">已选择人员({{userCheckList.length}}人)</p>
|
|
<div class="bottom-dialog-right-for-max-box scrollbar-box">
|
|
<div class="bottom-dialog-right-for-max-box scrollbar-box">
|
|
<div class="bottom-dialog-right-for-box" v-for="(item,index) in userCheckList" :key="index">
|
|
<div class="bottom-dialog-right-for-box" v-for="(item,index) in userCheckList" :key="index">
|
|
- <p>{{item.nickName}}({{item.userType==11?'教职工':(item.userType==22?'学生':'未定义')}})</p>
|
|
|
|
|
|
+ <p>{{item.nickName}}({{item.userType==1?'教职工':(item.userType==2?'学生':'未定义')}})</p>
|
|
<p class="el-icon-delete" @click="deleteDataButton(item,index)"></p>
|
|
<p class="el-icon-delete" @click="deleteDataButton(item,index)"></p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -181,10 +182,11 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import { getListYmd,addXxpDuty,treeDeptSubSel,getUserDutyList } from '@/apiDemo/laboratory/onDutyConfiguration'
|
|
|
|
|
|
+ import { addXxpDuty,getUserDutyList } from '@/apiDemo/laboratory/onDutyConfiguration'
|
|
import infoPage from "./infoPage.vue";
|
|
import infoPage from "./infoPage.vue";
|
|
// V3
|
|
// V3
|
|
import { systemDeptOrganizeStructureByDept } from "@/api/commonality/permission";
|
|
import { systemDeptOrganizeStructureByDept } from "@/api/commonality/permission";
|
|
|
|
+ import { laboratoryXxpDutyListYmd,laboratorySubRelInfoGetDeptInSubList } from '@/api/integratedManagement/index'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: 'index',
|
|
name: 'index',
|
|
@@ -275,8 +277,8 @@
|
|
loading:false,
|
|
loading:false,
|
|
total:0,
|
|
total:0,
|
|
classOptions:[
|
|
classOptions:[
|
|
- {key:'22',value:'学生'},
|
|
|
|
- {key:'11',value:'教职工'},
|
|
|
|
|
|
+ {key:'2',value:'学生'},
|
|
|
|
+ {key:'1',value:'教职工'},
|
|
],
|
|
],
|
|
queryParams:{
|
|
queryParams:{
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -379,8 +381,8 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//获取树状实验室列表
|
|
//获取树状实验室列表
|
|
- treeDeptSubSel(){
|
|
|
|
- treeDeptSubSel().then( response => {
|
|
|
|
|
|
+ laboratorySubRelInfoGetDeptInSubList(){
|
|
|
|
+ laboratorySubRelInfoGetDeptInSubList({}).then( response => {
|
|
this.options = response.data;
|
|
this.options = response.data;
|
|
this.listForDel(this.options);
|
|
this.listForDel(this.options);
|
|
})
|
|
})
|
|
@@ -428,7 +430,6 @@
|
|
};
|
|
};
|
|
let subList = this.$refs.subCascader.getCheckedNodes()
|
|
let subList = this.$refs.subCascader.getCheckedNodes()
|
|
subList.forEach(item=>{
|
|
subList.forEach(item=>{
|
|
- console.log('item',item);
|
|
|
|
if(!item.children[0]){
|
|
if(!item.children[0]){
|
|
obj.subjectList.push({
|
|
obj.subjectList.push({
|
|
id:item.data.subOrDeptId,
|
|
id:item.data.subOrDeptId,
|
|
@@ -466,21 +467,19 @@
|
|
},
|
|
},
|
|
/************************日历页面**************************/
|
|
/************************日历页面**************************/
|
|
//查询值班列表
|
|
//查询值班列表
|
|
- getListYmd(){
|
|
|
|
|
|
+ laboratoryXxpDutyListYmd(){
|
|
let self = this;
|
|
let self = this;
|
|
let obj = {
|
|
let obj = {
|
|
deptId:this.checkTreeId,
|
|
deptId:this.checkTreeId,
|
|
- // beginTime:this.yearDate[0].list[0].value,
|
|
|
|
- beginTime:"",
|
|
|
|
- // endTime:this.yearDate[this.yearDate.length-1].list[this.yearDate[this.yearDate.length-1].list.length-1].value,
|
|
|
|
- endTime:"",
|
|
|
|
|
|
+ beginTimeStr:"",
|
|
|
|
+ endTimeStr:"",
|
|
};
|
|
};
|
|
if(this.yearMonthType == 1){
|
|
if(this.yearMonthType == 1){
|
|
for(let i=0;i<self.yearDate.length;i++){
|
|
for(let i=0;i<self.yearDate.length;i++){
|
|
if(self.yearDate[i].year == self.yearMonthData.year &&
|
|
if(self.yearDate[i].year == self.yearMonthData.year &&
|
|
self.yearDate[i].month == self.yearMonthData.month){
|
|
self.yearDate[i].month == self.yearMonthData.month){
|
|
- obj.beginTime = self.yearDate[i].list[0].value;
|
|
|
|
- obj.endTime = self.yearDate[i].list[self.yearDate[i].list.length-1].value;
|
|
|
|
|
|
+ obj.beginTimeStr = self.yearDate[i].list[0].value;
|
|
|
|
+ obj.endTimeStr = self.yearDate[i].list[self.yearDate[i].list.length-1].value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}else if(this.yearMonthType == 2){
|
|
}else if(this.yearMonthType == 2){
|
|
@@ -490,10 +489,10 @@
|
|
list.push(self.yearDate[i]);
|
|
list.push(self.yearDate[i]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- obj.beginTime = list[0].list[0].value;
|
|
|
|
- obj.endTime = list[list.length-1].list[list[list.length-1].list.length-1].value;
|
|
|
|
|
|
+ obj.beginTimeStr = list[0].list[0].value;
|
|
|
|
+ obj.endTimeStr = list[list.length-1].list[list[list.length-1].list.length-1].value;
|
|
}
|
|
}
|
|
- getListYmd(obj).then(response => {
|
|
|
|
|
|
+ laboratoryXxpDutyListYmd(obj).then(response => {
|
|
for(let o=0;o<self.yearDate.length;o++){
|
|
for(let o=0;o<self.yearDate.length;o++){
|
|
for(let x=0;x<self.yearDate[o].list.length;x++){
|
|
for(let x=0;x<self.yearDate[o].list.length;x++){
|
|
let subSum = 0;
|
|
let subSum = 0;
|
|
@@ -508,22 +507,6 @@
|
|
self.yearDate[o].list[x].userSum = userSum
|
|
self.yearDate[o].list[x].userSum = userSum
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
- // for(let i=0;i<response.rows.length;i++){
|
|
|
|
- // let year = parseInt(response.rows[i].dutyTime.split('-')[0]);
|
|
|
|
- // let month = parseInt(response.rows[i].dutyTime.split('-')[1]);
|
|
|
|
- // for(let o=0;o<self.yearDate.length;o++){
|
|
|
|
- // if(self.yearDate[o].year == year && self.yearDate[o].month == month){
|
|
|
|
- // for(let x=0;x<self.yearDate[o].list.length;x++){
|
|
|
|
- // if(self.yearDate[o].list[x].value == response.rows[i].dutyTime){
|
|
|
|
- // self.yearDate[o].list[x].subSum = response.rows[i].subSum
|
|
|
|
- // self.yearDate[o].list[x].userSum = response.rows[i].userSum
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
- // }
|
|
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//时间初始化
|
|
//时间初始化
|
|
@@ -542,7 +525,7 @@
|
|
if(this.generateDate()){
|
|
if(this.generateDate()){
|
|
//后端数据回填
|
|
//后端数据回填
|
|
this.allCheckJudgment();
|
|
this.allCheckJudgment();
|
|
- this.getListYmd();
|
|
|
|
|
|
+ this.laboratoryXxpDutyListYmd();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
/** 查询部门下拉树结构 */
|
|
/** 查询部门下拉树结构 */
|
|
@@ -566,15 +549,15 @@
|
|
},
|
|
},
|
|
// 节点单击事件
|
|
// 节点单击事件
|
|
handleNodeClick(data) {
|
|
handleNodeClick(data) {
|
|
- if(data.id != this.checkTreeId){
|
|
|
|
- this.$set(this,'checkTreeId',data.id);
|
|
|
|
|
|
+ if(data.deptId != this.checkTreeId){
|
|
|
|
+ this.$set(this,'checkTreeId',data.deptId);
|
|
this.initializationDate();
|
|
this.initializationDate();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//页面切换
|
|
//页面切换
|
|
goPage(type,item){
|
|
goPage(type,item){
|
|
if(type == 'get'){
|
|
if(type == 'get'){
|
|
- this.getListYmd();
|
|
|
|
|
|
+ this.laboratoryXxpDutyListYmd();
|
|
this.$set(this,'pageType',1)
|
|
this.$set(this,'pageType',1)
|
|
}else if(type=='info'){
|
|
}else if(type=='info'){
|
|
if(!this.hasPermiDom(['laboratory:duty:query'])){
|
|
if(!this.hasPermiDom(['laboratory:duty:query'])){
|
|
@@ -698,7 +681,7 @@
|
|
this.$set(this.formData,'subCheckList',[]);
|
|
this.$set(this.formData,'subCheckList',[]);
|
|
this.$set(this,'checkList',list);
|
|
this.$set(this,'checkList',list);
|
|
// this.resetQuery();
|
|
// this.resetQuery();
|
|
- this.treeDeptSubSel();
|
|
|
|
|
|
+ this.laboratorySubRelInfoGetDeptInSubList();
|
|
this.$set(this,'addPageType',true);
|
|
this.$set(this,'addPageType',true);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -706,7 +689,7 @@
|
|
returnPresent(){
|
|
returnPresent(){
|
|
this.$set(this.yearMonthData,'year',this.yearMonthData.presentYear);
|
|
this.$set(this.yearMonthData,'year',this.yearMonthData.presentYear);
|
|
this.$set(this.yearMonthData,'month',this.yearMonthData.presentMonth);
|
|
this.$set(this.yearMonthData,'month',this.yearMonthData.presentMonth);
|
|
- this.getListYmd();
|
|
|
|
|
|
+ this.laboratoryXxpDutyListYmd();
|
|
},
|
|
},
|
|
//年或月增加
|
|
//年或月增加
|
|
addDate(){
|
|
addDate(){
|
|
@@ -727,7 +710,7 @@
|
|
this.yearMonthData.year++
|
|
this.yearMonthData.year++
|
|
}
|
|
}
|
|
this.allCheckJudgment();
|
|
this.allCheckJudgment();
|
|
- this.getListYmd();
|
|
|
|
|
|
+ this.laboratoryXxpDutyListYmd();
|
|
},
|
|
},
|
|
//年或月减少
|
|
//年或月减少
|
|
subtractDate(){
|
|
subtractDate(){
|
|
@@ -748,14 +731,14 @@
|
|
this.yearMonthData.year--
|
|
this.yearMonthData.year--
|
|
}
|
|
}
|
|
this.allCheckJudgment();
|
|
this.allCheckJudgment();
|
|
- this.getListYmd();
|
|
|
|
|
|
+ this.laboratoryXxpDutyListYmd();
|
|
},
|
|
},
|
|
//年月展示切换按钮
|
|
//年月展示切换按钮
|
|
yearMonthSwitchButton(type){
|
|
yearMonthSwitchButton(type){
|
|
if(this.yearMonthType != type){
|
|
if(this.yearMonthType != type){
|
|
this.$set(this,'yearMonthType',type);
|
|
this.$set(this,'yearMonthType',type);
|
|
this.allCheckJudgment();
|
|
this.allCheckJudgment();
|
|
- this.getListYmd();
|
|
|
|
|
|
+ this.laboratoryXxpDutyListYmd();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 生成日历
|
|
// 生成日历
|