(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-commons"],{"06f1":function(e,t,a){},"095c":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"editor"},[a("quill-editor",{ref:"myAlias",staticClass:"ql-editor",attrs:{options:e.editorOption},on:{blur:function(t){return e.onEditorBlur(t)},focus:function(t){return e.onEditorFocus(t)},change:function(t){return e.onEditorChange(t)}},model:{value:e.form,callback:function(t){e.form=t},expression:"form"}}),e._v(" "),a("el-upload",{ref:"ivuUpload",staticClass:"ivu-upload",staticStyle:{height:"1px"},attrs:{"show-file-list":!1,accept:".jpg, .jpeg, .png","before-upload":e.beforeImgUpload,"max-size":2048,multiple:"",action:e.ossUploadUrl,data:e.dataObj,"http-request":e.handleChangeImg}},[a("p")]),e._v(" "),a("el-dialog",{attrs:{title:"插入视频",width:"500px",visible:e.dialogFormVisible,"append-to-body":""},on:{"update:visible":function(t){e.dialogFormVisible=t}}},[a("el-form",{ref:"diologForm",attrs:{model:e.dialogForm,rules:e.dialogFormRules}},[a("el-form-item",{attrs:{label:"封面图地址","label-width":"90px"}},[a("el-upload",{staticClass:"avatar-uploader",staticStyle:{"line-height":"0",display:"inline-block"},attrs:{"show-file-list":!1,accept:".jpg, .jpeg, .png","on-error":e.handleUploadImgError,"before-upload":e.beforeImgUpload,action:e.ossUploadUrl,data:e.dataObj,"http-request":e.handleImgChange}},[e.dialogForm.poster?a("img",{staticClass:"avatar",attrs:{width:"300px",src:e.dialogForm.poster}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1),e._v(" "),a("el-form-item",{attrs:{label:"视频类型","label-width":"90px"}},[a("el-radio-group",{model:{value:e.formRadio,callback:function(t){e.formRadio=t},expression:"formRadio"}},[a("el-radio",{attrs:{label:1}},[e._v("外部链接")]),e._v(" "),a("el-radio",{attrs:{label:2}},[e._v("上传")])],1)],1),e._v(" "),1==e.formRadio?a("el-form-item",{attrs:{label:"视频地址","label-width":"90px",prop:"url"}},[a("el-input",{staticStyle:{width:"100%"},attrs:{autocomplete:"off"},model:{value:e.dialogForm.url,callback:function(t){e.$set(e.dialogForm,"url",t)},expression:"dialogForm.url"}})],1):e._e(),e._v(" "),2==e.formRadio?a("el-form-item",{attrs:{label:"上传视频","label-width":"90px",prop:"videoUrl"}},[a("el-upload",{directives:[{name:"loading",rawName:"v-loading",value:e.uploadLoading,expression:"uploadLoading"}],staticClass:"upload-demo",staticStyle:{display:"inline-block"},attrs:{"before-upload":e.beforeUpload,"on-error":e.handleUploadError,"show-file-list":!1,accept:".mp4","file-list":e.fileList,"on-exceed":e.handleExceed,action:e.ossUploadUrl,data:e.dataObj,"http-request":e.handleSuccessChange}},[e.dialogForm.videoUrl?a("video",{staticStyle:{width:"120px",height:"120px"},attrs:{type:"video/mp4",preload:"auto",src:e.dialogForm.videoUrl}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})]),e._v(" "),a("p",{staticClass:"imageSize"},[e._v("只能上传mp4文件, 且不超过100M")])],1):e._e()],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.dialogFormVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.onVideoComfirm("diologForm")}}},[e._v("确 定")])],1)],1)],1)},n=[],o=(a("7f7f"),a("ac6a"),a("c7eb")),r=(a("96cf"),a("1da1")),s=a("5f87"),l=(a("a753"),a("8096"),a("14e1"),a("9339")),c=a.n(l),u=a("953d"),p=(a("3607"),a("4450")),d=a("7590"),h=(a("5a0c"),[["bold","italic","underline","strike"],["blockquote","code-block"],[{header:1},{header:2}],[{list:"ordered"},{list:"bullet"}],[{script:"sub"},{script:"super"}],[{indent:"-1"},{indent:"+1"}],[{size:["small","middle","large","huge"]}],[{header:[1,2,3,4,5,6,!1]}],[{color:[]},{background:[]}],[{font:[]}],[{align:[]}],["clean"],["link","image","video"]]),f={"ql-bold":"加粗","ql-color":"颜色","ql-font":"字体","ql-code":"插入代码","ql-italic":"斜体","ql-background":"背景颜色","ql-size":"字体大小","ql-strike":"删除线","ql-script":"上标/下标","ql-underline":"下划线","ql-blockquote":"引用","ql-header":"标题","ql-indent":"缩进","ql-list":"列表","ql-align":"文本对齐","ql-direction":"文本方向","ql-code-block":"代码块","ql-formula":"公式","ql-image":"图片","ql-video":"视频","ql-clean":"清除字体样式","ql-upload":"文件"};c.a.register(d["a"],!0);var g={props:{id:"",keyWord:{type:String,default:"content"},form:{type:String},alias:{type:String,default:"myQuillEditor"},bucket_name:{type:String,default:"daya"}},name:"editor",components:{quillEditor:u["quillEditor"]},data:function(){var e=this;return{content:null,headers:{Authorization:Object(s["b"])()},dialogFormVisible:!1,dialogForm:{poster:null,url:null,videoUrl:null},uploadLoading:!1,uploadImgLoading:!1,fileList:[],dialogFormRules:{url:[{required:!0,message:"请输入视频地址",trigger:"blur"}],videoUrl:[{required:!0,message:"请上传视频",trigger:"blur"}]},formRadio:1,editorOption:{placeholder:"请输入内容",modules:{toolbar:{container:h,handlers:{image:function(t){if(t){var a,i=e.editor;e.editorIndex=(null===(a=i.getSelection())||void 0===a?void 0:a.index)||0,e.$refs.ivuUpload.$children[0].$refs.input.click()}else e.quill.format("image",!1)},video:function(t){if(t){var a;e.dialogFormVisible=!0;var i=e.editor;e.editorIndex=(null===(a=i.getSelection())||void 0===a?void 0:a.index)||0}else e.quill.format("image",!1)}}}}},ActiveEditor:null,dataObj:{policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""},ossUploadUrl:"https://".concat(this.bucket_name,".ks3-cn-beijing.ksyuncs.com")}},created:function(){},mounted:function(){this},methods:{onEditorBlur:function(e){e.quill,e.html,e.text},onEditorFocus:function(e){console.log(e,this.id),this.ActiveEditor=e},onEditorChange:function(e){e.quill;var t=e.html;e.text;this.$emit("onEditorChange",t)},onVideoComfirm:function(e){var t=this;this.$refs[e].validate((function(e){if(!e)return!1;var a=t.dialogForm,i=t.editor;console.log(i,t.keyWord);var n={poster:a.poster,url:1==t.formRadio?a.url:a.videoUrl};i.insertEmbed(t.editorIndex,"video",n),i.setSelection(t.editorIndex+1,{preload:!1}),t.dialogFormVisible=!1,t.dialogForm={poster:null,url:null,videoUrl:null}}))},handleChangeImg:function(){var e=Object(r["a"])(Object(o["a"])().mark((function e(t){var a,i,n,r;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return console.log(t,"1212"),e.prev=1,a={policy:t.data.policy,signature:t.data.signature,key:t.data.key,KSSAccessKeyId:t.data.kssAccessKeyId,acl:"public-read",name:t.data.key,file:t.file},e.next=5,Object(p["b"])(this.ossUploadUrl,a);case 5:i=e.sent,n=this.ActiveEditor,i?(r=n.getSelection().index||0,n.insertEmbed(r,"image",i),n.setSelection(r+1)):this.$message.error("图片插入失败"),e.next=13;break;case 10:e.prev=10,e.t0=e["catch"](1),console.log(e.t0,"e.message");case 13:case"end":return e.stop()}}),e,this,[[1,10]])})));function t(t){return e.apply(this,arguments)}return t}(),addQuillTitle:function(){var e=document.querySelector(".ql-toolbar"),t=e.querySelectorAll("button"),a=e.querySelectorAll("select");t.forEach((function(e){"ql-script"===e.className?"sub"===e.value?e.title="下标":e.title="上标":"ql-indent"===e.className?"+1"===e.value?e.title="向右缩进":e.title="向左缩进":e.title=f[e.classList[0]]})),a.forEach((function(e){e.parentNode.title=f[e.classList[0]]}))},handleUploadImgError:function(e){this.uploadImgLoading=!1,this.$message.error("上传失败")},handleImgChange:function(){var e=Object(r["a"])(Object(o["a"])().mark((function e(t){var a,i;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,a={policy:t.data.policy,signature:t.data.signature,key:t.data.key,KSSAccessKeyId:t.data.kssAccessKeyId,acl:"public-read",name:t.data.key,file:t.file},e.next=4,Object(p["b"])(this.ossUploadUrl,a);case 4:i=e.sent,this.uploadImgLoading=!1,this.dialogForm.poster=i,e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](0);case 11:case"end":return e.stop()}}),e,this,[[0,9]])})));function t(t){return e.apply(this,arguments)}return t}(),beforeImgUpload:function(){var e=Object(r["a"])(Object(o["a"])().mark((function e(t){var a,i,n,r,s,l,c;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a={"image/png":!0,"image/jpeg":!0},i=a[t.type],n=t.size/1024/1024<2,i||this.$message.error("只能上传图片格式!"),n||this.$message.error("上传图片大小不能超过 2MB!"),i&&n&&(this.uploadImgLoading=!0),e.prev=7,r=t.name.replaceAll(" ","_"),s=(new Date).getTime()+r,l={filename:r,bucketName:this.bucket_name,postData:{filename:r,acl:"public-read",key:s,unknowValueField:[]}},e.next=13,Object(p["a"])(l);case 13:c=e.sent,this.dataObj={policy:c.data.policy,signature:c.data.signature,key:s,KSSAccessKeyId:c.data.kssAccessKeyId,acl:"public-read",name:r},e.next=21;break;case 17:return e.prev=17,e.t0=e["catch"](7),console.log(e.t0),e.abrupt("return",!1);case 21:return e.abrupt("return",i&&n);case 22:case"end":return e.stop()}}),e,this,[[7,17]])})));function t(t){return e.apply(this,arguments)}return t}(),beforeAvatarUpload:function(e){var t={"image/png":!0,"image/jpeg":!0},a=t[e.type],i=e.size/1024/1024<2;return a||this.$message.error("只能上传图片格式!"),i||this.$message.error("上传图片大小不能超过 2M!"),a&&i},beforeUpload:function(){var e=Object(r["a"])(Object(o["a"])().mark((function e(t){var a,i,n,r,s;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=t.size/1024/1024<100,a||this.$message.error("上传视频大小不能超过 100MB!"),this.uploadLoading=!0,e.prev=3,i=t.name.replaceAll(" ","_"),n=(new Date).getTime()+i,r={filename:i,bucketName:this.bucket_name,postData:{filename:i,acl:"public-read",key:n,unknowValueField:[]}},e.next=9,Object(p["a"])(r);case 9:s=e.sent,this.dataObj={policy:s.data.policy,signature:s.data.signature,key:n,KSSAccessKeyId:s.data.kssAccessKeyId,acl:"public-read",name:i},e.next=17;break;case 13:return e.prev=13,e.t0=e["catch"](3),console.log(e.t0),e.abrupt("return",!1);case 17:return e.abrupt("return",a);case 18:case"end":return e.stop()}}),e,this,[[3,13]])})));function t(t){return e.apply(this,arguments)}return t}(),handleUploadError:function(e){this.uploadLoading=!1,this.$message.error("上传视频失败")},handleSuccessChange:function(){var e=Object(r["a"])(Object(o["a"])().mark((function e(t){var a,i;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,a={policy:t.data.policy,signature:t.data.signature,key:t.data.key,KSSAccessKeyId:t.data.kssAccessKeyId,acl:"public-read",name:t.data.key,file:t.file},e.next=4,Object(p["b"])(this.ossUploadUrl,a);case 4:i=e.sent,this.uploadLoading=!1,this.dialogForm.videoUrl=i,e.next=11;break;case 9:e.prev=9,e.t0=e["catch"](0);case 11:case"end":return e.stop()}}),e,this,[[0,9]])})));function t(t){return e.apply(this,arguments)}return t}(),handleExceed:function(e,t){this.$message.error("您已上传过视频")}},computed:{editor:function(){return this.$refs.myAlias.quill},ActiveEditors:function(){return console.log(this.id),this.ActiveEditor}}},m=g,v=(a("18cc"),a("2877")),b=Object(v["a"])(m,i,n,!1,null,"68d38a1a",null);t["default"]=b.exports},1062:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"emptWrap"},[a("div",{staticClass:"emptLeft"},[a("h2",[e._v(e._s(e.title))]),e._v(" "),a("p",[e._v(e._s(e.context))]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.addSome}},[e._v(e._s(e.btnTitle))])],1),e._v(" "),e._m(0)])},n=[function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"emptRight"},[i("div",{staticClass:"imgWrap"},[i("img",{attrs:{src:a("d3d7"),width:"100%",alt:""}})])])}],o={props:["title","btnTitle","context"],data:function(){return{}},methods:{addSome:function(){this.$emit("submit")}}},r=o,s=(a("8aff"),a("2877")),l=Object(s["a"])(r,i,n,!1,null,"2f38df2e",null);t["a"]=l.exports},"18cc":function(e,t,a){"use strict";a("cb5c")},"333d":function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[a("el-pagination",e._b({attrs:{"current-page":e.currentPage,size:"mini","page-size":e.pageSize,layout:e.layout,"page-sizes":e.pageSizes,total:e.total},on:{"update:currentPage":function(t){e.currentPage=t},"update:current-page":function(t){e.currentPage=t},"update:pageSize":function(t){e.pageSize=t},"update:page-size":function(t){e.pageSize=t},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}},"el-pagination",e.$attrs,!1))],1)},n=[],o=(a("c5f6"),a("09f4")),r=a("ce96"),s={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:10},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total,sizes,prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1},sync:{type:Boolean,default:!1},saveKey:{type:String,default:""}},data:function(){return{pageInformation:null}},computed:{currentPage:{get:function(){return this.page},set:function(e){this.$emit("update:page",e)}},pageSize:{get:function(){return this.limit},set:function(e){this.$emit("update:limit",e)}}},watch:{currentPage:function(){this.syncStore()},pageSize:function(){this.syncStore()}},mounted:function(){if(this.sync){var e=new r["a"](this.saveKey||this.$route.path),t=e.get();if(this.pageInformation=t,t&&t.page)for(var a in t.page)if(t.page.hasOwnProperty(a)){var i=t.page[a];this.$emit("update:"+a,i)}this.saveKey&&e.update(this.$route.path,void 0,"bind")}window.addEventListener("watchStorage",this.watchStorage)},methods:{watchStorage:function(){var e=this.pageInformation&&this.pageInformation.page?this.pageInformation.page:null;this.currentPage=e&&e.page?e.page:1},syncStore:function(){if(this.sync){var e=new r["a"](this.saveKey||this.$route.path);e.update(this._props,void 0,"page")}},handleSizeChange:function(e){this.currentPage=1,this.$emit("pagination",{page:this.currentPage,limit:e}),this.autoScroll&&Object(o["a"])(0,800),this.syncStore()},handleCurrentChange:function(e){this.$emit("pagination",{page:e,limit:this.pageSize}),this.autoScroll&&Object(o["a"])(0,800),this.syncStore()}},destroyed:function(){window.removeEventListener("watchStorage",this.watchStorage)}},l=s,c=(a("cc01"),a("2877")),u=Object(c["a"])(l,i,n,!1,null,"1d2bc8a0",null);t["a"]=u.exports},3655:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("el-button",{attrs:{type:"primary"},on:{click:e.exportDataStart}},[e._v(e._s(e.name))]),e._v(" "),a("el-dialog",{attrs:{title:"请选择导出字段",visible:e.chioseVisiable,width:"850px"},on:{"update:visible":function(t){e.chioseVisiable=t}}},[a("div",{staticClass:"chioseWrap"},[a("el-checkbox",{attrs:{indeterminate:e.isIndeterminate},on:{change:e.handleCheckAllChange},model:{value:e.checkAll,callback:function(t){e.checkAll=t},expression:"checkAll"}},[e._v("全选")]),e._v(" "),a("div",{staticStyle:{margin:"15px 0"}}),e._v(" "),a("el-checkbox-group",{on:{change:e.handleCheckedChange},model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}},e._l(e.chioseList,(function(t){return a("el-checkbox",{key:t,staticStyle:{"min-width":"125px","margin-bottom":"10px"},attrs:{label:t}},[e._v(e._s(t))])})),1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.chioseVisiable=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.exportDataStart}},[e._v("确 定")])],1)])],1)},n=[],o=a("c7eb"),r=(a("96cf"),a("1da1")),s=(a("e3eb"),a("4328"),a("829b")),l=function(e){return Object(s["a"])({url:"/api-web/export/getFields",data:e,params:e,method:"post"})},c=a("adb21"),u={props:{name:{type:String,default:"导出"},fileName:{type:String,default:"导出文件.xls"},message:{type:String,default:"您确定导出"},errorMsg:{type:String,default:"参数错误"},flag:{type:Boolean,default:!1},isDownList:{type:Boolean,default:!1},ExportEnum:{type:String},exportData:{type:Object}},data:function(){return{chioseVisiable:!1,isIndeterminate:!0,checkAll:!1,checked:[],chioseList:[]}},mounted:function(){},methods:{startExport:function(){var e=Object(r["a"])(Object(o["a"])().mark((function e(){var t;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!this.flag){e.next=3;break}return this.$message.error(this.errorMsg),e.abrupt("return");case 3:if(this.ExportEnum){e.next=6;break}return this.$message.error("导出参数异常"),e.abrupt("return");case 6:return e.prev=6,e.next=9,l({exportEnum:this.ExportEnum});case 9:t=e.sent,this.chioseList=t.data,this.checked=t.data,this.checkAll=!0,this.isIndeterminate=!1,this.chioseVisiable=!0,e.next=20;break;case 17:e.prev=17,e.t0=e["catch"](6),console.log(e.t0);case 20:case"end":return e.stop()}}),e,this,[[6,17]])})));function t(){return e.apply(this,arguments)}return t}(),handleCheckedChange:function(e){var t=e.length;this.checkAll=t===this.chioseList.length,this.isIndeterminate=t>0&&t';return e.appendChild(r.a.dom.createEl("div",{className:"vjs-button-icon",innerHTML:a})),e},this.player=r()(this.videoID,{appID:"",controls:!0}),this.player&&(this.player.src(this.src),this.player.poster(this.poster||""),this.player.on("play",(function(){e.$emit("play"),document.querySelector(".vjs-play-control").onclick=function(){e.playerPause?e.player.play():e.player.pause()}})),this.player.on("playing",(function(){e.playerPause=!1})),this.player.on("pause",(function(){e.playerPause=!0})),this.player.on("ended",(function(){e.playerPause=!1,e.$emit("ended")})))},onpause:function(){this.player.pause()}},beforeDestroy:function(){this.player&&(this.player.src(""),this.player.pause(),this.player.dispose())}},l=s,c=(a("e66c"),a("2877")),u=Object(c["a"])(l,i,n,!1,null,"799b6ba3",null);t["a"]=u.exports},"896b":function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"ant-upload-preview"},[a("div",{staticStyle:{width:"100%"}},[a("el-upload",{staticClass:"avatar-uploader",attrs:{accept:e.accept,"show-file-list":!1,action:e.ossUploadUrl,data:e.dataObj,"http-request":e.handleChange}},[e.isDelete&&e.imageUrl?a("i",{staticStyle:{position:"absolute",right:"-14px","font-size":"24px",top:"-14px",color:"#787878",background:"#fff"},on:{click:function(t){return t.stopPropagation(),e.onDelete(t)}}}):e._e(),e._v(" "),e.imageUrl?a("img",{staticClass:"avatar",style:e.showBox,attrs:{src:e.imageUrl}}):a("span",[e.loading?a("i",{staticClass:"el-icon-loading avatar-uploader-icon",style:e.showBox}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon",style:e.showBox}),e._v(" "),a("span",{staticClass:"upload-desc"},[e._v("添加上传图片")])])])],1),e._v(" "),a("cropper-modal",{ref:"CropperModal",on:{"cropper-no":e.handleCropperClose,"cropper-ok":e.handleCropperSuccess}})],1)},n=[],o=(a("6762"),a("2fdb"),a("c7eb")),r=(a("7f7f"),a("96cf"),a("1da1")),s=a("ade3"),l=(a("c5f6"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{visible:e.visible,title:e.options.title,"append-to-body":"","close-on-click-modal":!1,width:"800px"},on:{"update:visible":function(t){e.visible=t},close:e.cancelHandel}},[a("el-row",[a("el-col",{style:{height:"350px",width:"350px"},attrs:{xs:24,md:12}},[a("vue-cropper",{ref:"cropper",attrs:{img:e.options.img,info:!0,autoCrop:!0,centerBox:!1,autoCropWidth:e.options.autoCropWidth,full:e.options.full,outputType:e.options.outputType,autoCropHeight:e.options.autoCropHeight,fixedBox:e.options.fixedBox,enlarge:e.options.enlarge},on:{realTime:e.realTime}}),e._v(" "),a("div",{staticClass:"operation"},[a("i",{staticClass:"el-icon-circle-plus-outline",on:{click:function(t){return e.changeScale(1)}}}),e._v(" "),a("i",{staticClass:"el-icon-remove-outline",on:{click:function(t){return e.changeScale(-1)}}}),e._v(" "),a("i",{staticClass:"icon-rate",on:{click:e.rotateRight}})])],1),e._v(" "),a("el-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[a("div",{staticClass:"previewImg"},[a("span",[e._v("预览图片")]),e._v(" "),a("div",{class:e.options.previewsCircle?"avatar-upload-preview":"avatar-upload-preview_range",style:{width:e.options.autoCropWidth+"px",height:e.options.autoCropHeight+"px"}},[a("img",{style:e.previews.img,attrs:{src:e.previews.url}})])])])],1),e._v(" "),a("template",{slot:"footer"},[a("div",{staticStyle:{"text-align":"center"}},[a("el-button",{attrs:{size:"mini"},on:{click:e.cancelHandel}},[e._v("取消")]),e._v(" "),a("el-button",{attrs:{size:"mini",type:"primary",loading:e.confirmLoading},on:{click:e.okHandel}},[e._v("保存")])],1)])],2)}),c=[],u=(a("34ef"),a("4917"),a("28a5"),a("7e79")),p=(a("3607"),{name:"CropperModal",components:{VueCropper:u["VueCropper"]},props:{},data:function(){return{visible:!1,img:null,confirmLoading:!1,options:{img:"",autoCrop:!0,autoCropWidth:180,autoCropHeight:180,fixedBox:!0,full:!1,enlarge:1,previewsCircle:!0,centerBox:!0,outputType:"png",title:"修改头像",name:null},previews:{},url:{upload:"/sys/common/saveToImgByStr"}}},methods:{edit:function(e){var t=this.options;this.visible=!0,this.options=Object.assign({},t,e)},cancelHandel:function(){this.confirmLoading=!1,this.visible=!1,this.$emit("cropper-no")},okHandel:function(){var e=this;e.confirmLoading=!0,this.$refs.cropper.getCropBlob(function(){var t=Object(r["a"])(Object(o["a"])().mark((function t(a){return Object(o["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:try{e.$emit("cropper-ok",a)}catch(i){e.$message.error(i)}finally{e.cancelHandel()}case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},base64ToFile:function(e,t){var a=e.split(","),i=a[0].match(/:(.*?);/)[1],n=atob(a[1]),o=n.length,r=new Uint8Array(o);while(o--)r[o]=n.charCodeAt(o);return new File([r],t,{type:i})},blobToFile:function(e,t){return e.lastModifiedDate=new Date,e.name=t,e},realTime:function(e){this.previews=e},changeScale:function(e){e=e||1,this.$refs.cropper.changeScale(e)},rotateLeft:function(){this.$refs.cropper.rotateLeft()},rotateRight:function(){this.$refs.cropper.rotateRight()}}}),d=p,h=(a("ca51"),a("2877")),f=Object(h["a"])(d,l,c,!1,null,"0befe5c4",null),g=f.exports,m=(a("bc3a"),a("4450")),v={name:"ImageCropper",components:{CropperModal:g},props:{options:{type:Object,default:function(){return{autoCrop:!0,enlarge:1,autoCropWidth:200,autoCropHeight:200,fixedBox:!1,previewsCircle:!0,title:"上传图片"}}},showSize:{type:Boolean,default:!1},imgSize:{type:Number,default:2},isDelete:{type:Boolean,default:!1},imageUrl:{type:String,default:""},accept:{type:String,default:".png,.jpg,.jpeg,.gif"},acceptArray:{type:[Array,Object],default:function(){return["image/jpeg","image/png","image/jpg","image/gif"]}},bucket_name:{type:String,default:"daya"},disabled:{type:Boolean,default:!1}},data:function(){return Object(s["a"])({loading:!1,isStopRun:!1,info:null,ossUploadUrl:"https://".concat(this.bucket_name,".ks3-cn-beijing.ksyuncs.com"),dataObj:{policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""}},"isStopRun",!1)},computed:{showBox:function(){var e={};return this.showSize&&(e={width:this.options.autoCropWidth+"px",height:this.options.autoCropHeight+"px",lineHeight:this.options.autoCropHeight+"px"}),e}},methods:{onDelete:function(){this.$emit("update:imageUrl","")},handleChange:function(){var e=Object(r["a"])(Object(o["a"])().mark((function e(t){var a,i=this;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(this.info=t,!this.isStopRun){e.next=3;break}return e.abrupt("return");case 3:this.loading=!0,a=this.options,this.getBase64(t.file,(function(e){var n=Object.assign({},a,{img:e,name:t.file.name});i.$refs.CropperModal.edit(n)}));case 6:case"end":return e.stop()}}),e,this)})));function t(t){return e.apply(this,arguments)}return t}(),beforeUpload:function(e){this.isStopRun=!1;var t=e.type;if(t.indexOf("image")<0)return this.$message.warning("请上传图片"),this.isStopRun=!0,!1;var a=this.acceptArray.includes(e.type);a||(this.$message.error("你上传图片格式不正确!"),this.isStopRun=!0);var i=e.size<1024*this.imgSize*1024;return i||(this.$message.error("图片大小不能超过"+this.imgSize+"MB!"),this.isStopRun=!0),a&&i},handleCropperSuccess:function(){var e=Object(r["a"])(Object(o["a"])().mark((function e(t){var a,i,n,r,s,l=this;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=this.info.file.name.replaceAll(" ","_"),e.prev=1,i=(new Date).getTime()+a,n={filename:i,bucketName:this.bucket_name,postData:{filename:i,acl:"public-read",key:i,unknowValueField:[]}},e.next=6,Object(m["a"])(n);case 6:return r=e.sent,s={policy:r.data.policy,signature:r.data.signature,key:i,KSSAccessKeyId:r.data.kssAccessKeyId,acl:"public-read",name:i,file:t},e.next=10,Object(m["b"])(this.ossUploadUrl,s).then((function(e){if(e){var t={data:{url:e}};l.loading=!1,l.$emit("crop-upload-success",t),g.value.closeVisible()}else l.handleCropperClose()})).catch((function(e){l.handleCropperClose()}));case 10:e.next=17;break;case 12:e.prev=12,e.t0=e["catch"](1),console.log(e.t0,"error"),this.handleCropperClose(),this.$message.error("上传失败");case 17:this.loading=!1;case 18:case"end":return e.stop()}}),e,this,[[1,12]])})));function t(t){return e.apply(this,arguments)}return t}(),handleCropperClose:function(){this.loading=!1,this.$emit("crop-upload-close")},getBase64:function(e,t){var a=new FileReader;a.addEventListener("load",(function(){return t(a.result)})),a.readAsDataURL(e)}}},b=v,y=(a("df59"),Object(h["a"])(b,i,n,!1,null,"ff7aa5b4",null));t["a"]=y.exports},"8aff":function(e,t,a){"use strict";a("7195")},ae13:function(e,t,a){},afa8:function(e,t,a){},c0a4:function(e,t,a){},c7f0:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"upload"},[a("el-upload",{directives:[{name:"loading",rawName:"v-loading",value:e.uploadImgLoading,expression:"uploadImgLoading"}],staticClass:"avatar-uploader",staticStyle:{"line-height":"0",display:"inline-block"},attrs:{action:e.ossUploadUrl,data:e.dataObj,"show-file-list":!1,accept:e.accept,"http-request":e.handleImgSuccess,"on-error":e.handleUploadImgError,"before-upload":e.beforeImgUpload}},[e.imgUrl?a("img",{staticClass:"avatar",attrs:{src:e.imgUrl}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1)},n=[],o=a("c7eb"),r=(a("7f7f"),a("96cf"),a("1da1")),s=(a("c5f6"),a("3908"),a("5f87")),l=(a("3607"),a("4450")),c={data:function(){return{headers:{Authorization:Object(s["b"])()},uploadImgLoading:!1,imgUrl:null,ossUploadUrl:"https://".concat(this.bucket_name,".ks3-cn-beijing.ksyuncs.com"),dataObj:{policy:"",signature:"",key:"",KSSAccessKeyId:"",acl:"public-read",name:""}}},props:{value:{type:String},accept:{type:String,default:function(){return".jpg, .jpeg, .png, .gif"}},imageSizeM:{type:Number,default:function(){return 2}},imageWidthM:{type:Number,default:function(){return null}},imageHeightM:{type:Number,default:function(){return null}},imageType:{type:Object,default:function(){return{"image/png":!0,"image/jpeg":!0,"image/jpg":!0,"image/gif":!0}}},bucket_name:{type:String,default:"daya"}},mounted:function(){this.imgUrl=this.value},methods:{beforeImgUpload:function(){var e=Object(r["a"])(Object(o["a"])().mark((function e(t){var a,i,n,r,s,c,u,p,d,h,f=this;return Object(o["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a=this.imageType[t.type],i=t.size/1024/1024