提交 00f4a246 authored 作者: 朱政's avatar 朱政

feat:智库概览页调查项目及智库详情页调查项目功能及样式开发,调查项目详情页功能及样式开发

上级 7a10f6fc
流水线 #264 已通过 于阶段
in 1 分 34 秒
...@@ -91,7 +91,7 @@ export function getHylyList() { ...@@ -91,7 +91,7 @@ export function getHylyList() {
/** /**
* 智库概览/智库动态-智库报告、调查项目 * 智库概览/智库动态-智库报告
* GET /api/thinkTankOverview/report * GET /api/thinkTankOverview/report
* 常用 query:pageNum, pageSize, sortFun, domainIds, startDate, endDate, category(调查项目), thinkTankId(详情页), keyword(动态搜索) * 常用 query:pageNum, pageSize, sortFun, domainIds, startDate, endDate, category(调查项目), thinkTankId(详情页), keyword(动态搜索)
*/ */
...@@ -103,6 +103,42 @@ export function getThinkTankReport(params) { ...@@ -103,6 +103,42 @@ export function getThinkTankReport(params) {
}) })
} }
//智库概览调查项目
export function getThinkTankProjects(params) {
return request({
method: 'GET',
url: `/api/think-tank/projects`,
params
})
}
//智库调查项目详情主页
export function getThinkTankProjectsInfo(params) {
return request({
method: 'GET',
url: `/api/think-tank/projects/${params.id}`,
})
}
// 智库详情-调查项目(按智库 id)
export function getThinkTankProjectsByThinkTankId(params) {
return request({
method: 'GET',
url: `/api/think-tank/${params.thinkTankId}/projects`,
params: {
pageNum: params.pageNum,
pageSize: params.pageSize,
}
})
}
//智库调查项目详情作者
export function getThinkTankProjectsAuthors(params) {
return request({
method: 'GET',
url: `/api/think-tank/projects/${params.id}/team`,
})
}
// 智库概览:政策建议(资源库-政策建议) // 智库概览:政策建议(资源库-政策建议)
export function getThinkTankOverviewPolicy(params) { export function getThinkTankOverviewPolicy(params) {
return request({ return request({
...@@ -378,6 +414,15 @@ export const getThinkTankReportRelated = (params) => { ...@@ -378,6 +414,15 @@ export const getThinkTankReportRelated = (params) => {
} }
); );
} }
//调查项目:获取项目报告
export const getThinkTankProjectRelated = (params) => {
return request(
{
method: 'GET',
url: `/api/think-tank/projects/${params}/reports`,
}
);
}
//获取报告原文 //获取报告原文
export const getThinkTankReportcontentUrl = (params) => { export const getThinkTankReportcontentUrl = (params) => {
...@@ -440,6 +485,13 @@ export function getThinkTankReportIndustryCloud(params) { ...@@ -440,6 +485,13 @@ export function getThinkTankReportIndustryCloud(params) {
url: `/api/thinkTankReport/keyword/${params.id}`, url: `/api/thinkTankReport/keyword/${params.id}`,
}) })
} }
//获取科技领域词云
export function getThinkTankProjectCloud(params) {
return request({
method: 'GET',
url: `/api/think-tank/projects/${params.id}/word-cloud`,
})
}
//获取政策建议落实情况 //获取政策建议落实情况
export function getThinkTankReportPolicy(params) { export function getThinkTankReportPolicy(params) {
......
...@@ -2,60 +2,60 @@ ...@@ -2,60 +2,60 @@
<div class="wrap"> <div class="wrap">
<div class="scroll-inner"> <div class="scroll-inner">
<div class="header"> <div class="header">
<div class="header-top"> <div class="header-top">
<div class="header-top-left"> <div class="header-top-left">
<img src="../assets/images/box1-logo.png" alt="" /> <img :src=thinkInfo.projectCoverImgUrl alt="" />
<div> <div>
<div class="title">{{ thinkInfo.name }}</div> <div class="title">{{ thinkInfo.name }}</div>
<div class="en-title"> <div class="en-title">
{{ thinkInfo.ename }} {{ thinkInfo.ename }}
</div> </div>
</div>
</div> </div>
</div> <div class="header-top-right">
<div class="header-top-right"> <div class="image-name-box">
<div class="image-name-box"> <div class="image"><img :src="thinkInfo.thinkTankLogo" alt="" /></div>
<div class="image"><img src="../assets/images/box1-logo.png" alt="" /></div> <div class="name">{{ thinkInfo.thinkTankName }}</div>
<div class="name">{{ thinkInfo.thinkTankName }}</div> </div>
</div> <div class="tag-box">
<div class="tag-box"> <AreaTag v-for="(value, index) in thinkInfo.tags" :key="index" :tagName="value.industryName"></AreaTag>
<AreaTag v-for="(value, index) in thinkInfo.tags" :key="index" :tagName="value.industryName"></AreaTag> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
<div class="bottom-row"> <div class="bottom-row">
<div class="left"> <div class="left">
<div class="box1">
<AnalysisBox title="关键词云" :showAllBtn="true">
<div class="box1-main">
<template v-if="!hasBox5ChartData">
<el-empty class="box5-el-empty" description="暂无数据" :image-size="100" />
</template>
<template v-else>
<div class="box5Chart">
<!-- 有数据后再挂载子组件:子组件仅在 onMounted 初始化,异步数据到达后需 v-if + key 强制重新挂载 -->
<WordCloudChart v-if="box5Data.length" :key="box5WordCloudKey" :data="box5Data" width="432px"
height="272px" />
</div>
<div class="box1-footer">
<TipTab :text="REPORT_ANALYSIS_TIP_BOX5" />
</div>
<div class="ai-wrap" @mouseenter="handleSwitchAiContentShowBox5(true)">
<AiButton />
</div>
<div class="ai-content" v-if="isShowAiContentBox5" @mouseleave="handleSwitchAiContentShowBox5(false)"> <div class="box1">
<AiPane :aiContent="aiContentBox5" /> <AnalysisBox title="关键词云" :showAllBtn="true">
</div> <div class="box1-main">
</template> <template v-if="!hasBox5ChartData">
</div> <el-empty class="box5-el-empty" description="暂无数据" :image-size="100" />
</AnalysisBox> </template>
</div> <template v-else>
<div class="box2"> <div class="box5Chart">
<!-- <div class="box-header"> <!-- 有数据后再挂载子组件:子组件仅在 onMounted 初始化,异步数据到达后需 v-if + key 强制重新挂载 -->
<WordCloudChart v-if="box5Data.length" :key="box5WordCloudKey" :data="box5Data" width="432px"
height="272px" />
</div>
<div class="box1-footer">
<TipTab :text="REPORT_ANALYSIS_TIP_BOX5" />
</div>
<div class="ai-wrap" @mouseenter="handleSwitchAiContentShowBox5(true)">
<AiButton />
</div>
<div class="ai-content" v-if="isShowAiContentBox5" @mouseleave="handleSwitchAiContentShowBox5(false)">
<AiPane :aiContent="aiContentBox5" />
</div>
</template>
</div>
</AnalysisBox>
</div>
<div class="box2">
<!-- <div class="box-header">
<div class="header-left"></div> <div class="header-left"></div>
<div class="title">涉及科技领域</div> <div class="title">涉及科技领域</div>
<div class="header-right"> <div class="header-right">
...@@ -70,120 +70,76 @@ ...@@ -70,120 +70,76 @@
<div class="box2-main"> <div class="box2-main">
<div class="box2-content" id="box2Chart"></div> <div class="box2-content" id="box2Chart"></div>
</div> --> </div> -->
<AnalysisBox title="项目报告" :showAllBtn="true"> <AnalysisBox title="项目报告" :showAllBtn="true">
<div class="box2-main"> <div class="box2-main">
<div class="box2-item" v-for="(report, idx) in reportList" :key="idx"> <div class="box2-item" v-for="(report, idx) in reportList" :key="idx">
<div class="box2-item-content"> <div class="box2-item-content">
<div class="left"><img :src="report.image" alt="" /></div> <div class="left"><img :src="report.imgUrl" alt="" /></div>
<div class="right-content"> <div class="right-content">
<div class="report-title">{{ report.name }}</div> <div class="report-title">{{ report.nameZh }}</div>
<div class="report-footer"> <div class="report-footer">
<div class="report-time">{{ report.postDate }}</div> <div class="report-time">{{ formatDate(report.reportDate) }}</div>
<div class="report-footer-right"> <div class="report-footer-right">
<div class="footer-image"> <div class="footer-image">
<img :src="report.thinktankLogo" alt="" /> <img :src="report.reportOrgLogo" alt="" />
</div>
<div class="think-name">{{ report.reportOrg }}</div>
</div> </div>
<div class="think-name">{{ report.thinktankName }}</div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</AnalysisBox> </AnalysisBox>
</div> </div>
</div>
<div class="right">
<div class="box3">
<AnalysisBox title="内容摘要" :showAllBtn="true">
<div class="box3-main">
<AiSummary>
<template #summary-content>
{{ box1Data }}
</template>
</AiSummary>
</div>
</AnalysisBox>
</div> </div>
<div class="box4"> <div class="right">
<AnalysisBox title="项目背景" :showAllBtn="true"> <div class="box3">
<div class="box4-main"> <AnalysisBox title="内容摘要" :showAllBtn="true">
<div class="text"> <div class="box3-main">
{{ <AiSummary>
"可再生能源和清洁能源创新为摆脱对化石燃料的依赖提供了机会。然而,可再生能源的间歇性也对电网的实时供需平衡构成挑战。作为解决方案,中国提出开发全球能源互联(GEI)倡议,通过超高压输电线路和智能技术,直接将可再生能源生产者与全球消费者连接起来。北京认识到GEI的潜力,正站在GEI发展的前沿,领导关键推动技术的研究,输出中国技术和标准,支持海外发电和输电基础设施的发展。中国还在联合国和海湾合作委员会等国际组织推动GEI" <template #summary-content>
}} {{ box1Data }}
</template>
</AiSummary>
</div> </div>
</div> </AnalysisBox>
</AnalysisBox> </div>
</div> <div class="box4">
<div class="box5"> <AnalysisBox title="项目背景" :showAllBtn="true">
<AnalysisBox title="项目团队" :showAllBtn="true"> <div class="box4-main">
<div class="box5-main"> <div class="text" v-html="formatParagraph(projectBackground)">
<div class="box5-main-item-box">
<div class="item">
<div class="item-left">
<img src="../assets/images/rand-image.png" alt="" />
</div>
<div class="item-right">
<div class="item-name">{{ "纳迪娅·阿尔马萨尔基" }} </div>
<div class="item-position">{{ "副秘书" }}</div>
</div>
</div>
<div class="item">
<div class="item-left">
<img src="../assets/images/rand-image.png" alt="" />
</div>
<div class="item-right">
<div class="item-name">{{ "纳迪娅·阿尔马萨尔基" }} </div>
<div class="item-position">{{ "副秘书" }}</div>
</div>
</div>
<div class="item">
<div class="item-left">
<img src="../assets/images/rand-image.png" alt="" />
</div>
<div class="item-right">
<div class="item-name">{{ "纳迪娅·阿尔马萨尔基" }} </div>
<div class="item-position">{{ "副秘书" }}</div>
</div>
</div>
<div class="item">
<div class="item-left">
<img src="../assets/images/rand-image.png" alt="" />
</div>
<div class="item-right">
<div class="item-name">{{ "纳迪娅·阿尔马萨尔基" }} </div>
<div class="item-position">{{ "副秘书" }}</div>
</div>
</div>
<div class="item">
<div class="item-left">
<img src="../assets/images/rand-image.png" alt="" />
</div>
<div class="item-right">
<div class="item-name">{{ "纳迪娅·阿尔马萨尔基" }} </div>
<div class="item-position">{{ "副秘书" }}</div>
</div>
</div> </div>
<div class="item"> </div>
<div class="item-left"> </AnalysisBox>
<img src="../assets/images/rand-image.png" alt="" /> </div>
</div> <div class="box5">
<div class="item-right"> <AnalysisBox title="项目团队" :showAllBtn="true">
<div class="item-name">{{ "纳迪娅·阿尔马萨尔基" }} </div> <div class="box5-main">
<div class="item-position">{{ "副秘书" }}</div>
<div class="box5-main-item-box">
<div class="item" v-for="(author, idx) in reportAuthors" :key="idx">
<div class="item-left">
<img :src="author.avatarUrl ? author.avatarUrl : DefaultIcon1" alt=""
@error="() => { if (author.avatarUrl) author.avatarUrl = null; }"
@click="handleClickReportAuthor(author)" />
</div>
<div class="item-right">
<div class="item-name">{{ author.name }} </div>
</div>
</div> </div>
</div> </div>
</div> </div>
</div> </AnalysisBox>
</AnalysisBox> </div>
</div> </div>
</div> </div>
</div> </div>
</div>
</div> </div>
</template> </template>
...@@ -199,7 +155,12 @@ import { ...@@ -199,7 +155,12 @@ import {
getThinkTankReportContent, getThinkTankReportContent,
getThinkTankReportIndustry, getThinkTankReportIndustry,
getThinkTankReportIndustryCloud, getThinkTankReportIndustryCloud,
getThinkTankReportViewpoint getThinkTankReportViewpoint,
getThinkTankProjectsInfo,
getThinkTankProjectCloud,
getThinkTankProjectsAuthors,
getThinkTankReportRelated,
getThinkTankProjectRelated
} from "@/api/thinkTank/overview"; } from "@/api/thinkTank/overview";
import { getChartAnalysis } from "@/api/aiAnalysis/index"; import { getChartAnalysis } from "@/api/aiAnalysis/index";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
...@@ -209,22 +170,15 @@ import { getPersonSummaryInfo } from "@/api/common/index"; ...@@ -209,22 +170,15 @@ import { getPersonSummaryInfo } from "@/api/common/index";
import AiButton from "@/components/base/Ai/AiButton/index.vue"; import AiButton from "@/components/base/Ai/AiButton/index.vue";
import AiPane from "@/components/base/Ai/AiPane/index.vue"; import AiPane from "@/components/base/Ai/AiPane/index.vue";
import TipTab from "@/views/thinkTank/TipTab/index.vue"; import TipTab from "@/views/thinkTank/TipTab/index.vue";
const router = useRouter(); const router = useRouter();
const thinkInfo = ref({ const thinkInfo = ref({
name: "探讨中国开发和管理的跨大陆电网的安全影响",
ename: "调查项目",
tags: [{ industryName: "深海" }, { industryName: "人工智能" }],
thinkTankName: "兰德科技智库"
}) })
const reportAuthors = ref([]);
const projectBackground = ref("");
const REPORT_ANALYSIS_TIP_BOX5 = const REPORT_ANALYSIS_TIP_BOX5 =
"智库报告关键词云,数据来源:美国兰德公司官网"; "调查项目关键词云,数据来源:美国兰德公司官网";
// 刷新后默认展示「报告关键词云」AI 总结 // 刷新后默认展示「报告关键词云」AI 总结
const isShowAiContentBox5 = ref(true); const isShowAiContentBox5 = ref(true);
const aiContentBox5 = ref(""); const aiContentBox5 = ref("");
...@@ -235,9 +189,14 @@ const handleSwitchAiContentShowBox5 = (val) => { ...@@ -235,9 +189,14 @@ const handleSwitchAiContentShowBox5 = (val) => {
fetchBox5ChartInterpretation(); fetchBox5ChartInterpretation();
} }
}; };
const searchOpinions = ref(''); const searchOpinions = ref('');
const formatParagraph = (text) => {
if (!text) return ''
// 把换行分割成数组 → 每一段都包 <p>
return text.split('\n').map(item => {
return `<p>${item}</p>`
}).join('')
}
const escapeHtml = (text) => { const escapeHtml = (text) => {
return String(text ?? "") return String(text ?? "")
.replace(/&/g, "&amp;") .replace(/&/g, "&amp;")
...@@ -246,36 +205,101 @@ const escapeHtml = (text) => { ...@@ -246,36 +205,101 @@ const escapeHtml = (text) => {
.replace(/"/g, "&quot;") .replace(/"/g, "&quot;")
.replace(/'/g, "&#39;"); .replace(/'/g, "&#39;");
}; };
const escapeRegExp = (text) => { const escapeRegExp = (text) => {
return String(text ?? "").replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); return String(text ?? "").replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
}; };
/** 可同时展开多条;用 id 区分项,避免翻页后索引与展开状态错位 */ /** 可同时展开多条;用 id 区分项,避免翻页后索引与展开状态错位 */
const expandedOpinionKeys = ref(new Set()); const expandedOpinionKeys = ref(new Set());
const getOpinionExpandKey = (item, index) => { const getOpinionExpandKey = (item, index) => {
if (item != null && item.id != null && item.id !== "") { if (item != null && item.id != null && item.id !== "") {
return String(item.id); return String(item.id);
} }
return `idx-${index}`; return `idx-${index}`;
}; };
const reportList = ref({});
const formatDate = (dateStr) => {
if (!dateStr) return "";
const date = new Date(dateStr)
const y = date.getFullYear()
const m = date.getMonth() + 1
const d = date.getDate()
return `${y}${m}${d}日`
};
// 获取项目报告信息
const handleGetThinkTankReport = async () => {
try {
const res = await getThinkTankProjectRelated(router.currentRoute._value.params.id);
console.log("报告全局信息", res);
if (res.code === 200 && res.data) {
reportList.value = res.data;
}
} catch (error) {
console.error("获取相关报告error", error);
}
};
const handleClickReportAuthor = async (author) => {
const personId = author?.personId;
if (!personId) return;
const params = { personId };
const res = await getPersonSummaryInfo(params);
if (res.code !== 200 || !res.data) return;
window.sessionStorage.setItem("curTabName", author?.name || "");
const route = router.resolve({
path: "/characterPage",
query: {
personId
}
});
window.open(route.href, "_blank");
};
// 内容摘要 // 内容摘要
const box1Data = const box1Data =
ref(`包括经济竞争在内的美中竞争自2017年以来一直在定义美国外交政策。这两个经济体是世界上第一和第二大国家经济体,并且深深交织在一起。改变关系,无论多么必要,可能是昂贵的。因此,美国面临着一项挑战,确保其经济在耦合的战略竞争条件下满足国家的需求。 ref(`包括经济竞争在内的美中竞争自2017年以来一直在定义美国外交政策。这两个经济体是世界上第一和第二大国家经济体,并且深深交织在一起。改变关系,无论多么必要,可能是昂贵的。因此,美国面临着一项挑战,确保其经济在耦合的战略竞争条件下满足国家的需求。
为了应对这一挑战,兰德大学的研究人员对美中竞争进行了经济和制度分析,进行了参与式的远见练习,以了解确保美国经济健康的长期路径,并创建了两个经济竞争游戏,探索多个国家在相互交流的同时确保经济健康的动态...`); 为了应对这一挑战,兰德大学的研究人员对美中竞争进行了经济和制度分析,进行了参与式的远见练习,以了解确保美国经济健康的长期路径,并创建了两个经济竞争游戏,探索多个国家在相互交流的同时确保经济健康的动态...`);
// 获取调查项目详情(header/摘要/背景)
const handleGetThinkTankProjectsInfo = async () => {
try {
const id = router.currentRoute._value.params.id;
if (!id) return;
const res = await getThinkTankProjectsInfo({ id });
if (res?.code === 200 && res?.data) {
const info = res.data;
thinkInfo.value = {
...info,
name: info.projectNameZh,
ename: info.projectName,
tags: Array.isArray(info.domains) ? info.domains : thinkInfo.value.tags,
};
console.log("thinkInfo", thinkInfo.value);
if (info.summaryZh || info.summary) {
box1Data.value = info.summaryZh || info.summary;
}
projectBackground.value = info.backgroundZh || info.background || projectBackground.value;
}
} catch (error) {
console.error("获取调查项目详情error", error);
}
};
const handleGetThinkTankProjectsAuthor = async () => {
try {
const id = router.currentRoute._value.params.id;
if (!id) return;
const res = await getThinkTankProjectsAuthors({ id });
if (res?.code === 200 && res?.data) {
reportAuthors.value = res.data;
console.log("reportAuthors.value", reportAuthors.value);
}
} catch (error) {
console.error("获取调查项目作者error", error);
}
};
//获取内容摘要 //获取内容摘要
const handleGetThinkTankReportAbstract = async () => { const handleGetThinkTankReportAbstract = async () => {
try { try {
...@@ -343,12 +367,12 @@ const handleGetThinkTankReportIndustryCloud = async () => { ...@@ -343,12 +367,12 @@ const handleGetThinkTankReportIndustryCloud = async () => {
id: router.currentRoute._value.params.id id: router.currentRoute._value.params.id
// industryId: activeArea.value // industryId: activeArea.value
}; };
const res = await getThinkTankReportIndustryCloud(params); const res = await getThinkTankProjectCloud(params);
console.log("科技领域词云", res); console.log("科技领域词云", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
const data = (res.data || []).map(item => ({ const data = (res.data || []).map(item => ({
name: item.clause, name: item.name,
value: item.count value: item.value
})); }));
// 该接口数据用于「报告关键词云」 // 该接口数据用于「报告关键词云」
box5Data.value = data; box5Data.value = data;
...@@ -433,10 +457,7 @@ const switchTab = name => { ...@@ -433,10 +457,7 @@ const switchTab = name => {
const currentPage = ref(1); const currentPage = ref(1);
const pageSize = ref(10); const pageSize = ref(10);
const total = ref(0); const total = ref(0);
const handleCurrentChange = page => {
currentPage.value = page;
handleGetThinkTankReportViewpoint();
};
// 获取报告核心论点(支持搜索) // 获取报告核心论点(支持搜索)
const handleGetThinkTankReportViewpoint = async () => { const handleGetThinkTankReportViewpoint = async () => {
...@@ -469,13 +490,7 @@ const handleGetThinkTankReportViewpoint = async () => { ...@@ -469,13 +490,7 @@ const handleGetThinkTankReportViewpoint = async () => {
// 获取图表分析内容 // 获取图表分析内容
const box3AnalysisContent = ref(""); const box3AnalysisContent = ref("");
const handleGetBox3AnalysisContent = async textJson => {
const params = {
text: textJson
};
const res = await getChartAnalysis(params);
console.log("图表解析内容", res);
};
const getInterpretationTextFromChartResponse = (res) => { const getInterpretationTextFromChartResponse = (res) => {
const list = res?.data; const list = res?.data;
const first = Array.isArray(list) ? list[0] : null; const first = Array.isArray(list) ? list[0] : null;
...@@ -539,11 +554,14 @@ const fetchBox5ChartInterpretation = async () => { ...@@ -539,11 +554,14 @@ const fetchBox5ChartInterpretation = async () => {
}; };
onMounted(() => { onMounted(() => {
handleGetThinkTankProjectsInfo();
handleGetThinkTankReportAbstract(); handleGetThinkTankReportAbstract();
handleGetThinkTankReportViewpoint(); handleGetThinkTankReportViewpoint();
handleGetThinkTankReportIndustry(); handleGetThinkTankReportIndustry();
handleGetThinkTankReportIndustryCloud(); handleGetThinkTankReportIndustryCloud();
handleGetThinkTankProjectsAuthor();
handleGetThinkTankReport();
}); });
</script> </script>
...@@ -718,6 +736,11 @@ onMounted(() => { ...@@ -718,6 +736,11 @@ onMounted(() => {
overflow: hidden; overflow: hidden;
} }
.box5-el-empty {
margin: 0 auto;
height: 100%;
}
.box1-footer { .box1-footer {
display: flex; display: flex;
...@@ -1004,6 +1027,9 @@ onMounted(() => { ...@@ -1004,6 +1027,9 @@ onMounted(() => {
letter-spacing: 0px; letter-spacing: 0px;
text-align: left; text-align: left;
color: rgb(59, 65, 75); color: rgb(59, 65, 75);
white-space: pre-line;
text-indent: 2em;
margin: 0;
} }
...@@ -1041,6 +1067,7 @@ onMounted(() => { ...@@ -1041,6 +1067,7 @@ onMounted(() => {
border-radius: 50%; border-radius: 50%;
margin-top: 3px; margin-top: 3px;
margin-left: 3px; margin-left: 3px;
cursor: pointer;
img { img {
width: 100%; width: 100%;
......
...@@ -21,10 +21,7 @@ ...@@ -21,10 +21,7 @@
<div class="title">{{ "科技领域" }}</div> <div class="title">{{ "科技领域" }}</div>
</div> </div>
<div class="select-main"> <div class="select-main">
<el-checkbox-group <el-checkbox-group class="checkbox-group" :model-value="selectedResearchIds" @change="handleAreaGroupChange">
class="checkbox-group"
:model-value="selectedResearchIds"
@change="handleAreaGroupChange">
<el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_AREA"> <el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_AREA">
{{ RESOURCE_FILTER_ALL_AREA }} {{ RESOURCE_FILTER_ALL_AREA }}
</el-checkbox> </el-checkbox>
...@@ -40,9 +37,7 @@ ...@@ -40,9 +37,7 @@
<div class="title">{{ "发布时间" }}</div> <div class="title">{{ "发布时间" }}</div>
</div> </div>
<div class="select-main"> <div class="select-main">
<el-checkbox-group <el-checkbox-group class="checkbox-group" :model-value="selectedResearchTimeIds"
class="checkbox-group"
:model-value="selectedResearchTimeIds"
@change="handleTimeGroupChange"> @change="handleTimeGroupChange">
<el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_TIME"> <el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_TIME">
{{ RESOURCE_FILTER_ALL_TIME }} {{ RESOURCE_FILTER_ALL_TIME }}
...@@ -62,13 +57,13 @@ ...@@ -62,13 +57,13 @@
<div class="footer-card" v-for="(item, index) in curFooterList" :key="index" <div class="footer-card" v-for="(item, index) in curFooterList" :key="index"
@click="handleToReportDetail(item)"> @click="handleToReportDetail(item)">
<div class="footer-card-top"> <div class="footer-card-top">
<img :src="item.imageUrl" alt="" /> <img :src=item.projectCoverImgUrl alt="" />
</div> </div>
<div class="footer-card-title"> <div class="footer-card-title">
<span v-html="highlightText(item.name)"></span> <span v-html="highlightText(item.projectNameZh)"></span>
</div> </div>
<div class="footer-card-footer"> <div class="footer-card-footer">
<div class="time">{{ item.times }}</div> <div class="time">{{ formatDate(item.startDate) }}</div>
<div class="from">{{ item.thinkTankName }}</div> <div class="from">{{ item.thinkTankName }}</div>
</div> </div>
</div> </div>
...@@ -94,7 +89,11 @@ import { ...@@ -94,7 +89,11 @@ import {
stripAllAreaForRequest, stripAllAreaForRequest,
stripAllTimeForRequest stripAllTimeForRequest
} from "../../../utils/resourceLibraryFilters"; } from "../../../utils/resourceLibraryFilters";
const formatDate = (str) => {
if (!str) return ''
const [y, m, d] = str.split('T')[0].split('-')
return `${y}${+m}${+d}日`
};
const props = defineProps({ const props = defineProps({
researchTypeList: { researchTypeList: {
type: Array, type: Array,
......
...@@ -21,10 +21,7 @@ ...@@ -21,10 +21,7 @@
<div class="title">{{ "科技领域" }}</div> <div class="title">{{ "科技领域" }}</div>
</div> </div>
<div class="select-main"> <div class="select-main">
<el-checkbox-group <el-checkbox-group class="checkbox-group" :model-value="selectedResearchIds" @change="handleAreaGroupChange">
class="checkbox-group"
:model-value="selectedResearchIds"
@change="handleAreaGroupChange">
<el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_AREA"> <el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_AREA">
{{ RESOURCE_FILTER_ALL_AREA }} {{ RESOURCE_FILTER_ALL_AREA }}
</el-checkbox> </el-checkbox>
...@@ -40,9 +37,7 @@ ...@@ -40,9 +37,7 @@
<div class="title">{{ "发布时间" }}</div> <div class="title">{{ "发布时间" }}</div>
</div> </div>
<div class="select-main"> <div class="select-main">
<el-checkbox-group <el-checkbox-group class="checkbox-group" :model-value="selectedResearchTimeIds"
class="checkbox-group"
:model-value="selectedResearchTimeIds"
@change="handleTimeGroupChange"> @change="handleTimeGroupChange">
<el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_TIME"> <el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_TIME">
{{ RESOURCE_FILTER_ALL_TIME }} {{ RESOURCE_FILTER_ALL_TIME }}
...@@ -68,7 +63,7 @@ ...@@ -68,7 +63,7 @@
<span v-html="highlightText(item.name)"></span> <span v-html="highlightText(item.name)"></span>
</div> </div>
<div class="footer-card-footer"> <div class="footer-card-footer">
<div class="time">{{ item.times }}</div> <div class="time">{{ formatDate(item.times) }}</div>
<div class="from">{{ item.thinkTankName }}</div> <div class="from">{{ item.thinkTankName }}</div>
</div> </div>
</div> </div>
...@@ -94,7 +89,11 @@ import { ...@@ -94,7 +89,11 @@ import {
stripAllAreaForRequest, stripAllAreaForRequest,
stripAllTimeForRequest stripAllTimeForRequest
} from "../../../utils/resourceLibraryFilters"; } from "../../../utils/resourceLibraryFilters";
const formatDate = (str) => {
if (!str) return ''
const [y, m, d] = str.split('T')[0].split('-')
return `${y}${+m}${+d}日`
};
const props = defineProps({ const props = defineProps({
researchTypeList: { researchTypeList: {
type: Array, type: Array,
......
...@@ -38,7 +38,8 @@ ...@@ -38,7 +38,8 @@
<template #prefix> <template #prefix>
<img v-if="sort !== true" src="./images/image down.png" class="select-prefix-img" alt="" <img v-if="sort !== true" src="./images/image down.png" class="select-prefix-img" alt=""
@click.stop="toggleSortAndFetch()" /> @click.stop="toggleSortAndFetch()" />
<img v-else src="./images/image up.png" class="select-prefix-img" alt="" @click.stop="toggleSortAndFetch()" /> <img v-else src="./images/image up.png" class="select-prefix-img" alt=""
@click.stop="toggleSortAndFetch()" />
</template> </template>
<el-option @click="handleGetThinkDynamicsReport()" :key="true" label="正序" :value="true" /> <el-option @click="handleGetThinkDynamicsReport()" :key="true" label="正序" :value="true" />
<el-option @click="handleGetThinkDynamicsReport()" :key="false" label="倒序" :value="false" /> <el-option @click="handleGetThinkDynamicsReport()" :key="false" label="倒序" :value="false" />
...@@ -50,25 +51,26 @@ ...@@ -50,25 +51,26 @@
<div v-if="isThinkTankReport"> <div v-if="isThinkTankReport">
<ThinkTankReport :research-type-list="researchTypeList" :research-time-list="researchTimeList" <ThinkTankReport :research-type-list="researchTypeList" :research-time-list="researchTimeList"
:key="`智库报告-${tabResetKey}`" :selected-filters="selectedFilters" :cur-footer-list="curFooterList" :total="total" :key="`智库报告-${tabResetKey}`" :selected-filters="selectedFilters" :cur-footer-list="curFooterList" :total="total"
:current-page="currentPage" :search-keyword="searchReport" @update:selected-filters="handleSelectedFiltersUpdate" :current-page="currentPage" :search-keyword="searchReport"
@update:selected-filters="handleSelectedFiltersUpdate"
@filter-change="(payload) => handleGetThinkDynamicsReport(payload)" @page-change="handleCurrentChange" @filter-change="(payload) => handleGetThinkDynamicsReport(payload)" @page-change="handleCurrentChange"
@report-click="handleToReportDetail" /> @report-click="handleToReportDetail" />
</div> </div>
<div v-if="isCongressHearing"> <div v-if="isCongressHearing">
<CongressHearing :research-type-list="researchTypeList" :research-time-list="researchTimeList" <CongressHearing :research-type-list="researchTypeList" :research-time-list="researchTimeList"
:key="`国会听证会-${tabResetKey}`" :research-hearing-list="researchHearingList" :selected-filters="selectedFilters" :key="`国会听证会-${tabResetKey}`" :research-hearing-list="researchHearingList" :selected-filters="selectedFilters"
:selected-year="selectedYear" :cur-footer-list="curFooterList" :total="total" :current-page="currentPage" :selected-year="selectedYear" :total="total" :current-page="currentPage" :search-keyword="searchReport"
:search-keyword="searchReport"
:hearing-data="hearingData" @update:selected-filters="handleSelectedFiltersUpdate" :hearing-data="hearingData" @update:selected-filters="handleSelectedFiltersUpdate"
@filter-change="(payload) => handleGetThinkDynamicsReport(payload)" @page-change="handleCurrentChange" @filter-change="(payload) => handleGetThinkDynamicsReport(payload)" @page-change="handleCurrentChange"
@report-click="handleToReportDetail" /> @report-click="handleToReportDetail" />
</div> </div>
<div> <div>
<SurveyForm v-if="isSurveyForm" :research-type-list="researchTypeList" :research-time-list="researchTimeList" <SurveyForm v-if="isSurveyForm" :research-type-list="researchTypeList" :research-time-list="researchTimeList"
:key="`调查项目-${tabResetKey}`" :selected-filters="selectedFilters" :cur-footer-list="curFooterList" :total="total" :key="`调查项目-${tabResetKey}`" :selected-filters="selectedFilters" :cur-footer-list="curFooterProjectList"
:current-page="currentPage" :search-keyword="searchReport" @update:selected-filters="handleSelectedFiltersUpdate" :total="total" :current-page="currentPage" :search-keyword="searchReport"
@update:selected-filters="handleSelectedFiltersUpdate"
@filter-change="(payload) => handleGetThinkDynamicsReport(payload)" @page-change="handleCurrentChange" @filter-change="(payload) => handleGetThinkDynamicsReport(payload)" @page-change="handleCurrentChange"
@report-click="handleToReportDetail" /> @report-click="handleToProjectDetail" />
</div> </div>
</div> </div>
</template> </template>
...@@ -92,7 +94,8 @@ import SurveyForm from "./SurveyForm/index.vue" ...@@ -92,7 +94,8 @@ import SurveyForm from "./SurveyForm/index.vue"
import { import {
getThinkDynamicsReportType, getThinkDynamicsReportType,
getHylyList, getHylyList,
getThinkTankReport getThinkTankReport,
getThinkTankProjectsByThinkTankId
} from "@/api/thinkTank/overview"; } from "@/api/thinkTank/overview";
import { import {
RESOURCE_FILTER_EARLIER, RESOURCE_FILTER_EARLIER,
...@@ -119,6 +122,17 @@ const handleToReportDetail = (item) => { ...@@ -119,6 +122,17 @@ const handleToReportDetail = (item) => {
}); });
window.open(route.href, "_blank"); window.open(route.href, "_blank");
}
const handleToProjectDetail = (item) => {
window.sessionStorage.setItem('curTabName', item.name)
const route = router.resolve({
name: 'SurveyProjectView',
params: {
id: item.id
}
});
window.open(route.href, "_blank");
} }
const hearingData = ref([ const hearingData = ref([
// 军事类(10条) // 军事类(10条)
...@@ -403,9 +417,9 @@ const handleSelectedFiltersUpdate = val => { ...@@ -403,9 +417,9 @@ const handleSelectedFiltersUpdate = val => {
const author = ref('') // 作者 const author = ref('') // 作者
/** 智库报告 / 调查项目共用列表:与资源库一致,初始为空,接口非成功时清空 */ /** 智库报告 */
const curFooterList = ref([]); const curFooterList = ref([]);
const curFooterProjectList = ref([]);
const selectedYear = ref(1); const selectedYear = ref(1);
...@@ -472,7 +486,7 @@ const handleGetThinkDynamicsReport = async (payload) => { ...@@ -472,7 +486,7 @@ const handleGetThinkDynamicsReport = async (payload) => {
selectedFilters.value = nextFilters; selectedFilters.value = nextFilters;
currentPage.value = 1; currentPage.value = 1;
} }
// 国会听证会走本地数据,与资源库 /thinkTankOverview/report 无关
if (!isThinkTankReport.value && !isSurveyForm.value) { if (!isThinkTankReport.value && !isSurveyForm.value) {
return; return;
} }
...@@ -490,6 +504,25 @@ const handleGetThinkDynamicsReport = async (payload) => { ...@@ -490,6 +504,25 @@ const handleGetThinkDynamicsReport = async (payload) => {
: arrayToString(areas); : arrayToString(areas);
const keyword = (searchReport.value || "").trim(); const keyword = (searchReport.value || "").trim();
const thinkTankId = router.currentRoute._value.params?.id; const thinkTankId = router.currentRoute._value.params?.id;
if (isSurveyForm.value) {
// 调查项目:用新接口 /think-tank/{thinkTankId}/projects
curFooterList.value = [];
const res = await getThinkTankProjectsByThinkTankId({
thinkTankId,
pageNum: currentPage.value,
pageSize: 12
});
if (res.code === 200 && res.data) {
curFooterProjectList.value = res.data.content || [];
total.value = res.data.totalElements || 0;
} else {
curFooterProjectList.value = [];
total.value = 0;
}
return;
}
// 智库报告:保持原逻辑
const params = { const params = {
pageNum: currentPage.value, pageNum: currentPage.value,
pageSize: 12, pageSize: 12,
...@@ -498,9 +531,6 @@ const handleGetThinkDynamicsReport = async (payload) => { ...@@ -498,9 +531,6 @@ const handleGetThinkDynamicsReport = async (payload) => {
startDate, startDate,
endDate endDate
}; };
if (isSurveyForm.value) {
params.category = "调查项目";
}
if (thinkTankId) { if (thinkTankId) {
params.thinkTankId = thinkTankId; params.thinkTankId = thinkTankId;
} }
......
...@@ -47,7 +47,7 @@ ...@@ -47,7 +47,7 @@
{{ item.name }} {{ item.name }}
</div> </div>
<div class="footer-card-footer"> <div class="footer-card-footer">
<div class="time">{{ item.times }}</div> <div class="time">{{ formatDate(item.times) }}</div>
<div class="from">{{ item.thinkTankName }}</div> <div class="from">{{ item.thinkTankName }}</div>
</div> </div>
</div> </div>
...@@ -97,6 +97,11 @@ const handleTimeGroupChange = (val) => { ...@@ -97,6 +97,11 @@ const handleTimeGroupChange = (val) => {
emit("update:selectedPubTimeList", normalizeExclusiveAllOption(val, RESOURCE_FILTER_ALL_TIME)); emit("update:selectedPubTimeList", normalizeExclusiveAllOption(val, RESOURCE_FILTER_ALL_TIME));
emit("filter-change"); emit("filter-change");
}; };
const formatDate = (str) => {
if (!str) return ''
const [y, m, d] = str.split('T')[0].split('-')
return `${y}${+m}${+d}日`
};
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -8,18 +8,11 @@ ...@@ -8,18 +8,11 @@
<div class="title">{{ "科技领域" }}</div> <div class="title">{{ "科技领域" }}</div>
</div> </div>
<div class="select-main"> <div class="select-main">
<el-checkbox-group <el-checkbox-group class="checkbox-group" :model-value="selectedAreaList" @change="handleAreaGroupChange">
class="checkbox-group"
:model-value="selectedAreaList"
@change="handleAreaGroupChange">
<el-checkbox class="filter-checkbox all-checkbox" :label="RESOURCE_FILTER_ALL_AREA"> <el-checkbox class="filter-checkbox all-checkbox" :label="RESOURCE_FILTER_ALL_AREA">
{{ RESOURCE_FILTER_ALL_AREA }} {{ RESOURCE_FILTER_ALL_AREA }}
</el-checkbox> </el-checkbox>
<el-checkbox <el-checkbox v-for="research in areaList" :key="research.id" class="filter-checkbox" :label="research.id">
v-for="research in areaList"
:key="research.id"
class="filter-checkbox"
:label="research.id">
{{ research.name }} {{ research.name }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
...@@ -32,18 +25,11 @@ ...@@ -32,18 +25,11 @@
<div class="title">{{ "发布时间" }}</div> <div class="title">{{ "发布时间" }}</div>
</div> </div>
<div class="select-main"> <div class="select-main">
<el-checkbox-group <el-checkbox-group class="checkbox-group" :model-value="selectedPubTimeList" @change="handleTimeGroupChange">
class="checkbox-group"
:model-value="selectedPubTimeList"
@change="handleTimeGroupChange">
<el-checkbox class="filter-checkbox all-checkbox" :label="RESOURCE_FILTER_ALL_TIME"> <el-checkbox class="filter-checkbox all-checkbox" :label="RESOURCE_FILTER_ALL_TIME">
{{ RESOURCE_FILTER_ALL_TIME }} {{ RESOURCE_FILTER_ALL_TIME }}
</el-checkbox> </el-checkbox>
<el-checkbox <el-checkbox v-for="time in pubTimeList" :key="time.id" class="filter-checkbox" :label="time.id">
v-for="time in pubTimeList"
:key="time.id"
class="filter-checkbox"
:label="time.id">
{{ time.name }} {{ time.name }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
...@@ -56,13 +42,13 @@ ...@@ -56,13 +42,13 @@
<div class="footer-card" v-for="(item, index) in curFooterList" :key="index" <div class="footer-card" v-for="(item, index) in curFooterList" :key="index"
@click="emit('report-click', item)"> @click="emit('report-click', item)">
<div class="footer-card-top"> <div class="footer-card-top">
<img :src="item.imageUrl" alt="" /> <img :src="item.projectCoverImgUrl" alt="" />
</div> </div>
<div class="footer-card-title"> <div class="footer-card-title">
{{ item.name }} {{ item.projectNameZh }}
</div> </div>
<div class="footer-card-footer"> <div class="footer-card-footer">
<div class="time">{{ item.times }}</div> <div class="time">{{ formatDate(item.startDate) }}</div>
<div class="from">{{ item.thinkTankName }}</div> <div class="from">{{ item.thinkTankName }}</div>
</div> </div>
</div> </div>
...@@ -94,7 +80,11 @@ defineProps({ ...@@ -94,7 +80,11 @@ defineProps({
total: { type: Number, default: 0 }, total: { type: Number, default: 0 },
currentPage: { type: Number, default: 1 } currentPage: { type: Number, default: 1 }
}); });
const formatDate = (str) => {
if (!str) return ''
const [y, m, d] = str.split('T')[0].split('-')
return `${y}${+m}${+d}日`
};
const emit = defineEmits([ const emit = defineEmits([
"update:selectedAreaList", "update:selectedAreaList",
"update:selectedPubTimeList", "update:selectedPubTimeList",
......
...@@ -7,18 +7,11 @@ ...@@ -7,18 +7,11 @@
<div class="title">{{ "科技领域" }}</div> <div class="title">{{ "科技领域" }}</div>
</div> </div>
<div class="select-main"> <div class="select-main">
<el-checkbox-group <el-checkbox-group class="checkbox-group" :model-value="selectedResearchIds" @change="handleAreaGroupChange">
class="checkbox-group"
:model-value="selectedResearchIds"
@change="handleAreaGroupChange">
<el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_AREA"> <el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_AREA">
{{ RESOURCE_FILTER_ALL_AREA }} {{ RESOURCE_FILTER_ALL_AREA }}
</el-checkbox> </el-checkbox>
<el-checkbox <el-checkbox v-for="type in researchTypeList" :key="type.id" class="filter-checkbox" :label="type.id">
v-for="type in researchTypeList"
:key="type.id"
class="filter-checkbox"
:label="type.id">
{{ type.name }} {{ type.name }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
...@@ -31,18 +24,12 @@ ...@@ -31,18 +24,12 @@
<div class="title">{{ "发布时间" }}</div> <div class="title">{{ "发布时间" }}</div>
</div> </div>
<div class="select-main"> <div class="select-main">
<el-checkbox-group <el-checkbox-group class="checkbox-group" :model-value="selectedResearchTimeIds"
class="checkbox-group"
:model-value="selectedResearchTimeIds"
@change="handleTimeGroupChange"> @change="handleTimeGroupChange">
<el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_TIME"> <el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_TIME">
{{ RESOURCE_FILTER_ALL_TIME }} {{ RESOURCE_FILTER_ALL_TIME }}
</el-checkbox> </el-checkbox>
<el-checkbox <el-checkbox v-for="type in researchTimeList" :key="type.id" class="filter-checkbox" :label="type.id">
v-for="type in researchTimeList"
:key="type.id"
class="filter-checkbox"
:label="type.id">
{{ type.name }} {{ type.name }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
...@@ -55,18 +42,12 @@ ...@@ -55,18 +42,12 @@
<div class="title">{{ "听证会部门" }}</div> <div class="title">{{ "听证会部门" }}</div>
</div> </div>
<div class="select-main"> <div class="select-main">
<el-checkbox-group <el-checkbox-group class="checkbox-group hearing-grid" :model-value="selectedResearchHearingIds"
class="checkbox-group hearing-grid"
:model-value="selectedResearchHearingIds"
@change="handleDeptGroupChange"> @change="handleDeptGroupChange">
<el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_DEPT"> <el-checkbox class="filter-checkbox" :label="RESOURCE_FILTER_ALL_DEPT">
{{ RESOURCE_FILTER_ALL_DEPT }} {{ RESOURCE_FILTER_ALL_DEPT }}
</el-checkbox> </el-checkbox>
<el-checkbox <el-checkbox v-for="type in researchHearingList" :key="type.id" class="filter-checkbox" :label="type.id">
v-for="type in researchHearingList"
:key="type.id"
class="filter-checkbox"
:label="type.id">
{{ type.name }} {{ type.name }}
</el-checkbox> </el-checkbox>
</el-checkbox-group> </el-checkbox-group>
......
...@@ -47,7 +47,8 @@ ...@@ -47,7 +47,8 @@
<div class="card-item-text"> <div class="card-item-text">
<div class="card-item-title">{{ item.name }}</div> <div class="card-item-title">{{ item.name }}</div>
<div class="card-item-time"> <div class="card-item-time">
<span class="info-text">{{ item.times }} · {{ item.thinkTankName }} · {{ item.reportName }}</span> <span class="info-text">{{ formatDate(item.times) }} · {{ item.thinkTankName }} · {{ item.reportName
}}</span>
<div class="card-open-image" @click.stop="handleOpenReportOriginal(item)"> <div class="card-open-image" @click.stop="handleOpenReportOriginal(item)">
<img src="@/views/thinkTank/ThinkTankDetail/thinkDynamics/images/image open.png" alt="" /> <img src="@/views/thinkTank/ThinkTankDetail/thinkDynamics/images/image open.png" alt="" />
</div> </div>
...@@ -125,7 +126,11 @@ const handleOpenReportOriginal = (item) => { ...@@ -125,7 +126,11 @@ const handleOpenReportOriginal = (item) => {
}) })
window.open(route.href, "_blank") window.open(route.href, "_blank")
} }
const formatDate = (str) => {
if (!str) return ''
const [y, m, d] = str.split('T')[0].split('-')
return `${y}${+m}${+d}日`
};
/** 政策建议关联法案:新标签页打开法案介绍页,billId 随接口 id 变化 */ /** 政策建议关联法案:新标签页打开法案介绍页,billId 随接口 id 变化 */
const handleBillMoreClick = (bill) => { const handleBillMoreClick = (bill) => {
const billId = bill?.id; const billId = bill?.id;
......
...@@ -364,7 +364,7 @@ ...@@ -364,7 +364,7 @@
v-model:selectedAreaList="surveySelectedAreaList" :pub-time-list="pubTimeList" v-model:selectedAreaList="surveySelectedAreaList" :pub-time-list="pubTimeList"
v-model:selectedPubTimeList="surveySelectedPubTimeList" @filter-change="handleSurveyFilterChange" v-model:selectedPubTimeList="surveySelectedPubTimeList" @filter-change="handleSurveyFilterChange"
:cur-footer-list="surveyFooterList" :total="surveyTotal" :current-page="surveyCurrentPage" :cur-footer-list="surveyFooterList" :total="surveyTotal" :current-page="surveyCurrentPage"
@report-click="handleToReportDetail" @page-change="handleSurveyCurrentChange" /> @report-click="handleToSurveyProjectView" @page-change="handleSurveyCurrentChange" />
<ThinkTankCongressHearingOverview v-else-if="activeCate === '国会听证会'" :key="`congress-${resourceTabResetKey}`" <ThinkTankCongressHearingOverview v-else-if="activeCate === '国会听证会'" :key="`congress-${resourceTabResetKey}`"
:research-type-list="areaList" :research-time-list="pubTimeList" @report-click="handleToReportDetail" /> :research-type-list="areaList" :research-time-list="pubTimeList" @report-click="handleToReportDetail" />
...@@ -373,6 +373,7 @@ ...@@ -373,6 +373,7 @@
:research-time-list="pubTimeList" :list="policyFooterList" :total="policyTotal" :research-time-list="pubTimeList" :list="policyFooterList" :total="policyTotal"
:current-page="policyCurrentPage" :page-size="7" @filter-change="handlePolicyFilterChange" :current-page="policyCurrentPage" :page-size="7" @filter-change="handlePolicyFilterChange"
@page-change="handlePolicyCurrentChange" /> @page-change="handlePolicyCurrentChange" />
</div> </div>
</div> </div>
</div> </div>
...@@ -406,7 +407,8 @@ import { ...@@ -406,7 +407,8 @@ import {
getThinkTankReport, getThinkTankReport,
getThinkTankOverviewPolicy, getThinkTankOverviewPolicy,
getThinkTankReportNews, getThinkTankReportNews,
getThinkTankReportRemarks getThinkTankReportRemarks,
getThinkTankProjects
} from "@/api/thinkTank/overview"; } from "@/api/thinkTank/overview";
import { getPersonSummaryInfo } from "@/api/common/index"; import { getPersonSummaryInfo } from "@/api/common/index";
import getMultiLineChart from "./utils/multiLineChart"; import getMultiLineChart from "./utils/multiLineChart";
...@@ -1801,24 +1803,9 @@ const handleGetThinkTankSurvey = async () => { ...@@ -1801,24 +1803,9 @@ const handleGetThinkTankSurvey = async () => {
stripAllTimeForRequest(surveySelectedPubTimeList.value), stripAllTimeForRequest(surveySelectedPubTimeList.value),
(pubTimeList.value || []).map((x) => x.id) (pubTimeList.value || []).map((x) => x.id)
); );
const params = {
pageNum: surveyCurrentPage.value,
pageSize: 12,
sortFun: surveySort.value === true,
domainIds: (() => {
const areas = stripAllAreaForRequest(surveySelectedAreaList.value);
const allAreaIds = (areaList.value || []).map((a) => a.id);
if (isSelectionCoveringAllOptions(areas, allAreaIds)) {
return "";
}
return arrayToString(areas);
})(),
startDate,
endDate,
category: "调查项目"
};
try { try {
const res = await getThinkTankReport(params); const res = await getThinkTankProjects();
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
surveyFooterList.value = res.data.content; surveyFooterList.value = res.data.content;
surveyTotal.value = res.data.totalElements; surveyTotal.value = res.data.totalElements;
...@@ -2071,7 +2058,16 @@ const handleToReportDetail = item => { ...@@ -2071,7 +2058,16 @@ const handleToReportDetail = item => {
}); });
window.open(route.href, "_blank"); window.open(route.href, "_blank");
}; };
const handleToSurveyProjectView = item => {
window.sessionStorage.setItem("curTabName", item.name);
const route = router.resolve({
name: "SurveyProjectView",
params: {
id: item.id
}
});
window.open(route.href, "_blank");
};
const handleSearch = () => { const handleSearch = () => {
window.sessionStorage.setItem("curTabName", `搜索-${searchThinktankText.value}`); window.sessionStorage.setItem("curTabName", `搜索-${searchThinktankText.value}`);
const curRoute = router.resolve({ const curRoute = router.resolve({
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论