diff --git a/src/views/home/widgets/index_photon.vue b/src/views/home/widgets/index_photon.vue index a1e11c69..152c19eb 100644 --- a/src/views/home/widgets/index_photon.vue +++ b/src/views/home/widgets/index_photon.vue @@ -611,7 +611,7 @@ export default { let dindex = i + 1; xAxisData.push(dindex + '日') for (let j = 0; j < list.length; j++) { - if (list[j].日 == i) { + if (list[j].日 == dindex) { chartData[i] = list[j].合格数; if (list[j].合格数 >= list[j].任务数) { hgNumber++; diff --git a/src/views/statistics/ppass_num.vue b/src/views/statistics/ppass_num.vue index b668202d..fa82e0b6 100644 --- a/src/views/statistics/ppass_num.vue +++ b/src/views/statistics/ppass_num.vue @@ -130,6 +130,7 @@ export default { if (xAxisData.indexOf(item.工段) > -1) { } else { xAxisData.push(item.工段); } + console.log('xAxisData:', xAxisData); let index = xAxisData.indexOf(item.工段); if (item.物料名称.indexOf('棒') > -1) { data0[index] = item.合格数; @@ -138,13 +139,13 @@ export default { } }) that.xAxisData = xAxisData; - + console.log('data0:', data0); + console.log('data1:', data1); + that.option.xAxis.data = that.xAxisData; + that.option.series[0].data = data0; + that.option.series[1].data = data1; + console.log('that.option:', that.option); }) - console.log('xAxisData:', that.xAxisData); - that.option.xAxis.data = that.xAxisData; - that.option.series[0].data = data0; - that.option.series[1].data = data1; - // that.chart.setOption(that.option); }, handleQuery() { if (this.queryDate !== '' && this.queryDate !== null) {