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

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

Fk dev 查看合并请求 !280
流水线 #215 已通过 于阶段
in 2 分 54 秒
......@@ -37,7 +37,7 @@
<div class="icon">
<img :src="item.icon" alt="" />
</div>
<div class="title">{{ item.title }}</div>
<div class="title" :class="{ 'active-title': item.active }">{{ item.title }}</div>
</div>
</div>
</div>
......@@ -157,57 +157,68 @@ const menuList = ref([
{
title: "科技法案",
icon: Menu2,
path: "/billHome"
path: "/billHome",
active: false
},
{
title: "科技政令",
icon: Menu3,
path: "/decree"
path: "/decree",
active: false
},
{
title: "美国科技智库",
icon: Menu4,
path: "/thinkTank"
path: "/thinkTank",
active: false
},
{
title: "出口管制",
icon: Menu5,
path: "/exportControl"
path: "/exportControl",
active: false
},
{
title: "科研合作限制",
icon: Menu6,
path: "/cooperationRestrictions"
path: "/cooperationRestrictions",
active: false
},
{
title: "投融资限制",
icon: Menu7,
path: "/finance"
path: "/finance",
active: false
},
{
title: "市场准入限制",
icon: Menu8,
path: "/marketAccessRestrictions"
path: "/marketAccessRestrictions",
active: false
},
{
title: "规则限制",
icon: Menu9,
path: "/ruleRestrictions"
path: "/ruleRestrictions",
active: false
},
{
title: "美国科技人物观点",
icon: Menu10,
path: "/technologyFigures"
path: "/technologyFigures",
active: false
},
{
title: "美国主要创新主体动向",
icon: Menu11,
path: "/innovationSubject"
path: "/innovationSubject",
active: false
},
{
title: "美国科研资助体系",
icon: Menu12,
path: "/scientificFunding"
path: "/scientificFunding",
active: false
}
]);
......@@ -235,6 +246,7 @@ const handleToModule = (item, index) => {
window.sessionStorage.setItem('homeActiveTitleIndex', index)
if (index === 1) {
homeActiveTitleIndex.value = index
item.active = true
router.push({
path: item.path
})
......@@ -253,7 +265,7 @@ const handleToModule = (item, index) => {
};
const handleClickTitle = (item, index) => {
if (index === 0 || index === 3) {
window.sessionStorage.setItem('homeActiveTitleIndex', index)
homeActiveTitleIndex.value = index
......@@ -497,6 +509,11 @@ onUnmounted(() => {
letter-spacing: 0px;
text-align: left;
}
.active-title {
color: var(--color-main-active) !important;
font-size: 20px !important;
}
}
}
}
......@@ -528,6 +545,8 @@ onUnmounted(() => {
display: flex;
cursor: pointer;
&:hover {
.title {
color: var(--color-main-active);
......@@ -557,6 +576,11 @@ onUnmounted(() => {
letter-spacing: 0px;
text-align: left;
}
.active-title {
color: var(--color-main-active) !important;
font-size: 20px !important;
}
}
}
}
......
const getQuarterRange = (quatarNum) => {
const quarters = {
1: ['2025-01-01', '2025-03-31'],
2: ['2025-04-01', '2025-06-30'],
3: ['2025-07-01', '2025-09-30'],
4: ['2025-10-01', '2025-12-31']
};
return quarters[quatarNum];
}
export default getQuarterRange
\ No newline at end of file
// 绘制echarts图表
import getMonthRange from './getMonthRange'
import getQuarterRange from './getQuarterRange';
import * as echarts from 'echarts'
import 'echarts-wordcloud';
import router from '@/router/index'
......@@ -77,6 +78,26 @@ const setChart = (option, chartId, allowClick, selectParam) => {
}
}
break
case '政令':
if (params.componentType === 'series' && params.seriesType === 'pie') {
selectParam.domains = params.name
const route = router.resolve({
path: "/dataLibrary/dataDecree",
query: selectParam
});
window.open(route.href, "_blank");
} else if (params.componentType === 'series' && params.seriesType === 'bar') {
const quatarNum = Number(params.name[params.name.length - 1])
selectParam.selectedDate = JSON.stringify(getQuarterRange(quatarNum))
const route = router.resolve({
path: "/dataLibrary/dataDecree",
query: selectParam
});
window.open(route.href, "_blank");
}
}
......
......@@ -151,7 +151,7 @@
</template>
<script setup>
import { ref, computed, watch, onMounted, nextTick } from 'vue'
import { ref, computed, watch, onMounted, nextTick, onBeforeUnmount } from 'vue'
import ChartContainer from '../../components/ChartContainer/index.vue'
import ChartHeader from '../../components/ChartHeader/index.vue'
import ActiveTag from '../../components/ActiveTag/index.vue'
......@@ -171,6 +171,10 @@ import getDateRange from '@/utils/getDateRange'
const route = useRoute();
const timer1 = ref(null)
const timer2 = ref(null)
const timer3 = ref(null)
// 图表/数据
const isShowChart = ref(false)
// 点击切换数据/图表
......@@ -180,7 +184,7 @@ const handleSwitchChartData = () => {
const curDemensionItem = staticsDemensionList.value.filter(item => {
return item.name === curDemension.value
})[0]
setTimeout(() => {
timer1.value = setTimeout(() => {
activeChart.value = curDemensionItem.chartTypeList[0]
curChartData.value = curDemensionItem.data
})
......@@ -267,7 +271,7 @@ const handleClickDemensionItem = (val) => {
})
val.active = true
curDemension.value = val.name
setTimeout(() => {
timer2.value = setTimeout(() => {
activeChart.value = val.chartTypeList[0]
curChartData.value = val.data
})
......@@ -702,8 +706,8 @@ const statusList = ref([
id: '参议院通过'
},
{
name: '双院通过',
id: '双院通过'
name: '分歧已解决',
id: '分歧已解决'
},
])
......@@ -778,8 +782,8 @@ const selectedCount = computed(() => selectedMap.value.size)
// 获取表格数据(示例)
const fetchTableData = async () => {
isSelectedAll.value = false
selectedMap.value.clear()
// isSelectedAll.value = false
// selectedMap.value.clear()
// 调用接口获取数据...
const params = {
page: currentPage.value,
......@@ -793,8 +797,8 @@ const fetchTableData = async () => {
originChamber: selectedCongress.value === '全部议院' ? null : selectedCongress.value,
originDepart: selectedOrg.value === '全部委员会' ? null : selectedOrg.value,
sponsorPersonName: selectedmember.value === '全部议员' ? null : selectedmember.value,
status: selectedStatus.value === '通过' ? 1 : 0,
isInvolveCn: isInvolveCn ? 'Y' : 'N',
status: selectedStatus.value === '全部阶段' ? null : selectedStatus.value,
isInvolveCn: isInvolveCn.value ? 'Y' : 'N',
sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序
}
try {
......@@ -836,7 +840,7 @@ const fetchTableData = async () => {
return item.name === curDemension.value
})[0]
setTimeout(() => {
timer3.value = setTimeout(() => {
activeChart.value = curDemensionItem.chartTypeList[0]
curChartData.value = curDemensionItem.data
})
......@@ -877,7 +881,7 @@ const fetchAllData = async () => {
originDepart: selectedOrg.value === '全部委员会' ? null : selectedOrg.value,
sponsorPersonName: selectedmember.value === '全部议员' ? null : selectedmember.value,
status: selectedStatus.value === '通过' ? 1 : 0,
isInvolveCn: isInvolveCn ? 'Y' : 'N',
isInvolveCn: isInvolveCn.value ? 'Y' : 'N',
sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序
}
try {
......@@ -1116,14 +1120,21 @@ const handleExport = () => {
onMounted(async () => {
handleGetOrgList()
handleGetMemberList()
initParam()
// 初始化
await fetchTableData()
})
onBeforeUnmount(() => {
if (timer1.value) {
clearTimeout(timer1.value)
}
if (timer2.value) {
clearTimeout(timer2.value)
}
if (timer3.value) {
clearTimeout(timer3.value)
}
})
</script>
......@@ -1239,10 +1250,11 @@ onMounted(async () => {
.data-main-box {
width: 1568px;
height: 810px;
min-height: 810px;
border-radius: 10px;
background: var(--bg-white-100);
margin: 0 auto;
margin-bottom: 20px;
overflow: hidden;
.data-main-box-header {
......@@ -1274,8 +1286,7 @@ onMounted(async () => {
.data-main-box-main {
width: 1520px;
// height: 633px;
height: 680px;
min-height: 680px;
border-radius: 10px;
border: 1px solid var(--bg-black-5);
margin: 0 auto;
......
......@@ -17,7 +17,7 @@
<slot name="chart-box"></slot>
</div>
<div class="tip-box">
<TipTab />
<TipTab text="数据来源:美国国会官网" />
</div>
</div>
</div>
......@@ -176,8 +176,7 @@ const chartItemList = computed(() => {
.tip-box {
height: 54px;
box-sizing: border-box;
padding-top: 10px;
// background: orange;
padding: 15px 600px;
}
}
}
......
......@@ -2,7 +2,7 @@
<div class="select-wrapper" :class="{ 'select-wrapper-custom': selectValue === '自定义' }">
<div class="select-left text-tip-1">{{ selectTitle + ':' }}</div>
<div class="select-right" :class="{ 'select-right-custom': selectValue === '自定义' }">
<el-select v-model="selectValue" :placeholder="placeholderName" style="width: 240px">
<el-select v-model="selectValue" :placeholder="placeholderName" filterable style="width: 240px">
<!-- <el-option label="全部领域" value="全部领域" /> -->
<el-option v-for="item in selectList" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
......
......@@ -72,7 +72,7 @@
</template>
<script setup>
import { computed, onMounted, ref } from 'vue'
import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
import Icon1 from './assets/icons/sider-icon1.svg'
import Icon2 from './assets/icons/sider-icon2.svg'
import Icon3 from './assets/icons/sider-icon3.svg'
......@@ -398,6 +398,8 @@ const handleClickTab = (tab) => {
})
}
const timer = ref(null)
// 关闭当前标签页
const handleCloseCurTab = (tab, index) => {
......@@ -416,7 +418,7 @@ const handleCloseCurTab = (tab, index) => {
})
if (index === openedTabList.value.length - 1) {
tagsViewStore.delView(tab)
setTimeout(() => {
timer.value = setTimeout(() => {
tagsViewStore.visitedViews[tagsViewStore.visitedViews.length - 1].active = true
activeTab = tagsViewStore.visitedViews[tagsViewStore.visitedViews.length - 1]
router.push({
......@@ -593,6 +595,11 @@ onMounted(() => {
})
onBeforeUnmount(() => {
if(timer.value) {
clearTimeout(timer.value)
}
})
</script>
......
......@@ -814,7 +814,25 @@ const handleBox5 = async () => {
let chart1 = getBarChart(chart1Data.value.dataX, chart1Data.value.dataY);
chart1.yAxis.name = "数量";
chart1.yAxis.nameTextStyle = { align: 'right' }
setChart(chart1, "chart1");
let org = '全部机构'
if(box5Params.proposeName) {
org = keyOrganizationList.value.filter(item => {
return item.orgId === box5Params.proposeName
})[0].orgName
}
let domain = '全部领域'
if(box5Params.domainId) {
domain = areaList.value.filter(item => {
return item.id === box5Params.domainId
})[0].name
}
const selectParam = {
moduleType: '政令',
orgnizationName: org,
domains: domain,
selectDate: box5Params.year
}
setChart(chart1, "chart1", true, selectParam);
};
// 政令科技领域
......@@ -861,8 +879,19 @@ const handleGetDecreeArea = async () => {
};
const handleBox6 = async () => {
await handleGetDecreeArea();
let org = '全部机构'
if(box6Params.proposeName) {
org = keyOrganizationList.value.filter(item => {
return item.orgId === box6Params.proposeName
})[0].orgName
}
const selectParam = {
moduleType: '政令',
orgnizationName: org,
selectedDate: JSON.stringify([box6Params.year+'-01-01', box6Params.year+'-12-31'])
}
let chart2 = getPieChart(chart2Data.value);
setChart(chart2, "chart2");
setChart(chart2, "chart2", true, selectParam);
};
const handleBox6YearChange = () => {
......
......@@ -7,7 +7,7 @@
<router-view />
</div>
</div>
<div class="right-btn" @click="handleClickToolBox">
<div class="right-btn" v-if="isShowToolBox" @click="handleClickToolBox">
<div class="item">
<div class="icon">
<img src="@/assets/icons/overview/domain.png" alt="" />
......@@ -22,20 +22,7 @@
</div>
</div>
<div class="tool-box">
<!-- <div class="tool-item">
<img src="@/assets/icons/tool-item-icon1.png" alt="" />
</div>
<div class="tool-item">
<img src="@/assets/icons/tool-item-icon2.png" alt="" />
</div>
<div class="tool-item">
<img src="@/assets/icons/tool-item-icon3.png" alt="" />
</div>
<div class="tool-item">
<img src="@/assets/icons/tool-item-icon4.png" alt="" />
</div> -->
<div class="tool-box" v-if="isShowToolBox">
<el-tooltip content="智能写报" placement="left" :offset="10">
<div class="tool-item" @click="handleOpenPage('znxb')">
<img src="@/assets/icons/tool-item-icon1.png" alt="" />
......@@ -96,6 +83,11 @@ import { ElMessage } from "element-plus";
const router = useRouter();
const route = useRoute();
const isShowToolBox = computed(() => {
const isShow = route.fullPath.includes('dataLibrary') ? false : true
return isShow
})
const isShowHeader = computed(() => {
const isShow = route.meta.isShowHeader
return isShow? true : false
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论