(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-76e92c67"],{"03ecd":function(t,e,a){t.exports=a.p+"system/img/mobilehead.1c931282.png"},"55dc":function(t,e,a){"use strict";a("758b")},"58b1":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUAAAAAyCAIAAACib5WDAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBXaW5kb3dzIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOjE1NEJCMUE0NzZGNDExRTVBOTBBQTZFOEFEMjc4NTkzIiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOjE1NEJCMUE1NzZGNDExRTVBOTBBQTZFOEFEMjc4NTkzIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTU0QkIxQTI3NkY0MTFFNUE5MEFBNkU4QUQyNzg1OTMiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MTU0QkIxQTM3NkY0MTFFNUE5MEFBNkU4QUQyNzg1OTMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz4yWLBJAAABuklEQVR42uzcu0ocURzA4XWxMIWiQhJwtVhxMW0wEkWj+AwWgm9gJfgggpVPoElEUwUCKRNFJaQWsygWXvAKXlBZGw8KIiIJmWFnGPg+pjiryMIffpxzRLemUqnkUlUul0ulUg74f3kjAAEDAgYEDAIGBAwIGBAwCBgQMCBgEHAMlZub8BglJK825s/vHxzOfl4Ii9GR4devXhooZGYHPjo+mfk0f3l5FZ6wCC8NFDKzA+fz+aHB/scvDRQyE3BzU2N4DBEyeYQGBAxU5wi9sbm1+ut3W2shznucnp296Sx1tBeNGxINeG39z+jIcPy3+Tj3RcCQ9BG6ob7+fjE5NR2eaOugtdBi1pD0Dvzg6vo68hpIOeAXdXWR10CV1Pz9c6F/LC4P9PfGf5ufSysf+nqe/ZbPhYZq3YGfiHD7BdI/Qrv9QuYDdvsFd2B3YEjjDgxk+Aidu/sd1T9vueEUPTE+ZrhgBwai7sA7u3tPvhJtaz0/vzBrSDrg7ndvv377/vAX0dFs7+y+7+4ya0g64I72ov8iAndgQMCAgEHAgIABAYOAAQEDAgYEDAIGBAwIGBAwCBhIy60AAwBiy5esmSYLKgAAAABJRU5ErkJggg=="},"758b":function(t,e,a){},a20a:function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"divBox"},[i("el-card",{staticClass:"box-card"},[i("el-row",{attrs:{gutter:30}},[i("el-col",t._b({staticClass:"left mb15 ml40"},"el-col",t.grid,!1),[i("div",[i("img",{staticClass:"top",attrs:{src:a("03ecd")}}),t._v(" "),i("img",{staticClass:"bottom",attrs:{src:a("58b1")}}),t._v(" "),i("div",{staticStyle:{background:"#F4F5F9","min-height":"438px",position:"absolute",top:"63px",width:"320px"}}),t._v(" "),i("div",{staticClass:"textbot"},[t._l(t.list,(function(e,a){return i("div",{key:a,staticClass:"li",class:{active:e===t.formValidate}},[i("div",[i("div",{staticClass:"add",on:{click:function(i){return t.add(e,a)}}},[i("i",{staticClass:"el-icon-plus"}),t._v(" "),i("div",{staticClass:"arrow"})]),t._v(" "),i("div",{staticClass:"tianjia"},t._l(e.sub_button,(function(e,s){return i("div",{key:s,staticClass:"addadd",class:{active:e===t.formValidate},on:{click:function(i){return t.gettem(e,s,a)}}},[t._v(t._s(e.name||"二级菜单"))])})),0)]),t._v(" "),i("div",{staticClass:"text",attrs:{title:e.name||"一级菜单"},on:{click:function(i){return t.gettem(e,a,null)}}},[t._v(t._s(e.name||"一级菜单"))])])})),t._v(" "),i("div",{directives:[{name:"show",rawName:"v-show",value:t.list.length<3,expression:"list.length < 3"}],staticClass:"li"},[i("div",{staticClass:"text",on:{click:t.addtext}},[i("i",{staticClass:"el-icon-plus"})])])],2)])]),t._v(" "),i("el-col",{attrs:{xl:11,lg:12,md:22,sm:22,xs:22}},[null!==t.checkedMenuId?i("div",[i("div",{staticClass:"dividerTitle acea-row row-between row-bottom"},[i("span",{staticClass:"title"},[t._v("菜单信息")]),t._v(" "),i("el-button",{attrs:{slot:"extra",size:"small",type:"danger"},on:{click:t.deltMenus},slot:"extra"},[t._v("删除")]),t._v(" "),i("el-divider")],1),t._v(" "),i("el-col",{staticClass:"userAlert",attrs:{span:24}},[i("div",{staticClass:"box-card right"},[i("el-alert",{staticClass:"mb15",attrs:{title:"已添加子菜单,仅可设置菜单名称",type:"success","show-icon":""}}),t._v(" "),i("el-form",{ref:"formValidate",staticClass:"mt20",attrs:{model:t.formValidate,rules:t.ruleValidate,"label-width":"100px"}},[i("el-form-item",{attrs:{label:"菜单名称",prop:"name"}},[i("el-input",{staticClass:"spwidth",attrs:{maxlength:"12",placeholder:"请填写菜单名称"},model:{value:t.formValidate.name,callback:function(e){t.$set(t.formValidate,"name",e)},expression:"formValidate.name"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"规则状态",prop:"type"}},[i("el-select",{staticClass:"spwidth",attrs:{placeholder:"请选择规则状态"},model:{value:t.formValidate.type,callback:function(e){t.$set(t.formValidate,"type",e)},expression:"formValidate.type"}},[i("el-option",{attrs:{value:"click",label:"关键字"}},[t._v("关键字")]),t._v(" "),i("el-option",{attrs:{value:"view",label:"跳转网页"}},[t._v("跳转网页")]),t._v(" "),i("el-option",{attrs:{value:"miniprogram",label:"小程序"}},[t._v("小程序")])],1)],1),t._v(" "),"click"===t.formValidate.type?i("div",[i("el-form-item",{attrs:{label:"关键字",prop:"key"}},[i("el-input",{staticClass:"spwidth",attrs:{placeholder:"请填写关键字"},model:{value:t.formValidate.key,callback:function(e){t.$set(t.formValidate,"key",e)},expression:"formValidate.key"}})],1)],1):t._e(),t._v(" "),"miniprogram"===t.formValidate.type?i("div",[i("el-form-item",{attrs:{label:"appid",prop:"appid"}},[i("el-input",{staticClass:"spwidth",attrs:{placeholder:"请填写appid"},model:{value:t.formValidate.appid,callback:function(e){t.$set(t.formValidate,"appid",e)},expression:"formValidate.appid"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"备用网页",prop:"url"}},[i("el-input",{staticClass:"spwidth",attrs:{placeholder:"请填写备用网页"},model:{value:t.formValidate.url,callback:function(e){t.$set(t.formValidate,"url",e)},expression:"formValidate.url"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"小程序路径",prop:"pagepath"}},[i("el-input",{staticClass:"spwidth",attrs:{placeholder:"请填写小程序路径"},model:{value:t.formValidate.pagepath,callback:function(e){t.$set(t.formValidate,"pagepath",e)},expression:"formValidate.pagepath"}})],1)],1):t._e(),t._v(" "),"view"===t.formValidate.type?i("div",[i("el-form-item",{attrs:{label:"跳转地址",prop:"url"}},[i("el-input",{staticClass:"spwidth",attrs:{placeholder:"请填写跳转地址"},model:{value:t.formValidate.url,callback:function(e){t.$set(t.formValidate,"url",e)},expression:"formValidate.url"}})],1)],1):t._e()],1)],1)])],1):t._e(),t._v(" "),t.isTrue?i("el-col",{attrs:{span:24}},[i("el-button",{staticStyle:{display:"block",margin:"10px auto"},attrs:{type:"primary"},on:{click:function(e){return t.submenus("formValidate")}}},[t._v("保存并发布")])],1):t._e()],1)],1)],1)],1)},s=[],l=(a("7f7f"),a("c80c")),r=(a("96cf"),a("3b8d")),n=a("b562"),c={name:"WechatMenus",data:function(){return{grid:{xl:8,lg:8,md:8,sm:8,xs:24},grid2:{xl:16,lg:16,md:16,sm:16,xs:24},modal2:!1,formValidate:{name:"",type:"click",appid:"",url:"",key:"",pagepath:"",id:0},ruleValidate:{name:[{required:!0,message:"请填写菜单名称",trigger:"blur"}],key:[{required:!0,message:"请填写关键字",trigger:"blur"}],appid:[{required:!0,message:"请填写appid",trigger:"blur"}],pagepath:[{required:!0,message:"请填写备用网页",trigger:"blur"}],url:[{required:!0,message:"请填写跳转地址",trigger:"blur"}],type:[{required:!0,message:"请选择规则状态",trigger:"change"}]},parentMenuId:null,list:[],checkedMenuId:null,isTrue:!1}},mounted:function(){if(this.getMenus(),!this.list.length)return this.formValidate;this.formValidate=this.list[this.activeClass]},methods:{defaultMenusData:function(){return{type:"click",name:"",sub_button:[]}},defaultChildData:function(){return{type:"click",name:""}},getMenus:function(){var t=this;Object(n["w"])().then(function(){var e=Object(r["a"])(Object(l["a"])().mark((function e(a){var i;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:i=a.data.wechat_menus,t.list=i;case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}))},submenus:function(t){var e=this;this.isTrue&&!this.checkedMenuId&&0!==this.checkedMenuId?this.putData():this.$refs[t].validate((function(t){if(t)e.putData();else if(!e.check())return!1}))},putData:function(){var t=this,e={button:this.list};Object(n["v"])(e).then(function(){var e=Object(r["a"])(Object(l["a"])().mark((function e(a){return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.$message.success(a.message),t.checkedMenuId=null,t.formValidate={},t.isTrue=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.$message.error(e.message)}))},gettem:function(t,e,a){this.checkedMenuId=e,this.formValidate=t||{},this.parentMenuId=a,this.isTrue=!0},add:function(t,e){if(!this.check())return!1;if(t.sub_button.length<5){var a=this.defaultChildData(),i=t.sub_button.length;t.sub_button.push(a),this.formValidate=a,this.checkedMenuId=i,this.parentMenuId=e,this.isTrue=!0}},addtext:function(){if(!this.check())return!1;var t=this.defaultMenusData(),e=this.list.length;this.list.push(t),this.formValidate=t,this.checkedMenuId=e,this.parentMenuId=null,this.isTrue=!0},check:function(){var t=/[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+\.?/;return null===this.checkedMenuId||(!this.isTrue||(this.formValidate.name?"click"!==this.formValidate.type||this.formValidate.key?"view"!==this.formValidate.type||t.test(this.formValidate.url)?!!("miniprogram"!==this.formValidate.type||this.formValidate.appid&&this.formValidate.pagepath&&this.formValidate.url)||(this.$message.warning("请填写完整小程序配置!"),!1):(this.$message.warning("请输入正确的跳转地址!"),!1):(this.$message.warning("请输入关键字!"),!1):(this.$message.warning("请输入按钮名称!"),!1)))},deltMenus:function(){var t=this;this.isTrue?this.$modalSure().then((function(){t.del()})):this.$message.warning("请选择菜单!")},del:function(){null===this.parentMenuId?this.list.splice(this.checkedMenuId,1):this.list[this.parentMenuId].sub_button.splice(this.checkedMenuId,1),this.parentMenuId=null,this.formValidate={name:"",type:"click",appid:"",url:"",key:"",pagepath:"",id:0},this.isTrue=!0,this.modal2=!1,this.checkedMenuId=null,this.$refs["formValidate"].resetFields()}}},d=c,u=(a("55dc"),a("2877")),o=Object(u["a"])(d,i,s,!1,null,"78971db7",null);e["default"]=o.exports}}]);