This commit is contained in:
hey7845
2022-01-20 21:59:45 +08:00
13 changed files with 295 additions and 34 deletions

View File

@@ -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)
}

BIN
src/assets/bg-login2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

View File

@@ -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;

View File

@@ -6,7 +6,9 @@
:rules="rules"
layout="vertical"
class="login-form ele-bg-white">
<h4>{{ $t('login.title') }}</h4>
<h1>南宁生态环境监测数据<br/>
综合分析平台</h1>
<!-- <h4>{{ $t('login.title') }}</h4>-->
<a-form-item name="username">
<a-input
allow-clear
@@ -44,22 +46,23 @@
</a-button>
</div>
</a-form-item>
<a-form-item>
<a-checkbox v-model:checked="form.remember">
{{ $t('login.remember') }}
</a-checkbox>
<router-link
to="/forget"
class="ele-pull-right"
style="line-height: 22px;">
{{ $t('login.forget') }}
</router-link>
</a-form-item>
<!-- <a-form-item>-->
<!-- <a-checkbox v-model:checked="form.remember">-->
<!-- {{ $t('login.remember') }}-->
<!-- </a-checkbox>-->
<!-- <router-link-->
<!-- to="/forget"-->
<!-- class="ele-pull-right"-->
<!-- style="line-height: 22px;">-->
<!-- {{ $t('login.forget') }}-->
<!-- </router-link>-->
<!-- </a-form-item>-->
<a-form-item>
<a-button
block
size="large"
type="primary"
shape="round"
:loading="loading"
@click="doSubmit">
{{ 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;
}
/* 第三方登录图标 */

View File

@@ -79,10 +79,10 @@ export default {
{title:"断面水质",align: 'center',children: [
{title: "本月", dataIndex: "waterQualityCategory"},
{title: "上月", dataIndex: "waterQualityCategoryMom"},
{title: "去年同期", dataIndex: "waterQualityCategoryAvg"},
{title: "去年同期", dataIndex: "waterQualityCategoryYoy"},
]
},
{title:"主要污染指标",dataIndex:"waterQualityEvaluate",},
{title:"主要污染指标",dataIndex:"mainTarget",},
],

View File

@@ -82,7 +82,7 @@ export default {
{title: "去年同期", dataIndex: "waterQualityCategoryAvg"},
]
},
{title:"主要污染指标",dataIndex:"waterQualityEvaluate",},
{title:"主要污染指标",dataIndex:"mainTarget",},
],

View File

@@ -25,7 +25,9 @@
<a-tab-pane tab="水质统计" key="base7" >
<water-quality-count :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeKey=='base7'"></water-quality-count>
</a-tab-pane>
<!-- <a-tab-pane tab="备用水源营养指数" key="base9">
<water-nutritional :searchForm="searchForm" :filterKeys="filterKeys" @search="changeSearch" @changeFilter="changeFilter" :visiable="activeCity=='base9'"></water-nutritional>
</a-tab-pane> -->
</a-tabs>
</div>
</template>
@@ -51,7 +53,8 @@
import waterQualityCount from "./waterQualityCount.vue";
// 水质达标情况
import waterQualityUp from "./waterQualityUp.vue";
//综合营养指数
// import waterNutritional from "./waterNutritional.vue"
export default {
name: 'city-com',
@@ -61,7 +64,7 @@
waterQuality,
waterQualityCount,
waterQualityUp,
// waterNutritional,
// waterNutritional,
countyWaterWithdrawal,
countyOverStandard
},

View File

@@ -35,7 +35,7 @@ import XLSX from "xlsx";
import Search from "./../components/countySearch.vue";
import {
getWaterCount
countyWaterCount as getWaterCount
} from "@/api/ecology/new-drinking-water";

View File

@@ -0,0 +1,159 @@
<template>
<div class="ele-body">
<a-card :bordered="false">
<!-- 搜索表单 -->
<search
:searchForm="searchForm"
:filterKeys="filterKeys"
@search="searchData"
@exportFile="exportFile"
@filterColumns="changeFilter"
:visiable="visiable"
:loading="loading"
/>
<!-- 表格 -->
<ele-pro-table
ref="table"
row-key="drinkingWaterId"
:datasource="datasource"
:columns="columns"
:where="where"
:scroll="{ x: 'max-content' }"
@done="(d) => (data = d.data)"
>
</ele-pro-table>
</a-card>
</div>
<!-- 编辑弹窗 -->
</template>
<script>
import XLSX from "xlsx";
import {
waterNutritionalData
} from "@/api/ecology/new-drinking-water";
import locale from "ant-design-vue/es/date-picker/locale/zh_CN";
import Search from "./../components/countySearch.vue";
export default {
name: "waterQuality",
components: {
Search
},
props:{
// 表格搜索条件
searchForm:{
typeof:Object,
default: function () {
return {}
},
},
filterKeys:{
typeof:Object,
default: function () {
return []
},
},
visiable:{
typeof:Boolean
}
},
data() {
return {
data: [],
locale,
bill: {},
// 表格数据接口
datasource:[],
selection: [],
columns:[
{title:"监测时间",dataIndex:"monitorTime",},
{title:"类别",dataIndex:"subordinateWater",},
{title:"点位名称",dataIndex:"sectionName",},
{title:"水质类别",dataIndex:"waterSourceProperty",},
{title: "级别", dataIndex: "nutritionLevel"},
{title: "综合营养指数", dataIndex: "compositeNutritionIndex"},
],
// 表格列配置
// 表格搜索条件
where: {
checked: 1,
},
// 表格选中数据
selectionList: [],
loading:false
};
},
mounted() {
},
methods: {
// 获取列表数据
getPageData(){
this.loading = true;
waterNutritionalData(this.where).then(res=>{
this.loading = false;
if(res.data.code){
this.$message.error(res.data.msg);
this.datasource = []
}else{
this.datasource = res.data.data
}
}).catch(()=>{
this.loading = false;
})
},
JumpFieldClick(record, column) {
console.log(column.dataIndex)
},
// 执行搜索
searchData(data){
this.where = data;
this.$emit("search", this.where);
this.reload();
},
/* 刷新表格 */
reload() {
this.getPageData()
// this.$refs.table.reload({
// where: this.where,
// });
},
/* 重置搜索 */
reset() {
this.where = {
checked: 1,
};
this.reload();
},
exportFile() {
const columns = [
...this.columns,
];
const arr = [];
const th = columns.map((item) => item.title);
arr.push(th);
this.datasource.forEach((d) => {
const td = columns.map((item) => d[item.dataIndex]);
arr.push(td);
});
let sheet = XLSX.utils.aoa_to_sheet(arr);
this.$util.exportSheet(XLSX, sheet, new Date().getTime().toString());
},
},
};
</script>
<style scoped lang="less">
</style>

