Browse Source

页面样式数据修改

shilin 4 years ago
parent
commit
d4d8040a16
2 changed files with 69 additions and 28 deletions
  1. 54 13
      components/windStationCardDetail/WindStationCardDetail.vue
  2. 15 15
      pages/index/Index.vue

+ 54 - 13
components/windStationCardDetail/WindStationCardDetail.vue

@@ -17,25 +17,25 @@
 				<view class="informationCardTextOne">
 					<view class="informationCardText">
 						<view class="textSilver">安全天数(&nbsp;天&nbsp;)&nbsp;:</view>
-						<view class="textWhite">{{windpowerstationdetail.comprehensive_target.aqts}}</view>
+						<view class="textWhite"><view class="textSmail" >{{windpowerstationdetail.comprehensive_target.aqts}}</view></view>
 					</view>
 					<view class="informationCardTextzj">
 						<view class="textSilver">装机容量(MV):</view>
-						<view class="textWhite">{{windpowerstationdetail.comprehensive_target.zjrl}}</view>
+						<view class="textWhite"><view class="textSmail" >{{windpowerstationdetail.comprehensive_target.zjrl}}</view></view>
 					</view>
 				</view>
 				<view class="informationCardTextTwo">
 					<view class="informationCardTextNo1">
 						<view class="textSilver">日发电量(kwh):</view>
-						<view class="textWhite">{{windpowerstationdetail.comprehensive_target.rfdl}}</view>
+						<view class="textWhite"><view class="textSmail" >{{windpowerstationdetail.comprehensive_target.rfdl}}</view></view>
 					</view>
 					<view class="informationCardText3">
 						<view class="textSilver">预测发电量(kwh):</view>
-						<view class="textWhite2">{{windpowerstationdetail.comprehensive_target.ycfdl}}</view>
+						<view class="textWhite2"><view class="textSmail" >{{windpowerstationdetail.comprehensive_target.ycfdl}}</view></view>
 					</view>
 					<view class="informationCardText2">
 						<view class="textSilver">上网电量(kwh):</view>
-						<view class="textWhite">{{windpowerstationdetail.comprehensive_target.swdl}}</view>
+						<view class="textWhite"><view class="textSmail" >{{windpowerstationdetail.comprehensive_target.swdl}}</view></view>
 						<view class="img"></view>
 					</view>
 				</view>
@@ -124,7 +124,7 @@
 			<view class="cardinstallredSpeed">
 				<view class="cardinstalltitleRed">
 					实际功率
-					<span>(kw)</span>
+					<span>(kw)</span>
 				</view>
 				<view class="cardinstallnumberred">{{windspeedpowermodule.index_windSpeed_power_target_detail.sjgl}}</view>
 				<view class="cardinstallnumberredmin">
@@ -137,14 +137,14 @@
 			<view class="cardinstallredSpeed">
 				<view class="cardinstalltitleRed">
 					理论功率
-					<span>(kw)</span>
+					<span>(kw)</span>
 				</view>
 				<view class="cardinstallnumberred">{{windspeedpowermodule.index_windSpeed_power_target_detail.llgl}}</view>
 				<view class="cardinstallnumberredmin">
-					<view class="redMinText">min: {{windspeedpowermodule.index_windSpeed_power_target_detail.llglMax}}</view>
+					<view class="redMinText">min: {{windspeedpowermodule.index_windSpeed_power_target_detail.llglMin}}</view>
 				</view>
 				<view class="cardinstallnumberredmax">
-					<view class="redMaxText">max: {{windspeedpowermodule.index_windSpeed_power_target_detail.llglMin}}</view>
+					<view class="redMaxText">max: {{windspeedpowermodule.index_windSpeed_power_target_detail.llglMax}}</view>
 				</view>
 			</view>
 		</view>
@@ -206,7 +206,8 @@
 					index_windSpeed_power_target_detail:""
 				},
 				windspeedpowercurvedetail:{
-					windpowerstationdetail_twentyfourhourlinechart_target:""
+					windpowerstationdetail_twentyfourhourlinechart_target:"",
+					windpowerstationdetail_sevendaycolumn_target:""
 				},
 				index_windStation_cardmodule:{
 					index_windStation_cardmodule:""
@@ -215,6 +216,7 @@
 				fs:[],
 				llgl:[],
 				ycgl:[],
+				rfdl:[],
 				windStationName: '',
 				isFrameShow: false,
 				count: 0,
@@ -253,6 +255,7 @@
 			this.windpowerstationdetail_springbox_target();
 			this.index_windSpeed_power_target_detail();
 			this.windpowerstationdetail_twentyfourhourlinechart_target();
+			this.windpowerstationdetail_sevendaycolumn_target();
 		},
 		computed: {
 			backStageIp: function() {
@@ -380,6 +383,31 @@
 					});
 				});
 			},
