|
|
|
@ -107,7 +107,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
|
|
|
|
import type { BasicTableProps, TableActionType, SizeType, ColumnChangeParam } from './types/table'
|
|
|
|
|
import { defineComponent, ref, computed, unref, toRaw, inject, watchEffect, onMounted, watch } from 'vue'
|
|
|
|
|
import { defineComponent, ref, computed, unref, toRaw, inject, watchEffect, watch } from 'vue'
|
|
|
|
|
import { Table, Pagination } from 'ant-design-vue'
|
|
|
|
|
import { BasicForm, useForm } from '/@/components/Form/index'
|
|
|
|
|
import { PageWrapperFixedHeightKey } from '/@/components/Page'
|
|
|
|
@ -180,7 +180,6 @@ export default defineComponent({
|
|
|
|
|
const [registerForm, formActions] = useForm()
|
|
|
|
|
|
|
|
|
|
const getProps = computed(() => {
|
|
|
|
|
console.log(props.tableComponent)
|
|
|
|
|
return { ...props, ...unref(innerPropsRef) } as BasicTableProps
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -192,6 +191,15 @@ export default defineComponent({
|
|
|
|
|
"'canResize' of BasicTable may not work in PageWrapper with 'fixedHeight' (especially in hot updates)",
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
watch(
|
|
|
|
|
() => getProps,
|
|
|
|
|
(v) => {
|
|
|
|
|
if (unref(v).tableComponent == 'vxe') {
|
|
|
|
|
getVxeColSetData()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
{ deep: true }
|
|
|
|
|
)
|
|
|
|
|
const { getLoading, setLoading } = useLoading(getProps)
|
|
|
|
|
const {
|
|
|
|
|
getPaginationInfo,
|
|
|
|
@ -362,10 +370,10 @@ export default defineComponent({
|
|
|
|
|
const vxeSetId = ref('0')
|
|
|
|
|
// vxe 列设置数据查询
|
|
|
|
|
const getVxeColSetData = () => {
|
|
|
|
|
console.log(props)
|
|
|
|
|
if (props.id) {
|
|
|
|
|
getColumnSetInfoByModule({ permissionId: permissionsInfo().permissionId, columnNo: props.id }).then(res => {
|
|
|
|
|
const { data } = res
|
|
|
|
|
if (!data) return
|
|
|
|
|
const columns = JSON.parse(data.content).columns
|
|
|
|
|
columns.forEach(item => {
|
|
|
|
|
item['title'] = item.customTitle
|
|
|
|
@ -451,9 +459,6 @@ export default defineComponent({
|
|
|
|
|
})
|
|
|
|
|
setColumns(data)
|
|
|
|
|
}
|
|
|
|
|
// onMounted(() => {
|
|
|
|
|
// getVxeColSetData()
|
|
|
|
|
// })
|
|
|
|
|
// 初始化列设置
|
|
|
|
|
const initColSet = () => {
|
|
|
|
|
|
|
|
|
|