提交 466614be authored 作者: 付康's avatar 付康

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

Fk dev 查看合并请求 !287
流水线 #248 已通过 于阶段
in 3 分 23 秒
......@@ -10,4 +10,11 @@ export function search(data) {
url: `/temporarySearch/search-info/es/page`,
data:data
})
}
export function getThinkTankList() {
return request({
method: 'GET',
url: `/temporarySearch/search-info/all-organization-names`,
})
}
\ No newline at end of file
......@@ -246,6 +246,9 @@ 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
......
......@@ -11,7 +11,7 @@
`}}
</pre>
<div class="chart-box">
<GraphChart :nodes="nodes" :links="links" layoutType="force">
<GraphChart :nodes="nodes" :links="links" layoutType="none">
</GraphChart>
</div>
</el-col>
......
const getQuarterRange = (quatarNum) => {
const getQuarterRange = (year, 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']
1: [year+ '-01-01', year+ '-03-31'],
2: [year+ '-04-01', year+ '-06-30'],
3: [year+ '-07-01', year+ '-09-30'],
4: [year+ '-10-01', year+ '-12-31']
};
return quarters[quatarNum];
......
......@@ -16,67 +16,51 @@ const setChart = (option, chartId, allowClick, selectParam) => {
chart.on('click', function (params) {
switch (selectParam.moduleType) {
case '国会法案':
// 判断点击的是否为饼图的数据项
if (params.componentType === 'series' && params.seriesType === 'pie') {
console.log('点击的扇形名称:', params.name);
if (selectParam.key === '领域') {
selectParam.domains = params.name
if (selectParam.key === 1) {
// console.log('当前点击', selectParam, params.seriesName, params.name);
selectParam.selectedStatus = params.seriesName
selectParam.selectedDate = JSON.stringify(getMonthRange(params.name))
const route = router.resolve({
path: "/dataLibrary/countryBill",
query: selectParam
});
window.open(route.href, "_blank");
return
} else if (selectParam.key === 2) {
selectParam.domains = params.name
const route = router.resolve({
path: "/dataLibrary/countryBill",
query: selectParam
});
window.open(route.href, "_blank");
return
} else if (selectParam.key === 3) {
if (params.name === '众议院' || params.name === '参议院') {
selectParam.selectedCongress = params.name
selectParam.selectedOrg = '全部委员会'
if (selectParam.selectedDate.length === 4) {
selectParam.selectedDate = JSON.stringify([selectParam.selectedDate + '-01-01', selectParam.selectedDate + '-12-31'])
}
} else if (selectParam.key === '议院委员会') {
if (params.name === '众议院' || params.name === '参议院') {
selectParam.selectedCongress = params.name
selectParam.selectedOrg = ''
if (selectParam.selectedDate.length === 4) {
selectParam.selectedDate = JSON.stringify([selectParam.selectedDate + '-01-01', selectParam.selectedDate + '-12-31'])
}
} else {
selectParam.selectedOrg = params.name
selectParam.selectedCongress = ''
if (selectParam.selectedDate.length === 4) {
selectParam.selectedDate = JSON.stringify([selectParam.selectedDate + '-01-01', selectParam.selectedDate + '-12-31'])
}
} else {
selectParam.selectedOrg = params.name
selectParam.selectedCongress = '全部议院'
if (selectParam.selectedDate.length === 4) {
selectParam.selectedDate = JSON.stringify([selectParam.selectedDate + '-01-01', selectParam.selectedDate + '-12-31'])
}
}
const route = router.resolve({
path: "/dataLibrary/countryBill",
query: selectParam
});
window.open(route.href, "_blank");
} else if (params.componentType === 'series' && params.seriesType === 'bar') {
if (params.name === '已立法') {
selectParam.selectedStatus = 1
} else {
selectParam.selectedStatus = 0
}
if (selectParam.selectedDate.length === 4) {
selectParam.selectedDate = JSON.stringify([selectParam.selectedDate + '-01-01', selectParam.selectedDate + '-12-31'])
}
return
} else {
selectParam.selectedStatus = params.name
const route = router.resolve({
path: "/dataLibrary/countryBill",
query: selectParam
});
window.open(route.href, "_blank");
} else {
console.log('当前点击', selectParam, params.seriesName, params.name);
if (params.seriesName !== '通过率') {
selectParam.selectedDate = JSON.stringify(getMonthRange(params.name))
if (params.seriesName === '通过法案') {
selectParam.selectedStatus = 1
} else {
selectParam.selectedStatus = null
}
const route = router.resolve({
path: "/dataLibrary/countryBill",
query: selectParam
});
window.open(route.href, "_blank");
}
}
break
......@@ -89,16 +73,37 @@ const setChart = (option, chartId, allowClick, 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))
selectParam.selectedDate = JSON.stringify(getQuarterRange(selectParam.selectedDate, quatarNum))
const route = router.resolve({
path: "/dataLibrary/dataDecree",
query: selectParam
});
window.open(route.href, "_blank");
}
break
case '科技智库报告':
if (selectParam.key === 1) {
selectParam.domains = params.seriesName
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({
path: "/dataLibrary/dataThinkTank",
query: selectParam
});
window.open(route.href, "_blank");
return
} else if (selectParam.key === 2) {
selectParam.domains = params.name
const route = router.resolve({
path: "/dataLibrary/dataThinkTank",
query: selectParam
});
window.open(route.href, "_blank");
return
}
}
});
......
......@@ -890,7 +890,9 @@ const handleBox5 = async () => {
})[0]?.name
const selectParam = {
moduleType: '国会法案',
domains: domain
key: 1,
domains: domain ? domain : '全部领域',
isInvolveCn: true
}
setChart(box5Chart, "box5Chart", true, selectParam);
}
......@@ -941,8 +943,9 @@ const handleBox7Data = async () => {
const selectParam = {
moduleType: '国会法案',
key: '议院委员会',
selectedDate: box7selectetedTime.value,
key: 3,
selectedDate: box7selectetedTime.value ? JSON.stringify([box7selectetedTime.value + '-01-01', box7selectetedTime.value + '-12-31']) : '',
isInvolveCn: true
}
const box7Chart = getDoublePieChart(data1, data2);
......@@ -1092,10 +1095,10 @@ const handleBox9Data = async () => {
);
const selectParam = {
moduleType: '国会法案',
key: '领域',
selectedDate: box9selectetedTime.value,
selectedStatus: selectedIndex,
isInvolveCn: 1
key: 2,
selectedDate: box9selectetedTime.value ? JSON.stringify([box9selectetedTime.value + '-01-01', box9selectetedTime.value + '-12-31']) : '',
selectedStatus: box9LegislativeStatus.value ? box9LegislativeStatus.value : '全部阶段',
isInvolveCn: true
}
box9ChartInstance = setChart(box9Chart, "box9Chart", true, selectParam);
}
......@@ -1274,9 +1277,9 @@ const handleBox8Data = async () => {
const selectParam = {
moduleType: '国会法案',
key: '所处阶段',
selectedDate: box8selectetedTime.value,
isInvolveCn: 1
key: 4,
selectedDate: box8selectetedTime.value ? JSON.stringify([box8selectetedTime.value + '-01-01', box8selectetedTime.value + '-12-31']) : '',
isInvolveCn: true
}
await nextTick();
......
......@@ -316,12 +316,12 @@ const handleSearch = async () => {
console.log("综合搜索结果", res);
if (res.code === 200 && res.data) {
if (!selectedDomains.value.length) {
domains.value = Object.entries(res.data.aggregations).map(([name, id]) => ({
domains.value = Object.entries(res.data.aggregationsDomain).map(([name, id]) => ({
name,
id,
selected: false
}));
}
}
searchResults.value = res.data.records;
searchResults.value.forEach(item => {
item.originalTitle = highlightText(item.originalTitle, keyword.value);
......
......@@ -94,11 +94,11 @@
</div>
</div>
<div class="header-right">
<div class="header-right-item item1">
<div class="header-right-item item1" @click="handleExport">
<div class="icon">
<img src="../../assets/icons/download.svg" alt="">
</div>
<div class="text text-tip-1" @click="handleExport">{{ '导出' }}</div>
<div class="text text-tip-1">{{ '导出' }}</div>
</div>
<div class="header-right-item2 item2">
<el-select v-model="curOperation" placeholder="批量操作" style="width: 120px">
......@@ -833,13 +833,12 @@ const fetchTableData = async () => {
}))
}
const curDemensionItem = staticsDemensionList.value.filter(item => {
return item.name === curDemension.value
})[0]
activeChart.value = ''
timer3.value = setTimeout(() => {
activeChart.value = curDemensionItem.chartTypeList[0]
curChartData.value = curDemensionItem.data
......@@ -1040,7 +1039,7 @@ const initParam = () => {
}
isInvolveCn.value = route.query.isInvolveCn ? true : false
if (route.query.selectedStatus) {
selectedStatus.value = route.query.selectedStatus === '1' ? '通过' : '提出'
selectedStatus.value = route.query.selectedStatus
} else {
selectedStatus.value = '全部阶段'
}
......@@ -1061,7 +1060,7 @@ const initParam = () => {
}
isInvolveCn.value = savedQuery.isInvolveCn ? true : false
if (savedQuery.selectedStatus) {
selectedStatus.value = savedQuery.selectedStatus === '1' ? '通过' : '提出'
selectedStatus.value = savedQuery.selectedStatus
} else {
selectedStatus.value = '全部阶段'
}
......@@ -1102,6 +1101,10 @@ const handlePerClick = item => {
// 导出
const handleExport = () => {
if (!selectedCount.value) {
ElMessage.warning('请至少选择一项!')
return
}
console.log(selectedMap.value);
const arr = Array.from(selectedMap.value);
......@@ -1111,7 +1114,7 @@ const handleExport = () => {
const link = document.createElement('a');
link.href = url;
link.download = 'export.json';
link.download = 'bill.json';
link.click();
URL.revokeObjectURL(url);
......
<template>
<div class="input-wrapper">
<div class="input-left text-tip-1">{{ inputTitle + ':' }}</div>
<div class="input-right">
<el-input v-model="inputValue" :placeholder="placeholderName" style="width: 240px" />
</div>
</div>
</template>
<script setup>
import { computed } from 'vue';
const props = defineProps({
inputTitle: {
type: String,
default: ''
},
placeholderName: {
type: String,
default: ''
},
inputName: {
type: String,
default: ''
},
})
const emit = defineEmits(['update:inputText', 'update:customTime'])
const inputValue = computed({
get: () => props.inputName,
set: (value) => emit('update:inputText', value)
})
</script>
<style lang="scss" scoped>
.input-wrapper {
width: 348px;
height: 28px;
display: flex;
justify-content: space-between;
align-items: center;
gap: 8px;
.input-left {
width: 100px;
height: 24px;
color: var(--text-primary-65-color);
}
.input-right {
width: 240px;
display: flex;
gap: 8px;
justify-content: space-between;
:deep(.el-input__wrapper) {
border-radius: 4px;
border: 1px solid var(--bg-black-10);
}
}
}
</style>
\ No newline at end of file
......@@ -101,11 +101,11 @@
</div>
</div>
<div class="header-right">
<div class="header-right-item item1">
<div class="header-right-item item1" @click="handleExport">
<div class="icon">
<img src="../assets/icons/download.svg" alt="">
</div>
<div class="text text-tip-1" @click="handleExport">{{ '导出' }}</div>
<div class="text text-tip-1">{{ '导出' }}</div>
</div>
<div class="header-right-item2 item2">
<el-select v-model="curOperation" placeholder="批量操作" style="width: 120px">
......@@ -137,7 +137,7 @@
<el-table-column label="发布时间" width="120" class-name="date-column">
<template #default="scope">{{ scope.row.date }}</template>
</el-table-column>
<el-table-column label="发布机构" width="180">
<el-table-column label="发布机构">
<template #default="scope">
<span class="person-item text-compact" @click="handlePerClick(scope.row)">{{ scope.row.organizationName
}}</span>
......@@ -396,6 +396,7 @@ const handleCloseCurTag = (tag, index) => {
break
case '发布时间':
selectedDate.value = ''
customTime.value = []
break
case '发布机构':
selectedIns.value = '全部机构'
......@@ -765,6 +766,8 @@ const fetchTableData = async () => {
return item.name === curDemension.value
})[0]
activeChart.value = ''
setTimeout(() => {
activeChart.value = curDemensionItem.chartTypeList[0]
curChartData.value = curDemensionItem.data
......@@ -989,12 +992,12 @@ const initParam = () => {
const handleClickToDetail = (curDecree) => {
console.log('curDecree', curDecree);
window.sessionStorage.setItem("billId", curDecree.id);
window.sessionStorage.setItem("decreeId", curDecree.id);
window.sessionStorage.setItem("curTabName", curDecree.title);
const route = router.resolve({
path: "/decreeLayout",
query: {
billId: curDecree.id
id: curDecree.id
}
});
window.open(route.href, "_blank");
......@@ -1340,4 +1343,6 @@ onMounted(async () => {
// :deep(.el-table__header th:first-child) {
// background-color: #e6f7ff;
// color: #1890ff;
// }</style>
\ No newline at end of file
// }
</style>
\ No newline at end of file
......@@ -298,7 +298,8 @@
</div>
<div class="box8-main">
<div class="box8-main-item">
<div class="box8-item" v-for="(item, index) in box8Data" :key="index">
<div class="box8-item" v-for="(item, index) in box8Data" :key="index"
@click="handleBox8ToDataLibrary(item)">
<div class="item-left"
:class="{ itemBold1: index === 0, itemBold2: index === 1, itemBold3: index === 2 }">
{{ index + 1 }}
......@@ -1001,8 +1002,14 @@ const renderBox5Chart = () => {
if (!chartInput.title.length || !chartInput.data.length) {
return;
}
const selectParam = {
moduleType: '科技智库报告',
key: 1,
}
const box5Chart = getMultiLineChart(chartInput);
setChart(box5Chart, "box5Chart");
setChart(box5Chart, "box5Chart", true, selectParam);
};
const handleBox5AreaChange = () => {
......@@ -1318,8 +1325,14 @@ const renderBox6Chart = () => {
if (!pieData.length) {
return;
}
const selectParam = {
moduleType: '科技智库报告',
key: 2,
selectedDate: JSON.stringify([box6selectetedYear.value + '-01-01', box6selectetedYear.value + '-12-31']),
orgnizationName: box6selectetedTank.value,
}
const box6Chart = getPieChart(pieData);
setChart(box6Chart, "box6Chart");
setChart(box6Chart, "box6Chart", true, selectParam);
};
const handleBox6AreaChange = () => {
......@@ -1580,6 +1593,19 @@ const handleGetThinkTankHot = async date => {
}
};
const handleBox8ToDataLibrary = (item) => {
console.log('item', item);
const selectParam = {
reportName: item.clause
}
const route = router.resolve({
path: "/dataLibrary/dataThinkTank",
query: selectParam
});
window.open(route.href, "_blank");
}
// 资源库
const categoryList = ref(["智库报告", "调查项目", "国会听证会", "政策建议"]);
const activeCate = ref("智库报告");
......@@ -3958,6 +3984,16 @@ onMounted(async () => {
width: 452px;
height: 24px;
display: flex;
cursor: pointer;
&:hover {
.item-center {
color: var(--color-primary-100) !important;
text-decoration: underline;
}
}
.item-left {
width: 20px;
......
......@@ -108,7 +108,7 @@ const getMultiLineChart = (data) => {
return {
tooltip: {
trigger: 'axis',
trigger: 'item',
axisPointer: {
type: 'cross',
label: {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论