Commit 44761235 by jack

修复bug

1 parent b597c9b1
...@@ -45,7 +45,7 @@ export default { ...@@ -45,7 +45,7 @@ export default {
tableDta: [], tableDta: [],
pageNumber: 1, pageNumber: 1,
pageSize: 10, pageSize: 10,
totalElements:0, totalElements: 0,
reportFormList: [ reportFormList: [
{ {
type: "input", type: "input",
...@@ -101,7 +101,7 @@ export default { ...@@ -101,7 +101,7 @@ export default {
}, },
getListApi: getList, getListApi: getList,
date: "", date: "",
loading:false loading: false,
}; };
}, },
mounted() { mounted() {
...@@ -130,10 +130,10 @@ export default { ...@@ -130,10 +130,10 @@ export default {
getParams() { getParams() {
let oParams = deepClone(this.searchDataForm); let oParams = deepClone(this.searchDataForm);
if(oParams.date){ if (oParams.date) {
oParams.year = oParams.date.split('-')[0] oParams.year = oParams.date.split("-")[0];
oParams.month = oParams.date.split('-')[1] oParams.month = oParams.date.split("-")[1];
delete oParams.date delete oParams.date;
} }
return oParams; return oParams;
...@@ -144,15 +144,17 @@ export default { ...@@ -144,15 +144,17 @@ export default {
let oParams = this.getParams(); let oParams = this.getParams();
oParams.pageNumber = current || this.pageNumber; oParams.pageNumber = current || this.pageNumber;
oParams.pageSize = this.pageSize; oParams.pageSize = this.pageSize;
this.loading = true this.loading = true;
getList(oParams).then((res) => { getList(oParams)
this.loading = false .then((res) => {
this.loading = false;
let { data } = res; let { data } = res;
let { list, totalElements } = data || {}; let { list, totalElements } = data || {};
this.tableDta = list; this.tableDta = list;
this.totalElements = totalElements; this.totalElements = totalElements;
}).catch(error => { })
this.loading = false .catch((error) => {
this.loading = false;
}); });
}, },
...@@ -185,19 +187,24 @@ export default { ...@@ -185,19 +187,24 @@ export default {
}, },
// 查看详情 // 查看详情
goDetail(id,row) { goDetail(id, row) {
let n = id.replace('dayNum',''); let n = id.replace("dayNum", "");
console.log(n) console.log(n);
console.log(row); console.log(row);
this.$router.push({name:'driverDetail',query:{day:`${row.statDate}-${n}`,vin:row.vin}}) if (n != "summation") {
this.$router.push({
name: "driverDetail",
query: { day: `${row.statDate}-${n}`, vin: row.vin },
});
}
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.pagination_list{ .pagination_list {
text-align:right; text-align: right;
padding:10px 0; padding: 10px 0;
} }
</style> </style>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!