feat:一键查重状态

pull/292/head
lihui_ocr 1 year ago
parent a2021ffa48
commit de0a9ad60c

@ -282,3 +282,29 @@ export async function getFilterList(params) {
params, params,
}) })
} }
/**
* id
* @param
* @returns
*/
export async function getLastCheckNox() {
return http.request({
url: `/ocr/checkDuplicate/getLastCheckNo`,
method: 'get',
})
}
/**
* id
* @param
* @returns
*/
export async function getCheckDuplicateStatusx(params) {
return http.request({
url: `/ocr/checkDuplicate/getCheckDuplicateStatus`,
method: 'get',
params
})
}

@ -49,8 +49,9 @@ import {
oneClickCheckTaskPackage, oneClickCheckTaskPackage,
queryPageListByCheckNo, queryPageListByCheckNo,
removeCheckDuplicate, removeCheckDuplicate,
getCheckDuplicateStatusx
} from '@/api/home/main' } from '@/api/home/main'
import {getLastCheckNox} from "@/api/home/main"
import bgLoading from '@/assets/images/bg-loading.png' import bgLoading from '@/assets/images/bg-loading.png'
const listData = ref<any[]>([]) const listData = ref<any[]>([])
@ -77,6 +78,7 @@ const finishPackageModal = ref(null)
const loading = ref(false) const loading = ref(false)
const message = useMessage() const message = useMessage()
const totalCount = ref(0) const totalCount = ref(0)
const sortBy: PictureSortParam = { const sortBy: PictureSortParam = {
orderbyname: 'desc', orderbyname: 'desc',
orderbyvalue: 'pictureResult', orderbyvalue: 'pictureResult',
@ -105,7 +107,17 @@ const listStyle = computed(() => {
height: `${deviceHeight.value}px`, height: `${deviceHeight.value}px`,
} }
}) })
async function init() {
let result = await getLastCheckNox()
console.log(result.data)
if(result.data){
let res=await getCheckDuplicateStatusx({checkDuplicateNo:result.data})
if(res.data.status==1){
const checkingTaskModal = checkingTaskModalRef.value as any
checkingTaskModal.showModal()
}
}
}
// const layout = debounce(() => { // const layout = debounce(() => {
// if (masonryRef.value == null || el.value == null) // if (masonryRef.value == null || el.value == null)
// return // return
@ -158,6 +170,7 @@ onBeforeMount(async () => {
}) })
onUpdated(() => { onUpdated(() => {
init()
// nextTick(() => { // nextTick(() => {
// setTimeout(() => { // setTimeout(() => {
// layout() // layout()

@ -36,4 +36,7 @@ useKeydown('enter', closeLoginModal)
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
} }
::v-deep .aside{
height: 854px !important;
}
</style> </style>

@ -37,6 +37,8 @@ import { formatToDateHMS } from '@/utils/dateUtil'
import { hideDownload } from '@/utils/image' import { hideDownload } from '@/utils/image'
import bgLoading from '@/assets/images/bg-loading.png' import bgLoading from '@/assets/images/bg-loading.png'
import { useKeydown } from '@/hooks/event/useKeydown' import { useKeydown } from '@/hooks/event/useKeydown'
import CheckingTaskModal from '@/views/home/content/modal/CheckingTaskModal.vue'
import {getLastCheckNox,removeCheckDuplicate,getCheckDuplicateStatus,getCheckDuplicateStatusx} from "@/api/home/main"
const emit = defineEmits(['setAsideItemName']) const emit = defineEmits(['setAsideItemName'])
const HeaderStore=useDataHeaderStore() const HeaderStore=useDataHeaderStore()
@ -61,6 +63,9 @@ const isDetail = ref(false) // 是否是详情
const finalStore = useFinal() const finalStore = useFinal()
const imgbigshow = ref(true) const imgbigshow = ref(true)
const imgdetailref=ref(null) const imgdetailref=ref(null)
const checkingTaskModalRef = ref(null)
const checkTaskStatus = ref(null) // 1. 2. 3.
const checkDuplicateNo = ref('')
const sortBy: any = { const sortBy: any = {
orderType: 'desc', orderType: 'desc',
orderName: 'similarityScore', orderName: 'similarityScore',
@ -116,6 +121,16 @@ const fullscreenStylestwo = computed<any>(() => ({
left: isFullScreen.value ? '0' : '', left: isFullScreen.value ? '0' : '',
zIndex: isFullScreen.value ? '160' : '', zIndex: isFullScreen.value ? '160' : '',
})) }))
async function init() {
let result = await getLastCheckNox()
if(result.data){
let res=await getCheckDuplicateStatusx({checkDuplicateNo:result.data})
if(res.data.status==1){
const checkingTaskModal = checkingTaskModalRef.value as any
checkingTaskModal.showModal()
}
}
}
onMounted(() => { onMounted(() => {
if (route.query.id) { if (route.query.id) {
taskId.value = route.query.id taskId.value = route.query.id
@ -123,9 +138,8 @@ onMounted(() => {
taskIndex.value = route.query.taskindex as string taskIndex.value = route.query.taskindex as string
isDetail.value = true isDetail.value = true
getDetail() getDetail()
} }
init()
window.addEventListener('keydown', onEsc) window.addEventListener('keydown', onEsc)
}) })
@ -673,6 +687,24 @@ function nopassfun(e){
singleRejectHandlex([imgdetailref.value?.taskDetailInfo]) singleRejectHandlex([imgdetailref.value?.taskDetailInfo])
} }
/**
* 检查查重状态
*/
/**
* 取消查重任务
*/
function cancel() {
if (checkTaskStatus.value === 1) {
removeCheckDuplicate(checkDuplicateNo.value).then((res) => {
if (res.code === 'OK') {
checkDuplicateNo.value = ''
checkTaskStatus.value = null
message.success('查重任务取消成功')
}
})
}
}
</script> </script>
<template> <template>
@ -1310,6 +1342,7 @@ function nopassfun(e){
<CustomSettingModal ref="CustomSettingModalRef" @on-ok="getDetail" /> <CustomSettingModal ref="CustomSettingModalRef" @on-ok="getDetail" />
<img-detail-modal ref="imgdetailref" @passfun="passfun" @nopassfun="nopassfun"/> <img-detail-modal ref="imgdetailref" @passfun="passfun" @nopassfun="nopassfun"/>
<MapModal ref="MapModalRef"/> <MapModal ref="MapModalRef"/>
<CheckingTaskModal ref="checkingTaskModalRef" @cancel="cancel" />
</div> </div>
</template> </template>
@ -1396,8 +1429,9 @@ function nopassfun(e){
flex: 1; flex: 1;
flex-direction: column; flex-direction: column;
box-sizing: border-box; box-sizing: border-box;
margin-left: 16px;
margin-right: 16px !important; margin-right: 16px !important;
margin-left: 16px !important;
margin-bottom: 16px !important;
padding: 16px 16px 0px 16px; padding: 16px 16px 0px 16px;
background: #fff; background: #fff;
border-radius: 3px; border-radius: 3px;

@ -32,6 +32,10 @@ function setAsideItemName(text) {
:deep(.wrapper){ :deep(.wrapper){
top:0 top:0
} }
:deep(.aside){
margin-right: 0;
margin-bottom: 16px;
}
:deep(.ip_box){ :deep(.ip_box){
z-index: 50; z-index: 50;
} }
@ -46,6 +50,6 @@ function setAsideItemName(text) {
flex-direction: row; flex-direction: row;
box-sizing: border-box; box-sizing: border-box;
width: 100%; width: 100%;
margin-bottom: 16px;
} }
</style> </style>

@ -227,15 +227,16 @@ defineExpose({
<div <div
v-for="(item, index) in taskTableData" v-for="(item, index) in taskTableData"
:key="index" :key="index"
:style="{ width: '100%' }" :style="{ width: '100%', fontWeight: '450', }"
> >
<div <div
v-if="item[0].label == '拜访终端名称'" v-if="item[0].label == '拜访终端名称'"
:style="{ display: 'flex', height: '100%', width: '100%' }" :style="{ display: 'flex', height: '100%', width: '100%' }"
> >
<div <div
:style="{ :style="{
width: '100px', width: '115px',
borderRight: '2px solid', borderRight: '2px solid',
marginTop: '4px', marginTop: '4px',
color:'#333333', color:'#333333',
@ -252,11 +253,13 @@ defineExpose({
paddingTop: '2px', paddingTop: '2px',
color:'#333333' , color:'#333333' ,
fontWeight: 'bold', fontWeight: 'bold',
overflow:'hidden'
}" }"
> >
{{ item[0].value }} <n-ellipsis style="font-weight:550"> {{ item[0].value }}</n-ellipsis>
</div> </div>
</div> </div>
<div v-if="!(item[0].label == '拜访终端名称')" class="viewlabel"> <div v-if="!(item[0].label == '拜访终端名称')" class="viewlabel">
{{ item[0].label }} {{ item[0].label }}
</div> </div>

@ -30,6 +30,8 @@ import type { ApprovalParam, SimilarityPictureSortParam } from '/#/api'
import bgLoading from '@/assets/images/bg-loading.png' import bgLoading from '@/assets/images/bg-loading.png'
import { useKeydown } from '@/hooks/event/useKeydown' import { useKeydown } from '@/hooks/event/useKeydown'
import { useDataHeaderStore } from '@/store/modules/DataHeader' import { useDataHeaderStore } from '@/store/modules/DataHeader'
import CheckingTaskModal from '@/views/home/content/modal/CheckingTaskModal.vue'
import {getLastCheckNox,removeCheckDuplicate,getCheckDuplicateStatus,getCheckDuplicateStatusx} from "@/api/home/main"
const batch = ref(false) // const batch = ref(false) //
const selectItems = ref<any[]>([]) const selectItems = ref<any[]>([])
@ -41,7 +43,9 @@ const bgLoadingImg = ref(bgLoading)
const imgbigshow = ref(true) const imgbigshow = ref(true)
const isInitLoading = ref(0) const isInitLoading = ref(0)
const haeaderstore=useDataHeaderStore() const haeaderstore=useDataHeaderStore()
const checkingTaskModalRef = ref(null)
const checkTaskStatus = ref(null) // 1. 2. 3.
const checkDuplicateNo = ref('')
function changeimgbigshow() { function changeimgbigshow() {
imgbigshow.value = !imgbigshow.value imgbigshow.value = !imgbigshow.value
} }
@ -375,12 +379,23 @@ useKeydown('k k', () => {
}) })
useKeydown('right', forwardHandler) useKeydown('right', forwardHandler)
useKeydown('left', backHandler) useKeydown('left', backHandler)
async function init() {
let result = await getLastCheckNox()
if(result.data){
let res=await getCheckDuplicateStatusx({checkDuplicateNo:result.data})
if(res.data.status==1){
const checkingTaskModal = checkingTaskModalRef.value as any
checkingTaskModal.showModal()
}
}
}
onUnmounted(() => { onUnmounted(() => {
workStore.reset() workStore.reset()
document.removeEventListener('keydown', onEsc) document.removeEventListener('keydown', onEsc)
}) })
onMounted(() => { onMounted(() => {
document.addEventListener('keydown', onEsc) document.addEventListener('keydown', onEsc)
init()
}) })
function immersionHandler() { function immersionHandler() {
// class="wrapper" // class="wrapper"
@ -601,6 +616,24 @@ function handleRejectdubiousfileyd(pictureid) {
onNegativeClick: () => {}, onNegativeClick: () => {},
}) })
} }
/**
* 检查查重状态
*/
/**
* 取消查重任务
*/
function cancel() {
if (checkTaskStatus.value === 1) {
removeCheckDuplicate(checkDuplicateNo.value).then((res) => {
if (res.code === 'OK') {
checkDuplicateNo.value = ''
checkTaskStatus.value = null
message.success('查重任务取消成功')
}
})
}
}
// //
function onRejectDialog(visible) { function onRejectDialog(visible) {
rejectDialog.value = visible rejectDialog.value = visible
@ -773,19 +806,19 @@ defineExpose({
> >
<SvgIcon <SvgIcon
v-if="[1].includes(taskDetailInfo.historyStates)" v-if="[1].includes(taskDetailInfo.historyStates)"
style="cursor: pointer; margin-left: 10px" style="cursor: pointer;"
name="t1" name="t1"
@click.stop="handleApproveMainImage" @click.stop="handleApproveMainImage"
/> />
<SvgIcon <SvgIcon
v-if="[1].includes(taskDetailInfo.historyStates)" v-if="[1].includes(taskDetailInfo.historyStates)"
style="cursor: pointer; margin-left: 30px" style="cursor: pointer;"
name="t2" name="t2"
@click.stop="handleRejectMainImage" @click.stop="handleRejectMainImage"
/> />
<SvgIcon <SvgIcon
v-if="[1].includes(taskDetailInfo.historyStates)" v-if="[1].includes(taskDetailInfo.historyStates)"
style="cursor: pointer; margin-left: 20px; margin-right:10px" style="cursor: pointer; "
name="t9" name="t9"
@click.stop="handleRejectdubiousfileyd(taskDetailInfo.id)" @click.stop="handleRejectdubiousfileyd(taskDetailInfo.id)"
/> />
@ -943,20 +976,21 @@ defineExpose({
<div v-show="overTask && overTask.id === item.id" class="action" <div v-show="overTask && overTask.id === item.id" class="action"
:style="item?.historyStates === 2||item?.historyStates ===3?'background:transparent':''"> :style="item?.historyStates === 2||item?.historyStates ===3?'background:transparent':''">
<SvgIcon <SvgIcon
v-if="item.historyStates === 1" v-if="item.historyStates === 1"
style="cursor: pointer; margin-left: 10px" style="cursor: pointer;width:50px;height:50px"
name="t1" name="t1"
@click.stop="approvalHandler" @click.stop="approvalHandler"
/> />
<SvgIcon <SvgIcon
v-if="[1].includes(item.historyStates)" v-if="[1].includes(item.historyStates)"
style="cursor: pointer; margin-left: 30px" style="cursor: pointer;width:50px;height:50px "
name="t2" name="t2"
@click.stop="singleRejectHandler(item)" @click.stop="singleRejectHandler(item)"
/> />
<SvgIcon <SvgIcon
v-if="[1].includes(item.historyStates)" v-if="[1].includes(item.historyStates)"
style="cursor: pointer; margin-left: 20px; margin-right:10px" style="cursor: pointer;width:50px;height:50px "
name="t9" name="t9"
@click.stop="handleRejectdubiousfileyd(item.pictureid)" @click.stop="handleRejectdubiousfileyd(item.pictureid)"
/> />
@ -983,6 +1017,7 @@ defineExpose({
@show="onRejectDialog" @show="onRejectDialog"
@success="reloadDetailInfo" @success="reloadDetailInfo"
/> />
<CheckingTaskModal ref="checkingTaskModalRef" @cancel="cancel" />
</div> </div>
</template> </template>
@ -1177,7 +1212,9 @@ defineExpose({
display: flex; display: flex;
border-radius: 8px; border-radius: 8px;
align-items: center; align-items: center;
justify-content: center; // justify-content: center;
display: flex;
justify-content: space-around;
background: linear-gradient( background: linear-gradient(
180deg, 180deg,
rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 0%,
@ -1488,7 +1525,7 @@ defineExpose({
display: flex; display: flex;
border-radius: 8px; border-radius: 8px;
align-items: center; align-items: center;
justify-content: center; justify-content: space-around;
background: linear-gradient(180deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.44) 88%); background: linear-gradient(180deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.44) 88%);
} }
} }

Loading…
Cancel
Save