|
|
@ -1,13 +1,15 @@
|
|
|
|
<script lang="ts" setup>
|
|
|
|
<script lang="ts" setup>
|
|
|
|
import { computed, onBeforeMount, onMounted, onUpdated, reactive, ref, watch } from 'vue'
|
|
|
|
import { computed, onBeforeMount, onMounted, onUpdated, reactive, ref, watch } from 'vue'
|
|
|
|
import Masonry from 'masonry-layout'
|
|
|
|
import Masonry from 'masonry-layout'
|
|
|
|
|
|
|
|
import { useDialog, useMessage } from 'naive-ui'
|
|
|
|
|
|
|
|
|
|
|
|
import { useInfiniteScroll } from '@vueuse/core'
|
|
|
|
import { useInfiniteScroll } from '@vueuse/core'
|
|
|
|
import { debounce, throttle } from 'lodash-es'
|
|
|
|
import { debounce, throttle } from 'lodash-es'
|
|
|
|
import imagesloaded from 'imagesloaded'
|
|
|
|
import imagesloaded from 'imagesloaded'
|
|
|
|
import { randomInt } from '@/utils/index'
|
|
|
|
import { randomInt } from '@/utils/index'
|
|
|
|
import { timeOptions, viewOptions } from '@/config/home'
|
|
|
|
import { timeOptions, viewOptions } from '@/config/home'
|
|
|
|
import { getPictureList } from '@/api/home/main'
|
|
|
|
import { getPictureList } from '@/api/home/main'
|
|
|
|
import { dubiousfilelist } from '@/api/task/task'
|
|
|
|
import { dubiousfilelist, removeFiles } from '@/api/task/task'
|
|
|
|
|
|
|
|
|
|
|
|
import { off, on } from '@/utils/domUtils'
|
|
|
|
import { off, on } from '@/utils/domUtils'
|
|
|
|
import img1 from '@/assets/images/1.jpg'
|
|
|
|
import img1 from '@/assets/images/1.jpg'
|
|
|
@ -21,6 +23,7 @@ const cardStyle = {
|
|
|
|
'--n-padding-left': '120px',
|
|
|
|
'--n-padding-left': '120px',
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const message = useMessage()
|
|
|
|
const timeRange = ref('all')
|
|
|
|
const timeRange = ref('all')
|
|
|
|
const timeLabel = computed(() => {
|
|
|
|
const timeLabel = computed(() => {
|
|
|
|
const item = timeOptions.find((option) => {
|
|
|
|
const item = timeOptions.find((option) => {
|
|
|
@ -101,19 +104,19 @@ async function featchList() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const result = await dubiousfilelist({ ...pagination, search_month: '', search_history: '0' })
|
|
|
|
const result = await dubiousfilelist({ ...pagination, search_month: '', search_history: '0' })
|
|
|
|
// TODO:测试数据
|
|
|
|
// TODO:测试数据
|
|
|
|
result.data = Array.from({ length: 30 })
|
|
|
|
// result.data = Array.from({ length: 30 })
|
|
|
|
result.pageCount = 1
|
|
|
|
result.pageCount = 1
|
|
|
|
const { data, pageCount } = result
|
|
|
|
const { data, pageCount } = result
|
|
|
|
pagination.pageNo += 1
|
|
|
|
pagination.pageNo += 1
|
|
|
|
canloadMore = pageCount >= pagination.pageNo
|
|
|
|
canloadMore = pageCount >= pagination.pageNo
|
|
|
|
|
|
|
|
return result.data.records
|
|
|
|
const list = data.map((item) => {
|
|
|
|
// const list = data.map((item) => {
|
|
|
|
return {
|
|
|
|
// return {
|
|
|
|
imgUrl: randomUrl(),
|
|
|
|
// imgUrl: randomUrl(),
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
|
|
|
|
// console.log(list)
|
|
|
|
return list
|
|
|
|
// return list
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (error) {
|
|
|
|
catch (error) {
|
|
|
|
return []
|
|
|
|
return []
|
|
|
@ -135,8 +138,8 @@ onUpdated(() => {
|
|
|
|
|
|
|
|
|
|
|
|
onBeforeMount(async () => {
|
|
|
|
onBeforeMount(async () => {
|
|
|
|
console.log(888)
|
|
|
|
console.log(888)
|
|
|
|
const list = await featchList()
|
|
|
|
// const list = await featchList()
|
|
|
|
listData.value = list
|
|
|
|
// listData.value = list
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
let start: { x: number, y: number } | null = null
|
|
|
|
let start: { x: number, y: number } | null = null
|
|
|
@ -234,14 +237,31 @@ onMounted(() => {
|
|
|
|
show.value && addListeners()
|
|
|
|
show.value && addListeners()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
function showModal() {
|
|
|
|
async function showModal() {
|
|
|
|
show.value = true
|
|
|
|
show.value = true
|
|
|
|
|
|
|
|
pagination.pageNo = 1
|
|
|
|
|
|
|
|
const list = await featchList()
|
|
|
|
|
|
|
|
listData.value = list
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function closeModal(event: MouseEvent) {
|
|
|
|
function closeModal(event: MouseEvent) {
|
|
|
|
show.value = false
|
|
|
|
show.value = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async function remove() {
|
|
|
|
|
|
|
|
const arr = listData.value.filter((item) => {
|
|
|
|
|
|
|
|
return item.checked
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (arr.length === 0) {
|
|
|
|
|
|
|
|
message.error('至少选中一个')
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const ids = arr.map(item => item.pictureid).join(',')
|
|
|
|
|
|
|
|
const res = await removeFiles({ pictureid: ids })
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
defineExpose({
|
|
|
|
defineExpose({
|
|
|
|
showModal,
|
|
|
|
showModal,
|
|
|
|
})
|
|
|
|
})
|
|
|
@ -288,7 +308,9 @@ function onCheckChange(val: any, item: any) {
|
|
|
|
</n-popselect>
|
|
|
|
</n-popselect>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
|
<div>移除可疑文件夹</div>
|
|
|
|
<div class="remove" @click="remove">
|
|
|
|
|
|
|
|
移除可疑文件夹
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div class="wrapper-content-form-button">
|
|
|
|
<div class="wrapper-content-form-button">
|
|
|
|
<SvgIcon style="margin-right: 6px;" size="14" name="tf" />
|
|
|
|
<SvgIcon style="margin-right: 6px;" size="14" name="tf" />
|
|
|
|
批量审批
|
|
|
|
批量审批
|
|
|
@ -308,7 +330,7 @@ function onCheckChange(val: any, item: any) {
|
|
|
|
:class="{ 'wrapper-content-item-img-fit': viewMode !== 'masonry' }" :src="item.imgUrl"
|
|
|
|
:class="{ 'wrapper-content-item-img-fit': viewMode !== 'masonry' }" :src="item.imgUrl"
|
|
|
|
> -->
|
|
|
|
> -->
|
|
|
|
<n-image
|
|
|
|
<n-image
|
|
|
|
:src="item.imgUrl"
|
|
|
|
:src="item.imgurl"
|
|
|
|
class="img "
|
|
|
|
class="img "
|
|
|
|
:class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }"
|
|
|
|
:class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
@ -340,6 +362,10 @@ function onCheckChange(val: any, item: any) {
|
|
|
|
/* Standard syntax */
|
|
|
|
/* Standard syntax */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.remove{
|
|
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.close {
|
|
|
|
.close {
|
|
|
|
position: absolute;
|
|
|
|
position: absolute;
|
|
|
|
right: -90px;
|
|
|
|
right: -90px;
|
|
|
|