后管页面新增 远程重启接口

This commit is contained in:
Lemon
2024-09-10 16:52:28 +08:00
parent 5e9beaf83a
commit 70ced2e5f7
2 changed files with 22 additions and 5 deletions

View File

@@ -17,3 +17,11 @@ export function remoteControlGroundLock(data) {
data: data data: data
}) })
} }
export function remoteReboot(data) {
return request({
url: '/pile/remote/reboot',
method: 'post',
data: data
})
}

View File

@@ -1,6 +1,7 @@
<template> <template>
<div style="margin-top:10px"> <div style="margin-top:10px">
<el-button type="primary" icon="el-icon-s-tools" round @click="dialogTableVisible = true">远程固件升级</el-button> <el-button type="primary" icon="el-icon-upload" round @click="dialogTableVisible = true">远程固件升级</el-button>
<el-button type="primary" icon="el-icon-refresh" round @click="remoteReboot()">远程重启</el-button>
<el-dialog title="配件升级" :visible.sync="dialogTableVisible" :before-close="handleClose"> <el-dialog title="配件升级" :visible.sync="dialogTableVisible" :before-close="handleClose">
<el-table <el-table
:data="firmwareList" :data="firmwareList"
@@ -29,7 +30,7 @@
<script> <script>
import { listFirmware } from "@/api/pile/firmware"; import { listFirmware } from "@/api/pile/firmware";
import {updateFirmware} from "@/api/pile/pileRemote"; import {remoteReboot, updateFirmware} from "@/api/pile/pileRemote";
export default { export default {
props:['pileSn'], props:['pileSn'],
data() { data() {
@@ -73,6 +74,14 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
remoteReboot() {
const param = {
pileSn: this.pileSn,
}
remoteReboot(param).then(response => {
console.log("远程重启 result:", response)
})
},
// 选择单选框的点击事件 // 选择单选框的点击事件
singleElection (row) { singleElection (row) {
this.templateSelection = this.firmwareList.indexOf(row); this.templateSelection = this.firmwareList.indexOf(row);