|
|
|
@ -147,7 +147,7 @@
@@ -147,7 +147,7 @@
|
|
|
|
|
*/ |
|
|
|
|
import { BasicTitle } from '/@/components/Basic'; |
|
|
|
|
import { RedoOutlined, ColumnHeightOutlined, FullscreenOutlined, FullscreenExitOutlined, LeftOutlined, RightOutlined } from '@ant-design/icons-vue'; |
|
|
|
|
import {ref, onMounted, watchEffect, ComputedRef, computed, watch} from 'vue'; |
|
|
|
|
import { ref, onMounted, watchEffect, ComputedRef, computed, watch } from 'vue'; |
|
|
|
|
import { Table, Form, Row, Col, Divider, Tooltip, Dropdown, Menu, Select, DatePicker, Alert } from 'ant-design-vue'; |
|
|
|
|
import {BasicColumn, BasicTableProps, PaginationProps, SizeType, SorterResult} from '/@/components/Table'; |
|
|
|
|
import { listConfig, delConfig } from '/@/api/platform/system/controller/config'; |
|
|
|
@ -167,8 +167,8 @@
@@ -167,8 +167,8 @@
|
|
|
|
|
import {usePagination} from "/@/components/Table/src/hooks/usePagination"; |
|
|
|
|
import {useTableStyle} from "/@/components/Table/src/hooks/useTableStyle"; |
|
|
|
|
import {useTableScroll} from "/@/components/Table/src/hooks/useTableScroll"; |
|
|
|
|
import expandIcon from "/@/components/Table/src/components/ExpandIcon"; |
|
|
|
|
import {omit} from "lodash-es"; |
|
|
|
|
import {PAGE_SIZE, PAGE_SIZE_OPTIONS} from "/@/components/Table/src/const"; |
|
|
|
|
import {isBoolean} from "/@/utils/is"; |
|
|
|
|
|
|
|
|
|
/** 类型规范统一声明定义区域 */ |
|
|
|
|
interface TableState { |
|
|
|
@ -202,12 +202,12 @@
@@ -202,12 +202,12 @@
|
|
|
|
|
const ASelectOption = Select.Option; |
|
|
|
|
const ARangePicker = DatePicker.RangePicker; |
|
|
|
|
|
|
|
|
|
const { t } = useI18n(); |
|
|
|
|
const { prefixCls } = useDesign('basic-table'); |
|
|
|
|
const { prefixCls: headerPrefixCls } = useDesign('basic-table-header'); |
|
|
|
|
const wrapRef = ref(null); |
|
|
|
|
const tableElRef = ref(null); |
|
|
|
|
const queryFormElRef = ref(null); |
|
|
|
|
const { t } = useI18n(); |
|
|
|
|
const { prefixCls } = useDesign('basic-table'); |
|
|
|
|
const { prefixCls: headerPrefixCls } = useDesign('basic-table-header'); |
|
|
|
|
const { createConfirm } = useMessage(); |
|
|
|
|
const { createMessage } = useMessage(); |
|
|
|
|
const { toggle, isFullscreen } = useFullscreen(wrapRef); |
|
|
|
@ -245,10 +245,9 @@
@@ -245,10 +245,9 @@
|
|
|
|
|
bordered: true |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
const defineBasicTableProps = defineProps(basicProps); |
|
|
|
|
const basicTableProps = computed(() => ({ ...toRaw(defineBasicTableProps), ...state.tableProps } as unknown as BasicTableProps)); |
|
|
|
|
// 基于vben-table扩展rowSelection,实现勾选数据自主可控 |
|
|
|
|
const basicTableProps = computed(() => { |
|
|
|
|
return { ...basicProps, ...state.tableProps } as unknown as BasicTableProps; |
|
|
|
|
}); |
|
|
|
|
const { |
|
|
|
|
getRowSelection, |
|
|
|
|
getRowSelectionRef, |
|
|
|
@ -269,17 +268,15 @@
@@ -269,17 +268,15 @@
|
|
|
|
|
// 使用vben-table行斑马线 |
|
|
|
|
const { getRowClassName } = useTableStyle(basicTableProps, prefixCls); |
|
|
|
|
// 使用vben-table自动计算表格高度跟在指定区域显示滚动条 |
|
|
|
|
const { getScrollRef, redoHeight } = useTableScroll(basicTableProps, tableElRef, columns as any, getRowSelectionRef, state.tableProps.dataSource as any); |
|
|
|
|
|
|
|
|
|
// 绑定table元素 |
|
|
|
|
//const { getScrollRef, redoHeight } = useTableScroll(basicTableProps, tableElRef, columns as any, getRowSelectionRef, state.tableProps.dataSource as any); |
|
|
|
|
// 设置并绑定a-table属性 |
|
|
|
|
const getBindValues = computed(() => { |
|
|
|
|
debugger |
|
|
|
|
const propsData: Recordable = { |
|
|
|
|
...state.tableProps, |
|
|
|
|
tableLayout: 'fixed', |
|
|
|
|
columns: columns, |
|
|
|
|
size: state.selectedKeys[0], |
|
|
|
|
scroll: unref(getScrollRef), |
|
|
|
|
//scroll: unref(getScrollRef), |
|
|
|
|
rowClassName: unref(getRowClassName), |
|
|
|
|
rowSelection: unref(getRowSelectionRef), |
|
|
|
|
pagination: toRaw(unref(getPaginationInfo)), |
|
|
|
|