提交 cd19ef12 authored 作者: coderBryanFu's avatar coderBryanFu

feat:更新数据资源库

上级 152adc61
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<div class="icon"> <div class="icon">
<img :src="item.icon" alt="" /> <img :src="item.icon" alt="" />
</div> </div>
<div class="title">{{ item.title }}</div> <div class="title" :class="{ 'active-title': item.active }">{{ item.title }}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -157,57 +157,68 @@ const menuList = ref([ ...@@ -157,57 +157,68 @@ const menuList = ref([
{ {
title: "科技法案", title: "科技法案",
icon: Menu2, icon: Menu2,
path: "/billHome" path: "/billHome",
active: false
}, },
{ {
title: "科技政令", title: "科技政令",
icon: Menu3, icon: Menu3,
path: "/decree" path: "/decree",
active: false
}, },
{ {
title: "美国科技智库", title: "美国科技智库",
icon: Menu4, icon: Menu4,
path: "/thinkTank" path: "/thinkTank",
active: false
}, },
{ {
title: "出口管制", title: "出口管制",
icon: Menu5, icon: Menu5,
path: "/exportControl" path: "/exportControl",
active: false
}, },
{ {
title: "科研合作限制", title: "科研合作限制",
icon: Menu6, icon: Menu6,
path: "/cooperationRestrictions" path: "/cooperationRestrictions",
active: false
}, },
{ {
title: "投融资限制", title: "投融资限制",
icon: Menu7, icon: Menu7,
path: "/finance" path: "/finance",
active: false
}, },
{ {
title: "市场准入限制", title: "市场准入限制",
icon: Menu8, icon: Menu8,
path: "/marketAccessRestrictions" path: "/marketAccessRestrictions",
active: false
}, },
{ {
title: "规则限制", title: "规则限制",
icon: Menu9, icon: Menu9,
path: "/ruleRestrictions" path: "/ruleRestrictions",
active: false
}, },
{ {
title: "美国科技人物观点", title: "美国科技人物观点",
icon: Menu10, icon: Menu10,
path: "/technologyFigures" path: "/technologyFigures",
active: false
}, },
{ {
title: "美国主要创新主体动向", title: "美国主要创新主体动向",
icon: Menu11, icon: Menu11,
path: "/innovationSubject" path: "/innovationSubject",
active: false
}, },
{ {
title: "美国科研资助体系", title: "美国科研资助体系",
icon: Menu12, icon: Menu12,
path: "/scientificFunding" path: "/scientificFunding",
active: false
} }
]); ]);
...@@ -235,6 +246,7 @@ const handleToModule = (item, index) => { ...@@ -235,6 +246,7 @@ 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
item.active = true
router.push({ router.push({
path: item.path path: item.path
}) })
...@@ -253,7 +265,7 @@ const handleToModule = (item, index) => { ...@@ -253,7 +265,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) window.sessionStorage.setItem('homeActiveTitleIndex', index)
homeActiveTitleIndex.value = index homeActiveTitleIndex.value = index
...@@ -497,6 +509,11 @@ onUnmounted(() => { ...@@ -497,6 +509,11 @@ onUnmounted(() => {
letter-spacing: 0px; letter-spacing: 0px;
text-align: left; text-align: left;
} }
.active-title {
color: var(--color-main-active) !important;
font-size: 20px !important;
}
} }
} }
} }
...@@ -528,6 +545,8 @@ onUnmounted(() => { ...@@ -528,6 +545,8 @@ onUnmounted(() => {
display: flex; display: flex;
cursor: pointer; cursor: pointer;
&:hover { &:hover {
.title { .title {
color: var(--color-main-active); color: var(--color-main-active);
...@@ -557,6 +576,11 @@ onUnmounted(() => { ...@@ -557,6 +576,11 @@ onUnmounted(() => {
letter-spacing: 0px; letter-spacing: 0px;
text-align: left; 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图表 // 绘制echarts图表
import getMonthRange from './getMonthRange' import getMonthRange from './getMonthRange'
import getQuarterRange from './getQuarterRange';
import * as echarts from 'echarts' import * as echarts from 'echarts'
import 'echarts-wordcloud'; import 'echarts-wordcloud';
import router from '@/router/index' import router from '@/router/index'
...@@ -77,6 +78,26 @@ const setChart = (option, chartId, allowClick, selectParam) => { ...@@ -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 @@ ...@@ -151,7 +151,7 @@
</template> </template>
<script setup> <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 ChartContainer from '../../components/ChartContainer/index.vue'
import ChartHeader from '../../components/ChartHeader/index.vue' import ChartHeader from '../../components/ChartHeader/index.vue'
import ActiveTag from '../../components/ActiveTag/index.vue' import ActiveTag from '../../components/ActiveTag/index.vue'
...@@ -171,6 +171,10 @@ import getDateRange from '@/utils/getDateRange' ...@@ -171,6 +171,10 @@ import getDateRange from '@/utils/getDateRange'
const route = useRoute(); const route = useRoute();
const timer1 = ref(null)
const timer2 = ref(null)
const timer3 = ref(null)
// 图表/数据 // 图表/数据
const isShowChart = ref(false) const isShowChart = ref(false)
// 点击切换数据/图表 // 点击切换数据/图表
...@@ -180,7 +184,7 @@ const handleSwitchChartData = () => { ...@@ -180,7 +184,7 @@ const handleSwitchChartData = () => {
const curDemensionItem = staticsDemensionList.value.filter(item => { const curDemensionItem = staticsDemensionList.value.filter(item => {
return item.name === curDemension.value return item.name === curDemension.value
})[0] })[0]
setTimeout(() => { timer1.value = setTimeout(() => {
activeChart.value = curDemensionItem.chartTypeList[0] activeChart.value = curDemensionItem.chartTypeList[0]
curChartData.value = curDemensionItem.data curChartData.value = curDemensionItem.data
}) })
...@@ -267,7 +271,7 @@ const handleClickDemensionItem = (val) => { ...@@ -267,7 +271,7 @@ const handleClickDemensionItem = (val) => {
}) })
val.active = true val.active = true
curDemension.value = val.name curDemension.value = val.name
setTimeout(() => { timer2.value = setTimeout(() => {
activeChart.value = val.chartTypeList[0] activeChart.value = val.chartTypeList[0]
curChartData.value = val.data curChartData.value = val.data
}) })
...@@ -702,8 +706,8 @@ const statusList = ref([ ...@@ -702,8 +706,8 @@ const statusList = ref([
id: '参议院通过' id: '参议院通过'
}, },
{ {
name: '双院通过', name: '分歧已解决',
id: '双院通过' id: '分歧已解决'
}, },
]) ])
...@@ -778,8 +782,8 @@ const selectedCount = computed(() => selectedMap.value.size) ...@@ -778,8 +782,8 @@ const selectedCount = computed(() => selectedMap.value.size)
// 获取表格数据(示例) // 获取表格数据(示例)
const fetchTableData = async () => { const fetchTableData = async () => {
isSelectedAll.value = false // isSelectedAll.value = false
selectedMap.value.clear() // selectedMap.value.clear()
// 调用接口获取数据... // 调用接口获取数据...
const params = { const params = {
page: currentPage.value, page: currentPage.value,
...@@ -793,8 +797,8 @@ const fetchTableData = async () => { ...@@ -793,8 +797,8 @@ const fetchTableData = async () => {
originChamber: selectedCongress.value === '全部议院' ? null : selectedCongress.value, originChamber: selectedCongress.value === '全部议院' ? null : selectedCongress.value,
originDepart: selectedOrg.value === '全部委员会' ? null : selectedOrg.value, originDepart: selectedOrg.value === '全部委员会' ? null : selectedOrg.value,
sponsorPersonName: selectedmember.value === '全部议员' ? null : selectedmember.value, sponsorPersonName: selectedmember.value === '全部议员' ? null : selectedmember.value,
status: selectedStatus.value === '通过' ? 1 : 0, status: selectedStatus.value === '全部阶段' ? null : selectedStatus.value,
isInvolveCn: isInvolveCn ? 'Y' : 'N', isInvolveCn: isInvolveCn.value ? 'Y' : 'N',
sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序 sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序
} }
try { try {
...@@ -836,7 +840,7 @@ const fetchTableData = async () => { ...@@ -836,7 +840,7 @@ const fetchTableData = async () => {
return item.name === curDemension.value return item.name === curDemension.value
})[0] })[0]
setTimeout(() => { timer3.value = setTimeout(() => {
activeChart.value = curDemensionItem.chartTypeList[0] activeChart.value = curDemensionItem.chartTypeList[0]
curChartData.value = curDemensionItem.data curChartData.value = curDemensionItem.data
}) })
...@@ -877,7 +881,7 @@ const fetchAllData = async () => { ...@@ -877,7 +881,7 @@ const fetchAllData = async () => {
originDepart: selectedOrg.value === '全部委员会' ? null : selectedOrg.value, originDepart: selectedOrg.value === '全部委员会' ? null : selectedOrg.value,
sponsorPersonName: selectedmember.value === '全部议员' ? null : selectedmember.value, sponsorPersonName: selectedmember.value === '全部议员' ? null : selectedmember.value,
status: selectedStatus.value === '通过' ? 1 : 0, status: selectedStatus.value === '通过' ? 1 : 0,
isInvolveCn: isInvolveCn ? 'Y' : 'N', isInvolveCn: isInvolveCn.value ? 'Y' : 'N',
sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序 sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序
} }
try { try {
...@@ -1116,14 +1120,21 @@ const handleExport = () => { ...@@ -1116,14 +1120,21 @@ const handleExport = () => {
onMounted(async () => { onMounted(async () => {
handleGetOrgList() handleGetOrgList()
handleGetMemberList() handleGetMemberList()
initParam() initParam()
// 初始化 // 初始化
await fetchTableData() await fetchTableData()
})
onBeforeUnmount(() => {
if (timer1.value) {
clearTimeout(timer1.value)
}
if (timer2.value) {
clearTimeout(timer2.value)
}
if (timer3.value) {
clearTimeout(timer3.value)
}
}) })
</script> </script>
...@@ -1239,10 +1250,11 @@ onMounted(async () => { ...@@ -1239,10 +1250,11 @@ onMounted(async () => {
.data-main-box { .data-main-box {
width: 1568px; width: 1568px;
height: 810px; min-height: 810px;
border-radius: 10px; border-radius: 10px;
background: var(--bg-white-100); background: var(--bg-white-100);
margin: 0 auto; margin: 0 auto;
margin-bottom: 20px;
overflow: hidden; overflow: hidden;
.data-main-box-header { .data-main-box-header {
...@@ -1274,8 +1286,7 @@ onMounted(async () => { ...@@ -1274,8 +1286,7 @@ onMounted(async () => {
.data-main-box-main { .data-main-box-main {
width: 1520px; width: 1520px;
// height: 633px; min-height: 680px;
height: 680px;
border-radius: 10px; border-radius: 10px;
border: 1px solid var(--bg-black-5); border: 1px solid var(--bg-black-5);
margin: 0 auto; margin: 0 auto;
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<slot name="chart-box"></slot> <slot name="chart-box"></slot>
</div> </div>
<div class="tip-box"> <div class="tip-box">
<TipTab /> <TipTab text="数据来源:美国国会官网" />
</div> </div>
</div> </div>
</div> </div>
...@@ -176,8 +176,7 @@ const chartItemList = computed(() => { ...@@ -176,8 +176,7 @@ const chartItemList = computed(() => {
.tip-box { .tip-box {
height: 54px; height: 54px;
box-sizing: border-box; box-sizing: border-box;
padding-top: 10px; padding: 15px 600px;
// background: orange;
} }
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<div class="select-wrapper" :class="{ 'select-wrapper-custom': selectValue === '自定义' }"> <div class="select-wrapper" :class="{ 'select-wrapper-custom': selectValue === '自定义' }">
<div class="select-left text-tip-1">{{ selectTitle + ':' }}</div> <div class="select-left text-tip-1">{{ selectTitle + ':' }}</div>
<div class="select-right" :class="{ 'select-right-custom': selectValue === '自定义' }"> <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 label="全部领域" value="全部领域" /> -->
<el-option v-for="item in selectList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in selectList" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
......
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
<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" @click="handleExport">{{ '导出' }}</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">
...@@ -128,7 +128,7 @@ ...@@ -128,7 +128,7 @@
<el-table ref="tableRef" :data="tableData" row-key="id" @selection-change="handleSelectionChange" <el-table ref="tableRef" :data="tableData" row-key="id" @selection-change="handleSelectionChange"
@select="handleSelect" @select-all="handleSelectAll" style="width: 100%" :row-style="{ height: '52px' }"> @select="handleSelect" @select-all="handleSelectAll" style="width: 100%" :row-style="{ height: '52px' }">
<el-table-column type="selection" width="40" /> <el-table-column type="selection" width="40" />
<el-table-column label="法案名称" width="455"> <el-table-column label="政令名称" width="720">
<template #default="scope"> <template #default="scope">
<span class="title-item text-compact-bold" @click="handleClickToDetail(scope.row)">{{ scope.row.title <span class="title-item text-compact-bold" @click="handleClickToDetail(scope.row)">{{ scope.row.title
}}</span> }}</span>
...@@ -137,15 +137,23 @@ ...@@ -137,15 +137,23 @@
<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="480"> <el-table-column label="发布机构" width="180">
<template #default="scope"> <template #default="scope">
<span class="person-item text-compact" @click="handlePerClick(scope.row)">{{ scope.row.sponsorPersonName <span class="person-item text-compact" @click="handlePerClick(scope.row)">{{ scope.row.organizationName
}}</span> }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column property="affiliation" label="所属党派" width="120" /> <el-table-column label="涉及领域" width="350" class-name="date-column">
<el-table-column property="originDepart" label="提出委员会" width="180" /> <template #default="scope">
<el-table-column property="status" label="所处阶段" width="120" /> <div class="tag-box">
<AreaTag v-for="tag, index in scope.row.domains" :key="index" :tagName="tag" />
</div>
</template>
</el-table-column>
<el-table-column label="政令类型" width="100">
<template #default="scope">{{ scope.row.typeStr }}</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
</div> </div>
...@@ -175,6 +183,8 @@ import { search } from '@/api/comprehensiveSearch' ...@@ -175,6 +183,8 @@ import { search } from '@/api/comprehensiveSearch'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import getDateRange from '@/utils/getDateRange' import getDateRange from '@/utils/getDateRange'
import { getDepartmentList } from "@/api/decree/home";
const route = useRoute(); const route = useRoute();
// 图表/数据 // 图表/数据
...@@ -363,7 +373,7 @@ const activeTagList = computed(() => { ...@@ -363,7 +373,7 @@ const activeTagList = computed(() => {
} }
if (isInvolveTechnology.value) { if (isInvolveTechnology.value) {
const involveStr = '政令相关' const involveStr = '科技相关'
arr.push( arr.push(
{ {
tag: '科技相关', tag: '科技相关',
...@@ -593,18 +603,6 @@ const insList = ref([ ...@@ -593,18 +603,6 @@ const insList = ref([
name: '全部机构', name: '全部机构',
id: '全部机构' id: '全部机构'
}, },
{
name: '机构1',
id: '机构1'
},
{
name: '机构2',
id: '机构2'
},
{
name: '其他',
id: '其他'
},
]) ])
const selectedIns = ref('全部机构') const selectedIns = ref('全部机构')
const insPlaceHolder = ref('请选择发布机构') const insPlaceHolder = ref('请选择发布机构')
...@@ -612,6 +610,30 @@ const handleSelectIns = value => { ...@@ -612,6 +610,30 @@ const handleSelectIns = value => {
selectedIns.value = value selectedIns.value = value
} }
const handleGetDeparmentList = async () => {
try {
// let { keyWord, pageNum, pageSize, day } = organizationInfo
const params = {
day: 365,
}
const res = await getDepartmentList(params);
console.log("机构列表", res);
if (res.code === 200) {
let arr = res.data.orgList.map(item => {
return {
name: item.orgName,
id: item.orgName
}
})
insList.value = [...insList.value, ...arr]
}
} catch (error) {
}
}
// 政令类型列表 // 政令类型列表
const decreeTypeList = ref([ const decreeTypeList = ref([
{ {
...@@ -642,6 +664,7 @@ const isInvolveTechnology = ref(false) ...@@ -642,6 +664,7 @@ const isInvolveTechnology = ref(false)
const handleClear = () => { const handleClear = () => {
selectedArea.value = '全部领域' selectedArea.value = '全部领域'
selectedDate.value = '' selectedDate.value = ''
customTime.value = []
selectedIns.value = '全部机构' selectedIns.value = '全部机构'
selectedDecreeType.value = '全部类型' selectedDecreeType.value = '全部类型'
isInvolveCn.value = false isInvolveCn.value = false
...@@ -701,12 +724,12 @@ const fetchTableData = async () => { ...@@ -701,12 +724,12 @@ const fetchTableData = async () => {
keyword: '', keyword: '',
type: 2, // type 1= 法案 2= 政令 3 =智库 4=智库报告 5=实体清单【制裁记录】 6= 人物 7= 机构 8=新闻 9= 社媒 type: 2, // type 1= 法案 2= 政令 3 =智库 4=智库报告 5=实体清单【制裁记录】 6= 人物 7= 机构 8=新闻 9= 社媒
domains: selectedArea.value === '全部领域' ? null : [selectedArea.value], domains: selectedArea.value === '全部领域' ? null : [selectedArea.value],
proposedDateStart: customTime.value[0], proposedDateStart: customTime.value[0]?customTime.value[0]:null,
proposedDateEnd: customTime.value[1], proposedDateEnd: customTime.value[1]?customTime.value[1]:null,
affiliation: selectedIns.value === '全部机构' ? null : selectedIns.value, organizationName: selectedIns.value === '全部机构' ? null : selectedIns.value,
originChamber: selectedDecreeType.value === '全部类型' ? null : selectedDecreeType.value, decreeType: selectedDecreeType.value === '全部类型' ? null : selectedDecreeType.value,
sleStatus: isInvolveCn ? 'Y' : 'N', isInvolveCn: isInvolveCn.value ? 'Y' : 'N',
aaaa: isInvolveTechnology? 'Y' : 'N', isTechRelated: isInvolveTechnology.value ? 'Y' : 'N',
sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序 sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序
} }
try { try {
...@@ -731,7 +754,7 @@ const fetchTableData = async () => { ...@@ -731,7 +754,7 @@ const fetchTableData = async () => {
name: key, name: key,
value: Number(value) value: Number(value)
})) }))
staticsDemensionList.value[2].data = Object.entries(res.data.aggregationsOriginChamber).map(([key, value]) => ({ staticsDemensionList.value[2].data = Object.entries(res.data.aggregationsorganizationName).map(([key, value]) => ({
name: key, name: key,
value: Number(value) value: Number(value)
})) }))
...@@ -773,11 +796,11 @@ const fetchAllData = async () => { ...@@ -773,11 +796,11 @@ const fetchAllData = async () => {
domains: selectedArea.value === '全部领域' ? null : [selectedArea.value], domains: selectedArea.value === '全部领域' ? null : [selectedArea.value],
proposedDateStart: customTime.value[0], proposedDateStart: customTime.value[0],
proposedDateEnd: customTime.value[1], proposedDateEnd: customTime.value[1],
affiliation: selectedIns.value === '全部机构' ? null : selectedIns.value, organizationName: selectedIns.value === '全部机构' ? null : selectedIns.value,
originChamber: selectedDecreeType.value === '全部类型' ? null : selectedDecreeType.value, decreeType: selectedDecreeType.value === '全部类型' ? null : selectedDecreeType.value,
sleStatus: isInvolveCn ? 'Y' : 'N', isInvolveCn: isInvolveCn.value ? 'Y' : 'N',
aaaa: isInvolveTechnology? 'Y' : 'N', isTechRelated: isInvolveTechnology.value ? 'Y' : 'N',
sort: isSort.value ? 0 : 1 // 0 先按分数降序 后按时间降序 1 先按分数降序,再按时间升序 sort: isSort.value ? 0 : 1
} }
try { try {
const res = await search(params) const res = await search(params)
...@@ -933,6 +956,9 @@ const initParam = () => { ...@@ -933,6 +956,9 @@ const initParam = () => {
selectedDate.value = '自定义' selectedDate.value = '自定义'
customTime.value = JSON.parse(route.query.selectedDate) customTime.value = JSON.parse(route.query.selectedDate)
} }
selectedIns.value = route.query.orgnizationName? route.query.orgnizationName : '全部机构'
isInvolveCn.value = route.query.isInvolveCn ? true : false isInvolveCn.value = route.query.isInvolveCn ? true : false
isInvolveTechnology.value = route.query.isInvolveTechnology ? true : false isInvolveTechnology.value = route.query.isInvolveTechnology ? true : false
...@@ -946,7 +972,7 @@ const initParam = () => { ...@@ -946,7 +972,7 @@ const initParam = () => {
} else { } else {
const savedQuery = JSON.parse(sessionStorage.getItem('decreeRouteQuery') || '{}'); const savedQuery = JSON.parse(sessionStorage.getItem('decreeRouteQuery') || '{}');
selectedArea.value = savedQuery.domains ? savedQuery.domains : '全部领域' selectedArea.value = savedQuery.domains ? savedQuery.domains : '全部领域'
if (Array.isArray(JSON.parse(savedQuery.selectedDate)) && JSON.parse(savedQuery.selectedDate).length) { if (savedQuery.selectedDate && Array.isArray(JSON.parse(savedQuery.selectedDate)) && JSON.parse(savedQuery.selectedDate).length) {
selectedDate.value = '自定义' selectedDate.value = '自定义'
customTime.value = JSON.parse(savedQuery.selectedDate) customTime.value = JSON.parse(savedQuery.selectedDate)
} }
...@@ -959,16 +985,16 @@ const initParam = () => { ...@@ -959,16 +985,16 @@ const initParam = () => {
} }
// 跳转法案详情 // 跳转政令详情
const handleClickToDetail = (curBill) => { const handleClickToDetail = (curDecree) => {
console.log('curBill', curBill); console.log('curDecree', curDecree);
window.sessionStorage.setItem("billId", curBill.id); window.sessionStorage.setItem("billId", curDecree.id);
window.sessionStorage.setItem("curTabName", curBill.title); window.sessionStorage.setItem("curTabName", curDecree.title);
const route = router.resolve({ const route = router.resolve({
path: "/billLayout", path: "/decreeLayout",
query: { query: {
billId: curBill.id billId: curDecree.id
} }
}); });
window.open(route.href, "_blank"); window.open(route.href, "_blank");
...@@ -989,13 +1015,16 @@ const handlePerClick = item => { ...@@ -989,13 +1015,16 @@ 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);
const jsonStr = JSON.stringify(arr, null, 2); const jsonStr = JSON.stringify(arr, null, 2);
const blob = new Blob([jsonStr], { type: 'application/json' }); const blob = new Blob([jsonStr], { type: 'application/json' });
const url = URL.createObjectURL(blob); const url = URL.createObjectURL(blob);
const link = document.createElement('a'); const link = document.createElement('a');
link.href = url; link.href = url;
link.download = 'export.json'; link.download = 'export.json';
...@@ -1005,7 +1034,7 @@ const handleExport = () => { ...@@ -1005,7 +1034,7 @@ const handleExport = () => {
}; };
onMounted(async () => { onMounted(async () => {
handleGetDeparmentList()
initParam() initParam()
// 初始化 // 初始化
...@@ -1127,10 +1156,11 @@ onMounted(async () => { ...@@ -1127,10 +1156,11 @@ onMounted(async () => {
.data-main-box { .data-main-box {
width: 1568px; width: 1568px;
height: 810px; min-height: 810px;
border-radius: 10px; border-radius: 10px;
background: var(--bg-white-100); background: var(--bg-white-100);
margin: 0 auto; margin: 0 auto;
margin-bottom: 20px;
overflow: hidden; overflow: hidden;
.data-main-box-header { .data-main-box-header {
...@@ -1163,7 +1193,7 @@ onMounted(async () => { ...@@ -1163,7 +1193,7 @@ onMounted(async () => {
.data-main-box-main { .data-main-box-main {
width: 1520px; width: 1520px;
// height: 633px; // height: 633px;
height: 680px; min-height: 680px;
border-radius: 10px; border-radius: 10px;
border: 1px solid var(--bg-black-5); border: 1px solid var(--bg-black-5);
margin: 0 auto; margin: 0 auto;
...@@ -1257,6 +1287,14 @@ onMounted(async () => { ...@@ -1257,6 +1287,14 @@ onMounted(async () => {
.date-column { .date-column {
background-color: #ecf5ff; background-color: #ecf5ff;
.tag-box {
display: flex;
flex-wrap: wrap;
gap: 8px;
width: 340px;
}
} }
.date-column .cell { .date-column .cell {
...@@ -1284,6 +1322,8 @@ onMounted(async () => { ...@@ -1284,6 +1322,8 @@ onMounted(async () => {
} }
} }
:deep(.el-table__header-wrapper) { :deep(.el-table__header-wrapper) {
// background-color: #f5f7fa; // background-color: #f5f7fa;
height: 48px; height: 48px;
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
</template> </template>
<script setup> <script setup>
import { computed, onMounted, ref } from 'vue' import { computed, onBeforeUnmount, onMounted, ref } from 'vue'
import Icon1 from './assets/icons/sider-icon1.svg' import Icon1 from './assets/icons/sider-icon1.svg'
import Icon2 from './assets/icons/sider-icon2.svg' import Icon2 from './assets/icons/sider-icon2.svg'
import Icon3 from './assets/icons/sider-icon3.svg' import Icon3 from './assets/icons/sider-icon3.svg'
...@@ -398,6 +398,8 @@ const handleClickTab = (tab) => { ...@@ -398,6 +398,8 @@ const handleClickTab = (tab) => {
}) })
} }
const timer = ref(null)
// 关闭当前标签页 // 关闭当前标签页
const handleCloseCurTab = (tab, index) => { const handleCloseCurTab = (tab, index) => {
...@@ -416,7 +418,7 @@ const handleCloseCurTab = (tab, index) => { ...@@ -416,7 +418,7 @@ const handleCloseCurTab = (tab, index) => {
}) })
if (index === openedTabList.value.length - 1) { if (index === openedTabList.value.length - 1) {
tagsViewStore.delView(tab) tagsViewStore.delView(tab)
setTimeout(() => { timer.value = setTimeout(() => {
tagsViewStore.visitedViews[tagsViewStore.visitedViews.length - 1].active = true tagsViewStore.visitedViews[tagsViewStore.visitedViews.length - 1].active = true
activeTab = tagsViewStore.visitedViews[tagsViewStore.visitedViews.length - 1] activeTab = tagsViewStore.visitedViews[tagsViewStore.visitedViews.length - 1]
router.push({ router.push({
...@@ -593,6 +595,11 @@ onMounted(() => { ...@@ -593,6 +595,11 @@ onMounted(() => {
}) })
onBeforeUnmount(() => {
if(timer.value) {
clearTimeout(timer.value)
}
})
</script> </script>
......
...@@ -896,7 +896,25 @@ const handleBox5 = async () => { ...@@ -896,7 +896,25 @@ const handleBox5 = async () => {
let chart1 = getBarChart(chart1Data.value.dataX, chart1Data.value.dataY); let chart1 = getBarChart(chart1Data.value.dataX, chart1Data.value.dataY);
chart1.yAxis.name = "数量"; chart1.yAxis.name = "数量";
chart1.yAxis.nameTextStyle = { align: 'right' } 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);
}; };
// 政令科技领域 // 政令科技领域
...@@ -943,8 +961,19 @@ const handleGetDecreeArea = async () => { ...@@ -943,8 +961,19 @@ const handleGetDecreeArea = async () => {
}; };
const handleBox6 = async () => { const handleBox6 = async () => {
await handleGetDecreeArea(); 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); let chart2 = getPieChart(chart2Data.value);
setChart(chart2, "chart2"); setChart(chart2, "chart2", true, selectParam);
}; };
const handleBox6YearChange = () => { const handleBox6YearChange = () => {
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<router-view /> <router-view />
</div> </div>
</div> </div>
<div class="right-btn" @click="handleClickToolBox"> <div class="right-btn" v-if="isShowToolBox" @click="handleClickToolBox">
<div class="item"> <div class="item">
<div class="icon"> <div class="icon">
<img src="@/assets/icons/overview/domain.png" alt="" /> <img src="@/assets/icons/overview/domain.png" alt="" />
...@@ -22,20 +22,7 @@ ...@@ -22,20 +22,7 @@
</div> </div>
</div> </div>
<div class="tool-box"> <div class="tool-box" v-if="isShowToolBox">
<!-- <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> -->
<el-tooltip content="智能写报" placement="left" :offset="10"> <el-tooltip content="智能写报" placement="left" :offset="10">
<div class="tool-item" @click="handleOpenPage('znxb')"> <div class="tool-item" @click="handleOpenPage('znxb')">
<img src="@/assets/icons/tool-item-icon1.png" alt="" /> <img src="@/assets/icons/tool-item-icon1.png" alt="" />
...@@ -96,6 +83,11 @@ import { ElMessage } from "element-plus"; ...@@ -96,6 +83,11 @@ import { ElMessage } from "element-plus";
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();
const isShowToolBox = computed(() => {
const isShow = route.fullPath.includes('dataLibrary') ? false : true
return isShow
})
const isShowHeader = computed(() => { const isShowHeader = computed(() => {
const isShow = route.meta.isShowHeader const isShow = route.meta.isShowHeader
return isShow? true : false return isShow? true : false
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论