From 5487e1f74d204947bcf897eeccb5b298c7ded641 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 18 Sep 2024 13:31:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BB=BB=E5=8A=A1=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E7=9A=84=E8=AF=B7=E6=B1=82=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/statistics/task_rate_gx.vue | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) 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) {