Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
59d0a2fd
提交
59d0a2fd
authored
4月 07, 2026
作者:
张烨
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix:政令主页-修改网页标题显示异常
上级
95d83001
流水线
#342
已通过 于阶段
in 1 分 52 秒
变更
4
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
37 行增加
和
99 行删除
+37
-99
index.js
src/router/index.js
+3
-1
index.vue
src/views/decree/decreeHome/index.vue
+27
-90
index.vue
src/views/decree/decreeLayout/index.vue
+5
-2
index.vue
src/views/decree/decreeLayout/overview/background/index.vue
+2
-6
没有找到文件。
src/router/index.js
浏览文件 @
59d0a2fd
...
...
@@ -72,7 +72,9 @@ router.beforeEach((to, from, next) => {
const
storageKey
=
to
.
meta
.
titleStorageKey
||
"curTabName"
;
// 新开页签时 sessionStorage 不共享,优先用 query 带过来的 title/name
const
queryTitle
=
(
to
.
query
&&
(
to
.
query
.
title
||
to
.
query
.
name
))
?
String
(
to
.
query
.
title
||
to
.
query
.
name
)
:
""
;
document
.
title
=
queryTitle
||
window
.
sessionStorage
.
getItem
(
storageKey
)
||
to
.
meta
.
title
;
if
(
!
to
.
path
.
startsWith
(
'/decreeLayout/'
))
{
document
.
title
=
queryTitle
||
window
.
sessionStorage
.
getItem
(
storageKey
)
||
to
.
meta
.
title
;
}
}
else
{
document
.
title
=
to
.
meta
.
title
...
...
src/views/decree/decreeHome/index.vue
浏览文件 @
59d0a2fd
...
...
@@ -408,17 +408,12 @@
<div
class=
"title"
>
{{ "科技领域" }}
</div>
</div>
<div
class=
"select-main"
>
<div
class=
"checkbox-group"
>
<el-checkbox
v-model=
"activeAreaList"
label=
"all"
style=
"width: 100px"
class=
"filter-checkbox"
@
change=
"checked => handleAreaChange('all', checked)"
>
{{ "全部领域" }}
</el-checkbox>
<el-checkbox
v-for=
"area in areaList"
:key=
"area.id"
v-model=
"activeAreaList"
:label=
"area.id"
style=
"width: 100px"
class=
"filter-checkbox"
@
change=
"checked => handleAreaChange(area.id, checked)"
>
<el-checkbox-group
class=
"checkbox-group"
v-model=
"activeAreaList"
@
change=
"handleAreaChange"
>
<el-checkbox
label=
""
class=
"filter-checkbox"
>
{{ "全部领域" }}
</el-checkbox>
<el-checkbox
v-for=
"area in areaList"
:key=
"area.id"
:label=
"area.id"
class=
"filter-checkbox"
>
{{ area.name }}
</el-checkbox>
</
div
>
</
el-checkbox-group
>
</div>
</div>
<div
class=
"select-box"
>
...
...
@@ -427,13 +422,11 @@
<div
class=
"title"
>
{{ "发布时间" }}
</div>
</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"
@
change=
"checked => handlePubTimeChange(time.id, checked)"
>
<el-checkbox-group
class=
"checkbox-group"
v-model=
"activePubTime"
@
change=
"handlePubTimeChange"
>
<el-checkbox
v-for=
"time in pubTime"
:key=
"time.id"
:label=
"time.id"
class=
"filter-checkbox"
>
{{ time.name }}
</el-checkbox>
</
div
>
</
el-checkbox-group
>
</div>
</div>
</div>
...
...
@@ -623,7 +616,6 @@ const handleClickOrder = () => {
// 跳转政令详情
const
onNavigateToDetail
=
(
item
)
=>
{
window
.
sessionStorage
.
setItem
(
"curTabName"
,
item
.
name
||
item
.
title
||
item
.
signalTitle
);
const
route
=
router
.
resolve
({
path
:
"/decreeLayout"
,
query
:
{
id
:
item
.
orderId
||
item
.
id
}
...
...
@@ -1117,7 +1109,7 @@ const handleChangeCheckedDecreeType = () => {
};
const
pubTime
=
ref
([
{
id
:
"
all
"
,
name
:
"全部时间"
},
{
id
:
""
,
name
:
"全部时间"
},
{
id
:
"2026"
,
name
:
"2026年"
},
{
id
:
"2025"
,
name
:
"2025年"
},
{
id
:
"2024"
,
name
:
"2024年"
},
...
...
@@ -1128,41 +1120,26 @@ const pubTime = ref([
]);
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
]
:
[];
const
handlePubTimeChange
=
(
event
)
=>
{
if
(
event
.
length
&&
event
[
event
.
length
-
1
]
!==
""
)
{
activePubTime
.
value
=
event
.
filter
(
item
=>
item
!==
""
);
}
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
;
}
activePubTime
.
value
=
[
""
];
}
currentPage
.
value
=
1
;
handleGetDecreeOrderList
();
};
const
handleAreaChange
=
(
id
,
checked
)
=>
{
const
allIds
=
areaList
.
value
.
map
(
item
=>
item
.
id
);
if
(
id
===
"all"
)
{
activeAreaList
.
value
=
checked
?
[
"all"
,
...
allIds
]
:
[];
const
activeAreaList
=
ref
([
""
]);
const
handleAreaChange
=
(
event
)
=>
{
if
(
event
.
length
&&
event
[
event
.
length
-
1
]
!==
""
)
{
activeAreaList
.
value
=
event
.
filter
(
item
=>
item
!==
""
);
}
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
;
}
activeAreaList
.
value
=
[
""
];
}
currentPage
.
value
=
1
;
handleGetDecreeOrderList
();
};
const
areaList
=
ref
([
...
...
@@ -1171,7 +1148,7 @@ const areaList = ref([
// { id: "通信网络", name: "通信网络" },
// { id: "量子科技", name: "量子科技" }
]);
const
activeAreaList
=
ref
([
"1"
]);
// 修改获取科技领域列表,添加全选选项
const
handleGetAreaList
=
async
()
=>
{
try
{
...
...
@@ -1179,8 +1156,6 @@ const handleGetAreaList = async () => {
console
.
log
(
"行业领域列表"
,
res
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
areaList
.
value
=
res
.
data
;
// 设置默认全选
activeAreaList
.
value
=
[
"all"
,
...
res
.
data
.
map
(
item
=>
item
.
id
)];
// 获取列表后重新查询
handleGetDecreeOrderList
();
}
...
...
@@ -1193,37 +1168,14 @@ const decreeList = ref([]);
// 修改请求方法,处理全选时不传参数的情况
const
handleGetDecreeOrderList
=
async
()
=>
{
// 处理科技领域:如果包含 all 或全选,则 researchTypeIds 为空(不传)
let
p1
=
""
;
const
allAreaIds
=
areaList
.
value
.
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
:
currentPage
.
value
,
pageSize
:
pageSize
.
value
,
researchTypeIds
:
p1
,
// 全选时不传(为空)
researchTypeIds
:
activeAreaList
.
value
.
join
(
','
)
||
null
,
sortFun
:
isSort
.
value
,
isCN
:
isChina
.
value
?
1
:
0
,
proposeName
:
searchType
.
value
,
years
:
p2
,
// 全选时不传(为空)
years
:
activePubTime
.
value
.
join
(
','
)
||
null
,
typeIds
:
checkedDecreeType
.
value
.
toString
()
};
...
...
@@ -1253,7 +1205,7 @@ const handleGetDecreeOrderList = async () => {
}
};
watch
([
activePubTime
,
activeAreaList
,
checkedGovIns
,
isSort
,
isChina
,
searchType
],
val
=>
{
watch
([
checkedGovIns
,
isSort
,
isChina
,
searchType
],
val
=>
{
// 切换页码到第一页
currentPage
.
value
=
1
;
handleGetDecreeOrderList
();
...
...
@@ -1268,21 +1220,6 @@ const handleSwithCurDecree = name => {
}
};
// 搜索
const
searchDecreeText
=
ref
(
""
);
const
handleSearch
=
()
=>
{
window
.
sessionStorage
.
setItem
(
"curTabName"
,
`搜索-
${
searchDecreeText
.
value
}
`
);
const
curRoute
=
router
.
resolve
({
path
:
"/searchResults"
,
query
:
{
searchText
:
searchDecreeText
.
value
,
areaName
:
"政令"
}
});
window
.
open
(
curRoute
.
href
,
"_blank"
);
};
// 关键机构
const
keyOrganizationList
=
ref
([]);
const
onKeyOrganization
=
async
(
event
)
=>
{
...
...
@@ -2477,7 +2414,7 @@ onMounted(async () => {
gap
:
8px
4px
;
.filter-checkbox
{
width
:
1
6
0px
;
width
:
1
0
0px
;
height
:
24px
;
margin-right
:
0
!
important
;
}
...
...
src/views/decree/decreeLayout/index.vue
浏览文件 @
59d0a2fd
...
...
@@ -213,14 +213,18 @@ const handleClickMainHeaderBtn = item => {
// 获取全局信息
const
summaryInfo
=
ref
({});
let
pageTitle
=
"科技政令主页"
const
handleGetSummary
=
async
()
=>
{
try
{
const
res
=
await
getDecreeSummary
({
id
:
route
.
query
.
id
});
console
.
log
(
"全局信息"
,
res
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
summaryInfo
.
value
=
res
.
data
;
pageTitle
=
res
.
data
.
name
||
'科技政令主页'
;
}
}
catch
(
error
)
{
}
}
catch
(
error
)
{}
document
.
title
=
pageTitle
;
window
.
sessionStorage
.
setItem
(
"curTabName"
,
pageTitle
);
};
// 获取报告原文
...
...
@@ -280,7 +284,6 @@ const handleAnalysisClick = () => {
onMounted
(()
=>
{
handleGetSummary
();
console
.
log
(
route
.
path
);
if
(
route
.
path
===
"/decreeLayout/overview/introduction"
||
route
.
path
===
"/decreeLayout/overview/background"
||
route
.
path
===
"/decreeLayout/overview/measures"
)
{
activeTitle
.
value
=
"政令概况"
;
}
else
if
(
route
.
path
===
"/decreeLayout/deepDig"
)
{
...
...
src/views/decree/decreeLayout/overview/background/index.vue
浏览文件 @
59d0a2fd
...
...
@@ -78,9 +78,7 @@
<div
class=
"time-line-icon"
>
<img
style=
"width: 100%; height: 100%;"
:src=
"item.orgImage || DefaultIcon1"
alt=
""
>
</div>
<div
class=
"time-line-name text-click-hover"
@
click=
"handleToInstitution(item)"
>
{{
item.proposeOrgName
}}
</div>
<div
class=
"time-line-name text-click-hover"
@
click=
"handleToInstitution(item)"
>
{{ item.proposeOrgName }}
</div>
</div>
<div
class=
"timeline-content"
@
click=
"handleClickDecree(item)"
>
{{ item.describe }}
</div>
</div>
...
...
@@ -174,6 +172,7 @@ const handleGetPrev = async () => {
};
// 跳转行政机构主页
const
handleToInstitution
=
item
=>
{
window
.
sessionStorage
.
setItem
(
"curTabName"
,
item
.
proposeOrgName
);
const
curRoute
=
router
.
resolve
({
path
:
"/institution"
,
query
:
{
...
...
@@ -225,7 +224,6 @@ const handleGetLaws = async () => {
};
// 跳转科技法案详情页
const
handleClickBull
=
decree
=>
{
window
.
sessionStorage
.
setItem
(
"billId"
,
decree
.
billId
);
window
.
sessionStorage
.
setItem
(
"curTabName"
,
decree
.
title
);
const
route
=
router
.
resolve
({
path
:
"/billLayout"
,
...
...
@@ -233,8 +231,6 @@ const handleClickBull = decree => {
billId
:
decree
.
billId
}
});
console
.
log
(
route
);
window
.
open
(
route
.
href
,
"_blank"
);
};
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论