Commit c9c063f4 by zhuzhequan

tiff 按钮加载bug修复

parent 5456fcc1
...@@ -329,7 +329,7 @@ ...@@ -329,7 +329,7 @@
<ElButton <ElButton
:loading="tifDownloadLoading" :loading="tifDownloadLoading"
type="warning" type="warning"
@click="downloadTif('tiff', 'tiff')" @click="downloadTif('tiff')"
> >
TIF排版 TIF排版
</ElButton> </ElButton>
...@@ -338,7 +338,7 @@ ...@@ -338,7 +338,7 @@
<ElButton <ElButton
:loading="pngDownloadLoading" :loading="pngDownloadLoading"
type="warning" type="warning"
@click="downloadTif('png', 'composingPNG')" @click="downloadTif('png')"
> >
PNG排版 PNG排版
</ElButton> </ElButton>
...@@ -1636,7 +1636,7 @@ import platformJson from '../../../json/platform.json' ...@@ -1636,7 +1636,7 @@ import platformJson from '../../../json/platform.json'
declare global { declare global {
interface Window { interface Window {
ActiveXObject: { ActiveXObject: {
new (type: string): XMLHttpRequest new(type: string): XMLHttpRequest
} }
VBS_BinaryToArray: { VBS_BinaryToArray: {
(data: unknown): { toArray(): number[] } (data: unknown): { toArray(): number[] }
...@@ -2183,7 +2183,7 @@ const productionClientVisible = ref(false) ...@@ -2183,7 +2183,7 @@ const productionClientVisible = ref(false)
// productionClientVisible.value = true // productionClientVisible.value = true
// } // }
const downloadTif = async (type: string, dir: string) => { const downloadTif = async (type: string) => {
if (!cardSelection.value.length) { if (!cardSelection.value.length) {
return ElMessage.warning('请选择数据') return ElMessage.warning('请选择数据')
} }
...@@ -2197,7 +2197,8 @@ const downloadTif = async (type: string, dir: string) => { ...@@ -2197,7 +2197,8 @@ const downloadTif = async (type: string, dir: string) => {
cardSelection.value.map((el) => el.id), cardSelection.value.map((el) => el.id),
type, 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') { if (type === 'tiff') {
tifDownloadLoading.value = false tifDownloadLoading.value = false
} else { } 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