12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-38707048","chunk-6ac0df94"],{"01b3":function(e,t,r){"use strict";r("2097")},"0c6d":function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"a",(function(){return i}));r("d3b7");var n=r("2b0e"),s=function(e){return new Promise((function(t,r){axios(e).then((function(e){return t(e)})).catch((function(e){return r(e)}))}))},a=function(e){return new Promise((function(t,r){var n=e.data.code;return 0==n?(t(JSON.parse(JSON.stringify(e.data))),!1):(r(e.data.msg),!1)}))},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={url:e,method:"POST",headers:{Authorization:sessionStorage.getItem("token")},data:JSON.parse(JSON.stringify(t))};return new Promise((function(e,t){s(r).then((function(e){return a(e)})).then((function(t){return e(t)})).catch((function(e){return n["default"].prototype.$message.error("温馨提示:".concat(e))}))}))},i=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={url:e,method:"GET",headers:{Authorization:sessionStorage.getItem("token")},params:JSON.parse(JSON.stringify(t))};return new Promise((function(e,t){s(r).then((function(e){return a(e)})).then((function(t){return e(t)})).catch((function(e){return n["default"].prototype.$message.error("温馨提示:".concat(e))}))}))}},2097:function(e,t,r){},"85a2":function(e,t,r){e.exports=r.p+"img/1.eb827164.png"},d5a2:function(e,t,r){"use strict";r.r(t);var n=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{ref:"basic",attrs:{id:"basic"}},[r("el-container",[r("el-header",{staticStyle:{"background-size":"calc(40px * 944 / 84 ) 40px","background-repeat":"no-repeat","background-position":"200px"},style:{backgroundImage:"url("+e.nav.icon+")"}},[r("div",{staticClass:"left"},[r("span",[e._v("人员能力评估系统")])]),r("div",{staticClass:"right"},e._l(e.nav.btns,(function(t,n){return r("div",{key:n,staticClass:"btns",on:{click:function(r){return e.Success(t.success)}}},[e._v(e._s(t.name))])})),0)]),r("el-main",[e._t("default")],2)],1),r("el-dialog",{attrs:{title:"提示",visible:e.centerDialogVisible,width:"500px",center:""},on:{"update:visible":function(t){e.centerDialogVisible=t}}},[r("el-form",{ref:"update",attrs:{rules:e.rules,model:e.value,"label-width":"100px"}},[r("el-form-item",{attrs:{label:"旧密码",prop:"old_password"}},[r("el-input",{model:{value:e.value.old_password,callback:function(t){e.$set(e.value,"old_password",t)},expression:"value.old_password"}})],1),r("el-form-item",{attrs:{label:"新密码",prop:"new_password"}},[r("el-input",{attrs:{type:"password"},model:{value:e.value.new_password,callback:function(t){e.$set(e.value,"new_password",t)},expression:"value.new_password"}})],1),r("el-form-item",{attrs:{label:"确认密码",prop:"confirm_password"}},[r("el-input",{attrs:{type:"password"},model:{value:e.value.confirm_password,callback:function(t){e.$set(e.value,"confirm_password",t)},expression:"value.confirm_password"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm("update")}}},[e._v("提交")])],1)],1)],1)],1)},s=[],a=r("85a2"),o=r.n(a),i=r("0c6d"),u={update:function(e){return Object(i["b"])("/staff/change_password/",e)}},c={props:{Type:{type:Boolean,default:!1}},data:function(){var e=this,t=function(t,r,n){e.value.old_password==r?n(new Error("新密码不能和记密码一致!")):n()},r=function(t,r,n){e.value.new_password!==r?n(new Error("两次密码不一致")):n()};return{nav:{icon:o.a,btns:[{name:"用户 - "+sessionStorage.getItem("username"),success:function(){this.centerDialogVisible=!0}},{name:"退出登录",success:function(){sessionStorage.clear(),this.$router.push("/login")}}]},centerDialogVisible:!1,value:{old_password:"",new_password:"",confirm_password:""},rules:{old_password:[{required:!0,message:"旧密码不能为空!",trigger:"blur"},{min:4,message:"旧密码最短4个字符",trigger:"blur"}],new_password:[{required:!0,message:"新密码不能为空!",trigger:"blur"},{min:4,message:"新密码最短4个字符!",trigger:"blur"},{validator:t,trigger:"blur"}],confirm_password:[{required:!0,message:"确认密码不能为空!",trigger:"blur"},{validator:r,trigger:"blur"}]}}},methods:{Success:function(e){e.bind(this)()},submitForm:function(e){var t=this;this.$refs[e].validate((function(e){e&&u.update(t.value).then((function(e){t.$message({type:"success",message:"密码已修改!"}),sessionStorage.clear(),t.value={old_password:"",new_password:"",confirm_password:""},t.centerDialogVisible=!1,t.$router.push("/login")}))}))}},mounted:function(){this.Type&&this.Static()}},l=c,d=(r("01b3"),r("2877")),p=Object(d["a"])(l,n,s,!1,null,null,null);t["default"]=p.exports}}]);
- //# sourceMappingURL=chunk-38707048.498bcaf3.js.map
|