zx/public/mer/js/chunk-2d0aba79.36a38952.js

1 line
3.1 KiB
JavaScript
Raw Normal View History

2024-07-02 15:32:59 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0aba79"],{"15cb":function(t,e,a){"use strict";a.r(e);var n=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:"mb20"},[a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.onAdd}},[t._v("添加用户标签")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"ID","min-width":"60"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("span",{domProps:{textContent:t._s(-1!==t.$route.path.indexOf("group")?n.group_id:n.label_id)}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:-1!==t.$route.path.indexOf("group")?"分组名称":"标签名称","min-width":"180"},scopedSlots:t._u([{key:"default",fn:function(e){var n=e.row;return[a("span",{domProps:{textContent:t._s(-1!==t.$route.path.indexOf("group")?n.group_name:n.label_name)}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.onEdit(-1!==t.$route.path.indexOf("group")?e.row.group_id:e.row.label_id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){t.handleDelete(-1!==t.$route.path.indexOf("group")?e.row.group_id:e.row.label_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},i=[],o=a("c24f"),l={name:"UserGroup",data:function(){return{tableFrom:{page:1,limit:20},tableData:{data:[],total:0},listLoading:!0}},mounted:function(){this.getList()},methods:{getList:function(){var t=this;this.listLoading=!0,Object(o["p"])(this.tableFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()},onAdd:function(){var t=this;this.$modalForm(Object(o["o"])()).then((function(){return t.getList()}))},onEdit:function(t){var e=this;this.$modalForm(Object(o["n"])(t)).then((function(){return e.getList()}))},handleDelete:function(t,e){var a=this;this.$modalSure("删除该标签").then((function(){Object(o["m"])(t).then((function(t){var n=t.message;a.$message.success(n),a.tableData.data.splice(e,1)})).catch((function(t){var e=t.message;a.$message.error(e)}))}))}}},s=l,r=a("2877"),u=Object(r["a"])(s,n,i,!1,null,"4e9928dc",null);e["default"]=u.exports}}]);