Browse Source

修改部分信息

shilin 4 years ago
parent
commit
22f750924f

+ 21 - 28
components/detail/Detail.vue

@@ -50,7 +50,7 @@ export default {
 		let data = {
 			targetName:"日发电量",
 			targetUnit:"万kwh",
-			pointKey:"HB_GD_KBF_JS_P4_L19_220_CI0136",
+			pointKey:"MHSFCJSFW.NX_GD_MHSF_XX_XX_XXX_XXX_CI0087",
 			targetdetail_visable: { targetdetail_target: true, targetdetail_curve: true, targetdetail_histogram: true},
 			targetdetail: { targetdetail_target: '', targetdetail_curve: '', targetdetail_histogram: ''},
 			socketTask_targetdetail_target:"",
@@ -147,6 +147,23 @@ export default {
 			})
 		},
 		targetdetail_curve() {
+			Date.prototype.Format = function(fmt) {
+						var o = {
+							"M+": this.getMonth() + 1, //月份
+							"d+": this.getDate(), //日
+							"h+": this.getHours(), //小时
+							"m+": this.getMinutes(), //分
+							"s+": this.getSeconds(), //秒
+							"q+": Math.floor((this.getMonth() + 3) / 3), //季度
+							"S": this.getMilliseconds() //毫秒
+						};
+						if(/(y+)/.test(fmt))
+							fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
+						for(var k in o)
+							if(new RegExp("(" + k + ")").test(fmt))
+								fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
+						return fmt;
+			};
 			let ip;
 			uni.request({
 			    url: 'http://'+this.backStageIp+':'+this.backStagePort+'/targetdetail/targetdetail_curve?pointKey='+this.pointKey,
@@ -176,36 +193,12 @@ export default {
 					
 					let LineA = {
 						categories: [
-							'17:26',
-							'18:56',
-							'19:56',
-							'20:56',
-							'21:56',
-							'22:56',
-							'23:56',
-							'00:56',
-							'01:56',
-							'02:56',
-							'03:56',
-							'04:56',
-							'05:56',
-							'06:56',
-							'07:56',
-							'08:56',
-							'09:56',
-							'10:56',
-							'11:56',
-							'12:56',
-							'13:56',
-							'14:56',
-							'15:56',
-							'16:56',
-							'17:56            '
+		
 						],
 						series: [
 							{
 								name: '功率',
-								data: [17, 21, 19, 22, 20.2, 19.1, 22.4, 23.8, 21.5, 22.9, 19.2, 22.4, 18.7, 22.1, 21.4, 22.7, 18.4, 18.4, 21.8, 22.5, 22.9, 19.8, 22.7, 23, 22.8],
+								data: [],
 								color: '#4A80B1',
 								textColor: '#FFFFFF',
 								textSize: this.seriesTextSize,
@@ -222,7 +215,7 @@ export default {
 					LineA.series[0].data=[];
 					LineA.series[0].name=this.targetName;
 					for(var i=0;i<_this.targetdetail.targetdetail_curve.length;i++){
-						_this.targetdetail.targetdetail_curve[i].pointTime = new Date(_this.targetdetail.targetdetail_curve[i].pointTime*1000).Format("MM/dd");
+						_this.targetdetail.targetdetail_curve[i].pointTime = new Date(_this.targetdetail.targetdetail_curve[i].pointTime*1000).Format("hh");
 						LineA.categories.push(_this.targetdetail.targetdetail_curve[i].pointTime);
 						LineA.series[0].data.push(_this.targetdetail.targetdetail_curve[i].pointValueInDouble);
 					}

+ 1 - 1
components/windStationCardDetail/WindStationCardDetail.vue

@@ -164,7 +164,7 @@ var canvaColumn = null;
 export default {
 	data: function() {
 		return {
-			FDC:"CL_FDC",
+			FDC:"MHS_FDC",
 			socketTask_comprehensive_target:'',
 			windpowerstationdetail:{comprehensive_target:""},
 			windStationName: '',