Commit d00b1b78 authored by pengyunqian's avatar pengyunqian

update:分页更新

parent 1ba205a7
......@@ -116,43 +116,53 @@
</template>
</el-table-column>
</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>
</div>
</Layout>
</template>
<script>
import page from "../../../components/Pagination";
// import page from "../../../components/Pagination";
import Layout from "../layout/index.vue";
import {
getAccountList,
getAccountBlackList,
getReblackList
getReblackList,
} from "@/service/Withdrawal/withdrawal";
import { ElMessage } from "element-plus";
export default {
name: "walletAccount",
props: ["flowRecord"],
components: {
page,
Layout
// page,
Layout,
},
data() {
return {
searchProps: {
user_id: "",
wallet_id: "",
type: ""
type: "",
},
params: {
page: 1,
page_size: 20,
currentPage: 1
currentPage: 1,
},
totalNum: null,
dialogText: "",
accountList: [],
tableLoading: false
tableLoading: false,
};
},
created() {
......@@ -170,7 +180,7 @@ export default {
page,
page_size,
type,
user_id: user_id || undefined
user_id: user_id || undefined,
};
getAccountList(params_list)
.then((res) => {
......@@ -188,16 +198,23 @@ export default {
findProducts() {
this.tableLoading = true;
this.params.page = 1;
this.$refs.params.currentPage = 1;
// this.$refs.params.currentPage = 1;
this.getAccountList();
},
//列表分页
update(obj) {
Object.assign(this.params, obj);
let { page, page_size } = this.params;
this.getAccountList(page, page_size);
this.params.page = 1;
console.log(obj);
// update(obj) {
// Object.assign(this.params, obj);
// let { page, page_size } = this.params;
// this.getAccountList(page, page_size);
// this.params.page = 1;
// this.tableLoading = true;
// console.log(obj);
// },
// 分页
handleCurrentChange(e) {
this.params.page = e;
this.getAccountList();
this.tableLoading = true;
},
//弹框提示
openBounced(type, user_id, wallet_id) {
......@@ -210,7 +227,7 @@ export default {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true
center: true,
}
)
.then(() => {
......@@ -224,7 +241,7 @@ export default {
.catch(() => {
this.$message({
type: "info",
message: "已取消"
message: "已取消",
});
});
},
......@@ -235,7 +252,7 @@ export default {
this.tableLoading = true;
let params = {
user_id,
wallet_id
wallet_id,
};
try {
await getReblackList(params);
......@@ -249,7 +266,7 @@ export default {
handelRecord(row) {
this.$router.push({
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 {
</script>
<style lang="less" scoped>
.manage-wrapper {
height: 100%;
height: 100vh;
}
.creatRole {
display: flex;
......@@ -284,6 +301,10 @@ export default {
.role_management .el-button {
margin: 0 2px;
}
/deep/ .el-pager>li:last-of-type {
display: none;
}
</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