diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei index 8d02c15..ffaa24f 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei @@ -24,7 +24,7 @@ <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> - <a-dropdown v-if="checkedKeys.length > 0"> + <a-dropdown v-if="selectedRowKeys.length > 0"> <template #overlay> <a-menu> <a-menu-item key="1" @click="batchHandleDelete"> @@ -107,7 +107,8 @@ url: getExportUrl, }, importConfig: { - url: getImportUrl + url: getImportUrl, + success: handleSuccess }, }) @@ -146,19 +147,19 @@ * 删除事件 */ async function handleDelete(record) { - await deleteOne({id: record.id}, reload); + await deleteOne({id: record.id}, handleSuccess); } /** * 批量删除事件 */ async function batchHandleDelete() { - await batchDelete({ids: checkedKeys.value}, reload); + await batchDelete({ids: selectedRowKeys.value}, handleSuccess); } /** * 成功回调 */ function handleSuccess() { - reload(); + (selectedRowKeys.value = []) && reload(); } /** * 操作栏 diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi index b282a04..265ced0 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/one/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi @@ -171,10 +171,14 @@ export const formSchema: FormSchema[] = [ <#assign form_cat_tree = false> <#assign form_cat_back = ""> <#assign bpm_flag=false> +<#assign id_exists = false> <#list columns as po><#rt/> <#if po.fieldDbName=='bpm_status'> <#assign bpm_flag=true> </#if> +<#if po.fieldDbName == 'id'> + <#assign id_exists = true> +</#if> <#if po.isShow =='Y'> <#assign form_field_dictCode=""> <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> @@ -351,4 +355,13 @@ export const formSchema: FormSchema[] = [ }, </#if> </#list> +<#if id_exists == false> + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +</#if> ]; diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi index 340a5ae..b9dac14 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi @@ -171,10 +171,14 @@ export const formSchema: FormSchema[] = [ <#assign form_cat_tree = false> <#assign form_cat_back = ""> <#assign bpm_flag=false> +<#assign id_exists = false> <#list columns as po><#rt/> <#if po.fieldDbName=='bpm_status'> <#assign bpm_flag=true> </#if> +<#if po.fieldDbName == 'id'> + <#assign id_exists = true> +</#if> <#if po.isShow =='Y'> <#assign form_field_dictCode=""> <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> @@ -351,4 +355,13 @@ export const formSchema: FormSchema[] = [ }, </#if> </#list> +<#if id_exists == false> + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +</#if> ]; diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei index 85debf1..f5b7603 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei @@ -122,7 +122,8 @@ url: getExportUrl, }, importConfig: { - url: getImportUrl + url: getImportUrl, + success: handleSuccess }, }) @@ -164,19 +165,19 @@ * 删除事件 */ async function handleDelete(record) { - await deleteOne({id: record.id}, reload); + await deleteOne({id: record.id}, handleSuccess); } /** * 批量删除事件 */ async function batchHandleDelete() { - await batchDelete({ids: selectedRowKeys.value}, reload); + await batchDelete({ids: selectedRowKeys.value},handleSuccess); } /** * 成功回调 */ function handleSuccess() { - reload(); + (selectedRowKeys.value = []) && reload(); } /** * 操作栏 diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi index 5c01879..4a8d8f7 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi @@ -169,10 +169,14 @@ export const formSchema: FormSchema[] = [ <#assign form_cat_tree = false> <#assign form_cat_back = ""> <#assign bpm_flag=false> +<#assign id_exists = false> <#list columns as po><#rt/> <#if po.fieldDbName=='bpm_status'> <#assign bpm_flag=true> </#if> +<#if po.fieldDbName == 'id'> + <#assign id_exists = true> +</#if> <#if po.isShow =='Y'> <#assign form_field_dictCode=""> <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> @@ -349,6 +353,15 @@ export const formSchema: FormSchema[] = [ }, </#if> </#list> +<#if id_exists == false> + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +</#if> ]; <#list subTables as sub> @@ -421,6 +434,15 @@ export const ${sub.entityName?uncap_first}FormSchema: FormSchema[] = [ <#assign form_cat_back = ""> <#assign bpm_flag=false> <#list sub.originalColumns as po><#rt/> +<#if po.fieldName == 'id'> + // TODO 子表隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +</#if> <#if po.isShow =='Y'> <#assign form_field_dictCode=""> <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/[1-n]List.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/[1-n]List.vuei index f44239a..3f69b13 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/[1-n]List.vuei +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/erp/onetomany/java/${bussiPackage}/${entityPackage}/vue3/[1-n]List.vuei @@ -117,23 +117,21 @@ * 删除事件 */ async function handleDelete(record) { - await ${sub.entityName?uncap_first}Delete({id: record.id}, reload); + await ${sub.entityName?uncap_first}Delete({id: record.id}, handleSuccess); } /** * 批量删除事件 */ async function batchHandleDelete() { - await ${sub.entityName?uncap_first}DeleteBatch({ids: selectedRowKeys.value}, () => { - reload() - }) + await ${sub.entityName?uncap_first}DeleteBatch({ids: selectedRowKeys.value}, handleSuccess) } /** * 成功回调 */ function handleSuccess() { - reload(); + (selectedRowKeys.value = []) && reload(); } /** diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei index 952afd9..3f79cc5 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei @@ -125,7 +125,8 @@ url: getExportUrl, }, importConfig: { - url: getImportUrl + url: getImportUrl, + success: handleSuccess }, }) @@ -172,19 +173,19 @@ * 删除事件 */ async function handleDelete(record) { - await deleteOne({id: record.id}, reload); + await deleteOne({id: record.id}, handleSuccess); } /** * 批量删除事件 */ async function batchHandleDelete() { - await batchDelete({ids: selectedRowKeys.value}, reload); + await batchDelete({ids: selectedRowKeys.value},handleSuccess); } /** * 成功回调 */ function handleSuccess() { - reload(); + (selectedRowKeys.value = []) && reload(); } /** * 操作栏 diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi index 178e2ea..33591b0 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi @@ -172,10 +172,14 @@ export const formSchema: FormSchema[] = [ <#assign form_cat_tree = false> <#assign form_cat_back = ""> <#assign bpm_flag=false> +<#assign id_exists = false> <#list columns as po><#rt/> <#if po.fieldDbName=='bpm_status'> <#assign bpm_flag=true> </#if> +<#if po.fieldDbName == 'id'> + <#assign id_exists = true> +</#if> <#if po.isShow =='Y'> <#assign form_field_dictCode=""> <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> @@ -352,6 +356,15 @@ export const formSchema: FormSchema[] = [ }, </#if> </#list> +<#if id_exists == false> + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +</#if> ]; //子表单数据 <#list subTables as sub> diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei index d87e3b4..01a8331 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei @@ -24,7 +24,7 @@ <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> - <a-dropdown v-if="checkedKeys.length > 0"> + <a-dropdown v-if="selectedRowKeys.length > 0"> <template #overlay> <a-menu> <a-menu-item key="1" @click="batchHandleDelete"> @@ -107,7 +107,8 @@ url: getExportUrl, }, importConfig: { - url: getImportUrl + url: getImportUrl, + success: handleSuccess }, }) @@ -146,19 +147,19 @@ * 删除事件 */ async function handleDelete(record) { - await deleteOne({id: record.id}, reload); + await deleteOne({id: record.id}, handleSuccess); } /** * 批量删除事件 */ async function batchHandleDelete() { - await batchDelete({ids: checkedKeys.value}, reload); + await batchDelete({ids: selectedRowKeys.value},handleSuccess); } /** * 成功回调 */ function handleSuccess() { - reload(); + (selectedRowKeys.value = []) && reload(); } /** * 操作栏 diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi index 420aaa8..d5ee8fa 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/jvxe/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi @@ -172,10 +172,14 @@ export const formSchema: FormSchema[] = [ <#assign form_cat_tree = false> <#assign form_cat_back = ""> <#assign bpm_flag=false> +<#assign id_exists = false> <#list columns as po><#rt/> <#if po.fieldDbName=='bpm_status'> <#assign bpm_flag=true> </#if> +<#if po.fieldDbName == 'id'> + <#assign id_exists = true> +</#if> <#if po.isShow =='Y'> <#assign form_field_dictCode=""> <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> @@ -352,6 +356,15 @@ export const formSchema: FormSchema[] = [ }, </#if> </#list> +<#if id_exists == false> + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +</#if> ]; //子表单数据 <#list subTables as sub> diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei index d87e3b4..7d6474b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}List.vuei @@ -24,7 +24,7 @@ <a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> <a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> <j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> - <a-dropdown v-if="checkedKeys.length > 0"> + <a-dropdown v-if="selectedRowKeys.length > 0"> <template #overlay> <a-menu> <a-menu-item key="1" @click="batchHandleDelete"> @@ -107,7 +107,8 @@ url: getExportUrl, }, importConfig: { - url: getImportUrl + url: getImportUrl, + success: handleSuccess }, }) @@ -146,19 +147,19 @@ * 删除事件 */ async function handleDelete(record) { - await deleteOne({id: record.id}, reload); + await deleteOne({id: record.id}, handleSuccess); } /** * 批量删除事件 */ async function batchHandleDelete() { - await batchDelete({ids: checkedKeys.value}, reload); + await batchDelete({ids: selectedRowKeys.value}, handleSuccess); } /** * 成功回调 */ function handleSuccess() { - reload(); + (selectedRowKeys.value = []) && reload(); } /** * 操作栏 diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi index 11b7cd5..05c1770 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/tab/onetomany/java/${bussiPackage}/${entityPackage}/vue3/${entityName}__data.tsi @@ -172,10 +172,14 @@ export const formSchema: FormSchema[] = [ <#assign form_cat_tree = false> <#assign form_cat_back = ""> <#assign bpm_flag=false> +<#assign id_exists = false> <#list columns as po><#rt/> <#if po.fieldDbName=='bpm_status'> <#assign bpm_flag=true> </#if> +<#if po.fieldDbName == 'id'> + <#assign id_exists = true> +</#if> <#if po.isShow =='Y'> <#assign form_field_dictCode=""> <#if po.dictTable?default("")?trim?length gt 1 && po.dictText?default("")?trim?length gt 1 && po.dictField?default("")?trim?length gt 1> @@ -352,6 +356,15 @@ export const formSchema: FormSchema[] = [ }, </#if> </#list> +<#if id_exists == false> + // TODO 主键隐藏字段,目前写死为ID + { + label: '', + field: 'id', + component: 'Input', + show: false + }, +</#if> ]; //子表单数据 <#list subTables as sub>