gis,酸雨
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user