mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-10 04:50:11 +08:00
Merge branch 'dev-new' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev-new
This commit is contained in:
@@ -1,307 +1,399 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px" @submit.native.prevent>
|
<el-form
|
||||||
<el-form-item label="固件名称" prop="name">
|
:model="queryParams"
|
||||||
<el-input
|
ref="queryForm"
|
||||||
v-model="queryParams.name"
|
size="small"
|
||||||
placeholder="请输入固件名称"
|
:inline="true"
|
||||||
clearable
|
v-show="showSearch"
|
||||||
@keyup.enter.native="handleQuery"
|
label-width="68px"
|
||||||
/>
|
@submit.native.prevent
|
||||||
</el-form-item>
|
>
|
||||||
<el-form-item>
|
<el-form-item label="固件名称" prop="name">
|
||||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-input
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
v-model="queryParams.name"
|
||||||
</el-form-item>
|
placeholder="请输入固件名称"
|
||||||
</el-form>
|
clearable
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
plain
|
plain
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
v-hasPermi="['pile:firmware:add']"
|
v-hasPermi="['pile:firmware:add']"
|
||||||
>新增</el-button>
|
>新增</el-button
|
||||||
</el-col>
|
>
|
||||||
<el-col :span="1.5">
|
</el-col>
|
||||||
<el-button
|
<el-col :span="1.5">
|
||||||
type="success"
|
<el-button
|
||||||
plain
|
type="success"
|
||||||
icon="el-icon-edit"
|
plain
|
||||||
size="mini"
|
icon="el-icon-edit"
|
||||||
:disabled="single"
|
size="mini"
|
||||||
@click="handleUpdate"
|
:disabled="single"
|
||||||
v-hasPermi="['pile:firmware:edit']"
|
@click="handleUpdate"
|
||||||
>修改</el-button>
|
v-hasPermi="['pile:firmware:edit']"
|
||||||
</el-col>
|
>修改</el-button
|
||||||
<el-col :span="1.5">
|
>
|
||||||
<el-button
|
</el-col>
|
||||||
type="danger"
|
<el-col :span="1.5">
|
||||||
plain
|
<el-button
|
||||||
icon="el-icon-delete"
|
type="danger"
|
||||||
size="mini"
|
plain
|
||||||
:disabled="multiple"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete"
|
size="mini"
|
||||||
v-hasPermi="['pile:firmware:remove']"
|
:disabled="multiple"
|
||||||
>删除</el-button>
|
@click="handleDelete"
|
||||||
</el-col>
|
v-hasPermi="['pile:firmware:remove']"
|
||||||
<el-col :span="1.5">
|
>删除</el-button
|
||||||
<el-button
|
>
|
||||||
type="warning"
|
</el-col>
|
||||||
plain
|
<el-col :span="1.5">
|
||||||
icon="el-icon-download"
|
<el-button
|
||||||
size="mini"
|
type="warning"
|
||||||
@click="handleExport"
|
plain
|
||||||
v-hasPermi="['pile:firmware:export']"
|
icon="el-icon-download"
|
||||||
>导出</el-button>
|
size="mini"
|
||||||
</el-col>
|
@click="handleExport"
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
v-hasPermi="['pile:firmware:export']"
|
||||||
</el-row>
|
>导出</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
<el-table v-loading="loading" :data="firmwareList" @selection-change="handleSelectionChange">
|
<el-table
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
v-loading="loading"
|
||||||
<!-- <el-table-column label="主键id" align="center" prop="id" />-->
|
:data="firmwareList"
|
||||||
<el-table-column label="固件名称" align="center" prop="name" />
|
@selection-change="handleSelectionChange"
|
||||||
<el-table-column label="固件描述" align="center" prop="description" />
|
>
|
||||||
<el-table-column label="路径" align="center" prop="filePath" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<!-- <el-table-column label="主键id" align="center" prop="id" />-->
|
||||||
<template slot-scope="scope">
|
<el-table-column label="固件名称" align="center" prop="name" />
|
||||||
<!--<el-button
|
<el-table-column label="固件描述" align="center" prop="description" />
|
||||||
|
<el-table-column label="路径" align="center" prop="filePath" />
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<!--<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
v-hasPermi="['pile:firmware:edit']"
|
v-hasPermi="['pile:firmware:edit']"
|
||||||
>修改</el-button>-->
|
>修改</el-button>-->
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
v-hasPermi="['pile:firmware:remove']"
|
v-hasPermi="['pile:firmware:remove']"
|
||||||
>删除</el-button>
|
>删除</el-button
|
||||||
</template>
|
>
|
||||||
</el-table-column>
|
</template>
|
||||||
</el-table>
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total>0"
|
v-show="total > 0"
|
||||||
:total="total"
|
:total="total"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="queryParams.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="queryParams.pageSize"
|
||||||
@pagination="getList"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<!-- 添加或修改充电桩固件信息对话框 -->
|
<!-- 添加或修改充电桩固件信息对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body :before-close="cancel">
|
<el-dialog
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
:title="title"
|
||||||
<el-form-item label="固件名称" prop="name">
|
:visible.sync="open"
|
||||||
<el-input v-model="form.name" placeholder="请输入固件名称" />
|
width="500px"
|
||||||
</el-form-item>
|
append-to-body
|
||||||
<el-form-item label="固件描述" prop="description">
|
:before-close="cancel"
|
||||||
<el-input v-model="form.description" placeholder="请输入固件描述" />
|
>
|
||||||
</el-form-item>
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="固件描述" prop="applyType">
|
<el-form-item label="固件名称" prop="name">
|
||||||
<el-radio-group v-model="form.applyType" size="small">
|
<el-input v-model="form.name" placeholder="请输入固件名称" />
|
||||||
<el-radio label="1" border>直流</el-radio>
|
</el-form-item>
|
||||||
<el-radio label="2" border>交流</el-radio>
|
<el-form-item label="固件描述" prop="description">
|
||||||
</el-radio-group>
|
<el-input v-model="form.description" placeholder="请输入固件描述" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="路径" prop="filePath">
|
<el-form-item label="桩类型" prop="applyType">
|
||||||
<el-upload
|
<el-radio-group v-model="form.applyType" size="small">
|
||||||
ref="upload"
|
<el-radio label="1" border>直流</el-radio>
|
||||||
:limit="1"
|
<el-radio label="2" border>交流</el-radio>
|
||||||
accept=".bin"
|
</el-radio-group>
|
||||||
:action="upload.url"
|
</el-form-item>
|
||||||
:headers="upload.headers"
|
<el-form-item label="固件类型" prop="useRange">
|
||||||
:file-list="upload.fileList"
|
<el-radio-group v-model="form.useRange" size="small">
|
||||||
:on-progress="handleFileUploadProgress"
|
<el-radio label="1" border>4G</el-radio>
|
||||||
:on-success="handleFileSuccess"
|
<el-radio label="2" border>蓝牙</el-radio>
|
||||||
:auto-upload="false">
|
</el-radio-group>
|
||||||
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
</el-form-item>
|
||||||
<el-button style="margin-left: 10px;" size="small" type="success" :loading="upload.isUploading" @click="submitUpload">上传到服务器</el-button>
|
<el-form-item label="路径" prop="filePath" v-if="form.useRange">
|
||||||
<div slot="tip" class="el-upload__tip">只能上传bin文件,且不超过5000kb</div>
|
<el-upload
|
||||||
</el-upload>
|
v-if="form.useRange == 1"
|
||||||
</el-form-item>
|
ref="upload"
|
||||||
</el-form>
|
:limit="1"
|
||||||
<div slot="footer" class="dialog-footer">
|
accept=".bin"
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
:action="upload.url"
|
||||||
<el-button @click="cancel">取 消</el-button>
|
:headers="upload.headers"
|
||||||
</div>
|
:file-list="upload.fileList"
|
||||||
</el-dialog>
|
:on-progress="handleFileUploadProgress"
|
||||||
</div>
|
:on-success="handleFileSuccess"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px"
|
||||||
|
size="small"
|
||||||
|
type="success"
|
||||||
|
:loading="upload.isUploading"
|
||||||
|
@click="submitUpload"
|
||||||
|
>上传到服务器</el-button
|
||||||
|
>
|
||||||
|
<div slot="tip" class="el-upload__tip">只能上传bin文件,且不超过5000kb</div>
|
||||||
|
</el-upload>
|
||||||
|
<el-upload
|
||||||
|
v-else-if="form.useRange == 2"
|
||||||
|
ref="uploadBluetooth"
|
||||||
|
:limit="1"
|
||||||
|
accept=".bin"
|
||||||
|
:action="uploadBluetooth.url"
|
||||||
|
:headers="uploadBluetooth.headers"
|
||||||
|
:file-list="uploadBluetooth.fileList"
|
||||||
|
:on-progress="handleFileUploadProgress"
|
||||||
|
:on-success="handleFileSuccess"
|
||||||
|
:auto-upload="false"
|
||||||
|
>
|
||||||
|
<el-button slot="trigger" size="small" type="primary">选取文件</el-button>
|
||||||
|
<el-button
|
||||||
|
style="margin-left: 10px"
|
||||||
|
size="small"
|
||||||
|
type="success"
|
||||||
|
:loading="upload.isUploading"
|
||||||
|
@click="submitUploadBluetooth"
|
||||||
|
>上传到服务器</el-button
|
||||||
|
>
|
||||||
|
<div slot="tip" class="el-upload__tip">只能上传bin文件,且不超过5000kb</div>
|
||||||
|
</el-upload>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listFirmware, getFirmware, delFirmware, addFirmware, updateFirmware } from "@/api/pile/firmware";
|
import {
|
||||||
|
listFirmware,
|
||||||
|
getFirmware,
|
||||||
|
delFirmware,
|
||||||
|
addFirmware,
|
||||||
|
updateFirmware,
|
||||||
|
} from "@/api/pile/firmware";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Firmware",
|
name: "Firmware",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
// 非单个禁用
|
// 非单个禁用
|
||||||
single: true,
|
single: true,
|
||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 充电桩固件信息表格数据
|
// 充电桩固件信息表格数据
|
||||||
firmwareList: [],
|
firmwareList: [],
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
name: null,
|
name: null,
|
||||||
},
|
},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {},
|
||||||
},
|
// 上传参数 4G
|
||||||
// 上传参数
|
upload: {
|
||||||
upload: {
|
// 是否禁用上传
|
||||||
// 是否禁用上传
|
isUploading: false,
|
||||||
isUploading: false,
|
// 设置上传的请求头部
|
||||||
// 设置上传的请求头部
|
headers: { Authorization: "Bearer " + getToken() },
|
||||||
headers: { Authorization: "Bearer " + getToken() },
|
// 上传的地址
|
||||||
// 上传的地址
|
url: process.env.VUE_APP_BASE_API + "/common/uploadFirmware",
|
||||||
url: process.env.VUE_APP_BASE_API + "/common/uploadFirmware",
|
// 上传的文件列表
|
||||||
// 上传的文件列表
|
fileList: [],
|
||||||
fileList: []
|
},
|
||||||
},
|
// 上传参数 蓝牙
|
||||||
};
|
uploadBluetooth: {
|
||||||
|
// 是否禁用上传
|
||||||
|
isUploading: false,
|
||||||
|
// 设置上传的请求头部
|
||||||
|
headers: { Authorization: "Bearer " + getToken() },
|
||||||
|
// 上传的地址
|
||||||
|
url: process.env.VUE_APP_BASE_API + "/common/uploadBlueToothFile2OSS",
|
||||||
|
// 上传的文件列表
|
||||||
|
fileList: [],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询充电桩固件信息列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true;
|
||||||
|
listFirmware(this.queryParams).then((response) => {
|
||||||
|
this.firmwareList = response.rows;
|
||||||
|
this.total = response.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
created() {
|
// 取消按钮
|
||||||
this.getList();
|
cancel() {
|
||||||
|
this.open = false;
|
||||||
|
this.reset();
|
||||||
|
// this.$refs.upload.clearFiles();
|
||||||
},
|
},
|
||||||
methods: {
|
// 表单重置
|
||||||
/** 查询充电桩固件信息列表 */
|
reset() {
|
||||||
getList() {
|
this.form = {
|
||||||
this.loading = true;
|
id: null,
|
||||||
listFirmware(this.queryParams).then(response => {
|
name: null,
|
||||||
this.firmwareList = response.rows;
|
desc: null,
|
||||||
this.total = response.total;
|
filePath: null,
|
||||||
this.loading = false;
|
applyType: null,
|
||||||
|
createTime: null,
|
||||||
|
createBy: null,
|
||||||
|
updateTime: null,
|
||||||
|
updateBy: null,
|
||||||
|
delFlag: null,
|
||||||
|
useRange: null,
|
||||||
|
};
|
||||||
|
this.resetForm("form");
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.getList();
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.resetForm("queryForm");
|
||||||
|
this.handleQuery();
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map((item) => item.id);
|
||||||
|
this.single = selection.length !== 1;
|
||||||
|
this.multiple = !selection.length;
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset();
|
||||||
|
this.open = true;
|
||||||
|
this.title = "添加充电桩固件信息";
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset();
|
||||||
|
const id = row.id || this.ids;
|
||||||
|
getFirmware(id).then((response) => {
|
||||||
|
this.form = response.data;
|
||||||
|
this.open = true;
|
||||||
|
this.title = "修改充电桩固件信息";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm() {
|
||||||
|
this.$refs["form"].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.id != null) {
|
||||||
|
updateFirmware(this.form).then((response) => {
|
||||||
|
this.$modal.msgSuccess("修改成功");
|
||||||
|
this.open = false;
|
||||||
|
this.getList();
|
||||||
});
|
});
|
||||||
},
|
} else {
|
||||||
// 取消按钮
|
addFirmware(this.form).then((response) => {
|
||||||
cancel() {
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.reset();
|
this.getList();
|
||||||
this.$refs.upload.clearFiles();
|
|
||||||
},
|
|
||||||
// 表单重置
|
|
||||||
reset() {
|
|
||||||
this.form = {
|
|
||||||
id: null,
|
|
||||||
name: null,
|
|
||||||
desc: null,
|
|
||||||
filePath: null,
|
|
||||||
applyType: null,
|
|
||||||
createTime: null,
|
|
||||||
createBy: null,
|
|
||||||
updateTime: null,
|
|
||||||
updateBy: null,
|
|
||||||
delFlag: null
|
|
||||||
};
|
|
||||||
this.resetForm("form");
|
|
||||||
},
|
|
||||||
/** 搜索按钮操作 */
|
|
||||||
handleQuery() {
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.getList();
|
|
||||||
},
|
|
||||||
/** 重置按钮操作 */
|
|
||||||
resetQuery() {
|
|
||||||
this.resetForm("queryForm");
|
|
||||||
this.handleQuery();
|
|
||||||
},
|
|
||||||
// 多选框选中数据
|
|
||||||
handleSelectionChange(selection) {
|
|
||||||
this.ids = selection.map(item => item.id)
|
|
||||||
this.single = selection.length!==1
|
|
||||||
this.multiple = !selection.length
|
|
||||||
},
|
|
||||||
/** 新增按钮操作 */
|
|
||||||
handleAdd() {
|
|
||||||
this.reset();
|
|
||||||
this.open = true;
|
|
||||||
this.title = "添加充电桩固件信息";
|
|
||||||
},
|
|
||||||
/** 修改按钮操作 */
|
|
||||||
handleUpdate(row) {
|
|
||||||
this.reset();
|
|
||||||
const id = row.id || this.ids
|
|
||||||
getFirmware(id).then(response => {
|
|
||||||
this.form = response.data;
|
|
||||||
this.open = true;
|
|
||||||
this.title = "修改充电桩固件信息";
|
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
/** 提交按钮 */
|
|
||||||
submitForm() {
|
|
||||||
this.$refs["form"].validate(valid => {
|
|
||||||
if (valid) {
|
|
||||||
if (this.form.id != null) {
|
|
||||||
updateFirmware(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("修改成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
addFirmware(this.form).then(response => {
|
|
||||||
this.$modal.msgSuccess("新增成功");
|
|
||||||
this.open = false;
|
|
||||||
this.getList();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
/** 删除按钮操作 */
|
|
||||||
handleDelete(row) {
|
|
||||||
const ids = row.id || this.ids;
|
|
||||||
this.$modal.confirm('是否确认删除充电桩固件信息编号为"' + ids + '"的数据项?').then(function() {
|
|
||||||
return delFirmware(ids);
|
|
||||||
}).then(() => {
|
|
||||||
this.getList();
|
|
||||||
this.$modal.msgSuccess("删除成功");
|
|
||||||
}).catch(() => {});
|
|
||||||
},
|
|
||||||
/** 导出按钮操作 */
|
|
||||||
handleExport() {
|
|
||||||
this.download('pile/firmware/export', {
|
|
||||||
...this.queryParams
|
|
||||||
}, `firmware_${new Date().getTime()}.xlsx`)
|
|
||||||
},
|
|
||||||
// 文件提交处理
|
|
||||||
submitUpload() {
|
|
||||||
this.$refs.upload.submit();
|
|
||||||
},
|
|
||||||
// 文件上传中处理
|
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
|
||||||
this.upload.isUploading = true;
|
|
||||||
},
|
|
||||||
// 文件上传成功处理
|
|
||||||
handleFileSuccess(response, file, fileList) {
|
|
||||||
this.upload.isUploading = false;
|
|
||||||
this.form.filePath = response.fileName;
|
|
||||||
this.msgSuccess(response.msg);
|
|
||||||
}
|
}
|
||||||
}
|
});
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const ids = row.id || this.ids;
|
||||||
|
this.$modal
|
||||||
|
.confirm('是否确认删除充电桩固件信息编号为"' + ids + '"的数据项?')
|
||||||
|
.then(function () {
|
||||||
|
return delFirmware(ids);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
this.getList();
|
||||||
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
},
|
||||||
|
/** 导出按钮操作 */
|
||||||
|
handleExport() {
|
||||||
|
this.download(
|
||||||
|
"pile/firmware/export",
|
||||||
|
{
|
||||||
|
...this.queryParams,
|
||||||
|
},
|
||||||
|
`firmware_${new Date().getTime()}.xlsx`
|
||||||
|
);
|
||||||
|
},
|
||||||
|
// 文件提交处理 4G
|
||||||
|
submitUpload() {
|
||||||
|
this.$refs.upload.submit();
|
||||||
|
},
|
||||||
|
submitUploadBluetooth() {
|
||||||
|
// 文件提交处理 蓝牙
|
||||||
|
this.$refs.uploadBluetooth.submit();
|
||||||
|
},
|
||||||
|
// 文件上传中处理
|
||||||
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
|
this.upload.isUploading = true;
|
||||||
|
},
|
||||||
|
// 文件上传成功处理
|
||||||
|
handleFileSuccess(response, file, fileList) {
|
||||||
|
this.upload.isUploading = false;
|
||||||
|
this.form.filePath = response.fileName;
|
||||||
|
this.msgSuccess(response.msg);
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user