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

Loading…
Cancel
Save