chunk-3474dd8e.bca33d7a.js 4.5 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3474dd8e"],{c8a7:function(e,t,l){"use strict";l("d5a5")},d5a5:function(e,t,l){},deb6:function(e,t,l){"use strict";l.r(t);var o=function(){var e=this,t=e.$createElement,l=e._self._c||t;return l("div",{staticClass:"ele-body"},[l("el-card",{attrs:{shadow:"never"}},[l("el-form",{staticClass:"ele-form-search",attrs:{model:e.table.where,"label-width":"77px"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.$refs.table.reload()},submit:function(e){e.preventDefault()}}},[l("el-row",{attrs:{gutter:15}},[l("el-col",{attrs:{md:6,sm:12}},[l("el-form-item",{attrs:{label:"表名称:"}},[l("el-input",{attrs:{placeholder:"请输入表名称",clearable:""},model:{value:e.table.where.name,callback:function(t){e.$set(e.table.where,"name",t)},expression:"table.where.name"}})],1)],1),l("el-col",{attrs:{md:6,sm:12}},[l("el-form-item",{attrs:{label:"表描述:"}},[l("el-input",{attrs:{placeholder:"请输入表描述",clearable:""},model:{value:e.table.where.comment,callback:function(t){e.$set(e.table.where,"comment",t)},expression:"table.where.comment"}})],1)],1),l("el-col",{attrs:{md:9,sm:12}},[l("div",{staticClass:"ele-form-actions"},[l("el-button",{staticClass:"ele-btn-icon",attrs:{type:"primary",icon:"el-icon-search"},on:{click:function(t){return e.$refs.table.reload()}}},[e._v("查询 ")]),l("el-button",{on:{click:function(t){(e.table.where={})&&e.$refs.table.reload()}}},[e._v("重置")])],1)])],1)],1),l("ele-data-table",{ref:"table",attrs:{config:e.table,choose:e.choose,height:"calc(100vh - 260px)","highlight-current-row":""},on:{"update:choose":function(t){e.choose=t}},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.index;return[l("el-table-column",{attrs:{type:"selection",width:"45",align:"center",fixed:"left"}}),l("el-table-column",{attrs:{type:"index",index:o,label:"编号",width:"60",align:"center",fixed:"left","show-overflow-tooltip":""}}),l("el-table-column",{attrs:{prop:"name",label:"业务表名称","show-overflow-tooltip":"",align:"center","min-width":"150"}}),l("el-table-column",{attrs:{prop:"comment",label:"表描述","show-overflow-tooltip":"",align:"center","min-width":"120"}}),l("el-table-column",{attrs:{prop:"engine",label:"表引擎","show-overflow-tooltip":"",align:"center","min-width":"150"}}),l("el-table-column",{attrs:{prop:"version",label:"版本号","show-overflow-tooltip":"",align:"center","min-width":"120"}}),l("el-table-column",{attrs:{prop:"collation",label:"编码","show-overflow-tooltip":"",align:"center","min-width":"150"}}),l("el-table-column",{attrs:{prop:"rows",label:"记录总数","show-overflow-tooltip":"",align:"center","min-width":"200"}}),l("el-table-column",{attrs:{prop:"data_length",label:"数据大小",sortable:"custom","show-overflow-tooltip":"",align:"center","min-width":"120"}}),l("el-table-column",{attrs:{prop:"auto_increment",label:"自增索引","show-overflow-tooltip":"",align:"center","min-width":"120"}}),l("el-table-column",{attrs:{label:"创建时间",sortable:"custom","show-overflow-tooltip":"","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){var l=t.row;return[e._v(e._s(e._f("toDateString")(l.create_time)))]}}],null,!0)}),l("el-table-column",{attrs:{label:"更新时间",sortable:"custom","show-overflow-tooltip":"","min-width":"160"},scopedSlots:e._u([{key:"default",fn:function(t){var l=t.row;return[e._v(e._s(e._f("toDateString")(l.update_time)))]}}],null,!0)}),l("el-table-column",{attrs:{label:"操作",width:"150px",align:"center",resizable:!1,fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){var o=t.row;return[l("el-popconfirm",{staticClass:"ele-action",attrs:{title:"确定要一键生成当前表的模块吗?"},on:{confirm:function(t){return e.generate(o)}}},[l("el-link",{attrs:{slot:"reference",icon:"el-icon-copy-document",type:"success",underline:!1},slot:"reference"},[e._v("一键生成模块")])],1)]}}],null,!0)})]}}])})],1)],1)},n=[],a=(l("b0c0"),{name:"Generate",data:function(){return{table:{url:"/generate/index",where:{}},choose:[],showEdit:!1,tableId:""}},mounted:function(){},computed:{},methods:{generate:function(e){var t=this,l=this.$loading({lock:!0});this.$http.post("/generate/generate",{name:e.name,comment:e.comment}).then((function(e){l.close(),0===e.data.code?(t.$message({type:"success",message:e.data.msg}),t.$refs.table.reload()):t.$message.error(e.data.msg)})).catch((function(e){l.close(),t.$message.error(e.message)}))}}}),r=a,s=(l("c8a7"),l("2877")),c=Object(s["a"])(r,o,n,!1,null,"41ef9ec1",null);t["default"]=c.exports}}]);