chunk-eb8d7080.80c8dbcf.js 9.1 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-eb8d7080"],{"0ccc":function(e,t,i){},"0d2b":function(e,t,i){"use strict";var a=i("2a95");i("8237"),t.a={props:{options:{type:Array,default:function(){return[]}},value:{type:String|Number|Array,default:""},placeholder:{type:String,default:""},title:{type:String,default:""},type:{type:String,default:"text"},suffix:{type:String,default:""},prefix:{type:String,default:""},styleModel:{type:String,default:""},className:{type:String,default:""},field:{type:String,default:""},timerType:{type:String,default:"timerange"},timerFormat:{type:String,default:"HH:mm:ss"},info:{type:String,default:""},on:{type:Object,default:function(){return{}}},validate:{type:Object,default:function(){return{}}},errorsValidate:{type:Array,default:function(){return[]}}},data:function(){return{valueModel:this.value,errorMessage:"",exampleImage:{site_logo:"/statics/system/adminSet01.png",site_logo_square:"/statics/system/adminSet02.png",login_logo:"/statics/system/adminSet03.png",admin_login_slide:"/statics/system/adminSet04.png",start_login_logo:"/statics/system/adminSet05.png",wap_login_logo:"/statics/system/mobileSet01.png",wechat_share_img:"/statics/system/mobileSet02.png",pc_logo:"/statics/system/pcSet01.png",pay_weixin_client_cert:{text:'更多详情请查看:<br><a href="https://kf.qq.com/faq/161222NneAJf161222U7fARv.html" target="_blank" rel="noopener noreferrer">https://kf.qq.com/faq/161222NneAJf161222U7fARv.html</a>',image:"/statics/system/wxSet01.png"},pay_weixin_client_key:{text:'更多详情请查看:<br><a href="https://kf.qq.com/faq/161222NneAJf161222U7fARv.html" target="_blank" rel="noopener noreferrer">https://kf.qq.com/faq/161222NneAJf161222U7fARv.html</a>',image:"/statics/system/wxSet01.png"},terminal_number:"/statics/system/yilianyunPrinter.png",config_export_siid:"/statics/system/kuadi100Dump.png",product_poster_title:"/statics/system/productSharePoster.png",product_video_status:"/statics/system/productVideo.png"},exampleSize:{site_logo:364,site_logo_square:364,login_logo:364,admin_login_slide:364,start_login_logo:364,wap_login_logo:256,wechat_share_img:256,pc_logo:364,terminal_number:364,config_export_siid:364,product_poster_title:256}}},watch:{errorsValidate:{handler:function(e){var t=this;if(e){var i=e.find((function(e){return e.field===t.field}));this.errorMessage=i?i.message:""}else this.errorMessage=""},deep:!0}},methods:{getClassName:function(){var e=["input-build-"+this.field];return this.errorMessage&&e.push("ivu-form-item-error"),(this.validate[this.field]?this.validate[this.field].filter((function(e){return!0===e.required})):[]).length&&e.push("ivu-form-item-required"),e},changeEvent:function(e,t){"change"===e&&this.$emit("changeValue",{field:this.field,value:this.valueModel}),this.on[e]&&this.on[e](t),this.validator(e)},validator:function(e){var t=this;if((this.validate[this.field]?this.validate[this.field].filter((function(t){return t.trigger===e})):[]).length){var i,s,l,n=new a.a(this.validate),o=(i={},s=this.field,l=this.valueModel,s in i?Object.defineProperty(i,s,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[s]=l,i);n.validate(o,(function(e,i){if(e){var a=e.find((function(e){return e.field===t.field}));t.errorMessage=a?a.message:""}else t.errorMessage=""}))}}}}},5613:function(e,t,i){"use strict";var a={name:"lookImage",props:{imageUrl:{type:String,default:""},styleImg:{type:String,default:""},title:{type:String,default:"查看图片"}},data:function(){return{visible:!1}},methods:{clear:function(){this.visible=!1},open:function(){this.visible=!0}}},s=(i("d750"),i("2877")),l=Object(s.a)(a,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("Modal",{attrs:{title:e.title,"footer-hide":""},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[i("div",{staticClass:"image"},[e.visible?i("img",{style:e.styleImg?e.styleImg:"width: 100%;",attrs:{src:e.imageUrl}}):e._e()]),i("div",{attrs:{slot:"footer"},slot:"footer"})])}),[],!1,null,"9a098c1c",null);t.a=l.exports},9692:function(e,t,i){"use strict";i.r(t);var a=i("0d2b"),s=i("d708"),l=i("5613");function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o={name:"uploadImageBuild",mixins:[a.a],components:{lookImage:l.a},props:{upload:{type:Object,default:function(){return{url:"",size:2048,format:["jpg","jpeg","png","gif"],headers:{},maxNum:1}}},icon:{type:String,default:""}},data:function(){return{baseURL:s.a.apiBaseURL.replace(/adminapi/,""),uploadList:[],valueModel:this.value,disabledSeleteImage:!1,errorMessage:"",imageUrl:"",multiple:!1}},watch:{valueModel:{handler:function(e){this.multiple?e.length>=this.upload.maxNum?this.disabledSeleteImage=!1:this.disabledSeleteImage=!0:this.disabledSeleteImage=!e,this.changeValue()},deep:!0}},created:function(){this.multiple=this.upload.maxNum>1,this.multiple?"object"!==n(this.valueModel)&&(this.valueModel=[]):"string"!=typeof this.valueModel&&(this.valueModel=""),-1!==this.upload.url.indexOf("http")&&-1!==this.upload.url.indexOf("https")||(this.upload.url=s.a.apiBaseURL+this.upload.url),-1===["image","file"].indexOf(this.type)&&(this.type="image"),"object"!==n(this.valueModel)||this.valueModel.length||(this.disabledSeleteImage=!0),"string"!=typeof this.valueModel||this.valueModel||(this.disabledSeleteImage=!0)},mounted:function(){},methods:{changeValue:function(){this.$emit("changeValue",{field:this.field,value:this.valueModel}),this.on.change&&this.on.change(this.valueModel)},handleSuccess:function(e,t,i){var a=this;this.on.success?this.on.success(e,(function(e){return a.valueModel=e})):200!==e.status?this.$Message.error(e.msg):(this.valueModel=e.data.src,this.$Message.success(e.msg))},handleFormatError:function(){},handProgress:function(e,t,i){},handleMaxSize:function(){},handleBeforeUpload:function(){},handleView:function(e){this.imageUrl=e,this.$refs.lookImage.open()},handleRemove:function(e,t){this.multiple?this.valueModel.splice(t,1):this.valueModel=""}}},r=(i("9ea8"),i("2877")),u=Object(r.a)(o,(function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("FormItem",{staticClass:"input-build upload-build",class:e.getClassName(),attrs:{label:e.title}},[e.multiple?["file"===e.type?e._l(e.uploadList,(function(t,a){return i("div",{staticClass:"demo-upload-list"},[i("Icon",{attrs:{type:"md-document",size:"40"}}),i("div",{staticClass:"demo-upload-list-cover"},[i("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(t){return e.handleRemove(a)}}})],1)],1)})):e._l(e.uploadList,(function(t,a){return i("div",{staticClass:"demo-upload-list"},[i("img",{attrs:{src:t}}),i("div",{staticClass:"demo-upload-list-cover"},[i("Icon",{attrs:{type:"ios-eye-outline"},nativeOn:{click:function(i){return e.handleView(t)}}}),i("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(t){return e.handleRemove(a)}}})],1)])}))]:[e.valueModel?i("div",{staticClass:"demo-upload-list"},["file"===e.type?[i("Icon",{attrs:{type:"md-document",size:"40"}}),i("div",{staticClass:"demo-upload-list-cover"},[i("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(t){return e.handleRemove(e.valueModel)}}})],1)]:[i("img",{attrs:{src:e.valueModel}}),i("div",{staticClass:"demo-upload-list-cover"},[i("Icon",{attrs:{type:"ios-eye-outline"},nativeOn:{click:function(t){return e.handleView(e.valueModel)}}}),i("Icon",{attrs:{type:"ios-trash-outline"},nativeOn:{click:function(t){return e.handleRemove(e.valueModel)}}})],1)]],2):e._e()],i("div",{staticClass:"input-error-wrapper"},[e.disabledSeleteImage?i("Upload",{ref:"upload",staticStyle:{display:"inline-block",width:"58px"},attrs:{"show-upload-list":!1,"on-success":e.handleSuccess,format:e.upload.format,"max-size":e.upload.size,"on-progress":e.handProgress,"on-format-error":e.handleFormatError,"on-exceeded-size":e.handleMaxSize,"before-upload":e.handleBeforeUpload,multiple:e.multiple,type:"drag",accept:"file"===e.type?"":"image/*",action:e.upload.url,headers:e.upload.headers}},[i("div",{staticStyle:{width:"58px",height:"58px","line-height":"58px"}},[i("Icon",{attrs:{type:e.icon?e.icon:"ios-image",size:"20"}})],1)]):e._e(),e.errorMessage?i("div",{staticClass:"error-wrapper"},[e._v(e._s(e.errorMessage))]):e._e()],1),e.info?i("div",{staticClass:"info-wrapper"},[e._v(e._s(e.info)+"\n "),e.exampleImage[e.field]?i("Poptip",{attrs:{placement:"bottom",trigger:"hover",width:e.exampleSize[e.field],transfer:!0,padding:"8px"}},[i("a",[e._v("查看示例")]),i("div",{staticClass:"exampleImg",class:364==e.exampleSize[e.field]?"on":"",attrs:{slot:"content"},slot:"content"},[e.exampleImage[e.field].text?i("div",{staticStyle:{"font-size":"12px","line-height":"18px",color:"#666666"},domProps:{innerHTML:e._s(e.exampleImage[e.field].text)}}):e._e(),i("img",{attrs:{src:e.baseURL+(e.exampleImage[e.field].image||e.exampleImage[e.field]),alt:""}})])]):e._e()],1):e._e(),i("look-image",{ref:"lookImage",attrs:{imageUrl:e.imageUrl}})],2)}),[],!1,null,"9eb8196c",null);t.default=u.exports},"9ea8":function(e,t,i){"use strict";var a=i("0ccc");i.n(a).a},b474:function(e,t,i){},d750:function(e,t,i){"use strict";var a=i("b474");i.n(a).a}}]);