(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-501b3ff6"],{1694:function(e,t,n){"use strict";var o=n("7a23"),a=Object(o["withScopeId"])("data-v-571a5ff5");Object(o["pushScopeId"])("data-v-571a5ff5");var i={key:0},c={class:"avatar-uploader"},r={class:"avatar-uploader"},l={class:"ant-upload-text"},s={key:1,class:"avatar-uploader-wrap"},d={class:"avatar-uploader"},u={class:"ant-upload-text"};Object(o["popScopeId"])();var m=a((function(e,t,n,m,f,p){var g=Object(o["resolveComponent"])("a-image"),h=Object(o["resolveComponent"])("LoadingOutlined"),b=Object(o["resolveComponent"])("CloseCircleOutlined"),v=Object(o["resolveComponent"])("PlusOutlined"),O=Object(o["resolveComponent"])("a-row");return Object(o["openBlock"])(),Object(o["createBlock"])("div",null,[n.urls.length>0?(Object(o["openBlock"])(),Object(o["createBlock"])("div",i,[Object(o["createVNode"])(O,{wrap:!0},{default:a((function(){return[(Object(o["openBlock"])(!0),Object(o["createBlock"])(o["Fragment"],null,Object(o["renderList"])(n.urls,(function(e,a){return Object(o["openBlock"])(),Object(o["createBlock"])("div",{class:"avatar-uploader-wrap",style:{margin:"5px"},key:a},[Object(o["createVNode"])("div",c,[e?(Object(o["openBlock"])(),Object(o["createBlock"])(g,{key:0,onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(){}),["stop"])),style:{overflow:"hidden","max-width":"100%","max-height":"100%"},width:"100%",preview:!0,src:e.url,alt:n.alt},null,8,["src","alt"])):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])("div",null,[Object(o["withDirectives"])(Object(o["createVNode"])(h,null,null,512),[[o["vShow"],n.loading]])])]),n.disabled?Object(o["createCommentVNode"])("",!0):Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createBlock"])(b,{key:0,class:"close-btn",onClick:Object(o["withModifiers"])((function(e){return p.remove(a)}),["stop"])},null,8,["onClick"])),[[o["vShow"],e]])])})),128)),Object(o["withDirectives"])(Object(o["createVNode"])("div",{class:"avatar-uploader-wrap",style:{margin:"5px"},onClick:t[2]||(t[2]=function(){return p.handleImg&&p.handleImg.apply(p,arguments)})},[Object(o["createVNode"])("div",r,[Object(o["createVNode"])("div",null,[Object(o["withDirectives"])(Object(o["createVNode"])(h,null,null,512),[[o["vShow"],n.loading]]),Object(o["withDirectives"])(Object(o["createVNode"])(v,null,null,512),[[o["vShow"],!n.loading]]),Object(o["createVNode"])("div",l,Object(o["toDisplayString"])(n.tips),1)])])],512),[[o["vShow"],n.urls.length12&&(this.form.config.target_name_simple=this.form.config.target_name_simple.substr(0,12)+"...")},clearLink:function(){this.form.config.target_id="",this.form.config.target_name="",this.form.config.target_name_simple="",this.form.config.type="",this.form.config.item=""},initData:function(){var e=this;Object(u["f"])({type:9,sign:1}).then((function(t){e.component_id=t.id,e.reloadElement()}))},reloadElement:function(){var e=this;Object(u["g"])({component_id:this.component_id}).then((function(t){if(t&&t.length>0){var n=t[0];e.form={id:n.id,component_id:n.component_id,sort:1,config:{image_url:n.config.image_url,status:n.config.status,type:n.config.type,item:{type:n.config.item.type,target_url:n.config.item.target_url,is_need_token:n.config.item.is_need_token},target_name_simple:n.config.target_name_simple,target_id:n.config.target_id,target_name:n.config.target_name}}}else e.form={component_id:e.component_id,sort:1,config:{image_url:"",status:2,type:5,item:{type:1,target_url:"/personal-package/commission/combo-list",is_need_token:1},target_name_simple:"",target_id:"",target_name:""}}}))},save:function(){var e=this;return this.form.component_id?1!=this.form.config.status||this.form.config.image_url?(this.form.config.type||(this.form.config.type=0),this.saveLoading=!0,void Object(u["h"])(this.form).then((function(){e.reloadElement()})).finally((function(){e.saveLoading=!1}))):(this.$message.error("请上传图片"),!1):(this.$message.error("页面组件缺失,请刷新重试!"),!1)}}},f=(n("96f7"),n("6b0d")),p=n.n(f);const g=p()(m,[["render",r],["__scopeId","data-v-21b612ae"]]);t["default"]=g},"96f7":function(e,t,n){"use strict";n("6222")}}]);