提交 a924d505 authored 作者: huhuiqing's avatar huhuiqing

智库动态接口对接

上级 cba2ee51
...@@ -82,3 +82,32 @@ export function getThinkTankReport(params) { ...@@ -82,3 +82,32 @@ export function getThinkTankReport(params) {
params: params params: params
}) })
} }
/********* 智库信息 */
//智库百科:获取全局信息
export function getThinkTankSummary(params) {
return request({
method: 'GET',
url: `/api/thinkTankInfo/summary/${params.id}`,
})
}
//智库报告:获取智库报告类型
export function getThinkDynamicsReportType() {
return request({
method: 'GET',
url: `/api/thinkTankInfo/reportType`,
})
}
//智库动态:获取智库报告
export function getThinkDynamicsReport(params) {
return request({
method: 'GET',
url: `/api/thinkTankInfo/report/${params.id}/${params.startDate}`,
params: params.parmas
})
}
...@@ -7,15 +7,15 @@ ...@@ -7,15 +7,15 @@
</div> </div>
<div class="header-top-center"> <div class="header-top-center">
<div class="center-top"> <div class="center-top">
<div class="name">{{ "兰德公司" }}</div> <div class="name">{{ thinkTank.name }}</div>
<div class="e-name">{{ "RAND Corporation" }}</div> <div class="e-name">{{ thinkTank.ename }}</div>
</div> </div>
<div class="center-center"> <div class="center-center">
{{ "全球顶尖政策研究机构,专注于国家安全、科技政策、医疗卫生、能源政策、公共安全等领域的研究。 " }} {{ thinkTank.describe }}
</div> </div>
<div class="center-footer"> <div class="center-footer">
<div class="tag">{{ "国家安全" }}</div> <div class="tag" v-for="tag in thinkTank.tags">{{ tag.industryName }}</div>
<div class="tag">{{ "科技政策" }}</div>
</div> </div>
</div> </div>
<!-- <div class="header-top-right">{{ '查看智库官网' }}</div> --> <!-- <div class="header-top-right">{{ '查看智库官网' }}</div> -->
...@@ -58,19 +58,44 @@ import { ref, reactive, computed, onMounted } from "vue"; ...@@ -58,19 +58,44 @@ import { ref, reactive, computed, onMounted } from "vue";
import ThinkDaynamics from "./thinkDynamics/index.vue" import ThinkDaynamics from "./thinkDynamics/index.vue"
import PolicyTracking from "./PolicyTracking/index.vue"; import PolicyTracking from "./PolicyTracking/index.vue";
import ThinkInfo from "./thinkInfo/index.vue"; import ThinkInfo from "./thinkInfo/index.vue";
import {
getThinkTankSummary
} from "@/api/thinkTank/overview";
import { useRouter } from "vue-router";
const router = useRouter();
const tabActiveName = ref("智库动态"); const tabActiveName = ref("智库动态");
const switchTab = name => { const switchTab = name => {
tabActiveName.value = name; tabActiveName.value = name;
}; };
const thinkTank = ref({})
// 获取智库基本信息
const handleGetThinkTankSummary = async () => {
try {
const parmas = {
id: router.currentRoute._value.params.id
}
const res = await getThinkTankSummary(parmas);
console.log("智库信息", res);
if (res.code === 200 && res.data) {
thinkTank.value = res.data
}
} catch (error) {
console.error("获取智库列表error", error);
}
};
onMounted(async () => {
handleGetThinkTankSummary()
});
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap { .wrap {
width: 1920px; width: 1920px;
height: 984px; height: 984px;
.header { .header {
width: 1920px; width: 1920px;
height: 188px; height: 188px;
...@@ -81,18 +106,23 @@ const switchTab = name => { ...@@ -81,18 +106,23 @@ const switchTab = name => {
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1); box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
position: relative; position: relative;
.header-top { .header-top {
margin-top: 24px; margin-top: 24px;
display: flex; display: flex;
.header-top-left { .header-top-left {
width: 88px; width: 88px;
height: 88px; height: 88px;
background: purple; background: purple;
} }
.header-top-center { .header-top-center {
margin-left: 22px; margin-left: 22px;
.center-top { .center-top {
display: flex; display: flex;
.name { .name {
height: 26px; height: 26px;
color: rgba(59, 65, 75, 1); color: rgba(59, 65, 75, 1);
...@@ -103,6 +133,7 @@ const switchTab = name => { ...@@ -103,6 +133,7 @@ const switchTab = name => {
letter-spacing: 0px; letter-spacing: 0px;
text-align: left; text-align: left;
} }
.e-name { .e-name {
margin-left: 11px; margin-left: 11px;
height: 26px; height: 26px;
...@@ -115,6 +146,7 @@ const switchTab = name => { ...@@ -115,6 +146,7 @@ const switchTab = name => {
text-align: left; text-align: left;
} }
} }
.center-center { .center-center {
margin-top: 4px; margin-top: 4px;
width: 769px; width: 769px;
...@@ -126,10 +158,12 @@ const switchTab = name => { ...@@ -126,10 +158,12 @@ const switchTab = name => {
line-height: 24px; line-height: 24px;
letter-spacing: 0px; letter-spacing: 0px;
} }
.center-footer { .center-footer {
margin-top: 9px; margin-top: 9px;
display: flex; display: flex;
gap: 8px; gap: 8px;
.tag { .tag {
height: 26px; height: 26px;
line-height: 26px; line-height: 26px;
...@@ -148,6 +182,7 @@ const switchTab = name => { ...@@ -148,6 +182,7 @@ const switchTab = name => {
} }
} }
} }
.header-footer { .header-footer {
width: 340px; width: 340px;
height: 48px; height: 48px;
...@@ -156,8 +191,9 @@ const switchTab = name => { ...@@ -156,8 +191,9 @@ const switchTab = name => {
left: 160px; left: 160px;
display: flex; display: flex;
gap: 24px; gap: 24px;
.tab { .tab {
width: 92px; width: 94px;
height: 48px; height: 48px;
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -165,14 +201,17 @@ const switchTab = name => { ...@@ -165,14 +201,17 @@ const switchTab = name => {
gap: 4px; gap: 4px;
cursor: pointer; cursor: pointer;
border-bottom: 2px solid transparent; border-bottom: 2px solid transparent;
.icon { .icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.text { .text {
height: 24px; height: 24px;
color: rgba(59, 65, 75, 1); color: rgba(59, 65, 75, 1);
...@@ -181,23 +220,28 @@ const switchTab = name => { ...@@ -181,23 +220,28 @@ const switchTab = name => {
font-weight: 400; font-weight: 400;
line-height: 24px; line-height: 24px;
} }
.textActive { .textActive {
color: rgba(5, 95, 194, 1); color: rgba(5, 95, 194, 1);
font-weight: 700; font-weight: 700;
} }
} }
.tabActive { .tabActive {
border-bottom: 2px solid rgba(5, 95, 194, 1); border-bottom: 2px solid rgba(5, 95, 194, 1);
} }
} }
} }
.main { .main {
margin: 0 auto; margin: 0 auto;
width: 1600px; width: 1600px;
.main-header { .main-header {
height: 64px; height: 64px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.search-box { .search-box {
margin-top: 16px; margin-top: 16px;
display: flex; display: flex;
...@@ -207,25 +251,30 @@ const switchTab = name => { ...@@ -207,25 +251,30 @@ const switchTab = name => {
border: 1px solid rgba(230, 231, 232, 1); border: 1px solid rgba(230, 231, 232, 1);
border-radius: 4px; border-radius: 4px;
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
.icon { .icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
margin: 8px 7px; margin: 8px 7px;
cursor: pointer; cursor: pointer;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
} }
.select-box { .select-box {
margin-top: 16px; margin-top: 16px;
margin-right: 5px; margin-right: 5px;
} }
} }
.main-content { .main-content {
display: flex; display: flex;
gap: 16px; gap: 16px;
.left { .left {
width: 300px; width: 300px;
height: 806px; height: 806px;
...@@ -235,11 +284,14 @@ const switchTab = name => { ...@@ -235,11 +284,14 @@ const switchTab = name => {
box-shadow: 0px 0px 20px 0px rgba(94, 95, 95, 0.1); box-shadow: 0px 0px 20px 0px rgba(94, 95, 95, 0.1);
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
position: relative; position: relative;
.select-box { .select-box {
margin-top: 21px; margin-top: 21px;
.select-box-header { .select-box-header {
display: flex; display: flex;
gap: 17px; gap: 17px;
.icon { .icon {
margin-top: 4px; margin-top: 4px;
width: 8px; width: 8px;
...@@ -247,6 +299,7 @@ const switchTab = name => { ...@@ -247,6 +299,7 @@ const switchTab = name => {
background: var(--color-main-active); background: var(--color-main-active);
border-radius: 0 4px 4px 0; border-radius: 0 4px 4px 0;
} }
.title { .title {
height: 24px; height: 24px;
color: var(--color-main-active); color: var(--color-main-active);
...@@ -258,39 +311,47 @@ const switchTab = name => { ...@@ -258,39 +311,47 @@ const switchTab = name => {
text-align: left; text-align: left;
} }
} }
.select-main { .select-main {
margin-left: 25px; margin-left: 25px;
} }
.select-main1 { .select-main1 {
width: 100px; width: 100px;
} }
} }
} }
.right { .right {
width: 1284px; width: 1284px;
height: 1377px; height: 1377px;
.card-box { .card-box {
width: 1284px; width: 1284px;
height: 1248px; height: 1248px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap: wrap; flex-wrap: wrap;
.footer-card { .footer-card {
width: 418px; width: 418px;
height: 300px; height: 300px;
border-radius: 10px; border-radius: 10px;
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1); box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 1); background: rgba(255, 255, 255, 1);
.footer-card-top { .footer-card-top {
width: 384px; width: 384px;
height: 206px; height: 206px;
margin: 0 auto; margin: 0 auto;
margin-top: 15px; margin-top: 15px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.footer-card-title { .footer-card-title {
margin: 0 auto; margin: 0 auto;
margin-top: 13px; margin-top: 13px;
...@@ -302,6 +363,7 @@ const switchTab = name => { ...@@ -302,6 +363,7 @@ const switchTab = name => {
font-weight: 700; font-weight: 700;
line-height: 24px; line-height: 24px;
} }
.footer-card-footer { .footer-card-footer {
margin: 0 auto; margin: 0 auto;
margin-top: 5px; margin-top: 5px;
...@@ -317,10 +379,12 @@ const switchTab = name => { ...@@ -317,10 +379,12 @@ const switchTab = name => {
} }
} }
} }
.right-footer { .right-footer {
margin-top: 43px; margin-top: 43px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.info { .info {
height: 19px; height: 19px;
color: rgba(132, 136, 142, 1); color: rgba(132, 136, 142, 1);
...@@ -341,6 +405,7 @@ const switchTab = name => { ...@@ -341,6 +405,7 @@ const switchTab = name => {
box-shadow: none; box-shadow: none;
border-radius: 10px; border-radius: 10px;
} }
:deep(.el-input__wrapper:hover) { :deep(.el-input__wrapper:hover) {
box-shadow: none !important; box-shadow: none !important;
} }
......
...@@ -684,7 +684,7 @@ const box5Data = ref({ ...@@ -684,7 +684,7 @@ const box5Data = ref({
] ]
}); });
//获取当前时间年前的日期 //获取当前时间x年前的日期
function getDateYearsAgo(years) { function getDateYearsAgo(years) {
// 获取当前日期 // 获取当前日期
const currentDate = new Date(); const currentDate = new Date();
...@@ -1202,8 +1202,9 @@ const handleGetetThinkTankReport = async () => { ...@@ -1202,8 +1202,9 @@ const handleGetetThinkTankReport = async () => {
}; };
const handleClick = tank => { const handleClick = tank => {
console.log(tank)
// router.push({ name: "ThinkTankDetail", params: { id: tank.id } }); // router.push({ name: "ThinkTankDetail", params: { id: tank.id } });
const curRoute = router.resolve({ name: "ThinkTankDetail", params: { id: tank.id } }); const curRoute = router.resolve({ name: "ThinkTankDetail", params: { id: tank.id, name: tank.name } });
window.open(curRoute.href, "_blank"); window.open(curRoute.href, "_blank");
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论