|
|
|
@ -164,7 +164,7 @@ async function featchList() {
|
|
|
|
|
upname: item.upname,
|
|
|
|
|
ocrPictureclass: item.ocrPictureclass,
|
|
|
|
|
uphead: item.uphead,
|
|
|
|
|
similar: item.similarityscore || 0,
|
|
|
|
|
similar: item.similarityscore || -1,
|
|
|
|
|
imgName: item.imgname
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -203,45 +203,39 @@ async function oneCheck() {
|
|
|
|
|
const asideVal = cloneDeep(configStore.getAsideValue)
|
|
|
|
|
asideVal.izyear = dayjs(asideVal.izyear[0]).format("YYYY/MM/DD") + '-' + dayjs(asideVal.izyear[1]).format("YYYY/MM/DD")
|
|
|
|
|
const tasksLoadingModal = queryRepeatedTasksModalRef.value as any
|
|
|
|
|
const checkingTaskModal = checkingTaskModalRef.value as any
|
|
|
|
|
delete asideVal.izsimilarity
|
|
|
|
|
if (checkDuplicateNo.value) {
|
|
|
|
|
getCheckDuplicateStatus(checkDuplicateNo.value).then((res) => {
|
|
|
|
|
if (res.code === "OK") {
|
|
|
|
|
checkTaskStatus.value = res.data.status // 1.执行中 2.执行完毕
|
|
|
|
|
if (isRefresh.value === false) {
|
|
|
|
|
const modal = packageModalRef.value as any
|
|
|
|
|
modal.showModal()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (checkTaskStatus.value === 2 && isRefresh) {
|
|
|
|
|
checkingTaskModal.closeModal()
|
|
|
|
|
tasksLoadingModal.closeModal()
|
|
|
|
|
isRefresh.value = false
|
|
|
|
|
message.success('任务执行完毕,正在刷新数据...');
|
|
|
|
|
reset()
|
|
|
|
|
loadMore()
|
|
|
|
|
} else if (checkTaskStatus.value === 1) {
|
|
|
|
|
checkingTaskModal.showModal()
|
|
|
|
|
tasksLoadingModal.showModal()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
// 查重任务编号,状态不为空,或者状态执行中..
|
|
|
|
|
if(checkDuplicateNo.value && checkTaskStatus.value && checkTaskStatus.value===1){
|
|
|
|
|
tasksLoadingModal.showModal()
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
checkingTaskModal.showModal()
|
|
|
|
|
tasksLoadingModal.showModal()
|
|
|
|
|
|
|
|
|
|
//调用查重任务开启流程
|
|
|
|
|
oneClickCheckTaskPackage(asideVal).then((res) => {
|
|
|
|
|
if (res.code === "OK") {
|
|
|
|
|
checkDuplicateNo.value = res.data.checkDuplicateNo
|
|
|
|
|
checkTaskStatus.value = res.data.status
|
|
|
|
|
tasksLoadingModal.showModal()
|
|
|
|
|
} else {
|
|
|
|
|
message.error(res.message || '查重失败')
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 显示添加任务包
|
|
|
|
|
*/
|
|
|
|
|
async function showAddPackage() {
|
|
|
|
|
const modal = packageModalRef.value as any
|
|
|
|
|
modal.showModal()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//查重任务加载提示框,关闭回调
|
|
|
|
|
async function tasksLoadingCloseCallback() {
|
|
|
|
|
const checkingTaskModal = checkingTaskModalRef.value as any
|
|
|
|
|
checkingTaskModal.showModal()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function showLoginSuccessModal() {
|
|
|
|
|
const modal = LoginSuccessModalRef.value as any
|
|
|
|
|
// modal.showModal()
|
|
|
|
@ -260,6 +254,9 @@ async function commitHandler(settingParam) {
|
|
|
|
|
message.success(res.data);
|
|
|
|
|
modal.closeModal()
|
|
|
|
|
finishModal.showModal()
|
|
|
|
|
//清空查重任务状态和编号
|
|
|
|
|
checkDuplicateNo.value='';
|
|
|
|
|
checkTaskStatus.value = null;
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
const asideVal = configStore.getAsideValue
|
|
|
|
@ -381,13 +378,47 @@ function previewHandler(index: number, event: MouseEvent) {
|
|
|
|
|
if (imageRef.value?.[index] && (imageRef.value[index] as any).src)
|
|
|
|
|
(imageRef.value?.[index] as any).mergedOnClick();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 检查查重状态
|
|
|
|
|
*/
|
|
|
|
|
function refresh(val) {
|
|
|
|
|
oneCheck()
|
|
|
|
|
// delete asideVal.izsimilarity
|
|
|
|
|
const checkingTaskModal = checkingTaskModalRef.value as any
|
|
|
|
|
if (checkDuplicateNo.value) {
|
|
|
|
|
getCheckDuplicateStatus(checkDuplicateNo.value).then((res) => {
|
|
|
|
|
if (res.code === "OK") {
|
|
|
|
|
checkTaskStatus.value = res.data.status // 1.执行中 2.执行完毕
|
|
|
|
|
// if (isRefresh.value === false) {
|
|
|
|
|
// const modal = packageModalRef.value as any
|
|
|
|
|
// modal.showModal()
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (checkTaskStatus.value === 2 && isRefresh) {
|
|
|
|
|
checkingTaskModal.closeModal()
|
|
|
|
|
isRefresh.value = false
|
|
|
|
|
message.success('任务执行完毕,正在刷新数据...');
|
|
|
|
|
reset()
|
|
|
|
|
loadMore()
|
|
|
|
|
} else if (checkTaskStatus.value === 1) {
|
|
|
|
|
// checkingTaskModal.showModal()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 取消查重任务
|
|
|
|
|
*/
|
|
|
|
|
function cancel(val) {
|
|
|
|
|
if (checkTaskStatus.value === 1) {
|
|
|
|
|
removeCheckDuplicate(checkDuplicateNo.value).then((res) => {
|
|
|
|
|
if (res.code === "OK") {
|
|
|
|
|
checkDuplicateNo.value='';
|
|
|
|
|
checkTaskStatus.value = null;
|
|
|
|
|
message.success("查重任务取消成功")
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -406,17 +437,17 @@ function cancel(val) {
|
|
|
|
|
<SvgIcon v-show="checkTaskStatus !== 2" style="cursor: pointer;" size="105" name="yijianchachong"
|
|
|
|
|
@click="oneCheck" />
|
|
|
|
|
<SvgIcon v-show="checkTaskStatus === 2" style="cursor: pointer;" size="105" name="shengchengrenwubao"
|
|
|
|
|
@click="oneCheck" />
|
|
|
|
|
@click="showAddPackage" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrapper-content">
|
|
|
|
|
<div style="display: flex;justify-content: space-between;">
|
|
|
|
|
<div class="form">
|
|
|
|
|
<n-popselect v-model:value="timeRange" :options="timeOptions" trigger="click">
|
|
|
|
|
<!-- <n-popselect v-model:value="timeRange" :options="timeOptions" trigger="click">
|
|
|
|
|
<div class="dropdown">
|
|
|
|
|
<span>{{ timeLabel || '请选择' }}</span>
|
|
|
|
|
<SvgIcon class="gap" name="arrow-botton" size="14" />
|
|
|
|
|
</div>
|
|
|
|
|
</n-popselect>
|
|
|
|
|
</n-popselect> -->
|
|
|
|
|
<n-popselect v-model:value="viewMode" :options="viewOptions" trigger="click">
|
|
|
|
|
<div class="dropdown">
|
|
|
|
|
<!-- <span>{{ viewLabel || '请选择' }}</span> -->
|
|
|
|
@ -449,7 +480,7 @@ function cancel(val) {
|
|
|
|
|
<n-image class="img" :img-props="{ onClick: hideDownload }"
|
|
|
|
|
:class="{ 'img-fit': viewMode === 'horizontalVersion', 'img-full': viewMode === '3:4' || viewMode === 'verticalVersion' }"
|
|
|
|
|
:preview-src="item.imgUrl" :src="item.thumburl" ref="imageRef" />
|
|
|
|
|
<div class="percent">
|
|
|
|
|
<div class="percent" v-if="item.simila!=-1">
|
|
|
|
|
<SvgIcon size="42" name="tag" />
|
|
|
|
|
<div class="val">
|
|
|
|
|
{{ `${item.similar}%` }}
|
|
|
|
@ -484,7 +515,7 @@ function cancel(val) {
|
|
|
|
|
</div>
|
|
|
|
|
<PackageSettingsModal ref="packageModalRef" @commit="commitHandler" />
|
|
|
|
|
<GeneratePackageModal ref="generateModalRef" />
|
|
|
|
|
<QueryRepeatedTasksModal ref="queryRepeatedTasksModalRef" />
|
|
|
|
|
<QueryRepeatedTasksModal ref="queryRepeatedTasksModalRef" @closeCallback="tasksLoadingCloseCallback"/>
|
|
|
|
|
<LoginSuccessModal ref="LoginSuccessModalRef" />
|
|
|
|
|
<FinishPackageModal ref="finishPackageModal" />
|
|
|
|
|
<CheckingTaskModal ref="checkingTaskModalRef" @refresh="refresh" @cancel="cancel" />
|
|
|
|
|