1.1需求完成
This commit is contained in:
@@ -39,6 +39,9 @@ export default {
|
||||
editLoading: false,
|
||||
byteCount: "",
|
||||
isOverLimit: false,
|
||||
total: 0,
|
||||
pageSizes: [50, 100, 300],
|
||||
currentPage: 1,
|
||||
|
||||
}
|
||||
},
|
||||
@@ -54,8 +57,7 @@ export default {
|
||||
if (token) {
|
||||
this.fetchList(this.listParams);
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
methods: {
|
||||
async fetchList(params) {
|
||||
@@ -64,6 +66,7 @@ export default {
|
||||
const res = await listBroadcast(params)
|
||||
if (res.code === 200) {
|
||||
this.tableData = res.rows
|
||||
this.total = res.total
|
||||
}
|
||||
this.setLoading('broadcastLoading', false);
|
||||
},
|
||||
@@ -109,6 +112,7 @@ export default {
|
||||
handleClose() {
|
||||
this.dialogVisible = false;
|
||||
this.addParams.content = ""
|
||||
this.setLoading('bthLoading', false);
|
||||
},
|
||||
sureAddBroadcast() {
|
||||
|
||||
@@ -136,6 +140,7 @@ export default {
|
||||
handleEditClose() {
|
||||
this.editDialogVisible = false;
|
||||
this.editParams.content = ""
|
||||
this.setLoading('editLoading', false);
|
||||
},
|
||||
handelDelete(row) {
|
||||
this.deleteBroadcast({ id: row.id });
|
||||
@@ -184,9 +189,28 @@ export default {
|
||||
|
||||
handelTime(time) {
|
||||
return `${time.split("T")[0]} ${time.split("T")[1]}`
|
||||
}
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
console.log(`每页 ${val} 条`);
|
||||
this.listParams.pageSize = val
|
||||
this.listParams.pageNum = 1
|
||||
this.currentPage = 1
|
||||
this.fetchList(this.listParams);
|
||||
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(`当前页: ${val}`);
|
||||
this.listParams.pageNum = val
|
||||
this.fetchList(this.listParams);
|
||||
|
||||
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user