All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.static.js.chunk-f6f0b380.d20ee348.js Maven / Gradle / Ivy

The newest version!
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f6f0b380"],{"0bf8":function(t,e,r){"use strict";r("78f2")},"78f2":function(t,e,r){},9429:function(t,e,r){"use strict";r.r(e);var o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("div",{staticClass:"user-info-head",on:{click:function(e){return t.editCropper()}}},[r("img",{staticClass:"img-circle img-lg",attrs:{title:"点击上传头像",src:t.options.img}})]),r("el-dialog",{attrs:{title:t.title,visible:t.open,"append-to-body":"",width:"800px"},on:{"update:visible":function(e){t.open=e},close:function(e){return t.closeDialog()},opened:t.modalOpened}},[r("el-row",[r("el-col",{style:{height:"350px"},attrs:{md:12,xs:24}},[t.visible?r("vue-cropper",{ref:"cropper",attrs:{autoCrop:t.options.autoCrop,autoCropHeight:t.options.autoCropHeight,autoCropWidth:t.options.autoCropWidth,fixedBox:t.options.fixedBox,img:t.options.img,info:!0},on:{realTime:t.realTime}}):t._e()],1),r("el-col",{style:{height:"350px"},attrs:{md:12,xs:24}},[r("div",{staticClass:"avatar-upload-preview"},[r("img",{style:t.previews.img,attrs:{src:t.previews.url}})])])],1),r("br"),r("el-row",[r("el-col",{attrs:{lg:2,md:2}},[r("el-upload",{attrs:{"before-upload":t.beforeUpload,"http-request":t.requestUpload,"show-file-list":!1,action:"#"}},[r("el-button",{attrs:{size:"small"}},[t._v(" 选择 "),r("i",{staticClass:"el-icon-upload el-icon--right"})])],1)],1),r("el-col",{attrs:{lg:{span:1,offset:2},md:2}},[r("el-button",{attrs:{icon:"el-icon-plus",size:"small"},on:{click:function(e){return t.changeScale(1)}}})],1),r("el-col",{attrs:{lg:{span:1,offset:1},md:2}},[r("el-button",{attrs:{icon:"el-icon-minus",size:"small"},on:{click:function(e){return t.changeScale(-1)}}})],1),r("el-col",{attrs:{lg:{span:1,offset:1},md:2}},[r("el-button",{attrs:{icon:"el-icon-refresh-left",size:"small"},on:{click:function(e){return t.rotateLeft()}}})],1),r("el-col",{attrs:{lg:{span:1,offset:1},md:2}},[r("el-button",{attrs:{icon:"el-icon-refresh-right",size:"small"},on:{click:function(e){return t.rotateRight()}}})],1),r("el-col",{attrs:{lg:{span:2,offset:6},md:2}},[r("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.uploadImg()}}},[t._v("提 交")])],1)],1)],1)],1)},n=[],i=r("4360"),s=r("7e79"),a=r("c0c7"),u={components:{VueCropper:s["VueCropper"]},props:{user:{type:Object}},data:function(){return{open:!1,visible:!1,title:"修改头像",options:{img:i["a"].getters.avatar,autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!0},previews:{}}},methods:{editCropper:function(){this.open=!0},modalOpened:function(){this.visible=!0},requestUpload:function(){},rotateLeft:function(){this.$refs.cropper.rotateLeft()},rotateRight:function(){this.$refs.cropper.rotateRight()},changeScale:function(t){t=t||1,this.$refs.cropper.changeScale(t)},beforeUpload:function(t){var e=this;if(-1==t.type.indexOf("image/"))this.$modal.msgError("文件格式错误,请上传图片类型,如:JPG,PNG后缀的文件。");else{var r=new FileReader;r.readAsDataURL(t),r.onload=function(){e.options.img=r.result}}},uploadImg:function(){var t=this;this.$refs.cropper.getCropBlob((function(e){var r=new FormData;r.append("avatarfile",e),Object(a["m"])(r).then((function(e){t.open=!1,t.options.img="/cms-api/"+e.imgUrl,i["a"].commit("SET_AVATAR",t.options.img),t.$modal.msgSuccess("修改成功"),t.visible=!1}))}))},realTime:function(t){this.previews=t},closeDialog:function(){this.options.img=i["a"].getters.avatar,this.visible=!1}}},c=u,l=(r("0bf8"),r("2877")),p=Object(l["a"])(c,o,n,!1,null,"c4d3343e",null);e["default"]=p.exports},c0c7:function(t,e,r){"use strict";r.d(e,"g",(function(){return i})),r.d(e,"e",(function(){return s})),r.d(e,"a",(function(){return a})),r.d(e,"j",(function(){return u})),r.d(e,"c",(function(){return c})),r.d(e,"h",(function(){return l})),r.d(e,"b",(function(){return p})),r.d(e,"f",(function(){return f})),r.d(e,"k",(function(){return d})),r.d(e,"l",(function(){return m})),r.d(e,"m",(function(){return h})),r.d(e,"d",(function(){return g})),r.d(e,"i",(function(){return b}));var o=r("b775"),n=r("c38a");function i(t){return Object(o["a"])({url:"/system/user/list",method:"get",params:t})}function s(t){return Object(o["a"])({url:"/system/user/"+Object(n["f"])(t),method:"get"})}function a(t){return Object(o["a"])({url:"/system/user",method:"post",data:t})}function u(t){return Object(o["a"])({url:"/system/user",method:"put",data:t})}function c(t){return Object(o["a"])({url:"/system/user/"+t,method:"delete"})}function l(t,e){var r={userId:t,password:e};return Object(o["a"])({url:"/system/user/resetPwd",method:"put",data:r})}function p(t,e){var r={userId:t,status:e};return Object(o["a"])({url:"/system/user/changeStatus",method:"put",data:r})}function f(){return Object(o["a"])({url:"/system/user/profile",method:"get"})}function d(t){return Object(o["a"])({url:"/system/user/profile",method:"put",data:t})}function m(t,e){var r={oldPassword:t,newPassword:e};return Object(o["a"])({url:"/system/user/profile/updatePwd",method:"put",params:r})}function h(t){return Object(o["a"])({url:"/system/user/profile/avatar",method:"post",data:t})}function g(t){return Object(o["a"])({url:"/system/user/authRole/"+t,method:"get"})}function b(t){return Object(o["a"])({url:"/system/user/authRole",method:"put",params:t})}}}]);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy