Skip to content

Commit 20d53cc

Browse files
authored
Merge pull request #51 from wenjianzhang/dev
1. 代码生成添加操作按钮确认提示; 2. 代码生成添加时间类型支持; 3. 代码生成添加时间控件、下拉控件、文本域的支持; 4. 修复代码生成无需权限的问题; 5. 修改了部分格式问题; 6. 默认开启log; 7. 修复了已知bug;
2 parents 9660976 + 1cbbf06 commit 20d53cc

File tree

2 files changed

+28
-9
lines changed

2 files changed

+28
-9
lines changed

src/views/tools/gen/editTable.vue

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,9 @@
2828
<el-table-column label="go类型" width="120">
2929
<template slot-scope="scope">
3030
<el-select v-model="scope.row.goType">
31-
<el-option label="int64" value="int64" />
31+
<el-option label="int" value="int" />
3232
<el-option label="string" value="string" />
33+
<el-option label="Time" value="time.Time" />
3334
<!-- <el-option label="int" value="int" />
3435
<el-option label="bool" value="bool" /> -->
3536
</el-select>
@@ -91,9 +92,9 @@
9192
<el-option label="文本框" value="input" />
9293
<el-option label="下拉框" value="select" />
9394
<el-option label="单选框" value="radio" />
94-
<!-- <el-option label="复选框" value="checkbox" />
95+
<!-- <el-option label="复选框" value="checkbox" />-->
9596
<el-option label="文本域" value="textarea" />
96-
<el-option label="日期控件" value="datetime" /> -->
97+
<el-option label="日期控件" value="datetime" />
9798
</el-select>
9899
</template>
99100
</el-table-column>

src/views/tools/gen/index.vue

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,19 +261,37 @@ export default {
261261
})
262262
},
263263
handleToProject(row) {
264-
toProjectTableCheckRole(row.tableId, false).then(response => {
264+
this.$confirm('正在使用代码生成请确认?', '提示', {
265+
confirmButtonText: '生成',
266+
cancelButtonText: '取消',
267+
type: 'warning'
268+
}).then(function() {
269+
return toProjectTableCheckRole(row.tableId, false)
270+
}).then((response) => {
265271
this.msgSuccess(response.msg)
266-
})
272+
}).catch(function() {})
267273
},
268274
handleToProjectCheckRole(row) {
269-
toProjectTableCheckRole(row.tableId, true).then(response => {
275+
this.$confirm('正在使用代码生成【带权限】请确认?', '提示', {
276+
confirmButtonText: '生成',
277+
cancelButtonText: '取消',
278+
type: 'warning'
279+
}).then(function() {
280+
return toProjectTableCheckRole(row.tableId, true)
281+
}).then((response) => {
270282
this.msgSuccess(response.msg)
271-
})
283+
}).catch(function() {})
272284
},
273285
handleToDB(row) {
274-
toDBTable(row.tableId).then(response => {
286+
this.$confirm('正在使用【菜单以及API生成到数据库】请确认?', '提示', {
287+
confirmButtonText: '写入DB',
288+
cancelButtonText: '取消',
289+
type: 'warning'
290+
}).then(function() {
291+
return toDBTable(row.tableId)
292+
}).then((response) => {
275293
this.msgSuccess(response.msg)
276-
})
294+
}).catch(function() {})
277295
},
278296
// 多选框选中数据
279297
handleSelectionChange(selection) {

0 commit comments

Comments
 (0)