Merge pull request 'fix: 冲突修复' (#180) from fix/merge into test

Reviewed-on: #180
pull/181/head
刘释隆 1 year ago
commit 6400ab613a

9
components.d.ts vendored

@ -11,6 +11,7 @@ declare module 'vue' {
BasicModal: typeof import('./src/components/Modal/BasicModal.vue')['default']
DataHeader: typeof import('./src/components/DataHeader/index.vue')['default']
NAvatar: typeof import('naive-ui')['NAvatar']
NBackTop: typeof import('naive-ui')['NBackTop']
NButton: typeof import('naive-ui')['NButton']
NCard: typeof import('naive-ui')['NCard']
NCheckbox: typeof import('naive-ui')['NCheckbox']
@ -21,6 +22,8 @@ declare module 'vue' {
NDialogProvider: typeof import('naive-ui')['NDialogProvider']
NDivider: typeof import('naive-ui')['NDivider']
NDropdown: typeof import('naive-ui')['NDropdown']
NEllipsis: typeof import('naive-ui')['NEllipsis']
NEmpty: typeof import('naive-ui')['NEmpty']
NForm: typeof import('naive-ui')['NForm']
NFormItem: typeof import('naive-ui')['NFormItem']
NGi: typeof import('naive-ui')['NGi']
@ -32,16 +35,20 @@ declare module 'vue' {
NModal: typeof import('naive-ui')['NModal']
NNotificationProvider: typeof import('naive-ui')['NNotificationProvider']
NotPassed: typeof import('./src/components/NotPassed.vue')['default']
NPopconfirm: typeof import('naive-ui')['NPopconfirm']
NPopover: typeof import('naive-ui')['NPopover']
NPopselect: typeof import('naive-ui')['NPopselect']
NProgress: typeof import('naive-ui')['NProgress']
NScrollbar: typeof import('naive-ui')['NScrollbar']
NSelect: typeof import('naive-ui')['NSelect']
NSlider: typeof import('naive-ui')['NSlider']
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']

@ -26,6 +26,7 @@ module.exports = antfu(
// eslint-disable-next-line node/prefer-global/process
process.env.MODE === 'production' ? 2 : 0,
],
'array-callback-return': ['error', { allowImplicit: true }],
},
},
)

@ -4,7 +4,6 @@ import { defineProps, onMounted, onUnmounted, reactive, ref, watch } from 'vue'
import ListItem from './ListItem.vue'
import emitter from '@/utils/mitt'
import { useTaskStore } from '@/store/modules/task'
import { filter } from 'lodash'
defineProps({
showFieldList: {
@ -27,10 +26,10 @@ const pagination = reactive({
})
function selectHandler(item, index: number) {
activeId.value = item.id
console.log(activeId.value,item.id)
activeId.value = item.id
console.log(activeId.value, item.id)
console.log(index)
taskStore.setActive(index,item.id)
taskStore.setActive(index, item.id)
}
useInfiniteScroll(
@ -61,7 +60,7 @@ async function fetchList() {
const result = await taskStore.fetchApprovalList({
...pagination,
keyword: keyword.value,
userSearchId:searchId.value
userSearchId: searchId.value,
})
const { data, pageCount } = result
canloadMore.value = pageCount >= pagination.pageNo
@ -80,35 +79,36 @@ watch(
},
)
watch(
() => taskStore.inFileId,
async (newVal) => {
let newlist=[]
let filterid=newVal.taskname
console.log(filterid)
const index = data.value.findIndex(person => person.fromtaskname === filterid);
let ovelist = data.value.filter(item => item. fromtaskname !== filterid);
ovelist.map((item)=>{
watch(
() => taskStore.inFileId,
async (newVal) => {
const newlist = []
const filterid = newVal.taskname
console.log(filterid)
const index = data.value.findIndex(person => person.fromtaskname === filterid)
const ovelist = data.value.filter(item => item.fromtaskname !== filterid)
ovelist.map((item) => {
newlist.push(item)
return item
})
data.value=newlist
activeId.value = newlist[index].id
taskStore.setActive(index,newlist[index].id)
//taskStore.setActive(index)
// activeId.value = data[index+1].id
//selectHandler(data[index].id, index)
/* let ovelist = data.value.filter(item => item. fromtaskname !== filterid);
data.value = newlist
activeId.value = newlist[index].id
taskStore.setActive(index, newlist[index].id)
// taskStore.setActive(index)
// activeId.value = data[index+1].id
// selectHandler(data[index].id, index)
/* let ovelist = data.value.filter(item => item. fromtaskname !== filterid);
let newlist=[]
ovelist.map((item)=>{
newlist.push(item)
})
data.value=newlist
taskStore.setActive(2)
alert(1)*/
}
);
alert(1) */
},
)
function reset() {
pagination.pageNo = 0
pagination.pageSize = 30
@ -131,11 +131,11 @@ async function search(word: string) {
onMounted(() => {
emitter.on('refresh', refreshHandler)
emitter.on('filter',async(id)=>{
await reset();
searchId.value = id;
data.value = await fetchList();
activeId.value = data.value[0].id
emitter.on('filter', async (id) => {
await reset()
searchId.value = id
data.value = await fetchList()
activeId.value = data.value[0].id
console.log(data.value)
})
})
@ -162,7 +162,6 @@ defineExpose({
<template>
<n-spin :show="isLoading">
<div ref="el" class="list">
<ListItem
v-for="(item, index) in data"
:key="item.id"
@ -170,9 +169,7 @@ defineExpose({
:selected="activeId === item.id"
:list-item="item"
@click="selectHandler(item, index)"
>
</ListItem>
/>
</div>
</n-spin>
</template>

@ -1,18 +1,18 @@
<script lang="ts" setup>
import { audit } from "@/api/task/task";
import { getPictureSimilarityList, getTaskDetailInfo } from "@/api/work/work";
import NotPassed from "@/components/Approval/NotPassed.vue";
import { TASK_STATUS_OBJ } from "@/enums/index";
import { useWorkOrder } from "@/store/modules/workOrder";
import { isEmpty } from "@/utils";
import { formatToDateHMS } from "@/utils/dateUtil";
import { hideDownload } from "@/utils/image";
import emitter from "@/utils/mitt";
import { useInfiniteScroll } from "@vueuse/core";
import { format } from "date-fns";
import imagesloaded from "imagesloaded";
import { clone, cloneDeep, debounce, pickBy } from "lodash-es";
import { useDialog, useMessage } from "naive-ui";
import { audit } from '@/api/task/task'
import { getPictureSimilarityList, getTaskDetailInfo } from '@/api/work/work'
import NotPassed from '@/components/Approval/NotPassed.vue'
import { TASK_STATUS_OBJ } from '@/enums/index'
import { useWorkOrder } from '@/store/modules/workOrder'
import { isEmpty } from '@/utils'
import { formatToDateHMS } from '@/utils/dateUtil'
import { hideDownload } from '@/utils/image'
import emitter from '@/utils/mitt'
import { useInfiniteScroll } from '@vueuse/core'
import { format } from 'date-fns'
import imagesloaded from 'imagesloaded'
import { clone, cloneDeep, debounce, pickBy } from 'lodash-es'
import { useDialog, useMessage } from 'naive-ui'
import {
computed,
onMounted,
@ -22,67 +22,70 @@ import {
ref,
unref,
watch,
} from "vue";
import PictureInfo from "../components/PictureInfo.vue";
import ConfrimModal from "../modal/ConfrimModal.vue";
import type { ApprovalParam, SimilarityPictureSortParam } from "/#/api";
const batch = ref(false); //
const selectItems = ref<any[]>([]);
const message = useMessage();
const dialog = useDialog();
const totalCount = ref(0);
let _imagesload: any;
} from 'vue'
import PictureInfo from '../components/PictureInfo.vue'
import ConfrimModal from '../modal/ConfrimModal.vue'
import type { ApprovalParam, SimilarityPictureSortParam } from '/#/api'
const batch = ref(false) //
const selectItems = ref<any[]>([])
const message = useMessage()
const dialog = useDialog()
const totalCount = ref(0)
let _imagesload: any
function setBatch(value: boolean) {
if (value && batch.value) batch.value = !value;
else batch.value = value;
if (value && batch.value)
batch.value = !value
else batch.value = value
if (value === false) {
selectItems.value.forEach((item) => (item.checked = false));
selectItems.value.length = 0;
selectItems.value.forEach(item => (item.checked = false))
selectItems.value.length = 0
}
}
function onCheckChange(checked: any, item: any) {
const index = selectItems.value.indexOf(item);
item.checked = checked;
const index = selectItems.value.indexOf(item)
item.checked = checked
if (index === -1 && checked) selectItems.value.push(item);
else selectItems.value.splice(index, 1);
if (index === -1 && checked)
selectItems.value.push(item)
else selectItems.value.splice(index, 1)
}
const showActions = computed(() => {
return selectItems.value.length > 0 && batch;
});
return selectItems.value.length > 0 && batch
})
const taskpagination = reactive({
pageNo: 1,
pageSize: 10,
});
})
const sortBy: SimilarityPictureSortParam = {
orderType: "desc",
orderName: "similarityScore",
};
const workStore = useWorkOrder();
const selectTask = ref<any>(null);
const overTask = ref<any>(null);
const taskDetailInfo = ref<any>({});
const confrimModalRef = ref(null);
const imageRef = ref<ComponentElRef | null>();
const listData = ref<any[]>([]);
const loading = ref(false);
const el = ref<HTMLDivElement | null>(null);
const selectedSortName = ref("");
const isFullScreen = ref(false);
const notPassModalRef = ref(null);
const mainImageModalRef = ref(null);
const wrapperListRef = ref<HTMLElement | undefined>(undefined);
let canloadMore = true;
let processItems: any[] = [];
orderType: 'desc',
orderName: 'similarityScore',
}
const workStore = useWorkOrder()
const selectTask = ref<any>(null)
const overTask = ref<any>(null)
const taskDetailInfo = ref<any>({})
const confrimModalRef = ref(null)
const imageRef = ref<ComponentElRef | null>()
const listData = ref<any[]>([])
const loading = ref(false)
const el = ref<HTMLDivElement | null>(null)
const selectedSortName = ref('')
const isFullScreen = ref(false)
const notPassModalRef = ref(null)
const mainImageModalRef = ref(null)
const wrapperListRef = ref<HTMLElement | undefined>(undefined)
let canloadMore = true
let processItems: any[] = []
function validate(items: any[]) {
if (items.length === 0) return "至少选中一个任务";
if (items.length === 0)
return '至少选中一个任务'
// for (const item of items) {
// const { iztrueorfalse, history, states } = item
@ -96,159 +99,163 @@ function validate(items: any[]) {
// return ''
// }
return null;
return null
}
function forwardHandler() {
workStore.forward();
workStore.forward()
}
function backHandler() {
workStore.back();
workStore.back()
}
function reset() {
taskpagination.pageNo = 0;
taskpagination.pageSize = 20;
listData.value.length = 0;
loading.value = false;
canloadMore = true;
taskpagination.pageNo = 0
taskpagination.pageSize = 20
listData.value.length = 0
loading.value = false
canloadMore = true
}
async function refreshHandler() {
reset();
reset()
useInfiniteScroll(
el as any,
() => {
loadMore();
loadMore()
},
{ distance: 10, canLoadMore: () => canloadMore }
);
{ distance: 10, canLoadMore: () => canloadMore },
)
}
async function loadMore() {
if (loading.value || el.value == null) return;
if (loading.value || el.value == null)
return
const more = await featchList();
listData.value.push(...more);
const more = await featchList()
listData.value.push(...more)
}
async function featchList() {
loading.value = true;
loading.value = true
try {
taskpagination.pageNo += 1;
taskpagination.pageNo += 1
const { data, total, pageCount } = await getPictureSimilarityList({
...taskpagination,
...sortBy,
checkDuplicateId: workStore.activeId,
pictureId: taskDetailInfo.value.id,
});
})
totalCount.value = total;
canloadMore = pageCount >= taskpagination.pageNo && pageCount > 0;
totalCount.value = total
canloadMore = pageCount >= taskpagination.pageNo && pageCount > 0
return data;
} catch (error) {
canloadMore = false;
return [];
return data
}
catch (error) {
canloadMore = false
return []
}
}
const layout = debounce(() => {
if (el.value == null) return;
if (el.value == null)
return
_imagesload = imagesloaded(".grid-item");
_imagesload = imagesloaded('.grid-item')
_imagesload.on("done", (instance) => {
if (!el.value) return;
loading.value = false;
});
_imagesload.on('done', (instance) => {
if (!el.value)
return
loading.value = false
})
_imagesload.on("fail", (instance) => {
message.error("图片错误");
loading.value = false;
});
}, 300);
_imagesload.on('fail', (instance) => {
message.error('图片错误')
loading.value = false
})
}, 300)
const fullscreenStyles = computed<any>(() => ({
width: isFullScreen.value ? "100vw" : "",
height: isFullScreen.value ? "100vh" : "",
position: isFullScreen.value ? "fixed" : "",
top: isFullScreen.value ? "0" : "",
left: isFullScreen.value ? "0" : "",
zIndex: isFullScreen.value ? "100" : "",
}));
width: isFullScreen.value ? '100vw' : '',
height: isFullScreen.value ? '100vh' : '',
position: isFullScreen.value ? 'fixed' : '',
top: isFullScreen.value ? '0' : '',
left: isFullScreen.value ? '0' : '',
zIndex: isFullScreen.value ? '100' : '',
}))
//
function toggleFullScreen() {
isFullScreen.value = !isFullScreen.value;
isFullScreen.value = !isFullScreen.value
}
onUpdated(() => {
layout();
});
layout()
})
watch(
() => workStore.activeId,
async (newValue, oldValue) => {
const packageid = workStore.getActiveId;
const packageid = workStore.getActiveId
if (isEmpty(packageid)) {
listData.value.length = 0;
totalCount.value = 0;
taskDetailInfo.value = {};
return;
listData.value.length = 0
totalCount.value = 0
taskDetailInfo.value = {}
return
}
queryDetail(packageid);
queryDetail(packageid)
// const res = await getPackageTaskList(newValue, packagepagination);
// const { data } = res;
// taskList.value = data;
// if (taskList.value.length > 0) handleSelect(taskList.value[0]); //
}
);
},
)
const packageName = computed(() => {
const index = workStore.getCurrentIndex;
return workStore.getOrderList[index]?.name || "";
});
const index = workStore.getCurrentIndex
return workStore.getOrderList[index]?.name || ''
})
async function queryDetail(checkDuplicateId: any) {
taskDetailInfo.value = await getTaskDetailInfo(checkDuplicateId);
const packageid = workStore.getActiveId;
taskDetailInfo.value = await getTaskDetailInfo(checkDuplicateId)
const packageid = workStore.getActiveId
if (isEmpty(packageid)) {
listData.value.length = 0;
totalCount.value = 0;
return;
listData.value.length = 0
totalCount.value = 0
return
}
refreshHandler();
refreshHandler()
}
//
async function handleSelect(item: any) {
// taskDetailInfo.value = await getTaskDetailInfo(item.id)
const packageid = workStore.getActiveId;
const packageid = workStore.getActiveId
if (isEmpty(packageid)) {
listData.value.length = 0;
totalCount.value = 0;
listData.value.length = 0
totalCount.value = 0
}
// refreshHandler();
}
async function sortHandler(orderby: "similarityScore" | "createdate") {
selectedSortName.value = orderby;
sortBy.orderName = orderby;
sortBy.orderType = sortBy.orderType === "asc" ? "desc" : "asc";
refreshHandler();
async function sortHandler(orderby: 'similarityScore' | 'createdate') {
selectedSortName.value = orderby
sortBy.orderName = orderby
sortBy.orderType = sortBy.orderType === 'asc' ? 'desc' : 'asc'
refreshHandler()
}
const propertys = computed(() => {
const { ocrPicture } = taskDetailInfo.value;
const { ocrPicture } = taskDetailInfo.value
const v = pickBy(ocrPicture, (value, key: string) => {
return key.startsWith("field") && value !== null;
});
return v;
});
return key.startsWith('field') && value !== null
})
return v
})
function overTaskHandelr(item: any) {
// console.log(item, 'item')
// if (item?.historyStates === 2 || item?.historyStates == 3) {
@ -256,233 +263,241 @@ function overTaskHandelr(item: any) {
// return
// }
if (validate([item]) == null && batch.value === false) overTask.value = item;
if (validate([item]) == null && batch.value === false)
overTask.value = item
}
function leaveTaskHandler() {
overTask.value = null;
overTask.value = null
}
function onEsc() {
if (isFullScreen.value && !document.querySelector(".n-modal-container"))
isFullScreen.value = false;
if (isFullScreen.value && !document.querySelector('.n-modal-container'))
isFullScreen.value = false
}
function resizeImage() {
const container = document.querySelector(".image-container")!;
const containerWidth = container.offsetWidth;
const containerHeight = container.offsetHeight;
const container = document.querySelector('.image-container')!
const containerWidth = container.offsetWidth
const containerHeight = container.offsetHeight
}
onUnmounted(() => {
workStore.reset();
document.removeEventListener("keydown", onEsc);
});
workStore.reset()
document.removeEventListener('keydown', onEsc)
})
onMounted(() => {
document.addEventListener("keydown", onEsc);
window.addEventListener("resize", resizeImage);
});
document.addEventListener('keydown', onEsc)
window.addEventListener('resize', resizeImage)
})
function immersionHandler() {
// class="wrapper"
// workStore.updateImmersion();
toggleFullScreen();
toggleFullScreen()
}
function showAction() {
const item = taskDetailInfo.value;
if (item.historyStates === 2 || item.historyStates === 3) return;
const item = taskDetailInfo.value
if (item.historyStates === 2 || item.historyStates === 3)
return
if (batch.value === false) overTask.value = item;
if (batch.value === false)
overTask.value = item
}
function hideAction(event) {
// overTask.value = null
previewHandler(event);
previewHandler(event)
}
function previewHandler(event: MouseEvent) {
event.stopImmediatePropagation();
event.stopPropagation();
event.stopImmediatePropagation()
event.stopPropagation()
if (imageRef.value && (imageRef.value as any).src)
(imageRef.value as any).mergedOnClick();
(imageRef.value as any).mergedOnClick()
}
function rejectHandler() {
const modal = unref(notPassModalRef)! as any;
modal.showModal(selectItems.value);
const modal = unref(notPassModalRef)! as any
modal.showModal(selectItems.value)
}
function singleRejectHandler(item) {
const modal = unref(notPassModalRef)! as any;
modal.showModal([item]);
const modal = unref(notPassModalRef)! as any
modal.showModal([item])
}
function reject(idOrDesc: string, backId: string, isOther: boolean) {
const formIds: string[] = processItems.map((item) => item.id);
const taskIds: string[] = processItems.map((item) => item.taskId);
const tasknames: string[] = processItems.map((item) => item.taskname);
const formIds: string[] = processItems.map(item => item.id)
const taskIds: string[] = processItems.map(item => item.taskId)
const tasknames: string[] = processItems.map(item => item.taskname)
const param: ApprovalParam = {
formid: formIds,
taskId: taskIds,
approvd: false,
taskComment: idOrDesc,
taskname: isOther ? tasknames : ["其他"],
};
taskname: isOther ? tasknames : ['其他'],
}
doAudit(param);
doAudit(param)
}
function handleRejectMainImage() {
const modal = unref(mainImageModalRef)! as any;
const params = cloneDeep(taskDetailInfo.value);
params.id = params.taskchildpictureid;
modal.showModal([params]);
const modal = unref(mainImageModalRef)! as any
const params = cloneDeep(taskDetailInfo.value)
params.id = params.taskchildpictureid
modal.showModal([params])
}
async function reloadDetailInfo() {
const packageid = workStore.getActiveId;
taskDetailInfo.value = await getTaskDetailInfo(packageid);
const packageid = workStore.getActiveId
taskDetailInfo.value = await getTaskDetailInfo(packageid)
}
function handleApproveMainImage(items?: any) {
let cloneItem: any;
let cloneItem: any
if (overTask.value) {
cloneItem = clone(overTask.value);
cloneItem.id = cloneItem.taskchildpictureid;
processItems = [cloneItem];
cloneItem = clone(overTask.value)
cloneItem.id = cloneItem.taskchildpictureid
processItems = [cloneItem]
}
const msg = validate(processItems);
const msg = validate(processItems)
if (msg !== null) {
message.error(msg);
return;
message.error(msg)
return
}
const list: any = [];
const list: any = []
processItems.forEach((item) => {
list.push({
formId: item.id,
taskId: item.taskId,
taskName: item.fromTaskName,
});
});
})
})
const param = {
result: true,
comment: "",
disposeType: "",
disposeTypeId: "",
failCauseId: "",
failCauseName: "",
comment: '',
disposeType: '',
disposeTypeId: '',
failCauseId: '',
failCauseName: '',
flowTaskInfoList: list,
};
}
dialog.info({
title: "确认提示",
content: "确认给该任务审批为【通过】吗?",
positiveText: "确定",
negativeText: "取消",
title: '确认提示',
content: '确认给该任务审批为【通过】吗?',
positiveText: '确定',
negativeText: '取消',
onPositiveClick: () => {
audit(param).then(async (res) => {
const { code } = res;
if (code === "OK") {
message.info(res.message);
const packageid = workStore.getActiveId;
taskDetailInfo.value = await getTaskDetailInfo(packageid);
} else {
message.error(res.message);
const { code } = res
if (code === 'OK') {
message.info(res.message)
const packageid = workStore.getActiveId
taskDetailInfo.value = await getTaskDetailInfo(packageid)
}
});
else {
message.error(res.message)
}
})
},
onNegativeClick: () => {},
});
})
}
function approvalHandler(items?: any) {
let cloneItem: any;
let cloneItem: any
if (batch.value) {
processItems = selectItems.value;
} else if (overTask.value) {
cloneItem = clone(overTask.value);
processItems = [cloneItem];
processItems = selectItems.value
}
else if (overTask.value) {
cloneItem = clone(overTask.value)
processItems = [cloneItem]
}
// => => /
if (items !== undefined && !(items instanceof PointerEvent)) processItems = [items];
if (items !== undefined && !(items instanceof PointerEvent))
processItems = [items]
const msg = validate(processItems);
const msg = validate(processItems)
if (msg !== null) {
message.error(msg);
return;
message.error(msg)
return
}
const list: any = [];
const list: any = []
processItems.forEach((item) => {
list.push({
formId: item.id,
taskId: item.taskId,
taskName: item.fromTaskName,
});
});
})
})
const param = {
result: true,
comment: "",
disposeType: "",
disposeTypeId: "",
failCauseId: "",
failCauseName: "",
comment: '',
disposeType: '',
disposeTypeId: '',
failCauseId: '',
failCauseName: '',
flowTaskInfoList: list,
};
}
dialog.info({
title: "确认提示",
content: "确认给该任务审批为【通过】吗?",
positiveText: "确定",
negativeText: "取消",
title: '确认提示',
content: '确认给该任务审批为【通过】吗?',
positiveText: '确定',
negativeText: '取消',
onPositiveClick: () => {
doAudit(param);
doAudit(param)
},
onNegativeClick: () => {},
});
})
}
function doAudit(param: any) {
audit(param).then((res) => {
const { code } = res;
setBatch(false);
if (code === "OK") {
message.info(res.message);
emitter.emit("refresh");
refreshHandler();
} else {
message.error(res.message);
const { code } = res
setBatch(false)
if (code === 'OK') {
message.info(res.message)
emitter.emit('refresh')
refreshHandler()
}
});
else {
message.error(res.message)
}
})
}
function reloadList() {
setBatch(false);
refreshHandler();
setBatch(false)
refreshHandler()
}
function handleRejectdubiousfileyd() {
dialog.info({
title: "确认提示",
content: "确认将图片移入可疑文件夹吗?",
positiveText: "确定",
negativeText: "取消",
title: '确认提示',
content: '确认将图片移入可疑文件夹吗?',
positiveText: '确定',
negativeText: '取消',
onPositiveClick: () => {
audit(param).then(async (res) => {
const { code } = res;
if (code === "OK") {
const { code } = res
if (code === 'OK') {
dubiousfileyd(taskDetailInfo.value.pictureId).then(() => {
refreshHandler();
});
} else {
message.error(res.message);
refreshHandler()
})
}
else {
message.error(res.message)
}
});
})
},
onNegativeClick: () => {},
});
})
}
defineExpose({
queryDetail,
});
})
</script>
<template>
@ -553,12 +568,11 @@ defineExpose({
</div>
<div class="time">
<SvgIcon color="#FFF" size="16" name="save" />
<span class="time-value"
>{{
taskDetailInfo?.submitDateTimestamp
? format(taskDetailInfo?.submitDateTimestamp, "yyyy-MM-dd HH:mm:ss")
: "-"
}}
<span class="time-value">{{
taskDetailInfo?.submitDateTimestamp
? format(taskDetailInfo?.submitDateTimestamp, "yyyy-MM-dd HH:mm:ss")
: "-"
}}
</span>
</div>
</div>
@ -568,13 +582,13 @@ defineExpose({
class="img-status"
src="@/assets/images/task/pass.png"
alt=""
/>
>
<img
v-show="taskDetailInfo?.historyStates === 3"
class="img-status"
src="@/assets/images/task/not_pass.png"
alt=""
/>
>
</div>
<!-- 右下信息 -->
<div class="info img-info">
@ -585,7 +599,7 @@ defineExpose({
class="icon-status"
src="@/assets/images/task/status.png"
alt=""
/>
>
</span>
</n-gi>
<n-gi span="8" class="gi2">
@ -600,12 +614,11 @@ defineExpose({
class="icon-status"
src="@/assets/images/task/similarity.png"
alt=""
/>
>
</span>
</n-gi>
<n-gi span="8" class="gi2">
<span class="value num"
>{{ totalCount }}<span class="unit"></span>
<span class="value num">{{ totalCount }}<span class="unit"></span>
</span>
<span class="label">相似匹配</span>
</n-gi>
@ -662,8 +675,7 @@ defineExpose({
color: #333333;
font-family: PingFang SC, PingFang SC-Medium;
"
>任务包图片</span
>
>任务包图片</span>
</div>
<div
style="
@ -749,46 +761,41 @@ defineExpose({
@update:checked="onCheckChange($event, item)"
/>
</div>
<<<<<<< HEAD
<div class="percent">
=======
<div class="percent" :class="{ 'percent-red': item?.maxSimilarity >= 100 }">
>>>>>>> test
<SvgIcon
size="42"
:name="item.maxSimilarity == 100 ? 'error_tag' : 'tag'"
/>
<div class="val">
{{ item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0)
}}<span class="percent-unit">%</span>
</div>
</div>
<div v-if="item.historyStates === 2" class="pass-status">
<SvgIcon name="pass-icon" style="width: 52; height: 24px" />
</div>
<div v-else-if="item.historyStates === 3" class="pass-status">
<SvgIcon name="no-pass-icon" style="width: 52; height: 24px" />
<div class="percent" :class="{ 'percent-red': item?.maxSimilarity >= 100 }">
<SvgIcon
size="42"
:name="Number(item.maxSimilarity) === 100 ? 'error_tag' : 'tag'"
/>
<div class="val">
{{ item?.maxSimilarity && Number(item?.maxSimilarity).toFixed(0)
}}<span class="percent-unit">%</span>
</div>
</div>
<div v-if="item.historyStates === 2" class="pass-status">
<SvgIcon name="pass-icon" style="width: 52; height: 24px" />
</div>
<div v-else-if="item.historyStates === 3" class="pass-status">
<SvgIcon name="no-pass-icon" style="width: 52; height: 24px" />
</div>
<div v-show="overTask && overTask.id === item.id" class="action">
<SvgIcon
v-if="item.historyStates === 1"
style="cursor: pointer"
name="t1"
@click.stop="approvalHandler"
/>
<SvgIcon
v-if="[1].includes(item.historyStates)"
style="cursor: pointer; margin-left: 40px"
name="t2"
@click.stop="singleRejectHandler(item)"
/>
<SvgIcon
style="cursor: pointer; margin-left: 30px"
name="t9"
@click.stop="handleRejectdubiousfileyd"
/>
</div>
<div v-show="overTask && overTask.id === item.id" class="action">
<SvgIcon
v-if="item.historyStates === 1"
style="cursor: pointer"
name="t1"
@click.stop="approvalHandler"
/>
<SvgIcon
v-if="[1].includes(item.historyStates)"
style="cursor: pointer; margin-left: 40px"
name="t2"
@click.stop="singleRejectHandler(item)"
/>
<SvgIcon
style="cursor: pointer; margin-left: 30px"
name="t9"
@click.stop="handleRejectdubiousfileyd"
/>
</div>
<n-back-top
:listen-to="wrapperListRef"

Loading…
Cancel
Save