|
@@ -15,25 +15,25 @@
|
|
<view class="informationCardTextOne">
|
|
<view class="informationCardTextOne">
|
|
<view class="informationCardText">
|
|
<view class="informationCardText">
|
|
<view class="textSilver" @tap="common.navTo('/components/detail/Detail')">安全天数( 天 ) :</view>
|
|
<view class="textSilver" @tap="common.navTo('/components/detail/Detail')">安全天数( 天 ) :</view>
|
|
- <view class="textWhite">15</view>
|
|
|
|
|
|
+ <view class="textWhite">{{windpowerstationdetail.comprehensive_target.aqts}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="informationCardTextzj">
|
|
<view class="informationCardTextzj">
|
|
<view class="textSilver" @tap="common.navTo('/components/detail/Detail')">装机容量(MV):</view>
|
|
<view class="textSilver" @tap="common.navTo('/components/detail/Detail')">装机容量(MV):</view>
|
|
- <view class="textWhite">15</view>
|
|
|
|
|
|
+ <view class="textWhite">{{windpowerstationdetail.comprehensive_target.zjrl}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="informationCardTextTwo">
|
|
<view class="informationCardTextTwo">
|
|
<view class="informationCardTextNo1">
|
|
<view class="informationCardTextNo1">
|
|
<view class="textSilver" @tap="common.navTo('/components/detail/Detail')">日发电量(kwh):</view>
|
|
<view class="textSilver" @tap="common.navTo('/components/detail/Detail')">日发电量(kwh):</view>
|
|
- <view class="textWhite">150</view>
|
|
|
|
|
|
+ <view class="textWhite">{{windpowerstationdetail.comprehensive_target.rfdl}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="informationCardText3">
|
|
<view class="informationCardText3">
|
|
<view class="textSilver" @tap="common.navTo('/components/detail/Detail')">预测发电量(kwh):</view>
|
|
<view class="textSilver" @tap="common.navTo('/components/detail/Detail')">预测发电量(kwh):</view>
|
|
- <view class="textWhite2">15</view>
|
|
|
|
|
|
+ <view class="textWhite2">{{windpowerstationdetail.comprehensive_target.ycfdl}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="informationCardText2">
|
|
<view class="informationCardText2">
|
|
<view class="textSilver" @tap="common.navTo('/components/detail/Detail')">上网电量(kwh):</view>
|
|
<view class="textSilver" @tap="common.navTo('/components/detail/Detail')">上网电量(kwh):</view>
|
|
- <view class="textWhite">15</view>
|
|
|
|
|
|
+ <view class="textWhite">{{windpowerstationdetail.comprehensive_target.swdl}}</view>
|
|
<view class="img"></view>
|
|
<view class="img"></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -164,6 +164,9 @@ var canvaColumn = null;
|
|
export default {
|
|
export default {
|
|
data: function() {
|
|
data: function() {
|
|
return {
|
|
return {
|
|
|
|
+ FDC:"CL_FDC",
|
|
|
|
+ socketTask_comprehensive_target:'',
|
|
|
|
+ windpowerstationdetail:{comprehensive_target:""},
|
|
windStationName: '',
|
|
windStationName: '',
|
|
isFrameShow: false,
|
|
isFrameShow: false,
|
|
count: 0,
|
|
count: 0,
|
|
@@ -171,7 +174,8 @@ export default {
|
|
cHeight: '',
|
|
cHeight: '',
|
|
pixelRatio: 1,
|
|
pixelRatio: 1,
|
|
serverData: '',
|
|
serverData: '',
|
|
- sanJiao: 'sanJiaoDown'
|
|
|
|
|
|
+ sanJiao: 'sanJiaoDown',
|
|
|
|
+
|
|
};
|
|
};
|
|
},
|
|
},
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
@@ -180,8 +184,52 @@ export default {
|
|
this.cHeight = uni.upx2px(400);
|
|
this.cHeight = uni.upx2px(400);
|
|
this.getServerData();
|
|
this.getServerData();
|
|
this.getColumnServerData();
|
|
this.getColumnServerData();
|
|
|
|
+ this.comprehensive_target();
|
|
|
|
+ },
|
|
|
|
+ computed:{
|
|
|
|
+ backStageIp:function(){
|
|
|
|
+ return this.$store.state.wholeSituationBackStageIp;
|
|
|
|
+ }, backStagePort:function(){
|
|
|
|
+ return this.$store.state.wholeSituationBackStagePort;
|
|
|
|
+ },windpowerstationNameToId:function(){
|
|
|
|
+ return this.$store.state.windpowerstationNameToId;
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ async comprehensive_target() {
|
|
|
|
+
|
|
|
|
+ let _this = this;
|
|
|
|
+ // 创建一个this.socketTask对象【发送、接收、关闭socket都由这个对象操作】
|
|
|
|
+ this.socketTask_comprehensive_target = uni.connectSocket({
|
|
|
|
+ // 【非常重要】必须确保你的服务器是成功的,如果是手机测试千万别使用ws://127.0.0.1:9099【特别容易犯的错误】
|
|
|
|
+ url: 'ws://'+this.backStageIp+':'+this.backStagePort+'/websocket/pageNumber_7/functionNumber_1',
|
|
|
|
+ success(data) {
|
|
|
|
+ console.log('websocket连接成功');
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ let windpowerstationid = uni.getStorageSync('windpowerstationName');
|
|
|
|
+ // 消息的发送和接收必须在正常连接打开中,才能发送或接收【否则会失败】
|
|
|
|
+ this.socketTask_comprehensive_target.onOpen(res => {
|
|
|
|
+ console.log('WebSocket连接正常打开中...!');
|
|
|
|
+ this.is_open_socket = true;
|
|
|
|
+
|
|
|
|
+ // 注:只有连接正常打开中 ,才能正常收到消息
|
|
|
|
+ this.socketTask_comprehensive_target.onMessage(res => {
|
|
|
|
+ //console.log("收到服务器内容:" + res.data);
|
|
|
|
+ _this.windpowerstationdetail.comprehensive_target =JSON.parse(res.data)[_this.FDC];
|
|
|
|
+
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ // 这里仅是事件监听【如果socket关闭了会执行】
|
|
|
|
+/* this.socketTask_comprehensive_target.onClose(() => {
|
|
|
|
+ uni.request({
|
|
|
|
+ url: 'http://'+this.backStageIp+':'+this.backStagePort+'/targetdetail/close_targetdetail_target?pointKey='+this.pointKey,
|
|
|
|
+ success: (res) => {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+ }) */
|
|
|
|
+ },
|
|
frameShow: function() {
|
|
frameShow: function() {
|
|
this.count = this.count + 1;
|
|
this.count = this.count + 1;
|
|
if (this.count % 2 == 0) {
|
|
if (this.count % 2 == 0) {
|