1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-commons"],{1062:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"emptWrap"},[i("div",{staticClass:"emptLeft"},[i("h2",[t._v(t._s(t.title))]),t._v(" "),i("p",[t._v(t._s(t.context))]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.addSome}},[t._v(t._s(t.btnTitle))])],1),t._v(" "),t._m(0)])},n=[function(){var t=this,e=t.$createElement,a=t._self._c||e;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);e["a"]=c.exports},"2d5f":function(t,e,i){},"333d":function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[i("el-pagination",t._b({attrs:{"current-page":t.currentPage,size:"mini","page-size":t.pageSize,layout:t.layout,"page-sizes":t.pageSizes,total:t.total},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.pageSize=e},"update:page-size":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}},"el-pagination",t.$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(t){this.$emit("update:page",t)}},pageSize:{get:function(){return this.limit},set:function(t){this.$emit("update:limit",t)}}},watch:{currentPage:function(){this.syncStore()},pageSize:function(){this.syncStore()}},mounted:function(){if(this.sync){var t=new r["a"](this.saveKey||this.$route.path),e=t.get();if(this.pageInformation=e,e&&e.page)for(var i in e.page)if(e.page.hasOwnProperty(i)){var a=e.page[i];this.$emit("update:"+i,a)}this.saveKey&&t.update(this.$route.path,void 0,"bind")}window.addEventListener("watchStorage",this.watchStorage)},methods:{watchStorage:function(){var t=this.pageInformation&&this.pageInformation.page?this.pageInformation.page:null;this.currentPage=t&&t.page?t.page:1},syncStore:function(){if(this.sync){var t=new r["a"](this.saveKey||this.$route.path);t.update(this._props,void 0,"page")}},handleSizeChange:function(t){this.currentPage=1,this.$emit("pagination",{page:this.currentPage,limit:t}),this.autoScroll&&Object(o["a"])(0,800),this.syncStore()},handleCurrentChange:function(t){this.$emit("pagination",{page:t,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);e["a"]=u.exports},3655:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-button",{attrs:{type:"primary"},on:{click:t.startExport}},[t._v(t._s(t.name))]),t._v(" "),i("el-dialog",{attrs:{title:"请选择导出字段",visible:t.chioseVisiable,width:"850px"},on:{"update:visible":function(e){t.chioseVisiable=e}}},[i("div",{staticClass:"chioseWrap"},[i("el-checkbox",{attrs:{indeterminate:t.isIndeterminate},on:{change:t.handleCheckAllChange},model:{value:t.checkAll,callback:function(e){t.checkAll=e},expression:"checkAll"}},[t._v("全选")]),t._v(" "),i("div",{staticStyle:{margin:"15px 0"}}),t._v(" "),i("el-checkbox-group",{on:{change:t.handleCheckedChange},model:{value:t.checked,callback:function(e){t.checked=e},expression:"checked"}},t._l(t.chioseList,(function(e){return i("el-checkbox",{key:e,staticStyle:{"min-width":"125px","margin-bottom":"10px"},attrs:{label:e}},[t._v(t._s(e))])})),1)],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.chioseVisiable=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.exportDataStart}},[t._v("确 定")])],1)])],1)},n=[],o=(i("96cf"),i("1da1")),r=(i("e3eb"),i("4328"),i("829b")),s=function(t){return Object(r["a"])({url:"/api-web/export/getFields",data:t,params:t,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 t=Object(o["a"])(regeneratorRuntime.mark((function t(){var e;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!this.flag){t.next=3;break}return this.$message.error(this.errorMsg),t.abrupt("return");case 3:if(this.ExportEnum){t.next=6;break}return this.$message.error("导出参数异常"),t.abrupt("return");case 6:return t.prev=6,t.next=9,s({exportEnum:this.ExportEnum});case 9:e=t.sent,this.chioseList=e.data,this.checked=e.data,this.checkAll=!0,this.isIndeterminate=!1,this.chioseVisiable=!0,t.next=20;break;case 17:t.prev=17,t.t0=t["catch"](6),console.log(t.t0);case 20:case"end":return t.stop()}}),t,this,[[6,17]])})));function e(){return t.apply(this,arguments)}return e}(),handleCheckedChange:function(t){var e=t.length;this.checkAll=e===this.chioseList.length,this.isIndeterminate=e>0&&e<this.chioseList.length},handleCheckAllChange:function(t){this.checked=t?this.chioseList:[],this.isIndeterminate=!1},exportDataStart:function(){var t=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(){t.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(){t.chioseVisiable=!1}))}}},u=l,p=i("2877"),h=Object(p["a"])(u,a,n,!1,null,"19b53bbf",null);e["a"]=h.exports},5836:function(t,e,i){"use strict";i("5dc8")},"5dc8":function(t,e,i){},"641c":function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"qrCode"},[i("el-dialog",{attrs:{title:t.title,visible:t.status,"append-to-body":"",width:"300px"},on:{"update:visible":function(e){t.status=e},close:t.onDialogClose}},[i("div",{staticClass:"left-code"},[i("vue-qr",{staticStyle:{width:"100%"},attrs:{text:t.codeUrl,margin:0}}),t._v(" "),t.codeUrl?i("p",{staticClass:"code-url"},[i("copy-text",[t._v(t._s(t.codeUrl))])],1):t._e()],1),t._v(" "),t.ispreLook?i("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:t.preLook}},[t._v("预 览")]):t._e()],1)],1)},n=[],o=i("658f"),r=i.n(o),s=i("f904"),c=i.n(s),l={data:function(){return{status:!1}},components:{VueQr:r.a},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}}},mounted:function(){this.status=this.value},methods:{onDialogClose:function(){this.status=!1,this.$emit("input",!1)},copyUrl:function(t){c()(t),this.$message.success("复制成功")},preLook:function(){this.$emit("preLook")}},watch:{value:function(t){this.status=t},title:function(t,e){t!=e&&(this.title=t)}},beforeDestroy:function(){}},u=l,p=(i("ec6b"),i("2877")),h=Object(p["a"])(u,a,n,!1,null,null,null);e["a"]=h.exports},7195:function(t,e,i){},"745c":function(t,e,i){"use strict";i("7896")},7896:function(t,e,i){},"896b":function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"ant-upload-preview"},[i("div",{staticStyle:{width:"100%"}},[i("el-upload",{staticClass:"avatar-uploader",class:[t.disabled?"uploadDisabled":null],attrs:{disabled:t.disabled,accept:t.accept,"show-file-list":!1,action:"","before-upload":t.beforeUpload,"http-request":t.handleChange}},[t.imageUrl?i("img",{staticClass:"avatar",style:t.showBox,attrs:{src:t.imageUrl}}):i("span",[t.loading?i("i",{staticClass:"el-icon-loading avatar-uploader-icon",style:t.showBox}):i("i",{staticClass:"el-icon-plus avatar-uploader-icon",style:t.showBox}),t._v(" "),i("span",{staticClass:"upload-desc"},[t._v("添加上传图片")])])])],1),t._v(" "),i("cropper-modal",{ref:"CropperModal",on:{"cropper-no":t.handleCropperClose,"cropper-ok":t.handleCropperSuccess}})],1)},n=[],o=(i("6762"),i("2fdb"),i("7f7f"),i("c5f6"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{visible:t.visible,title:t.options.title,"append-to-body":"","close-on-click-modal":!1,width:"800px"},on:{"update:visible":function(e){t.visible=e},close:t.cancelHandel}},[i("el-row",[i("el-col",{style:{height:"350px",width:"350px"},attrs:{xs:24,md:12}},[i("vue-cropper",{ref:"cropper",attrs:{img:t.options.img,info:!0,autoCrop:t.options.autoCrop,autoCropWidth:t.options.autoCropWidth,full:t.options.full,outputType:t.options.outputType,autoCropHeight:t.options.autoCropHeight,fixedBox:t.options.fixedBox,enlarge:t.options.enlarge},on:{realTime:t.realTime}}),t._v(" "),i("div",{staticClass:"operation"},[i("i",{staticClass:"el-icon-circle-plus-outline",on:{click:function(e){return t.changeScale(1)}}}),t._v(" "),i("i",{staticClass:"el-icon-remove-outline",on:{click:function(e){return t.changeScale(-1)}}}),t._v(" "),i("i",{staticClass:"icon-rate",on:{click:t.rotateRight}})])],1),t._v(" "),i("el-col",{style:{height:"350px"},attrs:{xs:24,md:12}},[i("div",{staticClass:"previewImg"},[i("span",[t._v("预览图片")]),t._v(" "),i("div",{class:t.options.previewsCircle?"avatar-upload-preview":"avatar-upload-preview_range",style:{width:t.options.autoCropWidth+"px",height:t.options.autoCropHeight+"px"}},[i("img",{style:t.previews.img,attrs:{src:t.previews.url}})])])])],1),t._v(" "),i("template",{slot:"footer"},[i("div",{staticStyle:{"text-align":"center"}},[i("el-button",{attrs:{size:"mini"},on:{click:t.cancelHandel}},[t._v("取消")]),t._v(" "),i("el-button",{attrs:{size:"mini",type:"primary",loading:t.confirmLoading},on:{click:t.okHandel}},[t._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(t){var e=this.options;this.visible=!0,this.options=Object.assign({},e,t)},cancelHandel:function(){this.confirmLoading=!1,this.visible=!1,this.$emit("cropper-no")},okHandel:function(){var t=this,e=this;e.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=(t.options.name?t.options.name.split(".")[0]:+new Date)+".png",o=new FormData,o.append("file",t.blobToFile(a),n),i.prev=3,i.next=6,Object(l["q"])(o);case 6:r=i.sent,e.$emit("cropper-ok",r),i.next=13;break;case 10:i.prev=10,i.t0=i["catch"](3),e.$message.error(i.t0);case 13:return i.prev=13,e.cancelHandel(),i.finish(13);case 16:case"end":return i.stop()}}),i,null,[[3,10,13,16]])})));return function(t){return i.apply(this,arguments)}}())},base64ToFile:function(t,e){var i=t.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],e,{type:a})},blobToFile:function(t,e){return t.lastModifiedDate=new Date,t.name=e,t},realTime:function(t){this.previews=t},changeScale:function(t){t=t||1,this.$refs.cropper.changeScale(t)},rotateLeft:function(){this.$refs.cropper.rotateLeft()},rotateRight:function(){this.$refs.cropper.rotateRight()}}},p=u,h=(i("9b77"),i("2877")),d=Object(h["a"])(p,o,r,!1,null,"758806e6",null),g=d.exports,f={name:"ImageCropper",components:{CropperModal:g},props:{options:{type:Object,default:function(){return{autoCrop:!0,autoCropWidth:200,autoCropHeight:200,fixedBox:!1,previewsCircle:!0,title:"上传图片"}}},showSize:{type:Boolean,default:!1},imgSize:{type:Number,default:2},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 t={};return this.showSize&&(t={width:this.options.autoCropWidth+"px",height:this.options.autoCropHeight+"px",lineHeight:this.options.autoCropHeight+"px"}),console.log(t),t}},methods:{handleChange:function(t){var e=this;if(!this.isStopRun){this.loading=!0;var i=this.options;console.log(t),this.getBase64(t.file,(function(a){var n=Object.assign({},i,{img:a,name:t.file.name});e.$refs.CropperModal.edit(n)}))}},beforeUpload:function(t){this.isStopRun=!1;var e=t.type;if(e.indexOf("image")<0)return this.$message.warning("请上传图片"),this.isStopRun=!0,!1;var i=this.acceptArray.includes(t.type);i||(this.$message.error("你上传图片格式不正确!"),this.isStopRun=!0);var a=t.size<1024*this.imgSize*1024;return a||(this.$message.error("图片大小不能超过"+this.imgSize+"MB!"),this.isStopRun=!0),i&&a},handleCropperSuccess:function(t){this.loading=!1,this.$emit("crop-upload-success",t)},handleCropperClose:function(){this.loading=!1,this.$emit("crop-upload-close")},getBase64:function(t,e){var i=new FileReader;i.addEventListener("load",(function(){return e(i.result)})),i.readAsDataURL(t)}}},m=f,v=(i("d977"),Object(h["a"])(m,a,n,!1,null,"6aeeeace",null));e["a"]=v.exports},"8aff":function(t,e,i){"use strict";i("7195")},"9b77":function(t,e,i){"use strict";i("aca3")},aca3:function(t,e,i){},afa8:function(t,e,i){},c7f0:function(t,e,i){"use strict";var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"upload"},[i("el-upload",{directives:[{name:"loading",rawName:"v-loading",value:t.uploadImgLoading,expression:"uploadImgLoading"}],staticClass:"avatar-uploader",staticStyle:{"line-height":"0",display:"inline-block"},attrs:{action:"/api-web/uploadFile",headers:t.headers,"show-file-list":!1,accept:t.accept,"on-success":t.handleImgSuccess,"on-error":t.handleUploadImgError,"before-upload":t.beforeImgUpload}},[t.imgUrl?i("img",{staticClass:"avatar",attrs:{src:t.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(t){var e=this,i=this.imageType[t.type],a=t.size/1024/1024<this.imageSizeM,n=this.imageWidthM,o=this.imageHeightM,r=window.URL||window.webkitURL,s=new Promise((function(e,i){var a=new Image;a.onload=function(){n&&o?this.width===n&&this.height===o?e():i("请上传".concat(n,"x").concat(o,"尺寸图片")):n&&!o?this.width===n?e():i("请上传宽为".concat(n,"的图片")):!n&&o?this.height===o?e():i("请上传高为".concat(o,"的图片")):e()},a.src=r.createObjectURL(t)})).then((function(){return t}),(function(t){return e.$message.error(t),e.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(t){this.uploadImgLoading=!1,this.$message.error("上传失败")},handleImgSuccess:function(t,e){this.uploadImgLoading=!1,this.imgUrl=t.data.url,this.$emit("input",t.data.url)}},watch:{value:function(t){this.imgUrl=t}},beforeDestroy:function(){}},s=r,c=(i("5836"),i("2877")),l=Object(c["a"])(s,a,n,!1,null,"6e1b7b23",null);e["a"]=l.exports},d3d7:function(t,e,i){t.exports=i.p+"static/img/emptyPage_bg.0a9eb319.png"},d977:function(t,e,i){"use strict";i("2d5f")},ddec:function(t,e,i){"use strict";i("7f7f");var a=i("ca45");a["a"].install=function(t){return t.component(a["a"].name,a["a"])},e["a"]=a["a"]},ec6b:function(t,e,i){"use strict";i("afa8")}}]);
|