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

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

@@ -1,6 +1,7 @@
<template>
<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-table
:data="firmwareList"
@@ -18,18 +19,18 @@
<el-table-column prop="name" label="固件名称"></el-table-column>
<el-table-column prop="description" label="固件描述"></el-table-column>
<el-table-column prop="filePath" label="路径"></el-table-column>
</el-table>
</el-table>
<div style="margin-top: 20px">
<el-button type="primary" @click="submit">提交</el-button>
<!-- <el-button @click="">取消选择</el-button> -->
</div>
</el-dialog>
</el-dialog>
</div>
</template>
<script>
import { listFirmware } from "@/api/pile/firmware";
import {updateFirmware} from "@/api/pile/pileRemote";
import {remoteReboot, updateFirmware} from "@/api/pile/pileRemote";
export default {
props:['pileSn'],
data() {
@@ -73,6 +74,14 @@ export default {
this.loading = false;
});
},
remoteReboot() {
const param = {
pileSn: this.pileSn,
}
remoteReboot(param).then(response => {
console.log("远程重启 result:", response)
})
},
// 选择单选框的点击事件
singleElection (row) {
this.templateSelection = this.firmwareList.indexOf(row);
@@ -93,4 +102,4 @@ export default {
<style>
</style>
</style>