用户管理默认值为正常,admin用户禁止删除。用户编辑页面admin的用户账号,用户名称,角色,状态禁止修改

prod
schry 2 years ago
parent c8b4537803
commit 9651eb145c

@ -71,7 +71,7 @@
</el-button> </el-button>
<el-button <el-button
type="text" type="text"
:disabled="scope.row.id === 1 || !configParms.sysUser" :disabled="scope.row.id === '1' || !configParms.sysUser"
@click.native="handleDel(scope.$index, scope.row)" @click.native="handleDel(scope.$index, scope.row)"
v-hasPermi="['system:user:remove']" v-hasPermi="['system:user:remove']"
>删除 >删除
@ -102,13 +102,13 @@
<el-row type="flex"> <el-row type="flex">
<el-col :span="11" type="flex"> <el-col :span="11" type="flex">
<el-form-item label="用户账号" prop="userName"> <el-form-item label="用户账号" prop="userName">
<el-input v-model="formData.userName" size="small" style="width: 90%"></el-input> <el-input v-model="formData.userName" size="small" style="width: 90%" :disabled="formData.id == 1"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="11" class="el-col"> <el-col :span="11" class="el-col">
<el-form-item label="用户名称" prop="employeeName"> <el-form-item label="用户名称" prop="employeeName">
<el-input v-model="formData.employeeName" size="small" <el-input v-model="formData.employeeName" size="small"
style="width: 90%"></el-input> style="width: 90%" :disabled="formData.id == 1"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -167,7 +167,7 @@
</el-col> </el-col>
<el-col :span="11" type="flex"> <el-col :span="11" type="flex">
<el-form-item label="状态" prop="userFlag"> <el-form-item label="状态" prop="userFlag">
<el-radio-group v-model="formData.userFlag" :disabled="formData.id === 1"> <el-radio-group v-model="formData.userFlag" :disabled="formData.id == 1">
<el-radio :label="1">正常</el-radio> <el-radio :label="1">正常</el-radio>
<el-radio :label="0">禁用</el-radio> <el-radio :label="0">禁用</el-radio>
@ -206,7 +206,7 @@
<el-row :gutter="20" type="flex"> <el-row :gutter="20" type="flex">
<el-col :span="11" type="flex"> <el-col :span="11" type="flex">
<el-form-item label="角色"> <el-form-item label="角色">
<el-checkbox-group v-model="formData.roles" :disabled="formData.id === 1" > <el-checkbox-group v-model="formData.roles" :disabled="formData.id == 1" >
<el-checkbox <el-checkbox
v-for="item in roles" v-for="item in roles"
:key="item.roleId" :key="item.roleId"
@ -294,7 +294,7 @@ export default {
roles: [], roles: [],
query: { query: {
userName: "", userName: "",
userFlag: "", userFlag: "1",
page: 1, page: 1,
limit: 10, limit: 10,
roleId: "", roleId: "",
@ -362,7 +362,7 @@ export default {
}); });
this.query = { this.query = {
userName: "", userName: "",
userFlag: "", userFlag: "1",
page: 1, page: 1,
limit: 10, limit: 10,
roleId: "", roleId: "",

Loading…
Cancel
Save