|
|
@@ -1,18 +1,53 @@
|
|
|
<template>
|
|
|
- <a-card style="background: #0b142b; border: 1px solid #2ef3ef">
|
|
|
- <FiberTempChart
|
|
|
- :x-axis-data="xAxisList"
|
|
|
- :series-data="tempValueList"
|
|
|
- :max-value="60"
|
|
|
- :min-value="20"
|
|
|
- title="光纤测温"
|
|
|
- height="440px"
|
|
|
- @chart-click="onChartClick"
|
|
|
- />
|
|
|
- </a-card>
|
|
|
+ <div class="test-chart-page">
|
|
|
+ <a-card style="background: #0b142b; border: 1px solid #2ef3ef">
|
|
|
+ <FiberTempChart
|
|
|
+ :x-axis-data="xAxisList"
|
|
|
+ :series-data="tempValueList"
|
|
|
+ :max-value="60"
|
|
|
+ :min-value="20"
|
|
|
+ title="光纤测温"
|
|
|
+ height="440px"
|
|
|
+ @chart-click="onChartClick"
|
|
|
+ />
|
|
|
+ </a-card>
|
|
|
+ <a-card style="background: #0b142b; border: 1px solid #2ef3ef">
|
|
|
+ <BundleMonitorChart
|
|
|
+ :x-axis-data="bundleXAxisList"
|
|
|
+ :series-data="bundleSeriesList"
|
|
|
+ title="束管监测设备曲线"
|
|
|
+ height="440px"
|
|
|
+ @chart-click="onBundleChartClick"
|
|
|
+ />
|
|
|
+ </a-card>
|
|
|
+ <a-card style="background: #0b142b; border: 1px solid #2ef3ef">
|
|
|
+ <MonitorTrendChart
|
|
|
+ v-model="selectedMonitorMetric"
|
|
|
+ :x-axis-data="switchableMonitorXAxis"
|
|
|
+ :metrics="switchableMonitorMetrics"
|
|
|
+ title="可切换监测曲线"
|
|
|
+ height="440px"
|
|
|
+ @chart-click="onSwitchableMonitorClick"
|
|
|
+ />
|
|
|
+ </a-card>
|
|
|
+ <a-card style="background: #0b142b; border: 1px solid #2ef3ef">
|
|
|
+ <DailyAnalysisBarChart
|
|
|
+ :categories="dailyAnalysisCategories"
|
|
|
+ :series-data="dailyAnalysisSeries"
|
|
|
+ :y-axis-config="dailyAnalysisAxes"
|
|
|
+ title="束管/色谱仪日报分析"
|
|
|
+ height="520px"
|
|
|
+ @chart-click="onDailyAnalysisClick"
|
|
|
+ />
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
<script setup>
|
|
|
+import { ref } from 'vue';
|
|
|
import FiberTempChart from './FiberTempChart.vue';
|
|
|
+import BundleMonitorChart from './BundleMonitorChart.vue';
|
|
|
+import MonitorTrendChart from './MonitorTrendChart.vue';
|
|
|
+import DailyAnalysisBarChart from './DailyAnalysisBarChart.vue';
|
|
|
const pointData = [
|
|
|
{ name: '测点01', temp: 24.2 },
|
|
|
{ name: '测点02', temp: 28.5 },
|
|
|
@@ -43,4 +78,275 @@ const tempValueList = pointData.map((item) => item.temp);
|
|
|
function onChartClick(params) {
|
|
|
console.log('点击测点', params);
|
|
|
}
|
|
|
+
|
|
|
+// 束管模拟数据
|
|
|
+const bundleXAxisList = Array.from({ length: 60 }, (_, index) => {
|
|
|
+ const time = new Date(Date.UTC(2026, 9, 25, 4 + index));
|
|
|
+ return `${String(time.getUTCMonth() + 1).padStart(2, '0')}-${String(time.getUTCDate()).padStart(2, '0')} ${String(time.getUTCHours()).padStart(
|
|
|
+ 2,
|
|
|
+ '0'
|
|
|
+ )}:00`;
|
|
|
+});
|
|
|
+
|
|
|
+const bundleSeriesSource = [
|
|
|
+ {
|
|
|
+ name: '一氧化碳',
|
|
|
+ field: 'coval',
|
|
|
+ unit: 'ppm',
|
|
|
+ yAxisIndex: 0,
|
|
|
+ color: '#FDB146',
|
|
|
+ values: [
|
|
|
+ 12.67, 12.68, 12.66, 12.68, 12.65, 12.67, 12.71, 12.67, 12.71, 12.68, 12.66, 12.67, 12.68, 12.68, 12.68, 12.67, 12.66, 12.67, 12.67, 12.67,
|
|
|
+ 12.69, 12.65, 12.71, 12.67, 12.69, 12.7, 12.66, 12.71, 12.66, 12.72, 12.67, 12.69, 12.7, 12.73, 12.69, 12.7, 12.76, 12.66, 12.64, 12.72, 12.58,
|
|
|
+ 12.71, 12.7, 12.66, 12.65, 12.66, 12.68, 12.64, 12.66, 12.67, 12.64, 12.68, 12.73, 12.67, 12.67, 12.67, 12.72, 12.73, 12.68, 12.66,
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '乙炔',
|
|
|
+ field: 'chval',
|
|
|
+ unit: 'ppm',
|
|
|
+ yAxisIndex: 0,
|
|
|
+ color: '#00FFA8',
|
|
|
+ values: [
|
|
|
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '乙烯',
|
|
|
+ field: 'ch2val',
|
|
|
+ unit: 'ppm',
|
|
|
+ yAxisIndex: 0,
|
|
|
+ color: '#AE19FF',
|
|
|
+ values: [
|
|
|
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '二氧化碳',
|
|
|
+ field: 'co2val',
|
|
|
+ unit: '%',
|
|
|
+ yAxisIndex: 1,
|
|
|
+ color: '#9C83D9',
|
|
|
+ values: [
|
|
|
+ 0.23, 0.23, 0.22, 0.22, 0.23, 0.23, 0.23, 0.23, 0.22, 0.23, 0.22, 0.23, 0.21, 0.22, 0.21, 0.23, 0.21, 0.2, 0.22, 0.21, 0.21, 0.21, 0.2, 0.21,
|
|
|
+ 0.21, 0.23, 0.23, 0.23, 0.21, 0.23, 0.22, 0.21, 0.22, 0.23, 0.21, 0.21, 0.22, 0.21, 0.23, 0.23, 0.24, 0.24, 0.23, 0.21, 0.23, 0.22, 0.21, 0.23,
|
|
|
+ 0.24, 0.2, 0.22, 0.2, 0.23, 0.21, 0.24, 0.2, 0.2, 0.23, 0.23, 0.21,
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '甲烷',
|
|
|
+ field: 'gasval',
|
|
|
+ unit: '%',
|
|
|
+ yAxisIndex: 1,
|
|
|
+ color: '#DA3914',
|
|
|
+ values: [
|
|
|
+ 0.39, 0.38, 0.38, 0.4, 0.39, 0.4, 0.39, 0.39, 0.4, 0.4, 0.4, 0.39, 0.38, 0.39, 0.39, 0.39, 0.39, 0.4, 0.39, 0.39, 0.39, 0.39, 0.38, 0.38, 0.39,
|
|
|
+ 0.39, 0.39, 0.39, 0.4, 0.39, 0.39, 0.39, 0.39, 0.39, 0.4, 0.39, 0.4, 0.39, 0.38, 0.39, 0.39, 0.38, 0.39, 0.39, 0.4, 0.4, 0.39, 0.38, 0.39, 0.38,
|
|
|
+ 0.39, 0.4, 0.39, 0.4, 0.4, 0.4, 0.38, 0.39, 0.38, 0.39,
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: '氧气',
|
|
|
+ field: 'o2val',
|
|
|
+ unit: '%',
|
|
|
+ yAxisIndex: 2,
|
|
|
+ color: '#03C2EC',
|
|
|
+ values: [
|
|
|
+ 19.67, 19.6, 19.7, 19.68, 19.72, 19.67, 19.69, 19.68, 19.66, 19.65, 19.68, 19.7, 19.67, 19.68, 19.64, 19.74, 19.66, 19.63, 19.68, 19.7, 19.67,
|
|
|
+ 19.67, 19.68, 19.66, 19.65, 19.6, 19.68, 19.67, 19.68, 19.67, 19.61, 19.68, 19.68, 19.68, 19.75, 19.68, 19.65, 19.63, 19.63, 19.72, 19.67,
|
|
|
+ 19.66, 19.7, 19.65, 19.68, 19.65, 19.67, 19.63, 19.68, 19.61, 19.65, 19.7, 19.67, 19.63, 19.65, 19.68, 19.67, 19.66, 19.68, 19.71,
|
|
|
+ ],
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+const bundleSeriesList = bundleSeriesSource.map(({ name, unit, yAxisIndex, color, values }) => ({
|
|
|
+ name,
|
|
|
+ unit,
|
|
|
+ yAxisIndex,
|
|
|
+ color,
|
|
|
+ data: values,
|
|
|
+}));
|
|
|
+
|
|
|
+function onBundleChartClick(params) {
|
|
|
+ console.log('点击束管曲线', params);
|
|
|
+}
|
|
|
+
|
|
|
+const switchableMonitorXAxis = Array.from({ length: 24 }, (_, index) => `${String(index).padStart(2, '0')}:00`);
|
|
|
+const switchableMonitorMetrics = [
|
|
|
+ {
|
|
|
+ key: 'temperature',
|
|
|
+ name: '温度',
|
|
|
+ unit: '℃',
|
|
|
+ precision: 1,
|
|
|
+ color: '#FDB146',
|
|
|
+ valueAt: (index) => 28 + Math.sin(index * 0.48) * 2.2 + Math.cos(index * 0.19) * 0.8,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'helium',
|
|
|
+ name: '氦气',
|
|
|
+ unit: '%',
|
|
|
+ precision: 3,
|
|
|
+ color: '#A88BFF',
|
|
|
+ valueAt: (index) => 0.035 + Math.sin(index * 0.36) * 0.008 + Math.cos(index * 0.17) * 0.004,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'carbonDioxide',
|
|
|
+ name: '二氧化碳',
|
|
|
+ unit: '%',
|
|
|
+ precision: 3,
|
|
|
+ color: '#9C83D9',
|
|
|
+ valueAt: (index) => 0.23 + Math.sin(index * 0.31) * 0.025 + Math.cos(index * 0.14) * 0.012,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'carbonMonoxide',
|
|
|
+ name: '一氧化碳',
|
|
|
+ unit: 'ppm',
|
|
|
+ precision: 2,
|
|
|
+ color: '#35D9E5',
|
|
|
+ valueAt: (index) => 12.5 + Math.sin(index * 0.42) * 1.8 + Math.cos(index * 0.13) * 0.7,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'methane',
|
|
|
+ name: '甲烷',
|
|
|
+ unit: '%',
|
|
|
+ precision: 3,
|
|
|
+ color: '#DA3914',
|
|
|
+ valueAt: (index) => 0.39 + Math.sin(index * 0.29) * 0.035 + Math.cos(index * 0.11) * 0.012,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ key: 'oxygen',
|
|
|
+ name: '氧气',
|
|
|
+ unit: '%',
|
|
|
+ precision: 2,
|
|
|
+ color: '#39D98A',
|
|
|
+ valueAt: (index) => 19.65 + Math.sin(index * 0.34) * 0.12 + Math.cos(index * 0.18) * 0.05,
|
|
|
+ },
|
|
|
+].map(({ valueAt, ...metric }) => ({
|
|
|
+ ...metric,
|
|
|
+ data: switchableMonitorXAxis.map((_, index) => Number(valueAt(index).toFixed(metric.precision))),
|
|
|
+}));
|
|
|
+
|
|
|
+const selectedMonitorMetric = ref('temperature');
|
|
|
+
|
|
|
+function onSwitchableMonitorClick(params) {
|
|
|
+ console.log('点击可切换监测曲线', params);
|
|
|
+}
|
|
|
+
|
|
|
+const dailyAnalysisCategories = ['12404工作面', '12404回风1巷', '12404回风4巷', '12404回风2巷', '22105回风顺槽'];
|
|
|
+
|
|
|
+const dailyAnalysisRecords = [
|
|
|
+ {
|
|
|
+ c2h2Max: 0.18,
|
|
|
+ c2h2Avg: 0.06,
|
|
|
+ c2h4Max: 0.42,
|
|
|
+ c2h4Avg: 0.16,
|
|
|
+ ch4Max: 0.42,
|
|
|
+ ch4Avg: 0.38,
|
|
|
+ co2Max: 0.26,
|
|
|
+ co2Avg: 0.23,
|
|
|
+ coMax: 12.75,
|
|
|
+ coAvg: 12.67,
|
|
|
+ o2Min: 19.58,
|
|
|
+ o2Avg: 19.67,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ c2h2Max: 0.32,
|
|
|
+ c2h2Avg: 0.12,
|
|
|
+ c2h4Max: 0.76,
|
|
|
+ c2h4Avg: 0.31,
|
|
|
+ ch4Max: 0.46,
|
|
|
+ ch4Avg: 0.4,
|
|
|
+ co2Max: 0.29,
|
|
|
+ co2Avg: 0.24,
|
|
|
+ coMax: 10.62,
|
|
|
+ coAvg: 10.48,
|
|
|
+ o2Min: 19.42,
|
|
|
+ o2Avg: 19.61,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ c2h2Max: 0.24,
|
|
|
+ c2h2Avg: 0.08,
|
|
|
+ c2h4Max: 0.58,
|
|
|
+ c2h4Avg: 0.2,
|
|
|
+ ch4Max: 0.4,
|
|
|
+ ch4Avg: 0.36,
|
|
|
+ co2Max: 0.25,
|
|
|
+ co2Avg: 0.21,
|
|
|
+ coMax: 19.72,
|
|
|
+ coAvg: 19.55,
|
|
|
+ o2Min: 19.56,
|
|
|
+ o2Avg: 19.68,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ c2h2Max: 0.14,
|
|
|
+ c2h2Avg: 0.05,
|
|
|
+ c2h4Max: 0.33,
|
|
|
+ c2h4Avg: 0.11,
|
|
|
+ ch4Max: 0.38,
|
|
|
+ ch4Avg: 0.34,
|
|
|
+ co2Max: 0.23,
|
|
|
+ co2Avg: 0.2,
|
|
|
+ coMax: 14.86,
|
|
|
+ coAvg: 14.61,
|
|
|
+ o2Min: 19.47,
|
|
|
+ o2Avg: 19.63,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ c2h2Max: 0.1,
|
|
|
+ c2h2Avg: 0.04,
|
|
|
+ c2h4Max: 0.28,
|
|
|
+ c2h4Avg: 0.09,
|
|
|
+ ch4Max: 0.36,
|
|
|
+ ch4Avg: 0.32,
|
|
|
+ co2Max: 0.31,
|
|
|
+ co2Avg: 0.25,
|
|
|
+ coMax: 3.84,
|
|
|
+ coAvg: 3.62,
|
|
|
+ o2Min: 19.65,
|
|
|
+ o2Avg: 19.71,
|
|
|
+ },
|
|
|
+];
|
|
|
+
|
|
|
+const dailyAnalysisSeriesConfig = [
|
|
|
+ { name: 'C₂H₂最大值', key: 'c2h2Max', unit: 'ppm', yAxisIndex: 1, color: '#5C7CFA' },
|
|
|
+ { name: 'C₂H₂平均值', key: 'c2h2Avg', unit: 'ppm', yAxisIndex: 1, color: '#B9DE2C' },
|
|
|
+ { name: 'C₂H₄最大值', key: 'c2h4Max', unit: 'ppm', yAxisIndex: 1, color: '#8583B4' },
|
|
|
+ { name: 'C₂H₄平均值', key: 'c2h4Avg', unit: 'ppm', yAxisIndex: 1, color: '#FF984F' },
|
|
|
+ { name: 'CH₄最大值', key: 'ch4Max', unit: '%', yAxisIndex: 0, color: '#0DA9DA' },
|
|
|
+ { name: 'CH₄平均值', key: 'ch4Avg', unit: '%', yAxisIndex: 0, color: '#FFCA28' },
|
|
|
+ { name: 'CO₂最大值', key: 'co2Max', unit: '%', yAxisIndex: 0, color: '#F65D91' },
|
|
|
+ { name: 'CO₂平均值', key: 'co2Avg', unit: '%', yAxisIndex: 0, color: '#8060AA' },
|
|
|
+ { name: 'CO最大值', key: 'coMax', unit: 'ppm', yAxisIndex: 1, color: '#38B99B' },
|
|
|
+ { name: 'CO平均值', key: 'coAvg', unit: 'ppm', yAxisIndex: 1, color: '#5578E7' },
|
|
|
+ { name: 'O₂最小值', key: 'o2Min', unit: '%', yAxisIndex: 0, color: '#B9DE2C' },
|
|
|
+ { name: 'O₂平均值', key: 'o2Avg', unit: '%', yAxisIndex: 0, color: '#8583B4' },
|
|
|
+];
|
|
|
+
|
|
|
+const dailyAnalysisSeries = dailyAnalysisSeriesConfig.map(({ name, key, unit, yAxisIndex, color }) => ({
|
|
|
+ name,
|
|
|
+ unit,
|
|
|
+ yAxisIndex,
|
|
|
+ color,
|
|
|
+ data: dailyAnalysisRecords.map((record) => record[key]),
|
|
|
+}));
|
|
|
+
|
|
|
+const dailyAnalysisAxes = [
|
|
|
+ { name: '%', min: 0, max: 25, interval: 5, position: 'left' },
|
|
|
+ { name: 'ppm', min: 0, max: 25, interval: 5, position: 'right' },
|
|
|
+];
|
|
|
+
|
|
|
+function onDailyAnalysisClick(params) {
|
|
|
+ console.log('点击束管日报数据', params);
|
|
|
+}
|
|
|
</script>
|
|
|
+<style scoped>
|
|
|
+.test-chart-page {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ gap: 16px;
|
|
|
+ height: 96%;
|
|
|
+ overflow-y: auto;
|
|
|
+}
|
|
|
+</style>
|