fix:合格数统计每个模块添加工段名称
This commit is contained in:
parent
8a1cf4a25b
commit
1cb2c30d3e
|
@ -923,6 +923,7 @@ export default {
|
|||
let option = deepCopy(that.basicOption);
|
||||
let query = deepCopy(that.query);
|
||||
query.mgroup_name = mgroup_name;
|
||||
option.title.text = mgroup_name+"合格数统计";
|
||||
let obj = {};
|
||||
obj.query = query;
|
||||
that.$API.bi.dataset.exec.req('lineDay_m', obj).then((res) => {
|
||||
|
@ -934,7 +935,6 @@ export default {
|
|||
tableData.forEach((ite) => {
|
||||
if (nameList.indexOf(ite.物料名) > -1) {} else {
|
||||
nameList.push(ite.物料名);
|
||||
|
||||
dataList.push([])
|
||||
datas.push([0,0,0,0,0,0,0]);
|
||||
let obj = {
|
||||
|
@ -947,24 +947,20 @@ export default {
|
|||
option.series.push(obj)
|
||||
}
|
||||
});
|
||||
console.log('nameList',nameList);
|
||||
that.nameList = nameList;
|
||||
tableData.forEach((item) => {
|
||||
let indexX = nameList.indexOf(item.物料名);
|
||||
dataList[indexX].push(item);
|
||||
});
|
||||
console.log('dataList',dataList)
|
||||
for(let i = 0;i<dataList.length;i++){
|
||||
for(let j = 0;j<dataList[i].length;j++){
|
||||
let index = that.weekDateList.indexOf(dataList[i][j].日);
|
||||
datas[i][index] = dataList[i][j].合格数; //将当前日期对应的合格数添加到datas中
|
||||
}
|
||||
}
|
||||
console.log('datas',datas);
|
||||
for(let n=0;n<nameList.length;n++){
|
||||
option.series[n].data = datas[n];
|
||||
}
|
||||
console.log('option',option);
|
||||
let chartId = 'bachart'+mgroup_index;
|
||||
that.setChart(chartId, option);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue