|
|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import type { ${simpleClassName}Api } from '#/api/${table.moduleName}/${simpleClassName_strikeCase}';
|
|
|
|
|
import type { VxeTableInstance } from 'vxe-table';
|
|
|
|
|
import type { VxeTableInstance } from '#/adapter/vxe-table';
|
|
|
|
|
|
|
|
|
|
import { Page, useVbenModal } from '@vben/common-ui';
|
|
|
|
|
import { cloneDeep, formatDateTime } from '@vben/utils';
|
|
|
|
|
@ -9,9 +9,10 @@ import { DictTag } from '#/components/dict-tag';
|
|
|
|
|
import { DICT_TYPE, getDictOptions, getRangePickerDefaultProps } from '#/utils';
|
|
|
|
|
import ${simpleClassName}Form from './modules/form.vue';
|
|
|
|
|
import { Download, Plus, RefreshCw, Search } from '@vben/icons';
|
|
|
|
|
import { ContentWrap } from "#/components/content-wrap";
|
|
|
|
|
import { VxeColumn, VxeTable } from 'vxe-table';
|
|
|
|
|
import { ContentWrap } from '#/components/content-wrap';
|
|
|
|
|
import { VxeColumn, VxeTable } from '#/adapter/vxe-table';
|
|
|
|
|
import { TableToolbar } from '#/components/table-toolbar';
|
|
|
|
|
import { useTableToolbar } from '#/hooks';
|
|
|
|
|
|
|
|
|
|
## 特殊:主子表专属逻辑
|
|
|
|
|
#if ( $table.templateType == 11 || $table.templateType == 12 )
|
|
|
|
|
@ -167,11 +168,6 @@ try {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 隐藏搜索栏 */
|
|
|
|
|
const hiddenSearchBar = ref(false);
|
|
|
|
|
const tableToolbarRef = ref<InstanceType<typeof TableToolbar>>();
|
|
|
|
|
const tableRef = ref<VxeTableInstance>();
|
|
|
|
|
|
|
|
|
|
#if (${table.templateType} == 2)
|
|
|
|
|
/** 切换树形展开/收缩状态 */
|
|
|
|
|
const isExpanded = ref(true);
|
|
|
|
|
@ -182,15 +178,9 @@ function toggleExpand() {
|
|
|
|
|
#end
|
|
|
|
|
|
|
|
|
|
/** 初始化 */
|
|
|
|
|
onMounted(async () => {
|
|
|
|
|
await getList();
|
|
|
|
|
await nextTick();
|
|
|
|
|
// 挂载 toolbar 工具栏
|
|
|
|
|
const table = tableRef.value;
|
|
|
|
|
const tableToolbar = tableToolbarRef.value;
|
|
|
|
|
if (table && tableToolbar) {
|
|
|
|
|
await table.connect(tableToolbar.getToolbarRef()!);
|
|
|
|
|
}
|
|
|
|
|
const { hiddenSearchBar, tableToolbarRef, tableRef } = useTableToolbar();
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
getList();
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|