| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5560e21f","chunk-2d207803"],{"11ae":function(e,t,o){"use strict";o.r(t);var n=o("7a23"),i=Object(n["withScopeId"])("data-v-3e3795bc");Object(n["pushScopeId"])("data-v-3e3795bc");var l={class:"ele-body"},a=Object(n["createVNode"])("div",{class:"item-tips"},"图片尺寸:690px*345px(可酌情同比例缩放)",-1);Object(n["popScopeId"])();var c=i((function(e,t,o,c,r,d){var s=Object(n["resolveComponent"])("a-input"),u=Object(n["resolveComponent"])("a-form-item"),b=Object(n["resolveComponent"])("uploadButton"),m=Object(n["resolveComponent"])("a-form"),p=Object(n["resolveComponent"])("imageSelector"),f=Object(n["resolveComponent"])("a-modal");return Object(n["openBlock"])(),Object(n["createBlock"])(f,{"wrap-class-name":"ele-modal-movable ele-modal-resizable ele-modal-resizable",visible:r.modalShow,closable:"",keyboard:"",title:r.form.id?"编辑":"新增",width:600,onCancel:t[5]||(t[5]=function(e){return r.modalShow=!1}),onOk:d.submit,confirmLoading:r.loading,bodyStyle:r.modalBodyStyle},{default:i((function(){return[Object(n["createVNode"])("div",l,[Object(n["createVNode"])(m,{ref:"form",model:r.form,rules:r.rules,style:{"max-width":"800px",margin:"0 auto"},"label-col":{md:{span:6},sm:{span:24}},"wrapper-col":{md:{span:18},sm:{span:24}}},{default:i((function(){return[Object(n["createVNode"])(u,{label:"标题:",name:"title"},{default:i((function(){return[Object(n["createVNode"])(s,{value:r.form.title,"onUpdate:value":t[1]||(t[1]=function(e){return r.form.title=e}),placeholder:"请填写标题","allow-clear":""},null,8,["value"])]})),_:1}),Object(n["createVNode"])(u,{label:"轮播图:",name:"pic"},{default:i((function(){return[Object(n["createVNode"])(b,{url:r.form.pic,onRemove:t[2]||(t[2]=function(e){return r.form.pic=""}),onHandleImg:t[3]||(t[3]=function(t){return e.handleImg("pic")})},null,8,["url"]),a]})),_:1})]})),_:1},8,["model","rules"])]),Object(n["createVNode"])(p,{onConfirm:e.imgConfirm,visible:e.imgVisible,"onUpdate:visible":t[4]||(t[4]=function(t){return e.imgVisible=t})},null,8,["onConfirm","visible"])]})),_:1},8,["visible","title","onOk","confirmLoading","bodyStyle"])})),r=(o("a9e3"),o("d3b7"),o("9e53")),d=o("1694"),s=o("a196"),u={mixins:[s["chooseImgMixin"]],components:{imageSelector:r["a"],uploadButton:d["a"]},name:"addEdit",data:function(){return{modalShow:!1,loading:!1,agentOptions:[],modalBodyStyle:{maxHeight:"68vh",overflowY:"auto"},form:{},rules:{title:[{required:!0,message:"请输入标题",trigger:"blur"}],pic:[{required:!0,message:"请选择图片",trigger:"blur"}]}}},methods:{openDetail:function(e){if(e){var t=Object.assign({},e);t.bili=Number(t.bili),this.form=t}else this.form={title:"",pic:""};this.modalShow=!0},submit:function(){var e=this;this.$refs.form.validate().then((function(){e.loading=!0;var t=Object.assign({},e.form),o="";o=t.id?"/manager/shopBanner/edit":"/manager/shopBanner/add",e.$post(o,t).then((function(){e.$message.success("操作成功!"),e.$emit("reload"),e.modalShow=!1}))})).finally((function(){e.loading=!1}))}}},b=(o("92bf"),o("6b0d")),m=o.n(b);const p=m()(u,[["render",c],["__scopeId","data-v-3e3795bc"]]);t["default"]=p},1694:function(e,t,o){"use strict";var n=o("7a23"),i=Object(n["withScopeId"])("data-v-571a5ff5");Object(n["pushScopeId"])("data-v-571a5ff5");var l={key:0},a={class:"avatar-uploader"},c={class:"avatar-uploader"},r={class:"ant-upload-text"},d={key:1,class:"avatar-uploader-wrap"},s={class:"avatar-uploader"},u={class:"ant-upload-text"};Object(n["popScopeId"])();var b=i((function(e,t,o,b,m,p){var f=Object(n["resolveComponent"])("a-image"),O=Object(n["resolveComponent"])("LoadingOutlined"),v=Object(n["resolveComponent"])("CloseCircleOutlined"),h=Object(n["resolveComponent"])("PlusOutlined"),j=Object(n["resolveComponent"])("a-row");return Object(n["openBlock"])(),Object(n["createBlock"])("div",null,[o.urls.length>0?(Object(n["openBlock"])(),Object(n["createBlock"])("div",l,[Object(n["createVNode"])(j,{wrap:!0},{default:i((function(){return[(Object(n["openBlock"])(!0),Object(n["createBlock"])(n["Fragment"],null,Object(n["renderList"])(o.urls,(function(e,i){return Object(n["openBlock"])(),Object(n["createBlock"])("div",{class:"avatar-uploader-wrap",style:{margin:"5px"},key:i},[Object(n["createVNode"])("div",a,[e?(Object(n["openBlock"])(),Object(n["createBlock"])(f,{key:0,onClick:t[1]||(t[1]=Object(n["withModifiers"])((function(){}),["stop"])),style:{overflow:"hidden","max-width":"100%","max-height":"100%"},width:"100%",preview:!0,src:e.url,alt:o.alt},null,8,["src","alt"])):Object(n["createCommentVNode"])("",!0),Object(n["createVNode"])("div",null,[Object(n["withDirectives"])(Object(n["createVNode"])(O,null,null,512),[[n["vShow"],o.loading]])])]),o.disabled?Object(n["createCommentVNode"])("",!0):Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createBlock"])(v,{key:0,class:"close-btn",onClick:Object(n["withModifiers"])((function(e){return p.remove(i)}),["stop"])},null,8,["onClick"])),[[n["vShow"],e]])])})),128)),Object(n["withDirectives"])(Object(n["createVNode"])("div",{class:"avatar-uploader-wrap",style:{margin:"5px"},onClick:t[2]||(t[2]=function(){return p.handleImg&&p.handleImg.apply(p,arguments)})},[Object(n["createVNode"])("div",c,[Object(n["createVNode"])("div",null,[Object(n["withDirectives"])(Object(n["createVNode"])(O,null,null,512),[[n["vShow"],o.loading]]),Object(n["withDirectives"])(Object(n["createVNode"])(h,null,null,512),[[n["vShow"],!o.loading]]),Object(n["createVNode"])("div",r,Object(n["toDisplayString"])(o.tips),1)])])],512),[[n["vShow"],o.urls.length<o.max&&!o.disabled]])]})),_:1})])):(Object(n["openBlock"])(),Object(n["createBlock"])("div",d,[Object(n["createVNode"])("div",s,[o.url?(Object(n["openBlock"])(),Object(n["createBlock"])(f,{key:0,onClick:t[3]||(t[3]=Object(n["withModifiers"])((function(){}),["stop"])),style:{overflow:"hidden","max-width":"100%","max-height":"100%"},width:"100%",preview:!0,src:o.url,alt:o.alt},null,8,["src","alt"])):Object(n["createCommentVNode"])("",!0),Object(n["withDirectives"])(Object(n["createVNode"])("div",{onClick:t[4]||(t[4]=function(){return p.handleImg&&p.handleImg.apply(p,arguments)})},[Object(n["withDirectives"])(Object(n["createVNode"])(O,null,null,512),[[n["vShow"],o.loading]]),Object(n["withDirectives"])(Object(n["createVNode"])(h,null,null,512),[[n["vShow"],!o.loading]]),Object(n["createVNode"])("div",u,Object(n["toDisplayString"])(o.tips),1)],512),[[n["vShow"],!o.url]])]),o.disabled?Object(n["createCommentVNode"])("",!0):Object(n["withDirectives"])((Object(n["openBlock"])(),Object(n["createBlock"])(v,{key:0,class:"close-btn",onClick:Object(n["withModifiers"])(p.remove,["stop"])},null,8,["onClick"])),[[n["vShow"],o.url]])]))])})),m=(o("a9e3"),o("8fe6")),p=o("47ce"),f=o("411c"),O={name:"uploadButton",components:{LoadingOutlined:m["a"],PlusOutlined:p["a"],CloseCircleOutlined:f["a"]},props:{disabled:{type:Boolean,default:function(){return!1}},urls:{type:Array,default:function(){return[]}},url:{type:String,default:function(){return""}},max:{type:Number,default:function(){return 999}},loading:{type:Boolean,default:function(){return!1}},alt:{type:String,default:function(){return""}},tips:{type:String,default:function(){return"上传图片"}}},data:function(){return{}},methods:{remove:function(e){this.disabled||this.$emit("remove",e)},handleImg:function(){this.disabled||this.$emit("handleImg")}}},v=(o("6556"),o("6b0d")),h=o.n(v);const j=h()(O,[["render",b],["__scopeId","data-v-571a5ff5"]]);t["a"]=j},"35ff":function(e,t,o){},6556:function(e,t,o){"use strict";o("35ff")},"92bf":function(e,t,o){"use strict";o("df25")},a196:function(e,t,o){"use strict";o.r(t),o.d(t,"chooseImgMixin",(function(){return n}));var n={data:function(){return{currentFiled:"",imgVisible:!1}},methods:{handleImg:function(e){this.currentFiled=e,this.imgVisible=!0},imgConfirm:function(e){this.form[this.currentFiled]=e.imageList[e.imageList.length-1].url,this.imgVisible=!1}}}},df25:function(e,t,o){}}]);
|