<el-table v-loading="xxxLoading" :data="tableDataList">
<el-table-column prop="xxx" label="xxxx" align="center" width="170" />
<el-table-column label="xxxx" align="center" width="170">
<template slot-scope="scope">
<span @click="xxxxx(scope.row.swid)" class="seeDetails">查看</span>
</template>
</el-table-column>
</el-table>
<el-pagination background layout="total,sizes,prev,paper,next" :total="pageInfo.total"
:page-size="pageInfo.rows"
:page-sizes="[10,20,30,50,100,200]"
:current-page="pageInfo.currentPage"
@size-change="handleSizeChange"
@current-change="handlePageChange">
</el-pagination>
<el-dialog title="详情" :visible.sync="detailsVisible" width="60%" append-to-body>
<el-table :data="detailsArr">
<el-table-column prop="xxxxx" align=“center” label="xxxx"></el-table-column>
<el-table-column prop="xxxxx" align="center" label="xxxx"></el-table-column>
</el-table>
</el-dialog>
....
import { getDetailsArr } from "@/api/xx/xxxx.js";
export default {
...
data() {
....
tableDataList:[],
pageInfo: {
loding:false,
total: 0,
rows: 10,
currentPage: 1
},
xxxLoading:false,
detailsVisible:false,
detailsArr: []
...
},
methos: {
getTableData() {
this.xxxxLoading = true;
let params = {
...this.queryParentData,
...this.queryData,
rows: this.pageInfo.rows,
page:this.pageInfo.currentPage
};
params.start_page = this.pageInfo.currentPage;
params.view_rows=this.pageInfo.rows;
getxxxxxList(params) .then(result => {
this.pageInfo.loading = false;
this.tableDataList = result.rows;
this.$set(this.pageInfo,"total",result.total);
}).finally(() => {
this.xxxLoading = false;
});
},
handlewarnPageChange(size,page) {
this.pageInfo.rows = size;
this.pageInfo.currentPage = page;
this.getxxxxdata();
}
}
};
...
</script>
<style scoped lang="scss">
.seeDetails {
cursor: pointer;
color: #0edc9a;
}
</style>
现在是吐槽时间,我们组长,说后端不写前端就是工作态度不积极,我们单位又不是没有前端,然后他不找他们干,让我们写,还要在工期内一块写了,就这么两三天,又写前端又写后端,每天都被pua,按时下班他就觉得你工作不饱和,拼命给你加活,同时干,干不完就加加班,fuck