Merge remote-tracking branch 'origin/master'

This commit is contained in:
710356044
2021-11-26 21:54:26 +08:00
11 changed files with 361 additions and 298 deletions

View File

@@ -7,8 +7,8 @@
:wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }"> :wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }">
<a-row> <a-row>
<a-form-item label="断面名称"> <a-form-item label="断面名称">
<a-select v-model:value="where.sectionName" allowClear showSearch> <a-select v-model:value="where.name" allowClear showSearch>
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }} <a-select-option v-for="item in sectionInfo" :key="item.stationName">{{ item.stationName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
@@ -36,7 +36,7 @@
</a-form> </a-form>
<!-- 表格 --> <!-- 表格 -->
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<ele-pro-table ref="table" :datasource="datasource" :columns="columns" :where="where" <ele-pro-table ref="table" :datasource="datasource" bordered :columns="columns" :where="where"
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)"> :scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
</ele-pro-table> </ele-pro-table>
</a-spin> </a-spin>
@@ -71,62 +71,217 @@
selection: [], selection: [],
// tableColumns, // tableColumns,
// 表格列配置 // 表格列配置
columns: [ columns: [{
{ title: ' ',
dataIndex: 'riverName',
key: 'riverName',
align:'center',
children: [{
title: '所在河流名称', title: '所在河流名称',
dataIndex: 'riverName', dataIndex: 'riverName',
key: 'riverName', key: 'riverName',
children: [{
title: '一',
dataIndex: 'riverName',
align: 'center',
}],
}]
}, },
{ {
title: ' ',
dataIndex: '',
key: '',
children: [{
title: '自动站名称', title: '自动站名称',
dataIndex: 'stationName', dataIndex: 'stationName',
align:'center',
key: 'stationName', key: 'stationName',
// children: [{
// title: '《地表水环境质量标准》一类水质标准',
// children: [{
// title: '《地表水环境质量标准》二类水质标准',
// children: [{
// title: '《地表水环境质量标准》三类水质标准',
// children: [{
// title: '《地表水环境质量标准》四类水质标准',
// }],
// }],
// }],
// }],
}]
}, },
{ {
title: ' ',
dataIndex: '',
key: '',
children: [{
title: '水质考核目标', title: '水质考核目标',
dataIndex: 'waterTarget', dataIndex: 'waterTarget',
key: 'waterTarget', key: 'waterTarget',
}]
}, },
{ {
title: ' ',
dataIndex: '',
key: '',
children: [{
title: '水质类别', title: '水质类别',
dataIndex: 'waterQualityType', dataIndex: 'waterQualityType',
key: 'waterQualityType', key: 'waterQualityType',
}, }],
{ }
, {
title: '主要水质指标月均值',
dataIndex: 'index',
key: 'index',
align:'center',
children: [{
title: '水温(℃)', title: '水温(℃)',
dataIndex: 'waterTemperature', dataIndex: 'waterTemperature',
key: 'waterTemperature', key: 'waterTemperature',
align:'center',
children: [{
title: '一',
dataIndex: 'waterTemperature',
align: 'center',
}]
}, },
{ {
title: 'pH (无量纲)', title: 'pH (无量纲)',
dataIndex: 'ph', dataIndex: 'ph',
key: 'ph', key: 'ph',
align:'center',
children: [{
title: '6~9',
dataIndex: 'ph',
align: 'center',
}]
}, },
{ {
title: '溶解氧(mg/L)', title: '溶解氧(mg/L)',
dataIndex: 'dissolvedOxygen', dataIndex: 'dissolvedOxygen',
key: 'dissolvedOxygen', key: 'dissolvedOxygen',
align:'center',
children: [{
title: '≥7.5',
dataIndex: 'dissolvedOxygen',
align:'center',
children: [{
title: '≥6',
dataIndex: 'dissolvedOxygen',
align:'center',
children: [{
title: '≥5',
dataIndex: 'dissolvedOxygen',
align:'center',
children: [{
title: '≥3',
dataIndex: 'dissolvedOxygen',
align:'center',
}],
}],
}],
}],
}, },
{ {
title: '高锰酸盐指数 (mg/L)', title: '高锰酸盐指数 (mg/L)',
dataIndex: 'permanganateIndex', dataIndex: 'permanganateIndex',
key: 'permanganateIndex', key: 'permanganateIndex',
children: [{
title: '≤2',
dataIndex: 'permanganateIndex',
align:'center',
children: [{
title: '≤4',
dataIndex: 'permanganateIndex',
align:'center',
children: [{
title: '≤6',
dataIndex: 'permanganateIndex',
align:'center',
children: [{
title: '≤10',
dataIndex: 'permanganateIndex',
align:'center',
}],
}],
}],
}],
}, },
{ {
title: '氨氮 (mg/L)', title: '氨氮 (mg/L)',
dataIndex: 'ammonia', dataIndex: 'ammonia',
key: 'ammonia', key: 'ammonia',
children: [{
title: '≤0.15',
dataIndex: 'ammonia',
align:'center',
children: [{
title: '≤0.5',
dataIndex: 'ammonia',
align:'center',
children: [{
title: '≤1.0',
dataIndex: 'ammonia',
align:'center',
children: [{
title: '≤1.5',
dataIndex: 'ammonia',
align:'center',
}],
}],
}],
}],
}, },
{ {
title: '总磷(mg/L)', title: '总磷(mg/L)',
dataIndex: 'totalPhosphorus', dataIndex: 'totalPhosphorus',
key: 'totalPhosphorus', key: 'totalPhosphorus',
children: [{
title: '≤0.02',
dataIndex: 'totalPhosphorus',
align:'center',
children: [{
title: '≤0.1',
dataIndex: 'totalPhosphorus',
align:'center',
children: [{
title: '≤0.2',
dataIndex: 'totalPhosphorus',
align:'center',
children: [{
title: '≤0.3',
dataIndex: 'totalPhosphorus',
align:'center',
}],
}],
}],
}],
}, },
{ {
title: '总氮(mg/L)', title: '总氮(mg/L)',
dataIndex: 'totalNitrogen', dataIndex: 'totalNitrogen',
key: 'totalNitrogen', key: 'totalNitrogen',
}, children: [{
title: '≤0.2',
dataIndex: 'totalNitrogen',
children: [{
title: '≤0.5',
dataIndex: 'totalNitrogen',
children: [{
title: '≤1.0',
dataIndex: 'totalNitrogen',
children: [{
title: '≤1.5',
dataIndex: 'totalNitrogen',
}],
}],
}],
}],
}
]
}
], ],
// 表格搜索条件 // 表格搜索条件
where: {}, where: {},
@@ -150,6 +305,7 @@
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
this.loading = true; this.loading = true;
this.datasource = {};
listWaterSiteMonthTotal(this.where).then((res) => { listWaterSiteMonthTotal(this.where).then((res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
this.$message.success(res.data.msg); this.$message.success(res.data.msg);

View File

@@ -7,8 +7,8 @@
:wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }"> :wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }">
<a-row> <a-row>
<a-form-item label="断面名称"> <a-form-item label="断面名称">
<a-select v-model:value="where.sectionName" allowClear showSearch> <a-select v-model:value="where.name" allowClear showSearch>
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }} <a-select-option v-for="item in sectionInfo" :key="item.stationName">{{ item.stationName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
@@ -189,6 +189,8 @@
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
this.loading = true; this.loading = true;
this.momData = [];
this.yoyData = [];
listWaterSiteYoy(this.where).then((res) => { listWaterSiteYoy(this.where).then((res) => {
console.log(res.data.data); console.log(res.data.data);
if (res.data.code == 0) { if (res.data.code == 0) {

View File

@@ -7,7 +7,7 @@
:wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }"> :wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }">
<a-row> <a-row>
<a-form-item label="断面名称"> <a-form-item label="断面名称">
<a-select v-model:value="where.sectionName" allowClear showSearch> <a-select v-model:value="where.name" allowClear showSearch>
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }} <a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@@ -120,6 +120,7 @@
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
this.loading=true; this.loading=true;
this.momData = [];
listMonthCompositeIndex(this.where).then((res) => { listMonthCompositeIndex(this.where).then((res) => {
console.log(res.data.data); console.log(res.data.data);
if (res.data.code == 0) { if (res.data.code == 0) {

View File

@@ -7,7 +7,7 @@
:wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }"> :wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }">
<a-row> <a-row>
<a-form-item label="断面名称"> <a-form-item label="断面名称">
<a-select v-model:value="where.sectionName" allowClear showSearch> <a-select v-model:value="where.name" allowClear showSearch>
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }} <a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@@ -62,7 +62,6 @@
return { return {
data: [], data: [],
momData: [], momData: [],
yoyData: [],
datasource: {}, datasource: {},
columns: [{ columns: [{
title: '断面类型', title: '断面类型',
@@ -129,6 +128,7 @@
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
this.loading = true; this.loading = true;
this.momData = [];
listMonthWaterQualitySandard(this.where).then((res) => { listMonthWaterQualitySandard(this.where).then((res) => {
console.log(res.data.data); console.log(res.data.data);
if (res.data.code == 0) { if (res.data.code == 0) {

View File

@@ -7,7 +7,7 @@
:wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }"> :wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }">
<a-row> <a-row>
<a-form-item label="断面名称"> <a-form-item label="断面名称">
<a-select v-model:value="where.sectionName" allowClear showSearch> <a-select v-model:value="where.name" allowClear showSearch>
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }} <a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@@ -59,7 +59,6 @@
return { return {
data: [], data: [],
momData: [], momData: [],
yoyData: [],
datasource: {}, datasource: {},
columns: [{ columns: [{
title: '断面名称', title: '断面名称',
@@ -124,6 +123,7 @@
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
this.loading = true; this.loading = true;
this.momData = [];
listMonthCompositeIndex(this.where).then((res) => { listMonthCompositeIndex(this.where).then((res) => {
console.log(res.data.data); console.log(res.data.data);
if (res.data.code == 0) { if (res.data.code == 0) {

View File

@@ -7,7 +7,7 @@
:wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }"> :wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }">
<a-row> <a-row>
<a-form-item label="断面名称"> <a-form-item label="断面名称">
<a-select v-model:value="where.sectionName" allowClear showSearch> <a-select v-model:value="where.name" allowClear showSearch>
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }} <a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
@@ -125,6 +125,7 @@
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
this.loading = true; this.loading = true;
this.momData = [];
listMonthWaterQualitySandard(this.where).then((res) => { listMonthWaterQualitySandard(this.where).then((res) => {
console.log(res.data.data); console.log(res.data.data);
if (res.data.code == 0) { if (res.data.code == 0) {

View File

@@ -7,16 +7,16 @@
:wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }"> :wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }">
<a-row> <a-row>
<a-form-item label="断面名称"> <a-form-item label="断面名称">
<a-select v-model:value="where.sectionName" allowClear showSearch> <a-select v-model:value="where.name" allowClear showSearch>
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }} <a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="起始日期:"> <a-form-item label="起始日期:">
<a-date-picker valueFormat="YYYY-MM-DD 00:00:00" v-model:value="where.timeStart"></a-date-picker> <a-date-picker valueFormat="YYYY-MM-DD" v-model:value="where.startTime"></a-date-picker>
</a-form-item> </a-form-item>
<a-form-item label="结束日期:"> <a-form-item label="结束日期:">
<a-date-picker valueFormat="YYYY-MM-DD 23:59:59" v-model:value="where.timeEnd"></a-date-picker> <a-date-picker valueFormat="YYYY-MM-DD" v-model:value="where.endTime"></a-date-picker>
</a-form-item> </a-form-item>
<a-col :lg="6" :md="12" :sm="24" :xs="24"> <a-col :lg="6" :md="12" :sm="24" :xs="24">
@@ -32,7 +32,7 @@
</a-form> </a-form>
<!-- 表格 --> <!-- 表格 -->
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<ele-pro-table ref="table" :datasource="datasource" :columns="columns" :where="where" <ele-pro-table ref="table" :datasource="url" :columns="columns" :where="where"
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)"> :scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
</ele-pro-table> </ele-pro-table>
</a-spin> </a-spin>
@@ -43,8 +43,7 @@
<script> <script>
import { import {
// autonomyWaterFunctionTotalUrl, autonomyWaterFunctionTotalUrl,
autonomyWaterFunctionTotal
} from "@/api/ecology/river-statis"; } from "@/api/ecology/river-statis";
import { import {
listInfo listInfo
@@ -63,7 +62,7 @@
locale, locale,
datasource: {}, datasource: {},
// 表格数据接口 // 表格数据接口
// url: autonomyWaterFunctionTotalUrl, url: autonomyWaterFunctionTotalUrl,
selection: [], selection: [],
tableColumns, tableColumns,
// 表格列配置 // 表格列配置
@@ -78,42 +77,11 @@
}; };
}, },
mounted() { mounted() {
autonomyWaterFunctionTotal().then((res) => { this.loading = true;
res.data.data.forEach((e) => { this.$refs.table.reload({
e.wTemp = "-1"; where: this.where,
e.ph = "-1";
e.dissolvedOxygen = "-1";
e.cod = "-1";
e.fiveDayBod = "-1";
e.ammonia = "-1";
e.cu = "-1";
e.zn = "-1";
e.f = "-1";
e.se = "-1";
e.as = "-1";
e.hg = "-1";
e.cd = "-1";
e.cr6 = "-1";
e.pb = "-1";
e.cyanide = "-1";
e.vPhen = "-1";
e.oils = "-1";
e.anSaa = "-1";
e.s = "-1";
e.coloOrg = "-1";
e.so4 = "-1";
e.cl = "-1";
e.nitrateNitrogen = "-1";
e.fe = "-1";
e.mn = "-1";
e.nTotal = "-1";
e.transp = "-1";
e.chla = "-1";
e.ffeMajorOverStandardItemsMultiples = "-1";
e.lprlMajorOverStandardItemsMultiples = "-1";
})
this.datasource = res.data.data;
}); });
this.loading = false;
}, },
created() { created() {
listInfo().then((res) => { listInfo().then((res) => {
@@ -130,43 +98,12 @@
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
this.loading = true; this.loading = true;
autonomyWaterFunctionTotal().then((res) => { console.log(this.where);
res.data.data.forEach((e) => { this.$refs.table.reload({
e.wTemp = "-1"; where: this.where,
e.ph = "-1";
e.dissolvedOxygen = "-1";
e.cod = "-1";
e.fiveDayBod = "-1";
e.ammonia = "-1";
e.cu = "-1";
e.zn = "-1";
e.f = "-1";
e.se = "-1";
e.as = "-1";
e.hg = "-1";
e.cd = "-1";
e.cr6 = "-1";
e.pb = "-1";
e.cyanide = "-1";
e.vPhen = "-1";
e.oils = "-1";
e.anSaa = "-1";
e.s = "-1";
e.coloOrg = "-1";
e.so4 = "-1";
e.cl = "-1";
e.nitrateNitrogen = "-1";
e.fe = "-1";
e.mn = "-1";
e.nTotal = "-1";
e.transp = "-1";
e.chla = "-1";
e.ffeMajorOverStandardItemsMultiples = "-1";
e.lprlMajorOverStandardItemsMultiples = "-1";
})
this.datasource = res.data.data;
this.loading = false;
}); });
console.log(this.url);
this.loading = false;
}, },
/* 重置搜索 */ /* 重置搜索 */
reset() { reset() {

View File

@@ -2,15 +2,17 @@ const tableColumns = [
{title: "水体类型", dataIndex: "waterBodyType", sorter: true,}, {title: "水体类型", dataIndex: "waterBodyType", sorter: true,},
{title: "水资源一级区名称", dataIndex: "waterResourcesFirstLevelZoneName", sorter: true,}, {title: "水资源一级区名称", dataIndex: "waterResourcesFirstLevelZoneName", sorter: true,},
{title: "水质目标", dataIndex: "waterQualityGoal", sorter: true,}, {title: "水质目标", dataIndex: "waterQualityGoal", sorter: true,},
{title: "采样时间", dataIndex: "monitorTime", sorter: true,},
{title: "数据来源", dataIndex: "dataSources", sorter: true,}, {title: "数据来源", dataIndex: "dataSources", sorter: true,},
{title: "断面名称", dataIndex: "sectionName", sorter: true,}, {title: "断面名称", dataIndex: "sectionName", sorter: true,},
{title: "水温", dataIndex: "wTemp", sorter: true,}, {title: "水温", dataIndex: "wtemp", sorter: true,},
{title: "pH", dataIndex: "ph", sorter: true,}, {title: "pH", dataIndex: "ph", sorter: true,},
{title: "溶解氧", dataIndex: "dissolvedOxygen", sorter: true,}, {title: "溶解氧", dataIndex: "dissolvedOxygen", sorter: true,},
{title: "高锰酸盐指数", dataIndex: "permanganateIndex", sorter: true,}, {title: "高锰酸盐指数", dataIndex: "permanganateIndex", sorter: true,},
{title: "化学需氧量", dataIndex: "cod", sorter: true,}, {title: "化学需氧量", dataIndex: "cod", sorter: true,},
{title: "五日生化需氧量", dataIndex: "fiveDayBod", sorter: true,}, {title: "五日生化需氧量", dataIndex: "fiveDayBod", sorter: true,},
{title: "氨氮", dataIndex: "ammonia", sorter: true,}, {title: "氨氮", dataIndex: "ammonia", sorter: true,},
{title: "总磷", dataIndex: "totalPhosphorus", sorter: true,},
{title: "铜", dataIndex: "cu", sorter: true,}, {title: "铜", dataIndex: "cu", sorter: true,},
{title: "锌", dataIndex: "zn", sorter: true,}, {title: "锌", dataIndex: "zn", sorter: true,},
{title: "氟化物", dataIndex: "f", sorter: true,}, {title: "氟化物", dataIndex: "f", sorter: true,},
@@ -53,4 +55,61 @@ const tableColumns = [
]; ];
export {tableColumns} const nationalTableColumns = [
{title: "水体类型", dataIndex: "waterBodyType", sorter: true,},
{title: "水资源一级区名称", dataIndex: "waterResourcesFirstLevelZoneName", sorter: true,},
{title: "水质目标", dataIndex: "waterQualityGoal", sorter: true,},
{title: "采样时间", dataIndex: "samplingTime", sorter: true,},
{title: "数据来源", dataIndex: "dataSources", sorter: true,},
{title: "断面名称", dataIndex: "sectionName", sorter: true,},
{title: "水温", dataIndex: "wtemp", sorter: true,},
{title: "pH", dataIndex: "ph", sorter: true,},
{title: "溶解氧", dataIndex: "dissolvedOxygen", sorter: true,},
{title: "高锰酸盐指数", dataIndex: "permanganateIndex", sorter: true,},
{title: "化学需氧量", dataIndex: "cod", sorter: true,},
{title: "五日生化需氧量", dataIndex: "fiveDayBod", sorter: true,},
{title: "氨氮", dataIndex: "ammonia", sorter: true,},
{title: "总磷", dataIndex: "totalPhosphorus", sorter: true,},
{title: "铜", dataIndex: "cu", sorter: true,},
{title: "锌", dataIndex: "zn", sorter: true,},
{title: "氟化物", dataIndex: "f", sorter: true,},
{title: "硒", dataIndex: "se", sorter: true,},
{title: "砷", dataIndex: "as", sorter: true,},
{title: "汞", dataIndex: "hg", sorter: true,},
{title: "镉", dataIndex: "cd", sorter: true,},
{title: "六价铬", dataIndex: "cr6", sorter: true,},
{title: "铅", dataIndex: "pb", sorter: true,},
{title: "氰化物", dataIndex: "cyanide", sorter: true,},
{title: "挥发酚", dataIndex: "vPhen", sorter: true,},
{title: "石油类", dataIndex: "oils", sorter: true,},
{title: "阴离子表面活性剂", dataIndex: "anSaa", sorter: true,},
{title: "硫化物", dataIndex: "s", sorter: true,},
{title: "粪大肠菌群", dataIndex: "coloOrg", sorter: true,},
{title: "硫酸盐", dataIndex: "so4", sorter: true,},
{title: "氯化物", dataIndex: "cl", sorter: true,},
{title: "硝酸盐氮", dataIndex: "nitrateNitrogen", sorter: true,},
{title: "铁", dataIndex: "fe", sorter: true,},
{title: "锰", dataIndex: "mn", sorter: true,},
{title: "总氮", dataIndex: "nTotal", sorter: true,},
{title: "透明度", dataIndex: "transp", sorter: true,},
{title: "叶绿素", dataIndex: "chla", sorter: true,},
{
title: "全因子评价", children: [
{title: "水功能区水质类别", dataIndex: "ffeWaterFunctionAreaWaterQualityCategory"},
{title: "达标评价结论", dataIndex: "ffeCompliantEvaluationConclusion"},
{title: "主要超标项目及其超标倍数", dataIndex: "ffeMajorOverStandardItemsMultiples"},
]
},
{
title: "水功能区限值纳污红线主要控制项目达标评价", children: [
{title: "水功能区水质类别", dataIndex: "lprlWaterFunctionAreaWaterQualityCategory"},
{title: "达标评价结论", dataIndex: "lprlCompliantEvaluationConclusion"},
{title: "主要超标项目及其超标倍数", dataIndex: "lprlMajorOverStandardItemsMultiples"},
]
},
{title: "系统编码", dataIndex: "systemCode", sorter: true,},
{title: "备注", dataIndex: "remark", sorter: true,},
];
export {tableColumns,nationalTableColumns}

View File

@@ -7,16 +7,16 @@
:wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }"> :wrapper-col="{ md: { span: 16 }, sm: { span: 24 } }">
<a-row> <a-row>
<a-form-item label="断面名称"> <a-form-item label="断面名称">
<a-select v-model:value="where.sectionName" allowClear showSearch> <a-select v-model:value="where.name" allowClear showSearch>
<a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }} <a-select-option v-for="item in sectionInfo" :key="item.sectionName">{{ item.sectionName }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-item> </a-form-item>
<a-form-item label="起始日期:"> <a-form-item label="起始日期:">
<a-date-picker valueFormat="YYYY-MM-DD 00:00:00" v-model:value="where.timeStart"></a-date-picker> <a-date-picker valueFormat="YYYY-MM-DD " v-model:value="where.startTime"></a-date-picker>
</a-form-item> </a-form-item>
<a-form-item label="结束日期:"> <a-form-item label="结束日期:">
<a-date-picker valueFormat="YYYY-MM-DD 23:59:59" v-model:value="where.timeEnd"></a-date-picker> <a-date-picker valueFormat="YYYY-MM-DD " v-model:value="where.endTime"></a-date-picker>
</a-form-item> </a-form-item>
<a-col :lg="6" :md="12" :sm="24" :xs="24"> <a-col :lg="6" :md="12" :sm="24" :xs="24">
@@ -32,7 +32,7 @@
</a-form> </a-form>
<!-- 表格 --> <!-- 表格 -->
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<ele-pro-table ref="table" :datasource="datasource" :columns="columns" :where="where" <ele-pro-table ref="table" :datasource="url" :columns="columns" :where="where"
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)"> :scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
</ele-pro-table> </ele-pro-table>
</a-spin> </a-spin>
@@ -43,15 +43,15 @@
<script> <script>
import { import {
// nationalWaterFunctionTotalUrl, nationalWaterFunctionTotalUrl,
nationalWaterFunctionTotal // nationalWaterFunctionTotal
} from "@/api/ecology/river-statis"; } from "@/api/ecology/river-statis";
import { import {
listInfo listInfo
} from "@/api/ecology/water/river-api-relate"; } from "@/api/ecology/water/river-api-relate";
import locale from "ant-design-vue/es/date-picker/locale/zh_CN"; import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
import { import {
tableColumns nationalTableColumns
} from "./colums"; } from "./colums";
import XLSX from "xlsx"; import XLSX from "xlsx";
export default { export default {
@@ -60,46 +60,16 @@
data() { data() {
return { return {
data: [], data: [],
datasource: { // datasource: {},
wTemp: '-1',
ph: '-1',
dissolvedOxygen: '-1',
cod: '-1',
fiveDayBod: '-1',
ammonia: '-1',
cu: '-1',
zn: '-1',
f: '-1',
se: '-1',
as: '-1',
hg: '-1',
cd: '-1',
cr6: '-1',
pb: '-1',
cyanide: '-1',
vPhen: '-1',
oils: '-1',
anSaa: '-1',
s: '-1',
coloOrg: '-1',
so4: '-1',
cl: '-1',
nitrateNitrogen: '-1',
fe: '-1',
mn: '-1',
nTotal: '-1',
transp: '-1',
chla: '-1'
},
locale, locale,
bill: {}, bill: {},
// 表格数据接口 // 表格数据接口
// url: nationalWaterFunctionTotalUrl, url: nationalWaterFunctionTotalUrl,
selection: [], selection: [],
tableColumns, nationalTableColumns,
// 表格列配置 // 表格列配置
columns: [ columns: [
...tableColumns, ...nationalTableColumns,
], ],
// 表格搜索条件 // 表格搜索条件
where: {}, where: {},
@@ -110,44 +80,12 @@
}, },
mounted() { mounted() {
this.loading = true; this.loading = true;
nationalWaterFunctionTotal().then((res) => { this.$refs.table.reload({
res.data.data.forEach((e) => { where: this.where,
e.wTemp = "-1";
e.ph = "-1";
e.dissolvedOxygen = "-1";
e.cod = "-1";
e.fiveDayBod = "-1";
e.ammonia = "-1";
e.cu = "-1";
e.zn = "-1";
e.f = "-1";
e.se = "-1";
e.as = "-1";
e.hg = "-1";
e.cd = "-1";
e.cr6 = "-1";
e.pb = "-1";
e.cyanide = "-1";
e.vPhen = "-1";
e.oils = "-1";
e.anSaa = "-1";
e.s = "-1";
e.coloOrg = "-1";
e.so4 = "-1";
e.cl = "-1";
e.nitrateNitrogen = "-1";
e.fe = "-1";
e.mn = "-1";
e.nTotal = "-1";
e.transp = "-1";
e.chla = "-1";
e.ffeMajorOverStandardItemsMultiples = "-1";
e.lprlMajorOverStandardItemsMultiples = "-1";
})
this.datasource = res.data.data;
this.loading = false;
}); });
this.loading = false;
}, },
created() { created() {
listInfo().then((res) => { listInfo().then((res) => {
if (res.data.code == 0) { if (res.data.code == 0) {
@@ -162,42 +100,11 @@
methods: { methods: {
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
nationalWaterFunctionTotal(this.where).then((res) => { this.loading = true;
res.data.data.forEach((e) => { this.$refs.table.reload({
e.wTemp = "-1"; where: this.where,
e.ph = "-1";
e.dissolvedOxygen = "-1";
e.cod = "-1";
e.fiveDayBod = "-1";
e.ammonia = "-1";
e.cu = "-1";
e.zn = "-1";
e.f = "-1";
e.se = "-1";
e.as = "-1";
e.hg = "-1";
e.cd = "-1";
e.cr6 = "-1";
e.pb = "-1";
e.cyanide = "-1";
e.vPhen = "-1";
e.oils = "-1";
e.anSaa = "-1";
e.s = "-1";
e.coloOrg = "-1";
e.so4 = "-1";
e.cl = "-1";
e.nitrateNitrogen = "-1";
e.fe = "-1";
e.mn = "-1";
e.nTotal = "-1";
e.transp = "-1";
e.chla = "-1";
e.ffeMajorOverStandardItemsMultiples = "-1";
e.lprlMajorOverStandardItemsMultiples = "-1";
})
this.datasource = res.data.data;
}); });
this.loading = false;
}, },
/* 重置搜索 */ /* 重置搜索 */
reset() { reset() {