优化代码生成
This commit is contained in:
parent
a855a0db6b
commit
26bd31cbcf
@ -2,11 +2,12 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<el-form ref="codeform" :inline="true" :rules="rules" :model="queryParams" size="small">
|
<el-form ref="codeform" :inline="true" :rules="rules" :model="queryParams" size="small">
|
||||||
<el-form-item label="表名">
|
<el-form-item label="表名" prop="tableName">
|
||||||
<el-input v-model="queryParams.tableName" clearable placeholder="输入要查询的表名" />
|
<el-input v-model="queryParams.tableName" clearable placeholder="输入要查询的表名" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button size="mini" type="primary" icon="el-icon-search" @click="handleSearch()">查询</el-button>
|
<el-button size="mini" type="primary" icon="el-icon-search" @click="handleSearch()">查询</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
<!-- <el-button type="default" icon="el-icon-refresh" size="small" @click="loadTableData()">刷新</el-button> -->
|
<!-- <el-button type="default" icon="el-icon-refresh" size="small" @click="loadTableData()">刷新</el-button> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -133,6 +134,9 @@ export default {
|
|||||||
* 编辑表格
|
* 编辑表格
|
||||||
*/
|
*/
|
||||||
handleEditTable(row) {
|
handleEditTable(row) {
|
||||||
|
this.queryParams.tableName = row.tableName;
|
||||||
|
this.handleSearch();
|
||||||
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/gen/editTable",
|
path: "/gen/editTable",
|
||||||
query: { tableId: row.tableId },
|
query: { tableId: row.tableId },
|
||||||
@ -158,7 +162,6 @@ export default {
|
|||||||
* 点击生成服务端代码
|
* 点击生成服务端代码
|
||||||
*/
|
*/
|
||||||
handleGenTable(row) {
|
handleGenTable(row) {
|
||||||
console.log(JSON.stringify(this.currentSelected));
|
|
||||||
this.currentSelected = row;
|
this.currentSelected = row;
|
||||||
if (!this.currentSelected) {
|
if (!this.currentSelected) {
|
||||||
this.msgError("请先选择要生成代码的数据表");
|
this.msgError("请先选择要生成代码的数据表");
|
||||||
@ -179,7 +182,6 @@ export default {
|
|||||||
tableName: this.currentSelected.name,
|
tableName: this.currentSelected.name,
|
||||||
// queryColumn: this.checkedQueryColumn,
|
// queryColumn: this.checkedQueryColumn,
|
||||||
};
|
};
|
||||||
console.log(JSON.stringify(seachdata));
|
|
||||||
|
|
||||||
codeGenerator(seachdata)
|
codeGenerator(seachdata)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@ -205,6 +207,11 @@ export default {
|
|||||||
this.showGenerate = false;
|
this.showGenerate = false;
|
||||||
this.currentSelected = {};
|
this.currentSelected = {};
|
||||||
},
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryParams");
|
||||||
|
this.handleSearch();
|
||||||
|
},
|
||||||
/** 打开导入表弹窗 */
|
/** 打开导入表弹窗 */
|
||||||
openImportTable() {
|
openImportTable() {
|
||||||
this.$refs.import.show();
|
this.$refs.import.show();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user