3 行
22 KiB
JavaScript
可执行文件
3 行
22 KiB
JavaScript
可执行文件
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-50ba1080"],{"0c47":function(t,e,n){"use strict";var o=n("da84"),r=n("d44e");r(o.JSON,"JSON",!0)},"110b":function(t,e,n){"use strict";n("9fd9")},"131a":function(t,e,n){"use strict";var o=n("23e7"),r=n("d2bb");o({target:"Object",stat:!0},{setPrototypeOf:r})},"159b":function(t,e,n){"use strict";var o=n("da84"),r=n("fdbc"),a=n("785a"),i=n("17c2"),c=n("9112"),l=function(t){if(t&&t.forEach!==i)try{c(t,"forEach",i)}catch(e){t.forEach=i}};for(var s in r)r[s]&&l(o[s]&&o[s].prototype);l(a)},"17c2":function(t,e,n){"use strict";var o=n("b727").forEach,r=n("a640"),a=r("forEach");t.exports=a?[].forEach:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}},"1da1":function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n("d3b7");function o(t,e,n,o,r,a,i){try{var c=t[a](i),l=c.value}catch(s){return void n(s)}c.done?e(l):Promise.resolve(l).then(o,r)}function r(t){return function(){var e=this,n=arguments;return new Promise((function(r,a){var i=t.apply(e,n);function c(t){o(i,r,a,c,l,"next",t)}function l(t){o(i,r,a,c,l,"throw",t)}c(void 0)}))}}},"1f68":function(t,e,n){"use strict";var o=n("83ab"),r=n("edd0"),a=n("861d"),i=n("1787"),c=n("7b0b"),l=n("1d80"),s=Object.getPrototypeOf,u=Object.setPrototypeOf,f=Object.prototype,p="__proto__";if(o&&s&&u&&!(p in f))try{r(f,p,{configurable:!0,get:function(){return s(c(this))},set:function(t){var e=l(this);i(t)&&a(e)&&u(e,t)}})}catch(d){}},"23dc":function(t,e,n){"use strict";var o=n("d44e");o(Math,"Math",!0)},"2e677":function(t,e,n){},3410:function(t,e,n){"use strict";var o=n("23e7"),r=n("d039"),a=n("7b0b"),i=n("e163"),c=n("e177"),l=r((function(){i(1)}));o({target:"Object",stat:!0,forced:l,sham:!c},{getPrototypeOf:function(t){return i(a(t))}})},"53ca":function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));n("a4d3"),n("e01a"),n("d28b"),n("d3b7"),n("3ca3"),n("ddb0");function o(t){return o="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},o(t)}},"77c3":function(t,e,n){"use strict";n("2e677")},"944a":function(t,e,n){"use strict";var o=n("d066"),r=n("e065"),a=n("d44e");r("toStringTag"),a(o("Symbol"),"Symbol")},"9fd9":function(t,e,n){},a15b:function(t,e,n){"use strict";var o=n("23e7"),r=n("e330"),a=n("44ad"),i=n("fc6a"),c=n("a640"),l=r([].join),s=a!==Object,u=s||!c("join",",");o({target:"Array",proto:!0,forced:u},{join:function(t){return l(i(this),void 0===t?",":t)}})},a640:function(t,e,n){"use strict";var o=n("d039");t.exports=function(t,e){var n=[][t];return!!n&&o((function(){n.call(null,e||function(){return 1},1)}))}},b636:function(t,e,n){"use strict";var o=n("e065");o("asyncIterator")},c7eb:function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));n("a4d3"),n("e01a"),n("b636"),n("d28b"),n("944a"),n("d9e2"),n("14d9"),n("fb6a"),n("b0c0"),n("0c47"),n("23dc"),n("3410"),n("1f68"),n("131a"),n("d3b7"),n("3ca3"),n("159b"),n("ddb0");var o=n("53ca");function r(){
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
r=function(){return e};var t,e={},n=Object.prototype,a=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",u=c.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,n){return t[e]=n}}function p(t,e,n,o){var r=e&&e.prototype instanceof y?e:y,a=Object.create(r.prototype),c=new R(o||[]);return i(a,"_invoke",{value:j(t,n,c)}),a}function d(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var m="suspendedStart",h="suspendedYield",b="executing",g="completed",v={};function y(){}function C(){}function w(){}var x={};f(x,l,(function(){return this}));var D=Object.getPrototypeOf,k=D&&D(D($([])));k&&k!==n&&a.call(k,l)&&(x=k);var _=w.prototype=y.prototype=Object.create(x);function S(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function O(t,e){function n(r,i,c,l){var s=d(t[r],t,i);if("throw"!==s.type){var u=s.arg,f=u.value;return f&&"object"==Object(o["a"])(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){n("next",t,c,l)}),(function(t){n("throw",t,c,l)})):e.resolve(f).then((function(t){u.value=t,c(u)}),(function(t){return n("throw",t,c,l)}))}l(s.arg)}var r;i(this,"_invoke",{value:function(t,o){function a(){return new e((function(e,r){n(t,o,e,r)}))}return r=r?r.then(a,a):a()}})}function j(e,n,o){var r=m;return function(a,i){if(r===b)throw new Error("Generator is already running");if(r===g){if("throw"===a)throw i;return{value:t,done:!0}}for(o.method=a,o.arg=i;;){var c=o.delegate;if(c){var l=T(c,o);if(l){if(l===v)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(r===m)throw r=g,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r=b;var s=d(e,n,o);if("normal"===s.type){if(r=o.done?g:h,s.arg===v)continue;return{value:s.arg,done:o.done}}"throw"===s.type&&(r=g,o.method="throw",o.arg=s.arg)}}}function T(e,n){var o=n.method,r=e.iterator[o];if(r===t)return n.delegate=null,"throw"===o&&e.iterator["return"]&&(n.method="return",n.arg=t,T(e,n),"throw"===n.method)||"return"!==o&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+o+"' method")),v;var a=d(r,e.iterator,n.arg);if("throw"===a.type)return n.method="throw",n.arg=a.arg,n.delegate=null,v;var i=a.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,v):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,v)}function L(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 E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function $(e){if(e||""===e){var n=e[l];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function n(){for(;++r<e.length;)if(a.call(e,r))return n.value=e[r],n.done=!1,n;return n.value=t,n.done=!0,n};return i.next=i}}throw new TypeError(Object(o["a"])(e)+" is not iterable")}return C.prototype=w,i(_,"constructor",{value:w,configurable:!0}),i(w,"constructor",{value:C,configurable:!0}),C.displayName=f(w,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,w):(t.__proto__=w,f(t,u,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},S(O.prototype),f(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,o,r,a){void 0===a&&(a=Promise);var i=new O(p(t,n,o,r),a);return e.isGeneratorFunction(n)?i:i.next().then((function(t){return t.done?t.value:i.next()}))},S(_),f(_,u,"Generator"),f(_,l,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var o in e)n.push(o);return n.reverse(),function t(){for(;n.length;){var o=n.pop();if(o in e)return t.value=o,t.done=!1,t}return t.done=!0,t}},e.values=$,R.prototype={constructor:R,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),!e)for(var n in this)"t"===n.charAt(0)&&a.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=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 n=this;function o(o,r){return c.type="throw",c.arg=e,n.next=o,r&&(n.method="next",n.arg=t),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],c=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var l=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(l&&s){if(this.prev<i.catchLoc)return o(i.catchLoc,!0);if(this.prev<i.finallyLoc)return o(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return o(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return o(i.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var i=r?r.completion:{};return i.type=t,i.arg=e,r?(this.method="next",this.next=r.finallyLoc,v):this.complete(i)},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),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),E(n),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var r=o.arg;E(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,o){return this.delegate={iterator:$(e),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=t),v}},e}},df0e:function(t,e,n){"use strict";n.r(e);var o=function(){var t=this,e=t._self._c;return e("div",{attrs:{id:"gift-card"}},[e("el-form",{attrs:{model:t.componentData,"label-width":"80px","label-position":"top"}},[e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"上边距"}},[e("div",{staticStyle:{width:"100%","padding-left":"50px"}},[e("el-slider",{attrs:{max:50},model:{value:t.componentData.marginTop,callback:function(e){t.$set(t.componentData,"marginTop",e)},expression:"componentData.marginTop"}})],1)]),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"下边距"}},[e("div",{staticStyle:{width:"100%","padding-left":"50px"}},[e("el-slider",{attrs:{max:50},model:{value:t.componentData.marginBottom,callback:function(e){t.$set(t.componentData,"marginBottom",e)},expression:"componentData.marginBottom"}})],1)]),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"左右边距"}},[e("div",{staticStyle:{width:"100%","padding-left":"50px"}},[e("el-slider",{attrs:{max:50},model:{value:t.componentData.marginLR,callback:function(e){t.$set(t.componentData,"marginLR",e)},expression:"componentData.marginLR"}})],1)]),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"组件圆角(px)"}},[e("div",{staticStyle:{width:"100%","padding-left":"50px"}},[e("el-slider",{attrs:{max:50},model:{value:t.componentData.borderRadius,callback:function(e){t.$set(t.componentData,"borderRadius",e)},expression:"componentData.borderRadius"}})],1)]),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"背景颜色"}},[e("el-color-picker",{attrs:{"show-alpha":"",predefine:this.$root.predefineColors},on:{"active-change":t.backgroundColorChange},model:{value:t.componentData.backgroundColor,callback:function(e){t.$set(t.componentData,"backgroundColor",e)},expression:"componentData.backgroundColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:t.backgroundColorReset}},[t._v("重置")])],1),e("el-form-item",{attrs:{label:"标题"}},[e("el-input",{attrs:{placeholder:"不填写默认为'礼品卡'"},model:{value:t.componentData.title,callback:function(e){t.$set(t.componentData,"title",e)},expression:"componentData.title"}})],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"标题文字颜色"}},[e("el-color-picker",{attrs:{predefine:this.$root.predefineColors},on:{"active-change":function(e){return t.colorChange(e,"titleTextColor")}},model:{value:t.componentData.titleTextColor,callback:function(e){t.$set(t.componentData,"titleTextColor",e)},expression:"componentData.titleTextColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:function(e){return t.colorReset("#333","titleTextColor")}}},[t._v("重置")])],1),e("el-form-item",{attrs:{label:"描述内容"}},[e("el-input",{attrs:{placeholder:"建议不要超过10个字"},model:{value:t.componentData.desc,callback:function(e){t.$set(t.componentData,"desc",e)},expression:"componentData.desc"}})],1),e("el-form-item",{attrs:{label:"按钮文字"}},[e("el-input",{attrs:{placeholder:"建议不要超过4个字"},model:{value:t.componentData.buttonText,callback:function(e){t.$set(t.componentData,"buttonText",e)},expression:"componentData.buttonText"}})],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"文字颜色"}},[e("el-color-picker",{attrs:{predefine:this.$root.predefineColors},on:{"active-change":t.buttonTextColorChange},model:{value:t.componentData.buttonTextColor,callback:function(e){t.$set(t.componentData,"buttonTextColor",e)},expression:"componentData.buttonTextColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:t.buttonTextColorReset}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"按钮背景颜色"}},[e("el-color-picker",{attrs:{"show-alpha":"",predefine:this.$root.predefineColors},on:{"active-change":t.buttonColorChange},model:{value:t.componentData.buttonColor,callback:function(e){t.$set(t.componentData,"buttonColor",e)},expression:"componentData.buttonColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:t.buttonColorReset}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"按钮边框颜色"}},[e("el-color-picker",{attrs:{"show-alpha":"",predefine:this.$root.predefineColors},on:{"active-change":t.buttonBorderColorChange},model:{value:t.componentData.buttonBorderColor,callback:function(e){t.$set(t.componentData,"buttonBorderColor",e)},expression:"componentData.buttonBorderColor"}}),e("el-link",{attrs:{type:"primary"},on:{click:t.buttonBorderColorReset}},[t._v("重置")])],1),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"图片圆角"}},[e("div",{staticStyle:{width:"100%","padding-left":"20px","box-sizing":"border-box"}},[e("el-slider",{attrs:{max:50},model:{value:t.componentData.imgRadius,callback:function(e){t.$set(t.componentData,"imgRadius",e)},expression:"componentData.imgRadius"}})],1)]),e("el-form-item",{staticClass:"form-item-content-inline",attrs:{label:"自定义礼品卡"}},[e("div",{staticClass:"viewMoreSwitch"},[e("p",[t._v(t._s(t.componentData.customize?"手动设置礼品卡":"自动获取最新礼品卡"))]),e("el-switch",{model:{value:t.componentData.customize,callback:function(e){t.$set(t.componentData,"customize",e)},expression:"componentData.customize"}})],1)]),t.componentData.customize?[e("el-form-item",{attrs:{label:"添加礼品卡"}},[e("draggable",{staticClass:"items-list",attrs:{forceFallback:"true",delay:"50",filter:".select"},model:{value:t.componentData.ids,callback:function(e){t.$set(t.componentData,"ids",e)},expression:"componentData.ids"}},[t.componentData.ids&&t.items[t.componentData.ids[0]]?t._l(t.componentData.ids,(function(n,o){return e("div",{key:o,staticClass:"items"},[e("el-image",{attrs:{src:t.items[n].img_url,fit:"fill"},scopedSlots:t._u([{key:"error",fn:function(){return[e("el-image",{staticClass:"img",attrs:{src:t.errorImage}})]},proxy:!0}],null,!0)}),e("div",{staticClass:"close",on:{click:function(e){return t.deleteItem(o)}}},[e("i",{staticClass:"el-icon-error"})])],1)})):t._e(),e("div",{staticClass:"items select",on:{click:function(e){t.itemsSelectDialog=!0}}},[e("i",{staticClass:"el-icon-plus"})])],2)],1),e("giftCardDialog",{attrs:{visible:t.itemsSelectDialog,selection:"true"},on:{"update:visible":function(e){t.itemsSelectDialog=e},giftCardSelect:t.onGiftCardSelect}})]:t._e()],2)],1)},r=[],a=n("c7eb"),i=n("2909"),c=n("b85c"),l=n("1da1"),s=(n("99af"),n("a15b"),n("14d9"),n("a434"),n("d3b7"),n("b76a")),u=n.n(s),f=n("ec96"),p={name:"diy-gift-card",props:["componentData"],data:function(){return{itemsSelectDialog:!1,errorImage:"/Public/images/empty-image-1.png",items:{}}},methods:{backgroundColorChange:function(t){this.componentData.backgroundColor=t},backgroundColorReset:function(){this.componentData.backgroundColor="rgba(255,255,255,1)"},colorChange:function(t,e){console.log(t,e),this.componentData[e]=t},colorReset:function(t,e){this.componentData[e]=t},buttonTextColorChange:function(t){this.componentData.buttonTextColor=t},buttonColorChange:function(t){this.componentData.buttonColor=t},buttonBorderColorChange:function(t){this.componentData.buttonBorderColor=t},buttonTextColorReset:function(){this.componentData.buttonTextColor="#000"},buttonColorReset:function(){this.componentData.buttonColor="#f8f8f8"},buttonBorderColorReset:function(){this.componentData.buttonBorderColor="rgb(200,200,200)"},onGiftCardSelect:function(t){var e=this;return Object(l["a"])(Object(a["a"])().mark((function n(){var o,r,l,s;return Object(a["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(!(t&&t.length>0)){n.next=7;break}o=[],r=Object(c["a"])(t);try{for(r.s();!(l=r.n()).done;)s=l.value,o.push(s.id)}catch(a){r.e(a)}finally{r.f()}return n.next=6,e.getItems([].concat(o,Object(i["a"])(e.componentData.ids)));case 6:e.componentData.ids=e.componentData.ids.concat(o);case 7:case"end":return n.stop()}}),n)})))()},deleteItem:function(t){this.componentData.ids.splice(t,1),this.componentData.ids=Object(i["a"])(this.componentData.ids)},getItems:function(t){var e=this;return Object(l["a"])(Object(a["a"])().mark((function n(){return Object(a["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(t&&0!=t.length){n.next=2;break}return n.abrupt("return");case 2:return n.abrupt("return",new Promise((function(n){e.$http.post("/SmallProgramApi/Diy/getGiftCard",{ids:t.join(",")}).then((function(o){if(1==o.data.status){var r=o.data.data;e.items={};var a,i=Object(c["a"])(r);try{for(i.s();!(a=i.n()).done;){var l=a.value;e.items[l.id]=l}}catch(s){i.e(s)}finally{i.f()}e.compareIdsAndRealData(t,e.items),n(1)}}))})));case 3:case"end":return n.stop()}}),n)})))()},compareIdsAndRealData:function(t,e){if(t.length!=e.length)for(var n in t)e[t[n]]||this.deleteGoods(n)}},mounted:function(){this.getItems(this.componentData.ids)},components:{draggable:u.a,giftCardDialog:f["a"]}},d=p,m=(n("77c3"),n("2877")),h=Object(m["a"])(d,o,r,!1,null,"5a76ad4e",null);e["default"]=h.exports},ec96:function(t,e,n){"use strict";var o=function(){var t=this,e=t._self._c;return e("el-dialog",{staticClass:"common-gift-card-dialog",attrs:{title:"礼品卡选择",width:"920px",top:"5vh",visible:t.childrenVisible,"append-to-body":""},on:{"update:visible":function(e){t.childrenVisible=e},close:t.onClose},scopedSlots:t._u([{key:"footer",fn:function(){return[e("el-pagination",{attrs:{background:"","page-size":8,layout:"prev, pager, next, jumper",total:t.total,"hide-on-single-page":""},on:{"current-change":t.paginationCurrentChange}}),e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.dialogClose}},[t._v("确定")])]},proxy:!0}])},[e("el-input",{staticStyle:{width:"220px"},attrs:{size:"small",clearable:"",placeholder:"礼品卡名称"},nativeOn:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:(e.preventDefault(),t.getTableData(1))}},model:{value:t.keyword,callback:function(e){t.keyword=e},expression:"keyword"}},[e("template",{slot:"append"},[e("el-button",{attrs:{icon:"el-icon-search"},on:{click:function(e){return t.getTableData(1)}}})],1)],2),e("el-table",{ref:"multipleTable",staticStyle:{width:"100%"},attrs:{data:t.tableData,"tooltip-effect":"light"},on:{"selection-change":t.selectionChange}},[t.selection?e("el-table-column",{attrs:{type:"selection",width:"55"}}):t._e(),t.radio?e("el-table-column",{attrs:{width:"55"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-radio",{attrs:{label:n.$index},on:{change:t.tableRadioChange},model:{value:t.tableRadio,callback:function(e){t.tableRadio=e},expression:"tableRadio"}})]}}],null,!1,861188003)}):t._e(),e("el-table-column",{attrs:{label:"礼品卡图标",width:"100"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-image",{staticClass:"img",attrs:{src:n.row.img_url},scopedSlots:t._u([{key:"error",fn:function(){return[e("el-image",{staticClass:"img",attrs:{src:t.errorImage}})]},proxy:!0}],null,!0)})]}}])}),e("el-table-column",{attrs:{prop:"title",label:"标题",width:"350"}}),e("el-table-column",{attrs:{prop:"start_time",label:"有效起始时间",width:"180"}}),e("el-table-column",{attrs:{prop:"end_time",label:"有效结束时间",width:"180"}})],1)],1)},r=[],a={name:"gift-card-dialog",props:["visible","selection","radio"],watch:{visible:{handler:function(t){this.childrenVisible=t},immediate:!0},childrenVisible:function(t){this.$emit("update:visible",t)}},mounted:function(){this.getTableData()},data:function(){return{tableData:[],multipleSelection:[],childrenVisible:!1,total:0,errorImage:"/Public/images/empty-image-1.png",tableRadio:"",keyword:""}},methods:{getTableData:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.$http.post("/Retail/Diy/getGiftList",{page:e,keyword:this.keyword,limit:8}).then((function(e){1==e.data.status&&(t.tableData=e.data.data,t.total=e.data.count)}))},paginationCurrentChange:function(t){this.getTableData(t)},selectionChange:function(t){this.multipleSelection=t},dialogClose:function(){this.$emit("giftCardSelect",this.multipleSelection),this.$emit("update:visible",!1)},onClose:function(){this.$refs.multipleTable.clearSelection(),this.radio&&(this.multipleSelection=[]),this.tableRadio=""},tableRadioChange:function(t){this.multipleSelection=[this.tableData[t]]}}},i=a,c=(n("110b"),n("2877")),l=Object(c["a"])(i,o,r,!1,null,null,null);e["a"]=l.exports}}]); |