mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-14 23:08:35 +08:00
充电桩详情 配置管理已完成
This commit is contained in:
@@ -3,24 +3,22 @@
|
|||||||
<el-button type="primary" icon="el-icon-s-tools" round @click="dialogTableVisible = true">测试远程固件升级</el-button>
|
<el-button type="primary" icon="el-icon-s-tools" round @click="dialogTableVisible = true">测试远程固件升级</el-button>
|
||||||
<el-dialog title="配件升级" :visible.sync="dialogTableVisible">
|
<el-dialog title="配件升级" :visible.sync="dialogTableVisible">
|
||||||
<el-table
|
<el-table
|
||||||
:data="tableData"
|
:data="firmwareList"
|
||||||
border
|
border
|
||||||
stripe
|
stripe
|
||||||
ref="tableData"
|
ref="firmwareList"
|
||||||
@row-click="singleElection">
|
@row-click="singleElection">
|
||||||
<el-table-column label="" width="65">
|
<el-table-column width="65">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-radio class="radio" v-model="templateSelection" :label="scope.$index"> </el-radio>
|
<el-radio class="radio" v-model="templateSelection" > </el-radio>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="id" label="ID"></el-table-column>
|
<el-table-column prop="name" label="固件名称"></el-table-column>
|
||||||
<el-table-column prop="title" label="标题"></el-table-column>
|
<el-table-column prop="description" label="固件描述"></el-table-column>
|
||||||
<el-table-column prop="priority" label="优先级"></el-table-column>
|
<el-table-column prop="filePath" label="路径"></el-table-column>
|
||||||
<el-table-column prop="state" label="状态"></el-table-column>
|
|
||||||
<el-table-column prop="dealingPeople" label="处理人"></el-table-column>
|
|
||||||
</el-table>
|
</el-table>
|
||||||
<div style="margin-top: 20px">
|
<div style="margin-top: 20px">
|
||||||
<el-button type="primary">提交</el-button>
|
<el-button type="primary" @click="submit">提交</el-button>
|
||||||
<el-button>取消选择</el-button>
|
<el-button>取消选择</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
@@ -29,11 +27,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listFirmware } from "@/api/pile/firmware";
|
import { listFirmware } from "@/api/pile/firmware";
|
||||||
|
import {updateFirmware} from "@/api/pile/pileRemote";
|
||||||
export default {
|
export default {
|
||||||
|
props:['pileSn'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
templateSelection: '',
|
templateSelection: '',
|
||||||
templateRadio: null,
|
templateRadioId: null,
|
||||||
dialogTableVisible: false,
|
dialogTableVisible: false,
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@@ -41,53 +41,21 @@ export default {
|
|||||||
name: null,
|
name: null,
|
||||||
},
|
},
|
||||||
multipleSelection: [],
|
multipleSelection: [],
|
||||||
tableData: [
|
firmwareList:[]
|
||||||
{
|
|
||||||
'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': '小龙女'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
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() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listFirmware(this.queryParams).then(response => {
|
listFirmware(this.queryParams).then(response => {
|
||||||
@@ -98,13 +66,13 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
singleElection (row) {
|
singleElection (row) {
|
||||||
console.log('row',row)
|
this.templateSelection = this.firmwareList.indexOf(row);
|
||||||
this.templateSelection = this.tableData.indexOf(row);
|
this.templateRadioId = row.id;
|
||||||
this.templateRadio = row.id;
|
// console.log('this.templateRadio',this.templateRadioId)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created () {
|
created() {
|
||||||
this.getList()
|
// this.getList()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -213,10 +213,7 @@
|
|||||||
</el-row>
|
</el-row>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="配置管理" name="second">
|
<el-tab-pane label="配置管理" name="second">
|
||||||
<el-button type="primary" icon="el-icon-s-tools" round @click="updateFirmware('/update.bin')">远程升级</el-button>
|
<remoteUpgrade :pileSn="pileSn" ref="second"></remoteUpgrade>
|
||||||
|
|
||||||
<el-button type="primary" icon="el-icon-s-tools" round @click="updateFirmware('/update2.bin')">远程升级2</el-button>
|
|
||||||
<remoteUpgrade></remoteUpgrade>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@@ -232,7 +229,6 @@ import {
|
|||||||
import { queryConnectorListByParams } from "@/api/pile/connector";
|
import { queryConnectorListByParams } from "@/api/pile/connector";
|
||||||
// 二维码组件
|
// 二维码组件
|
||||||
import VueQr from "vue-qr";
|
import VueQr from "vue-qr";
|
||||||
import {updateFirmware} from "@/api/pile/pileRemote";
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { VueQr ,remoteUpgrade},
|
components: { VueQr ,remoteUpgrade},
|
||||||
@@ -291,17 +287,6 @@ export default {
|
|||||||
setTimeout(() => {}, 300);
|
setTimeout(() => {}, 300);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 远程升级固件
|
|
||||||
updateFirmware(filePath) {
|
|
||||||
const data = {
|
|
||||||
pileSns: [this.pileSn],
|
|
||||||
filePath: filePath
|
|
||||||
};
|
|
||||||
console.log("远程升级固件:", data);
|
|
||||||
updateFirmware(data).then((response) => {
|
|
||||||
console.log("updateFirmware结果:", response);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
//点击二维码事件
|
//点击二维码事件
|
||||||
qrcodeClick(row) {
|
qrcodeClick(row) {
|
||||||
if (this.flag) {
|
if (this.flag) {
|
||||||
@@ -348,8 +333,12 @@ export default {
|
|||||||
console.log("getPileDetailById结果:", this.pileDetail);
|
console.log("getPileDetailById结果:", this.pileDetail);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleClick() {
|
handleClick(tab, event) {
|
||||||
console.log("handleClick");
|
// console.log(tab.name, event);
|
||||||
|
if(tab.name === 'second') {
|
||||||
|
this.$refs.second.getList();
|
||||||
|
}
|
||||||
|
// this.initializeData(tab.name);
|
||||||
},
|
},
|
||||||
// 刷新按钮重新获取数据
|
// 刷新按钮重新获取数据
|
||||||
refreshPileConnectorList() {
|
refreshPileConnectorList() {
|
||||||
|
|||||||
@@ -35,9 +35,9 @@ module.exports = {
|
|||||||
proxy: {
|
proxy: {
|
||||||
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
// detail: https://cli.vuejs.org/config/#devserver-proxy
|
||||||
[process.env.VUE_APP_BASE_API]: {
|
[process.env.VUE_APP_BASE_API]: {
|
||||||
target: `http://localhost:8080`,
|
// target: `http://localhost:8080`,
|
||||||
// 更改代理为本地地址
|
// 更改代理为本地地址
|
||||||
// target: `http://192.168.2.3:8080`,
|
target: `http://192.168.2.3:8080`,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
["^" + process.env.VUE_APP_BASE_API]: "",
|
["^" + process.env.VUE_APP_BASE_API]: "",
|
||||||
|
|||||||
Reference in New Issue
Block a user