|
@@ -7,7 +7,7 @@
|
|
|
<van-button type="info" size="small" @click="toImport()">批量注册用户</van-button>
|
|
|
<van-button type="info" size="small" @click="tpExport()">批量导出用户</van-button>
|
|
|
</van-col>
|
|
|
- <van-col span="24" class="two"> <list-1 :list="list" @toEdit="toEdit" @toDel="toDel" @toPatent="toPatent"></list-1> </van-col>
|
|
|
+ <van-col span="24" class="two"> <list-1 :list="list" @toEdit="toEdit" @toDel="toDel" @toPatent="toPatent" @toPsd="toPsd"></list-1> </van-col>
|
|
|
</template>
|
|
|
</admin-frame>
|
|
|
</div>
|
|
@@ -33,7 +33,7 @@ export default {
|
|
|
this.search();
|
|
|
},
|
|
|
methods: {
|
|
|
- ...personal(['query', 'delete', 'export']),
|
|
|
+ ...personal(['query', 'delete', 'export', 'updatePassword']),
|
|
|
async search({ skip = 0, limit = this.limit, searchName, ...info } = {}) {
|
|
|
if (searchName) info.phone = searchName;
|
|
|
if (this.user.role != '1') info.code = this.user.code;
|
|
@@ -74,6 +74,14 @@ export default {
|
|
|
toPatent(data) {
|
|
|
this.$router.push({ path: `/account/patent/index`, query: { id: data._id } });
|
|
|
},
|
|
|
+ // 重置密码
|
|
|
+ async toPsd(data) {
|
|
|
+ let res = await this.updatePassword({ id: data.id, password: '123456' });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$toast({ type: `success`, message: `重置密码完成` });
|
|
|
+ this.search();
|
|
|
+ }
|
|
|
+ },
|
|
|
// 返回
|
|
|
back() {
|
|
|
this.$router.push({ path: `/account/index` });
|