forked from zhuyuchen/buliang
更新 dataBuhegelvCtrl.js,优化数据获取逻辑,调整循环结构以提高性能,跑缓存的接口
This commit is contained in:
parent
b205edfe40
commit
d553696536
@ -376,22 +376,9 @@
|
||||
$scope.DasaiMonths = ['', 1, 3, 5]
|
||||
|
||||
$scope.DasaiSzqx = ["上海市",
|
||||
"奉贤区",
|
||||
"长宁区"
|
||||
]
|
||||
|
||||
$scope.DasaiStreet = ["",
|
||||
"金汇镇",
|
||||
"四团镇",
|
||||
"西渡街道",
|
||||
"奉浦街道",
|
||||
"南桥镇",
|
||||
"奉城镇",
|
||||
"庄行镇",
|
||||
|
||||
"虹桥街道",
|
||||
"新泾镇",
|
||||
"北新泾街道",
|
||||
]
|
||||
|
||||
$scope.DaaiHj = [''
|
||||
@ -403,26 +390,56 @@
|
||||
async function dasaiFetchData() {
|
||||
for (let i = 0; i < $scope.DasaiMonths.length; i++) {
|
||||
for (let j = 0; j < $scope.DasaiSzqx.length; j++) {
|
||||
for (let k = 0; k < $scope.DaaiHj.length; k++) {
|
||||
for (let p = 0; p < $scope.DasaiStreet.length; p++) {
|
||||
await $http.get(Gaddress + '/ZHZS/GetScoreNewStreetAndShanghaiDasai?&month=' + $scope.DasaiMonths[k] + '&hj='
|
||||
+ $scope.DaaiHj[k] + '&szqx=' + $scope.DasaiSzqx[j] + '&street=' + $scope.DasaiStreet[j]
|
||||
+ '&littlemonth=' + $scope.DasaiLittlemonth[j]);
|
||||
await $http.get(Gaddress + '/TSJB/GetTouSuLvDaPingStreetDasai?month=' + $scope.DasaiMonths[i] + '&hj='
|
||||
+ $scope.DaaiHj[k] + '&szqx=' + $scope.DasaiSzqx[j] + '&street=' + $scope.DasaiStreet[j]
|
||||
+ '&littlemonth=' + $scope.DasaiLittlemonth[j]);
|
||||
await $http.get(Gaddress + '/ZFJC/GetWenTiLvDaPingStreetDasai?month=' + $scope.DasaiMonths[i] + '&hj='
|
||||
+ $scope.DaaiHj[k] + '&szqx=' + $scope.DasaiSzqx[j] + '&street=' + $scope.DasaiStreet[j]
|
||||
+ '&littlemonth=' + $scope.DasaiLittlemonth[j]);
|
||||
await $http.get(Gaddress + '/TongJi/GetTongJiHeGeLvDaPingStreetDasai?month=' + $scope.DasaiMonths[i] + '&hj='
|
||||
+ $scope.DaaiHj[k] + '&szqx=' + $scope.DasaiSzqx[j] + '&street=' + $scope.DasaiStreet[j]
|
||||
+ '&littlemonth=' + $scope.DasaiLittlemonth[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (let k = 0; k < $scope.DasaiStreet.length; k++) {
|
||||
for (let l = 0; l < $scope.DaaiHj.length; l++) {
|
||||
for (let m = 0; m < $scope.DasaiLittlemonth; m++) {
|
||||
console.log("跑缓存参数:","月份:"+$scope.DasaiMonths[i],"区县:"+$scope.DasaiSzqx[j],"街道:"+$scope.DasaiStreet[k],"环节:"+$scope.DaaiHj[l],"小月:"+$scope.DasaiLittlemonth[m])
|
||||
// 统计合格率大屏--抽检监测(左一)
|
||||
await $http.get(Gaddress + '/TongJi/GetTongJiHeGeLvDaPingStreetDasai?&month=' + $scope.DasaiMonths[i] + '&szqx=' + $scope.DasaiSzqx[j] +
|
||||
'&street=' + $scope.DasaiStreet[k] + '&hj=' + $scope.DaaiHj[l] + '&littlemonth=' + $scope.DasaiLittlemonth[m]);
|
||||
// 投诉率大屏--投诉举报(左二)
|
||||
await $http.get(Gaddress + '/TSJB/GetTouSuLvDaPingStreetDasai?&month=' + $scope.DasaiMonths[i] + '&szqx=' + $scope.DasaiSzqx[j] +
|
||||
'&street=' + $scope.DasaiStreet[k] + '&hj=' + $scope.DaaiHj[l] + '&littlemonth=' + $scope.DasaiLittlemonth[m]);
|
||||
// 问题率大屏--执法检查(左三)
|
||||
await $http.get(Gaddress + '/ZFJC/GetWenTiLvDaPingStreetDasai?&month=' + $scope.DasaiMonths[i] + '&szqx=' + $scope.DasaiSzqx[j] +
|
||||
'&street=' + $scope.DasaiStreet[k] + '&hj=' + $scope.DaaiHj[l] + '&littlemonth=' + $scope.DasaiLittlemonth[m]);
|
||||
// 中间地图数据
|
||||
await $http.get(Gaddress + '/ZHZS/GetScoreNewStreetAndShanghaiDasai?&month=' + $scope.DasaiMonths[i] + '&szqx=' + $scope.DasaiSzqx[j] +
|
||||
'&street=' + $scope.DasaiStreet[k] + '&hj=' + $scope.DaaiHj[l] + '&littlemonth=' + $scope.DasaiLittlemonth[m]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// async function dasaiFetchData() {
|
||||
// for (let i = 0; i < $scope.DasaiMonths.length; i++) {
|
||||
// for (let j = 0; j < $scope.DasaiSzqx.length; j++) {
|
||||
// for (let k = 0; k < $scope.DaaiHj.length; k++) {
|
||||
// for (let p = 0; p < $scope.DasaiStreet.length; p++) {
|
||||
// await $http.get(Gaddress + '/ZHZS/GetScoreNewStreetAndShanghaiDasai?&month=' + $scope.DasaiMonths[k] + '&hj='
|
||||
// + $scope.DaaiHj[k] + '&szqx=' + $scope.DasaiSzqx[j] + '&street=' + $scope.DasaiStreet[j]
|
||||
// + '&littlemonth=' + $scope.DasaiLittlemonth[j]);
|
||||
// await $http.get(Gaddress + '/TSJB/GetTouSuLvDaPingStreetDasai?month=' + $scope.DasaiMonths[i] + '&hj='
|
||||
// + $scope.DaaiHj[k] + '&szqx=' + $scope.DasaiSzqx[j] + '&street=' + $scope.DasaiStreet[j]
|
||||
// + '&littlemonth=' + $scope.DasaiLittlemonth[j]);
|
||||
// await $http.get(Gaddress + '/ZFJC/GetWenTiLvDaPingStreetDasai?month=' + $scope.DasaiMonths[i] + '&hj='
|
||||
// + $scope.DaaiHj[k] + '&szqx=' + $scope.DasaiSzqx[j] + '&street=' + $scope.DasaiStreet[j]
|
||||
// + '&littlemonth=' + $scope.DasaiLittlemonth[j]);
|
||||
// await $http.get(Gaddress + '/TongJi/GetTongJiHeGeLvDaPingStreetDasai?month=' + $scope.DasaiMonths[i] + '&hj='
|
||||
// + $scope.DaaiHj[k] + '&szqx=' + $scope.DasaiSzqx[j] + '&street=' + $scope.DasaiStreet[j]
|
||||
// + '&littlemonth=' + $scope.DasaiLittlemonth[j]);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
$scope.DaPingMonths2 = [5, 4, 3, 2, 1, '']
|
||||
|
||||
@ -467,7 +484,6 @@
|
||||
};
|
||||
|
||||
|
||||
|
||||
$scope.DaPingHj2 = ['', '生产环节', '销售环节', '餐饮环节']
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user