|
@@ -360,19 +360,7 @@
|
|
@click="breathShow = false"
|
|
@click="breathShow = false"
|
|
></l-echart>
|
|
></l-echart>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
- <!-- <alarModel
|
|
|
|
- v-if="isInitAlarm"
|
|
|
|
- :clientIdProp="clientIdProp"
|
|
|
|
- @sendChange="receptionChange"
|
|
|
|
- @sendHealth="receptHealth"
|
|
|
|
- /> -->
|
|
|
|
-
|
|
|
|
- <!-- <alarModel
|
|
|
|
- v-if="isInitAlarm"
|
|
|
|
- @sendChange="receptionChange"
|
|
|
|
- @sendHealth="receptHealth"
|
|
|
|
- /> -->
|
|
|
|
|
|
+ <alarModel />
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
@@ -418,8 +406,6 @@ export default {
|
|
messageFlag: true,
|
|
messageFlag: true,
|
|
serviceNumberFlag: true,
|
|
serviceNumberFlag: true,
|
|
voipFlag: true,
|
|
voipFlag: true,
|
|
- isInitAlarm: "",
|
|
|
|
-
|
|
|
|
// mqtt模块
|
|
// mqtt模块
|
|
targetPoints: {},
|
|
targetPoints: {},
|
|
inactivityTimer: null,
|
|
inactivityTimer: null,
|
|
@@ -917,8 +903,6 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- reconnectPeriod: 0,
|
|
|
|
- rejectUnauthorized: false,
|
|
|
|
};
|
|
};
|
|
let clientTwo = "";
|
|
let clientTwo = "";
|
|
let selectedService = uni.getStorageSync("sercviceChoice");
|
|
let selectedService = uni.getStorageSync("sercviceChoice");
|
|
@@ -936,6 +920,7 @@ export default {
|
|
);
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ clientTwo = mqtt.connect("wxs://data.radar-power.cn/mqtt/", params);
|
|
console.log("主题开始订阅5555");
|
|
console.log("主题开始订阅5555");
|
|
// 存储client引用以便后续操作
|
|
// 存储client引用以便后续操作
|
|
this.mqttClientOne = clientTwo;
|
|
this.mqttClientOne = clientTwo;
|
|
@@ -1112,7 +1097,6 @@ export default {
|
|
},
|
|
},
|
|
onShow() {
|
|
onShow() {
|
|
this.clientIdProp = uni.getStorageSync("clientIDetail");
|
|
this.clientIdProp = uni.getStorageSync("clientIDetail");
|
|
- this.isInitAlarm = true;
|
|
|
|
this.todayDate = this.$time(new Date(), 2);
|
|
this.todayDate = this.$time(new Date(), 2);
|
|
},
|
|
},
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
@@ -1125,12 +1109,13 @@ export default {
|
|
this.autoSwipe();
|
|
this.autoSwipe();
|
|
}, 3000);
|
|
}, 3000);
|
|
this.getCurrentDate();
|
|
this.getCurrentDate();
|
|
|
|
+ this.connectMqtt();
|
|
},
|
|
},
|
|
- onReady() {
|
|
|
|
|
|
+ onShow() {
|
|
this.connectMqtt();
|
|
this.connectMqtt();
|
|
},
|
|
},
|
|
|
|
+ onSh() {},
|
|
onUnload() {
|
|
onUnload() {
|
|
- this.isInitAlarm = false;
|
|
|
|
this.inactivityTimer = null;
|
|
this.inactivityTimer = null;
|
|
this.autoPlayinterval = null;
|
|
this.autoPlayinterval = null;
|
|
this.closemqtTwo();
|
|
this.closemqtTwo();
|
|
@@ -1138,7 +1123,6 @@ export default {
|
|
onHide() {
|
|
onHide() {
|
|
this.inactivityTimer = null;
|
|
this.inactivityTimer = null;
|
|
this.autoPlayinterval = null;
|
|
this.autoPlayinterval = null;
|
|
- this.isInitAlarm = false;
|
|
|
|
this.closemqtTwo();
|
|
this.closemqtTwo();
|
|
},
|
|
},
|
|
};
|
|
};
|