Commit b8979b9d authored by liwenhong's avatar liwenhong

Merge branch 'feature/merchant-managemet'

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