diff --git a/.env.development b/.env.development
index ece64a9..31b1eb7 100644
--- a/.env.development
+++ b/.env.development
@@ -1 +1 @@
-VUE_APP_API_BASE_URL=http://1.14.132.108:10002/api
\ No newline at end of file
+VUE_APP_API_BASE_URL=http://localhost:10001/api
diff --git a/public/template/专项湖库数据报送表.xlsx b/public/template/专项湖库数据报送表.xlsx
new file mode 100644
index 0000000..af09d64
Binary files /dev/null and b/public/template/专项湖库数据报送表.xlsx differ
diff --git a/public/template/五象湖水质监测报告表.xlsx b/public/template/五象湖水质监测报告表.xlsx
new file mode 100644
index 0000000..27d45d3
Binary files /dev/null and b/public/template/五象湖水质监测报告表.xlsx differ
diff --git a/public/template/其它内湖水质监测报告表.xls b/public/template/其它内湖水质监测报告表.xls
new file mode 100644
index 0000000..4bb0616
Binary files /dev/null and b/public/template/其它内湖水质监测报告表.xls differ
diff --git a/src/api/ecology/atmosphere/acid.js b/src/api/ecology/atmosphere/acid.js
index 4431ffa..9ca15d8 100644
--- a/src/api/ecology/atmosphere/acid.js
+++ b/src/api/ecology/atmosphere/acid.js
@@ -60,6 +60,15 @@ const getColumnOptions = function(column){
const getPlaceGis = function(data){
return axios.get("/acidRain/acidRain/gis/place",{params:data})
}
+const getPlaceOptions = (regionLevel) => axios.get("/acidRain/acidRain/placeOptions", {params:{regionLevel}})
+
+const getTrendChart = function(data){
+ return axios.post("/acidRain/acidRain/trend/chart",data)
+}
+const getYearOptions = () => axios.get("/acidRain/acidRain/yearOptions")
+const getPlaceByRegionLevel = function(column){
+ return axios.get("/acidRain/acidRain/place/region",{params:{column}})
+}
const statisticCity = "/acidRain/acidRain/statistic/city"
const statisticCounty = "/acidRain/acidRain/statistic/county"
const statisticIon = "/acidRain/acidRain/statistic/ion"
@@ -83,5 +92,9 @@ export {
statisticCity,
statisticIon,
statisticCounty,
- getPlaceGis
+ getPlaceGis,
+ getYearOptions,
+ getPlaceOptions,
+ getTrendChart,
+ getPlaceByRegionLevel
}
diff --git a/src/api/ecology/atmosphere/air.js b/src/api/ecology/atmosphere/air.js
index a0c0e9a..86b321d 100644
--- a/src/api/ecology/atmosphere/air.js
+++ b/src/api/ecology/atmosphere/air.js
@@ -71,6 +71,16 @@ const statisticArea = "/ambientAir/ambientAir/statistic/area";
const getPlaceGis = function(data){
return axios.get("/ambientAir/ambientAir/gis/place",{params:data})
}
+const getYearOptions = () => axios.get("/ambientAir/ambientAir/yearOptions")
+const getTrendChart = function(data){
+ return axios.post("/ambientAir/ambientAir/trend/chart",data)
+}
+const getCityPlace = function(column){
+ return axios.get("/ambientAir/ambientAir/place/city",{params:{column}})
+}
+const getCountryPlace = function(column){
+ return axios.get("/ambientAir/ambientAir/place/country",{params:{column}})
+}
// 排行
const airDayRankUrl = "/zhenQiWang/ambientAirZhenqiCityDayAqiRankData";
const airMonthRankUrl = "/zhenQiWang/ambientAirZhenqiCityMonthComprehensiveAqiRankData/page";
@@ -105,6 +115,9 @@ export {
airPm25YearRankUrl,
airYearProvincialCapitalRankUrl,
airPm25YearProvincialCapitalRankUrl,
- airMonthProvincialCapitalRankUrl
-
+ airMonthProvincialCapitalRankUrl,
+ getYearOptions,
+ getTrendChart,
+ getCityPlace,
+ getCountryPlace
}
diff --git a/src/api/ecology/lake.js b/src/api/ecology/lake.js
index 1134e78..4574a73 100644
--- a/src/api/ecology/lake.js
+++ b/src/api/ecology/lake.js
@@ -1,6 +1,11 @@
import axios from 'axios';
// ----------------------列表-----------------------
const pageBillUrl = '/lakeLibrary/lakeLibraryInnerCityBill/page';
+
+const getInnerData = function (data) {
+ return axios.get(pageBillUrl,{params:data})
+}
+
// 添加
const saveLakeBill = function (data) {
return axios.post("/lakeLibrary/lakeLibraryInnerCityBill/importBatch",data)
@@ -75,6 +80,7 @@ export {
getHistoryyears,
getColumnOptions,
statisticSourceUrl,
- statisticYearUrl
+ statisticYearUrl,
+ getInnerData
}
diff --git a/src/api/ecology/new-drinking-water.js b/src/api/ecology/new-drinking-water.js
index 41bad3f..404555f 100644
--- a/src/api/ecology/new-drinking-water.js
+++ b/src/api/ecology/new-drinking-water.js
@@ -88,26 +88,31 @@ export const countyDescripFormData = function (data) {
return axios.post(countyDescripFormUrl,data)
}
+//县级—取水量统计
+export const countyWaterCount = function (data) {
+ return axios.post('/drinkingWater/drinkingWater/analyseCountyPage',data)
+}
+
//县级—超标评价
-export const countyOverStandardtUrl = '/drinkingWater/drinkingWater/getWaterEvaluate';
+export const countyOverStandardtUrl = '/drinkingWater/drinkingWater/getCountyWaterEvaluate';
export const countyOverStandardCount = function (data) {
return axios.post(countyOverStandardtUrl,data)
}
//县级—水质类别
-export const countyWaterQualityUrl = '/drinkingWater/drinkingWater/getWaterQualityCategory';
+export const countyWaterQualityUrl = '/drinkingWater/drinkingWater/getCountyWaterQualityCategory';
export const countyWaterQualityData = function (data) {
return axios.post(countyWaterQualityUrl,data)
}
//县级—水质统计
-export const countyWaterQualityCountUrl = '/drinkingWater/drinkingWater/getWaterQualityStatistics';
+export const countyWaterQualityCountUrl = '/drinkingWater/drinkingWater/getCountyWaterQualityStatistics';
export const countyWaterQualityCountData = function (data) {
return axios.post(countyWaterQualityCountUrl,data)
}
//县级—水质达标情况
-export const countyWaterQualityUpUrl = '/drinkingWater/drinkingWater/getWaterQualityStandard';
+export const countyWaterQualityUpUrl = '/drinkingWater/drinkingWater/getCountyWaterQualityStandard';
export const countyWaterQualityUpData = function (data) {
return axios.post(countyWaterQualityUpUrl,data)
}
diff --git a/src/api/ecology/new-lake.js b/src/api/ecology/new-lake.js
index 36d5d3a..4a3da10 100644
--- a/src/api/ecology/new-lake.js
+++ b/src/api/ecology/new-lake.js
@@ -75,4 +75,11 @@ export const specialAverageNutrition = function (data) {
export const specialYearContrastUrl = '/lakeLibrary/wateAnalysis/special/yearContrast';
export const specialYearContrastData = function (data) {
return axios.post(specialYearContrastUrl,data)
+}
+
+// 湖库统计图表
+
+export const lakeLibraryUrl = '/lakeLibrary/trendChart/data';
+export const lakeLibrary = function (data) {
+ return axios.post(lakeLibraryUrl,data)
}
\ No newline at end of file
diff --git a/src/api/ecology/special-lake.js b/src/api/ecology/special-lake.js
index e6b02fb..0f3eca4 100644
--- a/src/api/ecology/special-lake.js
+++ b/src/api/ecology/special-lake.js
@@ -1,6 +1,9 @@
import axios from 'axios';
// ----------------------列表-----------------------
const pageBillUrl = '/lakeLibrary/lakeLibrarySpecialBill/page';
+const getSpecialData = function (data) {
+ return axios.get(pageBillUrl,{params:data})
+}
// 添加
const saveLakeBill = function (data) {
return axios.post("/lakeLibrary/lakeLibrarySpecialBill/importBatch",data)
@@ -72,6 +75,6 @@ export {
avgUrl,
getHistoryyears,
getColumnOptions,
-
+ getSpecialData
}
diff --git a/src/assets/bg-login2.png b/src/assets/bg-login2.png
new file mode 100644
index 0000000..29d09fe
Binary files /dev/null and b/src/assets/bg-login2.png differ
diff --git a/src/views/atmosphere/acid-rain/trend/index.vue b/src/views/atmosphere/acid-rain/trend/index.vue
new file mode 100644
index 0000000..3b10fa0
--- /dev/null
+++ b/src/views/atmosphere/acid-rain/trend/index.vue
@@ -0,0 +1,278 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 开始统计
+
+
+
+
+
+
+
+
+
diff --git a/src/views/atmosphere/air/trend/index.vue b/src/views/atmosphere/air/trend/index.vue
new file mode 100644
index 0000000..24ce4fe
--- /dev/null
+++ b/src/views/atmosphere/air/trend/index.vue
@@ -0,0 +1,363 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 开始统计
+
+
+
+
+
+
+
+
+
diff --git a/src/views/login/forget.vue b/src/views/login/forget.vue
index 330b5c8..3938bf5 100644
--- a/src/views/login/forget.vue
+++ b/src/views/login/forget.vue
@@ -144,7 +144,7 @@ export default {
};
return {
// 登录框方向, 0居中, 1居右, 2居左
- direction: 0,
+ direction: 2,
// 加载状态
loading: false,
// 表单数据
@@ -256,7 +256,7 @@ export default {
padding: 48px 16px 0 16px;
position: relative;
box-sizing: border-box;
- background-image: url("~@/assets/bg-login.jpg");
+ background-image: url("~@/assets/bg-login2.png");
background-repeat: no-repeat;
background-size: cover;
min-height: 100vh;
diff --git a/src/views/login/login.vue b/src/views/login/login.vue
index a59f882..d1789dd 100644
--- a/src/views/login/login.vue
+++ b/src/views/login/login.vue
@@ -6,7 +6,9 @@
:rules="rules"
layout="vertical"
class="login-form ele-bg-white">
-
{{ $t('login.title') }}
+ 南宁生态环境监测数据
+ 综合分析平台
+
-
-
- {{ $t('login.remember') }}
-
-
- {{ $t('login.forget') }}
-
-
+
+
+
+
+
+
+
+
+
+
+
{{ loading ? $t('login.loading') : $t('login.login') }}
@@ -122,7 +125,7 @@ export default {
data() {
return {
// 登录框方向, 0居中, 1居右, 2居左
- direction: 0,
+ direction: 2,
// 加载状态
loading: false,
// 表单数据
@@ -233,7 +236,7 @@ export default {
padding: 48px 16px 0 16px;
position: relative;
box-sizing: border-box;
- background-image: url("~@/assets/bg-login.jpg");
+ background-image: url("~@/assets/bg-login2.png");
background-repeat: no-repeat;
background-size: cover;
min-height: 100vh;
@@ -246,7 +249,7 @@ export default {
left: 0;
right: 0;
bottom: 0;
- background: rgba(0, 0, 0, .2);
+ /*background: rgba(0, 0, 0, .2);*/
}
/* 卡片 */
@@ -256,7 +259,7 @@ export default {
max-width: 100%;
padding: 0 28px;
box-sizing: border-box;
- box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
+ /*box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);*/
border-radius: 2px;
position: relative;
z-index: 2;
@@ -270,11 +273,21 @@ export default {
margin: 0 auto 0 15%;
}
+.login-form h1 {
+ padding: 22px 0;
+ text-align: left;
+ color: #2f95e9;
+ font-size: 30px;
+}
.login-form h4 {
padding: 22px 0;
text-align: center;
}
-
+.login-form :deep(.ant-input-affix-wrapper-lg) {
+ border-radius: 24px;
+ border-color: #ffffff;
+ box-shadow: 1px 2px 5px 3px rgba(0,0,0,.05);
+}
/* 验证码 */
.login-input-group {
display: flex;
@@ -283,18 +296,28 @@ export default {
.login-input-group :deep(.ant-input-affix-wrapper) {
flex: 1;
+ border-radius: 24px;
+ border-color: #ffffff;
+ box-shadow: 1px 2px 5px 3px rgba(0,0,0,.05);
}
+
+
.login-input-group .login-captcha {
width: 102px;
height: 40px;
margin-left: 10px;
padding: 0;
+ border: none;
}
.login-input-group .login-captcha > img {
width: 100%;
height: 100%;
+ border-radius: 24px;
+ border-color: #ffffff;
+ box-shadow: 1px 2px 5px 3px rgba(0,0,0,.05);
+ overflow: hidden;
}
/* 第三方登录图标 */
diff --git a/src/views/sound/zone/collect/noise-bill.vue b/src/views/sound/zone/collect/noise-bill.vue
index 06190a9..76af867 100644
--- a/src/views/sound/zone/collect/noise-bill.vue
+++ b/src/views/sound/zone/collect/noise-bill.vue
@@ -240,7 +240,7 @@
},
detail(record) {
this.$router.replace({
- path: "/sound/air/collect/noise/" + record.zoneNoiseBillId
+ path: "/sound/zone/collect/noise/" + record.zoneNoiseBillId
})
},
edit(record) {
diff --git a/src/views/water/drinking-water-village/collect/water-bill.vue b/src/views/water/drinking-water-village/collect/water-bill.vue
index 1398ce2..c7a8249 100644
--- a/src/views/water/drinking-water-village/collect/water-bill.vue
+++ b/src/views/water/drinking-water-village/collect/water-bill.vue
@@ -7,33 +7,60 @@
+
市级
县级
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
已审核
未审核
-
-
-
-
-
-
-
-
-
+
+
查询
重置
+
@@ -248,12 +275,12 @@
/* 刷新表格 */
reload() {
- this.where.reportTimeStart = null;
- this.where.reportTimeEnd = null;
- if (this.reportTimeScope && this.reportTimeScope.length == 2) {
- this.where.reportTimeStart = this.reportTimeScope[0].format("Y-M-D H:m:s")
- this.where.reportTimeEnd = this.reportTimeScope[1].format("Y-M-D H:m:s")
- }
+ // this.where.reportTimeStart = null;
+ // this.where.reportTimeEnd = null;
+ // if (this.reportTimeScope && this.reportTimeScope.length == 2) {
+ // this.where.reportTimeStart = this.reportTimeScope[0].format("Y-M-D H:m:s")
+ // this.where.reportTimeEnd = this.reportTimeScope[1].format("Y-M-D H:m:s")
+ // }
this.$refs.table.reload({
where: this.where
});
@@ -388,6 +415,9 @@
diff --git a/src/views/water/drinking-water/statistic/county/waterQuality.vue b/src/views/water/drinking-water/statistic/county/waterQuality.vue
index 0b4f03f..b01d0e9 100644
--- a/src/views/water/drinking-water/statistic/county/waterQuality.vue
+++ b/src/views/water/drinking-water/statistic/county/waterQuality.vue
@@ -70,10 +70,11 @@ export default {
// 表格数据接口
datasource:[],
selection: [],
- columns:[
+ columns:[
{title:"城市名称",dataIndex:"city",},
{title:"水源地名称",dataIndex:"sourceWaterName",},
- {title:"期数",dataIndex:"sourceWaterName",},
+ {title:"检测时间",dataIndex:"monitorTime",},
+ // {title:"期数",dataIndex:"monitorTime",},
{title:"水源地性质",dataIndex:"waterSourceProperty",},
{title:"断面水质",align: 'center',children: [
{title: "本月", dataIndex: "waterQualityCategory"},
@@ -81,7 +82,7 @@ export default {
{title: "去年同期", dataIndex: "waterQualityCategoryYoy"},
]
},
- {title:"主要污染指标",dataIndex:"",},
+ {title:"主要污染指标",dataIndex:"mainTarget",},
],
diff --git a/src/views/water/drinking-water/statistic/county/waterQualityCount.vue b/src/views/water/drinking-water/statistic/county/waterQualityCount.vue
index 93df842..36c79a5 100644
--- a/src/views/water/drinking-water/statistic/county/waterQualityCount.vue
+++ b/src/views/water/drinking-water/statistic/county/waterQualityCount.vue
@@ -32,7 +32,7 @@
import XLSX from "xlsx";
import {
- waterQualityCountData
+ countyWaterQualityCountData as waterQualityCountData
} from "@/api/ecology/new-drinking-water";
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
diff --git a/src/views/water/drinking-water/statistic/county/waterQualityUp.vue b/src/views/water/drinking-water/statistic/county/waterQualityUp.vue
index f193215..1e83b05 100644
--- a/src/views/water/drinking-water/statistic/county/waterQualityUp.vue
+++ b/src/views/water/drinking-water/statistic/county/waterQualityUp.vue
@@ -111,12 +111,12 @@ export default {
this.$message.error(res.data.msg);
this.datasource = []
}else{
- let newData = []
- const resData = res.data.data || {}
- for(let i in resData){
- newData.push(...resData[i])
- }
- this.datasource = newData
+ // let newData = []
+ const resData = res.data.data || []
+ // for(let i in resData){
+ // newData.push(...resData[i])
+ // }
+ this.datasource = resData
}
}).catch(()=>{
this.loading = false;
diff --git a/src/views/water/lake/collect/index.vue b/src/views/water/lake/collect/index.vue
index 07f5824..f99f187 100644
--- a/src/views/water/lake/collect/index.vue
+++ b/src/views/water/lake/collect/index.vue
@@ -46,6 +46,19 @@
>
专项湖库导入
+
+
+
+ 专项湖库数据报送表
+ 五象湖水质监测报告表
+ 其它内湖水质监测报告表
+
+
+
+ 模板下载
+
+
+
@@ -66,141 +79,132 @@
import {Modal} from "ant-design-vue";
import WaterBill from "./water-bill.vue";
import SpecialBill from "./special-bill.vue";
+import { DownOutlined } from "@ant-design/icons-vue";
// import {saveLakeBill} from "@/api/ecology/lake";
// import {saveLakeBill as saveSpecialLake} from "@/api/ecology/special-lake";
import {importCityOther,importCppointCity,importSpecial} from "@/api/ecology/water/lake/import";
+ import {
+ getInnerData
+ } from "@/api/ecology/lake";
+import {
+ getSpecialData
+ } from "@/api/ecology/special-lake";
export default {
name: "LakeCollectIndex",
components: {
WaterBill,
- SpecialBill
+ SpecialBill,
+ DownOutlined
},
data() {
return {
activeKey: "water",
+ waterData:[],
+ specialData:[]
};
},
+ created(){
+ this.reload()
+ },
methods: {
+
+ getInnerData(){
+ getInnerData({page: 1, limit: 1000}).then(res=>{
+ this.waterData = res.data.data
+ })
+ },
+ getSpecialData(){
+ getSpecialData({page: 1, limit: 1000}).then(res=>{
+ this.specialData = res.data.data
+ })
+ },
+
+
+ // 模板下载
+ download (name,url){
+ var a = document.createElement("a");
+ a.href = url;
+ a.download = `${name}-导入模板`;
+ a.style.display = "none";
+ document.body.appendChild(a);
+ a.click();
+ a.remove();
+ },
handleMenuClick(e) {
document.getElementById(e.key).click()
},
/* 导入本地excel文件 */
+ importFileCity(file,hide){
+ const formData = new FormData();
+ const _this = this;
+ formData.append('file', file);
+ importCityOther(formData).then(res=>{
+ console.log(res)
+ if(!res.data.code){
+ Modal.success({ title:res.data.msg, });
+ this.reload()
+ _this.$refs.water && _this.$refs.water.reload();
+ _this.$router.replace({
+ path: "/water/lake/collect/water/" + res.data.data.id
+ })
+ }else{
+ Modal.error({ title:res.data.msg || '文件导入失败', });
+ }
+
+ hide()
+ }).catch(err=>{
+ console.log(err)
+ Modal.error({ title:err.data.msg || '文件导入失败', });
+ hide()
+ })
+ },
+
importFileInnerCity(file) {
const hide = this.$message.loading("导入中..", 0);
- const formData = new FormData();
- formData.append('file', file);
- importCityOther(formData).then(res=>{
- console.log(res)
- if(!res.data.code){
- Modal.success({ title:res.data.msg, });
- }else{
- Modal.error({ title:res.data.msg || '文件导入失败', });
+
+ const table = this.waterData;
+ let isHas = false;
+ if(Array.isArray(table) && table.length>0){
+ table.forEach(item=>{
+ if(item.billName==file.name){
+ isHas = true
}
-
- hide()
- }).catch(err=>{
- console.log(err)
- Modal.error({ title:err.data.msg || '文件导入失败', });
- hide()
- })
+ })
+ }
- // let reader = new FileReader();
- // reader.onload = (e) => {
- // try {
- // let data = new Uint8Array(e.target.result);
- // let workbook = XLSX.read(data, {
- // type: "array",
- // });
- // //0.昼间数据 1.夜间数据 2.其他信息
- // let sheetNames = workbook.SheetNames;
- // // 解析成二维数组
- // let aoa = XLSX.utils.sheet_to_json(workbook.Sheets[sheetNames[0]], {
- // header: 1,
- // });
-
- // const reportDate = aoa[2][0].replace(/[^\d]+/g, "-");
-
- // const lakeList = aoa.filter(
- // (item) => {
- // return item.length >= 24 && item[0] && !item[0].includes("点位名称");
- // }
- // );
-
-
- // // 解析成对象数组
- // const billName = file.name;
- // const billData = utils.toInnerCityLakeObjData(lakeList, reportDate);
- // if (!billData || billData.length == 0) {
- // hide()
- // Modal.error({
- // title: "导入失败",
- // content: "找不到数据",
- // });
- // return;
- // }
- // const tasks = [];
- // if (billData.length > 0) {
- // tasks.push(
- // saveLakeBill({
- // reportTime: new Date(reportDate).getTime(),
- // billName: billName,
- // regionLevel: "市级",
- // lakeLibraryInnerCityList: billData,
- // })
- // );
- // }
-
-
- // // 上传到服务器
-
- // Promise.all(tasks)
- // .then((res) => {
- // if (res[0].data.code == 0) {
- // Modal.success({
- // title: "导入成功",
- // content: `成功导入${billData.length}条数据`,
- // });
- // this.$refs.water && this.$refs.water.reload();
- // } else {
- // Modal.error({
- // title: "导入失败",
- // content: "数据上传出错",
- // });
- // }
-
- // })
- // .catch(() => {
- // Modal.error({
- // title: "导入失败",
- // content: "数据上传出错",
- // });
- // })
- // .finally(() => {
- // hide();
- // });
- // } catch (error) {
- // hide();
- // Modal.error({
- // title: "导入失败",
- // content: error.message,
- // });
- // }
- // // console.log(billData);
- // };
- // reader.readAsArrayBuffer(file);
+ if(isHas){
+ const _this = this;
+ Modal.confirm({
+ title: '有重复数据,确认是否覆盖?',
+ onOk() {
+ _this.importFileCity(file,hide)
+ },
+ onCancel() {
+ console.log('Cancel');
+ hide()
+ },
+ });
+ }else{
+ this.importFileCity(file,hide)
+ }
return false;
},
- importFileWuxiang(file) {
- const hide = this.$message.loading("导入中..", 0);
- const formData = new FormData();
+ importWuXiang(file,hide){
+ const formData = new FormData();
+ const _this = this;
formData.append('file', file);
importCppointCity(formData).then(res=>{
console.log(res)
if(!res.data.code){
Modal.success({ title:res.data.msg, });
+ this.reload()
+ _this.$refs.water && _this.$refs.water.reload();
+ _this.$router.replace({
+ path: "/water/lake/collect/water/" + res.data.data.id
+ })
}else{
Modal.error({ title:res.data.msg || '文件导入失败', });
}
@@ -210,95 +214,50 @@ export default {
Modal.error({ title:err.data.msg || '文件导入失败', });
hide()
})
+ },
+ importFileWuxiang(file) {
+ const hide = this.$message.loading("导入中..", 0);
+ const table = this.waterData;
+ let isHas = false;
+ if(Array.isArray(table) && table.length>0){
+ table.forEach(item=>{
+ if(item.billName==file.name){
+ isHas = true
+ }
+ })
+ }
- // let reader = new FileReader();
- // reader.onload = (e) => {
- // try {
- // let data = new Uint8Array(e.target.result);
- // let workbook = XLSX.read(data, {
- // type: "array",
- // });
- // let sheetNames = workbook.SheetNames;
- // // 解析成二维数组
- // let aoa = XLSX.utils.sheet_to_json(workbook.Sheets[sheetNames[0]], {
- // header: 1,
- // });
- // const lakeList = aoa.filter(
- // (item) => {
- // return item.length >= 24 && item[0] && !item[0].includes("点位名称");
- // }
- // );
- // // 解析成对象数组
- // const billName = file.name;
- // const billData = utils.toWuxiangLakeObjData(lakeList);
- // if (!billData || billData.length == 0) {
- // hide()
- // Modal.error({
- // title: "导入失败",
- // content: "找不到数据",
- // });
- // return;
- // }
- // const tasks = [];
- // if (billData.length > 0) {
- // tasks.push(
- // saveLakeBill({
- // billName: billName,
- // lakeLibraryInnerCityList: billData,
- // })
- // );
- // }
-
-
- // // 上传到服务器
-
- // Promise.all(tasks)
- // .then((res) => {
- // if (res[0].data.code == 0) {
- // Modal.success({
- // title: "导入成功",
- // content: `成功导入${billData.length}条数据`,
- // });
- // this.$refs.water && this.$refs.water.reload();
- // } else {
- // Modal.error({
- // title: "导入失败",
- // content: "数据上传出错",
- // });
- // }
-
- // })
- // .catch(() => {
- // Modal.error({
- // title: "导入失败",
- // content: "数据上传出错",
- // });
- // })
- // .finally(() => {
- // hide();
- // });
- // } catch (error) {
- // hide();
- // Modal.error({
- // title: "导入失败",
- // content: error.message,
- // });
- // }
- // // console.log(billData);
- // };
- // reader.readAsArrayBuffer(file);
-
+ if(isHas){
+ const _this = this;
+ Modal.confirm({
+ title: '有重复数据,确认是否覆盖?',
+ onOk() {
+ _this.importWuXiang(file,hide)
+ },
+ onCancel() {
+ console.log('Cancel');
+ hide()
+ },
+ });
+ }else{
+ this.importWuXiang(file,hide)
+ }
return false;
},
- importFileSpecial(file) {
- const hide = this.$message.loading("导入中..", 0);
+
+ importSpecialFile(file,hide){
const formData = new FormData();
+ const _this = this;
formData.append('file', file);
importSpecial(formData).then(res=>{
- console.log(res)
if(!res.data.code){
Modal.success({ title:res.data.msg, });
+ this.reload()
+ _this.$refs.special && _this.$refs.special.reload();
+ _this.$router.replace({
+ path: "/water/lake/collect/special-water/" + res.data.data.id
+ })
}else{
Modal.error({ title:res.data.msg || '文件导入失败', });
}
@@ -308,87 +267,42 @@ export default {
Modal.error({ title:err.data.msg || '文件导入失败', });
hide()
})
+ },
- // let reader = new FileReader();
- // reader.onload = (e) => {
- // try {
- // let data = new Uint8Array(e.target.result);
- // let workbook = XLSX.read(data, {
- // type: "array",
- // });
- // let sheetNames = workbook.SheetNames;
- // // 解析成二维数组
- // let aoa = XLSX.utils.sheet_to_json(workbook.Sheets[sheetNames[0]], {
- // header: 1,
- // });
- // const lakeList = aoa.filter(
- // (item) => {
- // return item.length >= 24 && item[1] && !item[1].includes("测站名称");
- // }
- // );
- // // 解析成对象数组
- // const billName = file.name;
- // const billData = utils.toSpecialLakeData(lakeList);
- // if (!billData || billData.length == 0) {
- // hide()
- // Modal.error({
- // title: "导入失败",
- // content: "找不到数据",
- // });
- // return;
- // }
- // const tasks = [];
- // if (billData.length > 0) {
- // tasks.push(
- // saveSpecialLake({
- // billName: billName,
- // lakeLibrarySpecialList: billData,
- // })
- // );
- // }
+ importFileSpecial(file) {
+ const hide = this.$message.loading("导入中..", 0);
+ const table = this.specialData;
+ let isHas = false;
+ if(Array.isArray(table) && table.length>0){
+ table.forEach(item=>{
+ if(item.billName==file.name){
+ isHas = true
+ }
+ })
+ }
-
- // // 上传到服务器
-
- // Promise.all(tasks)
- // .then((res) => {
- // if (res[0].data.code == 0) {
- // Modal.success({
- // title: "导入成功",
- // content: `成功导入${billData.length}条数据`,
- // });
- // this.$refs.special && this.$refs.special.reload();
- // } else {
- // Modal.error({
- // title: "导入失败",
- // content: "数据上传出错",
- // });
- // }
-
- // })
- // .catch(() => {
- // Modal.error({
- // title: "导入失败",
- // content: "数据上传出错",
- // });
- // })
- // .finally(() => {
- // hide();
- // });
- // } catch (error) {
- // hide();
- // Modal.error({
- // title: "导入失败",
- // content: error.message,
- // });
- // }
- // // console.log(billData);
- // };
- // reader.readAsArrayBuffer(file);
+ if(isHas){
+ const _this = this;
+ Modal.confirm({
+ title: '有重复数据,确认是否覆盖?',
+ onOk() {
+ _this.importSpecialFile(file,hide)
+ },
+ onCancel() {
+ console.log('Cancel');
+ hide()
+ },
+ });
+ }else{
+ this.importSpecialFile(file,hide)
+ }
return false;
},
-
+ reload(){
+ this.getInnerData()
+ this.getSpecialData()
+ }
},
};
diff --git a/src/views/water/lake/collect/special-bill.vue b/src/views/water/lake/collect/special-bill.vue
index 0a02841..4c67d93 100644
--- a/src/views/water/lake/collect/special-bill.vue
+++ b/src/views/water/lake/collect/special-bill.vue
@@ -17,10 +17,33 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -216,12 +239,12 @@
/* 刷新表格 */
reload() {
- this.where.reportTimeStart = null;
- this.where.reportTimeEnd = null;
- if (this.reportTimeScope && this.reportTimeScope.length == 2) {
- this.where.reportTimeStart = this.reportTimeScope[0].format("Y-M-D H:m:s")
- this.where.reportTimeEnd = this.reportTimeScope[1].format("Y-M-D H:m:s")
- }
+ // this.where.reportTimeStart = null;
+ // this.where.reportTimeEnd = null;
+ // if (this.reportTimeScope && this.reportTimeScope.length == 2) {
+ // this.where.reportTimeStart = this.reportTimeScope[0].format("Y-M-D H:m:s")
+ // this.where.reportTimeEnd = this.reportTimeScope[1].format("Y-M-D H:m:s")
+ // }
this.$refs.table.reload({
where: this.where
});
diff --git a/src/views/water/lake/collect/water-bill.vue b/src/views/water/lake/collect/water-bill.vue
index 59be957..13faf98 100644
--- a/src/views/water/lake/collect/water-bill.vue
+++ b/src/views/water/lake/collect/water-bill.vue
@@ -18,9 +18,32 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
@@ -216,12 +239,12 @@
/* 刷新表格 */
reload() {
- this.where.reportTimeStart = null;
- this.where.reportTimeEnd = null;
- if (this.reportTimeScope && this.reportTimeScope.length == 2) {
- this.where.reportTimeStart = this.reportTimeScope[0].format("Y-M-D H:m:s")
- this.where.reportTimeEnd = this.reportTimeScope[1].format("Y-M-D H:m:s")
- }
+ // this.where.reportTimeStart = null;
+ // this.where.reportTimeEnd = null;
+ // if (this.reportTimeScope && this.reportTimeScope.length == 2) {
+ // this.where.reportTimeStart = this.reportTimeScope[0].format("Y-M-D H:m:s")
+ // this.where.reportTimeEnd = this.reportTimeScope[1].format("Y-M-D H:m:s")
+ // }
this.$refs.table.reload({
where: this.where
});
diff --git a/src/views/water/lake/trend/index.vue b/src/views/water/lake/trend/index.vue
new file mode 100644
index 0000000..e16ac7d
--- /dev/null
+++ b/src/views/water/lake/trend/index.vue
@@ -0,0 +1,984 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 开始统计
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/water/river-station/statistic/site-day-avg.vue b/src/views/water/river-station/statistic/site-day-avg.vue
index 92ca2a1..61b99ac 100644
--- a/src/views/water/river-station/statistic/site-day-avg.vue
+++ b/src/views/water/river-station/statistic/site-day-avg.vue
@@ -1,11 +1,11 @@
-
+
@@ -13,17 +13,21 @@
+
+
-
+
+
+
上半月
下半月
整月
-
+
@@ -41,7 +45,6 @@
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
-
@@ -63,6 +66,18 @@
export default {
name: "RiverCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
return {
data: [],
@@ -292,7 +307,23 @@
rules: {},
};
},
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ if(val && this.where.time){
+ this.reload()
+ }
+ }
+ },
created() {
+ // 回显并搜素
+ this.where = this.searchForm;
+ if(this.where.time){
+ this.reload()
+ }
listInfo().then((res) => {
if (res.data.code == 0) {
console.log(res.data.data)
@@ -306,6 +337,9 @@
methods: {
/* 刷新表格 */
reload() {
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
this.loading = true;
listWaterSiteMonthTotal(this.where).then((res) => {
this.datasource = {};
@@ -381,4 +415,7 @@
diff --git a/src/views/water/river-station/statistic/site.vue b/src/views/water/river-station/statistic/site.vue
index fd9a0f8..5112af4 100644
--- a/src/views/water/river-station/statistic/site.vue
+++ b/src/views/water/river-station/statistic/site.vue
@@ -1,11 +1,11 @@
-
+
@@ -13,6 +13,8 @@
+
+
-
+
+
+
上半月
下半月
整月
+
@@ -48,7 +53,6 @@
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
-
@@ -69,6 +73,18 @@
export default {
name: "RiverCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
return {
data: [],
@@ -171,6 +187,17 @@
rules: {},
};
},
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ if(val && this.where.time){
+ this.reload()
+ }
+ }
+ },
created() {
listInfo().then((res) => {
if (res.data.code == 0) {
@@ -185,6 +212,9 @@
methods: {
/* 刷新表格 */
reload() {
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
this.loading = true;
listWaterSiteYoy(this.where).then((res) => {
this.momData = [];
@@ -315,4 +345,7 @@
+.ant-calendar-picker{
+ width: 100%;
+}
+
\ No newline at end of file
diff --git a/src/views/water/river/statistic/avg-index.vue b/src/views/water/river/statistic/avg-index.vue
index f274154..d78e07f 100644
--- a/src/views/water/river/statistic/avg-index.vue
+++ b/src/views/water/river/statistic/avg-index.vue
@@ -1,11 +1,11 @@
-
+
@@ -13,18 +13,24 @@
+
+
{{ item }}
+
+
{{ item }}
+
+
@@ -32,12 +38,17 @@
+
+
+
+
+
@@ -55,7 +66,6 @@
@done="(d) => (data = d.data)">
-
@@ -74,6 +84,18 @@
export default {
name: "RiverCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
return {
data: [],
@@ -131,7 +153,24 @@
targetInfoList:[],
};
},
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ if(val && this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+ }
+ },
created() {
+ // 回显并搜素
+ this.where = this.searchForm;
+ if(this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+
listInfo().then((res) => {
if (res.data.code == 0) {
console.log(res.data.data)
@@ -162,6 +201,9 @@
methods: {
/* 刷新表格 */
reload() {
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
this.loading=true;
listAvgCompositeIndex(this.where).then((res) => {
this.momData = [];
@@ -239,4 +281,8 @@
+
diff --git a/src/views/water/river/statistic/avg-standard.vue b/src/views/water/river/statistic/avg-standard.vue
index 362327c..b0e2a86 100644
--- a/src/views/water/river/statistic/avg-standard.vue
+++ b/src/views/water/river/statistic/avg-standard.vue
@@ -1,11 +1,11 @@
-
+
@@ -13,18 +13,24 @@
+
+
{{ item }}
+
+
{{ item }}
+
+
@@ -32,13 +38,17 @@
-
+
+
+
+
+
@@ -56,7 +66,6 @@
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
-
@@ -74,6 +83,18 @@
export default {
name: "RiverCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
return {
data: [],
@@ -133,7 +154,25 @@
targetInfoList:[],
};
},
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ console.log('change',val)
+ if(val && this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+ }
+ },
created() {
+ // 回显并搜素
+ this.where = this.searchForm;
+ if(this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+
listInfo().then((res) => {
if (res.data.code == 0) {
console.log(res.data.data)
@@ -164,6 +203,9 @@
methods: {
/* 刷新表格 */
reload() {
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
this.loading = true;
listAvgWaterQualitySandard(this.where).then((res) => {
console.log(res.data.data);
@@ -208,4 +250,7 @@
diff --git a/src/views/water/river/statistic/base-index.vue b/src/views/water/river/statistic/base-index.vue
index 40fe361..ec7dbe1 100644
--- a/src/views/water/river/statistic/base-index.vue
+++ b/src/views/water/river/statistic/base-index.vue
@@ -1,11 +1,11 @@
-
+
@@ -13,18 +13,24 @@
+
+
{{ item }}
+
+
{{ item }}
+
+
@@ -32,12 +38,17 @@
+
+
+
+
+
@@ -55,7 +66,6 @@
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
-
@@ -74,6 +84,18 @@
export default {
name: "RiverCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
return {
data: [],
@@ -136,7 +158,24 @@
targetInfoList: [],
};
},
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ if(val && this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+ }
+ },
created() {
+ // 回显并搜素
+ this.where = this.searchForm;
+ if(this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+
listInfo().then((res) => {
if (res.data.code == 0) {
console.log(res.data.data)
@@ -167,6 +206,9 @@
methods: {
/* 刷新表格 */
reload() {
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
this.loading = true;
listMonthCompositeIndex(this.where).then((res) => {
console.log(res.data.data);
@@ -245,4 +287,7 @@
diff --git a/src/views/water/river/statistic/base-standard.vue b/src/views/water/river/statistic/base-standard.vue
index dc08692..51acf20 100644
--- a/src/views/water/river/statistic/base-standard.vue
+++ b/src/views/water/river/statistic/base-standard.vue
@@ -1,11 +1,11 @@
-
+
@@ -13,18 +13,24 @@
+
+
{{ item }}
+
+
{{ item }}
+
+
@@ -32,13 +38,17 @@
-
+
+
+
+
+
@@ -56,7 +66,6 @@
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
-
@@ -74,6 +83,18 @@
export default {
name: "RiverCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
return {
data: [],
@@ -138,7 +159,24 @@
targetInfoList:[],
};
},
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ if(val && this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+ }
+ },
created() {
+ // 回显并搜素
+ this.where = this.searchForm;
+ if(this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+
listInfo().then((res) => {
if (res.data.code == 0) {
console.log(res.data.data)
@@ -169,6 +207,9 @@
methods: {
/* 刷新表格 */
reload() {
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
this.loading = true;
listMonthWaterQualitySandard(this.where).then((res) => {
console.log(res.data.data);
@@ -210,4 +251,7 @@
diff --git a/src/views/water/river/statistic/base.vue b/src/views/water/river/statistic/base.vue
index 927904d..54cbda6 100644
--- a/src/views/water/river/statistic/base.vue
+++ b/src/views/water/river/statistic/base.vue
@@ -1,18 +1,11 @@
-
-
-
-
-
-
-
-
-
+
+
+
@@ -20,18 +13,24 @@
+
+
{{ item }}
+
+
{{ item }}
+
+
@@ -39,19 +38,34 @@
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
查询
重置
导出Excel
+
+
+
(data = d.data)">
-
@@ -79,6 +93,18 @@
export default {
name: "RiverCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
const {
billId
@@ -243,6 +269,17 @@
datasource: {},
};
},
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ if(val && this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+ }
+ },
mounted() {
const {
billId
@@ -288,6 +325,10 @@
loadOptionData() {},
/* 刷新表格 */
reload() {
+
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
console.log(this.where.targetName);
if (this.where.targetName) {
if(this.flg){
@@ -506,4 +547,7 @@
diff --git a/src/views/water/river/statistic/index.vue b/src/views/water/river/statistic/index.vue
index 1f1ff27..d27c088 100644
--- a/src/views/water/river/statistic/index.vue
+++ b/src/views/water/river/statistic/index.vue
@@ -3,49 +3,49 @@
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -54,12 +54,12 @@
-
+
-
+
-
+
@@ -69,6 +69,7 @@
diff --git a/src/views/water/water-function-area/statistic/auto-yoy.vue b/src/views/water/water-function-area/statistic/auto-yoy.vue
index 5f4dd07..9a1b57c 100644
--- a/src/views/water/water-function-area/statistic/auto-yoy.vue
+++ b/src/views/water/water-function-area/statistic/auto-yoy.vue
@@ -1,11 +1,11 @@
-
+
@@ -13,24 +13,33 @@
+
+
{{ item }}
+
+
+
+
+
+
+
+
+
+
+
+
全因子
纳污红线
-
-
-
-
-
-
+
@@ -48,7 +57,6 @@
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
-
@@ -66,6 +74,18 @@
export default {
name: "AutoCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
return {
data: [],
@@ -117,8 +137,23 @@
waterSystemList: [],
};
},
-
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ if(val && this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+ }
+ },
created() {
+ // 回显并搜素
+ this.where = this.searchForm;
+ if(this.where.startTime && this.where.endTime){
+ this.reload()
+ }
listInfo().then((res) => {
if (res.data.code == 0) {
console.log(res.data.data)
@@ -136,6 +171,9 @@
methods: {
/* 刷新表格 */
reload() {
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
this.loading = true;
listAutoYoy(this.where).then((res) => {
console.log(res.data.data);
@@ -174,4 +212,7 @@
diff --git a/src/views/water/water-function-area/statistic/auto.vue b/src/views/water/water-function-area/statistic/auto.vue
index 5c236b1..b2fd41b 100644
--- a/src/views/water/water-function-area/statistic/auto.vue
+++ b/src/views/water/water-function-area/statistic/auto.vue
@@ -6,6 +6,7 @@
+
@@ -13,25 +14,33 @@
+
+
{{ item }}
+
+
+
+
+
+
+
+
+
+
+
+
全因子
纳污红线
-
-
-
-
-
-
-
+
@@ -70,6 +79,18 @@
export default {
name: "RiverCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
return {
data: [],
@@ -90,6 +111,17 @@
waterSystemList: [],
};
},
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ if(val && this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+ }
+ },
mounted() {
this.loading = true;
this.$refs.table.reload({
@@ -174,6 +206,9 @@
},
/* 刷新表格 */
reload() {
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
this.loading = true;
listAutonomyWaterFunctionTotal(this.where).then((res) => {
this.datasource = [];
@@ -256,4 +291,7 @@
diff --git a/src/views/water/water-function-area/statistic/national-standard.vue b/src/views/water/water-function-area/statistic/national-standard.vue
index 7e31078..e16f466 100644
--- a/src/views/water/water-function-area/statistic/national-standard.vue
+++ b/src/views/water/water-function-area/statistic/national-standard.vue
@@ -1,11 +1,11 @@
-
+
@@ -13,23 +13,29 @@
+
+
{{ item }}
+
+
全因子
纳污红线
+
+
-
-
+
+
查询
@@ -46,7 +52,6 @@
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
-
@@ -63,6 +68,18 @@
export default {
name: "AutoCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
return {
data: [],
@@ -163,8 +180,23 @@
waterSystemList: [],
};
},
-
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ if(val && this.where.startTime){
+ this.reload()
+ }
+ }
+ },
created() {
+ // 回显并搜素
+ this.where = this.searchForm;
+ if(this.where.startTime){
+ this.reload()
+ }
listInfo().then((res) => {
if (res.data.code == 0) {
console.log(res.data.data)
@@ -182,8 +214,15 @@
methods: {
/* 刷新表格 */
reload() {
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
this.loading = true;
- listNationalStandard(this.where).then((res) => {
+
+ let search = {...this.where}
+ delete search.endTime;
+
+ listNationalStandard(search).then((res) => {
this.datasource = [];
console.log(res.data.data);
if (res.data.code == 0) {
@@ -289,4 +328,7 @@
diff --git a/src/views/water/water-function-area/statistic/national-yoy.vue b/src/views/water/water-function-area/statistic/national-yoy.vue
index c6656be..9d45598 100644
--- a/src/views/water/water-function-area/statistic/national-yoy.vue
+++ b/src/views/water/water-function-area/statistic/national-yoy.vue
@@ -1,11 +1,11 @@
-
+
@@ -13,24 +13,33 @@
+
+
{{ item }}
+
+
+
+
+
+
+
+
+
+
+
+
全因子
纳污红线
-
-
-
-
-
-
+
@@ -48,7 +57,6 @@
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
-
@@ -66,6 +74,18 @@
export default {
name: "AutoCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
return {
data: [],
@@ -116,8 +136,23 @@
waterSystemList: [],
};
},
-
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ if(val && this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+ }
+ },
created() {
+ // 回显并搜素
+ this.where = this.searchForm;
+ if(this.where.startTime && this.where.endTime){
+ this.reload()
+ }
listInfo().then((res) => {
if (res.data.code == 0) {
console.log(res.data.data)
@@ -135,6 +170,9 @@
methods: {
/* 刷新表格 */
reload() {
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
this.loading = true;
listNationalYoy(this.where).then((res) => {
console.log(res.data.data);
@@ -178,4 +216,8 @@
+
diff --git a/src/views/water/water-function-area/statistic/national.vue b/src/views/water/water-function-area/statistic/national.vue
index 872f7a4..4710f8a 100644
--- a/src/views/water/water-function-area/statistic/national.vue
+++ b/src/views/water/water-function-area/statistic/national.vue
@@ -1,11 +1,11 @@
-
+
@@ -13,25 +13,33 @@
+
+
{{ item }}
+
+
+
+
+
+
+
+
+
+
+
+
全因子
纳污红线
-
-
-
-
-
-
-
+
@@ -49,7 +57,6 @@
:scroll="{ x: 'max-content' }" @done="(d) => (data = d.data)">
-
@@ -70,6 +77,18 @@
export default {
name: "RiverCollectWater",
components: {},
+ props:{
+ // 表格搜索条件
+ searchForm:{
+ typeof:Object,
+ default: function () {
+ return {}
+ },
+ },
+ visiable:{
+ typeof:Boolean
+ }
+ },
data() {
return {
data: [],
@@ -92,6 +111,17 @@
waterSystemList: [],
};
},
+ watch: {
+ searchForm(newV) {
+ this.where = newV;
+ },
+ // 监听组件显示
+ visiable(val){
+ if(val && this.where.startTime && this.where.endTime){
+ this.reload()
+ }
+ }
+ },
mounted() {
this.loading = true;
this.$refs.table.reload({
@@ -179,6 +209,9 @@
},
/* 刷新表格 */
reload() {
+ // 上传搜索条件给父级
+ this.$emit("search", this.where);
+
this.loading = true;
listNationalWaterFunctionTotal(this.where).then((res) => {
console.log(res.data.data);
@@ -255,4 +288,7 @@