1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-commons"],{3037:function(t,e,a){"use strict";a("b52a")},"333d":function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[a("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=(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(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 a in e.page)if(e.page.hasOwnProperty(a)){var i=e.page[a];this.$emit("update:"+a,i)}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)}},u=s,c=(a("3037"),a("2877")),l=Object(c["a"])(u,i,n,!1,null,"55da2967",null);e["a"]=l.exports},3516:function(t,e,a){"use strict";a("ca11")},"641c":function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"qrCode"},[a("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}},[a("div",{staticClass:"left-code"},[a("vue-qr",{staticStyle:{width:"100%"},attrs:{text:t.codeUrl,margin:0}}),t._v(" "),t.codeUrl?a("p",{staticClass:"code-url"},[a("copy-text",[t._v(t._s(t.codeUrl))])],1):t._e()],1),t._v(" "),t.ispreLook?a("el-button",{staticStyle:{width:"100%"},attrs:{type:"primary"},on:{click:t.preLook}},[t._v("预 览")]):t._e()],1)],1)},n=[],o=a("658f"),r=a.n(o),s=a("f904"),u=a.n(s),c={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){u()(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(){}},l=c,p=(a("ec6b"),a("2877")),g=Object(p["a"])(l,i,n,!1,null,null,null);e["a"]=g.exports},afa8:function(t,e,a){},b52a:function(t,e,a){},c7f0:function(t,e,a){"use strict";var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"upload"},[a("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?a("img",{staticClass:"avatar",attrs:{src:t.imgUrl}}):a("i",{staticClass:"el-icon-plus avatar-uploader-icon"})])],1)},n=[],o=(a("c5f6"),a("3908"),a("5f87")),r={data:function(){return{headers:{Authorization:Object(o["a"])()},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,a=this.imageType[t.type],i=t.size/1024/1024<this.imageSizeM,n=this.imageWidthM,o=this.imageHeightM,r=window.URL||window.webkitURL,s=new Promise((function(e,a){var i=new Image;i.onload=function(){n&&o?this.width===n&&this.height===o?e():a("请上传".concat(n,"x").concat(o,"尺寸图片")):n&&!o?this.width===n?e():a("请上传宽为".concat(n,"的图片")):!n&&o?this.height===o?e():a("请上传高为".concat(o,"的图片")):e()},i.src=r.createObjectURL(t)})).then((function(){return t}),(function(t){return e.$message.error(t),e.uploadImgLoading=!1,Promise.reject()}));return a||this.$message.error("只能上传图片格式!"),i||this.$message.error("上传图片大小不能超过 ".concat(this.imageSizeM,"MB!")),a&&i&&s&&(this.uploadImgLoading=!0),a&&i&&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,u=(a("3516"),a("2877")),c=Object(u["a"])(s,i,n,!1,null,null,null);e["a"]=c.exports},ca11:function(t,e,a){},ddec:function(t,e,a){"use strict";a("7f7f");var i=a("ca45");i["a"].install=function(t){return t.component(i["a"].name,i["a"])},e["a"]=i["a"]},ec6b:function(t,e,a){"use strict";a("afa8")}}]);
|