|
@@ -3,12 +3,18 @@
|
|
<!--工具条-->
|
|
<!--工具条-->
|
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
|
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
|
|
<el-form :inline="true">
|
|
<el-form :inline="true">
|
|
- <el-form-item label="部门" style="width: 215px">
|
|
|
|
- <el-cascader v-model="search.departmentIdArray" placeholder="请选择部门" style="width: 175px"
|
|
|
|
|
|
+ <el-form-item label="部门" style="width: 165px">
|
|
|
|
+ <el-cascader v-model="search.departmentIdArray" placeholder="请选择部门" style="width: 125px"
|
|
:options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable
|
|
:options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable
|
|
- @change="getList()" size="mini"
|
|
|
|
|
|
+ @change="getList(1)" size="mini"
|
|
></el-cascader>
|
|
></el-cascader>
|
|
|
|
+ <!-- <el-button @click="test" size="mini">test</el-button> -->
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="人员" style="width: 210px">
|
|
|
|
+ <el-select v-model="search.userIdArray" placeholder="请选择" clearable @visible-change="usersSearch" @remove-tag="usersSearch(false)" @clear="usersSearch(false)" filterable="true" size="mini" style="width: 150px" multiple collapse-tags>
|
|
|
|
+ <el-option v-for="item in searchUsersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="项目" style="width: 215px">
|
|
<el-form-item label="项目" style="width: 215px">
|
|
<el-select v-model="search.projectId" placeholder="请选择" clearable @change="getList()" filterable="true" size="mini" style="width: 175px">
|
|
<el-select v-model="search.projectId" placeholder="请选择" clearable @change="getList()" filterable="true" size="mini" style="width: 175px">
|
|
<el-option v-for="item in projectList" :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
|
|
<el-option v-for="item in projectList" :key="item.id" :label="item.projectName + item.projectCode" :value="item.id">
|
|
@@ -22,11 +28,7 @@
|
|
<el-button @click="batchApprove(false)" :loading="batchDenyLoading" :disabled="multipleSelection.length==0">批量驳回</el-button>
|
|
<el-button @click="batchApprove(false)" :loading="batchDenyLoading" :disabled="multipleSelection.length==0">批量驳回</el-button>
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
<!-- <div> -->
|
|
<!-- <div> -->
|
|
- <el-form-item label="人员" style="width: 160px">
|
|
|
|
- <el-select v-model="search.userId" placeholder="请选择" clearable @change="getList()" filterable="true" size="mini" style="width: 100px">
|
|
|
|
- <el-option v-for="item in usersList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
- </el-form-item>
|
|
|
|
|
|
+
|
|
<el-form-item label="日期">
|
|
<el-form-item label="日期">
|
|
<!-- <el-date-picker v-model="search.date" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
|
<!-- <el-date-picker v-model="search.date" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
|
@change="getList()" :clearable="true" type="date" placeholder="选择工作日期"></el-date-picker> -->
|
|
@change="getList()" :clearable="true" type="date" placeholder="选择工作日期"></el-date-picker> -->
|
|
@@ -305,7 +307,8 @@
|
|
startDate: null,
|
|
startDate: null,
|
|
endDate: null,
|
|
endDate: null,
|
|
state:0,
|
|
state:0,
|
|
- userId: null
|
|
|
|
|
|
+ userId: null,
|
|
|
|
+ userIdArray: []
|
|
},
|
|
},
|
|
|
|
|
|
users: [],
|
|
users: [],
|
|
@@ -319,6 +322,7 @@
|
|
logining: false,
|
|
logining: false,
|
|
multipleSelection: [],
|
|
multipleSelection: [],
|
|
usersList: [],
|
|
usersList: [],
|
|
|
|
+ searchUsersList: [],
|
|
dataTime: [],
|
|
dataTime: [],
|
|
recordDialogVisible: false,
|
|
recordDialogVisible: false,
|
|
recordLists: [],
|
|
recordLists: [],
|
|
@@ -524,8 +528,19 @@
|
|
this.recordList();
|
|
this.recordList();
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+ test(){
|
|
|
|
+ console.log(this.search.userId);
|
|
|
|
+ },
|
|
|
|
+ searchUserIds(deptId){
|
|
|
|
+ this.searchUsersList = this.usersList.filter(item => deptId == item.departmentId)
|
|
|
|
+ },
|
|
|
|
+ usersSearch(e){
|
|
|
|
+ if(e == false){
|
|
|
|
+ this.getList()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//获取待审核的数据列表
|
|
//获取待审核的数据列表
|
|
- getList() {
|
|
|
|
|
|
+ getList(e) {
|
|
this.listLoading = true;
|
|
this.listLoading = true;
|
|
// let form = {}
|
|
// let form = {}
|
|
// if(this.search.value==-1) {
|
|
// if(this.search.value==-1) {
|
|
@@ -533,11 +548,26 @@
|
|
// } else {
|
|
// } else {
|
|
// form.state = this.search.value;
|
|
// form.state = this.search.value;
|
|
// }
|
|
// }
|
|
- if (this.search.departmentIdArray == null) {
|
|
|
|
|
|
+ if(e){
|
|
|
|
+ this.search.userIdArray = []
|
|
|
|
+ }
|
|
|
|
+ if (this.search.departmentIdArray == null || this.search.departmentIdArray.length == 0) {
|
|
this.search.departmentId = null;
|
|
this.search.departmentId = null;
|
|
|
|
+ this.searchUsersList = this.usersList
|
|
} else {
|
|
} else {
|
|
var length = this.search.departmentIdArray.length;
|
|
var length = this.search.departmentIdArray.length;
|
|
this.search.departmentId = this.search.departmentIdArray[length-1];
|
|
this.search.departmentId = this.search.departmentIdArray[length-1];
|
|
|
|
+ this.searchUserIds(this.search.departmentId)
|
|
|
|
+ }
|
|
|
|
+ if(this.search.userIdArray.length == 0){
|
|
|
|
+ this.search.userId = null
|
|
|
|
+ }else{
|
|
|
|
+ let userarr = ''
|
|
|
|
+ for(let i in this.search.userIdArray){
|
|
|
|
+ userarr += this.search.userIdArray[i] + ','
|
|
|
|
+ }
|
|
|
|
+ userarr = userarr.substring(0,userarr.length - 1)
|
|
|
|
+ this.search.userId = userarr
|
|
}
|
|
}
|
|
this.http.post(this.port.report.portList, this.search,
|
|
this.http.post(this.port.report.portList, this.search,
|
|
res => {
|
|
res => {
|
|
@@ -683,6 +713,7 @@
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.usersList = res.data.records;
|
|
this.usersList = res.data.records;
|
|
|
|
+ this.searchUsersList = this.usersList
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|