diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue index 47b07327..fd23a851 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue @@ -48,15 +48,14 @@ export default { } }, created() { - // https://www.yuque.com/dayuanzhong-ovjwn/gkht0m/ww776d5kzs72ilzh?singleDoc= - // 获取设备参数 - request({ - url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1`, - method: "get", - params: {} - }).then(result => { - if (result.code != 200) return; - const deviceInfo = result.data; + + Promise.all([this.getAc(), this.getDc()]).then(res=>{ + // if (result.code != 200) return; + + let ac = res[0].data; + let dc = res[1].data; + let deviceInfo = _.merge({}, ac, dc); + const typeMap = { ac: '220v', dc: '12v', @@ -129,6 +128,20 @@ export default { }) }, methods: { + getAc(){ + return request({ + url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1ac`, + method: "get", + params: {} + }) + }, + getDc(){ + return request({ + url: `/business/device/properties/latest/${this.dialogData.iotDeviceId || '10.0.36.143-1883'}/1dc`, + method: "get", + params: {} + }) + }, async handleSwitcherChange(value, data) { let str = data.state ? "关闭" : "开启"; let deviceName = ""; diff --git a/ruoyi-ui/vue.config.js b/ruoyi-ui/vue.config.js index 76fd75fd..408183dc 100644 --- a/ruoyi-ui/vue.config.js +++ b/ruoyi-ui/vue.config.js @@ -54,9 +54,9 @@ module.exports = { // target: `http://10.168.78.135:8087`, //王钦 // target: `http://10.168.66.196:8087`, //正晨后台 连现场物联 刘文阁2 // target: `http://10.168.68.42:8087`, //王思祥 - target: `http://10.168.65.194:8087`, //赵祥龙 + // target: `http://10.168.65.194:8087`, //赵祥龙 // target: `http://10.168.65.156:8097`, //孟 - // target: `http://10.168.76.181:8087`, //王家宝 + target: `http://10.168.76.181:8087`, //王家宝 // target: `http://10.168.65.103:8097`, changeOrigin: true, pathRewrite: {