feat:一键查重状态

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

@ -282,3 +282,29 @@ export async function getFilterList(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,
queryPageListByCheckNo,
removeCheckDuplicate,
getCheckDuplicateStatusx
} from '@/api/home/main'
import {getLastCheckNox} from "@/api/home/main"
import bgLoading from '@/assets/images/bg-loading.png'
const listData = ref<any[]>([])
@ -77,6 +78,7 @@ const finishPackageModal = ref(null)
const loading = ref(false)
const message = useMessage()
const totalCount = ref(0)
const sortBy: PictureSortParam = {
orderbyname: 'desc',
orderbyvalue: 'pictureResult',
@ -105,7 +107,17 @@ const listStyle = computed(() => {
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(() => {
// if (masonryRef.value == null || el.value == null)
// return
@ -158,6 +170,7 @@ onBeforeMount(async () => {
})
onUpdated(() => {
init()
// nextTick(() => {
// setTimeout(() => {
// layout()

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

@ -37,6 +37,8 @@ import { formatToDateHMS } from '@/utils/dateUtil'
import { hideDownload } from '@/utils/image'
import bgLoading from '@/assets/images/bg-loading.png'
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 HeaderStore=useDataHeaderStore()
@ -61,6 +63,9 @@ const isDetail = ref(false) // 是否是详情
const finalStore = useFinal()
const imgbigshow = ref(true)
const imgdetailref=ref(null)
const checkingTaskModalRef = ref(null)
const checkTaskStatus = ref(null) // 1. 2. 3.
const checkDuplicateNo = ref('')
const sortBy: any = {
orderType: 'desc',
orderName: 'similarityScore',
@ -116,6 +121,16 @@ const fullscreenStylestwo = computed<any>(() => ({
left: isFullScreen.value ? '0' : '',
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(() => {
if (route.query.id) {
taskId.value = route.query.id
@ -123,9 +138,8 @@ onMounted(() => {
taskIndex.value = route.query.taskindex as string
isDetail.value = true
getDetail()
}
init()
window.addEventListener('keydown', onEsc)
})
@ -673,6 +687,24 @@ function nopassfun(e){
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>
<template>
@ -1310,6 +1342,7 @@ function nopassfun(e){
<CustomSettingModal ref="CustomSettingModalRef" @on-ok="getDetail" />
<img-detail-modal ref="imgdetailref" @passfun="passfun" @nopassfun="nopassfun"/>
<MapModal ref="MapModalRef"/>
<CheckingTaskModal ref="checkingTaskModalRef" @cancel="cancel" />
</div>
</template>
@ -1396,8 +1429,9 @@ function nopassfun(e){
flex: 1;
flex-direction: column;
box-sizing: border-box;
margin-left: 16px;
margin-right: 16px !important;
margin-left: 16px !important;
margin-bottom: 16px !important;
padding: 16px 16px 0px 16px;
background: #fff;
border-radius: 3px;

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

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

@ -30,6 +30,8 @@ import type { ApprovalParam, SimilarityPictureSortParam } from '/#/api'
import bgLoading from '@/assets/images/bg-loading.png'
import { useKeydown } from '@/hooks/event/useKeydown'
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 selectItems = ref<any[]>([])
@ -41,7 +43,9 @@ const bgLoadingImg = ref(bgLoading)
const imgbigshow = ref(true)
const isInitLoading = ref(0)
const haeaderstore=useDataHeaderStore()
const checkingTaskModalRef = ref(null)
const checkTaskStatus = ref(null) // 1. 2. 3.
const checkDuplicateNo = ref('')
function changeimgbigshow() {
imgbigshow.value = !imgbigshow.value
}
@ -375,12 +379,23 @@ useKeydown('k k', () => {
})
useKeydown('right', forwardHandler)
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(() => {
workStore.reset()
document.removeEventListener('keydown', onEsc)
})
onMounted(() => {
document.addEventListener('keydown', onEsc)
init()
})
function immersionHandler() {
// class="wrapper"
@ -601,6 +616,24 @@ function handleRejectdubiousfileyd(pictureid) {
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) {
rejectDialog.value = visible
@ -773,19 +806,19 @@ defineExpose({
>
<SvgIcon
v-if="[1].includes(taskDetailInfo.historyStates)"
style="cursor: pointer; margin-left: 10px"
style="cursor: pointer;"
name="t1"
@click.stop="handleApproveMainImage"
/>
<SvgIcon
v-if="[1].includes(taskDetailInfo.historyStates)"
style="cursor: pointer; margin-left: 30px"
style="cursor: pointer;"
name="t2"
@click.stop="handleRejectMainImage"
/>
<SvgIcon
v-if="[1].includes(taskDetailInfo.historyStates)"
style="cursor: pointer; margin-left: 20px; margin-right:10px"
style="cursor: pointer; "
name="t9"
@click.stop="handleRejectdubiousfileyd(taskDetailInfo.id)"
/>
@ -943,20 +976,21 @@ defineExpose({
<div v-show="overTask && overTask.id === item.id" class="action"
:style="item?.historyStates === 2||item?.historyStates ===3?'background:transparent':''">
<SvgIcon
v-if="item.historyStates === 1"
style="cursor: pointer; margin-left: 10px"
style="cursor: pointer;width:50px;height:50px"
name="t1"
@click.stop="approvalHandler"
/>
<SvgIcon
v-if="[1].includes(item.historyStates)"
style="cursor: pointer; margin-left: 30px"
style="cursor: pointer;width:50px;height:50px "
name="t2"
@click.stop="singleRejectHandler(item)"
/>
<SvgIcon
v-if="[1].includes(item.historyStates)"
style="cursor: pointer; margin-left: 20px; margin-right:10px"
style="cursor: pointer;width:50px;height:50px "
name="t9"
@click.stop="handleRejectdubiousfileyd(item.pictureid)"
/>
@ -983,6 +1017,7 @@ defineExpose({
@show="onRejectDialog"
@success="reloadDetailInfo"
/>
<CheckingTaskModal ref="checkingTaskModalRef" @cancel="cancel" />
</div>
</template>
@ -1177,7 +1212,9 @@ defineExpose({
display: flex;
border-radius: 8px;
align-items: center;
justify-content: center;
// justify-content: center;
display: flex;
justify-content: space-around;
background: linear-gradient(
180deg,
rgba(0, 0, 0, 0) 0%,
@ -1488,7 +1525,7 @@ defineExpose({
display: flex;
border-radius: 8px;
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%);
}
}

Loading…
Cancel
Save