Commit 44761235 by jack

修复bug

1 parent b597c9b1
......@@ -45,7 +45,7 @@ export default {
tableDta: [],
pageNumber: 1,
pageSize: 10,
totalElements:0,
totalElements: 0,
reportFormList: [
{
type: "input",
......@@ -101,7 +101,7 @@ export default {
},
getListApi: getList,
date: "",
loading:false
loading: false,
};
},
mounted() {
......@@ -130,10 +130,10 @@ export default {
getParams() {
let oParams = deepClone(this.searchDataForm);
if(oParams.date){
oParams.year = oParams.date.split('-')[0]
oParams.month = oParams.date.split('-')[1]
delete oParams.date
if (oParams.date) {
oParams.year = oParams.date.split("-")[0];
oParams.month = oParams.date.split("-")[1];
delete oParams.date;
}
return oParams;
......@@ -144,16 +144,18 @@ export default {
let oParams = this.getParams();
oParams.pageNumber = current || this.pageNumber;
oParams.pageSize = this.pageSize;
this.loading = true
getList(oParams).then((res) => {
this.loading = false
let { data } = res;
let { list, totalElements } = data || {};
this.tableDta = list;
this.totalElements = totalElements;
}).catch(error => {
this.loading = false
});
this.loading = true;
getList(oParams)
.then((res) => {
this.loading = false;
let { data } = res;
let { list, totalElements } = data || {};
this.tableDta = list;
this.totalElements = totalElements;
})
.catch((error) => {
this.loading = false;
});
},
refresh() {
......@@ -185,19 +187,24 @@ export default {
},
// 查看详情
goDetail(id,row) {
let n = id.replace('dayNum','');
console.log(n)
goDetail(id, row) {
let n = id.replace("dayNum", "");
console.log(n);
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>
<style lang="scss" scoped>
.pagination_list{
text-align:right;
padding:10px 0;
.pagination_list {
text-align: right;
padding: 10px 0;
}
</style>
\ 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!