Commit d00b1b78 authored by pengyunqian's avatar pengyunqian

update:分页更新

parent 1ba205a7
...@@ -116,43 +116,53 @@ ...@@ -116,43 +116,53 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<page :totalNum="totalNum" @update="update" ref="params" /> <!-- 分页 -->
<!-- <page :totalNum="totalNum" @update="update" ref="params" /> -->
<el-pagination
class="page"
@current-change="handleCurrentChange"
v-model:currentPage="params.page"
:page-size="params.page_size"
layout="total, prev, pager, next"
:total="totalNum"
>
</el-pagination>
</el-card> </el-card>
</div> </div>
</Layout> </Layout>
</template> </template>
<script> <script>
import page from "../../../components/Pagination"; // import page from "../../../components/Pagination";
import Layout from "../layout/index.vue"; import Layout from "../layout/index.vue";
import { import {
getAccountList, getAccountList,
getAccountBlackList, getAccountBlackList,
getReblackList getReblackList,
} from "@/service/Withdrawal/withdrawal"; } from "@/service/Withdrawal/withdrawal";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
export default { export default {
name: "walletAccount", name: "walletAccount",
props: ["flowRecord"], props: ["flowRecord"],
components: { components: {
page, // page,
Layout Layout,
}, },
data() { data() {
return { return {
searchProps: { searchProps: {
user_id: "", user_id: "",
wallet_id: "", wallet_id: "",
type: "" type: "",
}, },
params: { params: {
page: 1, page: 1,
page_size: 20, page_size: 20,
currentPage: 1 currentPage: 1,
}, },
totalNum: null, totalNum: null,
dialogText: "", dialogText: "",
accountList: [], accountList: [],
tableLoading: false tableLoading: false,
}; };
}, },
created() { created() {
...@@ -170,7 +180,7 @@ export default { ...@@ -170,7 +180,7 @@ export default {
page, page,
page_size, page_size,
type, type,
user_id: user_id || undefined user_id: user_id || undefined,
}; };
getAccountList(params_list) getAccountList(params_list)
.then((res) => { .then((res) => {
...@@ -188,16 +198,23 @@ export default { ...@@ -188,16 +198,23 @@ export default {
findProducts() { findProducts() {
this.tableLoading = true; this.tableLoading = true;
this.params.page = 1; this.params.page = 1;
this.$refs.params.currentPage = 1; // this.$refs.params.currentPage = 1;
this.getAccountList(); this.getAccountList();
}, },
//列表分页 //列表分页
update(obj) { // update(obj) {
Object.assign(this.params, obj); // Object.assign(this.params, obj);
let { page, page_size } = this.params; // let { page, page_size } = this.params;
this.getAccountList(page, page_size); // this.getAccountList(page, page_size);
this.params.page = 1; // this.params.page = 1;
console.log(obj); // this.tableLoading = true;
// console.log(obj);
// },
// 分页
handleCurrentChange(e) {
this.params.page = e;
this.getAccountList();
this.tableLoading = true;
}, },
//弹框提示 //弹框提示
openBounced(type, user_id, wallet_id) { openBounced(type, user_id, wallet_id) {
...@@ -210,7 +227,7 @@ export default { ...@@ -210,7 +227,7 @@ export default {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
center: true center: true,
} }
) )
.then(() => { .then(() => {
...@@ -224,7 +241,7 @@ export default { ...@@ -224,7 +241,7 @@ export default {
.catch(() => { .catch(() => {
this.$message({ this.$message({
type: "info", type: "info",
message: "已取消" message: "已取消",
}); });
}); });
}, },
...@@ -235,7 +252,7 @@ export default { ...@@ -235,7 +252,7 @@ export default {
this.tableLoading = true; this.tableLoading = true;
let params = { let params = {
user_id, user_id,
wallet_id wallet_id,
}; };
try { try {
await getReblackList(params); await getReblackList(params);
...@@ -249,7 +266,7 @@ export default { ...@@ -249,7 +266,7 @@ export default {
handelRecord(row) { handelRecord(row) {
this.$router.push({ this.$router.push({
path: "/op/withdrawal/flowrecord", path: "/op/withdrawal/flowrecord",
query: { user_id: row.user_id, wallet_id: row.wallet_id } query: { user_id: row.user_id, wallet_id: row.wallet_id },
}); });
}, },
//黑名单 //黑名单
...@@ -272,7 +289,7 @@ export default { ...@@ -272,7 +289,7 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.manage-wrapper { .manage-wrapper {
height: 100%; height: 100vh;
} }
.creatRole { .creatRole {
display: flex; display: flex;
...@@ -284,6 +301,10 @@ export default { ...@@ -284,6 +301,10 @@ export default {
.role_management .el-button { .role_management .el-button {
margin: 0 2px; margin: 0 2px;
} }
/deep/ .el-pager>li:last-of-type {
display: none;
}
</style> </style>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment