修改设备实时状态参数,同后端一起修改
This commit is contained in:
@ -2,11 +2,11 @@
|
|||||||
const config = {
|
const config = {
|
||||||
// 开发环境
|
// 开发环境
|
||||||
development: {
|
development: {
|
||||||
BASE_URL: 'http://192.168.110.54:8000',
|
BASE_URL: 'http://192.168.2.34:8000',
|
||||||
API_PREFIX: '',
|
API_PREFIX: '',
|
||||||
// MQTT 配置
|
// MQTT 配置
|
||||||
MQTT_HOST: '47.120.79.150',
|
MQTT_HOST: '47.120.79.150',
|
||||||
MQTT_PORT: 8083,
|
MQTT_PORT: 9083,
|
||||||
MQTT_USERNAME: 'admin',
|
MQTT_USERNAME: 'admin',
|
||||||
MQTT_PASSWORD: '#YtvpSfCNG'
|
MQTT_PASSWORD: '#YtvpSfCNG'
|
||||||
},
|
},
|
||||||
@ -16,7 +16,7 @@ const config = {
|
|||||||
API_PREFIX: '',
|
API_PREFIX: '',
|
||||||
// MQTT 配置
|
// MQTT 配置
|
||||||
MQTT_HOST: '47.120.79.150',
|
MQTT_HOST: '47.120.79.150',
|
||||||
MQTT_PORT: 8083,
|
MQTT_PORT: 9083,
|
||||||
MQTT_USERNAME: 'admin',
|
MQTT_USERNAME: 'admin',
|
||||||
MQTT_PASSWORD: '#YtvpSfCNG'
|
MQTT_PASSWORD: '#YtvpSfCNG'
|
||||||
}
|
}
|
||||||
|
@ -188,7 +188,7 @@
|
|||||||
const statusRes = await getdeviceSTatus({
|
const statusRes = await getdeviceSTatus({
|
||||||
functionMode: 2,
|
functionMode: 2,
|
||||||
batchId,
|
batchId,
|
||||||
typeName,
|
typeName:'FunctionAccessBatchStatusRule',
|
||||||
deviceImei,
|
deviceImei,
|
||||||
interval: 500
|
interval: 500
|
||||||
},
|
},
|
||||||
|
@ -725,12 +725,12 @@
|
|||||||
// 获取设备状态
|
// 获取设备状态
|
||||||
// 4. 获取设备状态
|
// 4. 获取设备状态
|
||||||
let deviceImei = this.itemInfo.deviceImei
|
let deviceImei = this.itemInfo.deviceImei
|
||||||
let typeName = this.itemInfo.typeName
|
//let typeName = this.itemInfo.typeName
|
||||||
let batchId = ''
|
let batchId = ''
|
||||||
const statusRes = await getdeviceSTatus({
|
const statusRes = await getdeviceSTatus({
|
||||||
functionMode: 1,
|
functionMode: 1,
|
||||||
batchId,
|
batchId,
|
||||||
typeName,
|
typeName:'FunctionAccessStatusRule',
|
||||||
deviceImei,
|
deviceImei,
|
||||||
interval: 800
|
interval: 800
|
||||||
},
|
},
|
||||||
@ -907,13 +907,13 @@
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 4. 获取设备状态
|
// 4. 获取设备状态FunctionAccessBatchStatusRule 批量
|
||||||
let deviceImei = this.itemInfo.deviceImei
|
let deviceImei = this.itemInfo.deviceImei
|
||||||
let typeName = this.itemInfo.typeName
|
let typeName = this.itemInfo.typeName
|
||||||
const statusRes = await getdeviceSTatus({
|
const statusRes = await getdeviceSTatus({
|
||||||
functionMode: 2,
|
functionMode: 2,
|
||||||
batchId,
|
batchId,
|
||||||
typeName,
|
typeName:'FunctionAccessBatchStatusRule',
|
||||||
deviceImei,
|
deviceImei,
|
||||||
interval: 500
|
interval: 500
|
||||||
},
|
},
|
||||||
@ -991,11 +991,11 @@
|
|||||||
}
|
}
|
||||||
// 4. 获取设备状态
|
// 4. 获取设备状态
|
||||||
let deviceImei = this.itemInfo.deviceImei
|
let deviceImei = this.itemInfo.deviceImei
|
||||||
let typeName = this.itemInfo.typeName
|
//let typeName = this.itemInfo.typeName
|
||||||
const statusRes = await getdeviceSTatus({
|
const statusRes = await getdeviceSTatus({
|
||||||
functionMode: 2,
|
functionMode: 2,
|
||||||
batchId,
|
batchId,
|
||||||
typeName,
|
typeName:'FunctionAccessBatchStatusRule',
|
||||||
deviceImei,
|
deviceImei,
|
||||||
interval: 500
|
interval: 500
|
||||||
},
|
},
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showView: false,
|
showView: false,
|
||||||
phone: '17671332251', //手机号码
|
phone: '13800138002', //手机号码
|
||||||
code: "123456", //验证码
|
code: "123456", //验证码
|
||||||
agreed: false,
|
agreed: false,
|
||||||
isCounting: false,
|
isCounting: false,
|
||||||
|
@ -157,7 +157,7 @@ export default {
|
|||||||
const statusRes = await getdeviceSTatus({
|
const statusRes = await getdeviceSTatus({
|
||||||
functionMode: 2,
|
functionMode: 2,
|
||||||
batchId,
|
batchId,
|
||||||
typeName,
|
typeName:'FunctionAccessBatchStatusRule',
|
||||||
deviceImei,
|
deviceImei,
|
||||||
interval: 500
|
interval: 500
|
||||||
},
|
},
|
||||||
|
@ -119,9 +119,8 @@ import Paho from 'paho-mqtt';
|
|||||||
import allConfigs from '../config/index.js';
|
import allConfigs from '../config/index.js';
|
||||||
|
|
||||||
// 根据环境选择正确的配置
|
// 根据环境选择正确的配置
|
||||||
const env = 'development'; //production //开发of线上 改这里就行
|
const env = 'production'; //production //开发of线上 改这里就行
|
||||||
const config = allConfigs[env];
|
const config = allConfigs[env];
|
||||||
|
|
||||||
class MqttClient {
|
class MqttClient {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.client = null;
|
this.client = null;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import config from '../config/index.js';
|
import config from '../config/index.js';
|
||||||
const env = 'development'; //production development //开发of线上 改这里就行
|
const env = 'production'; //production development //开发of线上 改这里就行
|
||||||
const BASE = config[env];
|
const BASE = config[env];
|
||||||
const request = (options) => {
|
const request = (options) => {
|
||||||
console.log("options"+JSON.stringify(options),BASE.BASE_URL)
|
console.log("options"+JSON.stringify(options),BASE.BASE_URL)
|
||||||
|
Reference in New Issue
Block a user