Commit c9c063f4 by zhuzhequan

tiff 按钮加载bug修复

parent 5456fcc1
......@@ -329,7 +329,7 @@
<ElButton
:loading="tifDownloadLoading"
type="warning"
@click="downloadTif('tiff', 'tiff')"
@click="downloadTif('tiff')"
>
TIF排版
</ElButton>
......@@ -338,7 +338,7 @@
<ElButton
:loading="pngDownloadLoading"
type="warning"
@click="downloadTif('png', 'composingPNG')"
@click="downloadTif('png')"
>
PNG排版
</ElButton>
......@@ -1636,7 +1636,7 @@ import platformJson from '../../../json/platform.json'
declare global {
interface Window {
ActiveXObject: {
new (type: string): XMLHttpRequest
new(type: string): XMLHttpRequest
}
VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] }
......@@ -2183,7 +2183,7 @@ const productionClientVisible = ref(false)
// productionClientVisible.value = true
// }
const downloadTif = async (type: string, dir: string) => {
const downloadTif = async (type: string) => {
if (!cardSelection.value.length) {
return ElMessage.warning('请选择数据')
}
......@@ -2197,7 +2197,8 @@ const downloadTif = async (type: string, dir: string) => {
cardSelection.value.map((el) => el.id),
type,
)
window.open(`https://ps.jomalls.com/${dir}/` + res.message, '_blank')
const url = type === 'tiff' ? `https://ps.jomalls.com/tiff/` + res.message : filePath + res.message
window.open(url, '_blank')
if (type === 'tiff') {
tifDownloadLoading.value = false
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment