新增固件升级页面

This commit is contained in:
admin-lmm
2023-06-29 16:41:45 +08:00
parent 43b0dd18c8
commit 925c468d55
3 changed files with 132 additions and 34 deletions

View File

@@ -0,0 +1,114 @@
<template>
<div style="margin-top:10px">
<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"
border
stripe
ref="tableData"
@row-click="singleElection">
<el-table-column label="" width="65">
<template slot-scope="scope">
<el-radio class="radio" v-model="templateSelection" :label="scope.$index">&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>
<div style="margin-top: 20px">
<el-button type="primary">提交</el-button>
<el-button>取消选择</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listFirmware } from "@/api/pile/firmware";
export default {
data() {
return {
templateSelection: '',
templateRadio: null,
dialogTableVisible: false,
queryParams: {
pageNum: 1,
pageSize: 10,
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': '小龙女'
}
]
};
},
methods: {
getList() {
this.loading = true;
listFirmware(this.queryParams).then(response => {
console.log('查询固件接口 firmwareList',response)
this.firmwareList = response.rows;
this.total = response.total;
this.loading = false;
});
},
singleElection (row) {
console.log('row',row)
this.templateSelection = this.tableData.indexOf(row);
this.templateRadio = row.id;
},
},
created () {
this.getList()
}
}
</script>
<style>
</style>

View File

@@ -212,19 +212,18 @@
</el-col> </el-col>
</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> <el-button type="primary" icon="el-icon-s-tools" round @click="updateFirmware('/update.bin')">远程升级</el-button>
<el-button type="primary" icon="el-icon-s-tools" round @click="updateFirmware('/update2.bin')">远程升级2</el-button> <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>
</template> </template>
<script> <script>
import remoteUpgrade from './components/remoteUpgrade.vue';
import { import {
getPileDetailById, getPileDetailById,
getPileFeedList, getPileFeedList,
@@ -236,7 +235,7 @@ import VueQr from "vue-qr";
import {updateFirmware} from "@/api/pile/pileRemote"; import {updateFirmware} from "@/api/pile/pileRemote";
export default { export default {
components: { VueQr }, components: { VueQr ,remoteUpgrade},
name: "pile-detail", name: "pile-detail",
dicts: ["connector_status", "connector_type", "sim_supplier", "sim_operator"], dicts: ["connector_status", "connector_type", "sim_supplier", "sim_operator"],
data() { data() {
@@ -370,22 +369,6 @@ export default {
this.total = response.data.total; this.total = response.data.total;
this.feedListLoading = false; this.feedListLoading = false;
}); });
// this.feedList = [
// {
// time: '2016-05-02',
// description: '设备上线'
// },
// {
// time: '2016-05-01',
// description: '设备离线'
// },
// {
// time: '2016-05-01',
// description: '设备离线'
// }
// ];
// this.total = 3;
// this.loading = false;
}, },
}, },
watch: { watch: {

View File

@@ -5,14 +5,14 @@
</div> --> </div> -->
<el-card v-if="adapayMember == null" shadow="hover" style="margin-bottom:10px"> <el-card v-if="adapayMember == null" shadow="hover" style="margin-bottom:10px">
<div style="margin: 12px 0" > <div style="margin: 12px 0" >
没有查询到会员基本信息请点击按钮创建会员信息及结算账 没有查询到结算账户请点击按钮创建结算账
<!-- 刷新按钮 --> <!-- 刷新按钮 -->
<el-button <el-button
size="medium" size="medium"
type="primary" type="primary"
@click="dialog = true" @click="dialog = true"
> >
创建会员信息与结算账 创建结算账
</el-button> </el-button>
</div> </div>
</el-card> </el-card>
@@ -80,7 +80,7 @@
></el-cascader> ></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label="统一社会信用码" prop="socialCreditCode"> <el-form-item label="统一社会信用码" prop="socialCreditCode">
<el-input v-model.number="dialogForm.socialCreditCode" maxlength="18"></el-input> <el-input v-model="dialogForm.socialCreditCode" maxlength="18"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="统一社会信用证有效期" prop="socialCreditCodeExpires"> <el-form-item label="统一社会信用证有效期" prop="socialCreditCodeExpires">
<el-input v-model.number="dialogForm.socialCreditCodeExpires" maxlength="8" placeholder="有效期格式为:20190909"></el-input> <el-input v-model.number="dialogForm.socialCreditCodeExpires" maxlength="8" placeholder="有效期格式为:20190909"></el-input>
@@ -200,7 +200,8 @@ export default {
return { return {
dialog:false, dialog:false,
dialogForm:{ dialogForm:{
bankAcctType:'1' bankAcctType:'1',
merchantId:this.merchantId
}, },
// 汇付会员 // 汇付会员
adapayMember: '', adapayMember: '',
@@ -300,13 +301,13 @@ export default {
trigger: "blur", trigger: "blur",
} }
], ],
imgList: [ // imgList: [
{ // {
required: true, // required: true,
message: "请上传三张照片", // message: "请上传三张照片",
trigger: "change", // trigger: "change",
} // }
], // ],
businessName:[{ businessName:[{
required: true, required: true,
message: "请输入企业名称", message: "请输入企业名称",
@@ -422,9 +423,9 @@ export default {
console.log("图片上传成功 url", this.imageUrl); console.log("图片上传成功 url", this.imageUrl);
// console.log("图片上传成功 res", res); // console.log("图片上传成功 res", res);
this.fileList.push({ url: res.url }); this.fileList.push({ url: res.url });
console.log('push方法', this.fileList); // console.log('push方法', this.fileList);
this.dialogForm.imgList = this.fileList this.dialogForm.imgList = this.fileList.map(obj => obj.url)
// console.log(this.dialogForm.imgList,'this.dialogForm.imgList'); console.log(this.dialogForm.imgList,'this.dialogForm.imgList');
}, },
handleRemove(file, fileList) { handleRemove(file, fileList) {