优化更换网关sn

main
刘妍 1 month ago
parent 58cd76097f
commit 5c1f6ce683

@ -2,7 +2,6 @@ import { clientReizePublish, clientReizeSubscribe } from '@/utils/mqtt';
import { airPortStore } from '@/store/modules/airport';
const airPortStoreVal = airPortStore();
const gateway = airPortStoreVal.getGateway;
export const return_home_status = {
canceled: '取消或终止',
@ -16,26 +15,26 @@ export const return_home_status = {
};
export const eventsTopicReize = (data) => {
// 发送消息
clientReizePublish('thing/product/' + gateway + '/events', data);
clientReizePublish('thing/product/' + airPortStoreVal.getGateway + '/events', data);
};
export const events_replyTopicReize = () => {
// 订阅消息
clientReizeSubscribe('thing/product/' + gateway + '/events_reply');
clientReizeSubscribe('thing/product/' + airPortStoreVal.getGateway + '/events_reply');
};
export const servicesTopicReize = (data) => {
// 发送消息
clientReizePublish('thing/product/' + gateway + '/services', data);
clientReizePublish('thing/product/' + airPortStoreVal.getGateway + '/services', data);
};
export const services_replyTopicReize = () => {
// 订阅消息
clientReizeSubscribe('thing/product/' + gateway + '/services_reply');
clientReizeSubscribe('thing/product/' + airPortStoreVal.getGateway + '/services_reply');
};
export const drcDownTopicReize = (data) => {
// 发送消息thing/product/{gateway_sn}/drc/down
clientReizePublish('thing/product/' + gateway + '/drc/down', data);
clientReizePublish('thing/product/' + airPortStoreVal.getGateway + '/drc/down', data);
};
export const eventsTopicSubscribeReize = () => {
// 发送消息
clientReizeSubscribe('thing/product/' + gateway + '/events');
clientReizeSubscribe('thing/product/' + airPortStoreVal.getGateway + '/events');
};

@ -3,7 +3,6 @@ import { airPortStore } from '@/store/modules/airport';
import errorCode from './error_code.json';
const airPortStoreVal = airPortStore();
const gateway = airPortStoreVal.getGateway;
export const debug_mode_openOptions = {
canceled: '取消或终止',
failed: '失败',
@ -35,39 +34,40 @@ export const errorName = (code) => {
}
};
export const servicesTopic = (data) => {
console.log(airPortStoreVal.getGateway);
// 发送消息
clientPublish('thing/product/' + gateway + '/services', data);
clientPublish('thing/product/' + airPortStoreVal.getGateway + '/services', data);
};
export const services_replyTopic = () => {
// 订阅消息
clientSubscribe('thing/product/' + gateway + '/services_reply');
clientSubscribe('thing/product/' + airPortStoreVal.getGateway + '/services_reply');
};
export const eventsTopic = (data) => {
// 发送消息
clientPublish('thing/product/' + gateway + '/events', data);
clientPublish('thing/product/' + airPortStoreVal.getGateway + '/events', data);
};
export const events_replyTopic = () => {
// 订阅消息
clientSubscribe('thing/product/' + gateway + '/events_reply');
clientSubscribe('thing/product/' + airPortStoreVal.getGateway + '/events_reply');
};
export const drcDownTopic = (data) => {
// 发送消息thing/product/{gateway_sn}/drc/down
clientPublish('thing/product/' + gateway + '/drc/down', data);
clientPublish('thing/product/' + airPortStoreVal.getGateway + '/drc/down', data);
};
export const eventsTopicSubscribe = () => {
// 发送消息
clientSubscribe('thing/product/' + gateway + '/events');
clientSubscribe('thing/product/' + airPortStoreVal.getGateway + '/events');
};
export const drcUpTopic = () => {
clientSubscribe('thing/product/' + gateway + '/drc/up');
clientSubscribe('thing/product/' + airPortStoreVal.getGateway + '/drc/up');
};
export const setTopic = (data) => {
// 发送消息
clientPublish('thing/product/' + gateway + '/property/set', data);
clientPublish('thing/product/' + airPortStoreVal.getGateway + '/property/set', data);
};
export const set_replyTopic = () => {
// 订阅消息
clientSubscribe('thing/product/' + gateway + '/services_reply');
clientSubscribe('thing/product/' + airPortStoreVal.getGateway + '/services_reply');
};

@ -2397,7 +2397,7 @@ const setUAVPosition = () => {
props.uavTrack.latitude,
props.uavTrack.height,
);
route.addTimePosition(positionVal);
route.addTimePosition(positionVal,Cesium.JulianDate.fromDate(new Date()));
}
};

Loading…
Cancel
Save