(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-78b6e666"],{"20e3":function(e,t,a){},"3bbe":function(e,t,a){var i=a("861d");e.exports=function(e){if(!i(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},7156:function(e,t,a){var i=a("861d"),r=a("d2bb");e.exports=function(e,t,a){var n,s;return r&&"function"==typeof(n=t.constructor)&&n!==a&&i(s=n.prototype)&&s!==a.prototype&&r(e,s),e}},"78a2":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("div",{staticClass:"outmain ba_f heighthv pad_20 bor_rad5"},[e._m(0),a("div",{staticClass:"mar_t20 flex-bet flex-y-top"},[a("div",{staticClass:"flex-g-1"},[a("el-form",{ref:"form",attrs:{model:e.form,"label-width":"180px"}},[a("el-form-item",{attrs:{label:"直播类型",required:!0}},[a("el-radio-group",{model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[a("el-radio",{attrs:{label:"0"}},[e._v("手机直播")]),a("el-radio",{attrs:{label:"1",disabled:""}},[e._v("推流设备直播")])],1),a("div",{staticClass:"yb_margin lh16"},[e._v('通过"小程序直播"小程序开播')])],1),a("el-form-item",{attrs:{label:"直播间标题",required:!0,prop:"name"}},[a("el-input",{attrs:{placeholder:"请输入直播间标题"},model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),a("el-form-item",{attrs:{label:"开播时间",required:!0}},[a("el-date-picker",{attrs:{type:"datetimerange",align:"right","start-placeholder":"开始日期","end-placeholder":"结束日期","default-time":["08:00:00","20:00:00"]},model:{value:e.timeData,callback:function(t){e.timeData=t},expression:"timeData"}}),a("div",{staticClass:"yb_margin lh25"},[a("p",{},[e._v("开播时间段仅供参考,不是实际直播间可以开播的时间")]),a("p",[e._v("开播时间需要在当前时间的10分钟后 并且 开始时间不能在 6 个月后,直播时间不能少于30分钟, 最长时间不能超过12个小时")])])],1),a("el-form-item",{attrs:{label:"主播昵称",required:!0,prop:"anchorName"}},[a("el-input",{attrs:{placeholder:"请输入主播昵称"},model:{value:e.form.anchorName,callback:function(t){e.$set(e.form,"anchorName",t)},expression:"form.anchorName"}})],1),a("el-form-item",{attrs:{label:"主播微信号",required:!0,prop:"anchorWechat"}},[a("el-input",{attrs:{placeholder:"请输入主播微信号"},model:{value:e.form.anchorWechat,callback:function(t){e.$set(e.form,"anchorWechat",t)},expression:"form.anchorWechat"}})],1),a("div",{staticClass:"shuju_title mar_b20"},[a("div",{staticClass:"shuju_title_text"},[a("span",[e._v("直播间设置")])])]),a("el-form-item",{attrs:{label:"允许评论"}},[a("el-radio-group",{attrs:{required:!0},model:{value:e.form.closeComment,callback:function(t){e.$set(e.form,"closeComment",t)},expression:"form.closeComment"}},[a("el-radio",{attrs:{label:"0"}},[e._v("是")]),a("el-radio",{attrs:{label:"1"}},[e._v("否")])],1),a("div",{staticClass:"yb_margin lh16"},[e._v("若关闭,直播开始后不允许开启")])],1),a("el-form-item",{attrs:{label:"展示方式",required:!0}},[a("el-radio-group",{model:{value:e.form.screenType,callback:function(t){e.$set(e.form,"screenType",t)},expression:"form.screenType"}},[a("el-radio",{attrs:{label:"1"}},[e._v("横屏")]),a("el-radio",{attrs:{label:"0"}},[e._v("竖屏")])],1),a("div",{staticClass:"yb_margin lh16"},[e._v("横屏:视频宽高比为16:9、4:3、1.85:1 ;竖屏:视频宽高比为9:16、2:3")])],1),a("el-form-item",{attrs:{label:"允许点赞",required:!0}},[a("el-radio-group",{model:{value:e.form.closeLike,callback:function(t){e.$set(e.form,"closeLike",t)},expression:"form.closeLike"}},[a("el-radio",{attrs:{label:"0"}},[e._v("是")]),a("el-radio",{attrs:{label:"1"}},[e._v("否")])],1),a("div",{staticClass:"yb_margin lh16"},[e._v("若关闭,直播开始后不允许开启")])],1),a("el-form-item",{attrs:{label:"开启货架",required:!0}},[a("el-radio-group",{model:{value:e.form.closeGoods,callback:function(t){e.$set(e.form,"closeGoods",t)},expression:"form.closeGoods"}},[a("el-radio",{attrs:{label:"0"}},[e._v("是")]),a("el-radio",{attrs:{label:"1"}},[e._v("否")])],1),a("div",{staticClass:"yb_margin lh16"},[e._v("若关闭,直播开始后不允许开启")])],1),a("el-form-item",{attrs:{label:"直播间封面",required:!0}},[e.icon?a("div",{staticClass:"uploadSource bor_de rel flex"},[a("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enter(1)},mouseleave:function(t){return e.leave(1)}}},[a("i",{ref:"imgicon1",staticClass:"el-icon-check"}),a("i",{staticClass:"el-icon-close",on:{click:function(t){return e.deleteMultiImage(e.icon,1)}}})]),a("img",{staticClass:"wid",attrs:{src:e.icon},on:{click:function(t){return e.test(1)}}})]):a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(1)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})]),a("div",{staticClass:"yb_margin"},[e._v("建议尺寸:1920×1080")])]),a("el-form-item",{attrs:{label:"分享卡图片",required:!0}},[e.icon2?a("div",{staticClass:"uploadSource bor_de rel flex"},[a("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enter(2)},mouseleave:function(t){return e.leave(2)}}},[a("i",{ref:"imgicon2",staticClass:"el-icon-check"}),a("i",{staticClass:"el-icon-close",on:{click:function(t){return e.deleteMultiImage(e.icon2,2)}}})]),a("img",{staticClass:"wid",attrs:{src:e.icon2},on:{click:function(t){return e.test(2)}}})]):a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(2)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})]),a("div",{staticClass:"yb_margin"},[e._v("建议尺寸:800×640")])]),a("el-form-item",{attrs:{label:"背景图片",required:!0}},[e.icon3?a("div",{staticClass:"uploadSource bor_de rel flex"},[a("label",{staticClass:"statusLabel curs",on:{mouseenter:function(t){return e.enter(3)},mouseleave:function(t){return e.leave(3)}}},[a("i",{ref:"imgicon3",staticClass:"el-icon-check"}),a("i",{staticClass:"el-icon-close",on:{click:function(t){return e.deleteMultiImage(e.icon3,3)}}})]),a("img",{staticClass:"wid",attrs:{src:e.icon3},on:{click:function(t){return e.test(3)}}})]):a("div",{staticClass:"uploadSource flex-center curs",on:{click:function(t){return e.test(3)}}},[a("i",{staticClass:"el-icon-plus fon_40 color_d9"})]),a("div",{staticClass:"yb_margin"},[e._v("建议尺寸:800×640")])])],1)],1)])]),a("attachment-img",{ref:"img1",attrs:{type:"img"},on:{attachment:e.imgadd1}}),a("attachment-img",{ref:"img2",attrs:{type:"img"},on:{attachment:e.imgadd2}}),a("attachment-img",{ref:"img3",attrs:{type:"img"},on:{attachment:e.imgadd3}}),a("div",{staticClass:"mar_t20 ba_f pad_20 t_c"},[a("el-button",{attrs:{type:"primary"},on:{click:e.submitForm}},[e._v("立即创建")])],1)],1)},r=[function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"shuju_title mar_b20"},[a("div",{staticClass:"shuju_title_text"},[a("span",[e._v("创建直播")])])])}],n=(a("c975"),a("a434"),a("96cf"),a("1da1")),s=a("fc6e"),o=a("7cb7"),c=a("ed08"),l={components:{attachmentImg:s["a"]},created:function(){this.$route.query.id&&(this.id=this.$route.query.id,this.edit())},data:function(){return{form:{name:"",feedsImg:"",type:"0",screenType:"1",anchorName:"",anchorWechat:"",shareImg:"",coverImg:"",closeLike:"0",closeGoods:"0",closeComment:"0"},icon:"",icon2:"",icon3:"",timeData:[new Date,(new Date).setMonth((new Date).getMonth()+3)],collapseName:""}},methods:{enter:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="none"},leave:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.$refs["imgicon"+e].style.display="inline-block"},test:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;console.log(this.$refs,e),this.$refs["img"+e].dialogVisible=!0},imgadd1:function(e){this.icon=e.str,this.UrlToWxImg1(this.icon)},imgadd2:function(e){this.icon2=e.str,this.UrlToWxImg2(this.icon2)},imgadd3:function(e){this.icon3=e.str,this.UrlToWxImg3(this.icon3)},deleteMultiImage:function(e,t,a){if(Array.prototype.remove=function(e){var t=this.indexOf(e);t>-1&&this.splice(t,1)},"multigraph"==a)switch(t){case 2:this.form2.environment.remove(e);break}else switch(t){case 1:this.icon="";break;case 2:this.icon2="";break;case 3:this.icon3="";break}},UrlToWxImg1:function(e){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function a(){var i,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(o["D"])({src:e});case 2:i=a.sent,r=i.data,t.form.feedsImg=r.media_id;case 5:case"end":return a.stop()}}),a)})))()},UrlToWxImg2:function(e){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function a(){var i,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(o["D"])({src:e});case 2:i=a.sent,r=i.data,t.form.shareImg=r.media_id;case 5:case"end":return a.stop()}}),a)})))()},UrlToWxImg3:function(e){var t=this;return Object(n["a"])(regeneratorRuntime.mark((function a(){var i,r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(o["D"])({src:e});case 2:i=a.sent,r=i.data,t.form.coverImg=r.media_id;case 5:case"end":return a.stop()}}),a)})))()},submitForm:function(){var e=this;return Object(n["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.$refs["form"].validate(function(){var t=Object(n["a"])(regeneratorRuntime.mark((function t(a){var i,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=11;break}return console.log(e.form,e.timeData),e.timeData&&(e.form.startTime=Object(c["a"])(e.timeData[0]),e.form.endTime=Object(c["a"])(e.timeData[1])),t.next=5,Object(o["o"])(e.form);case 5:i=t.sent,r=i.msg,e.$baseMessage(r,"success"),e.$router.go(-1),t.next=12;break;case 11:return t.abrupt("return",!1);case 12:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 1:case"end":return t.stop()}}),t)})))()}}},u=l,d=(a("cfa5"),a("2877")),m=Object(d["a"])(u,i,r,!1,null,null,null);t["default"]=m.exports},a434:function(e,t,a){"use strict";var i=a("23e7"),r=a("23cb"),n=a("a691"),s=a("50c4"),o=a("7b0b"),c=a("65f0"),l=a("8418"),u=a("1dde"),d=a("ae40"),m=u("splice"),g=d("splice",{ACCESSORS:!0,0:0,1:2}),f=Math.max,p=Math.min,h=9007199254740991,v="Maximum allowed length exceeded";i({target:"Array",proto:!0,forced:!m||!g},{splice:function(e,t){var a,i,u,d,m,g,b=o(this),_=s(b.length),y=r(e,_),x=arguments.length;if(0===x?a=i=0:1===x?(a=0,i=_-y):(a=x-2,i=p(f(n(t),0),_-y)),_+a-i>h)throw TypeError(v);for(u=c(b,i),d=0;d_-i+a;d--)delete b[d-1]}else if(a>i)for(d=_-i;d>y;d--)m=d+i-1,g=d+a-1,m in b?b[g]=b[m]:delete b[g];for(d=0;d2)if(l=h(l),t=l.charCodeAt(0),43===t||45===t){if(a=l.charCodeAt(2),88===a||120===a)return NaN}else if(48===t){switch(l.charCodeAt(1)){case 66:case 98:i=2,r=49;break;case 79:case 111:i=8,r=55;break;default:return+l}for(n=l.slice(2),s=n.length,o=0;or)return NaN;return parseInt(n,i)}return+l};if(n(v,!b(" 0o1")||!b("0b1")||b("+0x1"))){for(var C,k=function(e){var t=arguments.length<1?0:e,a=this;return a instanceof k&&(y?d((function(){_.valueOf.call(a)})):c(a)!=v)?l(new b(x(t)),a,k):x(t)},w=i?g(b):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),I=0;w.length>I;I++)o(b,C=w[I])&&!o(k,C)&&p(k,C,f(b,C));k.prototype=_,_.constructor=k,s(r,v,k)}},bf19:function(e,t,a){"use strict";var i=a("23e7");i({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return URL.prototype.toString.call(this)}})},c8f1:function(e,t,a){},cfa5:function(e,t,a){"use strict";var i=a("20e3"),r=a.n(i);r.a},d2bb:function(e,t,a){var i=a("825a"),r=a("3bbe");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,a={};try{e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,e.call(a,[]),t=a instanceof Array}catch(n){}return function(a,n){return i(a),r(n),t?e.call(a,n):a.__proto__=n,a}}():void 0)},dad0:function(e,t,a){"use strict";var i=a("c8f1"),r=a.n(i);r.a},ed08:function(e,t,a){"use strict";a.d(t,"a",(function(){return i})),a.d(t,"b",(function(){return r})),a.d(t,"c",(function(){return n}));a("a9e3"),a("ac1f"),a("5319"),a("bf19");function i(e){var t=new Date(e).toJSON(),a=new Date(+new Date(t)+288e5).toISOString().replace(/T/g," ").replace(/\.[\d]{3}Z/,"");return a}function r(e){var t=new Date(e),a=t.getFullYear(),i=t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1,r=t.getDate()<10?"0"+t.getDate():t.getDate(),n=t.getHours()<10?"0"+t.getHours():t.getHours(),s=t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes(),o=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds();return a+"-"+i+"-"+r+" "+n+":"+s+":"+o}function n(e){var t=new Date(1e3*Number(e)),a=t.getFullYear()+"-",i=(t.getMonth()+1<10?"0"+(t.getMonth()+1):t.getMonth()+1)+"-",r=(t.getDate()<10?"0"+t.getDate():t.getDate())+" ",n=(t.getHours()<10?"0"+t.getHours():t.getHours())+":",s=(t.getMinutes()<10?"0"+t.getMinutes():t.getMinutes())+":",o=t.getSeconds()<10?"0"+t.getSeconds():t.getSeconds(),c=a+i+r+n+s+o;return c}},fc6e:function(e,t,a){"use strict";var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{staticClass:"attachmentImg",attrs:{title:"选择图片",visible:e.dialogVisible,"close-on-click-modal":!1,width:"55%"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.modalClose,opened:e.dialogOpened}},[a("div",{staticClass:"attachment_img_box",attrs:{flex:"box:first"}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.groupListLoading,expression:"groupListLoading"}],staticClass:"attachment_img_left"},[a("el-menu",{staticClass:"group-menu",attrs:{mode:"vertical"}},[a("el-scrollbar",{staticStyle:{height:"523px",width:"100%"}},[a("div",{staticClass:"goods-menu"},[a("el-menu-item",{class:{"is-active":"all"==e.allindex},staticStyle:{"text-align":"center"},attrs:{index:"all"},on:{click:function(t){return e.selected(0)}}},[a("span",[e._v("全部")])]),e._l(e.groupItem,(function(t){return[a("el-menu-item",{key:t.id,attrs:{index:t.id},on:{click:function(a){return e.selected(t.id)}}},[a("div",{staticClass:"fenlei",attrs:{flex:"dir:left box:last"}},[a("i",{staticClass:"el-icon-circle-close gbfenlei",staticStyle:{display:"none"},on:{click:function(a){return e.deleteType(t.id)}}}),a("div",{staticStyle:{overflow:"hidden","text-overflow":"ellipsis",width:"100%"}},[a("span",[e._v(e._s(t.name))])])])])]}))],2)]),a("el-popover",{attrs:{placement:"top",width:"160"},model:{value:e.visible,callback:function(t){e.visible=t},expression:"visible"}},[a("el-input",{attrs:{placeholder:"请输入分组名称",size:"mini"},model:{value:e.new_type_name,callback:function(t){e.new_type_name=t},expression:"new_type_name"}}),a("div",{staticStyle:{"text-align":"right",margin:"0","margin-top":"10px"}},[a("el-button",{attrs:{size:"mini",type:"text"},on:{click:function(t){e.visible=!1}}},[e._v("取消")]),a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:e.addNewAttType}},[e._v("确定")])],1),a("el-button",{staticStyle:{"margin-left":"22%","margin-top":"13px"},attrs:{slot:"reference",size:"small"},slot:"reference"},[a("i",{staticClass:"el-icon-circle-plus-outline"}),e._v(" 新建分组 ")])],1)],1)],1),a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.rightLoading,expression:"rightLoading"}],staticClass:"attachment_img_right",attrs:{flex:"dir:top"}},[a("div",{staticClass:"selectBox"},[a("el-input",{staticStyle:{width:"30%","padding-left":"12px"},attrs:{placeholder:"请输入图片名称","suffix-icon":"el-icon-search",size:"small"},on:{input:function(t){return e.search(e.atta_name)}},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.search(e.atta_name)}},model:{value:e.atta_name,callback:function(t){e.atta_name=t},expression:"atta_name"}}),a("div",{staticStyle:{float:"right",padding:"0 10px 0 0"}},[a("el-upload",{staticClass:"upload-demo",attrs:{action:e.UploadUrl(),multiple:!0,limit:50,"on-exceed":e.handleExceed,"file-list":e.fileList,"on-success":e.handleSuccess,"on-error":e.handleError,"before-upload":e.beforeUpload,data:e.uploadData,"on-progress":e.handProgress}},[a("el-button",{attrs:{size:"small",type:"primary"}},[a("i",{staticClass:"el-icon-plus avatar-uploader-icon"}),e._v(" 上传图片 ")])],1)],1)],1),a("el-scrollbar",{staticClass:"scrollbar",staticStyle:{height:"460px"}},[a("div",{staticClass:"app-attachment-list"},[e._l(e.attachments,(function(t,i){return[a("el-tooltip",{key:t.id,staticClass:"item",attrs:{effect:"dark",content:t.name,placement:"top","open-delay":1}},[a("div",{staticClass:"app-attachment-item",on:{click:function(a){return e.selectedItem(i,t.url)}}},[a("div",{staticClass:"app-attachment-item-bj"},[a("div",{staticClass:"imgStyle"},[a("el-image",{staticStyle:{width:"100%",height:"143px","border-radius":"5px"},attrs:{src:t.url,fit:"cover"}}),a("div",{staticClass:"mask",style:e.getStyle2(i)},[a("i",{staticClass:"el-icon-check center-icon pos-center"}),a("p",{staticClass:"triangle"},[a("i",{staticClass:"el-icon-check"})])])],1),a("div",{staticClass:"app-attachment-name"},[e._v(e._s(t.name))]),a("i",{staticClass:"el-icon-error delete",on:{click:function(a){return e.deleteItem(t.id)}}})])])])]}))],2)]),a("div",{staticStyle:{padding:"5px","text-align":"right","margin-top":"auto"}},[a("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.total,"page-size":e.pagesize},on:{"current-change":e.current_change}})],1)],1)]),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogVisible=!1}}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary",size:"small"},on:{click:function(t){return e.selectedItems()}}},[e._v("确 定")])],1)])},r=[],n=(a("99af"),a("365c")),s={name:"attachment-img",props:{type:{type:String,default:"img"},type2:{type:String,default:""},op:{type:String}},data:function(){return{visible:!1,atta_name:"",uploadParams:{type_id:0,type:1},category:0,keywords:"",total:0,pagesize:30,currentPage:1,dialogVisible:!1,groupItem:[],attachments:[],groupListLoading:!1,rightLoading:!1,new_type_name:"",fileList:[],selectedArr:{},attachmentList:"12",uploadData:{key:"",token:""},file:{Url:"",path:"",name:"",size:0},att_type:"",allindex:"all"}},created:function(){},methods:{getStyle2:function(e){var t=this,a=t.currentPage,i=t.selectedArr["img"==t.type?"danxuan":"item"+e+a];return i&&i.page==a&&i.index==e?"display:block":""},modalClose:function(){var e=this;e.selectedArr={}},dialogOpened:function(){this.getgroupItem(),this.getAttachment_List()},handProgress:function(){var e=this;e.rightLoading=!0},getgroupItem:function(){var e=this;this.$api.get("common/file/get-category",{storeId:this.type2},(function(t){1==t.code?(e.groupItem=t.data,e.groupListLoading=!1,e.visible=!1):e.groupListLoading=!1}))},getAttachment_List:function(){var e=this;e.rightLoading=!0,this.$api.get("common/file/get-picture",{page:e.currentPage,category:e.category,keywords:e.keywords,storeId:this.type2},(function(t){1==t.code?(e.attachments=t.data,e.total=t.count,e.rightLoading=!1):e.rightLoading=!1}))},addNewAttType:function(){var e=this;e.groupListLoading=!0,this.$api.post("common/file/save-category",{storeId:this.type2,name:e.new_type_name},(function(t){1==t.code?(e.visible=!1,e.$message({message:t.msg,type:"success",duration:500,onClose:function(){e.new_type_name="",e.getgroupItem()}})):(e.visible=!1,e.$message.error(t.msg))}))},deleteType:function(e){var t=this;t.groupListLoading=!0,this.$api.post("common/file/del-picture-category",{id:e},(function(e){1==e.code?(t.visible=!1,t.$message({message:e.msg,type:"success",duration:500,onClose:function(){t.getgroupItem()}})):(t.$message.error(e.msg),t.groupListLoading=!1)}))},search:function(e){var t=this;console.log(e),this.keywords=e,t.getAttachment_List()},current_change:function(e){var t=this;t.currentPage=e,t.getAttachment_List()},deleteItem:function(e){var t=this;t.rightLoading=!0,this.$api.post("common/file/del-picture",{id:e},(function(e){1==e.code?(t.visible=!1,t.$message({message:e.msg,type:"success",duration:500,onClose:function(){t.getAttachment_List()}})):(t.$message.error(e.msg),t.groupListLoading=!1)}))},UploadUrl:function(){var e=n["a"].backendPath;return e+"common/file/get-category"},beforeUpload:function(e){console.log("上传前判断",e);var t="image/jpg"===e.type||"image/jpeg"===e.type||"image/png"===e.type||"image/gif"===e.type,a=e.size/1024/1024<2;return t?a?void 0:(this.$message.error("文件大小不能超过 2MB!"),!1):(this.$message.error("上传图片只支持jpg、jpeg、png格式!"),!1)},handleError:function(e){this.$message({message:"上传失败",duration:2e3,type:"warning"})},handleSuccess:function(e,t,a){console.log("345",a),this.file=t,this.addAttachment()},handleExceed:function(e,t){this.$message.warning("当前限制选择 50 个文件,本次选择了 ".concat(e.length," 个文件,共选择了 ").concat(e.length+t.length," 个文件"))},addAttachment:function(){var e=this,t=new FormData;t.append("file",this.file.raw),t.append("category",this.category),t.append("storeId",this.type2),this.$api.post("common/file/upload",t,(function(t){1==t.code?(e.getAttachment_List(),e.$message.success("上传成功")):(e.$message.error(t.msg),console.log(t.msg))}))},selected:function(e){var t=this;t.rightLoading=!0,t.currentPage=1,t.category=e,t.allindex="otherList",t.getAttachment_List()},selectedItem:function(e,t){var a=this,i="img"==a.type,r=i?"danxuan":"item"+e+a.currentPage,n=a.selectedArr[r];n&&n.index==e?a.$delete(a.selectedArr,r):(i&&a.$delete(a.selectedArr,r),a.$set(a.selectedArr,r,{page:a.currentPage,index:e,url:t}))},selectedItems:function(){var e=this;e=this;var t=e.selectedArr,a="",i=[];for(var r in t)a+=a?","+t[r].url:t[r].url,i.push(t[r].url);e.$emit("attachment",{str:a,arr:i}),e.dialogVisible=!1}}},o=s,c=(a("dad0"),a("2877")),l=Object(c["a"])(o,i,r,!1,null,null,null);t["a"]=l.exports}}]);