Jelajahi Sumber

虫情分析 新增自定义归档日期

zhangsijie 2 tahun lalu
induk
melakukan
00826c655b

+ 3 - 3
manifest.json

@@ -1,9 +1,9 @@
 {
-    "name" : "智控",
+    "name" : "云飞智控",
     "appid" : "__UNI__DBA6730",
     "description" : "",
-    "versionName" : "1.6.1",
-    "versionCode" : 161,
+    "versionName" : "1.6.3",
+    "versionCode" : 163,
     "transformPx" : false,
     /* 5+App特有相关 */
     "app-plus" : {

+ 249 - 28
pages/cb/cbd/equip-set/analyse.vue

@@ -40,19 +40,21 @@
 				</view>
 			</view>
 			<view class="selecttimes" @click="tiemshow=!tiemshow">
-				<view class="" style="line-height: 28px;">
-					时间选择器
-				</view>
-				<view class="timesbox">
-					<!-- <image
+					<view class="" style="line-height: 28px;">
+						日期
+					</view>
+					<view class="timesbox">
+						<!-- <image
 						:src="'http://www.hnyfwlw.com:8006/bigdata_app'+'/image/prevention/1acfe2751c01d3786cdc49b83d7e505.png'"
 						mode=""></image> -->
-					<p>{{timetab(oldtime)}}</p>
-					<p class="or">至</p>
-					<p>{{timetab(newtime)}}</p>
-					<!-- <u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon> -->
-				</view>
-				<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+						<p>{{oldtime}}</p>
+						<p class="or">至</p>
+						<p>{{newtime}}</p>
+						<!-- <u-icon name="rili" custom-prefix="custom-icon" class="icon"></u-icon> -->
+					</view>
+					<u-calendar v-model="tiemshow" mode="range" @change="tiemchange"></u-calendar>
+					<u-button type="primary" text="归档时间" size="mini" @click="timeshow = true">归档时间</u-button>
+					<u-select v-model="timeshow" mode="mutil-column" :list="list" @confirm="Hourchange" :default-value="defaultValue"></u-select>
 			</view>
 			<view class="tendency">
 				<canvas canvas-id="canvasColumnA" id="canvasColumnA" class="charts" @touchstart="touchLineA($event)"
@@ -141,6 +143,206 @@
 				d_id: "",
 				oldtime: "",
 				newtime: "",
+				sp_hour_st: '00:00', // 归档开始时间
+				sp_hour_ed: '00:00', // 归档结束时间
+				timeshow: false, // 归档时间设置弹框
+				defaultValue:[0,0],
+				list: [
+					[{
+							value: '00:00',
+							label: '00时'
+						},
+						{
+							value: '01:00',
+							label: '01时'
+						},
+						{
+							value: '02:00',
+							label: '02时'
+						},
+						{
+							value: '03:00',
+							label: '03时'
+						},
+						{
+							value: '04:00',
+							label: '04时'
+						},
+						{
+							value: '05:00',
+							label: '05时'
+						},
+						{
+							value: '06:00',
+							label: '06时'
+						},
+						{
+							value: '07:00',
+							label: '07时'
+						},
+						{
+							value: '08:00',
+							label: '08时'
+						},
+						{
+							value: '09:00',
+							label: '09时'
+						},
+						{
+							value: '10:00',
+							label: '10时'
+						},
+						{
+							value: '11:00',
+							label: '11时'
+						},
+						{
+							value: '12:00',
+							label: '12时'
+						},
+						{
+							value: '13:00',
+							label: '13时'
+						},
+						{
+							value: '14:00',
+							label: '14时'
+						},
+						{
+							value: '15:00',
+							label: '15时'
+						},
+						{
+							value: '16:00',
+							label: '16时'
+						},
+						{
+							value: '17:00',
+							label: '17时'
+						},
+						{
+							value: '18:00',
+							label: '18时'
+						},
+						{
+							value: '19:00',
+							label: '19时'
+						},
+						{
+							value: '20:00',
+							label: '20时'
+						},
+						{
+							value: '21:00',
+							label: '21时'
+						},
+						{
+							value: '22:00',
+							label: '22时'
+						},
+						{
+							value: '23:00',
+							label: '23时'
+						},
+					],
+					[{
+							value: '00:00',
+							label: '00时'
+						},
+						{
+							value: '01:00',
+							label: '01时'
+						},
+						{
+							value: '02:00',
+							label: '02时'
+						},
+						{
+							value: '03:00',
+							label: '03时'
+						},
+						{
+							value: '04:00',
+							label: '04时'
+						},
+						{
+							value: '05:00',
+							label: '05时'
+						},
+						{
+							value: '06:00',
+							label: '06时'
+						},
+						{
+							value: '07:00',
+							label: '07时'
+						},
+						{
+							value: '08:00',
+							label: '08时'
+						},
+						{
+							value: '09:00',
+							label: '09时'
+						},
+						{
+							value: '10:00',
+							label: '10时'
+						},
+						{
+							value: '11:00',
+							label: '11时'
+						},
+						{
+							value: '12:00',
+							label: '12时'
+						},
+						{
+							value: '13:00',
+							label: '13时'
+						},
+						{
+							value: '14:00',
+							label: '14时'
+						},
+						{
+							value: '15:00',
+							label: '15时'
+						},
+						{
+							value: '16:00',
+							label: '16时'
+						},
+						{
+							value: '17:00',
+							label: '17时'
+						},
+						{
+							value: '18:00',
+							label: '18时'
+						},
+						{
+							value: '19:00',
+							label: '19时'
+						},
+						{
+							value: '20:00',
+							label: '20时'
+						},
+						{
+							value: '21:00',
+							label: '21时'
+						},
+						{
+							value: '22:00',
+							label: '22时'
+						},
+						{
+							value: '23:00',
+							label: '23时'
+						},
+					],
+				],
 				tiemshow: false,
 				cWidth: '350',
 				cHeight: '350',
@@ -244,7 +446,9 @@
 						d_ids: this.d_id,
 						identify_model: 'A',
 						start_time: this.oldtime,
-						end_time: this.newtime
+						end_time: this.newtime,
+						sp_hour_st: this.sp_hour_st,
+						sp_hour_ed: this.sp_hour_ed,
 					}
 				})
 				// console.log(res)
