Commit 1fbc7492 authored by shen_yan_pu's avatar shen_yan_pu

超级管理员状态不可停用

parent 88e7a5b0
...@@ -74,10 +74,10 @@ export function resetUserPwd(businessId, password) { ...@@ -74,10 +74,10 @@ export function resetUserPwd(businessId, password) {
} }
// 用户状态修改 // 用户状态修改
export function changeUserStatus(businessId, status) { export function changeUserStatus(businessId, flag) {
const data = { const data = {
businessId, businessId,
status flag
} }
return request({ return request({
url: '/system/user/changeStatus', url: '/system/user/changeStatus',
...@@ -136,7 +136,6 @@ export function importTemplate(params) { ...@@ -136,7 +136,6 @@ export function importTemplate(params) {
return request({ return request({
url: '/system/user/importTemplate', url: '/system/user/importTemplate',
method: 'get', method: 'get',
responseType: 'blob',
params params
}) })
} }
......
...@@ -88,7 +88,6 @@ ...@@ -88,7 +88,6 @@
</el-col> </el-col>
<!--用户数据--> <!--用户数据-->
<el-col :span="20" :xs="24"> <el-col :span="20" :xs="24">
<!-- <div class="placeholder" style="width: calc(100% + 20px);margin-left: -10px" />-->
<div class="mb12 font-small-bold" style="margin-top: 20px">用户管理列表</div> <div class="mb12 font-small-bold" style="margin-top: 20px">用户管理列表</div>
<el-table <el-table
v-loading="loading" v-loading="loading"
...@@ -118,12 +117,11 @@ ...@@ -118,12 +117,11 @@
{{ scope.row.phone || '-' }} {{ scope.row.phone || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column width="120" label="状态" prop="status"> <el-table-column width="120" label="状态" prop="flag">
<template slot-scope="scope"> <template slot-scope="scope">
<el-switch <el-switch
v-model="scope.row.flag" v-model="scope.row.flag"
class="switchDisabledStyle" class="switchDisabledStyle"
:disabled="true"
inactive-value="0" inactive-value="0"
active-value="1" active-value="1"
@click.native="handleStatusChange(scope.row)" @click.native="handleStatusChange(scope.row)"
...@@ -239,7 +237,7 @@ ...@@ -239,7 +237,7 @@
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="状态"> <el-form-item v-if="form.businessId == undefined" label="状态">
<el-radio-group v-model="form.flag"> <el-radio-group v-model="form.flag">
<el-radio <el-radio
v-for="dict in statusOptions" v-for="dict in statusOptions"
...@@ -498,7 +496,7 @@ export default { ...@@ -498,7 +496,7 @@ export default {
idNumber: '', idNumber: '',
userType: '', userType: '',
allowLogin: '', allowLogin: '',
status: '', flag: '',
deptId: '', deptId: '',
flag: undefined, flag: undefined,
name: undefined name: undefined
...@@ -578,25 +576,6 @@ export default { ...@@ -578,25 +576,6 @@ export default {
changeValue() { changeValue() {
this.$refs.form.validateField('id') this.$refs.form.validateField('id')
}, },
/** // 用户登录控制
toggleLoginAuth(row) {
const status = row.allowLogin === '1' ? '禁止' : '允许'
this.$confirm(`“${row.username}”即将被${status}登录, 是否继续?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
userLoginManage({
userId: row.userId,
allowLogin: row.allowLogin === '0' ? '1' : '0'
}).then(res => {
this.$message.success('操作成功')
row.allowLogin = row.allowLogin === '0' ? '1' : '0'
})
}).catch(() => {
})
},*/
/** 查询用户列表 */ /** 查询用户列表 */
getList() { getList() {
this.loading = true this.loading = true
...@@ -652,7 +631,7 @@ export default { ...@@ -652,7 +631,7 @@ export default {
}, },
// 用户状态修改 // 用户状态修改
handleStatusChange(row) { handleStatusChange(row) {
const text = row.flag === '0' ? '启用' : '停用' const text = row.flag === '1' ? '启用' : '停用'
this.$confirm('确认要"' + text + '""' + row.name + '"用户吗?', '警告', { this.$confirm('确认要"' + text + '""' + row.name + '"用户吗?', '警告', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
...@@ -665,7 +644,7 @@ export default { ...@@ -665,7 +644,7 @@ export default {
type: 'success' type: 'success'
}) })
}).catch(function() { }).catch(function() {
row.flag = row.flag === '1' ? '0' : '1' row.flag = row.flag === '0' ? '1' : '0'
}) })
}, },
// 取消按钮 // 取消按钮
...@@ -686,7 +665,7 @@ export default { ...@@ -686,7 +665,7 @@ export default {
idNumber: undefined, idNumber: undefined,
email: undefined, email: undefined,
sex: undefined, sex: undefined,
status: '0', flag: '0',
remark: undefined, remark: undefined,
postIds: [], postIds: [],
roleIds: [] roleIds: []
...@@ -696,7 +675,7 @@ export default { ...@@ -696,7 +675,7 @@ export default {
/** 查询按钮操作 */ /** 查询按钮操作 */
handleQuery() { handleQuery() {
this.queryParams.page = 1 this.queryParams.page = 1
this.getList() this.getList(listUser)
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
resetQuery() { resetQuery() {
...@@ -729,16 +708,9 @@ export default { ...@@ -729,16 +708,9 @@ export default {
}, },
/** 重置密码按钮操作 */ /** 重置密码按钮操作 */
handleResetPwd(row) { handleResetPwd(row) {
this.$prompt('请输入"' + row.name + '"的新密码', '提示', { this.ruleForm.newPassword = ''
confirmButtonText: '确定', this.ruleForm.row = row.userId
cancelButtonText: '取消' this.resetPwdDiaLog = !this.resetPwdDiaLog
}).then(({ value }) => {
resetUserPwd(this.businessId, value).then(response => {
this.$message({
message: '修改成功,新密码是:' + value
})
})
}).catch(() => {})
}, },
handleResetPwdSure() { handleResetPwdSure() {
this.$refs.ruleForm.validate(pass => { this.$refs.ruleForm.validate(pass => {
...@@ -839,7 +811,7 @@ export default { ...@@ -839,7 +811,7 @@ export default {
this.upload.open = true this.upload.open = true
}, },
/** 下载模板操作 */ /** 下载模板操作 */
importTemplate() { importTemplate(params) {
importTemplate().then(response => { importTemplate().then(response => {
this.download(response.msg) this.download(response.msg)
}) })
......
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