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

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

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