v3.8.1发布,上传代码

This commit is contained in:
JEECG
2025-06-25 13:34:13 +08:00
parent 0fda30b5d2
commit 7a4c66af57
188 changed files with 3764 additions and 905 deletions

View File

@ -48,7 +48,10 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
<#assign has_multi_query_field=true>
</#if>
</#list>
<#assign enhanceJavaList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.enhanceJavaList??>
<#assign enhanceJavaList = tableVo.extendParams.enhanceJavaList?filter(enhance -> enhance??)>
</#if>
/**
* @Description: ${tableVo.ftlDescription}
* @Author: jeecg-boot
@ -79,6 +82,16 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 查询前触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeQuery()
</#if>
</#list>
</#if>
<#if has_multi_query_field>
// 自定义查询规则
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
@ -94,6 +107,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
</#if>
Page<${entityName}> page = new Page<${entityName}>(pageNo, pageSize);
IPage<${entityName}> pageList = ${entityName?uncap_first}Service.page(page, queryWrapper);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 查询后触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterQuery()
</#if>
</#list>
</#if>
return Result.OK(pageList);
}
@ -108,10 +129,27 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 新增前的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeAdd()
</#if>
</#list>
</#if>
<#if bpm_flag>
${entityName?uncap_first}.setBpmStatus("1");
</#if>
${entityName?uncap_first}Service.save(${entityName?uncap_first});
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 新增后的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterAdd()
</#if>
</#list>
</#if>
return Result.OK("添加成功!");
}
@ -126,7 +164,23 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 编辑前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeEdit()
</#if>
</#list>
</#if>
${entityName?uncap_first}Service.updateById(${entityName?uncap_first});
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 编辑后,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterEdit()
</#if>
</#list>
</#if>
return Result.OK("编辑成功!");
}
@ -186,6 +240,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='export' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导出前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeExport()
</#if>
</#list>
</#if>
return super.exportXls(request, ${entityName?uncap_first}, ${entityName}.class, "${tableVo.ftlDescription}");
}
@ -199,6 +261,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='import' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导入前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeImport()
</#if>
</#list>
</#if>
return super.importExcel(request, response, ${entityName}.class);
}

View File

@ -51,6 +51,8 @@ public class ${entityName} implements Serializable {
</#if>
<#elseif po.classType=='sel_tree'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
<#elseif po.classType=='link_table'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicCode = "${po.dictField}", dicText = "${po.dictText?split(",")[0]}"'>
</#if>
/**${po.filedComment}*/
<#if po.fieldName == primaryKeyField>

View File

