chunk-77b1ff90.845a9f35.js 8.9 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-77b1ff90"],{"2e82":function(e,t,n){},"82d3":function(e,t,n){"use strict";n("2e82")},b012: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",[e.options.img?n("div",{staticClass:"user-info-head",on:{click:function(t){return e.editCropper()}}},[n("img",{staticClass:"avatar_upload_box",attrs:{src:e.options.img}})]):n("div",{staticClass:"user-info-head",on:{click:function(t){return e.editCropper()}}},[n("div",{staticStyle:{display:"flex","justify-content":"center","align-items":"center","background-color":"#f5f7fa",width:"360px",height:"120px",color:"#c0c4cc"}},[e._v(" 暂无图片 ")])]),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)],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)},i=[],o=n("c7eb"),s=n("1da1"),a=(n("a15b"),n("fb6a"),n("b0c0"),n("d3b7"),n("4360"),n("7e79")),u=n("ed08"),c=n("c0c7"),l={components:{VueCropper:a["VueCropper"]},props:{imgSrc:{type:String,required:""}},data:function(){return{open:!1,visible:!1,title:"修改头像",options:{img:"",autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!1,outputType:"png",filename:"avatar"},fileType:["png","jpg","jpeg"],previews:{},resizeHandler:null}},mounted:function(){this.options.img=this.imgSrc},methods:{initPic:function(){this.options.img=this.imgSrc,console.log(this.options.img)},editCropper:function(){this.open=!0},modalOpened:function(){var e=this;this.visible=!0,this.resizeHandler||(this.resizeHandler=Object(u["b"])((function(){e.refresh()}),100)),window.addEventListener("resize",this.resizeHandler)},refresh:function(){this.$refs.cropper.refresh()},requestUpload:function(){},rotateLeft:function(){this.$refs.cropper.rotateLeft()},rotateRight:function(){this.$refs.cropper.rotateRight()},changeScale:function(e){e=e||1,this.$refs.cropper.changeScale(e)},beforeUpload:function(e){var t=this;return Object(s["a"])(Object(o["a"])().mark((function n(){var r,i,s;return Object(o["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(r=!1,t.fileType.length?(i="",e.name.lastIndexOf(".")>-1&&(i=e.name.slice(e.name.lastIndexOf(".")+1)),r=t.fileType.some((function(t){return e.type.indexOf(t)>-1||!!(i&&i.indexOf(t)>-1)}))):r=e.type.indexOf("image")>-1,r){n.next=5;break}return t.$modal.msgError("文件格式不正确, 请上传".concat(t.fileType.join("/"),"图片格式文件!")),n.abrupt("return",!1);case 5:return s=new FileReader,s.readAsDataURL(e),s.onload=function(){t.options.img=s.result},n.abrupt("return",!0);case 9:case"end":return n.stop()}}),n)})))()},handleRemove:function(e,t){this.imgFileList=t,this.avatar="",this.$emit("removeAll")},uploadImg:function(){var e=this;this.$refs.cropper.getCropBlob(function(){var t=Object(s["a"])(Object(o["a"])().mark((function t(n){var r,i;return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=new FormData,r.append("file",n),t.next=4,Object(c["n"])(r);case 4:if(i=t.sent,200===i.code){t.next=8;break}return e.removeAll(),t.abrupt("return",e.$message.error("文件格式不支持"));case 8:e.$emit("addAll",i.fileName),e.$forceUpdate(),e.visible=!1,e.open=!1;case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},realTime:function(e){this.previews=e},closeDialog:function(){this.options.img="",this.open=!1,window.removeEventListener("resize",this.resizeHandler)}}},p=l,d=(n("82d3"),n("2877")),f=Object(d["a"])(p,r,i,!1,null,"4ff0e392",null);t["default"]=f.exports},c0c7:function(e,t,n){"use strict";n.d(t,"h",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"a",(function(){return u})),n.d(t,"k",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"i",(function(){return p})),n.d(t,"b",(function(){return d})),n.d(t,"g",(function(){return f})),n.d(t,"l",(function(){return m})),n.d(t,"m",(function(){return h})),n.d(t,"o",(function(){return b})),n.d(t,"n",(function(){return g})),n.d(t,"e",(function(){return _})),n.d(t,"j",(function(){return y})),n.d(t,"d",(function(){return v}));n("e9c4");var r=n("b775"),i=n("c38a"),o=n("cbd8");function s(e){return Object(r["a"])({url:"/system/user/list",method:"get",params:e})}function a(e){return Object(r["a"])({url:"/system/user/"+Object(i["e"])(e),method:"get"})}function u(e){return Object(r["a"])({url:"/system/user",method:"post",data:o["a"].methods.encrypt(JSON.stringify(e))})}function c(e){return Object(r["a"])({url:"/system/user",method:"put",data:o["a"].methods.encrypt(JSON.stringify(e))})}function l(e){return Object(r["a"])({url:"/system/user/"+e,method:"delete"})}function p(e,t){var n={userId:e,password:t};return Object(r["a"])({url:"/system/user/resetPwd",method:"put",data:o["a"].methods.encrypt(JSON.stringify(n))})}function d(e,t){var n={userId:e,status:t};return Object(r["a"])({url:"/system/user/changeStatus",method:"put",data:o["a"].methods.encrypt(JSON.stringify(n))})}function f(){return Object(r["a"])({url:"/system/user/profile",method:"get"})}function m(e){return Object(r["a"])({url:"/system/user/profile",method:"put",data:o["a"].methods.encrypt(JSON.stringify(e))})}function h(e,t){var n={oldPassword:e,newPassword:t};return Object(r["a"])({url:"/system/user/profile/updatePwd",method:"put",params:n})}function b(e){return Object(r["a"])({url:"/system/user/profile/avatar",method:"post",data:o["a"].methods.encrypt(JSON.stringify(e))})}function g(e){return Object(r["a"])({url:"/common/upload",method:"post",data:e})}function _(e){return Object(r["a"])({url:"/system/user/authRole/"+e,method:"get"})}function y(e){return Object(r["a"])({url:"/system/user/authRole",method:"put",params:e})}function v(){return Object(r["a"])({url:"/system/user/deptTree",method:"get"})}},ed08:function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"e",(function(){return i})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){return s})),n.d(t,"f",(function(){return a})),n.d(t,"d",(function(){return u}));n("53ca"),n("d9e2"),n("a630"),n("a15b"),n("d81d"),n("14d9"),n("fb6a"),n("b64b"),n("d3b7"),n("4d63"),n("c607"),n("ac1f"),n("2c3e"),n("00b4"),n("25f0"),n("6062"),n("3ca3"),n("466d"),n("5319"),n("159b"),n("ddb0"),n("c38a");function r(e,t,n){var r,i,o,s,a,u=function u(){var c=+new Date-s;c<t&&c>0?r=setTimeout(u,t-c):(r=null,n||(a=e.apply(o,i),r||(o=i=null)))};return function(){for(var i=arguments.length,c=new Array(i),l=0;l<i;l++)c[l]=arguments[l];o=this,s=+new Date;var p=n&&!r;return r||(r=setTimeout(u,t)),p&&(a=e.apply(o,c),o=c=null),a}}function i(e,t){for(var n=Object.create(null),r=e.split(","),i=0;i<r.length;i++)n[r[i]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var o="export default ",s={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,(function(e){return e.toUpperCase()}))}function u(e){return/^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(e)}}}]);