| | |
| | | getClassesCurrentUserList: (param) => get('/api/admin/user/classes/students', param), |
| | | updatePassword: (data) => post('/api/common/user/update/password', data), |
| | | uploadImg: (data) => post('/api/admin/upload/img', data), |
| | | resetUserPassword: (id) => post('/api/admin/user/reset/password/' + id), |
| | | } |
| | |
| | | <el-form-item label="密码过期时间(天)" prop="passwordExpireTime"> |
| | | <el-input v-model="form.passwordExpireTime" type="number" autocomplete="off" placeholder="比如:30天密码过期"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="默认密码" prop="passwordDefault"> |
| | | <el-input v-model="form.passwordDefault" autocomplete="off" placeholder="重置后使用默认密码" readonly></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="edit()">保存</el-button> |
| | | </el-form-item> |
| | |
| | | return { |
| | | form: { |
| | | id: null, |
| | | passwordExpireTime: null |
| | | passwordExpireTime: null, |
| | | passwordDefault: null |
| | | }, |
| | | rules: { |
| | | passwordExpireTime: [ |
| | |
| | | <el-button size="mini">编辑</el-button> |
| | | </router-link> |
| | | <el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">删除</el-button> |
| | | <el-button size="mini" @click="resetPassword(row)" type="success" class="link-left">重置密码</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }, |
| | | statusBtnFormatter (status) { |
| | | return this.enumFormat(this.statusBtn, status) |
| | | } |
| | | }, |
| | | resetPassword(row) { |
| | | this.$confirm('此操作将重置该成员的密码, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | userApi.resetUserPassword(row.id).then(re => { |
| | | if (re.code === 1) { |
| | | this.$message.success(re.message) |
| | | } else { |
| | | this.$message.error(re.message) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters('enumItem', [ |
| | |
| | | > |
| | | <el-button slot="reference" type="danger" size="mini">删除</el-button> |
| | | </el-popconfirm> |
| | | <el-button size="mini" @click="resetPassword(row)" type="success" class="link-left">重置密码</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }, |
| | | statusBtnFormatter (status) { |
| | | return this.enumFormat(this.statusBtn, status) |
| | | } |
| | | }, |
| | | resetPassword(row) { |
| | | this.$confirm('此操作将重置该成员的密码, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | userApi.resetUserPassword(row.id).then(re => { |
| | | if (re.code === 1) { |
| | | this.$message.success(re.message) |
| | | } else { |
| | | this.$message.error(re.message) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters('enumItem', [ |
| | |
| | | <el-button size="mini">编辑</el-button> |
| | | </router-link> |
| | | <el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">删除</el-button> |
| | | <el-button size="mini" @click="resetPassword(row)" type="success" class="link-left">重置密码</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | }, |
| | | statusBtnFormatter (status) { |
| | | return this.enumFormat(this.statusBtn, status) |
| | | } |
| | | }, |
| | | resetPassword(row) { |
| | | this.$confirm('此操作将重置该成员的密码, 是否继续?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | userApi.resetUserPassword(row.id).then(re => { |
| | | if (re.code === 1) { |
| | | this.$message.success(re.message) |
| | | } else { |
| | | this.$message.error(re.message) |
| | | } |
| | | }) |
| | | }) |
| | | }, |
| | | }, |
| | | computed: { |
| | | ...mapGetters('enumItem', [ |