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

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

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