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
1 line
11 KiB
5 months ago
|
webpackJsonp([43],{"2PAt":function(e,t){},trgX:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=a("mvHQ"),n=a.n(r),s=a("Dd8w"),i=a.n(s),o=a("Xxa5"),l=a.n(o),c=a("exGp"),u=a.n(c),m=a("PJh5"),h=a.n(m),d=a("NYxO"),p={data:function(){return{checkList:[],authList:[{title:"订单管理",key:"shopOrder"},{title:"加钟管理",key:"shopBellOrder"},{title:"拒单管理",key:"shopRefuseOrder"},{title:"服务退款",key:"shopRefund"},{title:"加钟退款",key:"shopBellRefund"}],loading:{list:!1,user:!1},searchForm:{list:{page:1,limit:10},user:{page:1,limit:10,phone:""}},tableData:{list:[],user:[]},total:{list:0,user:0},showDialog:{sub:!1,user:!1},currentRow:{},subForm:{id:0,user_id:"",nickName:"",node:[]},subFormRules:{user_id:{required:!0,type:"number",message:"请选择管理用户",trigger:["blur","change"]},node:{required:!0,type:"array",message:"请选择权限内容",trigger:["blur","change"]}}}},created:function(){var e=this;return u()(l.a.mark(function t(){return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:e.getTableDataList(1,"list");case 1:case"end":return t.stop()}},t,e)}))()},computed:i()({},Object(d.d)({routesItem:function(e){return e.routes}})),methods:i()({},Object(d.c)(["changeRoutesItem"]),{resetForm:function(e){var t=e+"Form";this.$refs[t].resetFields(),this.getTableDataList(1,e)},handleSizeChange:function(e,t){this.searchForm[t].limit=e,this.handleCurrentChange(1,t)},handleCurrentChange:function(e,t){this.searchForm[t].page=e,this.getTableDataList("",t)},getTableDataList:function(e,t){var a=this;return u()(l.a.mark(function r(){var s,i,o,c,u,m,h;return l.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return e&&(a.searchForm[t].page=1),a.loading[t]=!0,s=JSON.parse(n()(a.searchForm[t])),i={list:{methodKey:"account",methodModel:"mobileList"},user:{methodKey:"custom",methodModel:"userSelectByPhone"}}[t],o=i.methodKey,c=i.methodModel,r.next=7,a.$api[o][c](s);case 7:if(u=r.sent,m=u.code,h=u.data,a.loading[t]=!1,200===m){r.next=13;break}return r.abrupt("return");case 13:a.tableData[t]=h.data,a.total[t]=h.total;case 15:case"end":return r.stop()}},r,a)}))()},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,"list")}).catch(function(){})},updateItem:function(e,t,a){var r=this;return u()(l.a.mark(function n(){return l.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:r.$api.account.mobileStatusUpdate({id:e,status:t}).then(function(e){if(200===e.code)r.$message.success(r.$t(-1===t?"tips.successDel":"tips.successOper")),-1===t&&(r.searchForm[a].page=r.searchForm[a].page<Math.ceil((r.total[a]-1)/r.searchForm[a].limit)?r.searchForm[a].page:Math.ceil((r.total[a]-1)/r.searchForm[a].limit),r.getTableDataList(1,a));else{if(-1===t)return;r.getTableDataList(1,a)}});case 1:case"end":return n.stop()}},n,r)}))()},toShowDialog:function(e){var t=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{id:0,user_id:"",nickName:"",node:[]};return u()(l.a.mark(function r(){var s,i;return l.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if("sub"!==e){r.next=6;break}for(i in(a=JSON.parse(n()(a))).id&&(s=[],t.authList.map(function(e){a.node.includes(e.key)&&s.push(e.title)}),t.checkList=s),t.subForm)t.subForm[i]=a[i];r.next=9;break;case 6:return t.searchForm.user.phone="",r.next=9,t.getTableDataList(1,e);case 9:t.showDialog[e]=!t.showDialog[e];case 10:case"end":return r.stop()}},r,t)}))()},changeCheckBox:function(e){var t=[];this.authList.map(function(a){e.includes(a.title)&&t.push(a.key)}),this.subForm.node=t},handleSelectionChange:function(e){var t=e=JSON.parse(n()(e)),a=t.id,r=t.nickName;e.nickName=r||"用户ID "+a,this.currentRow=e},handleDialogConfirm:function(){if(null!==this.currentRow&&this.currentRow.id){var e=this.currentRow,t=e.id,a=void 0===t?0:t,r=e.nickName,n=void 0===r?"":r;this.subForm.user_id=a,this.subForm.nickName=n,this.showDialog.user=!1}else this.$message.error
|