Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
risk-monitor
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
蔡建
risk-monitor
Commits
cc8e9abf
提交
cc8e9abf
authored
3月 27, 2026
作者:
yanpeng
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
检查问题
上级
eb3bba82
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
75 行增加
和
13 行删除
+75
-13
common.js
src/views/exportControl/utils/common.js
+63
-0
index.vue
src/views/thinkTank/ReportDetail/index.vue
+12
-13
没有找到文件。
src/views/exportControl/utils/common.js
0 → 100644
浏览文件 @
cc8e9abf
import
{
ref
}
from
"vue"
;
export
const
useChartInterpretation
=
()
=>
{
const
loading
=
ref
(
false
);
const
interpretation
=
ref
(
""
);
const
error
=
ref
(
null
);
const
interpret
=
async
text
=>
{
loading
.
value
=
true
;
error
.
value
=
null
;
interpretation
.
value
=
""
;
try
{
const
response
=
await
fetch
(
"/aiAnalysis/chart_interpretation"
,
{
method
:
"POST"
,
headers
:
{
"X-API-Key"
:
"aircasKEY19491001"
,
"Content-Type"
:
"application/json"
},
body
:
JSON
.
stringify
({
text
})
});
if
(
!
response
.
ok
)
{
throw
new
Error
(
`HTTP error! status:
${
response
.
status
}
`
);
}
const
reader
=
response
.
body
.
getReader
();
const
decoder
=
new
TextDecoder
();
let
buffer
=
""
;
while
(
true
)
{
const
{
done
,
value
}
=
await
reader
.
read
();
if
(
done
)
break
;
buffer
+=
decoder
.
decode
(
value
,
{
stream
:
true
});
const
lines
=
buffer
.
split
(
"
\
n"
);
buffer
=
lines
.
pop
()
||
""
;
for
(
const
line
of
lines
)
{
if
(
line
.
startsWith
(
"data: "
))
{
const
content
=
line
.
substring
(
6
);
const
textMatch
=
content
.
match
(
/"解读":
\s
*"
([^
"
]
*
)
"/
);
if
(
textMatch
&&
textMatch
[
1
])
{
interpretation
.
value
=
textMatch
[
1
];
}
}
}
}
}
catch
(
err
)
{
error
.
value
=
err
.
message
||
"AI 解读失败"
;
console
.
error
(
"AI Chart Interpretation Error:"
,
err
);
}
finally
{
loading
.
value
=
false
;
}
};
return
{
loading
,
interpretation
,
error
,
interpret
};
};
src/views/thinkTank/ReportDetail/index.vue
浏览文件 @
cc8e9abf
...
...
@@ -14,13 +14,17 @@
<div
class=
"tag"
>
{{
value
.
industryName
}}
</div>
</div>
-->
<AreaTag
v-for=
"value, index in thinkInfo.tags"
:key=
"index"
:tagName=
"value.industryName"
></AreaTag>
<AreaTag
v-for=
"(value, index) in thinkInfo.tags"
:key=
"index"
:tagName=
"value.industryName"
></AreaTag>
</div>
</div>
</div>
<div
class=
"header-top-right"
>
<div
class=
"image-name-box"
>
<div
class=
"image"
>
<img
:src=
thinkInfo.thinkTankLogoUrl
alt=
""
/></div>
<div
class=
"image"
>
<img
:src=
"thinkInfo.thinkTankLogoUrl"
alt=
""
/></div>
<div
class=
"name"
>
{{
thinkInfo
.
thinkTankName
}}
</div>
</div>
<div
class=
"time"
>
{{
thinkInfo
.
times
}}
</div>
...
...
@@ -95,7 +99,7 @@ const router = useRouter();
const
route
=
useRoute
();
const
reportUrl
=
ref
(
""
);
const
thinkInfo
=
ref
({});
const
reportList
=
ref
({})
const
reportList
=
ref
({})
;
// 获取报告全局信息
const
handleGetThinkTankReportSummary
=
async
()
=>
{
...
...
@@ -105,7 +109,7 @@ const handleGetThinkTankReportSummary = async () => {
if
(
res
.
code
===
200
&&
res
.
data
)
{
reportUrl
.
value
=
res
.
data
.
reportUrl
;
thinkInfo
.
value
=
res
.
data
;
console
.
log
(
reportUrl
.
value
,
'reportUrl.value'
)
console
.
log
(
reportUrl
.
value
,
"reportUrl.value"
);
}
}
catch
(
error
)
{
console
.
error
(
"获取报告全局信息error"
,
error
);
...
...
@@ -117,9 +121,7 @@ const handleGetThinkTankReport = async () => {
const
res
=
await
getThinkTankReportRelated
(
router
.
currentRoute
.
_value
.
params
.
id
);
console
.
log
(
"报告全局信息"
,
res
);
if
(
res
.
code
===
200
&&
res
.
data
)
{
reportList
.
value
=
res
.
data
;
}
}
catch
(
error
)
{
console
.
error
(
"获取相关报告error"
,
error
);
...
...
@@ -133,6 +135,8 @@ const toReport = () => {
id
:
router
.
currentRoute
.
_value
.
params
.
id
}
});
console
.
log
(
"route.href"
,
route
.
href
);
window
.
open
(
route
.
href
,
"_blank"
);
};
const
tabActiveName
=
ref
(
"报告分析"
);
...
...
@@ -167,7 +171,7 @@ const goToOfficialWebsite = () => {
const
downloadOnePdf
=
async
(
url
,
filename
)
=>
{
const
response
=
await
fetch
(
url
,
{
method
:
"GET"
,
headers
:
{
"Content-Type"
:
"application/pdf"
}
,
headers
:
{
"Content-Type"
:
"application/pdf"
}
});
if
(
!
response
.
ok
)
throw
new
Error
(
`HTTP error! status:
${
response
.
status
}
`
);
const
blob
=
await
response
.
blob
();
...
...
@@ -209,10 +213,9 @@ const handleDownloadDocument = async () => {
try
{
const
{
ElMessage
}
=
await
import
(
"element-plus"
);
ElMessage
.
error
(
"PDF 下载失败,请稍后重试"
);
}
catch
(
_
)
{
}
}
catch
(
_
)
{}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -305,7 +308,6 @@ const handleDownloadDocument = async () => {
line-height
:
24px
;
letter-spacing
:
0px
;
text-align
:
right
;
}
.image
{
...
...
@@ -314,12 +316,9 @@ const handleDownloadDocument = async () => {
margin-top
:
5px
;
img
{
width
:
100%
;
height
:
100%
;
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论