Merge branch 'main' into shen

pull/1/head
Dragon 1 year ago
commit b3610000b0

@ -23,12 +23,12 @@ export async function getRegionList(params: PageParam = { pageNo: 1, pageSize: 1
*/ */
export async function getPictureTypeList(): Promise<any> { export async function getPictureTypeList(): Promise<any> {
const res = await http.request({ const res = await http.request({
url: `/ocr/ocrPicturetype/rootList`, url: `/static/admin/web/distionary/bytypecode/izpicturetype`,
method: 'get', method: 'get',
}) })
const { data } = res const list = res.data[0].distionaryList
return data return list
} }
/** /**

@ -102,7 +102,8 @@ export async function getTaskDetailPictureList(params: PageParam & PictureSortPa
taskname: item.fromtaskname, taskname: item.fromtaskname,
assignee: item.assignee, assignee: item.assignee,
pictureid: item.pictureid, pictureid: item.pictureid,
imgurl: item.imgUrl, imgurl: item.serverThumbnailUrl,
maxSimilarity: item.maxSimilarity,
thumburl: item.ocrPicture?.serverThumbnailUrl || item.ocrPicture?.imgurl, thumburl: item.ocrPicture?.serverThumbnailUrl || item.ocrPicture?.imgurl,
iztrueorfalse: item.iztrueorfalse, iztrueorfalse: item.iztrueorfalse,
states: item.states, states: item.states,

@ -340,7 +340,7 @@ function removeHandler(id: string, type: "fix" | "unfix") {
<div> <div>
<n-input placeholder="搜索关键字"> <n-input placeholder="搜索关键字">
<template #suffix> <template #suffix>
<SvgIcon size="14px" name="magnifying-1" /> <SvgIcon size="14px" name="magnifying-1" color="#999999" />
</template> </template>
</n-input> </n-input>
<div class="draggable-ul left-wrap"> <div class="draggable-ul left-wrap">
@ -483,6 +483,7 @@ function removeHandler(id: string, type: "fix" | "unfix") {
position: relative; position: relative;
color: #333333; color: #333333;
font-size: 14px; font-size: 14px;
background: #F8F8F8;
&:before { &:before {
background-color: #1980ff; background-color: #1980ff;
@ -562,6 +563,7 @@ function removeHandler(id: string, type: "fix" | "unfix") {
::v-deep(.n-card > .n-card-header .n-card-header__main) { ::v-deep(.n-card > .n-card-header .n-card-header__main) {
font-weight: lighter !important; font-weight: lighter !important;
font-size: 14px; font-size: 14px;
color: #666666;
} }
::v-deep(.n-scrollbar) { ::v-deep(.n-scrollbar) {
border-top: none !important; border-top: none !important;

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

@ -45,7 +45,7 @@ defineExpose({
<template> <template>
<div> <div>
<n-modal v-model:show="show" transform-origin="center" style="position: fixed;right: 0;bottom: 0;"> <n-modal v-model:show="show" :mask-closable="false" transform-origin="center" style="position: fixed;right: 0;bottom: 0;">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true" style="padding: 8px 8px 0 8px;"> <n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true" style="padding: 8px 8px 0 8px;">
<div class="wrapper"> <div class="wrapper">
<div class="title">查重进度</div> <div class="title">查重进度</div>

@ -29,7 +29,7 @@ defineExpose({
<template> <template>
<div> <div>
<n-modal v-model:show="show" transform-origin="center" style="padding: 8px;"> <n-modal v-model:show="show" :mask-closable="false" transform-origin="center" style="padding: 8px;">
<n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true"> <n-card :style="cardStyle" :bordered="false" size="huge" role="dialog" aria-modal="true">
<div style="display: flex;"> <div style="display: flex;">
<div><svg-icon size="80" name="robot2" /></div> <div><svg-icon size="80" name="robot2" /></div>
@ -78,4 +78,5 @@ defineExpose({
color: #666666; color: #666666;
line-height: 22px; line-height: 22px;
} }
</style> </style>

@ -1,6 +1,12 @@
<script lang="ts" setup> <script lang="ts" setup>
import { ref } from 'vue'; import { ref } from 'vue';
const emit = defineEmits<{
(e: 'closeCallback', value: any),
}>()
const show = ref(false) const show = ref(false)
const stys = { const stys = {
@ -20,16 +26,20 @@ function showModal() {
function closeModal() { function closeModal() {
show.value = false show.value = false
emit('closeCallback', true)
} }
defineExpose({ defineExpose({
showModal, showModal,
closeModal, closeModal,
}) })
</script> </script>
<template> <template>
<n-modal v-model:show="show" :mask-closable="false" transform-origin="center"> <n-modal v-model:show="show" :mask-closable="false" transform-origin="center">
<n-card :style="stys" :bordered="false" role="dialog" aria-modal="true"> <n-card :style="stys" :bordered="false" role="dialog" aria-modal="true">
<svg-icon size="15" name="close" @click="closeModal" style="position:absolute; right:6px;top:6px;cursor: pointer;"/> <svg-icon size="15" name="close" @click="closeModal" style="position:absolute; right:6px;top:6px;cursor: pointer;"/>
<div class="wrapper"> <div class="wrapper">
@ -48,4 +58,5 @@ defineExpose({
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
</style> </style>

@ -443,6 +443,7 @@ function previewHandler(event: MouseEvent) {
</div> </div>
</div> </div>
</div> </div>
<n-spin :show="loading"> <n-spin :show="loading">
<div ref="el" class="scroll"> <div ref="el" class="scroll">
<div class="wrapper-detail"> <div class="wrapper-detail">
@ -549,7 +550,7 @@ function previewHandler(event: MouseEvent) {
>图片大小 >图片大小
</span> </span>
<span style=" color: #333333; font-size: 16px" <span style=" color: #333333; font-size: 16px"
>{{ (taskDetailInfo?.pictureInfo?.imgSize /1000).toFixed(2) }}KB</span >{{ taskDetailInfo?.pictureInfo && (taskDetailInfo?.pictureInfo?.imgSize /1000).toFixed(2) }}KB</span
> >
</div> </div>
<div class="property"> <div class="property">
@ -557,7 +558,7 @@ function previewHandler(event: MouseEvent) {
>图片格式 >图片格式
</span> </span>
<span style=" color: #333333; font-size: 16px" <span style=" color: #333333; font-size: 16px"
>{{ taskDetailInfo?.pictureInfo?.imgSpace }}</span >{{ taskDetailInfo?.pictureInfo?.imgFormat }}</span
> >
</div> </div>
<div class="property"> <div class="property">
@ -573,7 +574,7 @@ function previewHandler(event: MouseEvent) {
>色彩空间 >色彩空间
</span> </span>
<span style=" color: #333333; font-size: 16px" <span style=" color: #333333; font-size: 16px"
>{{ taskDetailInfo?.pictureInfo?.imgMeasure }}</span >{{ taskDetailInfo?.pictureInfo?.imgSpace }}</span
> >
</div> </div>
<div class="property"> <div class="property">
@ -653,7 +654,7 @@ function previewHandler(event: MouseEvent) {
<div class="percent"> <div class="percent">
<SvgIcon size="42" name="tag" /> <SvgIcon size="42" name="tag" />
<div class="val"> <div class="val">
{{ getPercent(item.pictureid) }} {{ item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0) }}%
</div> </div>
</div> </div>
<div class="mark"> <div class="mark">
@ -892,7 +893,7 @@ function previewHandler(event: MouseEvent) {
.grid-item { .grid-item {
box-sizing: border-box; box-sizing: border-box;
border-radius: 8px; border-radius: 8px;
padding: 9px 10px; padding: 9px 5px;
position: relative; position: relative;
.img-wrapper { .img-wrapper {

Loading…
Cancel
Save