Add AnalysisReport interface and refine report type definitions
This commit is contained in:
commit
bb1acb50c1
@ -2,7 +2,39 @@
|
|||||||
import { ref, onMounted, onUnmounted, computed } from "vue";
|
import { ref, onMounted, onUnmounted, computed } from "vue";
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
import { ElMessageBox, ElMessage } from "element-plus";
|
import { ElMessageBox, ElMessage } from "element-plus";
|
||||||
import { Plus } from "@element-plus/icons-vue";
|
import { Plus } from '@element-plus/icons-vue';
|
||||||
|
|
||||||
|
interface AnalysisReport {
|
||||||
|
id: number;
|
||||||
|
title: string;
|
||||||
|
type: "species" | "environment"; // 分析类型:物种/环境
|
||||||
|
timeRange: {
|
||||||
|
// 分析时间范围
|
||||||
|
start: string;
|
||||||
|
end: string;
|
||||||
|
};
|
||||||
|
dataSource: {
|
||||||
|
// 数据来源
|
||||||
|
type: string;
|
||||||
|
points: string[]; // 监测点位
|
||||||
|
}[];
|
||||||
|
analysis: {
|
||||||
|
summary: string; // 分析总结
|
||||||
|
trends: {
|
||||||
|
// 趋势分析
|
||||||
|
indicator: string; // 指标
|
||||||
|
trend: string; // 变化趋势
|
||||||
|
data: any[]; // 数据
|
||||||
|
}[];
|
||||||
|
abnormal: {
|
||||||
|
// 异常分析
|
||||||
|
type: string;
|
||||||
|
description: string;
|
||||||
|
level: string;
|
||||||
|
}[];
|
||||||
|
};
|
||||||
|
recommendations: string[]; // 建议措施
|
||||||
|
}
|
||||||
|
|
||||||
// 示例数据
|
// 示例数据
|
||||||
const tableData = ref([
|
const tableData = ref([
|
||||||
|
|||||||
@ -66,7 +66,6 @@ let trendChart = null;
|
|||||||
const initTrendChart = () => {
|
const initTrendChart = () => {
|
||||||
const chartDom = document.getElementById('trendChart');
|
const chartDom = document.getElementById('trendChart');
|
||||||
if (!chartDom) return;
|
if (!chartDom) return;
|
||||||
|
|
||||||
const myChart = echarts.init(chartDom);
|
const myChart = echarts.init(chartDom);
|
||||||
const option = {
|
const option = {
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
@ -588,4 +587,4 @@ const showTrendAnalysis = ref(false);
|
|||||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user