gis,酸雨
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
:showUploadList="false"
|
||||
accept=".xls,.xlsx,.csv"
|
||||
>
|
||||
<a-button>市级导入</a-button>
|
||||
<a-button>数据导入</a-button>
|
||||
</a-upload>
|
||||
<!-- <a-upload
|
||||
:before-upload="importFileArea"
|
||||
@@ -20,8 +20,8 @@
|
||||
</a-space>
|
||||
</template>
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane tab="噪声信息" key="noise">
|
||||
<noise-bill ref="noise"></noise-bill>
|
||||
<a-tab-pane tab="降水信息" key="rain">
|
||||
<rain-bill ref="rain"></rain-bill>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</a-card>
|
||||
@@ -32,16 +32,16 @@
|
||||
import XLSX from "xlsx";
|
||||
import utils from "./utils";
|
||||
import { Modal } from "ant-design-vue";
|
||||
import NoiseBill from "./noise-bill.vue";
|
||||
import { saveAcidBill } from "@/api/ecology/acid";
|
||||
import RainBill from "./rain-bill.vue";
|
||||
import { saveAcidRainBill } from "@/api/ecology/acid";
|
||||
export default {
|
||||
name: "ZoneCollectIndex",
|
||||
name: "RainCollectIndex",
|
||||
components: {
|
||||
NoiseBill,
|
||||
RainBill,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
activeKey: "noise",
|
||||
activeKey: "rain",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -62,32 +62,31 @@ export default {
|
||||
let aoa = XLSX.utils.sheet_to_json(workbook.Sheets[sheetNames[0]], {
|
||||
header: 1,
|
||||
});
|
||||
let aoa2 = XLSX.utils.sheet_to_json(workbook.Sheets[sheetNames[1]], {
|
||||
header: 1,
|
||||
});
|
||||
|
||||
const reportDate = aoa[1][0].replace(/[^\d]+/g, "-");
|
||||
const reportDate2 = aoa2[1][0].replace(/[^\d]+/g, "-");
|
||||
// let aoa2 = XLSX.utils.sheet_to_json(workbook.Sheets[sheetNames[1]], {
|
||||
// header: 1,
|
||||
// });
|
||||
|
||||
const acidList = aoa.filter(
|
||||
(item) => {
|
||||
return item.length >= 26 && typeof item[0] == "number"}
|
||||
);
|
||||
const acidList2 = aoa2.filter(
|
||||
(item) => item.length >= 26 && typeof item[0] == "number"
|
||||
);
|
||||
|
||||
// const reportDate = aoa[2][0].replace(/[^\d]+/g, "-");
|
||||
// const reportDate2 = aoa2[1][0].replace(/[^\d]+/g, "-");
|
||||
|
||||
const acidList = aoa.filter((item) => {
|
||||
return item.length >= 23 && typeof item[0] == "number";
|
||||
});
|
||||
// const acidList2 = aoa2.filter(
|
||||
// (item) => item.length >= 26 && typeof item[0] == "number"
|
||||
// );
|
||||
|
||||
// 解析成对象数组
|
||||
const billName = aoa[0][0];
|
||||
const billName = aoa[0][0] + aoa[1][0];
|
||||
const billData = utils.toObjData(acidList);
|
||||
const billName2 = aoa2[0][0];
|
||||
const billData2 = utils.toObjData(acidList2);
|
||||
// const billName2 = aoa2[0][0];
|
||||
// const billData2 = utils.toObjData(acidList2);
|
||||
if (
|
||||
(!billData || billData.length == 0) &&
|
||||
(!billData2 || billData2.length == 0)
|
||||
!billData ||
|
||||
billData.length == 0
|
||||
// (!billData2 || billData2.length == 0)
|
||||
) {
|
||||
hide()
|
||||
hide();
|
||||
Modal.error({
|
||||
title: "导入失败",
|
||||
content: "找不到数据",
|
||||
@@ -98,35 +97,42 @@ export default {
|
||||
const tasks = [];
|
||||
if (billData.length > 0) {
|
||||
tasks.push(
|
||||
saveAcidBill({
|
||||
reportTime: new Date(reportDate).getTime(),
|
||||
saveAcidRainBill({
|
||||
// reportTime: new Date(reportDate).getTime(),
|
||||
billName: billName,
|
||||
regionLevel: "市级",
|
||||
acidList: billData,
|
||||
acidRainList: billData,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
if (billData2.length > 0) {
|
||||
tasks.push(
|
||||
saveAcidBill({
|
||||
reportTime: new Date(reportDate2).getTime(),
|
||||
billName: billName2,
|
||||
regionLevel: "市级",
|
||||
acidList: billData2,
|
||||
})
|
||||
);
|
||||
}
|
||||
// if (billData2.length > 0) {
|
||||
// tasks.push(
|
||||
// saveAcidRainBill({
|
||||
// reportTime: new Date(reportDate2).getTime(),
|
||||
// billName: billName2,
|
||||
// regionLevel: "市级",
|
||||
// acidList: billData2,
|
||||
// })
|
||||
// );
|
||||
// }
|
||||
|
||||
// 上传到服务器
|
||||
|
||||
Promise.all(tasks)
|
||||
.then(() => {
|
||||
Modal.success({
|
||||
title: "导入成功",
|
||||
content: `成功导入${billData.length + billData2.length}条数据`,
|
||||
});
|
||||
this.$refs.noise && this.$refs.noise.reload();
|
||||
.then((res) => {
|
||||
if (res[0].data.code == 0) {
|
||||
Modal.success({
|
||||
title: "导入成功",
|
||||
content: `成功导入${billData.length}条数据`,
|
||||
});
|
||||
this.$refs.rain && this.$refs.rain.reload();
|
||||
} else {
|
||||
Modal.error({
|
||||
title: "导入失败",
|
||||
content: "数据上传出错",
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
Modal.error({
|
||||
@@ -169,12 +175,9 @@ export default {
|
||||
});
|
||||
|
||||
const reportDate = aoa[1][0].replace(/[^\d]+/g, "-");
|
||||
const acidList = aoa.filter(
|
||||
(item) => {
|
||||
|
||||
return item.length >= 35 && item[0] != "行政区划代码"
|
||||
}
|
||||
);
|
||||
const acidList = aoa.filter((item) => {
|
||||
return item.length >= 35 && item[0] != "行政区划代码";
|
||||
});
|
||||
|
||||
// 解析成对象数组
|
||||
const billName = aoa[0][0];
|
||||
@@ -192,7 +195,7 @@ export default {
|
||||
|
||||
if (billData.length > 0) {
|
||||
// 上传到服务器
|
||||
saveAcidBill({
|
||||
saveAcidRainBill({
|
||||
reportTime: new Date(reportDate).getTime(),
|
||||
billName: billName,
|
||||
regionLevel: "县级",
|
||||
@@ -202,11 +205,9 @@ export default {
|
||||
if (res.data.code == 0) {
|
||||
Modal.success({
|
||||
title: "导入成功",
|
||||
content: `成功导入${
|
||||
billData.length
|
||||
}条数据`,
|
||||
content: `成功导入${billData.length}条数据`,
|
||||
});
|
||||
this.$refs.noise && this.$refs.noise.reload();
|
||||
this.$refs.rain && this.$refs.rain.reload();
|
||||
} else {
|
||||
Modal.error({
|
||||
title: "导入失败",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<!-- 表格 -->
|
||||
<ele-pro-table v-model:selection="selectionList" ref="table" row-key="zoneNoiseBillId" :datasource="url"
|
||||
<ele-pro-table v-model:selection="selectionList" ref="table" row-key="acidRainBillId" :datasource="url"
|
||||
:columns="columns" :where="where" :scroll="{x: 'max-content'}">
|
||||
<template #toolbar>
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
</template>
|
||||
<template #billName="{ text, record }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[record.zoneNoiseBillId]" class="editable-cell-input-wrapper">
|
||||
<a-input v-model:value="editableData[record.zoneNoiseBillId].billName" @pressEnter="save(record)" />
|
||||
<div v-if="editableData[record.acidRainBillId]" class="editable-cell-input-wrapper">
|
||||
<a-input v-model:value="editableData[record.acidRainBillId].billName" @pressEnter="save(record)" />
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(record)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
@@ -56,9 +56,9 @@
|
||||
</template>
|
||||
<template #reportTime="{ text, record }">
|
||||
<div class="editable-cell">
|
||||
<div v-if="editableData[record.zoneNoiseBillId]" class="editable-cell-input-wrapper">
|
||||
<a-date-picker v-model:value="editableData[record.zoneNoiseBillId].reportTime"></a-date-picker>
|
||||
<!-- <a-input v-model:value="editableData[record.zoneNoiseBillId].reportTime" @pressEnter="save(record)" /> -->
|
||||
<div v-if="editableData[record.acidRainBillId]" class="editable-cell-input-wrapper">
|
||||
<a-date-picker v-model:value="editableData[record.acidRainBillId].reportTime"></a-date-picker>
|
||||
<!-- <a-input v-model:value="editableData[record.acidRainBillId].reportTime" @pressEnter="save(record)" /> -->
|
||||
<check-outlined class="editable-cell-icon-check" @click="save(record)" />
|
||||
</div>
|
||||
<div v-else class="editable-cell-text-wrapper">
|
||||
@@ -106,15 +106,15 @@
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import {
|
||||
pageBillUrl,
|
||||
// saveZoneNoiseBill,
|
||||
removeZoneNoiseBill,
|
||||
removeBatchZoneNoiseBill,
|
||||
updateZoneNoiseBill,
|
||||
verifyZoneNoiseBill
|
||||
} from "@/api/ecology/zone-sound";
|
||||
// saveRainBill,
|
||||
removeAcidRainBill,
|
||||
removeBatchAcidRainBill,
|
||||
updateAcidRainBill,
|
||||
verifyAcidRainBill
|
||||
} from "@/api/ecology/acid";
|
||||
import moment from "moment";
|
||||
export default {
|
||||
name: 'ZoneCollectNoiseBill',
|
||||
name: 'RainCollectNoiseBill',
|
||||
components: {
|
||||
CheckOutlined,
|
||||
EditOutlined
|
||||
@@ -144,11 +144,11 @@
|
||||
},
|
||||
|
||||
},
|
||||
{
|
||||
title: '区域等级',
|
||||
dataIndex: 'regionLevel',
|
||||
sorter: true,
|
||||
},
|
||||
// {
|
||||
// title: '区域等级',
|
||||
// dataIndex: 'regionLevel',
|
||||
// sorter: true,
|
||||
// },
|
||||
{
|
||||
title: '条目',
|
||||
dataIndex: 'recordSize',
|
||||
@@ -160,17 +160,17 @@
|
||||
// dataIndex: 'title',
|
||||
// sorter: true
|
||||
// },
|
||||
{
|
||||
title: '上报时间',
|
||||
dataIndex: 'reportTime',
|
||||
sorter: true,
|
||||
slots: {
|
||||
customRender: 'reportTime',
|
||||
},
|
||||
// customRender: ({
|
||||
// text
|
||||
// }) => this.$util.toDateString(text)
|
||||
},
|
||||
// {
|
||||
// title: '上报时间',
|
||||
// dataIndex: 'reportTime',
|
||||
// sorter: true,
|
||||
// slots: {
|
||||
// customRender: 'reportTime',
|
||||
// },
|
||||
// // customRender: ({
|
||||
// // text
|
||||
// // }) => this.$util.toDateString(text)
|
||||
// },
|
||||
{
|
||||
title: '导入时间',
|
||||
dataIndex: 'createTime',
|
||||
@@ -190,7 +190,7 @@
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
dataIndex: 'username',
|
||||
dataIndex: 'userName',
|
||||
sorter: true,
|
||||
|
||||
},
|
||||
@@ -245,18 +245,18 @@
|
||||
},
|
||||
detail(record) {
|
||||
this.$router.replace({
|
||||
path: "/sound/zone/collect/noise/" + record.zoneNoiseBillId
|
||||
path: "/atmosphere/acid-rain/collect/rain/" + record.acidRainBillId
|
||||
})
|
||||
},
|
||||
edit(record) {
|
||||
this.editableData[record.zoneNoiseBillId] = _.cloneDeep(record);
|
||||
this.editableData[record.zoneNoiseBillId].reportTime = moment(this.editableData[record.zoneNoiseBillId]
|
||||
this.editableData[record.acidRainBillId] = _.cloneDeep(record);
|
||||
this.editableData[record.acidRainBillId].reportTime = moment(this.editableData[record.acidRainBillId]
|
||||
.reportTime)
|
||||
},
|
||||
verify(record,checked) {
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
verifyZoneNoiseBill({
|
||||
zoneNoiseBillId: record.zoneNoiseBillId,
|
||||
verifyAcidRainBill({
|
||||
acidRainBillId: record.acidRainBillId,
|
||||
checked
|
||||
}).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
@@ -280,19 +280,19 @@
|
||||
save(record) {
|
||||
|
||||
let {
|
||||
zoneNoiseBillId,
|
||||
acidRainBillId,
|
||||
billName,
|
||||
reportTime
|
||||
} = this.editableData[record.zoneNoiseBillId];
|
||||
if (!zoneNoiseBillId || !reportTime) {
|
||||
} = this.editableData[record.acidRainBillId];
|
||||
if (!acidRainBillId || !reportTime) {
|
||||
this.$message.error('请填写完整信息再提交')
|
||||
return
|
||||
}
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
reportTime = reportTime.format("x")
|
||||
reportTime = Number(reportTime)
|
||||
updateZoneNoiseBill({
|
||||
zoneNoiseBillId,
|
||||
updateAcidRainBill({
|
||||
acidRainBillId,
|
||||
billName,
|
||||
reportTime
|
||||
}).then(res => {
|
||||
@@ -307,7 +307,7 @@
|
||||
console.log(e);
|
||||
this.$message.error(e.message);
|
||||
}).finally(() => {
|
||||
delete this.editableData[record.zoneNoiseBillId]
|
||||
delete this.editableData[record.acidRainBillId]
|
||||
hide()
|
||||
})
|
||||
|
||||
@@ -315,7 +315,7 @@
|
||||
/* 删除单个 */
|
||||
remove(row) {
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
removeZoneNoiseBill(row.zoneNoiseBillId).then(res => {
|
||||
removeAcidRainBill(row.acidRainBillId).then(res => {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success(res.data.msg);
|
||||
this.reload();
|
||||
@@ -327,9 +327,9 @@
|
||||
}).finally(() => hide());
|
||||
},
|
||||
removeBatch() {
|
||||
const ids = this.selectionList.map(item => item.zoneNoiseBillId);
|
||||
const ids = this.selectionList.map(item => item.acidRainBillId);
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
removeBatchZoneNoiseBill(ids).then(res => {
|
||||
removeBatchAcidRainBill(ids).then(res => {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success(res.data.msg);
|
||||
this.reload();
|
||||
@@ -42,7 +42,7 @@
|
||||
</a-form>
|
||||
<a-modal
|
||||
v-model:visible="showEdit"
|
||||
:title="form.zoneNoiseId !== undefined ? '修改记录' : '添加记录'"
|
||||
:title="form.acidRainId !== undefined ? '修改记录' : '添加记录'"
|
||||
:confirm-loading="loading"
|
||||
:width="1000"
|
||||
:body-style="{ paddingBottom: '8px' }"
|
||||
@@ -81,176 +81,6 @@
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="所属城区" name="area">
|
||||
<a-input
|
||||
v-model:value="form.area"
|
||||
placeholder="请输入城区"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="网格长" name="zoneLength">
|
||||
<a-input
|
||||
v-model:value="form.gridLength"
|
||||
placeholder="请输入网格长(米)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="网格宽" name="zoneWidth">
|
||||
<a-input
|
||||
v-model:value="form.gridWidth"
|
||||
placeholder="请输入网格宽(米)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="LeqdB(A)" name="indexLeq">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexLeq"
|
||||
placeholder="请输入LeqdB(A)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="SDdB(A)" name="indexSd">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexSd"
|
||||
placeholder="请输入大SDdB(A)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="L10dB(A)" name="indexL10">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexL10"
|
||||
placeholder="请输入L10dB(A)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="L50dB(A)" name="indexL50">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexL50"
|
||||
placeholder="请输入L50dB(A)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="L90dB(A)" name="indexL90">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexL90"
|
||||
placeholder="请输入L90dB(A)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="LmindB(A)" name="indexLmin">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexLmin"
|
||||
placeholder="请输入LmindB(A)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="LmaxdB(A)" name="indexLmax">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexLmax"
|
||||
placeholder="请输入LmaxdB(A)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="监测站名" name="station">
|
||||
<a-input
|
||||
v-model:value="form.station"
|
||||
placeholder="请输入监测站名"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="监测仪器型号" name="monitorInstrumentModel">
|
||||
<a-input
|
||||
v-model:value="form.monitorInstrumentModel"
|
||||
placeholder="请输入监测仪器型号"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="监测仪器编号" name="monitorInstrumentCode">
|
||||
<a-input
|
||||
v-model:value="form.monitorInstrumentCode"
|
||||
placeholder="请输入监测仪器编号"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="监测前校准值" name="beforeMonitorValue">
|
||||
<a-input
|
||||
v-model:value="form.beforeMonitorValue"
|
||||
placeholder="请输入监测前校准值"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="监测后校准值" name="afterMonitorValue">
|
||||
<a-input
|
||||
v-model:value="form.afterMonitorValue"
|
||||
placeholder="请输入监测后校准值"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="声校准器测量声压值" name="soundPressureValue">
|
||||
<a-input
|
||||
v-model:value="form.soundPressureValue"
|
||||
placeholder="请输入声校准器测量声压值"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="声校准仪器型号" name="soundInstrumentModel">
|
||||
<a-input
|
||||
v-model:value="form.soundInstrumentModel"
|
||||
placeholder="请输入声校准仪器型号"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="声校准仪器编号" name="soundInstrumentCode">
|
||||
<a-input
|
||||
v-model:value="form.soundInstrumentCode"
|
||||
placeholder="请输入声校准仪器编号"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="备注" name="remark">
|
||||
<a-input
|
||||
@@ -267,7 +97,7 @@
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="zoneNoiseId"
|
||||
row-key="acidRainId"
|
||||
:datasource="url"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
@@ -294,13 +124,8 @@
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<template #Leq="{ text,record }">
|
||||
<a-tag v-if="(record.timeSlot == '昼' && text <= 68) || (record.timeSlot == '夜' && text <= 58)" color="green">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 68 && text <=70) || (record.timeSlot == '夜' && text > 58 && text <=60)" color="blue">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 70 && text <=72) || (record.timeSlot == '夜' && text > 60 && text <=62)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 62 && text <=74) || (record.timeSlot == '夜' && text > 62 && text <=64)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 74 ) || (record.timeSlot == '夜' && text > 64)" color="red">{{text}}</a-tag>
|
||||
<template v-else color="#FFF">{{text}}</template>
|
||||
<template #Address="{ record }">
|
||||
{{record.area?record.area:record.county?record.county:record.city}}
|
||||
</template>
|
||||
|
||||
<template #action="{ record }">
|
||||
@@ -333,14 +158,14 @@
|
||||
<script>
|
||||
import _ from "lodash";
|
||||
import {
|
||||
pageZoneNoiseUrl,
|
||||
saveZoneNoise,
|
||||
removeZoneNoise,
|
||||
removeBatchZoneNoise,
|
||||
updateZoneNoise,
|
||||
getZoneNoiseBill,
|
||||
pageAcidRainUrl,
|
||||
saveAcidRain,
|
||||
removeAcidRain,
|
||||
removeBatchAcidRain,
|
||||
updateAcidRain,
|
||||
getAcidRainBill,
|
||||
getColumnOptions,
|
||||
} from "@/api/ecology/zone-sound";
|
||||
} from "@/api/ecology/acid";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import moment from "moment";
|
||||
// import utils from "./utils";
|
||||
@@ -354,147 +179,112 @@ export default {
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
url: pageZoneNoiseUrl,
|
||||
url: pageAcidRainUrl,
|
||||
selection: [],
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
title: "监测日期",
|
||||
dataIndex: "monitorTime",
|
||||
title: "采样开始时间",
|
||||
dataIndex: "monitorStartTime",
|
||||
sorter: true,
|
||||
customRender: ({text})=> moment(text,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD HH:mm")
|
||||
},
|
||||
{
|
||||
title: "采样结束时间",
|
||||
dataIndex: "monitorEndTime",
|
||||
sorter: true,
|
||||
customRender: ({text})=> moment(text,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD HH:mm")
|
||||
},
|
||||
{
|
||||
title: "行政代码",
|
||||
dataIndex: "regionCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "测点名称",
|
||||
title: "市(县,区)",
|
||||
slots: {customRender: "Address"},
|
||||
},
|
||||
{
|
||||
title: "采样点",
|
||||
dataIndex: "place",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "所属城区",
|
||||
dataIndex: "area",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格长(米)",
|
||||
dataIndex: "gridLength",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格宽(米)",
|
||||
dataIndex: "gridWidth",
|
||||
{
|
||||
title: "点位类型",
|
||||
dataIndex: "placeType",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格点号",
|
||||
dataIndex: "gridNo",
|
||||
title: "降水类型",
|
||||
dataIndex: "precipitationType",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "主要声源",
|
||||
dataIndex: "source",
|
||||
{
|
||||
title: "降水量",
|
||||
dataIndex: "precipitation",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "时段",
|
||||
dataIndex: "timeSlot",
|
||||
{
|
||||
title: "pH",
|
||||
dataIndex: "ph",
|
||||
sorter: true,
|
||||
},
|
||||
// {
|
||||
// title: '月',
|
||||
// dataIndex: 'monitorMonth',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '日',
|
||||
// dataIndex: 'monitorDay',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '时',
|
||||
// dataIndex: 'monitorHour',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '分',
|
||||
// dataIndex: 'monitorMinute',
|
||||
// sorter: true
|
||||
// },
|
||||
{
|
||||
title: "LeqdB(A)",
|
||||
dataIndex: "indexLeq",
|
||||
slots: {customRender: "Leq"},
|
||||
{
|
||||
title: "电导率",
|
||||
dataIndex: "conductivity",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "SDdB(A)",
|
||||
dataIndex: "indexSd",
|
||||
{
|
||||
title: "SO42",
|
||||
dataIndex: "so42",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L10dB(A)",
|
||||
dataIndex: "indexL10",
|
||||
{
|
||||
title: "NO3",
|
||||
dataIndex: "no3",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L50dB(A)",
|
||||
dataIndex: "indexL50",
|
||||
{
|
||||
title: "F",
|
||||
dataIndex: "f",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L90dB(A)",
|
||||
dataIndex: "indexL90",
|
||||
{
|
||||
title: "CL",
|
||||
dataIndex: "cl",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "LmindB(A)",
|
||||
dataIndex: "indexLmin",
|
||||
{
|
||||
title: "NH4",
|
||||
dataIndex: "nh4",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "LmaxdB(A)",
|
||||
dataIndex: "indexLmax",
|
||||
{
|
||||
title: "Ca2",
|
||||
dataIndex: "ca2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测站名",
|
||||
dataIndex: "station",
|
||||
{
|
||||
title: "Mg2",
|
||||
dataIndex: "mg2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器型号",
|
||||
dataIndex: "monitorInstrumentModel",
|
||||
{
|
||||
title: "Na",
|
||||
dataIndex: "na",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器编号",
|
||||
dataIndex: "monitorInstrumentCode",
|
||||
{
|
||||
title: "K",
|
||||
dataIndex: "k",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测前校准值",
|
||||
dataIndex: "beforeMonitorValue",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准器测量声压值",
|
||||
dataIndex: "soundPressureValue",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器型号",
|
||||
dataIndex: "soundInstrumentModel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器编号",
|
||||
dataIndex: "soundInstrumentCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "区域等级",
|
||||
dataIndex: "regionLevel",
|
||||
{
|
||||
title: "系统编码",
|
||||
dataIndex: "systemCode",
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "备注",
|
||||
dataIndex: "remark",
|
||||
@@ -517,11 +307,11 @@ export default {
|
||||
},
|
||||
],
|
||||
// 表格搜索条件
|
||||
zoneNoiseBillId: billId,
|
||||
acidRainBillId: billId,
|
||||
palceOptions: [],
|
||||
areaOptions: [],
|
||||
where: {
|
||||
zoneNoiseBillId: billId,
|
||||
acidRainBillId: billId,
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
@@ -535,7 +325,7 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
const { billId } = this.$route.params;
|
||||
getZoneNoiseBill(billId).then((res) => {
|
||||
getAcidRainBill(billId).then((res) => {
|
||||
this.bill = res.data.data;
|
||||
if (res.data.data.checked == 1) {
|
||||
this.columns.splice(this.columns.length - 1, 1);
|
||||
@@ -574,7 +364,7 @@ export default {
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
zoneNoiseBillId: this.zoneNoiseBillId,
|
||||
acidRainBillId: this.acidRainBillId,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
@@ -610,8 +400,8 @@ export default {
|
||||
form.monitorHour = date.getHours();
|
||||
form.monitorMinute = date.getMinutes();
|
||||
delete form["monitorDate"];
|
||||
if (form.zoneNoiseId) {
|
||||
updateZoneNoise(form)
|
||||
if (form.acidRainId) {
|
||||
updateAcidRain(form)
|
||||
.then((res) => {
|
||||
if (res.data.code == 0) {
|
||||
this.showEdit = false;
|
||||
@@ -629,8 +419,8 @@ export default {
|
||||
hide();
|
||||
});
|
||||
} else {
|
||||
form.zoneNoiseBillId = this.zoneNoiseBillId;
|
||||
saveZoneNoise(form)
|
||||
form.acidRainBillId = this.acidRainBillId;
|
||||
saveAcidRain(form)
|
||||
.then((res) => {
|
||||
if (res.data.code == 0) {
|
||||
this.showEdit = false;
|
||||
@@ -651,7 +441,7 @@ export default {
|
||||
/* 删除单个 */
|
||||
remove(row) {
|
||||
const hide = this.$message.loading("请求中..", 0);
|
||||
removeZoneNoise(row.zoneNoiseId)
|
||||
removeAcidRain(row.acidRainId)
|
||||
.then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success(res.data.msg);
|
||||
@@ -666,9 +456,9 @@ export default {
|
||||
.finally(() => hide());
|
||||
},
|
||||
removeBatch() {
|
||||
const ids = this.selectionList.map((item) => item.zoneNoiseId);
|
||||
const ids = this.selectionList.map((item) => item.acidRainId);
|
||||
const hide = this.$message.loading("请求中..", 0);
|
||||
removeBatchZoneNoise(ids)
|
||||
removeBatchAcidRain(ids)
|
||||
.then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success(res.data.msg);
|
||||
@@ -1,14 +1,21 @@
|
||||
export default {
|
||||
toObjData(excelData) {
|
||||
return excelData.map(item => {
|
||||
const monitorTime = new Date();
|
||||
monitorTime.setFullYear(item[0]);
|
||||
monitorTime.setMonth(item[7] - 1);
|
||||
monitorTime.setDate(item[8]);
|
||||
monitorTime.setHours(item[9]);
|
||||
monitorTime.setMinutes(item[10]);
|
||||
const monitorStartTime = new Date();
|
||||
monitorStartTime.setFullYear(item[4]);
|
||||
monitorStartTime.setMonth(item[5] - 1);
|
||||
monitorStartTime.setDate(item[6]);
|
||||
monitorStartTime.setHours(item[7]);
|
||||
monitorStartTime.setMinutes(item[8]);
|
||||
|
||||
const monitorEndTime = new Date();
|
||||
monitorEndTime.setFullYear(item[9]);
|
||||
monitorEndTime.setMonth(item[10] - 1);
|
||||
monitorEndTime.setDate(item[11]);
|
||||
monitorEndTime.setHours(item[12]);
|
||||
monitorEndTime.setMinutes(item[13]);
|
||||
let quarter = 1;
|
||||
const month = item[7]
|
||||
const month = item[10]
|
||||
if (month < 4) {
|
||||
quarter = 1
|
||||
} else if (month < 7) {
|
||||
@@ -18,48 +25,34 @@ export default {
|
||||
} else {
|
||||
quarter = 4
|
||||
}
|
||||
console.log(item);
|
||||
const row = {
|
||||
regionCode: "450100",
|
||||
monitorYear: item[0],
|
||||
gridLength: item[1],
|
||||
gridWidth: item[2],
|
||||
place: item[3],
|
||||
gridNo: item[4],
|
||||
area: item[5],
|
||||
source: item[6],
|
||||
monitorMonth: item[7],
|
||||
monitorDay: item[8],
|
||||
monitorHour: item[9],
|
||||
monitorMinute: item[10],
|
||||
indexLeq: item[11],
|
||||
indexSd: item[12],
|
||||
indexL10: item[13],
|
||||
indexL50: item[14],
|
||||
indexL90: item[15],
|
||||
indexLmax: item[16],
|
||||
indexLmin: item[17],
|
||||
station: item[18],
|
||||
monitorInstrumentModel: item[19],
|
||||
monitorInstrumentCode: item[20],
|
||||
beforeMonitorValue: item[21],
|
||||
afterMonitorValue: item[22],
|
||||
soundPressureValue: item[23],
|
||||
soundInstrumentModel: item[24],
|
||||
soundInstrumentCode: item[25],
|
||||
city: '南宁',
|
||||
regionCode: item[0],
|
||||
city: item[1].includes("市")?item[1]:"南宁市",
|
||||
area: item[1].includes("区")?item[1]:"",
|
||||
county: item[1].includes("县")?item[1]:"",
|
||||
place: item[2],
|
||||
placeType: item[3],
|
||||
precipitationType: item[14],
|
||||
precipitation: item[15],
|
||||
ph: item[16],
|
||||
conductivity: item[17],
|
||||
so42: item[18],
|
||||
no3: item[19],
|
||||
f: Number(item[20])?Number(item[20]):null,
|
||||
cl: item[21],
|
||||
nh4: item[22],
|
||||
ca2: item[23],
|
||||
mg2: item[24],
|
||||
na: item[25],
|
||||
k: Number(item[26])?Number(item[26]):null,
|
||||
systemCode: item[27],
|
||||
regionLevel: "市级",
|
||||
monitorTime: monitorTime.getTime(),
|
||||
monitorStartTime: monitorStartTime.getTime(),
|
||||
monitorEndTime: monitorEndTime.getTime(),
|
||||
monitorTime: monitorEndTime.getTime(),
|
||||
quarter
|
||||
}
|
||||
|
||||
if (row.monitorHour >= 6 && row.monitorHour < 22) {
|
||||
row.timeSlot = "昼"
|
||||
}else{
|
||||
row.timeSlot = "夜"
|
||||
}
|
||||
if (row.indexL10 < row.indexL50 || row.indexL50 < row.indexL90) {
|
||||
throw new Error(row.place + "数值有误")
|
||||
}
|
||||
return row;
|
||||
})
|
||||
|
||||
@@ -91,12 +84,12 @@ export default {
|
||||
// 解析县级数据
|
||||
toAreaObjData(excelData) {
|
||||
return excelData.map(item => {
|
||||
const monitorTime = new Date();
|
||||
monitorTime.setFullYear(item[1]);
|
||||
monitorTime.setMonth(item[14] - 1);
|
||||
monitorTime.setDate(item[15]);
|
||||
monitorTime.setHours(item[16]);
|
||||
monitorTime.setMinutes(item[17]);
|
||||
const monitorStartTime = new Date();
|
||||
monitorStartTime.setFullYear(item[1]);
|
||||
monitorStartTime.setMonth(item[14] - 1);
|
||||
monitorStartTime.setDate(item[15]);
|
||||
monitorStartTime.setHours(item[16]);
|
||||
monitorStartTime.setMinutes(item[17]);
|
||||
let quarter = 1;
|
||||
const month = item[14]
|
||||
if (month < 4) {
|
||||
@@ -152,7 +145,7 @@ export default {
|
||||
remark: item[35],
|
||||
city: '南宁',
|
||||
timeSlot,
|
||||
monitorTime: monitorTime.getTime(),
|
||||
monitorStartTime: monitorStartTime.getTime(),
|
||||
quarter
|
||||
|
||||
}
|
||||
|
||||
@@ -57,20 +57,15 @@
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="zoneNoiseId"
|
||||
row-key="acidRainId"
|
||||
:datasource="url"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
<template #Leq="{ text,record }">
|
||||
<a-tag v-if="(record.timeSlot == '昼' && text <= 68) || (record.timeSlot == '夜' && text <= 58)" color="green">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 68 && text <=70) || (record.timeSlot == '夜' && text > 58 && text <=60)" color="blue">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 70 && text <=72) || (record.timeSlot == '夜' && text > 60 && text <=62)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 62 && text <=74) || (record.timeSlot == '夜' && text > 62 && text <=64)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 74 ) || (record.timeSlot == '夜' && text > 64)" color="red">{{text}}</a-tag>
|
||||
<template v-else color="#FFF">{{text}}</template>
|
||||
<template #Address="{ record }">
|
||||
{{record.area?record.area:record.county?record.county:record.city}}
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
@@ -81,7 +76,7 @@
|
||||
<script>
|
||||
// import _ from "lodash";
|
||||
import XLSX from "xlsx";
|
||||
import { pageZoneNoiseUrl, getColumnOptions } from "@/api/ecology/zone-sound";
|
||||
import { pageAcidRainUrl, getColumnOptions } from "@/api/ecology/acid";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import moment from "moment";
|
||||
// import utils from "./utils";
|
||||
@@ -94,147 +89,112 @@ export default {
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
url: pageZoneNoiseUrl,
|
||||
url: pageAcidRainUrl,
|
||||
selection: [],
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
title: "监测日期",
|
||||
dataIndex: "monitorTime",
|
||||
title: "采样开始时间",
|
||||
dataIndex: "monitorStartTime",
|
||||
sorter: true,
|
||||
customRender: ({text})=> moment(text,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD HH:mm")
|
||||
},
|
||||
{
|
||||
title: "采样结束时间",
|
||||
dataIndex: "monitorEndTime",
|
||||
sorter: true,
|
||||
customRender: ({text})=> moment(text,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD HH:mm")
|
||||
},
|
||||
{
|
||||
title: "行政代码",
|
||||
dataIndex: "regionCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "测点名称",
|
||||
title: "市(县,区)",
|
||||
slots: {customRender: "Address"},
|
||||
},
|
||||
{
|
||||
title: "采样点",
|
||||
dataIndex: "place",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "所属城区",
|
||||
dataIndex: "area",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格长(米)",
|
||||
dataIndex: "gridLength",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格宽(米)",
|
||||
dataIndex: "gridWidth",
|
||||
{
|
||||
title: "点位类型",
|
||||
dataIndex: "placeType",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格点号",
|
||||
dataIndex: "gridNo",
|
||||
title: "降水类型",
|
||||
dataIndex: "precipitationType",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "主要声源",
|
||||
dataIndex: "source",
|
||||
{
|
||||
title: "降水量",
|
||||
dataIndex: "precipitation",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "时段",
|
||||
dataIndex: "timeSlot",
|
||||
{
|
||||
title: "pH",
|
||||
dataIndex: "ph",
|
||||
sorter: true,
|
||||
},
|
||||
// {
|
||||
// title: '月',
|
||||
// dataIndex: 'monitorMonth',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '日',
|
||||
// dataIndex: 'monitorDay',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '时',
|
||||
// dataIndex: 'monitorHour',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '分',
|
||||
// dataIndex: 'monitorMinute',
|
||||
// sorter: true
|
||||
// },
|
||||
{
|
||||
title: "LeqdB(A)",
|
||||
dataIndex: "indexLeq",
|
||||
slots: {customRender: "Leq"},
|
||||
{
|
||||
title: "电导率",
|
||||
dataIndex: "conductivity",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "SDdB(A)",
|
||||
dataIndex: "indexSd",
|
||||
{
|
||||
title: "SO42",
|
||||
dataIndex: "so42",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L10dB(A)",
|
||||
dataIndex: "indexL10",
|
||||
{
|
||||
title: "NO3",
|
||||
dataIndex: "no3",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L50dB(A)",
|
||||
dataIndex: "indexL50",
|
||||
{
|
||||
title: "F",
|
||||
dataIndex: "f",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L90dB(A)",
|
||||
dataIndex: "indexL90",
|
||||
{
|
||||
title: "CL",
|
||||
dataIndex: "cl",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "LmindB(A)",
|
||||
dataIndex: "indexLmin",
|
||||
{
|
||||
title: "NH4",
|
||||
dataIndex: "nh4",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "LmaxdB(A)",
|
||||
dataIndex: "indexLmax",
|
||||
{
|
||||
title: "Ca2",
|
||||
dataIndex: "ca2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测站名",
|
||||
dataIndex: "station",
|
||||
{
|
||||
title: "Mg2",
|
||||
dataIndex: "mg2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器型号",
|
||||
dataIndex: "monitorInstrumentModel",
|
||||
{
|
||||
title: "Na",
|
||||
dataIndex: "na",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器编号",
|
||||
dataIndex: "monitorInstrumentCode",
|
||||
{
|
||||
title: "K",
|
||||
dataIndex: "k",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测前校准值",
|
||||
dataIndex: "beforeMonitorValue",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准器测量声压值",
|
||||
dataIndex: "soundPressureValue",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器型号",
|
||||
dataIndex: "soundInstrumentModel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器编号",
|
||||
dataIndex: "soundInstrumentCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "区域等级",
|
||||
dataIndex: "regionLevel",
|
||||
{
|
||||
title: "系统编码",
|
||||
dataIndex: "systemCode",
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "备注",
|
||||
dataIndex: "remark",
|
||||
@@ -244,7 +204,7 @@ export default {
|
||||
title: "创建人",
|
||||
dataIndex: "username",
|
||||
sorter: true,
|
||||
},
|
||||
}
|
||||
],
|
||||
palceOptions: [],
|
||||
areaOptions: [],
|
||||
@@ -305,157 +265,106 @@ export default {
|
||||
},
|
||||
exportFile() {
|
||||
const columns = [
|
||||
{
|
||||
title: "采样开始时间",
|
||||
dataIndex: "monitorStartTime",
|
||||
sorter: true,
|
||||
customRender: ({text})=> moment(text,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD HH:mm")
|
||||
},
|
||||
{
|
||||
title: "行政区划代码",
|
||||
title: "采样结束时间",
|
||||
dataIndex: "monitorEndTime",
|
||||
sorter: true,
|
||||
customRender: ({text})=> moment(text,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD HH:mm")
|
||||
},
|
||||
{
|
||||
title: "行政代码",
|
||||
dataIndex: "regionCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测年度",
|
||||
dataIndex: "monitorYear",
|
||||
sorter: true,
|
||||
title: "市(县,区)",
|
||||
dataIndex: "address",
|
||||
slots: {customRender: "Address"},
|
||||
},
|
||||
{
|
||||
title: "点位编码",
|
||||
dataIndex: "placeCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "测点名称",
|
||||
{
|
||||
title: "采样点",
|
||||
dataIndex: "place",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "测点经度",
|
||||
dataIndex: "placeLng",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "测点纬度",
|
||||
dataIndex: "placeLat",
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "测点参照物",
|
||||
dataIndex: "refObj",
|
||||
{
|
||||
title: "点位类型",
|
||||
dataIndex: "placeType",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格边长",
|
||||
dataIndex: "gridLength",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格覆盖人口(万)",
|
||||
dataIndex: "people",
|
||||
title: "降水类型",
|
||||
dataIndex: "precipitationType",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "功能区代码",
|
||||
dataIndex: "functionCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "月",
|
||||
dataIndex: "monitorMonth",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "日",
|
||||
dataIndex: "monitorDay",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "时",
|
||||
dataIndex: "monitorHour",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "分",
|
||||
dataIndex: "monitorMinute",
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "Leq",
|
||||
dataIndex: "indexLeq",
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "L10",
|
||||
dataIndex: "indexL10",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L50",
|
||||
dataIndex: "indexL50",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L90",
|
||||
dataIndex: "indexL90",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "最大值",
|
||||
dataIndex: "indexLmax",
|
||||
title: "降水量",
|
||||
dataIndex: "precipitation",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "最小值",
|
||||
dataIndex: "indexLmin",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "标准差(SD)",
|
||||
dataIndex: "indexSd",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测站名",
|
||||
dataIndex: "station",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器型号",
|
||||
dataIndex: "monitorInstrumentModel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器编号",
|
||||
dataIndex: "monitorInstrumentCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测前校准值",
|
||||
dataIndex: "beforeMonitorValue",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准器测量声压值",
|
||||
dataIndex: "soundPressureValue",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器型号",
|
||||
dataIndex: "soundInstrumentModel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器编号",
|
||||
dataIndex: "soundInstrumentCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "区域等级",
|
||||
dataIndex: "regionLevel",
|
||||
title: "pH",
|
||||
dataIndex: "ph",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "备注",
|
||||
dataIndex: "remark",
|
||||
title: "电导率",
|
||||
dataIndex: "conductivity",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "SO42",
|
||||
dataIndex: "so42",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "NO3",
|
||||
dataIndex: "no3",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "F",
|
||||
dataIndex: "f",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "CL",
|
||||
dataIndex: "cl",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "NH4",
|
||||
dataIndex: "nh4",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "Ca2",
|
||||
dataIndex: "ca2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "Mg2",
|
||||
dataIndex: "mg2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "Na",
|
||||
dataIndex: "na",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "K",
|
||||
dataIndex: "k",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "系统编码",
|
||||
dataIndex: "systemCode",
|
||||
sorter: true,
|
||||
},
|
||||
];
|
||||
@@ -463,7 +372,12 @@ export default {
|
||||
const th = columns.map((item) => item.title);
|
||||
arr.push(th);
|
||||
this.data.forEach((d) => {
|
||||
const td = columns.map((item) => d[item.dataIndex]);
|
||||
const td = columns.map((item) => {
|
||||
if(item.dataIndex == "address"){
|
||||
return d.area?d.area:d.county?d.county:d.city
|
||||
}
|
||||
return d[item.dataIndex];
|
||||
});
|
||||
arr.push(td);
|
||||
});
|
||||
let sheet = XLSX.utils.aoa_to_sheet(arr);
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
import YearStatistic from "./year.vue";
|
||||
|
||||
export default {
|
||||
name: 'StatisticSoundZone',
|
||||
name: 'StatisticAcidRain',
|
||||
components: {
|
||||
BaseStatistic,
|
||||
SourceStatistic,
|
||||
|
||||
@@ -190,7 +190,7 @@
|
||||
},
|
||||
{
|
||||
title: '创建人',
|
||||
dataIndex: 'username',
|
||||
dataIndex: 'userName',
|
||||
sorter: true,
|
||||
|
||||
},
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
:label-col="{ md: { span: 6 }, sm: { span: 24 } }"
|
||||
:wrapper-col="{ md: { span: 18 }, sm: { span: 24 } }"
|
||||
:label-col="{ md: { span: 8 }, sm: { span: 24 } }"
|
||||
:wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }"
|
||||
>
|
||||
<a-row>
|
||||
<a-col :md="12" :sm="24">
|
||||
@@ -82,171 +82,91 @@
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="所属城区" name="area">
|
||||
<a-form-item label="SO2" name="so2">
|
||||
<a-input
|
||||
v-model:value="form.area"
|
||||
placeholder="请输入城区"
|
||||
v-model:value="form.so2"
|
||||
placeholder="请输入二氧化硫浓度/(μg/m3)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="网格长" name="airLength">
|
||||
<a-form-item label="NO2" name="no2">
|
||||
<a-input
|
||||
v-model:value="form.gridLength"
|
||||
placeholder="请输入网格长(米)"
|
||||
v-model:value="form.no2"
|
||||
placeholder="请输入二氧化氮浓度/(μg/m3)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="网格宽" name="airWidth">
|
||||
<a-form-item label="PM10" name="pm10">
|
||||
<a-input
|
||||
v-model:value="form.gridWidth"
|
||||
placeholder="请输入网格宽(米)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="LeqdB(A)" name="indexLeq">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexLeq"
|
||||
placeholder="请输入LeqdB(A)"
|
||||
v-model:value="form.pm10"
|
||||
placeholder="请输入可吸入颗粒物浓度/(μg/m3)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="SDdB(A)" name="indexSd">
|
||||
<a-form-item label="CO" name="co">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexSd"
|
||||
placeholder="请输入大SDdB(A)"
|
||||
v-model:value="form.co"
|
||||
placeholder="请输入一氧化碳 浓度/(mg/m3)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="L10dB(A)" name="indexL10">
|
||||
<a-form-item label="O3" name="o3">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexL10"
|
||||
placeholder="请输入L10dB(A)"
|
||||
v-model:value="form.o3"
|
||||
placeholder="请输入臭氧(O3)最大8小时滑动平均浓度/(μg/m3)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="L50dB(A)" name="indexL50">
|
||||
<a-form-item label="PM2.5" name="pm25">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexL50"
|
||||
placeholder="请输入L50dB(A)"
|
||||
v-model:value="form.pm25"
|
||||
placeholder="请输入细颗粒物浓度/(μg/m3)"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="L90dB(A)" name="indexL90">
|
||||
<a-form-item label="空气质量指数AQI" name="aqi">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexL90"
|
||||
placeholder="请输入L90dB(A)"
|
||||
v-model:value="form.aqi"
|
||||
placeholder="请输入空气质量指数AQI"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="LmindB(A)" name="indexLmin">
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="首要污染物" name="primaryPollutant">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexLmin"
|
||||
placeholder="请输入LmindB(A)"
|
||||
v-model:value="form.primaryPollutant"
|
||||
placeholder="请输入首要污染物"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="LmaxdB(A)" name="indexLmax">
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="空气质量指数级别" name="aqiLevel">
|
||||
<a-input
|
||||
type="number"
|
||||
v-model:value="form.indexLmax"
|
||||
placeholder="请输入LmaxdB(A)"
|
||||
v-model:value="form.aqiLevel"
|
||||
placeholder="请输入空气质量指数级别"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="监测站名" name="station">
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="空气质量状况" name="airQualityStatus">
|
||||
<a-input
|
||||
v-model:value="form.station"
|
||||
placeholder="请输入监测站名"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="监测仪器型号" name="monitorInstrumentModel">
|
||||
<a-input
|
||||
v-model:value="form.monitorInstrumentModel"
|
||||
placeholder="请输入监测仪器型号"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="监测仪器编号" name="monitorInstrumentCode">
|
||||
<a-input
|
||||
v-model:value="form.monitorInstrumentCode"
|
||||
placeholder="请输入监测仪器编号"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="监测前校准值" name="beforeMonitorValue">
|
||||
<a-input
|
||||
v-model:value="form.beforeMonitorValue"
|
||||
placeholder="请输入监测前校准值"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="监测后校准值" name="afterMonitorValue">
|
||||
<a-input
|
||||
v-model:value="form.afterMonitorValue"
|
||||
placeholder="请输入监测后校准值"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="声校准器测量声压值" name="soundPressureValue">
|
||||
<a-input
|
||||
v-model:value="form.soundPressureValue"
|
||||
placeholder="请输入声校准器测量声压值"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="声校准仪器型号" name="soundInstrumentModel">
|
||||
<a-input
|
||||
v-model:value="form.soundInstrumentModel"
|
||||
placeholder="请输入声校准仪器型号"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="声校准仪器编号" name="soundInstrumentCode">
|
||||
<a-input
|
||||
v-model:value="form.soundInstrumentCode"
|
||||
placeholder="请输入声校准仪器编号"
|
||||
v-model:value="form.airQualityStatus"
|
||||
placeholder="请输入空气质量状况"
|
||||
allow-clear
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -267,7 +187,7 @@
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="airId"
|
||||
row-key="ambientAirId"
|
||||
:datasource="url"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
@@ -293,16 +213,6 @@
|
||||
</a-popconfirm>
|
||||
</a-space>
|
||||
</template>
|
||||
|
||||
<template #Leq="{ text,record }">
|
||||
<a-tag v-if="(record.timeSlot == '昼' && text <= 68) || (record.timeSlot == '夜' && text <= 58)" color="green">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 68 && text <=70) || (record.timeSlot == '夜' && text > 58 && text <=60)" color="blue">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 70 && text <=72) || (record.timeSlot == '夜' && text > 60 && text <=62)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 62 && text <=74) || (record.timeSlot == '夜' && text > 62 && text <=64)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 74 ) || (record.timeSlot == '夜' && text > 64)" color="red">{{text}}</a-tag>
|
||||
<template v-else color="#FFF">{{text}}</template>
|
||||
</template>
|
||||
|
||||
<template #action="{ record }">
|
||||
<a-space>
|
||||
<a-button
|
||||
@@ -362,140 +272,69 @@ export default {
|
||||
title: "监测日期",
|
||||
dataIndex: "monitorTime",
|
||||
sorter: true,
|
||||
customRender: ({text})=> moment(text,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD HH:mm")
|
||||
customRender: ({text})=> moment(text).format("YYYY-MM-DD HH:mm")
|
||||
},
|
||||
{
|
||||
title: "城市",
|
||||
dataIndex: "city",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "测点名称",
|
||||
dataIndex: "place",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "所属城区",
|
||||
dataIndex: "area",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格长(米)",
|
||||
dataIndex: "gridLength",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格宽(米)",
|
||||
dataIndex: "gridWidth",
|
||||
{
|
||||
title: "SO2/(μg/m3)",
|
||||
dataIndex: "so2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格点号",
|
||||
dataIndex: "gridNo",
|
||||
title: "NO2/(μg/m3)",
|
||||
dataIndex: "no2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "主要声源",
|
||||
dataIndex: "source",
|
||||
{
|
||||
title: "PM10/(μg/m3)",
|
||||
dataIndex: "pm10",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "时段",
|
||||
dataIndex: "timeSlot",
|
||||
{
|
||||
title: "CO/(mg/m3)",
|
||||
dataIndex: "co",
|
||||
sorter: true,
|
||||
},
|
||||
// {
|
||||
// title: '月',
|
||||
// dataIndex: 'monitorMonth',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '日',
|
||||
// dataIndex: 'monitorDay',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '时',
|
||||
// dataIndex: 'monitorHour',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '分',
|
||||
// dataIndex: 'monitorMinute',
|
||||
// sorter: true
|
||||
// },
|
||||
{
|
||||
title: "LeqdB(A)",
|
||||
dataIndex: "indexLeq",
|
||||
slots: {customRender: "Leq"},
|
||||
{
|
||||
title: "臭氧(O3)最大8小时滑动平均浓度/(μg/m3)",
|
||||
dataIndex: "o3",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "SDdB(A)",
|
||||
dataIndex: "indexSd",
|
||||
{
|
||||
title: "PM2.5",
|
||||
dataIndex: "pm25",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L10dB(A)",
|
||||
dataIndex: "indexL10",
|
||||
{
|
||||
title: "空气质量指数AQI",
|
||||
dataIndex: "aqi",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L50dB(A)",
|
||||
dataIndex: "indexL50",
|
||||
{
|
||||
title: "首要污染物",
|
||||
dataIndex: "primaryPollutant",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L90dB(A)",
|
||||
dataIndex: "indexL90",
|
||||
{
|
||||
title: "空气质量指数级别",
|
||||
dataIndex: "aqiLevel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "LmindB(A)",
|
||||
dataIndex: "indexLmin",
|
||||
{
|
||||
title: "空气质量状况",
|
||||
dataIndex: "airQualityStatus",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "LmaxdB(A)",
|
||||
dataIndex: "indexLmax",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测站名",
|
||||
dataIndex: "station",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器型号",
|
||||
dataIndex: "monitorInstrumentModel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器编号",
|
||||
dataIndex: "monitorInstrumentCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测前校准值",
|
||||
dataIndex: "beforeMonitorValue",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准器测量声压值",
|
||||
dataIndex: "soundPressureValue",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器型号",
|
||||
dataIndex: "soundInstrumentModel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器编号",
|
||||
dataIndex: "soundInstrumentCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "区域等级",
|
||||
dataIndex: "regionLevel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
{
|
||||
title: "备注",
|
||||
dataIndex: "remark",
|
||||
sorter: true,
|
||||
|
||||
@@ -57,21 +57,14 @@
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="zoneNoiseId"
|
||||
row-key="airId"
|
||||
:datasource="url"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
:scroll="{ x: 'max-content' }"
|
||||
@done="(d) => (data = d.data)"
|
||||
>
|
||||
<template #Leq="{ text,record }">
|
||||
<a-tag v-if="(record.timeSlot == '昼' && text <= 68) || (record.timeSlot == '夜' && text <= 58)" color="green">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 68 && text <=70) || (record.timeSlot == '夜' && text > 58 && text <=60)" color="blue">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 70 && text <=72) || (record.timeSlot == '夜' && text > 60 && text <=62)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 62 && text <=74) || (record.timeSlot == '夜' && text > 62 && text <=64)" color="red">{{text}}</a-tag>
|
||||
<a-tag v-else-if="(record.timeSlot == '昼' && text > 74 ) || (record.timeSlot == '夜' && text > 64)" color="red">{{text}}</a-tag>
|
||||
<template v-else color="#FFF">{{text}}</template>
|
||||
</template>
|
||||
|
||||
</ele-pro-table>
|
||||
</a-card>
|
||||
</div>
|
||||
@@ -81,12 +74,12 @@
|
||||
<script>
|
||||
// import _ from "lodash";
|
||||
import XLSX from "xlsx";
|
||||
import { pageZoneNoiseUrl, getColumnOptions } from "@/api/ecology/zone-sound";
|
||||
import { pageAirUrl, getColumnOptions } from "@/api/ecology/air";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import moment from "moment";
|
||||
// import utils from "./utils";
|
||||
export default {
|
||||
name: "StatisticSoundZoneBase",
|
||||
name: "StatisticAirBase",
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
@@ -94,7 +87,7 @@ export default {
|
||||
locale,
|
||||
bill: {},
|
||||
// 表格数据接口
|
||||
url: pageZoneNoiseUrl,
|
||||
url: pageAirUrl,
|
||||
selection: [],
|
||||
// 表格列配置
|
||||
columns: [
|
||||
@@ -102,140 +95,69 @@ export default {
|
||||
title: "监测日期",
|
||||
dataIndex: "monitorTime",
|
||||
sorter: true,
|
||||
customRender: ({text})=> moment(text,"YYYY/MM/DD HH:mm:ss").format("YYYY-MM-DD HH:mm")
|
||||
customRender: ({text})=> moment(text).format("YYYY-MM-DD HH:mm")
|
||||
},
|
||||
{
|
||||
title: "城市",
|
||||
dataIndex: "city",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "测点名称",
|
||||
dataIndex: "place",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "所属城区",
|
||||
dataIndex: "area",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格长(米)",
|
||||
dataIndex: "gridLength",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格宽(米)",
|
||||
dataIndex: "gridWidth",
|
||||
{
|
||||
title: "SO2/(μg/m3)",
|
||||
dataIndex: "so2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格点号",
|
||||
dataIndex: "gridNo",
|
||||
title: "NO2/(μg/m3)",
|
||||
dataIndex: "no2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "主要声源",
|
||||
dataIndex: "source",
|
||||
{
|
||||
title: "PM10/(μg/m3)",
|
||||
dataIndex: "pm10",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "时段",
|
||||
dataIndex: "timeSlot",
|
||||
{
|
||||
title: "CO/(mg/m3)",
|
||||
dataIndex: "co",
|
||||
sorter: true,
|
||||
},
|
||||
// {
|
||||
// title: '月',
|
||||
// dataIndex: 'monitorMonth',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '日',
|
||||
// dataIndex: 'monitorDay',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '时',
|
||||
// dataIndex: 'monitorHour',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '分',
|
||||
// dataIndex: 'monitorMinute',
|
||||
// sorter: true
|
||||
// },
|
||||
{
|
||||
title: "LeqdB(A)",
|
||||
dataIndex: "indexLeq",
|
||||
slots: {customRender: "Leq"},
|
||||
{
|
||||
title: "臭氧(O3)最大8小时滑动平均浓度/(μg/m3)",
|
||||
dataIndex: "o3",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "SDdB(A)",
|
||||
dataIndex: "indexSd",
|
||||
{
|
||||
title: "PM2.5",
|
||||
dataIndex: "pm25",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L10dB(A)",
|
||||
dataIndex: "indexL10",
|
||||
{
|
||||
title: "空气质量指数AQI",
|
||||
dataIndex: "aqi",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L50dB(A)",
|
||||
dataIndex: "indexL50",
|
||||
{
|
||||
title: "首要污染物",
|
||||
dataIndex: "primaryPollutant",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L90dB(A)",
|
||||
dataIndex: "indexL90",
|
||||
{
|
||||
title: "空气质量指数级别",
|
||||
dataIndex: "aqiLevel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "LmindB(A)",
|
||||
dataIndex: "indexLmin",
|
||||
{
|
||||
title: "空气质量状况",
|
||||
dataIndex: "airQualityStatus",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "LmaxdB(A)",
|
||||
dataIndex: "indexLmax",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测站名",
|
||||
dataIndex: "station",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器型号",
|
||||
dataIndex: "monitorInstrumentModel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器编号",
|
||||
dataIndex: "monitorInstrumentCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测前校准值",
|
||||
dataIndex: "beforeMonitorValue",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准器测量声压值",
|
||||
dataIndex: "soundPressureValue",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器型号",
|
||||
dataIndex: "soundInstrumentModel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器编号",
|
||||
dataIndex: "soundInstrumentCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "区域等级",
|
||||
dataIndex: "regionLevel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
{
|
||||
title: "备注",
|
||||
dataIndex: "remark",
|
||||
sorter: true,
|
||||
@@ -244,7 +166,7 @@ export default {
|
||||
title: "创建人",
|
||||
dataIndex: "username",
|
||||
sorter: true,
|
||||
},
|
||||
}
|
||||
],
|
||||
palceOptions: [],
|
||||
areaOptions: [],
|
||||
@@ -305,19 +227,15 @@ export default {
|
||||
},
|
||||
exportFile() {
|
||||
const columns = [
|
||||
{
|
||||
title: "行政区划代码",
|
||||
dataIndex: "regionCode",
|
||||
{
|
||||
title: "监测日期",
|
||||
dataIndex: "monitorTime",
|
||||
sorter: true,
|
||||
customRender: ({text})=> moment(text).format("YYYY-MM-DD HH:mm")
|
||||
},
|
||||
{
|
||||
title: "监测年度",
|
||||
dataIndex: "monitorYear",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "点位编码",
|
||||
dataIndex: "placeCode",
|
||||
title: "城市",
|
||||
dataIndex: "city",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
@@ -325,132 +243,54 @@ export default {
|
||||
dataIndex: "place",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "测点经度",
|
||||
dataIndex: "placeLng",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "测点纬度",
|
||||
dataIndex: "placeLat",
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "测点参照物",
|
||||
dataIndex: "refObj",
|
||||
{
|
||||
title: "SO2/(μg/m3)",
|
||||
dataIndex: "so2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格边长",
|
||||
dataIndex: "gridLength",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "网格覆盖人口(万)",
|
||||
dataIndex: "people",
|
||||
title: "NO2/(μg/m3)",
|
||||
dataIndex: "no2",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "功能区代码",
|
||||
dataIndex: "functionCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "月",
|
||||
dataIndex: "monitorMonth",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "日",
|
||||
dataIndex: "monitorDay",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "时",
|
||||
dataIndex: "monitorHour",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "分",
|
||||
dataIndex: "monitorMinute",
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "Leq",
|
||||
dataIndex: "indexLeq",
|
||||
sorter: true,
|
||||
},
|
||||
|
||||
{
|
||||
title: "L10",
|
||||
dataIndex: "indexL10",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L50",
|
||||
dataIndex: "indexL50",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "L90",
|
||||
dataIndex: "indexL90",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "最大值",
|
||||
dataIndex: "indexLmax",
|
||||
title: "PM10/(μg/m3)",
|
||||
dataIndex: "pm10",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "最小值",
|
||||
dataIndex: "indexLmin",
|
||||
title: "CO/(mg/m3)",
|
||||
dataIndex: "co",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "标准差(SD)",
|
||||
dataIndex: "indexSd",
|
||||
{
|
||||
title: "臭氧(O3)最大8小时滑动平均浓度/(μg/m3)",
|
||||
dataIndex: "o3",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测站名",
|
||||
dataIndex: "station",
|
||||
{
|
||||
title: "PM2.5",
|
||||
dataIndex: "pm25",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器型号",
|
||||
dataIndex: "monitorInstrumentModel",
|
||||
{
|
||||
title: "空气质量指数AQI",
|
||||
dataIndex: "aqi",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测仪器编号",
|
||||
dataIndex: "monitorInstrumentCode",
|
||||
{
|
||||
title: "首要污染物",
|
||||
dataIndex: "primaryPollutant",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "监测前校准值",
|
||||
dataIndex: "beforeMonitorValue",
|
||||
{
|
||||
title: "空气质量指数级别",
|
||||
dataIndex: "aqiLevel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准器测量声压值",
|
||||
dataIndex: "soundPressureValue",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器型号",
|
||||
dataIndex: "soundInstrumentModel",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "声校准仪器编号",
|
||||
dataIndex: "soundInstrumentCode",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "区域等级",
|
||||
dataIndex: "regionLevel",
|
||||
{
|
||||
title: "空气质量状况",
|
||||
dataIndex: "airQualityStatus",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
@@ -458,6 +298,11 @@ export default {
|
||||
dataIndex: "remark",
|
||||
sorter: true,
|
||||
},
|
||||
{
|
||||
title: "创建人",
|
||||
dataIndex: "username",
|
||||
sorter: true,
|
||||
},
|
||||
];
|
||||
const arr = [];
|
||||
const th = columns.map((item) => item.title);
|
||||
|
||||
Reference in New Issue
Block a user