@@ -297,15 +501,16 @@
 					let indentText = 0;
 					for (var i = 0; i < res.at_ah_info.length; i++) {
 						var times = new Date(res.at_ah_info[i].addtime * 1000)
-						xtitle.push(times.getMonth() + 1 + "/" + times.getDate() + "-" + times.getHours() + ":" +
-							times.getSeconds())
+						xtitle.push(times.getMonth() + 1 + "/" + times.getDate())
 						atarr.push(res.at_ah_info[i].at == "" ? "0" : res.at_ah_info[i].at)
 						aharr.push(res.at_ah_info[i].ah == "" ? "0" : res.at_ah_info[i].ah)
 						if (this.checkObj(res.char_data) && res.char_data[this.wormvalue]) {
-							if(res.char_data[this.wormvalue][i-indentText] && (res.char_data[this.wormvalue][i-indentText].addtime == res.at_ah_info[i].addtime)) {
-								pestArr.push(res.char_data[this.wormvalue][i-indentText].sum)
+							if (res.char_data[this.wormvalue][i - indentText] && (res.char_data[this.wormvalue][i -
+									indentText
+								].addtime == res.at_ah_info[i].addtime)) {
+								pestArr.push(res.char_data[this.wormvalue][i - indentText].sum)
 							} else {
-								indentText ++ 
+								indentText++
 								pestArr.push(null)
 							}
 						}
@@ -354,8 +559,10 @@
 			},
 			tiemchange(e) {
 				console.log(e)
-				this.oldtime = +new Date(e.startDate) / 1000 - 8 * 60 * 60
-				this.newtime = +new Date(e.endDate) / 1000 + 16 * 60 * 60 - 1
+				// this.oldtime = +new Date(e.startDate) / 1000 - 8 * 60 * 60
+				// this.newtime = +new Date(e.endDate) / 1000 + 16 * 60 * 60 - 1
+				this.newtime = e.endDate;
+				this.oldtime = e.startDate;
 				// newtime: "",
 				console.log(this.oldtime, this.newtime)
 				this.page = 1
@@ -366,13 +573,22 @@
 					this.gettabledata2()
 				}
 			},
+			Hourchange(e) {
+				this.sp_hour_st = e[0].value;
+				this.sp_hour_ed = e[1].value;
+				// 本地缓存
+				uni.setStorageSync('sp_hour_st', this.sp_hour_st);
+				uni.setStorageSync('sp_hour_ed', this.sp_hour_ed);
+				this.getyear();
+				console.log(e)
+			},
 			timetab(e) {
-				e = new Date(e * 1000)
-				var year = e.getFullYear()
-				var month = e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1
-				var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate()
-				var time = year + "/" + month + "/" + day
-				return time
+				// e = new Date(e * 1000)
+				// var year = e.getFullYear()
+				// var month = e.getMonth() + 1 < 10 ? "0" + (e.getMonth() + 1) : e.getMonth() + 1
+				// var day = e.getDate() < 10 ? "0" + e.getDate() : e.getDate()
+				// var time = year + "/" + month + "/" + day
+				// return time
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
@@ -471,6 +687,8 @@
 						identify_model: 'A',
 						start_time: this.oldtime,
 						end_time: this.newtime,
+						sp_hour_st: this.sp_hour_st,
+						sp_hour_ed: this.sp_hour_ed,
 						page: this.page
 					}
 				})
