Browse Source

设备箱拆分接口ac、dc

wangqin
hui 11 months ago
parent
commit
fc5c0631c2
  1. 31
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/SmartDevice/components/DeviceParams.vue
  2. 4
      ruoyi-ui/vue.config.js

31
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 = "";

4
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: {

Loading…
Cancel
Save