diff --git a/src/views/statistics/task_rate_gx.vue b/src/views/statistics/task_rate_gx.vue index ee355c27..2169d1ae 100644 --- a/src/views/statistics/task_rate_gx.vue +++ b/src/views/statistics/task_rate_gx.vue @@ -637,13 +637,18 @@ export default { that.query.start_date = that.query.querys[0][0].value = first.toISOString().split('T')[0]; that.query.end_date = that.query.querys[1][0].value = last.toISOString().split('T')[0]; that.options.forEach((item,index)=>{ - that.getData(item.id,item.name,index); + console.log('item',item); + setTimeout(()=>{ + that.getData(item.id,item.name,index); + },500) + }) - }, getMgroup(){ let that = this; + that.options = []; that.$API.mtm.mgroup.list.req({ page: 0}).then((res) => { + // that.options = res.slice(21); that.options = res; let nowDate = new Date(); that.getWeekDate(nowDate); @@ -669,18 +674,19 @@ export default { getData(mgroup_id,mgroup_name,mgroup_index) { let that = this; that.tableData1 = []; + that.query.querys[0][1].value = null; + that.query.querys[1][1].value = null; let option = deepCopy(that.basicOption); option.title.text = mgroup_name+"任务进度"; option.series.data[0].value = 0; option.series.data[1].value = 0; - that.query.querys[0][1].value = mgroup_id; that.query.querys[1][1].value = mgroup_id; that.$API.pm.mtask.cquery.req(that.query).then((res) => { let names = 'tableData'+mgroup_index; that[names] = res; - console.log('names',names); - console.log('that[names]',that[names]); + // console.log('names',names); + // console.log('that[names]',that[names]); let count_jh = 0,count_ok = 0,count_diff = 0; if (res.length > 0) { res.forEach((item) => { @@ -696,7 +702,6 @@ export default { let chartId = 'linechart'+mgroup_index; that.setChart(chartId, option); } - }); }, handleQuery(){ @@ -715,7 +720,9 @@ export default { that.query.querys[1][0].value = that.end_date; } that.options.forEach((item,index)=>{ - that.getData(item.id,item.name,index); + setTimeout(()=>{ + that.getData(item.id,item.name,index); + },500) }) }, handleExport(val) {