正在显示
1 个修改的文件
包含
193 行增加
和
101 行删除
| @@ -11,7 +11,8 @@ | @@ -11,7 +11,8 @@ | ||
| 11 | </el-col> | 11 | </el-col> |
| 12 | <el-col :span="4" class="userinfo"> | 12 | <el-col :span="4" class="userinfo"> |
| 13 | <el-dropdown trigger="hover"> | 13 | <el-dropdown trigger="hover"> |
| 14 | - <span class="el-dropdown-link userinfo-inner"><img :src="this.sysUserAvatar" /> {{sysUserName}}</span> | 14 | + <span class="el-dropdown-link userinfo-inner"><img |
| 15 | + :src="this.sysUserAvatar"/> {{sysUserName}}</span> | ||
| 15 | <el-dropdown-menu slot="dropdown"> | 16 | <el-dropdown-menu slot="dropdown"> |
| 16 | <el-dropdown-item>我的消息</el-dropdown-item> | 17 | <el-dropdown-item>我的消息</el-dropdown-item> |
| 17 | <el-dropdown-item @click.native="editPass">修改密码</el-dropdown-item> | 18 | <el-dropdown-item @click.native="editPass">修改密码</el-dropdown-item> |
| @@ -22,16 +23,17 @@ | @@ -22,16 +23,17 @@ | ||
| 22 | </el-col> | 23 | </el-col> |
| 23 | </el-col> | 24 | </el-col> |
| 24 | <el-col> | 25 | <el-col> |
| 25 | - <el-dialog title="修改密码" :visible.sync="dialogFormVisible"> | 26 | + <el-dialog title="修改密码" :visible.sync="dialogFormVisible" @close="resetFormClosed"> |
| 26 | <el-form :model="resetForm" status-icon :rules="resetFormRules" ref="resetForm" label-width="100px"> | 27 | <el-form :model="resetForm" status-icon :rules="resetFormRules" ref="resetForm" label-width="100px"> |
| 27 | <el-form-item label="用户名" prop="name"> | 28 | <el-form-item label="用户名" prop="name"> |
| 28 | <span>{{sysUserName}}</span> | 29 | <span>{{sysUserName}}</span> |
| 29 | </el-form-item> | 30 | </el-form-item> |
| 30 | <el-form-item label="新密码" prop="newpwd"> | 31 | <el-form-item label="新密码" prop="newpwd"> |
| 31 | - <el-input type="password" v-model="resetForm.newpwd" autocomplete="off" placeholder="8-20位字符在数字、小写、大写字母以及特殊字符中四选三"></el-input> | 32 | + <el-input type="password" v-model="resetForm.newpwd" autocomplete="off" show-password |
| 33 | + placeholder="8-20位字符在数字、小写、大写字母以及特殊字符中四选三"></el-input> | ||
| 32 | </el-form-item> | 34 | </el-form-item> |
| 33 | <el-form-item label="确认密码" prop="renewpwd"> | 35 | <el-form-item label="确认密码" prop="renewpwd"> |
| 34 | - <el-input type="password" v-model="resetForm.renewpwd" auto-complete="off"></el-input> | 36 | + <el-input type="password" v-model="resetForm.renewpwd" show-password auto-complete="off"></el-input> |
| 35 | </el-form-item> | 37 | </el-form-item> |
| 36 | <el-form-item> | 38 | <el-form-item> |
| 37 | <el-button type="primary" @click="submitEdit('resetForm')" style="float:right">提 交</el-button> | 39 | <el-button type="primary" @click="submitEdit('resetForm')" style="float:right">提 交</el-button> |
| @@ -43,27 +45,42 @@ | @@ -43,27 +45,42 @@ | ||
| 43 | <el-col :span="24" class="main"> | 45 | <el-col :span="24" class="main"> |
| 44 | <aside :class="collapsed?'menu-collapsed':'menu-expanded'"> | 46 | <aside :class="collapsed?'menu-collapsed':'menu-expanded'"> |
| 45 | <!--导航菜单--> | 47 | <!--导航菜单--> |
| 46 | - <el-menu :default-active="$route.path" class="el-menu-vertical-demo" @open="handleopen" @close="handleclose" @select="handleselect" unique-opened router v-show="!collapsed" style="min-width: 230px"> | 48 | + <el-menu :default-active="$route.path" class="el-menu-vertical-demo" @open="handleopen" |
| 49 | + @close="handleclose" @select="handleselect" unique-opened router v-show="!collapsed" | ||
| 50 | + style="min-width: 230px"> | ||
| 47 | <template v-for="(item,index) in $router.options.routes" v-if="!item.hidden"> | 51 | <template v-for="(item,index) in $router.options.routes" v-if="!item.hidden"> |
| 48 | <el-submenu :index="index+''" v-if="!item.leaf"> | 52 | <el-submenu :index="index+''" v-if="!item.leaf"> |
| 49 | <template slot="title"><i :class="item.iconCls"></i>{{item.name}}</template> | 53 | <template slot="title"><i :class="item.iconCls"></i>{{item.name}}</template> |
| 50 | - <el-menu-item v-for="child in item.children" :index="child.path" :key="child.path" v-if="!child.hidden">{{child.name}}</el-menu-item> | 54 | + <el-menu-item v-for="child in item.children" :index="child.path" :key="child.path" |
| 55 | + v-if="!child.hidden">{{child.name}} | ||
| 56 | + </el-menu-item> | ||
| 51 | </el-submenu> | 57 | </el-submenu> |
| 52 | - <el-menu-item v-if="item.leaf&&item.children.length>0" :index="item.children[0].path"><i :class="item.iconCls"></i>{{item.children[0].name}}</el-menu-item> | 58 | + <el-menu-item v-if="item.leaf&&item.children.length>0" :index="item.children[0].path"><i |
| 59 | + :class="item.iconCls"></i>{{item.children[0].name}} | ||
| 60 | + </el-menu-item> | ||
| 53 | </template> | 61 | </template> |
| 54 | </el-menu> | 62 | </el-menu> |
| 55 | <!--导航菜单-折叠后--> | 63 | <!--导航菜单-折叠后--> |
| 56 | <ul class="el-menu el-menu-vertical-demo collapsed" v-show="collapsed" ref="menuCollapsed"> | 64 | <ul class="el-menu el-menu-vertical-demo collapsed" v-show="collapsed" ref="menuCollapsed"> |
| 57 | <li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item"> | 65 | <li v-for="(item,index) in $router.options.routes" v-if="!item.hidden" class="el-submenu item"> |
| 58 | <template v-if="!item.leaf"> | 66 | <template v-if="!item.leaf"> |
| 59 | - <div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)"><i :class="item.iconCls"></i></div> | ||
| 60 | - <ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)" @mouseout="showMenu(index,false)"> | ||
| 61 | - <li v-for="child in item.children" v-if="!child.hidden" :key="child.path" class="el-menu-item" style="padding-left: 40px;" :class="$route.path==child.path?'is-active':''" @click="$router.push(child.path)">{{child.name}}</li> | 67 | + <div class="el-submenu__title" style="padding-left: 20px;" @mouseover="showMenu(index,true)" |
| 68 | + @mouseout="showMenu(index,false)"><i :class="item.iconCls"></i></div> | ||
| 69 | + <ul class="el-menu submenu" :class="'submenu-hook-'+index" @mouseover="showMenu(index,true)" | ||
| 70 | + @mouseout="showMenu(index,false)"> | ||
| 71 | + <li v-for="child in item.children" v-if="!child.hidden" :key="child.path" | ||
| 72 | + class="el-menu-item" style="padding-left: 40px;" | ||
| 73 | + :class="$route.path==child.path?'is-active':''" @click="$router.push(child.path)"> | ||
| 74 | + {{child.name}} | ||
| 75 | + </li> | ||
| 62 | </ul> | 76 | </ul> |
| 63 | </template> | 77 | </template> |
| 64 | <template v-else> | 78 | <template v-else> |
| 65 | <li class="el-submenu"> | 79 | <li class="el-submenu"> |
| 66 | - <div class="el-submenu__title el-menu-item" style="padding-left: 20px;height: 56px;line-height: 56px;padding: 0 20px;" :class="$route.path==item.children[0].path?'is-active':''" @click="$router.push(item.children[0].path)"><i :class="item.iconCls"></i></div> | 80 | + <div class="el-submenu__title el-menu-item" |
| 81 | + style="padding-left: 20px;height: 56px;line-height: 56px;padding: 0 20px;" | ||
| 82 | + :class="$route.path==item.children[0].path?'is-active':''" | ||
| 83 | + @click="$router.push(item.children[0].path)"><i :class="item.iconCls"></i></div> | ||
| 67 | </li> | 84 | </li> |
| 68 | </template> | 85 | </template> |
| 69 | </li> | 86 | </li> |
| @@ -92,8 +109,10 @@ | @@ -92,8 +109,10 @@ | ||
| 92 | 109 | ||
| 93 | <script> | 110 | <script> |
| 94 | import rt from '../routes' | 111 | import rt from '../routes' |
| 95 | - import { editPass,resetToken} from '../api/user'; | 112 | + import {editPass, resetToken} from '../api/user'; |
| 96 | import ElFormItem from "element-ui/packages/form/src/form-item"; | 113 | import ElFormItem from "element-ui/packages/form/src/form-item"; |
| 114 | + import {updatePassword} from "../api/message_bus" | ||
| 115 | + | ||
| 97 | export default { | 116 | export default { |
| 98 | 117 | ||
| 99 | provide() { | 118 | provide() { |
| @@ -106,30 +125,48 @@ | @@ -106,30 +125,48 @@ | ||
| 106 | var validatePass = (rule, value, callback) => { | 125 | var validatePass = (rule, value, callback) => { |
| 107 | if (!value) { | 126 | if (!value) { |
| 108 | callback(new Error('请输入新密码')); | 127 | callback(new Error('请输入新密码')); |
| 109 | - }else { | ||
| 110 | - var ls=0; | ||
| 111 | - if(value.match(/([a-z])+/)){ | 128 | + } else { |
| 129 | + var ls = 0; | ||
| 130 | + if (value.match(/([a-z])+/)) { | ||
| 112 | ls++; | 131 | ls++; |
| 113 | - } if(value.match(/([0-9])+/)){ | 132 | + } |
| 133 | + if (value.match(/([0-9])+/)) { | ||
| 114 | ls++; | 134 | ls++; |
| 115 | - } if(value.match(/([A-Z])+/)){ | 135 | + } |
| 136 | + if (value.match(/([A-Z])+/)) { | ||
| 116 | ls++; | 137 | ls++; |
| 117 | - } if((/([\W])+/) && !value.match(/(![\u4E00-\u9FA5])+/)){ | 138 | + } |
| 139 | + if ((/([\W])+/) && !value.match(/(![\u4E00-\u9FA5])+/)) { | ||
| 118 | ls++; | 140 | ls++; |
| 119 | - } if (value.toString().length < 8 || value.toString().length > 20) { | 141 | + } |
| 142 | + if (value.toString().length < 8 || value.toString().length > 20) { | ||
| 120 | callback(new Error('密码长度为8 - 20个字符')); | 143 | callback(new Error('密码长度为8 - 20个字符')); |
| 121 | - ls=0; | ||
| 122 | - } if(value.match(/([\u4E00-\u9FA5])+/)){ | 144 | + ls = 0; |
| 145 | + } | ||
| 146 | + if (value.match(/([\u4E00-\u9FA5])+/)) { | ||
| 123 | callback(new Error('不能包含中文字符')); | 147 | callback(new Error('不能包含中文字符')); |
| 124 | - ls=0; | 148 | + ls = 0; |
| 125 | } | 149 | } |
| 126 | switch (ls) { | 150 | switch (ls) { |
| 127 | - case 0: this.passwordPercent = 0;callback(new Error('数字、小写字母、大写字母以及特殊字符中四选三'));break; | ||
| 128 | - case 1: this.passwordPercent = 33;callback(new Error('数字、小写字母、大写字母以及特殊字符中四选三'));break; | ||
| 129 | - case 2: this.passwordPercent = 66;callback(new Error('数字、小写字母 、大写字母以及特殊字符中四选三'));break; | 151 | + case 0: |
| 152 | + this.passwordPercent = 0; | ||
| 153 | + callback(new Error('数字、小写字母、大写字母以及特殊字符中四选三')); | ||
| 154 | + break; | ||
| 155 | + case 1: | ||
| 156 | + this.passwordPercent = 33; | ||
| 157 | + callback(new Error('数字、小写字母、大写字母以及特殊字符中四选三')); | ||
| 158 | + break; | ||
| 159 | + case 2: | ||
| 160 | + this.passwordPercent = 66; | ||
| 161 | + callback(new Error('数字、小写字母 、大写字母以及特殊字符中四选三')); | ||
| 162 | + break; | ||
| 130 | case 3: | 163 | case 3: |
| 131 | - case 4: this.passwordPercent = 100;break; | ||
| 132 | - default: this.passwordPercent = 0;break; | 164 | + case 4: |
| 165 | + this.passwordPercent = 100; | ||
| 166 | + break; | ||
| 167 | + default: | ||
| 168 | + this.passwordPercent = 0; | ||
| 169 | + break; | ||
| 133 | } | 170 | } |
| 134 | callback(); | 171 | callback(); |
| 135 | } | 172 | } |
| @@ -146,10 +183,10 @@ | @@ -146,10 +183,10 @@ | ||
| 146 | } | 183 | } |
| 147 | }; | 184 | }; |
| 148 | return { | 185 | return { |
| 149 | - sysName:'消息控制中心', | ||
| 150 | - collapsed:false, | 186 | + sysName: '消息控制中心', |
| 187 | + collapsed: false, | ||
| 151 | sysUserName: '', | 188 | sysUserName: '', |
| 152 | - sysUserId:'', | 189 | + sysUserId: '', |
| 153 | sysUserAvatar: '', | 190 | sysUserAvatar: '', |
| 154 | isRouterAlive: true, | 191 | isRouterAlive: true, |
| 155 | form: { | 192 | form: { |
| @@ -162,17 +199,17 @@ | @@ -162,17 +199,17 @@ | ||
| 162 | resource: '', | 199 | resource: '', |
| 163 | desc: '' | 200 | desc: '' |
| 164 | }, | 201 | }, |
| 165 | - dialogFormVisible:false, | 202 | + dialogFormVisible: false, |
| 166 | resetForm: { | 203 | resetForm: { |
| 167 | newpwd: '', | 204 | newpwd: '', |
| 168 | renewpwd: '', | 205 | renewpwd: '', |
| 169 | }, | 206 | }, |
| 170 | resetFormRules: { | 207 | resetFormRules: { |
| 171 | newpwd: [ | 208 | newpwd: [ |
| 172 | - { required: true, validator: validatePass, trigger: 'blur' } | 209 | + {required: true, validator: validatePass, trigger: 'blur'} |
| 173 | ], | 210 | ], |
| 174 | renewpwd: [ | 211 | renewpwd: [ |
| 175 | - { required: true, validator: validatePass2, trigger: 'blur' } | 212 | + {required: true, validator: validatePass2, trigger: 'blur'} |
| 176 | ] | 213 | ] |
| 177 | }, | 214 | }, |
| 178 | editForm: { | 215 | editForm: { |
| @@ -184,27 +221,27 @@ | @@ -184,27 +221,27 @@ | ||
| 184 | methods: { | 221 | methods: { |
| 185 | reload() { | 222 | reload() { |
| 186 | this.$nextTick(function () { | 223 | this.$nextTick(function () { |
| 187 | - this.$router.push({ | ||
| 188 | - path: this.$router.path, | ||
| 189 | - query:{ | ||
| 190 | - t: new Date().getTime() | ||
| 191 | - } | ||
| 192 | - }) | 224 | + this.$router.push({ |
| 225 | + path: this.$router.path, | ||
| 226 | + query: { | ||
| 227 | + t: new Date().getTime() | ||
| 228 | + } | ||
| 229 | + }) | ||
| 193 | }) | 230 | }) |
| 194 | }, | 231 | }, |
| 195 | - editPass:function(){ | ||
| 196 | - this.dialogFormVisible=true; | 232 | + editPass: function () { |
| 233 | + this.dialogFormVisible = true; | ||
| 197 | }, | 234 | }, |
| 198 | - updateCache:function(){ | ||
| 199 | - resetToken().then( res =>{ | ||
| 200 | - let response = res.data; | ||
| 201 | - if (response.code === '200'){ | 235 | + updateCache: function () { |
| 236 | + resetToken().then(res => { | ||
| 237 | + let response = res.data; | ||
| 238 | + if (response.code === '200') { | ||
| 202 | this.$notify({ | 239 | this.$notify({ |
| 203 | title: '成功', | 240 | title: '成功', |
| 204 | message: '缓存更新成功', | 241 | message: '缓存更新成功', |
| 205 | type: 'success' | 242 | type: 'success' |
| 206 | }); | 243 | }); |
| 207 | - }else{ | 244 | + } else { |
| 208 | this.$notify.error({ | 245 | this.$notify.error({ |
| 209 | title: '失败', | 246 | title: '失败', |
| 210 | message: '缓存更新失败' | 247 | message: '缓存更新失败' |
| @@ -212,21 +249,45 @@ | @@ -212,21 +249,45 @@ | ||
| 212 | } | 249 | } |
| 213 | }) | 250 | }) |
| 214 | }, | 251 | }, |
| 215 | - submitEdit(formName){ | 252 | + |
| 253 | + /** | ||
| 254 | + * 修改密码对话框时,重置表格 | ||
| 255 | + */ | ||
| 256 | + resetFormClosed() { | ||
| 257 | + // 重置对话框 | ||
| 258 | + this.$refs.resetForm.resetFields(); | ||
| 259 | + }, | ||
| 260 | + | ||
| 261 | + submitEdit(formName) { | ||
| 216 | this.$refs[formName].validate((valid) => { | 262 | this.$refs[formName].validate((valid) => { |
| 217 | if (valid) { | 263 | if (valid) { |
| 218 | - this.editForm.userId=this.sysUserId; | ||
| 219 | - this.editForm.password=this.resetForm.renewpwd; | ||
| 220 | - editPass(this.editForm).then(res=>{ | ||
| 221 | - let response=res.data; | ||
| 222 | - if(response.code=='200'){ | 264 | + const userInfo = { |
| 265 | + username: this.sysUserName, | ||
| 266 | + password: this.resetForm.renewpwd | ||
| 267 | + } | ||
| 268 | + // 修改MQ用户的密码 | ||
| 269 | + updatePassword(userInfo).then((response) => { | ||
| 270 | + let res = response.data; | ||
| 271 | + if (res.code !== '200') { | ||
| 272 | + return this.$message.error(res.msg); | ||
| 273 | + } | ||
| 274 | + }).catch(error => { | ||
| 275 | + this.$message.error(error.toString()); | ||
| 276 | + }); | ||
| 277 | + | ||
| 278 | + this.editForm.userId = this.sysUserId; | ||
| 279 | + this.editForm.password = this.resetForm.renewpwd; | ||
| 280 | + // 修改cloud用户的密码 | ||
| 281 | + editPass(this.editForm).then(res => { | ||
| 282 | + let response = res.data; | ||
| 283 | + if (response.code == '200') { | ||
| 223 | this.$notify({ | 284 | this.$notify({ |
| 224 | title: '密码修改成功', | 285 | title: '密码修改成功', |
| 225 | message: '密码修改成功,退出请重新登录', | 286 | message: '密码修改成功,退出请重新登录', |
| 226 | type: 'success' | 287 | type: 'success' |
| 227 | }); | 288 | }); |
| 228 | - this.dialogFormVisible=false; | ||
| 229 | - }else{ | 289 | + this.dialogFormVisible = false; |
| 290 | + } else { | ||
| 230 | this.$notify.error({ | 291 | this.$notify.error({ |
| 231 | title: '密码修改失败', | 292 | title: '密码修改失败', |
| 232 | message: '密码修改失败!!!' | 293 | message: '密码修改失败!!!' |
| @@ -260,7 +321,7 @@ | @@ -260,7 +321,7 @@ | ||
| 260 | sessionStorage.removeItem('user'); | 321 | sessionStorage.removeItem('user'); |
| 261 | sessionStorage.removeItem('menu'); | 322 | sessionStorage.removeItem('menu'); |
| 262 | //退出后初始化原来的路由 | 323 | //退出后初始化原来的路由 |
| 263 | - let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu')); | 324 | + let sysRoutes = JSON.parse(sessionStorage.getItem('sysMenu')); |
| 264 | console.log(sysRoutes); | 325 | console.log(sysRoutes); |
| 265 | _this.$router.options.routes = sysRoutes; | 326 | _this.$router.options.routes = sysRoutes; |
| 266 | 327 | ||
| @@ -272,11 +333,11 @@ | @@ -272,11 +333,11 @@ | ||
| 272 | 333 | ||
| 273 | }, | 334 | }, |
| 274 | //折叠导航栏 | 335 | //折叠导航栏 |
| 275 | - collapse:function(){ | ||
| 276 | - this.collapsed=!this.collapsed; | 336 | + collapse: function () { |
| 337 | + this.collapsed = !this.collapsed; | ||
| 277 | }, | 338 | }, |
| 278 | - showMenu(i,status){ | ||
| 279 | - this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-'+i)[0].style.display=status?'block':'none'; | 339 | + showMenu(i, status) { |
| 340 | + this.$refs.menuCollapsed.getElementsByClassName('submenu-hook-' + i)[0].style.display = status ? 'block' : 'none'; | ||
| 280 | } | 341 | } |
| 281 | }, | 342 | }, |
| 282 | mounted() { | 343 | mounted() { |
| @@ -285,7 +346,7 @@ | @@ -285,7 +346,7 @@ | ||
| 285 | if (user) { | 346 | if (user) { |
| 286 | user = JSON.parse(user); | 347 | user = JSON.parse(user); |
| 287 | this.sysUserName = user.username || ''; | 348 | this.sysUserName = user.username || ''; |
| 288 | - this.sysUserId=user.userId||''; | 349 | + this.sysUserId = user.userId || ''; |
| 289 | this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg'; | 350 | this.sysUserAvatar = user.userface || '/static/images/faceDefault.jpg'; |
| 290 | } | 351 | } |
| 291 | //操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由 | 352 | //操作路由,判断本地存储的用户栏目列表是否存在,如果存在则加载路由 |
| @@ -303,23 +364,28 @@ | @@ -303,23 +364,28 @@ | ||
| 303 | 364 | ||
| 304 | <style scoped lang="scss"> | 365 | <style scoped lang="scss"> |
| 305 | @import '~scss_vars'; | 366 | @import '~scss_vars'; |
| 367 | + | ||
| 306 | .container { | 368 | .container { |
| 307 | position: absolute; | 369 | position: absolute; |
| 308 | top: 0px; | 370 | top: 0px; |
| 309 | bottom: 0px; | 371 | bottom: 0px; |
| 310 | width: 100%; | 372 | width: 100%; |
| 373 | + | ||
| 311 | .header { | 374 | .header { |
| 312 | height: 60px; | 375 | height: 60px; |
| 313 | line-height: 60px; | 376 | line-height: 60px; |
| 314 | background: $color-primary url("/static/images/air-banner.png"); | 377 | background: $color-primary url("/static/images/air-banner.png"); |
| 315 | - color:#fff; | 378 | + color: #fff; |
| 379 | + | ||
| 316 | .userinfo { | 380 | .userinfo { |
| 317 | text-align: right; | 381 | text-align: right; |
| 318 | padding-right: 35px; | 382 | padding-right: 35px; |
| 319 | float: right; | 383 | float: right; |
| 384 | + | ||
| 320 | .userinfo-inner { | 385 | .userinfo-inner { |
| 321 | cursor: pointer; | 386 | cursor: pointer; |
| 322 | - color:#fff; | 387 | + color: #fff; |
| 388 | + | ||
| 323 | img { | 389 | img { |
| 324 | width: 40px; | 390 | width: 40px; |
| 325 | height: 40px; | 391 | height: 40px; |
| @@ -329,38 +395,45 @@ | @@ -329,38 +395,45 @@ | ||
| 329 | } | 395 | } |
| 330 | } | 396 | } |
| 331 | } | 397 | } |
| 398 | + | ||
| 332 | .logo { | 399 | .logo { |
| 333 | //width:230px; | 400 | //width:230px; |
| 334 | - height:60px; | 401 | + height: 60px; |
| 335 | font-size: 22px; | 402 | font-size: 22px; |
| 336 | - padding-left:20px; | ||
| 337 | - padding-right:20px; | ||
| 338 | - border-color: rgba(238,241,146,0.3); | 403 | + padding-left: 20px; |
| 404 | + padding-right: 20px; | ||
| 405 | + border-color: rgba(238, 241, 146, 0.3); | ||
| 339 | border-right-width: 1px; | 406 | border-right-width: 1px; |
| 340 | border-right-style: solid; | 407 | border-right-style: solid; |
| 408 | + | ||
| 341 | img { | 409 | img { |
| 342 | width: 40px; | 410 | width: 40px; |
| 343 | float: left; | 411 | float: left; |
| 344 | margin: 10px 10px 10px 18px; | 412 | margin: 10px 10px 10px 18px; |
| 345 | } | 413 | } |
| 414 | + | ||
| 346 | .txt { | 415 | .txt { |
| 347 | - color:#fff; | 416 | + color: #fff; |
| 348 | } | 417 | } |
| 349 | } | 418 | } |
| 350 | - .logo-width{ | ||
| 351 | - width:230px; | 419 | + |
| 420 | + .logo-width { | ||
| 421 | + width: 230px; | ||
| 352 | } | 422 | } |
| 353 | - .logo-collapse-width{ | ||
| 354 | - width:60px | 423 | + |
| 424 | + .logo-collapse-width { | ||
| 425 | + width: 60px | ||
| 355 | } | 426 | } |
| 356 | - .tools{ | 427 | + |
| 428 | + .tools { | ||
| 357 | padding: 0px 23px; | 429 | padding: 0px 23px; |
| 358 | - width:14px; | 430 | + width: 14px; |
| 359 | height: 60px; | 431 | height: 60px; |
| 360 | line-height: 60px; | 432 | line-height: 60px; |
| 361 | cursor: pointer; | 433 | cursor: pointer; |
| 362 | } | 434 | } |
| 363 | } | 435 | } |
| 436 | + | ||
| 364 | .main { | 437 | .main { |
| 365 | display: flex; | 438 | display: flex; |
| 366 | // background: #324057; | 439 | // background: #324057; |
| @@ -368,44 +441,51 @@ | @@ -368,44 +441,51 @@ | ||
| 368 | top: 60px; | 441 | top: 60px; |
| 369 | bottom: 0px; | 442 | bottom: 0px; |
| 370 | overflow: hidden; | 443 | overflow: hidden; |
| 444 | + | ||
| 371 | aside { | 445 | aside { |
| 372 | - flex:0 0 230px; | 446 | + flex: 0 0 230px; |
| 373 | width: 230px; | 447 | width: 230px; |
| 374 | /*overflow-y: scroll;*/ | 448 | /*overflow-y: scroll;*/ |
| 375 | background: #606060; | 449 | background: #606060; |
| 376 | // position: absolute; | 450 | // position: absolute; |
| 377 | // top: 0px; | 451 | // top: 0px; |
| 378 | // bottom: 0px; | 452 | // bottom: 0px; |
| 379 | - .collapsed{ | ||
| 380 | - width:60px; | ||
| 381 | - .item{ | 453 | + .collapsed { |
| 454 | + width: 60px; | ||
| 455 | + | ||
| 456 | + .item { | ||
| 382 | position: relative; | 457 | position: relative; |
| 383 | } | 458 | } |
| 384 | - .submenu{ | ||
| 385 | - position:absolute; | ||
| 386 | - top:0px; | ||
| 387 | - left:60px; | ||
| 388 | - z-index:99999; | ||
| 389 | - height:auto; | ||
| 390 | - display:none; | 459 | + |
| 460 | + .submenu { | ||
| 461 | + position: absolute; | ||
| 462 | + top: 0px; | ||
| 463 | + left: 60px; | ||
| 464 | + z-index: 99999; | ||
| 465 | + height: auto; | ||
| 466 | + display: none; | ||
| 391 | } | 467 | } |
| 392 | 468 | ||
| 393 | } | 469 | } |
| 394 | } | 470 | } |
| 395 | - .menu-collapsed{ | ||
| 396 | - flex:0 0 60px; | 471 | + |
| 472 | + .menu-collapsed { | ||
| 473 | + flex: 0 0 60px; | ||
| 397 | width: 60px; | 474 | width: 60px; |
| 398 | } | 475 | } |
| 399 | - .menu-expanded{ | ||
| 400 | - flex:0 0 230px; | 476 | + |
| 477 | + .menu-expanded { | ||
| 478 | + flex: 0 0 230px; | ||
| 401 | width: 230px; | 479 | width: 230px; |
| 402 | } | 480 | } |
| 403 | - .menu-expanded ul{ | 481 | + |
| 482 | + .menu-expanded ul { | ||
| 404 | width: 230px; | 483 | width: 230px; |
| 405 | } | 484 | } |
| 485 | + | ||
| 406 | .content-container { | 486 | .content-container { |
| 407 | // background: #f1f2f7; | 487 | // background: #f1f2f7; |
| 408 | - flex:1; | 488 | + flex: 1; |
| 409 | // position: absolute; | 489 | // position: absolute; |
| 410 | // right: 0px; | 490 | // right: 0px; |
| 411 | // top: 0px; | 491 | // top: 0px; |
| @@ -413,6 +493,7 @@ | @@ -413,6 +493,7 @@ | ||
| 413 | // left: 230px; | 493 | // left: 230px; |
| 414 | overflow-y: scroll; | 494 | overflow-y: scroll; |
| 415 | padding: 10px; | 495 | padding: 10px; |
| 496 | + | ||
| 416 | .breadcrumb-container { | 497 | .breadcrumb-container { |
| 417 | //margin-bottom: 15px; | 498 | //margin-bottom: 15px; |
| 418 | .title { | 499 | .title { |
| @@ -421,14 +502,17 @@ | @@ -421,14 +502,17 @@ | ||
| 421 | color: #475669; | 502 | color: #475669; |
| 422 | margin-left: 10px; | 503 | margin-left: 10px; |
| 423 | } | 504 | } |
| 505 | + | ||
| 424 | .breadcrumb-inner { | 506 | .breadcrumb-inner { |
| 425 | float: right; | 507 | float: right; |
| 426 | - margin-right:10px; | 508 | + margin-right: 10px; |
| 427 | } | 509 | } |
| 428 | - .el-breadcrumb{ | ||
| 429 | - line-height:36px; | 510 | + |
| 511 | + .el-breadcrumb { | ||
| 512 | + line-height: 36px; | ||
| 430 | } | 513 | } |
| 431 | } | 514 | } |
| 515 | + | ||
| 432 | .content-wrapper { | 516 | .content-wrapper { |
| 433 | background-color: #fff; | 517 | background-color: #fff; |
| 434 | box-sizing: border-box; | 518 | box-sizing: border-box; |
| @@ -438,34 +522,42 @@ | @@ -438,34 +522,42 @@ | ||
| 438 | } | 522 | } |
| 439 | </style> | 523 | </style> |
| 440 | <style lang="scss"> | 524 | <style lang="scss"> |
| 441 | - .darkmenu{ | 525 | + .darkmenu { |
| 442 | .main { | 526 | .main { |
| 443 | aside { | 527 | aside { |
| 444 | - .el-menu{ | 528 | + .el-menu { |
| 445 | height: 100%; | 529 | height: 100%; |
| 446 | background: #606060; | 530 | background: #606060; |
| 531 | + | ||
| 447 | .el-menu-item { | 532 | .el-menu-item { |
| 448 | - i{ | 533 | + i { |
| 449 | color: white; | 534 | color: white; |
| 450 | } | 535 | } |
| 536 | + | ||
| 451 | color: white; | 537 | color: white; |
| 452 | } | 538 | } |
| 453 | - .el-menu-item.is-active{ | ||
| 454 | - color:#e6a23c; | 539 | + |
| 540 | + .el-menu-item.is-active { | ||
| 541 | + color: #e6a23c; | ||
| 455 | } | 542 | } |
| 456 | - .el-menu-item:hover,.el-menu-item:focus{ | 543 | + |
| 544 | + .el-menu-item:hover, .el-menu-item:focus { | ||
| 457 | background-color: #1a4496; | 545 | background-color: #1a4496; |
| 458 | } | 546 | } |
| 547 | + | ||
| 459 | .el-submenu { | 548 | .el-submenu { |
| 460 | - ul.el-menu.el-menu--inline{ | 549 | + ul.el-menu.el-menu--inline { |
| 461 | background: #303030; | 550 | background: #303030; |
| 462 | } | 551 | } |
| 552 | + | ||
| 463 | .el-submenu__title { | 553 | .el-submenu__title { |
| 464 | color: white; | 554 | color: white; |
| 465 | - i{ | 555 | + |
| 556 | + i { | ||
| 466 | color: white; | 557 | color: white; |
| 467 | } | 558 | } |
| 468 | } | 559 | } |
| 560 | + | ||
| 469 | .el-submenu__title:hover { | 561 | .el-submenu__title:hover { |
| 470 | background-color: #1a4496; | 562 | background-color: #1a4496; |
| 471 | } | 563 | } |
-
请 注册 或 登录 后发表评论