lijingjia 2 weeks ago
parent bb74dda076
commit 646e44ebc4

@ -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 = () => {

@ -68,7 +68,7 @@
.ButtonBox {
width: 70%;
display: flex;
justify-content: end;
justify-content: flex-end;
.CheckButton {
width: 150px;
margin: 16px 0 16px 16px;

@ -314,7 +314,7 @@
</div>
</template>
<script lang="ts" setup name="订单管理">
import { onMounted, ref, defineAsyncComponent, onActivated } from 'vue'
import { ref, defineAsyncComponent, onActivated } from 'vue'
const TableActionBar = defineAsyncComponent(() => import("./components/tableActionBar.vue"))
import { CheckCircleFilled, CloseCircleFilled, RedoOutlined } from '@ant-design/icons-vue'
const tableActionBarRight = defineAsyncComponent(() => import("./components/tableActionBarRight.vue"))
@ -517,7 +517,7 @@ const [registerTable, { reload, getVxeSelectRows, setLoading }] = useTable({
immediate: false,
tableComponent: 'vxe',
autoHeight: tbHeight,
id: '011',
id: '0',
actionColumn: {
width: 60,
title: '操作',
@ -654,7 +654,7 @@ function compareSuccess() {
setLoading(false);
reload()
}
onMounted(() => {
onActivated(() => {
//
reload()
})

@ -264,7 +264,7 @@
.bottom {
padding: 10px 60px;
display: flex;
justify-content: end;
justify-content: flex-end;
box-shadow: 0px -3px 6px rgba(214, 214, 214, 1);
.steps {
width: 800px;

Loading…
Cancel
Save