|
@@ -89,12 +89,12 @@
|
|
|
:show-overflow-tooltip="true"
|
|
|
width="130"
|
|
|
/>
|
|
|
- <el-table-column label="创建时间" align="center" prop="createdAt" width="160">
|
|
|
+ <el-table-column label="创建时间" align="center" prop="createdAt" width="165">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.createdAt) }}</span>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="更新时间" align="center" prop="updatedAt" width="160">
|
|
|
+ <el-table-column label="更新时间" align="center" prop="updatedAt" width="165">
|
|
|
<template slot-scope="scope">
|
|
|
<span>{{ parseTime(scope.row.updatedAt) }}</span>
|
|
|
</template>
|
|
@@ -122,13 +122,6 @@
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
>删除</el-button>
|
|
|
- <!-- <el-button
|
|
|
-
|
|
|
- type="text"
|
|
|
- size="small"
|
|
|
- icon="el-icon-download"
|
|
|
- @click="handleGenTable(scope.row)"
|
|
|
- >生成代码</el-button> -->
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -159,7 +152,7 @@
|
|
|
<script>
|
|
|
import { listTable, previewTable, delTable } from '@/api/tools/gen'
|
|
|
import importTable from './importTable'
|
|
|
-import { downLoadZip } from '@/utils/zipdownload'
|
|
|
+import { downLoadFile } from '@/utils/zipdownload'
|
|
|
export default {
|
|
|
name: 'Gen',
|
|
|
components: { importTable },
|
|
@@ -195,7 +188,7 @@ export default {
|
|
|
open: false,
|
|
|
title: '代码预览',
|
|
|
data: {},
|
|
|
- activeName: 'domain.java'
|
|
|
+ activeName: 'api.go'
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -227,12 +220,12 @@ export default {
|
|
|
},
|
|
|
/** 生成代码操作 */
|
|
|
handleGenTable(row) {
|
|
|
- const tableNames = row.tableName || this.tableNames
|
|
|
- if (tableNames === '') {
|
|
|
+ const ids = row.tableId || this.ids
|
|
|
+ if (ids === '') {
|
|
|
this.msgError('请选择要生成的数据')
|
|
|
return
|
|
|
}
|
|
|
- downLoadZip('/tool/gen/batchGenCode?tables=' + tableNames, 'ruoyi')
|
|
|
+ downLoadFile('/api/v1/gen/gencode/' + ids)
|
|
|
},
|
|
|
/** 打开导入表弹窗 */
|
|
|
openImportTable() {
|