(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-45ed0cf8"],{"1b00":function(t,e,r){"use strict";r("cfa7")},"7f9c":function(t,e,r){"use strict";r.r(e);var o=r("2f62"),n=r("c4c8");function a(t){return(a="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 i(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */i=function(){return e};var t,e={},r=Object.prototype,o=r.hasOwnProperty,n=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=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,o){var a=e&&e.prototype instanceof y?e:y,i=Object.create(a.prototype),s=new F(o||[]);return n(i,"_invoke",{value:P(t,r,s)}),i}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 m="suspendedStart",p="suspendedYield",b="executing",v="completed",g={};function y(){}function _(){}function w(){}var x={};f(x,l,(function(){return this}));var k=Object.getPrototypeOf,L=k&&k(k(M([])));L&&L!==r&&o.call(L,l)&&(x=L);var O=w.prototype=y.prototype=Object.create(x);function C(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(n,i,s,l){var c=d(t[n],t,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==a(f)&&o.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,s,l)}),(function(t){r("throw",t,s,l)})):e.resolve(f).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,l)}))}l(c.arg)}var i;n(this,"_invoke",{value:function(t,o){function n(){return new e((function(e,n){r(t,o,e,n)}))}return i=i?i.then(n,n):n()}})}function P(e,r,o){var n=m;return function(a,i){if(n===b)throw Error("Generator is already running");if(n===v){if("throw"===a)throw i;return{value:t,done:!0}}for(o.method=a,o.arg=i;;){var s=o.delegate;if(s){var l=j(s,o);if(l){if(l===g)continue;return l}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if(n===m)throw n=v,o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);n=b;var c=d(e,r,o);if("normal"===c.type){if(n=o.done?v:p,c.arg===g)continue;return{value:c.arg,done:o.done}}"throw"===c.type&&(n=v,o.method="throw",o.arg=c.arg)}}}function j(e,r){var o=r.method,n=e.iterator[o];if(n===t)return r.delegate=null,"throw"===o&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==o&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+o+"' method")),g;var a=d(n,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var i=a.arg;return i?i.done?(r[e.resultName]=i.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}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 F(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[l];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function r(){for(;++n=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var l=o.call(i,"catchLoc"),c=o.call(i,"finallyLoc");if(l&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),$(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;$(r)}return n}}throw Error("illegal catch attempt")},delegateYield:function(e,r,o){return this.delegate={iterator:M(e),resultName:r,nextLoc:o},"next"===this.method&&(this.arg=t),g}},e}function s(t,e,r,o,n,a,i){try{var s=t[a](i),l=s.value}catch(t){return void r(t)}s.done?e(l):Promise.resolve(l).then(o,n)}function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,o)}return r}function c(t){for(var e=1;e确定要删除吗?

删除后将无法恢复,请谨慎操作!

",onOk:function(){Object(n.V)(e).then((function(e){t.$Message.success(e.msg),t.labelFrom.page=1,t.getList()})).catch((function(e){t.$Message.error(e.msg)}))}})},showChange:function(t){var e=this;Object(n.Y)({id:t.id,is_show:t.is_show}).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}))},statusChange:function(t){var e=this;Object(n.Z)({id:t.id,status:t.status}).then((function(t){e.$Message.success(t.msg)})).catch((function(t){e.$Message.error(t.msg)}))},edit:function(t){var e={id:t.id,label_cate:t.label_cate,label_name:t.label_name,style_type:t.style_type,color:t.color,bg_color:t.bg_color,border_color:t.border_color,sort:t.sort,is_show:t.is_show,icon:t.icon,status:t.status};this.form=e,this.modals=!0},delLabel:function(t,e,r){var o=this,n={title:e,num:r,url:"product/label/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(t){o.$Message.success(t.msg),o.labelLists.splice(r,1),o.getList()})).catch((function(t){o.$Message.error(t.msg)}))},getproductLabelAll:function(t){var e=this;Object(n.U)().then((function(t){t.data.list.unshift({name:"全部",id:""}),t.data.list.map((function(t){e.$set(t,"status",!1)})),e.labelSort=t.data.list}))},showMenu:function(t){this.labelSort.forEach((function(e){e.id==t.id?e.status=!t.status:e.status=!1}))},labelEdit:function(t){var e=this;this.$modalForm(Object(n.W)(t.id)).then((function(){return e.getproductLabelAll()}))},addSort:function(){var t=this;this.$modalForm(Object(n.x)()).then((function(){return t.getproductLabelAll()}))},deleteSort:function(t,e,r){var o=this,n={title:e,num:r,url:"product/label_cate/".concat(t.id),method:"DELETE",ids:""};this.$modalSure(n).then((function(t){o.$Message.success(t.msg),o.labelSort.splice(r,1),o.labelSort=[],o.getproductLabelAll()})).catch((function(t){o.$Message.error(t.msg)}))},bindMenuItem:function(t,e){this.current=e,this.labelSort.forEach((function(t){t.status=!1})),this.labelFrom.label_cate=t.id,this.getList()},synLabel:function(){}}},h=(r("1b00"),r("2877")),d=Object(h.a)(f,(function(){var t=this,e=t._self._c;return e("div",[e("Row",{staticClass:"ivu-mt box-wrapper"},[e("Col",{staticClass:"left-wrapper",attrs:{span:"3"}},[e("Menu",{attrs:{width:"auto"}},[e("MenuGroup",t._l(t.labelSort,(function(r,o){return e("MenuItem",{key:o,staticClass:"menu-item",class:o===t.current?"showOn":"",attrs:{name:r.id},nativeOn:{click:function(e){return t.bindMenuItem(r,o)}}},[t._v("\n "+t._s(r.name)+"\n "),0!=o?e("div",{staticClass:"icon-box"},[e("Icon",{attrs:{type:"ios-more",size:"24"},on:{click:function(e){return e.stopPropagation(),t.showMenu(r)}}})],1):t._e(),0!=o&&r.status?e("div",{staticClass:"right-menu ivu-poptip-inner"},[e("div",{staticClass:"ivu-poptip-body",on:{click:function(e){return t.labelEdit(r)}}},[e("div",{staticClass:"ivu-poptip-body-content"},[e("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("编辑")])])]),e("div",{staticClass:"ivu-poptip-body",on:{click:function(e){return t.deleteSort(r,"删除分类",o)}}},[e("div",{staticClass:"ivu-poptip-body-content"},[e("div",{staticClass:"ivu-poptip-body-content-inner"},[t._v("删除")])])])]):t._e()])})),1)],1)],1),e("Col",{ref:"rightBox",attrs:{span:"21"}},[e("Card",{attrs:{bordered:!1,"dis-hover":""}},[e("div",{staticClass:"flex"},[e("Button",{attrs:{type:"primary"},on:{click:t.add}},[t._v("添加标签")]),e("Button",{staticClass:"ml-14",attrs:{type:"success"},on:{click:t.addSort}},[t._v("添加分组")]),e("Button",{staticClass:"ml-14",attrs:{disabled:!t.ids.length},on:{click:t.labelDel}},[t._v("批量删除")])],1),e("Table",{ref:"table",staticClass:"mt25",attrs:{columns:t.columns1,data:t.labelLists,loading:t.loading,"highlight-row":"","no-data-text":"暂无数据","no-filtered-data-text":"暂无筛选结果"},on:{"on-selection-change":t.onSelectTab},scopedSlots:t._u([{key:"label_name",fn:function(r){var o=r.row;return r.index,[1==o.style_type?e("div",{staticClass:"words_tag",style:{backgroundColor:o.bg_color,color:o.color,border:o.border_color?"1px solid "+o.border_color:"none"}},[e("span",[t._v(t._s(o.label_name))])]):e("img",{staticClass:"tag_img",attrs:{src:o.icon}})]}},{key:"is_show",fn:function(r){var o=r.row;return r.index,[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.showChange(o)}},model:{value:o.is_show,callback:function(e){t.$set(o,"is_show",e)},expression:"row.is_show"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])]}},{key:"status",fn:function(r){var o=r.row;return r.index,[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},on:{"on-change":function(e){return t.statusChange(o)}},model:{value:o.status,callback:function(e){t.$set(o,"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 o=r.row,n=r.index;return[e("a",{on:{click:function(e){return t.edit(o)}}},[t._v("修改")]),e("Divider",{attrs:{type:"vertical"}}),e("a",{on:{click:function(e){return t.delLabel(o,"删除分组",n)}}},[t._v("删除")])]}}])}),e("div",{staticClass:"acea-row row-right page"},[e("Page",{attrs:{total:t.total,"show-elevator":"","show-total":"","page-size":t.labelFrom.limit},on:{"on-change":t.pageChange}})],1)],1)],1)],1),e("Modal",{attrs:{closable:"",title:t.isEdit?"编辑标签":"添加标签","mask-closable":!1,"z-index":10,width:"560"},on:{"on-cancel":t.cancel,"on-ok":t.addWordsConfirm},model:{value:t.modals,callback:function(e){t.modals=e},expression:"modals"}},[e("div",[e("Form",{ref:"form",attrs:{size:"small",rules:t.rules,model:t.form,"label-width":100}},[e("FormItem",{attrs:{label:"标签名称:",prop:"label_name"}},[e("Input",{staticClass:"w-420",model:{value:t.form.label_name,callback:function(e){t.$set(t.form,"label_name",e)},expression:"form.label_name"}})],1),e("FormItem",{attrs:{label:"分组选择:",prop:"label_cate"}},[e("Select",{staticClass:"w-420",attrs:{clearable:""},model:{value:t.form.label_cate,callback:function(e){t.$set(t.form,"label_cate",e)},expression:"form.label_cate"}},t._l(t.labelSort.slice(1),(function(r){return e("Option",{key:r.id,attrs:{value:r.id}},[t._v(t._s(r.name))])})),1)],1),e("FormItem",{attrs:{label:"移动端开展示:"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.form.is_show,callback:function(e){t.$set(t.form,"is_show",e)},expression:"form.is_show"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1),e("FormItem",{attrs:{label:"效果设置:"}},[e("RadioGroup",{attrs:{"true-value":1,"false-value":2},model:{value:t.form.style_type,callback:function(e){t.$set(t.form,"style_type",e)},expression:"form.style_type"}},[e("Radio",{attrs:{label:1}},[t._v("自定义")]),e("Radio",{attrs:{label:2}},[t._v("图片")])],1)],1),1==t.form.style_type?e("FormItem",{attrs:{label:"字体颜色:"}},[e("ColorPicker",{attrs:{alpha:""},model:{value:t.form.color,callback:function(e){t.$set(t.form,"color",e)},expression:"form.color"}}),e("p",{staticClass:"desc"},[t._v("若未设置颜色,则为默认色")])],1):t._e(),1==t.form.style_type?e("FormItem",{attrs:{label:"背景颜色:"}},[e("ColorPicker",{attrs:{alpha:""},model:{value:t.form.bg_color,callback:function(e){t.$set(t.form,"bg_color",e)},expression:"form.bg_color"}}),e("p",{staticClass:"desc"},[t._v("若未设置颜色,则为默认色")])],1):t._e(),1==t.form.style_type?e("FormItem",{attrs:{label:"边框颜色:"}},[e("ColorPicker",{attrs:{alpha:""},model:{value:t.form.border_color,callback:function(e){t.$set(t.form,"border_color",e)},expression:"form.border_color"}}),e("p",{staticClass:"desc"},[t._v("若未设置颜色,则无边框")])],1):t._e(),2==t.form.style_type?e("FormItem",{attrs:{label:"上传图标"}},[t.form.icon?e("div",{staticClass:"upload-list"},[e("div",{staticClass:"upload-item"},[e("img",{attrs:{src:t.form.icon}}),e("Button",{attrs:{shape:"circle",icon:"ios-close"},on:{click:t.delImage}})],1)]):e("Button",{staticClass:"upload-select",attrs:{type:"dashed",icon:"ios-add"},on:{click:function(e){return t.modalPicTap("dan","image",1)}}}),e("p",{staticClass:"desc"},[t._v("建议尺寸:80px*30px,若未上传则为空白")])],1):t._e(),e("FormItem",{attrs:{label:"排序"}},[e("InputNumber",{staticClass:"selWidth",attrs:{min:0,max:999},model:{value:t.form.sort,callback:function(e){t.$set(t.form,"sort",e)},expression:"form.sort"}})],1),e("FormItem",{attrs:{label:"是否开启:"}},[e("i-switch",{attrs:{"true-value":1,"false-value":0,size:"large"},model:{value:t.form.status,callback:function(e){t.$set(t.form,"status",e)},expression:"form.status"}},[e("span",{attrs:{slot:"open"},slot:"open"},[t._v("开启")]),e("span",{attrs:{slot:"close"},slot:"close"},[t._v("关闭")])])],1)],1)],1)]),e("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传图标","mask-closable":!1,"z-index":500},model:{value:t.modalPic,callback:function(e){t.modalPic=e},expression:"modalPic"}},[t.modalPic?e("uploadPictures",{attrs:{isChoice:"单选"},on:{getPic:t.getPic}}):t._e()],1)],1)}),[],!1,null,"1b28e29e",null);e.default=d.exports},cfa7:function(t,e,r){}}]);