chunk-6488bab6.5ada3892.js 9.0 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6488bab6","chunk-59c07794","chunk-2d230c38","chunk-2d22db4d"],{"231c":function(t,e,n){"use strict";n.r(e);n("7212");var a=function(){var t=this,e=t._self._c;return e("el-popover",{staticClass:"operate-module-line",attrs:{"popper-class":"liu-popover-line",placement:"top",width:"104",trigger:"manual"},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[e("div",{staticClass:"operate-wrap"},[t._l(t.data.children,(function(n,a){return e("div",{key:a,staticClass:"operate-list"},[e("i",{staticClass:"iconfont iconcaozuojihuo",on:{click:function(e){return e.stopPropagation(),t.listDel(a)}}}),e("div",{staticClass:"btn-text",on:{click:function(e){return t.listClick(n,a)}}},[t._v(t._s(n.name))])])})),e("div",{staticClass:"operate-list operate-list-add",on:{click:function(e){return t.addFn()}}},[e("i",{staticClass:"iconfont icontupiantianjia icon-add"})])],2),e("el-button",{staticClass:"operate-btn",attrs:{slot:"reference",type:"text",icon:"el-icon-s-fold"},slot:"reference"},[t._v(t._s(t.data.name))])],1)},i=[],o=n("ecc5"),s={name:"operate-module",data:function(){return{}},props:{show:{type:Boolean,default:!1},data:{type:Object,default:function(){}}},mounted:function(){},methods:{showFn:function(){this.$emit("show",this.data)},listClick:function(t,e){this.$emit("click",Object(o["a"])(Object(o["a"])({},t),{index:e}))},listDel:function(t){this.$emit("del",t)},addFn:function(){this.$emit("add")}}},r=s,c=(n("7ede"),n("1805")),l=Object(c["a"])(r,a,i,!1,null,null,null);e["default"]=l.exports},6971:function(t,e,n){},"7c4c":function(t,e,n){"use strict";n("6971")},"7dbd":function(t,e,n){"use strict";n.r(e);n("7212");var a=function(){var t=this,e=t._self._c;return e("div",{staticClass:"app-list-content"},[e("div",{staticClass:"content-wrap"},[e("div",{staticClass:"wx-wrap"},[e("div",{staticClass:"wx-bar"},[t._m(0),e("div",{staticClass:"bar-text"},[t._v(t._s(t.shopInfo.name))])]),e("div",{staticClass:"wx-content",on:{click:t.closeOptionFn}}),e("div",{staticClass:"wx-btn"},[t._m(1),t._l(t.menuData,(function(n,a){return e("div",{key:a,staticClass:"menu-btn",class:[t.activeIndex==a?"active":""],on:{click:function(e){return t.menuClickFn(n,a)}}},[e("operate-line-module",{attrs:{show:t.operateShow[a],data:n},on:{click:t.operateClickFn,add:function(e){return t.operateAddFn(a)},del:t.operateDelFn}})],1)}))],2)]),t.addDialog?[e("div",{staticClass:"ad-modal-content"},[e("div",{staticClass:"ad-modal-wrap"},[e("el-form",{ref:"form",staticClass:"demo-form",attrs:{model:t.form,rules:t.rule,"label-width":"50px"}},[e("el-form-item",{attrs:{label:"名称",prop:"name"}},[e("el-input",{attrs:{placeholder:"请输入菜单名称",size:"small"},model:{value:t.form.name,callback:function(e){t.$set(t.form,"name",e)},expression:"form.name"}})],1),e("el-form-item",{attrs:{label:"选项",prop:"menuOption"}},[e("el-radio-group",{model:{value:t.form.menuOption,callback:function(e){t.$set(t.form,"menuOption",e)},expression:"form.menuOption"}},[e("el-radio",{attrs:{label:"0"}},[t._v("常用网址")]),e("el-radio",{attrs:{label:"1"}},[t._v("自定义网址")])],1)],1),e("el-form-item",{staticClass:"content-j-wrap",attrs:{label:""}},[0==t.form.menuOption?[e("el-radio-group",{attrs:{size:"mini"},model:{value:t.form.targetId,callback:function(e){t.$set(t.form,"targetId",e)},expression:"form.targetId"}},t._l(t.commonUrlData,(function(n,a){return e("el-radio",{key:a,attrs:{border:"",label:n.id}},[t._v(t._s(n.name))])})),1)]:[e("div",[e("el-input",{attrs:{placeholder:"请填写链接,留空点图片不跳转",size:"small"},model:{value:t.form.replyUrl,callback:function(e){t.$set(t.form,"replyUrl",e)},expression:"form.replyUrl"}})],1)]],2)],1),e("div",{staticClass:"dialog-footer"},[e("el-button",{attrs:{size:"small"},on:{click:t.resetForm}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.confirmForm}},[t._v("提交")])],1)],1)])]:t._e()],2)])},i=[function(){var t=this,e=t._self._c;return e("div",{staticClass:"bar-img"},[e("img",{attrs:{src:n("ee57"),alt:""}})])},function(){var t=this,e=t._self._c;return e("div",{staticClass:"key-btn"},[e("img",{staticClass:"key-btn-img",attrs:{src:n("f948"),alt:"",mode:"widthFix"}})])}],o=n("f2ed"),s=n("c91c"),r=n("ecc5"),c=(n("0da6"),n("b138"),n("2153"),n("8f26"),n("666b"),n("963e"),n("209c"),n("f803"),n("6d35"),n("0401"),n("fddf"),n("5880")),l=n("231c"),u={name:"wx-menu",components:{operateLineModule:l["default"]},data:function(){return{form:{name:"",menuOption:"0",replyUrl:"",targetId:0},rule:{},isModifyParents:!1,addDialog:!1,activeIndex:null,subActiveIndex:null,menuData:[],urlIndex:null,commonUrlData:[],operateShow:[],operateData:null,btnData:[]}},computed:Object(r["a"])({},Object(c["mapGetters"])(["shopInfo","userInfo"])),created:function(){this.init()},methods:{init:function(){this._getDet(),this._getUrl()},_getDet:function(){var t=this;this.$service.setting.getMenu().then((function(e){t.menuData=e.map((function(t){return t.children||(t.children=[]),t})),e.map((function(){t.operateShow.push(!1)}))}))},_getUrl:function(){var t=this;this.$service.single.commonUrl().then((function(e){t.commonUrlData=e}))},submitFn:function(){var t=this;return Object(s["a"])(Object(o["a"])().m((function e(){return Object(o["a"])().w((function(e){while(1)switch(e.n){case 0:return console.log(t.menuData),e.n=1,t.$service.setting.updateMenu(t.menuData).then((function(e){t.$message.success(e.msg||"提交"),t.resetForm()}));case 1:return e.a(2)}}),e)})))()},menuClickFn:function(t,e){var n=this;this.isModifyParents=!0,this.closeOperate(),this.activeIndex=e,this.operateShow[e]=!0,this.operateData=t.children||[],console.log("江总",t),console.log("江总11",this.commonUrlData),Object.keys(this.form).forEach((function(e){n.form[e]=t[e]})),this.addDialog=!0},operateClickFn:function(t){var e=this;this.isModifyParents=!1,this.subActiveIndex=t.index,console.log("item",t),t.targetId=t.targetId?parseInt(t.targetId):0,Object.keys(this.form).forEach((function(n){e.form[n]=t[n]})),this.addDialog=!0},operateAddFn:function(t){var e=this;if(this.operateData.length>4)return this.$message.warning("亲,最多只能设置五个子菜单!"),!1;var n={name:"子菜单名",menuOption:"0",replyUrl:"",targetId:0};this.$set(this.operateShow,this.activeIndex,!1),this.operateData.push(n),this.menuData[this.activeIndex].children=JSON.parse(JSON.stringify(this.operateData)),setTimeout((function(){e.$set(e.operateShow,e.activeIndex,!0)}))},operateDelFn:function(t){var e=this;console.log("我点击了删除按钮!",t),this.$set(this.operateShow,this.activeIndex,!1),this.operateData.splice(t,1),this.menuData[this.activeIndex].children=JSON.parse(JSON.stringify(this.operateData)),setTimeout((function(){e.$set(e.operateShow,e.activeIndex,!0)}))},closeOperate:function(){this.activeIndex=null,this.operateShow=this.operateShow.map((function(t){return!1})),this.addDialog=!1},closeOptionFn:function(){this.closeOperate(),this.resetForm()},confirmForm:function(){var t=this,e=JSON.parse(JSON.stringify(this.form));this.isModifyParents?(Object.keys(e).forEach((function(n){t.menuData[t.activeIndex][n]=e[n]})),console.log("江总22",this.menuData)):(this.operateData[this.subActiveIndex]=e,console.log("this.operateData",this.operateData),this.menuData[this.activeIndex].children=JSON.parse(JSON.stringify(this.operateData))),this.submitFn().then((function(e){console.log("this.activeIndex",t.activeIndex),t.addDialog=!1}))},resetForm:function(){this.form={name:"",menuOption:"0",replyUrl:"",targetId:0},this.$refs["form"].resetFields()}}},d=u,f=(n("7c4c"),n("1805")),h=Object(f["a"])(d,a,i,!1,null,"6bc7b9dd",null);e["default"]=h.exports},"7ede":function(t,e,n){"use strict";n("ff4a")},ee57:function(t,e,n){t.exports=n.p+"img/wx-bar-bg.18045892.png"},f948:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADoAAAA6CAMAAADWZboaAAAAPFBMVEX5+fkfHx/k5OQ+Pj79/f0QEBAwMDD39/f///8DAwPKysq5ubnt7e2np6aGhobX19dSUlJnZ2d2dnaUlJQzuMSfAAADdElEQVRIx51WWYLtKghERYNzhv3v9YGZ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