Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
ec7ea038
提交
ec7ea038
authored
2月 02, 2026
作者:
huhuiqing
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
政令问题修复
上级
581308d1
显示空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
130 行增加
和
51 行删除
+130
-51
index.vue
src/views/decree/decreeHome/index.vue
+130
-51
没有找到文件。
src/views/decree/decreeHome/index.vue
浏览文件 @
ec7ea038
...
...
@@ -113,8 +113,7 @@
</div>
</div>
<div
class=
"home-main-header-item-box"
>
<div
class=
"item"
v-for=
"(item, index) in govInsList"
:key=
"index"
@
click=
"handleToInstitution(item)"
>
<div
class=
"item"
v-for=
"(item, index) in govInsList"
:key=
"index"
@
click=
"handleToInstitution(item)"
>
<div
class=
"item-left"
>
<img
:src=
"item.img ? item.img : DefaultIcon2"
alt=
""
/>
</div>
...
...
@@ -156,7 +155,7 @@
<div
v-else
class=
"box1-main-left-img-mock"
>
<img
class=
"img-mock-badge-img"
src=
"./assets/images/badge.png"
>
<p
class=
"img-mock-badge-title"
>
行政令
</p>
<p
class=
"img-mock-badge-title"
>
{{
item
.
name
}}
</p>
<p
class=
"img-mock-badge-title"
>
{{
item
.
name
}}
</p>
<!--
<p
class=
"img-mock-badge-org"
>
The White House
</p>
-->
</div>
</div>
...
...
@@ -240,8 +239,7 @@
</div>
</div>
<div
class=
"box3-main"
>
<div
class=
"box3-item"
v-for=
"(news, index) in newsList"
:key=
"index"
@
click=
"handleToNewsAnalysis(news)"
>
<div
class=
"box3-item"
v-for=
"(news, index) in newsList"
:key=
"index"
@
click=
"handleToNewsAnalysis(news)"
>
<div
class=
"left"
>
<img
:src=
"news.img ? news.img : DefaultIconNews"
alt=
""
/>
</div>
...
...
@@ -269,9 +267,8 @@
</div>
<div
class=
"box4-main"
>
<MessageBubble
v-for=
"(item, index) in messageList"
@
click=
"handleClickPerson(item)"
@
info-click=
"handleMediaClick(item)"
:key=
"index"
:avatar=
"item.img ? item.img : DefaultIcon1"
:name=
"item.name"
:time=
"item.time"
:source=
"item.source"
:content=
"item.content"
/>
@
info-click=
"handleMediaClick(item)"
:key=
"index"
:avatar=
"item.img ? item.img : DefaultIcon1"
:name=
"item.name"
:time=
"item.time"
:source=
"item.source"
:content=
"item.content"
/>
<!-- <div class="box4-main-item" v-for="(item, index) in messageList" :key="index">
<div class="left" @click="handleClickPerson(item)">
<img :src="item.img ? item.img : DefaultIcon1" alt="" />
...
...
@@ -300,8 +297,7 @@
<div
class=
"box5-selectbox"
>
<el-select
@
change=
"handleBox5YearChange"
v-model=
"box5SelectedYear"
placeholder=
"选择时间"
style=
"width: 120px"
>
<el-option
v-for=
"item in box5YearList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
<el-option
v-for=
"item in box5YearList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
</div>
...
...
@@ -319,8 +315,7 @@
<div
class=
"box6-selectbox"
>
<el-select
@
change=
"handleBox6YearChange"
v-model=
"box6SelectedYear"
placeholder=
"选择时间"
style=
"width: 120px"
>
<el-option
v-for=
"item in box6YearList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
<el-option
v-for=
"item in box6YearList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
/>
</el-select>
</div>
</div>
...
...
@@ -336,8 +331,7 @@
<div
class=
"header-title"
>
{{ "关键行政令" }}
</div>
</div>
<div
class=
"box7-main"
>
<div
class=
"box7-item"
v-for=
"(item, index) in keyDecreeList"
:key=
"index"
@
click=
"handleKeyDecree(item)"
>
<div
class=
"box7-item"
v-for=
"(item, index) in keyDecreeList"
:key=
"index"
@
click=
"handleKeyDecree(item)"
>
<div
class=
"icon"
>
<img
src=
"./assets/images/warning.png"
alt=
""
/>
</div>
...
...
@@ -393,9 +387,9 @@
</div>
<div
class=
"select-main"
>
<div
class=
"checkbox-group"
>
<el-checkbox
v-for=
"type in decreeTypeList"
:key=
"type.id"
v-model=
"checkedDecreeType"
:label=
"type.typeId"
style=
"width: 180p
x"
class=
"filter-checkbox"
@
change=
"handleChangeCheckedDecreeType"
>
<el-checkbox
v-for=
"type in decreeTypeList"
:key=
"type.id"
v-model=
"checkedDecreeType"
:label=
"type.typeId"
style=
"width: 180px"
class=
"filter-checkbo
x"
@
change=
"handleChangeCheckedDecreeType"
>
{{ type.typeName }}
</el-checkbox>
</div>
...
...
@@ -408,9 +402,8 @@
</div>
<div
class=
"select-main"
>
<div
class=
"checkbox-group"
>
<el-checkbox
v-for=
"cate in govInsList"
:key=
"cate.id"
v-model=
"checkedGovIns"
:label=
"cate.id"
style=
"width: 180px"
class=
"filter-checkbox"
@
change=
"handleChangeCheckedGovIns"
>
<el-checkbox
v-for=
"cate in govInsList"
:key=
"cate.id"
v-model=
"checkedGovIns"
:label=
"cate.id"
style=
"width: 180px"
class=
"filter-checkbox"
@
change=
"handleChangeCheckedGovIns"
>
{{ cate.name }}
</el-checkbox>
</div>
...
...
@@ -423,8 +416,9 @@
</div>
<div
class=
"select-main"
>
<div
class=
"checkbox-group"
>
<el-checkbox
v-for=
"time in pubTime"
:key=
"time.id"
v-model=
"activePubTime"
:label=
"time.id"
style=
"width: 100px"
class=
"filter-checkbox"
>
<el-checkbox
v-for=
"time in pubTime"
:key=
"time.id"
v-model=
"activePubTime"
:label=
"time.id"
style=
"width: 100px"
class=
"filter-checkbox"
@
change=
"(checked) => handlePubTimeChange(time.id, checked)"
>
{{ time.name }}
</el-checkbox>
</div>
...
...
@@ -437,8 +431,8 @@
</div>
<div
class=
"select-main select-main1"
>
<div
class=
"checkbox-group"
>
<el-checkbox
v-for=
"area in areaList"
:key=
"area.id"
v-model=
"activeAreaList"
:label=
"area.id"
style=
"width: 100px
"
>
<el-checkbox
v-for=
"area in areaList"
:key=
"area.id"
v-model=
"activeAreaList"
:label=
"area.id"
style=
"width: 100px"
@
change=
"(checked) => handleAreaChange(area.id, checked)
"
>
{{ area.name }}
</el-checkbox>
</div>
...
...
@@ -457,7 +451,8 @@
@
click=
"handleClickDecree(item)"
>
<div
class=
"main-item-left"
>
<div
class=
"left-left"
>
{{ item.time.split('-')[0] }}
<br>
{{ item.time.split('-')[1]}}月{{ item.time.split('-')[2] }}日
</div>
<div
class=
"left-left"
>
{{ item.time.split('-')[0] }}
<br>
{{ item.time.split('-')[1] }}月{{
item.time.split('-')[2] }}日
</div>
<div
class=
"left-right"
>
<div
class=
"icon"
>
<img
:src=
"item.orgImage ? item.orgImage : DefaultIcon2"
alt=
""
/>
...
...
@@ -493,9 +488,8 @@
{{ `共 ${totalDecreesNum} 项` }}
</div>
<div
class=
"footer-right"
>
<el-pagination
@
current-change=
"handleCurrentChange"
:pageSize=
"10"
:current-page=
"currentPage"
background
layout=
"prev, pager, next"
:total=
"totalDecreesNum"
/>
<el-pagination
@
current-change=
"handleCurrentChange"
:pageSize=
"10"
:current-page=
"currentPage"
background
layout=
"prev, pager, next"
:total=
"totalDecreesNum"
/>
</div>
</div>
</div>
...
...
@@ -1078,7 +1072,7 @@ const handleBox8 = async () => {
};
// 资源库
const
isSort
=
ref
(
tru
e
);
// true 升序 false 倒序
const
isSort
=
ref
(
fals
e
);
// true 升序 false 倒序
const
handleSwithSort
=
()
=>
{
isSort
.
value
=
!
isSort
.
value
;
};
...
...
@@ -1113,21 +1107,21 @@ const areaList = ref([
// { id: "量子科技", name: "量子科技" }
]);
const
activeAreaList
=
ref
([
"1"
]);
const
handleGetAreaList
=
async
()
=>
{
try
{
const
res
=
await
getDecreehylyList
();
console
.
log
(
"行业领域列表"
,
res
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
areaList
.
value
=
res
.
data
.
map
(
item
=>
{
return
{
name
:
item
.
name
,
id
:
item
.
id
};
});
console
.
log
(
"areaList"
,
areaList
.
value
);
}
}
catch
(
error
)
{
}
};
//
const handleGetAreaList = async () => {
//
try {
//
const res = await getDecreehylyList();
//
console.log("行业领域列表", res);
//
if (res.code === 200 && res.data) {
//
areaList.value = res.data.map(item => {
//
return {
//
name: item.name,
//
id: item.id
//
};
//
});
//
console.log("areaList", areaList.value);
//
}
//
} catch (error) { }
//
};
// 政令类型
const
decreeTypeList
=
ref
([]);
...
...
@@ -1148,6 +1142,7 @@ const handleChangeCheckedDecreeType = () => {
}
const
pubTime
=
ref
([
{
id
:
"all"
,
name
:
"全选"
},
{
id
:
"2026"
,
name
:
"2026年"
},
{
id
:
"2025"
,
name
:
"2025年"
},
{
id
:
"2024"
,
name
:
"2024年"
},
...
...
@@ -1155,27 +1150,110 @@ const pubTime = ref([
{
id
:
"2022"
,
name
:
"2022年"
},
{
id
:
"2021"
,
name
:
"2021年"
},
{
id
:
"2020"
,
name
:
"2020年"
}
// { id: "更早时间", name: "更早时间" }
]);
const
activePubTime
=
ref
([
"2026"
]);
// 处理发布时间全选逻辑
const
handlePubTimeChange
=
(
id
,
checked
)
=>
{
const
allIds
=
pubTime
.
value
.
filter
(
item
=>
item
.
id
!==
'all'
).
map
(
item
=>
item
.
id
);
if
(
id
===
'all'
)
{
// 点击全选:选中所有或清空所有
activePubTime
.
value
=
checked
?
[
'all'
,
...
allIds
]
:
[];
}
else
{
const
selectedIds
=
activePubTime
.
value
.
filter
(
itemId
=>
itemId
!==
'all'
);
const
isAllSelected
=
selectedIds
.
length
===
allIds
.
length
;
if
(
isAllSelected
&&
!
activePubTime
.
value
.
includes
(
'all'
))
{
// 手动选中了所有年份,自动勾选全选
activePubTime
.
value
=
[
'all'
,
...
allIds
];
}
else
if
(
!
isAllSelected
&&
activePubTime
.
value
.
includes
(
'all'
))
{
// 取消某个选项,取消全选状态
activePubTime
.
value
=
selectedIds
;
}
}
};
const
handleAreaChange
=
(
id
,
checked
)
=>
{
const
allIds
=
areaList
.
value
.
filter
(
item
=>
item
.
id
!==
'all'
).
map
(
item
=>
item
.
id
);
if
(
id
===
'all'
)
{
activeAreaList
.
value
=
checked
?
[
'all'
,
...
allIds
]
:
[];
}
else
{
const
selectedIds
=
activeAreaList
.
value
.
filter
(
itemId
=>
itemId
!==
'all'
);
const
isAllSelected
=
selectedIds
.
length
===
allIds
.
length
;
if
(
isAllSelected
&&
!
activeAreaList
.
value
.
includes
(
'all'
))
{
activeAreaList
.
value
=
[
'all'
,
...
allIds
];
}
else
if
(
!
isAllSelected
&&
activeAreaList
.
value
.
includes
(
'all'
))
{
activeAreaList
.
value
=
selectedIds
;
}
}
};
// 修改获取涉及领域列表,添加全选选项
const
handleGetAreaList
=
async
()
=>
{
try
{
const
res
=
await
getDecreehylyList
();
console
.
log
(
"行业领域列表"
,
res
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
areaList
.
value
=
[
{
name
:
"全选"
,
id
:
"all"
},
...
res
.
data
.
map
(
item
=>
{
return
{
name
:
item
.
name
,
id
:
item
.
id
};
})
];
// 设置默认全选
activeAreaList
.
value
=
[
'all'
,
...
res
.
data
.
map
(
item
=>
item
.
id
)];
console
.
log
(
"areaList"
,
areaList
.
value
);
// 获取列表后重新查询
handleGetDecreeOrderList
();
}
}
catch
(
error
)
{
}
};
const
totalDecreesNum
=
ref
(
0
);
const
decreeList
=
ref
([]);
// 修改请求方法,处理全选时不传参数的情况
const
handleGetDecreeOrderList
=
async
()
=>
{
const
p0
=
checkedGovIns
.
value
.
join
(
","
);
const
p1
=
activeAreaList
.
value
.
join
(
","
);
const
p2
=
activePubTime
.
value
.
join
(
","
);
// 处理涉及领域:如果包含 all 或全选,则 researchTypeIds 为空(不传)
let
p1
=
''
;
const
allAreaIds
=
areaList
.
value
.
filter
(
item
=>
item
.
id
!==
'all'
).
map
(
item
=>
item
.
id
);
const
selectedAreaIds
=
activeAreaList
.
value
.
filter
(
id
=>
id
!==
'all'
);
if
(
!
activeAreaList
.
value
.
includes
(
'all'
)
&&
selectedAreaIds
.
length
>
0
&&
selectedAreaIds
.
length
<
allAreaIds
.
length
)
{
p1
=
selectedAreaIds
.
join
(
","
);
}
// 其他情况(包含all、长度为0、全部选中)p1保持为空,即不传researchTypeIds
// 处理发布时间:如果包含 all 或全选,则 years 为空(不传)
let
p2
=
''
;
const
allPubTimeIds
=
pubTime
.
value
.
filter
(
item
=>
item
.
id
!==
'all'
).
map
(
item
=>
item
.
id
);
const
selectedPubTimeIds
=
activePubTime
.
value
.
filter
(
id
=>
id
!==
'all'
);
if
(
!
activePubTime
.
value
.
includes
(
'all'
)
&&
selectedPubTimeIds
.
length
>
0
&&
selectedPubTimeIds
.
length
<
allPubTimeIds
.
length
)
{
p2
=
selectedPubTimeIds
.
join
(
","
);
}
// 其他情况(包含all、长度为0、全部选中)p2保持为空,即不传years
const
params
=
{
currentPage
:
0
,
pageSize
:
999999
,
proposeName
:
p0
,
researchTypeIds
:
p1
,
researchTypeIds
:
p1
,
// 全选时不传(为空)
sortFun
:
isSort
.
value
,
years
:
p2
,
years
:
p2
,
// 全选时不传(为空)
typeIds
:
checkedDecreeType
.
value
.
toString
()
};
try
{
const
res
=
await
getDecreeOrderList
(
params
);
console
.
log
(
"资源库列表"
,
res
);
...
...
@@ -1191,17 +1269,18 @@ const handleGetDecreeOrderList = async () => {
tagList
:
item
.
industryList
};
});
console
.
log
(
"decreeList"
,
decreeList
.
value
);
}
else
{
decreeList
.
value
=
[];
totalDecreesNum
.
value
=
0
;
}
}
catch
(
error
)
{
console
.
error
(
"资源库列表error"
,
error
);
decreeList
.
value
=
[];
totalDecreesNum
.
value
=
0
;
}
};
const
curDecreeList
=
computed
(()
=>
{
const
startIndex
=
(
currentPage
.
value
-
1
)
*
pageSize
.
value
;
const
endIndex
=
startIndex
+
pageSize
.
value
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论