mirror of
https://gitee.com/beecue/fastbee.git
synced 2025-12-17 16:36:03 +08:00
完善前端
This commit is contained in:
@@ -178,13 +178,14 @@
|
||||
</el-dialog>
|
||||
|
||||
<!-- Mqtt通讯 -->
|
||||
<mqtt-client ref="mqttClient" :publish="publish" :subscribes="subscribes" @callbackEvent="mqttCallback($event)" />
|
||||
<mqttClient ref="mqttClient" :publish="publish" :subscribes="subscribes" @callbackEvent="mqttCallback($event)" />
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import mqttClient from './mqtt-client.vue'
|
||||
import {
|
||||
listDeviceShort,
|
||||
delDevice,
|
||||
@@ -196,6 +197,7 @@ import {
|
||||
export default {
|
||||
name: "Device",
|
||||
dicts: ['iot_device_status', 'iot_is_enable'],
|
||||
components: {mqttClient},
|
||||
data() {
|
||||
return {
|
||||
// 实时监测间隔
|
||||
|
||||
@@ -53,8 +53,8 @@ export default {
|
||||
connectTimeout: 60000
|
||||
}
|
||||
// 配置Mqtt地址
|
||||
// let ssl_url = "wss://domain.com/mqtt"
|
||||
let url = "ws://" + window.location.hostname + ":8083/mqtt";
|
||||
let url = "wss://iot.wumei.live/mqtt"
|
||||
// let url = "ws://" + window.location.hostname + ":8083/mqtt";
|
||||
console.log("mqtt地址:", url);
|
||||
this.client = mqtt.connect(url, options);
|
||||
this.client.on("connect", (e) => {
|
||||
|
||||
@@ -176,10 +176,12 @@ import {
|
||||
cacheJsonThingsModel
|
||||
} from "@/api/iot/model";
|
||||
import * as echarts from 'echarts';
|
||||
import mqttClient from './mqtt-client.vue'
|
||||
|
||||
export default {
|
||||
name: "running-status",
|
||||
dicts: ['iot_yes_no'],
|
||||
components: {mqttClient},
|
||||
props: {
|
||||
device: {
|
||||
type: Object,
|
||||
|
||||
Reference in New Issue
Block a user