chunk-5e9b84c6.1e9e5d71.js 29 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-5e9b84c6"],{"31b4":function(t,e,r){"use strict";var n=r("f3f3"),o=(r("d3b7"),r("159b"),r("30ba")),i=(o=r.n(o),r("6b6c")),a=r("2f62");o={name:"edit",components:{formCreate:o.a.$form()},computed:Object(n.a)({},Object(a.d)("userLevel",["taskId","levelId"])),props:{FromData:{type:Object,default:null},update:{type:Boolean,default:!0}},watch:{FromData:function(){this.FromData.rules.forEach((function(t){t.title+=":"}))}},data:function(){return{modals:!1,type:0,loading:!1,fapi:null,config:{form:{labelWidth:"100px"},resetBtn:!1,submitBtn:!1,global:{upload:{props:{onSuccess:function(t,e){200===t.status?e.url=t.data.src:this.$message.error(t.msg)}}}}}}},methods:{couponsType:function(){this.$parent.addType(this.type)},formSubmit:function(){this.fapi.submit()},onSubmit:function(t){var e=this;this.loading||(this.loading=!0,Object(i.a)({url:this.FromData.action,method:this.FromData.method,data:t}).then((function(t){e.update&&e.$parent.getList(),e.$message.success(t.msg),e.modals=!1,setTimeout((function(){e.$emit("submitFail"),e.loading=!1}),1e3)})).catch((function(t){e.loading=!1,e.$message.error(t.msg)})))},cancel:function(){this.type=0}}},r("6a61"),n=r("2877"),a=Object(n.a)(o,(function(){var t=this,e=t.$createElement;e=t._self._c||e;return t.FromData?e("div",[e("el-dialog",{attrs:{visible:t.modals,title:t.FromData.title,"z-index":1,width:"720px"},on:{"update:visible":function(e){t.modals=e},closed:t.cancel}},[["/marketing/coupon/save.html"===t.FromData.action?e("div",{staticClass:"radio acea-row row-middle"},[e("div",{staticClass:"name ivu-form-item-content"},[t._v("优惠券类型")]),e("el-radio-group",{on:{input:t.couponsType},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[e("el-radio",{attrs:{label:0}},[t._v("通用券")]),e("el-radio",{attrs:{label:1}},[t._v("品类券")]),e("el-radio",{attrs:{label:2}},[t._v("商品券")])],1)],1):t._e()],e("form-create",{ref:"fc",staticClass:"formBox",attrs:{option:t.config,rule:Array.from(this.FromData.rules),handleIcon:"false"},on:{submit:t.onSubmit},model:{value:t.fapi,callback:function(e){t.fapi=e},expression:"fapi"}}),e("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[e("el-button",{on:{click:function(e){t.modals=!1}}},[t._v("取 消")]),e("el-button",{attrs:{type:"primary"},on:{click:t.formSubmit}},[t._v("确 定")])],1)],2)],1):t._e()}),[],!1,null,"58fdaf03",null);e.a=a.exports},"5cbd":function(t,e,r){"use strict";r.r(e);var n=r("0122"),o=r("c964"),i=r("f3f3"),a=(r("a434"),r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("3410"),r("d9e2"),r("159b"),r("b0c0"),r("131a"),r("fb6a"),r("2f62")),l=r("c24f");function s(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */s=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function u(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(e){u=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var i,a,l,s;e=e&&e.prototype instanceof m?e:m,e=Object.create(e.prototype),n=new L(n||[]);return o(e,"_invoke",{value:(i=t,a=r,l=n,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(l.method=t,l.arg=e;;){var r=l.delegate;if(r&&(r=function t(e,r){var n=r.method,o=e.iterator[n];return void 0===o?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f):(n=h(o,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,f):(o=n.arg,o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)))}(r,l),r)){if(r===f)continue;return r}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if("suspendedStart"===s)throw s="completed",l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);if(s="executing",r=h(i,a,l),"normal"===r.type){if(s=l.done?"completed":"suspendedYield",r.arg===f)continue;return{value:r.arg,done:l.done}}"throw"===r.type&&(s="completed",l.method="throw",l.arg=r.arg)}})}),e}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=d;var f={};function m(){}function p(){}function v(){}i={};var g=(u(i,a,(function(){return this})),Object.getPrototypeOf),b=(g=g&&g(g(F([]))),g&&g!==e&&r.call(g,a)&&(i=g),v.prototype=m.prototype=Object.create(i));function w(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){var i;o(this,"_invoke",{value:function(o,a){function l(){return new e((function(i,l){!function o(i,a,l,s){var c;i=h(t[i],t,a);if("throw"!==i.type)return(a=(c=i.arg).value)&&"object"==Object(n.a)(a)&&r.call(a,"__await")?e.resolve(a.__await).then((function(t){o("next",t,l,s)}),(function(t){o("throw",t,l,s)})):e.resolve(a).then((function(t){c.value=t,l(c)}),(function(t){return o("throw",t,l,s)}));s(i.arg)}(o,a,i,l)}))}return i=i?i.then(l,l):l()}})}function _(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function F(t){if(t){var e,n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:k}}function k(){return{value:void 0,done:!0}}return o(b,"constructor",{value:p.prototype=v,configurable:!0}),o(v,"constructor",{value:p,configurable:!0}),p.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,u(t,c,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(y.prototype),u(y.prototype,l,(function(){return this})),t.AsyncIterator=y,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new y(d(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),u(b,c,"Generator"),u(b,a,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=F,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;0<=o;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},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),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,x(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:F(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}var c={name:"task",components:{editFrom:r("31b4").a},data:function(){return{grid:{xl:10,lg:10,md:12,sm:24,xs:24},modals:!1,levelFrom:{is_show:"",name:"",page:1,limit:20},total:0,levelLists:[],loading:!1,FromData:null,ids:0,modalTitleSs:"",titleType:"task"}},computed:Object(i.a)(Object(i.a)(Object(i.a)({},Object(a.d)("media",["isMobile"])),Object(a.d)("userLevel",["levelId"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:Object(i.a)(Object(i.a)({},Object(a.c)("userLevel",["getTaskId","getlevelId"])),{},{add:function(){this.ids="",this.getFrom()},getFrom:function(){var t=this,e={id:this.ids,level_id:this.levelId};this.$modalForm(Object(l.e)(e)).then((function(){return t.getList()}))},edit:function(t){this.ids=t.id,this.getFrom()},handleReset:function(){this.modals=!1},userSearchs:function(){this.getList()},getList:function(){var t=this;this.loading=!0,this.levelFrom.is_show=this.levelFrom.is_show||"",Object(l.H)(this.levelId,this.levelFrom).then(function(){var e=Object(o.a)(s().mark((function e(r){var n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.levelLists=n.list,t.total=r.data.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)}))},onchangeIsShow:function(t){var e=this;t={id:t.id,is_show:t.is_show};Object(l.F)(t).then(function(){var t=Object(o.a)(s().mark((function t(r){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$message.success(r.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.msg)}))},onchangeIsMust:function(t){var e=this;t={id:t.id,is_must:t.is_must};Object(l.E)(t).then(function(){var t=Object(o.a)(s().mark((function t(r){return s().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$message.success(r.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.msg)}))},submitFail:function(){this.getList()},del:function(t,e,r){var n=this;e={title:e,num:r,url:"user/user_level/delete_task/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(e).then((function(t){n.$message.success(t.msg),n.levelLists.splice(r,1)})).catch((function(t){n.$message.error(t.msg)}))}})},u=r("2877");function d(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */d=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(e){c=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var i,a,l,s;e=e&&e.prototype instanceof m?e:m,e=Object.create(e.prototype),n=new L(n||[]);return o(e,"_invoke",{value:(i=t,a=r,l=n,s="suspendedStart",function(t,e){if("executing"===s)throw new Error("Generator is already running");if("completed"===s){if("throw"===t)throw e;return k()}for(l.method=t,l.arg=e;;){var r=l.delegate;if(r&&(r=function t(e,r){var n=r.method,o=e.iterator[n];return void 0===o?(r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=void 0,t(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f):(n=h(o,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,f):(o=n.arg,o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=void 0),r.delegate=null,f):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,f)))}(r,l),r)){if(r===f)continue;return r}if("next"===l.method)l.sent=l._sent=l.arg;else if("throw"===l.method){if("suspendedStart"===s)throw s="completed",l.arg;l.dispatchException(l.arg)}else"return"===l.method&&l.abrupt("return",l.arg);if(s="executing",r=h(i,a,l),"normal"===r.type){if(s=l.done?"completed":"suspendedYield",r.arg===f)continue;return{value:r.arg,done:l.done}}"throw"===r.type&&(s="completed",l.method="throw",l.arg=r.arg)}})}),e}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var f={};function m(){}function p(){}function v(){}i={};var g=(c(i,a,(function(){return this})),Object.getPrototypeOf),b=(g=g&&g(g(F([]))),g&&g!==e&&r.call(g,a)&&(i=g),v.prototype=m.prototype=Object.create(i));function w(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function y(t,e){var i;o(this,"_invoke",{value:function(o,a){function l(){return new e((function(i,l){!function o(i,a,l,s){var c;i=h(t[i],t,a);if("throw"!==i.type)return(a=(c=i.arg).value)&&"object"==Object(n.a)(a)&&r.call(a,"__await")?e.resolve(a.__await).then((function(t){o("next",t,l,s)}),(function(t){o("throw",t,l,s)})):e.resolve(a).then((function(t){c.value=t,l(c)}),(function(t){return o("throw",t,l,s)}));s(i.arg)}(o,a,i,l)}))}return i=i?i.then(l,l):l()}})}function _(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 x(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function L(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function F(t){if(t){var e,n=t[a];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length))return e=-1,(n=function n(){for(;++e<t.length;)if(r.call(t,e))return n.value=t[e],n.done=!1,n;return n.value=void 0,n.done=!0,n}).next=n}return{next:k}}function k(){return{value:void 0,done:!0}}return o(b,"constructor",{value:p.prototype=v,configurable:!0}),o(v,"constructor",{value:p,configurable:!0}),p.displayName=c(v,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,c(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(y.prototype),c(y.prototype,l,(function(){return this})),t.AsyncIterator=y,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new y(u(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),c(b,s,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e,r=Object(t),n=[];for(e in r)n.push(e);return n.reverse(),function t(){for(;n.length;){var e=n.pop();if(e in r)return t.value=e,t.done=!1,t}return t.done=!0,t}},t.values=F,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(x),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(r,n){return a.type="throw",a.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var o=this.tryEntries.length-1;0<=o;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=r.call(i,"catchLoc"),s=r.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}var a=(i=i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},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),f},finish:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),x(r),f}},catch:function(t){for(var e=this.tryEntries.length-1;0<=e;--e){var r,n,o=this.tryEntries[e];if(o.tryLoc===t)return"throw"===(r=o.completion).type&&(n=r.arg,x(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:F(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),f}},t}c={name:"user_level",components:{taskList:Object(u.a)(c,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-dialog",{attrs:{visible:t.modals,title:"等级任务","close-on-click-modal":!1,width:"1000px"},on:{"update:visible":function(e){t.modals=e},closed:t.handleReset}},[r("el-form",{ref:"levelFrom",attrs:{model:t.levelFrom,"label-width":t.labelWidth,"label-position":t.labelPosition},nativeOn:{submit:function(t){t.preventDefault()}}},[r("el-row",{attrs:{gutter:24}},[r("el-col",t._b({},"el-col",t.grid,!1),[r("el-form-item",{attrs:{label:"等级状态:"}},[r("el-select",{attrs:{placeholder:"是否显示",clearable:""},on:{change:t.userSearchs},model:{value:t.levelFrom.is_show,callback:function(e){t.$set(t.levelFrom,"is_show",e)},expression:"levelFrom.is_show"}},[r("el-option",{attrs:{value:"1",label:"显示"}}),r("el-option",{attrs:{value:"0",label:"不显示"}})],1)],1)],1),r("el-col",t._b({},"el-col",t.grid,!1),[r("el-form-item",{attrs:{label:"等级名称:",prop:"status2","label-for":"status2"}},[r("el-input",{staticStyle:{width:"100%"},attrs:{search:"","enter-button":"",placeholder:"请输入等级名称"},on:{"on-search":t.userSearchs},model:{value:t.levelFrom.name,callback:function(e){t.$set(t.levelFrom,"name",e)},expression:"levelFrom.name"}})],1)],1)],1)],1),r("el-divider",{attrs:{direction:"vertical",dashed:""}}),r("el-row",[r("el-col",t._b({staticClass:"mb15"},"el-col",t.grid,!1),[r("el-button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加等级任务")])],1),r("el-col",{staticClass:"userAlert",attrs:{span:24}},[r("el-alert",{attrs:{"show-icon":"",closable:""}},[r("template",{slot:"title"},[r("div",[t._v("添加等级任务,任务类型中的{$num}会自动替换成限定数量+系统预设的单位生成任务名")])])],2)],1)],1),r("el-divider",{attrs:{direction:"vertical",dashed:""}}),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",attrs:{data:t.levelLists,"no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[r("el-table-column",{attrs:{label:"ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.id))])]}}])}),r("el-table-column",{attrs:{label:"等级名称","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.level_name))])]}}])}),r("el-table-column",{attrs:{label:"任务名称","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.name))])]}}])}),r("el-table-column",{attrs:{label:"是否显示","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,value:e.row.is_show,size:"large","active-text":"显示","inactive-text":"隐藏"},on:{change:function(r){return t.onchangeIsShow(e.row)}},model:{value:e.row.is_show,callback:function(r){t.$set(e.row,"is_show",r)},expression:"scope.row.is_show"}})]}}])}),r("el-table-column",{attrs:{label:"务必达成","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-switch",{staticClass:"defineSwitch",attrs:{"active-value":1,"inactive-value":0,value:e.row.is_must,"true-value":1,"false-value":0,size:"large","active-text":"全部","inactive-text":"其一"},on:{change:function(r){return t.onchangeIsMust(e.row)}},model:{value:e.row.is_must,callback:function(r){t.$set(e.row,"is_must",r)},expression:"scope.row.is_must"}})]}}])}),r("el-table-column",{attrs:{label:"任务说明","min-width":"130"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.illustrate))])]}}])}),r("el-table-column",{attrs:{label:"操作",fixed:"right",width:"170"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("a",{on:{click:function(r){return t.edit(e.row)}}},[t._v("编辑 | ")]),r("a",{on:{click:function(r){return t.del(e.row,"删除等级任务",t.index)}}},[t._v(" 删除")])]}}])})],1),r("div",{staticClass:"acea-row row-right page"},[t.total?r("pagination",{attrs:{total:t.total,page:t.levelFrom.page,limit:t.levelFrom.limit},on:{"update:page":function(e){return t.$set(t.levelFrom,"page",e)},"update:limit":function(e){return t.$set(t.levelFrom,"limit",e)},pagination:t.getList}}):t._e()],1),r("edit-from",{ref:"edits",attrs:{FromData:t.FromData,titleType:t.titleType},on:{submitFail:t.submitFail}})],1)}),[],!1,null,"3467de02",null).exports},data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,levelFrom:{is_show:"",title:"",page:1,limit:15},levelLists:[],total:0,FromData:null,imgName:"",visible:!1,levelId:0,modalTitleSs:"",titleType:"level",modelTask:!1,num:0}},created:function(){this.getList()},computed:Object(i.a)(Object(i.a)({},Object(a.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:"80px"},labelPosition:function(){return this.isMobile?"top":"right"}}),methods:Object(i.a)(Object(i.a)({},Object(a.c)("userLevel",["getlevelId"])),{},{changeMenu:function(t,e,r){switch(this.levelId=t.id,e){case"1":this.getlevelId(this.levelId),this.$refs.tasks.modals=!0,this.$refs.tasks.getList();break;case"3":this.edit(t);break;default:this.del(t,"删除等级",r)}},del:function(t,e,r){var n=this;e={title:e,num:r,url:"user/user_level/delete/".concat(t.id),method:"put",ids:""};this.$modalSure(e).then((function(t){n.$message.success(t.msg),n.levelLists.splice(r,1),n.total--})).catch((function(t){n.$message.error(t.msg)}))},onchangeIsShow:function(t){var e=this;t={id:t.id,is_show:t.is_show};Object(l.D)(t).then(function(){var t=Object(o.a)(d().mark((function t(r){return d().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.$message.success(r.msg);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.$message.error(t.msg)}))},getList:function(){var t=this;this.loading=!0,this.levelFrom.is_show=this.levelFrom.is_show||"",Object(l.p)(this.levelFrom).then(function(){var e=Object(o.a)(d().mark((function e(r){var n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r.data,t.levelLists=n.list,t.total=r.data.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)}))},add:function(){var t=this;this.levelId=0,this.$modalForm(Object(l.d)({id:this.levelId})).then((function(){return t.getList()}))},edit:function(t){var e=this;this.levelId=t.id,this.$modalForm(Object(l.d)({id:this.levelId})).then((function(){return e.getList()})),this.getlevelId(this.levelId)},userSearchs:function(){this.levelFrom.page=1,this.getList()},submitFail:function(){this.getList()}})},r("9ffd"),i=Object(u.a)(c,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("el-card",{staticClass:"ivu-mt",attrs:{bordered:!1,shadow:"never","body-style":{padding:0}}},[r("div",{staticClass:"padding-add"},[r("el-form",{ref:"levelFrom",attrs:{model:t.levelFrom,"label-width":t.labelWidth,"label-position":t.labelPosition,inline:""},nativeOn:{submit:function(t){t.preventDefault()}}},[r("el-form-item",{attrs:{label:"等级状态:","label-for":"status1"}},[r("el-select",{staticClass:"form_content_width",attrs:{placeholder:"请选择",clearable:"","element-id":"status1"},on:{change:t.userSearchs},model:{value:t.levelFrom.is_show,callback:function(e){t.$set(t.levelFrom,"is_show",e)},expression:"levelFrom.is_show"}},[r("el-option",{attrs:{value:"1",label:"显示"}}),r("el-option",{attrs:{value:"0",label:"不显示"}})],1)],1),r("el-form-item",{attrs:{label:"等级名称:","label-for":"title"}},[r("el-input",{staticClass:"form_content_width",attrs:{clearable:"",placeholder:"请输入等级名称"},model:{value:t.levelFrom.title,callback:function(e){t.$set(t.levelFrom,"title",e)},expression:"levelFrom.title"}})],1),r("el-form-item",[r("el-button",{attrs:{type:"primary"},on:{click:t.userSearchs}},[t._v("查询")])],1)],1)],1)]),r("el-card",{staticClass:"ivu-mt mt16",attrs:{bordered:!1,shadow:"never"}},[r("el-button",{directives:[{name:"auth",rawName:"v-auth",value:["admin-user-level_add"],expression:"['admin-user-level_add']"}],attrs:{type:"primary"},on:{click:t.add}},[t._v("添加用户等级")]),r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"table",staticClass:"mt14",attrs:{data:t.levelLists,"highlight-current-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"}},[r("el-table-column",{attrs:{label:"ID",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.id))])]}}])}),r("el-table-column",{attrs:{label:"等级图标","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(t){return[r("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.row.icon,expression:"scope.row.icon"}]})])]}}])}),r("el-table-column",{attrs:{label:"等级背景图","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(t){return[r("div",{directives:[{name:"viewer",rawName:"v-viewer"}],staticClass:"tabBox_img"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.row.image,expression:"scope.row.image"}]})])]}}])}),r("el-table-column",{attrs:{label:"等级名称","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.name))])]}}])}),r("el-table-column",{attrs:{label:"等级","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.grade))])]}}])}),r("el-table-column",{attrs:{label:"享受折扣","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.discount))])]}}])}),r("el-table-column",{attrs:{label:"经验值要求","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("span",[t._v(t._s(e.row.exp_num))])]}}])}),r("el-table-column",{attrs:{label:"是否显示","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-switch",{attrs:{"active-value":1,"inactive-value":0,value:e.row.is_show,size:"large"},on:{change:function(r){return t.onchangeIsShow(e.row)}},model:{value:e.row.is_show,callback:function(r){t.$set(e.row,"is_show",r)},expression:"scope.row.is_show"}})]}}])}),r("el-table-column",{attrs:{fixed:"right",label:"操作",width:"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[r("el-dropdown",{attrs:{size:"small",transfer:!0},on:{command:function(r){return t.changeMenu(e.row,r,e.$index)}}},[r("span",{staticClass:"el-dropdown-link"},[t._v("更多"),r("i",{staticClass:"el-icon-arrow-down el-icon--right"})]),r("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},[r("el-dropdown-item",{attrs:{command:"3"}},[t._v("编辑等级")]),r("el-dropdown-item",{attrs:{command:"2"}},[t._v("删除等级")])],1)],1)]}}])})],1),r("div",{staticClass:"acea-row row-right page"},[t.total?r("pagination",{attrs:{total:t.total,page:t.levelFrom.page,limit:t.levelFrom.limit},on:{"update:page":function(e){return t.$set(t.levelFrom,"page",e)},"update:limit":function(e){return t.$set(t.levelFrom,"limit",e)},pagination:t.getList}}):t._e()],1)],1),r("task-list",{ref:"tasks"})],1)}),[],!1,null,"2e4b0a78",null),e.default=i.exports},"6a61":function(t,e,r){"use strict";var n=r("c23d");r.n(n).a},"9ffd":function(t,e,r){"use strict";var n=r("bab2");r.n(n).a},bab2:function(t,e,r){},c23d:function(t,e,r){}}]);