From a948affb2d96178c4a79369f1f0a271c0d59aa32 Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期二, 15 九月 2020 15:53:27 +0800
Subject: [PATCH] 代码生成支持富文本控件
---
ruoyi-ui/src/views/tool/gen/index.vue | 17 +++++++++++++----
1 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/ruoyi-ui/src/views/tool/gen/index.vue b/ruoyi-ui/src/views/tool/gen/index.vue
index a819f51..7f37f62 100644
--- a/ruoyi-ui/src/views/tool/gen/index.vue
+++ b/ruoyi-ui/src/views/tool/gen/index.vue
@@ -1,6 +1,6 @@
<template>
<div class="app-container">
- <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="琛ㄥ悕绉�" prop="tableName">
<el-input
v-model="queryParams.tableName"
@@ -32,7 +32,7 @@
></el-date-picker>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+ <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
@@ -76,6 +76,7 @@
v-hasPermi="['tool:gen:remove']"
>鍒犻櫎</el-button>
</el-col>
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange">
@@ -166,7 +167,7 @@
</template>
<script>
-import { listTable, previewTable, delTable } from "@/api/tool/gen";
+import { listTable, previewTable, delTable, genCode } from "@/api/tool/gen";
import importTable from "./importTable";
import { downLoadZip } from "@/utils/zipdownload";
export default {
@@ -186,6 +187,8 @@
single: true,
// 闈炲涓鐢�
multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
// 鎬绘潯鏁�
total: 0,
// 琛ㄦ暟鎹�
@@ -241,7 +244,13 @@
this.msgError("璇烽�夋嫨瑕佺敓鎴愮殑鏁版嵁");
return;
}
- downLoadZip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi");
+ if(row.genType === "1") {
+ genCode(row.tableName).then(response => {
+ this.msgSuccess("鎴愬姛鐢熸垚鍒拌嚜瀹氫箟璺緞锛�" + row.genPath);
+ });
+ } else {
+ downLoadZip("/tool/gen/batchGenCode?tables=" + tableNames, "ruoyi");
+ }
},
/** 鎵撳紑瀵煎叆琛ㄥ脊绐� */
openImportTable() {
--
Gitblit v1.9.3