Commit b8979b9d authored by liwenhong's avatar liwenhong

Merge branch 'feature/merchant-managemet'

parents e797f20d efc4aac3
......@@ -2,6 +2,7 @@
width: 100%;
height: 100%;
padding: 0 30px;
text-align: center;
.header {
display: flex;
justify-content: flex-end;
......@@ -42,4 +43,7 @@
height: 90%;
}
}
.pagination-wrapper {
margin-top: 30px;
}
}
......@@ -24,6 +24,16 @@
</template>
</el-table-column>
</el-table>
<div class="pagination-wrapper">
<el-pagination
background
layout="prev, pager, next"
:total="pageCount"
:page-size="10"
v-model:currentPage="currentPage"
@current-change="handleCurrentChange"
></el-pagination>
</div>
<!-- 添加商家弹窗 -->
<el-dialog title="商家编辑" v-model="merchantAdd" :before-close="resetDate" width="70%" :show-close="false">
<el-form class="dioFor" :model="addMerchant" :rules="rules">
......@@ -107,9 +117,16 @@
// 列表
merchantList: [],
deep: true,
currentPage: 1, // 当前页
pageSize: 20, // 每页条数
pageCount: 0, // 总条数
};
},
methods: {
handleCurrentChange(e) {
this.currentPage = e;
this.getOtaList();
},
modifyMerchant(id, index) {
if (typeof id == "number") {
this.addMerchant = JSON.parse(JSON.stringify(this.merchantList[index]));
......@@ -121,6 +138,7 @@
const { result, code, reason } = await otaList();
if (code !== 0) return this.$message.error(reason);
this.merchantList = result.list;
this.pageCount = result.total;
},
//保存
async saveMerchant() {
......
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