|
@@ -47,9 +47,13 @@ export default {
|
|
async fetchList(prop, page) {
|
|
async fetchList(prop, page) {
|
|
try {
|
|
try {
|
|
this.loading = true;
|
|
this.loading = true;
|
|
- const { code, rows, total } = await LIST(prop, page);
|
|
|
|
|
|
+ const { pageNum, pageSize } = page;
|
|
|
|
+ const { code, rows, total } = await LIST(prop, { pageNum, pageSize });
|
|
if (code === 200) {
|
|
if (code === 200) {
|
|
- this.tableData = rows;
|
|
|
|
|
|
+ this.tableData = rows.map((item, index) => ({
|
|
|
|
+ ...item,
|
|
|
|
+ $index: (pageNum - 1) * pageSize + index + 1,
|
|
|
|
+ }));
|
|
this.page.total = total;
|
|
this.page.total = total;
|
|
}
|
|
}
|
|
} catch (err) {
|
|
} catch (err) {
|