|
@@ -35,7 +35,7 @@
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</div>
|
|
|
- <a-table :columns="dataColumns" :data-source="filteredResultByWorkplace" size="small" :scroll="{ y: 260 }" class="tableW" />
|
|
|
+ <a-table :columns="DataComputedColumns" :data-source="filteredResultByWorkplace" size="small" :scroll="{ y: 260 }" class="tableW" />
|
|
|
</a-tab-pane>
|
|
|
<a-tab-pane key="overall" class="tab2" tab="当日粉尘情况分析">
|
|
|
<a-table :columns="AllDataComputedColumns" :data-source="AllMaxValues" size="small" :scroll="{ y: 300 }" class="tableW" />
|
|
@@ -49,7 +49,17 @@
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import { ref, onMounted, reactive, computed, watch, nextTick } from 'vue';
|
|
|
-import { columns, Dltcolumns, Swcolumns, dataColumns, AllDataColumns, AllDataDltColumns, AllDataSwColumns } from './dust-table.data';
|
|
|
+import {
|
|
|
+ columns,
|
|
|
+ Dltcolumns,
|
|
|
+ Swcolumns,
|
|
|
+ dataColumns,
|
|
|
+ dataDltColumns,
|
|
|
+ dataSwColumns,
|
|
|
+ AllDataColumns,
|
|
|
+ AllDataDltColumns,
|
|
|
+ AllDataSwColumns,
|
|
|
+} from './dust-table.data';
|
|
|
import { getDustInfoList, getAllFileList } from './dsut-table.api';
|
|
|
import customHeader from '/@/components/vent/customHeader.vue';
|
|
|
import { result } from 'lodash-es';
|
|
@@ -59,6 +69,7 @@ let tableData = ref<any[]>([]);
|
|
|
let selectList = ref<any[]>([]);
|
|
|
let resultByWorkplace = ref<any[]>([]);
|
|
|
let AllMaxValues = ref<any[]>([]);
|
|
|
+let resultValues = ref<any[]>([]);
|
|
|
let filteredResultByWorkplace = ref<any[]>([]); //根据工作场所查询的数据
|
|
|
let workplaceList = ref<any[]>([]); //根据工作场所查询的数据
|
|
|
let activeTab = ref<string>('workplace');
|
|
@@ -78,7 +89,7 @@ const computedColumns = computed(() => {
|
|
|
case 'sdmtjtbetmk':
|
|
|
return columns; // 布尔台对应的列配置
|
|
|
case 'sdmtjtdltmk':
|
|
|
- return Dltcolumns; // 布尔台对应的列配置
|
|
|
+ return Dltcolumns; // 大柳塔对应的列配置
|
|
|
case 'sdmtjtswmk':
|
|
|
return Swcolumns; // 上湾对应的列配置
|
|
|
default:
|
|
@@ -90,13 +101,25 @@ const AllDataComputedColumns = computed(() => {
|
|
|
case 'sdmtjtbetmk':
|
|
|
return AllDataColumns; // 布尔台对应的列配置
|
|
|
case 'sdmtjtdltmk':
|
|
|
- return AllDataDltColumns; // 布尔台对应的列配置
|
|
|
+ return AllDataDltColumns; // 大柳塔对应的列配置
|
|
|
case 'sdmtjtswmk':
|
|
|
return AllDataSwColumns; // 上湾对应的列配置
|
|
|
default:
|
|
|
return AllDataColumns; // 默认情况下返回的列配置
|
|
|
}
|
|
|
});
|
|
|
+const DataComputedColumns = computed(() => {
|
|
|
+ switch (sysOrgCode) {
|
|
|
+ case 'sdmtjtbetmk':
|
|
|
+ return dataColumns; // 布尔台对应的列配置
|
|
|
+ case 'sdmtjtdltmk':
|
|
|
+ return dataDltColumns; // 大柳塔对应的列配置
|
|
|
+ case 'sdmtjtswmk':
|
|
|
+ return dataSwColumns; // 上湾对应的列配置
|
|
|
+ default:
|
|
|
+ return dataColumns; // 默认情况下返回的列配置
|
|
|
+ }
|
|
|
+});
|
|
|
//获取粉尘监测结果数据
|
|
|
async function getTableList(params: any) {
|
|
|
let res = await getDustInfoList({ type: 'smoke', ...params });
|
|
@@ -137,7 +160,18 @@ function processTableData(data: any) {
|
|
|
{ key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
|
|
|
{ key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
|
|
|
];
|
|
|
-
|
|
|
+ const DltMaxValues = [
|
|
|
+ { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
|
|
|
+ { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
|
|
|
+ { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
|
|
|
+ { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
|
|
|
+ { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
|
|
|
+ { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
|
|
|
+ ];
|
|
|
+ const SwMaxValues = [
|
|
|
+ { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
|
|
|
+ { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: workplace },
|
|
|
+ ];
|
|
|
items.forEach((item: any) => {
|
|
|
maxValues.forEach((maxValue) => {
|
|
|
if (item[maxValue.key] > maxValue.value) {
|
|
@@ -147,11 +181,36 @@ function processTableData(data: any) {
|
|
|
maxValue.fczl = item.fczl;
|
|
|
}
|
|
|
});
|
|
|
+ DltMaxValues.forEach((maxValue) => {
|
|
|
+ if (item[maxValue.key] > maxValue.value) {
|
|
|
+ maxValue.value = item[maxValue.key];
|
|
|
+ maxValue.gz = item.gz;
|
|
|
+ maxValue.jcdd = item.jcdd;
|
|
|
+ maxValue.fczl = item.fczl;
|
|
|
+ maxValue.gzcs = item.gzcs;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ SwMaxValues.forEach((maxValue) => {
|
|
|
+ if (item[maxValue.key] > maxValue.value) {
|
|
|
+ maxValue.value = item[maxValue.key];
|
|
|
+ maxValue.gz = item.gz;
|
|
|
+ maxValue.jcdd = item.jcdd;
|
|
|
+ maxValue.fczl = item.fczl;
|
|
|
+ maxValue.gzcs = item.gzcs;
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
-
|
|
|
- return maxValues;
|
|
|
+ switch (sysOrgCode) {
|
|
|
+ case 'sdmtjtbetmk':
|
|
|
+ return maxValues; // 布尔台对应的列配置
|
|
|
+ case 'sdmtjtdltmk':
|
|
|
+ return DltMaxValues; // 大柳塔对应的列配置
|
|
|
+ case 'sdmtjtswmk':
|
|
|
+ return SwMaxValues; // 上湾对应的列配置
|
|
|
+ default:
|
|
|
+ return maxValues; // 默认情况下返回的列配置
|
|
|
+ }
|
|
|
});
|
|
|
-
|
|
|
resultByWorkplace.value = result;
|
|
|
workplaceList.value = Array.from(new Set(resultByWorkplace.value.map((item) => item.gzcs)));
|
|
|
if (workplaceList.value.length > 0) {
|
|
@@ -171,6 +230,18 @@ function processTableData(data: any) {
|
|
|
{ key: 'hcrxd_ds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
|
|
|
{ key: 'hcrxd_jqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
|
|
|
];
|
|
|
+ const overallDltMaxValues = [
|
|
|
+ { key: 'sc_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
|
|
|
+ { key: 'jx_zcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
|
|
|
+ { key: 'sc_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
|
|
|
+ { key: 'jx_hcds', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
|
|
|
+ { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
|
|
|
+ { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
|
|
|
+ ];
|
|
|
+ const overallSwMaxValues = [
|
|
|
+ { key: 'zcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
|
|
|
+ { key: 'hcjqpj', value: -Infinity, gz: '', jcdd: '', fczl: '', gzcs: '' },
|
|
|
+ ];
|
|
|
data.forEach((item: any) => {
|
|
|
overallMaxValues.forEach((maxValue) => {
|
|
|
if (item[maxValue.key] > maxValue.value) {
|
|
@@ -181,9 +252,37 @@ function processTableData(data: any) {
|
|
|
maxValue.gzcs = item.gzcs;
|
|
|
}
|
|
|
});
|
|
|
+ overallDltMaxValues.forEach((maxValue) => {
|
|
|
+ if (item[maxValue.key] > maxValue.value) {
|
|
|
+ maxValue.value = item[maxValue.key];
|
|
|
+ maxValue.gz = item.gz;
|
|
|
+ maxValue.jcdd = item.jcdd;
|
|
|
+ maxValue.fczl = item.fczl;
|
|
|
+ maxValue.gzcs = item.gzcs;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ overallSwMaxValues.forEach((maxValue) => {
|
|
|
+ if (item[maxValue.key] > maxValue.value) {
|
|
|
+ maxValue.value = item[maxValue.key];
|
|
|
+ maxValue.gz = item.gz;
|
|
|
+ maxValue.jcdd = item.jcdd;
|
|
|
+ maxValue.fczl = item.fczl;
|
|
|
+ maxValue.gzcs = item.gzcs;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+ AllMaxValues = computed(() => {
|
|
|
+ switch (sysOrgCode) {
|
|
|
+ case 'sdmtjtbetmk':
|
|
|
+ return overallMaxValues; // 布尔台对应的列配置
|
|
|
+ case 'sdmtjtdltmk':
|
|
|
+ return overallDltMaxValues; // 大柳塔对应的列配置
|
|
|
+ case 'sdmtjtswmk':
|
|
|
+ return overallSwMaxValues; // 上湾对应的列配置
|
|
|
+ default:
|
|
|
+ return overallMaxValues; // 默认情况下返回的列配置
|
|
|
+ }
|
|
|
});
|
|
|
-
|
|
|
- AllMaxValues.value = overallMaxValues;
|
|
|
}
|
|
|
//获取所有文件列表
|
|
|
async function getAllFile() {
|