+			async windpowerstationdetail_sevendaycolumn_target() {
+							let _this = this;
+							// 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
+							this.socketTask_windpowerstationdetail_sevendaycolumn_target = uni.connectSocket({
+								// 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
+								url: 'ws://' + this.backStageIp + ':' + this.backStagePort + '/websocket/pageNumber_7/functionNumber_5',
+								success(data) {
+									console.log('websocket连接成功');
+								}
+							});
+							let windpowerstationid = uni.getStorageSync('windpowerstationName');
+							// 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
+							this.socketTask_windpowerstationdetail_sevendaycolumn_target.onOpen(res => {
+								console.log('WebSocket连接正常打开中...!');
+								this.is_open_socket = true;
+								
+								// 注:只有连接正常打开中 ,才能正常收到消息
+								this.socketTask_windpowerstationdetail_sevendaycolumn_target.onMessage(res => {
+									//console.log("收到服务器内容:" + res.data);
+									_this.windspeedpowercurvedetail.windpowerstationdetail_sevendaycolumn_target = JSON.parse(res.data)[_this.FDC];
+									_this.rfdl = _this.windspeedpowercurvedetail.windpowerstationdetail_sevendaycolumn_target.rfdl;
+									_this.getColumnServerData();
+								});
+							});
+						},
 			frameShow: function() {
 				this.count = this.count + 1;
 				if (this.count % 2 == 0) {
@@ -560,7 +588,7 @@
 								max: 40,
 								position: 'left',
 								axisLineColor: '#2E2E2E',
-								title: '         风速:(km/h)',
+								title: '风速:(km/h)',
 								titleFontColor: 'silver'
 							},
 							{
@@ -617,6 +645,15 @@
 						color: '#2fc25b'
 					}]
 				};
+				let _this = this; 
+				Column.categories = [];
+								Column.series[0].data = [];
+								for(let i=0;i<_this.rfdl.length;i++){
+									// _this.rfdl[i].pointTime = new Date(_this.rfdl[i].pointTime * 1000).Format("hh");
+									_this.rfdl[i].pointTime = new Date(_this.rfdl[i].pointTime*1000).Format("MM/dd");
+									Column.categories.push(_this.rfdl[i].pointTime);
+									Column.series[0].data.push(_this.rfdl[i].pointValueInDouble);
+								}
 				// res.data.data = res.data;
 				// let Column = {
 				// 	categories: [],
@@ -725,7 +762,7 @@
 <style>
 	.textSmail{
 		font-size: 12px;
-		transform: scale(0.80)
+		transform: scale(0.80);
 	}
 	body {
 		font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', STHeiti, 'Microsoft Yahei', Tahoma, Simsun, sans-serif;
@@ -841,7 +878,11 @@
 		width: 24px;
 		text-align: right;
 	}
