提交 f386800f authored 作者: yanpeng's avatar yanpeng

合并pre分支到yp-dev ${date}

...@@ -14,7 +14,9 @@ build_pre: ...@@ -14,7 +14,9 @@ build_pre:
stage: build stage: build
image: node:20-bullseye image: node:20-bullseye
tags: tags:
- risk-monitor-frontend - docker
- frontend
- linux
only: only:
- pre - pre
script: script:
...@@ -37,39 +39,17 @@ deploy_pre: ...@@ -37,39 +39,17 @@ deploy_pre:
stage: deploy stage: deploy
image: alpine:3.20 image: alpine:3.20
tags: tags:
- risk-monitor-frontend - docker
- frontend
- linux
only: only:
- pre - pre
dependencies: dependencies:
- build_pre - build_pre
script: script:
- apk add --no-cache rsync curl jq - apk add --no-cache rsync
# 只允许“最新一次 pre pipeline”部署到 nginx(加二次确认,避免短时间多次推送导致重复 rsync) - test -d dist || (echo "dist not found" && exit 1)
- > - test -d /nas/kjb_service/zm/pre-project/html || (echo "deploy target path not found" && exit 1)
LATEST_PIPELINE_ID="$(
curl --silent --show-error --fail
--header "JOB-TOKEN: $CI_JOB_TOKEN"
"$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/pipelines?ref=pre&order_by=id&sort=desc&per_page=1"
| jq -r '.[0].id'
)"
- >
if [ -z "$LATEST_PIPELINE_ID" ] || [ "$LATEST_PIPELINE_ID" != "$CI_PIPELINE_ID" ]; then
echo "skip deploy: not latest pipeline (latest=$LATEST_PIPELINE_ID current=$CI_PIPELINE_ID)";
exit 0;
fi
- sleep 20
- >
LATEST_PIPELINE_ID="$(
curl --silent --show-error --fail
--header "JOB-TOKEN: $CI_JOB_TOKEN"
"$CI_SERVER_URL/api/v4/projects/$CI_PROJECT_ID/pipelines?ref=pre&order_by=id&sort=desc&per_page=1"
| jq -r '.[0].id'
)"
- >
if [ -z "$LATEST_PIPELINE_ID" ] || [ "$LATEST_PIPELINE_ID" != "$CI_PIPELINE_ID" ]; then
echo "skip deploy: not latest pipeline after debounce (latest=$LATEST_PIPELINE_ID current=$CI_PIPELINE_ID)";
exit 0;
fi
- rsync -avz --delete dist/ /nas/kjb_service/zm/pre-project/html/ - rsync -avz --delete dist/ /nas/kjb_service/zm/pre-project/html/
# 非 protected 分支:push 时先做 build 校验(避免合并 pre 时出现 build 报错) # 非 protected 分支:push 时先做 build 校验(避免合并 pre 时出现 build 报错)
...@@ -77,7 +57,9 @@ build_check: ...@@ -77,7 +57,9 @@ build_check:
stage: build stage: build
image: node:20-bullseye image: node:20-bullseye
tags: tags:
- risk-monitor-frontend - docker
- frontend
- linux
# 只在 push 时做构建校验,且排除 protected 分支与目标分支 pre # 只在 push 时做构建校验,且排除 protected 分支与目标分支 pre
only: only:
- pushes - pushes
......
...@@ -5,29 +5,12 @@ ...@@ -5,29 +5,12 @@
</template> </template>
<script setup> <script setup>
import { ref, computed, onMounted } from "vue"; import { ref, onMounted } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useRoute } from "vue-router";
import AiBox from "./components/AiBox.vue";
import { getPersonType } from "@/api/common/index"; import { getPersonType } from "@/api/common/index";
// import { useDraggable } from "@vueuse/core";
import Menu1 from "@/assets/icons/overview/menu1.png";
import Menu2 from "@/assets/icons/overview/menu2.png";
import Menu3 from "@/assets/icons/overview/menu3.png";
import Menu4 from "@/assets/icons/overview/menu4.png";
import Menu5 from "@/assets/icons/overview/menu5.png";
import Menu6 from "@/assets/icons/overview/menu6.png";
import Menu7 from "@/assets/icons/overview/menu7.png";
import Menu8 from "@/assets/icons/overview/menu8.png";
import Menu9 from "@/assets/icons/overview/menu9.png";
import Menu10 from "@/assets/icons/overview/menu10.png";
import Menu11 from "@/assets/icons/overview/menu11.png";
import Menu12 from "@/assets/icons/overview/menu12.png";
import { ElMessage } from "element-plus";
const router = useRouter(); const router = useRouter();
const route = useRoute();
import useTagsViewStore from '@/stores/tagsView.js' import useTagsViewStore from '@/stores/tagsView.js'
...@@ -37,7 +20,7 @@ const tagsViewStore = useTagsViewStore() ...@@ -37,7 +20,7 @@ const tagsViewStore = useTagsViewStore()
// 在路由全局守卫中处理 // 在路由全局守卫中处理
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
// 路由允许添加标签(排除掉隐藏的布局页如 /404, /login 等) // 路由允许添加标签(排除掉隐藏的布局页如 /404, /login 等)
if (to.path.includes('dataLibrary')) { if (to.path.indexOf('dataLibrary') > -1 ) {
tagsViewStore.addView({ tagsViewStore.addView({
path: to.path, path: to.path,
name: to.name, // 对应组件的 name,用于缓存 name: to.name, // 对应组件的 name,用于缓存
...@@ -48,17 +31,6 @@ router.beforeEach((to, from, next) => { ...@@ -48,17 +31,6 @@ router.beforeEach((to, from, next) => {
next() next()
}) })
const isShowAiBox = ref(false);
const closeAiBox = () => {
isShowAiBox.value = false;
};
const openAiBox = () => {
isShowAiBox.value = true;
};
const personTypeList = ref([]); const personTypeList = ref([]);
// 获取人物类别 // 获取人物类别
...@@ -75,146 +47,6 @@ const handleGetPersonType = async () => { ...@@ -75,146 +47,6 @@ const handleGetPersonType = async () => {
} catch (error) {} } catch (error) {}
}; };
const isCurrentOverview = computed(() => {
if (route.path === "/ZMOverView") {
return true;
} else {
return false;
}
});
// 概览页标题列表
const homeTitleList = ref([
{
name: "中美科技博弈",
path: "/ZMOverView",
disabled: false
},
{
name: "主要国家科技动向感知",
path: "",
disabled: true
},
{
name: "主要国家竞争科技安全",
path: "",
disabled: true
}
]);
const homeActiveTitleIndex = ref(0);
const isShowMenu = ref(false);
const handleShowMenu = (index, isShow) => {
if (index === 0) {
isShowMenu.value = isShow;
}
};
const handleHoverMenu = isShow => {
isShowMenu.value = isShow;
};
const menuList = ref([
{
title: "中美科技博弈概览",
icon: Menu1,
path: "/ZMOverView"
},
{
title: "科技法案",
icon: Menu2,
path: "/billHome"
},
{
title: "科技政令",
icon: Menu3,
path: "/decree"
},
{
title: "美国科技智库",
icon: Menu4,
path: "/thinkTank"
},
{
title: "出口管制",
icon: Menu5,
path: "/exportControl"
},
{
title: "科研合作限制",
icon: Menu6,
path: "/cooperationRestrictions"
},
{
title: "投融资限制",
icon: Menu7,
path: "/finance"
},
{
title: "市场准入限制",
icon: Menu8,
path: "/marketAccessRestrictions"
},
{
title: "规则限制",
icon: Menu9,
path: "/ruleRestrictions"
},
{
title: "美国科技人物观点",
icon: Menu10,
path: "/technologyFigures"
},
{
title: "美国主要创新主体动向",
icon: Menu11,
path: "/innovationSubject"
},
{
title: "美国科研资助体系",
icon: Menu12,
path: "/scientificFunding"
}
]);
const handleToModule = item => {
const curRoute = router.resolve({
path: item.path
});
window.open(curRoute.href, "_blank");
};
const searchText = ref("");
const handleSearch = () => {
const curRoute = router.resolve({
path: "/searchResults",
query: {
searchText: searchText.value
}
});
window.open(curRoute.href, "_blank");
};
const handleClickTitle = item => {
if (item.name === "主要国家科技动向感知" || item.name === "主要国家竞争科技安全") {
ElMessage.warning("当前功能正在开发中,敬请期待!");
}
};
const handleOpenPage = page => {
const pageObj = {
znwd: "/chat",
znxb: "/writtingAsstaint"
};
window.open(pageObj[page], "_blank");
};
const handleClickToolBox = () => {
ElMessage.warning("当前功能正在开发中,敬请期待!");
};
onMounted(() => { onMounted(() => {
handleGetPersonType(); handleGetPersonType();
}); });
...@@ -281,457 +113,6 @@ body { ...@@ -281,457 +113,6 @@ body {
font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif; font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
} }
.pro-wrapper {
width: 100vw;
height: 100vh;
position: relative;
overflow: hidden;
.home-page {
width: 100%;
height: 100%;
position: relative;
.navbar {
width: 100%;
height: 64px;
border-bottom: 1px solid rgba(234, 236, 238, 1);
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: linear-gradient(180deg, rgba(246, 250, 255, 0.8) 0%, rgba(255, 255, 255, 0.8) 100%);
.nav-content {
width: 1600px;
height: 64px;
margin: 0 auto;
display: flex;
justify-content: space-between;
position: relative;
.nav-left {
height: 64px;
display: flex;
.icon {
margin-top: 17px;
width: 29px;
height: 30px;
img {
width: 100%;
height: 100%;
}
}
.title-box {
display: flex;
height: 64px;
margin-left: 21px;
gap: 33px;
.title {
height: 64px;
cursor: pointer;
&:hover {
.text {
color: var(--color-main-active);
}
}
.text {
height: 39px;
margin-top: 12px;
color: rgba(59, 65, 75, 1);
font-family: YouSheBiaoTiHei;
font-style: Regular;
font-size: 30px;
font-weight: 400;
line-height: 39px;
letter-spacing: 0px;
}
.textActive {
color: var(--color-main-active);
}
.bottom-line {
width: 50px;
height: 4px;
margin: 0 auto;
margin-top: 9px;
background: var(--color-main-active);
}
}
}
}
.nav-right {
display: flex;
justify-content: flex-end;
gap: 21px;
.search-box {
margin-top: 16px;
width: 300px;
height: 36px;
box-sizing: border-box;
border: 1px solid rgba(231, 243, 255, 1);
border-radius: 10px;
background: rgba(231, 243, 255, 1);
display: flex;
.input {
width: 264px;
height: 36px;
}
.icon {
width: 18px;
height: 18px;
margin-left: 9px;
margin-top: 9px;
img {
width: 100%;
height: 100%;
}
}
}
.info-box {
height: 64px;
display: flex;
justify-content: flex-end;
align-items: center;
.mail {
width: 32px;
height: 32px;
margin-right: 14px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
}
.user {
width: 32px;
height: 32px;
margin-right: 11px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
}
.name {
width: 48px;
height: 30px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 16px;
font-weight: 400;
line-height: 30px;
letter-spacing: 0px;
}
}
}
.menu-box {
position: absolute;
z-index: 999999;
width: 713px;
height: 413px;
top: 64px;
left: 0;
box-sizing: border-box;
border: 1px solid rgba(255, 255, 255, 1);
border-radius: 10px;
backdrop-filter: blur(30px);
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 0.8);
.menu-content {
width: 562px;
height: 348px;
margin-top: 8px;
margin-left: 72px;
display: flex;
flex-wrap: wrap;
.menu-item {
margin-top: 36px;
width: 280px;
height: 24px;
display: flex;
cursor: pointer;
&:hover {
.title {
color: var(--color-main-active);
font-size: 20px;
}
}
.icon {
width: 24px;
height: 24px;
img {
width: 100%;
height: 100%;
}
}
.title {
margin-left: 16px;
height: 24px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Bold;
font-size: 18px;
font-weight: 700;
line-height: 24px;
letter-spacing: 0px;
text-align: left;
}
}
}
}
}
}
.main-container {
width: 100%;
height: calc(100vh - 64px);
position: relative;
overflow: hidden;
}
}
.content-page {
width: 100%;
height: 100%;
.navbar {
display: flex;
justify-content: center;
align-items: center;
background: #fff;
color: rgba(10, 18, 30, 1);
border-bottom: 1px solid #e5e7eb;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
position: relative;
box-sizing: border-box;
height: 72px;
.nav-brand {
display: flex;
align-items: center;
gap: 12px;
position: absolute;
left: 160px;
.brand-icon {
width: 48px;
height: 48px;
img {
width: 100%;
height: 100%;
}
}
.brand-text {
cursor: pointer;
.text-ch {
height: 37px;
color: rgba(10, 18, 30, 1);
font-family: Microsoft YaHei;
font-size: 32px;
font-weight: 700;
line-height: 37px;
}
.text-en {
color: rgba(10, 18, 30, 1);
font-family: Microsoft YaHei;
font-size: 10px;
font-weight: 400;
line-height: 13px;
}
}
}
.user-info {
display: flex;
align-items: center;
gap: 20px;
padding: 8px 12px;
border-radius: 6px;
color: #333;
position: absolute;
right: 160px;
.email {
width: 20px;
height: 20px;
img {
width: 100%;
height: 100%;
}
}
.avator {
width: 32px;
height: 32px;
img {
width: 100%;
height: 100%;
}
}
.user {
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
line-height: 30px;
}
}
}
.main-container {
width: 100%;
height: calc(100vh - 72px);
position: relative;
overflow: hidden;
}
}
.right-btn {
position: absolute;
// top: 132px;
top: 100px;
right: 0;
z-index: 10000000000000;
.item {
width: 108px;
height: 40px;
box-sizing: border-box;
border: 1px solid #fff;
border-radius: 50px 0px 0px 50px;
background: rgba(255, 255, 255, 0.65);
display: flex;
margin-bottom: 8px;
cursor: pointer;
.icon {
width: 36px;
height: 36px;
margin-top: 2px;
margin-left: 2px;
img {
width: 100%;
height: 100%;
}
}
.text {
width: 36px;
height: 24px;
color: rgba(59, 65, 75, 1);
font-family: Source Han Sans CN;
font-style: Regular;
font-size: 18px;
font-weight: 400;
line-height: 24px;
letter-spacing: 0px;
text-align: left;
margin-top: 8px;
margin-left: 10px;
}
}
}
.tool-box {
position: absolute;
top: 400px;
right: 28px;
top: 681px;
width: 62px;
height: 217px;
box-sizing: border-box;
border: 1px solid rgba(255, 255, 255, 1);
border-radius: 10px;
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 0.65);
box-sizing: border-box;
padding: 24px 18px;
display: flex;
flex-direction: column;
justify-content: space-between;
.tool-item {
width: 24px;
height: 24px;
cursor: pointer;
img {
width: 100%;
height: 100%;
}
}
}
.ai-btn {
position: absolute;
bottom: 240px;
right: 10px;
z-index: 9999;
cursor: pointer;
.icon {
width: 96px;
height: 96px;
img {
width: 100%;
height: 100%;
}
}
.text {
margin-top: -15px;
height: 24px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-size: 16px;
font-weight: 400;
line-height: 24px;
text-align: center;
}
}
.ai-dialog {
position: absolute;
right: 100px;
top: 100px;
z-index: 9999;
}
}
:deep(.el-input__wrapper) { :deep(.el-input__wrapper) {
height: 100%; height: 100%;
box-shadow: none; box-shadow: none;
...@@ -747,27 +128,4 @@ body { ...@@ -747,27 +128,4 @@ body {
box-shadow: none !important; box-shadow: none !important;
} }
.title[aria-disabled="true"] {
opacity: 0.3;
cursor: not-allowed;
pointer-events: none;
}
.info-box[aria-disabled="true"] {
opacity: 0.3;
cursor: not-allowed;
pointer-events: none;
}
.right-btn[aria-disabled="true"] {
opacity: 0.3;
cursor: not-allowed;
pointer-events: none;
}
.tool-box[aria-disabled="true"] {
opacity: 0.3;
cursor: not-allowed;
pointer-events: none;
}
</style> </style>
...@@ -10,9 +10,8 @@ ...@@ -10,9 +10,8 @@
<div class="title-box" v-show="!isShowSearchBar"> <div class="title-box" v-show="!isShowSearchBar">
<!-- <div class="title-box" v-if="false"> --> <!-- <div class="title-box" v-if="false"> -->
<div class="title" v-for="(item, index) in homeTitleList" :key="index" <div class="title" v-for="(item, index) in homeTitleList" :key="index"
@mouseenter="handleShowMenu(index, true)" @mouseleave="handleShowMenu(index, false)" @mouseenter="handleShowMenu(index, true)" @click="handleClickTitle(item, index)">
@click="handleClickTitle(item)"> <div class="text text-title-1-show" :class="{ textActive: homeActiveTitleIndex === index }">
<div class="text" :class="{ textActive: homeActiveTitleIndex === index }">
{{ item.name }} {{ item.name }}
</div> </div>
<div class="bottom-line" v-if="homeActiveTitleIndex === index"></div> <div class="bottom-line" v-if="homeActiveTitleIndex === index"></div>
...@@ -28,13 +27,24 @@ ...@@ -28,13 +27,24 @@
<div class="user"> <div class="user">
<img src="@/assets/icons/overview/user.png" alt="" /> <img src="@/assets/icons/overview/user.png" alt="" />
</div> </div>
<div class="name">{{ "管理员" }}</div> <div class="name text-regular">{{ "管理员" }}</div>
</div> </div>
</div> </div>
<div class="menu-box" v-show="isShowMenu" @mouseenter="handleHoverMenu(true)" <div class="menu-box" v-show="isShowMenu" @mouseenter="handleHoverMenu(true)"
@mouseleave="handleHoverMenu(false)"> @mouseleave="handleHoverMenu(false)">
<div class="menu-content"> <div class="menu-content">
<div class="menu-item" v-for="(item, index) in menuList" :key="index" @click="handleToModule(item)"> <div class="menu-item" v-for="(item, index) in menuList" :key="index" @click="handleToModule(item, 1)">
<div class="icon">
<img :src="item.icon" alt="" />
</div>
<div class="title">{{ item.title }}</div>
</div>
</div>
</div>
<div class="tool-box" v-show="isShowTool" @mouseenter="handleHoverTool(true)"
@mouseleave="handleHoverTool(false)">
<div class="menu-content">
<div class="menu-item" v-for="(item, index) in toolList" :key="index" @click="handleToModule(item, 2)">
<div class="icon"> <div class="icon">
<img :src="item.icon" alt="" /> <img :src="item.icon" alt="" />
</div> </div>
...@@ -47,7 +57,7 @@ ...@@ -47,7 +57,7 @@
</template> </template>
<script setup> <script setup>
import { ref, computed, onMounted, watchEffect } from "vue"; import { ref, computed, onMounted, watchEffect, onUnmounted } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import { useRoute } from "vue-router"; import { useRoute } from "vue-router";
import { getPersonType } from "@/api/common/index"; import { getPersonType } from "@/api/common/index";
...@@ -65,6 +75,8 @@ import Menu9 from "@/assets/icons/overview/menu9.png"; ...@@ -65,6 +75,8 @@ import Menu9 from "@/assets/icons/overview/menu9.png";
import Menu10 from "@/assets/icons/overview/menu10.png"; import Menu10 from "@/assets/icons/overview/menu10.png";
import Menu11 from "@/assets/icons/overview/menu11.png"; import Menu11 from "@/assets/icons/overview/menu11.png";
import Menu12 from "@/assets/icons/overview/menu12.png"; import Menu12 from "@/assets/icons/overview/menu12.png";
import Tool1 from './tool1.svg'
import Tool2 from './tool2.svg'
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore"; import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore";
const store = useWrittingAsstaintStore(); const store = useWrittingAsstaintStore();
...@@ -91,29 +103,43 @@ const handleGetPersonType = async () => { ...@@ -91,29 +103,43 @@ const handleGetPersonType = async () => {
// 概览页标题列表 // 概览页标题列表
const homeTitleList = ref([ const homeTitleList = ref([
{ {
name: "中美科技博弈", name: "首页",
path: "/ZMOverView", path: "/ZMOverView",
disabled: false disabled: false
}, },
// {
// name: "主要国家科技动向感知", {
// path: "", name: "中美科技博弈",
// disabled: true path: "/billHome",
// }, disabled: false
// { },
// name: "主要国家竞争科技安全", {
// path: "", name: "智能工具",
// disabled: true path: "/chat",
// } disabled: false
},
{
name: "数据资源库",
path: "/dataLibrary",
disabled: false
}
]); ]);
const homeActiveTitleIndex = ref(0); const homeActiveTitleIndex = ref(0);
const isShowMenu = ref(false); const isShowMenu = ref(false);
const handleShowMenu = (index, isShow) => { const handleShowMenu = (index, isShow) => {
if (index === 0) { if (index === 1) {
isShowMenu.value = isShow; isShowMenu.value = isShow;
isShowTool.value = false;
} else if (index === 2) {
isShowMenu.value = false
isShowTool.value = isShow;
} else {
isShowMenu.value = false
isShowTool.value = false;
} }
}; };
...@@ -122,11 +148,11 @@ const handleHoverMenu = isShow => { ...@@ -122,11 +148,11 @@ const handleHoverMenu = isShow => {
}; };
const menuList = ref([ const menuList = ref([
{ // {
title: "中美科技博弈概览", // title: "中美科技博弈概览",
icon: Menu1, // icon: Menu1,
path: "/ZMOverView" // path: "/ZMOverView"
}, // },
{ {
title: "科技法案", title: "科技法案",
icon: Menu2, icon: Menu2,
...@@ -184,29 +210,57 @@ const menuList = ref([ ...@@ -184,29 +210,57 @@ const menuList = ref([
} }
]); ]);
const handleToModule = item => { const isShowTool = ref(false);
const handleHoverTool = isShow => {
isShowTool.value = isShow;
};
const toolList = ref([
{
title: "智能问答",
icon: Tool1,
path: "/chat"
},
{
title: "智能写报",
icon: Tool2,
path: "/writtingAsstaint"
},
])
const handleToModule = (item, index) => {
homeActiveTitleIndex.value = index
if (index === 1) {
router.push({
path: item.path
})
} else {
const curRoute = router.resolve({ const curRoute = router.resolve({
path: item.path path: item.path
}); });
window.open(curRoute.href, "_blank"); window.open(curRoute.href, "_blank");
}
isShowMenu.value = false
isShowTool.value = false
}; };
const searchText = ref(""); const handleClickTitle = (item, index) => {
if (homeActiveTitleIndex.value === index) return
const handleSearch = () => { homeActiveTitleIndex.value = index
window.localStorage.setItem('homeActiveTitleIndex', homeActiveTitleIndex.value)
if (item.name === '智能工具') {
const curRoute = router.resolve({ const curRoute = router.resolve({
path: "/searchResults", path: item.path,
query: {
searchText: searchText.value
}
}); });
window.open(curRoute.href, "_blank"); window.open(curRoute.href, "_blank");
}; } else {
router.push(item.path)
const handleClickTitle = item => {
if (item.name === "主要国家科技动向感知" || item.name === "主要国家竞争科技安全") {
ElMessage.warning("当前功能正在开发中,敬请期待!");
} }
}; };
const handleClickToolBox = () => { const handleClickToolBox = () => {
...@@ -215,7 +269,12 @@ const handleClickToolBox = () => { ...@@ -215,7 +269,12 @@ const handleClickToolBox = () => {
onMounted(() => { onMounted(() => {
handleGetPersonType(); handleGetPersonType();
homeActiveTitleIndex.value = Number(window.localStorage.getItem('homeActiveTitleIndex'))
}); });
onUnmounted(() => {
window.localStorage.removeItem('homeActiveTitleIndex')
})
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
...@@ -285,12 +344,7 @@ onMounted(() => { ...@@ -285,12 +344,7 @@ onMounted(() => {
} }
.text { .text {
color: rgba(59, 65, 75, 1); color: var(--text-primary-80-color);
font-family: YouSheBiaoTiHei;
font-style: Regular;
font-size: 30px;
font-weight: 400;
letter-spacing: 0px;
} }
.textActive { .textActive {
...@@ -360,13 +414,7 @@ onMounted(() => { ...@@ -360,13 +414,7 @@ onMounted(() => {
.name { .name {
width: 48px; width: 48px;
height: 30px; height: 30px;
color: rgba(59, 65, 75, 1); color: var(--text-primary-80-color);
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 16px;
font-weight: 400;
line-height: 30px;
letter-spacing: 0px;
} }
} }
} }
...@@ -406,18 +454,69 @@ onMounted(() => { ...@@ -406,18 +454,69 @@ onMounted(() => {
width: 562px; width: 562px;
height: 348px; height: 348px;
margin-top: 8px; margin-top: 8px;
margin-left: 72px; margin-left: 72px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.menu-item { .menu-item {
margin-top: 36px; margin-top: 36px;
width: 280px; width: 280px;
height: 24px; height: 24px;
display: flex; display: flex;
cursor: pointer; cursor: pointer;
&:hover {
.title {
color: var(--color-main-active);
font-size: 20px;
}
}
.icon {
width: 24px;
height: 24px;
img {
width: 100%;
height: 100%;
}
}
.title {
margin-left: 16px;
height: 24px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Bold;
font-size: 18px;
font-weight: 700;
line-height: 24px;
letter-spacing: 0px;
text-align: left;
}
}
}
}
.tool-box {
position: absolute;
z-index: 999999;
width: 273px;
height: 171px;
top: 52px;
left: 300px;
box-sizing: border-box;
border: 1px solid rgba(255, 255, 255, 1);
border-radius: 10px;
backdrop-filter: blur(30px);
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
background: rgba(255, 255, 255, 0.8);
.menu-content {
width: 562px;
height: 348px;
margin-top: 8px;
margin-left: 72px;
.menu-item {
margin-top: 36px;
width: 280px;
height: 24px;
display: flex;
cursor: pointer;
&:hover { &:hover {
.title { .title {
color: var(--color-main-active); color: var(--color-main-active);
...@@ -434,7 +533,6 @@ onMounted(() => { ...@@ -434,7 +533,6 @@ onMounted(() => {
height: 100%; height: 100%;
} }
} }
.title { .title {
margin-left: 16px; margin-left: 16px;
height: 24px; height: 24px;
......
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24.000000" height="24.000000" fill="none" customFrame="#000000">
<defs>
<linearGradient id="paint_linear_1" x1="12" x2="12" y1="1" y2="23.0000019" gradientUnits="userSpaceOnUse">
<stop stop-color="rgb(0,91,244)" offset="0" stop-opacity="1" />
<stop stop-color="rgb(101,0,253)" offset="1" stop-opacity="1" />
</linearGradient>
</defs>
<rect id="ZM" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<path id="合并" d="M16.1924 8.34956L17.265 9.39747C16.1916 12.5467 12.973 15.696 8.68258 16.2219C5.81801 16.5715 2.54479 19.4738 1 23C2.07341 16.7015 4.39054 1 20.4837 1C19.4119 4.1461 18.3401 6.24507 17.2683 7.29535L16.1924 8.34956ZM16.9643 4.86177C17.4797 3.85558 19.0242 2.51052 19.0242 1.83869C18.5092 2.17461 16.9643 2.84605 15.9343 4.35789C14.9044 5.86972 12.3295 6.87729 12.3295 6.87729C13.3594 6.54137 16.4489 5.86795 16.9643 4.86177ZM15.4194 8.8928C15.4194 9.56464 15.1104 11.1099 13.8744 11.9161C12.6385 12.7223 10.2696 13.5957 9.23961 13.9316C9.23961 13.9316 12.0205 12.6215 12.8445 11.4122C13.6684 10.2029 14.9044 9.22872 15.4194 8.8928ZM19.254 14.3913C19.254 14.3913 18.5049 16.1842 17.0059 17.2593C15.507 18.3345 13.2582 18.6917 13.2582 18.6917C13.2582 18.6917 15.3188 19.0509 16.2555 20.128C17.1923 21.205 17.0051 23 17.0051 23C17.0051 23 17.7544 21.205 19.2532 20.128C20.7519 19.0509 23 18.6919 23 18.6919C23 18.6919 20.9401 18.3345 20.0036 17.2593C19.0671 16.1842 19.254 14.3913 19.254 14.3913Z" fill="url(#paint_linear_1)" fill-rule="evenodd" />
</svg>
<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="24.000000" height="24.000000" fill="none" customFrame="#000000">
<defs>
<linearGradient id="paint_linear_2" x1="12" x2="12" y1="2" y2="22" gradientUnits="userSpaceOnUse">
<stop stop-color="rgb(0,91,244)" offset="0" stop-opacity="1" />
<stop stop-color="rgb(101,0,253)" offset="1" stop-opacity="1" />
</linearGradient>
</defs>
<rect id="法案" width="24.000000" height="24.000000" x="0.000000" y="0.000000" />
<path id="减去顶层" d="M1.00002 11.1429C1.00002 6.0934 5.66569 2 11.4211 2C17.1765 2 21.8421 6.0934 21.8421 11.1429C21.8421 16.1923 17.1765 20.2857 11.4211 20.2857C10.0795 20.2857 8.79726 20.0634 7.61946 19.6584C6.99335 19.443 5.83647 18.8635 5.83647 18.8635L1 19.6588L2.90775 16.417C2.90775 16.417 2.15952 15.3834 1.87639 14.8183C1.31279 13.6935 1.00002 12.4503 1.00002 11.1429ZM15.7969 6.57031C15.7969 6.57031 15.5142 7.22506 14.9487 7.61766C14.3831 8.01027 13.5347 8.14075 13.5347 8.14075C13.5347 8.14075 14.3121 8.2719 14.6656 8.66523C15.019 9.05855 14.9484 9.71404 14.9484 9.71404C14.9484 9.71404 15.2311 9.05854 15.7965 8.66523C16.362 8.27192 17.2102 8.14079 17.2102 8.14079C17.2102 8.14079 16.433 8.01028 16.0797 7.61766C15.7263 7.22505 15.7969 6.57031 15.7969 6.57031ZM12.5406 14.0703L11.6792 8.14197L7.22535 8.14197L7.55117 8.43609L5.05229 14.0703L6.89676 14.0703L7.65333 12.4565L10.3676 12.4565L10.594 14.0703L12.5406 14.0703ZM8.09512 11.4514L9.18027 9.14708L9.9396 9.14708L10.2654 11.4514L8.09512 11.4514ZM16.3866 9.83812L15.6492 14.0703L13.5921 14.0703L14.1004 10.2371L13.7718 9.83812L16.3866 9.83812ZM9.10525 20.5652C10.534 21.4701 12.266 22 14.1326 22C19.0299 22 23 18.3529 23 13.854C23 12.9035 22.8228 11.991 22.497 11.1429C22.5038 11.2826 22.5072 11.423 22.5072 11.5643C22.5072 16.7661 17.8755 20.9831 12.162 20.9831C11.0979 20.9831 10.0713 20.8368 9.10525 20.5652Z" fill="url(#paint_linear_2)" fill-rule="evenodd" />
</svg>
...@@ -13,8 +13,8 @@ import '@/assets/fonts/font.css' ...@@ -13,8 +13,8 @@ import '@/assets/fonts/font.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// import AreaTag from '@/components/base/AreaTag/index.vue' // import AreaTag from '@/components/base/AreaTag/index.vue'
// import LeftBtn from "@/components/base/pageBtn/leftBtn.vue"; // import LeftBtn from "@/components/base/pageBtn/LeftBtn.vue";
// import RightBtn from "@/components/base/pageBtn/rightBtn.vue"; // import RightBtn from "@/components/base/pageBtn/RightBtn.vue";
// import OverviewMainBox from "@/components/base/boxBackground/overviewMainBox.vue"; // import OverviewMainBox from "@/components/base/boxBackground/overviewMainBox.vue";
// import OverviewNormalBox from "@/components/base/boxBackground/overviewNormalBox.vue"; // import OverviewNormalBox from "@/components/base/boxBackground/overviewNormalBox.vue";
// import AnalysisBox from '@/components/base/boxBackground/analysisBox.vue' // import AnalysisBox from '@/components/base/boxBackground/analysisBox.vue'
......
...@@ -26,13 +26,11 @@ const routes = [ ...@@ -26,13 +26,11 @@ const routes = [
name: "Home", name: "Home",
component: Home, component: Home,
children: [ children: [
...fileRoutes ...fileRoutes,
]
},
{ {
path: "/dataLibrary", path: "/dataLibrary",
name: "DataLibrary", name: "DataLibrary",
redirect: "./dataLibrary/countryBill",
component: DataLibrary, component: DataLibrary,
meta: { meta: {
title: '数据资源库' title: '数据资源库'
...@@ -41,6 +39,20 @@ const routes = [ ...@@ -41,6 +39,20 @@ const routes = [
...dataRoutes ...dataRoutes
] ]
}, },
]
},
// {
// path: "/dataLibrary",
// name: "DataLibrary",
// component: DataLibrary,
// meta: {
// title: '数据资源库'
// },
// children: [
// ...dataRoutes
// ]
// },
]; ];
......
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
<pre> <pre>
{{ {{
` `
import LeftBtn from '@/components/base/pageBtn/leftBtn.vue' import LeftBtn from '@/components/base/pageBtn/LeftBtn.vue'
import RightBtn from '@/components/base/pageBtn/rightBtn.vue' import RightBtn from '@/components/base/pageBtn/RightBtn.vue'
<LeftBtn /> <LeftBtn />
<RightBtn /> <RightBtn />
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
<script setup> <script setup>
import '@/styles/common.scss' import '@/styles/common.scss'
import LeftBtn from '@/components/base/pageBtn/leftBtn.vue' import LeftBtn from '@/components/base/pageBtn/LeftBtn.vue'
import RightBtn from '@/components/base/pageBtn/rightBtn.vue' import RightBtn from '@/components/base/pageBtn/RightBtn.vue'
const span = 12 const span = 12
</script> </script>
......
...@@ -83,7 +83,8 @@ ...@@ -83,7 +83,8 @@
</el-icon> </el-icon>
</div> </div>
<div class="right-box1-main-bottom"> <div class="right-box1-main-bottom">
<WordCloudMap :data="wordCloudData" :selectedName="selectedIndustryName" shape="circle" @wordClick="handleWordClick" /> <WordCloudMap :data="wordCloudData" :selectedName="selectedIndustryName" shape="circle"
@wordClick="handleWordClick" />
</div> </div>
</div> </div>
<div class="right-box2"> <div class="right-box2">
...@@ -125,9 +126,11 @@ import defaultNew from "../assets/images/default-icon-news.png"; ...@@ -125,9 +126,11 @@ import defaultNew from "../assets/images/default-icon-news.png";
import defaultA from "../assets/images/default-icon1.png"; import defaultA from "../assets/images/default-icon1.png";
import { getBillBackground, getBillPersonAnalyze, getBillInfoEvent, getBillPersonAnalyzeDy } from "@/api/bill"; import { getBillBackground, getBillPersonAnalyze, getBillInfoEvent, getBillPersonAnalyzeDy } from "@/api/bill";
import { useGotoNewsDetail } from "@/router/modules/news";
const route = useRoute(); const route = useRoute();
const router = useRouter(); const router = useRouter();
const gotoNewsDetail = useGotoNewsDetail();
const handleNewsImgError = e => { const handleNewsImgError = e => {
e.target.src = defaultNew; e.target.src = defaultNew;
...@@ -135,13 +138,9 @@ const handleNewsImgError = e => { ...@@ -135,13 +138,9 @@ const handleNewsImgError = e => {
// 跳转到相关新闻 // 跳转到相关新闻
const handleClickEvent = item => { const handleClickEvent = item => {
const routeData = router.resolve({ const newsId = item?.id || item?.newsId;
path: "/newsAnalysis", if (!newsId) return;
query: { gotoNewsDetail(newsId);
newsId: item.id
}
});
window.open(routeData.href, "_blank");
}; };
...@@ -149,13 +148,19 @@ const handleClickEvent = item => { ...@@ -149,13 +148,19 @@ const handleClickEvent = item => {
// 跳转人员详情 // 跳转人员详情
const handleClickUser = item => { const handleClickUser = item => {
window.sessionStorage.setItem('curTabName', item.name) window.sessionStorage.setItem('curTabName', item.name)
const routeData = router.resolve({ // const routeData = router.resolve({
// path: "/characterPage",
// query: {
// personId: item.id
// }
// });
// window.open(routeData.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
personId: item.id personId: item.id
} }
}); })
window.open(routeData.href, "_blank");
}; };
const box1BtnActive = ref(1); const box1BtnActive = ref(1);
...@@ -281,7 +286,7 @@ const handleGetBillPersonAnalyze = async isOppose => { ...@@ -281,7 +286,7 @@ const handleGetBillPersonAnalyze = async isOppose => {
const { members, industryCounts } = res.data; const { members, industryCounts } = res.data;
// 更新人员列表 // 更新人员列表
personList.value = members || []; personList.value = members || [];
personList.value.forEach((item, index) => { personList.value.forEach(item => {
// 优先使用接口返回的图片,没有则使用默认头像 defaultA // 优先使用接口返回的图片,没有则使用默认头像 defaultA
item.image = item.imageUrl || defaultA; item.image = item.imageUrl || defaultA;
item.icon = userIcon; item.icon = userIcon;
...@@ -400,6 +405,7 @@ onMounted(() => { ...@@ -400,6 +405,7 @@ onMounted(() => {
.left-box--background { .left-box--background {
height: auto; height: auto;
.box1-main { .box1-main {
.box1-main-center { .box1-main-center {
margin: 0 auto; margin: 0 auto;
...@@ -497,6 +503,7 @@ onMounted(() => { ...@@ -497,6 +503,7 @@ onMounted(() => {
.left-box--event { .left-box--event {
margin-top: 15px; margin-top: 15px;
height: auto; height: auto;
.box2-main { .box2-main {
--event-item-height: 60px; --event-item-height: 60px;
......
...@@ -433,14 +433,21 @@ const handleClickAvatar = async member => { ...@@ -433,14 +433,21 @@ const handleClickAvatar = async member => {
return; return;
} }
window.sessionStorage.setItem("curTabName", member.name || ""); window.sessionStorage.setItem("curTabName", member.name || "");
const routeData = router.resolve({ // const routeData = router.resolve({
// path: "/characterPage",
// query: {
// type,
// personId: member.id
// }
// });
// window.open(routeData.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
type, type,
personId: member.id personId: member.id
} }
}); })
window.open(routeData.href, "_blank");
} else { } else {
personTypeName = ""; personTypeName = "";
ElMessage.warning("找不到当前人员的类型值!"); ElMessage.warning("找不到当前人员的类型值!");
......
...@@ -25,7 +25,9 @@ ...@@ -25,7 +25,9 @@
</div> </div>
<div class="committee-cards-row"> <div class="committee-cards-row">
<div v-for="item in committeeCardList" :key="item.id" class="committee-card"> <div v-for="item in committeeCardList" :key="item.id" class="committee-card">
<div class="committee-card-icon"></div> <div class="committee-card-icon">
<img :src="iconCommit" alt="委员会头像" />
</div>
<div class="committee-card-content"> <div class="committee-card-content">
<div class="committee-card-name">{{ item.name }}</div> <div class="committee-card-name">{{ item.name }}</div>
<div class="committee-card-chamber">{{ item.chamber }}</div> <div class="committee-card-chamber">{{ item.chamber }}</div>
...@@ -38,7 +40,7 @@ ...@@ -38,7 +40,7 @@
<DivideHeader id="position1" class="divide1" :titleText="'最新动态'"></DivideHeader> <DivideHeader id="position1" class="divide1" :titleText="'最新动态'"></DivideHeader>
<div class="home-content-center"> <div class="home-content-center">
<div class="center-top"> <div class="center-top">
<overviewMainBox class="box1" title="热门法案" @toDetail="handleClickToDetail"> <OverviewMainBox class="box1" title="热门法案" @toDetail="handleClickToDetail">
<template #headerIcon> <template #headerIcon>
<img style="width: 100%; height: 100%" src="./assets/images/box1-header-icon.png" alt="" /> <img style="width: 100%; height: 100%" src="./assets/images/box1-header-icon.png" alt="" />
</template> </template>
...@@ -114,14 +116,15 @@ ...@@ -114,14 +116,15 @@
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
</div> </div>
</overviewMainBox> </OverviewMainBox>
<RiskSignal :list="warningList" @more-click="handleToMoreRiskSignal" @item-click="handleClickToDetailO" <RiskSignal :list="warningList" @more-click="handleToMoreRiskSignal" @item-click="handleClickToDetailO"
riskLevel="signalLevel" postDate="signalTime" name="signalTitle" /> riskLevel="signalLevel" postDate="signalTime" name="signalTitle" />
</div> </div>
<DivideHeader id="position2" class="divide2" :titleText="'资讯要闻'"></DivideHeader> <DivideHeader id="position2" class="divide2" :titleText="'资讯要闻'"></DivideHeader>
<div class="center-center"> <div class="center-center">
<NewsList :newsList="newsList" img="newsImage" title="newsTitle" from="from" content="newsContent" /> <NewsList :newsList="newsList" img="newsImage" title="newsTitle" from="from" content="newsContent"
@item-click="handleClickNewsDetail" />
<MessageBubble :messageList="messageList" imageUrl="personImage" @more-click="handleToSocialDetail" <MessageBubble :messageList="messageList" imageUrl="personImage" @more-click="handleToSocialDetail"
@person-click="handleClickToCharacter" name="personName" content="remarks" source="orgName" /> @person-click="handleClickToCharacter" name="personName" content="remarks" source="orgName" />
</div> </div>
...@@ -287,10 +290,11 @@ import getDoublePieChart from "./utils/doublePieChart"; ...@@ -287,10 +290,11 @@ import getDoublePieChart from "./utils/doublePieChart";
import box5HeaderIcon from "./assets/images/box5-header-icon.png"; import box5HeaderIcon from "./assets/images/box5-header-icon.png";
import box6HeaderIcon from "./assets/images/box6-header-icon.png"; import box6HeaderIcon from "./assets/images/box6-header-icon.png";
import box7HeaderIcon from "./assets/images/box7-header-icon.png"; import box7HeaderIcon from "./assets/images/box7-header-icon.png";
import iconCommit from "./assets/icons/icon-commit.png";
import { ElMessage } from "element-plus"; import { ElMessage } from "element-plus";
import { Calendar } from "@element-plus/icons-vue"; import { Calendar } from "@element-plus/icons-vue";
import { useGotoNewsDetail } from "@/router/modules/news";
// 跳转人物主页 // 跳转人物主页
const handleClickToCharacter = async (id, name) => { const handleClickToCharacter = async (id, name) => {
...@@ -327,14 +331,23 @@ const handleClickToCharacter = async (id, name) => { ...@@ -327,14 +331,23 @@ const handleClickToCharacter = async (id, name) => {
return; return;
} }
window.sessionStorage.setItem("curTabName", name); window.sessionStorage.setItem("curTabName", name);
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// type: type, // type=1为科技企业领袖,2为国会议员,3为智库研究人员
// personId: id
// }
// });
// window.open(route.href, "_blank");
router.push(
{
path: "/characterPage", path: "/characterPage",
query: { query: {
type: type, // type=1为科技企业领袖,2为国会议员,3为智库研究人员 type: type, // type=1为科技企业领袖,2为国会议员,3为智库研究人员
personId: id personId: id
} }
}); }
window.open(route.href, "_blank"); )
} else { } else {
personTypeName = ""; personTypeName = "";
ElMessage.warning("找不到当前人员的类型值!"); ElMessage.warning("找不到当前人员的类型值!");
...@@ -420,28 +433,34 @@ const curBill = ref({ ...@@ -420,28 +433,34 @@ const curBill = ref({
const handleClickToDetail = () => { const handleClickToDetail = () => {
window.sessionStorage.setItem("billId", curBill.value.billId); window.sessionStorage.setItem("billId", curBill.value.billId);
window.sessionStorage.setItem("curTabName", curBill.value.billName); window.sessionStorage.setItem("curTabName", curBill.value.billName);
const route = router.resolve({ // const route = router.resolve({
// path: "/billLayout",
// query: {
// billId: curBill.value.billId
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/billLayout", path: "/billLayout",
query: { query: {
billId: curBill.value.billId billId: curBill.value.billId
} }
}); })
console.log(route);
window.open(route.href, "_blank");
}; };
// 查看详情 传递参数 // 查看详情 传递参数
const handleClickToDetailO = item => { const handleClickToDetailO = item => {
window.sessionStorage.setItem("billId", item.billId); window.sessionStorage.setItem("billId", item.billId);
window.sessionStorage.setItem("curTabName", item.name || item.signalTitle); window.sessionStorage.setItem("curTabName", item.name || item.signalTitle);
const route = router.resolve("/billLayout?billId=" + item.billId); // const route = router.resolve("/billLayout?billId=" + item.billId);
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
router.push("/billLayout?billId=" + item.billId)
}; };
// 查看更多风险信号 // 查看更多风险信号
const handleToMoreRiskSignal = () => { const handleToMoreRiskSignal = () => {
const route = router.resolve("/viewRiskSignal"); // const route = router.resolve("/viewRiskSignal");
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
router.push("/viewRiskSignal")
}; };
// 风险信号 // 风险信号
const warningList = ref([]); const warningList = ref([]);
...@@ -498,18 +517,21 @@ const aiPaneLoading = ref({ ...@@ -498,18 +517,21 @@ const aiPaneLoading = ref({
box9: false box9: false
}); });
const gotoNewsDetail = useGotoNewsDetail();
const handleClickNewsDetail = news => {
const newsId = news?.newsId || news?.id;
if (!newsId) return;
gotoNewsDetail(newsId);
};
const buildAiChartPayload = key => { const buildAiChartPayload = key => {
if (key === "box5") { if (key === "box5") {
const title = Array.isArray(box5Data.value.title) ? box5Data.value.title : []; const title = Array.isArray(box5Data.value.title) ? box5Data.value.title : [];
const proposed = box5Data.value?.data?.[0]?.value || []; const proposed = box5Data.value?.data?.[0]?.value || [];
const passed = box5Data.value?.data?.[1]?.value || []; const passed = box5Data.value?.data?.[1]?.value || [];
const rate = const housePassed = box5Data.value?.data?.[2]?.value || [];
box5Data.value.percent || const senatePassed = box5Data.value?.data?.[3]?.value || [];
title.map((_, i) => { const hsPassed = box5Data.value?.data?.[4]?.value || [];
const p = Number(proposed[i] || 0);
const pass = Number(passed[i] || 0);
return p ? Number(((pass / p) * 100).toFixed(2)) : 0;
});
return { return {
type: "折线图", type: "折线图",
name: "涉华法案数量变化趋势", name: "涉华法案数量变化趋势",
...@@ -517,7 +539,9 @@ const buildAiChartPayload = key => { ...@@ -517,7 +539,9 @@ const buildAiChartPayload = key => {
month, month,
proposed: Number(proposed[i] || 0), proposed: Number(proposed[i] || 0),
passed: Number(passed[i] || 0), passed: Number(passed[i] || 0),
pass_rate: Number(rate[i] || 0) house_passed: Number(housePassed[i] || 0),
senate_passed: Number(senatePassed[i] || 0),
hs_passed: Number(hsPassed[i] || 0)
})) }))
}; };
} }
...@@ -750,6 +774,18 @@ const box5Data = ref({ ...@@ -750,6 +774,18 @@ const box5Data = ref({
{ {
name: "通过法案", name: "通过法案",
value: [6, 3, 4, 6, 11, 5, 2, 14, 16, 27, 28, 44] value: [6, 3, 4, 6, 11, 5, 2, 14, 16, 27, 28, 44]
},
{
name: "众议院通过",
value: []
},
{
name: "参议院通过",
value: []
},
{
name: "双院通过",
value: []
} }
] ]
}); });
...@@ -772,11 +808,23 @@ const handleGetBillCount = async () => { ...@@ -772,11 +808,23 @@ const handleGetBillCount = async () => {
data: [ data: [
{ {
name: "提出法案", name: "提出法案",
value: sortedData.map(item => item.totalCount) value: sortedData.map(item => item.proposedCount)
}, },
{ {
name: "通过法案", name: "通过法案",
value: sortedData.map(item => item.passCount) value: sortedData.map(item => item.passCount)
},
{
name: "众议院通过",
value: sortedData.map(item => item.houseCount)
},
{
name: "参议院通过",
value: sortedData.map(item => item.senateCount)
},
{
name: "双院通过",
value: sortedData.map(item => item.hscount)
} }
], ],
percent: sortedData.map(item => item.percent) percent: sortedData.map(item => item.percent)
...@@ -788,7 +836,10 @@ const handleGetBillCount = async () => { ...@@ -788,7 +836,10 @@ const handleGetBillCount = async () => {
title: [], title: [],
data: [ data: [
{ name: "提出法案", value: [] }, { name: "提出法案", value: [] },
{ name: "通过法案", value: [] } { name: "通过法案", value: [] },
{ name: "众议院通过", value: [] },
{ name: "参议院通过", value: [] },
{ name: "双院通过", value: [] }
], ],
percent: [] percent: []
}; };
...@@ -801,7 +852,10 @@ const handleGetBillCount = async () => { ...@@ -801,7 +852,10 @@ const handleGetBillCount = async () => {
title: [], title: [],
data: [ data: [
{ name: "提出法案", value: [] }, { name: "提出法案", value: [] },
{ name: "通过法案", value: [] } { name: "通过法案", value: [] },
{ name: "众议院通过", value: [] },
{ name: "参议院通过", value: [] },
{ name: "双院通过", value: [] }
], ],
percent: [] percent: []
}; };
...@@ -814,13 +868,17 @@ const handleBox5 = async () => { ...@@ -814,13 +868,17 @@ const handleBox5 = async () => {
await nextTick(); await nextTick();
const proposed = box5Data.value.data[0].value; const proposed = box5Data.value.data[0].value;
const passed = box5Data.value.data[1].value; const passed = box5Data.value.data[1].value;
const rate = const housePassed = box5Data.value.data[2].value;
box5Data.value.percent || const senatePassed = box5Data.value.data[3].value;
proposed.map((p, i) => { const hsPassed = box5Data.value.data[4].value;
const pass = passed[i] || 0; const box5Chart = getMultiLineChart(
return p ? ((pass / p) * 100).toFixed(2) : 0; box5Data.value.title,
}); proposed,
const box5Chart = getMultiLineChart(box5Data.value.title, proposed, passed, rate); passed,
housePassed,
senatePassed,
hsPassed
);
const domain = categoryList.value.filter(item => { const domain = categoryList.value.filter(item => {
return item.id === box5Select.value return item.id === box5Select.value
})[0]?.name })[0]?.name
...@@ -901,13 +959,19 @@ watch(box7selectetedTime, () => { ...@@ -901,13 +959,19 @@ watch(box7selectetedTime, () => {
}); });
// 查看社交媒体详情 // 查看社交媒体详情
const handleToSocialDetail = item => { const handleToSocialDetail = item => {
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// personId: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
personId: item.id personId: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
// 关键条款 // 关键条款
const wordCloudData = ref([]); const wordCloudData = ref([]);
...@@ -1693,6 +1757,14 @@ onUnmounted(() => { ...@@ -1693,6 +1757,14 @@ onUnmounted(() => {
border-radius: 50%; border-radius: 50%;
background: var(--color-primary-10); background: var(--color-primary-10);
flex-shrink: 0; flex-shrink: 0;
overflow: hidden;
img {
width: 100%;
height: 100%;
display: block;
object-fit: cover;
}
} }
.committee-card-content { .committee-card-content {
......
import * as echarts from 'echarts' import * as echarts from 'echarts'
import { MUTICHARTCOLORS } from '../../../../common/constant'
const getMultiLineChart = (dataX, proposedData, passData, houseData, senateData, hsData) => {
const lineColors = MUTICHARTCOLORS.slice(0, 5)
const hexToRgba = (hex, alpha) => {
if (typeof hex !== 'string' || !hex.startsWith('#')) return hex
const normalized = hex.replace('#', '')
const full = normalized.length === 3
? normalized.split('').map(c => c + c).join('')
: normalized
const r = parseInt(full.slice(0, 2), 16)
const g = parseInt(full.slice(2, 4), 16)
const b = parseInt(full.slice(4, 6), 16)
return `rgba(${r}, ${g}, ${b}, ${alpha})`
}
const getAreaColor = color => new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
offset: 0,
color: hexToRgba(color, 0.35)
}, {
offset: 1,
color: hexToRgba(color, 0)
}])
const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => {
return { return {
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
...@@ -28,7 +49,7 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => { ...@@ -28,7 +49,7 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => {
containLabel: true containLabel: true
}, },
legend: { legend: {
data: ['提出法案', '通过法案', '通过率'], data: ['提出法案', '通过法案', '众议院通过', '参议院通过', '双院通过'],
show: true, show: true,
top: 10, top: 10,
icon: 'circle', icon: 'circle',
...@@ -38,7 +59,7 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => { ...@@ -38,7 +59,7 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => {
fontSize: '14px', fontSize: '14px',
} }
}, },
color: ['#1677FF', '#FA8C16', '#D9001B'], color: lineColors,
xAxis: [ xAxis: [
{ {
type: 'category', type: 'category',
...@@ -65,7 +86,6 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => { ...@@ -65,7 +86,6 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => {
{ {
type: 'value', type: 'value',
position: 'left', position: 'left',
// 纵轴单位只在纵轴上方显示一次(通过 axis.name),避免每个刻度重复显示
name: '项', name: '项',
nameLocation: 'end', nameLocation: 'end',
nameGap: 12, nameGap: 12,
...@@ -73,7 +93,6 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => { ...@@ -73,7 +93,6 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => {
color: '#666', color: '#666',
fontSize: 14, fontSize: 14,
fontWeight: 400, fontWeight: 400,
// 给单位一点点下移空间,使其更贴近顶部刻度数字的视觉基线
padding: [0, 0, 6, -20] padding: [0, 0, 6, -20]
}, },
axisLabel: { axisLabel: {
...@@ -89,36 +108,6 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => { ...@@ -89,36 +108,6 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => {
type: 'dashed', type: 'dashed',
} }
}, },
},
{
type: 'value',
position: 'right',
min: 0,
max: 100,
interval: 20,
// 通过率单位仅展示一次
name: '%',
nameLocation: 'end',
nameGap: 12,
nameTextStyle: {
color: '#666',
fontSize: 14,
fontWeight: 400,
padding: [0, 0, 6, 20]
},
axisLabel: {
formatter: '{value}',
color: '#666',
fontSize: 14,
fontWeight: 400
},
splitLine: {
show: true,
lineStyle: {
color: '#e7f3ff',
type: 'dashed',
}
},
} }
], ],
series: [ series: [
...@@ -129,18 +118,12 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => { ...@@ -129,18 +118,12 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => {
symbol: 'emptyCircle', symbol: 'emptyCircle',
symbolSize: 6, symbolSize: 6,
areaStyle: { areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ color: getAreaColor(lineColors[0])
offset: 0,
color: 'rgba(22, 119, 255, 0.4)' // 起始颜色
}, {
offset: 1,
color: 'rgba(22, 119, 255, 0)' // 结束颜色
}])
}, },
itemStyle: { itemStyle: {
color: '#1677FF' color: lineColors[0]
}, },
data: dataY1 data: proposedData
}, },
{ {
name: '通过法案', name: '通过法案',
...@@ -149,34 +132,54 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => { ...@@ -149,34 +132,54 @@ const getMultiLineChart = (dataX, dataY1, dataY2, dataY3) => {
symbol: 'emptyCircle', symbol: 'emptyCircle',
symbolSize: 6, symbolSize: 6,
areaStyle: { areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{ color: getAreaColor(lineColors[1])
offset: 0,
color: 'rgba(250, 140, 22, 0.4)' // 起始颜色
}, {
offset: 1,
color: 'rgba(250, 140, 22, 0)' // 结束颜色
}])
}, },
itemStyle: { itemStyle: {
color: '#FA8C16' color: lineColors[1]
}, },
data: dataY2 data: passData
}, },
{ {
name: '通过率', name: '众议院通过',
type: 'line', type: 'line',
yAxisIndex: 1,
smooth: true, smooth: true,
symbol: 'emptyCircle', symbol: 'emptyCircle',
symbolSize: 4, symbolSize: 6,
lineStyle: { areaStyle: {
type: 'dashed', color: getAreaColor(lineColors[2])
width: 2 },
itemStyle: {
color: lineColors[2]
},
data: houseData
},
{
name: '参议院通过',
type: 'line',
smooth: true,
symbol: 'emptyCircle',
symbolSize: 6,
areaStyle: {
color: getAreaColor(lineColors[3])
},
itemStyle: {
color: lineColors[3]
},
data: senateData
},
{
name: '双院通过',
type: 'line',
smooth: true,
symbol: 'emptyCircle',
symbolSize: 6,
areaStyle: {
color: getAreaColor(lineColors[4])
}, },
itemStyle: { itemStyle: {
color: '#D9001B' color: lineColors[4]
}, },
data: dataY3 data: hsData
} }
] ]
} }
......
...@@ -285,10 +285,22 @@ const onFormatNode = (item) => { ...@@ -285,10 +285,22 @@ const onFormatNode = (item) => {
const onDecreeRelatedEntitie = async (id) => { const onDecreeRelatedEntitie = async (id) => {
try { try {
const res = await getDecreeRelatedEntitie({ id }); const res = await getDecreeRelatedEntitie({
orgId: id,
rule: false,
withSanInfo: false,
});
if (res.code === 200) { if (res.code === 200) {
graphInfo.links = (res.data || []).map(onFormatLink); const data = res.data || {};
graphInfo.nodes = (res.data || []).map(onFormatNode); const parentList = Array.isArray(data.parentOrgList) ? data.parentOrgList : [];
const childrenList = Array.isArray(data.childrenOrgList) ? data.childrenOrgList : [];
const relationList = [...parentList, ...childrenList].map((item) => ({
...item,
relation: item.description || "",
companyName: item.companyName || item.name || "",
}));
graphInfo.links = relationList.map(onFormatLink);
graphInfo.nodes = relationList.map(onFormatNode);
if (entityInfo.node?.id) graphInfo.nodes.unshift(onFormatNode(entityInfo.node)); if (entityInfo.node?.id) graphInfo.nodes.unshift(onFormatNode(entityInfo.node));
} }
} catch (error) { } catch (error) {
......
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
<div class="box1-right-item"> <div class="box1-right-item">
<div class="item-left">委员会报告:</div> <div class="item-left">委员会报告:</div>
<div class="item-right2" v-if="reportList.length"> <div class="item-right2" v-if="reportList.length">
<div class="right2-item" v-for="(item, index) in reportList" <div class="right2-item" v-for="(item, index) in reportList" :key="getReportKey(item, index)">
:key="getReportKey(item, index)">
{{ item }} {{ item }}
</div> </div>
</div> </div>
...@@ -47,10 +46,9 @@ ...@@ -47,10 +46,9 @@
<div class="box1-right-item"> <div class="box1-right-item">
<div class="item-left">立案流程:</div> <div class="item-left">立案流程:</div>
<div class="item-right4"> <div class="item-right4">
<div v-for="(item, index) in reversedStageList" :key="getStageKey(item, index)" <div v-for="(item, index) in reversedStageList" :key="getStageKey(item, index)" class="step"
class="step" :style="{ zIndex: getStageZIndex(index) }"> :style="{ zIndex: getStageZIndex(index) }">
<div class="step-box" <div class="step-box" :class="{ 'step-box-active': index === stageActiveIndex }">
:class="{ 'step-box-active': index === stageActiveIndex }">
{{ item }} {{ item }}
</div> </div>
</div> </div>
...@@ -79,8 +77,7 @@ ...@@ -79,8 +77,7 @@
<div class="name-box"> <div class="name-box">
<div class="person-box"> <div class="person-box">
<div class="person-item" :class="{ nameItemActive: box3BtnActive === item.name }" <div class="person-item" :class="{ nameItemActive: box3BtnActive === item.name }"
@click="handleClcikBox3Btn(item.name, index)" @click="handleClcikBox3Btn(item.name, index)" v-for="(item, index) in personList" :key="index">
v-for="(item, index) in personList" :key="index">
{{ item.name }} {{ item.name }}
</div> </div>
</div> </div>
...@@ -197,14 +194,21 @@ const handleClickAvatar = async item => { ...@@ -197,14 +194,21 @@ const handleClickAvatar = async item => {
return; return;
} }
window.sessionStorage.setItem("curTabName", item.name || ""); window.sessionStorage.setItem("curTabName", item.name || "");
const routeData = router.resolve({ // const routeData = router.resolve({
// path: "/characterPage",
// query: {
// type,
// personId: item.id
// }
// });
// window.open(routeData.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
type, type,
personId: item.id personId: item.id
} }
}); })
window.open(routeData.href, "_blank");
} else { } else {
personTypeName = ""; personTypeName = "";
ElMessage.warning("找不到当前人员的类型值!"); ElMessage.warning("找不到当前人员的类型值!");
...@@ -212,7 +216,7 @@ const handleClickAvatar = async item => { ...@@ -212,7 +216,7 @@ const handleClickAvatar = async item => {
} else { } else {
ElMessage.warning("找不到当前人员的类型值!"); ElMessage.warning("找不到当前人员的类型值!");
} }
} catch (error) {} } catch (error) { }
}; };
// 获取URL地址里面的billId // 获取URL地址里面的billId
const billId = ref(route.query.billId); const billId = ref(route.query.billId);
...@@ -253,7 +257,7 @@ const partyIconUrl = computed(() => { ...@@ -253,7 +257,7 @@ const partyIconUrl = computed(() => {
const reversedStageList = computed(() => { const reversedStageList = computed(() => {
const list = Array.isArray(basicInfo.value?.stageList) ? basicInfo.value.stageList : []; const list = Array.isArray(basicInfo.value?.stageList) ? basicInfo.value.stageList : [];
return [...list].reverse(); return [...list];
}); });
const stageListLength = computed(() => (Array.isArray(basicInfo.value?.stageList) ? basicInfo.value.stageList.length : 0)); const stageListLength = computed(() => (Array.isArray(basicInfo.value?.stageList) ? basicInfo.value.stageList.length : 0));
const stageActiveIndex = computed(() => stageListLength.value - 1); const stageActiveIndex = computed(() => stageListLength.value - 1);
......
...@@ -7,10 +7,16 @@ ...@@ -7,10 +7,16 @@
<SelectBox :placeholder-name="DatePlaceHolder" select-title="提出时间" :select-list="dateList" <SelectBox :placeholder-name="DatePlaceHolder" select-title="提出时间" :select-list="dateList"
:select-name="selectedDate" :custom-time="customTime" @update:select-text="handleSelectDate" :select-name="selectedDate" :custom-time="customTime" @update:select-text="handleSelectDate"
@update:custom-time="handleCustomDate" /> @update:custom-time="handleCustomDate" />
<SelectBox v-if="isFolderAll" :placeholder-name="insPlaceHolder" select-title="发布机构" :select-list="institutionList" <SelectBox v-if="isFolderAll" :placeholder-name="partyPlaceHolder" select-title="所属党派" :select-list="partyList"
:select-name="selectedIns" @update:select-text="handleSelectIns" /> :select-name="selectedParty" @update:select-text="handleSelectParty" />
<SelectBox v-if="isFolderAll" :placeholder-name="decreeTypePlaceHolder" select-title="政令类型" <SelectBox v-if="isFolderAll" :placeholder-name="congressPlaceHolder" select-title="提出议院"
:select-list="decreeTypeList" :select-name="selectedDecreeType" @update:select-text="handleSelectDecreeType" /> :select-list="congressList" :select-name="selectedCongress" @update:select-text="handleSelectCongress" />
<SelectBox v-if="isFolderAll" :placeholder-name="orgPlaceHolder" select-title="委员会" :select-list="orgList"
:select-name="selectedOrg" @update:select-text="handleSelectOrg" />
<SelectBox v-if="isFolderAll" :placeholder-name="memberPlaceHolder" select-title="提出议员"
:select-list="memberList" :select-name="selectedmember" @update:select-text="handleSelectMember" />
<SelectBox v-if="isFolderAll" :placeholder-name="statusPlaceHolder" select-title="所处阶段"
:select-list="statusList" :select-name="selectedStatus" @update:select-text="handleSelectStauts" />
<div class="check-box"> <div class="check-box">
<div class="check-box-left text-tip-1"> <div class="check-box-left text-tip-1">
{{ '是否涉华:' }} {{ '是否涉华:' }}
...@@ -20,21 +26,11 @@ ...@@ -20,21 +26,11 @@
{{ '只看涉华法案' }} {{ '只看涉华法案' }}
</el-checkbox> </el-checkbox>
</div> </div>
</div>
<div class="check-box">
<div class="check-box-left text-tip-1">
{{ '科技相关:' }}
</div>
<div class="check-box-right">
<el-checkbox v-model="isInvolveTechnology" class="involve-checkbox">
{{ '只看科技相关' }}
</el-checkbox>
</div>
</div> </div>
</div> </div>
<div class="header-footer"> <div class="header-footer">
<div class="header-footer-left"> <div class="header-footer-left">
<ActiveTag v-for="tag, index in activeTagList" :key="index" :tagName="tag" <ActiveTag v-for="tag, index in activeTagList" :key="index" :tagName="tag.name"
@close="handleCloseCurTag(tag, index)" /> @close="handleCloseCurTag(tag, index)" />
</div> </div>
<div class="header-footer-right"> <div class="header-footer-right">
...@@ -56,8 +52,8 @@ ...@@ -56,8 +52,8 @@
<div class="content-header"> <div class="content-header">
<ChartHeader :list="staticsDemensionList" @clickItem="handleClickDemensionItem"> <ChartHeader :list="staticsDemensionList" @clickItem="handleClickDemensionItem">
<template #chart-header-right> <template #chart-header-right>
<el-select v-model="selectedTime" placeholder="选择时间" style="width: 150px" <el-select v-model="selectedTime" placeholder="选择时间" style="width: 150px" v-show="curDemension === '提案时间'"
v-show="curDemension === '提案时间'"> @change="handleChangeTime">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
...@@ -66,11 +62,11 @@ ...@@ -66,11 +62,11 @@
</div> </div>
<div class="content-main"> <div class="content-main">
<ChartContainer :chartTitle="curChartTitle" :chartTypeList="curChartTypeList" <ChartContainer :chartTitle="curChartTitle" :chartTypeList="curChartTypeList"
@clickChartItem="handleSwitchActiveChart"> @clickChartItem="handleSwitchActiveChart" @download="handleDownloadCurChartData">
<template #chart-box> <template #chart-box>
<LineChart v-if="activeChart === '折线图'" :lineChartData="curChartData" /> <LineChart v-if="activeChart === '折线图'" :lineChartData="curChartData" />
<PieChart v-if="activeChart === '饼状图'" :pieChartData="curChartData" />
<BarChart v-if="activeChart === '柱状图'" :barChartData="curChartData" /> <BarChart v-if="activeChart === '柱状图'" :barChartData="curChartData" />
<PieChart v-if="activeChart === '饼状图'" :pieChartData="curChartData" />
<RaderChart v-if="activeChart === '雷达图'" :radarChartData="curChartData" /> <RaderChart v-if="activeChart === '雷达图'" :radarChartData="curChartData" />
</template> </template>
</ChartContainer> </ChartContainer>
...@@ -95,6 +91,8 @@ ...@@ -95,6 +91,8 @@
</div> </div>
<div class="header-left-item2 text-tip-1">{{ `已选择${selectedCount}项` }}</div> <div class="header-left-item2 text-tip-1">{{ `已选择${selectedCount}项` }}</div>
<div class="header-left-item2 text-tip-1 cancel" @click="handleClearAll" v-show="selectedCount">{{ '取消' }} <div class="header-left-item2 text-tip-1 cancel" @click="handleClearAll" v-show="selectedCount">{{ '取消' }}
<div class="header-left-item3 text-tip-1" v-if="isShowAllDataMaxLengthTip">{{ `(当前最大选择不能超过1万条!)` }}</div>
</div> </div>
</div> </div>
<div class="header-right"> <div class="header-right">
...@@ -121,7 +119,7 @@ ...@@ -121,7 +119,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="data-main-box-main-content"> <div class="data-main-box-main-content" v-loading="loading" element-loading-text="全部数据加载中,请稍候...">
<el-table ref="tableRef" :data="tableData" row-key="id" @selection-change="handleSelectionChange" <el-table ref="tableRef" :data="tableData" row-key="id" @selection-change="handleSelectionChange"
@select="handleSelect" @select-all="handleSelectAll" style="width: 100%" :row-style="{ height: '52px' }"> @select="handleSelect" @select-all="handleSelectAll" style="width: 100%" :row-style="{ height: '52px' }">
<el-table-column type="selection" width="40" /> <el-table-column type="selection" width="40" />
...@@ -131,10 +129,10 @@ ...@@ -131,10 +129,10 @@
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="日期" width="120" class-name="date-column"> <el-table-column label="提案时间" width="120" class-name="date-column">
<template #default="scope">{{ scope.row.date }}</template> <template #default="scope">{{ scope.row.date }}</template>
</el-table-column> </el-table-column>
<el-table-column label="提人" width="480"> <el-table-column label="提人" width="480">
<template #default="scope"> <template #default="scope">
<span class="person-item text-compact" @click="handlePerClick(scope.row)">{{ scope.row.sponsorPersonName <span class="person-item text-compact" @click="handlePerClick(scope.row)">{{ scope.row.sponsorPersonName
}}</span> }}</span>
...@@ -186,7 +184,17 @@ const handleSwitchChartData = () => { ...@@ -186,7 +184,17 @@ const handleSwitchChartData = () => {
})[0] })[0]
setTimeout(() => { setTimeout(() => {
activeChart.value = curDemensionItem.chartTypeList[0] activeChart.value = curDemensionItem.chartTypeList[0]
if (curDemension.value === '提案时间') {
if (selectedTime.value === '按月度统计') {
curChartData.value = curDemensionItem.data curChartData.value = curDemensionItem.data
} else if (selectedTime.value === '按季度统计') {
curChartData.value = curDemensionItem.quatarData
} else {
curChartData.value = curDemensionItem.yearData
}
} else {
curChartData.value = curDemensionItem.data
}
}) })
} }
} }
...@@ -197,36 +205,58 @@ const totalNum = ref(0) ...@@ -197,36 +205,58 @@ const totalNum = ref(0)
// 统计维度列表 // 统计维度列表
const staticsDemensionList = ref([ const staticsDemensionList = ref([
{ {
name: '发布时间', name: '提案时间',
active: true, active: true,
chartTypeList: ['折线图', '柱状图'], chartTypeList: ['折线图', '柱状图'],
chartTitle: '政令发布时间趋势变化', chartTitle: '美国会法案提出数量随时间变化趋势',
data: { data: {
dataX: [], dataX: [],
dataY: [] dataY: []
}, },
quatarData:{ quatarData: {
dataX: [],
dataY: []
}, },
yearData: { yearData: {
dataX: [],
dataY: []
} }
}, },
{ {
name: '科技领域', name: '科技领域',
active: false, active: false,
chartTypeList: ['饼状图'], chartTypeList: ['饼状图'],
chartTitle: '政令科技领域分布', chartTitle: '美国会法案领域分布',
data: [] data: []
}, },
{ {
name: '发布机构', name: '提出议院',
active: false, active: false,
chartTypeList: ['饼状图'], chartTypeList: ['饼状图'],
chartTitle: '政令发布机构分布', chartTitle: '美国会法案议院分布',
data: [] data: []
} },
{
name: '提出委员会',
active: false,
chartTypeList: ['饼状图'],
chartTitle: '美国会法案委员会分布',
data: []
},
{
name: '提出议员党派',
active: false,
chartTypeList: ['饼状图'],
chartTitle: '美国会法案党派分布',
data: []
},
{
name: '立法阶段',
active: false,
chartTypeList: ['饼状图'],
chartTitle: '美国会法案立法阶段分布',
data: []
},
]) ])
// 当前维度下的图表列表 // 当前维度下的图表列表
...@@ -234,13 +264,13 @@ const curChartTypeList = computed(() => { ...@@ -234,13 +264,13 @@ const curChartTypeList = computed(() => {
let arr = staticsDemensionList.value.filter(item => item.active) let arr = staticsDemensionList.value.filter(item => item.active)
return arr[0].chartTypeList return arr[0].chartTypeList
}) })
// 当前图表标题 // 当前图表标题
const curChartTitle = computed(() => { const curChartTitle = computed(() => {
let arr = staticsDemensionList.value.filter(item => item.active) let arr = staticsDemensionList.value.filter(item => item.active)
return arr[0].chartTitle return arr[0].chartTitle
}) })
// 当前维度 // 当前维度
const curDemension = ref('提案时间') const curDemension = ref('提案时间')
...@@ -254,11 +284,19 @@ const handleClickDemensionItem = (val) => { ...@@ -254,11 +284,19 @@ const handleClickDemensionItem = (val) => {
curDemension.value = val.name curDemension.value = val.name
setTimeout(() => { setTimeout(() => {
activeChart.value = val.chartTypeList[0] activeChart.value = val.chartTypeList[0]
if (curDemension.value === '提案时间' && selectedTime.value === '按年度统计') {
curChartData.value = val.yearData
} else if (curDemension.value === '提案时间' && selectedTime.value === '按季度统计') {
curChartData.value = val.quatarData
} else {
curChartData.value = val.data curChartData.value = val.data
}
}) })
} }
// 时间图表 当前选择时间
const selectedTime = ref('按月统计') const selectedTime = ref('按月统计')
// 时间图表-时间列表
const timeList = ref([ const timeList = ref([
{ {
label: '按年度统计', label: '按年度统计',
...@@ -273,42 +311,140 @@ const timeList = ref([ ...@@ -273,42 +311,140 @@ const timeList = ref([
value: '按月度统计' value: '按月度统计'
}, },
]) ])
const handleChangeTime = value => {
let curChart = activeChart.value
activeChart.value = ''
if (value === '按月度统计') {
setTimeout(() => {
activeChart.value = curChart
curChartData.value = staticsDemensionList.value[0].data
})
} else if (value === '按季度统计') {
setTimeout(() => {
activeChart.value = curChart
curChartData.value = staticsDemensionList.value[0].quatarData
})
} else {
setTimeout(() => {
activeChart.value = curChart
curChartData.value = staticsDemensionList.value[0].yearData
})
}
}
// 激活的标签列表 // 激活的标签列表
const activeTagList = computed(() => { const activeTagList = computed(() => {
const arr = [] const arr = []
if (selectedArea.value && selectedArea.value !== '全部领域') { if (selectedArea.value && selectedArea.value !== '全部领域') {
arr.push(selectedArea.value) arr.push(
{
tag: '科技领域',
name: selectedArea.value
}
)
} }
if (selectedDate.value === '自定义') { if (selectedDate.value === '自定义') {
arr.push(customTime.value.join('至')) arr.push(
{
tag: '提出时间',
name: customTime.value.join('至')
}
)
}
if (selectedParty.value && selectedParty.value !== '全部党派') {
arr.push(
{
tag: '所属党派',
name: selectedParty.value
}
)
}
if (selectedCongress.value && selectedCongress.value !== '全部议院') {
arr.push(
{
tag: '提出议院',
name: selectedCongress.value
}
)
}
if (selectedOrg.value && selectedOrg.value !== '全部委员会') {
arr.push(
{
tag: '委员会',
name: selectedOrg.value
}
)
}
if (selectedmember.value && selectedmember.value !== '全部议员') {
arr.push(
{
tag: '提出议员',
name: selectedmember.value
}
)
} }
if (selectedIns.value && selectedIns.value !== '全部机构') { if (selectedStatus.value && selectedStatus.value !== '全部阶段') {
arr.push(selectedIns.value) arr.push(
{
tag: '所处阶段',
name: selectedStatus.value
} }
if (selectedDecreeType.value && selectedDecreeType.value !== '全部类型') { )
arr.push(selectedDecreeType.value)
} }
if (isInvolveCn.value) { if (isInvolveCn.value) {
const involveStr = '涉华' const involveStr = '涉华'
arr.push(involveStr) arr.push(
{
tag: '是否涉华',
name: involveStr
}
)
} }
return arr return arr
}) })
// 关闭当前标签
const handleCloseCurTag = (tag, index) => { const handleCloseCurTag = (tag, index) => {
switch (tag.tag) {
case '科技领域':
selectedArea.value = '全部领域'
break
case '提出时间':
selectedDate.value = ''
break
case '所属党派':
selectedParty.value = '全部党派'
break
case '提出议院':
selectedCongress.value = '全部议院'
break
case '委员会':
selectedOrg.value = '全部委员会'
break
case '提出议员':
selectedmember.value = '全部议员'
break
case '所处阶段':
selectedStatus.value = '全部阶段'
break
case '是否涉华':
isInvolveCn.value = false
break
}
// alert(tag.name) // alert(tag.name)
activeTagList.value.splice(index, 1) // activeTagList.value.splice(index, 1)
} }
const activeChart = ref('') const activeChart = ref('') // 当前激活的图表
// 切换当前图表
const handleSwitchActiveChart = val => { const handleSwitchActiveChart = val => {
activeChart.value = val.name activeChart.value = val.name
} }
// 雷达图数据
const radarChartData = ref({ const radarChartData = ref({
title: [ title: [
{ {
...@@ -358,7 +494,7 @@ const radarChartData = ref({ ...@@ -358,7 +494,7 @@ const radarChartData = ref({
// 数据- 是否全选 // 数据- 是否全选
const isSelectedAll = ref(false) const isSelectedAll = ref(false)
// 批量操作-当前操作
const curOperation = ref('') const curOperation = ref('')
const operationList = ref([ const operationList = ref([
{ {
...@@ -448,7 +584,7 @@ const handleSelectArea = (value) => { ...@@ -448,7 +584,7 @@ const handleSelectArea = (value) => {
selectedArea.value = value selectedArea.value = value
} }
// 发布时间 // 提出时间
const DatePlaceHolder = ref('请选择时间') const DatePlaceHolder = ref('请选择时间')
const selectedDate = ref('') const selectedDate = ref('')
const dateList = ref([ const dateList = ref([
...@@ -475,10 +611,8 @@ const dateList = ref([ ...@@ -475,10 +611,8 @@ const dateList = ref([
]) ])
const customTime = ref([]) // 自定义时间 const customTime = ref([]) // 自定义时间
const handleCustomDate = value => { const handleCustomDate = value => {
// console.log('value', value);
customTime.value = value customTime.value = value
} }
const handleSelectDate = (value) => { const handleSelectDate = (value) => {
selectedDate.value = value selectedDate.value = value
if (selectedDate.value !== '自定义') { if (selectedDate.value !== '自定义') {
...@@ -486,51 +620,125 @@ const handleSelectDate = (value) => { ...@@ -486,51 +620,125 @@ const handleSelectDate = (value) => {
} }
} }
// 发布机构 机构列表 // 所属党派
const institutionList = ref([ const partyList = ref([
{ {
name: '全部机构', name: '全部党派',
id: '全部机构' id: '全部党派'
}, },
{ {
name: '机构1', name: '共和党',
id: '机构1' id: '共和党'
}, },
{ {
name: '机构2', name: '民主党',
id: '机构2' id: '民主党'
}, },
{ {
name: '机构3', name: '其他',
id: '机构3' id: '其他'
}, },
]) ])
const selectedIns = ref('全部机构') const selectedParty = ref('全部党派')
const insPlaceHolder = ref('请选择机构') const partyPlaceHolder = ref('请选择党派')
const handleSelectParty = value => {
selectedParty.value = value
}
const handleSelectIns = value => { // 议院列表
selectedIns.value = value const congressList = ref([
{
name: '全部议院',
id: '全部议院'
},
{
name: '众议院',
id: '众议院'
},
{
name: '参议院',
id: '参议院'
}
])
const selectedCongress = ref('全部议院')
const congressPlaceHolder = ref('请选择议院')
const handleSelectCongress = value => {
selectedCongress.value = value
} }
// 政令类型 // 委员会
const decreeTypeList = ref([ const orgList = ref([])
const selectedOrg = ref('全部委员会')
const orgPlaceHolder = ref('请选择委员会')
const handleSelectOrg = value => {
selectedOrg.value = value
}
const handleGetOrgList = async () => {
try {
const res = await getPostOrgList()
console.log('委员会列表', res);
if (res.code === 200 && res.data) {
orgList.value = res.data.map(item => {
return {
name: item.departmentName,
id: item.departmentName
}
})
orgList.value = [{ name: '全部委员会', id: '全部委员会' }, ...orgList.value]
}
} catch (error) {
console.error('获取委员会列表报错:', error);
}
}
// 提出议员
const memberList = ref([])
const selectedmember = ref('全部议员')
const memberPlaceHolder = ref('请选择议员')
const handleSelectMember = value => {
selectedmember.value = value
}
const handleGetMemberList = async () => {
try {
const res = await getPostMemberList()
console.log('议员列表', res);
if (res.code === 200 && res.data) {
memberList.value = res.data.map(item => {
return {
name: item.memberName,
id: item.memberName,
memberId: item.memberId
}
})
memberList.value = [{ name: '全部议员', id: '全部议员' }, ...memberList.value]
}
} catch (error) {
console.error('获取议员列表报错:', error);
}
}
// 阶段列表
const statusList = ref([
{ {
name: '全部类型', name: '全部阶段',
id: '全部类型' id: '全部阶段'
}, },
{ {
name: '行政命令', name: '提出',
id: '行政命令' id: '0'
}, },
{ {
name: '备忘录', name: '通过',
id: '备忘录' id: '1'
} }
]) ])
const selectedDecreeType = ref('全部类型') const selectedStatus = ref('全部阶段')
const decreeTypePlaceHolder = ref('请选择议院') const statusPlaceHolder = ref('请选择立法阶段')
const handleSelectDecreeType = value => { const handleSelectStauts = value => {
selectedDecreeType.value = value selectedStatus.value = value
} }
// 是否涉华 // 是否涉华
...@@ -538,15 +746,15 @@ const isInvolveCn = ref(false) ...@@ -538,15 +746,15 @@ const isInvolveCn = ref(false)
const handleInvolveCnChange = () => { const handleInvolveCnChange = () => {
} }
// 是否科技相关
const isInvolveTechnology = ref(false)
// 清空条件 // 清空条件
const handleClear = () => { const handleClear = () => {
selectedArea.value = '全部领域' selectedArea.value = '全部领域'
selectedDate.value = '' selectedDate.value = ''
selectedIns.value = '全部机构' selectedParty.value = '全部党派'
selectedDecreeType.value = '全部类型' selectedCongress.value = '全部议院'
selectedOrg.value = '全部委员会'
selectedmember.value = '全部议员'
selectedStatus.value = '全部阶段'
isInvolveCn.value = false isInvolveCn.value = false
ElMessage.success('已清空条件!') ElMessage.success('已清空条件!')
} }
...@@ -562,8 +770,6 @@ const handleSwitchFolderAll = () => { ...@@ -562,8 +770,6 @@ const handleSwitchFolderAll = () => {
isFolderAll.value = !isFolderAll.value isFolderAll.value = !isFolderAll.value
} }
const tableRef = ref(null) const tableRef = ref(null)
// 表格数据 // 表格数据
...@@ -580,11 +786,7 @@ const releaseTimeList = ref([ ...@@ -580,11 +786,7 @@ const releaseTimeList = ref([
value: false value: false
} }
]); ]);
const isSort = ref(true); // true 倒序 false 升序 const isSort = ref(true); // true 倒序 false 升序
// const handleSwithSort = () => {
// isSort.value = !isSort.value;
// };
const handlePxChange = val => { const handlePxChange = val => {
fetchTableData() fetchTableData()
}; };
...@@ -598,10 +800,10 @@ const selectedMap = ref(new Map()) // 使用 Map 存储,key 为唯一 id ...@@ -598,10 +800,10 @@ const selectedMap = ref(new Map()) // 使用 Map 存储,key 为唯一 id
// 计算已选中的条数 // 计算已选中的条数
const selectedCount = computed(() => selectedMap.value.size) const selectedCount = computed(() => selectedMap.value.size)
// 获取表格数据(示例) // 获取当前页表格数据(示例)
const fetchTableData = async () => { const fetchTableData = async () => {
isSelectedAll.value = false // isSelectedAll.value = false
selectedMap.value.clear() // selectedMap.value.clear()
// 调用接口获取数据... // 调用接口获取数据...
const params = { const params = {
page: currentPage.value, page: currentPage.value,
...@@ -611,8 +813,11 @@ const fetchTableData = async () => { ...@@ -611,8 +813,11 @@ const fetchTableData = async () => {
domains: selectedArea.value === '全部领域' ? null : [selectedArea.value], domains: selectedArea.value === '全部领域' ? null : [selectedArea.value],
proposedDateStart: customTime.value[0], proposedDateStart: customTime.value[0],
proposedDateEnd: customTime.value[1], proposedDateEnd: customTime.value[1],
affiliation: selectedIns.value === '全部机构' ? null : selectedIns.value, affiliation: selectedParty.value === '全部党派' ? null : selectedParty.value,
originChamber: selectedDecreeType.value === '全部类型' ? null : selectedDecreeType.value, originChamber: selectedCongress.value === '全部议院' ? null : selectedCongress.value,
originDepart: selectedOrg.value === '全部委员会' ? null : selectedOrg.value,
sponsorPersonName: selectedmember.value === '全部议员' ? null : selectedmember.value,
status: selectedStatus.value === '通过' ? 1 : 0,
sleStatus: isInvolveCn ? 'Y' : 'N', sleStatus: isInvolveCn ? 'Y' : 'N',
sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序 sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序
} }
...@@ -626,6 +831,14 @@ const fetchTableData = async () => { ...@@ -626,6 +831,14 @@ const fetchTableData = async () => {
dataX: Object.keys(res.data.aggregationsDate), dataX: Object.keys(res.data.aggregationsDate),
dataY: Object.values(res.data.aggregationsDate).map(value => Number(value)) dataY: Object.values(res.data.aggregationsDate).map(value => Number(value))
} }
staticsDemensionList.value[0].quatarData = {
dataX: Object.keys(res.data.aggregationsQuarter),
dataY: Object.values(res.data.aggregationsQuarter).map(value => Number(value))
}
staticsDemensionList.value[0].yearData = {
dataX: Object.keys(res.data.aggregationsYear),
dataY: Object.values(res.data.aggregationsYear).map(value => Number(value))
}
staticsDemensionList.value[1].data = Object.entries(res.data.aggregationsDomain).map(([key, value]) => ({ staticsDemensionList.value[1].data = Object.entries(res.data.aggregationsDomain).map(([key, value]) => ({
name: key, name: key,
value: Number(value) value: Number(value)
...@@ -648,9 +861,6 @@ const fetchTableData = async () => { ...@@ -648,9 +861,6 @@ const fetchTableData = async () => {
})) }))
} }
const curDemensionItem = staticsDemensionList.value.filter(item => { const curDemensionItem = staticsDemensionList.value.filter(item => {
return item.name === curDemension.value return item.name === curDemension.value
})[0] })[0]
...@@ -659,10 +869,6 @@ const fetchTableData = async () => { ...@@ -659,10 +869,6 @@ const fetchTableData = async () => {
activeChart.value = curDemensionItem.chartTypeList[0] activeChart.value = curDemensionItem.chartTypeList[0]
curChartData.value = curDemensionItem.data curChartData.value = curDemensionItem.data
}) })
} catch (error) { } catch (error) {
} }
...@@ -678,6 +884,37 @@ const fetchTableData = async () => { ...@@ -678,6 +884,37 @@ const fetchTableData = async () => {
}) })
}) })
} }
const allData = ref([])
// 获取筛选条件下全部表格数据
const fetchAllData = async () => {
const params = {
page: 1,
size: 9999,
keyword: '',
type: 1, // type 1= 法案 2= 政令 3 =智库 4=智库报告 5=实体清单【制裁记录】 6= 人物 7= 机构 8=新闻 9= 社媒
domains: selectedArea.value === '全部领域' ? null : [selectedArea.value],
proposedDateStart: customTime.value[0],
proposedDateEnd: customTime.value[1],
affiliation: selectedParty.value === '全部党派' ? null : selectedParty.value,
originChamber: selectedCongress.value === '全部议院' ? null : selectedCongress.value,
originDepart: selectedOrg.value === '全部委员会' ? null : selectedOrg.value,
sponsorPersonName: selectedmember.value === '全部议员' ? null : selectedmember.value,
status: selectedStatus.value === '通过' ? 1 : 0,
sleStatus: isInvolveCn ? 'Y' : 'N',
sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序
}
try {
const res = await search(params)
console.log('搜索结果', res);
if (res.code === 200 && res.data) {
allData.value = res.data.records
}
} catch (error) {
ElMessage.error('加载全部数据出错!')
}
}
// 单选事件 // 单选事件
const handleSelect = (selection, row) => { const handleSelect = (selection, row) => {
...@@ -690,7 +927,7 @@ const handleSelect = (selection, row) => { ...@@ -690,7 +927,7 @@ const handleSelect = (selection, row) => {
} }
} }
// 全选/全不选事件 // 表格自带 当前页 全选/全不选事件
const handleSelectAll = (selection) => { const handleSelectAll = (selection) => {
if (selection.length > 0) { if (selection.length > 0) {
// 全选:将当前页所有数据添加到 Map // 全选:将当前页所有数据添加到 Map
...@@ -723,10 +960,10 @@ const handleSelectAllPage = () => { ...@@ -723,10 +960,10 @@ const handleSelectAllPage = () => {
) )
if (currentPageSelected) { if (currentPageSelected) {
// 已全选,则取消当前页的全选 // 已全选,则不动当前页的全选
tableData.value.forEach(row => { tableData.value.forEach(row => {
tableRef.value.toggleRowSelection(row, false) tableRef.value.toggleRowSelection(row, false)
selectedMap.value.delete(row.id) // selectedMap.value.delete(row.id)
}) })
} else { } else {
// 未全选,则全选当前页 // 未全选,则全选当前页
...@@ -739,39 +976,47 @@ const handleSelectAllPage = () => { ...@@ -739,39 +976,47 @@ const handleSelectAllPage = () => {
} }
} }
// 处理全选 // 全选最大1万条提示
const handleSelectAllChange = () => { const isShowAllDataMaxLengthTip = ref(false)
const loading = ref(false) // 加载数据loading
// 处理 全选(全部数据)
const handleSelectAllChange = async () => {
if (isSelectedAll.value) { if (isSelectedAll.value) {
if (totalNum.value > 10000) {
isShowAllDataMaxLengthTip.value = true
}
loading.value = true
await fetchAllData()
handleSelectAllPage() handleSelectAllPage()
allData.value.forEach(row => {
if (!selectedMap.value.has(row.id)) {
selectedMap.value.set(row.id, row)
}
})
loading.value = false
} else { } else {
handleClearAll() handleClearAll()
} }
// if (isSelectedAll.value) {
// // 全选:将当前页所有数据添加到 Map
// tableData.value.forEach(row => {
// if (!selectedMap.value.has(row.id)) {
// selectedMap.value.set(row.id, row)
// }
// })
// } else {
// // 全不选:从 Map 中移除当前页的所有数据
// tableData.value.forEach(row => {
// selectedMap.value.delete(row.id)
// })
// }
} }
// 清空所有选择 // 清空所有选择
const handleClearAll = () => { const handleClearAll = () => {
isSelectedAll.value = false
selectedMap.value.clear() selectedMap.value.clear()
tableRef.value?.clearSelection() tableRef.value?.clearSelection()
} }
// 翻页 // 翻页
const handleCurrentChange = (val) => { const handleCurrentChange = async (val) => {
currentPage.value = val currentPage.value = val
fetchTableData() await fetchTableData()
if (isSelectedAll.value) {
handleSelectAllPage()
}
} }
...@@ -789,6 +1034,20 @@ watch(tableData, () => { ...@@ -789,6 +1034,20 @@ watch(tableData, () => {
// 当前图表数据 // 当前图表数据
const curChartData = ref(null) const curChartData = ref(null)
// 下载当前图表数据
const handleDownloadCurChartData = () => {
const jsonStr = JSON.stringify(curChartData.value, null, 2);
const blob = new Blob([jsonStr], { type: 'application/json' });
const url = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
link.download = 'chartData.json';
link.click();
URL.revokeObjectURL(url);
}
// 跳转到当前页 初始化筛选条件 // 跳转到当前页 初始化筛选条件
const initParam = () => { const initParam = () => {
const hasQuery = Object.keys(route.query).length > 0; const hasQuery = Object.keys(route.query).length > 0;
...@@ -800,8 +1059,14 @@ const initParam = () => { ...@@ -800,8 +1059,14 @@ const initParam = () => {
customTime.value = JSON.parse(route.query.selectedDate) customTime.value = JSON.parse(route.query.selectedDate)
} }
isInvolveCn.value = route.query.isInvolveCn ? true : false isInvolveCn.value = route.query.isInvolveCn ? true : false
if (route.query.selectedStatus) {
selectedStatus.value = route.query.selectedStatus === '1' ? '通过' : '提出'
} else {
selectedStatus.value = '全部阶段'
}
selectedDecreeType.value = route.query.selectedDecreeType ? route.query.selectedDecreeType : '全部类型' selectedCongress.value = route.query.selectedCongress ? route.query.selectedCongress : '全部议院'
selectedOrg.value = route.query.selectedOrg ? route.query.selectedOrg : '全部委员会'
const query = route.query; const query = route.query;
if (Object.keys(query).length > 0) { if (Object.keys(query).length > 0) {
...@@ -815,8 +1080,14 @@ const initParam = () => { ...@@ -815,8 +1080,14 @@ const initParam = () => {
customTime.value = JSON.parse(savedQuery.selectedDate) customTime.value = JSON.parse(savedQuery.selectedDate)
} }
isInvolveCn.value = savedQuery.isInvolveCn ? true : false isInvolveCn.value = savedQuery.isInvolveCn ? true : false
if (savedQuery.selectedStatus) {
selectedStatus.value = savedQuery.selectedStatus === '1' ? '通过' : '提出'
} else {
selectedStatus.value = '全部阶段'
}
selectedDecreeType.value = savedQuery.selectedDecreeType ? savedQuery.selectedDecreeType : '全部类型' selectedCongress.value = savedQuery.selectedCongress ? savedQuery.selectedCongress : '全部议院'
selectedOrg.value = savedQuery.selectedOrg ? savedQuery.selectedOrg : '全部委员会'
} }
} }
...@@ -872,7 +1143,6 @@ onMounted(async () => { ...@@ -872,7 +1143,6 @@ onMounted(async () => {
initParam() initParam()
// 初始化 // 初始化
await fetchTableData() await fetchTableData()
...@@ -1051,6 +1321,10 @@ onMounted(async () => { ...@@ -1051,6 +1321,10 @@ onMounted(async () => {
} }
.header-left-item3 {
color: var(--color-orange-100);
}
.cancel { .cancel {
cursor: pointer; cursor: pointer;
} }
...@@ -1144,4 +1418,21 @@ onMounted(async () => { ...@@ -1144,4 +1418,21 @@ onMounted(async () => {
text-decoration: underline; text-decoration: underline;
} }
} }
</style>
\ No newline at end of file :deep(.el-table__header-wrapper) {
// background-color: #f5f7fa;
height: 48px;
}
:deep(.el-table__header th) {
// background-color: #f5f7fa;
color: var(--text-primary-50-color);
font-weight: bold;
}
/* 针对特定列 */
// :deep(.el-table__header th:first-child) {
// background-color: #e6f7ff;
// color: #1890ff;
// }</style>
\ No newline at end of file
<template> <template>
<div class="data-library-wrapper"> <div class="data-library-wrapper">
<div class="data-library-header"> <!-- <div class="data-library-header">
<div class="header-left"> <div class="header-left">
<div class="icon"> <div class="icon">
<img src="@/assets/icons/overview/logo.png" alt=""> <img src="@/assets/icons/overview/logo.png" alt="">
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<div class="name">{{ "管理员" }}</div> <div class="name">{{ "管理员" }}</div>
</div> </div>
</div> </div>
</div> </div> -->
<div class="data-library-main"> <div class="data-library-main">
<div class="data-library-sider"> <div class="data-library-sider">
<div class="sider-item-box" v-for="item, index in siderList" :key="index"> <div class="sider-item-box" v-for="item, index in siderList" :key="index">
...@@ -96,7 +96,7 @@ const tagsViewStore = useTagsViewStore() ...@@ -96,7 +96,7 @@ const tagsViewStore = useTagsViewStore()
// 在路由全局守卫中处理 // 在路由全局守卫中处理
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
// 路由允许添加标签(排除掉隐藏的布局页如 /404, /login 等) // 路由允许添加标签(排除掉隐藏的布局页如 /404, /login 等)
if (to.meta?.title && !to.meta?.hiddenTag) { if (to.path.indexOf('dataLibrary') > -1) {
tagsViewStore.addView({ tagsViewStore.addView({
path: to.path, path: to.path,
name: to.name, // 对应组件的 name,用于缓存 name: to.name, // 对应组件的 name,用于缓存
......
...@@ -3,13 +3,15 @@ ...@@ -3,13 +3,15 @@
<div class="container-box"> <div class="container-box">
<div class="hard-box"> <div class="hard-box">
<div class="hard-name text-title-0-show">美国政府机构</div> <div class="hard-name text-title-0-show">美国政府机构</div>
<div class="hard-num text-title-2-show">{{organizationInfo.total}}</div> <div class="hard-num text-title-2-show">{{ organizationInfo.total }}</div>
<div style="width: 0px; flex: auto;"></div> <div style="width: 0px; flex: auto;"></div>
<div class="hard-input"> <div class="hard-input">
<el-input v-model="organizationInfo.keyWord" @keyup.enter="onAllOrganization()" style="width:100%; height:100%;" :suffix-icon="Search" placeholder="搜索机构" /> <el-input v-model="organizationInfo.keyWord" @keyup.enter="onAllOrganization()"
style="width:100%; height:100%;" :suffix-icon="Search" placeholder="搜索机构" />
</div> </div>
<div class="hard-time"> <div class="hard-time">
<el-select v-model="organizationInfo.isSort" @change="onAllOrganization()" placeholder="发布时间" style="width:160px; margin-left:8px;"> <el-select v-model="organizationInfo.isSort" @change="onAllOrganization()" placeholder="发布时间"
style="width:160px; margin-left:8px;">
<template #prefix> <template #prefix>
<div class="icon1"> <div class="icon1">
<img v-if="isSort" src="@/assets/icons/shengxu1.png" alt="" /> <img v-if="isSort" src="@/assets/icons/shengxu1.png" alt="" />
...@@ -28,29 +30,36 @@ ...@@ -28,29 +30,36 @@
<TimeTabPane @time-click="handleDateChange" /> <TimeTabPane @time-click="handleDateChange" />
</div> </div>
<div class="organization-list" ref="refOrganization" v-loading="organizationInfo.loading"> <div class="organization-list" ref="refOrganization" v-loading="organizationInfo.loading">
<div class="organization-item" v-for="(item, index) in organizationInfo.list" :key="index" @click="handleToInstitution(item)"> <div class="organization-item" v-for="(item, index) in organizationInfo.list" :key="index"
@click="handleToInstitution(item)">
<div class="item-left"> <div class="item-left">
<img :src="item.orgImage || DefaultIcon2" alt="" /> <img :src="item.orgImage || DefaultIcon2" alt="" />
</div> </div>
<div class="item-right one-line-ellipsis">{{ item.orgName }}</div> <div class="item-right one-line-ellipsis">{{ item.orgName }}</div>
<div class="item-total">{{ item.total }}项</div> <div class="item-total">{{ item.total }}项</div>
<el-icon color="var(--color-primary-100)"><ArrowRightBold /></el-icon> <el-icon color="var(--color-primary-100)">
<div class="item-dot" v-if="item.totalRecent">+{{item.totalRecent}}</div> <ArrowRightBold />
</el-icon>
<div class="item-dot" v-if="item.totalRecent">+{{ item.totalRecent }}</div>
</div> </div>
</div> </div>
<div class="pagination-box"> <div class="pagination-box">
<el-pagination @current-change="onAllOrganization" :pageSize="organizationInfo.pageSize" :current-page="organizationInfo.pageNum" background layout="prev, pager, next" :total="organizationInfo.total" /> <el-pagination @current-change="onAllOrganization" :pageSize="organizationInfo.pageSize"
:current-page="organizationInfo.pageNum" background layout="prev, pager, next"
:total="organizationInfo.total" />
</div> </div>
</div> </div>
<div class="back-bnt" @click="router.back()"> <div class="back-bnt" @click="router.back()">
<el-icon><Back /></el-icon> <el-icon>
<Back />
</el-icon>
<div style="margin-left: 6px;">返回</div> <div style="margin-left: 6px;">返回</div>
</div> </div>
</div> </div>
</template> </template>
<script setup name="index"> <script setup name="index">
import {onMounted, reactive, ref} from "vue" import { onMounted, reactive, ref } from "vue"
import { Search } from '@element-plus/icons-vue' import { Search } from '@element-plus/icons-vue'
import router from "@/router"; import router from "@/router";
...@@ -76,8 +85,8 @@ const onAllOrganization = async (num) => { ...@@ -76,8 +85,8 @@ const onAllOrganization = async (num) => {
organizationInfo.pageNum = num || 1 organizationInfo.pageNum = num || 1
organizationInfo.loading = true organizationInfo.loading = true
try { try {
let {keyWord, pageNum, pageSize, day} = organizationInfo let { keyWord, pageNum, pageSize, day } = organizationInfo
const res = await getDepartmentList({day, pageNum:pageNum-1, pageSize, keyWord: keyWord||undefined}); const res = await getDepartmentList({ day, pageNum: pageNum - 1, pageSize, keyWord: keyWord || undefined });
console.log("机构列表", res); console.log("机构列表", res);
if (res.code === 200) { if (res.code === 200) {
organizationInfo.list = res.data.orgList || []; organizationInfo.list = res.data.orgList || [];
...@@ -101,13 +110,19 @@ const handleDateChange = (event) => { ...@@ -101,13 +110,19 @@ const handleDateChange = (event) => {
// 跳转行政机构主页 // 跳转行政机构主页
const handleToInstitution = item => { const handleToInstitution = item => {
window.sessionStorage.setItem("curTabName", item.orgName); window.sessionStorage.setItem("curTabName", item.orgName);
const curRoute = router.resolve({ // const curRoute = router.resolve({
// path: "/institution",
// query: {
// id: item.orgId
// }
// });
// window.open(curRoute.href, "_blank");
router.push({
path: "/institution", path: "/institution",
query: { query: {
id: item.orgId id: item.orgId
} }
}); })
window.open(curRoute.href, "_blank");
}; };
const refOrganization = ref() const refOrganization = ref()
...@@ -115,9 +130,9 @@ onMounted(() => { ...@@ -115,9 +130,9 @@ onMounted(() => {
// 根据元素的高度决定分页显示的机构数量 // 根据元素的高度决定分页显示的机构数量
let height = 2; let height = 2;
if (refOrganization.value) { if (refOrganization.value) {
height = Math.floor(refOrganization.value?.clientHeight/120) height = Math.floor(refOrganization.value?.clientHeight / 120)
} }
organizationInfo.pageSize = height*4 organizationInfo.pageSize = height * 4
onAllOrganization() onAllOrganization()
}) })
...@@ -166,6 +181,7 @@ onMounted(() => { ...@@ -166,6 +181,7 @@ onMounted(() => {
height: 62px; height: 62px;
line-height: 62px !important; line-height: 62px !important;
} }
.hard-num { .hard-num {
height: 36px; height: 36px;
background-color: var(--color-primary-100); background-color: var(--color-primary-100);
...@@ -175,6 +191,7 @@ onMounted(() => { ...@@ -175,6 +191,7 @@ onMounted(() => {
padding: 0 16px; padding: 0 16px;
margin-left: 16px; margin-left: 16px;
} }
.hard-input { .hard-input {
background-color: var(--el-fill-color-blank); background-color: var(--el-fill-color-blank);
border-radius: var(--el-border-radius-base); border-radius: var(--el-border-radius-base);
...@@ -184,6 +201,7 @@ onMounted(() => { ...@@ -184,6 +201,7 @@ onMounted(() => {
width: 160px; width: 160px;
height: 32px; height: 32px;
} }
.hard-time { .hard-time {
height: 42px; height: 42px;
padding: 5px 0; padding: 5px 0;
...@@ -192,6 +210,7 @@ onMounted(() => { ...@@ -192,6 +210,7 @@ onMounted(() => {
width: 11px; width: 11px;
height: 14px; height: 14px;
font-size: 0px; font-size: 0px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -211,11 +230,13 @@ onMounted(() => { ...@@ -211,11 +230,13 @@ onMounted(() => {
height: 16px; height: 16px;
font-size: 0px; font-size: 0px;
margin-right: 6px; margin-right: 6px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.date-text { .date-text {
width: 20px; width: 20px;
flex: auto; flex: auto;
...@@ -261,6 +282,7 @@ onMounted(() => { ...@@ -261,6 +282,7 @@ onMounted(() => {
width: 48px; width: 48px;
height: 48px; height: 48px;
font-size: 0px; font-size: 0px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -315,6 +337,7 @@ onMounted(() => { ...@@ -315,6 +337,7 @@ onMounted(() => {
.pagination-box { .pagination-box {
display: flex; display: flex;
justify-content: center; justify-content: center;
position: relative;
} }
} }
} }
......
...@@ -51,7 +51,8 @@ const onInitGraph = () => { ...@@ -51,7 +51,8 @@ const onInitGraph = () => {
rankdir: 'LR', // 布局从左向右 rankdir: 'LR', // 布局从左向右
controlPoints: true, // 节点间连线的控制点 controlPoints: true, // 节点间连线的控制点
nodesep: 10, // 同一层节点之间的距离 nodesep: 10, // 同一层节点之间的距离
ranksep: 50, // 不同层节点之间的距离 ranksep: 100, // 不同层节点之间的距离
// begin: [250, 100], // 左上角坐标
}, },
modes: { modes: {
default: [ default: [
......
...@@ -514,13 +514,19 @@ const handleGetDepartmentList = async () => { ...@@ -514,13 +514,19 @@ const handleGetDepartmentList = async () => {
// 跳转行政机构主页 // 跳转行政机构主页
const handleToInstitution = item => { const handleToInstitution = item => {
window.sessionStorage.setItem("curTabName", item.orgName); window.sessionStorage.setItem("curTabName", item.orgName);
const curRoute = router.resolve({ // const curRoute = router.resolve({
// path: "/institution",
// query: {
// id: item.orgId
// }
// });
// window.open(curRoute.href, "_blank");
router.push({
path: "/institution", path: "/institution",
query: { query: {
id: item.orgId id: item.orgId
} }
}); })
window.open(curRoute.href, "_blank");
}; };
// 跳转全部机构页面 // 跳转全部机构页面
const onNavigateTo = () => { const onNavigateTo = () => {
...@@ -529,14 +535,16 @@ const onNavigateTo = () => { ...@@ -529,14 +535,16 @@ const onNavigateTo = () => {
// 查看更多风险信号 // 查看更多风险信号
const handleToMoreRiskSignal = () => { const handleToMoreRiskSignal = () => {
const route = router.resolve("/viewRiskSignal"); // const route = router.resolve("/viewRiskSignal");
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
router.push("/viewRiskSignal")
}; };
// 查看更多新闻资讯 // 查看更多新闻资讯
const handleToMoreNews = () => { const handleToMoreNews = () => {
const route = router.resolve("/newsBrief"); // const route = router.resolve("/newsBrief");
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
router.push("/newsBrief")
}; };
// 最新科技政令 // 最新科技政令
...@@ -580,36 +588,55 @@ const handleClickToDetail = () => { ...@@ -580,36 +588,55 @@ const handleClickToDetail = () => {
const id = box1DataList.value[activeIndex].id; const id = box1DataList.value[activeIndex].id;
window.sessionStorage.setItem("curTabName", box1DataList.value[activeIndex].name); window.sessionStorage.setItem("curTabName", box1DataList.value[activeIndex].name);
const route = router.resolve({ // const route = router.resolve({
// path: "/decreeLayout",
// query: {
// id: id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/decreeLayout", path: "/decreeLayout",
query: { query: {
id: id id: id
} }
}); })
window.open(route.href, "_blank");
}; };
// 点击政令库政令 // 点击政令库政令
const handleClickDecree = decree => { const handleClickDecree = decree => {
window.sessionStorage.setItem("curTabName", decree.title); window.sessionStorage.setItem("curTabName", decree.title);
const route = router.resolve({ // const route = router.resolve({
// path: "/decreeLayout",
// query: {
// id: decree.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/decreeLayout", path: "/decreeLayout",
query: { query: {
id: decree.id id: decree.id
} }
}); })
window.open(route.href, "_blank");
}; };
const handleKeyDecree = item => { const handleKeyDecree = item => {
window.sessionStorage.setItem("curTabName", item.title); window.sessionStorage.setItem("curTabName", item.title);
const route = router.resolve({ // const route = router.resolve({
// path: "/decreeLayout",
// query: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/decreeLayout", path: "/decreeLayout",
query: { query: {
id: item.id id: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
// 风险信号 // 风险信号
...@@ -752,14 +779,23 @@ const handleClickPerson = async item => { ...@@ -752,14 +779,23 @@ const handleClickPerson = async item => {
return; return;
} }
window.sessionStorage.setItem("curTabName", item.name); window.sessionStorage.setItem("curTabName", item.name);
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// type: type, // type=1为科技企业领袖,2为国会议员,3为智库研究人员
// personId: item.personId
// }
// });
// window.open(route.href, "_blank");
router.push(
{
path: "/characterPage", path: "/characterPage",
query: { query: {
type: type, // type=1为科技企业领袖,2为国会议员,3为智库研究人员 type: type, // type=1为科技企业领袖,2为国会议员,3为智库研究人员
personId: item.personId personId: item.personId
} }
}); }
window.open(route.href, "_blank"); )
} else { } else {
personTypeName = ""; personTypeName = "";
ElMessage.warning("找不到当前人员的类型值!"); ElMessage.warning("找不到当前人员的类型值!");
...@@ -1023,13 +1059,21 @@ const handleGetDecreeTypeList = async () => { ...@@ -1023,13 +1059,21 @@ const handleGetDecreeTypeList = async () => {
}; };
// 查看社交媒体详情 // 查看社交媒体详情
const handleToSocialDetail = item => { const handleToSocialDetail = item => {
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// personId: item.id
// }
// });
// window.open(route.href, "_blank");
router.push(
{
path: "/characterPage", path: "/characterPage",
query: { query: {
personId: item.id personId: item.id
} }
}); }
window.open(route.href, "_blank"); )
}; };
const handleChangeCheckedDecreeType = () => { const handleChangeCheckedDecreeType = () => {
handleGetDecreeOrderList(); handleGetDecreeOrderList();
...@@ -1191,14 +1235,21 @@ const handleSwithCurDecree = name => { ...@@ -1191,14 +1235,21 @@ const handleSwithCurDecree = name => {
const searchDecreeText = ref(""); const searchDecreeText = ref("");
const handleSearch = () => { const handleSearch = () => {
window.sessionStorage.setItem("curTabName", `搜索-${searchDecreeText.value}`); window.sessionStorage.setItem("curTabName", `搜索-${searchDecreeText.value}`);
const curRoute = router.resolve({ // const curRoute = router.resolve({
// path: "/searchResults",
// query: {
// searchText: searchDecreeText.value,
// areaName: "政令"
// }
// });
// window.open(curRoute.href, "_blank");
router.push({
path: "/searchResults", path: "/searchResults",
query: { query: {
searchText: searchDecreeText.value, searchText: searchDecreeText.value,
areaName: "政令" areaName: "政令"
} }
}); })
window.open(curRoute.href, "_blank");
}; };
// 关键机构 // 关键机构
......
...@@ -170,13 +170,19 @@ const onWordWrap = (word, num) => { ...@@ -170,13 +170,19 @@ const onWordWrap = (word, num) => {
} }
const handleClickDecree = decree => { const handleClickDecree = decree => {
const route = router.resolve({ // const route = router.resolve({
// path: "/decreeLayout",
// query: {
// id: decree.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/decreeLayout", path: "/decreeLayout",
query: { query: {
id: decree.id id: decree.id
} }
}); })
window.open(route.href, "_blank");
}; };
// 冲突关系 // 冲突关系
......
...@@ -22,13 +22,8 @@ ...@@ -22,13 +22,8 @@
</div> </div>
</div> </div>
<div class="left-box-bottom"> <div class="left-box-bottom">
<div <div class="left-box-bottom-item" :class="{ leftBoxBottomItemActive: activeTitle === item.name }"
class="left-box-bottom-item" v-for="(item, index) in mainHeaderBtnList" :key="index" @click="handleClickMainHeaderBtn(item)">
:class="{ leftBoxBottomItemActive: activeTitle === item.name }"
v-for="(item, index) in mainHeaderBtnList"
:key="index"
@click="handleClickMainHeaderBtn(item)"
>
<div class="icon"> <div class="icon">
<img v-if="activeTitle === item.name" :src="item.activeIcon" alt="" /> <img v-if="activeTitle === item.name" :src="item.activeIcon" alt="" />
<img v-else :src="item.icon" alt="" /> <img v-else :src="item.icon" alt="" />
...@@ -220,12 +215,12 @@ const handleClickMainHeaderBtn = item => { ...@@ -220,12 +215,12 @@ const handleClickMainHeaderBtn = item => {
const summaryInfo = ref({}); const summaryInfo = ref({});
const handleGetSummary = async () => { const handleGetSummary = async () => {
try { try {
const res = await getDecreeSummary({id: route.query.id}); const res = await getDecreeSummary({ id: route.query.id });
console.log("全局信息", res); console.log("全局信息", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
summaryInfo.value = res.data; summaryInfo.value = res.data;
} }
} catch (error) {} } catch (error) { }
}; };
// 获取报告原文 // 获取报告原文
...@@ -248,13 +243,19 @@ const handleGetSummary = async () => { ...@@ -248,13 +243,19 @@ const handleGetSummary = async () => {
// }; // };
const handleShowReport = () => { const handleShowReport = () => {
const curRoute = router.resolve({ // const curRoute = router.resolve({
// path: "/decree/decreeOriginal",
// query: {
// id: route.query.id
// }
// });
// window.open(curRoute.href, "_blank");
router.push({
path: "/decree/decreeOriginal", path: "/decree/decreeOriginal",
query: { query: {
id: route.query.id id: route.query.id
} }
}); })
window.open(curRoute.href, "_blank");
}; };
const handleToInstitution = () => { const handleToInstitution = () => {
...@@ -297,6 +298,7 @@ onMounted(() => { ...@@ -297,6 +298,7 @@ onMounted(() => {
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
overflow-y: auto; overflow-y: auto;
.report { .report {
padding: 10px 150px; padding: 10px 150px;
position: absolute; position: absolute;
...@@ -306,6 +308,7 @@ onMounted(() => { ...@@ -306,6 +308,7 @@ onMounted(() => {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #f7f8f9; background: #f7f8f9;
.report-close { .report-close {
position: absolute; position: absolute;
top: 20px; top: 20px;
...@@ -313,11 +316,13 @@ onMounted(() => { ...@@ -313,11 +316,13 @@ onMounted(() => {
width: 20px; width: 20px;
height: 20px; height: 20px;
cursor: pointer; cursor: pointer;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.report-header { .report-header {
width: 100%; width: 100%;
height: 50px; height: 50px;
...@@ -332,12 +337,15 @@ onMounted(() => { ...@@ -332,12 +337,15 @@ onMounted(() => {
padding-left: 30px; padding-left: 30px;
border-bottom: 1px solid rgba(234, 236, 238, 1); border-bottom: 1px solid rgba(234, 236, 238, 1);
} }
.report-main { .report-main {
display: flex; display: flex;
height: calc(100% - 100px); height: calc(100% - 100px);
justify-content: space-between; justify-content: space-between;
.left { .left {
width: 800px; width: 800px;
.noContent { .noContent {
height: 100px; height: 100px;
line-height: 100px; line-height: 100px;
...@@ -349,8 +357,10 @@ onMounted(() => { ...@@ -349,8 +357,10 @@ onMounted(() => {
font-weight: 400; font-weight: 400;
} }
} }
.right { .right {
width: 800px; width: 800px;
.noContent { .noContent {
height: 100px; height: 100px;
line-height: 100px; line-height: 100px;
...@@ -364,17 +374,20 @@ onMounted(() => { ...@@ -364,17 +374,20 @@ onMounted(() => {
} }
} }
} }
.layout-main { .layout-main {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.header-main { .header-main {
width: 100%; width: 100%;
border-bottom: 1px solid rgba(234, 236, 238, 1); border-bottom: 1px solid rgba(234, 236, 238, 1);
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);
} }
.layout-main-header { .layout-main-header {
width: 1600px; width: 1600px;
height: 137px; height: 137px;
...@@ -384,6 +397,7 @@ onMounted(() => { ...@@ -384,6 +397,7 @@ onMounted(() => {
justify-content: space-between; justify-content: space-between;
position: sticky; position: sticky;
top: 0; top: 0;
// z-index: 100; // z-index: 100;
.layout-main-header-container { .layout-main-header-container {
width: 1600px; width: 1600px;
...@@ -392,28 +406,34 @@ onMounted(() => { ...@@ -392,28 +406,34 @@ onMounted(() => {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.layout-main-header-left-box { .layout-main-header-left-box {
width: 20px; width: 20px;
flex: auto; flex: auto;
margin-top: 12px; margin-top: 12px;
.left-box-top { .left-box-top {
height: 64px; height: 64px;
display: flex; display: flex;
align-items: center; align-items: center;
.icon { .icon {
width: 64px; width: 64px;
height: 40px; height: 40px;
overflow: hidden; overflow: hidden;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.info { .info {
margin-left: 10px; margin-left: 10px;
margin-right: 40px; margin-right: 40px;
width: 20px; width: 20px;
flex: auto; flex: auto;
.info-box1 { .info-box1 {
width: 100%; width: 100%;
color: rgba(59, 65, 75, 1); color: rgba(59, 65, 75, 1);
...@@ -425,6 +445,7 @@ onMounted(() => { ...@@ -425,6 +445,7 @@ onMounted(() => {
text-align: left; text-align: left;
margin-top: 5px; margin-top: 5px;
} }
.info-box2 { .info-box2 {
margin-top: 5px; margin-top: 5px;
height: 22px; height: 22px;
...@@ -442,31 +463,37 @@ onMounted(() => { ...@@ -442,31 +463,37 @@ onMounted(() => {
white-space: nowrap; white-space: nowrap;
padding: 0 10px; padding: 0 10px;
} }
.info-box2-item:first-child { .info-box2-item:first-child {
padding-left: 0px; padding-left: 0px;
} }
} }
} }
} }
.left-box-bottom { .left-box-bottom {
display: flex; display: flex;
height: 40px; height: 40px;
margin-top: 21px; margin-top: 21px;
.left-box-bottom-item { .left-box-bottom-item {
display: flex; display: flex;
margin-right: 32px; margin-right: 32px;
margin-top: 3px; margin-top: 3px;
height: 35px; height: 35px;
cursor: pointer; cursor: pointer;
.icon { .icon {
margin-top: 4px; margin-top: 4px;
width: 16px; width: 16px;
height: 16px; height: 16px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.name { .name {
height: 24px; height: 24px;
color: rgba(59, 65, 75, 1); color: rgba(59, 65, 75, 1);
...@@ -478,20 +505,24 @@ onMounted(() => { ...@@ -478,20 +505,24 @@ onMounted(() => {
text-align: left; text-align: left;
margin-left: 3px; margin-left: 3px;
} }
.nameActive { .nameActive {
color: var(--color-main-active); color: var(--color-main-active);
font-weight: 700; font-weight: 700;
} }
} }
.leftBoxBottomItemActive { .leftBoxBottomItemActive {
border-bottom: 3px solid var(--color-main-active); border-bottom: 3px solid var(--color-main-active);
} }
} }
} }
.layout-main-header-right-box { .layout-main-header-right-box {
.right-box-top { .right-box-top {
white-space: nowrap; white-space: nowrap;
padding-top: 11px; padding-top: 11px;
.time { .time {
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
...@@ -503,6 +534,7 @@ onMounted(() => { ...@@ -503,6 +534,7 @@ onMounted(() => {
letter-spacing: 0px; letter-spacing: 0px;
text-align: right; text-align: right;
} }
.name { .name {
height: 24px; height: 24px;
line-height: 24px; line-height: 24px;
...@@ -515,12 +547,14 @@ onMounted(() => { ...@@ -515,12 +547,14 @@ onMounted(() => {
text-align: right; text-align: right;
} }
} }
.right-box-bottom { .right-box-bottom {
margin-top: 24px; margin-top: 24px;
text-align: right; text-align: right;
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
gap: 8px; gap: 8px;
.btn { .btn {
width: 120px; width: 120px;
height: 36px; height: 36px;
...@@ -533,14 +567,17 @@ onMounted(() => { ...@@ -533,14 +567,17 @@ onMounted(() => {
gap: 8px; gap: 8px;
align-items: center; align-items: center;
cursor: pointer; cursor: pointer;
.icon { .icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.text { .text {
width: 64px; width: 64px;
height: 24px; height: 24px;
...@@ -554,6 +591,7 @@ onMounted(() => { ...@@ -554,6 +591,7 @@ onMounted(() => {
text-align: left; text-align: left;
} }
} }
.btn-active { .btn-active {
width: 120px; width: 120px;
height: 36px; height: 36px;
...@@ -564,14 +602,17 @@ onMounted(() => { ...@@ -564,14 +602,17 @@ onMounted(() => {
align-items: center; align-items: center;
gap: 8px; gap: 8px;
cursor: pointer; cursor: pointer;
.icon-active { .icon-active {
width: 16px; width: 16px;
height: 16px; height: 16px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.text-active { .text-active {
width: 64px; width: 64px;
height: 24px; height: 24px;
...@@ -588,12 +629,14 @@ onMounted(() => { ...@@ -588,12 +629,14 @@ onMounted(() => {
} }
} }
} }
.layout-main-center { .layout-main-center {
height: 20px; height: 20px;
flex: auto; flex: auto;
background-color: #f7f8f9; background-color: #f7f8f9;
} }
} }
.layout-report-box { .layout-report-box {
position: absolute; position: absolute;
z-index: 9999; z-index: 9999;
...@@ -602,6 +645,7 @@ onMounted(() => { ...@@ -602,6 +645,7 @@ onMounted(() => {
width: 100%; width: 100%;
height: 926px; height: 926px;
background: rgba(248, 249, 250, 1); background: rgba(248, 249, 250, 1);
.report-close { .report-close {
position: absolute; position: absolute;
top: 24px; top: 24px;
...@@ -609,11 +653,13 @@ onMounted(() => { ...@@ -609,11 +653,13 @@ onMounted(() => {
width: 32px; width: 32px;
height: 32px; height: 32px;
cursor: pointer; cursor: pointer;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.report-main { .report-main {
width: 1600px; width: 1600px;
height: 926px; height: 926px;
...@@ -621,13 +667,16 @@ onMounted(() => { ...@@ -621,13 +667,16 @@ onMounted(() => {
background: #fff; background: #fff;
box-sizing: border-box; box-sizing: border-box;
padding: 0 69px; padding: 0 69px;
.report-header { .report-header {
height: 77px; height: 77px;
border-bottom: 1px solid rgba(240, 242, 244, 1); border-bottom: 1px solid rgba(240, 242, 244, 1);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.report-header-left { .report-header-left {
display: flex; display: flex;
.text { .text {
margin-top: 32px; margin-top: 32px;
width: 70px; width: 70px;
...@@ -638,14 +687,17 @@ onMounted(() => { ...@@ -638,14 +687,17 @@ onMounted(() => {
font-weight: 400; font-weight: 400;
line-height: 14px; line-height: 14px;
} }
.select-box { .select-box {
margin-left: 8px; margin-left: 8px;
margin-top: 23px; margin-top: 23px;
} }
} }
.report-header-right { .report-header-right {
display: flex; display: flex;
margin-top: 24px; margin-top: 24px;
.btn { .btn {
display: flex; display: flex;
width: 88px; width: 88px;
...@@ -658,14 +710,17 @@ onMounted(() => { ...@@ -658,14 +710,17 @@ onMounted(() => {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
.icon { .icon {
width: 16px; width: 16px;
height: 16px; height: 16px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.text { .text {
margin-left: 8px; margin-left: 8px;
height: 32px; height: 32px;
...@@ -678,21 +733,26 @@ onMounted(() => { ...@@ -678,21 +733,26 @@ onMounted(() => {
} }
} }
} }
.report-content { .report-content {
display: flex; display: flex;
margin-top: 35px; margin-top: 35px;
.content-left { .content-left {
width: 680px; width: 680px;
height: 786px; height: 786px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.content-right { .content-right {
margin-left: 89px; margin-left: 89px;
width: 680px; width: 680px;
height: 786px; height: 786px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -25,7 +25,8 @@ ...@@ -25,7 +25,8 @@
<div class="box1-footer" v-if="backgroundListNum > 10"> <div class="box1-footer" v-if="backgroundListNum > 10">
<div class="box1-footer-left">{{ `共 ${backgroundListNum} 项` }}</div> <div class="box1-footer-left">{{ `共 ${backgroundListNum} 项` }}</div>
<div class="box1-footer-right"> <div class="box1-footer-right">
<el-pagination :page-size="10" @current-change="handleCurrentChange" :current-page="currentPage" background layout="prev, pager, next" :total="backgroundListNum" /> <el-pagination :page-size="10" @current-change="handleCurrentChange" :current-page="currentPage"
background layout="prev, pager, next" :total="backgroundListNum" />
</div> </div>
</div> </div>
</div> </div>
...@@ -39,8 +40,12 @@ ...@@ -39,8 +40,12 @@
<el-collapse v-model="dependActive"> <el-collapse v-model="dependActive">
<el-collapse-item v-for="(item, index) in dependList" :key="item.billId" :name="item.billId"> <el-collapse-item v-for="(item, index) in dependList" :key="item.billId" :name="item.billId">
<template #icon> <template #icon>
<el-icon v-if="dependActive.includes(item.billId)"><ArrowDownBold /></el-icon> <el-icon v-if="dependActive.includes(item.billId)">
<el-icon v-else><ArrowUpBold /></el-icon> <ArrowDownBold />
</el-icon>
<el-icon v-else>
<ArrowUpBold />
</el-icon>
</template> </template>
<template #title> <template #title>
<div class="custom-collapse-title"> <div class="custom-collapse-title">
...@@ -73,7 +78,9 @@ ...@@ -73,7 +78,9 @@
<div class="time-line-icon"> <div class="time-line-icon">
<img style="width: 100%; height: 100%;" :src="item.orgImage || DefaultIcon1" alt=""> <img style="width: 100%; height: 100%;" :src="item.orgImage || DefaultIcon1" alt="">
</div> </div>
<div class="time-line-name text-click-hover" @click="handleToInstitution(item)">{{ item.proposeOrgName }}</div> <div class="time-line-name text-click-hover" @click="handleToInstitution(item)">{{
item.proposeOrgName
}}</div>
</div> </div>
<div class="timeline-content" @click="handleClickDecree(item)">{{ item.describe }}</div> <div class="timeline-content" @click="handleClickDecree(item)">{{ item.describe }}</div>
</div> </div>
...@@ -153,7 +160,7 @@ const prevList = ref([ ...@@ -153,7 +160,7 @@ const prevList = ref([
]); ]);
const handleGetPrev = async () => { const handleGetPrev = async () => {
try { try {
const res = await getDecreePrev({id: decreeId.value}); const res = await getDecreePrev({ id: decreeId.value });
console.log("前序政令", res); console.log("前序政令", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
prevList.value = res.data; prevList.value = res.data;
...@@ -167,23 +174,35 @@ const handleGetPrev = async () => { ...@@ -167,23 +174,35 @@ const handleGetPrev = async () => {
}; };
// 跳转行政机构主页 // 跳转行政机构主页
const handleToInstitution = item => { const handleToInstitution = item => {
const curRoute = router.resolve({ // const curRoute = router.resolve({
// path: "/institution",
// query: {
// id: item.orgId
// }
// });
// window.open(curRoute.href, "_blank");
router.push({
path: "/institution", path: "/institution",
query: { query: {
id: item.orgId id: item.orgId
} }
}); })
window.open(curRoute.href, "_blank");
}; };
// 跳转科技政令详情页 // 跳转科技政令详情页
const handleClickDecree = item => { const handleClickDecree = item => {
const route = router.resolve({ // const route = router.resolve({
// path: "/decreeLayout",
// query: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/decreeLayout", path: "/decreeLayout",
query: { query: {
id: item.id id: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
// 法律依据 // 法律依据
...@@ -191,7 +210,7 @@ const dependList = ref([]); ...@@ -191,7 +210,7 @@ const dependList = ref([]);
const dependActive = ref([]); const dependActive = ref([]);
const handleGetLaws = async () => { const handleGetLaws = async () => {
try { try {
const res = await getDecreeDepend({id: decreeId.value}); const res = await getDecreeDepend({ id: decreeId.value });
console.log("法律依据", res); console.log("法律依据", res);
if (res.code === 200 && res.data) { if (res.code === 200 && res.data) {
dependList.value = res.data; dependList.value = res.data;
...@@ -208,15 +227,21 @@ const handleGetLaws = async () => { ...@@ -208,15 +227,21 @@ const handleGetLaws = async () => {
const handleClickBull = decree => { const handleClickBull = decree => {
window.sessionStorage.setItem("billId", decree.billId); window.sessionStorage.setItem("billId", decree.billId);
window.sessionStorage.setItem("curTabName", decree.title); window.sessionStorage.setItem("curTabName", decree.title);
const route = router.resolve({ // const route = router.resolve({
// path: "/billLayout",
// query: {
// billId: decree.billId
// }
// });
// console.log(route);
// window.open(route.href, "_blank");
router.push({
path: "/billLayout", path: "/billLayout",
query: { query: {
billId: decree.billId billId: decree.billId
} }
}); })
console.log(route);
window.open(route.href, "_blank");
}; };
onMounted(() => { onMounted(() => {
...@@ -345,20 +370,26 @@ onMounted(() => { ...@@ -345,20 +370,26 @@ onMounted(() => {
.box2-main { .box2-main {
padding: 16px 20px; padding: 16px 20px;
.custom-collapse { .custom-collapse {
padding-left: 32px; padding-left: 32px;
:deep(.el-collapse), :deep(.el-collapse),
:deep(.el-collapse-item__wrap) { :deep(.el-collapse-item__wrap) {
border: none !important; border: none !important;
} }
:deep(.el-collapse-item__header) { :deep(.el-collapse-item__header) {
border-bottom: 1px solid rgba(234, 236, 238, 1); border-bottom: 1px solid rgba(234, 236, 238, 1);
} }
:deep(.el-collapse-item__content) { :deep(.el-collapse-item__content) {
padding-bottom: 16px; padding-bottom: 16px;
} }
.custom-collapse-title { .custom-collapse-title {
position: relative; position: relative;
.custom-collapse-index { .custom-collapse-index {
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
font-size: var(--font-size-base); font-size: var(--font-size-base);
...@@ -373,12 +404,14 @@ onMounted(() => { ...@@ -373,12 +404,14 @@ onMounted(() => {
background: #e7f3ff; background: #e7f3ff;
color: #0a57a6; color: #0a57a6;
} }
.custom-collapse-name { .custom-collapse-name {
font-weight: 600; font-weight: 600;
font-size: 18px; font-size: 18px;
color: var(--el-collapse-header-text-color); color: var(--el-collapse-header-text-color);
} }
} }
.custom-collapse-content { .custom-collapse-content {
margin-top: 8px; margin-top: 8px;
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
...@@ -392,6 +425,7 @@ onMounted(() => { ...@@ -392,6 +425,7 @@ onMounted(() => {
.right { .right {
width: 520px; width: 520px;
.box3 { .box3 {
.box3-bottom-main { .box3-bottom-main {
......
...@@ -318,22 +318,32 @@ const handleGetOrgnization = async () => { ...@@ -318,22 +318,32 @@ const handleGetOrgnization = async () => {
}; };
// 跳转行政机构主页 // 跳转行政机构主页
const handleToInstitution = item => { const handleToInstitution = item => {
const curRoute = router.resolve({ // const curRoute = router.resolve({
// path: "/institution",
// query: { id: item.id }
// });
// window.open(curRoute.href, "_blank");
router.push({
path: "/institution", path: "/institution",
query: { id: item.id } query: { id: item.id }
}); })
window.open(curRoute.href, "_blank");
}; };
// 跳转人员详情 // 跳转人员详情
const handleClickUser = item => { const handleClickUser = item => {
window.sessionStorage.setItem('curTabName', item.name) window.sessionStorage.setItem('curTabName', item.name)
const routeData = router.resolve({ // const routeData = router.resolve({
// path: "/characterPage",
// query: {
// personId: item.id
// }
// });
// window.open(routeData.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
personId: item.id personId: item.id
} }
}); })
window.open(routeData.href, "_blank");
}; };
onMounted(() => { onMounted(() => {
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
</template> </template>
<div class="analysis-box"> <div class="analysis-box">
<div class="analysis-top"> <div class="analysis-top">
<el-select v-model="areaType" :empty-values="[null, undefined]" @change="onMainContentData()" style="width: 200px;"> <el-select v-model="areaType" :empty-values="[null, undefined]" @change="onMainContentData()"
style="width: 200px;">
<el-option label="全部领域" value="" /> <el-option label="全部领域" value="" />
<el-option v-for="item in areaList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in areaList" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
...@@ -21,7 +22,8 @@ ...@@ -21,7 +22,8 @@
<!-- <el-switch v-model="isHighlight" /> <!-- <el-switch v-model="isHighlight" />
<div style="margin-left: 6px;">高亮实体</div> --> <div style="margin-left: 6px;">高亮实体</div> -->
<div class="select-input"> <div class="select-input">
<el-input v-model="commandWord" @keyup.enter="onMainContentData()" style="width: 100%; height: 100%;" :suffix-icon="Search" placeholder="指令搜索" /> <el-input v-model="commandWord" @keyup.enter="onMainContentData()" style="width: 100%; height: 100%;"
:suffix-icon="Search" placeholder="指令搜索" />
</div> </div>
</div> </div>
<div class="analysis-content"> <div class="analysis-content">
...@@ -37,19 +39,20 @@ ...@@ -37,19 +39,20 @@
<!-- 渲染一级列表 --> <!-- 渲染一级列表 -->
<div class="numbered-list"> <div class="numbered-list">
<div v-for="(item, itemIndex) in section.slaver" :key="itemIndex" class="list-item"> <div v-for="(item, itemIndex) in section.slaver" :key="itemIndex" class="list-item">
<div class="list-item-dot">{{itemIndex+1}}.</div> <div class="list-item-dot">{{ itemIndex + 1 }}.</div>
<div class="list-item-word" v-html="item.content"></div> <div class="list-item-word" v-html="item.content"></div>
<!-- 渲染二级列表 --> <!-- 渲染二级列表 -->
<div v-if="item.slaver" class="sub-list"> <div v-if="item.slaver" class="sub-list">
<div v-for="(subItem, subIndex) in item.slaver" :key="subIndex" class="sub-item"> <div v-for="(subItem, subIndex) in item.slaver" :key="subIndex" class="sub-item">
<div class="sub-item-dot">({{subIndex+1}})</div> <div class="sub-item-dot">({{ subIndex + 1 }})</div>
<div class="sub-item-word" v-html="subItem.content"></div> <div class="sub-item-word" v-html="subItem.content"></div>
<!-- 渲染三级列表 --> <!-- 渲染三级列表 -->
<div v-if="subItem.slaver" class="sub-sub-list"> <div v-if="subItem.slaver" class="sub-sub-list">
<div v-for="(subSubItem, subSubIndex) in subItem.slaver" :key="subSubIndex" class="sub-sub-item"> <div v-for="(subSubItem, subSubIndex) in subItem.slaver" :key="subSubIndex"
<div class="sub-sub-item-dot">{{ALPHABET[subSubIndex%26]}}.</div> class="sub-sub-item">
<div class="sub-sub-item-dot">{{ ALPHABET[subSubIndex % 26] }}.</div>
<div class="sub-sub-item-word" v-html="subItem.content"></div> <div class="sub-sub-item-word" v-html="subItem.content"></div>
</div> </div>
</div> </div>
...@@ -69,7 +72,8 @@ ...@@ -69,7 +72,8 @@
<div class="box3-top"> <div class="box3-top">
<div class="organization-list"> <div class="organization-list">
<div class="organization-item" v-for="item in organizationInfo.list" :key="item.id"> <div class="organization-item" v-for="item in organizationInfo.list" :key="item.id">
<ActionButton @click="handleOrganization(item)" :name="item.obb" :type="item.id==organizationInfo.node.id?'active':'normal'" /> <ActionButton @click="handleOrganization(item)" :name="item.obb"
:type="item.id == organizationInfo.node.id ? 'active' : 'normal'" />
</div> </div>
</div> </div>
<div class="box3-top-top" @click="handleToInstitution()"> <div class="box3-top-top" @click="handleToInstitution()">
...@@ -94,7 +98,8 @@ ...@@ -94,7 +98,8 @@
<img :src="item.avatar || DefaultIcon1" alt="" /> <img :src="item.avatar || DefaultIcon1" alt="" />
</div> </div>
<div class="box3-top-bottom-item-right"> <div class="box3-top-bottom-item-right">
<div class="name one-line-ellipsis text-click-hover" @click="handleClickUser(item)">{{ item.name }}</div> <div class="name one-line-ellipsis text-click-hover" @click="handleClickUser(item)">{{ item.name }}
</div>
<div class="position">{{ item.job }}</div> <div class="position">{{ item.job }}</div>
</div> </div>
</div> </div>
...@@ -102,7 +107,9 @@ ...@@ -102,7 +107,9 @@
</div> </div>
<div class="organization-button" @click="handleClickToolBox()"> <div class="organization-button" @click="handleClickToolBox()">
<div class="button-text">查看政令执行情况</div> <div class="button-text">查看政令执行情况</div>
<el-icon size="16"><Right /></el-icon> <el-icon size="16">
<Right />
</el-icon>
</div> </div>
</div> </div>
</AnalysisBox> </AnalysisBox>
...@@ -123,7 +130,7 @@ ...@@ -123,7 +130,7 @@
</div> </div>
</div> </div>
<el-dialog v-model="isTreeDialog" width="1540px" top="8vh" class="viewpoint-dialog" destroy-on-close> <el-dialog v-model="isTreeDialog" width="1400px" top="8vh" class="viewpoint-dialog" destroy-on-close>
<template #header> <template #header>
<div class="viewpoint-header"> <div class="viewpoint-header">
<div class="viewpoint-title">政令举措思维导图</div> <div class="viewpoint-title">政令举措思维导图</div>
...@@ -250,10 +257,10 @@ const onMainContentData = async () => { ...@@ -250,10 +257,10 @@ const onMainContentData = async () => {
console.log("主要指令", res); console.log("主要指令", res);
if (res && res.code === 200) { if (res && res.code === 200) {
contentList.value = res.data || []; contentList.value = res.data || [];
contentList.value.forEach((item, index) => { item.content = `(${simpleNumToChinese(index+1)}) ${item.content}` }) contentList.value.forEach((item, index) => { item.content = `(${simpleNumToChinese(index + 1)}) ${item.content}` })
if (keyword) { if (keyword) {
let word = keyword.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"); let word = keyword.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
contentList.value.forEach(item => {onHighlight(word, item)}) contentList.value.forEach(item => { onHighlight(word, item) })
} }
} else { } else {
contentList.value = [] contentList.value = []
...@@ -313,25 +320,27 @@ const onDecreeMindMap = async () => { ...@@ -313,25 +320,27 @@ const onDecreeMindMap = async () => {
} }
isTreeDialog.value = true; isTreeDialog.value = true;
try { try {
let res = await getDecreeMindMap({id: route.query.id}); let res = await getDecreeMindMap({ id: route.query.id });
console.log("思维导图", res); console.log("思维导图", res);
if (res.code === 200) { if (res.code === 200) {
let nodes = [] let nodes = []
let edges = [] let edges = []
Object.keys(res.data||{}).forEach((label, count) => { let obj = {}
nodes.push({ id:`node-${count}`, label })
}) let list = onUniqueArray(Object.values(res.data || {}).flat(1), 'sectionId')
Object.values(res.data||{}).forEach((list, count) => {
list.forEach((item, index) => { list.forEach((item, index) => {
nodes.push({ id: `node-${item.orderNum}-${item.sectionId}`, label: item.textZh, maxWidth: 600, labelCfg, layer: 1 })
if (item.execAgent?.length) { if (item.execAgent?.length) {
nodes.push({ id:`node-${count}-${index}`, label:item.textZh, maxWidth:600, labelCfg })
item.execAgent.forEach((label, num) => { item.execAgent.forEach((label, num) => {
nodes.push({ id:`node-${count}-${index}-${num}`, label }) if (!obj[label]) {
edges.push({ id:`edge1-${count}-${index}-${num}`, source:`node-${count}-${index}-${num}`, target:`node-${count}-${index}` }) obj[label] = `${index}-${num}`
edges.push({ id:`edge2-${count}-${index}-${num}`, source:`node-${count}`, target:`node-${count}-${index}-${num}` }) nodes.push({ id: `node-${obj[label]}`, label, layer: 0 })
})
} }
edges.push({ id: `edge-${index}-${num}`, source: `node-${obj[label]}`, target: `node-${item.orderNum}-${item.sectionId}` })
}) })
} else {
edges.push({ id: `edge-${index}`, source: `root-virtual`, target: `node-${item.orderNum}-${item.sectionId}` })
}
}) })
setTimeout(() => { refMindGraph.value.onMindGraphData(nodes, edges) }, 100) setTimeout(() => { refMindGraph.value.onMindGraphData(nodes, edges) }, 100)
...@@ -341,11 +350,23 @@ const onDecreeMindMap = async () => { ...@@ -341,11 +350,23 @@ const onDecreeMindMap = async () => {
} }
} }
// 对象数组去重
const onUniqueArray = (list, key = 'id') => {
const obj = {};
return list.reduce((total, item) => {
if (!obj[String(item[key])]) {
obj[String(item[key])] = true;
total.push(item);
}
return total;
}, []);
}
// 相关实体 // 相关实体
const entityList = ref([]); const entityList = ref([]);
const onRelatedEntityData = async () => { const onRelatedEntityData = async () => {
try { try {
const res = await getDecreeRelatedEntity({id: route.query.id}); const res = await getDecreeRelatedEntity({ id: route.query.id });
console.log("相关实体", res); console.log("相关实体", res);
if (res && res.code === 200) { if (res && res.code === 200) {
entityList.value = res.data; entityList.value = res.data;
...@@ -360,19 +381,19 @@ const onRelatedEntityData = async () => { ...@@ -360,19 +381,19 @@ const onRelatedEntityData = async () => {
// 执行机构 // 执行机构
const organizationInfo = reactive({ const organizationInfo = reactive({
list : [], list: [],
node: {id: "", obb: "", logo: "", name: "", ename: "", leaders: []}, node: { id: "", obb: "", logo: "", name: "", ename: "", leaders: [] },
}) })
const handleGetOrgnization = async () => { const handleGetOrgnization = async () => {
try { try {
const res = await getDecreeOrganization({id: route.query.id}); const res = await getDecreeOrganization({ id: route.query.id });
console.log("执行机构", res); console.log("执行机构", res);
if (res.code === 200 && res.data?.length) { if (res.code === 200 && res.data?.length) {
organizationInfo.list = res.data; organizationInfo.list = res.data;
organizationInfo.node = res.data[0]; organizationInfo.node = res.data[0];
} }
} catch (error) { } catch (error) {
organizationInfo.node = {id: "", obb: "", logo: "", name: "", ename: "", leaders: []}; organizationInfo.node = { id: "", obb: "", logo: "", name: "", ename: "", leaders: [] };
console.error("获取执行机构数据失败", error); console.error("获取执行机构数据失败", error);
} }
}; };
...@@ -382,24 +403,36 @@ const handleOrganization = (node) => { ...@@ -382,24 +403,36 @@ const handleOrganization = (node) => {
}; };
// 跳转机构主页 // 跳转机构主页
const handleToInstitution = () => { const handleToInstitution = () => {
const curRoute = router.resolve({ // const curRoute = router.resolve({
// path: "/institution",
// query: {
// id: organizationInfo.node.id
// }
// });
// window.open(curRoute.href, "_blank");
router.push({
path: "/institution", path: "/institution",
query: { query: {
id: organizationInfo.node.id id: organizationInfo.node.id
} }
}); })
window.open(curRoute.href, "_blank");
}; };
// 跳转人员详情 // 跳转人员详情
const handleClickUser = item => { const handleClickUser = item => {
window.sessionStorage.setItem('curTabName', item.name) window.sessionStorage.setItem('curTabName', item.name)
const routeData = router.resolve({ // const routeData = router.resolve({
// path: "/characterPage",
// query: {
// personId: item.id
// }
// });
// window.open(routeData.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
personId: item.id personId: item.id
} }
}); })
window.open(routeData.href, "_blank");
}; };
onMounted(() => { onMounted(() => {
...@@ -436,15 +469,18 @@ onMounted(() => { ...@@ -436,15 +469,18 @@ onMounted(() => {
align-items: center; align-items: center;
padding: 0 16px; padding: 0 16px;
cursor: pointer; cursor: pointer;
.mind-icon { .mind-icon {
width: 16px; width: 16px;
height: 13px; height: 13px;
font-size: 0px; font-size: 0px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
} }
.mind-text { .mind-text {
color: var(--color-primary-100); color: var(--color-primary-100);
font-family: Source Han Sans CN; font-family: Source Han Sans CN;
...@@ -465,6 +501,7 @@ onMounted(() => { ...@@ -465,6 +501,7 @@ onMounted(() => {
height: 60px; height: 60px;
display: flex; display: flex;
align-items: center; align-items: center;
.select-input { .select-input {
background-color: var(--el-fill-color-blank); background-color: var(--el-fill-color-blank);
border-radius: var(--el-border-radius-base); border-radius: var(--el-border-radius-base);
...@@ -483,14 +520,17 @@ onMounted(() => { ...@@ -483,14 +520,17 @@ onMounted(() => {
width: 4px; width: 4px;
background: transparent; background: transparent;
border-radius: 2px; border-radius: 2px;
&>div { &>div {
background: #c5c7c9; background: #c5c7c9;
opacity: 1; opacity: 1;
} }
&>div:hover { &>div:hover {
background: #505357; background: #505357;
} }
} }
.section { .section {
padding: 0 20px; padding: 0 20px;
...@@ -526,42 +566,52 @@ onMounted(() => { ...@@ -526,42 +566,52 @@ onMounted(() => {
font-size: 16px; font-size: 16px;
line-height: 1.7; line-height: 1.7;
color: #374151; color: #374151;
.list-item { .list-item {
position: relative; position: relative;
.list-item-dot { .list-item-dot {
position: absolute; position: absolute;
left: 50px; left: 50px;
top: 10px; top: 10px;
} }
.list-item-word { .list-item-word {
border-bottom: 1px solid rgba(234, 236, 238, 1); border-bottom: 1px solid rgba(234, 236, 238, 1);
padding: 10px 16px 10px 68px; padding: 10px 16px 10px 68px;
} }
} }
} }
.sub-list { .sub-list {
.sub-item { .sub-item {
position: relative; position: relative;
.sub-item-dot { .sub-item-dot {
position: absolute; position: absolute;
left: 66px; left: 66px;
top: 10px; top: 10px;
} }
.sub-item-word { .sub-item-word {
border-bottom: 1px solid rgba(234, 236, 238, 1); border-bottom: 1px solid rgba(234, 236, 238, 1);
padding: 10px 16px 10px 90px; padding: 10px 16px 10px 90px;
} }
} }
} }
.sub-sub-list { .sub-sub-list {
border-bottom: 1px solid rgba(234, 236, 238, 1); border-bottom: 1px solid rgba(234, 236, 238, 1);
.sub-sub-item { .sub-sub-item {
position: relative; position: relative;
.sub-sub-item-dot { .sub-sub-item-dot {
position: absolute; position: absolute;
left: 82px; left: 82px;
top: 6px; top: 6px;
} }
.sub-sub-item-word { .sub-sub-item-word {
padding: 6px 16px 6px 100px; padding: 6px 16px 6px 100px;
} }
...@@ -601,6 +651,7 @@ onMounted(() => { ...@@ -601,6 +651,7 @@ onMounted(() => {
justify-content: center; justify-content: center;
border-radius: 6px; border-radius: 6px;
cursor: pointer; cursor: pointer;
.button-text { .button-text {
margin-right: 8px; margin-right: 8px;
font-family: Microsoft YaHei; font-family: Microsoft YaHei;
...@@ -624,6 +675,7 @@ onMounted(() => { ...@@ -624,6 +675,7 @@ onMounted(() => {
height: 64px; height: 64px;
margin-left: 17px; margin-left: 17px;
font-size: 0px; font-size: 0px;
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
...@@ -833,6 +885,7 @@ onMounted(() => { ...@@ -833,6 +885,7 @@ onMounted(() => {
.box4 { .box4 {
.left-bottom-main { .left-bottom-main {
padding: 20px; padding: 20px;
.main-box { .main-box {
height: 48px; height: 48px;
border-radius: 50px; border-radius: 50px;
...@@ -849,6 +902,7 @@ onMounted(() => { ...@@ -849,6 +902,7 @@ onMounted(() => {
height: 24px; height: 24px;
font-size: 0px; font-size: 0px;
} }
.name { .name {
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
...@@ -859,6 +913,7 @@ onMounted(() => { ...@@ -859,6 +913,7 @@ onMounted(() => {
width: 20px; width: 20px;
margin: 0 10px; margin: 0 10px;
} }
.type { .type {
font-size: 16px; font-size: 16px;
font-weight: 400; font-weight: 400;
...@@ -875,20 +930,24 @@ onMounted(() => { ...@@ -875,20 +930,24 @@ onMounted(() => {
:deep(.viewpoint-dialog) { :deep(.viewpoint-dialog) {
padding: 0; padding: 0;
border-radius: 4px; border-radius: 4px;
.el-dialog__body { .el-dialog__body {
padding: 0; padding: 0;
} }
.el-dialog__header { .el-dialog__header {
padding: 0; padding: 0;
margin: 0; margin: 0;
position: relative; position: relative;
height: 48px; height: 48px;
} }
.el-dialog__headerbtn { .el-dialog__headerbtn {
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
right: 12px; right: 12px;
} }
.viewpoint-header { .viewpoint-header {
height: 48px; height: 48px;
display: flex; display: flex;
...@@ -896,12 +955,14 @@ onMounted(() => { ...@@ -896,12 +955,14 @@ onMounted(() => {
padding: 0 24px; padding: 0 24px;
border-bottom: 1px solid rgb(234, 236, 238); border-bottom: 1px solid rgb(234, 236, 238);
} }
.viewpoint-title { .viewpoint-title {
font-size: 16px; font-size: 16px;
font-weight: 700; font-weight: 700;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
line-height: 24px; line-height: 24px;
} }
.viewpoint-body { .viewpoint-body {
padding: 16px; padding: 16px;
height: 77vh; height: 77vh;
......
...@@ -822,14 +822,20 @@ const handleToPosi = id => { ...@@ -822,14 +822,20 @@ const handleToPosi = id => {
// 跳转到单项制裁页面 // 跳转到单项制裁页面
const handleToRiskSignalDetail = item => { const handleToRiskSignalDetail = item => {
window.sessionStorage.setItem("curTabName", item.title); window.sessionStorage.setItem("curTabName", item.title);
const routeData = router.resolve({ // const routeData = router.resolve({
// path: "/exportControl/singleSanction",
// query: {
// id: item.sanId
// }
// });
// // 打开新页面
// window.open(routeData.href, "_blank");
router.push({
path: "/exportControl/singleSanction", path: "/exportControl/singleSanction",
query: { query: {
id: item.sanId id: item.sanId
} }
}); })
// 打开新页面
window.open(routeData.href, "_blank");
}; };
const sanctionList = ref([]); const sanctionList = ref([]);
...@@ -885,14 +891,21 @@ const checkedTime = ref(["全部时间"]); ...@@ -885,14 +891,21 @@ const checkedTime = ref(["全部时间"]);
// 跳转到单条制裁页面,单独打开一个新页面 // 跳转到单条制裁页面,单独打开一个新页面
const handleTitleClick = item => { const handleTitleClick = item => {
window.sessionStorage.setItem("curTabName", `${item.year}-${item.dateStr}${item.title}》`); window.sessionStorage.setItem("curTabName", `${item.year}-${item.dateStr}${item.title}》`);
const route = router.resolve({ // const route = router.resolve({
// path: "/exportControl/singleSanction",
// query: {
// id: item.id,
// sanTypeId: item.sanTypeId
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/exportControl/singleSanction", path: "/exportControl/singleSanction",
query: { query: {
id: item.id, id: item.id,
sanTypeId: item.sanTypeId sanTypeId: item.sanTypeId
} }
}); })
window.open(route.href, "_blank");
}; };
const handleCompClick = item => { const handleCompClick = item => {
...@@ -1034,13 +1047,19 @@ onMounted(async () => { ...@@ -1034,13 +1047,19 @@ onMounted(async () => {
}); });
// 查看社交媒体详情 // 查看社交媒体详情
const handleToSocialDetail = item => { const handleToSocialDetail = item => {
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// personId: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
personId: item.id personId: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
// 获取趋势图数据 // 获取趋势图数据
const fetchTrendData = async () => { const fetchTrendData = async () => {
...@@ -1156,37 +1175,55 @@ const handleToEntityList = item => { ...@@ -1156,37 +1175,55 @@ const handleToEntityList = item => {
"curTabName", "curTabName",
entitiesDataInfoList.value[currentCarouselIndex.value].postDate + " 《实体清单新增条目》" entitiesDataInfoList.value[currentCarouselIndex.value].postDate + " 《实体清单新增条目》"
); );
const routeData = router.resolve({ // const routeData = router.resolve({
// path: "/exportControl/singleSanction",
// query: {
// id: id
// }
// });
// // 打开一个新页面
// window.open(routeData.href, "_blank");
router.push({
path: "/exportControl/singleSanction", path: "/exportControl/singleSanction",
query: { query: {
id: id id: id
} }
}); })
// 打开一个新页面
window.open(routeData.href, "_blank");
}; };
// 跳转到V2.0实体清单无ID // 跳转到V2.0实体清单无ID
const handleToEntityListNoId = item => { const handleToEntityListNoId = item => {
console.log("这是什么数据 =>", item); console.log("这是什么数据 =>", item);
if (item.nameZh == "实体清单") { if (item.nameZh == "实体清单") {
const routeData = router.resolve({ // const routeData = router.resolve({
// path: "/exportControl/entityList",
// query: {
// sanTypeId: item.id
// }
// });
// // 打开一个新页面
// window.open(routeData.href, "_blank");
router.push({
path: "/exportControl/entityList", path: "/exportControl/entityList",
query: { query: {
sanTypeId: item.id sanTypeId: item.id
} }
}); })
// 打开一个新页面
window.open(routeData.href, "_blank");
} else if (item.nameZh == "商业管制清单") { } else if (item.nameZh == "商业管制清单") {
const routeData = router.resolve({ // const routeData = router.resolve({
// path: "/exportControl/commercialControlList",
// query: {
// sanTypeId: item.id
// }
// });
// // 打开一个新页面
// window.open(routeData.href, "_blank");
router.push({
path: "/exportControl/commercialControlList", path: "/exportControl/commercialControlList",
query: { query: {
sanTypeId: item.id sanTypeId: item.id
} }
}); })
// 打开一个新页面
window.open(routeData.href, "_blank");
} else { } else {
return; return;
} }
...@@ -1660,14 +1697,21 @@ const fetchNewsInfo = async () => { ...@@ -1660,14 +1697,21 @@ const fetchNewsInfo = async () => {
const handlePerClick = item => { const handlePerClick = item => {
// console.log("点击了社交媒体消息:", item); // console.log("点击了社交媒体消息:", item);
window.sessionStorage.setItem("curTabName", item.name); window.sessionStorage.setItem("curTabName", item.name);
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// type: item.type || [1, 2, 3][Math.floor(Math.random() * 3)],
// personId: item.personId
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
type: item.personType || [1, 2, 3][Math.floor(Math.random() * 3)], type: item.personType || [1, 2, 3][Math.floor(Math.random() * 3)],
personId: item.personId personId: item.personId
} }
}); })
window.open(route.href, "_blank");
}; };
// 处理点击社交媒体消息的方法 // 处理点击社交媒体消息的方法
// const handleInfoClick = item => { // const handleInfoClick = item => {
...@@ -1749,26 +1793,35 @@ const chart1Data = ref({ ...@@ -1749,26 +1793,35 @@ const chart1Data = ref({
const handleSanc = item => { const handleSanc = item => {
console.log(item); console.log(item);
window.sessionStorage.setItem("curTabName", `${item.postDate}${item.title}》`); window.sessionStorage.setItem("curTabName", `${item.postDate}${item.title}》`);
const route = router.resolve({ // const route = router.resolve({
// path: "/exportControl/singleSanction",
// query: {
// id: item.id,
// sanTypeId: activeResourceTabItem.value.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/exportControl/singleSanction", path: "/exportControl/singleSanction",
query: { query: {
id: item.id, id: item.id,
sanTypeId: activeResourceTabItem.value.id sanTypeId: activeResourceTabItem.value.id
} }
}); })
window.open(route.href, "_blank");
}; };
// 查看更多风险信号 // 查看更多风险信号
const handleToMoreRiskSignal = () => { const handleToMoreRiskSignal = () => {
const route = router.resolve("/viewRiskSignal"); // const route = router.resolve("/viewRiskSignal");
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
router.push("/viewRiskSignal")
}; };
// 查看更多新闻资讯 // 查看更多新闻资讯
const handleToMoreNews = () => { const handleToMoreNews = () => {
const route = router.resolve("/newsBrief"); // const route = router.resolve("/newsBrief");
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
router.push("/newsBrief")
}; };
const handleNewsInfoClick = item => { const handleNewsInfoClick = item => {
...@@ -1795,14 +1848,21 @@ const handleSwithCurPolicy = name => { ...@@ -1795,14 +1848,21 @@ const handleSwithCurPolicy = name => {
const handleSearch = () => { const handleSearch = () => {
window.sessionStorage.setItem("curTabName", `搜索-${searchExportControlText.value}`); window.sessionStorage.setItem("curTabName", `搜索-${searchExportControlText.value}`);
const curRoute = router.resolve({ // const curRoute = router.resolve({
// path: "/searchResults",
// query: {
// searchText: searchExportControlText.value,
// areaName: "实体清单"
// }
// });
// window.open(curRoute.href, "_blank");
router.push({
path: "/searchResults", path: "/searchResults",
query: { query: {
searchText: searchExportControlText.value, searchText: searchExportControlText.value,
areaName: "实体清单" areaName: "实体清单"
} }
}); })
window.open(curRoute.href, "_blank");
}; };
onMounted(async () => { onMounted(async () => {
......
...@@ -25,12 +25,8 @@ ...@@ -25,12 +25,8 @@
<div class="left-center"> <div class="left-center">
<AnalysisBox title="出口管制分类编码(ECCN)" :showAllBtn="false"> <AnalysisBox title="出口管制分类编码(ECCN)" :showAllBtn="false">
<div class="button-list"> <div class="button-list">
<div <div :class="['button', { click: item.isClick }]" @click="changeECCN(item)" v-for="(item, i) in ECCNList"
:class="['button', { click: item.isClick }]" :key="i">
@click="changeECCN(item)"
v-for="(item, i) in ECCNList"
:key="i"
>
<span>{{ item.ranking }}{{ item.name }}</span> <span>{{ item.ranking }}{{ item.name }}</span>
</div> </div>
</div> </div>
...@@ -48,17 +44,9 @@ ...@@ -48,17 +44,9 @@
<AnalysisBox title="商业管制清单更新历史" :showAllBtn="false"> <AnalysisBox title="商业管制清单更新历史" :showAllBtn="false">
<template #header-btn> <template #header-btn>
<div class="filters"> <div class="filters">
<el-select <el-select v-model="selectedDomain" placeholder="Select"
v-model="selectedDomain" style="width: 150px; height: 32px; margin-right: 16px">
placeholder="Select" <el-option v-for="item in domainOptions" :key="item.value" :label="item.label" :value="item.value" />
style="width: 150px; height: 32px; margin-right: 16px"
>
<el-option
v-for="item in domainOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
<!-- <el-checkbox v-model="onlyChina">只看涉华动态</el-checkbox> --> <!-- <el-checkbox v-model="onlyChina">只看涉华动态</el-checkbox> -->
</div> </div>
...@@ -71,21 +59,15 @@ ...@@ -71,21 +59,15 @@
</div> </div>
<div class="img-zone"> <div class="img-zone">
<img :src="item.icon || title" alt /> <img :src="item.icon || title" alt />
<div <div v-if="i < sanctionList.length - 1"
v-if="i < sanctionList.length - 1" :class="['img-line', { 'img-line-last': i === sanctionList.length - 1 }]">
:class="['img-line', { 'img-line-last': i === sanctionList.length - 1 }]" </div>
></div>
</div> </div>
<div class="main"> <div class="main">
<div class="main-title">{{ item.name }}</div> <div class="main-title">{{ item.name }}</div>
<!-- <div class="main-title" @click="handleClick(item)">{{ item.name }}</div> --> <!-- <div class="main-title" @click="handleClick(item)">{{ item.name }}</div> -->
<el-tooltip <el-tooltip effect="dark" :content="item.summary" popper-class="common-prompt-popper" placement="top"
effect="dark" :show-after="500">
:content="item.summary"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<div class="main-desc">{{ item.summary }}</div> <div class="main-desc">{{ item.summary }}</div>
</el-tooltip> </el-tooltip>
<div class="tag-box"> <div class="tag-box">
...@@ -100,14 +82,8 @@ ...@@ -100,14 +82,8 @@
</div> </div>
<div class="left-footer"> <div class="left-footer">
<div class="total-count">共 {{ totalAll }} 项</div> <div class="total-count">共 {{ totalAll }} 项</div>
<el-pagination <el-pagination v-model:current-page="currentPageAll" :page-size="pageSizeAll" :total="totalAll"
v-model:current-page="currentPageAll" layout="prev, pager, next" background @current-change="handlePageChangeAll" />
:page-size="pageSizeAll"
:total="totalAll"
layout="prev, pager, next"
background
@current-change="handlePageChangeAll"
/>
</div> </div>
</AnalysisBox> </AnalysisBox>
</div> </div>
...@@ -135,31 +111,17 @@ ...@@ -135,31 +111,17 @@
<span>关键人物</span> <span>关键人物</span>
</div> </div>
<div class="key-person-list"> <div class="key-person-list">
<div <div class="person-item" v-for="(item, index) in publishInfo.personList" :key="index"
class="person-item" @click="handlePerClick(item)">
v-for="(item, index) in publishInfo.personList"
:key="index"
@click="handlePerClick(item)"
>
<img :src="item.imageUrl" alt /> <img :src="item.imageUrl" alt />
<div class="person-info"> <div class="person-info">
<el-tooltip <el-tooltip effect="dark" :content="item.name" popper-class="common-prompt-popper" placement="top"
effect="dark" :show-after="500">
:content="item.name"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
</el-tooltip> </el-tooltip>
<el-tooltip <el-tooltip effect="dark" :content="item.position" popper-class="common-prompt-popper" placement="top"
effect="dark" :show-after="500">
:content="item.position"
popper-class="common-prompt-popper"
placement="top"
:show-after="500"
>
<div class="title1">{{ item.position }}</div> <div class="title1">{{ item.position }}</div>
</el-tooltip> </el-tooltip>
</div> </div>
...@@ -220,38 +182,58 @@ const route = useRoute(); ...@@ -220,38 +182,58 @@ const route = useRoute();
// 处理点击发布机构的方法 // 处理点击发布机构的方法
const handleClickOrg = item => { const handleClickOrg = item => {
// console.log("点击了发布机构:", item); // console.log("点击了发布机构:", item);
const route = router.resolve({ // const route = router.resolve({
// path: "/institution",
// query: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/institution", path: "/institution",
query: { query: {
id: item.id id: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
// 处理点击关键人物的方法 // 处理点击关键人物的方法
const handlePerClick = item => { const handlePerClick = item => {
console.log("点击了关键人物:", item); console.log("点击了关键人物:", item);
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// type: item.type,
// personId: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
type: item.type, type: item.type,
personId: item.id personId: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
// 处理点击实体名称的方法 // 处理点击实体名称的方法
const handleClick = item => { const handleClick = item => {
// console.log("点击了实体名称:", item); // console.log("点击了实体名称:", item);
const route = router.resolve({ // const route = router.resolve({
// path: "/exportControl/singleSanction",
// query: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/exportControl/singleSanction", path: "/exportControl/singleSanction",
query: { query: {
id: item.id id: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
const selectedDomain = ref(0); const selectedDomain = ref(0);
......
...@@ -212,39 +212,58 @@ const route = useRoute(); ...@@ -212,39 +212,58 @@ const route = useRoute();
// 处理点击发布机构的方法 // 处理点击发布机构的方法
const handleClickOrg = item => { const handleClickOrg = item => {
// console.log("点击了发布机构:", item); // console.log("点击了发布机构:", item);
const route = router.resolve({ // const route = router.resolve({
// path: "/institution",
// query: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/institution", path: "/institution",
query: { query: {
id: item.id id: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
// 处理点击关键人物的方法 // 处理点击关键人物的方法
const handlePerClick = item => { const handlePerClick = item => {
console.log("点击了关键人物:", item); console.log("点击了关键人物:", item);
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// type: item.type,
// personId: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
type: item.type, type: item.type,
personId: item.id personId: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
// 处理点击实体名称的方法 // 处理点击实体名称的方法
const handleClick = item => { const handleClick = item => {
// console.log("点击了实体名称:", item); // console.log("点击了实体名称:", item);
window.sessionStorage.setItem("curTabName", `${item.year}-${item.date}《${item.name}》`); window.sessionStorage.setItem("curTabName", `${item.year}-${item.date}《${item.name}》`);
const route = router.resolve({ // const route = router.resolve({
// path: "/exportControl/singleSanction",
// query: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/exportControl/singleSanction", path: "/exportControl/singleSanction",
query: { query: {
id: item.id id: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
const selectedDomain = ref(0); const selectedDomain = ref(0);
......
...@@ -49,13 +49,10 @@ ...@@ -49,13 +49,10 @@
<img :src="item.imageUrl || flag" alt="" class="flag" /> <img :src="item.imageUrl || flag" alt="" class="flag" />
<div class="country-name">{{ item.name }}</div> <div class="country-name">{{ item.name }}</div>
<div class="progress-bar-container"> <div class="progress-bar-container">
<div <div class="progress-bar" :style="{
class="progress-bar"
:style="{
width: item.width, width: item.width,
background: item.gradient background: item.gradient
}" }"></div>
></div>
</div> </div>
<div class="count" :class="{ highlight: index === 0 }">{{ item.count }}</div> <div class="count" :class="{ highlight: index === 0 }">{{ item.count }}</div>
</div> </div>
...@@ -98,25 +95,13 @@ ...@@ -98,25 +95,13 @@
</div> </div>
<div class="filter-right"> <div class="filter-right">
<el-checkbox v-model="onlyChina" label="只看中国实体" /> <el-checkbox v-model="onlyChina" label="只看中国实体" />
<el-select <el-select v-model="filterField" placeholder="全部领域" style="width: 150px; margin: 0 12px 0 16px">
v-model="filterField"
placeholder="全部领域"
style="width: 150px; margin: 0 12px 0 16px"
>
<el-option label="全部领域" value="" /> <el-option label="全部领域" value="" />
<el-option <el-option v-for="item in domainOptions" :key="item.value" :label="item.label" :value="item.value" />
v-for="item in domainOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
<el-input <el-input v-model="searchKeyword" placeholder="搜索实体"
v-model="searchKeyword"
placeholder="搜索实体"
style="width: 150px; border: 1px solid rgba(170, 173, 177, 0.4); border-radius: 5px" style="width: 150px; border: 1px solid rgba(170, 173, 177, 0.4); border-radius: 5px"
:suffix-icon="Search" :suffix-icon="Search" />
/>
</div> </div>
</div> </div>
<div class="stats-row"> <div class="stats-row">
...@@ -131,21 +116,14 @@ ...@@ -131,21 +116,14 @@
<div class="stats-info"> <div class="stats-info">
<div class="stat-item"> <div class="stat-item">
<span class="dot red"></span> <span class="dot red"></span>
<span class="text" <span class="text">新增 <span class="num red">{{ addCount }}</span> 家 (50%规则涉及<span class="num red">{{
>新增 <span class="num red">{{ addCount }}</span> 家 (50%规则涉及<span class="num red">{{
addRuleCount addRuleCount
}}</span }}</span>家)</span>
>家)</span
>
</div> </div>
<div class="stat-item"> <div class="stat-item">
<span class="dot green"></span> <span class="dot green"></span>
<span class="text" <span class="text">移除 <span class="num green">{{ removeCount }}</span> 家 (50%规则涉及<span
>移除 <span class="num green">{{ removeCount }}</span> 家 (50%规则涉及<span class="num green">{{ removeRuleCount }}</span>家)</span>
class="num green"
>{{ removeRuleCount }}</span
>家)</span
>
</div> </div>
</div> </div>
</div> </div>
...@@ -168,14 +146,8 @@ ...@@ -168,14 +146,8 @@
</el-table-column> </el-table-column>
<el-table-column label="涉及领域" width="180" align="center"> <el-table-column label="涉及领域" width="180" align="center">
<template #default="scope"> <template #default="scope">
<span <span v-for="(item, index) in scope.row.fields" :key="index" class="tag"
v-for="(item, index) in scope.row.fields" :style="getTagStyle(item)" style="margin: 0 2px">{{ item }}</span>
:key="index"
class="tag"
:style="getTagStyle(item)"
style="margin: 0 2px"
>{{ item }}</span
>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="location" label="上市地点" width="90" align="center" /> <el-table-column prop="location" label="上市地点" width="90" align="center" />
...@@ -183,11 +155,8 @@ ...@@ -183,11 +155,8 @@
<el-table-column prop="revenue" label="营收(亿元)" width="110" align="center" /> <el-table-column prop="revenue" label="营收(亿元)" width="110" align="center" />
<el-table-column label="50%规则子企业" width="180" align="center"> <el-table-column label="50%规则子企业" width="180" align="center">
<template #default="scope"> <template #default="scope">
<span <span v-if="scope.row.subsidiaryCount" class="subsidiary-link"
v-if="scope.row.subsidiaryCount" @click="handleSubsidiaryClick(scope.row)">
class="subsidiary-link"
@click="handleSubsidiaryClick(scope.row)"
>
{{ scope.row.subsidiaryText }} {{ scope.row.subsidiaryText }}
<span class="blue-text">{{ scope.row.subsidiaryCount }}家 ></span> <span class="blue-text">{{ scope.row.subsidiaryCount }}家 ></span>
</span> </span>
...@@ -205,12 +174,8 @@ ...@@ -205,12 +174,8 @@
</div> </div>
</div> </div>
<!-- 50%规则子企业弹框 --> <!-- 50%规则子企业弹框 -->
<RuleSubsidiaryDialog <RuleSubsidiaryDialog v-model="subsidiaryDialogVisible" :company-name="currentSubsidiaryCompanyName"
v-model="subsidiaryDialogVisible" :total-count="currentSubsidiaryCount" :data-list="currentSubsidiaryList" />
:company-name="currentSubsidiaryCompanyName"
:total-count="currentSubsidiaryCount"
:data-list="currentSubsidiaryList"
/>
</div> </div>
</template> </template>
...@@ -252,13 +217,19 @@ const handleCompClick = item => { ...@@ -252,13 +217,19 @@ const handleCompClick = item => {
const handleClickDp = () => { const handleClickDp = () => {
// console.log("点击了发布机构:", props.data); // console.log("点击了发布机构:", props.data);
window.sessionStorage.setItem("curTabName", props.data.postOrgName); window.sessionStorage.setItem("curTabName", props.data.postOrgName);
const route = router.resolve({ // const route = router.resolve({
// path: "/institution",
// query: {
// id: props.data.postOrgId
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/institution", path: "/institution",
query: { query: {
id: props.data.postOrgId id: props.data.postOrgId
} }
}); })
window.open(route.href, "_blank");
}; };
// 50%规则子企业弹框逻辑 // 50%规则子企业弹框逻辑
...@@ -420,14 +391,22 @@ const props = defineProps({ ...@@ -420,14 +391,22 @@ const props = defineProps({
// 跳转到人物页 // 跳转到人物页
const handleClick = () => { const handleClick = () => {
window.sessionStorage.setItem("curTabName", props.data.postPersonName); window.sessionStorage.setItem("curTabName", props.data.postPersonName);
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// // type: props.data.type,
// personId: props.data.postPersonId
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
// type: props.data.type, // type: props.data.type,
personId: props.data.postPersonId personId: props.data.postPersonId
} }
}); })
window.open(route.href, "_blank");
}; };
// 计算属性处理数据 // 计算属性处理数据
......
...@@ -29,8 +29,8 @@ ...@@ -29,8 +29,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed } from 'vue' import { ref, computed } from 'vue'
import LeftBtn from '@/components/base/pageBtn/leftBtn.vue' import LeftBtn from '@/components/base/pageBtn/LeftBtn.vue'
import RightBtn from '@/components/base/pageBtn/rightBtn.vue' import RightBtn from '@/components/base/pageBtn/RightBtn.vue'
interface CaseItem { interface CaseItem {
date: string date: string
......
...@@ -44,8 +44,8 @@ ...@@ -44,8 +44,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, computed, onMounted, watch } from 'vue' import { ref, computed, onMounted, watch } from 'vue'
import AnalysisBox from '@/components/base/boxBackground/analysisBox.vue' import AnalysisBox from '@/components/base/boxBackground/analysisBox.vue'
import LeftBtn from '@/components/base/pageBtn/leftBtn.vue' import LeftBtn from '@/components/base/pageBtn/LeftBtn.vue'
import RightBtn from '@/components/base/pageBtn/rightBtn.vue' import RightBtn from '@/components/base/pageBtn/RightBtn.vue'
import AreaTag from '@/components/base/AreaTag/index.vue' import AreaTag from '@/components/base/AreaTag/index.vue'
import { getLabList, getPolicyList } from '@/api/innovationSubject/overview.js' import { getLabList, getPolicyList } from '@/api/innovationSubject/overview.js'
......
...@@ -330,7 +330,7 @@ ...@@ -330,7 +330,7 @@
<div class="right-main"> <div class="right-main">
<el-empty v-if="surveyInfoList.length === 0" description="当前条件下暂无数据" :image-size="200" /> <el-empty v-if="surveyInfoList.length === 0" description="当前条件下暂无数据" :image-size="200" />
<div v-else class="right-main-item" v-for="(item, index) in surveyInfoList" :key="index" <div v-else class="right-main-item" v-for="(item, index) in surveyInfoList" :key="index"
@click="handleClickToSurveyDetail(item.sortcode)"> @click="handleClickCardToDetail(item.sortcode, item.sortName)">
<div class="item-left"> <div class="item-left">
<div class="item-left-item"> {{ formatDate(item.searchdate, 'year') }}</div> <div class="item-left-item"> {{ formatDate(item.searchdate, 'year') }}</div>
<div class="item-left-item"> {{ formatDate(item.searchdate, 'date') }}</div> <div class="item-left-item"> {{ formatDate(item.searchdate, 'date') }}</div>
...@@ -392,8 +392,8 @@ ...@@ -392,8 +392,8 @@
<script setup> <script setup>
import { onMounted, ref, nextTick } from "vue"; import { onMounted, ref, nextTick } from "vue";
import LeftBtn from "@/components/base/pageBtn/leftBtn.vue"; import LeftBtn from "@/components/base/pageBtn/LeftBtn.vue";
import RightBtn from "@/components/base/pageBtn/rightBtn.vue"; import RightBtn from "@/components/base/pageBtn/RightBtn.vue";
import RiskSignal from "@/components/base/riskSignal/index.vue"; import RiskSignal from "@/components/base/riskSignal/index.vue";
import TipTab from "@/components/base/TipTab/index.vue" import TipTab from "@/components/base/TipTab/index.vue"
import MessageBubble from "@/components/base/messageBubble/index.vue" import MessageBubble from "@/components/base/messageBubble/index.vue"
...@@ -495,23 +495,11 @@ const handleClickToDetail = () => { ...@@ -495,23 +495,11 @@ const handleClickToDetail = () => {
activeIndex = carouselRef.value.activeIndex; activeIndex = carouselRef.value.activeIndex;
} }
console.log("当前 Carousel 激活索引:", activeIndex);
const id = box1DataList.value[activeIndex].SEARCHSORT; const id = box1DataList.value[activeIndex].SEARCHSORT;
window.sessionStorage.setItem("curTabName", id + "调查概览"); handleClickCardToDetail(id, id + "调查概览")
const route = router.resolve({
path: "/marketAccessLayout",
query: {
id: id
}
});
window.open(route.href, "_blank");
}; };
const handleClickCardToDetail = (id, name) => { const handleClickCardToDetail = (id, name) => {
// console.log('id',id);
window.sessionStorage.setItem("curTabName", name); window.sessionStorage.setItem("curTabName", name);
const route = router.resolve({ const route = router.resolve({
path: "/marketAccessLayout", path: "/marketAccessLayout",
...@@ -1319,16 +1307,6 @@ const handleGetSurveyList = async () => { ...@@ -1319,16 +1307,6 @@ const handleGetSurveyList = async () => {
} catch (error) { } } catch (error) { }
}; };
const handleClickToSurveyDetail = id => {
const route = router.resolve({
path: "/marketAccessLayout",
query: {
id: id
}
});
window.open(route.href, "_blank");
};
// 查看更多风险信号 // 查看更多风险信号
const handleToMoreRiskSignal = () => { const handleToMoreRiskSignal = () => {
const route = router.resolve("/viewRiskSignal"); const route = router.resolve("/viewRiskSignal");
......
...@@ -916,13 +916,19 @@ const handleCurrentChange = page => { ...@@ -916,13 +916,19 @@ const handleCurrentChange = page => {
const handleToReportDetail = (item) => { const handleToReportDetail = (item) => {
if (!item?.id) return; if (!item?.id) return;
window.sessionStorage.setItem("curTabName", item.name); window.sessionStorage.setItem("curTabName", item.name);
const route = router.resolve({ // const route = router.resolve({
// name: "ReportDetail",
// params: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
name: "ReportDetail", name: "ReportDetail",
params: { params: {
id: item.id id: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
//获取行业领域字典 //获取行业领域字典
// getHylyList // getHylyList
......
...@@ -14,11 +14,7 @@ ...@@ -14,11 +14,7 @@
<div class="tag">{{ value.industryName }}</div> <div class="tag">{{ value.industryName }}</div>
</div> --> </div> -->
<AreaTag <AreaTag v-for="(value, index) in thinkInfo.tags" :key="index" :tagName="value.industryName"></AreaTag>
v-for="(value, index) in thinkInfo.tags"
:key="index"
:tagName="value.industryName"
></AreaTag>
</div> </div>
</div> </div>
</div> </div>
...@@ -129,15 +125,20 @@ const handleGetThinkTankReport = async () => { ...@@ -129,15 +125,20 @@ const handleGetThinkTankReport = async () => {
}; };
const toReport = () => { const toReport = () => {
console.log(reportUrl.value, "reportUrl.valuereportUrl.value"); console.log(reportUrl.value, "reportUrl.valuereportUrl.value");
const route = router.resolve({ // const route = router.resolve({
// name: "ReportOriginal",
// params: {
// id: router.currentRoute._value.params.id
// }
// });
// console.log("route.href", route.href);
// window.open(route.href, "_blank");
router.push({
name: "ReportOriginal", name: "ReportOriginal",
params: { params: {
id: router.currentRoute._value.params.id id: router.currentRoute._value.params.id
} }
}); })
console.log("route.href", route.href);
window.open(route.href, "_blank");
}; };
const tabActiveName = ref("报告分析"); const tabActiveName = ref("报告分析");
...@@ -213,7 +214,7 @@ const handleDownloadDocument = async () => { ...@@ -213,7 +214,7 @@ const handleDownloadDocument = async () => {
try { try {
const { ElMessage } = await import("element-plus"); const { ElMessage } = await import("element-plus");
ElMessage.error("PDF 下载失败,请稍后重试"); ElMessage.error("PDF 下载失败,请稍后重试");
} catch (_) {} } catch (_) { }
} }
}; };
</script> </script>
......
...@@ -201,13 +201,19 @@ const scrollToWrapTop = () => { ...@@ -201,13 +201,19 @@ const scrollToWrapTop = () => {
const toReport = () => { const toReport = () => {
const route = router.resolve({ // const route = router.resolve({
// name: "ReportOriginal",
// params: {
// id: router.currentRoute._value.params.id
// }
// });
// window.open(route.href, "_blank");
router.push({
name: "ReportOriginal", name: "ReportOriginal",
params: { params: {
id: router.currentRoute._value.params.id id: router.currentRoute._value.params.id
} }
}); })
window.open(route.href, "_blank");
}; };
// 当前页展示的数据 // 当前页展示的数据
const filteredOpinions = computed(() => box1Data.value); const filteredOpinions = computed(() => box1Data.value);
...@@ -224,11 +230,15 @@ const handleBillMoreClick = (bill) => { ...@@ -224,11 +230,15 @@ const handleBillMoreClick = (bill) => {
if (!billId) { if (!billId) {
return; return;
} }
const route = router.resolve({ // const route = router.resolve({
// path: "/billLayout/bill/introduction",
// query: { billId: String(billId) }
// });
// window.open(route.href, "_blank");
router.push({
path: "/billLayout/bill/introduction", path: "/billLayout/bill/introduction",
query: { billId: String(billId) } query: { billId: String(billId) }
}); })
window.open(route.href, "_blank");
}; };
/** 政策建议关联法案:新标签页打开政令介绍页*/ /** 政策建议关联法案:新标签页打开政令介绍页*/
const handleAdministrativeMoreClick = (ad) => { const handleAdministrativeMoreClick = (ad) => {
...@@ -236,11 +246,15 @@ const handleAdministrativeMoreClick = (ad) => { ...@@ -236,11 +246,15 @@ const handleAdministrativeMoreClick = (ad) => {
if (!id) { if (!id) {
return; return;
} }
const route = router.resolve({ // const route = router.resolve({
// path: "/decreeLayout/overview/introduction",
// query: { id: String(id) }
// });
// window.open(route.href, "_blank");
router.push({
path: "/decreeLayout/overview/introduction", path: "/decreeLayout/overview/introduction",
query: { id: String(id) } query: { id: String(id) }
}); })
window.open(route.href, "_blank");
}; };
const handleSearchOpinions = () => { const handleSearchOpinions = () => {
// 搜索时默认切回“全部”标签 // 搜索时默认切回“全部”标签
......
...@@ -73,13 +73,8 @@ ...@@ -73,13 +73,8 @@
<template v-else> <template v-else>
<div class="box5Chart"> <div class="box5Chart">
<!-- 有数据后再挂载子组件:子组件仅在 onMounted 初始化,异步数据到达后需 v-if + key 强制重新挂载 --> <!-- 有数据后再挂载子组件:子组件仅在 onMounted 初始化,异步数据到达后需 v-if + key 强制重新挂载 -->
<WordCloudChart <WordCloudChart v-if="box5Data.length" :key="box5WordCloudKey" :data="box5Data" width="432px"
v-if="box5Data.length" height="272px" />
:key="box5WordCloudKey"
:data="box5Data"
width="432px"
height="272px"
/>
</div> </div>
<div class="box5-footer"> <div class="box5-footer">
<TipTab :text="REPORT_ANALYSIS_TIP_BOX5" /> <TipTab :text="REPORT_ANALYSIS_TIP_BOX5" />
...@@ -244,11 +239,15 @@ import TipTab from "@/views/thinkTank/TipTab/index.vue"; ...@@ -244,11 +239,15 @@ import TipTab from "@/views/thinkTank/TipTab/index.vue";
const router = useRouter(); const router = useRouter();
const goToAllThinkTank = () => { const goToAllThinkTank = () => {
const thinkTankId = props?.thinkInfo?.thinkTankId || props?.thinkInfo?.id; const thinkTankId = props?.thinkInfo?.thinkTankId || props?.thinkInfo?.id;
const route = router.resolve({ // const route = router.resolve({
// name: "MultiThinkTankViewAnalysis",
// params: { id: thinkTankId }
// });
// window.open(route.href, "_blank");
router.push({
name: "MultiThinkTankViewAnalysis", name: "MultiThinkTankViewAnalysis",
params: { id: thinkTankId } params: { id: thinkTankId }
}); })
window.open(route.href, "_blank");
}; };
...@@ -368,14 +367,19 @@ const handleClickReportAuthor = async (author) => { ...@@ -368,14 +367,19 @@ const handleClickReportAuthor = async (author) => {
const res = await getPersonSummaryInfo(params); const res = await getPersonSummaryInfo(params);
if (res.code !== 200 || !res.data) return; if (res.code !== 200 || !res.data) return;
window.sessionStorage.setItem("curTabName", author?.name || ""); window.sessionStorage.setItem("curTabName", author?.name || "");
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// personId
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
personId personId
} }
}); })
window.open(route.href, "_blank");
}; };
const riskSignal = computed(() => { const riskSignal = computed(() => {
const info = props.thinkInfo || {}; const info = props.thinkInfo || {};
...@@ -523,7 +527,20 @@ const majorOpinions = ref([ ...@@ -523,7 +527,20 @@ const majorOpinions = ref([
]); ]);
//处理点击详情页事件 //处理点击详情页事件
const handleOpenReportOriginal = item => { const handleOpenReportOriginal = item => {
const route = router.resolve({ // const route = router.resolve({
// name: "ReportOriginal",
// params: {
// id: router.currentRoute._value.params.id
// },
// query: {
// currentPage: currentPage.value,
// pageSize: pageSize.value,
// opinionId: item?.id ?? "",
// opinionContent: item?.content ?? ""
// }
// });
// window.open(route.href, "_blank");
router.push({
name: "ReportOriginal", name: "ReportOriginal",
params: { params: {
id: router.currentRoute._value.params.id id: router.currentRoute._value.params.id
...@@ -534,8 +551,7 @@ const handleOpenReportOriginal = item => { ...@@ -534,8 +551,7 @@ const handleOpenReportOriginal = item => {
opinionId: item?.id ?? "", opinionId: item?.id ?? "",
opinionContent: item?.content ?? "" opinionContent: item?.content ?? ""
} }
}); })
window.open(route.href, "_blank");
}; };
const tabActiveName = ref("报告分析"); const tabActiveName = ref("报告分析");
......
...@@ -504,11 +504,15 @@ const handleBillMoreClick = (bill) => { ...@@ -504,11 +504,15 @@ const handleBillMoreClick = (bill) => {
if (!billId) { if (!billId) {
return; return;
} }
const route = router.resolve({ // const route = router.resolve({
// path: "/billLayout/bill/introduction",
// query: { billId: String(billId) }
// });
// window.open(route.href, "_blank");
router.push({
path: "/billLayout/bill/introduction", path: "/billLayout/bill/introduction",
query: { billId: String(billId) } query: { billId: String(billId) }
}); })
window.open(route.href, "_blank");
}; };
/** 政策建议关联法案:新标签页打开政令介绍页*/ /** 政策建议关联法案:新标签页打开政令介绍页*/
const handleAdministrativeMoreClick = (ad) => { const handleAdministrativeMoreClick = (ad) => {
...@@ -516,11 +520,15 @@ const handleAdministrativeMoreClick = (ad) => { ...@@ -516,11 +520,15 @@ const handleAdministrativeMoreClick = (ad) => {
if (!id) { if (!id) {
return; return;
} }
const route = router.resolve({ // const route = router.resolve({
// path: "/decreeLayout/overview/introduction",
// query: { id: String(id) }
// });
// window.open(route.href, "_blank");
router.push({
path: "/decreeLayout/overview/introduction", path: "/decreeLayout/overview/introduction",
query: { id: String(id) } query: { id: String(id) }
}); })
window.open(route.href, "_blank");
}; };
// 政策建议涉及部门分布(饼图) // 政策建议涉及部门分布(饼图)
const box2Data = ref([]); const box2Data = ref([]);
...@@ -1220,13 +1228,19 @@ function mapPolicyRowToView(row) { ...@@ -1220,13 +1228,19 @@ function mapPolicyRowToView(row) {
const toDetail = item => { const toDetail = item => {
window.sessionStorage.setItem("curTabName", item.contentZh ?? item.content ?? ""); window.sessionStorage.setItem("curTabName", item.contentZh ?? item.content ?? "");
const route = router.resolve({ // const route = router.resolve({
// name: "ReportOriginal",
// params: {
// id: item.reportId
// }
// });
// window.open(route.href, "_blank");
router.push({
name: "ReportOriginal", name: "ReportOriginal",
params: { params: {
id: item.reportId id: item.reportId
} }
}); })
window.open(route.href, "_blank");
}; };
const total = ref(0); const total = ref(0);
......
...@@ -111,13 +111,19 @@ const searchReport = ref('') ...@@ -111,13 +111,19 @@ const searchReport = ref('')
const handleToReportDetail = (item) => { const handleToReportDetail = (item) => {
window.sessionStorage.setItem('curTabName', item.name) window.sessionStorage.setItem('curTabName', item.name)
const route = router.resolve({ // const route = router.resolve({
// name: 'ReportDetail',
// params: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
name: 'ReportDetail', name: 'ReportDetail',
params: { params: {
id: item.id id: item.id
} }
}); })
window.open(route.href, "_blank");
} }
const hearingData = ref([ const hearingData = ref([
// 军事类(10条) // 军事类(10条)
......
...@@ -726,14 +726,20 @@ const handleClickPerson = async item => { ...@@ -726,14 +726,20 @@ const handleClickPerson = async item => {
return !Number.isNaN(typeIdNum) && !Number.isNaN(personTypeNum) && typeIdNum === personTypeNum; return !Number.isNaN(typeIdNum) && !Number.isNaN(personTypeNum) && typeIdNum === personTypeNum;
}); });
console.log("arr", arr); console.log("arr", arr);
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// personId: item.personId
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
personId: item.personId personId: item.personId
} }
}); })
window.open(route.href, "_blank");
} else { } else {
ElMessage.warning("找不到当前人员的类型值!"); ElMessage.warning("找不到当前人员的类型值!");
......
...@@ -205,8 +205,9 @@ const handleClick = tank => { ...@@ -205,8 +205,9 @@ const handleClick = tank => {
ElMessage.warning("当前智库id为空,无法进入详情页"); ElMessage.warning("当前智库id为空,无法进入详情页");
return; return;
} }
const curRoute = router.resolve({ name: "ThinkTankDetail", params: { id: tank.id, name: tank.name } }); // const curRoute = router.resolve({ name: "ThinkTankDetail", params: { id: tank.id, name: tank.name } });
window.open(curRoute.href, "_blank"); // window.open(curRoute.href, "_blank");
router.push({ name: "ThinkTankDetail", params: { id: tank.id, name: tank.name } })
}; };
onMounted(async () => { onMounted(async () => {
handleGetThinkTankList(); handleGetThinkTankList();
......
...@@ -695,13 +695,19 @@ const handleClickToDetail = () => { ...@@ -695,13 +695,19 @@ const handleClickToDetail = () => {
const toDetaile = () => { const toDetaile = () => {
window.sessionStorage.setItem("curTabName", box1Data.value[box1DataIndex.value].reportName); window.sessionStorage.setItem("curTabName", box1Data.value[box1DataIndex.value].reportName);
const route = router.resolve({ // const route = router.resolve({
// name: "ReportDetail",
// params: {
// id: box1Data.value[box1DataIndex.value].reportId
// }
// });
// window.open(route.href, "_blank");
router.push({
name: "ReportDetail", name: "ReportDetail",
params: { params: {
id: box1Data.value[box1DataIndex.value].reportId id: box1Data.value[box1DataIndex.value].reportId
} }
}); })
window.open(route.href, "_blank");
}; };
// 切换当前智库 // 切换当前智库
...@@ -1664,13 +1670,19 @@ const handleGetHylyList = async () => { ...@@ -1664,13 +1670,19 @@ const handleGetHylyList = async () => {
}; };
// 查看社交媒体详情 // 查看社交媒体详情
const handleToSocialDetail = item => { const handleToSocialDetail = item => {
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// personId: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
personId: item.id personId: item.id
} }
}); })
window.open(route.href, "_blank");
}; };
const selectedAreaList = ref([RESOURCE_FILTER_ALL_AREA]); const selectedAreaList = ref([RESOURCE_FILTER_ALL_AREA]);
...@@ -1974,20 +1986,23 @@ const handleClick = tank => { ...@@ -1974,20 +1986,23 @@ const handleClick = tank => {
ElMessage.warning("当前智库id为空,无法进入详情页"); ElMessage.warning("当前智库id为空,无法进入详情页");
return; return;
} }
const curRoute = router.resolve({ name: "ThinkTankDetail", params: { id: tank.id, name: tank.name } }); // const curRoute = router.resolve({ name: "ThinkTankDetail", params: { id: tank.id, name: tank.name } });
window.open(curRoute.href, "_blank"); // window.open(curRoute.href, "_blank");
router.push({ name: "ThinkTankDetail", params: { id: tank.id, name: tank.name } })
}; };
// 查看更多风险信号 // 查看更多风险信号
const handleToMoreRiskSignal = () => { const handleToMoreRiskSignal = () => {
const route = router.resolve("/viewRiskSignal"); // const route = router.resolve("/viewRiskSignal");
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
router.push("/viewRiskSignal")
}; };
// 查看更多新闻资讯 // 查看更多新闻资讯
const handleToMoreNews = () => { const handleToMoreNews = () => {
const route = router.resolve("/newsBrief"); // const route = router.resolve("/newsBrief");
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
router.push("/newsBrief")
}; };
// 点击人物头像,跳转到人物主页 // 点击人物头像,跳转到人物主页
...@@ -2027,14 +2042,21 @@ const handleClickPerson = async item => { ...@@ -2027,14 +2042,21 @@ const handleClickPerson = async item => {
return; return;
} }
window.sessionStorage.setItem("curTabName", item.personName); window.sessionStorage.setItem("curTabName", item.personName);
const route = router.resolve({ // const route = router.resolve({
// path: "/characterPage",
// query: {
// type: type, // type=1为科技企业领袖,2为国会议员,3为智库研究人员
// personId: item.personId
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/characterPage", path: "/characterPage",
query: { query: {
type: type, // type=1为科技企业领袖,2为国会议员,3为智库研究人员 type: type, // type=1为科技企业领袖,2为国会议员,3为智库研究人员
personId: item.personId personId: item.personId
} }
}); })
window.open(route.href, "_blank");
} else { } else {
personTypeName = ""; personTypeName = "";
ElMessage.warning("找不到当前人员的类型值!"); ElMessage.warning("找不到当前人员的类型值!");
...@@ -2049,36 +2071,55 @@ const handleClickPerson = async item => { ...@@ -2049,36 +2071,55 @@ const handleClickPerson = async item => {
// 点击新闻条目,跳转到新闻分析页 // 点击新闻条目,跳转到新闻分析页
const handleToNewsAnalysis = news => { const handleToNewsAnalysis = news => {
const route = router.resolve({ // const route = router.resolve({
// path: "/newsAnalysis",
// query: {
// newsId: news.newsId
// }
// });
// window.open(route.href, "_blank");
router.push({
path: "/newsAnalysis", path: "/newsAnalysis",
query: { query: {
newsId: news.newsId newsId: news.newsId
} }
}); })
window.open(route.href, "_blank");
}; };
const handleToReportDetail = item => { const handleToReportDetail = item => {
window.sessionStorage.setItem("curTabName", item.name); window.sessionStorage.setItem("curTabName", item.name);
const route = router.resolve({ // const route = router.resolve({
// name: "ReportDetail",
// params: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
router.push({
name: "ReportDetail", name: "ReportDetail",
params: { params: {
id: item.id 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({
// path: "/searchResults",
// query: {
// searchText: searchThinktankText.value,
// areaName: "智库"
// }
// });
// window.open(curRoute.href, "_blank");
router.push({
path: "/searchResults", path: "/searchResults",
query: { query: {
searchText: searchThinktankText.value, searchText: searchThinktankText.value,
areaName: "智库" areaName: "智库"
} }
}); })
window.open(curRoute.href, "_blank");
}; };
onMounted(async () => { onMounted(async () => {
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
<script> <script>
import { ref, shallowRef, nextTick, watch } from 'vue'; import { ref, shallowRef, nextTick, watch } from 'vue';
import * as pdfjsLib from 'pdfjs-dist/legacy/build/pdf'; import * as pdfjsLib from 'pdfjs-dist/legacy/build/pdf';
import pdfWorkerUrl from 'pdfjs-dist/legacy/build/pdf.worker.min?url'; import PdfWorker from 'pdfjs-dist/legacy/build/pdf.worker.min?worker';
// 通过 Vite 的 ?url 产出静态资源地址,确保线上/线下都能正确加载 worker // 使用 Vite 的 ?worker 直接注入 Worker,避免线上 mjs MIME 类型问题
pdfjsLib.GlobalWorkerOptions.workerSrc = pdfWorkerUrl; pdfjsLib.GlobalWorkerOptions.workerPort = new PdfWorker();
export default { export default {
name: 'PdfViewer', name: 'PdfViewer',
props: { props: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论