Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
5b9636d2
提交
5b9636d2
authored
4月 16, 2026
作者:
hsx
浏览文件
操作
浏览文件
下载
差异文件
合并分支 'hsx' 到 'pre'
修复模块新闻得bug 查看合并请求
!366
上级
ba800b15
35415fdb
流水线
#534
已通过 于阶段
in 2 分 52 秒
变更
1
流水线
1
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
76 行增加
和
72 行删除
+76
-72
ModeuleNews.vue
src/views/newsBrief/ModeuleNews.vue
+76
-72
没有找到文件。
src/views/newsBrief/ModeuleNews.vue
浏览文件 @
5b9636d2
<
template
>
<el-space
direction=
"vertical"
class=
"full-width news-image-background"
>
<el-button
class=
"float-btn"
@
click=
"gotoNewsBrief(false)"
><el-icon>
<back
/>
</el-icon>
返回
</el-button>
<el-space
style=
"width: 993px;"
direction=
"vertical"
alignment=
"flex-start"
>
<div
id=
"ref-news-list"
style=
"margin-top: 50px; margin-bottom: 24px; margin-left: 24px;"
>
<common-text
class=
"text-title-0-show"
color=
"var(--text-primary-90-color)"
>
{{
moduleName
}}
</common-text>
<common-text
class=
"text-regular"
color=
"var(--text-primary-65-color)"
>
基于情报价值评估预测算法,掌握全球重要潜在动向
</common-text>
</div>
<el-space
direction=
"vertical"
fill
alignment=
"flex-start"
class=
"background-as-card common-padding"
>
<el-radio-group
v-model=
"currentAreaId"
class=
"radio-group-as-gap-btn"
>
<el-space
direction=
"horizontal"
wrap
alignment=
"center"
>
<el-radio-button
:label=
"''"
@
click=
"changeArea('')"
>
全部
</el-radio-button>
<el-radio-button
v-for=
"(t, i) in AreaList"
:key=
"i"
:label=
"t.id"
@
click=
"changeArea(t.id)"
>
{{
t
.
name
}}
</el-radio-button>
</el-space>
</el-radio-group>
<el-divider
style=
"margin: 10px 0px;"
></el-divider>
<div
v-if=
"NewsData?.content?.length > 0"
>
<news-list
:news=
"NewsData.content"
/>
</div>
<el-empty
v-else
></el-empty>
<el-pagination
background
layout=
"total, ->, prev, pager, next"
:current-page=
"modulePage"
:total=
"NewsData?.totalElements ?? 0"
v-on:current-change=
"onCurrentChange"
/>
</el-space>
</el-space>
</el-space>
<el-space
direction=
"vertical"
class=
"full-width news-image-background"
>
<el-button
class=
"float-btn"
@
click=
"gotoNewsBrief(false)"
><el-icon>
<Back
/>
</el-icon>
返回
</el-button
>
<el-space
style=
"width: 993px"
direction=
"vertical"
alignment=
"flex-start"
>
<div
id=
"ref-news-list"
style=
"margin-top: 50px; margin-bottom: 24px; margin-left: 24px"
>
<common-text
class=
"text-title-0-show"
color=
"var(--text-primary-90-color)"
>
{{
moduleName
}}
</common-text>
<common-text
class=
"text-regular"
color=
"var(--text-primary-65-color)"
>
基于情报价值评估预测算法,掌握全球重要潜在动向
</common-text
>
</div>
<el-space
direction=
"vertical"
fill
alignment=
"flex-start"
class=
"background-as-card common-padding"
>
<el-radio-group
v-model=
"currentAreaId"
class=
"radio-group-as-gap-btn"
>
<el-space
direction=
"horizontal"
wrap
alignment=
"center"
>
<el-radio-button
:label=
"''"
@
click=
"changeArea('')"
>
全部
</el-radio-button>
<el-radio-button
v-for=
"(t, i) in AreaList"
:key=
"i"
:label=
"t.id"
@
click=
"changeArea(t.id)"
>
{{
t
.
name
}}
</el-radio-button>
</el-space>
</el-radio-group>
<el-divider
style=
"margin: 10px 0px"
></el-divider>
<div
v-if=
"NewsData?.content?.length > 0"
>
<news-list
:news=
"NewsData.content"
/>
</div>
<el-empty
v-else
></el-empty>
<el-pagination
background
layout=
"total, ->, prev, pager, next"
:current-page=
"modulePage"
:total=
"NewsData?.totalElements ?? 0"
v-on:current-change=
"onCurrentChange"
/>
</el-space>
</el-space>
</el-space>
</
template
>
<
script
setup
>
import
{
ref
,
onMounted
}
from
"vue"
;
import
{
useRoute
}
from
'vue-router'
;
import
'@/styles/container.scss'
;
import
'@/styles/radio.scss'
;
import
{
useRoute
}
from
"vue-router"
;
import
"@/styles/container.scss"
;
import
"@/styles/radio.scss"
;
import
NewsList
from
"./NewsList.vue"
;
import
{
getAreaList
,
getHotNewsByArea
}
from
"@/api/news/newsBrief"
;
import
{
ElSpace
,
ElDivider
,
ElRadioButton
,
ElRadioGroup
,
ElButton
,
ElIcon
,
ElEmpty
,
ElPagination
}
from
"element-plus"
;
import
{
Back
}
from
"@element-plus/icons-vue"
;
import
CommonText
from
"@/components/base/texts/CommonText.vue"
;
import
{
useGotoNewsBrief
}
from
"@/router/modules/news"
;
import
{
scrollToElement
}
from
"@/router/common"
;
import
{
number
}
from
"echarts"
;
const
route
=
useRoute
();
const
gotoNewsBrief
=
useGotoNewsBrief
();
const
moduleId
=
ref
(
route
.
params
.
id
);
...
...
@@ -54,52 +61,50 @@ const AreaList = ref([]);
const
currentAreaId
=
ref
(
""
);
onMounted
(
async
()
=>
{
console
.
log
(
route
.
query
.
name
,
moduleId
.
value
,
moduleName
.
value
);
const
{
data
:
areaList
}
=
await
getAreaList
();
AreaList
.
value
=
areaList
??
[];
await
updateDate
(
""
)
console
.
log
(
route
.
query
.
name
,
moduleId
.
value
,
moduleName
.
value
);
const
{
data
:
areaList
}
=
await
getAreaList
();
AreaList
.
value
=
areaList
??
[];
await
updateDate
(
""
);
});
const
onCurrentChange
=
async
e
=>
{
await
updateDate
(
currentAreaId
.
value
,
e
-
1
)
scrollToElement
(
"ref-news-list"
);
}
await
updateDate
(
currentAreaId
.
value
,
e
-
1
);
scrollToElement
(
"ref-news-list"
);
}
;
async
function
updateDate
(
id
,
page
=
0
)
{
const
{
data
}
=
await
getHotNewsByArea
({
moduleId
:
moduleId
.
value
,
industryId
:
id
?
id
:
null
,
currentPage
:
page
,
});
data
?.
content
?.
forEach
(
item
=>
{
item
.
newsImage
=
item
.
coverUrl
??
""
})
NewsData
.
value
=
data
??
[];
modulePage
.
value
=
(
data
?.
number
??
0
)
+
1
;
const
{
data
}
=
await
getHotNewsByArea
({
moduleId
:
moduleId
.
value
,
industryId
:
id
?
id
:
null
,
currentPage
:
page
});
data
?.
content
?.
forEach
(
item
=>
{
item
.
newsImage
=
item
.
coverUrl
??
""
;
});
NewsData
.
value
=
data
??
[];
modulePage
.
value
=
(
data
?.
number
??
0
)
+
1
;
}
async
function
changeArea
(
id
)
{
await
updateDate
(
id
,
0
)
await
updateDate
(
id
,
0
);
}
</
script
>
<
style
lang=
"scss"
scoped
>
@use
'@/styles/common.scss'
as
*
;
@use
"@/styles/common.scss"
as
*
;
@import
url("./style.css")
;
.float-btn
{
position
:
absolute
;
top
:
24px
;
left
:
40px
;
width
:
92px
;
height
:
40px
;
display
:
flex
;
gap
:
4px
;
align-items
:
center
;
justify-content
:
center
;
box-sizing
:
border-box
;
border
:
1px
solid
rgba
(
255
,
255
,
255
,
1
);
border-radius
:
32px
;
@extend
.text-regular
;
color
:
var
(
--
text-primary-65-color
);
position
:
absolute
;
top
:
24px
;
left
:
40px
;
width
:
92px
;
height
:
40px
;
display
:
flex
;
gap
:
4px
;
align-items
:
center
;
justify-content
:
center
;
box-sizing
:
border-box
;
border
:
1px
solid
rgba
(
255
,
255
,
255
,
1
);
border-radius
:
32px
;
@extend
.text-regular
;
color
:
var
(
--
text-primary-65-color
);
}
</
style
>
\ No newline at end of file
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论