提交 feba9a93 authored 作者: coderBryanFu's avatar coderBryanFu

feat:update

上级 63b48244
流水线 #645 已失败 于阶段
in 37 秒
...@@ -102,6 +102,7 @@ import Tool1 from './tool1.svg' ...@@ -102,6 +102,7 @@ import Tool1 from './tool1.svg'
import Tool2 from './tool2.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";
import goToPage from "@/utils/goToPage";
const store = useWrittingAsstaintStore(); const store = useWrittingAsstaintStore();
let isShowSearchBar = computed(() => { let isShowSearchBar = computed(() => {
return store.isShowSearchBar; return store.isShowSearchBar;
...@@ -151,8 +152,8 @@ const handleGetSsoUserInfo = async () => { ...@@ -151,8 +152,8 @@ const handleGetSsoUserInfo = async () => {
}; };
// 概览页标题列表 // 概览页标题列表
const homeTitleList = computed(() => { const homeTitleList = ref(
const mainTitleList = [ [
{ {
name: "首页", name: "首页",
path: "/ZMOverView", path: "/ZMOverView",
...@@ -174,20 +175,7 @@ const homeTitleList = computed(() => { ...@@ -174,20 +175,7 @@ const homeTitleList = computed(() => {
path: "/dataLibrary", path: "/dataLibrary",
disabled: false disabled: false
}] }]
const dataLibraryTitleList = [{ )
name: "数据资源库",
path: "/dataLibrary",
disabled: false
}]
// if (route.path.includes('/dataLibrary')) {
// return dataLibraryTitleList
// } else {
// return mainTitleList
// }
return mainTitleList
});
const homeActiveTitleIndex = computed(() => { const homeActiveTitleIndex = computed(() => {
let activeIndex = 1 let activeIndex = 1
...@@ -406,8 +394,10 @@ const handleToModule = (item, index) => { ...@@ -406,8 +394,10 @@ const handleToModule = (item, index) => {
}; };
const handleClickTitle = (item, index) => { const handleClickTitle = (item, index) => {
if (index === 0 || index === 3) { if (index === 0) {
router.push(item.path) router.push(item.path)
} else if(index === 3) {
goToPage.goToDataLibrary()
} }
}; };
......
...@@ -11,7 +11,9 @@ export const goToCompanyPage = (id, tabName) => { ...@@ -11,7 +11,9 @@ export const goToCompanyPage = (id, tabName) => {
const base64 = btoa(encodeURIComponent(jsonStr)); const base64 = btoa(encodeURIComponent(jsonStr));
const route = router.resolve({ const route = router.resolve({
name: "companyPages", name: "companyPages",
params: base64 params: {
id: base64
}
}); });
window.open(route.href, "_blank"); window.open(route.href, "_blank");
} }
\ No newline at end of file
// 数据资源库 // 数据资源库
import router from "@/router/index"; import router from "@/router/index";
export const goToDataLibrary = () => {
const route = router.resolve({
path: "/dataLibrary",
});
window.open(route.href, "_blank");
}
// 跳转数据资源库-国家法案 // 跳转数据资源库-国家法案
export const goToDataCountryBill = (selectParam) => { export const goToDataCountryBill = (selectParam) => {
// const codeParam = new URLSearchParams(selectParam) // const codeParam = new URLSearchParams(selectParam)
......
...@@ -3,15 +3,15 @@ import router from "@/router/index"; ...@@ -3,15 +3,15 @@ import router from "@/router/index";
// 跳转新闻详情 // 跳转新闻详情
export const goToNewsPage = (id, tabName) => { export const goToNewsPage = (id, tabName) => {
window.sessionStorage.setItem("curTabName", tabName); window.sessionStorage.setItem("curTabName", tabName);
const param = { // const param = {
newsId: id // newsId: id
} // }
const jsonStr = JSON.stringify(param); // const jsonStr = JSON.stringify(param);
const base64 = btoa(encodeURIComponent(jsonStr)); const base64 = btoa(encodeURIComponent(id));
const route = router.resolve({ const route = router.resolve({
path: "/newsAnalysis", name: "newsDetail",
query: { params: {
data: base64 id: base64
} }
}); });
window.open(route.href, "_blank"); window.open(route.href, "_blank");
......
...@@ -11,17 +11,11 @@ export const goToCharacterPage = async (id, tabName) => { ...@@ -11,17 +11,11 @@ export const goToCharacterPage = async (id, tabName) => {
personId: id personId: id
} }
const param1 = { const param1 = {
personId: item.id personId: id
} }
const jsonStr1 = JSON.stringify(param1); const jsonStr1 = JSON.stringify(param1);
const base64_1 = btoa(encodeURIComponent(jsonStr1)); const base64_1 = btoa(encodeURIComponent(jsonStr1));
const param2 = {
personId: item.id
}
const jsonStr2 = JSON.stringify(param2);
const base64_2 = btoa(encodeURIComponent(jsonStr2));
// 先获取人物全局信息 // 先获取人物全局信息
try { try {
const res = await getPersonSummaryInfo(params) const res = await getPersonSummaryInfo(params)
...@@ -48,6 +42,12 @@ export const goToCharacterPage = async (id, tabName) => { ...@@ -48,6 +42,12 @@ export const goToCharacterPage = async (id, tabName) => {
window.open(route.href, "_blank"); window.open(route.href, "_blank");
return; return;
} }
const param2 = {
personId: id,
type: type
}
const jsonStr2 = JSON.stringify(param2);
const base64_2 = btoa(encodeURIComponent(jsonStr2));
const route = router.resolve({ const route = router.resolve({
path: "/characterPage", path: "/characterPage",
query: { query: {
......
...@@ -16,10 +16,11 @@ export const goToThinkTank = (id, tabName) => { ...@@ -16,10 +16,11 @@ export const goToThinkTank = (id, tabName) => {
// 跳转智库报告详情 // 跳转智库报告详情
export const goToThinkTankReport = (id, tabName) => { export const goToThinkTankReport = (id, tabName) => {
window.sessionStorage.setItem("curTabName", tabName); window.sessionStorage.setItem("curTabName", tabName);
const base64 = btoa(encodeURIComponent(id));
const route = router.resolve({ const route = router.resolve({
name: "ReportDetail", name: "ReportDetail",
params: { params: {
id: id id: base64
} }
}); });
window.open(route.href, "_blank"); window.open(route.href, "_blank");
......
...@@ -1155,7 +1155,7 @@ const initParam = () => { ...@@ -1155,7 +1155,7 @@ const initParam = () => {
const routeQuery = goToPage.getDecodedParams() const routeQuery = goToPage.getDecodedParams()
console.log('routeQuery',routeQuery); console.log('routeQuery',routeQuery);
const hasQuery = Object.keys(routeQuery).length > 0; const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) { if (hasQuery) {
if (routeQuery.selectedAreaList) { if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList) selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
...@@ -1213,30 +1213,11 @@ const initParam = () => { ...@@ -1213,30 +1213,11 @@ const initParam = () => {
// 跳转法案详情 // 跳转法案详情
const handleClickToDetail = (curBill) => { 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) goToPage.goToBill(curBill.id, curBill.title)
}; };
// 跳转人物详情 // 跳转人物详情
const handlePerClick = item => { 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) goToPage.goToCharacterPage(item.personId, item.sponsorPersonName)
}; };
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
</el-table-column> </el-table-column>
<el-table-column label="所属国家地区"> <el-table-column label="所属国家地区">
<template #default="scope"> <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> }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -172,6 +172,7 @@ import { ElMessage } from 'element-plus' ...@@ -172,6 +172,7 @@ import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange' import getDateRange from '@/utils/getDateRange'
import { getCountryList, getBusinessType } from '@/api/comprehensiveSearch/index' import { getCountryList, getBusinessType } from '@/api/comprehensiveSearch/index'
import goToPage from '@/utils/goToPage'
const route = useRoute(); const route = useRoute();
...@@ -1055,29 +1056,17 @@ const initParam = () => { ...@@ -1055,29 +1056,17 @@ const initParam = () => {
const handleClickToDetail = (item) => { const handleClickToDetail = (item) => {
console.log('item', item); console.log('item', item);
window.sessionStorage.setItem('curTabName', item.originalTitle) // window.sessionStorage.setItem('curTabName', item.originalTitle)
const route = router.resolve({ // const route = router.resolve({
name: "companyPages", // name: "companyPages",
params: { // params: {
id: item.id // id: item.id
} // }
}); // });
window.open(route.href, "_blank"); // 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 = () => { const handleExport = () => {
......
...@@ -977,7 +977,7 @@ const handleDownloadCurChartData = () => { ...@@ -977,7 +977,7 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件 // 跳转到当前页 初始化筛选条件
const initParam = () => { const initParam = () => {
const routeQuery = goToPage.getDecodedParams() const routeQuery = goToPage.getDecodedParams()
const hasQuery = Object.keys(routeQuery).length > 0; const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) { if (hasQuery) {
if (routeQuery.selectedAreaList) { if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList) selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
...@@ -1025,30 +1025,13 @@ const initParam = () => { ...@@ -1025,30 +1025,13 @@ const initParam = () => {
// 跳转政令详情 // 跳转政令详情
const handleClickToDetail = (curDecree) => { const handleClickToDetail = (curDecree) => {
console.log('curDecree', curDecree); console.log('curDecree', curDecree);
goToPage.goToDecree(curDecree.id, curDecree.title)
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 handleOrgClick = item => {
console.log('item', item); console.log('item', item);
goToPage.goToInstitution(item.id, item.title)
window.sessionStorage.setItem("curTabName", item.organizationName);
const route = router.resolve({
path: "/institution",
query: {
id: item.organizationId
}
});
window.open(route.href, "_blank");
}; };
// 导出 // 导出
......
...@@ -115,7 +115,7 @@ ...@@ -115,7 +115,7 @@
<el-table-column type="selection" width="40" /> <el-table-column type="selection" width="40" />
<el-table-column label="物项名称"> <el-table-column label="物项名称">
<template #default="scope"> <template #default="scope">
<span class="title-item text-compact-bold" @click="handleClickToDetail(scope.row)">{{ <span class="title-item text-compact-bold">{{
scope.row.originalTitle scope.row.originalTitle
}}</span> }}</span>
</template> </template>
...@@ -922,7 +922,7 @@ const handleDownloadCurChartData = () => { ...@@ -922,7 +922,7 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件 // 跳转到当前页 初始化筛选条件
const initParam = () => { const initParam = () => {
const routeQuery = goToPage.getDecodedParams() const routeQuery = goToPage.getDecodedParams()
const hasQuery = Object.keys(routeQuery).length > 0; const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) { if (hasQuery) {
if (routeQuery.selectedAreaList) { if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList) selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
...@@ -960,25 +960,6 @@ const initParam = () => { ...@@ -960,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 = () => { const handleExport = () => {
if (!selectedCount.value) { if (!selectedCount.value) {
...@@ -1278,12 +1259,12 @@ onMounted(async () => { ...@@ -1278,12 +1259,12 @@ onMounted(async () => {
.title-item { .title-item {
color: var(--text-primary-80-color); color: var(--text-primary-80-color);
cursor: pointer; // cursor: pointer;
&:hover { // &:hover {
color: var(--color-primary-100); // color: var(--color-primary-100);
text-decoration: underline; // text-decoration: underline;
} // }
} }
.person-item { .person-item {
......
...@@ -114,7 +114,7 @@ ...@@ -114,7 +114,7 @@
<el-table-column type="selection" width="40" /> <el-table-column type="selection" width="40" />
<el-table-column label="事件名称"> <el-table-column label="事件名称">
<template #default="scope"> <template #default="scope">
<span class="title-item text-compact-bold" @click="handleClickToDetail(scope.row)">{{ <span class="title-item text-compact-bold">{{
scope.row.originalTitle scope.row.originalTitle
}}</span> }}</span>
</template> </template>
...@@ -805,7 +805,7 @@ const handleDownloadCurChartData = () => { ...@@ -805,7 +805,7 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件 // 跳转到当前页 初始化筛选条件
const initParam = () => { const initParam = () => {
const routeQuery = goToPage.getDecodedParams() const routeQuery = goToPage.getDecodedParams()
const hasQuery = Object.keys(routeQuery).length > 0; const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) { if (hasQuery) {
if (routeQuery.selectedAreaList) { if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList) selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
...@@ -843,25 +843,6 @@ const initParam = () => { ...@@ -843,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 = () => { const handleExport = () => {
if (!selectedCount.value) { if (!selectedCount.value) {
...@@ -1158,12 +1139,12 @@ onMounted(async () => { ...@@ -1158,12 +1139,12 @@ onMounted(async () => {
.title-item { .title-item {
color: var(--text-primary-80-color); color: var(--text-primary-80-color);
cursor: pointer; // cursor: pointer;
&:hover { // &:hover {
color: var(--color-primary-100); // color: var(--color-primary-100);
text-decoration: underline; // text-decoration: underline;
} // }
} }
.person-item { .person-item {
......
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
</el-table-column> </el-table-column>
<el-table-column label="上市地点"> <el-table-column label="上市地点">
<template #default="scope"> <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> }}</span>
</template> </template>
</el-table-column> </el-table-column>
...@@ -1064,7 +1064,7 @@ const handleDownloadCurChartData = () => { ...@@ -1064,7 +1064,7 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件 // 跳转到当前页 初始化筛选条件
const initParam = () => { const initParam = () => {
const routeQuery = goToPage.getDecodedParams() const routeQuery = goToPage.getDecodedParams()
const hasQuery = Object.keys(routeQuery).length > 0; const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) { if (hasQuery) {
if (routeQuery.selectedAreaList) { if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList) selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
...@@ -1113,7 +1113,7 @@ const initParam = () => { ...@@ -1113,7 +1113,7 @@ const initParam = () => {
if (isCnEntityOnly.value) { if (isCnEntityOnly.value) {
selectedCountry.value = '0101' selectedCountry.value = '0101'
} else { } else {
selectedCountry.value = routeQuery.selectedCountryId ? routeQuery.selectedCountryId : '全部国家' selectedCountry.value = savedQuery.selectedCountryId ? routeQuery.selectedCountryId : '全部国家'
} }
selectedEntityType.value = savedQuery.selectedEntityType ? entityTypeList.value.filter(item => item.name === savedQuery.selectedEntityType)[0].id : '全部实体类型' selectedEntityType.value = savedQuery.selectedEntityType ? entityTypeList.value.filter(item => item.name === savedQuery.selectedEntityType)[0].id : '全部实体类型'
...@@ -1136,29 +1136,16 @@ watch( ...@@ -1136,29 +1136,16 @@ watch(
const handleClickToDetail = (curEntity) => { const handleClickToDetail = (curEntity) => {
console.log('curEntity', curEntity); console.log('curEntity', curEntity);
window.sessionStorage.setItem("decreeId", curEntity.id); // window.sessionStorage.setItem("decreeId", curEntity.id);
window.sessionStorage.setItem("curTabName", curEntity.title); // window.sessionStorage.setItem("curTabName", curEntity.title);
const route = router.resolve({ // const route = router.resolve({
name: "companyPages", // name: "companyPages",
params: { // params: {
id: curEntity.organizationId // id: curEntity.organizationId
} // }
}); // });
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
}; goToPage.goToCompanyPage(curEntity.id, 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");
}; };
// 导出 // 导出
......
...@@ -809,7 +809,7 @@ const initParam = () => { ...@@ -809,7 +809,7 @@ const initParam = () => {
const routeQuery = goToPage.getDecodedParams() const routeQuery = goToPage.getDecodedParams()
console.log('routequery', routeQuery); console.log('routequery', routeQuery);
const hasQuery = Object.keys(routeQuery).length > 0; const hasQuery = routeQuery ? Object.keys(routeQuery).length > 0 : false
if (hasQuery) { if (hasQuery) {
if (routeQuery.selectedAreaList) { if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(routeQuery.selectedAreaList) selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
...@@ -851,30 +851,17 @@ const initParam = () => { ...@@ -851,30 +851,17 @@ const initParam = () => {
const handleClickToDetail = (item) => { const handleClickToDetail = (item) => {
console.log('curEntityEvent', item); console.log('curEntityEvent', item);
window.sessionStorage.setItem("curTabName", `${item.date}《${item.originalTitle}》`); // window.sessionStorage.setItem("curTabName", `${item.date}《${item.originalTitle}》`);
const route = router.resolve({ // const route = router.resolve({
path: "/exportControl/singleSanction", // path: "/exportControl/singleSanction",
query: { // query: {
id: item.id, // id: item.id,
sanTypeId: 1, // sanTypeId: 1,
date: item.date // date: item.date
} // }
}); // });
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
}; goToPage.goToSingleEntityEvent(item.id,`${item.date}《${item.originalTitle}》`, item.date)
// 跳转机构详情
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");
}; };
// 导出 // 导出
......
...@@ -161,6 +161,7 @@ import { search } from '@/api/comprehensiveSearch' ...@@ -161,6 +161,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange' import getDateRange from '@/utils/getDateRange'
import { getMaterialCategory, getControlReason } from '@/api/comprehensiveSearch/index' import { getMaterialCategory, getControlReason } from '@/api/comprehensiveSearch/index'
import goToPage from '@/utils/goToPage'
const route = useRoute(); const route = useRoute();
...@@ -883,23 +884,26 @@ const handleDownloadCurChartData = () => { ...@@ -883,23 +884,26 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件 // 跳转到当前页 初始化筛选条件
const initParam = () => { 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 (hasQuery) {
if (route.query.selectedAreaList) { if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList) selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else { } 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 = '自定义' 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) { if (Object.keys(query).length > 0) {
sessionStorage.setItem('mRListRouteQuery', JSON.stringify(query)); sessionStorage.setItem('mRListRouteQuery', JSON.stringify(query));
} }
...@@ -919,29 +923,9 @@ const initParam = () => { ...@@ -919,29 +923,9 @@ const initParam = () => {
// 跳转企业详情 // 跳转企业详情
const handleClickToDetail = (curEntity) => { const handleClickToDetail = (curEntity) => {
window.sessionStorage.setItem("curTabName", curEntity.title); goToPage.goToCompanyPage(curEntity.organizationId, 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");
};
// 导出 // 导出
const handleExport = () => { const handleExport = () => {
......
...@@ -151,6 +151,7 @@ import router from '@/router' ...@@ -151,6 +151,7 @@ import router from '@/router'
import { search } from '@/api/comprehensiveSearch' import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange' import getDateRange from '@/utils/getDateRange'
import goToPage from '@/utils/goToPage'
const route = useRoute(); const route = useRoute();
...@@ -804,23 +805,26 @@ const handleDownloadCurChartData = () => { ...@@ -804,23 +805,26 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件 // 跳转到当前页 初始化筛选条件
const initParam = () => { 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 (hasQuery) {
if (route.query.selectedAreaList) { if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList) selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else { } 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 = '自定义' 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) { if (Object.keys(query).length > 0) {
sessionStorage.setItem('mRListEventRouteQuery', JSON.stringify(query)); sessionStorage.setItem('mRListEventRouteQuery', JSON.stringify(query));
} }
...@@ -842,35 +846,13 @@ const initParam = () => { ...@@ -842,35 +846,13 @@ const initParam = () => {
} }
// 跳转政令详情 // 跳转详情
const handleClickToDetail = (curDecree) => { const handleClickToDetail = (item) => {
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 => {
console.log('item', 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 = () => { const handleExport = () => {
if (!selectedCount.value) { if (!selectedCount.value) {
......
...@@ -188,6 +188,7 @@ import { search } from '@/api/comprehensiveSearch' ...@@ -188,6 +188,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange' import getDateRange from '@/utils/getDateRange'
import { getProvinceList, getCountryList, getEntityTypes } from '@/api/comprehensiveSearch/index' import { getProvinceList, getCountryList, getEntityTypes } from '@/api/comprehensiveSearch/index'
import goToPage from '@/utils/goToPage'
const route = useRoute(); const route = useRoute();
...@@ -1063,34 +1064,37 @@ const handleDownloadCurChartData = () => { ...@@ -1063,34 +1064,37 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件 // 跳转到当前页 初始化筛选条件
const initParam = () => { 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 (hasQuery) {
if (route.query.selectedAreaList) { if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList) selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else { } 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 = '自定义' 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) { if (isCnEntityOnly.value) {
selectedCountry.value = '0101' selectedCountry.value = '0101'
} else { } 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) { if (Object.keys(query).length > 0) {
sessionStorage.setItem('sDNListRouteQuery', JSON.stringify(query)); sessionStorage.setItem('sDNListRouteQuery', JSON.stringify(query));
} }
...@@ -1112,7 +1116,7 @@ const initParam = () => { ...@@ -1112,7 +1116,7 @@ const initParam = () => {
if (isCnEntityOnly.value) { if (isCnEntityOnly.value) {
selectedCountry.value = '0101' selectedCountry.value = '0101'
} else { } 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 : '全部实体类型' selectedEntityType.value = savedQuery.selectedEntityType ? entityTypeList.value.filter(item => item.name === savedQuery.selectedEntityType)[0].id : '全部实体类型'
......
...@@ -152,6 +152,7 @@ import router from '@/router' ...@@ -152,6 +152,7 @@ import router from '@/router'
import { search } from '@/api/comprehensiveSearch' import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange' import getDateRange from '@/utils/getDateRange'
import goToPage from '@/utils/goToPage'
const route = useRoute(); const route = useRoute();
...@@ -805,23 +806,26 @@ const handleDownloadCurChartData = () => { ...@@ -805,23 +806,26 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件 // 跳转到当前页 初始化筛选条件
const initParam = () => { 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 (hasQuery) {
if (route.query.selectedAreaList) { if (routeQuery.selectedAreaList) {
selectedArea.value = JSON.parse(route.query.selectedAreaList) selectedArea.value = JSON.parse(routeQuery.selectedAreaList)
} else { } 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 = '自定义' 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) { if (Object.keys(query).length > 0) {
sessionStorage.setItem('sDNListEventRouteQuery', JSON.stringify(query)); sessionStorage.setItem('sDNListEventRouteQuery', JSON.stringify(query));
} }
...@@ -874,19 +878,6 @@ const handleClickToDetail = (curEntityEvent) => { ...@@ -874,19 +878,6 @@ const handleClickToDetail = (curEntityEvent) => {
// window.open(routeData.href, "_blank"); // 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 = () => { const handleExport = () => {
......
...@@ -149,7 +149,7 @@ import { search } from '@/api/comprehensiveSearch' ...@@ -149,7 +149,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange' import getDateRange from '@/utils/getDateRange'
import { getProvinceList, getCountryList, getEntityTypes } from '@/api/comprehensiveSearch/index' import { getProvinceList, getCountryList, getEntityTypes } from '@/api/comprehensiveSearch/index'
import goToPage from '@/utils/goToPage'
const route = useRoute(); const route = useRoute();
// 图表/数据 // 图表/数据
...@@ -793,14 +793,15 @@ const initParam = () => { ...@@ -793,14 +793,15 @@ const initParam = () => {
// 跳转机构详情 // 跳转机构详情
const handleClickToDetail = (item) => { const handleClickToDetail = (item) => {
console.log('item', item); console.log('item', item);
window.sessionStorage.setItem("curTabName", item.originalTitle); // window.sessionStorage.setItem("curTabName", item.originalTitle);
const route = router.resolve({ // const route = router.resolve({
path: "/institution", // path: "/institution",
query: { // query: {
id: item.id // id: item.id
} // }
}); // });
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
goToPage.goToInstitution(item.id, item.originalTitle)
}; };
......
...@@ -154,6 +154,7 @@ import { search } from '@/api/comprehensiveSearch' ...@@ -154,6 +154,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange' import getDateRange from '@/utils/getDateRange'
import { useGotoNewsDetail } from "@/router/modules/news"; import { useGotoNewsDetail } from "@/router/modules/news";
import goToPage from '@/utils/goToPage'
const gotoNewsDetail = useGotoNewsDetail(); const gotoNewsDetail = useGotoNewsDetail();
const route = useRoute(); const route = useRoute();
...@@ -819,16 +820,11 @@ const initParam = () => { ...@@ -819,16 +820,11 @@ const initParam = () => {
const handleClickToDetail = (item) => { const handleClickToDetail = (item) => {
console.log('item', item); console.log('item', item);
window.sessionStorage.setItem("curTabName", item.originalTitle); // window.sessionStorage.setItem("curTabName", item.originalTitle);
gotoNewsDetail(item.id); // gotoNewsDetail(item.id);
// const route = router.resolve({
// path: "/newsAnalysis", goToPage.goToNewsPage(item.id, item.originalTitle)
// query: {
// newsId: item.id
// }
// });
// window.open(route.href, "_blank");
}; };
// 导出 // 导出
......
...@@ -156,6 +156,7 @@ import { search } from '@/api/comprehensiveSearch' ...@@ -156,6 +156,7 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { getPersonType, getCountryList, getThinkTankList } from "@/api/comprehensiveSearch/index" import { getPersonType, getCountryList, getThinkTankList } from "@/api/comprehensiveSearch/index"
import goToPage from '@/utils/goToPage'
const route = useRoute(); const route = useRoute();
...@@ -872,28 +873,15 @@ const initParam = () => { ...@@ -872,28 +873,15 @@ const initParam = () => {
// 跳转人物详情 // 跳转人物详情
const handleClickToDetail = (item) => { const handleClickToDetail = (item) => {
window.sessionStorage.setItem('curTabName', item.name) // window.sessionStorage.setItem('curTabName', item.name)
const routeData = router.resolve({ // const routeData = router.resolve({
path: "/characterPage", // path: "/characterPage",
query: { // query: {
personId: item.id // personId: item.id
} // }
}); // });
window.open(routeData.href, "_blank"); // window.open(routeData.href, "_blank");
}; goToPage.goToCharacterPage(item.id, item.name)
// 跳转机构详情
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");
}; };
// 导出 // 导出
......
...@@ -911,7 +911,8 @@ const handleDownloadCurChartData = () => { ...@@ -911,7 +911,8 @@ const handleDownloadCurChartData = () => {
// 跳转到当前页 初始化筛选条件 // 跳转到当前页 初始化筛选条件
const initParam = () => { 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 (hasQuery) {
const decodedQuery = route.query.data ? (goToPage.getDecodedParams() || {}) : null; const decodedQuery = route.query.data ? (goToPage.getDecodedParams() || {}) : null;
const query = decodedQuery && typeof decodedQuery === "object" ? decodedQuery : route.query; const query = decodedQuery && typeof decodedQuery === "object" ? decodedQuery : route.query;
...@@ -975,29 +976,31 @@ const encodeBase64Param = (val) => { ...@@ -975,29 +976,31 @@ const encodeBase64Param = (val) => {
const handleClickToDetail = curReport => { const handleClickToDetail = curReport => {
console.log("curReport", curReport); console.log("curReport", curReport);
window.sessionStorage.setItem("billId", curReport.id); // window.sessionStorage.setItem("billId", curReport.id);
window.sessionStorage.setItem("curTabName", curReport.title); // window.sessionStorage.setItem("curTabName", curReport.id);
const encodedId = encodeBase64Param(curReport?.id); // const encodedId = encodeBase64Param(curReport?.id);
if (!encodedId) return; // if (!encodedId) return;
const route = router.resolve({ // const route = router.resolve({
name: "ReportDetail", // name: "ReportDetail",
params: { // params: {
id: encodedId // id: encodedId
} // }
}); // });
window.open(route.href, "_blank"); // window.open(route.href, "_blank");
goToPage.goToThinkTankReport(curReport.id, curReport.id)
}; };
// 跳转智库详情 // 跳转智库详情
const handlePerClick = item => { const handlePerClick = item => {
const curRoute = router.resolve({ // const curRoute = router.resolve({
name: "ThinkTankDetail", // name: "ThinkTankDetail",
params: { // params: {
id: item.organizationId, // id: item.organizationId,
name: item.organizationName // name: item.organizationName
} // }
}); // });
window.open(curRoute.href, "_blank"); // window.open(curRoute.href, "_blank");
goToPage.goToThinkTank(item.organizationId, item.organizationName)
}; };
// 导出 // 导出
......
...@@ -43,13 +43,6 @@ ...@@ -43,13 +43,6 @@
</el-tooltip> </el-tooltip>
</div> </div>
<!-- <div class="ai-btn" @click="openAiBox">
<div class="icon">
<img src="@/assets/icons/ai-icon.png" alt="" />
</div>
<div class="text">智能问答</div>
</div> -->
<div class="ai-dialog" v-if="isShowAiBox"> <div class="ai-dialog" v-if="isShowAiBox">
<AiBox @close="closeAiBox" /> <AiBox @close="closeAiBox" />
</div> </div>
...@@ -86,10 +79,6 @@ const closeAiBox = () => { ...@@ -86,10 +79,6 @@ const closeAiBox = () => {
isShowAiBox.value = false; isShowAiBox.value = false;
}; };
const openAiBox = () => {
isShowAiBox.value = true;
};
const personTypeList = ref([]); const personTypeList = ref([]);
// 获取人物类别 // 获取人物类别
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论