Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
09e34f76
提交
09e34f76
authored
1月 04, 2026
作者:
coderBryanFu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update
上级
486b8d7c
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
166 行增加
和
34 行删除
+166
-34
index.vue
src/views/comprehensiveSearch/chat/index.vue
+103
-3
index.vue
src/views/comprehensiveSearch/searchResults/index.vue
+2
-2
index.vue
src/views/decree/decreeLayout/deepdig/index.vue
+2
-2
abstract-header.png
src/views/newsAnalysis/assets/images/abstract-header.png
+0
-0
index.vue
src/views/newsAnalysis/index.vue
+53
-21
Timeline.vue
src/views/overView/component/Timeline.vue
+6
-6
没有找到文件。
src/views/comprehensiveSearch/chat/index.vue
浏览文件 @
09e34f76
...
...
@@ -558,7 +558,106 @@ function formatDateTime(isoString) {
return
`
${
year
}
-
${
month
}
-
${
day
}
${
hours
}
:
${
minutes
}
:
${
seconds
}
`
;
}
const
chat
=
async
question
=>
{
const
handleBillChat
=
async
question
=>
{
// 添加用户消息
addMessage
(
"user"
,
question
);
const
params
=
{
model
:
"neko-checklist-agent"
,
// messages: [
// {
// role: "user",
// content: "2024年12月5日当期实体清单的主要制裁对象、制裁原因是?"
// }
// ]
messages
:
messages
.
value
.
map
(
item
=>
{
return
{
role
:
item
.
type
===
"ai"
?
"assistant"
:
"user"
,
content
:
item
.
content
};
})
};
// 添加空的 AI 消息用于流式更新
addMessage
(
"ai"
,
""
);
isLoading
.
value
=
true
;
const
loadingInterval
=
setInterval
(()
=>
{
if
(
loadingDotIndex
.
value
<
2
)
{
loadingDotIndex
.
value
++
;
}
else
{
loadingDotIndex
.
value
=
0
;
}
},
500
);
try
{
const
response
=
await
fetch
(
"/checklistChat/langgraph/bills/chat"
,
{
method
:
"POST"
,
headers
:
{
"Content-Type"
:
"application/json"
},
body
:
JSON
.
stringify
(
params
)
});
// console.log("状态码:", response.status); // 200
// console.log("ok:", response.ok); // true
// console.log("headers:", [...response.headers.entries()]);
// 先以文本形式读取,看看实际内容
const
rawText
=
await
response
.
text
();
// console.log("原始响应文本:", rawText);
// 尝试解析 JSON
const
data
=
JSON
.
parse
(
rawText
);
// 可能在这里抛出错误
console
.
log
(
"解析后的数据:"
,
data
);
clearInterval
(
loadingInterval
);
isLoading
.
value
=
false
;
console
.
log
(
"data.logs:"
,
data
.
logs
);
console
.
log
(
"data.choices:"
,
data
.
choices
);
if
(
data
.
logs
)
{
const
lastMessage
=
messages
.
value
[
messages
.
value
.
length
-
1
];
if
(
lastMessage
&&
lastMessage
.
type
===
"ai"
)
{
let
newDocs
=
data
.
logs
.
map
(
item
=>
{
return
item
.
detail
+
" "
+
formatDateTime
(
item
.
ts
);
});
lastMessage
.
source
=
newDocs
;
scrollToBottom
();
}
}
if
(
data
.
choices
&&
data
.
choices
[
0
].
message
.
content
)
{
isCurAnswerMessage
.
value
=
true
;
let
content
=
data
.
choices
[
0
].
message
.
content
;
if
(
content
===
"[DONE]"
)
{
ElMessage
.
success
(
"生成完成!"
);
}
else
{
aiMessage
.
value
+=
content
;
updateLastAIMessage
(
aiMessage
.
value
);
}
}
if
(
data
.
raw_data
)
{
const
lastMessage
=
messages
.
value
[
messages
.
value
.
length
-
1
];
if
(
lastMessage
&&
lastMessage
.
type
===
"ai"
)
{
lastMessage
.
raw_data
=
data
.
raw_data
;
scrollToBottom
();
}
}
if
(
data
.
detail
.
error
)
{
console
.
log
(
data
.
detail
.
error
.
message
);
// ElMessage.error(data.detail.error.message);
isCurAnswerMessage
.
value
=
true
;
let
content
=
"我们换个新话题吧!"
;
aiMessage
.
value
+=
content
;
updateLastAIMessage
(
aiMessage
.
value
);
}
}
catch
(
error
)
{
console
.
error
(
"catch 中的错误:"
,
error
);
}
};
const
handleListChat
=
async
question
=>
{
// 添加用户消息
addMessage
(
"user"
,
question
);
...
...
@@ -821,9 +920,10 @@ const sendMessage = async () => {
userInput
.
value
=
""
;
aiMessage
.
value
=
""
;
if
(
curArea
.
value
===
"法案"
)
{
await
connectSSE
(
question
);
// await connectSSE(question);
handleBillChat
(
question
)
}
else
{
c
hat
(
question
);
handleListC
hat
(
question
);
}
};
...
...
src/views/comprehensiveSearch/searchResults/index.vue
浏览文件 @
09e34f76
...
...
@@ -309,9 +309,9 @@ const handleToPage = item => {
switch
(
item
.
typeStr
)
{
case
"法案"
:
curRoute
=
router
.
resolve
({
path
:
"/
decree
Layout"
,
path
:
"/
bill
Layout"
,
query
:
{
id
:
id
billId
:
item
.
id
}
});
break
;
...
...
src/views/decree/decreeLayout/deepdig/index.vue
浏览文件 @
09e34f76
...
...
@@ -409,8 +409,8 @@ onMounted(() => {
margin
-
top
:
25
px
;
margin
-
left
:
28
px
;
img
{
width
:
100
%
;
//
height: 100%;
//
width: 100%;
height
:
100
%
;
}
}
.
info
-
right
{
...
...
src/views/newsAnalysis/assets/images/abstract-header.png
0 → 100644
浏览文件 @
09e34f76
10.4 KB
src/views/newsAnalysis/index.vue
浏览文件 @
09e34f76
...
...
@@ -9,7 +9,9 @@
<div
class=
"page-header-left-top-desc"
>
<div
class=
"text"
>
{{
summaryInfo
.
newsDateTime
}}
·
{{
summaryInfo
.
newsOrg
}}
</div>
<div
class=
"tag-box"
>
<div
class=
"tag"
v-for=
"(tag, index) in summaryInfo.industryList"
:key=
"index"
>
{{
tag
.
industryName
}}
</div>
<div
class=
"tag"
v-for=
"(tag, index) in summaryInfo.industryList"
:key=
"index"
>
{{
tag
.
industryName
}}
</div>
</div>
</div>
</div>
...
...
@@ -37,7 +39,14 @@
<
template
#
default
>
<!-- 内容区域 - 分三块-->
<div
class=
"page-content-news-abstract"
>
<div
class=
"news-abstract-header"
>
<img
src=
"./assets/images/abstract-header.png"
alt=
""
/>
</div>
<div
class=
"news-abstract-content"
>
{{
" 美国众议院共和党人正在起草一项新提案,以限制美国对中国的投资。此前,参议院已将其纳入国防政策立法中。知情人士向Semafor透露,众议院工作人员希望在11月7日前就该提案达成共识,并将财政部的反馈纳入由肯塔基州共和党众议员安迪·巴尔提出的配套提案中(尽管政府停摆可能推迟这一时间表)。随后,众议员将利用该文本与参议员就最终《国防授权法案》的内容进行协商。此前一届国会中,类似的尝试因北卡罗来纳州前众议员帕特里克·麦克亨利的反对而失败,但本届国会中,“所有人都在共同努力”。知情人士补充说,领导人并不担心此举会剥夺特朗普在周四与中国领导人习近平会谈时的谈判筹码,因为财政部已开始实施类似的指导方针。"
}}
</div>
</div>
<div
class=
"page-content-news-artical"
>
<div
class=
"page-content-news-artical-zn"
>
...
...
@@ -218,29 +227,25 @@ const handleToDetail = () => {
// 新闻内容
const
newsContentInfo
=
ref
({
newsId
:
""
,
newsDate
:
""
,
newsContent
:
""
,
newsTitle
:
""
,
newsOrg
:
""
,
newsImage
:
""
})
newsId
:
""
,
newsDate
:
""
,
newsContent
:
""
,
newsTitle
:
""
,
newsOrg
:
""
,
newsImage
:
""
})
;
const
handleGetNewsContent
=
async
()
=>
{
const
params
=
{
newsId
:
route
.
query
.
newsId
}
}
;
try
{
const
res
=
await
getNewsContent
(
params
)
console
.
log
(
'新闻内容'
,
res
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
newsContentInfo
.
value
=
res
.
data
const
res
=
await
getNewsContent
(
params
)
;
console
.
log
(
"新闻内容"
,
res
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
newsContentInfo
.
value
=
res
.
data
;
}
}
catch
(
error
)
{
}
}
}
catch
(
error
)
{}
};
// 事件脉络
const
sanctionProcessList
=
ref
([
...
...
@@ -335,7 +340,7 @@ const handleGetRelationNews = async () => {
onMounted
(()
=>
{
handleGetNewsSummary
();
handleGetNewsContent
()
handleGetNewsContent
()
;
handleGetNewsEvent
();
handleGetRelationNews
();
});
...
...
@@ -452,9 +457,29 @@ onMounted(() => {
border-radius
:
4px
;
border
:
1px
solid
rgba
(
246
,
250
,
255
,
1
);
text-indent
:
2em
;
.news-abstract-header
{
margin-top
:
6px
;
width
:
135px
;
height
:
32px
;
img
{
width
:
100%
;
height
:
100%
;
}
}
.news-abstract-content
{
margin-top
:
16px
;
font-family
:
Microsoft
YaHei
;
font-style
:
Regular
;
font-size
:
16px
;
font-weight
:
400
;
line-height
:
30px
;
letter-spacing
:
0px
;
text-align
:
justify
;
}
}
&
-news-artical
{
// height: 480px;
margin-top
:
16px
;
line-height
:
1
.8
;
color
:
#303133
;
// display: flex;
...
...
@@ -464,6 +489,13 @@ onMounted(() => {
&
-zn
,
&
-en
{
width
:
100%
;
font-family
:
Microsoft
YaHei
;
font-style
:
Regular
;
font-size
:
16px
;
font-weight
:
400
;
line-height
:
30px
;
letter-spacing
:
0px
;
text-align
:
justify
;
}
p
{
text-align
:
justify
;
...
...
src/views/overView/component/Timeline.vue
浏览文件 @
09e34f76
<
template
>
<div
class=
"timeline-wrapper"
>
<button
class=
"arrow left"
:disabled=
"index
<
=
0
"
@
click=
"index--"
>
<
{{
'<'
}}
</button>
<div
class=
"timeline-box"
>
...
...
@@ -19,7 +19,7 @@
</div>
<div
class=
"title"
>
{{
item
.
title
}}
<img
class=
"item-header-icon"
src=
"@/assets/images/icon/copy.png"
style=
"cursor: pointer;"
></img
>
<img
class=
"item-header-icon"
src=
"@/assets/images/icon/copy.png"
style=
"cursor: pointer;"
/
>
</div>
<div
class=
"content"
>
{{
item
.
content
}}
...
...
@@ -30,7 +30,7 @@
</div>
<button
class=
"arrow right"
:disabled=
"index >= total - 5"
@
click=
"index++"
>
>
{{
'>'
}}
</button>
</div>
</
template
>
...
...
@@ -94,7 +94,7 @@ export default {
.arrow
{
position
:
absolute
;
top
:
50%
;
top
:
170px
;
/* 左右切换按钮 */
width
:
24px
;
height
:
48px
;
...
...
@@ -114,13 +114,13 @@ export default {
.left
{
left
:
0
;
border-radius
:
4px
0px
0px
4
px
;
border-radius
:
0px
4px
4px
0
px
;
}
.right
{
right
:
0
;
border-radius
:
0px
4px
4px
0
px
;
border-radius
:
4px
0px
0px
4
px
;
}
.timeline-box
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论