(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0d6ae3"],{"741a":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:user:tag:save"],expression:"['platform:user:tag:save']"}],attrs:{size:"small",type:"primary"},on:{click:function(e){return t.onAdd(null)}}},[t._v("\n        添加用户标签\n      ")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small"}},[a("el-table-column",{attrs:{label:"ID","min-width":"80",prop:"id"}}),t._v(" "),a("el-table-column",{attrs:{label:"标签名称","min-width":"180"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",{domProps:{textContent:t._s(i.name)}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"120",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:user:tag:update"],expression:"['platform:user:tag:update']"}],staticClass:"mr10",attrs:{type:"text",size:"small"},on:{click:function(a){return t.onAdd(e.row)}}},[t._v("编辑")]),t._v(" "),a("el-button",{directives:[{name:"hasPermi",rawName:"v-hasPermi",value:["platform:user:tag:delete"],expression:"['platform:user:tag:delete']"}],attrs:{type:"text",size:"small",disable:""},on:{click:function(a){return t.handleDelete(e.row.id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},s=[],n=a("c24f"),l=a("e350"),r={name:"UserGroup",data:function(){return{tableFrom:{page:1,limit:20},tableData:{data:[],total:0},listLoading:!0}},mounted:function(){Object(l["a"])(["platform:seckill:product:list"])&&this.getList()},methods:{checkPermi:l["a"],onAdd:function(t){var e=this;this.$modalPrompt("text","标签名称",t?t.name:"").then((function(a){t?Object(n["x"])({id:t.id,name:a}).then((function(){e.$message.success("编辑成功"),e.getList()})):Object(n["w"])({name:a}).then((function(){e.$message.success("新增成功"),e.getList()}))}))},getList:function(){var t=this;this.listLoading=!0,Object(n["u"])(this.tableFrom).then((function(e){t.tableData.data=e.list,t.tableData.total=e.total,t.listLoading=!1})).catch((function(e){t.listLoading=!1}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()},handleDelete:function(t,e){var a=this;this.$modalSure("删除吗？所有用户已经关联的数据都会清除").then((function(){Object(n["t"])(t).then((function(){a.$message.success("删除成功"),a.tableData.data.splice(e,1)}))}))}}},o=r,c=a("2877"),u=Object(c["a"])(o,i,s,!1,null,"e0ef9f4e",null);e["default"]=u.exports}}]);