字典、统计

This commit is contained in:
weicw
2021-09-18 14:51:31 +08:00
parent 9c1f1c1b8c
commit f212f334ef
21 changed files with 3228 additions and 2319 deletions

View File

@@ -86,9 +86,9 @@ export default {
);
// 解析成对象数组
const billName = aoa[0][0];
const billName = file.name;
const billData = utils.toObjData(roadNoiseList);
const billName2 = aoa2[0][0];
const billName2 = file.name;
const billData2 = utils.toObjData(roadNoiseList2);
// 其他信息
const billData3 = utils.toPlaceData(roadNoiseList3);
@@ -199,7 +199,7 @@ export default {
);
// 解析成对象数组
const billName = aoa[0][0];
const billName = file.name;
const billData = utils.toAreaObjData(roadNoiseList);
if (!billData || billData.length == 0) {

View File

@@ -605,7 +605,13 @@ export default {
listAll(this.where).then(res=>{
if(res.data.code == 0){
res.data.data.forEach((d) => {
const td = columns.map((item) => d[item.dataIndex]);
const td = columns.map((item) => {
let val = d[item.dataIndex];
if(["indexLeq","indexL10","indexL50","indexL90","indexLmax","indexLmin","indexSd"].includes(item.dataIndex)){
val = Number(val).toFixed(1);
}
return val;
});
arr.push(td);
});
let sheet = XLSX.utils.aoa_to_sheet(arr);