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 lines
18 KiB
1 lines
18 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-8b37b722"],{1698:function(t,e,r){"use strict";r.d(e,"g",(function(){return a})),r.d(e,"f",(function(){return i})),r.d(e,"e",(function(){return o})),r.d(e,"h",(function(){return s})),r.d(e,"d",(function(){return c})),r.d(e,"c",(function(){return u})),r.d(e,"b",(function(){return l})),r.d(e,"a",(function(){return f}));var n=r("b6bd");function a(t){return Object(n.a)({url:"agent/level",method:"get",params:t})}function i(t,e){return Object(n.a)({url:e,method:"get",params:t})}function o(t,e){return Object(n.a)({url:e,method:"get",params:t})}function s(t){return Object(n.a)({url:t,method:"PUT"})}function c(t){return Object(n.a)({url:t,method:"PUT"})}function u(t){return Object(n.a)({url:"agent/level_task",method:"get",params:t})}function l(t,e){return Object(n.a)({url:e,method:"get",params:t})}function f(t,e){return Object(n.a)({url:e,method:"get",params:t})}},"30cc":function(t,e,r){"use strict";r.r(e);var n=r("2f62"),a=r("1698");function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */o=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),s=new D(n||[]);return a(o,"_invoke",{value:E(t,r,s)}),o}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var p="suspendedStart",m="suspendedYield",g="executing",v="completed",y={};function b(){}function w(){}function k(){}var L={};f(L,c,(function(){return this}));var O=Object.getPrototypeOf,x=O&&O(O(C([])));x&&x!==r&&n.call(x,c)&&(L=x);var _=k.prototype=b.prototype=Object.create(L);function j(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function r(a,o,s,c){var u=d(t[a],t,o);if("throw"!==u.type){var l=u.arg,f=l.value;return f&&"object"==i(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(f).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var o;a(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,a){r(t,n,e,a)}))}return o=o?o.then(a,a):a()}})}function E(e,r,n){var a=p;return function(i,o){if(a===g)throw Error("Generator is already running");if(a===v){if("throw"===i)throw o;return{value:t,done:!0}}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var c=P(s,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===p)throw a=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=g;var u=d(e,r,n);if("normal"===u.type){if(a=n.done?v:m,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=v,n.method="throw",n.arg=u.arg)}}}function P(e,r){var n=r.method,a=e.iterator[n];if(a===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,P(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var i=d(a,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,y;var o=i.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function $(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function D(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function C(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,o=function r(){for(;++a<e.length;)if(n.call(e,a))return r.value=e[a],r.done=!1,r;return r.value=t,r.done=!0,r};return o.next=o}}throw new TypeError(i(e)+" is not iterable")}return w.prototype=k,a(_,"constructor",{value:k,configurable:!0}),a(k,"constructor",{value:w,configurable:!0}),w.displayName=f(k,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,f(t,l,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},j(T.prototype),f(T.prototype,u,(function(){return this})),e.AsyncIterator=T,e.async=function(t,r,n,a,i){void 0===i&&(i=Promise);var o=new T(h(t,r,n,a),i);return e.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},j(_),f(_,l,"Generator"),f(_,c,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=C,D.prototype={constructor:D,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach($),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function a(n,a){return s.type="throw",s.arg=e,r.next=n,a&&(r.method="next",r.arg=t),!!a}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),u=n.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var i=a;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),$(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;$(r)}return a}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:C(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function s(t,e,r,n,a,i,o){try{var s=t[i](o),c=s.value}catch(t){return void r(t)}s.done?e(c):Promise.resolve(c).then(n,a)}function c(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var i=t.apply(e,r);function o(t){s(i,n,a,o,c,"next",t)}function c(t){s(i,n,a,o,c,"throw",t)}o(void 0)}))}}function u(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?u(Object(r),!0).forEach((function(e){f(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function f(t,e,r){return(e=function(t){var e=function(t,e){if("object"!=i(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,e||"default");if("object"!=i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==i(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var h={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:l(l({},Object(n.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(a.g)(this.formValidate).then(function(){var e=c(o().mark((function e(r){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.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(a.c)(this.taskData).then(function(){var e=c(o().mark((function e(r){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.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(a.e)({},"/agent/level/create")).then((function(){return t.getList()}))},taskAdd:function(){var t=this;this.$modalForm(Object(a.a)({},"/agent/level_task/create?level_id="+this.taskData.id)).then((function(){return t.getTaskList()}))},onchangeIsShow:function(t){var e=this;Object(a.h)("agent/level/set_status/".concat(t.id,"/").concat(t.status)).then(function(){var t=c(o().mark((function t(r){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.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(a.d)("agent/level_task/set_status/".concat(t.id,"/").concat(t.status)).then(function(){var t=c(o().mark((function t(r){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$Message.success(r.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,r={gid:t.gid};this.$modalForm(Object(a.f)(r,"agent/level/".concat(t.id,"/edit"))).then((function(){return e.getList()}))},editTask:function(t){var e=this,r={gid:t.gid};this.$modalForm(Object(a.b)(r,"agent/level_task/".concat(t.id,"/edit"))).then((function(){return e.getTaskList()}))},del:function(t,e,r){var n=this,a={title:e,num:r,url:"agent/level/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(a).then((function(t){n.$Message.success(t.msg),n.tabList.splice(r,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,r){var n=this,a={title:e,num:r,url:"agent/level_task/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(a).then((function(t){n.$Message.success(t.msg),n.taskTabList.splice(r,1)})).catch((function(t){n.$Message.error(t.msg)}))}}},d=(r("a920"),r("2877")),p=Object(d.a)(h,(function(){var t=this,e=t._self._c;return e("div",[e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":"",padding:0}},[e("div",{staticClass:"new_card_pd"},[e("Form",{ref:"formValidate",attrs:{model:t.formValidate,"label-width":t.labelWidth,"label-position":t.labelPosition,inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[e("FormItem",{attrs:{label:"是否显示:"}},[e("Select",{staticClass:"input-add",attrs:{clearable:""},on:{"on-change":t.search},model:{value:t.formValidate.status,callback:function(e){t.$set(t.formValidate,"status",e)},expression:"formValidate.status"}},[e("Option",{attrs:{value:1}},[t._v("显示")]),e("Option",{attrs:{value:0}},[t._v("不显示")])],1)],1),e("FormItem",{attrs:{label:"等级名称:","label-for":"status"}},[e("Input",{staticClass:"input-add mr14",attrs:{placeholder:"请输入等级名称"},model:{value:t.formValidate.keyword,callback:function(e){t.$set(t.formValidate,"keyword",e)},expression:"formValidate.keyword"}}),e("Button",{attrs:{type:"primary"},on:{click:t.search}},[t._v("查询")])],1)],1)],1)]),e("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[e("Button",{staticClass:"ml20",attrs:{type:"primary"},on:{click:function(e){return t.groupAdd()}}},[t._v("添加等级")]),e("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 r=t.row;return t.index,[e("viewer",[e("div",{staticClass:"tabBox-img"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:r.image,expression:"row.image"}]})])])]}},{key:"status",fn:function(r){var n=r.row;return r.index,[e("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"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("显示")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("隐藏")])])]}},{key:"action",fn:function(r){var n=r.row,a=r.index;return[e("a",{on:{click:function(e){return t.addTask(n)}}},[t._v("等级任务")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.edit(n,"编辑")}}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.del(n,"删除这条信息",a)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("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),e("div",{staticClass:"task-modal"},[e("Modal",{attrs:{title:"添加任务","footer-hide":"",width:"1000"},model:{value:t.modal2,callback:function(e){t.modal2=e},expression:"modal2"}},[e("div",[e("div",{staticClass:"add-task"},[e("Button",{attrs:{type:"primary"},on:{click:function(e){return t.taskAdd()}}},[t._v("添加等级任务")])],1),e("div",[e("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(r){var n=r.row;return r.index,[e("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"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"action",fn:function(r){var n=r.row,a=r.index;return[e("a",{on:{click:function(e){return t.editTask(n,"编辑")}}},[t._v("编辑")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.delTask(n,"删除这条信息",a)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("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,"fce513d0",null);e.default=p.exports},a920:function(t,e,r){"use strict";r("c7df")},c7df:function(t,e,r){}}]); |