diff --git a/src/views/property-marketing/put-account/investment-guidelines/components/table-data/guideListHistory.vue b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/guideListHistory.vue index eac738f..cba3821 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/table-data/guideListHistory.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/guideListHistory.vue @@ -21,7 +21,7 @@ - 下载 + 下载 详情 @@ -82,32 +82,24 @@ const goDetail = async (id) => { router.push(`/put-account/detail/${id}`); }; -const downloadDetailAsImage = (id) => { - const url = `/put-account/detail/${id}`; - const win = window.open(url, '_blank'); - - win.onload = () => { - setTimeout(() => { - html2canvas(win.document.body, { - useCORS: true, - scale: 2, - }).then((canvas) => { - const imgData = canvas.toDataURL('image/png'); - const link = document.createElement('a'); - link.href = imgData; - link.download = `详情页面_${Date.now()}.png`; - link.click(); - win.close(); // 关闭新窗口 - }); - }, 2000); // 等待页面加载 - }; +const downLoad = (fileUrl) => { + if (isEmpty(fileUrl)) { + Message.error('下载失败,文件不存在'); + return; + } + const link = document.createElement('a'); + link.href = fileUrl; + link.download = '投放指南.pdf'; + document.body.appendChild(link); + link.click(); + document.body.removeChild(link); }; const deleteData = async (id) => { const { code, message } = await deleteHistorylog(id); if (code == 200) { Message.success(message); emits('onSearch'); - console.log('onsearch') + console.log('onsearch'); } }; diff --git a/src/views/property-marketing/put-account/investment-guidelines/components/table-data/listSearchForm.vue b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/listSearchForm.vue index a28c68f..816b0cb 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/table-data/listSearchForm.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/listSearchForm.vue @@ -50,7 +50,7 @@
- + diff --git a/src/views/property-marketing/put-account/investment-guidelines/components/table-data/placementGuideList.vue b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/placementGuideList.vue index 456372c..ebd2c5b 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/components/table-data/placementGuideList.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/components/table-data/placementGuideList.vue @@ -54,8 +54,7 @@ diff --git a/src/views/property-marketing/put-account/investment-guidelines/index.vue b/src/views/property-marketing/put-account/investment-guidelines/index.vue index 20298ce..a1f079a 100644 --- a/src/views/property-marketing/put-account/investment-guidelines/index.vue +++ b/src/views/property-marketing/put-account/investment-guidelines/index.vue @@ -5,7 +5,7 @@ @@ -16,6 +16,7 @@
- -
- + +
- +
-
-
+