diff --git a/productionboard/src/main/resources/static/js/common/echarts.common.js b/productionboard/src/main/resources/static/js/common/echarts.common.js index 80ab7ca..7bc52a6 100644 --- a/productionboard/src/main/resources/static/js/common/echarts.common.js +++ b/productionboard/src/main/resources/static/js/common/echarts.common.js @@ -1169,9 +1169,22 @@ const bluePolygonHistogram = (res, ids) => { //多个立体柱状图 const multipleThreeDimensionalCylindrical = (res, ids) => { let mycharts = echarts.init(ids); - const xValue = res.map(val => val.materialName?.split(',')[0] || ' ') - const lineStoreAmount = res.map(val => val.lineStoreAmount) || [] - const hullStoreAmount = res.map(val => val.hullStoreAmount || '0') + const value = [] + res.forEach(e=>{ + if(!(value.includes(e.materialName))){ + value.push(e.materialName) + } + }) + const data = value.map(e => { + return { + materialName:e, + lineStoreAmount:res.filter( val => val.materialName === e).filter(val => val.locationNumber === 'L001')[0].lineStoreAmount, + hullStoreAmount:res.filter( val => val.materialName === e).filter(val => val.locationNumber === 'U001')[0].lineStoreAmount + } + }) + const xValue = data.map(val => val.materialName) + const lineStoreAmount = data.map(val => val.lineStoreAmount) + const hullStoreAmount = data.map(val => val.hullStoreAmount) let lineColor = "#406A92"; let labelColor = "#fff"; let fontSize = "12";