王总上门按摩后台代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
11 KiB

2 months ago
webpackJsonp([23],{WSQj:function(e,t){},sIiw:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("Dd8w"),n=a.n(r),i=a("Xxa5"),o=a.n(i),l=a("mvHQ"),s=a.n(l),c=a("exGp"),u=a.n(c),d=a("NYxO"),h=a("PJh5"),m=a.n(h),p={data:function(){var e=this;return{loading:!1,searchForm:{page:1,limit:10,title:"",type:0},tableData:[],total:0,count:0,checkTreeAll:!1,authPermiList:[],ops:{vuescroll:{wheelScrollDuration:600},scrollPanel:{initialScrollY:!1,initialScrollX:!1,scrollingX:!1,scrollingY:!0,speed:2e3,easing:"easeInOutQuart",verticalNativeBarPos:"right"},rail:{},bar:{showDelay:500,onlyShowBarOnScroll:!1,keepShow:!1,background:"#c1c1c1",opacity:.5,hoverStyle:!1,specifyBorderRadius:!1,minSize:!1,size:"6px",disable:!1}},defaultProps:{children:"children",label:"title"},currentNodeKey:[],showDialog:!1,dialogType:1,subForm:{id:0,title:"",node:[]},subFormRules:{title:{required:!0,validator:this.$reg.isNotNull,text:"角色名称",reg_type:2,trigger:"blur"},role:{required:!0,validator:function(t,a,r){0===e.toReturnPermi().length?r(new Error("请选择权限")):r()},trigger:"change"}}}},created:function(){var e=this;return u()(o.a.mark(function t(){var a,r;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e.getTableDataList(1),a=JSON.parse(s()(e.allRoutes)),r=[],a.map(function(t,a){var n=1*a+1,i=[];t.hidden||(t.children.map(function(t,a){var r=1*a+1;if(!t.hidden){var o=[],l=["MarketArticleEnroll","SystemVirtualRecord","SystemCarFeeCity"].includes(t.name)?1:0;t.meta.pagePermission[l].auth.map(function(t,a){var i=1*a+1;o.push({id:n+"-"+r+"-"+i,name:t,title:e.$t("action."+t),selected:!1})}),i.push({id:n+"-"+r,name:t.name,title:e.$t("menu."+t.name),children:o,selected:!1})}}),r.push({id:""+n,name:t.meta.menuName,title:e.$t("menu."+t.meta.menuName),children:i,selected:!1}))}),e.authPermiList=r;case 5:case"end":return t.stop()}},t,e)}))()},computed:n()({},Object(d.d)({allRoutes:function(e){return e.routes.allRoutes}})),methods:{resetForm:function(e){this.$refs[e].resetFields(),this.getTableDataList(1)},handleSizeChange:function(e){this.searchForm.limit=e,this.handleCurrentChange(1)},handleCurrentChange:function(e){this.searchForm.page=e,this.getTableDataList()},getTableDataList:function(e){var t=this;return u()(o.a.mark(function a(){var r,n,i;return o.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e&&(t.searchForm.page=1),t.tableData=[],t.loading=!0,a.next=5,t.$api.account.roleList(t.searchForm);case 5:if(r=a.sent,n=r.code,i=r.data,t.loading=!1,200===n){a.next=11;break}return a.abrupt("return");case 11:t.tableData=i.data,t.total=i.total;case 13:case"end":return a.stop()}},a,t)}))()},confirmDel:function(e){var t=this;this.$confirm(this.$t("tips.confirmDelete"),this.$t("tips.reminder"),{confirmButtonText:this.$t("action.comfirm"),cancelButtonText:this.$t("action.cancel"),type:"warning"}).then(function(){t.updateItem(e,-1)}).catch(function(){})},updateItem:function(e,t){var a=this;return u()(o.a.mark(function r(){return o.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:a.$api.account.roleUpdate({id:e,status:t}).then(function(e){if(200===e.code)a.$message.success(a.$t(-1===t?"tips.successDel":"tips.successOper")),-1===t&&(a.searchForm.page=a.searchForm.page<Math.ceil((a.total-1)/a.searchForm.limit)?a.searchForm.page:Math.ceil((a.total-1)/a.searchForm.limit),a.getTableDataList());else{if(-1===t)return;a.getTableDataList()}});case 1:case"end":return r.stop()}},r,a)}))()},toShowDialog:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return u()(o.a.mark(function a(){var r,n,i,l,c,u,d,h,m,p;return o.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:for(r in e.subForm)e.subForm[r]=t[r];if(n=t.id,i=void 0===n?0:n,e.showDialog=!e.showDialog,i){a.next=7;break}return e.currentNodeKey=[],e.$refs.tree.setCheckedKeys([]),a.abrupt("return");case 7:return a.next=9,e.$api.account.roleInfo({id:i});case 9:l=a.sent,c=l.data,u=c.node,d=u.map(function(e){return e.node}),h=JSON.parse(s()(e.authPermiList)),m=[],p=0,h.map(function(e){e.children.map(function(e){if(0===e.c