|
|
|
@ -1,84 +1,88 @@
|
|
|
|
|
<script lang="ts" setup>
|
|
|
|
|
import { audit } from '@/api/task/task';
|
|
|
|
|
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, onUnmounted, onUpdated, reactive, 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;
|
|
|
|
|
dubiousfileyd,
|
|
|
|
|
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, onUnmounted, onUpdated, reactive, 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
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
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 canloadMore = true;
|
|
|
|
|
|
|
|
|
|
let processItems: any[] = [];
|
|
|
|
|
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
|
|
|
|
@ -92,202 +96,210 @@ 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 }
|
|
|
|
|
);
|
|
|
|
|
{ ...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;
|
|
|
|
|
|
|
|
|
|
_imagesload = imagesloaded(".grid-item");
|
|
|
|
|
if (el.value == null)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
_imagesload.on("done", (instance) => {
|
|
|
|
|
if (!el.value) return;
|
|
|
|
|
loading.value = false;
|
|
|
|
|
});
|
|
|
|
|
_imagesload = imagesloaded('.grid-item')
|
|
|
|
|
|
|
|
|
|
_imagesload.on("fail", (instance) => {
|
|
|
|
|
message.error("图片错误");
|
|
|
|
|
loading.value = false;
|
|
|
|
|
});
|
|
|
|
|
}, 300);
|
|
|
|
|
_imagesload.on('done', (instance) => {
|
|
|
|
|
if (!el.value)
|
|
|
|
|
return
|
|
|
|
|
loading.value = false
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
_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' : '',
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
// 切换全屏状态
|
|
|
|
|
const toggleFullScreen = () => {
|
|
|
|
|
isFullScreen.value = !isFullScreen.value;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function toggleFullScreen() {
|
|
|
|
|
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;
|
|
|
|
|
listData.value.length = 0
|
|
|
|
|
totalCount.value = 0
|
|
|
|
|
taskDetailInfo.value = {}
|
|
|
|
|
return;
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
|
return;
|
|
|
|
|
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) {
|
|
|
|
|
if (item?.historyStates === 2 || item?.historyStates == 3) {
|
|
|
|
|
overTask.value = null;
|
|
|
|
|
return;
|
|
|
|
|
overTask.value = null
|
|
|
|
|
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
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onUnmounted(() => {
|
|
|
|
|
workStore.reset();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
workStore.reset()
|
|
|
|
|
document.removeEventListener('keydown', onEsc)
|
|
|
|
|
})
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
document.addEventListener('keydown', onEsc)
|
|
|
|
|
})
|
|
|
|
|
function immersionHandler() {
|
|
|
|
|
// class="wrapper"
|
|
|
|
|
// workStore.updateImmersion();
|
|
|
|
|
toggleFullScreen();
|
|
|
|
|
|
|
|
|
|
toggleFullScreen()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function showAction() {
|
|
|
|
|
const item = taskDetailInfo.value;
|
|
|
|
|
if (item.historyStates === 2 || item.historyStates === 3) {
|
|
|
|
|
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() {
|
|
|
|
|
overTask.value = null;
|
|
|
|
|
overTask.value = null
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
@ -320,8 +332,8 @@ function handleRejectMainImage() {
|
|
|
|
|
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
|
|
|
|
@ -365,10 +377,10 @@ function handleApproveMainImage(items?: any) {
|
|
|
|
|
const { code } = res
|
|
|
|
|
if (code === 'OK') {
|
|
|
|
|
message.info(res.message)
|
|
|
|
|
const packageid = workStore.getActiveId;
|
|
|
|
|
taskDetailInfo.value = await getTaskDetailInfo(packageid);
|
|
|
|
|
const packageid = workStore.getActiveId
|
|
|
|
|
taskDetailInfo.value = await getTaskDetailInfo(packageid)
|
|
|
|
|
}
|
|
|
|
|
else message.error(res.message)
|
|
|
|
|
else { message.error(res.message) }
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onNegativeClick: () => { },
|
|
|
|
@ -434,7 +446,7 @@ function doAudit(param: any) {
|
|
|
|
|
emitter.emit('refresh')
|
|
|
|
|
refreshHandler()
|
|
|
|
|
}
|
|
|
|
|
else message.error(res.message)
|
|
|
|
|
else { message.error(res.message) }
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -442,8 +454,28 @@ function reloadList() {
|
|
|
|
|
setBatch(false)
|
|
|
|
|
refreshHandler()
|
|
|
|
|
}
|
|
|
|
|
function handleRejectdubiousfileyd() {
|
|
|
|
|
dialog.info({
|
|
|
|
|
title: '确认提示',
|
|
|
|
|
content: '确认将图片移入可疑文件夹吗?',
|
|
|
|
|
positiveText: '确定',
|
|
|
|
|
negativeText: '取消',
|
|
|
|
|
onPositiveClick: () => {
|
|
|
|
|
audit(param).then(async (res) => {
|
|
|
|
|
const { code } = res
|
|
|
|
|
if (code === 'OK') {
|
|
|
|
|
dubiousfileyd(taskDetailInfo.value.pictureId).then(() => {
|
|
|
|
|
refreshHandler()
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
else { message.error(res.message) }
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
onNegativeClick: () => { },
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
defineExpose({
|
|
|
|
|
queryDetail
|
|
|
|
|
queryDetail,
|
|
|
|
|
})
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
@ -462,8 +494,8 @@ defineExpose({
|
|
|
|
|
批量审批
|
|
|
|
|
</div>
|
|
|
|
|
<div class="icon-wrap">
|
|
|
|
|
<SvgIcon size="20" v-if="isFullScreen" name="power-off" @click="immersionHandler" style="cursor: pointer;" />
|
|
|
|
|
<SvgIcon size="20" v-else name="immersion-model" @click="immersionHandler" style="cursor: pointer;" />
|
|
|
|
|
<SvgIcon v-if="isFullScreen" size="20" name="power-off" style="cursor: pointer;" @click="immersionHandler" />
|
|
|
|
|
<SvgIcon v-else size="20" name="immersion-model" style="cursor: pointer;" @click="immersionHandler" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
@ -489,8 +521,10 @@ defineExpose({
|
|
|
|
|
<div ref="el" class="scroll">
|
|
|
|
|
<div class="wrapper-detail">
|
|
|
|
|
<!-- 左侧大图 图片信息 -->
|
|
|
|
|
<div class="left" :style="{ 'background-image': `url(${taskDetailInfo?.imgurl})` }" @click="showAction"
|
|
|
|
|
@mouseleave="leaveTaskHandler">
|
|
|
|
|
<div
|
|
|
|
|
class="left" :style="{ 'background-image': `url(${taskDetailInfo?.serverThumbnailUrl || taskDetailInfo?.imgurl})` }" @click="showAction"
|
|
|
|
|
@mouseleave="leaveTaskHandler"
|
|
|
|
|
>
|
|
|
|
|
<div class="footer-times">
|
|
|
|
|
<div class="time" style="margin-bottom: 4px;">
|
|
|
|
|
<SvgIcon color="#FFF" size="16" name="camera" />
|
|
|
|
@ -501,16 +535,19 @@ defineExpose({
|
|
|
|
|
<SvgIcon color="#FFF" size="16" name="save" />
|
|
|
|
|
<span class="time-value">{{
|
|
|
|
|
taskDetailInfo?.submitDateTimestamp ? format(taskDetailInfo?.submitDateTimestamp, 'yyyy-MM-dd HH:mm:ss')
|
|
|
|
|
:
|
|
|
|
|
'-'
|
|
|
|
|
: '-'
|
|
|
|
|
}} </span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="status">
|
|
|
|
|
<img v-show="taskDetailInfo?.historyStates === 2" 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="">
|
|
|
|
|
<img
|
|
|
|
|
v-show="taskDetailInfo?.historyStates === 2" 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">
|
|
|
|
@ -547,41 +584,47 @@ defineExpose({
|
|
|
|
|
</div>
|
|
|
|
|
<!-- 操作 -->
|
|
|
|
|
<div v-show="overTask && overTask.id === taskDetailInfo.id" class="action" @click.stop="hideAction">
|
|
|
|
|
<SvgIcon style="cursor: pointer" name="t1" @click.stop="handleApproveMainImage" />
|
|
|
|
|
<SvgIcon style="cursor: pointer; margin-left: 30px" name="t2" @click.stop="handleRejectMainImage" />
|
|
|
|
|
<SvgIcon v-if="[1].includes(taskDetailInfo.historyStates)" style="cursor: pointer" name="t1" @click.stop="handleApproveMainImage" />
|
|
|
|
|
<SvgIcon v-if="[1].includes(taskDetailInfo.historyStates)" style="cursor: pointer; margin-left: 30px" name="t2" @click.stop="handleRejectMainImage" />
|
|
|
|
|
<SvgIcon v-if="[1, 2, 3].includes(taskDetailInfo.historyStates)" style="cursor: pointer; margin-left: 30px" name="t2" @click.stop="handleRejectdubiousfileyd" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<PictureInfo :taskDetailInfo="taskDetailInfo"></PictureInfo>
|
|
|
|
|
<PictureInfo :task-detail-info="taskDetailInfo" />
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: flex; justify-content: space-between; padding: 12px 0px 3px 0">
|
|
|
|
|
<div>
|
|
|
|
|
<span
|
|
|
|
|
style="font-size: 18px; font-weight: Medium;color: #333333;font-family: PingFang SC, PingFang SC-Medium;">任务包图片</span>
|
|
|
|
|
style="font-size: 18px; font-weight: Medium;color: #333333;font-family: PingFang SC, PingFang SC-Medium;"
|
|
|
|
|
>任务包图片</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div style="display: flex; align-items: center;font-size: 14px;margin-right: 25px;color:#323233">
|
|
|
|
|
<div style="cursor: pointer" @click="sortHandler('createdate')">
|
|
|
|
|
<span>时间排序</span>
|
|
|
|
|
<SvgIcon style="margin-left: 5px" name="sort" size="12" v-show="selectedSortName !== 'createdate'" />
|
|
|
|
|
<SvgIcon style="margin-left: 5px" name="active-sort" size="12" v-show="selectedSortName === 'createdate'" />
|
|
|
|
|
<SvgIcon v-show="selectedSortName !== 'createdate'" style="margin-left: 5px" name="sort" size="12" />
|
|
|
|
|
<SvgIcon v-show="selectedSortName === 'createdate'" style="margin-left: 5px" name="active-sort" size="12" />
|
|
|
|
|
</div>
|
|
|
|
|
<div style="margin-left: 15px; cursor: pointer" @click="sortHandler('similarityScore')">
|
|
|
|
|
<span>相似度排序</span>
|
|
|
|
|
<SvgIcon style="margin-left: 5px" name="sort" size="12" v-show="selectedSortName !== 'similarityScore'" />
|
|
|
|
|
<SvgIcon style="margin-left: 5px" name="active-sort" size="12"
|
|
|
|
|
v-show="selectedSortName === 'similarityScore'" />
|
|
|
|
|
<SvgIcon v-show="selectedSortName !== 'similarityScore'" style="margin-left: 5px" name="sort" size="12" />
|
|
|
|
|
<SvgIcon
|
|
|
|
|
v-show="selectedSortName === 'similarityScore'" style="margin-left: 5px" name="active-sort"
|
|
|
|
|
size="12"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrapper-list">
|
|
|
|
|
<div v-for="(item, index) in listData" :key="index" :class="{ 'item-selected': item === selectTask }"
|
|
|
|
|
<div ref="wrapperListRef" class="wrapper-list">
|
|
|
|
|
<div
|
|
|
|
|
v-for="(item, index) in listData" :key="index" :class="{ 'item-selected': item === selectTask }"
|
|
|
|
|
class="grid-item" @click="handleSelect(item)" @mouseover="overTaskHandelr(item)"
|
|
|
|
|
@mouseleave="leaveTaskHandler">
|
|
|
|
|
@mouseleave="leaveTaskHandler"
|
|
|
|
|
>
|
|
|
|
|
<div class="img-wrapper" :style="{ 'background-image': `url(${item.imgurl})` }" />
|
|
|
|
|
<div class="time-wrapper">
|
|
|
|
|
<div class="time">
|
|
|
|
|
<SvgIcon color="#FFF" size="16" name="camera" />
|
|
|
|
|
<span class="current-time">{{ item.photoDateTimestamp ? formatToDateHMS(Number(item.photoDateTimestamp) ||
|
|
|
|
|
0) : '-'
|
|
|
|
|
<span class="current-time">{{ item.photoDateTimestamp ? formatToDateHMS(Number(item.photoDateTimestamp)
|
|
|
|
|
|| 0) : '-'
|
|
|
|
|
}}</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="time">
|
|
|
|
@ -592,8 +635,10 @@ defineExpose({
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="check">
|
|
|
|
|
<n-checkbox v-show="batch && item.historyStates !== 2 && item.historyStates !== 3"
|
|
|
|
|
v-model:checked="item.checked" @click.stop @update:checked="onCheckChange($event, item)" />
|
|
|
|
|
<n-checkbox
|
|
|
|
|
v-show="batch && item.historyStates !== 2 && item.historyStates !== 3"
|
|
|
|
|
v-model:checked="item.checked" @click.stop @update:checked="onCheckChange($event, item)"
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="percent" :class="{ 'percent-red': item?.maxSimilarity >= 100 }">
|
|
|
|
|
<div class="val">
|
|
|
|
@ -601,10 +646,10 @@ defineExpose({
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="pass-status" v-if="item.historyStates === 2">
|
|
|
|
|
<div v-if="item.historyStates === 2" class="pass-status">
|
|
|
|
|
<SvgIcon name="pass-icon" style="width:52;height:24px" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="pass-status" v-else-if="item.historyStates === 3">
|
|
|
|
|
<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">
|
|
|
|
@ -612,6 +657,19 @@ defineExpose({
|
|
|
|
|
<SvgIcon style="cursor: pointer;margin-left: 40px;" name="t2" @click.stop="singleRejectHandler(item)" />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<n-back-top :listen-to="wrapperListRef" :bottom="220" :visibility-height="10">
|
|
|
|
|
<div
|
|
|
|
|
style="
|
|
|
|
|
width: 100px;
|
|
|
|
|
height: 40px;
|
|
|
|
|
line-height: 40px;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
回到顶部
|
|
|
|
|
</div>
|
|
|
|
|
</n-back-top>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</n-spin>
|
|
|
|
@ -885,7 +943,6 @@ defineExpose({
|
|
|
|
|
padding: 24px;
|
|
|
|
|
// background: lime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.task-name {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: 100%;
|
|
|
|
@ -1077,7 +1134,6 @@ defineExpose({
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.action {
|
|
|
|
|
position: absolute;
|
|
|
|
|
z-index: 5;
|
|
|
|
@ -1092,7 +1148,6 @@ defineExpose({
|
|
|
|
|
background-color: rgba(0, 0, 0, 0.48);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|