|
@@ -8,7 +8,7 @@
|
|
|
<searchInfo></searchInfo>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="main">
|
|
|
- <otheruserList :debtTable="debtTable" @deleteRow="deleteRow"></otheruserList>
|
|
|
+ <otheruserList :debtTable="debtTable" :total="total" @deleteRow="deleteRow" @clickRest="clickRest"></otheruserList>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</div>
|
|
@@ -33,6 +33,7 @@ export default {
|
|
|
topTitle: '其他用户',
|
|
|
display: 'block',
|
|
|
debtTable: [],
|
|
|
+ total: '',
|
|
|
}),
|
|
|
created() {
|
|
|
this.searchInfo();
|
|
@@ -42,9 +43,11 @@ export default {
|
|
|
...otheruser(['query', 'delete']),
|
|
|
...character({ userquery: 'query' }),
|
|
|
|
|
|
+ ...otheruser(['query', 'delete', 'update']),
|
|
|
async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
const res = await this.query({ skip, limit, ...info });
|
|
|
this.$set(this, `debtTable`, res.data);
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
},
|
|
|
// 添加
|
|
|
clickBtn() {
|
|
@@ -56,6 +59,18 @@ export default {
|
|
|
this.$checkRes(res, '删除成功', '删除失败');
|
|
|
this.searchInfo();
|
|
|
},
|
|
|
+ async clickRest(id) {
|
|
|
+ let data = {};
|
|
|
+ data.id = id;
|
|
|
+ data.passwd = '123456';
|
|
|
+ const res = await this.update(data);
|
|
|
+ if (res.errcode === 0) {
|
|
|
+ this.$message({
|
|
|
+ message: '密码重置成功',
|
|
|
+ type: 'success',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|