提交 fc2ce61a authored 作者: Vicky's avatar Vicky

人物id优化

上级 74552a5c
......@@ -26,6 +26,10 @@ import {getCharacterGlobalInfo, getCharacterRelation } from "@/api/characterPage
import 'default-passive-events';
import { useRoute } from 'vue-router';
const route = useRoute();
const personId = ref(route.query.personId || "Y000064");
// const nodes = [
......@@ -104,7 +108,7 @@ const CharacterRelation = ref([]);
const getCharacterGlobalInfoFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
......@@ -132,7 +136,7 @@ const getCharacterGlobalInfoFn = async () => {
const getCharacterRelationFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterRelation(params);
......
......@@ -68,6 +68,11 @@ import img from "./assets/img.png";
import { getCharacterProposal } from "@/api/characterPage/characterPage.js";
import { useRoute } from 'vue-router';
const route = useRoute();
const personId = ref(route.query.personId || "Y000064");
const currentPage = ref(1);
// 处理页码改变事件
const handleCurrentChange = page => {
......@@ -92,7 +97,7 @@ const getCharacterProposalFn = async () => {
loading.value = true;
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
industryId: 1,
currentPage: currentPage.value - 1,
pageSize: pageSize.value
......
......@@ -125,6 +125,10 @@ import type2 from "./assets/type2.png";
import { getCharacterRelatedEntity } from "@/api/characterPage/characterPage.js";
import { useRoute } from 'vue-router';
const route = useRoute();
const personId = ref(route.query.personId || "Y000064");
const selectedOption = ref(1);
const yearList = ref([
{
......@@ -160,7 +164,7 @@ const relationThinkTankList = ref({});
const getCharacterRelatedEntityFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
startTime: getDateYearsAgo(selectedOption.value) || "2025-01-01"
};
......
......@@ -342,6 +342,10 @@ import img5 from "./assets/img5.png";
import DefaultIcon1 from '@/assets/icons/default-icon1.png'
import DefaultIcon2 from '@/assets/icons/default-icon2.png'
import { useRoute } from 'vue-router';
const route = useRoute();
const personId = ref(route.query.personId || "Y000064");
// 处理图片代理
const getProxyUrl = (url) => {
if (!url) return "";
......@@ -363,7 +367,7 @@ const characterInfo = ref({});
const getCharacterGlobalInfoFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterGlobalInfo(params);
......@@ -383,7 +387,7 @@ const getCharacterGlobalInfoFn = async () => {
const characterBasicInfo = ref({});
const getCharacterBasicInfoFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterBasicInfo(params);
......@@ -402,7 +406,7 @@ const getCharacterBasicInfoFn = async () => {
const characterView = ref({});
const getCharacterViewFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
year: numActive.value
};
try{
......@@ -457,7 +461,7 @@ const CharacterFundSource = ref([]);
const getCharacterFundSourceFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
year: selectedOption.value || "2025"
};
try{
......@@ -548,7 +552,7 @@ const getCharacterLatestDynamicFn = async () => {
loading.value = true;
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
cRelated: related.value,
currentPage: currentPage.value - 1,
pageSize: pageSize.value
......@@ -591,7 +595,7 @@ const getCharacterLatestDynamicFn = async () => {
const CharacterResume = ref({});
const getCharacterResumeFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterResume(params);
......
......@@ -39,7 +39,9 @@ import { id } from "@kangc/v-md-editor";
import 'default-passive-events';
import { useRoute } from 'vue-router';
const route = useRoute();
const personId = ref(route.query.personId || "Y000064");
// const nodes = [
// {
......@@ -117,7 +119,7 @@ const CharacterRelation = ref([]);
const getCharacterGlobalInfoFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
......@@ -145,7 +147,7 @@ const getCharacterGlobalInfoFn = async () => {
const getCharacterRelationFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterRelation(params);
......
......@@ -125,6 +125,10 @@ import type2 from "./assets/type2.png";
import { getCharacterRelatedEntity } from "@/api/characterPage/characterPage.js";
import { useRoute } from 'vue-router';
const route = useRoute();
const personId = ref(route.query.personId || "Y000064");
const selectedOption = ref(1);
const yearList = ref([
{
......@@ -160,7 +164,7 @@ const relationThinkTankList = ref({});
const getCharacterRelatedEntityFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
startTime: getDateYearsAgo(selectedOption.value) || "2025-01-01"
};
......
......@@ -286,6 +286,10 @@ import img5 from "./assets/img5.png";
import DefaultIcon1 from '@/assets/icons/default-icon1.png'
import DefaultIcon2 from '@/assets/icons/default-icon2.png'
import { useRoute } from 'vue-router';
const route = useRoute();
const personId = ref(route.query.personId || "Y000064");
// 处理图片代理
const getProxyUrl = (url) => {
if (!url) return "";
......@@ -356,7 +360,7 @@ const characterInfo = ref({});
const getCharacterGlobalInfoFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterGlobalInfo(params);
......@@ -376,7 +380,7 @@ const getCharacterGlobalInfoFn = async () => {
const characterBasicInfo = ref({});
const getCharacterBasicInfoFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterBasicInfo(params);
......@@ -395,7 +399,7 @@ const getCharacterBasicInfoFn = async () => {
const characterView = ref({});
const getCharacterViewFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
year: numActive.value
};
try{
......@@ -487,7 +491,7 @@ const getCharacterLatestDynamicFn = async () => {
loading.value = true;
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
cRelated: related.value,
currentPage: currentPage.value - 1,
pageSize: pageSize.value
......@@ -530,7 +534,7 @@ const getCharacterLatestDynamicFn = async () => {
const CharacterResume = ref({});
const getCharacterResumeFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterResume(params);
......
......@@ -26,6 +26,10 @@ import {getCharacterGlobalInfo, getCharacterRelation } from "@/api/characterPage
import 'default-passive-events';
import { useRoute } from 'vue-router';
const route = useRoute();
const personId = ref(route.query.personId || "Y000064");
// const nodes = [
......@@ -104,7 +108,7 @@ const CharacterRelation = ref([]);
const getCharacterGlobalInfoFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
......@@ -132,7 +136,7 @@ const getCharacterGlobalInfoFn = async () => {
const getCharacterRelationFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterRelation(params);
......
......@@ -79,6 +79,10 @@ import img from "./assets/img.png";
import { getCharacterAchievementReport } from "@/api/characterPage/characterPage.js";
import { useRoute } from 'vue-router';
const route = useRoute();
const personId = ref(route.query.personId || "Y000064");
const currentPage = ref(1);
// 处理页码改变事件
const handleCurrentChange = page => {
......@@ -103,7 +107,7 @@ const getCharacterAchievementReportFn = async () => {
loading.value = true;
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
industryId: 1,
year: 2025,
currentPage: currentPage.value - 1,
......
......@@ -125,6 +125,10 @@ import type2 from "./assets/type2.png";
import { getCharacterRelatedEntity } from "@/api/characterPage/characterPage.js";
import { useRoute } from 'vue-router';
const route = useRoute();
const personId = ref(route.query.personId || "Y000064");
const selectedOption = ref(1);
const yearList = ref([
{
......@@ -160,7 +164,7 @@ const relationThinkTankList = ref({});
const getCharacterRelatedEntityFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
startTime: getDateYearsAgo(selectedOption.value) || "2025-01-01"
};
......
......@@ -292,6 +292,10 @@ import img5 from "./assets/img5.png";
import DefaultIcon1 from '@/assets/icons/default-icon1.png'
import DefaultIcon2 from '@/assets/icons/default-icon2.png'
import { useRoute } from 'vue-router';
const route = useRoute();
const personId = ref(route.query.personId || "Y000064");
// 处理图片代理
const getProxyUrl = (url) => {
if (!url) return "";
......@@ -312,7 +316,7 @@ const characterInfo = ref({});
const getCharacterGlobalInfoFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterGlobalInfo(params);
......@@ -332,7 +336,7 @@ const getCharacterGlobalInfoFn = async () => {
const characterBasicInfo = ref({});
const getCharacterBasicInfoFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterBasicInfo(params);
......@@ -351,7 +355,7 @@ const getCharacterBasicInfoFn = async () => {
const characterView = ref({});
const getCharacterViewFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
year: numActive.value
};
try{
......@@ -443,7 +447,7 @@ const getCharacterLatestDynamicFn = async () => {
loading.value = true;
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064",
personId: personId.value,
cRelated: related.value,
currentPage: currentPage.value - 1,
pageSize: pageSize.value
......@@ -486,7 +490,7 @@ const getCharacterLatestDynamicFn = async () => {
const CharacterResume = ref({});
const getCharacterResumeFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterResume(params);
......
......@@ -25,13 +25,15 @@ import { getCharacterGlobalInfo } from "@/api/characterPage/characterPage.js";
// 获取路由参数,1为科技领袖,2为国会议员,3为智库研究人员
const route = useRoute();
const type = ref(route.query.type || 1);
const personId = ref(route.query.personId || "Y000064");
// 获取人物全局信息
const characterInfo = ref({});
const getCharacterGlobalInfoFn = async () => {
const params = {
personId: window.sessionStorage.getItem("personId") || "Y000064"
personId: personId.value
};
try{
const res = await getCharacterGlobalInfo(params);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论