1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0d7efec8"],{1698:function(t,e,a){"use strict";a.d(e,"g",(function(){return i})),a.d(e,"f",(function(){return s})),a.d(e,"e",(function(){return r})),a.d(e,"h",(function(){return o})),a.d(e,"d",(function(){return c})),a.d(e,"c",(function(){return l})),a.d(e,"b",(function(){return u})),a.d(e,"a",(function(){return d}));var n=a("b6bd");function i(t){return Object(n.a)({url:"agent/level",method:"get",params:t})}function s(t,e){return Object(n.a)({url:e,method:"get",params:t})}function r(t,e){return Object(n.a)({url:e,method:"get",params:t})}function o(t){return Object(n.a)({url:t,method:"PUT"})}function c(t){return Object(n.a)({url:t,method:"PUT"})}function l(t){return Object(n.a)({url:"agent/level_task",method:"get",params:t})}function u(t,e){return Object(n.a)({url:e,method:"get",params:t})}function d(t,e){return Object(n.a)({url:e,method:"get",params:t})}},"30cc":function(t,e,a){"use strict";a.r(e);var n=a("a34a"),i=a.n(n),s=a("2f62"),r=a("1698");function o(t,e,a,n,i,s,r){try{var o=t[s](r),c=o.value}catch(t){return void a(t)}o.done?e(c):Promise.resolve(c).then(n,i)}function c(t){return function(){var e=this,a=arguments;return new Promise((function(n,i){var s=t.apply(e,a);function r(t){o(s,n,i,r,c,"next",t)}function c(t){o(s,n,i,r,c,"throw",t)}r(void 0)}))}}function l(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function u(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var d={name:"list",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},modal1:!1,modal2:!1,formValidate:{status:"",page:1,limit:20,gid:0},taskData:{keyword:"",page:1,limit:20,status:""},total:0,taskTotal:0,tabList:[],taskTabList:[],columns1:[{key:"id",width:80,title:"ID"},{slot:"image",minWidth:100,title:"背景图"},{key:"name",minWidth:100,title:"名称"},{key:"grade",minWidth:80,title:"等级"},{key:"one_brokerage",minWidth:120,title:"一级返佣上浮比例(%)"},{key:"two_brokerage",minWidth:120,title:"二级返佣上浮比例(%)"},{slot:"status",minWidth:80,title:"是否显示"},{fixed:"right",minWidth:160,slot:"action",title:"操作"}],columns2:[{key:"id",minWidth:35,title:"ID"},{key:"name",minWidth:35,title:"名称"},{key:"type_name",minWidth:35,title:"任务类型"},{key:"number",minWidth:35,title:"限定数量"},{slot:"status",minWidth:35,title:"是否显示"},{key:"sort",minWidth:35,title:"排序"},{minWidth:120,slot:"action",title:"操作"}],FromData:null,loading:!1,taskLoading:!1,titleType:"group",groupAll:[],theme3:"light",labelSort:[],sortName:null,current:0,model1:"",value1:""}},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?l(a,!0).forEach((function(e){u(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):l(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(s.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:96},labelPosition:function(){return this.isMobile?"top":"right"}}),watch:{$route:function(t,e){this.$route.params.id}},mounted:function(){this.getList()},methods:{bindMenuItem:function(t,e){this.current=e,this.formValidate.gid=t.id,this.getListHeader(),this.getList()},getList:function(){var t=this;this.loading=!0,Object(r.g)(this.formValidate).then(function(){var e=c(i.a.mark((function e(a){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a.data,t.tabList=n.list,t.total=n.count,t.loading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.loading=!1,t.$Message.error(e.msg)}))},getTaskList:function(){var t=this;this.taskLoading=!0,Object(r.c)(this.taskData).then(function(){var e=c(i.a.mark((function e(a){var n;return i.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=a.data,t.taskTabList=n.list,t.taskTotal=n.count,t.taskLoading=!1;case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){t.taskLoading=!1,t.$Message.error(e.msg)}))},pageChange:function(t){this.formValidate.page=t,this.getList()},pageTaskChange:function(t){this.taskData.page=t,this.getList()},search:function(){this.formValidate.page=1,this.getList()},searchTask:function(){this.taskData.page=1,this.getTaskList()},groupAdd:function(){var t=this;this.$modalForm(Object(r.e)({},"/agent/level/create")).then((function(){return t.getList()}))},taskAdd:function(){var t=this;this.$modalForm(Object(r.a)({},"/agent/level_task/create?level_id="+this.taskData.id)).then((function(){return t.getTaskList()}))},onchangeIsShow:function(t){var e=this;Object(r.h)("agent/level/set_status/".concat(t.id,"/").concat(t.status)).then(function(){var t=c(i.a.mark((function t(a){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(a.msg),e.getList();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},onchangeTaskIsShow:function(t){var e=this;Object(r.d)("agent/level_task/set_status/".concat(t.id,"/").concat(t.status)).then(function(){var t=c(i.a.mark((function t(a){return i.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(a.msg),e.getList();case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$Message.error(t.msg)}))},addTask:function(t){this.id=t.id,this.modal2=!0,this.taskData.id=t.id,this.getTaskList()},edit:function(t){var e=this,a={gid:t.gid};this.$modalForm(Object(r.f)(a,"agent/level/".concat(t.id,"/edit"))).then((function(){return e.getList()}))},editTask:function(t){var e=this,a={gid:t.gid};this.$modalForm(Object(r.b)(a,"agent/level_task/".concat(t.id,"/edit"))).then((function(){return e.getTaskList()}))},del:function(t,e,a){var n=this,i={title:e,num:a,url:"agent/level/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(i).then((function(t){n.$Message.success(t.msg),n.tabList.splice(a,1),n.tabList.length||(n.formValidate.page=1==n.formValidate.page?1:n.formValidate.page-1),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))},delTask:function(t,e,a){var n=this,i={title:e,num:a,url:"agent/level_task/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(i).then((function(t){n.$Message.success(t.msg),n.taskTabList.splice(a,1)})).catch((function(t){n.$Message.error(t.msg)}))}}},f=(a("cd83"),a("2877")),h=Object(f.a)(d,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[a("div",{staticClass:"new_card_pd"},[a("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition,inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[a("FormItem",{attrs:{label:"是否显示:"}},[a("Select",{staticClass:"input-add",attrs:{clearable:""},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[a("Option",{attrs:{value:1}},[t._v("显示")]),a("Option",{attrs:{value:0}},[t._v("不显示")])],1)],1),a("FormItem",{attrs:{label:"等级名称:","label-for":"status"}},[a("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入等级名称"},model:{value:t.formValidate.keyword,callback:function(e){t.$set(t.formValidate,"keyword",e)},expression:"formValidate.keyword"}}),a("Button",{attrs:{type:"primary"},on:{click:t.search}},[t._v("查询")])],1)],1)],1)]),a("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[a("Button",{staticClass:"ml20 ",attrs:{type:"primary"},on:{click:function(e){return t.groupAdd()}}},[t._v("添加等级")]),a("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.tabList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"image",fn:function(t){var e=t.row;return t.index,[a("viewer",[a("div",{staticClass:"tabBox-img"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.image,expression:"row.image"}]})])])]}},{key:"status",fn:function(e){var n=e.row;return e.index,[a("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(e){var n=e.row,i=e.index;return[a("a",{on:{click:function(e){return t.addTask(n)}}},[t._v("等级任务")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.edit(n,"编辑")}}},[t._v("编辑")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.del(n,"删除这条信息",i)}}},[t._v("删除")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:t.total,current:t.formValidate.page,"show-elevator":"","show-total":"","page-size":t.formValidate.limit},on:{"on-change":t.pageChange}})],1)],1),a("div",{staticClass:"task-modal"},[a("Modal",{attrs:{title:"添加任务","footer-hide":"",width:"1000"},model:{value:t.modal2,callback:function(e){t.modal2=e},expression:"modal2"}},[a("div",[a("div",{staticClass:"add-task"},[a("Button",{attrs:{type:"primary"},on:{click:function(e){return t.taskAdd()}}},[t._v("添加等级任务")])],1),a("div",[a("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns2,data:t.taskTabList,loading:t.taskLoading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"status",fn:function(e){var n=e.row;return e.index,[a("i-switch",{attrs:{value:n.status,"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.onchangeTaskIsShow(n)}},model:{value:n.status,callback:function(e){t.$set(n,"status",e)},expression:"row.status"}},[a("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),a("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"action",fn:function(e){var n=e.row,i=e.index;return[a("a",{on:{click:function(e){return t.editTask(n,"编辑")}}},[t._v("编辑")]),a("Divider",{attrs:{type:"vertical"}}),a("a",{on:{click:function(e){return t.delTask(n,"删除这条信息",i)}}},[t._v("删除")])]}}])}),a("div",{staticClass:"acea-row row-right page"},[a("Page",{attrs:{total:t.taskTotal,current:t.taskData.page,"show-elevator":"","show-total":"","page-size":t.taskData.limit},on:{"on-change":t.pageTaskChange}})],1)],1)])])],1)],1)}),[],!1,null,"af2a7256",null);e.default=h.exports},a6ff:function(t,e,a){},cd83:function(t,e,a){"use strict";var n=a("a6ff");a.n(n).a}}]);
|