江河水模块代码提交
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
const tableColumns = [
|
||||
{title: "城区", dataIndex: "area", sorter: true,},
|
||||
{title: "县", dataIndex: "county", sorter: true,},
|
||||
{title: "所在流域", dataIndex: "watershed", sorter: true,},
|
||||
{title: "所在河流", dataIndex: "river", sorter: true,},
|
||||
{title: "站点名称", dataIndex: "place", sorter: true,},
|
||||
{title: "本期水质", dataIndex: "periodWaterQuality", sorter: true,},
|
||||
// {title: "城区", dataIndex: "area", sorter: true,},
|
||||
// {title: "县", dataIndex: "county", sorter: true,},
|
||||
{title: "河流名称", dataIndex: "riverName", sorter: true,},
|
||||
{title: "站点名称", dataIndex: "stationName", sorter: true,},
|
||||
{title: "水质目标", dataIndex: "waterTarget", sorter: true,},
|
||||
{title: "水温", dataIndex: "waterTemperature", sorter: true,},
|
||||
{title: "pH值", dataIndex: "ph", sorter: true,},
|
||||
{title: "溶解氧", dataIndex: "dissolvedOxygen", sorter: true,},
|
||||
@@ -14,8 +13,10 @@ const tableColumns = [
|
||||
{title: "氨氮", dataIndex: "ammonia", sorter: true,},
|
||||
{title: "总磷", dataIndex: "totalPhosphorus", sorter: true,},
|
||||
{title: "总氮", dataIndex: "totalNitrogen", sorter: true,},
|
||||
{title: "主要污染指标(超标倍数)", dataIndex: "mainPollutionIndicators", sorter: true,},
|
||||
{title: "备注", dataIndex: "remark", sorter: true,},
|
||||
{title: "叶绿素α(mg/L)", dataIndex: "chlorophyll", sorter: true,},
|
||||
{title: "藻密度(cells/L)", dataIndex: "algalDensity", sorter: true,},
|
||||
{title: "水质类别", dataIndex: "waterQualityType", sorter: true,},
|
||||
{title: "污染指标", dataIndex: "mainPollutionIndicators", sorter: true,},
|
||||
];
|
||||
|
||||
export {tableColumns}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!-- 江河水站导入excel表页面 -->
|
||||
<template>
|
||||
<div>
|
||||
<!-- 表格 -->
|
||||
@@ -100,12 +101,11 @@
|
||||
import { Modal } from 'ant-design-vue';
|
||||
import {
|
||||
pageBillUrl,
|
||||
// saveRiverStationBill,
|
||||
removeRiverStationBill,
|
||||
removeBatchRiverStationBill,
|
||||
updateRiverStationBill,
|
||||
verifyRiverStationBill
|
||||
} from "@/api/ecology/river-station";
|
||||
} from "@/api/ecology/river-site";
|
||||
import moment from "moment";
|
||||
export default {
|
||||
name: 'DrinkingCollectWaterBill',
|
||||
@@ -144,30 +144,6 @@
|
||||
sorter: true,
|
||||
|
||||
},
|
||||
// {
|
||||
// title: '菜单名称',
|
||||
// dataIndex: 'title',
|
||||
// sorter: true
|
||||
// },
|
||||
// {
|
||||
// title: '监测时间',
|
||||
// dataIndex: 'reportTime',
|
||||
// sorter: true,
|
||||
// slots: {
|
||||
// customRender: 'reportTime',
|
||||
// },
|
||||
// // customRender: ({
|
||||
// // text
|
||||
// // }) => this.$util.toDateString(text)
|
||||
// },
|
||||
// {
|
||||
// title: '导入时间',
|
||||
// dataIndex: 'createTime',
|
||||
// sorter: true,
|
||||
// customRender: ({
|
||||
// text
|
||||
// }) => this.$util.toDateString(text)
|
||||
// },
|
||||
{
|
||||
title: '导入时间',
|
||||
dataIndex: 'createTime',
|
||||
@@ -242,18 +218,18 @@
|
||||
},
|
||||
detail(record) {
|
||||
this.$router.replace({
|
||||
path: "/water/river/station/collect/water/" + record.waterStationWaterFunctionAreaBillId
|
||||
path: "/water/river/station/collect/water/" + record.waterSiteBillId
|
||||
})
|
||||
},
|
||||
edit(record) {
|
||||
this.editableData[record.waterStationWaterFunctionAreaBillId] = _.cloneDeep(record);
|
||||
this.editableData[record.waterStationWaterFunctionAreaBillId].reportTime = moment(this.editableData[record.waterStationWaterFunctionAreaBillId]
|
||||
this.editableData[record.waterSiteBillId] = _.cloneDeep(record);
|
||||
this.editableData[record.waterSiteBillId].reportTime = moment(this.editableData[record.waterSiteBillId]
|
||||
.reportTime)
|
||||
},
|
||||
verify(record,checked) {
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
verifyRiverStationBill({
|
||||
waterStationWaterFunctionAreaBillId: record.waterStationWaterFunctionAreaBillId,
|
||||
waterSiteBillId: record.waterSiteBillId,
|
||||
checked
|
||||
}).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
@@ -277,11 +253,11 @@
|
||||
save(record) {
|
||||
|
||||
let {
|
||||
waterStationWaterFunctionAreaBillId,
|
||||
waterSiteBillId,
|
||||
billName,
|
||||
reportTime
|
||||
} = this.editableData[record.waterStationWaterFunctionAreaBillId];
|
||||
if (!waterStationWaterFunctionAreaBillId || !reportTime) {
|
||||
} = this.editableData[record.waterSiteBillId];
|
||||
if (!waterSiteBillId || !reportTime) {
|
||||
this.$message.error('请填写完整信息再提交')
|
||||
return
|
||||
}
|
||||
@@ -289,7 +265,7 @@
|
||||
reportTime = reportTime.format("x")
|
||||
reportTime = Number(reportTime)
|
||||
updateRiverStationBill({
|
||||
waterStationWaterFunctionAreaBillId,
|
||||
waterSiteBillId,
|
||||
billName,
|
||||
reportTime
|
||||
}).then(res => {
|
||||
@@ -304,7 +280,7 @@
|
||||
console.log(e);
|
||||
this.$message.error(e.message);
|
||||
}).finally(() => {
|
||||
delete this.editableData[record.waterStationWaterFunctionAreaBillId]
|
||||
delete this.editableData[record.waterSiteBillId]
|
||||
hide()
|
||||
})
|
||||
|
||||
@@ -312,7 +288,7 @@
|
||||
/* 删除单个 */
|
||||
remove(row) {
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
removeRiverStationBill(row.waterStationWaterFunctionAreaBillId).then(res => {
|
||||
removeRiverStationBill(row.waterSiteBillId).then(res => {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success(res.data.msg);
|
||||
this.reload();
|
||||
@@ -324,7 +300,7 @@
|
||||
}).finally(() => hide());
|
||||
},
|
||||
removeBatch() {
|
||||
const ids = this.selectionList.map(item => item.waterStationWaterFunctionAreaBillId);
|
||||
const ids = this.selectionList.map(item => item.waterSiteBillId);
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
removeBatchRiverStationBill(ids).then(res => {
|
||||
if (res.data.code === 0) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!-- 江河水站导入数据列表页面 -->
|
||||
<template>
|
||||
<div class="ele-body">
|
||||
<a-card :bordered="false">
|
||||
@@ -31,7 +32,7 @@
|
||||
</a-form>
|
||||
<a-modal
|
||||
v-model:visible="showEdit"
|
||||
:title="form.waterStationRiverStationId !== undefined ? '修改记录' : '添加记录'"
|
||||
:title="form.waterSiteId !== undefined ? '修改记录' : '添加记录'"
|
||||
:confirm-loading="loading"
|
||||
:width="1000"
|
||||
:body-style="{ paddingBottom: '8px' }"
|
||||
@@ -48,9 +49,9 @@
|
||||
>
|
||||
<a-row gutter="12" >
|
||||
<a-col :md="12" :sm="24">
|
||||
<a-form-item label="采样时间" name="monitorDate">
|
||||
<a-form-item label="采样时间" name="samplingTime">
|
||||
<a-date-picker
|
||||
v-model:value="form.monitorDate"
|
||||
v-model:value="form.samplingTime"
|
||||
:locale="locale"
|
||||
/>
|
||||
</a-form-item>
|
||||
@@ -95,7 +96,7 @@
|
||||
<ele-pro-table
|
||||
v-model:selection="selectionList"
|
||||
ref="table"
|
||||
row-key="waterStationRiverStationId"
|
||||
row-key="waterSiteId"
|
||||
:datasource="url"
|
||||
:columns="columns"
|
||||
:where="where"
|
||||
@@ -157,8 +158,7 @@ import {
|
||||
removeBatchRiverStation,
|
||||
updateRiverStation,
|
||||
getRiverStationBill,
|
||||
// getColumnOptions,
|
||||
} from "@/api/ecology/river-station";
|
||||
} from "@/api/ecology/river-site";
|
||||
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
|
||||
import moment from "moment";
|
||||
import { tableColumns } from "./colums";
|
||||
@@ -196,9 +196,9 @@ export default {
|
||||
},
|
||||
],
|
||||
// 表格搜索条件
|
||||
nationalLevelRiverStationBillId: billId,
|
||||
waterSiteBillId: billId,
|
||||
where: {
|
||||
nationalLevelRiverStationBillId: billId,
|
||||
waterSiteBillId: billId,
|
||||
},
|
||||
// 表格选中数据
|
||||
selectionList: [],
|
||||
@@ -234,7 +234,7 @@ export default {
|
||||
/* 重置搜索 */
|
||||
reset() {
|
||||
this.where = {
|
||||
nationalLevelRiverStationBillId: this.nationalLevelRiverStationBillId,
|
||||
waterSiteBillId: this.waterSiteBillId,
|
||||
};
|
||||
this.reload();
|
||||
},
|
||||
@@ -257,21 +257,7 @@ export default {
|
||||
save() {
|
||||
const hide = this.$message.loading("请求中..", 0);
|
||||
const form = _.cloneDeep(this.form);
|
||||
const date = new Date();
|
||||
date.setFullYear(form.monitorDate.year());
|
||||
date.setMonth(form.monitorDate.month());
|
||||
date.setDate(form.monitorDate.date());
|
||||
date.setHours(form.monitorTime.hour());
|
||||
date.setMinutes(form.monitorTime.minutes());
|
||||
form.samplingTime = date.getTime();
|
||||
// form.monitorYear = date.getFullYear();
|
||||
// form.monitorMonth = date.getMonth() + 1;
|
||||
// form.monitorDay = date.getDate();
|
||||
// form.monitorHour = date.getHours();
|
||||
// form.monitorMinute = date.getMinutes();
|
||||
delete form["monitorDate"];
|
||||
delete form["monitorTime"];
|
||||
if (form.waterStationRiverStationId) {
|
||||
if (form.waterSiteId) {
|
||||
updateRiverStation(form)
|
||||
.then((res) => {
|
||||
if (res.data.code == 0) {
|
||||
@@ -290,7 +276,8 @@ export default {
|
||||
hide();
|
||||
});
|
||||
} else {
|
||||
form.nationalLevelRiverStationBillId = this.nationalLevelRiverStationBillId;
|
||||
form.waterSiteBillId = this.waterSiteBillId;
|
||||
form.userId = this.$store.state.user.user.userId
|
||||
saveRiverStation(form)
|
||||
.then((res) => {
|
||||
if (res.data.code == 0) {
|
||||
@@ -312,7 +299,7 @@ export default {
|
||||
/* 删除单个 */
|
||||
remove(row) {
|
||||
const hide = this.$message.loading("请求中..", 0);
|
||||
removeRiverStation(row.waterStationRiverStationId)
|
||||
removeRiverStation(row.waterSiteId)
|
||||
.then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success(res.data.msg);
|
||||
@@ -327,7 +314,7 @@ export default {
|
||||
.finally(() => hide());
|
||||
},
|
||||
removeBatch() {
|
||||
const ids = this.selectionList.map((item) => item.waterStationRiverStationId);
|
||||
const ids = this.selectionList.map((item) => item.waterSiteId);
|
||||
const hide = this.$message.loading("请求中..", 0);
|
||||
removeBatchRiverStation(ids)
|
||||
.then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user