|
|
@ -8,6 +8,7 @@ |
|
|
:tableAction="tableAction" |
|
|
:tableAction="tableAction" |
|
|
@register="registerForm" |
|
|
@register="registerForm" |
|
|
@submit="handleSearchInfoChange" |
|
|
@submit="handleSearchInfoChange" |
|
|
|
|
|
@reset="handleSearchInfoReset" |
|
|
@advanced-change="redoHeight" |
|
|
@advanced-change="redoHeight" |
|
|
> |
|
|
> |
|
|
<template #[replaceFormSlotKey(item)]="data" v-for="item in getFormSlotKeys"> |
|
|
<template #[replaceFormSlotKey(item)]="data" v-for="item in getFormSlotKeys"> |
|
|
@ -46,7 +47,12 @@ |
|
|
<!-- <HeaderCell :column="column" />--> |
|
|
<!-- <HeaderCell :column="column" />--> |
|
|
<!-- </template>--> |
|
|
<!-- </template>--> |
|
|
</Table> |
|
|
</Table> |
|
|
<AdvancedSearch @register="registerAdSearchModal" v-bind="getAdvancedSearchProps" @search="handleAdvanceSearchChange" /> |
|
|
<AdvancedSearch |
|
|
|
|
|
ref="advancedSearchRef" |
|
|
|
|
|
@register="registerAdSearchModal" |
|
|
|
|
|
v-bind="getAdvancedSearchProps" |
|
|
|
|
|
@search="handleAdvanceSearchChange" |
|
|
|
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
<script lang="ts"> |
|
|
<script lang="ts"> |
|
|
@ -57,8 +63,8 @@ |
|
|
ColumnChangeParam, |
|
|
ColumnChangeParam, |
|
|
} from './types/table'; |
|
|
} from './types/table'; |
|
|
|
|
|
|
|
|
import { defineComponent, ref, reactive, computed, nextTick, unref, toRaw, inject, watchEffect } from 'vue'; |
|
|
import { defineComponent, ref, reactive, computed, unref, toRaw, inject, watchEffect, nextTick } from 'vue'; |
|
|
import { Table } from 'ant-design-vue'; |
|
|
import { Button, Table } from 'ant-design-vue'; |
|
|
import { BasicForm, useForm } from '/@/components/Form/index'; |
|
|
import { BasicForm, useForm } from '/@/components/Form/index'; |
|
|
import { useModal } from '/@/components/Modal/index'; |
|
|
import { useModal } from '/@/components/Modal/index'; |
|
|
import { PageWrapperFixedHeightKey } from '/@/components/Page'; |
|
|
import { PageWrapperFixedHeightKey } from '/@/components/Page'; |
|
|
@ -92,6 +98,7 @@ |
|
|
components: { |
|
|
components: { |
|
|
Table, |
|
|
Table, |
|
|
BasicForm, |
|
|
BasicForm, |
|
|
|
|
|
Button, |
|
|
HeaderCell, |
|
|
HeaderCell, |
|
|
AdvancedSearch, |
|
|
AdvancedSearch, |
|
|
}, |
|
|
}, |
|
|
@ -121,6 +128,7 @@ |
|
|
|
|
|
|
|
|
const wrapRef = ref(null); |
|
|
const wrapRef = ref(null); |
|
|
const formRef = ref(null); |
|
|
const formRef = ref(null); |
|
|
|
|
|
const advancedSearchRef = ref<any>(null); |
|
|
const innerPropsRef = ref<Partial<BasicTableProps>>(); |
|
|
const innerPropsRef = ref<Partial<BasicTableProps>>(); |
|
|
|
|
|
|
|
|
const { prefixCls } = useDesign('basic-table'); |
|
|
const { prefixCls } = useDesign('basic-table'); |
|
|
@ -257,7 +265,7 @@ |
|
|
handleSearchInfoChange, |
|
|
handleSearchInfoChange, |
|
|
handleAdvanceSearchChange |
|
|
handleAdvanceSearchChange |
|
|
} = |
|
|
} = |
|
|
useTableForm(getProps, slots, fetch, getLoading); |
|
|
useTableForm(getProps, slots, fetch, getLoading, formActions.setFieldsValue); |
|
|
|
|
|
|
|
|
const getBindValues = computed(() => { |
|
|
const getBindValues = computed(() => { |
|
|
const dataSource = unref(getDataSourceRef); |
|
|
const dataSource = unref(getDataSourceRef); |
|
|
@ -357,6 +365,11 @@ |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function handleSearchInfoReset() { |
|
|
|
|
|
const advancedSearch = unref(advancedSearchRef); |
|
|
|
|
|
advancedSearch?.resetFields(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
function handleAdvanceSearch() { |
|
|
function handleAdvanceSearch() { |
|
|
nextTick(() => openAdSearchModal(true)); |
|
|
nextTick(() => openAdSearchModal(true)); |
|
|
} |
|
|
} |
|
|
@ -365,14 +378,15 @@ |
|
|
t, |
|
|
t, |
|
|
formRef, |
|
|
formRef, |
|
|
tableElRef, |
|
|
tableElRef, |
|
|
|
|
|
advancedSearchRef, |
|
|
getBindValues, |
|
|
getBindValues, |
|
|
getLoading, |
|
|
getLoading, |
|
|
registerForm, |
|
|
registerForm, |
|
|
handleSearchInfoChange, |
|
|
handleSearchInfoChange, |
|
|
registerAdSearchModal, |
|
|
registerAdSearchModal, |
|
|
getAdvancedSearchProps, |
|
|
|
|
|
handleAdvanceSearch, |
|
|
|
|
|
handleAdvanceSearchChange, |
|
|
handleAdvanceSearchChange, |
|
|
|
|
|
handleSearchInfoReset, |
|
|
|
|
|
handleAdvanceSearch, |
|
|
getEmptyDataIsShowTable, |
|
|
getEmptyDataIsShowTable, |
|
|
handleTableChange, |
|
|
handleTableChange, |
|
|
getRowClassName, |
|
|
getRowClassName, |
|
|
@ -380,6 +394,7 @@ |
|
|
tableAction, |
|
|
tableAction, |
|
|
redoHeight, |
|
|
redoHeight, |
|
|
getFormProps: getFormProps as any, |
|
|
getFormProps: getFormProps as any, |
|
|
|
|
|
getAdvancedSearchProps, |
|
|
replaceFormSlotKey, |
|
|
replaceFormSlotKey, |
|
|
getFormSlotKeys, |
|
|
getFormSlotKeys, |
|
|
getWrapperClass, |
|
|
getWrapperClass, |
|
|
|