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

页面跳转

上级 95cb197b
......@@ -91,6 +91,8 @@ import Fishbone from "./fishbone.vue";
import { getHorizontalBarChart2 } from "../../utils/charts";
import { getDomainDistribution, getChainEntities, getChainInfoByDomainId, getCnEntityOnChain } from "@/api/exportControl";
import { useRoute, useRouter } from "vue-router";
import { useGotoCompanyPages } from "@/router/modules/company";
const gotoCompanyPages = useGotoCompanyPages();
const route = useRoute();
const router = useRouter();
const buttonList = ref([]);
......@@ -155,13 +157,14 @@ const listData = ref([
const horizontalBarOptions = shallowRef({});
const handleEttClick = item => {
const route = router.resolve({
name: "companyPages",
params: {
id: item.id
}
});
window.open(route.href, "_blank");
// const route = router.resolve({
// name: "companyPages",
// params: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
gotoCompanyPages(item.id);
};
// 处理点击事件
const handleChainClick = async chainId => {};
......
......@@ -95,6 +95,8 @@ import Hint from "./hint.vue";
import { getEntitiesChangeCount, getEntitiesGrowthTrend, getEntitiesUpdateCount, getKeyEntityList } from "@/api/exportControl";
import _ from "lodash";
import { useRoute, useRouter } from "vue-router";
import { useGotoCompanyPages } from "@/router/modules/company";
const gotoCompanyPages = useGotoCompanyPages();
const route = useRoute();
const router = useRouter();
const line1Option = shallowRef({});
......@@ -341,13 +343,14 @@ const handleDomainChange = async domain => {
const handleOrgClick = item => {
console.log(item);
const route = router.resolve({
name: "companyPages",
params: {
id: item.id
}
});
window.open(route.href, "_blank");
// const route = router.resolve({
// name: "companyPages",
// params: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
gotoCompanyPages(item.id);
};
</script>
......
......@@ -74,6 +74,8 @@ import _ from "lodash";
import Hint from "./hint.vue";
import { getEntityFinancing, getEntityMarketValue, getKeyListedEntityList, getSanStrength } from "@/api/exportControl";
import { useRoute, useRouter } from "vue-router";
import { useGotoCompanyPages } from "@/router/modules/company";
const gotoCompanyPages = useGotoCompanyPages();
const route = useRoute();
const router = useRouter();
const value3 = ref("");
......@@ -304,13 +306,14 @@ watch(
const handleOrgClick = item => {
console.log(item);
const route = router.resolve({
name: "companyPages",
params: {
id: item.id
}
});
window.open(route.href, "_blank");
// const route = router.resolve({
// name: "companyPages",
// params: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
gotoCompanyPages(item.id);
};
</script>
......
......@@ -200,6 +200,8 @@ import {
import _ from "lodash";
import { useRoute, useRouter } from "vue-router";
import { formatAnyDateToChinese } from "../../utils";
import { useGotoCompanyPages } from "@/router/modules/company";
const gotoCompanyPages = useGotoCompanyPages();
const route = useRoute();
const router = useRouter();
const organizationInfo = shallowRef({});
......@@ -406,13 +408,14 @@ const panel5TypeMap = {
const handleOrgClick = item => {
console.log(item);
if (item.entityType != 2) return;
const route = router.resolve({
name: "companyPages",
params: {
id: item.id
}
});
window.open(route.href, "_blank");
// const route = router.resolve({
// name: "companyPages",
// params: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
gotoCompanyPages(item.id);
};
// 处理"查看更多"点击事件
......
......@@ -715,6 +715,10 @@ import { ElMessage, ElMessageBox } from "element-plus";
import { DArrowRight, Warning, Search } from "@element-plus/icons-vue";
import EChart from "@/components/Chart/index.vue";
import { TAGTYPE } from "@/public/constant";
import { useGotoCompanyPages } from "@/router/modules/company";
import { useGotoNewsDetail } from "@/router/modules/news";
const gotoCompanyPages = useGotoCompanyPages();
const gotoNewsDetail = useGotoNewsDetail();
import { useRouter } from "vue-router";
......@@ -868,14 +872,15 @@ const handleCompClick = item => {
// console.log("item", item);
// if (item.entityType != 2) return;
window.sessionStorage.setItem("curTabName", item.name);
const route = router.resolve({
name: "companyPages",
params: {
id: item.id,
sanTypeId: item.sanTypeId
}
});
window.open(route.href, "_blank");
gotoCompanyPages(item.entityId);
// const route = router.resolve({
// name: "companyPages",
// params: {
// id: item.id,
// sanTypeId: item.sanTypeId
// }
// });
// window.open(route.href, "_blank");
};
const tagsType = ["primary", "success", "warning", "danger"];
......@@ -1075,14 +1080,15 @@ const processYearDomainCountData = yearDomainCountData => {
const handleEntityClick = item => {
console.log("item", item);
window.sessionStorage.setItem("curTabName", item.name || item.entityNameZh);
const route = router.resolve({
name: "companyPages",
params: {
// startTime: item.startTime,
id: item.entityId
}
});
window.open(route.href, "_blank");
gotoCompanyPages(item.entityId);
// const route = router.resolve({
// name: "companyPages",
// params: {
// // startTime: item.startTime,
// id: item.entityId
// }
// });
// window.open(route.href, "_blank");
};
const carouselRef = ref(null);
......@@ -1738,14 +1744,15 @@ const handleToMoreNews = () => {
const handleNewsInfoClick = item => {
console.log("点击了社交媒体消息的更多信息:", item);
const route = router.resolve({
path: "/newsAnalysis",
query: {
newsId: item.newsId
}
});
window.open(route.href, "_blank");
// 应该跳转至哪儿???
// const route = router.resolve({
// path: "/newsAnalysis",
// query: {
// newsId: item.newsId
// }
// });
// window.open(route.href, "_blank");
gotoNewsDetail(item.newsId);
};
// 切换当前出口管制政策
......
......@@ -82,7 +82,8 @@ import { ref, computed, watch } from "vue";
import router from "@/router";
import { Close } from "@element-plus/icons-vue";
import defaultIcon from "@/assets/icons/default-icon1.png";
import { useGotoCompanyPages } from "@/router/modules/company";
const gotoCompanyPages = useGotoCompanyPages();
const props = defineProps({
modelValue: {
type: Boolean,
......@@ -119,9 +120,9 @@ const tableData = computed(() => {
...item,
name: item.orgName,
domains: item.techDomains || [],
equityRatio: item.equityRatio ? (item.equityRatio * 100).toFixed(2) + '%' : '--',
location: '--',
revenue: item.revenue || '--'
equityRatio: item.equityRatio ? (item.equityRatio * 100).toFixed(2) + "%" : "--",
location: "--",
revenue: item.revenue || "--"
}));
});
......@@ -154,16 +155,16 @@ const getTagStyle = tag => {
// 跳转公司详情页
const handleCompClick = item => {
console.log("item", item);
window.sessionStorage.setItem('curTabName', item.entityNameZh || item.entityName)
const route = router.resolve({
name: "companyPages",
params: {
id: item.id
}
});
window.open(route.href, "_blank");
window.sessionStorage.setItem("curTabName", item.entityNameZh || item.entityName);
gotoCompanyPages(item.id);
// const route = router.resolve({
// name: "companyPages",
// params: {
// id: item.id
// }
// });
// window.open(route.href, "_blank");
};
</script>
<style lang="scss" scoped>
......
......@@ -231,20 +231,22 @@ import defaultIcon from "../../../../../assets/icons/default-avatar.png";
import RuleSubsidiaryDialog from "./RuleSubsidiaryDialog.vue";
import { getExportControlList, get50PercentEntityCount } from "@/api/exportControlV2.0.js";
import CommonPrompt from "@/views/exportControl/commonPrompt/index.vue";
import { useGotoCompanyPages } from "@/router/modules/company";
const gotoCompanyPages = useGotoCompanyPages();
const router = useRouter();
// 跳转公司详情页
const handleCompClick = item => {
console.log("item", item);
window.sessionStorage.setItem("curTabName", item.entityNameZh || item.entityName);
const route = router.resolve({
name: "companyPages",
params: {
id: item.entityId
}
});
window.open(route.href, "_blank");
// const route = router.resolve({
// name: "companyPages",
// params: {
// id: item.entityId
// }
// });
// window.open(route.href, "_blank");
gotoCompanyPages(item.entityId);
};
const searchKeyword = ref("");
......
......@@ -231,6 +231,9 @@ import {
import RuleSubsidiaryDialog from "../../../v2.0EntityList/components/sanctionsOverview/components/listPage/RuleSubsidiaryDialog.vue";
import { useRoute } from "vue-router";
import { useGotoCompanyPages } from "@/router/modules/company";
const gotoCompanyPages = useGotoCompanyPages();
const route = useRoute();
// 跳转公司详情页
const handleCompClick = item => {
......@@ -239,8 +242,9 @@ const handleCompClick = item => {
return;
}
window.sessionStorage.setItem("curTabName", item.name);
const curRoute = router.resolve({ name: "companyPages", params: { id: item.entityId } });
window.open(curRoute.href, "_blank");
gotoCompanyPages(item.entityId);
// const curRoute = router.resolve({ name: "companyPages", params: { id: item.entityId } });
// window.open(curRoute.href, "_blank");
};
// 跳转发布机构详情页
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论