Merge branch 'test' of https://git.mcnetmart.com/guoxiangbin/ocr-web into fix/suspiciousSort

pull/176/head
raofuzi 1 year ago
commit 6be68c72a5

@ -41,6 +41,9 @@ import emitter from '@/utils/mitt'
import { formatToDateHMS } from '@/utils/dateUtil' import { formatToDateHMS } from '@/utils/dateUtil'
import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter' import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter'
import DataHeader from '@/components/DataHeader/index.vue' import DataHeader from '@/components/DataHeader/index.vue'
import console from 'console'
const emit = defineEmits(['changeShow']) const emit = defineEmits(['changeShow'])
function changeContent() { function changeContent() {
@ -482,6 +485,14 @@ async function query(page: number, pageSize: number, filterId?: any, taskName?:
// 使使 // 使使
let params = filterId ? { userSearchId: filterId } : asideParmas let params = filterId ? { userSearchId: filterId } : asideParmas
params = params?.izshowall ? {} : params params = params?.izshowall ? {} : params
console.log(111,"query函数被调用", {
sortorder: sortorder.value,
pageSize,
currPage: page,
sortname: sortname.value,
taskName,
})
const result = await getFinalList({ const result = await getFinalList({
sortorder: sortorder.value, sortorder: sortorder.value,
pageSize, pageSize,
@ -499,7 +510,6 @@ async function query(page: number, pageSize: number, filterId?: any, taskName?:
} }
async function handleSorterChange(value) { async function handleSorterChange(value) {
console.log(value)
let name = value.columnKey let name = value.columnKey
if (name === 'fromuptime') if (name === 'fromuptime')
name = 'field11' name = 'field11'
@ -582,8 +592,9 @@ const scrollX = computed(() => {
return width return width
}) })
onMounted(() => {
query(pagination.page, pagination.pageSize) query(pagination.page, pagination.pageSize)
})
const customTabelRef = ref(null) const customTabelRef = ref(null)
const importExcelRef = ref(null) const importExcelRef = ref(null)
@ -856,11 +867,11 @@ async function refreshHandler(searchId?: any) {
function filterTableData(keyword) { function filterTableData(keyword) {
pagination.page = 1 pagination.page = 1
pagination.pageSize = 10 pagination.pageSize = 10
if (keyword) if (keyword) {
// tableData.value = tableData.value.filter(item => item.id.includes(keyword))
query(pagination.page, pagination.pageSize, '', keyword) query(pagination.page, pagination.pageSize, '', keyword)
else query(pagination.page, pagination.pageSize) } else { query(pagination.page, pagination.pageSize) }
} }
defineExpose({ defineExpose({
filterTableData, filterTableData,
}) })
@ -871,20 +882,10 @@ defineExpose({
<div class="wrapper-header"> <div class="wrapper-header">
<div class="wrapper-header-left"> <div class="wrapper-header-left">
<span class="wrapper-header-font">任务管理列表</span> <span class="wrapper-header-font">任务管理列表</span>
<SvgIcon <SvgIcon style="cursor: pointer" size="16" name="list-mode" @click="changeContent" />
style="cursor: pointer"
size="16"
name="list-mode"
@click="changeContent"
/>
</div> </div>
<div> <div>
<SvgIcon <SvgIcon style="margin-right: 6px" size="13" name="summary" @click="showModal(repeatModalRef)" />
style="margin-right: 6px"
size="13"
name="summary"
@click="showModal(repeatModalRef)"
/>
<NButton class="xjcc" text @click="showModal(repeatModalRef)"> <NButton class="xjcc" text @click="showModal(repeatModalRef)">
小结查重 小结查重
</NButton> </NButton>
@ -903,29 +904,14 @@ defineExpose({
取消 取消
</NButton> </NButton>
<img <img class="btn-approval btn-left" src="@/assets/images/task/btn-not-pass.png" alt=""
class="btn-approval btn-left" @click.stop="batchReject">
src="@/assets/images/task/btn-not-pass.png"
alt=""
@click.stop="batchReject"
>
<SvgIcon size="24" name="vs" /> <SvgIcon size="24" name="vs" />
<img <img class="btn-approval" src="@/assets/images/task/btn-pass.png" alt="" @click.stop="batchApproval">
class="btn-approval"
src="@/assets/images/task/btn-pass.png"
alt=""
@click.stop="batchApproval"
>
</div> </div>
<n-popover <n-popover ref="popover" :style="{ padding: '0px' }" style="width: 148px" :show-arrow="false"
ref="popover" placement="bottom-start" trigger="click">
:style="{ padding: '0px' }"
style="width: 148px"
:show-arrow="false"
placement="bottom-start"
trigger="click"
>
<template #trigger> <template #trigger>
<div class="icon-wrap"> <div class="icon-wrap">
<SvgIcon size="20" name="more-blue" /> <SvgIcon size="20" name="more-blue" />
@ -965,46 +951,20 @@ defineExpose({
</div> </div>
</div> --> </div> -->
<div class="wrapper-settings"> <div class="wrapper-settings">
<SvgIcon <SvgIcon style="cursor: pointer" size="18" name="column" @click="showModal(customTabelRef)" />
style="cursor: pointer"
size="18"
name="column"
@click="showModal(customTabelRef)"
/>
</div> </div>
<div class="wrapper-content"> <div class="wrapper-content">
<NDataTable <NDataTable id="table" ref="tableRef" v-model:checked-row-keys="checkedRowKeys" remote :columns="columnsRef"
id="table" :scroll-x="scrollX" :max-height="maxHeight" :data="tableData" :loading="loading" :pagination="pagination"
ref="tableRef" :row-key="rowKey" @update:page="handlePageChange" @update-page-size="handlePageSizeChange"
v-model:checked-row-keys="checkedRowKeys" @update:checked-row-keys="handleCheck" @update:sorter="handleSorterChange" />
remote
:columns="columnsRef"
:scroll-x="scrollX"
:max-height="maxHeight"
:data="tableData"
:loading="loading"
:pagination="pagination"
:row-key="rowKey"
@update:page="handlePageChange"
@update-page-size="handlePageSizeChange"
@update:checked-row-keys="handleCheck"
@update:sorter="handleSorterChange"
/>
</div> </div>
<CustomTabelModal ref="customTabelRef" @commit="commitHandler" /> <CustomTabelModal ref="customTabelRef" @commit="commitHandler" />
<ImportExcelModal <ImportExcelModal ref="importExcelRef" :on-success="sucessHandler" :header-config="headRules" />
ref="importExcelRef"
:on-success="sucessHandler"
:header-config="headRules"
/>
<NotPassed ref="notPassModalRef" @success="reload" /> <NotPassed ref="notPassModalRef" @success="reload" />
<RepeatModal <RepeatModal ref="repeatModalRef" @reject="repeatBatchReject" @viewrepeat="showModal(repeatTaskTableModalRef)" />
ref="repeatModalRef"
@reject="repeatBatchReject"
@viewrepeat="showModal(repeatTaskTableModalRef)"
/>
<RepeatTaskTableModal ref="repeatTaskTableModalRef" /> <RepeatTaskTableModal ref="repeatTaskTableModalRef" />
</div> </div>
</template> </template>
@ -1040,6 +1000,7 @@ defineExpose({
border-radius: 8px; border-radius: 8px;
cursor: pointer; cursor: pointer;
} }
.wrapper { .wrapper {
display: flex; display: flex;
flex: 1; flex: 1;
@ -1185,12 +1146,15 @@ defineExpose({
background: #fff; background: #fff;
} }
} }
:deep(.n-data-table .n-data-table-td.n-data-table-td--fixed-right) { :deep(.n-data-table .n-data-table-td.n-data-table-td--fixed-right) {
z-index: 100 !important; z-index: 100 !important;
} }
:deep(.n-data-table-th__title) { :deep(.n-data-table-th__title) {
color: #333; color: #333;
} }
:deep(.n-data-table .n-data-table-td) { :deep(.n-data-table .n-data-table-td) {
color: #666; color: #666;
} }

@ -1,5 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
import { nextTick, onMounted, ref } from 'vue' import { nextTick, onMounted, ref, watch } from 'vue'
import { debounce } from 'lodash-es' import { debounce } from 'lodash-es'
import { asideMap } from '@/config/aside' import { asideMap } from '@/config/aside'
import type { SearchEntity } from '/#/home' import type { SearchEntity } from '/#/home'
@ -65,6 +65,9 @@ const searchName = () => {
emit('inputChange', searchKeyword.value); emit('inputChange', searchKeyword.value);
} }
const close = () => { const close = () => {
searchKeyword.value = ""; searchKeyword.value = "";
configStore.setSearchValue(searchKeyword.value); configStore.setSearchValue(searchKeyword.value);
@ -72,6 +75,8 @@ const close = () => {
emit('close'); emit('close');
} }
const initSerach = () => { const initSerach = () => {
if (searchContent) { if (searchContent) {
emit('showSearch') emit('showSearch')
@ -85,7 +90,6 @@ const initSerach = () => {
onMounted(() => { onMounted(() => {
initSerach() initSerach()
}) })
</script> </script>
<template> <template>

@ -71,7 +71,7 @@ defineExpose({
</div> </div>
<div class="item"> <div class="item">
<SvgIcon name="modal_reImg" width="49" height="58" /> <SvgIcon name="modal_reImg" width="49" height="58" />
<div class="num_box">{{ 83 }}</div> <div class="num_box">{{ toolsData?.repeat }}</div>
<div class="title_box">重复图片</div> <div class="title_box">重复图片</div>
</div> </div>
</div> </div>

@ -148,16 +148,12 @@ function handleKeydown(event) {
// //
clearTimeout(keyPressTimer); clearTimeout(keyPressTimer);
const item = taskDetailInfo.value; const item = taskDetailInfo.value;
if ( if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
item?.userapprove?.statshis === 2 ||
item?.userapprove?.statshis == 3
) {
overTask.value = null; overTask.value = null;
return; return;
} }
if (validate([item]) == null && batch.value === false) if (validate([item]) == null && batch.value === false) overTask.value = item;
overTask.value = item;
// //
approvalHandler(); approvalHandler();
@ -183,16 +179,12 @@ function handleKeydown(event) {
// //
clearTimeout(keyPressTimer); clearTimeout(keyPressTimer);
const item = taskDetailInfo.value; const item = taskDetailInfo.value;
if ( if (item?.userapprove?.statshis === 2 || item?.userapprove?.statshis == 3) {
item?.userapprove?.statshis === 2 ||
item?.userapprove?.statshis == 3
) {
overTask.value = null; overTask.value = null;
return; return;
} }
if (validate([item]) == null && batch.value === false) if (validate([item]) == null && batch.value === false) overTask.value = item;
overTask.value = item;
// //
const modal = unref(notPassModalRef)! as any; const modal = unref(notPassModalRef)! as any;
modal.showModal([taskDetailInfo.value]); modal.showModal([taskDetailInfo.value]);
@ -265,8 +257,7 @@ function approvalHandler(items?: any) {
processItems = [cloneItem]; processItems = [cloneItem];
} }
if (items !== undefined && !(items instanceof PointerEvent)) if (items !== undefined && !(items instanceof PointerEvent)) processItems = items;
processItems = items;
const msg = validate(processItems); const msg = validate(processItems);
@ -520,9 +511,7 @@ function notPassSuccess(param) {
function reloadList(param, text) { function reloadList(param, text) {
// //
const id = currentTaskId(); const id = currentTaskId();
const hasCurrentId = param.flowTaskInfoList.find( const hasCurrentId = param.flowTaskInfoList.find((item) => item.formId === id);
(item) => item.formId === id
);
finalStore.setListKey(); finalStore.setListKey();
if (hasCurrentId) emit("setAsideItemName", text); if (hasCurrentId) emit("setAsideItemName", text);
@ -556,8 +545,7 @@ function overTaskHandelr(item: any) {
return; return;
} }
if (validate([item]) == null && batchtwo.value === false) if (validate([item]) == null && batchtwo.value === false) overTasktwo.value = item;
overTasktwo.value = item;
} }
function closePassno() { function closePassno() {
console.log(notPassModalRef.value); console.log(notPassModalRef.value);
@ -591,8 +579,7 @@ function checkBottom() {
const scrollTop = window.pageYOffset || document.documentElement.scrollTop; const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
// //
const clientHeight = const clientHeight = window.innerHeight || document.documentElement.clientHeight;
window.innerHeight || document.documentElement.clientHeight;
// //
const scrollHeight = document.documentElement.scrollHeight; const scrollHeight = document.documentElement.scrollHeight;
@ -661,18 +648,8 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
<div class="left"> <div class="left">
<span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span> <span class="font">任务ID{{ taskDetailInfo.fromtaskname }}</span>
<template v-if="!isDetail"> <template v-if="!isDetail">
<SvgIcon <SvgIcon size="22" class="forward" name="arrow-left" @click="backHandler" />
size="22" <SvgIcon size="22" class="back" name="arrow-right" @click="forwardHandler" />
class="forward"
name="arrow-left"
@click="backHandler"
/>
<SvgIcon
size="22"
class="back"
name="arrow-right"
@click="forwardHandler"
/>
</template> </template>
</div> </div>
<div v-if="!isDetail" class="right"> <div v-if="!isDetail" class="right">
@ -769,9 +746,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
v-show="!imgbigshow" v-show="!imgbigshow"
:style="{ :style="{
position: 'fixed', position: 'fixed',
height: '100vh',
zIndex: 169, zIndex: 169,
height: '100vh',
background: 'rgb(80, 122, 253)', background: 'rgb(80, 122, 253)',
right: '16px', right: '16px',
marginTop: '5px', marginTop: '5px',
@ -867,18 +842,10 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
/> />
</div> </div>
<div class="mark"> <div class="mark">
<SvgIcon <SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 0" size="128" name="jia" />
v-show="taskDetailInfo?.iztrueorfalse === 0"
size="128"
name="jia"
/>
</div> </div>
<div class="mark"> <div class="mark">
<SvgIcon <SvgIcon v-show="taskDetailInfo?.iztrueorfalse === 1" size="128" name="zhen" />
v-show="taskDetailInfo?.iztrueorfalse === 1"
size="128"
name="zhen"
/>
</div> </div>
<div class="big-mark" /> <div class="big-mark" />
<div class="preview" @click="previewHandler"> <div class="preview" @click="previewHandler">
@ -888,11 +855,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
<n-grid x-gap="12" y-gap="10" :cols="12"> <n-grid x-gap="12" y-gap="10" :cols="12">
<n-gi span="4" class="gi1"> <n-gi span="4" class="gi1">
<span> <span>
<img <img class="icon-status" src="@/assets/images/task/status.png" alt="" />
class="icon-status"
src="@/assets/images/task/status.png"
alt=""
/>
</span> </span>
</n-gi> </n-gi>
<n-gi span="8" class="gi2"> <n-gi span="8" class="gi2">
@ -911,39 +874,23 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
</span> </span>
</n-gi> </n-gi>
<n-gi span="8" class="gi2"> <n-gi span="8" class="gi2">
<span class="value num" <span class="value num">{{ totalCount }}<span class="unit"></span> </span>
>{{ totalCount }}<span class="unit"></span>
</span>
<span class="label">相似匹配</span> <span class="label">相似匹配</span>
</n-gi> </n-gi>
</n-grid> </n-grid>
</div> </div>
<div class="time"> <div class="time">
<div class="time-item"> <div class="time-item">
<SvgIcon <SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
class="svg-time"
color="#FFF"
size="16"
name="camera-time"
/>
<span>{{ <span>{{ taskDetailInfo?.ocrPicture?.photoDateTimestamp ?? "-" }}</span>
taskDetailInfo?.ocrPicture?.photoDateTimestamp ?? "-"
}}</span>
</div> </div>
<div class="time-item time-item2"> <div class="time-item time-item2">
<SvgIcon <SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
class="svg-time"
color="#FFF"
size="16"
name="submit-time"
/>
<span>{{ <span>{{
taskDetailInfo?.ocrPicture?.submitDateTimestamp taskDetailInfo?.ocrPicture?.submitDateTimestamp
? formatToDateHMS( ? formatToDateHMS(Number(taskDetailInfo.ocrPicture.submitDateTimestamp))
Number(taskDetailInfo.ocrPicture.submitDateTimestamp)
)
: "-" : "-"
}}</span> }}</span>
</div> </div>
@ -1043,12 +990,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
/> />
<div class="time"> <div class="time">
<div class="time-item"> <div class="time-item">
<SvgIcon <SvgIcon class="svg-time" color="#FFF" size="8" name="camera-time" />
class="svg-time"
color="#FFF"
size="8"
name="camera-time"
/>
<span>{{ <span>{{
item.photoDateTimestamp item.photoDateTimestamp
? formatToDateHMS(Number(item.photoDateTimestamp)) ? formatToDateHMS(Number(item.photoDateTimestamp))
@ -1056,12 +998,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
}}</span> }}</span>
</div> </div>
<div class="time-item time-item2"> <div class="time-item time-item2">
<SvgIcon <SvgIcon class="svg-time" color="#FFF" size="8" name="submit-time" />
class="svg-time"
color="#FFF"
size="8"
name="submit-time"
/>
<span>{{ <span>{{
item.submitDateTimestamp item.submitDateTimestamp
? formatToDateHMS(Number(item.submitDateTimestamp)) ? formatToDateHMS(Number(item.submitDateTimestamp))
@ -1143,16 +1080,10 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
{{ item[0].value }} {{ item[0].value }}
</div> </div>
</div> </div>
<div <div v-if="!(item[0].label == '拜访终端名称')" class="viewlabel">
v-if="!(item[0].label == '拜访终端名称')"
class="viewlabel"
>
{{ item[0].label }} {{ item[0].label }}
</div> </div>
<div <div v-if="!(item[0].label == '拜访终端名称')" class="viewvalue">
v-if="!(item[0].label == '拜访终端名称')"
class="viewvalue"
>
{{ item[0].value }} {{ item[0].value }}
</div> </div>
<div <div
@ -1195,11 +1126,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
<div v-else class="imgbottom"> <div v-else class="imgbottom">
<div <div
v-show="imgbigshow" v-show="imgbigshow"
style=" style="display: flex; justify-content: space-between; padding: 12px 0px 3px 0"
display: flex;
justify-content: space-between;
padding: 12px 0px 3px 0;
"
> >
<div> <div>
<span <span
@ -1223,36 +1150,16 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
> >
<div style="cursor: pointer" @click="sortHandler('createdate')"> <div style="cursor: pointer" @click="sortHandler('createdate')">
<span>时间排序</span> <span>时间排序</span>
<SvgIcon <SvgIcon v-if="true" style="margin-left: 5px" name="sort" size="12" />
v-if="true" <SvgIcon v-else style="margin-left: 5px" name="active-sort" size="12" />
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
v-else
style="margin-left: 5px"
name="active-sort"
size="12"
/>
</div> </div>
<div <div
style="margin-left: 15px; cursor: pointer" style="margin-left: 15px; cursor: pointer"
@click="sortHandler('similarityScore')" @click="sortHandler('similarityScore')"
> >
<span>相似度排序</span> <span>相似度排序</span>
<SvgIcon <SvgIcon v-if="true" style="margin-left: 5px" name="sort" size="12" />
v-if="true" <SvgIcon v-else style="margin-left: 5px" name="active-sort" size="12" />
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
v-else
style="margin-left: 5px"
name="active-sort"
size="12"
/>
</div> </div>
</div> </div>
</div> </div>
@ -1317,12 +1224,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
/> />
<div class="time"> <div class="time">
<div class="time-item"> <div class="time-item">
<SvgIcon <SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
class="svg-time"
color="#FFF"
size="16"
name="camera-time"
/>
<span>{{ <span>{{
item.photoDateTimestamp item.photoDateTimestamp
? formatToDateHMS(Number(item.photoDateTimestamp)) ? formatToDateHMS(Number(item.photoDateTimestamp))
@ -1330,12 +1232,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
}}</span> }}</span>
</div> </div>
<div class="time-item time-item2"> <div class="time-item time-item2">
<SvgIcon <SvgIcon class="svg-time" color="#FFF" size="16" name="submit-time" />
class="svg-time"
color="#FFF"
size="16"
name="submit-time"
/>
<span>{{ <span>{{
item.submitDateTimestamp item.submitDateTimestamp
? formatToDateHMS(Number(item.submitDateTimestamp)) ? formatToDateHMS(Number(item.submitDateTimestamp))
@ -1343,10 +1240,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
}}</span> }}</span>
</div> </div>
</div> </div>
<div <div :class="{ 'percent-red': item.similarityScore === 100 }" class="percent">
:class="{ 'percent-red': item.similarityScore === 100 }"
class="percent"
>
{{ item.similarityScore }}<span class="percent-unit">%</span> {{ item.similarityScore }}<span class="percent-unit">%</span>
</div> </div>
</div> </div>
@ -1433,16 +1327,8 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
</div> </div>
</div> --> </div> -->
</div> </div>
<NotPassed <NotPassed ref="notPassModalRef" @success="notPassSuccess" @close="closePassno" />
ref="notPassModalRef" <BatchModal ref="batchModalRef" @reject="rejectHandler" @approval="approvalHandler" />
@success="notPassSuccess"
@close="closePassno"
/>
<BatchModal
ref="batchModalRef"
@reject="rejectHandler"
@approval="approvalHandler"
/>
<CustomSettingModal ref="CustomSettingModalRef" @on-ok="getDetail" /> <CustomSettingModal ref="CustomSettingModalRef" @on-ok="getDetail" />
</div> </div>
</template> </template>
@ -2151,11 +2037,7 @@ function sortHandler(orderby: "similarityScore" | "createdate") {
.small-mark { .small-mark {
width: 100%; width: 100%;
height: 53px; height: 53px;
background: linear-gradient( background: linear-gradient(180deg, rgba(0, 0, 0, 0.01), rgba(0, 0, 0, 0.44) 88%);
180deg,
rgba(0, 0, 0, 0.01),
rgba(0, 0, 0, 0.44) 88%
);
border-radius: 0px 8px 8px 8px; border-radius: 0px 8px 8px 8px;
position: absolute; position: absolute;
left: 0; left: 0;

@ -905,14 +905,14 @@ defineExpose({
.left { .left {
flex: 0.6; flex: 0.6;
background-size: auto 346px; // background-size: auto 346px;
background-size: cover;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
border-radius: 8px; border-radius: 8px;
position: relative; position: relative;
width: 632px; // width: 632px;
height: 346px; // height: 346px;
.preview { .preview {
position: absolute; position: absolute;

Loading…
Cancel
Save