Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-62b76215.574373b4.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
16 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-62b76215"],{1150:function(e,t,s){"use strict";s("25ea")},1389:function(e,t,s){"use strict";s.d(t,"b",(function(){return a})),s.d(t,"c",(function(){return r})),s.d(t,"d",(function(){return l})),s.d(t,"a",(function(){return n}));var i=s("b775");function a(e){return new Promise((t,s)=>{Object(i["a"])({url:"/menuGroup.listMenuGroups",method:"get",params:e}).then(e=>{const s=e.data;t(s)}).catch(e=>{s(e)})})}function r(e){return new Promise((t,s)=>{Object(i["a"])({url:"/menuGroup.saveMenuGroup",method:"post",data:e}).then(e=>{const s=e.data;t(s)}).catch(e=>{s(e)})})}function l(e){return new Promise((t,s)=>{Object(i["a"])({url:"/menuGroup.updateMenuGroup",method:"post",data:e}).then(e=>{const s=e.data;t(s)}).catch(e=>{s(e)})})}function n(e){return new Promise((t,s)=>{Object(i["a"])({url:"/menuGroup.deleteMenuGroup",method:"post",data:e}).then(e=>{const s=e.data;t(s)}).catch(e=>{s(e)})})}},"22bd":function(e,t,s){},"25ea":function(e,t,s){},"28c5":function(e,t,s){"use strict";s("5767")},"4d2f":function(e,t,s){"use strict";s("22bd")},"4d4a":function(e,t,s){"use strict";s.d(t,"a",(function(){return a})),s.d(t,"c",(function(){return r})),s.d(t,"d",(function(){return l})),s.d(t,"b",(function(){return n}));var i=s("b775");function a(e){return new Promise((t,s)=>{Object(i["a"])({url:"/menu.configMenu",method:"post",data:e}).then(e=>{t(e.data)}).catch(e=>{s(e)})})}function r(e){return new Promise((t,s)=>{Object(i["a"])({url:"/menu.listMenus",method:"get",params:e}).then(e=>{const s=e.data;t(s)}).catch(e=>{s(e)})})}function l(e){return new Promise((t,s)=>{Object(i["a"])({url:"/menu.updateMenu",method:"post",data:e}).then(e=>{t(e.data)}).catch(e=>{s(e)})})}function n(e){return new Promise((t,s)=>{Object(i["a"])({url:"/menu.deleteMenu",method:"post",data:e}).then(e=>{t(e.data)}).catch(e=>{s(e)})})}},5767:function(e,t,s){},"5b98":function(e,t,s){},6390:function(e,t,s){"use strict";s("5b98")},"6a96":function(e,t,s){"use strict";s.r(t);var i=function(){var e=this,t=e._self._c;return t("div",{staticClass:"menu-container"},[t("div",[t("div",{staticClass:"menu-group-wrapper",staticStyle:{height:"220px"}},[e._m(0),t("div",{staticClass:"group-content"},[t("el-menu",{staticClass:"group-menu",attrs:{"default-active":e.storeType},on:{select:e.handleStoreType}},e._l(e.storeTypes,(function(s,i){return t("el-menu-item",{key:i,attrs:{index:s.value}},[t("span",[e._v(e._s(s.label))])])})),1)],1)]),t("div",{staticClass:"menu-group-wrapper margin-top"},[e._m(1),t("div",{staticClass:"group-content"},[t("el-menu",{staticClass:"group-menu",attrs:{"default-active":e.searchForm.gId},on:{select:e.handleGroup}},e._l(e.menuGroups,(function(s,i){return t("el-menu-item",{key:i,attrs:{index:s.gId}},[t("span",[e._v(e._s(s.name))])])})),1)],1)])]),t("div",{staticClass:"menu-list-wrapper"},[t("div",{staticClass:"search-wrapper"},[t("div",{staticClass:"search-title"},[e._v(e._s(e.$t("menu.search.title")))]),t("div",{staticClass:"search-content"},[t("el-input",{staticClass:"search-item",attrs:{placeholder:e.$t("menu.search.name"),clearable:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSearch.apply(null,arguments)}},model:{value:e.searchForm.name,callback:function(t){e.$set(e.searchForm,"name",t)},expression:"searchForm.name"}}),t("el-select",{staticClass:"search-item",attrs:{placeholder:e.$t("menu.search.isShow")},model:{value:e.searchForm.isShow,callback:function(t){e.$set(e.searchForm,"isShow",t)},expression:"searchForm.isShow"}},[t("el-option",{attrs:{label:"全部",value:""}}),t("el-option",{attrs:{label:"显示",value:"Y"}}),t("el-option",{attrs:{label:"不显示",value:"N"}})],1),t("el-button",{attrs:{type:"primary"},on:{click:e.handleSearch}},[e._v(e._s(e.$t("common.search")))])],1)]),t("div",{staticClass:"list-wrapper"},[t("div",{staticClass:"list-header"},[t("div",{staticClass:"list-title"},[e._v(e._s(e.$t("menu.list.title")))]),e.searchForm.gId?t("el-button",{attrs:{type:"primary"},on:{click:e.handleAdd}},[e._v(e._s(e.$t("common.add")))]):e._e()],1),t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:e.tableData,border:""}},[t("el-table-column",{attrs:{prop:"mId",label:e.$t("menu.table.mId")}}),t("el-table-column",{attrs:{prop:"name",label:e.$t("menu.table.name")}}),t("el-table-column",{attrs:{prop:"gId",label:e.$t("menu.table.gId")}}),t("el-table-column",{attrs:{prop:"url",label:e.$t("menu.table.url")}}),t("el-table-column",{attrs:{prop:"seq",label:e.$t("menu.table.seq")}}),t("el-table-column",{attrs:{prop:"description",label:e.$t("menu.table.description")}}),t("el-table-column",{attrs:{prop:"isShowName",label:e.$t("menu.table.isShow")}}),t("el-table-column",{attrs:{label:e.$t("common.operation"),width:"200",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(s){return[t("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(t){return e.handleEdit(s.row)}}},[e._v(e._s(e.$t("common.edit")))]),t("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(t){return e.handleDelete(s.row)}}},[e._v(e._s(e.$t("common.delete")))]),t("el-button",{attrs:{size:"mini",type:"warn"},on:{click:function(t){return e.handlePrivilege(s.row)}}},[e._v(e._s(e.$t("menu.privilege")))])]}}])})],1),t("el-pagination",{attrs:{"current-page":e.page.current,"page-sizes":[10,20,30,50],"page-size":e.page.size,total:e.page.total,layout:"total, sizes, prev, pager, next, jumper"},on:{"update:currentPage":function(t){return e.$set(e.page,"current",t)},"update:current-page":function(t){return e.$set(e.page,"current",t)},"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1)]),t("AddMenu",{attrs:{visible:e.addVisible,"g-id":e.searchForm.gId,"store-type":e.storeType},on:{"update:visible":function(t){e.addVisible=t},success:e.handleSuccess}}),t("EditMenu",{attrs:{visible:e.editVisible,"form-data":e.currentRow},on:{"update:visible":function(t){e.editVisible=t},success:e.handleSuccess}}),t("DelMenu",{attrs:{visible:e.delVisible,"m-id":e.currentRow.mId,"p-id":e.currentRow.pId},on:{"update:visible":function(t){e.delVisible=t},success:e.handleSuccess}})],1)},a=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"group-header"},[t("div",{staticClass:"header-title"},[e._v("选择商户")])])},function(){var e=this,t=e._self._c;return t("div",{staticClass:"group-header"},[t("div",{staticClass:"header-title"},[e._v("选择菜单组")])])}],r=s("4d4a"),l=s("1389"),n=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("menu.dialog.addTitle"),visible:e.dialogVisible,width:"500px"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[t("el-form-item",{attrs:{label:e.$t("menu.form.name"),prop:"name"}},[t("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),t("el-form-item",{attrs:{label:e.$t("menu.form.url"),prop:"url"}},[t("el-input",{model:{value:e.form.url,callback:function(t){e.$set(e.form,"url",t)},expression:"form.url"}})],1),t("el-form-item",{attrs:{label:e.$t("menu.form.seq"),prop:"seq"}},[t("el-input",{model:{value:e.form.seq,callback:function(t){e.$set(e.form,"seq",t)},expression:"form.seq"}})],1),t("el-form-item",{attrs:{label:e.$t("menu.form.description"),prop:"description"}},[t("el-input",{model:{value:e.form.description,callback:function(t){e.$set(e.form,"description",t)},expression:"form.description"}})],1),t("el-form-item",{attrs:{label:e.$t("menu.form.isShow"),prop:"isShow"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.form.isShow,callback:function(t){e.$set(e.form,"isShow",t)},expression:"form.isShow"}},[t("el-option",{attrs:{label:"显示",value:"Y"}}),t("el-option",{attrs:{label:"不显示",value:"N"}})],1)],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.handleClose}},[e._v(e._s(e.$t("menu.dialog.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v(e._s(e.$t("menu.dialog.confirm")))])],1)],1)},o=[],u={name:"AddMenu",props:{visible:{type:Boolean,default:!1},gId:{type:String,default:""},storeType:{type:String,default:""}},data(){return{dialogVisible:!1,form:{name:"",gId:"",url:"",seq:"",description:"",isShow:"",storeType:"",createTime:""},rules:{name:[{required:!0,message:this.$t("menu.validate.name"),trigger:"blur"}],gId:[{required:!0,message:this.$t("menu.validate.gId"),trigger:"blur"}],url:[{required:!0,message:this.$t("menu.validate.url"),trigger:"blur"}],seq:[{required:!0,message:this.$t("menu.validate.seq"),trigger:"blur"}],isShow:[{required:!0,message:this.$t("menu.validate.isShow"),trigger:"blur"}],createTime:[{required:!0,message:this.$t("menu.validate.createTime"),trigger:"blur"}]}}},watch:{visible:{handler(e){this.dialogVisible=e},immediate:!0},dialogVisible(e){this.$emit("update:visible",e)}},methods:{handleClose(){this.dialogVisible=!1,this.$refs.form&&this.$refs.form.resetFields()},async handleSubmit(){try{await this.$refs.form.validate();let e=[];e.push({flowComponent:"viewMenuGroupInfo",gId:this.gId}),e.push({flowComponent:"addMenuView",name:this.form.name,url:this.form.url,seq:this.form.seq,isShow:this.form.isShow,description:this.form.description}),e.push({flowComponent:"addPrivilegeView",name:this.form.name,resource:this.form.url,domain:this.storeType,description:this.form.description}),await Object(r["a"])({data:e}),this.$message.success(this.$t("menu.add.success")),this.handleClose(),this.$emit("success")}catch(e){console.error("添加失败:",e)}}}},c=u,d=(s("1150"),s("2877")),m=Object(d["a"])(c,n,o,!1,null,"7c7ab2c6",null),h=m.exports,p=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("menu.dialog.editTitle"),visible:e.dialogVisible,width:"500px"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules,"label-width":"100px"}},[t("el-form-item",{attrs:{label:e.$t("menu.form.name"),prop:"name"}},[t("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1),t("el-form-item",{attrs:{label:e.$t("menu.form.url"),prop:"url"}},[t("el-input",{model:{value:e.form.url,callback:function(t){e.$set(e.form,"url",t)},expression:"form.url"}})],1),t("el-form-item",{attrs:{label:e.$t("menu.form.seq"),prop:"seq"}},[t("el-input",{model:{value:e.form.seq,callback:function(t){e.$set(e.form,"seq",t)},expression:"form.seq"}})],1),t("el-form-item",{attrs:{label:e.$t("menu.form.description"),prop:"description"}},[t("el-input",{model:{value:e.form.description,callback:function(t){e.$set(e.form,"description",t)},expression:"form.description"}})],1),t("el-form-item",{attrs:{label:e.$t("menu.form.isShow"),prop:"isShow"}},[t("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.form.isShow,callback:function(t){e.$set(e.form,"isShow",t)},expression:"form.isShow"}},[t("el-option",{attrs:{label:"显示",value:"Y"}}),t("el-option",{attrs:{label:"不显示",value:"N"}})],1)],1)],1),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.handleClose}},[e._v(e._s(e.$t("menu.dialog.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.handleSubmit}},[e._v(e._s(e.$t("menu.dialog.confirm")))])],1)],1)},f=[],b={name:"EditMenu",props:{visible:{type:Boolean,default:!1},formData:{type:Object,default:()=>({})}},data(){return{dialogVisible:!1,form:{mId:"",name:"",gId:"",url:"",seq:"",description:"",isShow:"",createTime:""},rules:{mId:[{required:!0,message:this.$t("menu.validate.mId"),trigger:"blur"}],name:[{required:!0,message:this.$t("menu.validate.name"),trigger:"blur"}],gId:[{required:!0,message:this.$t("menu.validate.gId"),trigger:"blur"}],url:[{required:!0,message:this.$t("menu.validate.url"),trigger:"blur"}],seq:[{required:!0,message:this.$t("menu.validate.seq"),trigger:"blur"}],isShow:[{required:!0,message:this.$t("menu.validate.isShow"),trigger:"blur"}],createTime:[{required:!0,message:this.$t("menu.validate.createTime"),trigger:"blur"}]}}},watch:{visible:{handler(e){this.dialogVisible=e,e&&this.formData&&(this.form={...this.formData})},immediate:!0},dialogVisible(e){this.$emit("update:visible",e)}},methods:{handleClose(){this.dialogVisible=!1,this.$refs.form&&this.$refs.form.resetFields()},async handleSubmit(){try{await this.$refs.form.validate(),await Object(r["d"])(this.form),this.$message.success(this.$t("menu.edit.success")),this.handleClose(),this.$emit("success")}catch(e){console.error("编辑失败:",e)}}}},g=b,v=(s("28c5"),Object(d["a"])(g,p,f,!1,null,"22d94cf5",null)),$=v.exports,w=function(){var e=this,t=e._self._c;return t("el-dialog",{attrs:{title:e.$t("menu.dialog.delTitle"),visible:e.dialogVisible,width:"400px"},on:{"update:visible":function(t){e.dialogVisible=t},close:e.handleClose}},[t("div",{staticClass:"del-dialog-content"},[t("i",{staticClass:"el-icon-warning"}),t("span",[e._v(e._s(e.$t("menu.delete.confirm")))])]),t("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{on:{click:e.handleClose}},[e._v(e._s(e.$t("menu.dialog.cancel")))]),t("el-button",{attrs:{type:"primary"},on:{click:e.handleConfirm}},[e._v(e._s(e.$t("menu.dialog.confirm")))])],1)])},y=[],_={name:"DelMenu",props:{visible:{type:Boolean,default:!1},mId:{type:String,default:""},pId:{type:String,default:""}},data(){return{dialogVisible:!1}},watch:{visible:{handler(e){this.dialogVisible=e},immediate:!0},dialogVisible(e){this.$emit("update:visible",e)}},methods:{handleClose(){this.dialogVisible=!1},async handleConfirm(){try{await Object(r["b"])({mId:this.mId,pId:this.pId}),this.$message.success(this.$t("menu.delete.success")),this.handleClose(),this.$emit("success")}catch(e){console.error("删除失败:",e)}}}},S=_,C=(s("6390"),Object(d["a"])(S,w,y,!1,null,"5c0b4943",null)),I=C.exports,k={name:"menuList",components:{AddMenu:h,EditMenu:$,DelMenu:I},data(){return{loading:!1,menuGroups:[],storeTypes:[{label:"商家",value:"800900000005"},{label:"运营团队",value:"800900000001"},{label:"开发团队",value:"800900000000"}],storeType:"",searchForm:{name:"",gId:"",isShow:""},tableData:[],page:{current:1,size:10,total:0},addVisible:!1,editVisible:!1,delVisible:!1,currentRow:{}}},created(){this.handleStoreType(this.storeTypes[0].value),this.getList()},methods:{async getMenuGroupList(){try{this.loading=!0;const e={page:1,row:100,storeType:this.storeType},{data:t}=await Object(l["b"])(e);this.menuGroups=t}catch(e){this.$message.error(this.$t("menuGroup.fetchError"))}finally{this.loading=!1}},async getList(){try{this.loading=!0;const e={page:this.page.current,row:this.page.size,name:this.searchForm.name,gId:this.searchForm.gId,isShow:this.searchForm.isShow},{data:t,total:s}=await Object(r["c"])(e);this.tableData=t,this.page.total=s}catch(e){this.$message.error(this.$t("menu.fetchError"))}finally{this.loading=!1}},handleSearch(){this.page.current=1,this.getList()},handleAdd(){this.addVisible=!0},handleEdit(e){this.currentRow={...e},this.editVisible=!0},handleDelete(e){this.currentRow={...e},this.delVisible=!0},handleSuccess(){this.getList()},handleSizeChange(e){this.page.size=e,this.getList()},handleCurrentChange(e){this.page.current=e,this.getList()},handleGroup(e){this.searchForm.gId=e,this.getList()},handleStoreType(e){this.storeType=e,this.getMenuGroupList()},handlePrivilege(e){this.$router.push("/pages/dev/basePrivilegeManage?mId="+e.mId+"&domain="+this.storeType)}}},q=k,V=(s("4d2f"),Object(d["a"])(q,i,a,!1,null,"8c1a9488",null));t["default"]=V.exports}}]);
//# sourceMappingURL=chunk-62b76215.574373b4.js.map