|
@@ -52,6 +52,7 @@ export default {
|
|
|
name: "ChartsBar",
|
|
|
data() {
|
|
|
return {
|
|
|
+ optiondata: [],
|
|
|
picShow: true, //图片表格切换
|
|
|
action: 0,
|
|
|
dataid: "collection_ecahrt0",
|
|
@@ -365,7 +366,11 @@ export default {
|
|
|
this.formItems[4].disabled = false;
|
|
|
this.eledata = 3;
|
|
|
this.titleTop = "拉货统计";
|
|
|
- this.listqueryTemplateID = DATACONTENT_ID.modePullgoods;
|
|
|
+ if (this.picShow == true) {
|
|
|
+ this.listqueryTemplateID = DATACONTENT_ID.modePullgoods;
|
|
|
+ } else if (this.picShow == false) {
|
|
|
+ this.listqueryTemplateID = DATACONTENT_ID.modePulltable;
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
getFormData(data) {
|
|
@@ -384,6 +389,16 @@ export default {
|
|
|
spe: data.spe,
|
|
|
},
|
|
|
];
|
|
|
+ this.optiondata = [
|
|
|
+ {
|
|
|
+ fttp: data.fttp,
|
|
|
+ kht: data.kht,
|
|
|
+ td: data.td,
|
|
|
+ fd1: data.dateTime[0],
|
|
|
+ fd2: data.dateTime[1],
|
|
|
+ spe: data.spe,
|
|
|
+ },
|
|
|
+ ];
|
|
|
this.getQuery(option, data.set);
|
|
|
} else {
|
|
|
let option = [
|
|
@@ -427,15 +442,6 @@ export default {
|
|
|
data.dateTime[0] +
|
|
|
"--" +
|
|
|
data.dateTime[1];
|
|
|
- // if (this.picShow == true) {
|
|
|
- // if (data.set == 1) {
|
|
|
- // this.listHeader = ["序号", "时间", "单", "环比(%)"];
|
|
|
- // } else if (data.set == 2) {
|
|
|
- // this.listHeader = ["序号", "时间", "重量", "环比(%)"];
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // this.listHeader = ["序号", "时间", "单", "重量", "环比(%)"];
|
|
|
- // }
|
|
|
this.listHeader = [
|
|
|
"序号",
|
|
|
"时间",
|
|
@@ -463,22 +469,6 @@ export default {
|
|
|
data.dateTime[0] +
|
|
|
"--" +
|
|
|
data.dateTime[1];
|
|
|
- // if (this.picShow == true) {
|
|
|
- // if (data.set == 1) {
|
|
|
- // this.listHeader = ["序号", "时间", "班", "环比(%)"];
|
|
|
- // } else if (data.set == 2) {
|
|
|
- // this.listHeader = ["序号", "时间", "重量", "环比(%)"];
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // this.listHeader = [
|
|
|
- // "序号",
|
|
|
- // "时间",
|
|
|
- // "班",
|
|
|
- // "环比(%)",
|
|
|
- // "重量",
|
|
|
- // "环比(%)",
|
|
|
- // ];
|
|
|
- // }
|
|
|
this.listHeader = [
|
|
|
"序号",
|
|
|
"时间",
|
|
@@ -497,6 +487,9 @@ export default {
|
|
|
dataContent: data,
|
|
|
});
|
|
|
if (code == 0) {
|
|
|
+ this.tableData.time = [];
|
|
|
+ this.tableData.data1 = [];
|
|
|
+ this.tableData.data2 = [];
|
|
|
this.tableList = JSON.parse(JSON.stringify(returnData.listValues));
|
|
|
this.tableListcop = JSON.parse(JSON.stringify(returnData.listValues));
|
|
|
this.tableList.forEach((item, index) => {
|
|
@@ -530,25 +523,21 @@ export default {
|
|
|
weight: returnData.listValues[0].totalWeight,
|
|
|
};
|
|
|
} else if (this.action === 4) {
|
|
|
- // if (dat == 1) {
|
|
|
- // let objar = {
|
|
|
- // indexs: "合计",
|
|
|
- // pullFlightNum: returnData.listValues[0].totalPullFlightNum,
|
|
|
- // };
|
|
|
- // this.tableListcop.push(objar);
|
|
|
- // } else if (dat == 2) {
|
|
|
- // let objar = {
|
|
|
- // indexs: "合计",
|
|
|
- // pullWeight: returnData.listValues[0].totalPullWeight,
|
|
|
- // };
|
|
|
- // this.tableListcop.push(objar);
|
|
|
- // }
|
|
|
- let objar = {
|
|
|
- indexs: "合计",
|
|
|
- pullFlightNum: returnData.listValues[0].totalPullFlightNum,
|
|
|
- pullWeight: returnData.listValues[0].totalPullWeight,
|
|
|
- };
|
|
|
- this.tableListcop.push(objar);
|
|
|
+ if (this.picShow == true) {
|
|
|
+ let objar = {
|
|
|
+ indexs: "合计",
|
|
|
+ pullFlightNum: returnData.listValues[0].totalPullFlightNum,
|
|
|
+ pullWeight: returnData.listValues[0].totalPullWeight,
|
|
|
+ };
|
|
|
+ this.tableListcop.push(objar);
|
|
|
+ } else {
|
|
|
+ let objar = {
|
|
|
+ indexs: "合计",
|
|
|
+ totalWeight: returnData.listValues[0].hejiTotalWeight,
|
|
|
+ pullWeight: returnData.listValues[0].hejiPullWeight,
|
|
|
+ };
|
|
|
+ this.tableListcop.push(objar);
|
|
|
+ }
|
|
|
}
|
|
|
returnData.listValues.forEach((element) => {
|
|
|
if (this.action === 0) {
|
|
@@ -595,10 +584,6 @@ export default {
|
|
|
});
|
|
|
this.tableData.data1.push(0);
|
|
|
for (let index = 0; index < this.tableData.data2.length; index++) {
|
|
|
- // const element =
|
|
|
- // (this.tableData.data2[index + 1] - this.tableData.data2[index]) /
|
|
|
- // this.tableData.data2[index];
|
|
|
- // console.log(element);
|
|
|
if (index > 0) {
|
|
|
const element =
|
|
|
(this.tableData.data2[index] -
|
|
@@ -615,8 +600,6 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- // this.tableData = returnData.listValues;
|
|
|
- // console.log(this.tableData[0])
|
|
|
}
|
|
|
} catch (error) {
|
|
|
this.page--;
|
|
@@ -648,40 +631,26 @@ export default {
|
|
|
} else if (this.action === 3) {
|
|
|
return [item.indexs, item.fdt, item.weight, item.weightChain];
|
|
|
} else if (this.action === 4) {
|
|
|
- // if (this.picShow == true) {
|
|
|
- // if (this.set == 1) {
|
|
|
- // return [
|
|
|
- // item.indexs,
|
|
|
- // item.dat,
|
|
|
- // item.pullFlightNum,
|
|
|
- // item.flightChain,
|
|
|
- // ];
|
|
|
- // } else if (this.set == 2) {
|
|
|
- // return [
|
|
|
- // item.indexs,
|
|
|
- // item.dat,
|
|
|
- // item.pullWeight,
|
|
|
- // item.weightChain,
|
|
|
- // ];
|
|
|
- // }
|
|
|
- // } else {
|
|
|
- // return [
|
|
|
- // item.indexs,
|
|
|
- // item.dat,
|
|
|
- // item.pullFlightNum,
|
|
|
- // item.flightChain,
|
|
|
- // item.pullWeight,
|
|
|
- // item.weightChain,
|
|
|
- // ];
|
|
|
- // }
|
|
|
- return [
|
|
|
- item.indexs,
|
|
|
- item.dat,
|
|
|
- item.pullFlightNum,
|
|
|
- item.flightChain,
|
|
|
- item.pullWeight,
|
|
|
- item.weightChain,
|
|
|
- ];
|
|
|
+ if (this.picShow == true) {
|
|
|
+ return [
|
|
|
+ item.indexs,
|
|
|
+ item.dat,
|
|
|
+ item.pullFlightNum,
|
|
|
+ item.flightChain,
|
|
|
+ item.pullWeight,
|
|
|
+ item.weightChain,
|
|
|
+ ];
|
|
|
+ } else {
|
|
|
+ return [
|
|
|
+ item.indexs,
|
|
|
+ item.flightdate,
|
|
|
+ item.flightNo,
|
|
|
+ item.line,
|
|
|
+ item.stand,
|
|
|
+ item.totalWeight,
|
|
|
+ item.pullWeight,
|
|
|
+ ];
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
data[data.length - 1].indexs = "总计";
|
|
@@ -702,6 +671,31 @@ export default {
|
|
|
},
|
|
|
upset(data) {
|
|
|
this.picShow = data;
|
|
|
+ if (this.picShow == false && this.action === 4) {
|
|
|
+ this.listHeader = [
|
|
|
+ "序号",
|
|
|
+ "日期",
|
|
|
+ "航班号",
|
|
|
+ "航线",
|
|
|
+ "机位",
|
|
|
+ "货物总重 (KG)",
|
|
|
+ "拉货 (KG)",
|
|
|
+ ];
|
|
|
+ this.listqueryTemplateID = DATACONTENT_ID.modePulltable;
|
|
|
+ this.getQuery(this.optiondata, this.set);
|
|
|
+ console.log(this.tableListcop);
|
|
|
+ } else if (this.picShow == true && this.action === 4) {
|
|
|
+ this.listHeader = [
|
|
|
+ "序号",
|
|
|
+ "时间",
|
|
|
+ "航班量(班)",
|
|
|
+ "环比(%)",
|
|
|
+ "重量(吨)",
|
|
|
+ "环比(%)",
|
|
|
+ ];
|
|
|
+ this.listqueryTemplateID = DATACONTENT_ID.modePullgoods;
|
|
|
+ this.getQuery(this.optiondata, this.set);
|
|
|
+ }
|
|
|
},
|
|
|
},
|
|
|
components: {
|