feat(用户列表): 操作列表新增“重置密码”功能
This commit is contained in:
parent
8e25e781b8
commit
0e85709a30
@ -161,6 +161,15 @@ export function updateLevelScore(data) {
|
||||
});
|
||||
}
|
||||
|
||||
// 重置密码
|
||||
export function resetPassword(data) {
|
||||
return request({
|
||||
url: "/user/auth/type/account/resetPassword",
|
||||
method: "post",
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
// 用户积分
|
||||
export function getUserLevel(id) {
|
||||
return request({
|
||||
|
||||
@ -518,6 +518,13 @@
|
||||
@click.native="handleBankCard(scope.row)"
|
||||
>银行卡</el-dropdown-item
|
||||
>
|
||||
|
||||
<!-- 重置密码 -->
|
||||
<el-dropdown-item
|
||||
v-if="buttonPermissions.includes('user:table:password:reset')"
|
||||
@click.native="handlePassword(scope.row)"
|
||||
>重置密码</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
@ -677,6 +684,29 @@
|
||||
:user-id="clickUserId"
|
||||
@close="diamondSalaryDialogVisible = false"
|
||||
/>
|
||||
|
||||
<!-- 重置密码确认弹窗 -->
|
||||
<el-dialog
|
||||
title="是否重置该用户密码?"
|
||||
:visible="passwordVisible"
|
||||
width="30%"
|
||||
:before-close="
|
||||
() => {
|
||||
passwordVisible = false;
|
||||
}
|
||||
"
|
||||
>
|
||||
<div
|
||||
style="width: 100%;display: flex;justify-content: space-around;align-items: center;"
|
||||
>
|
||||
<el-button type="danger" @click="passwordVisible = false"
|
||||
>取消</el-button
|
||||
>
|
||||
<el-button type="primary" @click="confirmResetPassword()"
|
||||
>同意</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<!-- 用户注册情况弹窗 -->
|
||||
@ -705,7 +735,7 @@ import { genders, userTypes } from "@/constant/user";
|
||||
import { pickerOptions } from "@/constant/el-const";
|
||||
import { registerOrigins, originPlatforms } from "@/constant/origin";
|
||||
|
||||
import { getUserTable } from "@/api/app-user";
|
||||
import { getUserTable, resetPassword } from "@/api/app-user";
|
||||
import { getCountryAlls } from "@/api/sys";
|
||||
|
||||
import Pagination from "@/components/Pagination";
|
||||
@ -761,6 +791,7 @@ export default {
|
||||
showAllCondition: false,
|
||||
permissionValidationLoading: true,
|
||||
bankCardVisible: false,
|
||||
passwordVisible: false,
|
||||
userAuthFormVisible: false,
|
||||
pickerOptions,
|
||||
thisRow: {},
|
||||
@ -1014,6 +1045,25 @@ export default {
|
||||
this.thisRow = item;
|
||||
this.bankCardVisible = true;
|
||||
},
|
||||
// 打开重置密码弹窗
|
||||
handlePassword(item) {
|
||||
this.thisRow = item;
|
||||
this.passwordVisible = true;
|
||||
},
|
||||
|
||||
// 重置密码
|
||||
confirmResetPassword() {
|
||||
resetPassword({
|
||||
userId: this.thisRow.userProfile.id
|
||||
})
|
||||
.then(res => {
|
||||
this.$opsMessage.success();
|
||||
this.passwordVisible = false;
|
||||
})
|
||||
.catch(er => {
|
||||
this.$opsMessage.fail();
|
||||
});
|
||||
},
|
||||
|
||||
// 添加充值记录
|
||||
addOtherRecharge(item) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user