江河版本更新

This commit is contained in:
shixiaoman
2021-12-06 18:05:12 +08:00
parent 1b58bd132a
commit d6b0136582
5 changed files with 31 additions and 37 deletions

View File

@@ -328,6 +328,7 @@
let data = new Uint8Array(e.target.result); let data = new Uint8Array(e.target.result);
let workbook = XLSX.read(data, { let workbook = XLSX.read(data, {
type: "array", type: "array",
cellDates: true
}); });
//0.昼间数据 1.夜间数据 2.其他信息 //0.昼间数据 1.夜间数据 2.其他信息
let sheetNames = workbook.SheetNames; let sheetNames = workbook.SheetNames;

View File

@@ -1,4 +1,4 @@
// import moment from "moment"; import moment from "moment";
export default { export default {
toObjData(excelData) { toObjData(excelData) {
@@ -201,13 +201,15 @@ export default {
// 区控水站水功能区上报数据 // 区控水站水功能区上报数据
towaterStationDataObj(excelData) { towaterStationDataObj(excelData) {
return excelData.map(item => { return excelData.map(item => {
var monitorTime = moment(item[5],"YYYY/MM/DD").format("YYYY-MM-DD");
console.log(monitorTime);
const row = { const row = {
area: item[1].includes("区") ? item[1] : null, area: item[1].includes("区") ? item[1] : null,
county: item[1].includes("县") ? item[1] : null, county: item[1].includes("县") ? item[1] : null,
watershed:item[2], watershed:item[2],
river:item[3], river:item[3],
sectionName:item[4], sectionName:item[4],
monitorTime:item[5]==null || item[5]==''?new Date():item[5], monitorTime:monitorTime==null?new Date():monitorTime,
place:item[6], place:item[6],
periodWaterQuality:item[7], periodWaterQuality:item[7],
waterTemperature:item[8], waterTemperature:item[8],

View File

@@ -23,28 +23,28 @@
</a-tab-pane> </a-tab-pane>
<a-tab-pane tab="水功能区" key="ccb"> <a-tab-pane tab="水功能区" key="ccb">
<a-tabs v-model:activeWater="activeWater"> <a-tabs v-model:activeWater="activeWater">
<a-tab-pane tab="自治区级水功能" key="water1"> <a-tab-pane tab="自治区级水功能" key="water1">
<a-tabs v-model:autoWater="autoWater"> <a-tabs v-model:autoWater="autoWater">
<a-tab-pane tab="自治区级水功能统计" key="auto1"> <a-tab-pane tab="自治区级水功能统计" key="auto1">
<auto-statis></auto-statis> <auto-statis></auto-statis>
</a-tab-pane> </a-tab-pane>
<a-tab-pane tab="自治区水功能达标率" key="auto2"> <a-tab-pane tab="自治区水功能达标率" key="auto2">
<auto-standard></auto-standard> <auto-standard></auto-standard>
</a-tab-pane> </a-tab-pane>
<a-tab-pane tab="自治区水功能同比/环比" key="auto3"> <a-tab-pane tab="自治区水功能同比/环比" key="auto3">
<auto-yoy></auto-yoy> <auto-yoy></auto-yoy>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-tab-pane> </a-tab-pane>
<a-tab-pane tab="国家级水功能" key="water2"> <a-tab-pane tab="国家级水功能" key="water2">
<a-tabs v-model:nationalWater="nationalWater"> <a-tabs v-model:nationalWater="nationalWater">
<a-tab-pane tab="国家级水功能统计" key="national"> <a-tab-pane tab="国家级水功能统计" key="national">
<national-statis></national-statis> <national-statis></national-statis>
</a-tab-pane> </a-tab-pane>
<a-tab-pane tab="国家级水功能达标率" key="national2"> <a-tab-pane tab="国家级水功能达标率" key="national2">
<national-standard></national-standard> <national-standard></national-standard>
</a-tab-pane> </a-tab-pane>
<a-tab-pane tab="国家级水功能同比/环比" key="national3"> <a-tab-pane tab="国家级水功能同比/环比" key="national3">
<national-yoy></national-yoy> <national-yoy></national-yoy>
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>

View File

@@ -158,14 +158,6 @@
customRender: ({ customRender: ({
text text
}) => this.$util.toDateString(text) }) => this.$util.toDateString(text)
},
{
title: '导入时间',
dataIndex: 'createTime',
sorter: true,
customRender: ({
text
}) => this.$util.toDateString(text)
}, },
{ {
title: '审核状态', title: '审核状态',

View File

@@ -45,7 +45,7 @@
</a-form> </a-form>
<!-- 表格 --> <!-- 表格 -->
<a-spin :spinning="loading"> <a-spin :spinning="loading">
<ele-pro-table ref="table" :datasource="datasource" :columns="columns" :where="where" <ele-pro-table ref="table" :datasource="url" :columns="columns" :where="where"
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)"> :scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
</ele-pro-table> </ele-pro-table>
</a-spin> </a-spin>
@@ -56,7 +56,7 @@
<script> <script>
import { import {
autonomyWaterFunctionTotal, autonomyWaterFunctionTotalUrl,
} from "@/api/ecology/river-statis"; } from "@/api/ecology/river-statis";
import { import {
listInfo listInfo
@@ -73,9 +73,9 @@
return { return {
data: [], data: [],
locale, locale,
datasource: {}, // datasource: {},
// 表格数据接口 // 表格数据接口
// url: autonomyWaterFunctionTotalUrl, url: autonomyWaterFunctionTotalUrl,
selection: [], selection: [],
tableColumns, tableColumns,
// 表格列配置 // 表格列配置
@@ -117,21 +117,20 @@
/* 刷新表格 */ /* 刷新表格 */
reload() { reload() {
this.loading = true; this.loading = true;
// console.log(this.where); console.log(this.where);
// this.$refs.table.reload({ this.$refs.table.reload({
// where: this.where, where: this.where,
// }); });
// console.log(this.url); // autonomyWaterFunctionTotal(this.where).then((res) => {
autonomyWaterFunctionTotal(this.where).then((res) => { // console.log(res.data.data);
console.log(res.data.data); // if (res.data.code == 0) {
if (res.data.code == 0) { // this.$message.success(res.data.msg);
this.$message.success(res.data.msg); // this.datasource=res.data.data;
this.datasource=res.data.data; // } else {
} else { // this.$message.error(res.data.msg);
this.$message.error(res.data.msg); // }
} // this.loading = false;
this.loading = false; // });
});
this.loading = false; this.loading = false;
}, },
/* 重置搜索 */ /* 重置搜索 */