江河数据采集bug修复
This commit is contained in:
Binary file not shown.
@@ -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);
|
||||
|
||||
@@ -124,20 +124,21 @@ 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 +154,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],
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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)
|
||||
// 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()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
/* 删除单个 */
|
||||
|
||||
@@ -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,8 +180,8 @@
|
||||
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);
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user