diff --git a/src/views/task/content/Content.vue b/src/views/task/content/Content.vue index 7b79462..9578709 100644 --- a/src/views/task/content/Content.vue +++ b/src/views/task/content/Content.vue @@ -128,31 +128,30 @@ useKeydown('right', forwardHandler) useKeydown('left', backHandler) useKeydown('p p', () => { const item = taskDetailInfo.value - if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) { - overTask.value = null - return - } + if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) { + overTask.value = null + return + } - if (validate([item]) == null && batch.value === false) - overTask.value = item - // 执行想要的操作 - approvalHandler() + if (validate([item]) == null && batch.value === false) + overTask.value = item + // 执行想要的操作 + approvalHandler() }) useKeydown('x x', () => { const item = taskDetailInfo.value if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) { - overTask.value = null - return - } + overTask.value = null + return + } - if (validate([item]) == null && batch.value === false) - overTask.value = item - // 执行想要的操作 - const modal = unref(notPassModalRef)! as any - modal.showModal([taskDetailInfo.value]) + if (validate([item]) == null && batch.value === false) + overTask.value = item + // 执行想要的操作 + const modal = unref(notPassModalRef)! as any + modal.showModal([taskDetailInfo.value]) }) - function setBatch(value: boolean) { // if (totalCount.value === 0) // return @@ -309,11 +308,11 @@ async function handleDragEnd(event, item) { setBatch(false) getTableData() getImgList() - - }else{ - message.error(res.message) } - + else { + message.error(res.message) + } + taskStore.setInFile(false) taskStore.setInFile(item.pictureId) } @@ -331,11 +330,10 @@ async function addSuspicious() { setBatch(false) getTableData() getImgList() - const searchParams = new URLSearchParams(window.location.search); - const type = searchParams.get('type'); - if(type){ - router.push({ name: 'final', query: { type: type} }) - } + const searchParams = new URLSearchParams(window.location.search) + const type = searchParams.get('type') + if (type) + router.push({ name: 'final', query: { type } }) } else { message.error(res.message) @@ -363,8 +361,8 @@ async function getTableData() { fieldList.forEach((v) => { if (userFieldList.includes(v.name)) { let locationobj = { address: '' } - - if (v.name == 'location'&& taskDetailInfo.value.ocrPicture[v.name]!=null&& taskDetailInfo.value.ocrPicture[v.name]!="null") { + + if (v.name == 'location' && taskDetailInfo.value.ocrPicture[v.name] != null && taskDetailInfo.value.ocrPicture[v.name] != 'null') { locationobj = JSON.parse( taskDetailInfo.value.ocrPicture ? taskDetailInfo.value.ocrPicture[v.name] : {}, ) @@ -427,7 +425,7 @@ function showActionsModal() { onUnmounted(() => { taskStore.reset() - window.removeEventListener('scroll', checkBottom) + window.removeEventListener('scroll', checkBottom) }) function immersionHandler() { @@ -436,7 +434,8 @@ function immersionHandler() { toggleFullScreen() } useKeydown('k k', () => { - if (isFullScreen.value) return + if (isFullScreen.value) + return isFullScreen.value = true fetchData() window.addEventListener('scroll', checkBottom) @@ -499,13 +498,13 @@ function reloadList(param, text) { } function goBack() { - const searchParams = new URLSearchParams(window.location.search); - const type = searchParams.get('type'); - if(type){ - router.push({ name: 'final', query: { type: type} }) - }else{ - router.back() - } + const searchParams = new URLSearchParams(window.location.search) + const type = searchParams.get('type') + if (type) + router.push({ name: 'final', query: { type } }) + + else + router.back() } function switchBatch() { @@ -627,8 +626,8 @@ function sortHandler(orderby: 'similarityScore' | 'createdate') { sortBy.orderType = sortBy.orderType === 'asc' ? 'desc' : 'asc' refreshHandler() } -function nodrage(){ - message.error("已审批无法移入可疑文件夹中!") +function nodrage() { + message.error('已审批无法移入可疑文件夹中!') } @@ -960,8 +959,8 @@ function nodrage(){ class="item" draggable="true" @dragend=" - item.historyStates === 1? handleDragEnd(event, item):nodrage() - + item.historyStates === 1 ? handleDragEnd(event, item) : nodrage() + " >