|
@@ -261,8 +261,16 @@ export default {
|
|
|
radioChange(val) {
|
|
|
if (val === '忙碌') {
|
|
|
this.queryTeamWorkList()
|
|
|
+ .then(res => {
|
|
|
+ this.changeDateLength('日')
|
|
|
+ this.changeDateLength(this.radio3)
|
|
|
+ })
|
|
|
} else if (val === '空闲') {
|
|
|
this.queryTeamIdleList()
|
|
|
+ .then(res => {
|
|
|
+ this.changeDateLength('日')
|
|
|
+ this.changeDateLength(this.radio3)
|
|
|
+ })
|
|
|
}
|
|
|
if (val === '今天') {
|
|
|
this.$refs.ganttHeader.recenterPosition()
|
|
@@ -271,10 +279,10 @@ export default {
|
|
|
},
|
|
|
changeDateLength(val) {
|
|
|
if (val === '月') {
|
|
|
- this.$refs.ganttHeader.scale = 24
|
|
|
+ this.$refs.ganttHeader.scale = 21
|
|
|
}
|
|
|
if (val === '周') {
|
|
|
- this.$refs.ganttHeader.scale = 20
|
|
|
+ this.$refs.ganttHeader.scale = 19
|
|
|
}
|
|
|
if (val === '日') {
|
|
|
this.$refs.ganttHeader.scale = 17
|
|
@@ -304,23 +312,25 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
queryTeamWorkList() {
|
|
|
- workbenchApi.queryTeamWorkList(this.searchForm)
|
|
|
+ return workbenchApi.queryTeamWorkList(this.searchForm)
|
|
|
.then(res => {
|
|
|
if (res.data) {
|
|
|
this.createTasks(res, '忙碌')
|
|
|
}
|
|
|
+ return res
|
|
|
})
|
|
|
},
|
|
|
queryTeamIdleList() {
|
|
|
this.idleSearchForm.startTime = dayjs(this.timeSelectVal[0]).format('YYYY.MM.DD')
|
|
|
this.idleSearchForm.endTime = dayjs(this.timeSelectVal[1]).format('YYYY.MM.DD')
|
|
|
- workbenchApi.queryTeamIdleList({
|
|
|
+ return workbenchApi.queryTeamIdleList({
|
|
|
timeInfo: this.idleSearchForm,
|
|
|
teamWorkQueryInfo: this.searchForm
|
|
|
}).then(res => {
|
|
|
if (res.data) {
|
|
|
this.createTasks(res, '空闲')
|
|
|
}
|
|
|
+ return res
|
|
|
})
|
|
|
},
|
|
|
createTasks(res, mode) {
|