|
@@ -341,6 +341,20 @@ export default {
|
|
|
//获取左侧菜单列表
|
|
|
getResource().then(res => {
|
|
|
const resourcesMap = res.data;
|
|
|
+ // const resourcesMap = [];
|
|
|
+ // let data = res.data;
|
|
|
+ // console.log("data=",data)
|
|
|
+ // for(let key in data){
|
|
|
+ // if(key == 'getNumByVarieties' ||
|
|
|
+ // key == 'getLivestockNumByVarieties' ||
|
|
|
+ // key == 'enterpriseStat' ||
|
|
|
+ // key == 'getInformation' ||
|
|
|
+ // key == 'getSupervise' ||
|
|
|
+ // key == 'grainFourSeasons'
|
|
|
+ // ){
|
|
|
+ // resourcesMap.push({key: data[key]});
|
|
|
+ // }
|
|
|
+ // }
|
|
|
for(let key in resourcesMap){
|
|
|
const map = {};
|
|
|
map.count=resourcesMap[key];
|
|
@@ -355,9 +369,30 @@ export default {
|
|
|
if(key == 'zhibao'){map.name="植保数量";}//有经纬度
|
|
|
if(key == 'zhongzhi'){map.name="种植产量";map.count=resourcesMap[key]+"吨";}
|
|
|
if(key == 'zhongzi'){map.name="种子库存";map.count=resourcesMap[key]+"吨";}
|
|
|
+
|
|
|
+ // 备案畜禽规模养殖场统计 /agricultureBigData/getNumByVarieties
|
|
|
+ // 种畜禽养殖场统计 /agricultureBigData/getLivestockNumByVarieties
|
|
|
+ // 企业分布统计 /agricultureBigData/enterpriseStat
|
|
|
+ // 农药信息统计 /agricultureBigData/getInformation
|
|
|
+ // 农资监管统计 /agricultureBigData/getSupervise
|
|
|
+ // 粮食四季变化 /agricultureBigData/grainFourSeasons
|
|
|
+ if(key == 'getNumByVarieties'){map.name="备案养殖场";map.count=resourcesMap[key]+"";}
|
|
|
+ if(key == 'getLivestockNumByVarieties'){map.name="种畜禽养殖场";map.count=resourcesMap[key]+"";}
|
|
|
+ if(key == 'enterpriseStat'){map.name="企业数量";map.count=resourcesMap[key]+"";}
|
|
|
+ if(key == 'getInformation'){map.name="农药数量";map.count=resourcesMap[key]+"L";}
|
|
|
+ if(key == 'getSupervise'){map.name="农资监管数量";map.count=resourcesMap[key]+"";}
|
|
|
+ if(key == 'grainFourSeasons'){map.name="粮食数量";map.count=resourcesMap[key]+"吨";}
|
|
|
map.icon='sj-icon-'+key;
|
|
|
map.key=key;
|
|
|
- that.resourcesList.push(map);
|
|
|
+ if(key == 'getNumByVarieties' ||
|
|
|
+ key == 'getLivestockNumByVarieties' ||
|
|
|
+ key == 'enterpriseStat' ||
|
|
|
+ key == 'getInformation' ||
|
|
|
+ key == 'getSupervise' ||
|
|
|
+ key == 'grainFourSeasons'
|
|
|
+ ){
|
|
|
+ that.resourcesList.push(map);
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
},
|