|
|
@ -33,10 +33,11 @@
|
|
|
|
show-overflow
|
|
|
|
show-overflow
|
|
|
|
show-header-overflow
|
|
|
|
show-header-overflow
|
|
|
|
show-footer-overflow
|
|
|
|
show-footer-overflow
|
|
|
|
|
|
|
|
:min-height="tableHeightRef + 35"
|
|
|
|
:height="tableHeightRef + 35"
|
|
|
|
:height="tableHeightRef + 35"
|
|
|
|
:row-config="{ isCurrent: true, isHover: true }"
|
|
|
|
:row-config="{ isCurrent: true, isHover: true }"
|
|
|
|
:column-config="{ resizable: true }"
|
|
|
|
:column-config="{ resizable: true }"
|
|
|
|
:scroll-y="{ enabled: true, gt: 15 }"
|
|
|
|
:scroll-y="{ enabled: true, gt: 0 }"
|
|
|
|
:scroll-x="{ enabled: true, gt: 0 }"
|
|
|
|
:scroll-x="{ enabled: true, gt: 0 }"
|
|
|
|
:sort-config="{ trigger: 'cell', remote: true }"
|
|
|
|
:sort-config="{ trigger: 'cell', remote: true }"
|
|
|
|
rowSelection
|
|
|
|
rowSelection
|
|
|
@ -45,15 +46,14 @@
|
|
|
|
@cell-dblclick="dbclickVxeRow"
|
|
|
|
@cell-dblclick="dbclickVxeRow"
|
|
|
|
@sort-change="sortChangeEvent"
|
|
|
|
@sort-change="sortChangeEvent"
|
|
|
|
@resizable-change="resizableChangeEvent"
|
|
|
|
@resizable-change="resizableChangeEvent"
|
|
|
|
|
|
|
|
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<template #empty>
|
|
|
|
<template #empty>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<img style="width: 100px;" src="../../../assets/images/nodata.png" />
|
|
|
|
<img src="../../../assets/images/nodata.png" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
<vxe-column type="checkbox" width="40"></vxe-column>
|
|
|
|
<vxe-column type="checkbox" fixed="left" width="40"></vxe-column>
|
|
|
|
<!-- <vxe-column type="seq" width="40"></vxe-column> -->
|
|
|
|
<!-- <vxe-column type="seq" title="序号" width="45"></vxe-column> -->
|
|
|
|
<template
|
|
|
|
<template
|
|
|
|
v-for="(item, index) in getBindValues.columns"
|
|
|
|
v-for="(item, index) in getBindValues.columns"
|
|
|
|
>
|
|
|
|
>
|
|
|
@ -102,12 +102,12 @@
|
|
|
|
</Table>
|
|
|
|
</Table>
|
|
|
|
<slot name="right" class="right" ></slot>
|
|
|
|
<slot name="right" class="right" ></slot>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<Pagination v-if="getBindValues.tableComponent === 'vxe'" v-bind="getBindValues.pagination" @change="pageChange" />
|
|
|
|
<Pagination v-if="getBindValues.tableComponent === 'vxe'" v-bind="getBindValues.pagination" @change="pageChange" @showSizeChange="onShowSizeChange" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</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, watch, onUnmounted } from 'vue'
|
|
|
|
import { defineComponent, ref, computed, unref, toRaw, inject, watchEffect, watch, onUpdated, onActivated, onDeactivated, nextTick } 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'
|
|
|
@ -367,6 +367,13 @@ export default defineComponent({
|
|
|
|
setPagination(pageConfig)
|
|
|
|
setPagination(pageConfig)
|
|
|
|
reload()
|
|
|
|
reload()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const onShowSizeChange = (current, pageSize) => {
|
|
|
|
|
|
|
|
const pageConfig = toRaw(unref(getPaginationInfo))
|
|
|
|
|
|
|
|
pageConfig.current = current
|
|
|
|
|
|
|
|
pageConfig.pageSize = pageSize
|
|
|
|
|
|
|
|
setPagination(pageConfig)
|
|
|
|
|
|
|
|
reload()
|
|
|
|
|
|
|
|
}
|
|
|
|
const vxeSetId = ref('0')
|
|
|
|
const vxeSetId = ref('0')
|
|
|
|
// vxe 列设置数据查询
|
|
|
|
// vxe 列设置数据查询
|
|
|
|
const getVxeColSetData = () => {
|
|
|
|
const getVxeColSetData = () => {
|
|
|
@ -383,6 +390,27 @@ export default defineComponent({
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// let vxeTableScrollTop = null
|
|
|
|
|
|
|
|
// onActivated(() => {
|
|
|
|
|
|
|
|
// console.log(vxeTableScrollTop)
|
|
|
|
|
|
|
|
// if (vxeTableScrollTop && tableElRef.value?.scrollTo) {
|
|
|
|
|
|
|
|
// tableElRef.value.scrollTo(null, vxeTableScrollTop)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// onUpdated(() => {
|
|
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
|
|
|
// if (vxeTableScrollTop && tableElRef.value?.scrollTo) {
|
|
|
|
|
|
|
|
// tableElRef.value.scrollTo(null, vxeTableScrollTop)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }, 10)
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// onDeactivated(() => {
|
|
|
|
|
|
|
|
// if (tableElRef.value?.getScroll) {
|
|
|
|
|
|
|
|
// const scrollData = tableElRef.value.getScroll()
|
|
|
|
|
|
|
|
// vxeTableScrollTop = scrollData.scrollTop
|
|
|
|
|
|
|
|
// console.log(vxeTableScrollTop)
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// })
|
|
|
|
const tableAction: TableActionType = {
|
|
|
|
const tableAction: TableActionType = {
|
|
|
|
reload,
|
|
|
|
reload,
|
|
|
|
getSelectRows,
|
|
|
|
getSelectRows,
|
|
|
@ -443,6 +471,7 @@ export default defineComponent({
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// vxe拖动列触发实时保存
|
|
|
|
// vxe拖动列触发实时保存
|
|
|
|
const resizableChangeEvent = (item) => {
|
|
|
|
const resizableChangeEvent = (item) => {
|
|
|
|
|
|
|
|
if (item?.columm?.type === 'seq' || item?.columm?.type === 'checkbox') return
|
|
|
|
if (vxeSetId.value == '0') return
|
|
|
|
if (vxeSetId.value == '0') return
|
|
|
|
const postData = {
|
|
|
|
const postData = {
|
|
|
|
permissionId: permissionsInfo().permissionId,
|
|
|
|
permissionId: permissionsInfo().permissionId,
|
|
|
@ -459,9 +488,6 @@ export default defineComponent({
|
|
|
|
})
|
|
|
|
})
|
|
|
|
setColumns(data)
|
|
|
|
setColumns(data)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
|
|
|
console.log(111111111111111)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
// vxe服务端筛选
|
|
|
|
// vxe服务端筛选
|
|
|
|
// const filterChangeEvent = ({ filterList }) => {
|
|
|
|
// const filterChangeEvent = ({ filterList }) => {
|
|
|
|
// console.log(filterList)
|
|
|
|
// console.log(filterList)
|
|
|
@ -478,6 +504,7 @@ export default defineComponent({
|
|
|
|
getBindValues,
|
|
|
|
getBindValues,
|
|
|
|
getLoading,
|
|
|
|
getLoading,
|
|
|
|
registerForm,
|
|
|
|
registerForm,
|
|
|
|
|
|
|
|
onShowSizeChange,
|
|
|
|
handleSearchInfoChange,
|
|
|
|
handleSearchInfoChange,
|
|
|
|
getEmptyDataIsShowTable,
|
|
|
|
getEmptyDataIsShowTable,
|
|
|
|
sortChangeEvent,
|
|
|
|
sortChangeEvent,
|
|
|
|