| | |
| | | import dayjs from 'dayjs'; |
| | | |
| | | function bytesToMB(bytes, decimalPlaces = 2) { |
| | | if (typeof bytes !== 'number' || bytes < 0) return '--'; |
| | | if (typeof bytes !== 'number' || bytes < 0) return '无效输入'; |
| | | return (bytes / 1048576).toFixed(decimalPlaces) + ' MB'; |
| | | } |
| | | // 视频一帧 |
| | |
| | | const fileDownload = () => { |
| | | const list = selectedRows.value.filter(i => i.checked); |
| | | if (!list?.length) return ElMessage.warning('请选择文件'); |
| | | if (list.length === 1) { |
| | | list.forEach((item, index) => { |
| | | setTimeout(() => { |
| | | aLinkDownload(item.url, item?.nickName); |
| | | }, index * 500); // 每个文件下载间隔50毫秒 |
| | | }); |
| | | } else { |
| | | if (list.length === 1) { |
| | | list.forEach((item, index) => { |
| | | const suffix = item.url.split('.').pop() |
| | | aLinkDownload(item.url, item.nickName + '.' + suffix) |
| | | }) |
| | | } else { |
| | | loading = ElLoading.service({ background: 'rgba(0, 0, 0, 0.5)', text: '打包中,请稍等...' }); |
| | | const fileIds = list.map(i => i.id); |
| | | let aaa = { |
| | |
| | | const positiongeom = ref(''); |
| | | const odmToken = ref(null); |
| | | const lookDetail = val => { |
| | | console.log('查看',val) |
| | | if (val.resultType === 4) { |
| | | // 正射 |
| | | getOrthoimageInfo(val.wayLineJobId).then(async res => { |
| | | dialogVisible.value = true; |
| | | detailTitle.value = val.nickName; |
| | | dialogDetailList.value = val; |
| | | console.log('3333', detailTitle.value, dialogDetailList.value); |
| | | |
| | | await nextTick(); |
| | | initMap(); |
| | | positiongeom.value = res.data.data.geom; |
| | |
| | | } else { |
| | | getAttachInfoAPI(val.id).then(res => { |
| | | detailTitle.value = res.data.data.nickName.split('.jpeg')[0]; |
| | | ; |
| | | |
| | | dialogDetailList.value = { |
| | | ...res.data.data, |
| | | checkedinput: false, |