@ -8,8 +8,8 @@ navigationBarTitleText: '${tableVo.ftlDescription}',
},
}
</route>
<template>
<#assign onlyFields = []>
<PageLayout :navTitle="navTitle" :backRouteName="backRouteName">
<scroll-view class="scrollArea" scroll-y>
<view class="form-container">
@ -49,19 +49,11 @@ navigationBarTitleText: '${tableVo.ftlDescription}',
:required="true"
</#if>
>
<!-- #ifndef APP-PLUS -->
<online-file
v-model:value="myFormData[${autoStringSuffix(po)}]"
name=${autoStringSuffix(po)}
></online-file>
<!-- #endif -->
<!-- #ifdef APP-PLUS -->
<online-file-custom
v-model:value="myFormData[${autoStringSuffix(po)}]"
name=${autoStringSuffix(po)}
></online-file-custom>
<!-- #endif -->
</wd-cell>
<#elseif po.classType =='datetime' || po.classType =='time'>
<DateTime
@ -166,6 +158,15 @@ navigationBarTitleText: '${tableVo.ftlDescription}',
clearable
v-model="myFormData[${autoStringSuffix(po)}]"
></wd-input>
<#elseif po.classType =='pca'>
<online-pca
:label="get4Label('${po.filedComment}')"
labelWidth="100px"
name=${autoStringSuffix(po)}
prop=${autoStringSuffix(po)}
clearable
v-model:value="myFormData[${autoStringSuffix(po)}]"
></online-pca>
<#elseif po.classType =='popup_dict'>
<PopupDict
labelWidth="100px"
@ -291,9 +292,12 @@ navigationBarTitleText: '${tableVo.ftlDescription}',
<#-- 金额 -->
<#elseif fieldValidType == 'money'>
{ pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'},
<#-- 唯一校验 -->
<#elseif fieldValidType != '' && fieldValidType == 'only'>
<#assign onlyFields = onlyFields + [autoStringSuffix(po)]>
<#-- 正则校验 -->
<#elseif fieldValidType != '' && fieldValidType != '*'>
{ pattern: '${fieldValidType}', message: '不符合校验规则!'},
{ pattern: /${fieldValidType}/, message: '不符合校验规则!'},
<#-- 无校验 -->
<#else>
<#t>
@ -352,9 +356,12 @@ navigationBarTitleText: '${tableVo.ftlDescription}',
<#-- 金额 -->
<#elseif fieldValidType == 'money'>
{ pattern: /^(([1-9][0-9]*)|([0]\.\d{0,2}|[1-9][0-9]*\.\d{0,2}))$/, message: '请输入正确的金额!'},
<#-- 唯一校验 -->
<#elseif fieldValidType != '' && fieldValidType == 'only'>
<#assign onlyFields = onlyFields + [autoStringSuffix(po)]>
<#-- 正则校验 -->
<#elseif fieldValidType != '' && fieldValidType != '*'>
{ pattern: '${fieldValidType}', message: '不符合校验规则!'},
{ pattern: /${fieldValidType}/, message: '不符合校验规则!'},
<#-- 无校验 -->
<#else>
<#t>
@ -393,8 +400,10 @@ import OnlineRadio from '@/components/online/view/online-radio.vue'
import OnlineCheckbox from '@/components/online/view/online-checkbox.vue'
import OnlineMulti from '@/components/online/view/online-multi.vue'
import OnlinePopupLinkRecord from '@/components/online/view/online-popup-link-record.vue'
import OnlinePca from '@/components/online/view/online-pca.vue'
import SelectDept from '@/components/SelectDept/SelectDept.vue'
import SelectUser from '@/components/SelectUser/SelectUser.vue'
import {duplicateCheck} from "@/service/api";
defineOptions({
name: '${entityName}Form',
options: {
@ -434,8 +443,40 @@ const handleSuccess = () => {
uni.$emit('refreshList');
router.back()
}
/**
* 校验唯一
* @param values
* @returns {boolean}
*/
async function fieldCheck(values: any) {
const onlyField = [
<#list onlyFields as field>
${field}<#sep>, </#sep>
</#list>
];
for (const field of onlyField) {
if (values[field]) {
// 仅校验有值的字段
const res: any = await duplicateCheck({
tableName: '${tableName}',
fieldName: field, // 使用处理后的字段名
fieldVal: values[field],
dataId: values.id,
});
if (!res.success) {
toast.warning(res.message);
return true; // 校验失败
}
}
}
return false; // 校验通过
}
// 提交表单
const handleSubmit = () => {
const handleSubmit = async () => {
// 判断字段必填和正则
if (await fieldCheck(myFormData)) {
return
}
let url = dataId.value?'/${entityPackagePath}/${entityName?uncap_first}/edit':'/${entityPackagePath}/${entityName?uncap_first}/add';
form.value
.validate()
@ -509,4 +550,11 @@ onLoad((option) => {
padding-bottom: calc(constant(safe-area-inset-bottom) + 10px);
padding-bottom: calc(env(safe-area-inset-bottom) + 10px);
}
:deep(.wd-cell__label) {
font-size: 14px;
color: #444;
}
:deep(.wd-cell__value) {
text-align: left;
}
</style>

View File

@ -20,6 +20,10 @@
<#assign list_need_pca=true>
</#if>
</#list>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<#-- 结束循环 -->
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
@ -28,6 +32,14 @@
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'button'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -75,6 +87,10 @@
</BasicTable>
<!-- 表单区域 -->
<${entityName}Modal @register="registerModal" @success="handleSuccess"></${entityName}Modal>
<#if bpm_flag==true>
<!-- 审批记录 -->
<BpmPictureModal @register="registerBpmModal" />
</#if>
</div>
</template>
@ -88,6 +104,7 @@
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName}.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage';
<#if list_need_pca>
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
</#if>
@ -102,10 +119,12 @@
</#if>
<#if bpm_flag==true>
import { startProcess } from '/@/api/common/api';
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
</#if>
const queryParam = reactive<any>({});
const checkedKeys = ref<Array<string | number>>([]);
const userStore = useUserStore();
const { createMessage } = useMessage();
//注册model
const [registerModal, {openModal}] = useModal();
//注册table数据
@ -261,7 +280,22 @@
placement: 'topLeft',
},
auth: '${entityPackage}:${tableName}:delete'
},
{
label: '审批进度',
onClick: handlePreviewPic.bind(null, record),
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
if(record.bpmStatus == '1'){
dropDownAction.push({
@ -288,6 +322,16 @@
},
auth: '${entityPackage}:${tableName}:delete'
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
]
</#if>
}
@ -306,8 +350,32 @@
await startProcess(params);
handleSuccess();
}
/**
* 审批进度
*/
async function handlePreviewPic(record) {
bpmPicModal(true, {
flowCode: 'dev_${tableName}_001',
dataId: record.id,
});
}
</#if>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='button'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
<#if btn.buttonStyle=='link'>
function handle${btn.buttonCode?cap_first}(record){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
<#if list_need_category>
/**
* 初始化字典配置

View File

@ -57,7 +57,7 @@ export const columns: BasicColumn[] = [
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'${switch_extend_arr1}'},{text:'否',value:'${switch_extend_arr2}'}])
},
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict'>
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict' || po.classType=='link_table'>
dataIndex: '${po.fieldName}_dictText'
<#elseif po.classType=='cat_tree'>
dataIndex: '${po.fieldName}',
@ -423,6 +423,14 @@ export const formSchema: FormSchema[] = [
</#if>
pidValue:"${po.dictField}",
},
<#elseif po.classType=='link_table'>
component: 'JLinkTableCard',
componentProps: {
valueField: '${po.dictField}',
textField: '${po.dictText}',
tableName: '${po.dictTable}',
multi: <#if (po.queryMode!"") == "multi">true<#else>false</#if>
},
<#else>
component: 'Input',
</#if>

View File

@ -1,7 +1,20 @@
<#include "/common/utils.ftl">
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<template>
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
<BasicForm @register="registerForm" name="${entityName}Form" />
<#if buttonList?? && buttonList?size gt 0>
<template #insertFooter>
<#list buttonList as btn>
<#if btn.buttonStyle=='form'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</template>
</#if>
</BasicModal>
</template>
@ -11,6 +24,8 @@
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../${entityName}.data';
import {saveOrUpdate} from '../${entityName}.api';
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
// Emits声明
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
@ -65,6 +80,16 @@
setModalProps({confirmLoading: false});
}
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='form'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
</script>
<style lang="less" scoped>

View File

@ -23,6 +23,10 @@
<#assign need_range_number = false>
<#assign is_range = false>
<#assign query_flag = false>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<#assign is_like = false>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
@ -105,6 +109,13 @@
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'button'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -151,6 +162,10 @@
</BasicTable>
<!-- 表单区域 -->
<${entityName}Modal ref="registerModal" @success="handleSuccess"></${entityName}Modal>
<#if bpm_flag==true>
<!-- 审批记录 -->
<BpmPictureModal @register="registerBpmModal" />
</#if>
</div>
</template>
@ -163,6 +178,8 @@
import { downloadFile } from '/@/utils/common/renderUtils';
import ${entityName}Modal from './components/${entityName}Modal.vue'
import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage';
import {useModal} from '/@/components/Modal';
<#include "/common/form/native/vue3NativeImport.ftl">
<#if need_category>
import { loadCategoryData } from '/@/api/common/api';
@ -178,6 +195,7 @@
</#if>
<#if bpm_flag==true>
import { startProcess } from '/@/api/common/api';
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
</#if>
<#if is_range>
import { cloneDeep } from "lodash-es";
@ -188,6 +206,7 @@
const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref();
const userStore = useUserStore();
const { createMessage } = useMessage();
//注册table数据
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: {
@ -328,7 +347,22 @@
placement: 'topLeft',
},
auth: '${entityPackage}:${tableName}:delete'
}
},
{
label: '审批进度',
onClick: handlePreviewPic.bind(null, record),
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
if(record.bpmStatus == '1'){
dropDownAction.push({
@ -355,6 +389,16 @@
},
auth: '${entityPackage}:${tableName}:delete'
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
]
</#if>
}
@ -413,9 +457,33 @@
}
await startProcess(params);
handleSuccess();
}
/**
* 审批进度
*/
async function handlePreviewPic(record) {
bpmPicModal(true, {
flowCode: 'dev_${tableName}_001',
dataId: record.id,
});
}
</#if>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='button'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
<#if btn.buttonStyle=='link'>
function handle${btn.buttonCode?cap_first}(record){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
<#if need_category>
/**
* form点击事件

View File

@ -1,6 +1,21 @@
<template>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<${entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></${entityName}Form>
<template #footer>
<#if buttonList?? && buttonList?size gt 0>
<#list buttonList as btn>
<#if btn.buttonStyle=='form'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-button @click="handleCancel">取消</a-button>
<a-button :class="{ 'jee-hidden': disableSubmit }" type="primary" @click="handleOk">确认</a-button>
</template>
</j-modal>
</template>
@ -8,7 +23,8 @@
import { ref, nextTick, defineExpose } from 'vue';
import ${entityName}Form from './${entityName}Form.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
@ -60,7 +76,15 @@
function handleCancel() {
visible.value = false;
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='form'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
defineExpose({
add,
edit,

View File

@ -50,6 +50,10 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
<#assign pidFieldName = po.fieldName>
</#if>
</#list>
<#assign enhanceJavaList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.enhanceJavaList??>
<#assign enhanceJavaList = tableVo.extendParams.enhanceJavaList?filter(enhance -> enhance??)>
</#if>
@Tag(name="${tableVo.ftlDescription}")
@RestController
@RequestMapping("/${entityPackagePath}/${entityName?uncap_first}")
@ -74,6 +78,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 查询前触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeQuery()
</#if>
</#list>
</#if>
String hasQuery = req.getParameter("hasQuery");
if(hasQuery != null && "true".equals(hasQuery)){
QueryWrapper<${entityName}> queryWrapper = QueryGenerator.initQueryWrapper(${entityName?uncap_first}, req.getParameterMap());
@ -92,6 +104,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
queryWrapper.eq("${Format.humpToUnderline(pidFieldName)}", parentId);
Page<${entityName}> page = new Page<${entityName}>(pageNo, pageSize);
IPage<${entityName}> pageList = ${entityName?uncap_first}Service.page(page, queryWrapper);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 查询后触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterQuery()
</#if>
</#list>
</#if>
return Result.OK(pageList);
}
}
@ -210,7 +230,23 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 新增前的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeAdd()
</#if>
</#list>
</#if>
${entityName?uncap_first}Service.add${entityName}(${entityName?uncap_first});
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 新增后的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterAdd()
</#if>
</#list>
</#if>
return Result.OK("添加成功!");
}
@ -225,7 +261,23 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 编辑前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeEdit()
</#if>
</#list>
</#if>
${entityName?uncap_first}Service.update${entityName}(${entityName?uncap_first});
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 编辑后,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterEdit()
</#if>
</#list>
</#if>
return Result.OK("编辑成功!");
}
@ -285,6 +337,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='export' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导出前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeExport()
</#if>
</#list>
</#if>
return super.exportXls(request, ${entityName?uncap_first}, ${entityName}.class, "${tableVo.ftlDescription}");
}
@ -298,6 +358,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='import' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导入前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeImport()
</#if>
</#list>
</#if>
return super.importExcel(request, response, ${entityName}.class);
}

View File

@ -48,6 +48,8 @@ public class ${entityName} implements Serializable {
</#if>
<#elseif po.classType=='sel_tree'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
<#elseif po.classType=='link_table'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicCode = "${po.dictField}", dicText = "${po.dictText?split(",")[0]}"'>
</#if>
/**${po.filedComment}*/
<#if po.fieldName == primaryKeyField>

View File

@ -12,6 +12,10 @@
</#if>
</#list>
<#assign list_need_pca=false>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<#-- 开始循环 -->
<#list columns as po>
<#if po.fieldDbName=='bpm_status'>
@ -33,7 +37,13 @@
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:add'" @click="handleCreate" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'button'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -81,6 +91,10 @@
</BasicTable>
<!--字典弹窗-->
<${entityName}Modal @register="registerModal" @success="handleSuccess"/>
<#if bpm_flag==true>
<!-- 审批记录 -->
<BpmPictureModal @register="registerBpmModal" />
</#if>
</div>
</template>
@ -93,6 +107,7 @@
import ${entityName}Modal from './components/${entityName}Modal.vue';
import {columns, searchFormSchema, superQuerySchema} from './${entityName}.data';
import { downloadFile } from '/@/utils/common/renderUtils';
import { useMessage } from '/@/hooks/web/useMessage';
import {list, delete${entityName}, batchDelete${entityName}, getExportUrl,getImportUrl, getChildList,getChildListBatch} from './${entityName}.api';
<#if list_need_pca>
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
@ -103,7 +118,9 @@
</#if>
<#if bpm_flag==true>
import { startProcess } from '/@/api/common/api';
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
</#if>
const { createMessage } = useMessage();
const queryParam = reactive<any>({});
const expandedRowKeys = ref([]);
//字典model
@ -408,6 +425,21 @@
placement: 'topLeft'
},
auth: '${entityPackage}:${tableName}:delete'
},{
label: '审批进度',
onClick: handlePreviewPic.bind(null, record),
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
if(record.bpmStatus == '1' || !record.bpmStatus){
dropDownAction.push({
@ -434,6 +466,16 @@
},
auth: '${entityPackage}:${tableName}:delete'
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
]
</#if>
}
@ -452,6 +494,16 @@
await startProcess(params);
await reload();
}
/**
* 审批进度
*/
async function handlePreviewPic(record) {
bpmPicModal(true, {
flowCode: 'dev_${tableName}_001',
dataId: record.id,
});
}
</#if>
<#if list_has_popup_dict>
/**
@ -474,6 +526,21 @@
return records;
}
</#if>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='button'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
<#if btn.buttonStyle=='link'>
function handle${btn.buttonCode?cap_first}(record){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
</script>
<style lang="less" scoped>

View File

@ -61,7 +61,7 @@ export const columns: BasicColumn[] = [
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'${switch_extend_arr1}'},{text:'否',value:'${switch_extend_arr2}'}])
},
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict'>
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict' || po.classType=='link_table'>
dataIndex: '${po.fieldName}_dictText'
<#elseif po.classType=='cat_tree'>
dataIndex: '${po.fieldName}',
@ -198,6 +198,14 @@ export const searchFormSchema: FormSchema[] = [
</#if>
pidValue:"${po.dictField}",
},
<#elseif po.classType=='link_table'>
component: 'JLinkTableCard',
componentProps: {
valueField: '${po.dictField}',
textField: '${po.dictText}',
tableName: '${po.dictTable}',
multi: <#if (po.queryMode!"") == "multi">true<#else>false</#if>
},
<#elseif po.classType=='list' || po.classType=='radio' || po.classType=='checkbox'>
<#-- ---------------------------下拉或是单选 判断数据字典是表字典还是普通字典------------------------------- -->
component: 'JSelectMultiple',

View File

@ -9,9 +9,22 @@
<#assign hasChildrenField = po.fieldName>
</#if>
</#list>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<template>
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" :title="getTitle" @ok="handleSubmit">
<BasicForm @register="registerForm" name="${entityName}Form" />
<#if buttonList?? && buttonList?size gt 0>
<template #insertFooter>
<#list buttonList as btn>
<#if btn.buttonStyle=='form'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</template>
</#if>
</BasicModal>
</template>
<script lang="ts" setup>
@ -20,6 +33,8 @@
import {BasicForm, useForm} from '/@/components/Form';
import {formSchema} from '../${entityName}.data';
import {loadTreeData, saveOrUpdateDict} from '../${entityName}.api';
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
// 获取emit
const emit = defineEmits(['register', 'success']);
const isUpdate = ref(true);
@ -115,6 +130,15 @@
setModalProps({confirmLoading: false});
}
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='form'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
</script>
<style lang="less" scoped>
/** 时间和数字输入框样式 */

View File

@ -33,6 +33,10 @@
<#assign need_range_number = false>
<#assign is_range = false>
<#assign is_like = false>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<#assign query_flag = false>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
@ -113,6 +117,13 @@
<!--插槽:table标题-->
<template #tableTitle>
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'button'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -161,6 +172,10 @@
</BasicTable>
<!-- 表单区域 -->
<${entityName}Modal ref="registerModal" @success="handleSuccess"></${entityName}Modal>
<#if bpm_flag==true>
<!-- 审批记录 -->
<BpmPictureModal @register="registerBpmModal" />
</#if>
</div>
</template>
@ -172,6 +187,7 @@
import {list, delete${entityName}, batchDelete${entityName}, getExportUrl,getImportUrl, getChildList,getChildListBatch} from './${entityName}.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import ${entityName}Modal from './components/${entityName}Modal.vue'
import { useMessage } from '/@/hooks/web/useMessage';
<#include "/common/form/native/vue3NativeImport.ftl">
<#if need_category>
import { loadCategoryData } from '/@/api/common/api';
@ -190,8 +206,9 @@
</#if>
<#if bpm_flag==true>
import { startProcess } from '/@/api/common/api';
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
</#if>
const { createMessage } = useMessage();
const expandedRowKeys = ref([]);
const queryParam = ref<any>({});
const toggleSearchStatus = ref<boolean>(false);
@ -480,6 +497,21 @@
},
auth: '${entityPackage}:${tableName}:delete'
},
{
label: '审批进度',
onClick: handlePreviewPic.bind(null, record),
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
if(record.bpmStatus == '1' || !record.bpmStatus){
dropDownAction.push({
@ -510,7 +542,17 @@
placement: 'topLeft',
},
auth: '${entityPackage}:${tableName}:delete'
},
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
</#if>
}
@ -528,9 +570,31 @@
}
await startProcess(params);
await reload();
}
/**
* 审批进度
*/
async function handlePreviewPic(record) {
bpmPicModal(true, {
flowCode: 'dev_${tableName}_001',
dataId: record.id,
});
}
</#if>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='button'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
<#if btn.buttonStyle=='link'>
function handle${btn.buttonCode?cap_first}(record){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
/**
* 查询

View File

@ -1,6 +1,21 @@
<template>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<${entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></${entityName}Form>
<template #footer>
<#if buttonList?? && buttonList?size gt 0>
<#list buttonList as btn>
<#if btn.buttonStyle=='form'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-button @click="handleCancel">取消</a-button>
<a-button :class="{ 'jee-hidden': disableSubmit }" type="primary" @click="handleOk">确认</a-button>
</template>
</j-modal>
</template>
@ -8,7 +23,9 @@
import { ref, nextTick, defineExpose } from 'vue';
import ${entityName}Form from './${entityName}Form.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);

View File

@ -47,6 +47,10 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
<#assign has_multi_query_field=true>
</#if>
</#list>
<#assign enhanceJavaList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.enhanceJavaList??>
<#assign enhanceJavaList = tableVo.extendParams.enhanceJavaList?filter(enhance -> enhance??)>
</#if>
/**
* @Description: ${tableVo.ftlDescription}
* @Author: jeecg-boot
@ -85,6 +89,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 查询前触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeQuery()
</#if>
</#list>
</#if>
<#if has_multi_query_field>
// 自定义查询规则
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
@ -100,6 +112,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
</#if>
Page<${entityName}> page = new Page<${entityName}>(pageNo, pageSize);
IPage<${entityName}> pageList = ${entityName?uncap_first}Service.page(page, queryWrapper);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 查询后触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterQuery()
</#if>
</#list>
</#if>
return Result.OK(pageList);
}
@ -113,7 +133,23 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 新增前的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeAdd()
</#if>
</#list>
</#if>
${entityName?uncap_first}Service.save(${entityName?uncap_first});
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 新增后的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterAdd()
</#if>
</#list>
</#if>
return Result.OK("添加成功!");
}
@ -127,7 +163,23 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 编辑前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeEdit()
</#if>
</#list>
</#if>
${entityName?uncap_first}Service.updateById(${entityName?uncap_first});
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 编辑后,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterEdit()
</#if>
</#list>
</#if>
return Result.OK("编辑成功!");
}
@ -166,6 +218,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='export' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导出前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeExport()
</#if>
</#list>
</#if>
return super.exportXls(request, ${entityName?uncap_first}, ${entityName}.class, "${tableVo.ftlDescription}");
}
@ -176,6 +236,14 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='import' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导入前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeImport()
</#if>
</#list>
</#if>
return super.importExcel(request, response, ${entityName}.class);
}
/*---------------------------------主表处理-end-------------------------------------*/

View File

@ -47,6 +47,8 @@ public class ${entityName} implements Serializable {
</#if>
<#elseif po.classType=='sel_tree'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
<#elseif po.classType=='link_table'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicCode = "${po.dictField}", dicText = "${po.dictText?split(",")[0]}"'>
</#if>
/**${po.filedComment}*/
<#if po.fieldName == primaryKeyField>

View File

@ -72,6 +72,10 @@ public class ${subTab.entityName} implements Serializable {
<#if po.classType =='sel_depart'>
<#assign list_field_dictCode='dicCode = "${camelToDashed(po.extendParams.store?default(\"id\")?trim)}", dicText = "${camelToDashed(po.extendParams.text?default(\"depart_name\")?trim)}", dictTable = "sys_depart"'>
@Dict(${list_field_dictCode})
</#if>
<#if po.classType =='link_table'>
<#assign list_field_dictCode='dicCode = "${camelToDashed(po.extendParams.store?default(\"id\")?trim)}", dicText = "${camelToDashed(po.extendParams.text?default(\"depart_name\")?trim)}", dictTable = "sys_depart"'>
@Dict(${list_field_dictCode})
</#if>
<#-- 大字段转换 -->
<#include "/common/blob.ftl">

View File

@ -20,6 +20,10 @@
</#if>
</#list>
<#-- 结束循环 -->
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<div class="content">
<!--引用表格-->
<BasicTable @register="registerTable" :rowSelection="rowSelection">
@ -28,6 +32,13 @@
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'button'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -86,6 +97,10 @@
</div>
<!-- 表单区域 -->
<${entityName}Modal @register="registerModal" @success="handleSuccess"></${entityName}Modal>
<#if bpm_flag==true>
<!-- 审批记录 -->
<BpmPictureModal @register="registerBpmModal" />
</#if>
</div>
</template>
@ -96,6 +111,7 @@
import {useModal} from '/@/components/Modal';
import ${entityName}Modal from './components/${entityName}Modal.vue'
import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage';
<#list subTables as sub>
import ${sub.entityName}List from './${sub.entityName}List.vue'
</#list>
@ -116,8 +132,10 @@
</#if>
<#if bpm_flag==true>
import { startProcess } from '/@/api/common/api';
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
</#if>
const queryParam = reactive<any>({});
const { createMessage } = useMessage();
//注册model
const [registerModal, {openModal}] = useModal();
//注册table数据
@ -280,6 +298,15 @@
await startProcess(params);
handleSuccess();
}
/**
* 审批进度
*/
async function handlePreviewPic(record) {
bpmPicModal(true, {
flowCode: 'dev_${tableName}_001',
dataId: record.id,
});
}
</#if>
/**
@ -299,7 +326,22 @@
placement: 'topLeft'
},
auth: '${entityPackage}:${tableName}:delete'
}
},
{
label: '审批进度',
onClick: handlePreviewPic.bind(null, record),
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
if(record.bpmStatus == '1'){
dropDownAction.push({
@ -325,6 +367,16 @@
},
auth: '${entityPackage}:${tableName}:delete'
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
]
</#if>
}
@ -373,6 +425,21 @@
return records;
}
</#if>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='button'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
<#if btn.buttonStyle=='link'>
function handle${btn.buttonCode?cap_first}(record){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
</script>
<style lang="less" scoped>

View File

@ -57,7 +57,7 @@ export const columns: BasicColumn[] = [
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'${switch_extend_arr1}'},{text:'否',value:'${switch_extend_arr2}'}])
},
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict'>
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict' || po.classType=='link_table'>
dataIndex: '${po.fieldName}_dictText'
<#elseif po.classType=='cat_tree'>
dataIndex: '${po.fieldName}',
@ -418,6 +418,14 @@ export const formSchema: FormSchema[] = [
</#if>
pidValue:"${po.dictField}",
},
<#elseif po.classType=='link_table'>
component: 'JLinkTableCard',
componentProps: {
valueField: '${po.dictField}',
textField: '${po.dictText}',
tableName: '${po.dictTable}',
multi: <#if (po.queryMode!"") == "multi">true<#else>false</#if>
},
<#else>
component: 'Input',
</#if>
@ -551,7 +559,7 @@ export const ${sub.entityName?uncap_first}Columns: BasicColumn[] = [
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'${switch_extend_arr1}'},{text:'否',value:'${switch_extend_arr2}'}])
},
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user'>
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='link_table'>
dataIndex: '${po.fieldName}_dictText'
<#elseif po.classType=='cat_tree'>
dataIndex: '${po.fieldName}',
@ -740,6 +748,14 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
</#if>
pidValue:"${po.dictField}",
},
<#elseif po.classType=='link_table'>
component: 'JLinkTableCard',
componentProps: {
valueField: '${po.dictField}',
textField: '${po.dictText}',
tableName: '${po.dictTable}',
multi: <#if (po.queryMode!"") == "multi">true<#else>false</#if>
},
<#else>
component: 'Input',
</#if>

View File

@ -1,7 +1,20 @@
<#include "/common/utils.ftl">
<template>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
<BasicForm @register="registerForm" name="${entityName}Form" />
<#if buttonList?? && buttonList?size gt 0>
<template #insertFooter>
<#list buttonList as btn>
<#if btn.buttonStyle=='form'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</template>
</#if>
</BasicModal>
</template>
@ -11,6 +24,8 @@
import {BasicForm, useForm} from '/@/components/Form/index';
import {formSchema} from '../${entityName}.data';
import {saveOrUpdate} from '../${entityName}.api';
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
// Emits声明
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
@ -65,6 +80,15 @@
setModalProps({confirmLoading: false});
}
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='form'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
</script>
<style lang="less" scoped>

View File

@ -24,6 +24,10 @@
<#assign need_range_number = false>
<#assign is_range = false>
<#assign is_like = false>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -109,6 +113,13 @@
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'button'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -168,6 +179,10 @@
</div>
<!-- 表单区域 -->
<${entityName}Modal ref="registerModal" @success="handleSuccess" />
<#if bpm_flag==true>
<!-- 审批记录 -->
<BpmPictureModal @register="registerBpmModal" />
</#if>
</div>
</template>
@ -175,10 +190,12 @@
import { ref, reactive, computed, unref, provide } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'
import {useModal} from '/@/components/Modal';
import ${entityName}Modal from './components/${entityName}Modal.vue'
import { columns, superQuerySchema } from './${entityName}.data';
import { list, deleteOne, batchDelete, getImportUrl,getExportUrl } from './${entityName}.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import { useMessage } from '/@/hooks/web/useMessage';
<#include "/common/form/native/vue3NativeImport.ftl">
<#if need_pca>
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
@ -190,6 +207,8 @@
</#if>
<#if bpm_flag==true>
import { startProcess } from '/@/api/common/api';
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
</#if>
<#list subTables as sub>
import ${sub.entityName}List from './${sub.entityName}List.vue'
@ -207,6 +226,7 @@
const checkedKeys = ref<Array<string | number>>([]);
const registerModal = ref();
const userStore = useUserStore();
const { createMessage } = useMessage();
//注册table数据
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
@ -348,7 +368,22 @@
placement: 'topLeft'
},
auth: '${entityPackage}:${tableName}:delete'
}
},
{
label: '审批进度',
onClick: handlePreviewPic.bind(null, record),
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
},
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
if(record.bpmStatus == '1' || !record.bpmStatus){
dropDownAction.push({
@ -375,7 +410,17 @@
placement: 'topLeft'
},
auth: '${entityPackage}:${tableName}:delete'
},
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
</#if>
}
@ -394,8 +439,30 @@
await startProcess(params);
handleSuccess();
}
/**
* 审批进度
*/
async function handlePreviewPic(record) {
bpmPicModal(true, {
flowCode: 'dev_${tableName}_001',
dataId: record.id,
});
}
</#if>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='button'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
<#if btn.buttonStyle=='link'>
function handle${btn.buttonCode?cap_first}(record){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
<#if need_category>
/**
* form点击事件

View File

@ -1,14 +1,31 @@
<template>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<${entityName}Form ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></${entityName}Form>
</j-modal>
<template #footer>
<#if buttonList?? && buttonList?size gt 0>
<#list buttonList as btn>
<#if btn.buttonStyle=='form'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="ant-design:${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-button @click="handleCancel">取消</a-button>
<a-button :class="{ 'jee-hidden': disableSubmit }" type="primary" @click="handleOk">确认</a-button>
</template>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import ${entityName}Form from './${entityName}Form.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
const title = ref<string>('');
const width = ref<number>(800);
const visible = ref<boolean>(false);
@ -61,6 +78,16 @@
visible.value = false;
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='form'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
defineExpose({
add,
edit,

View File

@ -54,6 +54,10 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
<#assign has_multi_query_field=true>
</#if>
</#list>
<#assign enhanceJavaList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.enhanceJavaList??>
<#assign enhanceJavaList = tableVo.extendParams.enhanceJavaList?filter(enhance -> enhance??)>
</#if>
/**
* @Description: ${tableVo.ftlDescription}
* @Author: jeecg-boot
@ -88,6 +92,14 @@ public class ${entityName}Controller {
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 查询前触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeQuery()
</#if>
</#list>
</#if>
<#if has_multi_query_field>
// 自定义查询规则
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
@ -103,6 +115,14 @@ public class ${entityName}Controller {
</#if>
Page<${entityName}> page = new Page<${entityName}>(pageNo, pageSize);
IPage<${entityName}> pageList = ${entityName?uncap_first}Service.page(page, queryWrapper);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 查询后触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterQuery()
</#if>
</#list>
</#if>
return Result.OK(pageList);
}
@ -117,9 +137,25 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 新增前的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeAdd()
</#if>
</#list>
</#if>
${entityName} ${entityName?uncap_first} = new ${entityName}();
BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first});
${entityName?uncap_first}Service.saveMain(${entityName?uncap_first}, <#list subTables as sub>${entityName?uncap_first}Page.get${sub.entityName}List()<#if sub_has_next>,</#if></#list>);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 新增后的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterAdd()
</#if>
</#list>
</#if>
return Result.OK("添加成功!");
}
@ -134,6 +170,14 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 编辑前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeEdit()
</#if>
</#list>
</#if>
${entityName} ${entityName?uncap_first} = new ${entityName}();
BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first});
${entityName} ${entityName?uncap_first}Entity = ${entityName?uncap_first}Service.getById(${entityName?uncap_first}.getId());
@ -141,6 +185,14 @@ public class ${entityName}Controller {
return Result.error("未找到对应数据");
}
${entityName?uncap_first}Service.updateMain(${entityName?uncap_first}, <#list subTables as sub>${entityName?uncap_first}Page.get${sub.entityName}List()<#if sub_has_next>,</#if></#list>);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 编辑后,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterEdit()
</#if>
</#list>
</#if>
return Result.OK("编辑成功!");
}
@ -221,6 +273,14 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='export' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导出前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeExport()
</#if>
</#list>
</#if>
// Step.1 组装查询条件查询数据
QueryWrapper<${entityName}> queryWrapper = QueryGenerator.initQueryWrapper(${entityName?uncap_first}, request.getParameterMap());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@ -265,6 +325,14 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='import' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导入前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeImport()
</#if>
</#list>
</#if>
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {

View File

@ -47,6 +47,8 @@ public class ${entityName} implements Serializable {
</#if>
<#elseif po.classType=='sel_tree'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
<#elseif po.classType=='link_table'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicCode = "${po.dictField}", dicText = "${po.dictText?split(",")[0]}"'>
</#if>
/**${po.filedComment}*/
<#if po.fieldName == primaryKeyField>

View File

@ -49,6 +49,8 @@ public class ${subTab.entityName} implements Serializable {
<#elseif po.classType=='sel_tree'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
</#if>
<#elseif po.classType=='link_table'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicCode = "${po.dictField}", dicText = "${po.dictText?split(",")[0]}"'>
</#if>
/**${po.filedComment}*/
<#if po.fieldName == primaryKeyField>

View File

@ -7,7 +7,10 @@
<#assign list_need_pca=false>
<#assign bpm_flag=false>
<#assign list_has_popup_dict=false>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<#-- 开始循环 -->
<#list columns as po>
<#if po.fieldDbName=='bpm_status'>
@ -42,6 +45,13 @@
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'button'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -89,6 +99,10 @@
</BasicTable>
<!-- 表单区域 -->
<${entityName}Modal @register="registerModal" @success="handleSuccess"></${entityName}Modal>
<#if bpm_flag==true>
<!-- 审批记录 -->
<BpmPictureModal @register="registerBpmModal" />
</#if>
</div>
</template>
@ -97,6 +111,7 @@
import {BasicTable, useTable, TableAction} from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'
import {useModal} from '/@/components/Modal';
import { useMessage } from '/@/hooks/web/useMessage';
import ${entityName}Modal from './components/${entityName}Modal.vue'
<#list subTables as sub>
import ${sub.entityName}SubTable from './subTables/${sub.entityName}SubTable.vue'
@ -114,6 +129,8 @@
</#if>
<#if bpm_flag==true>
import { startProcess } from '/@/api/common/api';
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
</#if>
<#if list_has_popup_dict>
import {getPopDictByCode} from "@/utils/dict";
@ -125,6 +142,7 @@
const expandedRowKeys = ref<any[]>([]);
//注册model
const [registerModal, {openModal}] = useModal();
const { createMessage } = useMessage();
const userStore = useUserStore();
//注册table数据
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
@ -287,6 +305,15 @@
await startProcess(params);
handleSuccess();
}
/**
* 审批进度
*/
async function handlePreviewPic(record) {
bpmPicModal(true, {
flowCode: 'dev_${tableName}_001',
dataId: record.id,
});
}
</#if>
/**
@ -306,7 +333,22 @@
placement: 'topLeft'
},
auth: '${entityPackage}:${tableName}:delete'
}
},
{
label: '审批进度',
onClick: handlePreviewPic.bind(null, record),
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
if(record.bpmStatus == '1' || !record.bpmStatus){
dropDownAction.push({
@ -333,6 +375,16 @@
},
auth: '${entityPackage}:${tableName}:delete'
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
]
</#if>
}
@ -381,6 +433,21 @@
return records;
}
</#if>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='button'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
<#if btn.buttonStyle=='link'>
function handle${btn.buttonCode?cap_first}(record){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
</script>
<style lang="less" scoped>

View File

@ -58,7 +58,7 @@ export const columns: BasicColumn[] = [
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'${switch_extend_arr1}'},{text:'否',value:'${switch_extend_arr2}'}])
},
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict'>
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict' || po.classType=='link_table'>
dataIndex: '${po.fieldName}_dictText'
<#elseif po.classType=='cat_tree'>
dataIndex: '${po.fieldName}',
@ -419,6 +419,14 @@ export const formSchema: FormSchema[] = [
</#if>
pidValue:"${po.dictField}",
},
<#elseif po.classType=='link_table'>
component: 'JLinkTableCard',
componentProps: {
valueField: '${po.dictField}',
textField: '${po.dictText}',
tableName: '${po.dictTable}',
multi: <#if (po.queryMode!"") == "multi">true<#else>false</#if>
},
<#else>
component: 'Input',
</#if>
@ -543,7 +551,7 @@ export const ${sub.entityName?uncap_first}Columns: BasicColumn[] = [
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'${switch_extend_arr1}'},{text:'否',value:'${switch_extend_arr2}'}])
},
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict'>
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict' || po.classType=='link_table'>
dataIndex: '${po.fieldName}_dictText'
<#elseif po.classType=='cat_tree'>
dataIndex: '${po.fieldName}',
@ -732,6 +740,14 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
</#if>
pidValue:"${po.dictField}",
},
<#elseif po.classType=='link_table'>
component: 'JLinkTableCard',
componentProps: {
valueField: '${po.dictField}',
textField: '${po.dictText}',
tableName: '${po.dictTable}',
multi: <#if (po.queryMode!"") == "multi">true<#else>false</#if>
},
<#else>
component: 'Input',
</#if>

View File

@ -1,5 +1,9 @@
<#include "/common/utils.ftl">
<template>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
<BasicForm @register="registerForm" ref="formRef" name="${entityName}Form" />
<!-- 子表单区域 -->
@ -30,6 +34,16 @@
</#if>
</#list>
</a-tabs>
<#if buttonList?? && buttonList?size gt 0>
<template #insertFooter>
<#list buttonList as btn>
<#if btn.buttonStyle=='form'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</template>
</#if>
</BasicModal>
</template>
@ -47,6 +61,8 @@
import {formSchema<#list subTables as sub><#if sub.foreignRelationType =='0'>,${sub.entityName?uncap_first}JVxeColumns</#if></#list>} from '../${entityName}.data';
import {saveOrUpdate<#list subTables as sub>,query${sub.entityName}</#list>} from '../${entityName}.api';
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
// Emits声明
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
@ -186,6 +202,15 @@
setModalProps({confirmLoading: false});
}
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='form'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
</script>
<style lang="less" scoped>

View File

@ -63,6 +63,10 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
<#assign has_multi_query_field=true>
</#if>
</#list>
<#assign enhanceJavaList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.enhanceJavaList??>
<#assign enhanceJavaList = tableVo.extendParams.enhanceJavaList?filter(enhance -> enhance??)>
</#if>
/**
* @Description: ${tableVo.ftlDescription}
* @Author: jeecg-boot
@ -97,6 +101,14 @@ public class ${entityName}Controller {
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 查询前触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeQuery()
</#if>
</#list>
</#if>
<#if has_multi_query_field>
// 自定义查询规则
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
@ -112,6 +124,14 @@ public class ${entityName}Controller {
</#if>
Page<${entityName}> page = new Page<${entityName}>(pageNo, pageSize);
IPage<${entityName}> pageList = ${entityName?uncap_first}Service.page(page, queryWrapper);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 查询后触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterQuery()
</#if>
</#list>
</#if>
return Result.OK(pageList);
}
@ -126,12 +146,28 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 新增前的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeAdd()
</#if>
</#list>
</#if>
${entityName} ${entityName?uncap_first} = new ${entityName}();
BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first});
<#if bpm_flag>
${entityName?uncap_first}.setBpmStatus("1");
</#if>
${entityName?uncap_first}Service.saveMain(${entityName?uncap_first}, <#list subTables as sub>${entityName?uncap_first}Page.get${sub.entityName}List()<#if sub_has_next>,</#if></#list>);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 新增后的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterAdd()
</#if>
</#list>
</#if>
return Result.OK("添加成功!");
}
@ -146,6 +182,14 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 编辑前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeEdit()
</#if>
</#list>
</#if>
${entityName} ${entityName?uncap_first} = new ${entityName}();
BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first});
${entityName} ${entityName?uncap_first}Entity = ${entityName?uncap_first}Service.getById(${entityName?uncap_first}.getId());
@ -153,6 +197,14 @@ public class ${entityName}Controller {
return Result.error("未找到对应数据");
}
${entityName?uncap_first}Service.updateMain(${entityName?uncap_first}, <#list subTables as sub>${entityName?uncap_first}Page.get${sub.entityName}List()<#if sub_has_next>,</#if></#list>);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 编辑后,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterEdit()
</#if>
</#list>
</#if>
return Result.OK("编辑成功!");
}
@ -229,6 +281,15 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='export' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导出前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeExport()
</#if>
</#list>
</#if>
// Step.1 组装查询条件查询数据
QueryWrapper<${entityName}> queryWrapper = QueryGenerator.initQueryWrapper(${entityName?uncap_first}, request.getParameterMap());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@ -273,6 +334,14 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='import' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导入前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeImport()
</#if>
</#list>
</#if>
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {

View File

@ -47,6 +47,8 @@ public class ${entityName} implements Serializable {
</#if>
<#elseif po.classType=='sel_tree'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
<#elseif po.classType=='link_table'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicCode = "${po.dictField}", dicText = "${po.dictText?split(",")[0]}"'>
</#if>
/**${po.filedComment}*/
<#if po.fieldName == primaryKeyField>

View File

@ -47,6 +47,8 @@ public class ${subTab.entityName} implements Serializable {
<#elseif po.classType=='sel_tree'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
</#if>
<#elseif po.classType=='link_table'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicCode = "${po.dictField}", dicText = "${po.dictText?split(",")[0]}"'>
</#if>
/**${po.filedComment}*/
<#if po.fieldName == primaryKeyField>

View File

@ -4,6 +4,10 @@
<#assign list_need_pca=false>
<#assign bpm_flag=false>
<#assign list_has_popup_dict=false>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<#-- 开始循环 -->
<#list columns as po>
<#if po.fieldDbName=='bpm_status'>
@ -27,6 +31,13 @@
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'button'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -74,6 +85,10 @@
</BasicTable>
<!-- 表单区域 -->
<${entityName}Modal @register="registerModal" @success="handleSuccess"></${entityName}Modal>
<#if bpm_flag==true>
<!-- 审批记录 -->
<BpmPictureModal @register="registerBpmModal" />
</#if>
</div>
</template>
@ -87,6 +102,7 @@
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName}.api';
import {downloadFile} from '/@/utils/common/renderUtils';
import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage';
<#if list_need_pca>
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
</#if>
@ -101,10 +117,13 @@
</#if>
<#if bpm_flag==true>
import { startProcess } from '/@/api/common/api';
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
</#if>
const queryParam = reactive<any>({});
const checkedKeys = ref<Array<string | number>>([]);
const userStore = useUserStore();
const { createMessage } = useMessage();
//注册model
const [registerModal, {openModal}] = useModal();
//注册table数据
@ -259,6 +278,16 @@
await startProcess(params);
handleSuccess();
}
/**
* 审批进度
*/
async function handlePreviewPic(record) {
bpmPicModal(true, {
flowCode: 'dev_${tableName}_001',
dataId: record.id,
});
}
</#if>
/**
@ -278,7 +307,22 @@
placement: 'topLeft'
},
auth: '${entityPackage}:${tableName}:delete'
}
},
{
label: '审批进度',
onClick: handlePreviewPic.bind(null, record),
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
if(record.bpmStatus == '1' || !record.bpmStatus){
dropDownAction.push({
@ -305,6 +349,16 @@
},
auth: '${entityPackage}:${tableName}:delete'
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
]
</#if>
}
@ -353,6 +407,21 @@
return records;
}
</#if>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='button'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
<#if btn.buttonStyle=='link'>
function handle${btn.buttonCode?cap_first}(record){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
</script>
<style lang="less" scoped>

View File

@ -419,6 +419,14 @@ export const formSchema: FormSchema[] = [
</#if>
pidValue:"${po.dictField}",
},
<#elseif po.classType=='link_table'>
component: 'JLinkTableCard',
componentProps: {
valueField: '${po.dictField}',
textField: '${po.dictText}',
tableName: '${po.dictTable}',
multi: <#if (po.queryMode!"") == "multi">true<#else>false</#if>
},
<#else>
component: 'Input',
</#if>
@ -659,6 +667,14 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
</#if>
pidValue:"${po.dictField}",
},
<#elseif po.classType=='link_table'>
component: 'JLinkTableCard',
componentProps: {
valueField: '${po.dictField}',
textField: '${po.dictText}',
tableName: '${po.dictTable}',
multi: <#if (po.queryMode!"") == "multi">true<#else>false</#if>
},
<#else>
component: 'Input',
</#if>

View File

@ -1,5 +1,9 @@
<#include "/common/utils.ftl">
<template>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
<BasicForm @register="registerForm" ref="formRef" name="${entityName}Form"/>
<!-- 子表单区域 -->
@ -30,6 +34,15 @@
</#if>
</#list>
</a-tabs>
<#if buttonList?? && buttonList?size gt 0>
<template #insertFooter>
<#list buttonList as btn>
<#if btn.buttonStyle=='form'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</template>
</#if>
</BasicModal>
</template>
@ -47,6 +60,8 @@
import {formSchema<#list subTables as sub><#if sub.foreignRelationType =='0'>,${sub.entityName?uncap_first}Columns</#if></#list>} from '../${entityName}.data';
import {saveOrUpdate<#list subTables as sub>,${sub.entityName?uncap_first}List</#list>} from '../${entityName}.api';
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
// Emits声明
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
@ -186,6 +201,15 @@
setModalProps({confirmLoading: false});
}
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='form'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
</script>
<style lang="less" scoped>

View File

@ -24,6 +24,10 @@
<#assign need_range_number = false>
<#assign is_range = false>
<#assign is_like = false>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<!--查询区域-->
<div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
@ -108,6 +112,13 @@
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'button'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -155,6 +166,10 @@
</BasicTable>
<!-- 表单区域 -->
<${entityName}Modal @register="registerModal" @success="handleSuccess"></${entityName}Modal>
<#if bpm_flag==true>
<!-- 审批记录 -->
<BpmPictureModal @register="registerBpmModal" />
</#if>
</div>
</template>
@ -167,6 +182,7 @@
import {columns, superQuerySchema} from './${entityName}.data';
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName}.api';
import {downloadFile} from '/@/utils/common/renderUtils';
import { useMessage } from '/@/hooks/web/useMessage';
<#include "/common/form/native/vue3NativeImport.ftl">
<#if need_pca>
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
@ -178,6 +194,8 @@
</#if>
<#if bpm_flag==true>
import { startProcess } from '/@/api/common/api';
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
</#if>
<#if is_range>
import { cloneDeep } from "lodash-es";
@ -193,6 +211,7 @@
//注册model
const [registerModal, {openModal}] = useModal();
const userStore = useUserStore();
const { createMessage } = useMessage();
//注册table数据
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
tableProps:{
@ -324,7 +343,22 @@
confirm: handleDelete.bind(null, record)
},
auth: '${entityPackage}:${tableName}:delete'
}
},
{
label: '审批进度',
onClick: handlePreviewPic.bind(null, record),
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
if(record.bpmStatus == '1' || !record.bpmStatus){
dropDownAction.push({
@ -351,6 +385,17 @@
},
auth: '${entityPackage}:${tableName}:delete'
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
]
</#if>
}
@ -369,8 +414,33 @@
await startProcess(params);
handleSuccess();
}
/**
* 审批进度
*/
async function handlePreviewPic(record) {
bpmPicModal(true, {
flowCode: 'dev_${tableName}_001',
dataId: record.id,
});
}
</#if>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='button'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
<#if btn.buttonStyle=='link'>
function handle${btn.buttonCode?cap_first}(record){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
<#if need_category>
/**
* form点击事件

View File

@ -1,7 +1,20 @@
<#include "/common/utils.ftl">
<template>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
<${Format.humpToShortbar(entityName)}-form ref="formComponent" :formDisabled="formDisabled" :formBpm="false" @success="submitSuccess"></${Format.humpToShortbar(entityName)}-form>
<#if buttonList?? && buttonList?size gt 0>
<template #insertFooter>
<#list buttonList as btn>
<#if btn.buttonStyle=='form'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</template>
</#if>
</BasicModal>
</template>
@ -9,7 +22,8 @@
import { ref, unref } from 'vue';
import { BasicModal, useModalInner } from '/@/components/Modal';
import ${entityName}Form from './${entityName}Form.vue';
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
export default {
name: "TestCgMainVxeModal",
components:{
@ -44,14 +58,29 @@
emit('success');
closeModal();
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='form'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
return {
registerModal,
title,
formComponent,
formDisabled,
handleSubmit,
submitSuccess
submitSuccess,
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='form'>
handle${btn.buttonCode?cap_first},
</#if>
</#list>
</#if>
}
}
}

View File

@ -54,6 +54,10 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
<#assign has_multi_query_field=true>
</#if>
</#list>
<#assign enhanceJavaList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.enhanceJavaList??>
<#assign enhanceJavaList = tableVo.extendParams.enhanceJavaList?filter(enhance -> enhance??)>
</#if>
/**
* @Description: ${tableVo.ftlDescription}
* @Author: jeecg-boot
@ -88,6 +92,14 @@ public class ${entityName}Controller {
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 查询前触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeQuery()
</#if>
</#list>
</#if>
<#if has_multi_query_field>
// 自定义查询规则
Map<String, QueryRuleEnum> customeRuleMap = new HashMap<>();
@ -103,6 +115,14 @@ public class ${entityName}Controller {
</#if>
Page<${entityName}> page = new Page<${entityName}>(pageNo, pageSize);
IPage<${entityName}> pageList = ${entityName?uncap_first}Service.page(page, queryWrapper);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='query' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 查询后触发的方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterQuery()
</#if>
</#list>
</#if>
return Result.OK(pageList);
}
@ -117,9 +137,25 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 新增前的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeAdd()
</#if>
</#list>
</#if>
${entityName} ${entityName?uncap_first} = new ${entityName}();
BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first});
${entityName?uncap_first}Service.saveMain(${entityName?uncap_first}, <#list subTables as sub>${entityName?uncap_first}Page.get${sub.entityName}List()<#if sub_has_next>,</#if></#list>);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='add' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 新增后的处理方法,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterAdd()
</#if>
</#list>
</#if>
return Result.OK("添加成功!");
}
@ -134,6 +170,14 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 编辑前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeEdit()
</#if>
</#list>
</#if>
${entityName} ${entityName?uncap_first} = new ${entityName}();
BeanUtils.copyProperties(${entityName?uncap_first}Page, ${entityName?uncap_first});
${entityName} ${entityName?uncap_first}Entity = ${entityName?uncap_first}Service.getById(${entityName?uncap_first}.getId());
@ -141,6 +185,14 @@ public class ${entityName}Controller {
return Result.error("未找到对应数据");
}
${entityName?uncap_first}Service.updateMain(${entityName?uncap_first}, <#list subTables as sub>${entityName?uncap_first}Page.get${sub.entityName}List()<#if sub_has_next>,</#if></#list>);
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='edit' && enhanceJava.event=='end' && enhanceJava.activeStatus=='1'>
//TODO 编辑后,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.afterEdit()
</#if>
</#list>
</#if>
return Result.OK("编辑成功!");
}
@ -217,6 +269,15 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, ${entityName} ${entityName?uncap_first}) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='export' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导出前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeExport()
</#if>
</#list>
</#if>
// Step.1 组装查询条件查询数据
QueryWrapper<${entityName}> queryWrapper = QueryGenerator.initQueryWrapper(${entityName?uncap_first}, request.getParameterMap());
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
@ -261,6 +322,14 @@ public class ${entityName}Controller {
@RequiresPermissions("${entityPackage}:${tableName}:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
<#if enhanceJavaList?size gt 0>
<#list enhanceJavaList as enhanceJava>
<#if enhanceJava.buttonCode=='import' && enhanceJava.event=='start' && enhanceJava.activeStatus=='1'>
//TODO 导入前,代码生成后,请手工实现增强类逻辑;
//${entityName?uncap_first}Service.beforeImport()
</#if>
</#list>
</#if>
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {

View File

@ -46,7 +46,9 @@ public class ${entityName} implements Serializable {
<#assign list_field_dictCode=', dicCode = "${po.dictField}"'>
</#if>
<#elseif po.classType=='sel_tree'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
<#elseif po.classType=='link_table'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicCode = "${po.dictField}", dicText = "${po.dictText?split(",")[0]}"'>
</#if>
/**${po.filedComment}*/
<#if po.fieldName == primaryKeyField>

View File

@ -48,6 +48,8 @@ public class ${subTab.entityName} implements Serializable {
<#elseif po.classType=='sel_tree'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicText = "${po.dictText?split(",")[2]}", dicCode = "${po.dictText?split(",")[0]}"'>
</#if>
<#elseif po.classType=='link_table'>
<#assign list_field_dictCode=', dictTable = "${po.dictTable}", dicCode = "${po.dictField}", dicText = "${po.dictText?split(",")[0]}"'>
</#if>
/**${po.filedComment}*/
<#if po.fieldName == primaryKeyField>

View File

@ -4,6 +4,10 @@
<#assign list_need_pca=false>
<#assign bpm_flag=false>
<#assign list_has_popup_dict=false>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<#-- 开始循环 -->
<#list columns as po>
<#if po.fieldDbName=='bpm_status'>
@ -27,6 +31,13 @@
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
<a-button type="primary" v-auth="'${entityPackage}:${tableName}:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
<j-upload-button type="primary" v-auth="'${entityPackage}:${tableName}:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'button'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</#if>
<a-dropdown v-if="selectedRowKeys.length > 0">
<template #overlay>
<a-menu>
@ -74,6 +85,10 @@
</BasicTable>
<!-- 表单区域 -->
<${entityName}Modal @register="registerModal" @success="handleSuccess"></${entityName}Modal>
<#if bpm_flag==true>
<!-- 审批记录 -->
<BpmPictureModal @register="registerBpmModal" />
</#if>
</div>
</template>
@ -87,6 +102,7 @@
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './${entityName}.api';
import {downloadFile} from '/@/utils/common/renderUtils';
import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage';
<#if list_need_pca>
import { getAreaTextByCode } from '/@/components/Form/src/utils/Area';
</#if>
@ -101,9 +117,12 @@
</#if>
<#if bpm_flag==true>
import { startProcess } from '/@/api/common/api';
const [registerBpmModal, { openModal: bpmPicModal }] = useModal();
</#if>
const queryParam = reactive<any>({});
const userStore = useUserStore();
const { createMessage } = useMessage();
const checkedKeys = ref<Array<string | number>>([]);
//注册model
const [registerModal, {openModal}] = useModal();
@ -258,6 +277,16 @@
await startProcess(params);
handleSuccess();
}
/**
* 审批进度
*/
async function handlePreviewPic(record) {
bpmPicModal(true, {
flowCode: 'dev_${tableName}_001',
dataId: record.id,
});
}
</#if>
/**
@ -277,7 +306,22 @@
placement: 'topLeft'
},
auth: '${entityPackage}:${tableName}:delete'
}
},
{
label: '审批进度',
onClick: handlePreviewPic.bind(null, record),
ifShow: !!record.bpmStatus && record.bpmStatus !== '1',
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
];
if(record.bpmStatus == '1' || !record.bpmStatus){
dropDownAction.push({
@ -304,6 +348,16 @@
},
auth: '${entityPackage}:${tableName}:delete'
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle == 'link'>
,{
label: '${btn.buttonName}',
onClick: handle${btn.buttonCode?cap_first}.bind(null, record),
}
</#if>
</#list>
</#if>
]
</#if>
}
@ -352,6 +406,21 @@
return records;
}
</#if>
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='button'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
<#if btn.buttonStyle=='link'>
function handle${btn.buttonCode?cap_first}(record){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
</script>
<style lang="less" scoped>

View File

@ -58,7 +58,7 @@ export const columns: BasicColumn[] = [
customRender:({text}) => {
return render.renderSwitch(text, [{text:'是',value:'${switch_extend_arr1}'},{text:'否',value:'${switch_extend_arr2}'}])
},
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict'>
<#elseif po.classType == 'sel_tree' || po.classType=='list' || po.classType=='list_multi' || po.classType=='sel_search' || po.classType=='radio' || po.classType=='checkbox' || po.classType=='sel_depart' || po.classType=='sel_user' || po.classType=='popup_dict' || po.classType=='link_table'>
dataIndex: '${po.fieldName}_dictText'
<#elseif po.classType=='cat_tree'>
dataIndex: '${po.fieldName}',
@ -419,6 +419,14 @@ export const formSchema: FormSchema[] = [
</#if>
pidValue:"${po.dictField}",
},
<#elseif po.classType=='link_table'>
component: 'JLinkTableCard',
componentProps: {
valueField: '${po.dictField}',
textField: '${po.dictText}',
tableName: '${po.dictTable}',
multi: <#if (po.queryMode!"") == "multi">true<#else>false</#if>
},
<#else>
component: 'Input',
</#if>
@ -672,6 +680,14 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [
</#if>
pidValue:"${po.dictField}",
},
<#elseif po.classType=='link_table'>
component: 'JLinkTableCard',
componentProps: {
valueField: '${po.dictField}',
textField: '${po.dictText}',
tableName: '${po.dictTable}',
multi: <#if (po.queryMode!"") == "multi">true<#else>false</#if>
},
<#else>
component: 'Input',
</#if>

View File

@ -1,5 +1,9 @@
<#include "/common/utils.ftl">
<template>
<#assign buttonList=[]>
<#if tableVo.extendParams?? && tableVo.extendParams.cgButtonList??>
<#assign buttonList = tableVo.extendParams.cgButtonList?filter(btn -> btn??)>
</#if>
<BasicModal ref="modalRef" destroyOnClose wrapClassName="j-cgform-tab-modal" v-bind="$attrs" @register="registerModal" :width="${getModalWidth(tableVo.fieldRowNum?default(1))}" @ok="handleSubmit">
<!-- 标题区域 -->
<template #title>
@ -41,6 +45,15 @@
</#if>
</#list>
</div>
<#if buttonList?? && buttonList?size gt 0>
<template #insertFooter>
<#list buttonList as btn>
<#if btn.buttonStyle=='form'>
<a-button type="primary" @click="handle${btn.buttonCode?cap_first}" <#if btn.buttonIcon??> preIcon="${btn.buttonIcon}" </#if>>${btn.buttonName}</a-button>
</#if>
</#list>
</template>
</#if>
</BasicModal>
</template>
@ -58,6 +71,8 @@
import {formSchema<#list subTables as sub><#if sub.foreignRelationType =='0'>,${sub.entityName?uncap_first}Columns</#if></#list>} from '../${entityName}.data';
import {saveOrUpdate<#list subTables as sub>,${sub.entityName?uncap_first}List</#list>} from '../${entityName}.api';
import { VALIDATE_FAILED } from '/@/utils/common/vxeUtils'
import { useMessage } from '/@/hooks/web/useMessage';
const { createMessage } = useMessage();
// Emits声明
const emit = defineEmits(['register','success']);
const isUpdate = ref(true);
@ -221,6 +236,15 @@
setModalProps({confirmLoading: false});
}
}
<#if buttonList?size gt 0>
<#list buttonList?sort_by('orderNum') as btn>
<#if btn.buttonStyle=='form'>
function handle${btn.buttonCode?cap_first}(){
createMessage.info('点击了${btn.buttonName}按钮,对应的业务逻辑需自行实现!');
}
</#if>
</#list>
</#if>
</script>
<style lang="less" scoped>

View File

@ -32,8 +32,8 @@ import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
/**
* @Description: ${tableVo.ftlDescription}
@ -59,7 +59,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询")
@Operation(summary = "${tableVo.ftlDescription}-分页列表查询")
@Operation(summary="${tableVo.ftlDescription}-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(${entityName} ${entityName?uncap_first},
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@ -78,7 +78,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-添加")
@Operation(summary = "${tableVo.ftlDescription}-添加")
@Operation(summary="${tableVo.ftlDescription}-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ${entityName} ${entityName?uncap_first}) {
${entityName?uncap_first}Service.save(${entityName?uncap_first});
@ -92,7 +92,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
@Operation(summary = "${tableVo.ftlDescription}-编辑")
@Operation(summary="${tableVo.ftlDescription}-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<?> edit(@RequestBody ${entityName} ${entityName?uncap_first}) {
${entityName?uncap_first}Service.updateById(${entityName?uncap_first});
@ -106,7 +106,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
@Operation(summary = "${tableVo.ftlDescription}-通过id删除")
@Operation(summary="${tableVo.ftlDescription}-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
${entityName?uncap_first}Service.removeById(id);
@ -120,7 +120,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
@Operation(summary = "${tableVo.ftlDescription}-批量删除")
@Operation(summary="${tableVo.ftlDescription}-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.${entityName?uncap_first}Service.removeByIds(Arrays.asList(ids.split(",")));
@ -134,7 +134,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-通过id查询")
@Operation(summary = "${tableVo.ftlDescription}-通过id查询")
@Operation(summary="${tableVo.ftlDescription}-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id);

View File

@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

View File

@ -35,8 +35,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSON;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
@ -63,7 +63,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询")
@Operation(summary = "${tableVo.ftlDescription}-分页列表查询")
@Operation(summary="${tableVo.ftlDescription}-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(${entityName} ${entityName?uncap_first},
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@ -82,7 +82,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-添加")
@Operation(summary = "${tableVo.ftlDescription}-添加")
@Operation(summary="${tableVo.ftlDescription}-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ${entityName} ${entityName?uncap_first}) {
${entityName?uncap_first}Service.save(${entityName?uncap_first});
@ -96,7 +96,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
@Operation(summary = "${tableVo.ftlDescription}-编辑")
@Operation(summary="${tableVo.ftlDescription}-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<?> edit(@RequestBody ${entityName} ${entityName?uncap_first}) {
${entityName?uncap_first}Service.updateById(${entityName?uncap_first});
@ -109,7 +109,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
@Operation(summary = "${tableVo.ftlDescription}-通过id删除")
@Operation(summary="${tableVo.ftlDescription}-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
${entityName?uncap_first}Service.removeById(id);
@ -123,7 +123,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
@Operation(summary = "${tableVo.ftlDescription}-批量删除")
@Operation(summary="${tableVo.ftlDescription}-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.${entityName?uncap_first}Service.removeByIds(Arrays.asList(ids.split(",")));
@ -137,7 +137,7 @@ public class ${entityName}Controller extends JeecgController<${entityName}, I${e
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-通过id查询")
@Operation(summary = "${tableVo.ftlDescription}-通过id查询")
@Operation(summary="${tableVo.ftlDescription}-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id);

View File

@ -41,8 +41,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSON;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
@ -73,7 +73,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询")
@Operation(summary = "${tableVo.ftlDescription}-分页列表查询")
@Operation(summary="${tableVo.ftlDescription}-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(${entityName} ${entityName?uncap_first},
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@ -92,7 +92,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-添加")
@Operation(summary = "${tableVo.ftlDescription}-添加")
@Operation(summary="${tableVo.ftlDescription}-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
${entityName} ${entityName?uncap_first} = new ${entityName}();
@ -108,7 +108,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
@Operation(summary = "${tableVo.ftlDescription}-编辑")
@Operation(summary="${tableVo.ftlDescription}-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<?> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
${entityName} ${entityName?uncap_first} = new ${entityName}();
@ -124,7 +124,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
@Operation(summary = "${tableVo.ftlDescription}-通过id删除")
@Operation(summary="${tableVo.ftlDescription}-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
${entityName?uncap_first}Service.delMain(id);
@ -138,7 +138,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
@Operation(summary = "${tableVo.ftlDescription}-批量删除")
@Operation(summary="${tableVo.ftlDescription}-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.${entityName?uncap_first}Service.delBatchMain(Arrays.asList(ids.split(",")));
@ -152,7 +152,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-通过id查询")
@Operation(summary = "${tableVo.ftlDescription}-通过id查询")
@Operation(summary="${tableVo.ftlDescription}-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id);
@ -167,7 +167,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${sub.ftlDescription}-通过主表ID查询")
@Operation(summary = "${tableVo.ftlDescription}-通过主表ID查询")
@Operation(summary="${sub.ftlDescription}-通过主表ID查询")
@GetMapping(value = "/query${sub.entityName}ByMainId")
public Result<?> query${sub.entityName}ListByMainId(@RequestParam(name="id",required=true) String id) {
List<${sub.entityName}> ${sub.entityName?uncap_first}List = ${sub.entityName?uncap_first}Service.selectByMainId(id);

View File

@ -10,7 +10,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @Description: ${tableVo.ftlDescription}
* @Author: jeecg-boot

View File

@ -13,7 +13,6 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @Description: ${tableVo.ftlDescription}
* @Author: jeecg-boot

View File

@ -40,8 +40,8 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSON;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import io.swagger.v3.oas.annotations.Operation;
import org.jeecg.common.aspect.annotation.AutoLog;
/**
@ -72,7 +72,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-分页列表查询")
@Operation(summary = "${tableVo.ftlDescription}-分页列表查询")
@Operation(summary="${tableVo.ftlDescription}-分页列表查询")
@GetMapping(value = "/list")
public Result<?> queryPageList(${entityName} ${entityName?uncap_first},
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@ -91,7 +91,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-添加")
@Operation(summary = "${tableVo.ftlDescription}-添加")
@Operation(summary="${tableVo.ftlDescription}-添加")
@PostMapping(value = "/add")
public Result<?> add(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
${entityName} ${entityName?uncap_first} = new ${entityName}();
@ -107,7 +107,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-编辑")
@Operation(summary = "${tableVo.ftlDescription}-编辑")
@Operation(summary="${tableVo.ftlDescription}-")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<?> edit(@RequestBody ${entityName}Page ${entityName?uncap_first}Page) {
${entityName} ${entityName?uncap_first} = new ${entityName}();
@ -123,7 +123,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-通过id删除")
@Operation(summary = "${tableVo.ftlDescription}-通过id删除")
@Operation(summary="${tableVo.ftlDescription}-通过id删除")
@DeleteMapping(value = "/delete")
public Result<?> delete(@RequestParam(name="id",required=true) String id) {
${entityName?uncap_first}Service.delMain(id);
@ -137,7 +137,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-批量删除")
@Operation(summary = "${tableVo.ftlDescription}-批量删除")
@Operation(summary="${tableVo.ftlDescription}-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<?> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.${entityName?uncap_first}Service.removeByIds(Arrays.asList(ids.split(",")));
@ -151,7 +151,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${tableVo.ftlDescription}-通过id查询")
@Operation(summary = "${tableVo.ftlDescription}-通过id查询")
@Operation(summary="${tableVo.ftlDescription}-通过id查询")
@GetMapping(value = "/queryById")
public Result<?> queryById(@RequestParam(name="id",required=true) String id) {
${entityName} ${entityName?uncap_first} = ${entityName?uncap_first}Service.getById(id);
@ -168,7 +168,7 @@ public class ${entityName}Controller {
* @return
*/
@AutoLog(value = "${sub.ftlDescription}-通过主表id查询")
@Operation(summary = "${sub.ftlDescription}-通过主表id查询")
@Operation(summary="${sub.ftlDescription}-通过主表id查询")
<#-- update-begin--Author:kangxiaolin Date:20190905 for[442]主子表分开维护,生成的代码子表的分页改为真实的分页-------------------- -->
@GetMapping(value = "/list${sub.entityName}ByMainId")
public Result<?> list${sub.entityName}ByMainId(${sub.entityName} ${sub.entityName?uncap_first},
@ -208,7 +208,7 @@ ${sub.entityName?uncap_first}.get${key}()!=null<#rt/>
* @return
*/
@AutoLog(value = "${sub.ftlDescription}-添加")
@Operation(summary = "${sub.ftlDescription}-添加")
@Operation(summary="${sub.ftlDescription}-添加")
@PostMapping(value = "/add${sub.entityName}")
public Result<?> add${sub.entityName}(@RequestBody ${sub.entityName} ${sub.entityName?uncap_first}) {
${sub.entityName?uncap_first}Service.save(${sub.entityName?uncap_first});
@ -222,7 +222,7 @@ ${sub.entityName?uncap_first}.get${key}()!=null<#rt/>
* @return
*/
@AutoLog(value = "${sub.ftlDescription}-编辑")
@Operation(summary = "${sub.ftlDescription}-编辑")
@Operation(summary="${sub.ftlDescription}-编辑")
@RequestMapping(value = "/edit${sub.entityName}", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<?> edit${sub.entityName}(@RequestBody ${sub.entityName} ${sub.entityName?uncap_first}) {
${sub.entityName?uncap_first}Service.updateById(${sub.entityName?uncap_first});
@ -236,7 +236,7 @@ ${sub.entityName?uncap_first}.get${key}()!=null<#rt/>
* @return
*/
@AutoLog(value = "${sub.ftlDescription}-通过id删除")
@Operation(summary = "${sub.ftlDescription}-通过id删除")
@Operation(summary="${sub.ftlDescription}-通过id删除")
@DeleteMapping(value = "/delete${sub.entityName}")
public Result<?> delete${sub.entityName}(@RequestParam(name = "id", required = true) String id) {
${sub.entityName?uncap_first}Service.removeById(id);
@ -250,7 +250,7 @@ ${sub.entityName?uncap_first}.get${key}()!=null<#rt/>
* @return
*/
@AutoLog(value = "${sub.ftlDescription}-批量删除")
@Operation(summary = "${sub.ftlDescription}-批量删除")
@Operation(summary="${sub.ftlDescription}-批量删除")
@DeleteMapping(value = "/deleteBatch${sub.entityName}")
public Result<?> deleteBatch${sub.entityName}(@RequestParam(name = "ids", required = true) String ids) {
if (ids == null || "".equals(ids.trim())) {

View File

@ -10,7 +10,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @Description: ${tableVo.ftlDescription}
* @Author: jeecg-boot

View File

@ -12,7 +12,6 @@ import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @Description: ${subTab.ftlDescription}
* @Author: jeecg-boot

View File

@ -12,7 +12,6 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import io.swagger.v3.oas.annotations.media.Schema;
/**
* @Description: ${tableVo.ftlDescription}
* @Author: jeecg-boot