Prechádzať zdrojové kódy

修改新增农事bug

shuhao 1 mesiac pred
rodič
commit
25b3a7b62f
3 zmenil súbory, kde vykonal 223 pridanie a 443 odobranie
  1. 16 3
      src/views/home/components/homePage.vue
  2. 12 12
      src/views/home/index.vue
  3. 195 428
      yarn.lock

+ 16 - 3
src/views/home/components/homePage.vue

@@ -142,10 +142,23 @@ const handleActive = ({index,key}) =>{
 function handleData(name){
   const arr = reportData.value.filter(item =>item.key === name)
   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 = {
     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,
     content : source.text,
   }
@@ -211,7 +224,7 @@ const gybg= ()=>{
   box-sizing: border-box;
   position: relative;
   overflow-y: auto;
-  
+
   .chart-item {
     width: 100%;
     height: calc(100% / 4.15);

+ 12 - 12
src/views/home/index.vue

@@ -256,18 +256,18 @@ const blueListConvert = (data,index)=>{
 }
 
 const getFarmIndexReport = (callback) =>{
-  const params = { farmId:organId.value,regionId:regionId.value, type: tabName.value };
-    VE_API.farm.farmIndexReport(params).then(({data,code}) => {
-      if (code === 0) {
-          reportData.value = data || {};
-          let arr = []
-          if(data.blueZoneList.length){
-            arr = blueListConvert(data.blueZoneList[0].obj,0)
-          }
-          blueRegionLayer.initData(arr,'87')
-          callback && callback()
-      }
-  });
+  // const params = { farmId:organId.value,regionId:regionId.value, type: tabName.value };
+  //   VE_API.farm.farmIndexReport(params).then(({data,code}) => {
+  //     if (code === 0) {
+  //         reportData.value = data || {};
+  //         let arr = []
+  //         if(data.blueZoneList.length){
+  //           arr = blueListConvert(data.blueZoneList[0].obj,0)
+  //         }
+  //         blueRegionLayer.initData(arr,'87')
+  //         callback && callback()
+  //     }
+  // });
 }
 
 const indicatorChartData = ref({})

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 195 - 428
yarn.lock


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov