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) {
|
export function getUserLevel(id) {
|
||||||
return request({
|
return request({
|
||||||
|
|||||||
@ -518,6 +518,13 @@
|
|||||||
@click.native="handleBankCard(scope.row)"
|
@click.native="handleBankCard(scope.row)"
|
||||||
>银行卡</el-dropdown-item
|
>银行卡</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-menu>
|
||||||
</el-dropdown>
|
</el-dropdown>
|
||||||
</template>
|
</template>
|
||||||
@ -677,6 +684,29 @@
|
|||||||
:user-id="clickUserId"
|
:user-id="clickUserId"
|
||||||
@close="diamondSalaryDialogVisible = false"
|
@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>
|
</div>
|
||||||
|
|
||||||
<!-- 用户注册情况弹窗 -->
|
<!-- 用户注册情况弹窗 -->
|
||||||
@ -705,7 +735,7 @@ import { genders, userTypes } from "@/constant/user";
|
|||||||
import { pickerOptions } from "@/constant/el-const";
|
import { pickerOptions } from "@/constant/el-const";
|
||||||
import { registerOrigins, originPlatforms } from "@/constant/origin";
|
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 { getCountryAlls } from "@/api/sys";
|
||||||
|
|
||||||
import Pagination from "@/components/Pagination";
|
import Pagination from "@/components/Pagination";
|
||||||
@ -761,6 +791,7 @@ export default {
|
|||||||
showAllCondition: false,
|
showAllCondition: false,
|
||||||
permissionValidationLoading: true,
|
permissionValidationLoading: true,
|
||||||
bankCardVisible: false,
|
bankCardVisible: false,
|
||||||
|
passwordVisible: false,
|
||||||
userAuthFormVisible: false,
|
userAuthFormVisible: false,
|
||||||
pickerOptions,
|
pickerOptions,
|
||||||
thisRow: {},
|
thisRow: {},
|
||||||
@ -1014,6 +1045,25 @@ export default {
|
|||||||
this.thisRow = item;
|
this.thisRow = item;
|
||||||
this.bankCardVisible = true;
|
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) {
|
addOtherRecharge(item) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user