| @@ -975,8 +975,12 @@ | |||||
| if (this.staff2.value) { | if (this.staff2.value) { | ||||
| de = this.staff2.value.join(',') | de = this.staff2.value.join(',') | ||||
| } | } | ||||
| if (deptids && de) { | |||||
| str = [deptids, de].join('-') | |||||
| if (this.timepickpickisshow) { | |||||
| if (!de) { | |||||
| str = deptids+'-' | |||||
| } else { | |||||
| str = [deptids, de].join('-') | |||||
| } | |||||
| } else if (deptids && !de) { | } else if (deptids && !de) { | ||||
| str = deptids | str = deptids | ||||
| } | } | ||||
| @@ -1001,6 +1005,7 @@ | |||||
| } | } | ||||
| // 当选择全部时 | // 当选择全部时 | ||||
| if (!this.staff1.value && !this.staff2.value) { | if (!this.staff1.value && !this.staff2.value) { | ||||
| console.log(this.staff1.value, this.staff2.value, '!this.staff1.value && !this.staff2.value') | |||||
| res.first.map((item, index) => { | res.first.map((item, index) => { | ||||
| let obj = { | let obj = { | ||||
| name: item[0].deptName, | name: item[0].deptName, | ||||
| @@ -1018,6 +1023,7 @@ | |||||
| } | } | ||||
| // 当选择只有一个时 | // 当选择只有一个时 | ||||
| else if (this.staff1.value && !this.staff2.value) { | else if (this.staff1.value && !this.staff2.value) { | ||||
| console.log(this.staff1.value, this.staff2.value, 'this.staff1.value && !this.staff2.value') | |||||
| res.first.map((item, index) => { | res.first.map((item, index) => { | ||||
| let obj = { | let obj = { | ||||
| name: item[0].deptName, | name: item[0].deptName, | ||||
| @@ -1046,6 +1052,7 @@ | |||||
| }) | }) | ||||
| } | } | ||||
| } else { | } else { | ||||
| console.log(this.staff1.value, this.staff2.value, 'else') | |||||
| // 当两个都选择的时候 | // 当两个都选择的时候 | ||||
| res.first.map((item, index) => { | res.first.map((item, index) => { | ||||
| let obj = { | let obj = { | ||||