Browse Source

行车诱导报错

wangqin
zhoule 7 months ago
parent
commit
c0713842f2
  1. 5
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue
  2. 29
      ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue

5
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/components/DeviceControlDialog.vue

@ -38,7 +38,7 @@ export default {
props: { props: {
visible: Boolean, visible: Boolean,
deviceId: String, deviceId: String,
id: String, id: Number,
deviceType: String, deviceType: String,
}, },
data() { data() {
@ -49,6 +49,9 @@ export default {
computed: { computed: {
modelVisible: { modelVisible: {
get() { get() {
if(this.visible){
console.log('id',id)
}
return this.visible; return this.visible;
}, },
set(val) { set(val) {

29
ruoyi-ui/src/views/JiHeExpressway/pages/Home/components/Dialogs/DrivingGuidance/index.vue

@ -164,18 +164,23 @@ export default {
handleClickTabs() { }, handleClickTabs() { },
requestURL(functionId = 52, options = {}) { requestURL(functionId = 52, options = {}) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
request if (!this.dialogData.iotDeviceId) {
.post( reject();
`business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`, } else {
options request
) .post(
.then((result) => { `business/device/functions/${this.dialogData.iotDeviceId}/${functionId}`,
if (result.code != 200) return reject(); options
resolve(result.data[0]); )
}) .then((result) => {
.catch((err) => { if (result.code != 200) return reject();
reject(); resolve(result.data[0]);
}); })
.catch((err) => {
reject();
});
}
}); });
}, },
}, },

Loading…
Cancel
Save