设备监控修改
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, defineProps, defineExpose, onBeforeUnmount } from 'vue'
|
||||
import { ref, onMounted, defineProps, defineExpose, onBeforeUnmount, inject } from 'vue'
|
||||
import { getMakeUpData, getAskDirOrFile, offlineDataUploadMakeUp } from '@/api/cs-harmonic-boot/recruitment.ts'
|
||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
@@ -141,7 +141,7 @@ const handleIntoDir = (row: any) => {
|
||||
}
|
||||
|
||||
const mqttRef = ref()
|
||||
|
||||
const url: any = inject('MQTTURL')
|
||||
const connectMqtt = () => {
|
||||
if (mqttRef.value) {
|
||||
if (mqttRef.value.connected) {
|
||||
@@ -157,9 +157,6 @@ const connectMqtt = () => {
|
||||
username: 't_user',
|
||||
password: 'njcnpqs'
|
||||
}
|
||||
// 线上
|
||||
// const url = 'wss://pqmcn.com:8087/mqtt'
|
||||
const url = 'ws://192.168.1.24:8085/mqtt'
|
||||
mqttRef.value = mqtt.connect(url, options)
|
||||
}
|
||||
connectMqtt()
|
||||
|
||||
Reference in New Issue
Block a user