提交 d072b507 authored 作者: 付康's avatar 付康

合并分支 'fk-dev' 到 'pre'

Fk dev 查看合并请求 !290
流水线 #258 已通过 于阶段
in 6 分 43 秒
......@@ -128,7 +128,19 @@ const homeTitleList = ref([
}
]);
const homeActiveTitleIndex = ref(0);
const homeActiveTitleIndex = computed(() => {
let activeIndex = 1
if (route.fullPath.includes('/ZMOverView')) {
activeIndex = 0
} else if (route.fullPath.includes('/dataLibrary')) {
activeIndex = 3
} else if (route.fullPath.includes('/chat') || route.fullPath.includes('/writtingAsstaint')) {
activeIndex = 2
} else {
activeIndex = 1
}
return activeIndex
})
const isShowMenu = ref(false);
const handleShowMenu = (index, isShow) => {
......@@ -148,7 +160,8 @@ const handleHoverMenu = isShow => {
isShowMenu.value = isShow;
};
const menuList = ref([
const menuList = computed(() => {
let menu = [
// {
// title: "中美科技博弈概览",
// icon: Menu1,
......@@ -220,7 +233,77 @@ const menuList = ref([
path: "/scientificFunding",
active: false
}
]);
]
switch (route.fullPath) {
case '/billHome':
menu.forEach(item => {
item.active = false
})
menu[0].active = true
break
case '/decree':
menu.forEach(item => {
item.active = false
})
menu[1].active = true
break
case '/thinkTank':
menu.forEach(item => {
item.active = false
})
menu[2].active = true
break
case '/exportControl':
menu.forEach(item => {
item.active = false
})
menu[3].active = true
break
case '/cooperationRestrictions':
menu.forEach(item => {
item.active = false
})
menu[4].active = true
break
case '/finance':
menu.forEach(item => {
item.active = false
})
menu[5].active = true
break
case '/marketAccessRestrictions':
menu.forEach(item => {
item.active = false
})
menu[6].active = true
break
case '/ruleRestrictions':
menu.forEach(item => {
item.active = false
})
menu[7].active = true
break
case '/technologyFigures':
menu.forEach(item => {
item.active = false
})
menu[8].active = true
break
case '/innovationSubject':
menu.forEach(item => {
item.active = false
})
menu[9].active = true
break
case '/scientificFunding':
menu.forEach(item => {
item.active = false
})
menu[10].active = true
break
}
return menu
})
const isShowTool = ref(false);
......@@ -243,13 +326,7 @@ const toolList = ref([
])
const handleToModule = (item, index) => {
window.sessionStorage.setItem('homeActiveTitleIndex', index)
if (index === 1) {
homeActiveTitleIndex.value = index
menuList.value.forEach(val => {
val.active = false
})
item.active = true
router.push({
path: item.path
})
......@@ -268,10 +345,7 @@ const handleToModule = (item, index) => {
};
const handleClickTitle = (item, index) => {
if (index === 0 || index === 3) {
window.sessionStorage.setItem('homeActiveTitleIndex', index)
homeActiveTitleIndex.value = index
router.push(item.path)
}
};
......@@ -282,17 +356,8 @@ const handleClickToolBox = () => {
onMounted(() => {
handleGetPersonType();
if (route.query.titleIndex) {
homeActiveTitleIndex.value = Number(route.query.titleIndex)
} else {
homeActiveTitleIndex.value = Number(window.sessionStorage.getItem('homeActiveTitleIndex'))
}
});
onUnmounted(() => {
window.sessionStorage.removeItem('homeActiveTitleIndex')
})
</script>
<style lang="scss" scoped>
......
......@@ -73,8 +73,9 @@ const setChart = (option, chartId, allowClick, selectParam) => {
});
window.open(route.href, "_blank");
} else if (params.componentType === 'series' && params.seriesType === 'bar') {
const year = params.name.slice(0, 4)
const quatarNum = Number(params.name[params.name.length - 1])
selectParam.selectedDate = JSON.stringify(getQuarterRange(selectParam.selectedDate, quatarNum))
selectParam.selectedDate = JSON.stringify(getQuarterRange(year, quatarNum))
const route = router.resolve({
path: "/dataLibrary/dataDecree",
query: selectParam
......@@ -86,7 +87,7 @@ const setChart = (option, chartId, allowClick, selectParam) => {
case '科技智库报告':
if (selectParam.key === 1) {
selectParam.domains = params.seriesName
const year = params.name.slice(0,4)
const year = params.name.slice(0, 4)
const quatarNum = Number(params.name[params.name.length - 1])
selectParam.selectedDate = JSON.stringify(getQuarterRange(year, quatarNum))
const route = router.resolve({
......
......@@ -1093,11 +1093,21 @@ const handleBox9Data = async () => {
const selectedIndex = box9LegislativeStatusList.value.findIndex(
item => item.value === box9LegislativeStatus.value
);
const arr = [
{ label: "提出法案", value: "提案" },
{ label: "众议院通过", value: "众议院通过" },
{ label: "参议院通过", value: "参议院通过" },
{ label: "解决分歧", value: "分歧已解决" },
{ label: "完成立法", value: "完成立法" }
]
const status = arr.filter(item => {
return item.value === box9LegislativeStatus.value
})[0].label
const selectParam = {
moduleType: '国会法案',
key: 2,
selectedDate: box9selectetedTime.value ? JSON.stringify([box9selectetedTime.value + '-01-01', box9selectetedTime.value + '-12-31']) : '',
selectedStatus: box9LegislativeStatus.value ? box9LegislativeStatus.value : '全部阶段',
selectedStatus: status ? status : '全部阶段',
isInvolveCn: true
}
box9ChartInstance = setChart(box9Chart, "box9Chart", true, selectParam);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论