| | |
| | | |
| | | <script setup> |
| | | import PanoramaPopup from '@/components/PanoramaPopup/PanoramaPopup.vue'; |
| | | import { getShowImg, getSmallImg, getzsSmallImg,getzsShowImg } from '@/utils/util'; |
| | | import { getShowImg, getSmallImg, getzsSmallImg, getzsShowImg, aLinkDownloadUtil } from '@/utils/util'; |
| | | import { getaiImagesPageAPI,cancelDownloadApi,getDownloadStatusApi,attachDownload,aiImagesPage} from '@/api/dataCenter/dataCenter'; |
| | | import { pxToRem } from '@/utils/rem' |
| | | import JobRelatedEvents from './JobRelatedEvents.vue' |
| | |
| | | } |
| | | // 下载 |
| | | const downloadFun = async () => { |
| | | const list = achievementList.value.filter(i => i.checked) |
| | | console.log('list',list); |
| | | if (!list?.length) return ElMessage.warning('请选择文件') |
| | | if (list.length === 1) { |
| | | list.forEach((item, index) => { |
| | | const suffix = item.url.split('.').pop() |
| | | aLinkDownloadUtil(item.url, item.nickName + '.' + suffix) |
| | | }) |
| | | } else { |
| | | loadingData = ElLoading.service({ background: 'rgba(0, 0, 0, 0.5)', text: '打包中,请稍等...' }) |
| | | const fileIds = list.map(i => i.id) |
| | | const res = await getDownloadStatusApi({type: 'htlsrwxq'}) |
| | | if (!['CANCELLED','COMPLETED'].includes(res.data.data?.status || 'COMPLETED')){ |
| | | return ElMessage.warning('还有正在处理的') |
| | | } |
| | | attachDownload({ attachIds: fileIds,type:'htlsrwxq' }).finally(()=>{ |
| | | loadingData.close() |
| | | }) |
| | | } |
| | | const list = achievementList.value.filter(i => i.checked) |
| | | console.log('list',list); |
| | | if (!list?.length) return ElMessage.warning('请选择文件') |
| | | if (list.length === 1) { |
| | | list.forEach((item, index) => { |
| | | const suffix = item.link.split('.').pop() |
| | | aLinkDownloadUtil(item.link, item.nickName + '.' + suffix) |
| | | }) |
| | | } else { |
| | | loadingData = ElLoading.service({ background: 'rgba(0, 0, 0, 0.5)', text: '打包中,请稍等...' }) |
| | | const fileIds = list.map(i => i.id) |
| | | const res = await getDownloadStatusApi({type: 'htlsrwxq'}) |
| | | if (!['CANCELLED','COMPLETED'].includes(res.data.data?.status || 'COMPLETED')){ |
| | | return ElMessage.warning('还有正在处理的') |
| | | } |
| | | attachDownload({ attachIds: fileIds,type:'htlsrwxq' }).finally(()=>{ |
| | | loadingData.close() |
| | | }) |
| | | } |
| | | } |
| | | // 全景预览 |
| | | const panoramaParamsShow = ref(false) |