View File

@@ -79,10 +79,10 @@ export default {
{title:"断面水质",align: 'center',children: [
{title: "本月", dataIndex: "waterQualityCategory"},
{title: "上月", dataIndex: "waterQualityCategoryMom"},
{title: "去年同期", dataIndex: "waterQualityCategoryAvg"},
{title: "去年同期", dataIndex: "waterQualityCategoryYoy"},
]
},
{title:"主要污染指标",dataIndex:"waterQualityEvaluate",},
{title:"主要污染指标",dataIndex:"mainTarget",},
],

View File

@@ -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";

View File

@@ -14,6 +14,8 @@
v-model:value="queryParams.yearList"
:options="yearOptions"
placeholder="请选择年度"
@change="handleYearChange"
allowClear
>
</a-select>
</a-form-item>
@@ -25,6 +27,8 @@
v-model:value="queryParams.monthList"
:options="monthOptions"
placeholder="请选择月份"
@change="handleMonthChange"
allowClear
>
</a-select>
</a-form-item>
@@ -52,6 +56,8 @@
v-model:value="queryParams.placeList"
:options="sectionOptions"
placeholder="请选择断面名称"
@change="handleSectionChange"
allowClear
>
</a-select>
</a-form-item>
@@ -63,6 +69,8 @@
v-model:value="queryParams.monitorIndexList"
:options="indicatorOptions"
placeholder="请选择监测指标"
@change="handleIndexChange"
allowClear
>
</a-select>
</a-form-item>
@@ -135,6 +143,7 @@ export default {
innerSection: [], // 内湖断面
specialSection: [], // 专湖断面
innerIndex: [
{ label: "全选", value: "全选", limit:"0",color:"#209f53" },
{ label: "pH值", value: "ph", limit:"9",color:"#209f53" },
{ label: "透明度cm", value: "transparency", limit:"0.01",color:"#209f53" },
// { label: "溶解氧饱和度(﹪)", value: "dissolvedOxygenSaturation", limit:"6",color:"#20749f" },
@@ -159,6 +168,7 @@ export default {
// { label: "氧化还原电位mV", value: "oxidationReductionPotential", limit:"1",color:"#209f53" },
], // 内湖监测指标
specialIndex: [
{ label: "全选", value: "全选", limit:"0",color:"#209f53" },
// { label: "浊度(NTU)", value: "turbidity", limit:"1",color:"#209f53" },
{ label: "水温(℃)", value: "wTemp", limit:"2",color:"#209f53" },
// { label: "水位(m)", value: "wd", limit:"1",color:"#209f53" },
@@ -238,11 +248,64 @@ export default {
},
mounted() {
this.loadOptionData();
Array.prototype.remove = function(val) {
var index = this.indexOf(val);
if (index > -1) {
this.splice(index, 1);
}
};
},
methods: {
// 全选
//年份
handleYearChange(e){
if(e.indexOf('全选')>-1){
this.queryParams.yearList = [...this.yearOptions.map(item=>(
item.value
))]
this.queryParams.yearList.remove('全选');
}
},
// 月份
handleMonthChange(e){
if(e.indexOf('全选')>-1){
this.queryParams.monthList = [...this.monthOptions.map(item=>(
item.value
))]
this.queryParams.monthList.remove('全选');
}
},
// 断面
handleSectionChange(e){
if(e.indexOf('全选')>-1){
this.queryParams.placeList = [...this.sectionOptions.map(item=>(
item.value
))]
this.queryParams.placeList.remove('全选');
}
},
// 指标
handleIndexChange(e){
if(e.indexOf('全选')>-1){
this.queryParams.monitorIndexList = [...this.indicatorOptions.map(item=>(
item.value
))]
this.queryParams.monitorIndexList.remove('全选');
}
},
// 下拉列表
loadOptionData() {
let yy = new Date().getFullYear();
this.yearOptions.push({
label: '全选',
value: '全选',
})
this.monthOptions.push({
label: '全选',
value: '全选',
})
for (let i = 1; i <= 12; i++) {
this.yearOptions.push({
label: yy - i,
@@ -313,6 +376,10 @@ export default {
res.data.data.forEach((item) => {
palceOptions[item.sectionName] = item.sectionName;
});
newPlace.push({
label: '全选',
value: '全选',
})
for (let i in palceOptions) {
newPlace.push({
label: palceOptions[i],
@@ -631,7 +698,11 @@ export default {
},
// 生成年月标识
buildYearMonth(obj){
if(this.queryParams.xco == "Xco_1"){
return obj.year;
}else{
return obj.year + (obj.month ? ('-'+obj.month) : "");
}
},