1 line
2.6 KiB
JavaScript
1 line
2.6 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d21d8a3"],{d276:function(t,a,e){"use strict";e.r(a);var n=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"divBox"},[e("el-card",[e("div",{staticClass:"mb20"},[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.onAdd}},[t._v("添加组合数据")])],1),t._v(" "),e("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],attrs:{data:t.tableData.data,size:"small"}},[e("el-table-column",{attrs:{prop:"group_id",label:"ID","min-width":"60"}}),t._v(" "),e("el-table-column",{attrs:{prop:"group_name",label:"数据组名称","min-width":"130"}}),t._v(" "),e("el-table-column",{attrs:{prop:"group_key",label:"数据组key","min-width":"130"}}),t._v(" "),e("el-table-column",{attrs:{prop:"group_info",label:"数据组说明","min-width":"130"}}),t._v(" "),e("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}}),t._v(" "),e("el-table-column",{attrs:{label:"操作","min-width":"100",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(a){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.goList(a.row.group_id,a.$index)}}},[t._v("数据列表")]),t._v(" "),e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.onEdit(a.row.group_id)}}},[t._v("编辑")])]}}])})],1),t._v(" "),e("div",{staticClass:"block"},[e("el-pagination",{attrs:{background:"","page-size":t.tableData.limit,"current-page":t.tableData.page,layout:"total,, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},i=[],l=e("8593"),o={name:"List",data:function(){return{tableData:{page:1,limit:20,data:[],total:0},loading:!1}},mounted:function(){this.getList()},methods:{getList:function(){var t=this;this.loading=!0,Object(l["v"])(this.tableData.page,this.tableData.limit).then((function(a){t.tableData.data=a.data.list,t.tableData.total=a.data.count,t.loading=!1})).catch((function(a){t.loading=!1,t.$message.error(a.message)}))},pageChange:function(t){this.tableData.page=t,this.getList()},handleSizeChange:function(t){this.tableData.limit=t,this.getList()},onAdd:function(){var t=this;this.$modalForm(Object(l["n"])()).then((function(){return t.getLst()}))},onEdit:function(t){var a=this;this.$modalForm(Object(l["P"])(t)).then((function(){return a.getLst()}))},goList:function(t){this.$router.push("/group/data/".concat(t))}}},s=o,r=e("2877"),u=Object(r["a"])(s,n,i,!1,null,"0d044e32",null);a["default"]=u.exports}}]); |