mirror of
https://github.com/crmeb/CRMEB.git
synced 2025-12-15 13:22:51 +00:00
1 line
10 KiB
JavaScript
1 line
10 KiB
JavaScript
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-2d0be348"],{"2eed":function(t,e,r){"use strict";r.r(e),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");var n=r("0122"),o=r("c964"),i=r("f3f3"),a=(r("d81d"),r("ac1f"),r("5319"),r("2f62")),c=r("6b6c");function u(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */u=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",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(e){l=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i,a,c,u;e=e&&e.prototype instanceof p?e:p,e=Object.create(e.prototype),n=new _(n||[]);return o(e,"_invoke",{value:(i=t,a=r,c=n,u="suspendedStart",function(t,e){if("executing"===u)throw new Error("Generator is already running");if("completed"===u){if("throw"===t)throw e;return O()}for(c.method=t,c.arg=e;;){var r=c.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")),d):(n=f(o,e.iterator,r.arg),"throw"===n.type?(r.method="throw",r.arg=n.arg,r.delegate=null,d):(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,d):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)))}(r,c),r)){if(r===d)continue;return r}if("next"===c.method)c.sent=c._sent=c.arg;else if("throw"===c.method){if("suspendedStart"===u)throw u="completed",c.arg;c.dispatchException(c.arg)}else"return"===c.method&&c.abrupt("return",c.arg);if(u="executing",r=f(i,a,c),"normal"===r.type){if(u=c.done?"completed":"suspendedYield",r.arg===d)continue;return{value:r.arg,done:c.done}}"throw"===r.type&&(u="completed",c.method="throw",c.arg=r.arg)}})}),e}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=h;var d={};function p(){}function m(){}function g(){}i={};var v=(l(i,a,(function(){return this})),Object.getPrototypeOf),y=(v=v&&v(v(E([]))),v&&v!==e&&r.call(v,a)&&(i=v),g.prototype=p.prototype=Object.create(i));function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function b(t,e){var i;o(this,"_invoke",{value:function(o,a){function c(){return new e((function(i,c){!function o(i,a,c,u){var s;i=f(t[i],t,a);if("throw"!==i.type)return(a=(s=i.arg).value)&&"object"==Object(n.a)(a)&&r.call(a,"__await")?e.resolve(a.__await).then((function(t){o("next",t,c,u)}),(function(t){o("throw",t,c,u)})):e.resolve(a).then((function(t){s.value=t,c(s)}),(function(t){return o("throw",t,c,u)}));u(i.arg)}(o,a,i,c)}))}return i=i?i.then(c,c):c()}})}function x(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function E(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:O}}function O(){return{value:void 0,done:!0}}return o(y,"constructor",{value:m.prototype=g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){return t="function"==typeof t&&t.constructor,!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,s,"GeneratorFunction")),t.prototype=Object.create(y),t},t.awrap=function(t){return{__await:t}},w(b.prototype),l(b.prototype,c,(function(){return this})),t.AsyncIterator=b,t.async=function(e,r,n,o,i){void 0===i&&(i=Promise);var a=new b(h(e,r,n,o),i);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(y),l(y,s,"Generator"),l(y,a,(function(){return this})),l(y,"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=E,_.prototype={constructor:_,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(L),!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 c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!u)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,d):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),d},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),L(r),d}},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,L(o)),n}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:E(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},t}i={name:"user_recharge",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},loading:!1,columns:[],from:{page:1,limit:15},dataList:[],total:0,methodApi:{},curdKey:""}},computed:Object(i.a)(Object(i.a)({},Object(a.d)("media",["isMobile"])),{},{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"left"}}),beforeRouteUpdate:function(t,e,r){this.from.page=1,this.getCrudApi(t.params.table_name),r()},created:function(){this.getCrudApi(this.$route.params.table_name)},methods:{getCrudApi:function(t){var e=this;t=t,Object(c.a)({url:"system/crud/config/".concat(t),method:"get"}).then((function(t){e.methodApi=t.data.route,e.curdKey=t.data.key,t.data.columns.push({title:"操作",slot:"action",fixed:"right",width:100,align:"center"}),t.data.columns.map((function(t){"frameImageOne"===t.from_type?t.render=function(e,r){return e("div",{class:"tabBox_img",directives:[{name:"viewer"}]},[e("img",{directives:[{name:"lazy",value:r.row[t.slot]}]})])}:"frameImages"===t.from_type&&(t.render=function(e,r){r=r.row[t.slot]||[];var n=[];return r.map((function(t){n.push(e("img",{directives:[{name:"lazy",value:t}]}))})),e("div",{class:"tabBox_img",directives:[{name:"viewer"}]},n)})})),e.columns=t.data.columns,e.getList()}))},add:function(){var t=this,e=this.methodApi.create;this.$modalForm((e=e,Object(c.a)({url:e,method:"get"}))).then((function(){return t.getList()}))},getList:function(){var t,e=this,r=(this.loading=!0,this.methodApi.index);r=r,t=this.from,Object(c.a)({url:r,method:"get",params:t}).then(function(){var t=Object(o.a)(u().mark((function t(r){var n;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=r.data,e.dataList=n.list,e.total=n.count,e.loading=!1;case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()).catch((function(t){e.loading=!1,e.$Message.error(t.msg)}))},pageChange:function(t){this.from.page=t,this.getList()},edit:function(t){var e=this;t=this.methodApi.edit.replace("<id>",t[this.curdKey]);this.$modalForm((t=t,Object(c.a)({url:t,method:"get"}))).then((function(){return e.getList()}))},del:function(t,e,r){var n=this;t=this.methodApi.delete.replace("<id>",t[this.curdKey]);this.$modalSure({title:e,num:r,url:t,method:"DELETE",ids:""}).then((function(t){n.$Message.success(t.msg),n.getList()})).catch((function(t){n.$Message.error(t.msg)}))}}},a=r("2877"),r=Object(a.a)(i,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("Row",{attrs:{type:"flex"}},[r("Col",t._b({},"Col",t.grid,!1),[r("Button",{attrs:{type:"primary",icon:"md-add"},on:{click:t.add}},[t._v("添加")])],1)],1),r("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns,data:t.dataList,loading:t.loading,"highlight-row":"","no-userFrom-text":"暂无数据","no-filtered-userFrom-text":"暂无筛选结果"},scopedSlots:t._u([{key:"action",fn:function(e){var n=e.row,o=e.index;return[r("a",{on:{click:function(e){return t.edit(n)}}},[t._v("修改")]),r("Divider",{attrs:{type:"vertical"}}),r("a",{on:{click:function(e){return t.del(n,"删除",o)}}},[t._v("删除")])]}}])}),r("div",{staticClass:"acea-row row-right page"},[r("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.from.limit},on:{"on-change":t.pageChange}})],1)],1)],1)}),[],!1,null,"6de7f9b7",null),e.default=r.exports}}]); |