mirror of
https://gitee.com/log4j/pig-ui.git
synced 2024-12-23 05:40:20 +08:00
代码生成-修改模块管理、模块分组
This commit is contained in:
parent
9889bc248b
commit
19f970e185
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-drawer :title="form.id ? $t('common.editBtn') : $t('common.addBtn')" v-model="visible">
|
||||
<el-dialog :title="form.id ? $t('common.editBtn') : $t('common.addBtn')" v-model="visible">
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12" class="mb20">
|
||||
@ -22,7 +22,7 @@
|
||||
<el-button type="primary" @click="onSubmit">{{ $t('common.confirmButtonText') }}</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-drawer>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts" name="GenGroupDialog">
|
||||
@ -50,6 +50,7 @@ const form = reactive({
|
||||
|
||||
// 定义校验规则
|
||||
const dataRules = ref({
|
||||
groupName: [{required: true, message: '分组名称不能为空', trigger: 'blur'}]
|
||||
})
|
||||
|
||||
// 打开弹窗
|
||||
|
@ -1,6 +1,24 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<el-card class="layout-padding-auto">
|
||||
<el-row v-show="showSearch" class="mb8">
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true">
|
||||
<el-form-item :label="$t('group.id')" prop="id" >
|
||||
<el-input :placeholder="t('group.inputIdTip')" v-model="state.queryForm.id"
|
||||
style="max-width: 180px" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('group.groupName')" prop="groupName" >
|
||||
<el-input :placeholder="t('group.inputGroupNameTip')" v-model="state.queryForm.groupName"
|
||||
style="max-width: 180px" />
|
||||
</el-form-item>
|
||||
<el-form-item class="ml2">
|
||||
<el-button formDialogRef icon="search" type="primary" @click="getDataList">
|
||||
{{ $t('common.queryBtn') }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" formDialogRef @click="resetQuery">{{ $t('common.resetBtn') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button formDialogRef icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
@ -48,6 +66,7 @@
|
||||
import { BasicTableProps, useTable } from "/@/hooks/table";
|
||||
import { fetchList, delObjs } from "/@/api/gen/group";
|
||||
import { useMessage, useMessageBox } from "/@/hooks/message";
|
||||
import { useDict } from '/@/hooks/dict';
|
||||
import { useI18n } from "vue-i18n";
|
||||
|
||||
// 引入组件
|
||||
|
@ -1,14 +1,7 @@
|
||||
<template>
|
||||
<el-dialog :title="form.id ? $t('common.editBtn') : $t('common.addBtn')" v-model="visible"
|
||||
:close-on-click-modal="false" draggable>
|
||||
<el-dialog :title="form.id ? $t('common.editBtn') : $t('common.addBtn')" v-model="visible">
|
||||
<el-form ref="dataFormRef" :model="form" :rules="dataRules" formDialogRef label-width="90px">
|
||||
<el-row :gutter="24">
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item :label="t('template.id')" prop="id">
|
||||
<el-input v-model="form.id" :placeholder="t('template.inputIdTip')"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item :label="t('template.templateName')" prop="templateName">
|
||||
<el-input v-model="form.templateName" :placeholder="t('template.inputTemplateNameTip')"/>
|
||||
@ -22,7 +15,7 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="mb20">
|
||||
<el-form-item :label="t('template.desc')" prop="desc">
|
||||
<el-form-item :label="t('template.desc')" prop="templateDesc">
|
||||
<el-input v-model="form.templateDesc" :placeholder="t('template.inputDescTip')"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
@ -45,6 +38,7 @@ const emit = defineEmits(['refresh']);
|
||||
import { useMessage } from "/@/hooks/message";
|
||||
import { getObj, addObj, putObj } from '/@/api/gen/template'
|
||||
import { useI18n } from "vue-i18n"
|
||||
import { rule } from '/@/utils/validate';
|
||||
|
||||
const { t } = useI18n();
|
||||
|
||||
@ -58,11 +52,14 @@ const form = reactive({
|
||||
id: '',
|
||||
templateName: '',
|
||||
generatorPath: '',
|
||||
templateDesc: '',
|
||||
templateDesc: '',
|
||||
});
|
||||
|
||||
// 定义校验规则
|
||||
const dataRules = ref({
|
||||
templateName: [{required: true, message: '模板名称不能为空', trigger: 'blur'}],
|
||||
generatorPath: [{required: true, message: '模板路径不能为空', trigger: 'blur'}],
|
||||
templateDesc: [{required: true, message: '模板描述不能为空', trigger: 'blur'}]
|
||||
})
|
||||
|
||||
// 打开弹窗
|
||||
|
@ -1,6 +1,24 @@
|
||||
<template>
|
||||
<div class="layout-padding">
|
||||
<el-card class="layout-padding-auto">
|
||||
<el-row v-show="showSearch" class="mb8">
|
||||
<el-form :model="state.queryForm" ref="queryRef" :inline="true">
|
||||
<el-form-item :label="$t('template.id')" prop="id" >
|
||||
<el-input :placeholder="t('template.inputIdTip')" v-model="state.queryForm.id"
|
||||
style="max-width: 180px" />
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('template.templateName')" prop="templateName" >
|
||||
<el-input :placeholder="t('template.inputTemplateNameTip')" v-model="state.queryForm.templateName"
|
||||
style="max-width: 180px" />
|
||||
</el-form-item>
|
||||
<el-form-item class="ml2">
|
||||
<el-button formDialogRef icon="search" type="primary" @click="getDataList">
|
||||
{{ $t('common.queryBtn') }}
|
||||
</el-button>
|
||||
<el-button icon="Refresh" formDialogRef @click="resetQuery">{{ $t('common.resetBtn') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<div class="mb8" style="width: 100%">
|
||||
<el-button formDialogRef icon="folder-add" type="primary" class="ml10" @click="formDialogRef.openDialog()"
|
||||
@ -91,7 +109,7 @@ const resetQuery = () => {
|
||||
|
||||
// 导出excel
|
||||
const exportExcel = () => {
|
||||
downBlobFile('/gen/template/export', state.queryForm, 'template.xlsx')
|
||||
downBlobFile('/codegen/template/export', state.queryForm, 'template.xlsx')
|
||||
}
|
||||
|
||||
// 多选事件
|
||||
|
Loading…
Reference in New Issue
Block a user