diff --git a/src/App.vue b/src/App.vue index b955e45..b84e83a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -160,4 +160,51 @@ .bg_colorf8{ background-color: #f8f8f8; } + // 顶部筛选样式 + .secreen-section{ + .slot-content{ + padding: 30rpx; + } + .select-date{ + padding: 30rpx; + display: flex; + align-items: center; + font-size: 28rpx; + margin-bottom: 40rpx; + .time_box{ + display: flex; + align-items: center; + .tip_txt{ + color: #ccc; + } + .delete_btn{ + padding: 15rpx; + margin-left: 15rpx; + } + } + } + .quick_times{ + padding: 18rpx 24rpx 24rpx 24rpx; + } + } + // 图表标题通用 + .chart_section{ + .top_box{ + display: flex; + align-items: center; + justify-content: space-between; + padding: 24rpx 30rpx; + margin-bottom: 20rpx; + font-size: 28rpx; + .tit{ + font-size: 28rpx; + font-weight: bold; + .unit{ + font-weight: 500; + margin-left: 16rpx; + font-size: 24rpx; + } + } + } + } diff --git a/src/pages.json b/src/pages.json index 808917a..73334e3 100644 --- a/src/pages.json +++ b/src/pages.json @@ -55,6 +55,24 @@ } } + ,{ + "path" : "pages/index/monitor", + "style" : + { + "navigationBarTitleText": "智能监控", + "enablePullDownRefresh": false + } + + } + ,{ + "path" : "pages/index/soil-monitoring", + "style" : + { + "navigationBarTitleText": "土壤监控", + "enablePullDownRefresh": false + } + + } ], "globalStyle": { "navigationBarTextStyle": "white", diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index d915ca0..5974f5d 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -101,6 +101,14 @@ uni.navigateTo({ url:'/pages/index/meteorological' }) + }else if(item.label=='智能监控'){ + uni.navigateTo({ + url:'/pages/index/monitor' + }) + }else if(item.label=='土壤监控'){ + uni.navigateTo({ + url:'/pages/index/soil-monitoring' + }) } } } diff --git a/src/pages/index/meteorological.vue b/src/pages/index/meteorological.vue index 1c681d5..c441459 100644 --- a/src/pages/index/meteorological.vue +++ b/src/pages/index/meteorological.vue @@ -283,13 +283,13 @@ chart_pm10:{},//pm10 chart_pm25:{},//pm25 chart_co2:{},//co2 + //筛选 q_start_time:'', q_end_time:'', deviceAddressList:[],//筛选设备地区列表 addressName:'', addressValue:'', device_id:'11',//检测点 - options2中的设备id - value3:'',//日期 options2:[], calendarShow:false,//选择日期 start_date_c:'', @@ -447,10 +447,10 @@ let info = data.data; let chartInfo = {}; if(params.start_time!=params.end_time){//不是当天 - this.opts.xAxis.labelCount = 4; - this.opts2.xAxis.labelCount = 4; - this.opts3.xAxis.labelCount = 4; - this.opts4.xAxis.labelCount = 4; + 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 = { @@ -481,7 +481,8 @@ { name:'空气温度', legendShape:'circle', - data: this.air_temperature.data + data: this.air_temperature.data, + } ] }; @@ -635,32 +636,7 @@ // align-items: center; // padding: 0 24rpx; } -.secreen-section{ - .slot-content{ - padding: 30rpx; - } - .select-date{ - padding: 30rpx; - display: flex; - align-items: center; - font-size: 28rpx; - margin-bottom: 40rpx; - .time_box{ - display: flex; - align-items: center; - .tip_txt{ - color: #ccc; - } - .delete_btn{ - padding: 15rpx; - margin-left: 15rpx; - } - } - } - .quick_times{ - padding: 18rpx 24rpx 24rpx 24rpx; - } -} + .chart_section{ .top_box{ diff --git a/src/pages/index/monitor.vue b/src/pages/index/monitor.vue new file mode 100644 index 0000000..e5e6849 --- /dev/null +++ b/src/pages/index/monitor.vue @@ -0,0 +1,25 @@ + + + + + diff --git a/src/pages/index/soil-monitoring.vue b/src/pages/index/soil-monitoring.vue new file mode 100644 index 0000000..f64745e --- /dev/null +++ b/src/pages/index/soil-monitoring.vue @@ -0,0 +1,456 @@ + + + + +