提交 a28ac5be authored 作者: 张伊明's avatar 张伊明

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

从 zy-dev 合并到 pre 查看合并请求 !298
流水线 #306 已通过 于阶段
in 5 分 43 秒
......@@ -26,7 +26,7 @@
</div>
<div class="layout-main-center">
<BaseDecreeOriginal :report-data="reportData" @download="handleDownload" />
<newOriginal ref="refNewOriginal" @download="handleDownload"></newOriginal>
</div>
</div>
</div>
......@@ -38,7 +38,7 @@ import { useRoute } from "vue-router";
import { ElMessage } from "element-plus";
import { getDecreeSummary } from "@/api/decree/introduction";
import { getDecreeReport } from "@/api/decree/introduction";
import BaseDecreeOriginal from "@/components/base/DecreeOriginal/index.vue";
import newOriginal from "@/components/base/DecreeOriginal/newOriginal.vue";
const route = useRoute();
let pdfUrl = "";
......@@ -98,26 +98,16 @@ const handleGetSummary = async () => {
};
// 获取报告原文 - 修改为获取分段数组
const reportData = ref([]);
const refNewOriginal = ref(null);
const handleGetReport = async () => {
try {
const res = await getDecreeReport({id: route.query.id});
console.log("报告原文", res);
if (res.code === 200 && res.data) {
if (res.code === 200) {
pdfUrl = res.data.pdfUrl;
const originData = [];
let num = Math.max(res.data.content.length, res.data.contentEn.length)
for (let i = 0; i < num; i++) {
let obj = {
content: res.data.content[i] || "",
contentEn: res.data.contentEn[i] || "",
num: i + 1,
}
originData.push(obj);
}
reportData.value = JSON.parse(JSON.stringify(originData));
refNewOriginal.value.setOriginalData({...res.data});
}
} catch (error) { }
} catch (error) {}
};
onMounted(() => {
......
......@@ -16,14 +16,12 @@
<div class="timeline-content-card">
<div class="item-head">
<div :class="`item-tag tag-${item.sortcode}`">{{ item.sortcode }}</div>
<div class="item-name">{{ item.searchname }}</div>
<div class="item-name one-line-ellipsis">{{ item.searchname }}</div>
<div class="item-state">
<span class="dot"></span> {{ item.casestatus }}
</div>
</div>
<div class="card-body">
{{ item.content }}
</div>
<div class="card-body">{{ item.content }}</div>
<div class="card-footer">
<div class="footer-left-tags">
<AreaTag v-for="(name, num) in item.searchArea" :key="num" :tagName="name"></AreaTag>
......@@ -129,7 +127,7 @@ const onNavigateToDetail = item => {
.timeline-content-card {
width: 20px;
flex: auto;
padding: 2px 16px 0;
padding: 4px 16px 0;
margin-bottom: 30px;
&:hover .item-head .item-name {
......
......@@ -32,39 +32,26 @@
<div class="wrapper-main">
<div class="left">
<!-- 科技领域 -->
<div class="left-box">
<div class="left-header">
<div class="icon"></div>
<div class="title">{{ "科技领域" }}</div>
</div>
<div class="left-main">
<el-checkbox-group class="checkbox-group" v-model="checkedAreaList" @change="handleCheckedAreasChange">
<el-checkbox class="filter-checkbox" label="全部领域"> 全部领域 </el-checkbox>
<el-checkbox v-for="area in surveyAreaList" :key="area.id" :label="area.id" class="filter-checkbox">
{{ area.name }}
</el-checkbox>
</el-checkbox-group>
<div class="check-box">
<div class="check-head">
<div class="head-name">{{ "科技领域" }}</div>
</div>
<el-checkbox-group class="check-list" v-model="checkedAreaList" @change="handleCheckedAreasChange">
<el-checkbox class="check-item" v-for="item in surveyAreaList" :key="item.id" :label="item.id">
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
</div>
<!-- 发布时间 -->
<div class="left-box">
<div class="left-header">
<div class="icon"></div>
<div class="title">{{ "发布时间" }}</div>
<div class="check-box">
<div class="check-head">
<div class="head-name">{{ "发布时间" }}</div>
</div>
<div class="left-main">
<el-checkbox-group class="checkbox-group" v-model="checkedSurveyYears" @change="handleCheckedYearsChange">
<el-checkbox class="filter-checkbox" label="全部时间"> 全部时间 </el-checkbox>
<el-checkbox v-for="year in displayedYearList" :key="year.id" :label="year.id" class="filter-checkbox">
<el-checkbox-group class="check-list" v-model="checkedYearList" @change="handleCheckedYearsChange">
<el-checkbox class="check-item" v-for="year in surveyYearList" :key="year.id" :label="year.id">
{{ year.name }}
</el-checkbox>
<div v-if="surveyYearList.length > 6" class="expand-btn" @click="isYearExpanded = !isYearExpanded">
{{ isYearExpanded ? "收起" : "更早" }}
<el-icon>
<ArrowUp v-if="isYearExpanded" />
<ArrowDown v-else />
</el-icon>
</div>
</el-checkbox-group>
</div>
</div>
......@@ -98,8 +85,8 @@
</template>
<script setup>
import { ref, onMounted, watch, computed } from "vue";
import { Search, ArrowDown, ArrowUp } from "@element-plus/icons-vue";
import { ref, onMounted, watch } from "vue";
import { Search } from "@element-plus/icons-vue";
import { getSearchAllArea, getSearchAllYear, getSurveyList } from "@/api/marketAccessRestrictions";
import SurveyHistory from "@/views/marketAccessRestrictions/com/SurveyHistory.vue"
......@@ -116,42 +103,49 @@ const handleSwithSort = () => {
// 科技领域过滤
const surveyAreaList = ref([]);
const checkedAreaList = ref([]);
const checkAllAreas = ref(true);
const isIndeterminateAreas = ref(false);
const handleCheckAllAreasChange = val => {
checkedAreaList.value = val ? surveyAreaList.value.map(a => a.id) : [];
isIndeterminateAreas.value = false;
const checkedAreaList = ref(['']);
const handleGetSearchAllArea = async () => {
try {
const res = await getSearchAllArea({ sortCode: "232" });
if (res.code === 200) {
surveyAreaList.value = res.data.map(item => ({ name: item.AREANAME, id: item.AREACODE }));
}
} catch (error) {}
surveyAreaList.value.unshift({ name: "全部领域", id: "" });
};
const handleCheckedAreasChange = value => {
const checkedCount = value.length;
checkAllAreas.value = checkedCount === surveyAreaList.value.length;
isIndeterminateAreas.value = checkedCount > 0 && checkedCount < surveyAreaList.value.length;
const handleCheckedAreasChange = event => {
if (event.length && event[event.length-1] !== "") {
checkedAreaList.value = event.filter(item => item !== "");
} else {
checkedAreaList.value = [""];
}
currentPage.value = 1;
handleFetchSurveyList();
};
// 发布时间过滤
const surveyYearList = ref([]);
const checkedSurveyYears = ref([]);
const checkAllYears = ref(true);
const isIndeterminateYears = ref(false);
const isYearExpanded = ref(false);
const displayedYearList = computed(() => {
if (isYearExpanded.value) return surveyYearList.value;
return surveyYearList.value.slice(0, 6);
});
const handleCheckAllYearsChange = val => {
checkedSurveyYears.value = val ? surveyYearList.value.map(y => y.id) : [];
isIndeterminateYears.value = false;
const checkedYearList = ref(['']);
const handleGetSearchAllYear = async () => {
try {
const res = await getSearchAllYear({ sortCode: "232" });
if (res.code === 200) {
let allYear = res.data.sort((a, b) => (b-a));
let beforeYear = allYear.slice(6).join(',');
surveyYearList.value = allYear.slice(0, 6).map(item => ({ name: item + "年", id: item }));
if (beforeYear) surveyYearList.value.push({ name: "更早", id: beforeYear });
}
} catch (error) {}
surveyYearList.value.unshift({ name: "全部时间", id: "" });
};
const handleCheckedYearsChange = value => {
const checkedCount = value.length;
checkAllYears.value = checkedCount === surveyYearList.value.length;
isIndeterminateYears.value = checkedCount > 0 && checkedCount < surveyYearList.value.length;
const handleCheckedYearsChange = event => {
if (event.length && event[event.length-1] !== "") {
checkedYearList.value = event.filter(item => item !== "");
} else {
checkedYearList.value = [""];
}
currentPage.value = 1;
handleFetchSurveyList();
};
// 数据列表
......@@ -169,8 +163,8 @@ const handleFetchSurveyList = async () => {
currentPage: currentPage.value - 1,
pageSize: pageSize.value,
sortCode: "232",
publishYear: checkAllYears.value ? "" : checkedSurveyYears.value.toString(),
Area: checkAllAreas.value ? "" : checkedAreaList.value.toString(),
publishYear: checkedYearList.value.join(',') || null,
Area: checkedAreaList.value.join(',') || null,
caseStatus: filterStage.value,
keywords: searchText.value,
sortField: "date",
......@@ -199,39 +193,12 @@ const handleSearch = () => {
};
// 监听过滤条件
watch([checkedSurveyYears, checkedAreaList, isSort, filterStage, filterParty, filterReason], () => {
watch([isSort, filterStage, filterParty, filterReason], () => {
if (isInitializing.value) return;
currentPage.value = 1;
handleFetchSurveyList();
});
const handleGetSearchAllArea = async () => {
try {
const res = await getSearchAllArea({ sortCode: "232" });
if (res.code === 200 && res.data) {
surveyAreaList.value = res.data.map(item => ({
name: item.AREANAME,
id: item.AREACODE
}));
handleCheckAllAreasChange(true);
}
} catch (error) {}
};
const handleGetSearchAllYear = async () => {
try {
const res = await getSearchAllYear({ sortCode: "232" });
if (res.code === 200 && res.data) {
const sortedYears = res.data.sort((a, b) => b - a);
surveyYearList.value = sortedYears.map(item => ({
name: item + "年",
id: item
}));
handleCheckAllYearsChange(true);
}
} catch (error) {}
};
onMounted(async () => {
await Promise.all([handleGetSearchAllArea(), handleGetSearchAllYear()]);
isInitializing.value = false;
......@@ -306,58 +273,50 @@ onMounted(async () => {
.left {
width: 360px;
min-height: 560px;
min-height: 300px;
height: fit-content;
padding-bottom: 20px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: #fff;
.left-box {
margin-top: 17px;
.left-header {
display: flex;
align-items: center;
.icon {
.check-box {
margin-top: 18px;
.check-head {
position: relative;
margin-bottom: 12px;
&::before {
content: "";
position: absolute;
top: 0px;
left: 0px;
width: 8px;
height: 16px;
background: var(--color-main-active);
height: 100%;
background: var(--color-primary-100);
border-radius: 0 2px 2px 0;
}
.title {
margin-left: 17px;
color: var(--color-main-active);
.head-name {
margin-left: 25px;
color: var(--color-primary-100);
font-size: 16px;
font-weight: 700;
line-height: 16px;
font-family: Source Han Sans CN;
font-weight: bold;
}
}
}
.checkbox-group {
padding: 10px 0 0 25px;
.filter-checkbox {
width: 130px;
margin-bottom: 8px;
height: 32px;
:deep(.el-checkbox__label) {
font-size: 16px;
color: #5f656c;
}
}
.expand-btn {
color: var(--color-main-active);
font-size: 14px;
cursor: pointer;
display: flex;
align-items: center;
margin-top: 4px;
.el-icon {
margin-left: 4px;
.check-list {
padding: 0 10px 0 25px;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 0 12px;
.check-item {
width: 100%;
height: 32px;
:deep(.el-checkbox__label) {
font-family: Source Han Sans CN;
font-size: 16px;
color: var(--text-primary-65-color);
}
}
}
}
......
......@@ -21,39 +21,26 @@
<div class="wrapper-main">
<div class="left">
<!-- 科技领域 -->
<div class="left-box">
<div class="left-header">
<div class="icon"></div>
<div class="title">{{ "科技领域" }}</div>
</div>
<div class="left-main">
<el-checkbox-group class="checkbox-group" v-model="checkedAreaList" @change="handleCheckedAreasChange">
<el-checkbox class="filter-checkbox" label="全部领域"> 全部领域 </el-checkbox>
<el-checkbox v-for="area in surveyAreaList" :key="area.id" :label="area.id" class="filter-checkbox">
{{ area.name }}
</el-checkbox>
</el-checkbox-group>
<div class="check-box">
<div class="check-head">
<div class="head-name">{{ "科技领域" }}</div>
</div>
<el-checkbox-group class="check-list" v-model="checkedAreaList" @change="handleCheckedAreasChange">
<el-checkbox class="check-item" v-for="item in surveyAreaList" :key="item.id" :label="item.id">
{{ item.name }}
</el-checkbox>
</el-checkbox-group>
</div>
<!-- 发布时间 -->
<div class="left-box">
<div class="left-header">
<div class="icon"></div>
<div class="title">{{ "发布时间" }}</div>
<div class="check-box">
<div class="check-head">
<div class="head-name">{{ "发布时间" }}</div>
</div>
<div class="left-main">
<el-checkbox-group class="checkbox-group" v-model="checkedSurveyYears" @change="handleCheckedYearsChange">
<el-checkbox class="filter-checkbox" label="全部时间"> 全部时间 </el-checkbox>
<el-checkbox v-for="year in displayedYearList" :key="year.id" :label="year.id" class="filter-checkbox">
<el-checkbox-group class="check-list" v-model="checkedYearList" @change="handleCheckedYearsChange">
<el-checkbox class="check-item" v-for="year in surveyYearList" :key="year.id" :label="year.id">
{{ year.name }}
</el-checkbox>
<div v-if="surveyYearList.length > 6" class="expand-btn" @click="isYearExpanded = !isYearExpanded">
{{ isYearExpanded ? "收起" : "更早" }}
<el-icon>
<ArrowUp v-if="isYearExpanded" />
<ArrowDown v-else />
</el-icon>
</div>
</el-checkbox-group>
</div>
</div>
......@@ -78,8 +65,8 @@
</template>
<script setup>
import { ref, onMounted, watch, computed } from "vue";
import { Search, ArrowDown, ArrowUp } from "@element-plus/icons-vue";
import { ref, onMounted, watch } from "vue";
import { Search } from "@element-plus/icons-vue";
import { getSearchAllArea, getSearchAllYear, getSurveyList } from "@/api/marketAccessRestrictions";
import SurveyHistory from "@/views/marketAccessRestrictions/com/SurveyHistory.vue"
......@@ -88,46 +75,51 @@ const handleSwithSort = () => {
isSort.value = !isSort.value;
};
const surveyYearList = ref([]);
const checkedSurveyYears = ref([]);
const isYearExpanded = ref(false);
const displayedYearList = computed(() => {
if (isYearExpanded.value) {
return surveyYearList.value;
}
return surveyYearList.value.slice(0, 6);
});
const checkAllYears = ref(false);
const isIndeterminateYears = ref(false);
const handleCheckAllYearsChange = (val) => {
checkedSurveyYears.value = val ? surveyYearList.value.map(y => y.id) : [];
isIndeterminateYears.value = false;
// 科技领域过滤
const surveyAreaList = ref([]);
const checkedAreaList = ref(['']);
const handleGetSearchAllArea = async () => {
try {
const res = await getSearchAllArea({ sortCode: "301" });
if (res.code === 200) {
surveyAreaList.value = res.data.map(item => ({ name: item.AREANAME, id: item.AREACODE }));
}
} catch (error) {}
surveyAreaList.value.unshift({ name: "全部领域", id: "" });
};
const handleCheckedYearsChange = (value) => {
const checkedCount = value.length;
checkAllYears.value = checkedCount === surveyYearList.value.length;
isIndeterminateYears.value = checkedCount > 0 && checkedCount < surveyYearList.value.length;
const handleCheckedAreasChange = event => {
if (event.length && event[event.length-1] !== "") {
checkedAreaList.value = event.filter(item => item !== "");
} else {
checkedAreaList.value = [""];
}
currentPage.value = 1;
handleFetchSurveyList();
};
const surveyAreaList = ref([]);
const checkedAreaList = ref([]);
const checkAllAreas = ref(false);
const isIndeterminateAreas = ref(false);
const handleCheckAllAreasChange = (val) => {
checkedAreaList.value = val ? surveyAreaList.value.map(a => a.id) : [];
isIndeterminateAreas.value = false;
// 发布时间过滤
const surveyYearList = ref([]);
const checkedYearList = ref(['']);
const handleGetSearchAllYear = async () => {
try {
const res = await getSearchAllYear({ sortCode: "301" });
if (res.code === 200) {
let allYear = res.data.sort((a, b) => (b-a));
let beforeYear = allYear.slice(6).join(',');
surveyYearList.value = allYear.slice(0, 6).map(item => ({ name: item + "年", id: item }));
if (beforeYear) surveyYearList.value.push({ name: "更早", id: beforeYear });
}
} catch (error) {}
surveyYearList.value.unshift({ name: "全部时间", id: "" });
};
const handleCheckedAreasChange = (value) => {
const checkedCount = value.length;
checkAllAreas.value = checkedCount === surveyAreaList.value.length;
isIndeterminateAreas.value = checkedCount > 0 && checkedCount < surveyAreaList.value.length;
const handleCheckedYearsChange = event => {
if (event.length && event[event.length-1] !== "") {
checkedYearList.value = event.filter(item => item !== "");
} else {
checkedYearList.value = [""];
}
currentPage.value = 1;
handleFetchSurveyList();
};
const totalDiscussNum = ref(0);
......@@ -145,8 +137,8 @@ const handleFetchSurveyList = async () => {
currentPage: currentPage.value - 1,
pageSize: pageSize.value,
sortCode: "301",
publishYear: checkAllYears.value ? "" : checkedSurveyYears.value.toString(),
Area: checkAllAreas.value ? "" : checkedAreaList.value.toString(),
publishYear: checkedYearList.value.join(',') || null,
Area: checkedAreaList.value.join(',') || null,
// keywords: searchText.value,
sortField: "date",
sortOrder: isSort.value ? "asc" : "desc"
......@@ -173,60 +165,11 @@ const handleSearch = () => {
handleFetchSurveyList();
};
watch(
[checkedSurveyYears, checkedAreaList, isSort],
() => {
if (isInitializing.value) return;
currentPage.value = 1;
handleFetchSurveyList();
},
{
deep: true
}
);
const handleGetSearchAllArea = async () => {
try {
const res = await getSearchAllArea({
sortCode: '301'
});
if(res.code === 200 && res.data) {
surveyAreaList.value = res.data.map(item => {
return {
name: item.AREANAME,
id: item.AREACODE
};
});
// 默认选中全部
checkAllAreas.value = true;
handleCheckAllAreasChange(true);
}
} catch (error) {
}
}
const handleGetSearchAllYear = async () => {
try {
const res = await getSearchAllYear({
sortCode: '301'
});
if(res.code === 200 && res.data) {
// 排序并格式化
const sortedYears = res.data.sort((a, b) => b - a);
surveyYearList.value = sortedYears.map(item => {
return {
name: item + '年',
id: item
};
});
// 默认选中全部
checkAllYears.value = true;
handleCheckAllYearsChange(true);
}
} catch (error) {
}
}
watch([isSort], () => {
if (isInitializing.value) return;
currentPage.value = 1;
handleFetchSurveyList();
});
onMounted(async () => {
await Promise.all([handleGetSearchAllArea(), handleGetSearchAllYear()]);
......@@ -309,58 +252,50 @@ onMounted(async () => {
.left {
width: 360px;
min-height: 560px;
min-height: 300px;
height: fit-content;
padding-bottom: 20px;
border-radius: 10px;
box-shadow: 0px 0px 15px 0px rgba(60, 87, 126, 0.2);
background: #fff;
.left-box {
margin-top: 17px;
.left-header {
display: flex;
align-items: center;
.icon {
.check-box {
margin-top: 18px;
.check-head {
position: relative;
margin-bottom: 12px;
&::before {
content: "";
position: absolute;
top: 0px;
left: 0px;
width: 8px;
height: 16px;
background: var(--color-main-active);
height: 100%;
background: var(--color-primary-100);
border-radius: 0 2px 2px 0;
}
.title {
margin-left: 17px;
color: var(--color-main-active);
.head-name {
margin-left: 25px;
color: var(--color-primary-100);
font-size: 16px;
font-weight: 700;
line-height: 16px;
font-family: Source Han Sans CN;
font-weight: bold;
}
}
}
.checkbox-group {
padding: 10px 0 0 25px;
.filter-checkbox {
width: 130px;
margin-bottom: 8px;
height: 32px;
:deep(.el-checkbox__label) {
font-size: 16px;
color: #5f656c;
}
}
.expand-btn {
color: var(--color-main-active);
font-size: 14px;
cursor: pointer;
display: flex;
align-items: center;
margin-top: 4px;
.el-icon {
margin-left: 4px;
.check-list {
padding: 0 10px 0 25px;
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-gap: 0 12px;
.check-item {
width: 100%;
height: 32px;
:deep(.el-checkbox__label) {
font-family: Source Han Sans CN;
font-size: 16px;
color: var(--text-primary-65-color);
}
}
}
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论