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

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

@ -71,7 +71,7 @@ defineExpose({
</div>
<div class="item">
<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>
</div>

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

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

Loading…
Cancel
Save