mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-22 23:31:52 +08:00
代码生成:增加主子表 inner 模式的示例
This commit is contained in:
parent
2aecdbf09e
commit
d2aee55ed2
@ -7,6 +7,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<ContentWrap>
|
<ContentWrap>
|
||||||
|
#if ($table.templateType == 11)
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
@ -15,6 +16,7 @@
|
|||||||
>
|
>
|
||||||
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
<Icon icon="ep:plus" class="mr-5px" /> 新增
|
||||||
</el-button>
|
</el-button>
|
||||||
|
#end
|
||||||
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
|
||||||
#foreach($column in $subColumns)
|
#foreach($column in $subColumns)
|
||||||
#if ($column.listOperationResult)
|
#if ($column.listOperationResult)
|
||||||
@ -22,7 +24,8 @@
|
|||||||
#set ($javaField = $column.javaField)
|
#set ($javaField = $column.javaField)
|
||||||
#set ($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
#set ($AttrName=$column.javaField.substring(0,1).toUpperCase() + ${column.javaField.substring(1)})
|
||||||
#set ($comment=$column.columnComment)
|
#set ($comment=$column.columnComment)
|
||||||
#if ($column.javaType == "LocalDateTime")## 时间类型
|
#if ( $column.id == $subJoinColumn.id) ## 特殊:忽略主子表的 join 字段,不用填写
|
||||||
|
#elseif ($column.javaType == "LocalDateTime")## 时间类型
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="${comment}"
|
label="${comment}"
|
||||||
align="center"
|
align="center"
|
||||||
@ -74,15 +77,18 @@
|
|||||||
/>
|
/>
|
||||||
#end
|
#end
|
||||||
</ContentWrap>
|
</ContentWrap>
|
||||||
|
#if ($table.templateType == 11)
|
||||||
<!-- 表单弹窗:添加/修改 -->
|
<!-- 表单弹窗:添加/修改 -->
|
||||||
<${subSimpleClassName}Form ref="formRef" @success="getList" />
|
<${subSimpleClassName}Form ref="formRef" @success="getList" />
|
||||||
|
#end
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { getIntDictOptions, getStrDictOptions, getBoolDictOptions, DICT_TYPE } from '@/utils/dict'
|
import { getIntDictOptions, getStrDictOptions, getBoolDictOptions, DICT_TYPE } from '@/utils/dict'
|
||||||
|
import { dateFormatter } from '@/utils/formatTime'
|
||||||
import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}'
|
import * as ${simpleClassName}Api from '@/api/${table.moduleName}/${table.businessName}'
|
||||||
|
#if ($table.templateType == 11)
|
||||||
import ${subSimpleClassName}Form from './${subSimpleClassName}Form.vue'
|
import ${subSimpleClassName}Form from './${subSimpleClassName}Form.vue'
|
||||||
|
#end
|
||||||
|
|
||||||
const { t } = useI18n() // 国际化
|
const { t } = useI18n() // 国际化
|
||||||
const message = useMessage() // 消息弹窗
|
const message = useMessage() // 消息弹窗
|
||||||
|
Loading…
Reference in New Issue
Block a user