| | |
| | | </div> |
| | | </div> |
| | | <el-table |
| | | v-loading="tableLoading" |
| | | :data="tableData" |
| | | :header-cell-style="{ |
| | | background: '#F5F7FC', |
| | |
| | | <div style="width: 100%;display: flex;flex-direction: row-reverse;align-items: center"> |
| | | <pagination |
| | | style="width: 100%" |
| | | v-show="total >= 0" |
| | | v-show="total > 0" |
| | | :page-sizes="[4]" |
| | | :limit="queryParams.pageSize" |
| | | :page="queryParams.pageNum" |
| | | :page="queryParams.currentPage" |
| | | :total="total" |
| | | @pagination="getList" |
| | | @pagination="pageChange" |
| | | /> |
| | | </div> |
| | | </div> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | tableLoading: false, |
| | | currentTab: "process", |
| | | total: 0, |
| | | queryParams: { |
| | | pageNum: 1, |
| | | currentPage: 1, |
| | | pageSize: 4, |
| | | }, |
| | | tableData: [], |
| | |
| | | this.getList(); |
| | | }, |
| | | methods: { |
| | | pageChange(data) { |
| | | this.queryParams.currentPage = data.page |
| | | this.getList() |
| | | }, |
| | | async getList() { |
| | | var resp; |
| | | this.total = 0; |
| | | this.tableData = []; |
| | | this.tableLoading = true |
| | | if (this.currentTab == "process") { |
| | | resp = await getProjectProcessTodo(this.queryParams); |
| | | if (resp.code === 200) { |
| | | this.total = resp.total; |
| | | this.tableData = resp.taskList; |
| | | this.tableLoading = false |
| | | } |
| | | } else { |
| | | resp = await getProjectPlanToDoList(this.queryParams); |
| | | if (resp.code === 200) { |
| | | this.total = resp.total; |
| | | this.tableData = resp.data; |
| | | this.tableLoading = false |
| | | } |
| | | } |
| | | }, |