充电桩详情 配置管理已完成

This commit is contained in:
admin-lmm
2023-06-29 17:14:33 +08:00
parent 44d39d673a
commit 53073ea34b
3 changed files with 37 additions and 80 deletions

View File

@@ -3,24 +3,22 @@
<el-button type="primary" icon="el-icon-s-tools" round @click="dialogTableVisible = true">测试远程固件升级</el-button>
<el-dialog title="配件升级" :visible.sync="dialogTableVisible">
<el-table
:data="tableData"
:data="firmwareList"
border
stripe
ref="tableData"
ref="firmwareList"
@row-click="singleElection">
<el-table-column label="" width="65">
<el-table-column width="65">
<template slot-scope="scope">
<el-radio class="radio" v-model="templateSelection" :label="scope.$index">&nbsp;</el-radio>
<el-radio class="radio" v-model="templateSelection" >&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column prop="id" label="ID"></el-table-column>
<el-table-column prop="title" label="标题"></el-table-column>
<el-table-column prop="priority" label="优先级"></el-table-column>
<el-table-column prop="state" label="状态"></el-table-column>
<el-table-column prop="dealingPeople" label="处理人"></el-table-column>
<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>
<div style="margin-top: 20px">
<el-button type="primary">提交</el-button>
<el-button type="primary" @click="submit">提交</el-button>
<el-button>取消选择</el-button>
</div>
</el-dialog>
@@ -29,11 +27,13 @@
<script>
import { listFirmware } from "@/api/pile/firmware";
import {updateFirmware} from "@/api/pile/pileRemote";
export default {
props:['pileSn'],
data() {
return {
templateSelection: '',
templateRadio: null,
templateRadioId: null,
dialogTableVisible: false,
queryParams: {
pageNum: 1,
@@ -41,53 +41,21 @@ export default {
name: null,
},
multipleSelection: [],
tableData: [
{
'id': 1,
'title': '嘿嘿嘿',
'priority': '高',
'state': 1,
'dealingPeople': '小龙女'
},
{
'id': 2,
'title': '嘻嘻嘻',
'priority': '中',
'state': 2,
'dealingPeople': '小龙女'
},
{
'id': 3,
'title': '哈哈哈',
'priority': '低',
'state': 3,
'dealingPeople': '小龙女'
},
{
'id': 3,
'title': '哈哈哈',
'priority': '低',
'state': 3,
'dealingPeople': '小龙女'
},
{
'id': 3,
'title': '哈哈哈',
'priority': '低',
'state': 3,
'dealingPeople': '小龙女'
},
{
'id': 3,
'title': '哈哈哈',
'priority': '低',
'state': 3,
'dealingPeople': '小龙女'
}
]
firmwareList:[]
};
},
methods: {
submit(){
// console.log('接收传递的 pileSn',this.pileSn,this.templateRadioId);
const data = {
pileSns: [this.pileSn],
firmwareId: this.templateRadioId
};
console.log("远程升级固件:", data);
updateFirmware(data).then((response) => {
console.log("updateFirmware结果", response);
});
},
getList() {
this.loading = true;
listFirmware(this.queryParams).then(response => {
@@ -98,13 +66,13 @@ export default {
});
},
singleElection (row) {
console.log('row',row)
this.templateSelection = this.tableData.indexOf(row);
this.templateRadio = row.id;
this.templateSelection = this.firmwareList.indexOf(row);
this.templateRadioId = row.id;
// console.log('this.templateRadio',this.templateRadioId)
},
},
created () {
this.getList()
created() {
// this.getList()
}
}
</script>