text: (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-13a5"],{fyyL:function(t,e,i){"use strict";i.r(e);var s=i("gDS+"),l=i.n(s),o=i("t3Un"),a=i("7Qib"),n=i("MQ60"),d={name:"TplEdit",components:{draggable:i.n(n).a},data:function(){return{floors:[],activeFlag:!1,gifts:[],id:"",total_pages3:0,total_pages4:0,start_page3:0,start_page4:0,tableData:[],loading:!1,total_pages1:0,total_pages2:0,start_page1:0,start_page2:0,key_word1:"",key_word2:"",iscoryShow:!1,cory_index:"",cory_index1:"",dialogTableVisible:!1,dialogTable1Visible:!1,dialogTableVisible2:!1,dialogTableVisible3:!1,dialogTableVisible4:!1,classList:[],class2List:[],class_name:"",class1:[],class1_act:"",class2:[],class2_act:"",select_type:1,select_index:0,select_index1:0,select_index2:"",select_sptype:1,select_spindex:0,select_spindex1:0,select_spindex2:"",goods:[],shops:[],base_api:Object(a.c)(),active_index1:"",active_index2:"",bgurl_index:"",ggImage_url:"",image_url_index:"",ggImage_url_index:"",isSetBg:!1,floor_id:"",headerText:"首页装修",tplInfo:{shop_id:"",title:"",abstract:"",content:"",floor_id:""},options:{group:"mission"},content:{list:[]},tj_shops:[],hot_goods:[],tj_goods:[],hot_goods_num:0,tj_goods_num:0,tj_shop_num:0,all_start:0,theIndex:"",theIndex1:"",all_total:null,all_mcid:"",all_keyWord:"",all_showList:[],all_dataList:[],all_idList:[],inpItemId:"",inpclass1:"",Allclass2:[],inpclass2:""}},created:function(){this.floor_id=this.$route.query.floor_id,this.tplInfo.shop_id=this.$route.query.shop_id,this.id=this.$route.query.id,this.getClass1(),this.getActive(),this.addTpl(10)},methods:{handleClick:function(t){this.$router.push({path:"/shop_tpl_active",query:{id:t.id}})},detectClick:function(t){var e=this;this.$confirm("操作将删除此优惠券, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.a)({method:"post",url:"/item/item-details-activity-list/delete-activity-list",data:{id:t.id}}).then(function(i){if(0==i.data.errcode)for(var s=0;s<e.tableData.length;s++)e.tableData[s].id==t.id&&(e.total_pages4=0,e.getActive(),e.$message({type:"success",message:"删除成功!"}))})}).catch(function(){e.$message({type:"info",message:"已取消删除"})})},addBanner:function(){this.$router.push("/shop_tpl_active")},xianshiC:function(t,e,i){2==i?this.content.list[t].floor_data[e].type=17:1==i&&(this.content.list[t].floor_data[e].type="")},chooseMukuai:function(t,e){for(var i=[{type:2,typeN:2,title:"",content:"",isBlock:0,isprogress:!0,hasprogress:1,hasfloor_data:!0,goods_list:[],floor_data:[],hasimage_data:!1,image_data:[]},{type:3,typeN:3,title:"",content:"",isBlock:0,isprogress:!1,hasprogress:0,hasfloor_data:!0,goods_list:[],floor_data:[],hasimage_data:!1,image_data:[]},{type:4,typeN:4,title:"",content:"",isBlock:0,isprogress:!1,hasprogress:0,hasfloor_data:!1,goods_list:[],floor_data:[],hasimage_data:!0,image_data:[{img_url:"",type:"",param:"",img_width:0,img_height:0,good_info:{title:""}}]},{type:5,typeN:5,title:"",content:"",isBlock:1,isprogress:!1,hasprogress:0,hasfloor_data:!1,goods_list:[],floor_data:[],hasimage_data:!0,image_data:[{img_url:"",type:"",param:"",img_width:0,img_height:0,good_info:{title:""}}]},{type:6,typeN:3,title:"",content:"",isBlock:1,isprogress:!1,hasprogress:0,hasfloor_data:!0,goods_list:[],floor_data:[],hasimage_data:!1,image_data:[]},{type:7,typeN:4,title:"",content:"",isBlock:1,isprogress:!1,hasprogress:0,hasfloor_data:!1,goods_list:[],floor_data:[],hasimage_data:!0,image_data:[{img_url:"",type:"",param:"",img_width:0,img_height:0,good_info:{title:""}}]}],s=0;s<i.length;s++)i[s].type==e&&this.content.list[t].moduleList.push(i[s]);this.content.list[t].listNums=""},chooseMukuai1:function(t,e){console.log(t,e);for(var i=[{type:1,goods_list:[],image_data:[{img_url:"",type:"",param:"",img_width:0,img_height:0,good_info:{title:""}}],floor_data:[]},{type:2,goods_list:[],image_data:[{img_url:"",type:"",param:"",img_width:0,img_height:0,good_info:{title:""}}],floor_data:[]},{type:3,goods_list:[],image_data:[{img_url:"",type:"",param:"",img_width:0,img_height:0,good_info:{title:""}}],floor_data:[]}],s=0;s<i.length;s++)i[s].type==e&&this.content.list[t].moduleList.push(i[s]);this.content.list[t].listNums=""},chooseMukuaifl:function(t){this.content.list[t].moduleList.push({title:"",param:""})},deletaMokuia:function(t,e){this.content.list[t].moduleList.splice(e,1)},addTab:function(t){this.content.list[t].moduleList.push({title:"",content:"",floor_data:[],goods_list:[]})},closePanel:function(t){t.active=!1},closePanel1:function(){this.isSetBg=!1},setNums:function(t,e){},getHots:function(){var t=this;Object(o.a)({method:"post",url:"/item/me-item-api/index",data:{start_page:0,pages:20,item_type:0,is_hot:1}}).then(function(e){t.hot_goods=e.data.data.list,e.data.data.list&&e.data.data.list.length>0&&(t.hot_goods_num=e.data.data.list.length)})},getNews:function(){var t=this;Object(o.a)({method:"post",url:"/item/me-item-api/index",data:{start_page:0,pages:20,item_type:0,is_new:1}}).then(function(e){t.tj_goods=e.data.data.list,e.data.data.list&&e.data.data.list.length>0&&(t.tj_goods_num=e.data.data.list.length)})},getActive:function(){var t=this;console.log(t.id),Object(o.a)({method:"post",url:"/item/item-details-activity-list/get-all-activity-list",data:{start_page:t.start_page4,pages:10}}).then(function(e){0==e.data.errcode&&(t.total_pages4=parseInt(e.data.data.total_pages),t.tableData=e.data.data.list)})},getTJShops:function(){var t=this;Object(o.a)({method:"post",url:"/shop/shop-api/index",data:{start_page:0,pages:20,is_recommend:1}}).then(function(e){t.tj_shops=e.data.data.list,e.data.data.list&&e.data.data.list.length>0&&(t.tj_shop_num=e.data.data.list.length)})},updateList:function(t){console.log(t)},selectItem:function(t,e,i){console.log(147,t,e,i),"1"===t||"2"===t?(this.select_type=t,this.select_index=e,this.select_index1=i,this.dialogTableVisible=!0,this.getGift()):"3"===t?(this.select_type=t,this.select_index=e,this.select_index1=i,this.dialogTable1Visible=!0,this.getShops()):"15"===t?(this.select_type=t,this.select_index=e,this.select_index1=i,this.dialogTableVisible2=!0,this.getGift()):"9"===t?(this.select_type=t,this.select_index=e,this.select_index1=i,this.dialogTableVisible3=!0,this.getfloor()):"无"===t&&(this.select_type=t,this.select_index=e,this.select_index1=i,this.dialogTableVisible4=!0,this.getfloor())},selectItem1:function(t,e,i,s){"1"===t||"2"===t?(this.select_type=t,this.select_index=e,this.select_index1=i,this.select_index2=s,this.dialogTableVisible=!0,this.getGift()):"3"===t?(this.select_type=t,this.select_index=e,this.select_index1=i,this.select_index2=s,this.dialogTable1Visible=!0,this.getShops()):"9"===t&&(this.select_type=t,this.select_index=e,this.select_index1=i,this.select_index2=s,this.dialogTableVisible3=!0,this.getfloor())},selectItem2:function(t,e,i,s){console.log(147,t,e,i,s),"1"===t||"2"===t?(this.select_type=t,this.select_spindex=e,this.select_spindex1=i,this.select_spindex2=s,this.dialogTableVisible=!0,this.getGift()):"3"===t?(this.select_type=t,this.select_spindex=e,this.select_spindex1=i,this.select_spindex2=s,this.dialogTable1Visible=!0,this.getShops()):"9"===t&&(this.select_type=t,this.select_spindex=e,this.select_spindex1=i,this.select_spindex2=s,this.dialogTableVisible3=!0,this.getfloor())},changeItem:function(t,e,i){this.content.list[t].moduleList[e].image_data[i].param="",this.content.list[t].moduleList[e].image_data[i].title="",this.content.list[t].moduleList[e].image_data[i].good_info={title:""}},changeItem1:function(t,e){console.log(t,e),this.content.list[t].floor_data[e].param="",this.content.list[t].floor_data[e].good_info={title:""},this.content.list[t].floor_data[e].title="",this.content.list[t].goods_list=[]},goBack:function(){this.$router.go(-1)},setIndex:function(t,e){this.active_index1=t,this.active_index2=e},setIndex1:function(t){this.bgurl_index=t},setIndex2:function(t,e,i){this.ggImage_url=t,this.image_url_index=e,this.ggImage_url_index=i},handleAvatarSuccess:function(t,e){var i=this,s=new Image;s.src=t.data.url,s.onload=function(){i.content.list[i.active_index1].floor_data[i.active_index2].img_width=s.width,i.content.list[i.active_index1].floor_data[i.active_index2].img_height=s.height},i.content.list[i.active_index1].floor_data[i.active_index2].img_url=t.data.url},handleBgurlSuccess:function(t,e){var i=this,s=new Image;s.src=t.data.url,s.onload=function(){i.content.list[i.bgurl_index].img_width=s.width,i.content.list[i.bgurl_index].img_height=s.height},i.content.list[i.bgurl_index].bgurl=t.data.url},handleGgSuccess:function(t,e){var i=this,s=new Image;s.src=t.data.url,s.onload=function(){i.content.list[i.ggImage_url].moduleList[i.image_url_index].image_data[i.ggImage_url_index].img_width=s.width,i.content.list[i.ggImage_url].moduleList[i.image_url_index].image_data[i.ggImage_url_index].img_height=s.height},i.content.list[i.ggImage_url].moduleList[i.image_url_index].image_data[i.ggImage_url_index].img_url=t.data.url},handleGgtpSuccess:function(t,e){var i=this,s=new Image;s.src=t.data.url,s.onload=function(){i.content.list[i.ggImage_url].moduleList[i.image_url_index].floor_data[i.ggImage_url_index].img_width=s.width,i.content.list[i.ggImage_url].moduleList[i.image_url_index].floor_data[i.ggImage_url_index].img_height=s.height},i.content.list[i.ggImage_url].moduleList[i.image_url_index].floor_data[i.ggImage_url_index].img_url=t.data.url},handleAvatarSuccessBg:function(t,e){this.content.bg_img=t.data.url},clearBgImg:function(){this.content.bg_img=""},clearBgImg1:function(t){console.log(t),this.content.list[t].bgcolor="",this.content.list[t].bgurl=""},beforeAvatarUpload:function(t){var e=t.size/1024/1024<3,i="image/webp"===t.type;return e||this.$message.error("上传图片大小不能超过 3MB!"),i&&this.$message.error("上传图片不能是webp格式!"),e&&!i},openThisFloor:function(t){for(var e=0;e<this.content.list.length;e++)this.content.list[e].active=!1;this.content.list[t].active=!0},setBgcolor:function(){for(var t=0;t<this.content.list.length;t++)this.content.list[t].active=!1;this.isSetBg=!0},addTpl:function(t){var e=this;this.isSetBg=!1;for(var i=0;i<e.content.list.length;i++)e.content.list[i].active=!1;var s={title:"",active:!1,type:"",remarks:"",sort:"",isShow:0,shops_list:[],bgurl:"",img_width:0,img_height:0,goods_list:[],floor_data:[{good_info:{title:""},title:"设置标题",img_url:"",img_width:0,img_height:0,type:"",param:"",imgtit:""}]};10===t&&(s.type="10",s.floor_data=[],s.moduleList=[{type:1,goods_list:[],image_data:[{img_url:"",type:"",param:"",img_width:0,img_height:0,good_info:{title:""}}],floor_data:[]}]),e.content.list.push(s),setTimeout(function(){e.content.list[e.content.list.length-1].active=!0;var t=document.body.scrollHeight-1400;window.scrollTo(0,t)},300)},delTpl:function(t){this.content.list.splice(t,1)},delImg:function(t,e){this.content.list[t].goods_list.splice(e,1)},delImg1:function(t,e,i){this.content.list[t].moduleList[e].floor_data.splice(i,1),this.content.list[t].moduleList[e].goods_list=[];for(var s=0;s<this.content.list[t].moduleList[e].floor_data.length;s++)this.content.list[t].moduleList[e].goods_list.push(this.content.list[t].moduleList[e].floor_data[s].good_info.item_id)},delImg2:function(t,e,i){this.content.list[t].moduleList[e].image_data.splice(i,1),this.content.list[t].moduleList[e].goods_list=[];for(var s=0;s<this.content.list[t].moduleList[e].image_data.length;s++)this.content.list[t].moduleList[e].goods_list.push(this.content.list[t].moduleList[e].image_data[s].good_info.item_id)},addImg:function(t,e){if(10!=e&&17!=e&&19!=e){this.content.list[t].floor_data.push({good_info:{title:""},title:"设置标题",img_url:"",img_width:0,img_height:0,type:"",param:""})}else this.theIndex=t,this.theIndex1="",this.dialogTableVisible4=!0,this.getAllGoods()},addImg1:function(t,e,i){if(3!=i&&19!=i&&22!=i){this.content.list[t].moduleList[e].floor_data.push({good_info:{title:""},title:"设置标题",img_url:"",img_width:0,img_height:0,type:"",param:""})}else this.theIndex=t,this.theIndex1=e,this.dialogTableVisible4=!0,this.getAllGoods()},addImg2:function(t,e,i){this.content.list[t].moduleList[e].image_data.push({good_info:{title:""},img_url:"",img_width:0,img_height:0,type:"",param:""})},allSelectOne:function(t){console.log(t),this.Allclass2=[],this.inpclass2="",this.all_mcid="";var e=this;Object(o.a)({method:"post",url:"/item/me-category-api/get-category-list",data:{shop_id:e.tplInfo.shop_id,pid:t}}).then(function(t){e.Allclass2=t.data.data}).catch(function(t){console.log(t)})},addCory:function(t,e){this.cory_index=t,this.cory_index1=e,this.iscoryShow=!0,this.select_type="2",this.dialogTableVisible=!0},delClassItem:function(t,e){this.content.list[t].moduleList.splice(e,1)},allSelectTwo:function(t){console.log(t),this.inpMcid=t},AllResat:function(){this.all_keyWord="",this.inpclass1="",this.inpclass2="",this.all_mcid="",this.inpItemId=""},AllSearch:function(){console.log(this.inpItemId),console.log(this.all_keyWord),console.log(this.all_mcid),this.all_start=0,this.all_total=null,this.all_showList=[],this.getAllGoods()},getAllGoods:function(){var t=this;Object(o.a)({method:"post",url:"/item/me-item-api/index",data:{start_page:t.all_start,pages:5,shop_id:0==t.tplInfo.shop_id?"":t.tplInfo.shop_id,key_word:t.all_keyWord,mcid:t.all_mcid,item_ids:1*t.inpItemId?[t.inpItemId]:""}}).then(function(e){t.all_total=parseInt(e.data.data.total_pages),t.all_showList=e.data.data.list,setTimeout(function(){t.markItem()},150)}).catch(function(t){console.log(t)})},handleCurrentChange4:function(t){this.all_start=t-1,this.getAllGoods()},AllsureSelect:function(t){this.all_dataList.push(t),this.all_idList.push(t.item_id),this.markItem()},AllsureDelete:function(t){var e=this;this.all_showList.forEach(function(i,s,l){t.item_id==i.item_id&&e.$set(e.all_showList[s],"select",0)});var i=[],s=[];this.all_idList.forEach(function(e,s,l){e!=t.item_id&&i.push(e)}),this.all_dataList.forEach(function(e,i,l){e.item_id!=t.item_id&&s.push(e)}),this.all_idList=i,this.all_dataList=s,""===e.theIndex1?e.content.list[e.theIndex].floor_data.forEach(function(i,s,l){i.param==t.item_id&&e.content.list[e.theIndex].floor_data.splice(s,1)}):e.content.list[e.theIndex].moduleList[e.theIndex1].floor_data.forEach(function(i,s,l){i.param==t.item_id&&e.content.list[e.theIndex].moduleList[e.theIndex1].floor_data.splice(s,1)}),this.markItem()},markItem:function(){var t=this;t.content.list[0].goods_list.length>0&&t.content.list[0].goods_list.forEach(function(e,i,s){t.all_showList.forEach(function(i,s,l){e==i.item_id&&t.$set(t.all_showList[s],"select",1)})}),this.all_idList.forEach(function(e,i,s){t.all_showList.forEach(function(i,s,l){e==i.item_id&&t.$set(t.all_showList[s],"select",1)})}),console.log(111,t.theIndex1),""===t.theIndex1?t.content.list[t.theIndex].floor_data.forEach(function(e,i,s){t.all_showList.forEach(function(i,s,l){e.param==i.item_id&&t.$set(t.all_showList[s],"select",1)})}):t.content.list[t.theIndex].moduleList[t.theIndex1].floor_data.forEach(function(e,i,s){t.all_showList.forEach(function(i,s,l){e.param==i.item_id&&t.$set(t.all_showList[s],"select",1)})})},SaveAllGoods:function(){var t=this,e=[],i={good_info:{title:""},title:"设置标题",img_url:"",img_width:0,img_height:0,type:"无",param:"",imgtit:""};if(t.all_dataList.forEach(function(t,s,o){var a=l()(i),n=JSON.parse(a);e.push(n)}),console.log("空数据的",e),t.all_dataList.forEach(function(t,i,s){e[i].param=t.item_id,e[i].good_info=t}),console.log("有数据的",e),console.log("老数组",t.content.list[t.theIndex].floor_data),console.log(222,t.theIndex1),""===t.theIndex1){e.forEach(function(e,i,s){t.content.list[t.theIndex].floor_data.push(e)}),console.log("保存拼接后的",t.content.list[t.theIndex].floor_data);for(var s=0;s<e.length;s++)t.content.list[t.theIndex].goods_list.push(e[s].good_info.item_id)}else{console.log(2),e.forEach(function(e,i,s){t.content.list[t.theIndex].moduleList[t.theIndex1].floor_data.push(e)});for(var o=0;o<e.length;o++)t.content.list[t.theIndex].moduleList[t.theIndex1].goods_list.push(e[o].good_info.item_id)}t.all_start=0,t.theIndex="",t.all_total=null,t.all_mcid="",t.all_keyWord="",t.all_showList=[],t.all_dataList=[],t.all_idList=[],t.dialogTableVisible4=!1},downImg:function(t,e){if(e!==this.content.list[t].floor_data.length-1){var i=this.content.list[t].floor_data[e],s=this.content.list[t].floor_data[e+1];this.$set(this.content.list[t].floor_data,e,s),this.$set(this.content.list[t].floor_data,e+1,i);var l=this.content.list[t].goods_list[e],o=this.content.list[t].goods_list[e+1];this.$set(this.content.list[t].goods_list,e,o),this.$set(this.content.list[t].goods_list,e+1,l)}},downImg1:function(t,e,i){if(i!==this.content.list[t].moduleList[e].floor_data.length-1){var s=this.content.list[t].moduleList[e].floor_data[i],l=this.content.list[t].moduleList[e].floor_data[i+1];this.$set(this.content.list[t].moduleList[e].floor_data,i,l),this.$set(this.content.list[t].moduleList[e].floor_data,i+1,s);var o=this.content.list[t].moduleList[e].goods_list[i],a=this.content.list[t].moduleList[e].goods_list[i+1];this.$set(this.content.list[t].moduleList[e].goods_list,i,a),this.$set(this.content.list[t].moduleList[e].goods_list,i+1,o)}},downImg2:function(t,e,i){if(i!==this.content.list[t].moduleList[e].image_data.length-1){var s=this.content.list[t].moduleList[e].image_data[i],l=this.content.list[t].moduleList[e].image_data[i+1];this.$set(this.content.list[t].moduleList[e].image_data,i,l),this.$set(this.content.list[t].moduleList[e].image_data,i+1,s);var o=this.content.list[t].moduleList[e].goods_list[i],a=this.content.list[t].moduleList[e].goods_list[i+1];this.$set(this.content.list[t].moduleList[e].goods_list,i,a),this.$set(this.content.list[t].moduleList[e].goods_list,i+1,o)}},setTime:function(t,e){var i=this.getNowDate();this.content.list[t].floor_data[e].time=i},getNowDate:function(){var t=new Date,e=t.getMonth()+1,i=t.getDate();return e>=1&&e<=9&&(e="0"+e),i>=0&&i<=9&&(i="0"+i),e+"-"+i},upImg:function(t,e){if(0!==e){var i=this.content.list[t].floor_data[e],s=this.content.list[t].floor_data[e-1];this.$set(this.content.list[t].floor_data,e,s),this.$set(this.content.list[t].floor_data,e-1,i);var l=this.content.list[t].goods_list[e],o=this.content.list[t].goods_list[e-1];this.$set(this.content.list[t].goods_list,e,o),this.$set(this.content.list[t].goods_list,e-1,l)}},upImg1:function(t,e,i){if(0!==i){var s=this.content.list[t].moduleList[e].floor_data[i],l=this.content.list[t].moduleList[e].floor_data[i-1];this.$set(this.content.list[t].moduleList[e].floor_data,i,l),this.$set(this.content.list[t].moduleList[e].floor_data,i-1,s);var o=this.content.list[t].moduleList[e].goods_list[i],a=this.content.list[t].moduleList[e].goods_list[i-1];this.$set(this.content.list[t].moduleList[e].goods_list,i,a),this.$set(this.content.list[t].moduleList[e].goods_list,i-1,o)}},upImg2:function(t,e,i){if(0!==i){var s=this.content.list[t].moduleList[e].image_data[i],l=this.content.list[t].moduleList[e].image_data[i-1];this.$set(this.content.list[t].moduleList[e].image_data,i,l),this.$set(this.content.list[t].moduleList[e].image_data,i-1,s);var o=this.content.list[t].moduleList[e].goods_list[i],a=this.content.list[t].moduleList[e].goods_list[i-1];this.$set(this.content.list[t].moduleList[e].goods_list,i,a),this.$set(this.content.list[t].moduleList[e].goods_list,i-1,o)}},getTplInfo:function(){var t=this;Object(o.a)({method:"post",url:"/floor/floor-api/get-floor",data:{floor_id:t.floor_id}}).then(function(e){t.tplInfo.title=e.data.data.title,t.tplInfo.abstract=e.data.data.abstract,t.tplInfo.content=e.data.data.content,t.tplInfo.floor_id=e.data.data.id;var i=JSON.parse(e.data.data.content);if(i.list){for(var s=0;s<i.list.length;s++)i.list[s].active=!1;t.content=i}}).catch(function(t){console.log(t)})},saveTplInfo:function(){for(var t=this,e=JSON.parse(l()(t.content)),i=0;i<e.list.length;i++){if(e.list[i].floor_data)for(var s=0;s<e.list[i].floor_data.length;s++)e.list[i].floor_data[s].good_info&&(e.list[i].floor_data[s].good_info={title:e.list[i].floor_data[s].good_info.title,img_url:e.list[i].floor_data[s].good_info.img_url,item_id:e.list[i].floor_data[s].good_info.item_id,price:e.list[i].floor_data[s].good_info.price,shop_id:e.list[i].floor_data[s].good_info.shop_id});if(e.list[i].moduleList)for(var a=0;a<e.list[i].moduleList.length;a++){if(e.list[i].moduleList[a].image_data)for(var n=0;n<e.list[i].moduleList[a].image_data.length;n++)e.list[i].moduleList[a].image_data[n].good_info={title:e.list[i].moduleList[a].image_data[n].good_info.title,img_url:e.list[i].moduleList[a].image_data[n].good_info.img_url,item_id:e.list[i].moduleList[a].image_data[n].good_info.item_id,price:e.list[i].moduleList[a].image_data[n].good_info.price,shop_id:e.list[i].moduleList[a].image_data[n].good_info.shop_id};if(e.list[i].moduleList[a].floor_data)for(var d=0;d<e.list[i].moduleList[a].floor_data.length;d++)e.list[i].moduleList[a].floor_data[d].good_info={title:e.list[i].moduleList[a].floor_data[d].good_info.title,img_url:e.list[i].moduleList[a].floor_data[d].good_info.img_url,item_id:e.list[i].moduleList[a].floor_data[d].good_info.item_id,price:e.list[i].moduleList[a].floor_data[d].good_info.price,shop_id:e.list[i].moduleList[a].floor_data[d].good_info.shop_id}}}t.tplInfo.content=l()(e);var c=e.list[0].goods_list.join(",");t.tplInfo.content?Object(o.a)({method:"post",url:"/item/item-details-activity-list/save-activity-list",data:{id:t.id,banner_img:e.list[0].bgurl,activity_name:e.list[0].title,activity_remark:e.list[0].remarks,activity_goods:c,jump_type:e.list[0].type,jump_value:e.list[0].moduleList[0].image_data[0].param,is_show:e.list[0].isShow,sort:e.list[0].sort}}).then(function(e){t.$message({message:"保存成功！",type:"success"})}).catch(function(t){console.log(t)}):t.$message({type:"info",message:"数据不能为空，会刷新页面重试!"})},getClass1:function(){var t=this;Object(o.a)({method:"post",url:"/item/me-category-api/index",data:{shop_id:0}}).then(function(e){t.class1=e.data.data.list,t.classList=e.data.data.list,e.data.data.list.length>0&&(t.class1_act=e.data.data.list[0].mcid),t.class2=[],t.getClass2()}).catch(function(t){console.log(t)})},selectClass1:function(t){this.class1_act=t.mcid,this.class2=[],this.goods=[],this.getClass2()},getClass2:function(){var t=this;Object(o.a)({method:"post",url:"/item/me-category-api/get-category-list",data:{shop_id:t.tplInfo.shop_id,pid:t.class1_act}}).then(function(e){t.class2=e.data.data,t.class2_act=e.data.data[0].mcid,t.getGoods()}).catch(function(t){console.log(t)})},selectClass2:function(t){this.start_page1=0,this.key_word1="","1"===this.select_type?(this.class2_act=t.mcid,this.goods=[],this.getGoods()):"2"===this.select_type&&(this.iscoryShow?(this.content.list[this.cory_index].moduleList[this.cory_index1].param=t.mcid,this.iscoryShow=!1,this.cory_index="",this.cory_index1="",this.select_type=1):(console.log(888,this.select_type),""===this.select_index2&&""===this.select_spindex2?(this.content.list[this.select_index].floor_data[this.select_index1].param=t.mcid,this.content.list[this.select_index].floor_data[this.select_index1].title=t.name):""===this.select_spindex2?(this.content.list[this.select_index].moduleList[this.select_index1].image_data[this.select_index2].param=t.mcid,this.content.list[this.select_index].moduleList[this.select_index1].image_data[this.select_index2].title=t.name):(this.content.list[this.select_spindex].moduleList[this.select_spindex1].floor_data[this.select_spindex2].param=t.mcid,this.content.list[this.select_spindex].moduleList[this.select_spindex1].floor_data[this.select_spindex2].title=t.name)),this.select_index2="",this.select_spindex2="",this.dialogTableVisible=!1)},getGoods:function(){var t=this;Object(o.a)({method:"post",url:"/item/me-item-api/index",data:{start_page:t.start_page1,pages:5,shop_id:t.tplInfo.shop_id,key_word:t.key_word1,mcid:t.class2_act}}).then(function(e){t.total_pages1=parseInt(e.data.data.total_pages),t.goods=e.data.data.list}).catch(function(t){console.log(t)})},sureSelect:function(t){if(""===this.select_index2&&""===this.select_spindex2){this.content.list[this.select_index].floor_data[this.select_index1].param=t.item_id,this.content.list[this.select_index].floor_data[this.select_index1].good_info=t,this.content.list[this.select_index].goods_list=[];for(var e=0;e<this.content.list[this.select_index].floor_data.length;e++)this.content.list[this.select_index].goods_list.push(this.content.list[this.select_index].floor_data[e].good_info.item_id)}else if(""===this.select_spindex2){this.content.list[this.select_index].moduleList[this.select_index1].image_data[this.select_index2].param=t.item_id,this.content.list[this.select_index].moduleList[this.select_index1].image_data[this.select_index2].good_info=t,this.content.list[this.select_index].moduleList[this.select_index1].goods_list=[];for(var i=0;i<this.content.list[this.select_index].moduleList[this.select_index1].image_data.length;i++)this.content.list[this.select_index].moduleList[this.select_index1].goods_list.push(this.content.list[this.select_index].moduleList[this.select_index1].image_data[i].good_info.item_id)}else{this.content.list[this.select_spindex].moduleList[this.select_spindex1].floor_data[this.select_spindex2].param=t.item_id,this.content.list[this.select_spindex].moduleList[this.select_spindex1].floor_data[this.select_spindex2].good_info=t,this.content.list[this.select_spindex].moduleList[this.select_spindex1].goods_list=[];for(var s=0;s<this.content.list[this.select_spindex].moduleList[this.select_spindex1].floor_data.length;s++)this.content.list[this.select_spindex].moduleList[this.select_spindex1].goods_list.push(this.content.list[this.select_spindex].moduleList[this.select_spindex1].floor_data[s].good_info.item_id)}this.select_index2="",this.select_spindex2="",this.dialogTableVisible=!1},sureSelectGift2:function(t){this.content.list[this.select_index].floor_data[this.select_index1].param=t.item_id,this.content.list[this.select_index].floor_data[this.select_index1].good_info=t,this.content.list[this.select_index].goods_list=[];for(var e=0;e<this.content.list[this.select_index].floor_data.length;e++)this.content.list[this.select_index].goods_list.push(this.content.list[this.select_index].floor_data[e].good_info.item_id);this.dialogTableVisible=!1},handleCurrentChange1:function(t){this.start_page1=t-1,this.getGoods()},getShops:function(){var t=this;Object(o.a)({method:"post",url:"/shop/shop-api/index",data:{start_page:t.start_page2,pages:6,key_word:t.key_word2}}).then(function(e){t.total_pages2=parseInt(e.data.data.total_pages),t.shops=e.data.data.list,console.log(111,t.shops)}).catch(function(t){console.log(t)})},sureSelectShop:function(t){""===this.select_index2&&""===this.select_spindex2?this.content.list[this.select_index].floor_data[this.select_index1].param=t.id:(console.log(123,t),""===this.select_spindex2?(this.content.list[this.select_index].moduleList[this.select_index1].image_data[this.select_index2].param=t.id,this.content.list[this.select_index].moduleList[this.select_index1].image_data[this.select_index2].name=t.name,this.content.list[this.select_index].moduleList[this.select_index1].image_data[this.select_index2].total_level=t.total_level):(this.content.list[this.select_spindex].moduleList[this.select_spindex1].floor_data[this.select_spindex2].param=t.id,this.content.list[this.select_spindex].moduleList[this.select_spindex1].floor_data[this.select_spindex2].name=t.name,this.content.list[this.select_spindex].moduleList[this.select_spindex1].floor_data[this.select_spindex2].total_level=t.total_level)),this.select_index2="",this.select_spindex2="",this.dialogTable1Visible=!1},handleCurrentChange2:function(t){this.start_page2=t-1,this.getShops()},getGift:function(){var t=this;Object(o.a)({method:"post",url:"/item/me-item-api/index",data:{token:"",start_page:t.start_page3,pages:6,item_type:4}}).then(function(e){t.total_pages3=parseInt(e.data.data.total_pages),t.gifts=e.data.data.list}).catch(function(t){console.log(t)})},sureSelectGift:function(t){console.log(777777,t);this.content.list[this.select_index].floor_data[this.select_index1].param=t.item_id,this.content.list[this.select_index].floor_data[this.select_index1].good_info=t,this.dialogTableVisible2=!1},handleCurrentChange3:function(t){this.start_page3=t-1,this.getGift()},handleCurrentChange6:function(t){this.start_page4=t-1,this.getActive()},getfloor:function(){var t=this;Object(o.a)({method:"post",url:"/floor/floor-api/get-use-position-list",data:{shop_id:t.tplInfo.shop_id}}).then(function(e){t.floors=e.data.data,console.log("floors",t.floors)}).catch(function(t){console.log(t)})},sureSelectfloor:function(t){""===this.select_index2&&""===this.select_spindex2?this.content.list[this.select_index].floor_data[this.select_index1].param=t.position_code:""===this.select_spindex2?this.content.list[this.select_index].moduleList[this.select_index1].image_data[this.select_index2].param=t.position_code:this.content.list[this.select_spindex].moduleList[this.select_spindex1].floor_data[this.select_spindex2].param=t.position_code,this.select_index2="",this.select_spindex2="",this.dialogTableVisible3=!1}}},c=(i("v2U3"),i("KHd+")),h=Object(c.a)(d,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"index-tpl1"},[i("div",{staticClass:"tpl-column1"},[i("draggable",{staticClass:"tpl-column-content",attrs:{list:t.content.list,options:t.options,"on-update":t.updateList}},t._l(t.content.list,function(e,s){return i("div",{key:s,staticClass:"tpl-item"},[i("div",{staticStyle:{margin:"20px"}},[i("el-popover",{attrs:{placement:"right",width:"100%",trigger:"manual"},model:{value:e.active,callback:function(i){t.$set(e,"active",i)},expression:"item.active"}},[i("div",{staticClass:"edit-panel1"},[i("div",{staticClass:"one-row1"},[i("div",{staticClass:"one-roe-title"},[t._v("banner管理")]),t._v(" "),i("div",[i("el-button",{attrs:{type:"success",size:"mini"},on:{click:t.addBanner}},[t._v("新增banner")])],1),t._v(" "),i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData}},[i("el-table-column",{attrs:{label:"活动id",width:"70",prop:"id"}}),t._v(" "),i("el-table-column",{attrs:{label:"展示图片",align:"left"},scopedSlots:t._u([{key:"default",fn:function(t){return[i("img",{staticStyle:{"object-fit":"contain"},attrs:{src:t.row.banner_img,width:"120",height:"60"}})]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"名称",prop:"activity_name"}}),t._v(" "),i("el-table-column",{attrs:{label:"备注",prop:"activity_remark"}}),t._v(" "),i("el-table-column",{attrs:{label:"跳转方式"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",[t._v(t._s(8==e.row.jump_type?"外链":9==e.row.jump_type?"装修页":"-"))])]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"跳转参数",prop:"jump_value"}}),t._v(" "),i("el-table-column",{attrs:{label:"排序",prop:"sort"}}),t._v(" "),i("el-table-column",{attrs:{label:"显示状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("div",[t._v(t._s(0==e.row.is_show?"不显示":"显示"))])]}}])}),t._v(" "),i("el-table-column",{attrs:{align:"right",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{type:"text",icon:"el-icon-edit",size:"small"},on:{click:function(i){t.handleClick(e.row)}}},[t._v("编辑")]),t._v(" "),i("el-button",{attrs:{type:"text",size:"small",icon:"el-icon-delete"},on:{click:function(i){t.detectClick(e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),i("el-pagination",{staticStyle:{"margin-top":"20px","text-align":"center"},attrs:{"page-size":10,total:t.total_pages4,background:"",layout:"prev, pager, next"},on:{"current-change":t.handleCurrentChange6}})],1)])])])],1)])}))],1),t._v(" "),i("el-dialog",{attrs:{width:"700px",visible:t.dialogTableVisible,title:t.activeFlag?"选择活动商品":"选择普通商品"},on:{"update:visible":function(e){t.dialogTableVisible=e}}},[i("el-row",[i("el-col",{directives:[{name:"show",rawName:"v-show",value:!t.activeFlag,expression:"!activeFlag"}],attrs:{span:5}},[i("el-menu",{staticClass:"el-menu-vertical-demo",staticStyle:{"min-height":"400px"},attrs:{"default-active":"0"}},t._l(t.class1,function(e,s){return i("el-menu-item",{key:s,staticStyle:{padding:"0 5px",height:"42px","line-height":"42px"},attrs:{index:s+""},on:{click:function(i){t.selectClass1(e)}}},[i("i",{staticClass:"el-icon-caret-right"}),t._v(" "),i("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(e.name))])])}))],1),t._v(" "),i("el-col",{directives:[{name:"show",rawName:"v-show",value:!t.activeFlag,expression:"!activeFlag"}],staticStyle:{"min-height":"100px"},attrs:{span:5}},[t.class2.length>0?i("div",[i("el-menu",{staticClass:"el-menu-vertical-demo",staticStyle:{"min-height":"400px"},attrs:{"default-active":"0"}},t._l(t.class2,function(e,s){return i("el-menu-item",{key:s,staticStyle:{padding:"0 5px",height:"42px","line-height":"42px"},attrs:{index:s+""},on:{click:function(i){t.selectClass2(e)}}},[i("i",{staticClass:"el-icon-circle-check-outline"}),t._v(" "),i("span",{attrs:{slot:"title"},slot:"title"},[t._v(t._s(e.name))])])}))],1):t._e()]),t._v(" "),1==t.select_type?i("el-col",{directives:[{name:"show",rawName:"v-show",value:!t.activeFlag,expression:"!activeFlag"}],attrs:{span:14}},[i("div",{staticStyle:{padding:"5px 10px"}},[i("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入内容","prefix-icon":"el-icon-search",size:"mini"},model:{value:t.key_word1,callback:function(e){t.key_word1=e},expression:"key_word1"}},[i("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){t.getGoods()}},slot:"append"})],1)],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.goods}},[i("el-table-column",{attrs:{label:"商品名称",prop:"title"}}),t._v(" "),i("el-table-column",{attrs:{label:"备注",prop:"remark"}}),t._v(" "),i("el-table-column",{attrs:{align:"right",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(i){t.sureSelect(e.row)}}},[t._v("选择")])]}}])})],1),t._v(" "),i("el-pagination",{attrs:{"page-size":6,total:t.total_pages1,background:"",layout:"prev, pager, next"},on:{"current-change":t.handleCurrentChange1}})],1):t._e(),t._v(" "),i("el-table",{directives:[{name:"show",rawName:"v-show",value:t.activeFlag,expression:"activeFlag"}],staticStyle:{width:"100%"},attrs:{data:t.gifts}},[i("el-table-column",{attrs:{label:"礼包名称",prop:"title"}}),t._v(" "),i("el-table-column",{attrs:{label:"备注",prop:"remark"}}),t._v(" "),i("el-table-column",{attrs:{align:"right",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(i){t.sureSelectGift2(e.row)}}},[t._v("选择")])]}}])})],1),t._v(" "),i("el-pagination",{directives:[{name:"show",rawName:"v-show",value:t.activeFlag,expression:"activeFlag"}],attrs:{"page-size":6,total:t.total_pages3,background:"",layout:"prev, pager, next"},on:{"current-change":t.handleCurrentChange3}})],1)],1),t._v(" "),i("el-dialog",{attrs:{width:"700px",visible:t.dialogTable1Visible,title:"选择店铺"},on:{"update:visible":function(e){t.dialogTable1Visible=e}}},[i("div",{staticStyle:{padding:"5px 10px"}},[i("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入店铺名称","prefix-icon":"el-icon-search",size:"mini"},model:{value:t.key_word2,callback:function(e){t.key_word2=e},expression:"key_word2"}},[i("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){t.getShops()}},slot:"append"})],1)],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.shops}},[i("el-table-column",{attrs:{label:"店铺名称",prop:"name"}}),t._v(" "),i("el-table-column",{attrs:{label:"备注",prop:"remark"}}),t._v(" "),i("el-table-column",{attrs:{align:"right",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(i){t.sureSelectShop(e.row)}}},[t._v("选择")])]}}])})],1),t._v(" "),i("el-pagination",{attrs:{"page-size":6,total:t.total_pages2,background:"",layout:"prev, pager, next"},on:{"current-change":t.handleCurrentChange2}})],1),t._v(" "),i("el-dialog",{attrs:{width:"700px",visible:t.dialogTableVisible2,title:"选择礼包"},on:{"update:visible":function(e){t.dialogTableVisible2=e}}},[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.gifts}},[i("el-table-column",{attrs:{label:"礼包名称",prop:"title"}}),t._v(" "),i("el-table-column",{attrs:{label:"备注",prop:"remark"}}),t._v(" "),i("el-table-column",{attrs:{align:"right",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(i){t.sureSelectGift(e.row)}}},[t._v("选择")])]}}])})],1),t._v(" "),i("el-pagination",{attrs:{"page-size":6,total:t.total_pages3,background:"",layout:"prev, pager, next"},on:{"current-change":t.handleCurrentChange3}})],1),t._v(" "),i("el-dialog",{attrs:{width:"700px",visible:t.dialogTableVisible3,title:"选择装修页"},on:{"update:visible":function(e){t.dialogTableVisible3=e}}},[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.floors}},[i("el-table-column",{attrs:{label:"装修名称",prop:"name"}}),t._v(" "),i("el-table-column",{attrs:{label:"装修id",prop:"position_code"}}),t._v(" "),i("el-table-column",{attrs:{align:"right",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(i){t.sureSelectfloor(e.row)}}},[t._v("选择")])]}}])})],1)],1),t._v(" "),i("el-dialog",{attrs:{width:"700px",visible:t.dialogTableVisible4,title:"选择商品"},on:{"update:visible":function(e){t.dialogTableVisible4=e}}},[i("div",{staticStyle:{display:"flex",margin:"10px 0"}},[i("div",{staticStyle:{width:"150px"}},[i("el-input",{attrs:{placeholder:"请输入商品id"},model:{value:t.inpItemId,callback:function(e){t.inpItemId=e},expression:"inpItemId"}})],1),t._v("\n         \n      "),i("div",{staticStyle:{width:"150px"}},[i("el-input",{attrs:{placeholder:"请输入商品名称"},model:{value:t.all_keyWord,callback:function(e){t.all_keyWord=e},expression:"all_keyWord"}})],1),t._v("\n         \n      "),i("div",{staticStyle:{width:"150px"}},[i("el-select",{attrs:{placeholder:"一级分类"},on:{change:t.allSelectOne},model:{value:t.inpclass1,callback:function(e){t.inpclass1=e},expression:"inpclass1"}},t._l(t.class1,function(t){return i("el-option",{key:t.mcid,attrs:{label:t.name,value:t.mcid}})}))],1),t._v("\n         \n      "),i("div",{staticStyle:{width:"150px"}},[i("el-select",{attrs:{placeholder:"二级级分类"},on:{change:t.allSelectTwo},model:{value:t.all_mcid,callback:function(e){t.all_mcid=e},expression:"all_mcid"}},t._l(t.Allclass2,function(t){return i("el-option",{key:t.mcid,attrs:{label:t.name,value:t.mcid}})}))],1),t._v("\n         \n      "),i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(e){t.AllResat()}}},[t._v("复位")]),t._v("\n         \n      "),i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(e){t.AllSearch()}}},[t._v("搜索")])],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.all_showList}},[i("el-table-column",{attrs:{label:"商品id",width:"70",prop:"item_id"}}),t._v(" "),i("el-table-column",{attrs:{label:"首图",align:"left",width:"100"},scopedSlots:t._u([{key:"default",fn:function(t){return[i("img",{attrs:{src:t.row.img_url,width:"60",height:"60"}})]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"名称",prop:"title"}}),t._v(" "),i("el-table-column",{attrs:{align:"right",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[1!=e.row.select?i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(i){t.AllsureSelect(e.row)}}},[t._v("选择")]):t._e(),t._v(" "),1==e.row.select?i("el-button",{attrs:{size:"mini",type:"success"},on:{click:function(i){t.AllsureDelete(e.row)}}},[t._v("已选择")]):t._e()]}}])})],1),t._v(" "),i("div",{staticStyle:{margin:"10px 0",display:"flex",justifyContent:"space-between",padding:"0 10px"}},[i("el-pagination",{attrs:{"page-size":5,total:t.all_total,background:"",layout:"prev, pager, next"},on:{"current-change":t.handleCurrentChange4}}),t._v(" "),i("el-button",{attrs:{size:"mini",type:"warning"},on:{click:function(e){t.SaveAllGoods()}}},[t._v("保存")])],1)],1)],1)},[],!1,null,null,null);h.options.__file="activeList.vue";e.default=h.exports},"gDS+":function(t,e,i){t.exports={default:i("oh+g"),__esModule:!0}},myRR:function(t,e,i){},"oh+g":function(t,e,i){var s=i("WEpk"),l=s.JSON||(s.JSON={stringify:JSON.stringify});t.exports=function(t){return l.stringify.apply(l,arguments)}},v2U3:function(t,e,i){"use strict";var s=i("myRR");i.n(s).a}}]);