|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
import { computed, onMounted, onUnmounted, reactive, ref, unref, watch } from 'vue'
|
|
|
|
|
import { chunk, clone } from 'lodash-es'
|
|
|
|
|
import { useDialog, useMessage } from 'naive-ui'
|
|
|
|
|
import { useRoute } from 'vue-router'
|
|
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
|
|
import BatchModal from '../modal/BatchModal.vue'
|
|
|
|
|
import CustomSettingModal from '../modal/CustomSettingModal.vue'
|
|
|
|
|
import PictureTable from './PictureTable.vue'
|
|
|
|
@ -25,6 +25,9 @@ import { formatToDateHMS } from '@/utils/dateUtil'
|
|
|
|
|
import { hideDownload } from '@/utils/image'
|
|
|
|
|
|
|
|
|
|
const emit = defineEmits(['setAsideItemName'])
|
|
|
|
|
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
|
|
|
|
|
const batch = ref(false)
|
|
|
|
|
const selectItems = ref<any[]>([])
|
|
|
|
|
const message = useMessage()
|
|
|
|
@ -37,22 +40,12 @@ const packageId: any = ref('') // 包id
|
|
|
|
|
const CustomSettingModalRef = ref(null)
|
|
|
|
|
const taskTableData = ref<any[]>([])
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
|
|
|
|
|
const isDetail = ref(false) // 是否是详情
|
|
|
|
|
const sortBy: any = {
|
|
|
|
|
orderType: 'desc',
|
|
|
|
|
orderName: 'similarityScore',
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setBatch(value: boolean) {
|
|
|
|
|
if (totalCount.value === 0)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
batch.value = value
|
|
|
|
|
|
|
|
|
|
if (value === false)
|
|
|
|
|
selectItems.value = []
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function onCheckChange(checked: any, item: any) {
|
|
|
|
|
const index = selectItems.value.indexOf(item)
|
|
|
|
|
item.checked = checked
|
|
|
|
@ -77,23 +70,23 @@ const taskDetailPictureList = ref<any[]>([])
|
|
|
|
|
const userStore = useUser()
|
|
|
|
|
const imageRef = ref<ComponentElRef | null>()
|
|
|
|
|
let processItems: any[] = []
|
|
|
|
|
const isFullScreen = ref(false);
|
|
|
|
|
const isFullScreen = ref(false)
|
|
|
|
|
|
|
|
|
|
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 ? '9999' : '',
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
width: isFullScreen.value ? '100vw' : '',
|
|
|
|
|
height: isFullScreen.value ? '100vh' : '',
|
|
|
|
|
position: isFullScreen.value ? 'fixed' : '',
|
|
|
|
|
top: isFullScreen.value ? '0' : '',
|
|
|
|
|
left: isFullScreen.value ? '0' : '',
|
|
|
|
|
zIndex: isFullScreen.value ? '9999' : '',
|
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
window.addEventListener('keydown', handleKeydown)
|
|
|
|
|
if (route.query.id) {
|
|
|
|
|
taskId.value = route.query.id
|
|
|
|
|
packageId.value = route.query.packageid
|
|
|
|
|
isDetail.value = true
|
|
|
|
|
getDetail()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -108,6 +101,21 @@ function handleKeydown(event) {
|
|
|
|
|
// 在这里执行右箭头的逻辑
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function setBatch(value: boolean) {
|
|
|
|
|
// if (totalCount.value === 0)
|
|
|
|
|
// return
|
|
|
|
|
|
|
|
|
|
batch.value = value
|
|
|
|
|
|
|
|
|
|
if (value === false) {
|
|
|
|
|
taskDetailInfo.value.checked = false
|
|
|
|
|
selectItems.value = []
|
|
|
|
|
taskDetailPictureList.value.forEach((item) => {
|
|
|
|
|
item.checked = false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 从store里面获取任务id
|
|
|
|
|
function currentTaskId() {
|
|
|
|
|
const index = taskStore.getCurrentIndex
|
|
|
|
@ -202,7 +210,7 @@ function doAudit(param: any) {
|
|
|
|
|
audit(param).then((res) => {
|
|
|
|
|
const { code } = res
|
|
|
|
|
if (code === 'OK') {
|
|
|
|
|
message.success('审核成功')
|
|
|
|
|
message.success(res.message)
|
|
|
|
|
setBatch(false)
|
|
|
|
|
reloadList(param, '通过')
|
|
|
|
|
}
|
|
|
|
@ -311,12 +319,12 @@ onUnmounted(() => {
|
|
|
|
|
|
|
|
|
|
function immersionHandler() {
|
|
|
|
|
// taskStore.updateImmersion()
|
|
|
|
|
toggleFullScreen();
|
|
|
|
|
toggleFullScreen()
|
|
|
|
|
}
|
|
|
|
|
// 切换全屏状态
|
|
|
|
|
const toggleFullScreen = () => {
|
|
|
|
|
isFullScreen.value = !isFullScreen.value;
|
|
|
|
|
};
|
|
|
|
|
function toggleFullScreen() {
|
|
|
|
|
isFullScreen.value = !isFullScreen.value
|
|
|
|
|
}
|
|
|
|
|
function previewHandler(event: MouseEvent) {
|
|
|
|
|
event.stopImmediatePropagation()
|
|
|
|
|
event.stopPropagation()
|
|
|
|
@ -354,6 +362,14 @@ function reloadList(param, text) {
|
|
|
|
|
|
|
|
|
|
getDetail()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function goBack() {
|
|
|
|
|
router.back()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function switchBatch() {
|
|
|
|
|
setBatch(!batch.value)
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
@ -361,12 +377,14 @@ function reloadList(param, text) {
|
|
|
|
|
<div class="wrapper-header">
|
|
|
|
|
<div class="left">
|
|
|
|
|
<span class="font">任务ID:{{ taskDetailInfo.fromtaskname }}</span>
|
|
|
|
|
<SvgIcon size="22" class="forward" name="arrow-left" @click="backHandler" />
|
|
|
|
|
<SvgIcon size="22" class="back" name="arrow-right" @click="forwardHandler" />
|
|
|
|
|
<template v-if="!isDetail">
|
|
|
|
|
<SvgIcon size="22" class="forward" name="arrow-left" @click="backHandler" />
|
|
|
|
|
<SvgIcon size="22" class="back" name="arrow-right" @click="forwardHandler" />
|
|
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="right">
|
|
|
|
|
<div v-if="!isDetail" class="right">
|
|
|
|
|
<div v-show="!showActions" style="display: flex; align-items: center">
|
|
|
|
|
<div class="btn" @click="setBatch(true)">
|
|
|
|
|
<div class="btn" @click="switchBatch()">
|
|
|
|
|
<SvgIcon style="margin-right: 6px" size="22" name="batch" />
|
|
|
|
|
批量审批
|
|
|
|
|
</div>
|
|
|
|
@ -396,12 +414,12 @@ function reloadList(param, text) {
|
|
|
|
|
</ul>
|
|
|
|
|
</n-popover> -->
|
|
|
|
|
<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>
|
|
|
|
|
<div v-show="showActions" class="batch">
|
|
|
|
|
<n-button text @click="setBatch(false)">
|
|
|
|
|
<n-button text @click="switchBatch()">
|
|
|
|
|
<template #icon>
|
|
|
|
|
<SvgIcon name="revoke" />
|
|
|
|
|
</template>
|
|
|
|
@ -422,6 +440,14 @@ function reloadList(param, text) {
|
|
|
|
|
>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-else class="right">
|
|
|
|
|
<n-button text @click="goBack">
|
|
|
|
|
<template #icon>
|
|
|
|
|
<SvgIcon name="revoke" />
|
|
|
|
|
</template>
|
|
|
|
|
返回
|
|
|
|
|
</n-button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="wrapper-detail">
|
|
|
|
|
<div
|
|
|
|
|