admin
2025-03-29 9cd0e111d7315074f5574558dab3cae087ff1f68
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ed37dce4"],{"15cd":function(e,t,n){},9429:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("div",{staticClass:"user-info-head",on:{click:function(t){return e.editCropper()}}},[n("img",{staticClass:"img-circle img-lg",attrs:{src:e.options.img,title:"点击上传头像"}})]),n("el-dialog",{attrs:{title:e.title,visible:e.open,width:"800px","append-to-body":""},on:{"update:visible":function(t){e.open=t},opened:e.modalOpened,close:e.closeDialog}},[n("el-row",[n("el-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[e.visible?n("vue-cropper",{ref:"cropper",attrs:{img:e.options.img,info:!0,autoCrop:e.options.autoCrop,autoCropWidth:e.options.autoCropWidth,autoCropHeight:e.options.autoCropHeight,fixedBox:e.options.fixedBox,outputType:e.options.outputType},on:{realTime:e.realTime}}):e._e()],1),n("el-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[n("div",{staticClass:"avatar-upload-preview"},[n("img",{style:e.previews.img,attrs:{src:e.previews.url}})])])],1),n("br"),n("el-row",[n("el-col",{attrs:{lg:2,sm:3,xs:3}},[n("el-upload",{attrs:{action:"#","http-request":e.requestUpload,"show-file-list":!1,"before-upload":e.beforeUpload}},[n("el-button",{attrs:{size:"small"}},[e._v(" 选择 "),n("i",{staticClass:"el-icon-upload el-icon--right"})])],1)],1),n("el-col",{attrs:{lg:{span:1,offset:2},sm:2,xs:2}},[n("el-button",{attrs:{icon:"el-icon-plus",size:"small"},on:{click:function(t){return e.changeScale(1)}}})],1),n("el-col",{attrs:{lg:{span:1,offset:1},sm:2,xs:2}},[n("el-button",{attrs:{icon:"el-icon-minus",size:"small"},on:{click:function(t){return e.changeScale(-1)}}})],1),n("el-col",{attrs:{lg:{span:1,offset:1},sm:2,xs:2}},[n("el-button",{attrs:{icon:"el-icon-refresh-left",size:"small"},on:{click:function(t){return e.rotateLeft()}}})],1),n("el-col",{attrs:{lg:{span:1,offset:1},sm:2,xs:2}},[n("el-button",{attrs:{icon:"el-icon-refresh-right",size:"small"},on:{click:function(t){return e.rotateRight()}}})],1),n("el-col",{attrs:{lg:{span:2,offset:6},sm:2,xs:2}},[n("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.uploadImg()}}},[e._v("提 交")])],1)],1)],1)],1)},s=[],i=n("4360"),o=n("7e79"),a=n("c0c7"),u=n("ed08"),l={components:{VueCropper:o["VueCropper"]},data(){return{open:!1,visible:!1,title:"修改头像",options:{img:i["a"].getters.avatar,autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!0,outputType:"png",filename:"avatar"},previews:{},resizeHandler:null}},methods:{editCropper(){this.open=!0},modalOpened(){this.visible=!0,this.resizeHandler||(this.resizeHandler=Object(u["b"])(()=>{this.refresh()},100)),window.addEventListener("resize",this.resizeHandler)},refresh(){this.$refs.cropper.refresh()},requestUpload(){},rotateLeft(){this.$refs.cropper.rotateLeft()},rotateRight(){this.$refs.cropper.rotateRight()},changeScale(e){e=e||1,this.$refs.cropper.changeScale(e)},beforeUpload(e){if(-1==e.type.indexOf("image/"))this.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");else{const t=new FileReader;t.readAsDataURL(e),t.onload=()=>{this.options.img=t.result,this.options.filename=e.name}}},uploadImg(){this.$refs.cropper.getCropBlob(e=>{let t=new FormData;t.append("avatarfile",e,this.options.filename),Object(a["n"])(t).then(e=>{this.open=!1,this.options.img="/prod-api"+e.imgUrl,i["a"].commit("SET_AVATAR",this.options.img),this.$modal.msgSuccess("修改成功"),this.visible=!1})})},realTime(e){this.previews=e},closeDialog(){this.options.img=i["a"].getters.avatar,this.visible=!1,window.removeEventListener("resize",this.resizeHandler)}}},c=l,p=(n("d749"),n("2877")),d=Object(p["a"])(c,r,s,!1,null,"07624ce5",null);t["default"]=d.exports},c0c7:function(e,t,n){"use strict";n.d(t,"h",(function(){return i})),n.d(t,"f",(function(){return o})),n.d(t,"a",(function(){return a})),n.d(t,"k",(function(){return u})),n.d(t,"c",(function(){return l})),n.d(t,"i",(function(){return c})),n.d(t,"b",(function(){return p})),n.d(t,"g",(function(){return d})),n.d(t,"l",(function(){return f})),n.d(t,"m",(function(){return m})),n.d(t,"n",(function(){return h})),n.d(t,"e",(function(){return g})),n.d(t,"j",(function(){return _})),n.d(t,"d",(function(){return b}));var r=n("b775"),s=n("c38a");function i(e){return Object(r["a"])({url:"/system/user/list",method:"get",params:e})}function o(e){return Object(r["a"])({url:"/system/user/"+Object(s["e"])(e),method:"get"})}function a(e){return Object(r["a"])({url:"/system/user",method:"post",data:e})}function u(e){return Object(r["a"])({url:"/system/user",method:"put",data:e})}function l(e){return Object(r["a"])({url:"/system/user/"+e,method:"delete"})}function c(e,t){const n={userId:e,password:t};return Object(r["a"])({url:"/system/user/resetPwd",method:"put",data:n})}function p(e,t){const n={userId:e,status:t};return Object(r["a"])({url:"/system/user/changeStatus",method:"put",data:n})}function d(){return Object(r["a"])({url:"/system/user/profile",method:"get"})}function f(e){return Object(r["a"])({url:"/system/user/profile",method:"put",data:e})}function m(e,t){const n={oldPassword:e,newPassword:t};return Object(r["a"])({url:"/system/user/profile/updatePwd",method:"put",params:n})}function h(e){return Object(r["a"])({url:"/system/user/profile/avatar",method:"post",headers:{"Content-Type":"application/x-www-form-urlencoded"},data:e})}function g(e){return Object(r["a"])({url:"/system/user/authRole/"+e,method:"get"})}function _(e){return Object(r["a"])({url:"/system/user/authRole",method:"put",params:e})}function b(){return Object(r["a"])({url:"/system/user/deptTree",method:"get"})}},d749:function(e,t,n){"use strict";n("15cd")},ed08:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"e",(function(){return s})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"f",(function(){return a})),n.d(t,"d",(function(){return u}));n("d9e2"),n("14d9"),n("1e70"),n("79a4"),n("c1a1"),n("8b00"),n("a4e7"),n("1e5a"),n("72c3"),n("0643"),n("4e3e"),n("a573"),n("c38a");function r(e,t,n){let r,s,i,o,a;const u=function(){const l=+new Date-o;l<t&&l>0?r=setTimeout(u,t-l):(r=null,n||(a=e.apply(i,s),r||(i=s=null)))};return function(...s){i=this,o=+new Date;const l=n&&!r;return r||(r=setTimeout(u,t)),l&&(a=e.apply(i,s),i=s=null),a}}function s(e,t){const n=Object.create(null),r=e.split(",");for(let s=0;s<r.length;s++)n[r[s]]=!0;return t?e=>n[e.toLowerCase()]:e=>n[e]}const i="export default ",o={html:{indent_size:"2",indent_char:" ",max_preserve_newlines:"-1",preserve_newlines:!1,keep_array_indentation:!1,break_chained_methods:!1,indent_scripts:"separate",brace_style:"end-expand",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"110",indent_inner_html:!0,comma_first:!1,e4x:!0,indent_empty_lines:!0},js:{indent_size:"2",indent_char:" ",max_preserve_newlines:"-1",preserve_newlines:!1,keep_array_indentation:!1,break_chained_methods:!1,indent_scripts:"normal",brace_style:"end-expand",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!0,end_with_newline:!0,wrap_line_length:"110",indent_inner_html:!0,comma_first:!1,e4x:!0,indent_empty_lines:!0}};function a(e){return e.replace(/( |^)[a-z]/g,e=>e.toUpperCase())}function u(e){return/^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(e)}}}]);