@@ -831,14 +848,14 @@ defineExpose({
src="@/assets/images/task/btn-not-pass.png"
alt=""
@click.stop="batchReject"
- />
+ >

+ >
diff --git a/src/views/task/modal/BatchModal.vue b/src/views/task/modal/BatchModal.vue
index b2d1393..0cd380b 100644
--- a/src/views/task/modal/BatchModal.vue
+++ b/src/views/task/modal/BatchModal.vue
@@ -5,8 +5,10 @@ import { useInfiniteScroll } from '@vueuse/core'
import { debounce } from 'lodash-es'
import imagesloaded from 'imagesloaded'
import { useMessage } from 'naive-ui'
+import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
+import { getViewportOffset, off, on } from '@/utils/domUtils'
+
import { timeOptions, viewOptions } from '@/config/home'
-import { off, on } from '@/utils/domUtils'
import { useTask } from '@/store/modules/task'
import { TASK_STATUS_OBJ } from '@/enums/index'
import { formatToDateHMS } from '@/utils/dateUtil'
@@ -43,6 +45,7 @@ const viewLabel = computed(() => {
return item?.label
})
+const deviceHeight = ref(600)
const taskStore = useTask()
const masonryRef = ref
(null)
@@ -64,6 +67,14 @@ const sortBy: any = {
const batch = ref(false)
let _imagesload: any
const message = useMessage()
+async function computeListHeight() {
+ const headEl = document.querySelector('.wrapper-content')!
+ const { bottomIncludeBody } = getViewportOffset(headEl)
+ const height = bottomIncludeBody
+ deviceHeight.value = height - 40 - 16 - 24
+}
+
+useWindowSizeFn(computeListHeight)
const layout = debounce(() => {
if (!show.value)
@@ -74,6 +85,7 @@ const layout = debounce(() => {
_masonry = new Masonry(masonryRef.value as any, {
itemSelector: '.grid-item',
+ gutter: 17,
columnWidth: 214,
percentPosition: true,
stagger: 10,
@@ -208,9 +220,9 @@ function upHandler(event: MouseEvent) {
start = null
}
-const gridHeight = computed(() => {
- return viewMode.value !== 'masonry' ? '157px' : ''
-})
+// const gridHeight = computed(() => {
+// return viewMode.value !== 'masonry' ? '157px' : ''
+// })
function addListeners() {
selectionBox = document.querySelector('.selection-box') as HTMLDivElement
@@ -346,6 +358,12 @@ watch(() => taskStore.activeId, async (newValue, oldValue) => {
refreshHandler()
})
+const listStyle = computed(() => {
+ return {
+ height: `${deviceHeight.value}px`,
+ }
+})
+
function switchBatch() {
setBatch(!batch.value)
}
@@ -363,19 +381,19 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') {
refreshHandler()
}
-// const gridHeight = computed(() => {
-// let height = ''
-// if (viewMode.value === 'masonry')
-// height = ''
-// else if (viewMode.value === 'horizontalVersion')
-// height = '145px'
-// else if (viewMode.value === 'verticalVersion')
-// height = '300px'
-// else if (viewMode.value === '3:4')
-// height = '240px'
-
-// return height
-// })
+const gridHeight = computed(() => {
+ let height = ''
+ if (viewMode.value === 'masonry')
+ height = ''
+ else if (viewMode.value === 'horizontalVersion')
+ height = '122px'
+ else if (viewMode.value === 'verticalVersion')
+ height = '300px'
+ else if (viewMode.value === '3:4')
+ height = '240px'
+
+ return height
+})
defineExpose({
showModal,
@@ -505,51 +523,57 @@ defineExpose({
-