diff --git a/src/api/index.js b/src/api/index.js
index 3c6abb1..76aeab4 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -2,8 +2,8 @@ import Request from './luch-request/index.js'
import jwt from './jwt.js'
import {toast} from '@/com/utils.js'
//测试地址
-const baseApi = 'http://36.133.205.221:81';
-
+// const baseApi = 'http://36.133.205.221:81';
+const baseApi = 'http://lcny.sk797.cn';
const http = new Request();
http.setConfig((config) => { /* 设置全局配置 */
diff --git a/src/pages.json b/src/pages.json
index df9a09a..dcb46a6 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -14,7 +14,8 @@
"style" :
{
"navigationBarTitleText": "",
- "enablePullDownRefresh": false
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
}
}
@@ -139,6 +140,56 @@
}
}
+ ,{
+ "path" : "pages/estate/estate-week-price",
+ "style" :
+ {
+ "navigationBarTitleText": "稻虾每周价格",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+
+ }
+ ,{
+ "path" : "pages/estate/estate-industry",
+ "style" :
+ {
+ "navigationBarTitleText": "稻虾产业",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+
+ }
+ ,{
+ "path" : "pages/estate/estate-flows",
+ "style" :
+ {
+ "navigationBarTitleText": "稻虾流向",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+
+ }
+ ,{
+ "path" : "pages/estate/estate-materiels",
+ "style" :
+ {
+ "navigationBarTitleText": "大宗物资",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+
+ }
+ ,{
+ "path" : "pages/index/warning-list",
+ "style" :
+ {
+ "navigationBarTitleText": "预警列表",
+ "enablePullDownRefresh": false,
+ "navigationStyle": "custom"
+ }
+
+ }
],
"globalStyle": {
"navigationBarTextStyle": "white",
diff --git a/src/pages/estate/estate-flows.vue b/src/pages/estate/estate-flows.vue
new file mode 100644
index 0000000..1311719
--- /dev/null
+++ b/src/pages/estate/estate-flows.vue
@@ -0,0 +1,572 @@
+
+
+
+
+ 新增
+
+
+
+
+
+ 筛选条件
+
+
+
+
+
+
+
+
+ 年份:{{ item.year }}
+
+
+
+ 季度:{{item.quarter|quartername}}
+
+
+ 地区:{{ item.area }}
+
+
+ 销量:{{ item.sales }}{{item.unit}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/estate/estate-industry.vue b/src/pages/estate/estate-industry.vue
new file mode 100644
index 0000000..b96a6a9
--- /dev/null
+++ b/src/pages/estate/estate-industry.vue
@@ -0,0 +1,600 @@
+
+
+
+
+ 新增
+
+
+
+
+
+ 筛选条件
+
+
+
+
+
+
+
+
+ 年份:{{ item.year }}
+
+
+
+ 季度:{{item.quarter|quartername}}
+
+
+ 面积:{{item.area}}{{item.area_unit}}
+
+
+ 产量:{{ item.product_output}}{{ item.product_output_unit}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/estate/estate-materiels.vue b/src/pages/estate/estate-materiels.vue
new file mode 100644
index 0000000..b53d73c
--- /dev/null
+++ b/src/pages/estate/estate-materiels.vue
@@ -0,0 +1,671 @@
+
+
+
+
+ 新增
+
+
+
+
+
+ 筛选条件
+
+
+
+
+
+
+
+
+ 名称:{{ item.name }}
+
+
+ 年份:{{ item.year }}
+
+
+
+ 季度:{{item.quarter|quartername}}
+
+
+ 类型:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/estate/estate-price.vue b/src/pages/estate/estate-price.vue
index 446ca32..f1467e9 100644
--- a/src/pages/estate/estate-price.vue
+++ b/src/pages/estate/estate-price.vue
@@ -33,9 +33,9 @@
价格:{{ item.price }}
-
+
@@ -83,7 +83,7 @@
-
+
@@ -161,7 +161,7 @@
+
+
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index ec15cd9..27f59aa 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -5,7 +5,8 @@
@@ -47,8 +48,20 @@
},
],
},
+ // {
+ // label:'基础数据管理',
+ // children:[
+ // {
+ // label:'城镇数据',
+ // },
+ // {
+ // label:'基地数据',
+ // },
+ // ],
+ // },
{
- label:'基础数据管理',
+ label:'全市基础数据',
+ parent:'基础数据管理',
children:[
{
label:'城镇数据',
@@ -56,35 +69,57 @@
{
label:'基地数据',
},
+ ],
+ },
+ {
+ label:'农作物数据',
+ parent:'基础数据管理',
+ children:[
{
label:'城镇农作物',
},
{
label:'基地农作物',
- },
+ }
+ ],
+ },
+ {
+ label:'农作物产量',
+ parent:'基础数据管理',
+ children:[
{
label:'城镇产量',
},
{
label:'基地产量',
},
+ ],
+ },
+ {
+ label:'重点产业',
+ parent:'基础数据管理',
+ children:[
{
label:'稻虾价格',
url:'/pages/estate/estate-price'
},
{
label:'稻虾每周价格',
+ url:'/pages/estate/estate-week-price'
},
{
label:'稻虾产业',
+ url:'/pages/estate/estate-industry'
},
{
label:'稻虾流向',
+ url:'/pages/estate/estate-flows'
},
{
label:'大宗物资',
+ url:'/pages/estate/estate-materiels'
},
- ],
+ ]
},
{
label:'设备管理',
@@ -128,6 +163,7 @@
background-color: #f8f8f8;
.content-box{
padding-top: 30rpx;
+ padding-bottom: 150rpx;
}
}
.menus-section{
diff --git a/src/pages/index/meteorological.vue b/src/pages/index/meteorological.vue
index c441459..c1ca965 100644
--- a/src/pages/index/meteorological.vue
+++ b/src/pages/index/meteorological.vue
@@ -44,7 +44,7 @@
@@ -187,6 +187,7 @@
components: { QiunDataCharts },
data() {
return {
+ optsc:{},
opts: {
dataLabel:false,//显示数据
padding:[10,40,25,25],
@@ -197,6 +198,11 @@
yAxis: {
gridType: "dash",
dashLength: 5,
+ data:[
+ {
+ min:0
+ }
+ ]
},
extra: {
area: {
@@ -207,6 +213,7 @@
},
}
},
+
opts2: {
dataLabel:false,//显示数据
padding:[10,40,25,25],
@@ -310,6 +317,7 @@
},
onLoad(){
this.queryDeviceBasics();
+ this.optsc = JSON.parse(JSON.stringify(this.opts));
},
onReady() {
@@ -324,13 +332,13 @@
})
console.log(narray);
this.addressName = narray[0].name;
- this.$refs.uDropdown.highlight(0);
+ this.$refs.uDropdown.highlight();
this.queryAddressDevicePoints(val);
},
//地区下设备id
change2(val){
- this.$refs.uDropdown.highlight(1);
+ this.$refs.uDropdown.highlight();
this.queryMonitoringData();
},
//日期范围
@@ -400,7 +408,6 @@
this.deviceAddressList = _data;
this.addressValue = _data[0].id;
this.addressName = _data[0].name;
- this.$refs.uDropdown.highlight(0);
this.queryAddressDevicePoints(this.addressValue);
}
}).catch(()=>{
@@ -446,12 +453,8 @@
if(data.code==200){
let info = data.data;
let chartInfo = {};
- if(params.start_time!=params.end_time){//不是当天
- this.opts.xAxis.labelCount = 3;
- this.opts2.xAxis.labelCount = 3;
- this.opts3.xAxis.labelCount = 3;
- this.opts4.xAxis.labelCount = 3;
- }
+
+
for(let fk in info){
let _item = {
categories: [],
@@ -472,6 +475,26 @@
chartInfo[fk] = _item;
}
console.log(chartInfo,'chartDatas--')
+ let labcount = 5;
+ if(params.start_time!=params.end_time){//不是当天
+ labcount = 3;
+ }else{
+ let len = chartInfo.air_temperature.categories.length-1;
+ labcount = 5;
+ let aw = len>10?len%6:len%5;
+ if(aw==3||aw==0||aw==1){
+ labcount = 4;
+ }else if(aw==2){
+ labcount = 3;
+ }else{
+ labcount=5;
+ }
+ }
+ this.optsc.xAxis.labelCount = labcount;
+ this.opts.xAxis.labelCount = labcount;
+ this.opts2.xAxis.labelCount = labcount;
+ this.opts3.xAxis.labelCount = labcount;
+ this.opts4.xAxis.labelCount = labcount;
//start 空气温度 air_temperature
this.air_temperature = chartInfo.air_temperature;
@@ -486,6 +509,16 @@
}
]
};
+ let min_temperature = 0;
+ for(let val of this.air_temperature.data){
+ if(val<0){
+ min_temperature = val;
+ }
+ }
+ if(min_temperature<0){
+ this.optsc.yAxis.data = [];
+ }
+
this.chart_air_temperature = JSON.parse(JSON.stringify(res));
//end 空气温度 air_temperature
//start 空气湿度
diff --git a/src/pages/index/soil-monitoring.vue b/src/pages/index/soil-monitoring.vue
index 23d70da..f964d14 100644
--- a/src/pages/index/soil-monitoring.vue
+++ b/src/pages/index/soil-monitoring.vue
@@ -48,19 +48,19 @@
-
+
Ⅰ级预警
{{deviceWarning[1]?deviceWarning[1]:0}}个
-
+
Ⅱ级预警
{{deviceWarning[2]?deviceWarning[2]:0}}个
-
+
Ⅲ级预警
{{deviceWarning[3]?deviceWarning[3]:0}}个
-
+
Ⅳ级预警
{{deviceWarning[4]?deviceWarning[4]:0}}个
@@ -103,7 +103,7 @@
@@ -200,6 +200,7 @@
components: { QiunDataCharts },
data() {
return {
+ optsc:{},
opts: {
dataLabel:false,//显示数据
padding:[10,40,25,25],
@@ -283,11 +284,19 @@
},
onLoad(){
this.queryDeviceBasics();
+ this.optsc = JSON.parse(JSON.stringify(this.opts));
},
onShow(){
},
methods:{
+ warningClickFn(lv){
+
+ let urlparams = `?lv=${lv}&base=${this.addressValue}&device=${this.device_id}&title=水质监控`;
+ uni.navigateTo({
+ url:`/pages/index/warning-list${urlparams}`
+ })
+ },
//设置预警值
setWarnInfo(){
this.getDeviceWarningRules();
@@ -403,7 +412,6 @@
this.deviceAddressList = _data;
this.addressValue = _data[0].id;
this.addressName = _data[0].name;
- this.$refs.uDropdown.highlight(0);
this.queryAddressDevicePoints(this.addressValue);
}
}).catch(()=>{
@@ -475,6 +483,7 @@
console.log(chartInfo,'chartDatas--')
if(params.start_time!=params.end_time){//不是当天
this.opts.xAxis.labelCount = 3;
+ this.optsc.xAxis.labelCount = 3;
}else{
let len = chartInfo.conductivity.categories.length-1;
let v = 5;
@@ -485,6 +494,7 @@
v = 3;
}else{v=5}
this.opts.xAxis.labelCount = v;
+ this.optsc.xAxis.labelCount = v;
console.log(this.opts,v,len,'配置',aw)
}
@@ -528,7 +538,15 @@
}
]
};
-
+ let min_temperature = 0;
+ for(let val of chartInfo.temperature.data){
+ if(val<0){
+ min_temperature = val;
+ }
+ }
+ if(min_temperature<0){
+ this.optsc.yAxis.data = [];
+ }
this.chart_temperature = JSON.parse(JSON.stringify(res3));
//end 温度
//start 氮 k
diff --git a/src/pages/index/warning-list.vue b/src/pages/index/warning-list.vue
new file mode 100644
index 0000000..eaedce0
--- /dev/null
+++ b/src/pages/index/warning-list.vue
@@ -0,0 +1,278 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{title}}
+
+
+
+
+ 基地:{{ item.base_name }}
+
+
+ 监控点:{{ item.point_name }}
+
+
+ 等级:{{lvname[item.lv]}}
+
+
+ 状态:
+
+
+
+
+
+
+ 设备类型:{{devicetypename[item.device_type]}}
+
+
+ 开始时间:{{item.created_at|timeFormat}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/index/water-quality.vue b/src/pages/index/water-quality.vue
index 2b82b35..f273429 100644
--- a/src/pages/index/water-quality.vue
+++ b/src/pages/index/water-quality.vue
@@ -48,19 +48,19 @@
-
+
Ⅰ级预警
{{deviceWarning[1]?deviceWarning[1]:0}}个
-
+
Ⅱ级预警
{{deviceWarning[2]?deviceWarning[2]:0}}个
-
+
Ⅲ级预警
{{deviceWarning[3]?deviceWarning[3]:0}}个
-
+
Ⅳ级预警
{{deviceWarning[4]?deviceWarning[4]:0}}个
@@ -132,7 +132,7 @@
@@ -201,6 +201,7 @@
components: { QiunDataCharts },
data() {
return {
+ optsc:{},
opts: {
dataLabel:false,//显示数据
padding:[10,40,25,25],
@@ -285,11 +286,19 @@
},
onLoad(){
this.queryDeviceBasics();
+ this.optsc = JSON.parse(JSON.stringify(this.opts));
},
onShow(){
},
methods:{
+ warningClickFn(lv){
+
+ let urlparams = `?lv=${lv}&base=${this.addressValue}&device=${this.device_id}&title=水质监控`;
+ uni.navigateTo({
+ url:`/pages/index/warning-list${urlparams}`
+ })
+ },
//设置预警值
setWarnInfo(){
this.getDeviceWarningRules();
@@ -405,7 +414,7 @@
this.deviceAddressList = _data;
this.addressValue = _data[0].id;
this.addressName = _data[0].name;
- this.$refs.uDropdown.highlight(0);
+
this.queryAddressDevicePoints(this.addressValue);
}
}).catch(()=>{
@@ -477,6 +486,7 @@
console.log(chartInfo,'chartDatas--')
if(params.start_time!=params.end_time){//不是当天
this.opts.xAxis.labelCount = 3;
+ this.optsc.xAxis.labelCount = 3;
}else{
let len = chartInfo.conductivity.categories.length-1;
@@ -488,6 +498,7 @@
v = 3;
}else{v=5}
this.opts.xAxis.labelCount = v;
+ this.optsc.xAxis.labelCount = v;
console.log(this.opts,v,len,'配置',aw)
}
//start 氯
@@ -558,6 +569,15 @@
}
]
};
+ let min_temperature = 0;
+ for(let val of chartInfo.temperature.data){
+ if(val<0){
+ min_temperature = val;
+ }
+ }
+ if(min_temperature<0){
+ this.optsc.yAxis.data = [];
+ }
this.chart_temperature = JSON.parse(JSON.stringify(res5));
//end 温度 temperature
//start 浊度 turbidity
diff --git a/src/pages/login/login.vue b/src/pages/login/login.vue
index 8174667..dba7cae 100644
--- a/src/pages/login/login.vue
+++ b/src/pages/login/login.vue
@@ -69,12 +69,13 @@ export default {
uni.switchTab({
url:'/pages/index/index'
})
+ uni.showToast({ title: '登录成功!', icon: 'none' });
}
}).catch(()=>{
-
+ uni.showToast({ title: '登录失败!', icon: 'none' });
})
- uni.showToast({ title: '登录成功!', icon: 'none' });
+
},
}
diff --git a/src/pages/system/account.vue b/src/pages/system/account.vue
index a1089c8..b330e01 100644
--- a/src/pages/system/account.vue
+++ b/src/pages/system/account.vue
@@ -229,10 +229,12 @@
+