|
@@ -108,26 +108,37 @@
|
|
|
<el-dialog
|
|
|
:title="title"
|
|
|
:visible.sync="open"
|
|
|
- width="600px"
|
|
|
+ width="500px"
|
|
|
style="margin-top:15vh"
|
|
|
append-to-body
|
|
|
:close-on-click-modal="false"
|
|
|
>
|
|
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
- <el-row>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-row style="margin-bottom:10px">
|
|
|
+ <el-col>
|
|
|
<el-form-item label="用户名称" prop="userName">
|
|
|
<el-input
|
|
|
v-if="form.userId == undefined"
|
|
|
v-model="form.userName"
|
|
|
placeholder="请输入用户名称"
|
|
|
maxlength="20"
|
|
|
+ style="width:300px"
|
|
|
+ minlength="2"
|
|
|
+ />
|
|
|
+ <el-input
|
|
|
+ v-else
|
|
|
+ v-model="form.userName"
|
|
|
+ placeholder="请输入用户名称"
|
|
|
+ maxlength="20"
|
|
|
minlength="2"
|
|
|
+ disabled
|
|
|
+ style="width:300px"
|
|
|
/>
|
|
|
- <el-input v-else v-model="form.userName" placeholder="请输入用户名称" maxlength="20" minlength="2" readonly />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ </el-row>
|
|
|
+ <el-row style="margin-bottom:10px">
|
|
|
+ <el-col>
|
|
|
<el-form-item v-if="form.userId == undefined" label="用户密码" prop="password">
|
|
|
<el-input
|
|
|
ref="password"
|
|
@@ -136,6 +147,7 @@
|
|
|
:type="passwordType"
|
|
|
maxlength="20"
|
|
|
auto-complete="new-password"
|
|
|
+ style="width:300px"
|
|
|
/>
|
|
|
<span class="show-pwd" @click="showPwd">
|
|
|
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
|
|
@@ -144,14 +156,14 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col>
|
|
|
<el-form-item label="用户类型" prop="userType">
|
|
|
<el-select v-model="form.userType" placeholder="请选择用户类型">
|
|
|
<el-option v-for="dict in userType" :key="dict.value" :label="dict.name" :value="dict.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col>
|
|
|
<el-form-item v-if="form.userId != undefined" label="用户状态">
|
|
|
<el-radio-group v-model="form.state">
|
|
|
<el-radio v-for="dict in userStatus" :key="dict.value" :label="dict.value">{{ dict.name }}</el-radio>
|
|
@@ -345,6 +357,10 @@ export default {
|
|
|
delUserById({
|
|
|
'userId': id
|
|
|
}).then(response => {
|
|
|
+ this.$message({
|
|
|
+ message: '删除成功',
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
this.getUserList()
|
|
|
})
|
|
|
}
|
|
@@ -505,12 +521,11 @@ export default {
|
|
|
<style rel="stylesheet/scss" lang="scss">
|
|
|
.show-pwd {
|
|
|
position: absolute;
|
|
|
- right: 10px;
|
|
|
+ right: 90px;
|
|
|
top: 1px;
|
|
|
font-size: 16px;
|
|
|
color: #889aa4;
|
|
|
cursor: pointer;
|
|
|
user-select: none;
|
|
|
}
|
|
|
-
|
|
|
</style>
|