Skip to content

Commit 7121968

Browse files
pixelmaxQmkrank666
andauthored
2.7.1版本提交 (flipped-aurora#1844)
* feature:表格模板自动化生成 (flipped-aurora#1841) * feature: 为导出模板增加自动化功能 * feature: 视频按钮修改 * feature: 发布2.7.1Beta版本,视频集中处理。 --------- Co-authored-by: krank <emosick@qq.com>
1 parent a44133d commit 7121968

File tree

17 files changed

+190
-77
lines changed

17 files changed

+190
-77
lines changed

server/api/v1/system/sys_auto_code.go

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,19 @@ func (autoApi *AutoCodeApi) GetDB(c *gin.Context) {
5151
// @Success 200 {object} response.Response{data=map[string]interface{},msg=string} "获取当前数据库所有表"
5252
// @Router /autoCode/getTables [get]
5353
func (autoApi *AutoCodeApi) GetTables(c *gin.Context) {
54-
dbName := c.DefaultQuery("dbName", global.GVA_CONFIG.Mysql.Dbname)
54+
dbName := c.Query("dbName")
5555
businessDB := c.Query("businessDB")
56+
if dbName == "" {
57+
dbName = global.GVA_CONFIG.Mysql.Dbname
58+
if businessDB != "" {
59+
for _, db := range global.GVA_CONFIG.DBList {
60+
if db.AliasName == businessDB {
61+
dbName = db.Dbname
62+
}
63+
}
64+
}
65+
}
66+
5667
tables, err := autoCodeService.Database(businessDB).GetTables(businessDB, dbName)
5768
if err != nil {
5869
global.GVA_LOG.Error("查询table失败!", zap.Error(err))
@@ -72,7 +83,17 @@ func (autoApi *AutoCodeApi) GetTables(c *gin.Context) {
7283
// @Router /autoCode/getColumn [get]
7384
func (autoApi *AutoCodeApi) GetColumn(c *gin.Context) {
7485
businessDB := c.Query("businessDB")
75-
dbName := c.DefaultQuery("dbName", global.GVA_CONFIG.Mysql.Dbname)
86+
dbName := c.Query("dbName")
87+
if dbName == "" {
88+
dbName = global.GVA_CONFIG.Mysql.Dbname
89+
if businessDB != "" {
90+
for _, db := range global.GVA_CONFIG.DBList {
91+
if db.AliasName == businessDB {
92+
dbName = db.Dbname
93+
}
94+
}
95+
}
96+
}
7697
tableName := c.Query("tableName")
7798
columns, err := autoCodeService.Database(businessDB).GetColumn(businessDB, tableName, dbName)
7899
if err != nil {

server/core/server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ func RunWindowsServer() {
3838

3939
fmt.Printf(`
4040
欢迎使用 gin-vue-admin
41-
当前版本:v2.7.0
41+
当前版本:v2.7.1
4242
加群方式:微信号:shouzi_1994 QQ群:470239250
4343
项目地址:https://github.com/flipped-aurora/gin-vue-admin
4444
插件市场:https://plugin.gin-vue-admin.com

server/docs/docs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8087,7 +8087,7 @@ const docTemplate = `{
80878087

80888088
// SwaggerInfo holds exported Swagger Info so clients can modify it
80898089
var SwaggerInfo = &swag.Spec{
8090-
Version: "v2.7.0",
8090+
Version: "v2.7.1",
80918091
Host: "",
80928092
BasePath: "",
80938093
Schemes: []string{},

server/docs/swagger.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"description": "使用gin+vue进行极速开发的全栈开发基础平台",
55
"title": "Gin-Vue-Admin Swagger API接口文档",
66
"contact": {},
7-
"version": "v2.7.0"
7+
"version": "v2.7.1"
88
},
99
"paths": {
1010
"/api/createApi": {

server/docs/swagger.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1634,7 +1634,7 @@ info:
16341634
contact: {}
16351635
description: 使用gin+vue进行极速开发的全栈开发基础平台
16361636
title: Gin-Vue-Admin Swagger API接口文档
1637-
version: v2.7.0
1637+
version: v2.7.1
16381638
paths:
16391639
/api/createApi:
16401640
post:

server/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515
//go:generate go mod download
1616

1717
// @title Gin-Vue-Admin Swagger API接口文档
18-
// @version v2.7.0
18+
// @version v2.7.1
1919
// @description 使用gin+vue进行极速开发的全栈开发基础平台
2020
// @securityDefinitions.apikey ApiKeyAuth
2121
// @in header

web/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gin-vue-admin",
3-
"version": "2.7.0",
3+
"version": "2.7.1",
44
"private": true,
55
"scripts": {
66
"serve": "node openDocument.js && vite --host --mode development",

web/src/core/config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const viteLogo = (env) => {
2020
)
2121
console.log(
2222
chalk.green(
23-
`> 当前版本:v2.7.0`
23+
`> 当前版本:v2.7.1`
2424
)
2525
)
2626
console.log(

web/src/core/gin-vue-admin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
register(app)
1111
console.log(`
1212
欢迎使用 Gin-Vue-Admin
13-
当前版本:v2.7.0
13+
当前版本:v2.7.1
1414
加群方式:微信:shouzi_1994 QQ群:622360840
1515
项目地址:https://github.com/flipped-aurora/gin-vue-admin
1616
插件市场:https://plugin.gin-vue-admin.com

web/src/style/main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747

4848
.el-dropdown{
4949
outline: none;
50-
div{
50+
*{
5151
outline: none;
5252
}
5353
}

web/src/view/layout/header/tools.vue

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,25 @@
55

66
<template>
77
<div class="flex items-center mx-4 gap-4">
8+
<el-tooltip
9+
class=""
10+
effect="dark"
11+
content="视频教程"
12+
placement="bottom"
13+
>
14+
<el-dropdown @command="toDoc">
15+
<el-icon class="w-8 h-8 shadow rounded-full border border-gray-200 dark:border-gray-600 cursor-pointer border-solid">
16+
<Film />
17+
</el-icon>
18+
19+
<template #dropdown>
20+
<el-dropdown-menu>
21+
<el-dropdown-item v-for="item in videoList" :key="item.link" :command="item.link">{{ item.title }}</el-dropdown-item>
22+
</el-dropdown-menu>
23+
</template>
24+
</el-dropdown>
25+
</el-tooltip>
26+
827
<el-tooltip
928
class=""
1029
effect="dark"
@@ -68,6 +87,7 @@ import GvaSetting from "@/view/layout/setting/index.vue"
6887
import { ref } from "vue"
6988
import { emitter } from "@/utils/bus.js";
7089
import CommandMenu from "@/components/commandMenu/index.vue";
90+
import {toDoc} from "@/utils/doc";
7191
7292
const appStore = useAppStore()
7393
const showSettingDrawer = ref(false)
@@ -112,6 +132,64 @@ const initPage = () => {
112132
initPage();
113133
114134
135+
const videoList = [
136+
{
137+
title:"1.clone项目和安装依赖",
138+
link:"https://www.bilibili.com/video/BV1jx4y1s7xx",
139+
},
140+
{
141+
title:"2.初始化项目",
142+
link:"https://www.bilibili.com/video/BV1sr421K7sv",
143+
},
144+
{
145+
title:"3.开启调试工具+创建初始化包",
146+
link:"https://www.bilibili.com/video/BV1iH4y1c7Na",
147+
},
148+
{
149+
title:"4.手动使用自动化创建功能",
150+
link:"https://www.bilibili.com/video/BV1UZ421T7fV",
151+
},
152+
{
153+
title:"5.使用已有表格创建业务",
154+
link:"https://www.bilibili.com/video/BV1NE4m1977s",
155+
},
156+
{
157+
title:"6.使用AI创建业务和创建数据源模式的可选项",
158+
link:"https://www.bilibili.com/video/BV17i421a7DE",
159+
},
160+
{
161+
title:"7.创建自己的后端方法",
162+
link:"https://www.bilibili.com/video/BV1Yw4m1k7fg",
163+
},
164+
{
165+
title:"8.新增一个前端页面",
166+
link:"https://www.bilibili.com/video/BV12y411i7oE",
167+
},
168+
{
169+
title:"9.配置一个前端二级页面",
170+
link:"https://www.bilibili.com/video/BV1ZM4m1y7i3",
171+
},
172+
{
173+
title:"10.配置一个前端菜单参数",
174+
link:"https://www.bilibili.com/video/BV1WS42197DZ",
175+
},
176+
{
177+
title:"11.菜单参数实战+动态菜单标题+菜单高亮配置",
178+
link:"https://www.bilibili.com/video/BV1Bb421J7oW",
179+
},
180+
{
181+
title:"12.增加菜单可控按钮",
182+
link:"https://www.bilibili.com/video/BV1Sw4m1k746",
183+
},
184+
{
185+
title:"14.新增客户角色和其相关配置教学",
186+
link:"https://www.bilibili.com/video/BV1Ki421a7X2",
187+
},
188+
{
189+
title:"15.发布项目上线",
190+
link:"https://www.bilibili.com/video/BV1Lx4y1s77D",
191+
}
192+
]
115193
116194
117195
</script>

web/src/view/login/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
<BottomInfo class="left-0 right-0 absolute bottom-3 mx-auto w-full z-20">
109109
<div class="links items-center justify-center gap-2 hidden md:flex">
110110
<a
111-
href="http://doc.henrongyi.top/"
111+
href="https://www.gin-vue-admin.com/"
112112
target="_blank"
113113
>
114114
<img

web/src/view/superAdmin/api/api.vue

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,6 @@
7272
>
7373
新增
7474
</el-button>
75-
<el-icon
76-
class="cursor-pointer"
77-
@click="toDoc('https://www.bilibili.com/video/BV1kv4y1g7nT?p=7&vd_source=f2640257c21e3b547a790461ed94875e')"
78-
>
79-
<VideoCameraFilled />
80-
</el-icon>
8175
<el-button
8276
icon="delete"
8377
:disabled="!apis.length"
@@ -483,8 +477,6 @@ import { toSQLLine } from '@/utils/stringFun'
483477
import WarningBar from '@/components/warningBar/warningBar.vue'
484478
import { ref } from 'vue'
485479
import { ElMessage, ElMessageBox } from 'element-plus'
486-
import { VideoCameraFilled } from '@element-plus/icons-vue'
487-
import { toDoc } from '@/utils/doc'
488480
import ExportExcel from '@/components/exportExcel/exportExcel.vue'
489481
import ExportTemplate from '@/components/exportExcel/exportTemplate.vue'
490482
import ImportExcel from '@/components/exportExcel/importExcel.vue'

web/src/view/superAdmin/authority/authority.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
icon="plus"
99
@click="addAuthority(0)"
1010
>新增角色</el-button>
11-
<el-icon
12-
class="cursor-pointer"
13-
@click="toDoc('https://www.bilibili.com/video/BV1kv4y1g7nT?p=8&vd_source=f2640257c21e3b547a790461ed94875e')"
14-
><VideoCameraFilled /></el-icon>
1511
</div>
1612
<el-table
1713
:data="tableData"
@@ -189,8 +185,7 @@ import WarningBar from '@/components/warningBar/warningBar.vue'
189185
190186
import { ref } from 'vue'
191187
import { ElMessage, ElMessageBox } from 'element-plus'
192-
import { toDoc } from '@/utils/doc'
193-
import { VideoCameraFilled } from '@element-plus/icons-vue'
188+
194189
195190
defineOptions({
196191
name: 'Authority'

web/src/view/superAdmin/menu/menu.vue

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99
>
1010
新增根菜单
1111
</el-button>
12-
<el-icon
13-
class="cursor-pointer"
14-
@click="
15-
toDoc(
16-
'https://www.bilibili.com/video/BV1kv4y1g7nT/?p=4&vd_source=f2640257c21e3b547a790461ed94875e'
17-
)
18-
"
19-
>
20-
<VideoCameraFilled />
21-
</el-icon>
2212
</div>
2313

2414
<!-- 由于此处菜单跟左侧列表一一对应所以不需要分页 pageSize默认999 -->
@@ -423,16 +413,6 @@
423413
>
424414
新增菜单参数
425415
</el-button>
426-
<el-icon
427-
class="cursor-pointer"
428-
@click="
429-
toDoc(
430-
'https://www.bilibili.com/video/BV1kv4y1g7nT?p=9&vd_source=f2640257c21e3b547a790461ed94875e'
431-
)
432-
"
433-
>
434-
<VideoCameraFilled />
435-
</el-icon>
436416
</div>
437417
<el-table
438418
:data="form.parameters"
@@ -516,16 +496,6 @@
516496
>
517497
<QuestionFilled />
518498
</el-icon>
519-
<el-icon
520-
class="cursor-pointer"
521-
@click="
522-
toDoc(
523-
'https://www.bilibili.com/video/BV1kv4y1g7nT?p=11&vd_source=f2640257c21e3b547a790461ed94875e'
524-
)
525-
"
526-
>
527-
<VideoCameraFilled />
528-
</el-icon>
529499
</div>
530500

531501
<el-table
@@ -588,7 +558,7 @@ import WarningBar from '@/components/warningBar/warningBar.vue'
588558
import { canRemoveAuthorityBtnApi } from '@/api/authorityBtn'
589559
import { reactive, ref, onMounted } from 'vue'
590560
import { ElMessage, ElMessageBox } from 'element-plus'
591-
import { QuestionFilled, VideoCameraFilled } from '@element-plus/icons-vue'
561+
import { QuestionFilled } from '@element-plus/icons-vue'
592562
import pathInfo from '@/pathInfo.json'
593563
594564
import { toDoc } from '@/utils/doc'

web/src/view/systemTools/autoPkg/autoPkg.vue

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
>
1414
新增
1515
</el-button>
16-
<el-icon
17-
class="cursor-pointer"
18-
@click="toDoc('https://www.bilibili.com/video/BV1kv4y1g7nT?p=3&vd_source=f2640257c21e3b547a790461ed94875e')"
19-
>
20-
<VideoCameraFilled />
21-
</el-icon>
16+
2217
</div>
2318
<el-table :data="tableData">
2419
<el-table-column
@@ -153,8 +148,6 @@ import {
153148
import { ref } from 'vue'
154149
import WarningBar from '@/components/warningBar/warningBar.vue'
155150
import { ElMessage, ElMessageBox } from 'element-plus'
156-
import { toDoc } from '@/utils/doc'
157-
import { VideoCameraFilled } from '@element-plus/icons-vue'
158151
159152
defineOptions({
160153
name: 'AutoPkg',

0 commit comments

Comments
 (0)