(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["admin/setting/wx-menu"],{"2bb4":function(t,e,n){"use strict";n.r(e);var i=n("52f0"),a=n("c75d");for(var o in a)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("573c");var r,s=n("0095"),u=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"d36b32b0",null,!1,i["a"],r);e["default"]=u.exports},"3b45":function(t,e,n){},"52f0":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}));var a=function(){var t=this,e=t.$createElement;t._self._c},o=[]},"573c":function(t,e,n){"use strict";var i=n("3b45"),a=n.n(i);a.a},6122:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("7736"),a=n("2342"),o=n("b26e");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){u(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function u(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var c=function(){n.e("components/plugin/modal").then(function(){return resolve(n("3a8f"))}.bind(null,n)).catch(n.oe)},l=function(){n.e("admin/home/components/module/operate-line").then(function(){return resolve(n("497e"))}.bind(null,n)).catch(n.oe)},f={name:"wx-menu-setting",components:{ModalModule:c,OperateLineModule:l},data:function(){return{constant:this.$constant,form:{name:"",menuOption:0,replyUrl:"",targetId:0},addModule:!1,operateShow:!1,activeIndex:null,subActiveIndex:null,menuData:[],urlIndex:null,commonUrlData:[],operateLeft:130,btnData:[],isModifyParents:!1}},computed:s({},(0,i.mapGetters)({userInfo:"getUser"})),onLoad:function(){},methods:{init:function(){this._getDet(),this._getUrl()},_getDet:function(){var t=this;(0,a.getMenu)().then((function(e){t.menuData=e.data}))},_getUrl:function(){var t=this;(0,o.commonUrl)().then((function(e){t.commonUrlData=e.data}))},submitFn:function(){var t=this;console.log(this.menuData),(0,a.updateMenu)(this.menuData).then((function(e){console.log(e),t.$msg(e.msg)}))},addMenuFn:function(){this.menuData.length>2&&this.$msg("主菜单最多只能三个！")},menuClickFn:function(t,e){var n=this;this.operateLeft=192*e+130,this.isModifyParents=!0,this.activeIndex=e,this.btnData=t.children||[],Object.keys(this.form).forEach((function(e){n.form[e]=t[e]})),this.operateShow=!0,this.addModule=!0},menuCancelFn:function(){this.operateShow=!1,this.menuClickFn=null},modalCancel:function(){this.addModule=!1,this.urlIndex=null,this.resetForm()},selUrlFn:function(t,e){this.form.targetId=t.id,this.urlIndex=e},resetForm:function(){this.form={name:"",menuOption:0,replyUrl:"",targetId:0}},radioChange:function(t){this.form.menuOption=t.detail.value},targetFn:function(){},modalClick:function(t){var e=this,n=t.index;if(0===n)this.modalCancel();else{var i=JSON.parse(JSON.stringify(this.form));0==i.menuOption?i.targetId="":i.replyUrl="",this.isModifyParents?Object.keys(i).forEach((function(t){e.menuData[e.activeIndex][t]=i[t]})):(this.btnData[this.subActiveIndex]=i,this.$set(this.btnData,this.subActiveIndex,i),console.log("江总555",this.btnData),console.log("江总666",this.activeIndex),this.$set(this.menuData[this.activeIndex],"children",JSON.parse(JSON.stringify(this.btnData))),console.log("江总777",this.menuData)),this.modalCancel()}},operateFn:function(t){var e=this;console.log("我点击了按钮！",t),this.isModifyParents=!1,this.subActiveIndex=t;var n=this.btnData[t];Object.keys(this.form).forEach((function(t){e.form[t]=n[t]})),this.addModule=!0},operateDelFn:function(t){this.isModifyParents=!1,console.log("我删除了！",t),this.btnData.splice(t,1),this.menuData[this.activeIndex].children=JSON.parse(JSON.stringify(this.btnData))},operateAddFn:function(){if(this.btnData&&this.btnData.length>4)return this.$msg("子菜单不能超过五个!"),!1;var t={name:"子菜单名",menuOption:0,replyUrl:"",targetId:0};this.btnData.push(t),this.$set(this.menuData[this.activeIndex],"children",JSON.parse(JSON.stringify(this.btnData)))}}};e.default=f},"79a9":function(t,e,n){"use strict";(function(t){n("6cdc");i(n("4a15"));var e=i(n("2bb4"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("f3be")["createPage"])},c75d:function(t,e,n){"use strict";n.r(e);var i=n("6122"),a=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a}},[["79a9","common/runtime","common/vendor"]]]);