|
@@ -65,8 +65,8 @@ export default {
|
|
|
title: "普通",
|
|
|
children: [
|
|
|
{
|
|
|
- dataIndex: "count",
|
|
|
- key: "count",
|
|
|
+ dataIndex: "highRiskcount",
|
|
|
+ key: "highRiskcount",
|
|
|
title: "件数",
|
|
|
clickHandler: (row, rowIndex) => {
|
|
|
this.$router.push({
|
|
@@ -223,8 +223,8 @@ export default {
|
|
|
FormData: {
|
|
|
beginDate: "",
|
|
|
endDate: "",
|
|
|
- place: "",
|
|
|
- proxyId: ""
|
|
|
+ places: [],
|
|
|
+ proxyId: "",
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -232,6 +232,17 @@ export default {
|
|
|
this.formatDate();
|
|
|
},
|
|
|
mounted() {
|
|
|
+ if (Object.keys(this.$route.query).length !== 0) {
|
|
|
+ const { beginDate, endDate, places, proxyId } = this.$route.query;
|
|
|
+ this.FormData.beginDate = beginDate;
|
|
|
+ this.FormData.endDate = endDate;
|
|
|
+ if (typeof places == "string") {
|
|
|
+ this.FormData.places = [places];
|
|
|
+ } else {
|
|
|
+ this.FormData.places = places;
|
|
|
+ }
|
|
|
+ this.FormData.proxyId = proxyId;
|
|
|
+ }
|
|
|
this.setTableHeight();
|
|
|
window.addEventListener("resize", this.setTableHeight);
|
|
|
this.routdata();
|
|
@@ -273,14 +284,7 @@ export default {
|
|
|
try {
|
|
|
this.loading = true;
|
|
|
// console.log(this.$route.query);
|
|
|
- if (Object.keys(this.$route.query).length !== 0) {
|
|
|
- const { beginDate, endDate, place, proxyId } =
|
|
|
- this.$route.query;
|
|
|
- this.FormData.beginDate = beginDate;
|
|
|
- this.FormData.endDate = endDate;
|
|
|
- this.FormData.place = place;
|
|
|
- this.FormData.proxyId = proxyId;
|
|
|
- }
|
|
|
+
|
|
|
const result = await agent(this.FormData);
|
|
|
if (result.status === 200) {
|
|
|
this.tableData = result.data;
|
|
@@ -290,20 +294,20 @@ export default {
|
|
|
Math.floor((data.count / item.count).toFixed(2) * 100) + "%";
|
|
|
});
|
|
|
});
|
|
|
- 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";
|
|
|
+ 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";
|
|
|
+ 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";
|
|
|
}
|
|
|
- })
|
|
|
+ });
|
|
|
}
|
|
|
}
|
|
|
this.loading = false;
|
|
@@ -313,15 +317,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
changeHandler() {
|
|
|
+ let param = JSON.parse(JSON.stringify(this.FormData));
|
|
|
+ param.places = param.places[0];
|
|
|
this.$router.push({
|
|
|
path: "./cargoCharts",
|
|
|
query: this.FormData,
|
|
|
});
|
|
|
},
|
|
|
searchHandler(arr) {
|
|
|
+ console.log(arr);
|
|
|
+ if (typeof arr[1] == "string" && arr[1] == "") {
|
|
|
+ arr[1] = [];
|
|
|
+ }
|
|
|
+ if (typeof arr[1] == "string" && arr[1] != "") {
|
|
|
+ arr[1] = [arr[1]];
|
|
|
+ }
|
|
|
this.FormData.beginDate = arr[0][0];
|
|
|
this.FormData.endDate = arr[0][1];
|
|
|
- this.FormData.place = arr[1];
|
|
|
+ this.FormData.places = arr[1];
|
|
|
this.FormData.proxyId = arr[2];
|
|
|
this.getData();
|
|
|
},
|