新增/修复农村饮用水板块,修复市级县级饮用水板块
This commit is contained in:
@@ -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