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 line
65 KiB
1 line
65 KiB
4 months ago
|
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-9b51067e"],{"0f0e":function(t,e,a){"use strict";var n=a("c4c8"),r={name:"userLabel",props:{},data:function(){return{labelList:[],dataLabel:[],isUser:!1}},mounted:function(){},methods:{inArray:function(t,e){for(var a in e)if(e[a].id===t)return!0;return!1},userLabel:function(t){var e=this;this.dataLabel=t,Object(n.ob)().then((function(t){t.data.map((function(t){t.children&&t.children.length&&(e.isUser=!0,t.children.map((function(t){e.inArray(t.id,e.dataLabel)?t.disabled=!0:t.disabled=!1})))})),e.labelList=t.data})).catch((function(t){e.$Message.error(t.msg)}))},selectLabel:function(t){if(t.disabled){var e=this.dataLabel.indexOf(this.dataLabel.filter((function(e){return e.id===t.id}))[0]);this.dataLabel.splice(e,1),t.disabled=!1}else this.dataLabel.push({label_name:t.label_name,id:t.id,tag_id:t.tag_id}),t.disabled=!0},subBtn:function(){this.$emit("activeData",JSON.parse(JSON.stringify(this.dataLabel)))},cancel:function(){this.$emit("close")}}},o=(a("47fb"),a("2877")),i=Object(o.a)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"label-wrapper"},[a("div",{staticClass:"list-box"},[t._l(t.labelList,(function(e,n){return t.isUser?a("div",{key:n,staticClass:"label-box"},[e.children&&e.children.length?a("div",{staticClass:"title"},[t._v("\n "+t._s(e.label_name)+"\n ")]):t._e(),e.children&&e.children.length?a("div",{staticClass:"list"},t._l(e.children,(function(e,n){return a("div",{key:n,staticClass:"label-item",class:{on:e.disabled},on:{click:function(a){return t.selectLabel(e)}}},[t._v("\n "+t._s(e.label_name)+"\n ")])})),0):t._e()]):t._e()})),t.isUser?t._e():a("div",[t._v("暂无标签")])],2),a("div",{staticClass:"footer"},[a("Button",{staticClass:"btns",attrs:{type:"primary"},on:{click:t.subBtn}},[t._v("确定")]),a("Button",{staticClass:"btns",attrs:{type:"primary",ghost:""},on:{click:t.cancel}},[t._v("取消")])],1)])}),[],!1,null,"ea2c8f16",null);e.a=i.exports},3539:function(t,e,a){},"47fb":function(t,e,a){"use strict";var n=a("702e");a.n(n).a},"4afc":function(t,e,a){"use strict";a.r(e);var n=a("2f62"),r=a("b7be"),o=a("c24f"),i=a("c4c8"),s=a("5671"),c=a("f1c7"),l=a("0f0e"),u=a("c4ad"),d=a("a34a"),f=a.n(d);function m(t,e,a,n,r,o,i){try{var s=t[o](i),c=s.value}catch(t){return void a(t)}s.done?e(c):Promise.resolve(c).then(n,r)}function p(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}function h(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var b={name:"index",props:{goodsType:{type:Number,default:0},is_new:{type:String,default:""},diy:{type:Boolean,default:!1},isdiy:{type:Boolean,default:!1},ischeckbox:{type:Boolean,default:!1},datas:{type:Object,default:function(){return{}}}},data:function(){return{labelSelect:[],cateIds:[],treeSelect:[],formValidate:{page:1,limit:10,cate_id:"",store_name:"",is_new:this.is_new,store_label_id:""},total:0,loading:!1,grid:{xl:10,lg:10,md:12,sm:24,xs:24},tableList:[],currentid:0,productRow:{},images:[]}},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?p(a,!0).forEach((function(e){h(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):p(a).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},Object(n.e)("admin/layout",["isMobile"]),{labelWidth:function(){return this.isMobile?void 0:120},labelPosition:function(){return this.isMobile?"top":"right"}}),created:function(){},mounted:function(){this.goodsCategory(),this.getList(),this.getAllLabelApi()},methods:{getAllLabelApi:function(){var t=this;Object(i.b)().then((function(e){t.labelSelect=e.data})).catch((function(e){t.$Message.error(e.msg)}))},goodsCategory:function(){var t=this;Object(i.h)(1).then((function(e){t.treeSelect=e.data})).catch((fun
|