chunk-commons.c516bf71.js 18 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-commons"],{"0680":function(e,t,i){"use strict";i("3336")},1062:function(e,t,i){"use strict";var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"emptWrap"},[i("div",{staticClass:"emptLeft"},[i("h2",[e._v(e._s(e.title))]),e._v(" "),i("p",[e._v(e._s(e.context))]),e._v(" "),i("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,a=e._self._c||t;return a("div",{staticClass:"emptRight"},[a("div",{staticClass:"imgWrap"},[a("img",{attrs:{src:i("d3d7"),width:"100%",alt:""}})])])}],o={props:["title","btnTitle","context"],data:function(){return{}},methods:{addSome:function(){this.$emit("submit")}}},r=o,s=(i("8aff"),i("2877")),c=Object(s["a"])(r,a,n,!1,null,"2f38df2e",null);t["a"]=c.exports},3336:function(e,t,i){},"333d":function(e,t,i){"use strict";var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"pagination-container",class:{hidden:e.hidden}},[i("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=(i("c5f6"),i("09f4")),r=i("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 i in t.page)if(t.page.hasOwnProperty(i)){var a=t.page[i];this.$emit("update:"+i,a)}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)}},c=s,l=(i("745c"),i("2877")),u=Object(l["a"])(c,a,n,!1,null,"6ce5f817",null);t["a"]=u.exports},3655:function(e,t,i){"use strict";var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("el-button",{attrs:{type:"primary"},on:{click:e.startExport}},[e._v(e._s(e.name))]),e._v(" "),i("el-dialog",{attrs:{title:"请选择导出字段",visible:e.chioseVisiable,width:"850px"},on:{"update:visible":function(t){e.chioseVisiable=t}}},[i("div",{staticClass:"chioseWrap"},[i("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(" "),i("div",{staticStyle:{margin:"15px 0"}}),e._v(" "),i("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 i("el-checkbox",{key:t,staticStyle:{"min-width":"125px","margin-bottom":"10px"},attrs:{label:t}},[e._v(e._s(t))])})),1)],1),e._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(t){e.chioseVisiable=!1}}},[e._v("取 消")]),e._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:e.exportDataStart}},[e._v("确 定")])],1)])],1)},n=[],o=(i("96cf"),i("1da1")),r=(i("e3eb"),i("4328"),i("829b")),s=function(e){return Object(r["a"])({url:"/api-web/export/getFields",data:e,params:e,method:"post"})},c=i("adb21"),l={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(o["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.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,s({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<this.chioseList.length},handleCheckAllChange:function(e){this.checked=e?this.chioseList:[],this.isIndeterminate=!1},exportDataStart:function(){var e=this;console.log(this.exportData),this.isDownList?Object(c["a"])(this,{url:"/api-web/export/managerDownload",fileName:this.fileName,method:"post",params:{queryInfo:this.exportData,exportEnum:this.ExportEnum,headColumns:this.checked}},this.message,(function(){e.chioseVisiable=!1})):Object(c["a"])(this,{url:"/api-web/export/now",fileName:this.fileName,method:"post",params:{queryInfo:this.exportData,exportEnum:this.ExportEnum,headColumns:this.checked}},this.message,(function(){e.chioseVisiable=!1}))}}},u=l,p=i("2877"),d=Object(p["a"])(u,a,n,!1,null,"19b53bbf",null);t["a"]=d.exports},5836:function(e,t,i){"use strict";i("5dc8")},"5dc8":function(e,t,i){},"641c":function(e,t,i){"use strict";var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"qrCode"},[i("el-dialog",{attrs:{title:e.title,visible:e.status,"append-to-body":"",width:"321px"},on:{"update:visible":function(t){e.status=t},close:e.onDialogClose}},[i("div",{staticClass:"left-code"},[i("div",{attrs:{id:"preview"}}),e._v(" "),e.codeUrl?i("p",{staticClass:"code-url"},[i("copy-text",[e._v(e._s(e.codeUrl))])],1):e._e()]),e._v(" "),e.ispreLook?i("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:e.preLook}},[e._v("预 览")]):e._e(),e._v(" "),e.isDown?i("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:e.downImage}},[e._v("下载图片")]):e._e()],1)],1)},n=[],o=i("f2e5"),r=i("f904"),s=i.n(r),c=i("e774"),l={data:function(){return{status:!1,logo:i("9d64")}},props:{value:{type:Boolean,required:!0,default:function(){return!1}},title:{type:String,default:function(){return"查看二维码"}},codeUrl:{type:String},ispreLook:{type:Boolean,default:function(){return!1}},isDown:{type:Boolean,default:function(){return!1}}},mounted:function(){this.status=this.value},methods:{onDialogClose:function(){this.status=!1,this.$emit("input",!1)},copyUrl:function(e){s()(e),this.$message.success("复制成功")},preLook:function(){this.$emit("preLook")},downImage:function(){var e=this,t=document.getElementById("preview");Object(c["a"])(t).then((function(t){var i=new Image;i.src=t;var a=document.createElement("a"),n="二维码.png";a.href=t,a.setAttribute("download",n),document.body.appendChild(a),a.click(),e.$emit("close")})).catch((function(e){console.error("oops, something went wrong!",e)}))}},watch:{value:function(e){var t=this;if(this.status=e,e){var i=new Image;i.src=this.logo,i.width=58,i.height=58,i.onload=function(){var e=Object(o["a"])({options:{w:281,h:281},cellSize:5,data:t.codeUrl,padding:8,logo:{image:i}});document.getElementById("preview").appendChild(e)}}else{var a=document.getElementById("preview").firstChild;a&&document.getElementById("preview").removeChild(a)}},title:function(e,t){e!=t&&(this.title=e)}},beforeDestroy:function(){}},u=l,p=(i("ec6b"),i("2877")),d=Object(p["a"])(u,a,n,!1,null,null,null);t["a"]=d.exports},7195:function(e,t,i){},"745c":function(e,t,i){"use strict";i("7896")},7896:function(e,t,i){},"896b":function(e,t,i){"use strict";var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"ant-upload-preview"},[i("div",{staticStyle:{width:"100%"}},[i("el-upload",{staticClass:"avatar-uploader",class:[e.disabled?"uploadDisabled":null],attrs:{disabled:e.disabled,accept:e.accept,"show-file-list":!1,action:"","before-upload":e.beforeUpload,"http-request":e.handleChange}},[e.isDelete&&e.imageUrl?i("i",{staticClass:"el-icon-error",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?i("img",{staticClass:"avatar",style:e.showBox,attrs:{src:e.imageUrl}}):i("span",[e.loading?i("i",{staticClass:"el-icon-loading avatar-uploader-icon",style:e.showBox}):i("i",{staticClass:"el-icon-plus avatar-uploader-icon",style:e.showBox}),e._v(" "),i("span",{staticClass:"upload-desc"},[e._v("添加上传图片")])])])],1),e._v(" "),i("cropper-modal",{ref:"CropperModal",on:{"cropper-no":e.handleCropperClose,"cropper-ok":e.handleCropperSuccess}})],1)},n=[],o=(i("6762"),i("2fdb"),i("7f7f"),i("c5f6"),function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("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}},[i("el-row",[i("el-col",{style:{height:"350px",width:"350px"},attrs:{xs:24,md:12}},[i("vue-cropper",{ref:"cropper",attrs:{img:e.options.img,info:!0,autoCrop:e.options.autoCrop,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(" "),i("div",{staticClass:"operation"},[i("i",{staticClass:"el-icon-circle-plus-outline",on:{click:function(t){return e.changeScale(1)}}}),e._v(" "),i("i",{staticClass:"el-icon-remove-outline",on:{click:function(t){return e.changeScale(-1)}}}),e._v(" "),i("i",{staticClass:"icon-rate",on:{click:e.rotateRight}})])],1),e._v(" "),i("el-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[i("div",{staticClass:"previewImg"},[i("span",[e._v("预览图片")]),e._v(" "),i("div",{class:e.options.previewsCircle?"avatar-upload-preview":"avatar-upload-preview_range",style:{width:e.options.autoCropWidth+"px",height:e.options.autoCropHeight+"px"}},[i("img",{style:e.previews.img,attrs:{src:e.previews.url}})])])])],1),e._v(" "),i("template",{slot:"footer"},[i("div",{staticStyle:{"text-align":"center"}},[i("el-button",{attrs:{size:"mini"},on:{click:e.cancelHandel}},[e._v("取消")]),e._v(" "),i("el-button",{attrs:{size:"mini",type:"primary",loading:e.confirmLoading},on:{click:e.okHandel}},[e._v("保存")])],1)])],2)}),r=[],s=(i("34ef"),i("4917"),i("28a5"),i("96cf"),i("1da1")),c=i("7e79"),l=i("3607"),u={name:"CropperModal",components:{VueCropper:c["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,t=this;t.confirmLoading=!0,this.$refs.cropper.getCropBlob(function(){var i=Object(s["a"])(regeneratorRuntime.mark((function i(a){var n,o,r;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return n=(e.options.name?e.options.name.split(".")[0]:+new Date)+".png",o=new FormData,o.append("file",e.blobToFile(a),n),i.prev=3,i.next=6,Object(l["q"])(o);case 6:r=i.sent,t.$emit("cropper-ok",r),i.next=13;break;case 10:i.prev=10,i.t0=i["catch"](3),t.$message.error(i.t0);case 13:return i.prev=13,t.cancelHandel(),i.finish(13);case 16:case"end":return i.stop()}}),i,null,[[3,10,13,16]])})));return function(e){return i.apply(this,arguments)}}())},base64ToFile:function(e,t){var i=e.split(","),a=i[0].match(/:(.*?);/)[1],n=atob(i[1]),o=n.length,r=new Uint8Array(o);while(o--)r[o]=n.charCodeAt(o);return new File([r],t,{type:a})},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()}}},p=u,d=(i("9b77"),i("2877")),h=Object(d["a"])(p,o,r,!1,null,"758806e6",null),g=h.exports,f={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"]}},disabled:{type:Boolean,default:!1}},data:function(){return{loading:!1,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"}),console.log(e),e}},methods:{onDelete:function(){this.$emit("update:imageUrl","")},handleChange:function(e){var t=this;if(!this.isStopRun){this.loading=!0;var i=this.options;console.log(e),this.getBase64(e.file,(function(a){var n=Object.assign({},i,{img:a,name:e.file.name});t.$refs.CropperModal.edit(n)}))}},beforeUpload:function(e){this.isStopRun=!1;var t=e.type;if(t.indexOf("image")<0)return this.$message.warning("请上传图片"),this.isStopRun=!0,!1;var i=this.acceptArray.includes(e.type);i||(this.$message.error("你上传图片格式不正确!"),this.isStopRun=!0);var a=e.size<1024*this.imgSize*1024;return a||(this.$message.error("图片大小不能超过"+this.imgSize+"MB!"),this.isStopRun=!0),i&&a},handleCropperSuccess:function(e){this.loading=!1,this.$emit("crop-upload-success",e)},handleCropperClose:function(){this.loading=!1,this.$emit("crop-upload-close")},getBase64:function(e,t){var i=new FileReader;i.addEventListener("load",(function(){return t(i.result)})),i.readAsDataURL(e)}}},m=f,v=(i("0680"),Object(d["a"])(m,a,n,!1,null,"7663eef2",null));t["a"]=v.exports},"8aff":function(e,t,i){"use strict";i("7195")},"9b77":function(e,t,i){"use strict";i("aca3")},aca3:function(e,t,i){},afa8:function(e,t,i){},c7f0:function(e,t,i){"use strict";var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"upload"},[i("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:"/api-web/uploadFile",headers:e.headers,"show-file-list":!1,accept:e.accept,"on-success":e.handleImgSuccess,"on-error":e.handleUploadImgError,"before-upload":e.beforeImgUpload}},[e.imgUrl?i("img",{staticClass:"avatar",attrs:{src:e.imgUrl}}):i("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1)},n=[],o=(i("c5f6"),i("3908"),i("5f87")),r={data:function(){return{headers:{Authorization:Object(o["b"])()},uploadImgLoading:!1,imgUrl:null}},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}}}},mounted:function(){this.imgUrl=this.value},methods:{beforeImgUpload:function(e){var t=this,i=this.imageType[e.type],a=e.size/1024/1024<this.imageSizeM,n=this.imageWidthM,o=this.imageHeightM,r=window.URL||window.webkitURL,s=new Promise((function(t,i){var a=new Image;a.onload=function(){n&&o?this.width===n&&this.height===o?t():i("请上传".concat(n,"x").concat(o,"尺寸图片")):n&&!o?this.width===n?t():i("请上传宽为".concat(n,"的图片")):!n&&o?this.height===o?t():i("请上传高为".concat(o,"的图片")):t()},a.src=r.createObjectURL(e)})).then((function(){return e}),(function(e){return t.$message.error(e),t.uploadImgLoading=!1,Promise.reject()}));return i||this.$message.error("只能上传图片格式!"),a||this.$message.error("上传图片大小不能超过 ".concat(this.imageSizeM,"MB!")),i&&a&&s&&(this.uploadImgLoading=!0),i&&a&&s},handleUploadImgError:function(e){this.uploadImgLoading=!1,this.$message.error("上传失败")},handleImgSuccess:function(e,t){this.uploadImgLoading=!1,this.imgUrl=e.data.url,this.$emit("input",e.data.url)}},watch:{value:function(e){this.imgUrl=e}},beforeDestroy:function(){}},s=r,c=(i("5836"),i("2877")),l=Object(c["a"])(s,a,n,!1,null,"6e1b7b23",null);t["a"]=l.exports},d3d7:function(e,t,i){e.exports=i.p+"static/img/emptyPage_bg.0a9eb319.png"},ddec:function(e,t,i){"use strict";i("7f7f");var a=i("ca45");a["a"].install=function(e){return e.component(a["a"].name,a["a"])},t["a"]=a["a"]},ec6b:function(e,t,i){"use strict";i("afa8")}}]);