新增/修复农村饮用水板块,修复市级县级饮用水板块
This commit is contained in:
BIN
public/template/农村村庄地下水饮用水.xlsx
Normal file
BIN
public/template/农村村庄地下水饮用水.xlsx
Normal file
Binary file not shown.
BIN
public/template/农村村庄地表水饮用水.xlsx
Normal file
BIN
public/template/农村村庄地表水饮用水.xlsx
Normal file
Binary file not shown.
Binary file not shown.
BIN
public/template/县级地下水饮用水.xlsx
Normal file
BIN
public/template/县级地下水饮用水.xlsx
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/template/县级(在用)地表水饮用水.xlsm
Normal file
BIN
public/template/县级(在用)地表水饮用水.xlsm
Normal file
Binary file not shown.
BIN
public/template/县级(备用、规划)地表水饮用水.xls
Normal file
BIN
public/template/县级(备用、规划)地表水饮用水.xls
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
public/template/市级(在用)地表水饮用水.xls
Normal file
BIN
public/template/市级(在用)地表水饮用水.xls
Normal file
Binary file not shown.
BIN
public/template/市级(备用)地表水饮用水.xlsx
Normal file
BIN
public/template/市级(备用)地表水饮用水.xlsx
Normal file
Binary file not shown.
@@ -50,6 +50,10 @@ const removeBatchDrinkingWater = function (ids) {
|
||||
const updateDrinkingWater = function (data) {
|
||||
return axios.put("/drinkingWater/drinkingWater",data)
|
||||
}
|
||||
//批量修改取水量
|
||||
const updateWaterWithdrawal=function(data){
|
||||
return axios.put("/drinkingWater/drinkingWater/updateWater",data)
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -89,6 +93,7 @@ export {
|
||||
getColumnOptions,
|
||||
listAll,
|
||||
getGisBase,
|
||||
getGisArea
|
||||
getGisArea,
|
||||
updateWaterWithdrawal
|
||||
|
||||
}
|
||||
|
||||
@@ -1,70 +1,71 @@
|
||||
const tableColumns = [
|
||||
{title: "省",dataIndex: "province",sorter: true,},
|
||||
{title: "市",dataIndex: "city",sorter: true,},
|
||||
{title: "城区",dataIndex: "城区",sorter: true,},
|
||||
{title: "县",dataIndex: "county",sorter: true,},
|
||||
{title: "乡镇",dataIndex: "township",sorter: true,},
|
||||
{title: "村",dataIndex: "village",sorter: true,},
|
||||
{title: "点位名称",dataIndex: "place",sorter: true,},
|
||||
// {title: "监测时间",dataIndex: "monitorTime",sorter: true,},
|
||||
{title: "湖库(是/否)",dataIndex: "lakeLibraryFlag",sorter: true,},
|
||||
{title: "必测村庄(是/否) ",dataIndex: "mustTestVillagesFlag",sorter: true,},
|
||||
{title: "经度(°)",dataIndex: "longitude",sorter: true,},
|
||||
{title: "纬度(°)",dataIndex: "latitude",sorter: true,},
|
||||
{title: "服务人口数量(人)",dataIndex: "numberServingPopulation",sorter: true,},
|
||||
{title: "日供水规模(吨)",dataIndex: "dailyWaterSupplyScale",sorter: true,},
|
||||
{title: "水温(℃)",dataIndex: "waterTemperature",sorter: true,},
|
||||
{title: "pH(mg/L)",dataIndex: "ph",sorter: true,},
|
||||
{title: "溶解氧(mg/L)",dataIndex: "dissolvedOxygen",sorter: true,},
|
||||
{title: "高锰酸盐指数(mg/L)",dataIndex: "permanganateIndex",sorter: true,},
|
||||
{title: "五日生化需氧量(mg/L)",dataIndex: "fiveDayBod",sorter: true,},
|
||||
{title: "氨氮(mg/L)",dataIndex: "ammonia",sorter: true,},
|
||||
{title: "总磷 (mg/L)",dataIndex: "totalPhosphorus",sorter: true,},
|
||||
{title: "总氮 (mg/L)",dataIndex: "totalNitrogen",sorter: true,},
|
||||
{title: "铜 (mg/L)",dataIndex: "cu",sorter: true,},
|
||||
{title: "锌 (mg/L)",dataIndex: "zn",sorter: true,},
|
||||
{title: "氟化物(mg/L)",dataIndex: "fluoride",sorter: true,},
|
||||
{title: "硒 (mg/L)",dataIndex: "se",sorter: true,},
|
||||
{title: "砷 (mg/L)",dataIndex: "as",sorter: true,},
|
||||
{title: "汞 (mg/L)",dataIndex: "hg",sorter: true,},
|
||||
{title: "镉 (mg/L)",dataIndex: "cd",sorter: true,},
|
||||
{title: "铬(六价)(mg/L)",dataIndex: "cr",sorter: true,},
|
||||
{title: "铅 (mg/L)",dataIndex: "pb",sorter: true,},
|
||||
{title: "氰化物 (mg/L)",dataIndex: "cyanide",sorter: true,},
|
||||
{title: "挥发酚 (mg/L)",dataIndex: "volatilePhenol",sorter: true,},
|
||||
{title: "石油类 (mg/L)",dataIndex: "petro",sorter: true,},
|
||||
{title: "阴离子表面活性剂 (mg/L)",dataIndex: "anionicSurfactant",sorter: true,},
|
||||
{title: "硫化物 (mg/L)",dataIndex: "sulfide",sorter: true,},
|
||||
{title: "粪大肠菌群(个/L)",dataIndex: "fecalColiforms",sorter: true,},
|
||||
{title: "硫酸盐 (mg/L)",dataIndex: "sulfate",sorter: true,},
|
||||
{title: "氯化物 (mg/L)",dataIndex: "chloride",sorter: true,},
|
||||
{title: "硝酸盐氮 (mg/L)",dataIndex: "nitrateNitrogen",sorter: true,},
|
||||
{title: "铁 (mg/L)",dataIndex: "fe",sorter: true,},
|
||||
{title: "锰 (mg/L)",dataIndex: "mn",sorter: true,},
|
||||
{title: "水质类别",dataIndex: "waterQualityCategory",sorter: true,},
|
||||
{title: "特征污染物监测项目名称",dataIndex: "characteristicPollutantMonitoringProjectName",sorter: true,},
|
||||
{title: "特征污染物监测数值(mg/L)",dataIndex: "characteristicPollutantMonitoringValue",sorter: true,},
|
||||
{title: "色(mg/L)",dataIndex: "color",sorter: true,},
|
||||
{title: "嗅和味",dataIndex: "smellAndTaste",sorter: true,},
|
||||
{title: "浊度",dataIndex: "turbidity",sorter: true,},
|
||||
{title: "肉眼可见物",dataIndex: "visibleNakedEye",sorter: true,},
|
||||
{title: "总硬度(mg/L)",dataIndex: "totalHardness",sorter: true,},
|
||||
{title: "溶解性总固体(mg/L)",dataIndex: "totalDissolvedSolids",sorter: true,},
|
||||
{title: "铝(mg/L)",dataIndex: "ai",sorter: true,},
|
||||
{title: "耗氧量(mg/L)",dataIndex: "oxygenConsumption",sorter: true,},
|
||||
{title: "硝酸盐(mg/L)",dataIndex: "nitrate",sorter: true,},
|
||||
{title: "亚硝酸盐(mg/L)",dataIndex: "nitrite",sorter: true,},
|
||||
{title: "钠(mg/L)",dataIndex: "na",sorter: true,},
|
||||
{title: "碘化物(mg/L)",dataIndex: "lodide",sorter: true,},
|
||||
{title: "总大肠菌群(个/L)",dataIndex: "totalColiform",sorter: true,},
|
||||
{title: "菌落总数(CFU/mL))",dataIndex: "totalNumberColonies",sorter: true,},
|
||||
{title: "三氯甲烷(μg/L)",dataIndex: "chcl3",sorter: true,},
|
||||
{title: "四氯化碳 (μg/L)",dataIndex: "ccl4",sorter: true,},
|
||||
{title: "苯 (μg/L)",dataIndex: "c6h6",sorter: true,},
|
||||
{title: "甲苯 (μg/L)",dataIndex: "c7h8",sorter: true,},
|
||||
{title: "总α放射性(Bq/L)",dataIndex: "totalAlphaRadioactivity",sorter: true,},
|
||||
{title: "总β放射性(Bq/L)",dataIndex: "totalBetaRadioactivity",sorter: true,},
|
||||
{title: "备注",dataIndex: "remark",sorter: true,},
|
||||
];
|
||||
{title:"断面代码",dataIndex:"sectionCode",sorter:true},
|
||||
{title: "省",dataIndex: "province",sorter: true,},
|
||||
{title: "市",dataIndex: "city",sorter: true,},
|
||||
// {title: "城区",dataIndex: "城区",sorter: true,},
|
||||
{title: "县",dataIndex: "county",sorter: true,},
|
||||
{title: "乡镇",dataIndex: "township",sorter: true,},
|
||||
{title: "村",dataIndex: "village",sorter: true,},
|
||||
{title: "点位名称",dataIndex: "place",sorter: true,},
|
||||
// {title: "监测时间",dataIndex: "monitorTime",sorter: true,},
|
||||
{title: "湖库(是/否)",dataIndex: "lakeLibraryFlag",sorter: true,},
|
||||
// {title: "必测村庄(是/否) ",dataIndex: "mustTestVillagesFlag",sorter: true,},
|
||||
{title: "经度(°)",dataIndex: "longitude",sorter: true,},
|
||||
{title: "纬度(°)",dataIndex: "latitude",sorter: true,},
|
||||
{title: "服务人口数量(人)",dataIndex: "numberServingPopulation",sorter: true,},
|
||||
{title: "日供水规模(吨)",dataIndex: "dailyWaterSupplyScale",sorter: true,},
|
||||
{title: "水温(℃)",dataIndex: "waterTemperature",sorter: true,},
|
||||
{title: "pH(mg/L)",dataIndex: "ph",sorter: true,},
|
||||
{title: "溶解氧(mg/L)",dataIndex: "dissolvedOxygen",sorter: true,},
|
||||
{title: "高锰酸盐指数(mg/L)",dataIndex: "permanganateIndex",sorter: true,},
|
||||
{title: "五日生化需氧量(mg/L)",dataIndex: "fiveDayBod",sorter: true,},
|
||||
{title: "氨氮(mg/L)",dataIndex: "ammonia",sorter: true,},
|
||||
{title: "总磷 (mg/L)",dataIndex: "totalPhosphorus",sorter: true,},
|
||||
{title: "总氮 (mg/L)",dataIndex: "totalNitrogen",sorter: true,},
|
||||
{title: "铜 (mg/L)",dataIndex: "cu",sorter: true,},
|
||||
{title: "锌 (mg/L)",dataIndex: "zn",sorter: true,},
|
||||
{title: "氟化物(mg/L)",dataIndex: "fluoride",sorter: true,},
|
||||
{title: "硒 (mg/L)",dataIndex: "se",sorter: true,},
|
||||
{title: "砷 (mg/L)",dataIndex: "as",sorter: true,},
|
||||
{title: "汞 (mg/L)",dataIndex: "hg",sorter: true,},
|
||||
{title: "镉 (mg/L)",dataIndex: "cd",sorter: true,},
|
||||
{title: "铬(六价)(mg/L)",dataIndex: "cr",sorter: true,},
|
||||
{title: "铅 (mg/L)",dataIndex: "pb",sorter: true,},
|
||||
{title: "氰化物 (mg/L)",dataIndex: "cyanide",sorter: true,},
|
||||
{title: "挥发酚 (mg/L)",dataIndex: "volatilePhenol",sorter: true,},
|
||||
{title: "石油类 (mg/L)",dataIndex: "petro",sorter: true,},
|
||||
{title: "阴离子表面活性剂 (mg/L)",dataIndex: "anionicSurfactant",sorter: true,},
|
||||
{title: "硫化物 (mg/L)",dataIndex: "sulfide",sorter: true,},
|
||||
{title: "粪大肠菌群(个/L)",dataIndex: "fecalColiforms",sorter: true,},
|
||||
{title: "硫酸盐 (mg/L)",dataIndex: "sulfate",sorter: true,},
|
||||
{title: "氯化物 (mg/L)",dataIndex: "chloride",sorter: true,},
|
||||
{title: "硝酸盐氮 (mg/L)",dataIndex: "nitrateNitrogen",sorter: true,},
|
||||
{title: "铁 (mg/L)",dataIndex: "fe",sorter: true,},
|
||||
{title: "锰 (mg/L)",dataIndex: "mn",sorter: true,},
|
||||
{title: "水质类别",dataIndex: "waterQualityCategory",sorter: true,},
|
||||
{title: "特征污染物监测项目名称",dataIndex: "characteristicPollutantMonitoringProjectName",sorter: true,},
|
||||
{title: "特征污染物监测数值(mg/L)",dataIndex: "characteristicPollutantMonitoringValue",sorter: true,},
|
||||
{title: "色(mg/L)",dataIndex: "color",sorter: true,},
|
||||
{title: "嗅和味",dataIndex: "smellAndTaste",sorter: true,},
|
||||
{title: "浊度",dataIndex: "turbidity",sorter: true,},
|
||||
{title: "肉眼可见物",dataIndex: "visibleNakedEye",sorter: true,},
|
||||
{title: "总硬度(mg/L)",dataIndex: "totalHardness",sorter: true,},
|
||||
{title: "溶解性总固体(mg/L)",dataIndex: "totalDissolvedSolids",sorter: true,},
|
||||
{title: "铝(mg/L)",dataIndex: "ai",sorter: true,},
|
||||
{title: "耗氧量(mg/L)",dataIndex: "oxygenConsumption",sorter: true,},
|
||||
{title: "硝酸盐(mg/L)",dataIndex: "nitrate",sorter: true,},
|
||||
{title: "亚硝酸盐(mg/L)",dataIndex: "nitrite",sorter: true,},
|
||||
{title: "钠(mg/L)",dataIndex: "na",sorter: true,},
|
||||
{title: "碘化物(mg/L)",dataIndex: "lodide",sorter: true,},
|
||||
{title: "总大肠菌群(个/L)",dataIndex: "totalColiform",sorter: true,},
|
||||
{title: "菌落总数(CFU/mL))",dataIndex: "totalNumberColonies",sorter: true,},
|
||||
{title: "三氯甲烷(μg/L)",dataIndex: "chcl3",sorter: true,},
|
||||
{title: "四氯化碳 (μg/L)",dataIndex: "ccl4",sorter: true,},
|
||||
{title: "苯 (μg/L)",dataIndex: "c6h6",sorter: true,},
|
||||
{title: "甲苯 (μg/L)",dataIndex: "c7h8",sorter: true,},
|
||||
{title: "总α放射性(Bq/L)",dataIndex: "totalAlphaRadioactivity",sorter: true,},
|
||||
{title: "总β放射性(Bq/L)",dataIndex: "totalBetaRadioactivity",sorter: true,},
|
||||
{title: "备注",dataIndex: "remark",sorter: true,},
|
||||
];
|
||||
|
||||
export {tableColumns}
|
||||
export {tableColumns}
|
||||
@@ -18,6 +18,18 @@
|
||||
<a-button>农村地下水导入</a-button>
|
||||
</a-upload>
|
||||
</a-space>
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item @click="download('农村村庄地表水饮用水','xlsx')"> 农村村庄地表水饮用水</a-menu-item>
|
||||
<a-menu-item @click="download('农村村庄地表水饮用水','xlsx')"> 农村村庄地表水饮用水</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button type="primary" style="left: 10px">
|
||||
模板下载
|
||||
<DownOutlined />
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane tab="农村饮用水" key="water">
|
||||
@@ -33,11 +45,18 @@ import XLSX from "xlsx";
|
||||
import utils from "./utils";
|
||||
import { Modal } from "ant-design-vue";
|
||||
import WaterBill from "./water-bill.vue";
|
||||
import { DownOutlined } from "@ant-design/icons-vue";
|
||||
import { saveDrinkingWaterVillageBill } from "@/api/ecology/drinking-water-village";
|
||||
import {
|
||||
downloadTemplatexls,
|
||||
downloadTemplate,
|
||||
downloadTemplatexlsm,
|
||||
} from "@/utils/excel-util";
|
||||
export default {
|
||||
name: "DrinkWaterVillageCollectIndex",
|
||||
components: {
|
||||
WaterBill,
|
||||
DownOutlined,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -45,7 +64,7 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
/* 导入本地excel文件 */
|
||||
/* 导入农村地表水文件 */
|
||||
importFileTop(file) {
|
||||
const hide = this.$message.loading("导入中..", 0);
|
||||
let reader = new FileReader();
|
||||
@@ -58,19 +77,23 @@ export default {
|
||||
//0.昼间数据 1.夜间数据 2.其他信息
|
||||
let sheetNames = workbook.SheetNames;
|
||||
// 解析成二维数组
|
||||
let aoa1 = XLSX.utils.sheet_to_json(workbook.Sheets[sheetNames[0]], {
|
||||
let aoa1 = XLSX.utils.sheet_to_json(
|
||||
workbook.Sheets[sheetNames[0]], {
|
||||
header: 1,
|
||||
});
|
||||
|
||||
const drinkingWaterVillageList = aoa1.filter((item) => {
|
||||
return item.length >= 40 && typeof item[0] == "number";
|
||||
// return item.length >= 40 && typeof item[0] == "number";
|
||||
return (
|
||||
item.length >= 40 && item[0] && !item[0].includes("断面代码") && !item[0].includes("导出人") && !item[0].includes("地表水")
|
||||
);
|
||||
});
|
||||
|
||||
// 解析成对象数组
|
||||
console.log(file);
|
||||
// console.log(file);
|
||||
const billName1 = file.name;
|
||||
const billData1 = utils.toVillageTop(drinkingWaterVillageList);
|
||||
|
||||
// console.log(billData1);
|
||||
if (!billData1 || billData1.length == 0) {
|
||||
hide();
|
||||
Modal.error({
|
||||
@@ -126,6 +149,7 @@ export default {
|
||||
reader.readAsArrayBuffer(file);
|
||||
return false;
|
||||
},
|
||||
/* 导入农村地下水文件 */
|
||||
importFileBottom(file) {
|
||||
const hide = this.$message.loading("导入中..", 0);
|
||||
let reader = new FileReader();
|
||||
@@ -138,19 +162,22 @@ export default {
|
||||
//0.昼间数据 1.夜间数据 2.其他信息
|
||||
let sheetNames = workbook.SheetNames;
|
||||
// 解析成二维数组
|
||||
let aoa1 = XLSX.utils.sheet_to_json(workbook.Sheets[sheetNames[0]], {
|
||||
let aoa1 = XLSX.utils.sheet_to_json(
|
||||
workbook.Sheets[sheetNames[0]], {
|
||||
header: 1,
|
||||
});
|
||||
|
||||
const drinkingWaterVillageList = aoa1.filter((item) => {
|
||||
return item.length >= 40 && typeof item[0] == "number";
|
||||
return (
|
||||
item.length >= 40 && item[0] && !item[0].includes("点位代码") && !item[0].includes("导出人") && !item[0].includes("地下水")
|
||||
);
|
||||
});
|
||||
|
||||
// 解析成对象数组
|
||||
console.log(file);
|
||||
const billName1 = file.name;
|
||||
const billData1 = utils.toVillageBottom(drinkingWaterVillageList);
|
||||
|
||||
console.log(billData1);
|
||||
if (!billData1 || billData1.length == 0) {
|
||||
hide();
|
||||
Modal.error({
|
||||
@@ -206,6 +233,16 @@ export default {
|
||||
reader.readAsArrayBuffer(file);
|
||||
return false;
|
||||
},
|
||||
//下载文件
|
||||
download(filename, fileType) {
|
||||
if (fileType == "xls") {
|
||||
downloadTemplatexls(filename);
|
||||
} else if (fileType == "xlsm") {
|
||||
downloadTemplatexlsm(filename);
|
||||
} else if (fileType == "xlsx") {
|
||||
downloadTemplate(filename);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -4,11 +4,12 @@ export default {
|
||||
toVillageTop(excelData){
|
||||
return excelData.map(item=>{
|
||||
const monitorTime = new Date();
|
||||
monitorTime.setFullYear(item[11]);
|
||||
monitorTime.setMonth(item[12] - 1);
|
||||
monitorTime.setDate(item[13]);
|
||||
monitorTime.setFullYear(item[12]);
|
||||
monitorTime.setMonth(item[13] - 1);
|
||||
monitorTime.setDate(item[14]);
|
||||
const row = {
|
||||
monitorTime: monitorTime.getTime(),
|
||||
sectionCode:item[0],
|
||||
province: item[1],
|
||||
city: item[2],
|
||||
area: item[3].includes("区")?item[3]:null,
|
||||
@@ -17,46 +18,46 @@ export default {
|
||||
village: item[5],
|
||||
place: item[6],
|
||||
lakeLibraryFlag: item[7],
|
||||
mustTestVillagesFlag: item[8],
|
||||
longitude: item[9],
|
||||
latitude: item[10],
|
||||
// mustTestVillagesFlag: item[8],
|
||||
longitude: item[8],
|
||||
latitude: item[9],
|
||||
numberServingPopulation: item[10],
|
||||
dailyWaterSupplyScale: item[11],
|
||||
// province: item[11],
|
||||
// province: item[12],
|
||||
// province: item[13],
|
||||
numberServingPopulation: item[14],
|
||||
dailyWaterSupplyScale: item[15],
|
||||
waterTemperature: item[16],
|
||||
ph: item[17],
|
||||
dissolvedOxygen: item[18],
|
||||
permanganateIndex: item[19],
|
||||
fiveDayBod: item[20],
|
||||
ammonia: item[21],
|
||||
totalPhosphorus: item[22],
|
||||
totalNitrogen: item[23],
|
||||
cu: item[24],
|
||||
zn: item[25],
|
||||
fluoride: item[26],
|
||||
se: item[27],
|
||||
as: item[28],
|
||||
hg: item[29],
|
||||
cd: item[30],
|
||||
cr: item[31],
|
||||
pb: item[32],
|
||||
cyanide: item[33],
|
||||
volatilePhenol: item[34],
|
||||
petro: item[35],
|
||||
anionicSurfactant: item[36],
|
||||
sulfide: item[37],
|
||||
fecalColiforms: item[38],
|
||||
sulfate: item[39],
|
||||
chloride: item[40],
|
||||
nitrateNitrogen: item[41],
|
||||
fe: item[42],
|
||||
mn: item[43],
|
||||
waterQualityCategory: item[44],
|
||||
characteristicPollutantMonitoringProjectName: item[45],
|
||||
characteristicPollutantMonitoringValue: item[46],
|
||||
remark: item[47],
|
||||
waterTemperature: item[15],
|
||||
ph: item[16],
|
||||
dissolvedOxygen: item[17],
|
||||
permanganateIndex: item[18],
|
||||
fiveDayBod: item[19],
|
||||
ammonia: item[20],
|
||||
totalPhosphorus: item[21],
|
||||
totalNitrogen: item[22],
|
||||
cu: item[23],
|
||||
zn: item[24],
|
||||
fluoride: item[25],
|
||||
se: item[26],
|
||||
as: item[27],
|
||||
hg: item[28],
|
||||
cd: item[29],
|
||||
cr: item[30],
|
||||
pb: item[31],
|
||||
cyanide: item[32],
|
||||
volatilePhenol: item[33],
|
||||
petro: item[34],
|
||||
anionicSurfactant: item[35],
|
||||
sulfide: item[36],
|
||||
fecalColiforms: item[37],
|
||||
sulfate: item[38],
|
||||
chloride: item[39],
|
||||
nitrateNitrogen: item[40],
|
||||
fe: item[41],
|
||||
mn: item[42],
|
||||
// waterQualityCategory: item[44],
|
||||
characteristicPollutantMonitoringProjectName: item[43],
|
||||
characteristicPollutantMonitoringValue: item[44],
|
||||
remark: item[45],
|
||||
|
||||
};
|
||||
return row;
|
||||
@@ -65,73 +66,73 @@ export default {
|
||||
// 农村地下水
|
||||
toVillageBottom(excelData){
|
||||
return excelData.map(item=>{
|
||||
const monitorTime = new Date();
|
||||
monitorTime.setFullYear(item[10]);
|
||||
monitorTime.setMonth(item[11] - 1);
|
||||
monitorTime.setDate(item[12]);
|
||||
const row = {
|
||||
lakeLibraryFlag: "否",
|
||||
monitorTime: monitorTime.getTime(),
|
||||
province: item[1],
|
||||
city: item[2],
|
||||
area: item[3].includes("区")?item[3]:null,
|
||||
county: !item[3].includes("区")?item[3]:null,
|
||||
township: item[4],
|
||||
village: item[5],
|
||||
mustTestVillagesFlag: item[6],
|
||||
place: item[7],
|
||||
longitude: item[8],
|
||||
latitude: item[9],
|
||||
// latitude: item[10],
|
||||
// province: item[11],
|
||||
// province: item[12],
|
||||
numberServingPopulation: item[13],
|
||||
dailyWaterSupplyScale: item[14],
|
||||
color: item[15],
|
||||
smellAndTaste: item[16],
|
||||
turbidity: item[17],
|
||||
visibleNakedEye: item[18],
|
||||
ph: item[19],
|
||||
totalHardness: item[20],
|
||||
totalDissolvedSolids: item[21],
|
||||
sulfate: item[22],
|
||||
chloride: item[23],
|
||||
fe: item[24],
|
||||
mn: item[25],
|
||||
cu: item[26],
|
||||
zn: item[27],
|
||||
ai: item[28],
|
||||
volatilePhenol: item[29],
|
||||
anionicSurfactant: item[30],
|
||||
oxygenConsumption: item[31],
|
||||
nitrate: item[32],
|
||||
nitrite: item[33],
|
||||
ammonia: item[34],
|
||||
sulfide: item[35],
|
||||
na: item[36],
|
||||
fluoride: item[37],
|
||||
cyanide: item[38],
|
||||
lodide: item[39],
|
||||
hg: item[40],
|
||||
as: item[41],
|
||||
se: item[42],
|
||||
cd: item[43],
|
||||
cr: item[44],
|
||||
pb: item[45],
|
||||
totalColiform: item[46],
|
||||
totalNumberColonies: item[47],
|
||||
chcl3: item[48],
|
||||
ccl4: item[49],
|
||||
c6h6: item[50],
|
||||
c7h8: item[51],
|
||||
totalAlphaRadioactivity: item[52],
|
||||
totalBetaRadioactivity: item[53],
|
||||
waterQualityCategory: item[54],
|
||||
characteristicPollutantMonitoringProjectName: item[55],
|
||||
characteristicPollutantMonitoringValue: item[56],
|
||||
remark: item[57],
|
||||
};
|
||||
return row;
|
||||
})
|
||||
const monitorTime = new Date();
|
||||
monitorTime.setFullYear(item[11]);
|
||||
monitorTime.setMonth(item[12] - 1);
|
||||
monitorTime.setDate(item[13]);
|
||||
const row = {
|
||||
monitorTime: monitorTime.getTime(),
|
||||
sectionCode:item[0],
|
||||
province: item[1],
|
||||
city: item[2],
|
||||
area: item[3].includes("区")?item[3]:null,
|
||||
county: !item[3].includes("区")?item[3]:null,
|
||||
township: item[4],
|
||||
village: item[5],
|
||||
place: item[6],
|
||||
// lakeLibraryFlag: item[7],
|
||||
// mustTestVillagesFlag: item[8],
|
||||
longitude: item[7],
|
||||
latitude: item[8],
|
||||
numberServingPopulation: item[9],
|
||||
dailyWaterSupplyScale: item[10],
|
||||
// province: item[11],
|
||||
// province: item[12],
|
||||
// province: item[13],
|
||||
color:item[14],
|
||||
smellAndTaste: item[15],
|
||||
turbidity: item[16],
|
||||
visibleNakedEye: item[17],
|
||||
ph: item[18],
|
||||
totalHardness: item[19],
|
||||
totalDissolvedSolids: item[20],
|
||||
totalNitrsulfateogen: item[21],
|
||||
chloride: item[22],
|
||||
fe: item[23],
|
||||
mn: item[24],
|
||||
cu: item[25],
|
||||
zn: item[26],
|
||||
ai: item[27],
|
||||
volatilePhenol: item[28],
|
||||
anionicSurfactant: item[29],
|
||||
oxygenConsumption: item[30],
|
||||
nitrate: item[31],
|
||||
nitrite: item[32],
|
||||
ammonia: item[33],
|
||||
sulfide: item[34],
|
||||
na: item[35],
|
||||
fluoride: item[36],
|
||||
cyanide: item[37],
|
||||
lodide: item[38],
|
||||
hg: item[39],
|
||||
as: item[40],
|
||||
se: item[41],
|
||||
cd: item[42],
|
||||
cr: item[43],
|
||||
pb: item[44],
|
||||
totalColiform: item[45],
|
||||
totalNumberColonies: item[46],
|
||||
chcl3: item[47],
|
||||
ccl4: item[48],
|
||||
c6h6: item[49],
|
||||
c7h8: item[50],
|
||||
totalAlphaRadioactivity: item[51],
|
||||
totalBetaRadioactivity: item[52],
|
||||
characteristicPollutantMonitoringProjectName: item[53],
|
||||
characteristicPollutantMonitoringValue: item[54],
|
||||
remark: item[55],
|
||||
};
|
||||
return row;
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -173,17 +173,17 @@
|
||||
// dataIndex: 'title',
|
||||
// sorter: true
|
||||
// },
|
||||
{
|
||||
title: '监测时间',
|
||||
dataIndex: 'reportTime',
|
||||
sorter: true,
|
||||
slots: {
|
||||
customRender: 'reportTime',
|
||||
},
|
||||
// customRender: ({
|
||||
// text
|
||||
// }) => this.$util.toDateString(text)
|
||||
},
|
||||
// {
|
||||
// title: '监测时间',
|
||||
// dataIndex: 'reportTime',
|
||||
// sorter: true,
|
||||
// slots: {
|
||||
// customRender: 'reportTime',
|
||||
// },
|
||||
// // customRender: ({
|
||||
// // text
|
||||
// // }) => this.$util.toDateString(text)
|
||||
// },
|
||||
{
|
||||
title: '导入时间',
|
||||
dataIndex: 'createTime',
|
||||
@@ -303,24 +303,37 @@
|
||||
let {
|
||||
drinkingWaterVillageBillId,
|
||||
billName,
|
||||
reportTime
|
||||
// reportTime
|
||||
regionLevel,
|
||||
createTime,
|
||||
checked,
|
||||
waterSourceType,
|
||||
drinkingWaterType,
|
||||
userId
|
||||
} = this.editableData[record.drinkingWaterVillageBillId];
|
||||
if (!drinkingWaterVillageBillId || !reportTime) {
|
||||
// if (!drinkingWaterVillageBillId || !reportTime) {
|
||||
if (!drinkingWaterVillageBillId) {
|
||||
this.$message.error('请填写完整信息再提交')
|
||||
return
|
||||
}
|
||||
const hide = this.$message.loading('请求中..', 0);
|
||||
reportTime = reportTime.format("x")
|
||||
reportTime = Number(reportTime)
|
||||
// reportTime = reportTime.format("x")
|
||||
// reportTime = Number(reportTime)
|
||||
updateDrinkingWaterVillageBill({
|
||||
drinkingWaterVillageBillId,
|
||||
billName,
|
||||
reportTime
|
||||
// reportTime
|
||||
regionLevel,
|
||||
createTime,
|
||||
checked,
|
||||
waterSourceType,
|
||||
drinkingWaterType,
|
||||
userId
|
||||
}).then(res => {
|
||||
if (res.data.code == 0) {
|
||||
this.$message.success(res.data.msg);
|
||||
record.billName = billName;
|
||||
record.reportTime = reportTime
|
||||
// record.reportTime = reportTime
|
||||
} else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
|
||||
@@ -53,14 +53,14 @@
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<!-- <a-col :md="12" :sm="24">
|
||||
<a-form-item label="时间" name="monitorTime">
|
||||
<a-time-picker
|
||||
v-model:value="form.monitorTime"
|
||||
format="HH:mm"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-col> -->
|
||||
<a-col v-for="(item,index) in tableColumns" :key="index" :md="12" :sm="24">
|
||||
<a-form-item :label="item.title" :name="item.dataIndex">
|
||||
<a-input
|
||||
@@ -159,7 +159,15 @@ export default {
|
||||
tableColumns,
|
||||
// 表格列配置
|
||||
columns: [
|
||||
{
|
||||
title: "监测日期",
|
||||
dataIndex: "monitorTime",
|
||||
sorter: true,
|
||||
customRender: ({text})=> moment(text).format("YYYY-MM-DD")
|
||||
},
|
||||
|
||||
...tableColumns,
|
||||
|
||||
{
|
||||
title: "区域等级",
|
||||
dataIndex: "regionLevel",
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
|
||||
const tableColumns = [
|
||||
{title: "点位名称",dataIndex: "place",sorter: true,},
|
||||
{title: "取水量",dataIndex: "waterWithdrawal",sorter: true,},
|
||||
{title: "'水温(℃)",dataIndex: "waterTemperature",sorter: true,},
|
||||
// {title: "采样时间",dataIndex: "monitorTime",sorter: true,},
|
||||
{title: "pH(无量纲)",dataIndex: "ph",sorter: true,},
|
||||
{title: "溶解氧",dataIndex: "dissolvedOxygen",sorter: true,},
|
||||
{title: "高锰酸盐指数",dataIndex: "permanganateIndex",sorter: true,},
|
||||
@@ -124,7 +127,10 @@ const tableColumns = [
|
||||
//新增
|
||||
{title: "叶绿素(mg/m3)",dataIndex:"chlorophyll",sorter:true,},
|
||||
{title: "透明度(cm)",dataIndex:"transparency",sorter:true,},
|
||||
|
||||
{title: "总α放射性",dataIndex:"totalAlphaRadioactivity",sorter:true,},
|
||||
{title: "总β放射性",dataIndex:"totalBetaRadioactivity",sorter:true,},
|
||||
{title: "1,1,1-三氯乙烷(mg/L)",dataIndex:"c2h3cl3_111",sorter:true,},
|
||||
{title: "1,1,2-三氯乙烷(mg/L)",dataIndex:"c2h3cl3_112",sorter:true,},
|
||||
];
|
||||
|
||||
export {tableColumns}
|
||||
@@ -71,11 +71,11 @@
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
<a-menu style="word-spacing:10px;">
|
||||
<a-menu-item @click="download('市级地表水(在用)导入','xls')"> 市级在用导入{{"\xa0"}} <span style="color:#1890FF">模板下载</span> </a-menu-item>
|
||||
<a-menu-item @click="download('市级地表水(备用)导入','xlsx')"> 市级备用导入{{"\xa0"}} <span style="color:#1890FF">模板下载</span> </a-menu-item>
|
||||
<a-menu-item @click="download('县级地表水(在用)','xlsm')"> 县级在用导入{{"\xa0"}} <span style="color:#1890FF">模板下载</span> </a-menu-item>
|
||||
<a-menu-item @click="download('县级地表水(备用)','xls')"> 县级备用导入{{"\xa0"}} <span style="color:#1890FF">模板下载</span> </a-menu-item>
|
||||
<a-menu-item @click="download('县级地下水','xlsx')" style="word-spacing:3px"> 县级地下水导入{{"\xa0"}} <span style="color:#1890FF">模板下载</span> </a-menu-item>
|
||||
<a-menu-item @click="download('市级(在用)地表水饮用水','xls')" > 市级(在用)地表水饮用水 </a-menu-item>
|
||||
<a-menu-item @click="download('市级(备用)地表水饮用水','xlsx')" > 市级(备用)地表水饮用水 </a-menu-item>
|
||||
<a-menu-item @click="download('县级(在用)地表水饮用水','xlsm')" > 县级(在用)地表水饮用水 </a-menu-item>
|
||||
<a-menu-item @click="download('县级(备用、规划)地表水饮用水','xls')"> 县级(备用、规划)地表水饮用水 </a-menu-item>
|
||||
<a-menu-item @click="download('县级地下水饮用水','xlsx')" > 县级地下水饮用水 </a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button type="primary" style="left: 60px">
|
||||
@@ -84,8 +84,10 @@
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
|
||||
|
||||
<a-tabs v-model:activeKey="activeKey">
|
||||
<a-tab-pane tab="饮用水" key="water">
|
||||
<a-tab-pane tab="饮用水页面" key="water">
|
||||
<water-bill ref="water"></water-bill>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
@@ -149,7 +151,7 @@ export default {
|
||||
});
|
||||
|
||||
// 解析成对象数组
|
||||
const billName1 = aoa1[0][0] + aoa1[1][0];
|
||||
const billName1 = file.name;
|
||||
const billData1 = utils.toCityUseTopWaterObjData(drinkingWaterList);
|
||||
|
||||
if (!billData1 || billData1.length == 0) {
|
||||
@@ -237,7 +239,7 @@ export default {
|
||||
});
|
||||
|
||||
// 解析成对象数组
|
||||
const billName1 = aoa1[0][0] + aoa1[1][0];
|
||||
const billName1 = file.name;
|
||||
const billData1 = utils.toCitySpareTopWaterObjData(drinkingWaterList);
|
||||
|
||||
if (!billData1 || billData1.length == 0) {
|
||||
@@ -325,7 +327,7 @@ export default {
|
||||
});
|
||||
|
||||
// 解析成对象数组
|
||||
const billName1 = aoa1[0][0];
|
||||
const billName1 = file.name;
|
||||
const billData1 = utils.toCountyUseTopWaterObjData(drinkingWaterList);
|
||||
|
||||
if (!billData1 || billData1.length == 0) {
|
||||
@@ -413,7 +415,7 @@ export default {
|
||||
});
|
||||
|
||||
// 解析成对象数组
|
||||
const billName1 = aoa1[0][0];
|
||||
const billName1 = file.name;
|
||||
const billData1 = utils.toCountyUseTopWaterObjData(drinkingWaterList);
|
||||
|
||||
if (!billData1 || billData1.length == 0) {
|
||||
@@ -501,10 +503,10 @@ export default {
|
||||
});
|
||||
|
||||
// 解析成对象数组
|
||||
const billName1 = aoa1[0][1];
|
||||
const billName1 = file.name;
|
||||
const billData1 =
|
||||
utils.toCountyUseBottomWaterObjData(drinkingWaterList);
|
||||
|
||||
utils.toCountyUseBottomWaterObjData(drinkingWaterList);
|
||||
console.log(billData1);
|
||||
if (!billData1 || billData1.length == 0) {
|
||||
hide();
|
||||
Modal.error({
|
||||
@@ -571,19 +573,6 @@ export default {
|
||||
downloadTemplate(filename);
|
||||
}
|
||||
},
|
||||
|
||||
// //下载市级在用地表水文件
|
||||
// downloadCityUseFile(){
|
||||
// downloadTemplate();
|
||||
// },
|
||||
// //下载市级在用地表水文件
|
||||
// downloadCityUseFile(){
|
||||
// downloadTemplate();
|
||||
// },
|
||||
// //下载市级在用地表水文件
|
||||
// downloadCityUseFile(){
|
||||
// downloadTemplate();
|
||||
// },
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import moment from "moment";
|
||||
// import moment from "moment";
|
||||
export default {
|
||||
// 市级在用地表水 已可用
|
||||
toCityUseTopWaterObjData(excelData) {
|
||||
@@ -509,7 +509,7 @@ export default {
|
||||
county: item[0],
|
||||
place: item[1],
|
||||
waterSourceType: 2, // 1地表水、2地下水
|
||||
monitorTime: moment(item[3], "YYYY年M月D日H:m").valueOf(),
|
||||
// monitorTime: moment(item[3], "YYYY年MM月DD日HH:mm").valueOf(),
|
||||
waterTemperature: item[4],
|
||||
chroma: item[5],
|
||||
smellAndTaste: item[6],
|
||||
@@ -622,4 +622,13 @@ export default {
|
||||
})
|
||||
|
||||
},
|
||||
importWaterWithdrawalData(excelData){
|
||||
return excelData.map(item => {
|
||||
const row = {
|
||||
place:item[0],
|
||||
waterWithdrawal:item[1],
|
||||
}
|
||||
return row;
|
||||
})
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -53,14 +53,14 @@
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="12" :sm="24">
|
||||
<!-- <a-col :md="12" :sm="24">
|
||||
<a-form-item label="时间" name="monitorTime">
|
||||
<a-time-picker
|
||||
v-model:value="form.monitorTime"
|
||||
format="HH:mm"
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-col> -->
|
||||
<a-col v-for="(item,index) in tableColumns" :key="index" :md="12" :sm="24">
|
||||
<a-form-item :label="item.title" :name="item.dataIndex">
|
||||
<a-input
|
||||
@@ -159,6 +159,12 @@ export default {
|
||||
tableColumns,
|
||||
// 表格列配置
|
||||
columns: [
|
||||
// {
|
||||
// title: "监测日期",
|
||||
// dataIndex: "monitorTime",
|
||||
// sorter: true,
|
||||
// customRender: ({text})=> moment(text).format("YYYY年MM月DD日HH:mm")
|
||||
// },
|
||||
...tableColumns,
|
||||
{
|
||||
title: "区域等级",
|
||||
@@ -254,19 +260,22 @@ 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.monitorTime = 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"];
|
||||
// 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.monitorTime = 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"];
|
||||
console.log(form,'form');
|
||||
const { billId } = this.$route.params;
|
||||
form.drinkingWaterBillId = billId;
|
||||
if (form.drinkingWaterId) {
|
||||
updateDrinkingWater(form)
|
||||
.then((res) => {
|
||||
|
||||
Reference in New Issue
Block a user