mirror of https://github.com/jeecgboot/jeecg-boot
修复vue3代码生成器的一些问题
parent
fa70a83391
commit
85b26230d1
|
@ -30,7 +30,7 @@ export const columns: BasicColumn[] = [
|
|||
slots: { customRender: 'fileSlot' },
|
||||
<#elseif po.classType=='image'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:render.renderAvatar,
|
||||
customRender:render.renderImage,
|
||||
<#elseif po.classType=='switch'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
<#assign switch_extend_arr=['Y','N']>
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</#if>
|
||||
</#list>
|
||||
<template>
|
||||
<div class="p-4">
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" :expandedRowKeys="expandedRowKeys" @expand="handleExpand" @fetch-success="onFetchSuccess">
|
||||
<!--插槽:table标题-->
|
||||
|
|
|
@ -34,7 +34,7 @@ export const columns: BasicColumn[] = [
|
|||
slots: { customRender: 'fileSlot' },
|
||||
<#elseif po.classType=='image'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:render.renderAvatar,
|
||||
customRender:render.renderImage,
|
||||
<#elseif po.classType=='switch'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
<#assign switch_extend_arr=['Y','N']>
|
||||
|
@ -193,7 +193,15 @@ export const formSchema: FormSchema[] = [
|
|||
{
|
||||
label: '${po.filedComment}',
|
||||
field: '${po.fieldName}',
|
||||
<#if po.classType =='date'>
|
||||
<#if po.fieldDbName == tableVo.extendParams.pidField>
|
||||
component: 'JTreeSelect',
|
||||
componentProps: {
|
||||
dict: "${tableVo.tableName},${tableVo.extendParams.textField},id",
|
||||
pidField: "${tableVo.extendParams.pidField}",
|
||||
pidValue: "0",
|
||||
hasChildField: "${tableVo.extendParams.hasChildren}",
|
||||
},
|
||||
<#elseif po.classType =='date'>
|
||||
component: 'DatePicker',
|
||||
<#elseif po.fieldType =='datetime'>
|
||||
component: 'DatePicker',
|
||||
|
|
|
@ -15,8 +15,6 @@ enum Api {
|
|||
${sub.entityName?uncap_first}Edit='/${entityPackage}/${entityName?uncap_first}/edit${sub.entityName}',
|
||||
${sub.entityName?uncap_first}Delete = '/${entityPackage}/${entityName?uncap_first}/delete${sub.entityName}',
|
||||
${sub.entityName?uncap_first}DeleteBatch = '/${entityPackage}/${entityName?uncap_first}/deleteBatch${sub.entityName}',
|
||||
${sub.entityName?uncap_first}ExportXlsUrl = '/${entityPackage}/${entityName?uncap_first}/export${sub.entityName}',
|
||||
${sub.entityName?uncap_first}ImportUrl = '/${entityPackage}/${entityName?uncap_first}/import${sub.entityName}',
|
||||
</#list>
|
||||
}
|
||||
/**
|
||||
|
@ -110,4 +108,13 @@ export const ${sub.entityName?uncap_first}SaveOrUpdate = (params, isUpdate) =>
|
|||
let url = isUpdate ? Api.${sub.entityName?uncap_first}Edit : Api.${sub.entityName?uncap_first}Save;
|
||||
return defHttp.post({url: url, params});
|
||||
}
|
||||
/**
|
||||
* 导入
|
||||
*/
|
||||
export const ${sub.entityName?uncap_first}ImportUrl = '/${entityPackage}/${entityName?uncap_first}/import${sub.entityName}'
|
||||
|
||||
/**
|
||||
* 导出
|
||||
*/
|
||||
export const ${sub.entityName?uncap_first}ExportXlsUrl = '/${entityPackage}/${entityName?uncap_first}/export${sub.entityName}'
|
||||
</#list>
|
|
@ -30,7 +30,7 @@ export const columns: BasicColumn[] = [
|
|||
slots: { customRender: 'fileSlot' },
|
||||
<#elseif po.classType=='image'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:render.renderAvatar,
|
||||
customRender:render.renderImage,
|
||||
<#elseif po.classType=='switch'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
<#assign switch_extend_arr=['Y','N']>
|
||||
|
@ -393,7 +393,7 @@ export const ${sub.entityName?uncap_first}Columns: BasicColumn[] = [
|
|||
slots: { customRender: 'fileSlot' },
|
||||
<#elseif po.classType=='image'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:render.renderAvatar,
|
||||
customRender:render.renderImage,
|
||||
<#elseif po.classType=='switch'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
<#assign switch_extend_arr=['Y','N']>
|
||||
|
|
|
@ -77,10 +77,17 @@
|
|||
},
|
||||
exportConfig: {
|
||||
name: '${sub.ftlDescription}',
|
||||
url: ${sub.entityName?uncap_first}ExportXlsUrl
|
||||
url: ${sub.entityName?uncap_first}ExportXlsUrl,
|
||||
params: {
|
||||
<#list sub.foreignKeys as key>
|
||||
'${key?uncap_first}': mainId
|
||||
</#list>
|
||||
}
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl()
|
||||
url: ()=>{
|
||||
return ${sub.entityName?uncap_first}ImportUrl + '/' + unref(mainId)
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -95,14 +102,6 @@
|
|||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* 导入地址
|
||||
*/
|
||||
function getImportUrl(){
|
||||
return ${sub.entityName?uncap_first}ImportUrl+'/'+ unref(mainId)
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
|
|
|
@ -31,7 +31,7 @@ export const columns: BasicColumn[] = [
|
|||
slots: { customRender: 'fileSlot' },
|
||||
<#elseif po.classType=='image'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:render.renderAvatar,
|
||||
customRender:render.renderImage,
|
||||
<#elseif po.classType=='switch'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
<#assign switch_extend_arr=['Y','N']>
|
||||
|
@ -396,7 +396,7 @@ export const ${sub.entityName?uncap_first}Columns: BasicColumn[] = [
|
|||
slots: { customRender: 'fileSlot' },
|
||||
<#elseif po.classType=='image'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:render.renderAvatar,
|
||||
customRender:render.renderImage,
|
||||
<#elseif po.classType=='switch'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
<#assign switch_extend_arr=['Y','N']>
|
||||
|
|
|
@ -31,7 +31,7 @@ export const columns: BasicColumn[] = [
|
|||
slots: { customRender: 'fileSlot' },
|
||||
<#elseif po.classType=='image'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:render.renderAvatar,
|
||||
customRender:render.renderImage,
|
||||
<#elseif po.classType=='switch'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
<#assign switch_extend_arr=['Y','N']>
|
||||
|
|
|
@ -31,7 +31,7 @@ export const columns: BasicColumn[] = [
|
|||
slots: { customRender: 'fileSlot' },
|
||||
<#elseif po.classType=='image'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
customRender:render.renderAvatar,
|
||||
customRender:render.renderImage,
|
||||
<#elseif po.classType=='switch'>
|
||||
dataIndex: '${po.fieldName}',
|
||||
<#assign switch_extend_arr=['Y','N']>
|
||||
|
|
Loading…
Reference in New Issue