提交 b46bec00 authored 作者: 胡卉清's avatar 胡卉清

合并分支 'dev_hhq' 到 'master'

Dev hhq 查看合并请求 !56
......@@ -380,7 +380,7 @@ const box3Data = ref({
// ]
});
const box3SelectYear = ref("2024");
const box3SelectYear = ref("2025");
const box3YearList = ref([
{
label: "2025",
......
......@@ -308,21 +308,31 @@ const handleCurrentChange = page => {
handleGetThinkDynamicsReport()
};
function arrayToString(arr) {
return arr.reduce((acc, item) => {
if (item !== null && item !== undefined && item !== "") {
return acc === "" ? item : acc + "," + item;
}
return acc;
}, "");
}
// 获取智库动态报告
const handleGetThinkDynamicsReport = async () => {
console.log(selectedReportTypeList.value, 'selectedReportTypeList.value')
console.log(selectedResearchTypeList.value, 'selectedResearchTypeList.value')
try {
const parmas = {
id: router.currentRoute._value.params.id,
startDate: getDateYearsAgo(selectedYear.value),
parmas: {
searchText: searchReport.value,
authorName: author.name,
sortFun: sort.value,
authorName: author.value ? author.value : null,
currentPage: currentPage.value,
currentPage: currentPage.value - 1,
pageSize: 12,
reportTypeIds: selectedReportTypeList.value ? selectedReportTypeList.value : null,
researchTypeIds: selectedResearchTypeList.value ? selectedResearchTypeList.value : null
reportTypeIds: arrayToString(selectedReportTypeList.value) === '' ? null : arrayToString(selectedResearchTypeList.value),
researchTypeIds: arrayToString(selectedResearchTypeList.value) === '' ? null : arrayToString(selectedResearchTypeList.value)
}
}
......@@ -331,6 +341,9 @@ const handleGetThinkDynamicsReport = async () => {
if (res.code === 200 && res.data) {
curFooterList.value = res.data.content
total.value = res.data.totalElements
} else if (res.code === 500 && res.message === '未找到对应筛选的报告') {
curFooterList.value = []
total.value = 0
}
} catch (error) {
console.error("获取智库动态报告error", error);
......
......@@ -78,17 +78,12 @@
</div>
<div class="content">{{ item.desc }}</div>
<div class="tag-box">
<div
class="tag"
:class="{
<div class="tag" :class="{
tag1: val.status === 1,
tag2: val.status === 2,
tag3: val.status === 3,
tag4: val.status === 4
}"
v-for="(val, idx) in item.tagList"
:key="idx"
>
}" v-for="(val, idx) in item.tagList" :key="idx">
{{ val.name }}
</div>
</div>
......@@ -113,12 +108,8 @@
</div>
</div>
<div style="display: flex">
<img
src="./assets/images/right-left-icon1.png"
alt=""
style="margin-top: 174px; width: 24px; height: 48px"
@click="changeBox1Data('previous')"
/>
<img src="./assets/images/right-left-icon1.png" alt=""
style="margin-top: 174px; width: 24px; height: 48px" @click="changeBox1Data('previous')" />
<div class="box1-main">
<div class="box1-main-left">
<img :src="box1Data[box1DataIndex]?.imageUrl" alt="" />
......@@ -126,11 +117,7 @@
<div class="box1-main-right">
<div class="title">{{ box1Data[box1DataIndex]?.reportName }}</div>
<div class="tag-box">
<div
class="tag"
v-for="(item, index) in box1Data[box1DataIndex]?.industryVOList"
:key="index"
>
<div class="tag" v-for="(item, index) in box1Data[box1DataIndex]?.industryVOList" :key="index">
{{ item }}
</div>
</div>
......@@ -146,12 +133,8 @@
</div>
</div>
</div>
<img
src="./assets/images/right-left-icon2.png"
alt=""
style="margin-top: 174px; width: 24px; height: 48px"
@click="changeBox1Data('next')"
/>
<img src="./assets/images/right-left-icon2.png" alt=""
style="margin-top: 174px; width: 24px; height: 48px" @click="changeBox1Data('next')" />
</div>
</div>
<div class="box2">
......@@ -166,14 +149,11 @@
</div>
<div class="box2-main">
<div class="box2-main-item" v-for="(item, index) in warningList" :key="index">
<div
class="item-left"
:class="{
<div class="item-left" :class="{
itemLeftStatus1: item.status === '一般风险 ' || item.status === '暂无数值',
itemLeftStatus2: item.status === '重大风险',
itemLeftStatus3: item.status === '特别重大'
}"
>
}">
{{ item.status || "一般风险" }}
</div>
<div class="item-right">
......@@ -227,20 +207,14 @@
<div class="header-title">{{ "智库人物动态" }}</div>
</div>
<div class="box4-tag-box">
<div
class="tag"
:class="{
<div class="tag" :class="{
tagActive: box4ActiveTag === tag.name,
tag1: tag.status === 1,
tag2: tag.status === 2,
tag3: tag.status === 3,
tag4: tag.status === 4,
tag5: tag.status === 5
}"
v-for="(tag, index) in box4TagList"
:key="index"
@click="handleClickBox4Tag(tag.name)"
>
}" v-for="(tag, index) in box4TagList" :key="index" @click="handleClickBox4Tag(tag.name)">
{{ tag.name }}
</div>
</div>
......@@ -272,13 +246,8 @@
</div>
<div class="box5-select-box">
<el-select v-model="box5selectetedYear" placeholder="选择时间" style="width: 120px">
<el-option
v-for="item in box5YearList"
:key="item.value"
:label="item.label"
:value="item.value"
@click="changeBox5Data(item.value)"
/>
<el-option v-for="item in box5YearList" :key="item.value" :label="item.label" :value="item.value"
@click="changeBox5Data(item.value)" />
</el-select>
</div>
</div>
......@@ -292,13 +261,8 @@
<div class="header-title">{{ "政策建议领域分布" }}</div>
<div class="box6-select-box">
<el-select v-model="box6selectetedYear" placeholder="选择时间" style="width: 120px">
<el-option
v-for="item in box6YearList"
:key="item.value"
:label="item.label"
:value="item.value"
@click="handleBox6()"
/>
<el-option v-for="item in box6YearList" :key="item.value" :label="item.label" :value="item.value"
@click="handleBox6()" />
</el-select>
</div>
</div>
......@@ -327,28 +291,19 @@
</div>
<div class="box8-select-box">
<el-select v-model="box8selectetedYear" placeholder="选择时间" style="width: 120px">
<el-option
v-for="item in box8YearList"
:key="item.value"
:label="item.label"
:value="item.value"
@click="changeBox8Data(item.value)"
/>
<el-option v-for="item in box8YearList" :key="item.value" :label="item.label" :value="item.value"
@click="changeBox8Data(item.value)" />
</el-select>
</div>
</div>
<div class="box8-main">
<div class="box8-item" v-for="(item, index) in box8Data" :key="index">
<div
class="item-left"
:class="{ itemBold1: index === 0, itemBold2: index === 1, itemBold3: index === 2 }"
>
<div class="item-left"
:class="{ itemBold1: index === 0, itemBold2: index === 1, itemBold3: index === 2 }">
{{ index + 1 }}
</div>
<div
class="item-center"
:class="{ itemBold1: index === 0, itemBold2: index === 1, itemBold3: index === 2 }"
>
<div class="item-center"
:class="{ itemBold1: index === 0, itemBold2: index === 1, itemBold3: index === 2 }">
{{ item.clause }}
</div>
<div class="item-right">{{ `${item.count}份报告 >` }}</div>
......@@ -362,13 +317,8 @@
<DivideHeader id="position4" class="divide-header" :titleText="'资源库'"></DivideHeader>
<div class="home-main-footer-header">
<div class="btn-box">
<div
class="btn"
:class="{ btnActive: activeCate === cate }"
v-for="(cate, index) in categoryList"
:key="index"
@click="handleClickCate(cate)"
>
<div class="btn" :class="{ btnActive: activeCate === cate }" v-for="(cate, index) in categoryList"
:key="index" @click="handleClickCate(cate)">
{{ cate }}
</div>
</div>
......@@ -382,21 +332,11 @@
</div>
<div class="select-main">
<div class="checkbox-group">
<el-checkbox
v-model="checkAll"
:indeterminate="isIndeterminate"
@change="handleCheckAllChange"
>
<el-checkbox v-model="checkAll" :indeterminate="isIndeterminate" @change="handleCheckAllChange">
全部领域
</el-checkbox>
<el-checkbox
v-for="research in areaList"
:key="research.id"
v-model="selectedAreaList"
:label="research.id"
@change="handleCheckedAreaChange()"
class="filter-checkbox"
>
<el-checkbox v-for="research in areaList" :key="research.id" v-model="selectedAreaList"
:label="research.id" @change="handleCheckedAreaChange()" class="filter-checkbox">
{{ research.name }}
</el-checkbox>
</div>
......@@ -410,22 +350,24 @@
</div>
<div class="select-main">
<div class="checkbox-group">
<el-checkbox
v-for="time in pubTimeList"
:key="time.id"
v-model="selectedPubTimeList"
:label="time.id"
class="filter-checkbox"
>
<el-checkbox v-model="checkAllTime" :indeterminate="isIndeterminateTime"
@change="handleCheckAllChangeTime">
全部时间
</el-checkbox>
<el-checkbox-group v-model="selectedPubTimeList">
<el-checkbox v-for="time in pubTimeList" :key="time.id" :label="time.id" class="filter-checkbox"
@change="handleCheckedAreaChangeTime()">
{{ time.name }}
</el-checkbox>
</el-checkbox-group>
</div>
</div>
</div>
</div>
<div class="right">
<div class="card-box">
<div class="footer-card" v-for="(item, index) in curFooterList" :key="index">
<div class="footer-card" v-for="(item, index) in curFooterList" :key="index"
@click="handleToReportDetail(item.id)">
<div class="footer-card-top">
<img :src="item.imageUrl" alt="" />
</div>
......@@ -441,14 +383,8 @@
<div class="right-footer">
<div class="info">{{ total }}项调查</div>
<div class="page-box">
<el-pagination
:page-size="12"
background
layout="prev, pager, next"
:total="total"
@current-change="handleCurrentChange()"
:current-page="currentPage"
/>
<el-pagination :page-size="12" background layout="prev, pager, next" :total="total"
@current-change="handleCurrentChange" :current-page="currentPage" />
</div>
</div>
</div>
......@@ -1137,45 +1073,72 @@ const handleCheckAllChange = val => {
}
// selectedAreaList.value = val ? areaList : []
// isIndeterminate.value = false
handleGetetThinkTankReport();
};
const handleCheckedAreaChange = () => {
// console.log(selectedAreaList.value, "handleCheckedAreaChange");
console.log(selectedAreaList.value, "当前选中的领域");
selectedAreaList.value.length !== areaList.value.length
? (isIndeterminate.value = true)
: ((checkAll.value = true), (isIndeterminate.value = false));
handleGetetThinkTankReport();
};
const pubTimeList = ref([
{
id: "全部时间",
name: "全部时间"
},
{
id: "2025年",
name: "2025年"
},
{
id: "2024年",
name: "2024年"
id: 2025,
name: "2025"
},
{
id: "2023年",
name: "2023年"
id: 2024,
name: "2024"
},
{
id: "2022年",
name: "2022年"
id: 2023,
name: "2023"
},
{
id: "2021年",
name: "2021年"
id: 2022,
name: "2022"
},
{
id: "更早时间",
name: "更早时间"
id: 2021,
name: "2021"
}
// {
// id: "更早时间",
// name: "更早时间"
// }
]);
const selectedPubTimeList = ref(["全部时间"]);
const selectedPubTimeList = ref([""]);
const checkAllTime = ref(false);
const isIndeterminateTime = ref(true);
const handleCheckAllChangeTime = val => {
// console.log(val, "handleCheckAllChange");
if (val) {
isIndeterminateTime.value = false;
selectedPubTimeList.value.length !== pubTimeList.value.length
? (selectedPubTimeList.value = pubTimeList.value.map(obj => obj.id))
: "";
} else {
selectedPubTimeList.value = [];
}
// selectedAreaList.value = val ? areaList : []
// isIndeterminate.value = false
handleGetetThinkTankReport();
};
const handleCheckedAreaChangeTime = () => {
// console.log(selectedAreaList.value, "handleCheckedAreaChange");
console.log(selectedPubTimeList.value, "当前选中的时间");
selectedPubTimeList.value.length !== pubTimeList.value.length
? (isIndeterminateTime.value = true)
: ((checkAllTime.value = true), (isIndeterminateTime.value = false));
handleGetetThinkTankReport();
};
const curFooterList = ref([
{
......@@ -1255,16 +1218,26 @@ const currentPage = ref(1);
const total = ref(0);
// 处理页码改变事件
const handleCurrentChange = page => {
console.log(page, 'pagepagepage')
currentPage.value = page;
handleGetetThinkTankReport();
};
}
function arrayToString(arr) {
return arr.reduce((acc, item) => {
if (item !== null && item !== undefined && item !== "") {
return acc === "" ? item : acc + "," + item;
}
return acc;
}, "");
}
//获取智库报告
const handleGetetThinkTankReport = async () => {
const params = {
currentPage: currentPage.value,
currentPage: currentPage.value - 1,
pageSize: 12,
researchTypeIds: selectedAreaList.value,
years: 2025
researchTypeIds: arrayToString(selectedAreaList.value),
years: arrayToString(selectedPubTimeList.value)
};
try {
const res = await getThinkTankReport(params);
......@@ -1298,6 +1271,16 @@ const handleToMoreRiskSignal = () => {
window.open(route.href, "_blank");
};
const handleToReportDetail = (id) => {
const route = router.resolve({
name: 'ReportDetail',
params: {
id: id
}
});
window.open(route.href, "_blank");
}
onMounted(async () => {
handleGetThinkTankList();
handleGetNewReport();
......@@ -1321,16 +1304,19 @@ onMounted(async () => {
height: calc(100vh - 96px);
position: relative;
overflow-y: hidden;
.home-main {
width: 100%;
height: 100%;
overflow-y: auto;
background: url("./assets/images/background.png");
background-size: 100% 100%;
.home-main-header {
display: flex;
flex-direction: column;
align-items: center;
.home-main-header-top {
box-sizing: border-box;
width: 100%;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论