|
@@ -31,7 +31,8 @@
|
|
:columns="cloumns"
|
|
:columns="cloumns"
|
|
:rowSelection="rowSelection"
|
|
:rowSelection="rowSelection"
|
|
:data-source="typeFilterScenes[current]"
|
|
:data-source="typeFilterScenes[current]"
|
|
- :pagination="false"
|
|
|
|
|
|
+ :pagination="{ ...params, current: params.pageNum }"
|
|
|
|
+ @change="handleTableChange"
|
|
/>
|
|
/>
|
|
<div style="padding: 1px" v-else>
|
|
<div style="padding: 1px" v-else>
|
|
<Empty
|
|
<Empty
|
|
@@ -77,6 +78,7 @@ import {
|
|
Dropdown,
|
|
Dropdown,
|
|
Menu,
|
|
Menu,
|
|
MenuItem,
|
|
MenuItem,
|
|
|
|
+ TableProps,
|
|
} from "ant-design-vue";
|
|
} from "ant-design-vue";
|
|
import { computed, nextTick, ref, watch, watchEffect } from "vue";
|
|
import { computed, nextTick, ref, watch, watchEffect } from "vue";
|
|
import { scenes, save, SceneTypeDesc } from "@/store";
|
|
import { scenes, save, SceneTypeDesc } from "@/store";
|
|
@@ -118,19 +120,22 @@ const types = computed(() => [
|
|
]);
|
|
]);
|
|
const type = ref(types.value[0]);
|
|
const type = ref(types.value[0]);
|
|
|
|
|
|
|
|
+const handleTableChange: TableProps["onChange"] = (pag) => {
|
|
|
|
+ params.value.pageSize = pag.pageSize!;
|
|
|
|
+ params.value.pageNum = pag.current!;
|
|
|
|
+};
|
|
const meshParams = ref({ isObj: 1, pageNum: 1, pageSize: 12, total: 0 })
|
|
const meshParams = ref({ isObj: 1, pageNum: 1, pageSize: 12, total: 0 })
|
|
const cloudParams = ref({ isObj: 0, pageNum: 1, pageSize: 12, total: 0 })
|
|
const cloudParams = ref({ isObj: 0, pageNum: 1, pageSize: 12, total: 0 })
|
|
const meshList = ref<Scene[]>([])
|
|
const meshList = ref<Scene[]>([])
|
|
const cloudList = ref<Scene[]>([])
|
|
const cloudList = ref<Scene[]>([])
|
|
|
|
+const params = computed(() => type.value === 'Mesh场景' ? meshParams.value : cloudParams.value)
|
|
|
|
|
|
-console.error('scene-select')
|
|
|
|
let loadCount = 0
|
|
let loadCount = 0
|
|
watchEffect(() => {
|
|
watchEffect(() => {
|
|
- const params = type.value === 'Mesh场景' ? meshParams : cloudParams
|
|
|
|
const list = type.value === '点云场景' ? meshList : cloudList
|
|
const list = type.value === '点云场景' ? meshList : cloudList
|
|
const currentCount = ++loadCount
|
|
const currentCount = ++loadCount
|
|
fetchScenesAll(params.value).then((data) => {
|
|
fetchScenesAll(params.value).then((data) => {
|
|
- console.log(currentCount, loadCount)
|
|
|
|
|
|
+ console.log('====>', currentCount, loadCount, params.value)
|
|
if (currentCount === loadCount) {
|
|
if (currentCount === loadCount) {
|
|
|
|
|
|
params.value.total = data.total
|
|
params.value.total = data.total
|
|
@@ -152,10 +157,6 @@ const typeFilterScenes = computed(() => {
|
|
return typeScenes;
|
|
return typeScenes;
|
|
});
|
|
});
|
|
|
|
|
|
-watchEffect(() => {
|
|
|
|
- console.log(origin.value, type.value, typeFilterScenes.value)
|
|
|
|
-})
|
|
|
|
-
|
|
|
|
const cache = {} as any
|
|
const cache = {} as any
|
|
|
|
|
|
const selects = ref<Key[]>(selectIds.value);
|
|
const selects = ref<Key[]>(selectIds.value);
|