-
+	.textWhite2 {
+		color: white;
+		float: left;
+		text-align: right;
+	}
 	.textSilver {
 		user-select: text;
 		-webkit-user-select: text;

+ 15 - 15
pages/index/Index.vue

@@ -52,17 +52,17 @@
 				<view class="informationCardTextTwo">
 					<view class="informationCardTextNo1">
 						<view class="textSilver" @tap="common.navTo('/components/detail/Detail?callTargetName=日发电量&callTargetUnit=kwh&pointKey='+windpowerstationdetail.target_comprehensive_indicators.rfdl_real.ednaId)">
-							日发电量(kwh):</view>
+							日发(kwh):</view>
 						<view class="textWhite"><view class="textSmail">{{windpowerstationdetail.target_comprehensive_indicators.rfdl}}</view></view>				
 					</view>
 					<view class="informationCardText3">
 						<view class="textSilver" @tap="common.navTo('/components/detail/Detail?callTargetName=预测发电量&callTargetUnit=kwh&pointKey='+windpowerstationdetail.target_comprehensive_indicators.ycfdl_real.ednaId)">
-							预测发电量(kwh):</view>
+							预测发(kwh):</view>
 						<view class="textWhite2"><view class="textSmail">{{windpowerstationdetail.target_comprehensive_indicators.ycfdl}}</view></view>			
 					</view>
 					<view class="informationCardText2">
 						<view class="textSilver" @tap="common.navTo('/components/detail/Detail?callTargetName=上网电量&callTargetUnit=kwh&pointKey='+windpowerstationdetail.target_comprehensive_indicators.swdl_real.ednaId)">
-							上网电量(kwh):</view>
+							上网(kwh):</view>
 						<view class="textWhite"><view class="textSmail">{{windpowerstationdetail.target_comprehensive_indicators.swdl}}</view></view>
 					</view>
 				</view>
@@ -98,7 +98,7 @@
 			</view>
 			<view class="cardinstallredSpeed" @tap="common.navTo('/components/detail/Detail?callTargetName=实际功率&callTargetUnit=kw&pointKey='+windpowerstationdetail.target_windSpeed_power.sjgl_real.ednaId)">
 				<view class="cardinstalltitleRed">
-					实际功率(kw)
+					实际功率(kw)
 					<!-- <view class="textWhitekuang">(kw)</view> -->
 				</view>
 				<view class="cardinstallnumberred">{{windpowerstationdetail.target_windSpeed_power.sjgl}}</view>
@@ -111,7 +111,7 @@
 			</view>
 			<view class="cardinstallredSpeed" @tap="common.navTo('/components/detail/Detail?callTargetName=理论功率&callTargetUnit=kw&pointKey='+windpowerstationdetail.target_windSpeed_power.llgl_real.ednaId)">
 				<view class="cardinstalltitleRed">
-					理论功率(kw)
+					理论功率(kw)
 					<!-- <view class="textWhitekuang">(kw)</view> -->
 				</view>
 				<view class="cardinstallnumberred">{{windpowerstationdetail.target_windSpeed_power.llgl}}</view>
@@ -282,12 +282,12 @@
 						<view class="windStationTitle">麻黄山风电场</view>
 						<view class="powerAndSpeedContainer">
 							<view class="powerAndSpeedRed">
-								预测电量(kwh):
+								预测电量(kwh):
 								<span>{{index_windStation_cardmodule.index_windStation_cardmodule.MHS_FDC.ycdl}}</span>			
 													<!-- {{index_windStation_cardmodule.index_windStation_cardmodule.MHS_FDC.ycdl}} -->
 							</view>
 							<view class="powerAndSpeedRed">
-								日发电量(kwh):
+								日发电量(kwh):
 								<span>{{index_windStation_cardmodule.index_windStation_cardmodule.MHS_FDC.rfdl}}</span>							
 							</view>
 							<view class="powerAndSpeedRed">
@@ -357,11 +357,11 @@
 						<view class="windStationTitle">牛首山风电场</view>
 						<view class="powerAndSpeedContainer">
 							<view class="powerAndSpeedRed">
-								预测电量(kwh):
+								预测电量(kwh):
 								<span>{{index_windStation_cardmodule.index_windStation_cardmodule.NSS_FDC.ycdl}}</span>							
 							</view>
 							<view class="powerAndSpeedRed">
-								日发电量(kwh):
+								日发电量(kwh):
 								<span>{{index_windStation_cardmodule.index_windStation_cardmodule.NSS_FDC.rfdl}}</span>								
 							</view>
 							<view class="powerAndSpeedRed">
@@ -430,11 +430,11 @@
 						<view class="windStationTitle">石板泉风电场</view>
 						<view class="powerAndSpeedContainer">
 							<view class="powerAndSpeedRed">
-								预测电量(kwh):
+								预测电量(kwh):
 								<span>{{index_windStation_cardmodule.index_windStation_cardmodule.SBQ_FDC.ycdl}}</span>			
 							</view>
 							<view class="powerAndSpeedRed">
-								日发电量(kwh):
+								日发电量(kwh):
 								<span>{{index_windStation_cardmodule.index_windStation_cardmodule.SBQ_FDC.rfdl}}</span>
 								
 							</view>
@@ -505,11 +505,11 @@
 						<view class="windStationTitle">青山风电场</view>
 						<view class="powerAndSpeedContainer">
 							<view class="powerAndSpeedRed">
-								预测电量(kwh):
+								预测电量(kwh):
 								<span>{{index_windStation_cardmodule.index_windStation_cardmodule.QS_FDC.ycdl}}</span>			
 							</view>
 							<view class="powerAndSpeedRed">
-								日发电量(kwh):
+								日发电量(kwh):
 								<span>{{index_windStation_cardmodule.index_windStation_cardmodule.QS_FDC.rfdl}}</span>							
 							</view>
 							<view class="powerAndSpeedRed">
@@ -578,11 +578,11 @@
 						<view class="windStationTitle">香山风电场</view>
 						<view class="powerAndSpeedContainer">
 							<view class="powerAndSpeedRed">
-								预测电量(kwh):
+								预测电量(kwh):
 								<span>{{index_windStation_cardmodule.index_windStation_cardmodule.XS_FDC.ycdl}}</span>							
 							</view>
 							<view class="powerAndSpeedRed">
-								日发电量(kwh):
+								日发电量(kwh):
 								<span>{{index_windStation_cardmodule.index_windStation_cardmodule.XS_FDC.rfdl}}</span>								
 							</view>
 							<view class="powerAndSpeedRed">