Merge branch 'flipped-aurora:main' into main

This commit is contained in:
薛定饿了不养喵
2024-03-31 00:33:51 +08:00
committed by GitHub
13 changed files with 698 additions and 595 deletions

View File

@@ -234,69 +234,69 @@
</el-select>
</el-form-item>
<div>
<el-form-item>
<template #label>
<el-tooltip
content="注会自动在结构体global.Model其中包含主键和软删除相关操作配置"
placement="bottom"
effect="light"
>
<div> 使用GVA结构 <el-icon><QuestionFilled /></el-icon> </div>
</el-tooltip>
</template>
<el-checkbox
v-model="form.gvaModel"
@change="useGva"
/>
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip
content="注:会自动在结构体添加 created_by updated_by deleted_by方便用户进行资源权限控制"
placement="bottom"
effect="light"
>
<div> 创建资源标识 <el-icon><QuestionFilled /></el-icon> </div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoCreateResource" />
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip
content="注把自动生成的API注册进数据库"
placement="bottom"
effect="light"
>
<div> 自动创建API <el-icon><QuestionFilled /></el-icon> </div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoCreateApiToSql" />
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip
<el-form-item>
<template #label>
<el-tooltip
content="注会自动在结构体global.Model其中包含主键和软删除相关操作配置"
placement="bottom"
effect="light"
>
<div> 使用GVA结构 <el-icon><QuestionFilled /></el-icon> </div>
</el-tooltip>
</template>
<el-checkbox
v-model="form.gvaModel"
@change="useGva"
/>
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip
content="注:会自动在结构体添加 created_by updated_by deleted_by方便用户进行资源权限控制"
placement="bottom"
effect="light"
>
<div> 创建资源标识 <el-icon><QuestionFilled /></el-icon> </div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoCreateResource" />
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip
content="注把自动生成的API注册进数据库"
placement="bottom"
effect="light"
>
<div> 自动创建API <el-icon><QuestionFilled /></el-icon> </div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoCreateApiToSql" />
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip
content="注:把自动生成的菜单注册进数据库"
placement="bottom"
effect="light"
>
<div> 自动创建菜单 <el-icon><QuestionFilled /></el-icon></div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoCreateMenuToSql" />
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip
content="注自动迁移生成的文件到yaml配置的对应位置"
placement="bottom"
effect="light"
>
<div> 自动移动文件 <el-icon><QuestionFilled /></el-icon></div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoMoveFile" />
</el-form-item>
>
<div> 自动创建菜单 <el-icon><QuestionFilled /></el-icon></div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoCreateMenuToSql" />
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip
content="注自动迁移生成的文件到yaml配置的对应位置"
placement="bottom"
effect="light"
>
<div> 自动移动文件 <el-icon><QuestionFilled /></el-icon></div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoMoveFile" />
</el-form-item>
</div>
</el-form>
</div>
@@ -500,11 +500,24 @@
</div>
</div>
<!-- 组件弹窗 -->
<el-dialog
<el-drawer
v-model="dialogFlag"
width="70%"
title="组件内容"
size="70%"
:show-close="false"
>
<template #title>
<div class="flex justify-between items-center">
<span class="text-lg">组件内容</span>
<div>
<el-button @click="closeDialog"> </el-button>
<el-button
type="primary"
@click="enterDialog"
> </el-button>
</div>
</div>
</template>
<FieldDialog
v-if="dialogFlag"
ref="fieldDialogNode"
@@ -512,29 +525,28 @@
:type-options="typeOptions"
:type-search-options="typeSearchOptions"
/>
<template #footer>
<div class="dialog-footer">
<el-button @click="closeDialog"> </el-button>
<el-button
type="primary"
@click="enterDialog"
> </el-button>
</div>
</template>
</el-dialog>
<el-dialog v-model="previewFlag">
<template #header>
<div class="flex items-center py-1.5">
<p>操作栏</p>
<el-button
type="primary"
@click="selectText"
>全选</el-button>
<el-button
type="primary"
@click="copy"
>复制</el-button>
</el-drawer>
<el-drawer
v-model="previewFlag"
size="60%"
:show-close="false"
>
<template #title>
<div class="flex justify-between items-center">
<span class="text-lg">操作栏</span>
<div>
<el-button
type="primary"
@click="selectText"
>全选</el-button>
<el-button
type="primary"
@click="copy"
>复制</el-button>
</div>
</div>
</template>
<PreviewCodeDialog
@@ -542,18 +554,7 @@
ref="previewNode"
:preview-code="preViewCode"
/>
<template #footer>
<div
class="dialog-footer"
style="padding-top:14px;padding-right:14px"
>
<el-button
type="primary"
@click="previewFlag = false"
> </el-button>
</div>
</template>
</el-dialog>
</el-drawer>
</div>
</template>
@@ -564,7 +565,7 @@ import PreviewCodeDialog from '@/view/systemTools/autoCode/component/previewCode
import { toUpperCase, toHump, toSQLLine, toLowerCase } from '@/utils/stringFun'
import { createTemp, getDB, getTable, getColumn, preview, getMeta, getPackageApi } from '@/api/autoCode'
import { getDict } from '@/utils/dictionary'
import { ref, getCurrentInstance, reactive, watch, toRaw } from 'vue'
import { ref, reactive, watch, toRaw } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { ElMessage, ElMessageBox } from 'element-plus'
import WarningBar from '@/components/warningBar/warningBar.vue'