1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-fe2c"],{JOut:function(e,t,a){"use strict";a.r(t);var n=a("S3Ld"),r={data:function(){return{visible:!1,tables:[],total:0,dbTableList:[],queryParams:{page:1,limit:10,tableName:void 0,tableComment:void 0}}},methods:{show:function(){this.getList(),this.visible=!0},handleSelectionChange:function(e){this.tables=e.map(function(e){return e.tableName})},getList:function(){var e=this;Object(n.d)(this.queryParams).then(function(t){e.dbTableList=t.data.data.items,e.total=t.data.data.count})},handleQuery:function(){this.queryParams.page=1,this.getList()},resetQuery:function(){this.resetForm("queryForm"),this.handleQuery()},handleImportTable:function(){var e=this;Object(n.c)({tables:this.tables.join(",")}).then(function(t){t.data.data?(e.msgSuccess(t.data.errmsg),e.visible=!1,e.$emit("ok")):e.msgError(t.data.errmsg)})}}},o=a("KHd+"),l=Object(o.a)(r,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{visible:e.visible,title:"导入表",width:"800px",top:"5vh"},on:{"update:visible":function(t){e.visible=t}}},[a("el-form",{ref:"queryForm",attrs:{model:e.queryParams,inline:!0}},[a("el-form-item",{attrs:{label:"表名称",prop:"tableName"}},[a("el-input",{attrs:{placeholder:"请输入表名称",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.tableName,callback:function(t){e.$set(e.queryParams,"tableName",t)},expression:"queryParams.tableName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"表描述",prop:"tableComment"}},[a("el-input",{attrs:{placeholder:"请输入表描述",clearable:"",size:"small"},nativeOn:{keyup:function(t){return"button"in t||!e._k(t.keyCode,"enter",13,t.key,"Enter")?e.handleQuery(t):null}},model:{value:e.queryParams.tableComment,callback:function(t){e.$set(e.queryParams,"tableComment",t)},expression:"queryParams.tableComment"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",icon:"el-icon-search",size:"mini"},on:{click:e.handleQuery}},[e._v("搜索")]),e._v(" "),a("el-button",{attrs:{icon:"el-icon-refresh",size:"mini"},on:{click:e.resetQuery}},[e._v("重置")])],1)],1),e._v(" "),a("el-row",[a("el-table",{attrs:{data:e.dbTableList,height:"494px"},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55"}}),e._v(" "),a("el-table-column",{attrs:{"show-overflow-tooltip":!0,prop:"tableName",label:"表名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"tableComment",label:"表描述"}}),e._v(" "),a("el-table-column",{attrs:{prop:"createTime",label:"创建时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.parseTime(t.row.createTime)))])]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"updateTime",label:"更新时间"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(e.parseTime(t.row.updateTime)))])]}}])})],1),e._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total>0"}],staticStyle:{padding:"0"},attrs:{total:e.total,page:e.queryParams.page,limit:e.queryParams.limit},on:{"update:page":function(t){e.$set(e.queryParams,"page",t)},"update:limit":function(t){e.$set(e.queryParams,"limit",t)},pagination:e.getList}})],1),e._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:e.handleImportTable}},[e._v("确 定")]),e._v(" "),a("el-button",{on:{click:function(t){e.visible=!1}}},[e._v("取 消")])],1)],1)},[],!1,null,null,null);l.options.__file="importTable.vue";t.default=l.exports},S3Ld:function(e,t,a){"use strict";a.d(t,"e",function(){return l}),a.d(t,"d",function(){return i}),a.d(t,"b",function(){return s}),a.d(t,"g",function(){return u}),a.d(t,"h",function(){return m}),a.d(t,"c",function(){return c}),a.d(t,"f",function(){return d}),a.d(t,"a",function(){return p});var n=a("QbLZ"),r=a.n(n),o=a("t3Un");function l(e){return Object(o.a)({method:"get",params:r()({_gp:"admin.tools.gen",_mt:"list"},e)})}function i(e){return Object(o.a)({method:"get",params:r()({_gp:"admin.tools.gen",_mt:"getDbList"},e)})}function s(e){return Object(o.a)({method:"get",params:{_gp:"admin.tools.gen",_mt:"get",id:e}})}function u(e){return Object(o.a)({method:"post",params:{_gp:"admin.tools.gen",_mt:"update",genTable:e}})}function m(e){return Object(o.a)({method:"post",params:{_gp:"admin.tools.gen",_mt:"updateColumn",genTableColumn:e}})}function c(e){return Object(o.a)({method:"post",params:r()({_gp:"admin.tools.gen",_mt:"importTableSave"},e)})}function d(e){return Object(o.a)({method:"get",params:{_gp:"admin.tools.gen",_mt:"preview",tableId:e}})}function p(e){return Object(o.a)({method:"post",params:{_gp:"admin.tools.gen",_mt:"delete",tableIds:e}})}}}]);
|