重置密码为账号管理页
This commit is contained in:
@ -70,6 +70,12 @@
|
|||||||
size="small"
|
size="small"
|
||||||
>升级</el-button
|
>升级</el-button
|
||||||
>
|
>
|
||||||
|
<el-button
|
||||||
|
@click="resetPwd(scope.row.id)"
|
||||||
|
type="text"
|
||||||
|
size="small"
|
||||||
|
>重置密码</el-button
|
||||||
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -83,11 +89,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
import {
|
||||||
|
resetPw
|
||||||
|
} from '@/api/customer';
|
||||||
import {
|
import {
|
||||||
getUserList,
|
getUserList,
|
||||||
handleUser,
|
handleUser,
|
||||||
deleteCompanyUser,
|
deleteCompanyUser,
|
||||||
resetPw
|
|
||||||
} from '@/api/account';
|
} from '@/api/account';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@ -142,9 +150,9 @@ export default {
|
|||||||
// resetPw
|
// resetPw
|
||||||
this.$prompt('请输入新密码', '提示', {
|
this.$prompt('请输入新密码', '提示', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消'
|
cancelButtonText: '取消',
|
||||||
// inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
|
inputPattern: /^\d{6,}$/,
|
||||||
// inputErrorMessage: '邮箱格式不正确'
|
inputErrorMessage: '不能为空且六位及以上'
|
||||||
})
|
})
|
||||||
.then(({ value }) => {
|
.then(({ value }) => {
|
||||||
resetPw({ userId, password: value }).then(({ data }) => {
|
resetPw({ userId, password: value }).then(({ data }) => {
|
||||||
|
@ -104,12 +104,6 @@
|
|||||||
size="small"
|
size="small"
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
<el-button
|
|
||||||
@click="resetPwd(scope.row.userId)"
|
|
||||||
type="text"
|
|
||||||
size="small"
|
|
||||||
>重置密码</el-button
|
|
||||||
>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -186,22 +180,6 @@ export default {
|
|||||||
this.msgSuccess('删除成功');
|
this.msgSuccess('删除成功');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 重置密码
|
|
||||||
resetPwd(userId) {
|
|
||||||
// resetPw
|
|
||||||
this.$prompt('请输入新密码', '提示', {
|
|
||||||
confirmButtonText: '确定',
|
|
||||||
cancelButtonText: '取消'
|
|
||||||
// inputPattern: /[\w!#$%&'*+/=?^_`{|}~-]+(?:\.[\w!#$%&'*+/=?^_`{|}~-]+)*@(?:[\w](?:[\w-]*[\w])?\.)+[\w](?:[\w-]*[\w])?/,
|
|
||||||
// inputErrorMessage: '邮箱格式不正确'
|
|
||||||
})
|
|
||||||
.then(({ value }) => {
|
|
||||||
resetPw({ userId, password: value }).then(({ data }) => {
|
|
||||||
this.msgSuccess(data);
|
|
||||||
});
|
|
||||||
})
|
|
||||||
.catch(() => {});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
Reference in New Issue
Block a user