提交 4d30163e authored 作者: yanpeng's avatar yanpeng

Merge branch 'pre' of http://8.140.26.4:10003/caijian/risk-monitor into yp-dev

流水线 #259 已通过 于阶段
in 1 分 31 秒
...@@ -18,13 +18,13 @@ const getWordCloudChart = data => { ...@@ -18,13 +18,13 @@ const getWordCloudChart = data => {
// 其他形状你可以使用形状路径 // 其他形状你可以使用形状路径
// shape: 'circle', // 示例 // shape: 'circle', // 示例
// 或者自定义路径 // 或者自定义路径
gridSize: 15, // 网格大小,影响词间距。 gridSize: 5, // 网格大小,影响词间距。
sizeRange: [16, 36], // 定义词云中文字大小的范围 sizeRange: [16, 36], // 定义词云中文字大小的范围
rotationRange: [0, 0], rotationRange: [0, 0],
// rotationRange: [-90, 90], // rotationRange: [-90, 90],
// rotationStep: 10, // rotationStep: 10,
drawOutOfBound: false, // 是否超出画布 drawOutOfBound: false, // 是否超出画布
shrinkToFit: true, // 是否自动缩小以适应容器 shrinkToFit: false, // 是否自动缩小以适应容器
// 字体 // 字体
textStyle: { textStyle: {
color: function (params) { color: function (params) {
......
...@@ -128,7 +128,19 @@ const homeTitleList = ref([ ...@@ -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 isShowMenu = ref(false);
const handleShowMenu = (index, isShow) => { const handleShowMenu = (index, isShow) => {
...@@ -148,7 +160,8 @@ const handleHoverMenu = isShow => { ...@@ -148,7 +160,8 @@ const handleHoverMenu = isShow => {
isShowMenu.value = isShow; isShowMenu.value = isShow;
}; };
const menuList = ref([ const menuList = computed(() => {
let menu = [
// { // {
// title: "中美科技博弈概览", // title: "中美科技博弈概览",
// icon: Menu1, // icon: Menu1,
...@@ -220,7 +233,77 @@ const menuList = ref([ ...@@ -220,7 +233,77 @@ const menuList = ref([
path: "/scientificFunding", path: "/scientificFunding",
active: false 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); const isShowTool = ref(false);
...@@ -243,13 +326,7 @@ const toolList = ref([ ...@@ -243,13 +326,7 @@ const toolList = ref([
]) ])
const handleToModule = (item, index) => { const handleToModule = (item, index) => {
window.sessionStorage.setItem('homeActiveTitleIndex', index)
if (index === 1) { if (index === 1) {
homeActiveTitleIndex.value = index
menuList.value.forEach(val => {
val.active = false
})
item.active = true
router.push({ router.push({
path: item.path path: item.path
}) })
...@@ -268,10 +345,7 @@ const handleToModule = (item, index) => { ...@@ -268,10 +345,7 @@ const handleToModule = (item, index) => {
}; };
const handleClickTitle = (item, index) => { const handleClickTitle = (item, index) => {
if (index === 0 || index === 3) { if (index === 0 || index === 3) {
window.sessionStorage.setItem('homeActiveTitleIndex', index)
homeActiveTitleIndex.value = index
router.push(item.path) router.push(item.path)
} }
}; };
...@@ -282,17 +356,8 @@ const handleClickToolBox = () => { ...@@ -282,17 +356,8 @@ const handleClickToolBox = () => {
onMounted(() => { onMounted(() => {
handleGetPersonType(); 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> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
......
...@@ -73,8 +73,9 @@ const setChart = (option, chartId, allowClick, selectParam) => { ...@@ -73,8 +73,9 @@ const setChart = (option, chartId, allowClick, selectParam) => {
}); });
window.open(route.href, "_blank"); window.open(route.href, "_blank");
} else if (params.componentType === 'series' && params.seriesType === 'bar') { } else if (params.componentType === 'series' && params.seriesType === 'bar') {
const year = params.name.slice(0, 4)
const quatarNum = Number(params.name[params.name.length - 1]) 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({ const route = router.resolve({
path: "/dataLibrary/dataDecree", path: "/dataLibrary/dataDecree",
query: selectParam query: selectParam
...@@ -86,7 +87,7 @@ const setChart = (option, chartId, allowClick, selectParam) => { ...@@ -86,7 +87,7 @@ const setChart = (option, chartId, allowClick, selectParam) => {
case '科技智库报告': case '科技智库报告':
if (selectParam.key === 1) { if (selectParam.key === 1) {
selectParam.domains = params.seriesName 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]) const quatarNum = Number(params.name[params.name.length - 1])
selectParam.selectedDate = JSON.stringify(getQuarterRange(year, quatarNum)) selectParam.selectedDate = JSON.stringify(getQuarterRange(year, quatarNum))
const route = router.resolve({ const route = router.resolve({
......
...@@ -1093,11 +1093,21 @@ const handleBox9Data = async () => { ...@@ -1093,11 +1093,21 @@ const handleBox9Data = async () => {
const selectedIndex = box9LegislativeStatusList.value.findIndex( const selectedIndex = box9LegislativeStatusList.value.findIndex(
item => item.value === box9LegislativeStatus.value 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 = { const selectParam = {
moduleType: '国会法案', moduleType: '国会法案',
key: 2, key: 2,
selectedDate: box9selectetedTime.value ? JSON.stringify([box9selectetedTime.value + '-01-01', box9selectetedTime.value + '-12-31']) : '', selectedDate: box9selectetedTime.value ? JSON.stringify([box9selectetedTime.value + '-01-01', box9selectetedTime.value + '-12-31']) : '',
selectedStatus: box9LegislativeStatus.value ? box9LegislativeStatus.value : '全部阶段', selectedStatus: status ? status : '全部阶段',
isInvolveCn: true isInvolveCn: true
} }
box9ChartInstance = setChart(box9Chart, "box9Chart", true, selectParam); box9ChartInstance = setChart(box9Chart, "box9Chart", true, selectParam);
......
...@@ -693,10 +693,6 @@ const statusList = ref([ ...@@ -693,10 +693,6 @@ const statusList = ref([
name: '提出法案', name: '提出法案',
id: '提出法案' id: '提出法案'
}, },
{
name: '通过法案',
id: '通过法案'
},
{ {
name: '众议院通过', name: '众议院通过',
id: '众议院通过' id: '众议院通过'
...@@ -706,8 +702,12 @@ const statusList = ref([ ...@@ -706,8 +702,12 @@ const statusList = ref([
id: '参议院通过' id: '参议院通过'
}, },
{ {
name: '分歧已解决', name: '解决分歧',
id: '分歧已解决' id: '解决分歧'
},
{
name: '完成立法',
id: '完成立法'
}, },
]) ])
......
...@@ -459,6 +459,7 @@ const handleGetThinkTankReportIndustryCloud = async () => { ...@@ -459,6 +459,7 @@ const handleGetThinkTankReportIndustryCloud = async () => {
})); }));
// 该接口数据用于「报告关键词云」 // 该接口数据用于「报告关键词云」
box5Data.value = data; box5Data.value = data;
console.log("box5Data", box5Data.value);
if (data.length) { if (data.length) {
box5WordCloudKey.value += 1; box5WordCloudKey.value += 1;
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论