提交 f0a54767 authored 作者: 张烨's avatar 张烨

fix:政令-机构信息默认显示近一年数据

上级 264cd62d
流水线 #242 已通过 于阶段
in 1 分 42 秒
...@@ -82,6 +82,7 @@ const getGraphChart = (nodes, links, layoutType) => { ...@@ -82,6 +82,7 @@ const getGraphChart = (nodes, links, layoutType) => {
} }
}, },
force: { force: {
layoutAnimation: false, // 关闭初始化晃来晃去的动画
repulsion: 300, repulsion: 300,
gravity: 0, gravity: 0,
edgeLength: 300 edgeLength: 300
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<img :src="tipsTcon" alt=""> <img :src="tipsTcon" alt="">
</div> </div>
<div class="date-text">近期美国各联邦政府机构发布涉华政令数量汇总</div> <div class="date-text">近期美国各联邦政府机构发布涉华政令数量汇总</div>
<TimeTabPane @time-click="handleDateChange" /> <TimeTabPane @time-click="handleDateChange" activeTime="近一年" />
</div> </div>
<div class="organization-list" ref="refOrganization" v-loading="organizationInfo.loading"> <div class="organization-list" ref="refOrganization" v-loading="organizationInfo.loading">
<div class="organization-item" v-for="(item, index) in organizationInfo.list" :key="index" <div class="organization-item" v-for="(item, index) in organizationInfo.list" :key="index"
...@@ -77,7 +77,7 @@ const organizationInfo = reactive({ ...@@ -77,7 +77,7 @@ const organizationInfo = reactive({
total: 0, total: 0,
isSort: 1, isSort: 1,
keyWord: "", keyWord: "",
day: 7, day: 365,
list: [] list: []
}) })
......
...@@ -794,6 +794,7 @@ const onChartInterpretation = async (text, param) => { ...@@ -794,6 +794,7 @@ const onChartInterpretation = async (text, param) => {
}); });
clearTimeout(timeout); // 👇 新增:请求成功清除定时器 clearTimeout(timeout); // 👇 新增:请求成功清除定时器
if (!response.ok) throw new Error(`HTTP 错误 ${response.status}`);
const reader = response.body.getReader(); const reader = response.body.getReader();
const decoder = new TextDecoder(); const decoder = new TextDecoder();
...@@ -818,12 +819,7 @@ const onChartInterpretation = async (text, param) => { ...@@ -818,12 +819,7 @@ const onChartInterpretation = async (text, param) => {
} }
param.value = summarize param.value = summarize
} catch (err) { } catch (err) {
// 👇 新增:超时处理 param.value = "系统异常,生成失败";
if (err.name === 'AbortError') {
param.value = "请求超时,请重试";
} else {
param.value = "生成失败,请重试";
}
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论