Merge branch 'xiaoman'

This commit is contained in:
shixiaoman
2021-12-17 15:40:35 +08:00
12 changed files with 270 additions and 43 deletions

View File

@@ -254,20 +254,28 @@
let {
waterSiteBillId,
billName,
reportTime
billName
} = this.editableData[record.waterSiteBillId];
let regionLevel = record.regionLevel;
let reportTime = record.createTime;
let createTime = record.createTime;
let userId = record.userId;
let checked = record.checked;
if (!waterSiteBillId || !reportTime) {
this.$message.error('请填写完整信息再提交')
return
}
const hide = this.$message.loading('请求中..', 0);
reportTime = reportTime.format("x")
reportTime = Number(reportTime)
updateRiverStationBill({
waterSiteBillId,
billName,
reportTime
reportTime,
regionLevel,
userId,
createTime,
checked
}).then(res => {
if (res.data.code == 0) {
this.$message.success(res.data.msg);

View File

@@ -122,22 +122,22 @@ export default {
},
// 国家级水功能区上报数据
toNationalLevelDataObj(excelData) {
var dataTime;
return excelData.map(item => {
let date = new Date();
let year = date.getFullYear(); // 年
var time;
var samplingTime="";
console.log(item);
if(item[14]){
time = item[14].replace('月','-').replace('日','').trim();
console.log(time);
samplingTime = year+"-"+time;
}
console.log(samplingTime);
if(samplingTime != ''){
dataTime = samplingTime;
}
// let date = new Date();
// let year = date.getFullYear(); // 年
// var time;
// var samplingTime="";
// console.log(item);
// if(item[14]){
// time = item[14].replace('月','-').replace('日','').trim();
// console.log(time);
// samplingTime = year+"-"+time;
// }
// console.log(samplingTime);
// if(samplingTime != ''){
// dataTime = samplingTime;
// }
var dataTime = moment(item[14],"YYYY/MM/DD").format("YYYY-MM-DD");
console.log(dataTime);
const row = {
waterSystem:item[1],
@@ -153,7 +153,7 @@ export default {
waterQualityGoal:item[11],
dataSources:item[12],
sectionName:item[13],
samplingTime:samplingTime==''?dataTime:samplingTime,
samplingTime:dataTime,
wTemp:item[15],
ph:item[16],
dissolvedOxygen:item[17],

View File

@@ -283,19 +283,28 @@
let {
surfaceWaterSectionBillId,
billName,
reportTime
} = this.editableData[record.surfaceWaterSectionBillId];
let regionLevel = record.regionLevel;
let reportTime = record.createTime;
let createTime = record.createTime;
let userId = record.userId;
let checked = record.checked;
if (!surfaceWaterSectionBillId || !reportTime) {
this.$message.error('请填写完整信息再提交')
return
}
const hide = this.$message.loading('请求中..', 0);
reportTime = reportTime.format("x")
reportTime = Number(reportTime)
updateRiverBill({
surfaceWaterSectionBillId,
billName,
reportTime
reportTime,
regionLevel,
userId,
createTime,
checked
}).then(res => {
if (res.data.code == 0) {
this.$message.success(res.data.msg);

View File

@@ -108,6 +108,12 @@
<a-form-item label="断面名称" name="sectionName">
<a-input v-model:value="form.sectionName" placeholder="请输入断面名称" allow-clear />
</a-form-item>
<a-form-item label="经度" name="longitude">
<a-input v-model:value="form.longitude" placeholder="请输入经度" allow-clear />
</a-form-item>
<a-form-item label="纬度" name="latitude">
<a-input v-model:value="form.latitude" placeholder="请输入纬度" allow-clear />
</a-form-item>
<a-form-item label="备注" name="remark">
<a-input v-model:value="form.remark" placeholder="请输入备注" allow-clear />
</a-form-item>
@@ -280,6 +286,14 @@ export default {
title: "数据来源",
dataIndex: "dataSources",
},
{
title: "经度",
dataIndex: "longitude",
},
{
title: "纬度",
dataIndex: "latitude",
},
{
title: "备注",
dataIndex: "remark",

View File

@@ -110,7 +110,12 @@
<a-form-item label="湖泊面积km2" name="lakeArea">
<a-input v-model:value="form.lakeArea" placeholder="请输入湖泊面积km2" allow-clear />
</a-form-item>
<a-form-item label="经度" name="longitude">
<a-input v-model:value="form.longitude" placeholder="请输入经度" allow-clear />
</a-form-item>
<a-form-item label="纬度" name="latitude">
<a-input v-model:value="form.latitude" placeholder="请输入纬度" allow-clear />
</a-form-item>
<a-form-item label="备注" name="remark">
<a-input
v-model:value="form.remark"
@@ -281,7 +286,14 @@ export default {
title: "湖泊面积km2",
dataIndex: "lakeArea",
},
{
title: "经度",
dataIndex: "longitude",
},
{
title: "纬度",
dataIndex: "latitude",
},
{
title: "备注",
dataIndex: "remark",

View File

@@ -98,7 +98,12 @@
<a-form-item label="河流级别" name="riverLevel">
<a-input v-model:value="form.riverLevel" placeholder="请输入河流级别" allow-clear />
</a-form-item>
<a-form-item label="经度" name="longitude">
<a-input v-model:value="form.longitude" placeholder="请输入经度" allow-clear />
</a-form-item>
<a-form-item label="纬度" name="latitude">
<a-input v-model:value="form.latitude" placeholder="请输入纬度" allow-clear />
</a-form-item>
</a-form>
</a-modal>
<!-- 表格 -->
@@ -247,6 +252,14 @@
dataIndex: "riverLevel",
sorter: true,
},
{
title: "经度",
dataIndex: "longitude",
},
{
title: "纬度",
dataIndex: "latitude",
},
{
title: "操作",
key: "action",

View File

@@ -81,7 +81,12 @@
<a-form-item label="水质目标" name="waterTarget">
<a-input v-model:value="form.waterTarget" placeholder="请输入水质目标" allow-clear />
</a-form-item>
<a-form-item label="经度" name="longitude">
<a-input v-model:value="form.longitude" placeholder="请输入经度" allow-clear />
</a-form-item>
<a-form-item label="纬度" name="latitude">
<a-input v-model:value="form.latitude" placeholder="请输入纬度" allow-clear />
</a-form-item>
</a-form>
</a-modal>
<!-- 表格 -->
@@ -189,6 +194,14 @@ export default {
title: "水质目标",
dataIndex: "waterTarget",
},
{
title: "经度",
dataIndex: "longitude",
},
{
title: "纬度",
dataIndex: "latitude",
},
{
title: "操作",
key: "action",

View File

@@ -105,7 +105,8 @@
import {
removeRiverStationBill,
removeBatchRiverStationBill,
verifyRiverStationBill
verifyRiverStationBill,
updateRiverStationBill,
} from "@/api/ecology/river-station";
import moment from "moment";
export default {
@@ -289,23 +290,34 @@
},
save(record) {
console.log(record);
let {
nationalLevelWaterFunctionAreaBillId,
billName,
reportTime
} = this.editableData[record.nationalLevelWaterFunctionAreaBillId];
} =this.editableData[record.nationalLevelWaterFunctionAreaBillId];
console.log(billName);
let regionLevel = record.regionLevel;
let reportTime = record.createTime;
let createTime = record.createTime;
let userId = record.userId
let checked = record.checked
if (!nationalLevelWaterFunctionAreaBillId || !reportTime) {
this.$message.error('请填写完整信息再提交')
return
}
const hide = this.$message.loading('请求中..', 0);
reportTime = reportTime.format("x")
reportTime = Number(reportTime)
updateWaterFunctionAreaBill({
// reportTime = reportTime.format("x")
// reportTime = Number(reportTime)
if(record.regionLevel == '1'){
updateWaterFunctionAreaBill({
nationalLevelWaterFunctionAreaBillId,
billName,
reportTime
reportTime,
regionLevel,
userId,
createTime,
checked
}).then(res => {
if (res.data.code == 0) {
this.$message.success(res.data.msg);
@@ -321,6 +333,33 @@
delete this.editableData[record.nationalLevelWaterFunctionAreaBillId]
hide()
})
}else{
let waterStationWaterFunctionAreaBillId = nationalLevelWaterFunctionAreaBillId
updateRiverStationBill({
waterStationWaterFunctionAreaBillId,
billName,
reportTime,
regionLevel,
userId,
createTime,
checked
}).then(res => {
if (res.data.code == 0) {
this.$message.success(res.data.msg);
record.billName = billName;
record.reportTime = reportTime
} else {
this.$message.error(res.data.msg);
}
}).catch(e => {
console.log(e);
this.$message.error(e.message);
}).finally(() => {
delete this.editableData[record.nationalLevelWaterFunctionAreaBillId]
hide()
})
}
},
/* 删除单个 */

View File

@@ -20,7 +20,7 @@
</a-select>
</a-form-item>
<a-form-item label="监测类型">
<a-select v-model:value="where.monitorType" placeholder="请选择监测类型" allowClear showSearch>
<a-select v-model:value="where.monitorType" placeholder="请选择监测类型" @change="handleChange" allowClear showSearch>
<a-select-option :value="'1'">全因子</a-select-option>
<a-select-option :value="'2'">纳污红线</a-select-option>
</a-select>
@@ -114,6 +114,64 @@
})
},
methods: {
handleChange() {
console.log(this.columns.length);
console.log(this.where.monitorType);
let item1 = {
title: "水功能区限值纳污红线主要控制项目达标评价",
children: [{
title: "水功能区水质类别",
dataIndex: "lprlWaterFunctionAreaWaterQualityCategory"
},
{
title: "达标评价结论",
dataIndex: "lprlCompliantEvaluationConclusion"
},
{
title: "主要超标项目及其超标倍数",
dataIndex: "lprlMajorOverStandardItemsMultiples"
},
]
};
let item2 = {
title: "全因子评价",
children: [{
title: "水功能区水质类别",
dataIndex: "ffeWaterFunctionAreaWaterQualityCategory"
},
{
title: "达标评价结论",
dataIndex: "ffeCompliantEvaluationConclusion"
},
{
title: "主要超标项目及其超标倍数",
dataIndex: "ffeMajorOverStandardItemsMultiples"
},
]
};
let item3 = {title: "系统编码", dataIndex: "systemCode", sorter: true,};
let item4 = {title: "备注", dataIndex: "remark", sorter: true,};
if(this.where.monitorType == undefined){
this.columns.splice(37, 1, item2);
this.columns.splice(38, 1, item1);
this.columns.splice(39, 1, item3);
this.columns.splice(40, 1, item4);
}
if (this.columns.length == 40) {
if (this.where.monitorType == '2') {
this.columns.splice(37, 1, item1);
} else if (this.where.monitorType == '1') {
this.columns.splice(37, 1, item2);
}
}
if (this.columns.length == 41) {
if (this.where.monitorType == '2') {
this.columns.splice(37, 1);
} else if (this.where.monitorType == '1') {
this.columns.splice(38, 1);
}
}
},
/* 刷新表格 */
reload() {
this.loading = true;
@@ -122,12 +180,12 @@
console.log(res.data.data);
if (res.data.code == 0) {
this.$message.success(res.data.msg);
if(res.data.data != undefined){
res.data.data.forEach((e=>{
if (res.data.data != undefined) {
res.data.data.forEach((e => {
this.datasource.push(e);
}))
}
} else {
this.$message.error(res.data.msg);
}

View File

@@ -20,7 +20,7 @@
</a-select>
</a-form-item>
<a-form-item label="监测类型">
<a-select v-model:value="where.monitorType" placeholder="请选择监测类型" allowClear showSearch>
<a-select v-model:value="where.monitorType" placeholder="请选择监测类型" @change="handleChange" allowClear showSearch>
<a-select-option :value="'1'">全因子</a-select-option>
<a-select-option :value="'2'">纳污红线</a-select-option>
</a-select>
@@ -116,6 +116,67 @@
})
},
methods: {
handleChange() {
this.columns.forEach((e,index)=>{
console.log("jjjjj"+e.title+"index"+index);
})
console.log(this.columns.length);
console.log(this.where.monitorType);
let item1 = {
title: "水功能区限值纳污红线主要控制项目达标评价",
children: [{
title: "水功能区水质类别",
dataIndex: "lprlWaterFunctionAreaWaterQualityCategory"
},
{
title: "达标评价结论",
dataIndex: "lprlCompliantEvaluationConclusion"
},
{
title: "主要超标项目及其超标倍数",
dataIndex: "lprlMajorOverStandardItemsMultiples"
},
]
};
let item2 = {
title: "全因子评价",
children: [{
title: "水功能区水质类别",
dataIndex: "ffeWaterFunctionAreaWaterQualityCategory"
},
{
title: "达标评价结论",
dataIndex: "ffeCompliantEvaluationConclusion"
},
{
title: "主要超标项目及其超标倍数",
dataIndex: "ffeMajorOverStandardItemsMultiples"
},
]
};
let item3 = {title: "系统编码", dataIndex: "systemCode", sorter: true,};
let item4 = {title: "备注", dataIndex: "remark", sorter: true,};
if(this.where.monitorType == undefined){
this.columns.splice(37, 1, item2);
this.columns.splice(38, 1, item1);
this.columns.splice(39, 1, item3);
this.columns.splice(40, 1, item4);
}
if (this.columns.length == 40) {
if (this.where.monitorType == '2') {
this.columns.splice(37, 1, item1);
} else if (this.where.monitorType == '1') {
this.columns.splice(37, 1, item2);
}
}
if (this.columns.length == 41) {
if (this.where.monitorType == '2') {
this.columns.splice(37, 1);
} else if (this.where.monitorType == '1') {
this.columns.splice(38, 1);
}
}
},
/* 刷新表格 */
reload() {
this.loading = true;