|
@@ -142,10 +142,23 @@ const handleActive = ({index,key}) =>{
|
|
function handleData(name){
|
|
function handleData(name){
|
|
const arr = reportData.value.filter(item =>item.key === name)
|
|
const arr = reportData.value.filter(item =>item.key === name)
|
|
const source = arr[0].obj
|
|
const source = arr[0].obj
|
|
|
|
+ if(!source.blueZoneLegendList){
|
|
|
|
+ source.blueZoneLegendList = source.legendList
|
|
|
|
+ }
|
|
|
|
+ let list1 = source.list1[curIndex.value].list
|
|
|
|
+ let datas = []
|
|
|
|
+ for(let item of source.blueZoneLegendList[curIndex.value].list){
|
|
|
|
+ let data = list1.find((i)=>i.key===item.name);
|
|
|
|
+ if(data){
|
|
|
|
+ datas.push(data)
|
|
|
|
+ }else{
|
|
|
|
+ datas.push({key:item.name,val:0})
|
|
|
|
+ }
|
|
|
|
+ }
|
|
const obj = {
|
|
const obj = {
|
|
btnGroup : source.titleList,
|
|
btnGroup : source.titleList,
|
|
- xData : source.blueZoneLegendList[curIndex.value].list.map(item =>item.name),
|
|
|
|
- yData : source.list1[curIndex.value].list.map(item => item.val.toFixed(0)),
|
|
|
|
|
|
+ xData : datas.map(item =>item.key),
|
|
|
|
+ yData : datas.map(item => item.val.toFixed(0)),
|
|
text : source.list2[curIndex.value].list,
|
|
text : source.list2[curIndex.value].list,
|
|
content : source.text,
|
|
content : source.text,
|
|
}
|
|
}
|
|
@@ -211,7 +224,7 @@ const gybg= ()=>{
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
position: relative;
|
|
position: relative;
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
-
|
|
|
|
|
|
+
|
|
.chart-item {
|
|
.chart-item {
|
|
width: 100%;
|
|
width: 100%;
|
|
height: calc(100% / 4.15);
|
|
height: calc(100% / 4.15);
|