(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-240a8a37"],{"263f":function(t,e,a){"use strict";a.d(e,"e",(function(){return r})),a.d(e,"b",(function(){return o})),a.d(e,"d",(function(){return n})),a.d(e,"f",(function(){return s})),a.d(e,"c",(function(){return i})),a.d(e,"g",(function(){return u})),a.d(e,"j",(function(){return d})),a.d(e,"i",(function(){return c})),a.d(e,"k",(function(){return p})),a.d(e,"h",(function(){return b})),a.d(e,"l",(function(){return h})),a.d(e,"a",(function(){return g}));var l=a("6b2d");const r=t=>l.a.get("/user.labelGroup/list",{params:t}),o=t=>l.a.post("/user.labelGroup/create",t),n=t=>l.a.get("/user.labelGroup/detail",{params:t}),s=t=>l.a.post("/user.labelGroup/update",t),i=t=>l.a.get("/user.labelGroup/del",{params:t}),u=t=>l.a.post("/user.labelItem/create",t),d=t=>l.a.get("/user.labelItem/list",{params:t}),c=t=>l.a.get("/user.labelItem/detail",{params:t}),p=t=>l.a.post("/user.labelItem/update",t),b=t=>l.a.get("/user.labelItem/del",{params:t}),h=t=>l.a.post("/settings.user.userLabel/setConfig",t),g=t=>l.a.get("/settings.user.userLabel/getConfig",{params:t})},a72e:function(t,e,a){"use strict";a.r(e);var l=a("263f"),r={data:()=>({table:{currentPage:1,pageSizes:[10],total:0,data:null},id:0}),methods:{handleSizeChange(t){},handleCurrentChange(t){this.table.currentPage=t},getData(t,e){Object(l.j)({gid:this.id}).then(t=>{this.table.currentPage=e,this.table.total=t.data.length,this.table.data=t.data;for(var a=0;a<this.table.data.length;a++)1==this.table.data[a].color_type&&(-1!=this.table.data[a].color.indexOf(",")?(this.table.data[a].color1=this.table.data[a].color.split(",")[0],this.table.data[a].color2=this.table.data[a].color.split(",")[1]):(this.table.data[a].color1=this.table.data[a].color,this.table.data[a].color2=this.table.data[a].color))})},jumpAdd(){this.$router.push({path:"/user/label/listAdd",query:{gid:this.id}})},edit(t){this.$router.push({path:"/user/label/listEdit",query:{id:t}})},del(t){this.$confirm("此操作将永久删除该标签, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{Object(l.h)({id:t}).then(t=>{1==t.code?(this.$message.success("删除成功!"),this.getData(10,this.table.currentPage)):this.$message.error(t.msg)})}).catch(()=>{})}},mounted(){this.getData(10,1)},created(){const t=this.$route.query;this.id=t.id}},o=a("2877"),n=Object(o.a)(r,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("div",{staticClass:"ls-card m-b-12"},[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:t.jumpAdd}},[t._v("新建")])],1),a("el-table",{staticStyle:{width:"100%"},attrs:{data:null==t.table.data?[]:t.table.data}},[a("el-table-column",{attrs:{prop:"id",label:"ID",width:"80"}}),a("el-table-column",{attrs:{prop:"name",label:"标签",width:"180"}}),a("el-table-column",{attrs:{prop:"group_id",label:"分类ID"}}),a("el-table-column",{attrs:{label:"颜色类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.color_type?a("span",[t._v("普通颜色")]):t._e(),1==e.row.color_type?a("span",[t._v("渐变色")]):t._e()]}}])}),a("el-table-column",{attrs:{label:"颜色"},scopedSlots:t._u([{key:"default",fn:function(e){return[0==e.row.color_type?a("div",{staticStyle:{width:"80px",height:"50px"},style:"background-color: "+e.row.color+";"}):t._e(),1==e.row.color_type?a("div",{staticStyle:{width:"80px",height:"50px"},style:"background: linear-gradient(90deg, "+e.row.color1+", "+e.row.color2+");"}):t._e()]}}])}),a("el-table-column",{attrs:{prop:"sort",label:"排序",width:"80"}}),a("el-table-column",{attrs:{label:"编辑"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text"},on:{click:function(a){return t.edit(e.row.id)}}},[t._v("编辑")]),a("el-button",{staticStyle:{color:"red"},attrs:{type:"text"},on:{click:function(a){return t.del(e.row.id)}}},[t._v("删除")])]}}])})],1)],1)}),[],!1,null,null,null);e.default=n.exports}}]);