@@ -543,9 +761,12 @@
 		},
 		onLoad(option) {
 			this.d_id = option.d_id
-			var date = +new Date() / 1000
-			this.oldtime = Math.floor(date - 24 * 60 * 60)
-			this.newtime = Math.floor(date)
+			var date = +new Date()
+			this.oldtime = this.formatTime(date, 'yyyy-MM-dd');
+			this.newtime = this.formatTime(date, 'yyyy-MM-dd');
+			this.sp_hour_st = uni.getStorageSync('sp_hour_st') == '' ?  '00:00' : uni.getStorageSync('sp_hour_st');
+			this.sp_hour_ed = uni.getStorageSync('sp_hour_ed') == '' ?  '00:00' : uni.getStorageSync('sp_hour_ed');
+			this.defaultValue=[this.sp_hour_st.substring(0, 1) == '0' ? this.sp_hour_st.substring(1, 2): this.sp_hour_st.substring(0, 2), this.sp_hour_ed.substring(0, 1) == '0' ? this.sp_hour_ed.substring(1, 2): this.sp_hour_ed.substring(0, 2)]
 			this.cWidth = uni.upx2px(650);
 			this.cHeight = uni.upx2px(500);
 			this.getyear()

+ 1 - 0
pages/login/login.vue

@@ -265,6 +265,7 @@
 				this.formdata.passwold = this.formdata.passwold.replace(/[\u4E00-\u9FA5]/g, '')
 			},
 			rempass(val) {
+				debugger
 				this.passvalue = val.value
 				if (val.value) {
 					uni.setStorage({

TEMPAT SAMPAH
unpackage/cache/apk/__UNI__DBA6730_cm.apk


+ 1 - 1
unpackage/cache/apk/apkurl

@@ -1 +1 @@
-https://ide.dcloud.net.cn/build/download/ae3cf5f0-3ce7-11ee-af8e-cbcc2a3fc232
+https://ide.dcloud.net.cn/build/download/12773540-4897-11ee-aaa5-93c615e6a1fd

File diff ditekan karena terlalu besar
+ 1 - 1
unpackage/cache/apk/cmManifestCache.json


File diff ditekan karena terlalu besar
+ 2 - 2
unpackage/cache/wgt/__UNI__DBA6730/app-config-service.js


File diff ditekan karena terlalu besar
+ 4 - 4
unpackage/cache/wgt/__UNI__DBA6730/app-service.js


File diff ditekan karena terlalu besar
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/app-view.js


File diff ditekan karena terlalu besar
+ 1 - 1
unpackage/cache/wgt/__UNI__DBA6730/manifest.json


File diff ditekan karena terlalu besar
+ 2 - 2
unpackage/dist/build/app-plus/app-config-service.js


File diff ditekan karena terlalu besar
+ 4 - 4
unpackage/dist/build/app-plus/app-service.js


File diff ditekan karena terlalu besar
+ 1 - 1
unpackage/dist/build/app-plus/app-view.js


File diff ditekan karena terlalu besar
+ 1 - 1
unpackage/dist/build/app-plus/manifest.json


+ 1 - 1
util/api.js

@@ -5,7 +5,7 @@ export const myRequest = (options) => {
 	console.log(BASE_URL,'my request',process.env.NODE_ENV)
 	if (BASE_URL == '') {
 		// BASE_URL = 'http://8.136.98.49:8002'//线上
-		BASE_URL = process.env.NODE_ENV === 'development' ? "http://192.168.0.36:8003" : "http://8.136.98.49:8002"
+		BASE_URL = process.env.NODE_ENV === 'development' ? "http://8.136.98.49:8002" : "http://8.136.98.49:8002"
 		// BASE_URL = 'http://192.168.1.77:8002'
 	}
 	// BASE_URL = 'http://192.168.1.52:8003'

+ 2 - 2
util/neutral.js

@@ -1,4 +1,4 @@
 export default{
-	// isneutral:true//云飞智控
-	isneutral:false//智控
+	isneutral:true//云飞智控
+	// isneutral:false//智控
 }