Merge branch 'jie' into main

pull/1/head
lizijiee 1 year ago
commit a68b6f5a5e

6
components.d.ts vendored

@ -21,10 +21,8 @@ declare module 'vue' {
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
NDivider: typeof import('naive-ui')['NDivider']
NDropdown: typeof import('naive-ui')['NDropdown']
NEmpty: typeof import('naive-ui')['NEmpty']
NForm: typeof import('naive-ui')['NForm']
NFormItem: typeof import('naive-ui')['NFormItem']
NGi: typeof import('naive-ui')['NGi']
NGrid: typeof import('naive-ui')['NGrid']
NGridItem: typeof import('naive-ui')['NGridItem']
NImage: typeof import('naive-ui')['NImage']
@ -41,11 +39,7 @@ declare module 'vue' {
NSpace: typeof import('naive-ui')['NSpace']
NSpin: typeof import('naive-ui')['NSpin']
NSwitch: typeof import('naive-ui')['NSwitch']
NTabPane: typeof import('naive-ui')['NTabPane']
NTabs: typeof import('naive-ui')['NTabs']
NTag: typeof import('naive-ui')['NTag']
NTimeline: typeof import('naive-ui')['NTimeline']
NTimelineItem: typeof import('naive-ui')['NTimelineItem']
NTooltip: typeof import('naive-ui')['NTooltip']
NUpload: typeof import('naive-ui')['NUpload']
NUploadDragger: typeof import('naive-ui')['NUploadDragger']

@ -153,6 +153,20 @@ export async function oneClickCheck(params: Partial<CheckParam> = { search_histo
headers: { 'Content-Type': ContentTypeEnum.FORM_DATA },
})
}
/**
*
* @param note
* @returns
*/
export async function removeCheckDuplicate(checkDuplicateNo) {
return http.request({
url: `/ocr/checkDuplicate/removeCheckDuplicate`,
method: 'get',
params: { checkDuplicateNo },
headers: { 'Content-Type': ContentTypeEnum.FORM_DATA },
})
}
/**
*
* @param

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>关闭</title>
<defs>
<rect id="path-1" x="0" y="0" width="64" height="64"></rect>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-2512.000000, -4463.000000)">
<g id="关闭" transform="translate(2512.000000, 4463.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<g id="编组-39" mask="url(#mask-2)">
<g transform="translate(8.000000, 8.000000)">
<rect id="矩形" fill="none" x="0" y="0" width="48" height="48"></rect>
<path d="M6.69150312,3.16140864 L23.9995365,20.4685365 L41.3084969,3.16140864 C41.6628011,2.80710441 42.2203082,2.77985024 42.6058744,3.07964613 L42.6984668,3.16140864 L44.8385914,5.30153325 C45.2224209,5.68536283 45.2224209,6.30767353 44.8385914,6.69150312 L44.8385914,6.69150312 L27.5295365,23.9995365 L44.8385914,41.3084969 C45.2224209,41.6923265 45.2224209,42.3146372 44.8385914,42.6984668 L42.6984668,44.8385914 C42.3146372,45.2224209 41.6923265,45.2224209 41.3084969,44.8385914 L23.9995365,27.5295365 L6.69150312,44.8385914 C6.33719889,45.1928956 5.77969181,45.2201498 5.3941256,44.9203539 L5.30153325,44.8385914 L3.16140864,42.6984668 C2.77757906,42.3146372 2.77757906,41.6923265 3.16140864,41.3084969 L3.16140864,41.3084969 L20.4685365,23.9995365 L3.16140864,6.69150312 C2.77757906,6.30767353 2.77757906,5.68536283 3.16140864,5.30153325 L5.30153325,3.16140864 C5.68536283,2.77757906 6.30767353,2.77757906 6.69150312,3.16140864 Z" id="形状结合" fill="#666666" fill-rule="evenodd"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>展开</title>
<defs>
<rect id="path-1" x="0" y="0" width="64" height="64"></rect>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-2512.000000, -2179.000000)">
<g id="展开-2" transform="translate(2512.000000, 2179.000000)">
<g id="展开" transform="translate(32.000000, 32.000000) scale(-1, 1) rotate(-270.000000) translate(-32.000000, -32.000000) ">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<g id="编组" mask="url(#mask-2)" fill="#666666">
<g transform="translate(32.398318, 32.358039) scale(-1, 1) translate(-32.398318, -32.358039) translate(18.781652, 8.065215)" id="形状结合">
<path d="M7.27477106e-13,24.1889844 C0.0208813961,23.5597929 0.271458149,22.9368064 0.75173026,22.4565343 L0.75173026,22.4565343 L1.10421929,22.1040453 C1.1915415,22.0167231 1.28358153,21.9369941 1.3795189,21.8648584 L22.8677171,0.376576996 C23.3698198,-0.125525665 24.183889,-0.125525665 24.6859917,0.376576996 L26.8567553,2.54734061 C27.358858,3.04944327 27.358858,3.86351253 26.8567553,4.36561519 L6.929,24.293 L26.8567553,44.2200322 C27.3253845,44.6886613 27.3566264,45.429048 26.9504812,45.9339115 L26.8567553,46.0383067 L24.6859917,48.2090704 C24.183889,48.711173 23.3698198,48.711173 22.8677171,48.2090704 L22.8677171,48.2090704 L1.37441953,26.7169448 C1.28031918,26.6458236 1.18999323,26.567376 1.10421929,26.4816021 L0.75173026,26.129113 C0.271458149,25.6488409 0.0208813961,25.0258544 -1.7706149e-13,24.3966629 Z" transform="translate(13.616666, 24.292824) scale(1, -1) translate(-13.616666, -24.292824) "></path>
</g>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>刷新</title>
<defs>
<rect id="path-1" x="0" y="0" width="64" height="64"></rect>
</defs>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="PrevailCloud-Design-图标集" transform="translate(-664.000000, -4776.000000)">
<g id="刷新" transform="translate(664.000000, 4776.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<g id="编组" mask="url(#mask-2)" fill="#666666">
<g transform="translate(6.995021, 6.975001)" id="形状结合">
<path d="M49.0099572,25.0249986 C49.5622419,25.0249986 50.0099572,25.4727138 50.0099572,26.0249986 L50.0099572,26.0259985 L49.9999581,26.2615845 C49.3553776,39.5080844 38.4112759,50.0499972 25.0049786,50.0499972 C16.58645,50.0499972 9.13882756,45.8930539 4.60277334,39.5198292 L1.67101425,41.8104464 C1.58334606,41.8789403 1.47533829,41.9162394 1.36408594,41.9164402 C1.08794402,41.9169386 0.863682725,41.6934854 0.863184328,41.4173435 L0.863184328,41.4173435 L0.844095019,30.8407325 C0.844020336,30.7993536 0.849082518,30.7581254 0.859165449,30.7179937 C0.92645382,30.4501749 1.19811182,30.2876129 1.46593058,30.3549013 L1.46593058,30.3549013 L11.7237529,32.9321374 C11.831652,32.9592466 11.927428,33.0215672 11.9959219,33.1092354 C12.1659321,33.3268385 12.1273504,33.6410613 11.9097473,33.8110715 L11.9097473,33.8110715 L8.56747628,36.4214918 C12.1791746,41.6209567 18.1945483,45.0249986 25.0049786,45.0249986 C35.7054956,45.0249986 44.4432922,36.6215932 44.9789547,26.0541959 L44.979571,26.0259985 L44.9811223,26.0259985 L44.9811223,26.0249986 C44.9811223,25.4727138 45.4288375,25.0249986 45.9811223,25.0249986 L49.0099572,25.0249986 Z M25.0049786,0 C33.321686,0 40.6908312,4.05699588 45.2413203,10.2998936 L47.905662,8.06524095 C47.9908864,7.99372921 48.0975266,7.95268339 48.2087042,7.94860007 C48.4846605,7.93846476 48.7165836,8.15395526 48.7267189,8.42991158 L48.7267189,8.42991158 L49.114915,18.9994134 C49.1164337,19.0407645 49.1128135,19.0821442 49.1041373,19.1226034 C49.0462366,19.3926073 48.7804175,19.564551 48.5104135,19.5066503 L48.5104135,19.5066503 L38.1688957,17.2889771 C38.0601163,17.26565 37.9622237,17.2067099 37.8907119,17.1214855 C37.713211,16.9099482 37.740803,16.5945704 37.9523403,16.4170695 L37.9523403,16.4170695 L41.3811509,13.5407149 C37.7629138,8.39075675 31.7770037,5.0249986 25.0049786,5.0249986 C14.2950415,5.0249986 5.55128214,13.4432061 5.02960686,24.0237149 C5.0297706,24.5377427 4.6437421,24.9604992 4.14640425,25.0182704 L4.02978319,25.0249986 L1,25.0249986 C0.487164161,25.0249986 0.0644928393,24.6389584 0.00672773133,24.1416197 L0,24.0249986 L0,24.0239987 C0.525328666,10.6668647 11.5194638,0 25.0049786,0 Z"></path>
</g>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 208 KiB

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { createPackage, getCheckDuplicateStatus, getLastCheckNo, getPictureList, oneClickCheckTaskPackage, queryPageListByCheckNo } from '@/api/home/main'
import { createPackage, getCheckDuplicateStatus, getLastCheckNo, getPictureList, oneClickCheckTaskPackage, queryPageListByCheckNo, removeCheckDuplicate } from '@/api/home/main'
import avatar from '@/assets/images/avatar.jpg'
import { timeOptions, viewOptions } from '@/config/home'
import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
@ -15,6 +15,7 @@ import { cloneDeep, debounce } from 'lodash-es'
import Masonry from 'masonry-layout'
import { useMessage } from 'naive-ui'
import { computed, nextTick, onMounted, onUnmounted, onUpdated, reactive, ref, unref, watch } from 'vue'
import CheckingTaskModal from './modal/CheckingTaskModal.vue'
import FinishPackageModal from './modal/FinishPackageModal.vue'
import GeneratePackageModal from './modal/GeneratePackageModal.vue'
import LoginSuccessModal from './modal/LoginSuccessModal.vue'
@ -37,6 +38,7 @@ const packageModalRef = ref(null)
const generateModalRef = ref(null)
const queryRepeatedTasksModalRef = ref(null)
const LoginSuccessModalRef = ref(null)
const checkingTaskModalRef = ref(null)
const finishPackageModal = ref(null)
const loading = ref(false)
const message = useMessage()
@ -201,6 +203,7 @@ 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) => {
@ -213,11 +216,14 @@ async function oneCheck() {
}
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
}
@ -225,6 +231,7 @@ async function oneCheck() {
})
return
}
checkingTaskModal.showModal()
tasksLoadingModal.showModal()
oneClickCheckTaskPackage(asideVal).then((res) => {
if (res.code === "OK") {
@ -374,6 +381,19 @@ 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()
}
function cancel(val) {
if (checkTaskStatus.value === 1) {
removeCheckDuplicate(checkDuplicateNo.value).then((res) => {
if (res.code === "OK") {
message.success("查重任务取消成功")
}
})
}
}
</script>
<template>
@ -385,9 +405,8 @@ function previewHandler(index: number, event: MouseEvent) {
</div>
<SvgIcon v-show="checkTaskStatus !== 2" style="cursor: pointer;" size="105" name="yijianchachong"
@click="oneCheck" />
<div v-show="checkTaskStatus === 2" style="cursor: pointer;" size="105" name="magnifying" @click="oneCheck">
生成任务包
</div>
<SvgIcon v-show="checkTaskStatus === 2" style="cursor: pointer;" size="105" name="shengchengrenwubao"
@click="oneCheck" />
</div>
<div class="wrapper-content">
<div style="display: flex;justify-content: space-between;">
@ -468,6 +487,7 @@ function previewHandler(index: number, event: MouseEvent) {
<QueryRepeatedTasksModal ref="queryRepeatedTasksModalRef" />
<LoginSuccessModal ref="LoginSuccessModalRef" />
<FinishPackageModal ref="finishPackageModal" />
<CheckingTaskModal ref="checkingTaskModalRef" @refresh="refresh" @cancel="cancel" />
</div>
</template>

@ -0,0 +1,92 @@
<script lang="ts" setup>
import { defineOptions, ref } from 'vue';
import { useRouter } from 'vue-router';
defineOptions({ name: 'ShortcutModal' })
const emit = defineEmits<{
(e: 'refresh', value: any),
(e: 'cancel', value: any)
}>()
const show = ref(false)
const isFold = ref(false)
const router = useRouter()
const cardStyle = {
'width': '29vw',
'--n-padding-bottom': '10px',
'--n-padding-left': '10px',
}
function toggle() {
isFold.value = !isFold.value
}
function showModal() {
show.value = true
}
function closeModal() {
show.value = false
}
function refresh() {
emit('refresh', true)
}
function cancel() {
closeModal()
emit('cancel', true)
}
defineExpose({
showModal,
closeModal
})
</script>
<template>
<div>
<n-modal v-model:show="show" 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;">
<div class="wrapper">
<div class="title">查重进度</div>
<div class="icon-list">
<svg-icon size="20" name="refresh" @click="refresh" style="margin-right: 16px;cursor: pointer;" />
<svg-icon size="20" name="fold" style="margin-right: 16px;cursor: pointer;" @click="toggle"/>
<svg-icon size="20" name="close-none-border" @click="cancel" style="margin-right: 16px;cursor: pointer;"/>
</div>
</div>
<div v-show="!isFold" style="display: flex;background-color: #F9F9F9;height: 54px;margin-top: 24px;margin-bottom: 6px;">
<div><svg-icon size="40" name="robot2" /></div>
<div class="msg">
<div>正在查重中</div>
</div>
</div>
</n-card>
</n-modal>
</div>
</template>
<style lang="less" scoped>
.wrapper{
display: flex;
justify-content: space-between;
border-bottom: 1px solid rgba(0, 0, 0, 0.09);
margin: 0 -18px;
}
.icon-list{
}
.title {
padding-left: 24px;
padding-bottom: 10px;
color: #333333;
font-size: 16px
}
.msg {
text-align: center;
margin-left: 20px;
font-size: 14px;
font-size: 14px;
line-height: 54px;
}
</style>
Loading…
Cancel
Save