|
@@ -22,7 +22,7 @@ import { useVbenVxeGrid } from '#/adapter/vxe-table';
|
|
|
#if (${table.templateType} == 2)## 树表接口
|
|
#if (${table.templateType} == 2)## 树表接口
|
|
|
import { get${simpleClassName}List, delete${simpleClassName}, export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
|
import { get${simpleClassName}List, delete${simpleClassName}, export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
|
|
#else## 标准表接口
|
|
#else## 标准表接口
|
|
|
-import { get${simpleClassName}Page, delete${simpleClassName},#if ($table.deleteBatch) delete${simpleClassName}ByIds,#end export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
|
|
|
|
|
|
+import { get${simpleClassName}Page, delete${simpleClassName},#if ($deleteBatchEnable) delete${simpleClassName}ByIds,#end export${simpleClassName} } from '#/api/${table.moduleName}/${table.businessName}';
|
|
|
#end
|
|
#end
|
|
|
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
|
|
import { downloadFileFromBlobPart, isEmpty } from '@vben/utils';
|
|
|
|
|
|
|
@@ -92,7 +92,7 @@ async function onDelete(row: ${simpleClassName}Api.${simpleClassName}) {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-#if ($table.templateType != 2 && $table.deleteBatch)
|
|
|
|
|
|
|
+#if ($table.templateType != 2 && $deleteBatchEnable)
|
|
|
const deleteIds = ref<number[]>([]) // 待删除${table.classComment} ID
|
|
const deleteIds = ref<number[]>([]) // 待删除${table.classComment} ID
|
|
|
const showDeleteBatchBtn = computed(() => isEmpty(deleteIds.value));
|
|
const showDeleteBatchBtn = computed(() => isEmpty(deleteIds.value));
|
|
|
function setDeleteIds({
|
|
function setDeleteIds({
|
|
@@ -204,14 +204,14 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|
|
search: true,
|
|
search: true,
|
|
|
},
|
|
},
|
|
|
} as VxeTableGridOptions<${simpleClassName}Api.${simpleClassName}>,
|
|
} as VxeTableGridOptions<${simpleClassName}Api.${simpleClassName}>,
|
|
|
-#if (${table.templateType} == 11 || $table.deleteBatch)
|
|
|
|
|
|
|
+#if (${table.templateType} == 11 || $deleteBatchEnable)
|
|
|
gridEvents:{
|
|
gridEvents:{
|
|
|
#if(${table.templateType} == 11)
|
|
#if(${table.templateType} == 11)
|
|
|
cellClick: ({ row }: { row: ${simpleClassName}Api.${simpleClassName}}) => {
|
|
cellClick: ({ row }: { row: ${simpleClassName}Api.${simpleClassName}}) => {
|
|
|
select${simpleClassName}.value = row;
|
|
select${simpleClassName}.value = row;
|
|
|
},
|
|
},
|
|
|
#end
|
|
#end
|
|
|
- #if($table.deleteBatch)
|
|
|
|
|
|
|
+ #if($deleteBatchEnable)
|
|
|
checkboxAll: setDeleteIds,
|
|
checkboxAll: setDeleteIds,
|
|
|
checkboxChange: setDeleteIds,
|
|
checkboxChange: setDeleteIds,
|
|
|
#end
|
|
#end
|
|
@@ -262,7 +262,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
|
|
|
>
|
|
>
|
|
|
{{ $t('ui.actionTitle.export') }}
|
|
{{ $t('ui.actionTitle.export') }}
|
|
|
</Button>
|
|
</Button>
|
|
|
-#if ($table.templateType != 2 && $table.deleteBatch)
|
|
|
|
|
|
|
+#if ($table.templateType != 2 && $deleteBatchEnable)
|
|
|
<Button
|
|
<Button
|
|
|
:icon="h(Trash2)"
|
|
:icon="h(Trash2)"
|
|
|
type="primary"
|
|
type="primary"
|