|
@ -63,6 +63,7 @@ |
|
|
type="text" |
|
|
type="text" |
|
|
v-if="scope.row.status === '0'" |
|
|
v-if="scope.row.status === '0'" |
|
|
style="color: #00d1ff" |
|
|
style="color: #00d1ff" |
|
|
|
|
|
:disabled="isDiagnosing" |
|
|
@click="diagnosis(scope.row)" |
|
|
@click="diagnosis(scope.row)" |
|
|
>诊断</ElButton |
|
|
>诊断</ElButton |
|
|
> |
|
|
> |
|
@ -119,6 +120,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
|
|
|
isDiagnosing: false, |
|
|
WarningType:{ |
|
|
WarningType:{ |
|
|
1: '交通流预警', |
|
|
1: '交通流预警', |
|
|
2: '气象预警' |
|
|
2: '气象预警' |
|
@ -175,14 +177,16 @@ export default { |
|
|
// }).this.$confirm(`诊断结果:`+deviceTypeCount) |
|
|
// }).this.$confirm(`诊断结果:`+deviceTypeCount) |
|
|
// }, |
|
|
// }, |
|
|
diagnosis(row) { |
|
|
diagnosis(row) { |
|
|
const self = this; |
|
|
const self = this; |
|
|
|
|
|
this.isDiagnosing = true; |
|
|
request({ |
|
|
request({ |
|
|
url: `/business/switch/deviceDiagnostics`, |
|
|
url: `/business/switch/deviceDiagnostics`, |
|
|
method: "post", |
|
|
method: "post", |
|
|
data: { |
|
|
data: { |
|
|
...row, |
|
|
...row, |
|
|
} |
|
|
} |
|
|
}).then((result) => { |
|
|
}).then((result) => { |
|
|
|
|
|
this.isDiagnosing = false; |
|
|
if (result.code != 200) { |
|
|
if (result.code != 200) { |
|
|
return Message.error(result?.msg); |
|
|
return Message.error(result?.msg); |
|
|
} |
|
|
} |
|
@ -191,6 +195,7 @@ export default { |
|
|
type: "warning" |
|
|
type: "warning" |
|
|
}); |
|
|
}); |
|
|
}).catch((error) => { |
|
|
}).catch((error) => { |
|
|
|
|
|
this.isDiagnosing = false; |
|
|
console.error("请求失败:", error); |
|
|
console.error("请求失败:", error); |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|