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 lines
3.1 KiB
1 lines
3.1 KiB
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0a4773"],{"070f":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",{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"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{label:"ID",prop:"interests_id","min-width":"60"}}),t._v(" "),a("el-table-column",{attrs:{label:"名称",prop:"name","min-width":"120"}}),t._v(" "),a("el-table-column",{attrs:{label:"简介",prop:"info","min-width":"180"}}),t._v(" "),a("el-table-column",{attrs:{label:"会员等级",prop:"brokerage_level","min-width":"100"}}),t._v(" "),a("el-table-column",{attrs:{label:"图标","min-width":"50"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"demo-image__preview"},[a("el-image",{staticStyle:{width:"36px",height:"36px"},attrs:{src:t.row.pic?t.row.pic:"","preview-src-list":[t.row.pic||""]}})],1)]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEdit(e.row.interests_id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.interests_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)},n=[],l=a("c24f"),s={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(l["f"])(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(l["a"])()).then((function(){return t.getList()}))},onEdit:function(t){var e=this;this.$modalForm(Object(l["g"])(t)).then((function(){return e.getList()}))},handleDelete:function(t,e){var a=this;this.$modalSure().then((function(){Object(l["e"])(t).then((function(t){var i=t.message;a.$message.success(i),a.tableData.data.splice(e,1)})).catch((function(t){var e=t.message;a.$message.error(e)}))}))}}},o=s,r=a("2877"),c=Object(r["a"])(o,i,n,!1,null,"3f0d6182",null);e["default"]=c.exports}}]); |