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