Commit c2434e2b authored by 罗超's avatar 罗超

新增密码重置功能

parent ec02a8ca
......@@ -12,7 +12,7 @@ export default {
<style>
@import url('~assets/css/font.css');
@import url('//at.alicdn.com/t/font_2077629_n35k4sfl4mi.css');
@import url('//at.alicdn.com/t/font_2077629_7449myoskyf.css');
html,
body,
......
import request from '../../utils/request'
/**
* 重置用户密码信息
*/
export function resetPassword(data) {
//参数信息AccountType AccountId
return request({
url: '/user/ResetUserPassword',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -2,7 +2,7 @@
<q-dialog v-model="persistent" maximized full-height seamless position="right" @hide="closeShenheForm">
<q-card style="margin-top:61px;width:600px" class="no-border-radius q-px-lg">
<q-toolbar class="q-my-md q-pa-none">
<q-icon name="iconfont icon-11zaixianshenpixitong" size="40px" color="warning" />
<q-icon name="iconfont icon-11zaixianshenpixitong" size="30px" color="warning" />
<q-toolbar-title class="micfont">教师审核</q-toolbar-title>
</q-toolbar>
<div class="row">
......
......@@ -93,6 +93,7 @@
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="iconfont icon-shenhe" color="info" style="font-weight:400" class="q-mr-xs" label="审核" @click="showExamine(props.row)" />
<q-btn flat size="xs" icon="iconfont icon-ziyuan" color="negative" style="font-weight:400" class="q-mr-xs" label="重置密码" @click="resetPw(props.row.TId)" />
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑" @click="addObj(props.row)" />
</q-td>
</template>
......@@ -108,6 +109,9 @@ import {
getTeacherPage,
getSchoolDropdown
} from '../../api/school/index'
import {
resetPassword
} from '../../api/users/user.js'
import teacherForm from '../../components/school/teacher/teacher-form'
import teacherShenhe from '../../components/school/teacher/teacher-shenhe'
export default {
......@@ -267,6 +271,36 @@ export default {
}
this.getTeacher()
},
resetPw(id) {
let that = this
this.$q.dialog({
title: "重置密码",
message: "你正在进行重置密码行为,是否确认执行",
persistent: true,
cancel: {
label: "取消",
flat: true,
class: "micfont"
},
ok: {
label: "确认重置",
flat: true,
focus: true,
class: "micfont"
}
}).onOk(() => {
resetPassword({
AccountType: 2,
AccountId: id
}).then(res => {
that.$q.dialog({
title: "密码重置成功",
message: res.Message,
persistent: true
})
});
});
},
changePage(val) {
this.msg.Status = this.StatusTemp ? this.StatusTemp.value : '-1'
this.msg.pageIndex = 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment