feat: 适配后端字段 #156

Merged
liushilong merged 1 commits from fix/task_modules_error into test 1 year ago

@ -1,13 +1,5 @@
<script lang="ts" setup>
import {
computed,
onMounted,
onUnmounted,
reactive,
ref,
unref,
watch,
} from "vue";
import { computed, onMounted, onUnmounted, reactive, ref, unref, watch } from "vue";
import { chunk, clone } from "lodash-es";
import { useDialog, useMessage } from "naive-ui";
import { useRoute, useRouter } from "vue-router";
@ -125,16 +117,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();
@ -158,16 +146,12 @@ function handleKeydown(event) {
//
if (now - lastKeyPressTime < doubleClickInterval) {
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]);
@ -240,8 +224,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);
@ -280,22 +263,23 @@ function approvalHandler(items?: any) {
doAudit(param);
overTask.value = null;
},
onNegativeClick: () => {overTask.value = null;},
onNegativeClick: () => {
overTask.value = null;
},
});
}
function approvalHandlerx(item?:any){
console.log(item)
alert(1)
function approvalHandlerx(item?: any) {
console.log(item);
alert(1);
}
function singleRejectHandlex(item?:any){
console.log(item)
function singleRejectHandlex(item?: any) {
console.log(item);
const modal = unref(notPassModalRef)! as any;
modal.showModal([item]);
}
function rejectHandler(items?: any) {
console.log(items)
console.log(items);
const modal = unref(notPassModalRef)! as any;
modal.showModal(items);
}
@ -348,8 +332,7 @@ async function handleDragEnd(event, item) {
}
}
async function addSuspicious() {
console.log(taskDetailInfo.value.ocrPicture)
console.log(taskDetailInfo.value.ocrPicture);
if (taskDetailInfo.value.ocrPicture.pictureid) {
const res = await dubiousfileyd({
pictureid: taskDetailInfo.value.ocrPicture.id,
@ -364,8 +347,8 @@ async function addSuspicious() {
message.error(res.message);
}
taskStore.setInFile(false);
}}
}
}
async function getTableData() {
const useInfo = userStore.getUserInfo;
const listData = [];
@ -482,15 +465,13 @@ async function getDetail() {
function notPassSuccess(param) {
batchModalRef.value.reload();
reloadList(param, "不通过");
overTask.value=null
overTask.value = null;
}
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);
@ -515,9 +496,7 @@ function getrowValue(e) {
const hostname = window.location.hostname;
const port = window.location.port;
const hostWithPort = protocol + "//" + hostname + ":" + port + "/";
window.open(
hostWithPort + "map" + "?name=" + name + "&lat=" + lat + "&lng=" + lng
);
window.open(hostWithPort + "map" + "?name=" + name + "&lat=" + lat + "&lng=" + lng);
}
}
function overTaskHandelr(item: any) {
@ -526,11 +505,10 @@ 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(){
overTask.value=null
function closePassno() {
overTask.value = null;
}
</script>
@ -540,18 +518,8 @@ function closePassno(){
<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">
@ -694,18 +662,10 @@ function closePassno(){
/>
</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">
@ -715,11 +675,7 @@ function closePassno(){
<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">
@ -738,41 +694,21 @@ function closePassno(){
</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"
/>
<span>{{
taskDetailInfo?.ocrPicture?.photoDateTimestamp
? formatToDateHMS(
Number(taskDetailInfo.ocrPicture.photoDateTimestamp)
)
: "-"
}}</span>
<SvgIcon class="svg-time" color="#FFF" size="16" name="camera-time" />
<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>
@ -840,12 +776,7 @@ function closePassno(){
/>
<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))
@ -853,12 +784,7 @@ function closePassno(){
}}</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))
@ -927,16 +853,10 @@ function closePassno(){
{{ item[0].value }}
</div>
</div>
<div
class="viewlabel"
v-if="!(item[0].label == '拜访终端名称')"
>
<div class="viewlabel" v-if="!(item[0].label == '拜访终端名称')">
{{ item[0].label }}
</div>
<div
class="viewvalue"
v-if="!(item[0].label == '拜访终端名称')"
>
<div class="viewvalue" v-if="!(item[0].label == '拜访终端名称')">
{{ item[0].value }}
</div>
<div
@ -977,13 +897,7 @@ function closePassno(){
</n-tab-pane>
</n-tabs>
<div v-else class="imgbottom">
<div
style="
display: flex;
justify-content: space-between;
padding: 12px 0px 3px 0;
"
>
<div style="display: flex; justify-content: space-between; padding: 12px 0px 3px 0">
<div>
<span
style="
@ -1006,41 +920,18 @@ function closePassno(){
>
<div style="cursor: pointer" @click="sortHandler('createdate')">
<span>时间排序</span>
<SvgIcon
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
style="margin-left: 5px"
name="active-sort"
size="12"
/>
<SvgIcon style="margin-left: 5px" name="sort" size="12" />
<SvgIcon style="margin-left: 5px" name="active-sort" size="12" />
</div>
<div
style="margin-left: 15px; cursor: pointer"
>
<div style="margin-left: 15px; cursor: pointer">
<span>相似度排序</span>
<SvgIcon
style="margin-left: 5px"
name="sort"
size="12"
/>
<SvgIcon
style="margin-left: 5px"
name="active-sort"
size="12"
/>
<SvgIcon style="margin-left: 5px" name="sort" size="12" />
<SvgIcon style="margin-left: 5px" name="active-sort" size="12" />
</div>
</div>
</div>
<div class="allview">
<div class="list" >
<div class="list">
<div
v-for="item in taskDetailPictureList"
:key="item.id"
@ -1060,12 +951,9 @@ function closePassno(){
@mouseover="overTaskHandelr(item)"
@mouseleave="leaveTaskHandler"
>
<div
v-show="overTasktwo&& overTasktwo.id === item.id&&!batch"
v-show="overTasktwo && overTasktwo.id === item.id && !batch"
class="action"
>
<SvgIcon
style="cursor: pointer"
@ -1103,12 +991,7 @@ function closePassno(){
/>
<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))
@ -1116,12 +999,7 @@ function closePassno(){
}}</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))
@ -1129,14 +1007,10 @@ function closePassno(){
}}</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>
</div>
</div>
<!-- <div class="wrapper-list">
@ -1220,12 +1094,8 @@ function closePassno(){
</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>
@ -1882,7 +1752,7 @@ function closePassno(){
margin: 3px 0 10px 0;
max-width: 650px;
}
.allview {
.allview {
flex: 0.5;
background: #f6f9fd;
border-radius: 8px;
@ -1931,11 +1801,7 @@ function closePassno(){
.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;
@ -2022,5 +1888,5 @@ function closePassno(){
.percent-red {
background: #ff4e4f;
}
}
}
</style>

Loading…
Cancel
Save