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