1 line
4.2 KiB
JavaScript
1 line
4.2 KiB
JavaScript
|
webpackJsonp([0],{"cdA+":function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=s("0xDb"),n={data:function(){var e=this;return{visible:!1,dataForm:{password:"",newPassword:"",confirmPassword:""},dataRule:{password:[{required:!0,message:"原密码不能为空",trigger:"blur"}],newPassword:[{required:!0,message:"新密码不能为空",trigger:"blur"}],confirmPassword:[{required:!0,message:"确认密码不能为空",trigger:"blur"},{validator:function(t,s,a){e.dataForm.newPassword!==s?a(new Error("确认密码与新密码不一致")):a()},trigger:"blur"}]}}},computed:{userName:{get:function(){return this.$store.state.user.name}},mainTabs:{get:function(){return this.$store.state.common.mainTabs},set:function(e){this.$store.commit("common/updateMainTabs",e)}}},methods:{init:function(){var e=this;this.visible=!0,this.$nextTick(function(){e.$refs.dataForm.resetFields()})},dataFormSubmit:function(){var e=this;this.$refs.dataForm.validate(function(t){t&&e.$http({url:e.$http.adornUrl("/sys/user/password"),method:"post",data:e.$http.adornData({password:e.dataForm.password,newPassword:e.dataForm.newPassword})}).then(function(t){var s=t.data;s&&0===s.code?e.$message({message:"操作成功",type:"success",duration:1500,onClose:function(){e.visible=!1,e.$nextTick(function(){e.mainTabs=[],Object(a.a)(),e.$router.replace({name:"login"})})}}):e.$message.error(s.msg)})})}}},r={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-dialog",{attrs:{title:"修改密码",visible:e.visible,"append-to-body":!0},on:{"update:visible":function(t){e.visible=t}}},[s("el-form",{ref:"dataForm",attrs:{model:e.dataForm,rules:e.dataRule,"label-width":"80px"},nativeOn:{keyup:function(t){if(!("button"in t)&&e._k(t.keyCode,"enter",13,t.key,"Enter"))return null;e.dataFormSubmit()}}},[s("el-form-item",{attrs:{label:"账号"}},[s("span",[e._v(e._s(e.userName))])]),e._v(" "),s("el-form-item",{attrs:{label:"原密码",prop:"password"}},[s("el-input",{attrs:{type:"password"},model:{value:e.dataForm.password,callback:function(t){e.$set(e.dataForm,"password",t)},expression:"dataForm.password"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"新密码",prop:"newPassword"}},[s("el-input",{attrs:{type:"password"},model:{value:e.dataForm.newPassword,callback:function(t){e.$set(e.dataForm,"newPassword",t)},expression:"dataForm.newPassword"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"确认密码",prop:"confirmPassword"}},[s("el-input",{attrs:{type:"password"},model:{value:e.dataForm.confirmPassword,callback:function(t){e.$set(e.dataForm,"confirmPassword",t)},expression:"dataForm.confirmPassword"}})],1)],1),e._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dataFormSubmit()}}},[e._v("确定")])],1)],1)},staticRenderFns:[]},o=s("VU/8")(n,r,!1,null,null,null);t.default=o.exports},oZaA:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a={name:"sub-menu",props:{menu:{type:Object,required:!0},dynamicMenuRoutes:{type:Array,required:!0}},components:{SubMenu:o},computed:{sidebarLayoutSkin:{get:function(){return this.$store.state.common.sidebarLayoutSkin}}},methods:{gotoRouteHandle:function(e){var t=this.dynamicMenuRoutes.filter(function(t){return t.meta.menuId===e.menuId});t.length>=1&&this.$router.push({name:t[0].name})}}},n={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return e.menu.list&&e.menu.list.length>=1?s("el-submenu",{attrs:{index:e.menu.menuId+"","popper-class":"site-sidebar--"+e.sidebarLayoutSkin+"-popper"}},[s("template",{slot:"title"},[s("icon-svg",{staticClass:"site-sidebar__menu-icon",attrs:{name:e.menu.icon||""}}),e._v(" "),s("span",[e._v(e._s(e.menu.name))])],1),e._v(" "),e._l(e.menu.list,function(t){return s("sub-menu",{key:t.menuId,attrs:{menu:t,dynamicMenuRoutes:e.dynamicMenuRoutes}})})],2):s("el-menu-item",{attrs:{index:e.menu.menuId+""},on:{click:function(t){e.gotoRouteHandle(
|