提交 5e96e3ce authored 作者: huhuiqing's avatar huhuiqing

智库报告原文

上级 d5e537f5
...@@ -33,9 +33,14 @@ ...@@ -33,9 +33,14 @@
</div> </div>
<div class="report-box"> <div class="report-box">
<iframe :src="reportUrl" width="50%" height="100%">
<pdf :pdfUrl="reportUrl" style="width: 48%;" /> </iframe>
<pdf :pdfUrl="reportUrlEn" style="width: 48%;" /> <iframe :src="reportUrlEn" width="50%" height="100%">
</iframe>
<!-- <pdf :pdfUrl="reportUrl" style="width: 48%;" />
<pdf :pdfUrl="reportUrlEn" style="width: 48%;" /> -->
<!-- <iframe src="https://www.rand.org/pubs/research_reports/RRA3572-1.html" width="100%" height="600px" <!-- <iframe src="https://www.rand.org/pubs/research_reports/RRA3572-1.html" width="100%" height="600px"
frameborder="0" allowfullscreen></iframe> --> frameborder="0" allowfullscreen></iframe> -->
</div> </div>
...@@ -47,7 +52,8 @@ ...@@ -47,7 +52,8 @@
import { ref, onMounted } from "vue"; import { ref, onMounted } from "vue";
import pdf from "./pdf.vue"; import pdf from "./pdf.vue";
import { import {
getThinkTankReportSummary getThinkTankReportSummary,
getThinkTankReportcontentUrl
} from "@/api/thinkTank/overview"; } from "@/api/thinkTank/overview";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
...@@ -66,15 +72,27 @@ const handleGetThinkTankReportSummary = async () => { ...@@ -66,15 +72,27 @@ const handleGetThinkTankReportSummary = async () => {
const res = await getThinkTankReportSummary(router.currentRoute._value.params.id); const res = await getThinkTankReportSummary(router.currentRoute._value.params.id);
console.log("报告全局信息", res); console.log("报告全局信息", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
reportUrl.value = res.data.contentUrl
reportUrlEn.value = res.data.contentEn
thinkInfo.value = res.data thinkInfo.value = res.data
} }
} catch (error) { } catch (error) {
console.error("获取报告全局信息error", error); console.error("获取报告全局信息error", error);
} }
}; };
//获取原文
const handleGetThinkTankReportcontentUrl = async () => {
try {
const res = await getThinkTankReportcontentUrl(router.currentRoute._value.params.id);
console.log("获取原文", res);
if (res.code === 200 && res.data) {
reportUrl.value = res.data.content
reportUrlEn.value = res.data.contentEn
}
} catch (error) {
console.error("获取原文error", error);
}
};
const tabActiveName = ref("报告分析"); const tabActiveName = ref("报告分析");
...@@ -83,6 +101,7 @@ const switchTab = name => { ...@@ -83,6 +101,7 @@ const switchTab = name => {
}; };
onMounted(async () => { onMounted(async () => {
handleGetThinkTankReportSummary() handleGetThinkTankReportSummary()
handleGetThinkTankReportcontentUrl()
}); });
</script> </script>
...@@ -93,7 +112,7 @@ onMounted(async () => { ...@@ -93,7 +112,7 @@ onMounted(async () => {
.header { .header {
width: 1920px; width: 1920px;
height: 125px;
box-sizing: border-box; box-sizing: border-box;
border-bottom: 1px solid rgba(234, 236, 238, 1); border-bottom: 1px solid rgba(234, 236, 238, 1);
border-top: 1px solid rgba(234, 236, 238, 1); border-top: 1px solid rgba(234, 236, 238, 1);
...@@ -103,6 +122,7 @@ onMounted(async () => { ...@@ -103,6 +122,7 @@ onMounted(async () => {
.header-top { .header-top {
margin-top: 20px; margin-top: 20px;
margin-left: 160px; margin-left: 160px;
margin-bottom: 20px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-right: 160px; margin-right: 160px;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论