|
|
@@ -1,79 +1,119 @@
|
|
|
import dayjs from 'dayjs';
|
|
|
-import { getGoafList, getMineData } from '../../system/algorithm/algorithm.api';
|
|
|
import { BasicColumn } from '/@/components/Table';
|
|
|
import { FormSchema } from '/@/components/Table';
|
|
|
import { TreeItem } from '/@/components/Tree/index';
|
|
|
-import { getGoafData } from './monitor.api';
|
|
|
+import { ModuleDataChart } from '/@/components/Configurable/types';
|
|
|
+import { h } from 'vue';
|
|
|
+import { Tag } from 'ant-design-vue';
|
|
|
|
|
|
// 实时数据相关
|
|
|
export const columns: BasicColumn[] = [
|
|
|
- {
|
|
|
- title: '序号',
|
|
|
- dataIndex: 'orderNo',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '区域',
|
|
|
- dataIndex: 'enforcement',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // title: '序号',
|
|
|
+ // dataIndex: 'orderNo',
|
|
|
+ // width: 60,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '区域',
|
|
|
+ // dataIndex: 'coalSeamName',
|
|
|
+ // width: 80,
|
|
|
+ // },
|
|
|
{
|
|
|
title: '煤矿名称',
|
|
|
dataIndex: 'mineName',
|
|
|
+ width: 200,
|
|
|
},
|
|
|
{
|
|
|
title: '密闭名称',
|
|
|
- dataIndex: 'sealedName',
|
|
|
+ dataIndex: 'devicePos',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: '所属煤层',
|
|
|
- dataIndex: 'coalSeam',
|
|
|
+ dataIndex: 'coalSeamName',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
- title: '自燃倾向性',
|
|
|
- dataIndex: 'riskLevel',
|
|
|
+ title: 'CO(ppm)',
|
|
|
+ dataIndex: 'coVal',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
- title: 'CO(ppm)',
|
|
|
- dataIndex: 'COVal',
|
|
|
+ title: 'CO2(%)',
|
|
|
+ dataIndex: 'co2Val',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: 'CH4(%)',
|
|
|
- dataIndex: 'CH4Val',
|
|
|
+ dataIndex: 'ch4Val',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: 'C2H2(ppm)',
|
|
|
- dataIndex: 'C2H2Val',
|
|
|
+ dataIndex: 'c2h2Val',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'C2H4(%)',
|
|
|
+ dataIndex: 'c2h4Val',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: 'O2(%)',
|
|
|
- dataIndex: 'O2Val',
|
|
|
+ dataIndex: 'o2Val',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: '温度(℃)',
|
|
|
dataIndex: 'temperature',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: '压差(Pa)',
|
|
|
- dataIndex: 'pressureDiff',
|
|
|
+ dataIndex: 'sourcePressure',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
- title: '是否漏风',
|
|
|
- dataIndex: 'leakage',
|
|
|
+ title: '自然发火隐患等级',
|
|
|
+ dataIndex: 'fireAlarm',
|
|
|
+ width: 100,
|
|
|
+ customRender({ record }) {
|
|
|
+ return tagCellRender(record.fireAlarm);
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- title: '自然发火隐患',
|
|
|
- dataIndex: 'fireHazard',
|
|
|
+ title: '是否漏风',
|
|
|
+ dataIndex: 'leakageAlarm',
|
|
|
+ width: 100,
|
|
|
+ customRender({ record }) {
|
|
|
+ return tagCellRender(record.leakageAlarm);
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- title: '密闭启封判定',
|
|
|
- dataIndex: 'unsealing',
|
|
|
+ title: '压差隐患等级',
|
|
|
+ dataIndex: 'sourcePressureAlarm',
|
|
|
+ width: 100,
|
|
|
+ customRender({ record }) {
|
|
|
+ return tagCellRender(record.sourcePressureAlarm);
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
- title: '爆炸危险性',
|
|
|
- dataIndex: 'explosionHazard',
|
|
|
+ title: '密闭启封判定',
|
|
|
+ dataIndex: 'unsealAlarm',
|
|
|
+ width: 100,
|
|
|
+ customRender({ record }) {
|
|
|
+ return tagCellRender(record.unsealAlarm);
|
|
|
+ },
|
|
|
},
|
|
|
+ // {
|
|
|
+ // title: '爆炸危险性',
|
|
|
+ // dataIndex: 'explosionHazard',
|
|
|
+ // width: 80,
|
|
|
+ // },
|
|
|
{
|
|
|
title: '更新时间',
|
|
|
- dataIndex: 'updateTime',
|
|
|
+ dataIndex: 'readTime',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
];
|
|
|
|
|
|
@@ -82,19 +122,8 @@ export const searchFormSchema: FormSchema[] = [
|
|
|
field: 'mineCode',
|
|
|
label: '煤矿名称',
|
|
|
component: 'MineCascader',
|
|
|
+ slot: 'mine-cascader',
|
|
|
colProps: { span: 6 },
|
|
|
- // componentProps: {
|
|
|
- // //请求api,返回结果{ result: { records: [{'id':'1',name:'scott'},{'id':'2',name:'小张'}] }}
|
|
|
- // api: () => getMineData({ pageNo: 1, pageSize: 999 }),
|
|
|
- // //数值转成String
|
|
|
- // numberToString: false,
|
|
|
- // //标题字段
|
|
|
- // labelField: 'mineName',
|
|
|
- // //值字段
|
|
|
- // valueField: 'id',
|
|
|
- // //返回结果字段
|
|
|
- // resultField: 'records',
|
|
|
- // },
|
|
|
},
|
|
|
{
|
|
|
field: 'mineNameAbbr',
|
|
|
@@ -130,134 +159,101 @@ export const searchFormSchema: FormSchema[] = [
|
|
|
},
|
|
|
];
|
|
|
|
|
|
-export const minesData = [
|
|
|
- {
|
|
|
- orderNo: 101, // 序号
|
|
|
- enforcement: '执法一处', // 区域
|
|
|
- mineName: '神木市三江', // 煤矿名称
|
|
|
- sealedName: '采空区密闭', // 密闭名称
|
|
|
- coalSeam: 'XX煤层', // 所属煤层
|
|
|
- riskLevel: 'Ⅰ类容易自燃', // 自燃倾向性(与搜索框选项label一致)
|
|
|
- COVal: 24, // CO浓度(ppm)
|
|
|
- CH4Val: 0, // CH4浓度(%)
|
|
|
- C2H2Val: 0, // C2H2浓度(ppm)
|
|
|
- O2Val: 20, // O2浓度(%)
|
|
|
- temperature: 35, // 温度(℃)
|
|
|
- pressureDiff: 50, // 压差(Pa)
|
|
|
- leakage: '气体涌出', // 是否漏风
|
|
|
- fireHazard: '低风险', // 自然发火隐患
|
|
|
- unsealing: '不可启封', // 密闭启封判定
|
|
|
- explosionHazard: '低风险', // 爆炸危险性
|
|
|
- updateTime: '2025-11-17 15:00:40', // 更新时间
|
|
|
- },
|
|
|
-];
|
|
|
-
|
|
|
-export const modalDetailsData: {} = {
|
|
|
+export const modalDetailsData: {
|
|
|
+ basicInfo: Record<string, any>[];
|
|
|
+ board: Record<string, any>[];
|
|
|
+ gasConcentrationConfig: ModuleDataChart;
|
|
|
+ pressureConfig: ModuleDataChart;
|
|
|
+} = {
|
|
|
basicInfo: [
|
|
|
{
|
|
|
label: '煤矿名称',
|
|
|
- value: '神木市三江能源有限公司',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '密闭名称',
|
|
|
- value: 'xxxx采空区密闭',
|
|
|
+ value: 'mineName',
|
|
|
+ tag: false,
|
|
|
},
|
|
|
{
|
|
|
- label: '所属煤层',
|
|
|
- value: 'xxxx煤层',
|
|
|
+ label: '设备位置',
|
|
|
+ value: 'devicePos',
|
|
|
+ tag: false,
|
|
|
},
|
|
|
+ // {
|
|
|
+ // label: '所属煤层',
|
|
|
+ // value: 'coalSeamName',
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // label: '自燃情况',
|
|
|
+ // value: 'Ⅰ类容易自燃',
|
|
|
+ // },
|
|
|
{
|
|
|
- label: '自燃情况',
|
|
|
- value: 'Ⅰ类容易自燃',
|
|
|
+ label: '自然发火隐患等级',
|
|
|
+ value: 'fireAlarm',
|
|
|
+ tag: true,
|
|
|
},
|
|
|
{
|
|
|
label: '是否漏风',
|
|
|
- value: '闭内气体涌出',
|
|
|
+ value: 'leakageAlarm',
|
|
|
+ tag: true,
|
|
|
},
|
|
|
{
|
|
|
- label: '自然发火隐患',
|
|
|
- value: '低风险',
|
|
|
+ label: '压差隐患等级',
|
|
|
+ value: 'sourcePressureAlarm',
|
|
|
+ tag: true,
|
|
|
},
|
|
|
{
|
|
|
label: '密闭启封判定',
|
|
|
- value: '不可启封',
|
|
|
- },
|
|
|
- {
|
|
|
- label: '爆炸危险性',
|
|
|
- value: '低风险',
|
|
|
+ value: 'unsealAlarm',
|
|
|
+ tag: true,
|
|
|
},
|
|
|
],
|
|
|
board: [
|
|
|
{
|
|
|
label: 'CO(ppm)',
|
|
|
- value: '21',
|
|
|
+ value: 'coVal',
|
|
|
},
|
|
|
{
|
|
|
label: 'CO2(PPM)',
|
|
|
- value: '21',
|
|
|
+ value: 'co2Val',
|
|
|
},
|
|
|
{
|
|
|
label: 'O2(%)',
|
|
|
- value: '24',
|
|
|
+ value: 'o2Val',
|
|
|
},
|
|
|
{
|
|
|
label: 'CH4(%)',
|
|
|
- value: '17',
|
|
|
+ value: 'ch4Val',
|
|
|
},
|
|
|
{
|
|
|
label: 'C2H4(ppm)',
|
|
|
- value: '23',
|
|
|
+ value: 'c2h4Val',
|
|
|
},
|
|
|
{
|
|
|
label: 'C2H2(ppm)',
|
|
|
- value: '14',
|
|
|
+ value: 'c2h2Val',
|
|
|
},
|
|
|
{
|
|
|
label: '温度(℃)',
|
|
|
- value: '14',
|
|
|
+ value: 'temperature',
|
|
|
},
|
|
|
{
|
|
|
label: '压差(Pa)',
|
|
|
- value: '14',
|
|
|
+ value: 'sourcePressure',
|
|
|
},
|
|
|
],
|
|
|
- demoBlastData: {
|
|
|
- // 爆炸三角形顶点坐标数据(JSON字符串格式)
|
|
|
- btTriBlast: JSON.stringify({
|
|
|
- A_x: 0,
|
|
|
- A_y: 21,
|
|
|
- B_x: 50,
|
|
|
- B_y: 0,
|
|
|
- E_x: 10,
|
|
|
- E_y: 15,
|
|
|
- F_x: 30,
|
|
|
- F_y: 5,
|
|
|
- G_x: 5,
|
|
|
- G_y: 18,
|
|
|
- }),
|
|
|
- o2val: '12.5',
|
|
|
- coval: '2000',
|
|
|
- gasval: '5.2',
|
|
|
- ch2val: '1500',
|
|
|
- chval: '800',
|
|
|
- },
|
|
|
gasConcentrationConfig: {
|
|
|
type: 'line_smooth', // 使用光滑曲线类型
|
|
|
legend: { show: true },
|
|
|
xAxis: [
|
|
|
{
|
|
|
- type: 'category',
|
|
|
- dataKey: 'time',
|
|
|
+ show: true,
|
|
|
name: '时间',
|
|
|
axisLabel: { color: '#000000' },
|
|
|
- nameTextStyle: { color: '#000' },
|
|
|
},
|
|
|
],
|
|
|
yAxis: [
|
|
|
{
|
|
|
- type: 'value',
|
|
|
show: true,
|
|
|
name: '浓度(%)',
|
|
|
+ position: 'left',
|
|
|
splitLine: { show: false },
|
|
|
axisLine: {
|
|
|
show: true,
|
|
|
@@ -269,118 +265,132 @@ export const modalDetailsData: {} = {
|
|
|
],
|
|
|
series: [
|
|
|
{
|
|
|
- label: '气体浓度',
|
|
|
- readFrom: 'gasData',
|
|
|
- xprop: 'time',
|
|
|
- yprop: 'value',
|
|
|
- // color: '#000'
|
|
|
+ label: '氧气浓度',
|
|
|
+ readFrom: 'chartData',
|
|
|
+ xprop: 'readTime',
|
|
|
+ yprop: 'o2Val',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '一氧化碳浓度',
|
|
|
+ readFrom: 'chartData',
|
|
|
+ xprop: 'readTime',
|
|
|
+ yprop: 'coVal',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '二氧化碳浓度',
|
|
|
+ readFrom: 'chartData',
|
|
|
+ xprop: 'readTime',
|
|
|
+ yprop: 'co2Val',
|
|
|
},
|
|
|
],
|
|
|
- },
|
|
|
- gasConcentrationData: {
|
|
|
- gasData: [
|
|
|
- // 示例数据,实际应从接口获取
|
|
|
- { time: '00:00', value: 25.5 },
|
|
|
- { time: '04:00', value: 26.3 },
|
|
|
- { time: '08:00', value: 30.9 },
|
|
|
- { time: '12:00', value: 27.8 },
|
|
|
- { time: '16:00', value: 29.1 },
|
|
|
- { time: '20:00', value: 25.5 },
|
|
|
- ],
|
|
|
+ readFrom: '',
|
|
|
},
|
|
|
pressureConfig: {
|
|
|
type: 'line', // 使用普通折线图类型
|
|
|
- legend: { show: true, color: '#000000' },
|
|
|
- xAxis: [{ type: 'category', dataKey: 'time', name: '时间', axisLabel: { color: '#000000' } }],
|
|
|
- yAxis: [{ show: true, name: '压力(kPa)', axisLabel: { color: '#000000' } }],
|
|
|
- series: [
|
|
|
- { label: '内部压力', readFrom: 'chartdata', xprop: 'time', yprop: 'inner' },
|
|
|
- { label: '外部压力', readFrom: 'chartdata', xprop: 'time', yprop: 'outer' },
|
|
|
- { label: '压力差', readFrom: 'chartdata', xprop: 'time', yprop: 'diff' },
|
|
|
+ legend: { show: true },
|
|
|
+ xAxis: [
|
|
|
+ {
|
|
|
+ show: true,
|
|
|
+ name: '时间',
|
|
|
+ axisLabel: { color: '#000000' },
|
|
|
+ },
|
|
|
],
|
|
|
- },
|
|
|
- pressureData: {
|
|
|
- chartdata: [
|
|
|
- // 示例数据,实际应从接口获取
|
|
|
- { time: '00:00', inner: 12, outer: 18, diff: 6 },
|
|
|
- { time: '04:00', inner: 15, outer: 17, diff: 2 },
|
|
|
- { time: '08:00', inner: 13, outer: 19, diff: 6 },
|
|
|
- { time: '12:00', inner: 11, outer: 10, diff: 1 },
|
|
|
- { time: '16:00', inner: 14, outer: 18, diff: 4 },
|
|
|
- { time: '20:00', inner: 16, outer: 16, diff: 0 },
|
|
|
+ yAxis: [
|
|
|
+ {
|
|
|
+ show: true,
|
|
|
+ position: 'left',
|
|
|
+ name: '压力(kPa)',
|
|
|
+ axisLabel: { color: '#000000' },
|
|
|
+ },
|
|
|
],
|
|
|
+ series: [
|
|
|
+ {
|
|
|
+ label: '压差',
|
|
|
+ readFrom: 'chartData',
|
|
|
+ xprop: 'readTime',
|
|
|
+ yprop: 'sourcePressure',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ readFrom: '',
|
|
|
},
|
|
|
};
|
|
|
|
|
|
// 历史数据相关
|
|
|
export const historicalColumns: BasicColumn[] = [
|
|
|
- {
|
|
|
- title: '序号',
|
|
|
- dataIndex: 'orderNo',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '区域',
|
|
|
- dataIndex: 'enforcement',
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // title: '序号',
|
|
|
+ // dataIndex: 'orderNo',
|
|
|
+ // width: 60,
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // title: '区域',
|
|
|
+ // dataIndex: 'enforcement',
|
|
|
+ // width: 100,
|
|
|
+ // },
|
|
|
{
|
|
|
title: '煤矿名称',
|
|
|
dataIndex: 'mineName',
|
|
|
+ width: 200,
|
|
|
},
|
|
|
{
|
|
|
title: '密闭名称',
|
|
|
- dataIndex: 'sealedName',
|
|
|
+ dataIndex: 'devicePos',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: '所属煤层',
|
|
|
- dataIndex: 'coalSeam',
|
|
|
+ dataIndex: 'coalSeamName',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
- title: '自燃倾向性',
|
|
|
- dataIndex: 'riskLevel',
|
|
|
+ title: 'CO(ppm)',
|
|
|
+ dataIndex: 'coVal',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
- title: 'CO(ppm)',
|
|
|
- dataIndex: 'COVal',
|
|
|
+ title: 'CO2(%)',
|
|
|
+ dataIndex: 'co2Val',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: 'CH4(%)',
|
|
|
- dataIndex: 'CH4Val',
|
|
|
+ dataIndex: 'ch4Val',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: 'C2H2(ppm)',
|
|
|
- dataIndex: 'C2H2Val',
|
|
|
+ dataIndex: 'c2h2Val',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: 'C2H4(%)',
|
|
|
+ dataIndex: 'c2h4Val',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: 'O2(%)',
|
|
|
- dataIndex: 'O2Val',
|
|
|
+ dataIndex: 'o2Val',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: '温度(℃)',
|
|
|
dataIndex: 'temperature',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
title: '压差(Pa)',
|
|
|
- dataIndex: 'pressureDiff',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '是否漏风',
|
|
|
- dataIndex: 'leakage',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '自然发火隐患',
|
|
|
- dataIndex: 'fireHazard',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '密闭启封判定',
|
|
|
- dataIndex: 'unsealing',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '爆炸危险性',
|
|
|
- dataIndex: 'explosionHazard',
|
|
|
+ dataIndex: 'sourcePressure',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
+ // {
|
|
|
+ // title: '爆炸危险性',
|
|
|
+ // dataIndex: 'explosionHazard',
|
|
|
+ // width: 100,
|
|
|
+ // },
|
|
|
{
|
|
|
title: '更新时间',
|
|
|
- dataIndex: 'updateTime',
|
|
|
+ dataIndex: 'createTime',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
];
|
|
|
|
|
|
@@ -389,14 +399,15 @@ export const historicalFormSchema: FormSchema[] = [
|
|
|
field: 'mineCode',
|
|
|
label: '煤矿名称',
|
|
|
component: 'MineCascader',
|
|
|
+ slot: 'mine-cascader',
|
|
|
colProps: { span: 6 },
|
|
|
},
|
|
|
- {
|
|
|
- field: 'mineNameAbbr',
|
|
|
- label: '煤矿简称',
|
|
|
- component: 'Input',
|
|
|
- colProps: { span: 6 },
|
|
|
- },
|
|
|
+ // {
|
|
|
+ // field: 'mineNameAbbr',
|
|
|
+ // label: '煤矿简称',
|
|
|
+ // component: 'Input',
|
|
|
+ // colProps: { span: 6 },
|
|
|
+ // },
|
|
|
// {
|
|
|
// field: 'productStatus',
|
|
|
// label: '生产状态',
|
|
|
@@ -440,18 +451,7 @@ export const historicalFormSchema: FormSchema[] = [
|
|
|
field: 'goafId',
|
|
|
label: '密闭名称',
|
|
|
component: 'ApiSelect',
|
|
|
- componentProps: {
|
|
|
- api: getGoafList,
|
|
|
- //标题字段
|
|
|
- labelField: 'devicePos',
|
|
|
- //值字段
|
|
|
- valueField: 'id',
|
|
|
- //请求参数
|
|
|
- params: {},
|
|
|
- //返回结果字段
|
|
|
- resultField: 'records',
|
|
|
- },
|
|
|
- // required: true,
|
|
|
+ slot: 'goaf-select',
|
|
|
colProps: { span: 6 },
|
|
|
},
|
|
|
{
|
|
|
@@ -464,7 +464,7 @@ export const historicalFormSchema: FormSchema[] = [
|
|
|
//返回值格式化(绑定值的格式)
|
|
|
valueFormat: 'YYYY-MM-DD hh:mm:ss',
|
|
|
},
|
|
|
- defaultValue: dayjs().add(-1, 'day').format('YYYY-MM-DD hh:mm:ss'),
|
|
|
+ defaultValue: dayjs().add(-7, 'day').format('YYYY-MM-DD hh:mm:ss'),
|
|
|
colProps: { span: 6 },
|
|
|
},
|
|
|
{
|
|
|
@@ -482,28 +482,6 @@ export const historicalFormSchema: FormSchema[] = [
|
|
|
},
|
|
|
];
|
|
|
|
|
|
-export const historicalMinesData = [
|
|
|
- {
|
|
|
- orderNo: 101, // 序号
|
|
|
- enforcement: '执法一处', // 区域
|
|
|
- mineName: '神木市三江', // 煤矿名称
|
|
|
- sealedName: '采空区密闭', // 密闭名称
|
|
|
- coalSeam: 'XX煤层', // 所属煤层
|
|
|
- riskLevel: 'Ⅰ类容易自燃', // 自燃倾向性(与搜索框选项label一致)
|
|
|
- COVal: 24, // CO浓度(ppm)
|
|
|
- CH4Val: 0, // CH4浓度(%)
|
|
|
- C2H2Val: 0, // C2H2浓度(ppm)
|
|
|
- O2Val: 20, // O2浓度(%)
|
|
|
- temperature: 35, // 温度(℃)
|
|
|
- pressureDiff: 50, // 压差(Pa)
|
|
|
- leakage: '气体涌出', // 是否漏风
|
|
|
- fireHazard: '低风险', // 自然发火隐患
|
|
|
- unsealing: '不可启封', // 密闭启封判定
|
|
|
- explosionHazard: '低风险', // 爆炸危险性
|
|
|
- updateTime: '2025-12-22 15:00:40', // 更新时间
|
|
|
- },
|
|
|
-];
|
|
|
-
|
|
|
export const treeData: TreeItem[] = [
|
|
|
{
|
|
|
title: '气体参数 ',
|
|
|
@@ -532,330 +510,21 @@ export const treeData: TreeItem[] = [
|
|
|
},
|
|
|
];
|
|
|
|
|
|
-export const historicalMockChartData = [
|
|
|
- {
|
|
|
- time: '2025-12-22 00:00:00',
|
|
|
- CO: 22.3,
|
|
|
- CH4: 0.12,
|
|
|
- C2H4: 0.35,
|
|
|
- C2H2: 0.1,
|
|
|
- CO2: 0.85,
|
|
|
- O2: 19.5,
|
|
|
- innerPressure: 101.32,
|
|
|
- outerPressure: 101.1,
|
|
|
- pressureDiff: 0.22,
|
|
|
- temperature: 33.2,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 01:00:00',
|
|
|
- CO: 23.1,
|
|
|
- CH4: 0.15,
|
|
|
- C2H4: 0.42,
|
|
|
- C2H2: 0.12,
|
|
|
- CO2: 0.92,
|
|
|
- O2: 19.7,
|
|
|
- innerPressure: 101.38,
|
|
|
- outerPressure: 101.15,
|
|
|
- pressureDiff: 0.23,
|
|
|
- temperature: 33.5,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 02:00:00',
|
|
|
- CO: 22.8,
|
|
|
- CH4: 0.13,
|
|
|
- C2H4: 0.38,
|
|
|
- C2H2: 0.09,
|
|
|
- CO2: 0.88,
|
|
|
- O2: 19.6,
|
|
|
- innerPressure: 101.41,
|
|
|
- outerPressure: 101.18,
|
|
|
- pressureDiff: 0.23,
|
|
|
- temperature: 33.3,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 03:00:00',
|
|
|
- CO: 21.9,
|
|
|
- CH4: 0.11,
|
|
|
- C2H4: 0.31,
|
|
|
- C2H2: 0.08,
|
|
|
- CO2: 0.81,
|
|
|
- O2: 19.4,
|
|
|
- innerPressure: 101.35,
|
|
|
- outerPressure: 101.12,
|
|
|
- pressureDiff: 0.21,
|
|
|
- temperature: 33.1,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 04:00:00',
|
|
|
- CO: 22.5,
|
|
|
- CH4: 0.14,
|
|
|
- C2H4: 0.36,
|
|
|
- C2H2: 0.11,
|
|
|
- CO2: 0.86,
|
|
|
- O2: 19.5,
|
|
|
- innerPressure: 101.39,
|
|
|
- outerPressure: 101.16,
|
|
|
- pressureDiff: 0.22,
|
|
|
- temperature: 33.4,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 05:00:00',
|
|
|
- CO: 23.4,
|
|
|
- CH4: 0.16,
|
|
|
- C2H4: 0.45,
|
|
|
- C2H2: 0.13,
|
|
|
- CO2: 0.95,
|
|
|
- O2: 19.8,
|
|
|
- innerPressure: 101.43,
|
|
|
- outerPressure: 101.2,
|
|
|
- pressureDiff: 0.24,
|
|
|
- temperature: 33.7,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 06:00:00',
|
|
|
- CO: 24.2,
|
|
|
- CH4: 0.18,
|
|
|
- C2H4: 0.51,
|
|
|
- C2H2: 0.15,
|
|
|
- CO2: 1.02,
|
|
|
- O2: 20.0,
|
|
|
- innerPressure: 101.47,
|
|
|
- outerPressure: 101.23,
|
|
|
- pressureDiff: 0.25,
|
|
|
- temperature: 34.0,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 07:00:00',
|
|
|
- CO: 25.3,
|
|
|
- CH4: 0.21,
|
|
|
- C2H4: 0.58,
|
|
|
- C2H2: 0.17,
|
|
|
- CO2: 1.08,
|
|
|
- O2: 20.2,
|
|
|
- innerPressure: 101.52,
|
|
|
- outerPressure: 101.27,
|
|
|
- pressureDiff: 0.26,
|
|
|
- temperature: 34.3,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 08:00:00',
|
|
|
- CO: 26.1,
|
|
|
- CH4: 0.23,
|
|
|
- C2H4: 0.65,
|
|
|
- C2H2: 0.19,
|
|
|
- CO2: 1.15,
|
|
|
- O2: 20.4,
|
|
|
- innerPressure: 101.56,
|
|
|
- outerPressure: 101.3,
|
|
|
- pressureDiff: 0.27,
|
|
|
- temperature: 34.6,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 09:00:00',
|
|
|
- CO: 27.4,
|
|
|
- CH4: 0.25,
|
|
|
- C2H4: 0.72,
|
|
|
- C2H2: 0.22,
|
|
|
- CO2: 1.23,
|
|
|
- O2: 20.6,
|
|
|
- innerPressure: 101.6,
|
|
|
- outerPressure: 101.33,
|
|
|
- pressureDiff: 0.28,
|
|
|
- temperature: 35.0,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 10:00:00',
|
|
|
- CO: 28.2,
|
|
|
- CH4: 0.27,
|
|
|
- C2H4: 0.78,
|
|
|
- C2H2: 0.24,
|
|
|
- CO2: 1.29,
|
|
|
- O2: 20.8,
|
|
|
- innerPressure: 101.63,
|
|
|
- outerPressure: 101.35,
|
|
|
- pressureDiff: 0.29,
|
|
|
- temperature: 35.3,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 11:00:00',
|
|
|
- CO: 27.8,
|
|
|
- CH4: 0.26,
|
|
|
- C2H4: 0.75,
|
|
|
- C2H2: 0.23,
|
|
|
- CO2: 1.26,
|
|
|
- O2: 20.7,
|
|
|
- innerPressure: 101.61,
|
|
|
- outerPressure: 101.34,
|
|
|
- pressureDiff: 0.28,
|
|
|
- temperature: 35.2,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 12:00:00',
|
|
|
- CO: 26.9,
|
|
|
- CH4: 0.24,
|
|
|
- C2H4: 0.69,
|
|
|
- C2H2: 0.21,
|
|
|
- CO2: 1.19,
|
|
|
- O2: 20.5,
|
|
|
- innerPressure: 101.58,
|
|
|
- outerPressure: 101.32,
|
|
|
- pressureDiff: 0.27,
|
|
|
- temperature: 34.9,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 13:00:00',
|
|
|
- CO: 26.3,
|
|
|
- CH4: 0.22,
|
|
|
- C2H4: 0.64,
|
|
|
- C2H2: 0.19,
|
|
|
- CO2: 1.14,
|
|
|
- O2: 20.3,
|
|
|
- innerPressure: 101.55,
|
|
|
- outerPressure: 101.3,
|
|
|
- pressureDiff: 0.26,
|
|
|
- temperature: 34.7,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 14:00:00',
|
|
|
- CO: 25.7,
|
|
|
- CH4: 0.2,
|
|
|
- C2H4: 0.59,
|
|
|
- C2H2: 0.18,
|
|
|
- CO2: 1.09,
|
|
|
- O2: 20.1,
|
|
|
- innerPressure: 101.53,
|
|
|
- outerPressure: 101.28,
|
|
|
- pressureDiff: 0.25,
|
|
|
- temperature: 34.5,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 15:00:00',
|
|
|
- CO: 24.9,
|
|
|
- CH4: 0.18,
|
|
|
- C2H4: 0.53,
|
|
|
- C2H2: 0.16,
|
|
|
- CO2: 1.03,
|
|
|
- O2: 19.9,
|
|
|
- innerPressure: 101.49,
|
|
|
- outerPressure: 101.25,
|
|
|
- pressureDiff: 0.24,
|
|
|
- temperature: 34.2,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 16:00:00',
|
|
|
- CO: 24.3,
|
|
|
- CH4: 0.17,
|
|
|
- C2H4: 0.49,
|
|
|
- C2H2: 0.15,
|
|
|
- CO2: 0.98,
|
|
|
- O2: 19.8,
|
|
|
- innerPressure: 101.46,
|
|
|
- outerPressure: 101.22,
|
|
|
- pressureDiff: 0.23,
|
|
|
- temperature: 34.0,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 17:00:00',
|
|
|
- CO: 23.8,
|
|
|
- CH4: 0.16,
|
|
|
- C2H4: 0.46,
|
|
|
- C2H2: 0.14,
|
|
|
- CO2: 0.94,
|
|
|
- O2: 19.7,
|
|
|
- innerPressure: 101.44,
|
|
|
- outerPressure: 101.21,
|
|
|
- pressureDiff: 0.23,
|
|
|
- temperature: 33.8,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 18:00:00',
|
|
|
- CO: 23.5,
|
|
|
- CH4: 0.15,
|
|
|
- C2H4: 0.43,
|
|
|
- C2H2: 0.13,
|
|
|
- CO2: 0.91,
|
|
|
- O2: 19.6,
|
|
|
- innerPressure: 101.42,
|
|
|
- outerPressure: 101.19,
|
|
|
- pressureDiff: 0.22,
|
|
|
- temperature: 33.7,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 19:00:00',
|
|
|
- CO: 24.1,
|
|
|
- CH4: 0.17,
|
|
|
- C2H4: 0.48,
|
|
|
- C2H2: 0.15,
|
|
|
- CO2: 0.97,
|
|
|
- O2: 19.8,
|
|
|
- innerPressure: 101.45,
|
|
|
- outerPressure: 101.22,
|
|
|
- pressureDiff: 0.24,
|
|
|
- temperature: 33.9,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 20:00:00',
|
|
|
- CO: 24.7,
|
|
|
- CH4: 0.19,
|
|
|
- C2H4: 0.52,
|
|
|
- C2H2: 0.16,
|
|
|
- CO2: 1.01,
|
|
|
- O2: 20.0,
|
|
|
- innerPressure: 101.48,
|
|
|
- outerPressure: 101.24,
|
|
|
- pressureDiff: 0.25,
|
|
|
- temperature: 34.1,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 21:00:00',
|
|
|
- CO: 25.2,
|
|
|
- CH4: 0.2,
|
|
|
- C2H4: 0.56,
|
|
|
- C2H2: 0.18,
|
|
|
- CO2: 1.05,
|
|
|
- O2: 20.1,
|
|
|
- innerPressure: 101.51,
|
|
|
- outerPressure: 101.26,
|
|
|
- pressureDiff: 0.26,
|
|
|
- temperature: 34.3,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 22:00:00',
|
|
|
- CO: 24.5,
|
|
|
- CH4: 0.18,
|
|
|
- C2H4: 0.5,
|
|
|
- C2H2: 0.16,
|
|
|
- CO2: 0.99,
|
|
|
- O2: 19.9,
|
|
|
- innerPressure: 101.47,
|
|
|
- outerPressure: 101.23,
|
|
|
- pressureDiff: 0.24,
|
|
|
- temperature: 34.0,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-12-22 23:00:00',
|
|
|
- CO: 23.7,
|
|
|
- CH4: 0.16,
|
|
|
- C2H4: 0.45,
|
|
|
- C2H2: 0.14,
|
|
|
- CO2: 0.93,
|
|
|
- O2: 19.7,
|
|
|
- innerPressure: 101.43,
|
|
|
- outerPressure: 101.2,
|
|
|
- pressureDiff: 0.23,
|
|
|
- temperature: 33.8,
|
|
|
- },
|
|
|
- {
|
|
|
- time: '2025-11-18 00:00:00',
|
|
|
- CO: 22.9,
|
|
|
- CH4: 0.14,
|
|
|
- C2H4: 0.39,
|
|
|
- C2H2: 0.11,
|
|
|
- CO2: 0.89,
|
|
|
- O2: 19.6,
|
|
|
- innerPressure: 101.37,
|
|
|
- outerPressure: 101.17,
|
|
|
- pressureDiff: 0.22,
|
|
|
- temperature: 33.4,
|
|
|
- },
|
|
|
-];
|
|
|
+function getTagType(level: string) {
|
|
|
+ switch (level) {
|
|
|
+ case '1':
|
|
|
+ return 'red';
|
|
|
+ case '2':
|
|
|
+ return 'volcano';
|
|
|
+ case '3':
|
|
|
+ return 'orange';
|
|
|
+ case '4':
|
|
|
+ return 'success';
|
|
|
+ default:
|
|
|
+ return 'default';
|
|
|
+ }
|
|
|
+}
|
|
|
+export function tagCellRender(record: any) {
|
|
|
+ if (!record) return h(Tag, { bordered: false, color: 'default' }, '-');
|
|
|
+ return h(Tag, { bordered: false, color: getTagType(record.alarmLevel) }, record.alarmName);
|
|
|
+}
|