增加自动化代码匹配进入业务库功能 (#1249)
* Update api.go.tpl 修复不创建资源标识时 批量删除 方法内 deletedBy 未声明的问题 * 可自动创建业务库 * 自动化业务库回滚适配 * 修复断点续传路径穿越漏洞 * 增加指定菜单亮起功能 * 增加菜单高亮功能,调整版本号 * fixed: 用户后台注册没接收手机号和邮箱 Co-authored-by: dzwvip <dzwvip@qq.com> Co-authored-by: SliverHorn <503551462@qq.com>
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
import { register } from './global'
|
||||
|
||||
export default {
|
||||
install: (app) => {
|
||||
register(app)
|
||||
console.log(`
|
||||
install: (app) => {
|
||||
register(app)
|
||||
console.log(`
|
||||
欢迎使用 Gin-Vue-Admin
|
||||
当前版本:v2.5.4
|
||||
当前版本:v2.5.4b
|
||||
加群方式:微信:shouzi_1994 QQ群:622360840
|
||||
GVA讨论社区:https://support.qq.com/products/371961
|
||||
插件市场:https://plugin.gin-vue-admin.com
|
||||
@@ -18,5 +18,5 @@ export default {
|
||||
默认前端文件运行地址:http://127.0.0.1:${import.meta.env.VITE_CLI_PORT}
|
||||
如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/coffee/index.html
|
||||
`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -82,7 +82,8 @@ getTheme()
|
||||
|
||||
const active = ref('')
|
||||
watch(() => route, () => {
|
||||
active.value = route.name
|
||||
console.log(route.meta.activeName)
|
||||
active.value = route.meta.activeName || route.name
|
||||
}, { deep: true })
|
||||
|
||||
watch(() => userStore.sideMode, () => {
|
||||
@@ -91,7 +92,7 @@ watch(() => userStore.sideMode, () => {
|
||||
|
||||
const isCollapse = ref(false)
|
||||
const initPage = () => {
|
||||
active.value = route.name
|
||||
active.value = route.meta.activeName || route.name
|
||||
const screenWidth = document.body.clientWidth
|
||||
if (screenWidth < 1000) {
|
||||
isCollapse.value = !isCollapse.value
|
||||
|
@@ -124,6 +124,17 @@
|
||||
<el-form-item label="排序标记" prop="sort" style="width:30%">
|
||||
<el-input v-model.number="form.sort" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item prop="meta.activeName" style="width:30%">
|
||||
<template #label>
|
||||
<div>
|
||||
<span> 高亮菜单 </span>
|
||||
<el-tooltip content="注:当到达此路由时候,指定左侧菜单指定name会处于活跃状态(亮起),可为空,为空则为本路由Name。" placement="bottom" effect="light">
|
||||
<el-icon><QuestionFilled /></el-icon>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</template>
|
||||
<el-input v-model="form.meta.activeName" :placeholder="form.name" autocomplete="off" />
|
||||
</el-form-item>
|
||||
<el-form-item label="KeepAlive" prop="meta.keepAlive" style="width:30%">
|
||||
<el-select v-model="form.meta.keepAlive" style="width:100%" placeholder="是否keepAlive缓存页面">
|
||||
<el-option :value="false" label="否" />
|
||||
@@ -322,6 +333,7 @@ const form = ref({
|
||||
parentId: '',
|
||||
component: '',
|
||||
meta: {
|
||||
activeName: '',
|
||||
title: '',
|
||||
icon: '',
|
||||
defaultMenu: false,
|
||||
|
@@ -71,6 +71,31 @@
|
||||
<el-icon class="auto-icon" @click="getPkgs"><refresh /></el-icon>
|
||||
<el-icon class="auto-icon" @click="goPkgs"><document-add /></el-icon>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务库" prop="businessDB">
|
||||
<template #label>
|
||||
<el-tooltip content="注:需要提前到db-list自行配置多数据库,此项为空则会使用gva本库创建自动化代码(global.GVA_DB),填写后则会创建指定库的代码(global.MustGetGlobalDBByDBName(dbname))" placement="bottom" effect="light">
|
||||
<div> 业务库 <el-icon><QuestionFilled /></el-icon> </div>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
<el-select
|
||||
v-model="form.businessDB"
|
||||
style="width:194px"
|
||||
placeholder="选择业务库"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dbList"
|
||||
:key="item.aliasName"
|
||||
:value="item.aliasName"
|
||||
:label="item.aliasName"
|
||||
:disabled="item.disable"
|
||||
>
|
||||
<div>
|
||||
<span>{{ item.aliasName }}</span>
|
||||
<span style="float:right;color:#8492a6;font-size:13px">{{ item.dbName }}</span>
|
||||
</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<template #label>
|
||||
<el-tooltip content="注:会自动在结构体添加 created_by updated_by deleted_by,方便用户进行资源权限控制" placement="bottom" effect="light">
|
||||
@@ -223,7 +248,6 @@ const dbform = ref({
|
||||
dbName: '',
|
||||
tableName: ''
|
||||
})
|
||||
const dbOptions = ref([])
|
||||
const tableOptions = ref([])
|
||||
const addFlag = ref('')
|
||||
const fdMap = ref({})
|
||||
@@ -234,6 +258,7 @@ const form = ref({
|
||||
package: '',
|
||||
abbreviation: '',
|
||||
description: '',
|
||||
businessDB: '',
|
||||
autoCreateApiToSql: true,
|
||||
autoMoveFile: true,
|
||||
autoCreateResource: false,
|
||||
@@ -411,10 +436,14 @@ const enterForm = async(isPreview) => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const dbList = ref([])
|
||||
const dbOptions = ref([])
|
||||
const getDbFunc = async() => {
|
||||
const res = await getDB()
|
||||
if (res.code === 0) {
|
||||
dbOptions.value = res.data.dbs
|
||||
dbList.value = res.data.dbList
|
||||
}
|
||||
}
|
||||
const getTableFunc = async() => {
|
||||
|
Reference in New Issue
Block a user