Browse Source

修改密码样式

ljh 2 years ago
parent
commit
9b9ec784cc

+ 3 - 0
chuanyi-admin/src/layout/components/Navbar.vue

@@ -48,6 +48,7 @@
               :type="passwordType1"
               style="width:300px"
               auto-complete="new-password"
+              maxlength="20"
             />
             <span class="show-pwd" @click="showPwd(1)">
               <svg-icon :icon-class="passwordType1 === 'password' ? 'eye' : 'eye-open'" />
@@ -60,6 +61,7 @@
               placeholder="请输入新密码"
               :type="passwordType2"
               style="width:300px"
+              maxlength="20"
             />
             <span class="show-pwd" @click="showPwd(2)">
               <svg-icon :icon-class="passwordType2 === 'password' ? 'eye' : 'eye-open'" />
@@ -72,6 +74,7 @@
               placeholder="请再次输入新密码"
               :type="passwordType3"
               style="width:300px"
+              maxlength="20"
             />
             <span class="show-pwd" @click="showPwd(3)">
               <svg-icon :icon-class="passwordType3 === 'password' ? 'eye' : 'eye-open'" />

+ 1 - 1
chuanyi-admin/src/views/system/role/index.vue

@@ -256,7 +256,7 @@ export default {
         if (res.code === 200) {
           if (!res.data.count) {
             this.$message({
-              message: '该菜单被角色权限绑定,无法删除',
+              message: '该角色被菜单权限绑定,无法删除',
               type: 'warning'
             })
           } else {

+ 24 - 9
chuanyi-admin/src/views/system/user/index.vue

@@ -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>