|
@@ -2,7 +2,7 @@
|
|
|
<div class="table-wrapper">
|
|
|
<header ref="tableWrapperHeader" class="table-header-wrapper">
|
|
|
<SecurityCheckHeader
|
|
|
- title="航空货物关联统计"
|
|
|
+ title="航线货物关联统计"
|
|
|
@change="changeHandler"
|
|
|
@search="searchHandler"
|
|
|
mode="combobox"
|
|
@@ -295,28 +295,40 @@ export default {
|
|
|
async getData() {
|
|
|
try {
|
|
|
this.loading = true;
|
|
|
- // console.log(this.$route.query);
|
|
|
const result = await agent(this.FormData);
|
|
|
if (result.status === 200) {
|
|
|
this.tableData = result.data;
|
|
|
this.tableData.forEach((item) => {
|
|
|
+ let arr = [{}, {}, {}, {}, {}];
|
|
|
item.datas.forEach((data) => {
|
|
|
- data["mix"] =
|
|
|
- Math.floor((data.count / item.count).toFixed(2) * 100) + "%";
|
|
|
+ data["mix"] = Math.floor((data.count / item.count) * 100) + "%";
|
|
|
+ if (data.level == "普通") {
|
|
|
+ arr[3] = data;
|
|
|
+ }
|
|
|
+ if (data.level == "严控") {
|
|
|
+ arr[1] = data;
|
|
|
+ }
|
|
|
+ if (data.level == "低风险") {
|
|
|
+ arr[2] = data;
|
|
|
+ }
|
|
|
+ if (data.level == "优先") {
|
|
|
+ arr[4] = data;
|
|
|
+ }
|
|
|
+ if (data.level == "高风险") {
|
|
|
+ arr[0] = data;
|
|
|
+ }
|
|
|
});
|
|
|
+ item.datas = arr;
|
|
|
});
|
|
|
+ console.log(this.tableData);
|
|
|
if (this.tableData.length > 0) {
|
|
|
for (let i = 0; i < this.tableData[0].datas.length; i++) {
|
|
|
this.tableCols.forEach((item) => {
|
|
|
if (item.title == this.tableData[0].datas[i].level) {
|
|
|
- // item.dataIndex = "datas";
|
|
|
- // item.key = "datas";
|
|
|
item.prop = "datas";
|
|
|
item.children[0].dataIndex = "datas[" + i + "].count";
|
|
|
- // item.children[0].key = "datas["+i+"].count";
|
|
|
item.children[0].prop = "datas[" + i + "].count";
|
|
|
item.children[1].dataIndex = "datas[" + i + "].mix";
|
|
|
- // item.children[1].key = "datas["+i+"].mix";
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -343,10 +355,6 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
});
|
|
|
- // console.log(this.tableCols, "总和");
|
|
|
- // console.log(result.data, "111");
|
|
|
- // console.log(priorityCount, "低风险");
|
|
|
- // console.log(strictCount, "高风险");
|
|
|
this.footerDate[0] = {
|
|
|
count: eval(count.join("+")),
|
|
|
"datas[0].count": eval(highRiskcount.join("+")),
|