提交 1654ede5 authored 作者: yanpeng's avatar yanpeng

merge -1

流水线 #651 已通过 于阶段
in 1 分 49 秒
......@@ -305,4 +305,12 @@ export function getNetProfit(params) {
url: `/api/organization/scale/netProfit`,
params
})
}
// 获取调查进展状态列表
export function getAllProgressStatus() {
return request({
method: 'GET',
url: `/api/marketsearchHome/getAllInvestProgressStatus`,
})
}
\ No newline at end of file
......@@ -62,7 +62,7 @@ import { ref, nextTick, watchEffect } from "vue";
import { useContainerScroll } from "@/hooks/useScrollShow";
import { useRouter } from "vue-router";
import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore";
import { goToSearch } from "@/utils/goToPage";
import goToPage from "@/utils/goToPage";
const store = useWrittingAsstaintStore();
const router = useRouter();
......@@ -129,9 +129,9 @@ const handleSearch = () => {
// window.open(curRoute.href, "_blank");
if (enableBillTypeSwitch) {
goToSearch(store.searchBillText, areaName, billSearchType.value)
goToPage.goToSearch(store.searchBillText, areaName, billSearchType.value)
} else {
goToSearch(store.searchBillText, areaName)
goToPage.goToSearch(store.searchBillText, areaName)
}
};
......
......@@ -265,12 +265,13 @@ const onHighlightedText = (text, nounList) => {
const key = `${searchInterval.start}-${searchInterval.end}`;
if (end === searchInterval.end && !pointAdded.has(key)) {
findWordMax.value++;
list.push({ point: true, class: "" });
list.push({ point: findWordMax.value, class: "" });
pointAdded.add(key);
break;
}
}
}
console.log('看看格式', list);
return list;
};
......
......@@ -53,8 +53,7 @@
</div>
</div>
</div>
<div class="menu-box" v-if="isShowMenu" @mouseenter="handleHoverMenu(true)"
@mouseleave="handleHoverMenu(false)">
<div class="menu-box" v-if="isShowMenu" @mouseenter="handleHoverMenu(true)" @mouseleave="handleHoverMenu(false)">
<div class="menu-content">
<div class="menu-item" v-for="(item, index) in menuList" :key="index" @click="handleToModule(item, 1)">
<div class="icon">
......@@ -64,8 +63,7 @@
</div>
</div>
</div>
<div class="tool-box" v-if="isShowTool" @mouseenter="handleHoverTool(true)"
@mouseleave="handleHoverTool(false)">
<div class="tool-box" v-if="isShowTool" @mouseenter="handleHoverTool(true)" @mouseleave="handleHoverTool(false)">
<div class="tool-content">
<div class="menu-item" v-for="(item, index) in toolList" :key="index" @click="handleToModule(item, 2)">
<div class="icon">
......@@ -104,6 +102,7 @@ import Tool1 from './tool1.svg'
import Tool2 from './tool2.svg'
import { ElMessage } from "element-plus";
import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore";
import goToPage from "@/utils/goToPage";
const store = useWrittingAsstaintStore();
let isShowSearchBar = computed(() => {
return store.isShowSearchBar;
......@@ -153,30 +152,30 @@ const handleGetSsoUserInfo = async () => {
};
// 概览页标题列表
const homeTitleList = ref([
{
name: "首页",
path: "/ZMOverView",
disabled: false
},
const homeTitleList = ref(
[
{
name: "首页",
path: "/ZMOverView",
disabled: false
},
{
name: "中美科技博弈",
path: "/billHome",
disabled: false
},
{
name: "智能工具",
path: "/chat",
disabled: false
},
{
name: "数据资源库",
path: "/dataLibrary",
disabled: false
}
]);
{
name: "中美科技博弈",
path: "/billHome",
disabled: false
},
{
name: "智能工具",
path: "/chat",
disabled: false
},
{
name: "数据资源库",
path: "/dataLibrary",
disabled: false
}]
)
const homeActiveTitleIndex = computed(() => {
let activeIndex = 1
......@@ -395,8 +394,10 @@ const handleToModule = (item, index) => {
};
const handleClickTitle = (item, index) => {
if (index === 0 || index === 3) {
if (index === 0) {
router.push(item.path)
} else if(index === 3) {
goToPage.goToDataLibrary()
}
};
......@@ -900,12 +901,14 @@ onMounted(() => {
height: 120px;
margin-top: 8px;
margin-left: 72px;
.menu-item {
margin-top: 36px;
width: 100%;
height: 24px;
display: flex;
cursor: pointer;
&:hover {
.title {
color: var(--color-main-active);
......
......@@ -49,7 +49,7 @@
import { onMounted, ref, computed, onUnmounted, nextTick, watch, watchEffect } from "vue";
import router from "@/router/index";
import { useWrittingAsstaintStore } from "@/stores/writtingAsstaintStore";
import { goToSearch } from "@/utils/goToPage";
import goToPage from "@/utils/goToPage";
const store = useWrittingAsstaintStore();
const handleSearch = () => {
......@@ -63,7 +63,7 @@ const handleSearch = () => {
// }
// });
// window.open(curRoute.href, "_blank");
goToSearch(store.searchBillText, store.searchData.areaName)
goToPage.goToSearch(store.searchBillText, store.searchData.areaName)
};
let containerRef = computed(() => store.searchData.containerRef);
......
......@@ -113,7 +113,7 @@ const routes = [
component: DataLibrary,
meta: {
title: '数据资源库',
isShowHeader: true
isShowHeader: false
},
children: [
...dataRoutes
......
......@@ -19,7 +19,7 @@ const decreeRoutes = [
name: "Decree",
component: Decree,
meta: {
title: "科技政令概",
title: "科技政令概",
isShowHeader: true
}
},
......
......@@ -223,12 +223,33 @@ export const useWrittingAsstaintStore = defineStore('writtingAsstaint', {
},
// ========== 路由参数处理 ==========
/**
* 与 goToPage 中法案/政令等一致:query.data = btoa(encodeURIComponent(JSON.stringify({ topic, fileId, ... })))
*/
_decodeWrittingRouteDataParam(dataParam) {
if (dataParam == null || dataParam === '') return null
try {
const s = String(dataParam).trim()
if (!s) return null
const normalized = s.replace(/-/g, '+').replace(/_/g, '/')
const padded = normalized + '==='.slice((normalized.length + 3) % 4)
const decoded = atob(padded)
const jsonStr = decodeURIComponent(decoded)
const obj = JSON.parse(jsonStr)
return obj && typeof obj === 'object' && !Array.isArray(obj) ? obj : null
} catch (e) {
console.error('写作助手路由 query.data 解密失败', e)
return null
}
},
async setRouteParams(query) {
this.routeQuery = { ...query };
this._isDisableTemplate = Object.keys(query).length > 0;
const decoded = query?.data != null ? this._decodeWrittingRouteDataParam(query.data) : null
const effective = decoded ? { ...query, ...decoded } : { ...query }
this.routeQuery = { ...effective }
this._isDisableTemplate = Object.keys(effective).length > 0
if (Object.keys(query).length > 0) {
const { topic, fileId } = query;
if (Object.keys(effective).length > 0) {
const { topic, fileId } = effective
if (topic) {
this.curTempTitle = topic;
this.tempActiveIndex = this.tempList.findIndex(item => item.title === topic);
......
const modules = import.meta.glob('./methods/*.js', { eager: true });
// 创建代理对象
const goToPage = new Proxy({}, {
get(target, prop) {
// 从所有模块中查找对应的方法
for (const module of Object.values(modules)) {
if (module[prop] && typeof module[prop] === 'function') {
return module[prop];
}
}
throw new Error(`方法 ${prop} 不存在`);
}
});
export default goToPage;
\ No newline at end of file
// 法案
import router from "@/router/index";
// 跳转法案详情
export const goToBill = (id, tabName) => {
window.sessionStorage.setItem("billId", id);
window.sessionStorage.setItem("curTabName", tabName);
const param = {
billId: id
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/billLayout",
query: {
data: base64
}
});
window.open(route.href, "_blank");
};
\ No newline at end of file
// 科技企业
import router from "@/router/index";
// 跳转企业
export const goToCompanyPage = (id, tabName) => {
window.sessionStorage.setItem('curTabName', tabName)
const param = {
id: id
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
name: "companyPages",
params: {
id: base64
}
});
window.open(route.href, "_blank");
}
\ No newline at end of file
// 政令
import router from "@/router/index";
// 跳转政令详情
export const goToDecree = (id, tabName) => {
window.sessionStorage.setItem("decreeId", id);
window.sessionStorage.setItem("curTabName", tabName);
const param = {
id: id
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/decreeLayout",
query: {
data: base64
}
});
window.open(route.href, "_blank");
};
\ No newline at end of file
// 出口管制
import router from "@/router/index";
// 跳转实体清单
export const goToEntityList = () => {
const param = {
sanTypeId: 1
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: '/exportControl/entityList',
query: {
data: base64
}
});
window.open(route.href, "_blank");
}
// 跳转实体清单事件
export const goToSingleEntityEvent = (id, tabName, date) => {
window.sessionStorage.setItem("curTabName", tabName);
const param = {
id: id,
sanTypeId: 1,
date: date
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/exportControl/singleSanction",
query: {
data: base64
}
});
window.open(route.href, "_blank");
}
// 跳转商业管制清单
export const goToCCLList = () => {
const param = {
sanTypeId: 13,
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/exportControl/commercialControlList",
query: {
data: base64
}
});
window.open(route.href, "_blank");
}
// 投融资限制
import router from "@/router/index";
// 跳转SDN清单
export const goToSDNList = () => {
const param = {
sanTypeId: 2,
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/finance/sdnlistoverview",
query: {
data: base64
}
});
window.open(route.href, "_blank");
}
// 跳转SDN清单事件
export const goToSingleSDNEvent = (id, tabName, date) => {
window.sessionStorage.setItem("curTabName", tabName);
const param = {
id: id,
sanTypeId: 2,
date: date
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/finance/singleSanction",
query: {
data: base64
}
});
window.open(route.href, "_blank");
}
\ No newline at end of file
// 解码
import router from "@/router";
export const getDecodedParams = () => {
if (window.location.search) {
const urlParams = new URLSearchParams(window.location.search)
const encoded = urlParams.get('data')
if (!encoded) return null;
try {
// Base64 解码
const decoded = atob(encoded);
const jsonStr = decodeURIComponent(decoded);
return JSON.parse(jsonStr);
} catch (e) {
console.error('解码失败', e);
return null;
}
} else {
const obj = router.currentRoute.value.params
const encoded = Object.values(obj)[0]
if (!encoded) return null;
try {
// Base64 解码
const decoded = atob(encoded);
const jsonStr = decodeURIComponent(decoded);
return jsonStr;
} catch (e) {
console.error('解码失败', e);
return null;
}
}
}
\ No newline at end of file
// 机构
import router from "@/router/index";
// 跳转机构详情
export const goToInstitution = (id, tabName) => {
window.sessionStorage.setItem('curTabName', tabName)
const param = {
id: id
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const curRoute = router.resolve({
path: "/institution",
query: {
data: base64
}
});
window.open(curRoute.href, "_blank");
}
\ No newline at end of file
// 市场准入限制
import router from "@/router/index";
// 跳转232调查概览页
export const goToCase232 = () => {
window.sessionStorage.setItem("curTabName", '232调查');
const param = {
id: 232,
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/marketAccessLayout/case",
query: {
data: base64
}
});
window.open(route.href, "_blank");
}
// 跳转232调查详情页
export const goToCaseDetail232 = (searchId, tabName) => {
window.sessionStorage.setItem("curTabName", tabName);
const param = {
id: 232,
searchId: searchId
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/marketSingleCaseLayout/overview",
query: {
data: base64
}
});
window.open(route.href, "_blank");
}
// 跳转301调查概览页
export const goToCase301 = () => {
window.sessionStorage.setItem("curTabName", '301调查');
const param = {
id: 301,
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/marketAccessLayout/case",
query: {
data: base64
}
});
window.open(route.href, "_blank");
}
// 跳转301调查详情页
export const goToCaseDetail301 = (searchId, tabName) => {
window.sessionStorage.setItem("curTabName", tabName);
const param = {
id: 301,
searchId: searchId
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/marketSingleCaseLayout/overview",
query: {
data: base64
}
});
window.open(route.href, "_blank");
}
// 跳转337调查概览页
export const goToCase337 = () => {
window.sessionStorage.setItem("curTabName", '337调查');
const param = {
id: 337,
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/marketAccessLayout/case",
query: {
data: base64
}
});
window.open(route.href, "_blank");
}
// 跳转337调查详情页
export const goToCaseDetail337 = (searchId, tabName) => {
window.sessionStorage.setItem("curTabName", tabName);
const param = {
id: 337,
searchId: searchId
}
const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({
path: "/marketSingleCaseLayout/overview",
query: {
data: base64
}
});
window.open(route.href, "_blank");
}
\ No newline at end of file
// 新闻
import router from "@/router/index";
// 跳转新闻详情
export const goToNewsPage = (id, tabName) => {
window.sessionStorage.setItem("curTabName", tabName);
// const param = {
// newsId: id
// }
// const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(id));
const route = router.resolve({
name: "newsDetail",
params: {
id: base64
}
});
window.open(route.href, "_blank");
}
\ No newline at end of file
// 风险信号
import router from "@/router/index";
\ No newline at end of file
// 搜索
import router from "@/router/index";
// 跳转搜索详情页
export const goToSearch = (tabName, areaName, billSearchType) => {
window.sessionStorage.setItem("curTabName", `搜索-${tabName}`);
let selectParam
if (billSearchType) {
selectParam = {
searchText: tabName,
areaName: areaName,
billSearchType: billSearchType
}
} else {
selectParam = {
searchText: tabName,
areaName: areaName,
}
}
// const codeParam = new URLSearchParams(selectParam)
const jsonStr = JSON.stringify(selectParam);
const base64 = btoa(encodeURIComponent(jsonStr));
const curRoute = router.resolve({
path: "/searchResults",
query: {
data: base64
}
});
window.open(curRoute.href, "_blank");
// const codeParam = new URLSearchParams(selectParam)
}
\ No newline at end of file
// 科技人物
import router from "@/router/index";
import { getPersonSummaryInfo } from "@/api/common/index";
// 跳转人物详情
export const goToCharacterPage = async (id, tabName) => {
window.sessionStorage.setItem('curTabName', tabName)
const personTypeList = JSON.parse(window.sessionStorage.getItem("personTypeList"));
let type
let personTypeName
const params = {
personId: id
}
const param1 = {
personId: id
}
const jsonStr1 = JSON.stringify(param1);
const base64_1 = btoa(encodeURIComponent(jsonStr1));
// 先获取人物全局信息
try {
const res = await getPersonSummaryInfo(params)
if (res.code === 200 && res.data) {
const arr = personTypeList.filter(item => {
return item.typeId === res.data.personType;
})
if (arr && arr.length) {
personTypeName = arr[0].typeName;
if (personTypeName === "科技企业领袖") {
type = 1;
} else if (personTypeName === "国会议员") {
type = 2;
} else if (personTypeName === "智库研究人员") {
type = 3;
} else {
personTypeName = "其他类型";
const route = router.resolve({
path: "/characterPage",
query: {
data: base64_1
}
});
window.open(route.href, "_blank");
return;
}
const param2 = {
personId: id,
type: type
}
const jsonStr2 = JSON.stringify(param2);
const base64_2 = btoa(encodeURIComponent(jsonStr2));
const route = router.resolve({
path: "/characterPage",
query: {
data: base64_2
}
});
window.open(route.href, "_blank");
} else {
personTypeName = "";
const route = router.resolve({
path: "/characterPage",
query: {
data: base64_1
}
});
window.open(route.href, "_blank");
return;
}
} else {
const route = router.resolve({
path: "/characterPage",
query: {
data: base64_1
}
});
window.open(route.href, "_blank");
return;
}
} catch (error) {
const route = router.resolve({
path: "/characterPage",
query: {
data: base64_1
}
});
window.open(route.href, "_blank");
return;
}
}
// 美国科技智库
import router from "@/router/index";
// 跳转智库详情
export const goToThinkTank = (id, tabName) => {
window.sessionStorage.setItem("curTabName", tabName);
const base64 = btoa(encodeURIComponent(id));
const curRoute = router.resolve({
name: "ThinkTankDetail",
params: {
id: base64
}
});
window.open(curRoute.href, "_blank");
}
// 跳转智库报告详情
export const goToThinkTankReport = (id, tabName) => {
window.sessionStorage.setItem("curTabName", tabName);
const base64 = btoa(encodeURIComponent(id));
const route = router.resolve({
name: "ReportDetail",
params: {
id: base64
}
});
window.open(route.href, "_blank");
}
\ No newline at end of file
/**
* 与根目录 `goToPage.js` 中 getDecodedParams 及合作限制详情 query 解码行为一致,
* 供智库/合作限制从 `@/utils/goToPage` 迁出后使用(不修改 `goToPage` 目录与 `goToPage.js`)。
*/
import router from "@/router/index";
/** 新窗口打开合作限制详情:id 为 base64(encodeURIComponent(明文)),与概览列表跳转一致 */
export function goToCooperationRestrictionsDetail(plainId, sessionTabTitle) {
const s = String(plainId ?? "").trim();
if (!s) return;
if (sessionTabTitle != null && sessionTabTitle !== "") {
window.sessionStorage.setItem("cooperationRestrictionsTabName", String(sessionTabTitle));
}
let encoded;
try {
encoded = btoa(encodeURIComponent(s));
} catch (_) {
return;
}
if (!encoded) return;
const r = router.resolve({
name: "CooperationRestrictionsDetail",
query: { id: encoded }
});
window.open(r.href, "_blank");
}
/** 合作限制详情页 `route.query.id` 解码(兼容明文数字与 base64 包装) */
export function decodeCooperationRestrictionQueryId(raw) {
if (raw == null) return null;
const s0 = String(raw).trim();
if (!s0) return null;
if (/^\d+$/.test(s0)) return s0;
if (/^[A-Za-z0-9+/_-]+={0,2}$/.test(s0)) {
try {
const normalized = s0.replace(/-/g, "+").replace(/_/g, "/");
const padded = normalized + "===".slice((normalized.length + 3) % 4);
const decoded = atob(padded);
try {
return decodeURIComponent(decoded);
} catch (_) {
return decoded;
}
} catch (_) {}
}
return s0;
}
......@@ -78,6 +78,25 @@ export function getEmptyRiskDetailPayload() {
};
}
/**
* 风险类型(与列表/详情接口 `riskType` 一致):用于详情弹窗「风险类型」展示,优先于 direction 编码
* system / tech_control / external / status
*/
export const RISK_SIGNAL_RISK_TYPE_CODE_LABEL_MAP = {
system: "科技体系有效性",
tech_control: "核心技术自主可控性",
external: "外部打压危害性",
status: "安全状态失稳性"
};
export function getRiskSignalRiskTypeLabel(raw) {
if (raw == null || raw === "") {
return "";
}
const c = String(raw).trim().toLowerCase();
return RISK_SIGNAL_RISK_TYPE_CODE_LABEL_MAP[c] ?? "";
}
/** 风险信号详情接口 `direction` 字段 → 中文(与 `model` 的 0100/0101 含义不同,单独映射) */
export const RISK_SIGNAL_DIRECTION_LABEL_MAP = {
"0100": "政策法规打压类风险",
......@@ -273,6 +292,7 @@ export function buildListRowFallbackFromRawRow(row, fields) {
const dsc = String(row.summary ?? row.contentZh ?? row.description ?? row.dsc ?? row.content ?? "").trim();
const category = String(row.typeName ?? row.module ?? row.category ?? "").trim();
const direction = row.direction != null && row.direction !== "" ? row.direction : "";
const riskType = String(row.riskType ?? "").trim();
return {
title,
time,
......@@ -281,7 +301,8 @@ export function buildListRowFallbackFromRawRow(row, fields) {
dsc,
tag: parseRiskSignalTagList(row),
category,
direction
direction,
riskType
};
}
......@@ -312,12 +333,18 @@ export function buildRiskDetailPayloadFromApi(data, listRow) {
const detailTags = parseRiskSignalTagList(data);
const apiCategory = String(category).trim();
const apiTime = formatRiskPublishDisplay(postRaw) || String(postRaw || "").trim();
// 风险动向类型:严格使用 direction(0100~0103),支持多值
// 风险类型:优先使用接口 `riskType`(system/tech_control/external/status),与风险信号管理筛选项一致
const dataRiskType = data.riskType != null ? String(data.riskType).trim() : "";
const listRiskType = String(list.riskType ?? "").trim();
const riskTypeCode = dataRiskType || listRiskType;
const riskTypeLabel = getRiskSignalRiskTypeLabel(riskTypeCode);
// 风险动向(direction 0100~0103):无有效 riskType 时沿用原逻辑
const directionCodes = [
...parseRiskSignalDirectionCodes(data.direction),
...parseRiskSignalDirectionCodes(list.direction)
];
const directionLabels = buildRiskSignalDirectionLabels(directionCodes);
const directionLabelsFromCodes = buildRiskSignalDirectionLabels(directionCodes);
const directionLabels = riskTypeLabel ? [riskTypeLabel] : directionLabelsFromCodes;
return {
title: data.title ?? list.title ?? "",
category: apiCategory || String(list.category ?? "").trim(),
......
......@@ -4,7 +4,12 @@ import getQuarterRange from './getQuarterRange';
import * as echarts from 'echarts'
import 'echarts-wordcloud';
import router from '@/router/index'
import { goToDataCountryBill, goToDataDecree, goToDataThinkTank } from './goToPage';
// import { goToDataCountryBill, goToDataDecree, goToDataThinkTank } from './goToPage';
import goToPage from './goToPage/index';
/** 与 multiLineChart 等 option.graphic 约定一致:自定义图例翻页箭头 */
const LEGEND_ARROW_NAMES = new Set(['__legend_prev__', '__legend_next__']);
const setChart = (option, chartId, allowClick, selectParam, otherAreaList) => {
let chartDom = document.getElementById(chartId);
if (!chartDom) {
......@@ -76,7 +81,7 @@ const setChart = (option, chartId, allowClick, selectParam, otherAreaList) => {
} else {
selectParam.selectedStatus = params.name
}
goToDataCountryBill(selectParam)
goToPage.goToDataCountryBill(selectParam)
break
case '政令':
if (params.componentType === 'series' && params.seriesType === 'pie') {
......@@ -96,7 +101,7 @@ const setChart = (option, chartId, allowClick, selectParam, otherAreaList) => {
// });
// window.open(route.href, "_blank");
}
goToDataDecree(selectParam)
goToPage.goToDataDecree(selectParam)
break
case '科技智库报告':
......@@ -105,11 +110,11 @@ const setChart = (option, chartId, allowClick, selectParam, otherAreaList) => {
const year = params.name.slice(0, 4)
const quatarNum = Number(params.name[params.name.length - 1])
selectParam.selectedDate = JSON.stringify(getQuarterRange(year, quatarNum))
goToDataThinkTank(selectParam);
goToPage.goToDataThinkTank(selectParam);
return
} else if (selectParam.key === 2) {
selectParam.domains = params.name
goToDataThinkTank(selectParam);
goToPage.goToDataThinkTank(selectParam);
return
}
}
......
......@@ -283,7 +283,7 @@ import cyyIcon from "@/assets/icons/cyy.png";
import ghdIcon from "@/assets/icons/ghd.png";
import mzdIcon from "@/assets/icons/mzd.png";
import { ElMessage } from "element-plus";
import { goToDataCountryBill } from "@/utils/goToPage";
import { goToDataCountryBill } from "@/utils/goToPage/methods/dataLibrary";
const router = useRouter();
......
......@@ -322,7 +322,7 @@ import iconILetter from "./assets/icons/icon-iLetter.png";
import { ElMessage } from "element-plus";
import { useGotoNewsDetail } from "@/router/modules/news";
import { goToBill } from "@/utils/goToPage";
import { goToBill } from "@/utils/goToPage/methods/bill";
// 跳转人物主页(MessageBubble 的 person-click 传入整条列表项,需取 personId)
const handleClickToCharacter = async item => {
......
......@@ -20,24 +20,51 @@ const route = useRoute();
const type = ref(route.query.type || 1);
const decodeMaybeBase64 = (raw) => {
if (raw == null) return null;
const s0 = String(raw).trim();
let s0 = String(raw).trim();
if (!s0) return null;
// 兼容 URL 里被 encodeURIComponent 的 base64(例如 OTg%3D)
if (s0.includes("%")) {
try {
const decodedOnce = decodeURIComponent(s0);
if (decodedOnce) s0 = String(decodedOnce).trim();
} catch (_) { }
}
// 明文 personId(如 Y000064)保持原样,避免误解码
if (/^[A-Za-z]\d{6,}$/.test(s0) || /^Y\d+/i.test(s0)) {
return s0;
}
if (s0.length >= 12 && /^[A-Za-z0-9+/_-]+={0,2}$/.test(s0)) {
// 只在“可逆校验通过”时才把它当作 base64(encodeURIComponent(x))
if (!/^[A-Za-z0-9+/_-]+={0,2}$/.test(s0)) return s0;
const encodeBase64Param = (val) => {
const s = String(val ?? "").trim();
if (!s) return "";
try {
const normalized = s0.replace(/-/g, "+").replace(/_/g, "/");
const padded = normalized + "===".slice((normalized.length + 3) % 4);
const decoded = atob(padded);
return btoa(encodeURIComponent(s));
} catch (_) {
return s;
}
};
const normalizeBase64 = (s) => {
const normalized = String(s ?? "").replace(/-/g, "+").replace(/_/g, "/");
return normalized + "===".slice((normalized.length + 3) % 4);
};
try {
const padded = normalizeBase64(s0);
const decoded = atob(padded);
const decodedStr = (() => {
try {
return decodeURIComponent(decoded);
} catch (_) {
return decoded;
}
} catch (_) { }
}
})();
const reEncoded = encodeBase64Param(decodedStr);
if (reEncoded && normalizeBase64(reEncoded) === padded) {
return decodedStr;
}
} catch (_) { }
return s0;
};
const personId = ref(decodeMaybeBase64(route.query.personId) || "Y000064");
......
......@@ -132,7 +132,7 @@ import { getPersonSummaryInfo } from "@/api/common/index";
import { ElMessage } from "element-plus";
import TimeSortSelectBox from '@/components/base/TimeSortSelectBox/index.vue'
import AreaTag from '@/components/base/AreaTag/index.vue'
import { getDecodedParams } from "@/utils/goToPage";
import goToPage from "@/utils/goToPage";
const route = useRoute();
const container = ref(null)
......@@ -598,7 +598,7 @@ const handleToPage = async item => {
};
onMounted(() => {
const routeQuery = getDecodedParams()
const routeQuery = goToPage.getDecodedParams()
console.log('routeQuery',routeQuery);
......
......@@ -120,6 +120,7 @@ import RiskSignal from "@/components/base/riskSignal/index.vue";
import RiskSignalOverviewDetailDialog from "@/components/base/RiskSignalOverviewDetailDialog/index.vue";
import { ref, onMounted, computed } from "vue";
import router from "@/router";
import { goToCooperationRestrictionsDetail } from "@/utils/goToPageRouteHelpers.js";
import { navigateToViewRiskSignal } from "@/utils/riskSignalOverviewNavigate";
import { getCoopRestrictionTrends, getCoopRestrictionSignals } from "@/api/coopRestriction/coopRestriction.js";
import defaultImg from "./assets/usImg.png";
......@@ -206,36 +207,14 @@ const handleClickToDetail = item => {
const activeItem = item && item.ID ? item : mainTrend.value;
const id = activeItem?.ID || activeItem?.id || activeItem?.limitId;
if (!id) return;
window.sessionStorage.setItem("cooperationRestrictionsTabName", activeItem?.LIMITNAME || "");
const encodedId = (() => {
const s = String(id).trim();
if (!s) return "";
try { return btoa(encodeURIComponent(s)); } catch (_) { return s; }
})();
if (!encodedId) return;
const curRoute = router.resolve({
name: "CooperationRestrictionsDetail",
query: { id: encodedId }
});
window.open(curRoute.href, "_blank");
goToCooperationRestrictionsDetail(id, activeItem?.LIMITNAME || "");
};
// 点击风险信号详情
const handleToRiskDetail = (item) => {
const id = item?.cooperationId || item?.ID || item?.id || item?.limitId;
if (!id) return;
const encodedId = (() => {
const s = String(id).trim();
if (!s) return "";
try { return btoa(encodeURIComponent(s)); } catch (_) { return s; }
})();
if (!encodedId) return;
const curRoute = router.resolve({
name: "CooperationRestrictionsDetail",
query: { id: encodedId },
});
window.open(curRoute.href, "_blank");
goToCooperationRestrictionsDetail(id, undefined);
};
const isRiskOverviewDetailOpen = ref(false);
......
......@@ -73,8 +73,8 @@
<script setup>
import { ref, onMounted, watch, computed } from "vue";
import { useRouter } from "vue-router";
import { getCoopRestrictionList } from "@/api/coopRestriction/coopRestriction";
import { goToCooperationRestrictionsDetail } from "@/utils/goToPageRouteHelpers.js";
import TimeSortSelectBox from "@/components/base/TimeSortSelectBox/index.vue";
import defaultImg from "../../assets/images/default-icon2.png";
......@@ -136,33 +136,11 @@ const getMainDataList = async () => {
}
};
const router = useRouter();
const encodeBase64Param = (val) => {
const s = String(val ?? "").trim();
if (!s) return "";
try {
return btoa(encodeURIComponent(s));
} catch (_) {
return s;
}
};
const handleClick = item => {
const id = item?.id || item?.limitId || item?.ID;
if (!id) return;
window.sessionStorage.setItem(
"cooperationRestrictionsTabName",
item?.limitName || item?.title || item?.name || ""
);
const encodedId = encodeBase64Param(id);
if (!encodedId) return;
const routeData = router.resolve({
name: "CooperationRestrictionsDetail",
query: {
id: encodedId
}
});
window.open(routeData.href, "_blank");
const tabTitle = item?.limitName || item?.title || item?.name || "";
goToCooperationRestrictionsDetail(id, tabTitle);
};
const navList = ref([
......
......@@ -103,31 +103,11 @@
import { ref, watch, computed } from "vue";
import { useRoute, useRouter } from "vue-router";
import { getCoopRestrictionIntroduction, getCoopRestrictionRelated, getCoopRestrictionBackground, getCoopRestrictionClause } from "@/api/coopRestriction/coopRestriction";
import { decodeCooperationRestrictionQueryId } from "@/utils/goToPageRouteHelpers.js";
const route = useRoute();
const router = useRouter();
const decodeQueryId = (raw) => {
if (raw == null) return null;
const s0 = String(raw).trim();
if (!s0) return null;
// 明文数字直接返回
if (/^\d+$/.test(s0)) return s0;
// base64(encodeURIComponent(id)) 解码(兼容短 base64:Mg==)
if (/^[A-Za-z0-9+/_-]+={0,2}$/.test(s0)) {
try {
const normalized = s0.replace(/-/g, "+").replace(/_/g, "/");
const padded = normalized + "===".slice((normalized.length + 3) % 4);
const decoded = atob(padded);
try {
return decodeURIComponent(decoded);
} catch (_) {
return decoded;
}
} catch (_) { }
}
return s0;
};
const limitId = computed(() => decodeQueryId(route.query?.id));
const limitId = computed(() => decodeCooperationRestrictionQueryId(route.query?.id));
import defaultImg from "./assets/image01.png"
import defaultCom from "../assets/images/default-icon2.png"
import Harvard from "./assets/哈佛.png";
......@@ -235,15 +215,35 @@ const handleClickOnEntity = (item) => {
}
})();
if (!encodedPersonId) return;
const url = `http://localhost:3000/characterPage?type=2&personId=${encodeURIComponent(encodedPersonId)}`;
window.open(url, "_blank");
const { href } = router.resolve({
path: "/characterPage",
query: {
type: 2,
personId: encodedPersonId
}
});
window.open(href, "_blank");
return;
}
// 默认按公司/机构跳转(含 ENTITYTYPE === 'O' 或字段缺失)
const companyId = item?.ENTITYID || item?.id;
if (!companyId) return;
const path = `/companyPages/${companyId}`;
const { href } = router.resolve({ path });
const encodedInstitutionId = (() => {
const s = String(companyId ?? "").trim();
if (!s) return "";
try {
return btoa(encodeURIComponent(s));
} catch (_) {
return s;
}
})();
if (!encodedInstitutionId) return;
const { href } = router.resolve({
path: "/institution",
query: {
id: encodedInstitutionId
}
});
window.open(href, "_blank");
};
......
......@@ -173,7 +173,7 @@ import { getPostOrgList, getPostMemberList } from '@/api/bill/billHome'
import { search, getStatusList } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import { getDecodedParams } from '@/utils/goToPage'
import goToPage from '@/utils/goToPage/index'
const route = useRoute();
......@@ -1152,10 +1152,10 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件
const initParam = () => {
const routeQuery = getDecodedParams()
const routeQuery = goToPage.getDecodedParams()
console.log('routeQuery',routeQuery);
const hasQuery = Object.keys(routeQuery).length > 0;
const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) {
if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
......@@ -1213,30 +1213,12 @@ const initParam = () => {
// 跳转法案详情
const handleClickToDetail = (curBill) => {
console.log('curBill', curBill);
window.sessionStorage.setItem("billId", curBill.id);
window.sessionStorage.setItem("curTabName", curBill.title);
const route = router.resolve({
path: "/billLayout",
query: {
billId: curBill.id
}
});
window.open(route.href, "_blank");
goToPage.goToBill(curBill.id, curBill.title)
};
// 跳转人物详情
const handlePerClick = item => {
window.sessionStorage.setItem("curTabName", item.sponsorPersonName);
const route = router.resolve({
path: "/characterPage",
query: {
type: 2,
personId: item.personId
}
});
window.open(route.href, "_blank");
goToPage.goToCharacterPage(item.personId, item.sponsorPersonName)
};
// 导出
......
......@@ -127,7 +127,7 @@
</el-table-column>
<el-table-column label="所属国家地区">
<template #default="scope">
<span class="person-item text-compact" @click="handleOrgClick(scope.row)">{{ scope.row.organizationName
<span class="person-item text-compact">{{ scope.row.organizationName
}}</span>
</template>
</el-table-column>
......@@ -172,6 +172,7 @@ import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import { getCountryList, getBusinessType } from '@/api/comprehensiveSearch/index'
import goToPage from '@/utils/goToPage'
const route = useRoute();
......@@ -1055,29 +1056,17 @@ const initParam = () => {
const handleClickToDetail = (item) => {
console.log('item', item);
window.sessionStorage.setItem('curTabName', item.originalTitle)
const route = router.resolve({
name: "companyPages",
params: {
id: item.id
}
});
window.open(route.href, "_blank");
// window.sessionStorage.setItem('curTabName', item.originalTitle)
// const route = router.resolve({
// name: "companyPages",
// params: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
goToPage.goToCompanyPage(item.id, item.originalTitle)
};
// 跳转机构详情
const handleOrgClick = item => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({
path: "/institution",
query: {
id: item.organizationId
}
});
window.open(route.href, "_blank");
};
// 导出
const handleExport = () => {
......
......@@ -186,7 +186,7 @@ import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import { getDepartmentList } from "@/api/decree/home";
import { getDecodedParams } from '@/utils/goToPage'
import goToPage from '@/utils/goToPage/index'
const route = useRoute();
......@@ -976,8 +976,8 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件
const initParam = () => {
const routeQuery = getDecodedParams()
const hasQuery = Object.keys(routeQuery).length > 0;
const routeQuery = goToPage.getDecodedParams()
const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) {
if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
......@@ -1025,30 +1025,13 @@ const initParam = () => {
// 跳转政令详情
const handleClickToDetail = (curDecree) => {
console.log('curDecree', curDecree);
window.sessionStorage.setItem("decreeId", curDecree.id);
window.sessionStorage.setItem("curTabName", curDecree.title);
const route = router.resolve({
path: "/decreeLayout",
query: {
id: curDecree.id
}
});
window.open(route.href, "_blank");
goToPage.goToDecree(curDecree.id, curDecree.title)
};
// 跳转机构详情
const handleOrgClick = item => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({
path: "/institution",
query: {
id: item.organizationId
}
});
window.open(route.href, "_blank");
goToPage.goToInstitution(item.id, item.title)
};
// 导出
......
......@@ -2,13 +2,16 @@
<div class="countrybill-wrapper">
<div class="header-box">
<div class="header-top">
<SelectBox :placeholder-name="areaPlaceHolder" select-title="科技领域" :select-list="areaList"
<SelectBox :placeholder-name="areaPlaceHolder" select-title="科技领域" :select-list="areaList"
:select-name="selectedArea" :is-multiple="true" @update:select-text="handleSelectArea" />
<SelectBox :placeholder-name="DatePlaceHolder" select-title="制裁时间" :select-list="dateList"
:select-name="selectedDate" :custom-time="customTime" @update:select-text="handleSelectDate"
@update:custom-time="handleCustomDate" />
<SelectBox v-if="isFolderAll" :placeholder-name="typePlaceHolder" select-title="物项类别" :select-list="typeList"
:select-name="selectedType" @update:select-text="handleSelectType" />
<SelectBox v-if="isFolderAll" :placeholder-name="updateFlagPlaceHolder" select-title="变动标识"
:select-list="updateFlagList" :select-name="selectedUpdateFlag"
@update:select-text="handleSelectUpdateFlag" />
<SelectBox v-if="isFolderAll" :placeholder-name="controlReasonPlaceHolder" select-title="管控原因"
:select-list="controlReasonList" :select-name="selectedControlReason"
@update:select-text="handleSelectControlReason" />
......@@ -112,7 +115,7 @@
<el-table-column type="selection" width="40" />
<el-table-column label="物项名称">
<template #default="scope">
<span class="title-item text-compact-bold" @click="handleClickToDetail(scope.row)">{{
<span class="title-item text-compact-bold">{{
scope.row.originalTitle
}}</span>
</template>
......@@ -161,7 +164,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import { getMaterialCategory, getControlReason } from '@/api/comprehensiveSearch/index'
import goToPage from '@/utils/goToPage/index'
const route = useRoute();
// 图表/数据
......@@ -336,6 +339,14 @@ const activeTagList = computed(() => {
}
)
}
if (selectedUpdateFlag.value && selectedUpdateFlag.value !== '全部标识') {
arr.push(
{
tag: '变动标识',
name: selectedUpdateFlag.value === '1' ? '更新' : '未更新'
}
)
}
if (selectedControlReason.value && selectedControlReason.value !== '全部管控原因') {
arr.push(
{
......@@ -373,6 +384,8 @@ const handleCloseCurTag = (tag, index) => {
case '物项类别':
selectedType.value = '全部类别'
break
case '变动标识':
selectedUpdateFlag.value = '全部标识'
case '管控原因':
selectedControlReason.value = '全部管控原因'
break
......@@ -523,7 +536,7 @@ const typePlaceHolder = ref('请选择物项类别')
const handleSelectType = value => {
selectedType.value = value
}
// 获取国家地区列表
// 获取物项类别列表
const handleGetMaterialCategory = async () => {
loading.value = true
try {
......@@ -544,6 +557,28 @@ const handleGetMaterialCategory = async () => {
}
}
// 变动标识
// 物项类别
const updateFlagList = ref([
{
name: '全部标识',
id: '全部标识'
},
{
name: '更新',
id: '1'
},
{
name: '未更新',
id: '0'
},
])
const selectedUpdateFlag = ref('全部类别')
const updateFlagPlaceHolder = ref('请选择物项类别')
const handleSelectUpdateFlag = value => {
selectedUpdateFlag.value = value
}
// 管控原因
const controlReasonList = ref([
......@@ -590,6 +625,7 @@ const handleClear = () => {
selectedDate.value = ''
customTime.value = []
selectedType.value = '全部类别'
selectedUpdateFlag.value = '全部标识'
selectedControlReason.value = '全部管控原因'
categoryName.value = ''
ElMessage.success('已清空条件!')
......@@ -651,6 +687,7 @@ const fetchTableData = async () => {
proposedDateStart: customTime.value[0] ? customTime.value[0] : null,
proposedDateEnd: customTime.value[1] ? customTime.value[1] : null,
materialCategory: selectedType.value === '全部类别' ? null : selectedType.value, // 物项类别
changeFlag: selectedUpdateFlag.value === '全部标识' ? null : selectedUpdateFlag.value,
controlReason: selectedControlReason.value === '全部管控原因' ? null : selectedControlReason.value, // 管控原因
materialNameZh: categoryName.value ? categoryName.value : null, // 物项名称
sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序
......@@ -733,6 +770,7 @@ const fetchAllData = async () => {
proposedDateStart: customTime.value[0] ? customTime.value[0] : null,
proposedDateEnd: customTime.value[1] ? customTime.value[1] : null,
materialCategory: selectedType.value === '全部类别' ? null : selectedType.value, // 物项类别
changeFlag: selectedUpdateFlag.value === '全部标识' ? null : selectedUpdateFlag.value,
controlReason: selectedControlReason.value === '全部管控原因' ? null : selectedControlReason.value, // 管控原因
materialNameZh: categoryName.value ? categoryName.value : null, // 物项名称
sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序
......@@ -883,23 +921,25 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件
const initParam = () => {
const hasQuery = Object.keys(route.query).length > 0;
const routeQuery = goToPage.getDecodedParams()
const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) {
if (route.query.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList)
if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else {
selectedArea.value = route.query.domains ? [route.query.domains] : ['全部领域']
selectedArea.value = routeQuery.domains ? [routeQuery.domains] : ['全部领域']
}
if (route.query.selectedDate && Array.isArray(JSON.parse(route.query.selectedDate)) && JSON.parse(route.query.selectedDate).length) {
if (routeQuery.selectedDate && Array.isArray(JSON.parse(routeQuery.selectedDate)) && JSON.parse(routeQuery.selectedDate).length) {
selectedDate.value = '自定义'
customTime.value = JSON.parse(route.query.selectedDate)
customTime.value = JSON.parse(routeQuery.selectedDate)
}
selectedType.value = route.query.orgnizationName ? route.query.orgnizationName : '全部类别'
selectedType.value = routeQuery.orgnizationName ? routeQuery.orgnizationName : '全部类别'
selectedUpdateFlag.value = routeQuery.updateFlag ? routeQuery.updateFlag : '全部标识'
const query = route.query;
const query = routeQuery;
if (Object.keys(query).length > 0) {
sessionStorage.setItem('commerceRouteQuery', JSON.stringify(query));
}
......@@ -920,25 +960,6 @@ const initParam = () => {
}
// 跳转政令详情
const handleClickToDetail = (curDecree) => {
};
// 跳转机构详情
const handleOrgClick = item => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({
path: "/institution",
query: {
id: item.organizationId
}
});
window.open(route.href, "_blank");
};
// 导出
const handleExport = () => {
if (!selectedCount.value) {
......@@ -1238,12 +1259,12 @@ onMounted(async () => {
.title-item {
color: var(--text-primary-80-color);
cursor: pointer;
// cursor: pointer;
&:hover {
color: var(--color-primary-100);
text-decoration: underline;
}
// &:hover {
// color: var(--color-primary-100);
// text-decoration: underline;
// }
}
.person-item {
......
......@@ -114,7 +114,7 @@
<el-table-column type="selection" width="40" />
<el-table-column label="事件名称">
<template #default="scope">
<span class="title-item text-compact-bold" @click="handleClickToDetail(scope.row)">{{
<span class="title-item text-compact-bold">{{
scope.row.originalTitle
}}</span>
</template>
......@@ -151,7 +151,7 @@ import router from '@/router'
import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import goToPage from '@/utils/goToPage/index'
const route = useRoute();
// 图表/数据
......@@ -804,23 +804,24 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件
const initParam = () => {
const hasQuery = Object.keys(route.query).length > 0;
const routeQuery = goToPage.getDecodedParams()
const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) {
if (route.query.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList)
if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else {
selectedArea.value = route.query.domains ? [route.query.domains] : ['全部领域']
selectedArea.value = routeQuery.domains ? [routeQuery.domains] : ['全部领域']
}
if (route.query.selectedDate && Array.isArray(JSON.parse(route.query.selectedDate)) && JSON.parse(route.query.selectedDate).length) {
if (routeQuery.selectedDate && Array.isArray(JSON.parse(routeQuery.selectedDate)) && JSON.parse(routeQuery.selectedDate).length) {
selectedDate.value = '自定义'
customTime.value = JSON.parse(route.query.selectedDate)
customTime.value = JSON.parse(routeQuery.selectedDate)
}
isInvolveCnOnly.value = route.query.isInvolveCnOnly ? true : false
isInvolveCnOnly.value = routeQuery.isInvolveCnOnly ? true : false
const query = route.query;
const query = routeQuery;
if (Object.keys(query).length > 0) {
sessionStorage.setItem('commerceEventRouteQuery', JSON.stringify(query));
}
......@@ -842,25 +843,6 @@ const initParam = () => {
}
// 跳转政令详情
const handleClickToDetail = (curDecree) => {
};
// 跳转机构详情
const handleOrgClick = item => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({
path: "/institution",
query: {
id: item.organizationId
}
});
window.open(route.href, "_blank");
};
// 导出
const handleExport = () => {
if (!selectedCount.value) {
......@@ -1157,12 +1139,12 @@ onMounted(async () => {
.title-item {
color: var(--text-primary-80-color);
cursor: pointer;
// cursor: pointer;
&:hover {
color: var(--color-primary-100);
text-decoration: underline;
}
// &:hover {
// color: var(--color-primary-100);
// text-decoration: underline;
// }
}
.person-item {
......
......@@ -142,7 +142,7 @@
</el-table-column>
<el-table-column label="上市地点">
<template #default="scope">
<span class="person-item text-compact" @click="handleOrgClick(scope.row)">{{ scope.row.organizationName
<span class="person-item text-compact">{{ scope.row.organizationName
}}</span>
</template>
</el-table-column>
......@@ -188,7 +188,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import { getProvinceList, getCountryList, getEntityTypes } from '@/api/comprehensiveSearch/index'
import goToPage from '@/utils/goToPage/index'
const route = useRoute();
const isShowProvinceBox = computed(() => {
......@@ -1063,34 +1063,35 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件
const initParam = () => {
const hasQuery = Object.keys(route.query).length > 0;
const routeQuery = goToPage.getDecodedParams()
const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) {
if (route.query.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList)
if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else {
selectedArea.value = route.query.domains ? [route.query.domains] : ['全部领域']
selectedArea.value = routeQuery.domains ? [routeQuery.domains] : ['全部领域']
}
if (route.query.selectedDate && Array.isArray(JSON.parse(route.query.selectedDate)) && JSON.parse(route.query.selectedDate).length) {
if (routeQuery.selectedDate && Array.isArray(JSON.parse(routeQuery.selectedDate)) && JSON.parse(routeQuery.selectedDate).length) {
selectedDate.value = '自定义'
customTime.value = JSON.parse(route.query.selectedDate)
customTime.value = JSON.parse(routeQuery.selectedDate)
}
selectedProvince.value = route.query.selectedProvince ? provinceList.value.filter(item => item.name.indexOf(route.query.selectedProvince) > -1)[0].name : '全部省份'
selectedProvince.value = routeQuery.selectedProvince ? provinceList.value.filter(item => item.name.indexOf(routeQuery.selectedProvince) > -1)[0].name : '全部省份'
isHalfRule.value = route.query.isHalfRule === 'true' ? true : false
isHalfRule.value = routeQuery.isHalfRule === 'true' ? true : false
isCnEntityOnly.value = route.query.isCnEntityOnly ? true : false
isCnEntityOnly.value = routeQuery.isCnEntityOnly ? true : false
if (isCnEntityOnly.value) {
selectedCountry.value = '0101'
} else {
selectedCountry.value = route.query.selectedCountryId ? route.query.selectedCountryId : '全部国家'
selectedCountry.value = routeQuery.selectedCountryId ? routeQuery.selectedCountryId : '全部国家'
}
selectedEntityType.value = route.query.selectedEntityType ? entityTypeList.value.filter(item => item.name === route.query.selectedEntityType)[0].id : '全部实体类型'
selectedEntityType.value = routeQuery.selectedEntityType ? entityTypeList.value.filter(item => item.name === routeQuery.selectedEntityType)[0].id : '全部实体类型'
const query = route.query;
const query = routeQuery;
if (Object.keys(query).length > 0) {
sessionStorage.setItem('entityRouteQuery', JSON.stringify(query));
}
......@@ -1112,7 +1113,7 @@ const initParam = () => {
if (isCnEntityOnly.value) {
selectedCountry.value = '0101'
} else {
selectedCountry.value = route.query.selectedCountryId ? route.query.selectedCountryId : '全部国家'
selectedCountry.value = savedQuery.selectedCountryId ? routeQuery.selectedCountryId : '全部国家'
}
selectedEntityType.value = savedQuery.selectedEntityType ? entityTypeList.value.filter(item => item.name === savedQuery.selectedEntityType)[0].id : '全部实体类型'
......@@ -1135,29 +1136,16 @@ watch(
const handleClickToDetail = (curEntity) => {
console.log('curEntity', curEntity);
window.sessionStorage.setItem("decreeId", curEntity.id);
window.sessionStorage.setItem("curTabName", curEntity.title);
const route = router.resolve({
name: "companyPages",
params: {
id: curEntity.organizationId
}
});
window.open(route.href, "_blank");
};
// 跳转机构详情
const handleOrgClick = item => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({
path: "/institution",
query: {
id: item.organizationId
}
});
window.open(route.href, "_blank");
// window.sessionStorage.setItem("decreeId", curEntity.id);
// window.sessionStorage.setItem("curTabName", curEntity.title);
// const route = router.resolve({
// name: "companyPages",
// params: {
// id: curEntity.organizationId
// }
// });
// window.open(route.href, "_blank");
goToPage.goToCompanyPage(curEntity.id, curEntity.title)
};
// 导出
......
......@@ -152,6 +152,7 @@ import router from '@/router'
import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import goToPage from '@/utils/goToPage/index'
const route = useRoute();
......@@ -805,23 +806,26 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件
const initParam = () => {
const hasQuery = Object.keys(route.query).length > 0;
const routeQuery = goToPage.getDecodedParams()
console.log('routequery', routeQuery);
const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) {
if (route.query.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList)
if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else {
selectedArea.value = route.query.domains ? [route.query.domains] : ['全部领域']
selectedArea.value = routeQuery.domains ? [routeQuery.domains] : ['全部领域']
}
if (route.query.selectedDate && Array.isArray(JSON.parse(route.query.selectedDate)) && JSON.parse(route.query.selectedDate).length) {
if (routeQuery.selectedDate && Array.isArray(JSON.parse(routeQuery.selectedDate)) && JSON.parse(routeQuery.selectedDate).length) {
selectedDate.value = '自定义'
customTime.value = JSON.parse(route.query.selectedDate)
customTime.value = JSON.parse(routeQuery.selectedDate)
}
isInvolveCnOnly.value = route.query.isInvolveCnOnly ? true : false
isInvolveCnOnly.value = routeQuery.isInvolveCnOnly ? true : false
const query = route.query;
const query = routeQuery;
if (Object.keys(query).length > 0) {
sessionStorage.setItem('entityEventRouteQuery', JSON.stringify(query));
}
......@@ -847,30 +851,17 @@ const initParam = () => {
const handleClickToDetail = (item) => {
console.log('curEntityEvent', item);
window.sessionStorage.setItem("curTabName", `${item.date}《${item.originalTitle}》`);
const route = router.resolve({
path: "/exportControl/singleSanction",
query: {
id: item.id,
sanTypeId: 1,
date: item.date
}
});
window.open(route.href, "_blank");
};
// 跳转机构详情
const handleOrgClick = item => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({
path: "/institution",
query: {
id: item.organizationId
}
});
window.open(route.href, "_blank");
// window.sessionStorage.setItem("curTabName", `${item.date}《${item.originalTitle}》`);
// const route = router.resolve({
// path: "/exportControl/singleSanction",
// query: {
// id: item.id,
// sanTypeId: 1,
// date: item.date
// }
// });
// window.open(route.href, "_blank");
goToPage.goToSingleEntityEvent(item.id,`${item.date}《${item.originalTitle}》`, item.date)
};
// 导出
......
......@@ -161,6 +161,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import { getMaterialCategory, getControlReason } from '@/api/comprehensiveSearch/index'
import goToPage from '@/utils/goToPage'
const route = useRoute();
......@@ -883,23 +884,26 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件
const initParam = () => {
const hasQuery = Object.keys(route.query).length > 0;
const routeQuery = goToPage.getDecodedParams()
console.log('routeQuery', routeQuery);
const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) {
if (route.query.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList)
if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else {
selectedArea.value = route.query.domains ? [route.query.domains] : ['全部领域']
selectedArea.value = routeQuery.domains ? [routeQuery.domains] : ['全部领域']
}
if (route.query.selectedDate && Array.isArray(JSON.parse(route.query.selectedDate)) && JSON.parse(route.query.selectedDate).length) {
if (routeQuery.selectedDate && Array.isArray(JSON.parse(routeQuery.selectedDate)) && JSON.parse(routeQuery.selectedDate).length) {
selectedDate.value = '自定义'
customTime.value = JSON.parse(route.query.selectedDate)
customTime.value = JSON.parse(routeQuery.selectedDate)
}
selectedType.value = route.query.orgnizationName ? route.query.orgnizationName : '全部类别'
selectedType.value = routeQuery.orgnizationName ? routeQuery.orgnizationName : '全部类别'
const query = route.query;
const query = routeQuery;
if (Object.keys(query).length > 0) {
sessionStorage.setItem('mRListRouteQuery', JSON.stringify(query));
}
......@@ -919,29 +923,9 @@ const initParam = () => {
// 跳转企业详情
const handleClickToDetail = (curEntity) => {
window.sessionStorage.setItem("curTabName", curEntity.title);
const route = router.resolve({
name: "companyPages",
params: {
id: curEntity.organizationId
}
});
window.open(route.href, "_blank");
goToPage.goToCompanyPage(curEntity.organizationId, curEntity.title)
};
// 跳转机构详情
const handleOrgClick = item => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({
path: "/institution",
query: {
id: item.organizationId
}
});
window.open(route.href, "_blank");
};
// 导出
const handleExport = () => {
......
......@@ -151,6 +151,7 @@ import router from '@/router'
import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import goToPage from '@/utils/goToPage'
const route = useRoute();
......@@ -804,23 +805,26 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件
const initParam = () => {
const hasQuery = Object.keys(route.query).length > 0;
const routeQuery = goToPage.getDecodedParams()
console.log('routeQuery',routeQuery);
const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) {
if (route.query.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList)
if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else {
selectedArea.value = route.query.domains ? [route.query.domains] : ['全部领域']
selectedArea.value = routeQuery.domains ? [routeQuery.domains] : ['全部领域']
}
if (route.query.selectedDate && Array.isArray(JSON.parse(route.query.selectedDate)) && JSON.parse(route.query.selectedDate).length) {
if (routeQuery.selectedDate && Array.isArray(JSON.parse(routeQuery.selectedDate)) && JSON.parse(routeQuery.selectedDate).length) {
selectedDate.value = '自定义'
customTime.value = JSON.parse(route.query.selectedDate)
customTime.value = JSON.parse(routeQuery.selectedDate)
}
isInvolveCnOnly.value = route.query.isInvolveCnOnly ? true : false
isInvolveCnOnly.value = routeQuery.isInvolveCnOnly ? true : false
const query = route.query;
const query = routeQuery;
if (Object.keys(query).length > 0) {
sessionStorage.setItem('mRListEventRouteQuery', JSON.stringify(query));
}
......@@ -842,35 +846,13 @@ const initParam = () => {
}
// 跳转政令详情
const handleClickToDetail = (curDecree) => {
console.log('curDecree', curDecree);
window.sessionStorage.setItem("decreeId", curDecree.id);
window.sessionStorage.setItem("curTabName", curDecree.title);
const route = router.resolve({
path: "/decreeLayout",
query: {
id: curDecree.id
}
});
window.open(route.href, "_blank");
};
// 跳转机构详情
const handleOrgClick = item => {
// 跳转详情
const handleClickToDetail = (item) => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({
path: "/institution",
query: {
id: item.organizationId
}
});
window.open(route.href, "_blank");
};
// 导出
const handleExport = () => {
if (!selectedCount.value) {
......
......@@ -188,6 +188,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import { getProvinceList, getCountryList, getEntityTypes } from '@/api/comprehensiveSearch/index'
import goToPage from '@/utils/goToPage'
const route = useRoute();
......@@ -1063,34 +1064,37 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件
const initParam = () => {
const hasQuery = Object.keys(route.query).length > 0;
const routeQuery = goToPage.getDecodedParams()
console.log('routeQuery',routeQuery);
const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) {
if (route.query.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList)
if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else {
selectedArea.value = route.query.domains ? [route.query.domains] : ['全部领域']
selectedArea.value = routeQuery.domains ? [routeQuery.domains] : ['全部领域']
}
if (route.query.selectedDate && Array.isArray(JSON.parse(route.query.selectedDate)) && JSON.parse(route.query.selectedDate).length) {
if (routeQuery.selectedDate && Array.isArray(JSON.parse(routeQuery.selectedDate)) && JSON.parse(routeQuery.selectedDate).length) {
selectedDate.value = '自定义'
customTime.value = JSON.parse(route.query.selectedDate)
customTime.value = JSON.parse(routeQuery.selectedDate)
}
selectedProvince.value = route.query.selectedProvince ? provinceList.value.filter(item => item.name.indexOf(route.query.selectedProvince) > -1)[0].name : '全部省份'
selectedProvince.value = routeQuery.selectedProvince ? provinceList.value.filter(item => item.name.indexOf(routeQuery.selectedProvince) > -1)[0].name : '全部省份'
isHalfRule.value = route.query.isHalfRule === 'true' ? true : false
isHalfRule.value = routeQuery.isHalfRule === 'true' ? true : false
isCnEntityOnly.value = route.query.isCnEntityOnly ? true : false
isCnEntityOnly.value = routeQuery.isCnEntityOnly ? true : false
if (isCnEntityOnly.value) {
selectedCountry.value = '0101'
} else {
selectedCountry.value = route.query.selectedCountryId ? route.query.selectedCountryId : '全部国家'
selectedCountry.value = routeQuery.selectedCountryId ? routeQuery.selectedCountryId : '全部国家'
}
selectedEntityType.value = route.query.selectedEntityType ? entityTypeList.value.filter(item => item.name === route.query.selectedEntityType)[0].id : '全部实体类型'
selectedEntityType.value = routeQuery.selectedEntityType ? entityTypeList.value.filter(item => item.name === routeQuery.selectedEntityType)[0].id : '全部实体类型'
const query = route.query;
const query = routeQuery;
if (Object.keys(query).length > 0) {
sessionStorage.setItem('sDNListRouteQuery', JSON.stringify(query));
}
......@@ -1112,7 +1116,7 @@ const initParam = () => {
if (isCnEntityOnly.value) {
selectedCountry.value = '0101'
} else {
selectedCountry.value = route.query.selectedCountryId ? route.query.selectedCountryId : '全部国家'
selectedCountry.value = savedQuery.selectedCountryId ? routeQuery.selectedCountryId : '全部国家'
}
selectedEntityType.value = savedQuery.selectedEntityType ? entityTypeList.value.filter(item => item.name === savedQuery.selectedEntityType)[0].id : '全部实体类型'
......
......@@ -152,6 +152,7 @@ import router from '@/router'
import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import goToPage from '@/utils/goToPage'
const route = useRoute();
......@@ -805,23 +806,26 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件
const initParam = () => {
const hasQuery = Object.keys(route.query).length > 0;
const routeQuery = goToPage.getDecodedParams()
console.log('routeQuery',routeQuery);
const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) {
if (route.query.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList)
if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else {
selectedArea.value = route.query.domains ? [route.query.domains] : ['全部领域']
selectedArea.value = routeQuery.domains ? [routeQuery.domains] : ['全部领域']
}
if (route.query.selectedDate && Array.isArray(JSON.parse(route.query.selectedDate)) && JSON.parse(route.query.selectedDate).length) {
if (routeQuery.selectedDate && Array.isArray(JSON.parse(routeQuery.selectedDate)) && JSON.parse(routeQuery.selectedDate).length) {
selectedDate.value = '自定义'
customTime.value = JSON.parse(route.query.selectedDate)
customTime.value = JSON.parse(routeQuery.selectedDate)
}
isInvolveCnOnly.value = route.query.isInvolveCnOnly ? true : false
isInvolveCnOnly.value = routeQuery.isInvolveCnOnly ? true : false
const query = route.query;
const query = routeQuery;
if (Object.keys(query).length > 0) {
sessionStorage.setItem('sDNListEventRouteQuery', JSON.stringify(query));
}
......@@ -874,19 +878,6 @@ const handleClickToDetail = (curEntityEvent) => {
// window.open(routeData.href, "_blank");
};
// 跳转机构详情
const handleOrgClick = item => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({
path: "/institution",
query: {
id: item.organizationId
}
});
window.open(route.href, "_blank");
};
// 导出
const handleExport = () => {
......
......@@ -2,6 +2,12 @@
<div class="data-library-wrapper">
<div class="data-library-main">
<div class="data-library-sider">
<div class="sider-header">
<div class="logo">
<img src="@/assets/icons/overview/logo.png" alt="">
</div>
<div class="title text-title-1-show">{{ '数据资源库' }}</div>
</div>
<div class="sider-item-box" v-for="(item, index) in siderList" :key="index">
<div class="sider-item" @click="handleSiderItem(item)">
<div class="sider-icon">
......@@ -626,6 +632,24 @@ onBeforeUnmount(() => {
width: 320px;
background: rgb(255, 255, 255);
border-right: 1px solid rgba(234, 236, 238, 1);
.sider-header{
height: 64px;
display: flex;
gap: 23px;
align-items: center;
.logo{
margin-left: 24px;
width: 30px;
height: 30px;
img{
width: 100%;
height: 100%;
}
}
.title{
color: var(--color-primary-100);
}
}
.sider-item {
height: 54px;
......
......@@ -149,7 +149,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import { getProvinceList, getCountryList, getEntityTypes } from '@/api/comprehensiveSearch/index'
import goToPage from '@/utils/goToPage'
const route = useRoute();
// 图表/数据
......@@ -793,14 +793,15 @@ const initParam = () => {
// 跳转机构详情
const handleClickToDetail = (item) => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.originalTitle);
const route = router.resolve({
path: "/institution",
query: {
id: item.id
}
});
window.open(route.href, "_blank");
// window.sessionStorage.setItem("curTabName", item.originalTitle);
// const route = router.resolve({
// path: "/institution",
// query: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
goToPage.goToInstitution(item.id, item.originalTitle)
};
......
......@@ -154,6 +154,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange'
import { useGotoNewsDetail } from "@/router/modules/news";
import goToPage from '@/utils/goToPage'
const gotoNewsDetail = useGotoNewsDetail();
const route = useRoute();
......@@ -819,16 +820,11 @@ const initParam = () => {
const handleClickToDetail = (item) => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.originalTitle);
// window.sessionStorage.setItem("curTabName", item.originalTitle);
gotoNewsDetail(item.id);
// const route = router.resolve({
// path: "/newsAnalysis",
// query: {
// newsId: item.id
// }
// });
// window.open(route.href, "_blank");
// gotoNewsDetail(item.id);
goToPage.goToNewsPage(item.id, item.originalTitle)
};
// 导出
......
......@@ -156,6 +156,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus'
import { getPersonType, getCountryList, getThinkTankList } from "@/api/comprehensiveSearch/index"
import goToPage from '@/utils/goToPage'
const route = useRoute();
......@@ -872,28 +873,15 @@ const initParam = () => {
// 跳转人物详情
const handleClickToDetail = (item) => {
window.sessionStorage.setItem('curTabName', item.name)
const routeData = router.resolve({
path: "/characterPage",
query: {
personId: item.id
}
});
window.open(routeData.href, "_blank");
};
// 跳转机构详情
const handleOrgClick = item => {
console.log('item', item);
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({
path: "/institution",
query: {
id: item.organizationId
}
});
window.open(route.href, "_blank");
// window.sessionStorage.setItem('curTabName', item.name)
// const routeData = router.resolve({
// path: "/characterPage",
// query: {
// personId: item.id
// }
// });
// window.open(routeData.href, "_blank");
goToPage.goToCharacterPage(item.id, item.name)
};
// 导出
......
......@@ -172,13 +172,13 @@ import InputBox from "../components/InputBox/index.vue";
import DataChartSwitchBox from '../components/dataChartSwitchBox/index.vue'
import { useRoute } from "vue-router";
import router from "@/router";
import { getDecodedParams } from "@/utils/goToPage";
import { search, getThinkTankList } from "@/api/comprehensiveSearch";
import { ElMessage } from "element-plus";
import getDateRange from "@/utils/getDateRange";
import { getDepartmentList } from "@/api/decree/home";
import goToPage from "@/utils/goToPage";
const route = useRoute();
......@@ -911,9 +911,10 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件
const initParam = () => {
const hasQuery = Object.keys(route.query).length > 0;
const routeQuery = goToPage.getDecodedParams()
const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) {
const decodedQuery = route.query.data ? (getDecodedParams() || {}) : null;
const decodedQuery = route.query.data ? (goToPage.getDecodedParams() || {}) : null;
const query = decodedQuery && typeof decodedQuery === "object" ? decodedQuery : route.query;
if (query.selectedAreaList) {
......@@ -975,29 +976,31 @@ const encodeBase64Param = (val) => {
const handleClickToDetail = curReport => {
console.log("curReport", curReport);
window.sessionStorage.setItem("billId", curReport.id);
window.sessionStorage.setItem("curTabName", curReport.title);
const encodedId = encodeBase64Param(curReport?.id);
if (!encodedId) return;
const route = router.resolve({
name: "ReportDetail",
params: {
id: encodedId
}
});
window.open(route.href, "_blank");
// window.sessionStorage.setItem("billId", curReport.id);
// window.sessionStorage.setItem("curTabName", curReport.id);
// const encodedId = encodeBase64Param(curReport?.id);
// if (!encodedId) return;
// const route = router.resolve({
// name: "ReportDetail",
// params: {
// id: encodedId
// }
// });
// window.open(route.href, "_blank");
goToPage.goToThinkTankReport(curReport.id, curReport.id)
};
// 跳转智库详情
const handlePerClick = item => {
const curRoute = router.resolve({
name: "ThinkTankDetail",
params: {
id: item.organizationId,
name: item.organizationName
}
});
window.open(curRoute.href, "_blank");
// const curRoute = router.resolve({
// name: "ThinkTankDetail",
// params: {
// id: item.organizationId,
// name: item.organizationName
// }
// });
// window.open(curRoute.href, "_blank");
goToPage.goToThinkTank(item.organizationId, item.organizationName)
};
// 导出
......
......@@ -6,19 +6,19 @@
<div class="hard-num text-title-2-show">{{ organizationInfo.total }}</div>
<div style="width: 0px; flex: auto;"></div>
<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()" @clear="onAllOrganization()"
style="width:100%; height:100%;" :prefix-icon="Search" placeholder="搜索机构" clearable />
</div>
<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()" style="width:100%;">
<template #prefix>
<div class="icon1">
<img v-if="isSort" src="@/assets/icons/shengxu1.png" alt="" />
<img v-else src="@/assets/icons/jiangxu1.png" alt="" />
<img src="@/assets/icons/jiangxu1.png" alt="" />
<!-- <img src="@/assets/icons/shengxu1.png" alt="" /> -->
</div>
</template>
<el-option label="政令数量" :value="1" />
<el-option label="政令数据总量" :value="1" />
<el-option label="政令新增数量" :value="2" />
</el-select>
</div>
</div>
......@@ -30,13 +30,12 @@
<TimeTabPane @time-click="handleDateChange" activeTime="近一年" />
</div>
<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 in organizationInfo.list" :key="item.orgId">
<div class="item-left">
<img :src="item.orgImage || DefaultIcon2" alt="" />
</div>
<div class="item-right one-line-ellipsis">{{ item.orgName }}</div>
<div class="item-total">{{ item.total }}项</div>
<div class="item-right one-line-ellipsis text-click-hover" @click="handleToInstitution(item)">{{ item.orgName }}</div>
<div class="item-total text-click-hover" @click="handleToDataLibrary(item)">{{ item.total }}项</div>
<el-icon color="var(--color-primary-100)">
<ArrowRightBold />
</el-icon>
......@@ -50,17 +49,15 @@
</div>
</div>
<div class="back-bnt" @click="router.back()">
<el-icon>
<Back />
</el-icon>
<el-icon> <Back /> </el-icon>
<div style="margin-left: 6px;">返回</div>
</div>
</div>
</template>
<script setup name="index">
<script setup>
import { onMounted, reactive, ref } from "vue"
import { Search } from '@element-plus/icons-vue'
import { Search, Back } from '@element-plus/icons-vue'
import router from "@/router";
import TimeTabPane from '@/components/base/TimeTabPane/index.vue';
......@@ -112,9 +109,7 @@ const handleToInstitution = item => {
window.sessionStorage.setItem("curTabName", item.orgName);
const curRoute = router.resolve({
path: "/institution",
query: {
id: item.orgId
}
query: { id: item.orgId }
});
window.open(curRoute.href, "_blank");
// router.push({
......@@ -125,6 +120,15 @@ const handleToInstitution = item => {
// })
};
// 下钻至数据资源库
const handleToDataLibrary = (item) => {
const route = router.resolve({
path: "/dataLibrary/dataDecree",
query: { orgnizationName: item.orgName }
});
window.open(route.href, "_blank");
}
const refOrganization = ref()
onMounted(() => {
// 根据元素的高度决定分页显示的机构数量
......@@ -196,15 +200,14 @@ onMounted(() => {
background-color: var(--el-fill-color-blank);
border-radius: var(--el-border-radius-base);
box-shadow: 0 0 0 1px var(--el-border-color) inset;
box-sizing: border-box;
margin-left: 20px;
width: 160px;
height: 32px;
}
.hard-time {
height: 42px;
padding: 5px 0;
height: 32px;
width: 160px;
margin-left: 8px;
.icon1 {
width: 11px;
......@@ -269,7 +272,6 @@ onMounted(() => {
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
align-items: center;
justify-content: center;
cursor: pointer;
transition: transform 0.3s ease, box-shadow 0.3s ease;
position: relative;
......
import * as echarts from "echarts";
import { DOUBLECHARTCOLORS } from '@/common/constant'
import { hexToRgba } from '@/views/marketAccessRestrictions/utils/index.ts'
const getBarChart = (nameList, valueList) => {
const getSerie = (index, data) => {
return {
name: data[index].name,
type: 'bar',
data: data[index].list,
label: {
show: true,
position: 'top',
color: DOUBLECHARTCOLORS[index],
fontWeight: 'bold', // 文字加粗
fontSize: 14,
formatter: (params) => params.value,
},
barWidth: 20,
itemStyle: {
color: function (params) {
return new echarts.graphic.LinearGradient(0, 1, 0, 0,
[{
offset: 0,
color: hexToRgba(DOUBLECHARTCOLORS[index], 0.3)
},
{
offset: 1,
color: hexToRgba(DOUBLECHARTCOLORS[index], 1)
}
]);
},
barBorderRadius: 10,
}
}
}
const getBarChart = (dataX, dataY) => {
const option = {
color: DOUBLECHARTCOLORS,
legend: {
show: true,
top: 0,
icon: 'circle',
textStyle: {
color: 'rgba(95, 101, 108, 1)',
fontFamily: 'Microsoft YaHei',
fontSize: '14px',
}
},
tooltip: {},
grid: {
top: '8%',
......@@ -12,6 +57,8 @@ const getBarChart = (nameList, valueList) => {
},
yAxis: {
type: 'value',
name: '项',
nameTextStyle: { align: 'right' },
splitLine: {
show: true,
lineStyle: {
......@@ -34,7 +81,7 @@ const getBarChart = (nameList, valueList) => {
},
xAxis: {
type: 'category',
data: nameList,
data: dataX,
splitLine: {
show: false
},
......@@ -56,36 +103,7 @@ const getBarChart = (nameList, valueList) => {
}
}
},
series: [{
type: 'bar',
data: valueList,
label: {
show: true,
position: 'top',
color: 'rgba(5, 95, 194, 1)',
fontWeight: 'bold', // 文字加粗
fontSize: 14,
formatter: function (params) {
return params.value
},
},
barWidth: 20,
itemStyle: {
color: function (params) {
return new echarts.graphic.LinearGradient(0, 1, 0, 0,
[{
offset: 0,
color: 'rgba(10, 87, 166, 0)'
},
{
offset: 1,
color: 'rgba(5, 95, 194, 1)'
}
]);
},
barBorderRadius: 10,
}
}]
series: [ getSerie(0, dataY), getSerie(1, dataY) ]
}
return option
}
......
......@@ -3,7 +3,7 @@
<div class="box1">
<AnalysisBox title="相关政令" :showAllBtn="false">
<div class="box1-main" v-loading="isLoading">
<el-empty v-if="!siderList?.length" style="padding: 60px 0;" description="暂无数据" :image-size="100" />
<el-empty v-if="!siderList?.length" style="height: 100%;" description="暂无数据" :image-size="100" />
<el-scrollbar height="100%" always>
<div class="left-item" :class="{ 'item-active': false }" v-for="(item, index) in siderList" :key="index" @click="handleClickDecree(item)">
<div class="item-head">
......@@ -19,7 +19,7 @@
<div class="box2">
<AnalysisBox title="政令关系挖掘" :showAllBtn="false">
<div style="height: 100%; width: 100%;" v-loading="isLoading">
<el-empty v-if="!siderList?.length" style="padding: 60px 0;" description="暂无数据" :image-size="100" />
<el-empty v-if="!siderList?.length" style="height: 100%;" description="暂无数据" :image-size="100" />
<div class="box2-main" v-if="graphData.nodes?.length">
<GraphChart :nodes="graphData.nodes" :links="graphData.links" layoutType="force" @handleClickNode="handleClickNode" />
</div>
......
......@@ -2,7 +2,7 @@
<div class="layout-container">
<!-- 导航菜单 -->
<div class="layout-main">
<div class="header-main">
<div class="layout-head">
<div class="layout-main-header">
<div class="layout-main-header-container">
<div class="layout-main-header-left-box">
......@@ -65,7 +65,7 @@
</div>
</div>
</div>
<div class="layout-main-center">
<div class="layout-down">
<router-view />
</div>
</div>
......@@ -236,68 +236,7 @@ onMounted(() => {
height: 100%;
overflow: hidden;
overflow-y: auto;
.report {
padding: 10px 150px;
position: absolute;
left: 0;
top: 0;
z-index: 999999;
width: 100%;
height: 100%;
background: #f7f8f9;
.report-header {
width: 100%;
height: 50px;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Bold;
font-size: 20px;
font-weight: 700;
line-height: 50px;
letter-spacing: 0px;
text-align: left;
padding-left: 30px;
border-bottom: 1px solid rgba(234, 236, 238, 1);
}
.report-main {
display: flex;
height: calc(100% - 100px);
justify-content: space-between;
.left {
width: 800px;
.noContent {
height: 100px;
line-height: 100px;
text-align: center;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 20px;
font-weight: 400;
}
}
.right {
width: 800px;
.noContent {
height: 100px;
line-height: 100px;
text-align: center;
color: rgba(59, 65, 75, 1);
font-family: Microsoft YaHei;
font-style: Regular;
font-size: 20px;
font-weight: 400;
}
}
}
}
background-color: white;
.layout-main {
width: 100%;
......@@ -305,10 +244,10 @@ onMounted(() => {
display: flex;
flex-direction: column;
.header-main {
.layout-head {
width: 100%;
border-bottom: 1px solid rgba(234, 236, 238, 1);
box-shadow: 0px 0px 20px 0px rgba(25, 69, 130, 0.1);
border-bottom: 1px solid rgb(234, 236, 238);
box-shadow: 0 0 20px #1945821a;
background: rgba(255, 255, 255, 1);
}
......@@ -316,7 +255,6 @@ onMounted(() => {
width: 1600px;
height: 137px;
margin: 0 auto;
background: rgba(255, 255, 255, 1);
display: flex;
justify-content: space-between;
position: sticky;
......@@ -554,10 +492,9 @@ onMounted(() => {
}
}
.layout-main-center {
.layout-down {
height: 20px;
flex: auto;
background-color: #f7f8f9;
}
}
}
......
<template>
<div class="view-box">
<el-empty v-if="!listData?.length" style="padding: 60px 0" description="暂无数据" :image-size="100" />
<el-empty v-if="!listData?.length" style="height: 100%;" description="暂无数据" :image-size="100" />
<div
v-if="listData.length"
class="main-content-main"
......@@ -10,12 +10,8 @@
@mouseleave="handleMouseUp"
@mousemove="handleMouseMove"
>
<div
class="fishbone-container"
:style="{
transform: `translate(${translateX}px, ${translateY}px) scale(${scale})`,
transformOrigin: 'center center'
}"
<div class="fishbone-container"
:style="{ transform: `translate(${translateX}px, ${translateY}px) scale(${scale})` }"
>
<!-- 主轴上的标签 -->
<div class="main-line" :style="{ width: listData.length * 200 + 300 + 'px' }">
......@@ -152,18 +148,18 @@
</template>
<script setup name="ChartChain">
import { ref } from "vue";
import { onBeforeUnmount, ref, watch } from "vue";
import defaultIcon2 from "@/assets/icons/default-icon2.png";
import noticeIcon from "../assets/images/notice-icon.png";
const props = defineProps({
baseData: {
type: Object,
default: () => []
type: Array,
default: () => ([])
},
listData: {
type: Array,
default: () => []
default: () => ([])
}
});
......@@ -211,6 +207,15 @@ const handleMouseUp = () => {
};
// #endregion 移动功能处理
// 初始化布局
const watchInfo = watch(() => props.listData, val => {
scale.value = 1;
translateX.value = 0;
translateY.value = 0;
})
onBeforeUnmount(() => { watchInfo() });
// 奇数索引的数据组放在上方, 偶数索引的数据组放在下方
const onFilterData = num => {
return props.listData.filter((_, index) => index % 2 === num);
......@@ -247,9 +252,14 @@ const formatRate = (item, key) => {
align-items: center;
justify-content: center;
overflow: hidden;
-webkit-user-select: none; /* Safari/Chrome */
-moz-user-select: none; /* Firefox */
-ms-user-select: none; /* IE/Edge */
user-select: none; /* 标准语法 */
.fishbone-container {
position: relative;
transform-origin: center center;
.main-line {
height: 3px;
......
<template>
<div class="wrapper">
<div class="box1">
<div class="box1" v-loading="entityInfo.loading">
<AnalysisBox title="受影响实体" :showAllBtn="false">
<div class="box1-main">
<div class="data-filter">
......@@ -16,7 +16,7 @@
</div>
<div class="data-title">实体名称</div>
<div style="height: 20px; flex: auto;">
<el-empty v-if="!entityInfo.list?.length" style="padding: 60px 0;" description="暂无数据" :image-size="100" />
<el-empty v-if="!entityInfo.list?.length" style="height: 100%;" description="暂无数据" :image-size="100" />
<el-scrollbar height="100%" always>
<div class="list-data">
<div class="list-item" v-for="item in entityInfo.list" :key="item.id" :class="{ 'item-active': entityInfo.id==item.id }" @click="headerChartData(item)">
......@@ -49,7 +49,7 @@
</div>
</AnalysisBox>
</div>
<div class="box2">
<div class="box2" v-loading="box2Params.loading">
<AnalysisBox :showAllBtn="false">
<template #custom-title>
<div class="custom-title">
......@@ -80,8 +80,9 @@
<ChartChain :listData="fishbone.list" :baseData="fishbone.base" />
</div>
<div class="graph-box" v-if="contentType==2">
<GraphChart v-if="graphInfo.nodes?.length" :nodes="graphInfo.nodes" :links="graphInfo.links" layoutType="force" />
<el-empty v-else style="padding: 60px 0" description="暂无数据" :image-size="100" />
<!-- <GraphChart v-if="graphInfo.nodes?.length" :nodes="graphInfo.nodes" :links="graphInfo.links" layoutType="force" /> -->
<RelationChart v-if="graphInfo.nodes?.length" :graphData="graphInfo"></RelationChart>
<el-empty v-else style="height: 100%;" description="暂无数据" :image-size="100" />
</div>
</div>
</AnalysisBox>
......@@ -103,6 +104,7 @@ import {
import ChartChain from "./com/ChartChain.vue";
// import AiTips from "./com/AiTips.vue";
import GraphChart from "@/components/base/GraphChart/index.vue";
import RelationChart from "@/components/base/RelationChart/index.vue"
import defaultIcon2 from "@/assets/icons/default-icon2.png";
import noticeIcon from "./assets/images/notice-icon.png";
import icon422 from "./assets/images/icon422.png";
......@@ -134,6 +136,7 @@ const handleGetHylyList = async () => {
// 受影响实体
const entityInfo = reactive({
loading: false,
keyword: "",
pageSize: 10,
pageNum: 1,
......@@ -144,6 +147,7 @@ const entityInfo = reactive({
})
const onDecreeEntities = async (page=1) => {
entityInfo.pageNum = page;
entityInfo.loading = true;
try {
let params = {
id: route.query.id,
......@@ -154,19 +158,31 @@ const onDecreeEntities = async (page=1) => {
}
const res = await getDecreeEntities(params);
console.log("受影响实体:", res);
if (res.code === 200) {
if (res.code === 200 && res.data) {
entityInfo.list = res.data.companyInfos;
entityInfo.total = res.data.total;
if (entityInfo.total && entityInfo.list.every(item => item.id!=entityInfo.id)) {
headerChartData(entityInfo.list[0])
}
} else {
entityInfo.list = [];
entityInfo.total = 0;
fishbone.list = [];
graphInfo.nodes = [];
}
} catch (error) {
console.log("获取受影响实体失败", error);
entityInfo.list = [];
entityInfo.total = 0;
fishbone.list = [];
graphInfo.nodes = [];
}
entityInfo.loading = false;
};
const contentType = ref(1);
const box2Params = reactive({
loading: false,
})
const headerContentType = (type) => {
contentType.value = type;
if (!entityInfo.total) return;
......@@ -206,9 +222,7 @@ const onDecreeRelatedChain = async (id) => {
industryChain.list = res.data;
if (industryChain.list.length) onDecreeChainNodes(industryChain.list[0].id)
}
} catch (error) {
console.log("获取产业链失败", error);
}
} catch (error) {}
};
// 产业链鱼骨图
......@@ -217,6 +231,7 @@ const fishbone = reactive({
base: [],
})
const onDecreeChainNodes = async (id) => {
box2Params.loading = true;
industryChain.id = id;
try {
const res = await getDecreeChainNodes({ id });
......@@ -234,36 +249,61 @@ const onDecreeChainNodes = async (id) => {
}
})
fishbone.list = Object.values(obj);
console.log("fishbone.list:", fishbone.list);
fishbone.base = res.data.levelInfos.map((item, index) => {
return {...item, name: ['上游', '中游', '下游'][index]}
});
}
} catch (error) {
console.log("获取产业链鱼骨图失败", error);
}
} catch (error) {}
box2Params.loading = false;
};
// 实体关系
const graphInfo = reactive({
nodes: [],
links: [],
rootId: "",
});
const onDecreeRelatedEntitie = async (orgId) => {
box2Params.loading = true;
try {
const res = await getDecreeRelatedEntitie({ orgId, rule:false, withSanInfo:false });
console.log("实体关系:", res);
if (res.code === 200) {
let arr1 = res.data.parentOrgList.map(item => ({ ...item, level: 1 }))
let arr3 = res.data.childrenOrgList.map(item => ({ ...item, level: 3 }))
let arr1 = res.data.parentOrgList.map((item, index) => {
return {
id: `1-${index}`,
text: item.name,
description: item.description,
level: 1,
}
})
let arr3 = res.data.childrenOrgList.map((item, index) => {
return {
id: `3-${index}`,
text: item.name,
description: item.description,
level: 3,
}
})
graphInfo.links = [...arr1,...arr3].map(onFormatLink)
graphInfo.nodes = [...arr1,...arr3].map(onFormatNode)
graphInfo.nodes.unshift(onFormatNode({name:res.data.orgName, id:res.data.orgId}, -1))
graphInfo.links = [...arr1,...arr3].map((item => {
return {
from: '0-0',
to: item.id,
text: (item.level==1 ? '被' : '') + item.description,
fontColor: (item.level==1 ? '#ff954d' : '#218139'),
color: (item.level==1 ? '#fbf0e9' : '#e4eee7'),
textOffset_x: -20,
lineWidth: 5
}
}))
graphInfo.nodes = [...arr1,...arr3]
graphInfo.nodes.unshift({text:res.data.orgName, id:'0-0', level: 2})
graphInfo.rootId = '0-0'
console.log('graphInfo', graphInfo)
}
} catch (error) {
console.log("获取实体关系失败", error);
}
} catch (error) {}
box2Params.loading = false
}
const onFormatLink = (item, index) => {
return {
......@@ -448,10 +488,13 @@ onMounted(() => {
:deep(.header-icon) {
display: none;
}
:deep(.wrapper-header) {
padding-top: 8px;
}
.custom-title {
display: flex;
justify-content: space-between;
align-items: flex-end;
align-items: center;
width: 100%;
height: 100%;
padding: 0 20px;
......
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论