按需添加升级状态
This commit is contained in:
@ -2,55 +2,148 @@
|
|||||||
<section class="app-container">
|
<section class="app-container">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<region @selectdRegionCode="selectdRegionCode" :currentNodeKey.sync="queryParams.provinceCode"></region>
|
<region
|
||||||
|
@selectdRegionCode="selectdRegionCode"
|
||||||
|
:currentNodeKey.sync="queryParams.provinceCode"
|
||||||
|
></region>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="20">
|
<el-col :span="20">
|
||||||
<el-form :size="size" :inline="true" v-show="showSearch">
|
<el-form :size="size" :inline="true" v-show="showSearch">
|
||||||
<el-form-item label="产品">
|
<el-form-item label="产品">
|
||||||
<el-select v-model="queryParams.productId" clearable placeholder="请选择" @change="queryProductIdChange">
|
<el-select
|
||||||
<el-option v-for="item in queryProductSelectList" :key="item.id" :label="item.productName" :value="item.productId">
|
v-model="queryParams.productId"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
@change="queryProductIdChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in queryProductSelectList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.productName"
|
||||||
|
:value="item.productId"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="节点">
|
<el-form-item label="节点">
|
||||||
<el-select v-model="queryParams.nodeId" clearable placeholder="请选择">
|
<el-select
|
||||||
<el-option v-for="item in queryNodeSelectList" :key="item.id" :label="item.nodeName" :value="item.nodeSn">
|
v-model="queryParams.nodeId"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in queryNodeSelectList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nodeName"
|
||||||
|
:value="item.nodeSn"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="客户">
|
<el-form-item label="客户">
|
||||||
<el-select v-model="queryParams.userId" clearable placeholder="请选择" @change="queryUserIdChange">
|
<el-select
|
||||||
<el-option v-for="item in queryUserSelectList" :key="item.id" :label="item.nickName" :value="item.userId">
|
v-model="queryParams.userId"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
@change="queryUserIdChange"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in queryUserSelectList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nickName"
|
||||||
|
:value="item.userId"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="项目">
|
<el-form-item label="项目">
|
||||||
<el-select v-model="queryParams.projectId" clearable placeholder="请选择">
|
<el-select
|
||||||
<el-option v-for="item in queryProjectSelectList" :key="item.id" :label="item.projectName" :value="item.projectId">
|
v-model="queryParams.projectId"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in queryProjectSelectList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.projectName"
|
||||||
|
:value="item.projectId"
|
||||||
|
>
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备SN">
|
<el-form-item label="设备SN">
|
||||||
<el-input v-model="queryParams.deviceId" placeholder="请输入设备SN" @keyup.enter.native="handleQuery" />
|
<el-input
|
||||||
|
v-model="queryParams.deviceId"
|
||||||
|
placeholder="请输入设备SN"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="当前软件版本">
|
<el-form-item label="当前软件版本">
|
||||||
<el-input v-model="queryParams.nowVersion" placeholder="请输入当前软件版本" @keyup.enter.native="handleQuery" />
|
<el-input
|
||||||
|
v-model="queryParams.nowVersion"
|
||||||
|
placeholder="请输入当前软件版本"
|
||||||
|
@keyup.enter.native="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="升级状态">
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.isUpdate"
|
||||||
|
clearable
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in isUpdateList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
<el-button
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
type="cyan"
|
||||||
|
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-item>
|
||||||
</el-form>
|
</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 size="mini" type="primary" icon="el-icon-set-up" @click="handleOTAUpdate">批量升级</el-button>
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-set-up"
|
||||||
|
@click="handleOTAUpdate"
|
||||||
|
>批量升级</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button size="mini" type="info" icon="el-icon-set-up" @click="nodeOTAHistoryExport">导出升级记录</el-button>
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="info"
|
||||||
|
icon="el-icon-set-up"
|
||||||
|
@click="nodeOTAHistoryExport"
|
||||||
|
>导出升级记录</el-button
|
||||||
|
>
|
||||||
</el-col>
|
</el-col>
|
||||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
<right-toolbar
|
||||||
|
:showSearch.sync="showSearch"
|
||||||
|
@queryTable="getList"
|
||||||
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
|
<el-table
|
||||||
|
ref="multipleTable"
|
||||||
|
:data="tableData"
|
||||||
|
tooltip-effect="dark"
|
||||||
|
style="width: 100%"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
>
|
||||||
<el-table-column align="center" type="selection" width="55">
|
<el-table-column align="center" type="selection" width="55">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="nodeName" label="节点名称">
|
<el-table-column align="center" prop="nodeName" label="节点名称">
|
||||||
@ -67,68 +160,129 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" label="设备类型">
|
<el-table-column align="center" label="设备类型">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.deviceType ? deviceTypeList.find(v=> v.value == scope.row.deviceType).label : '' }}
|
{{
|
||||||
|
scope.row.deviceType
|
||||||
|
? deviceTypeList.find(v => v.value == scope.row.deviceType)
|
||||||
|
.label
|
||||||
|
: ''
|
||||||
|
}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="nowVersions" label="当前软件版本">
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="nowVersions"
|
||||||
|
label="当前软件版本"
|
||||||
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column align="center" prop="version" label="可升级软件版本">
|
<el-table-column align="center" prop="version" label="可升级软件版本">
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column align="center" label="升级状态">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
{{ scope.row.isUpdate == 0 ? '已' : '可' }}升级
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column align="center" label="上次升级时间">
|
<el-table-column align="center" label="上次升级时间">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
{{ scope.row.onUpdateTime | formatDate }}
|
{{ scope.row.onUpdateTime | formatDate }}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
align="center"
|
||||||
|
class-name="small-padding fixed-width"
|
||||||
|
>
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-button v-if="scope.row.deviceType != 'tt'" size="mini" type="text" @click="handleOneOTAUpdate(scope.row)">
|
<el-button
|
||||||
|
v-if="scope.row.deviceType != 'tt'"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="handleOneOTAUpdate(scope.row)"
|
||||||
|
>
|
||||||
升级
|
升级
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button size="mini" type="text" @click="showHistory(scope.row)">
|
<el-button
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
@click="showHistory(scope.row)"
|
||||||
|
>
|
||||||
升级历史
|
升级历史
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
|
<pagination
|
||||||
@pagination="getList" />
|
v-show="total > 0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageNum"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-dialog title="节点升级历史" :visible.sync="nodeOTAHistoryDialog">
|
<el-dialog title="节点升级历史" :visible.sync="nodeOTAHistoryDialog">
|
||||||
<el-table :data="nodeOTAHistoryData">
|
<el-table :data="nodeOTAHistoryData">
|
||||||
<el-table-column align="center" prop="deviceId" label="设备SN"></el-table-column>
|
<el-table-column
|
||||||
<el-table-column align="center" prop="nodeId" label="节点SN"></el-table-column>
|
align="center"
|
||||||
<el-table-column align="center" prop="newVersion" label="节点当前版本"></el-table-column>
|
prop="deviceId"
|
||||||
<el-table-column align="center" prop="oldVersion" label="节点上次版本"></el-table-column>
|
label="设备SN"
|
||||||
<el-table-column align="center" prop="createTimeStr" label="升级时间"></el-table-column>
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="nodeId"
|
||||||
|
label="节点SN"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="newVersion"
|
||||||
|
label="节点当前版本"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="oldVersion"
|
||||||
|
label="节点上次版本"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
align="center"
|
||||||
|
prop="createTimeStr"
|
||||||
|
label="升级时间"
|
||||||
|
></el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Region from "@/components/Region";
|
import Region from '@/components/Region';
|
||||||
|
|
||||||
import { list, OTAUpdate, OTAUpdates, getNodeOTAHistory, nodeOTAHistoryExport } from "@/api/firmware/firmwareupdate";
|
|
||||||
import { select as projectSelect } from "@/api/hardware/project";
|
|
||||||
import { select as productSelect } from "@/api/hardware/product";
|
|
||||||
import { productNodeList, productNodeSelect } from "@/api/hardware/productNode";
|
|
||||||
import { userSelect } from "@/api/system/user";
|
|
||||||
|
|
||||||
|
import {
|
||||||
|
list,
|
||||||
|
OTAUpdate,
|
||||||
|
OTAUpdates,
|
||||||
|
getNodeOTAHistory,
|
||||||
|
nodeOTAHistoryExport
|
||||||
|
} from '@/api/firmware/firmwareupdate';
|
||||||
|
import { select as projectSelect } from '@/api/hardware/project';
|
||||||
|
import { select as productSelect } from '@/api/hardware/product';
|
||||||
|
import { productNodeList, productNodeSelect } from '@/api/hardware/productNode';
|
||||||
|
import { userSelect } from '@/api/system/user';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "FirmwareUpdate",
|
name: 'FirmwareUpdate',
|
||||||
components: {
|
components: {
|
||||||
Region,
|
Region
|
||||||
},
|
},
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
showSearch: true,
|
showSearch: true,
|
||||||
queryProductSelectList: [],
|
queryProductSelectList: [],
|
||||||
queryNodeSelectList: [],
|
queryNodeSelectList: [],
|
||||||
queryUserSelectList: [],
|
queryUserSelectList: [],
|
||||||
queryProjectSelectList: [],
|
queryProjectSelectList: [],
|
||||||
|
isUpdateList: [
|
||||||
|
{ label: '已升级', value: 0 },
|
||||||
|
{ label: '可升级', value: 1 }
|
||||||
|
],
|
||||||
value: '',
|
value: '',
|
||||||
options: '',
|
options: '',
|
||||||
input: '',
|
input: '',
|
||||||
@ -140,47 +294,48 @@ export default {
|
|||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10
|
||||||
},
|
},
|
||||||
deviceTypeList: [
|
deviceTypeList: [
|
||||||
{ 'label': '锐能设备', 'value': 'rn', },
|
{ label: '锐能设备', value: 'rn' },
|
||||||
{ 'label': '铁塔设备', 'value': 'tt', },
|
{ label: '铁塔设备', value: 'tt' }
|
||||||
],
|
],
|
||||||
nodeOTAHistoryDialog: false,
|
nodeOTAHistoryDialog: false,
|
||||||
nodeOTAHistoryData: [],
|
nodeOTAHistoryData: []
|
||||||
}
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created() {
|
||||||
productSelect().then(({ code, msg, select }) => {
|
productSelect().then(({ code, msg, select }) => {
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
this.queryProductSelectList = select;
|
this.queryProductSelectList = select;
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(msg);
|
this.$message.error(msg);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
userSelect().then(({ code, msg, select }) => {
|
userSelect().then(({ code, msg, select }) => {
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
this.queryUserSelectList = select;
|
this.queryUserSelectList = select;
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(msg);
|
this.$message.error(msg);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
nodeOTAHistoryExport() {
|
||||||
nodeOTAHistoryExport () {
|
this.$confirm('是否确认导出所有节点升级记录?', '警告', {
|
||||||
this.$confirm('是否确认导出所有节点升级记录?', "警告", {
|
confirmButtonText: '确定',
|
||||||
confirmButtonText: "确定",
|
cancelButtonText: '取消',
|
||||||
cancelButtonText: "取消",
|
type: 'warning'
|
||||||
type: "warning"
|
|
||||||
}).then(function () {
|
|
||||||
return nodeOTAHistoryExport();
|
|
||||||
}).then(response => {
|
|
||||||
this.download(response.msg);
|
|
||||||
})
|
})
|
||||||
|
.then(function() {
|
||||||
|
return nodeOTAHistoryExport();
|
||||||
|
})
|
||||||
|
.then(response => {
|
||||||
|
this.download(response.msg);
|
||||||
|
});
|
||||||
},
|
},
|
||||||
showHistory ({ id }) {
|
showHistory({ id }) {
|
||||||
this.nodeOTAHistoryDialog = true;
|
this.nodeOTAHistoryDialog = true;
|
||||||
getNodeOTAHistory({ id }).then(({ rows, msg, code }) => {
|
getNodeOTAHistory({ id }).then(({ rows, msg, code }) => {
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
@ -188,9 +343,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.error(msg);
|
this.$message.error(msg);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
queryProductIdChange (productId) {
|
queryProductIdChange(productId) {
|
||||||
delete this.queryParams.nodeId;
|
delete this.queryParams.nodeId;
|
||||||
productNodeSelect({ productId }).then(({ code, msg, select }) => {
|
productNodeSelect({ productId }).then(({ code, msg, select }) => {
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
@ -198,9 +353,9 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.error(msg);
|
this.$message.error(msg);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
queryUserIdChange (userId) {
|
queryUserIdChange(userId) {
|
||||||
delete this.queryParams.projectId;
|
delete this.queryParams.projectId;
|
||||||
projectSelect({ userId }).then(({ code, msg, select }) => {
|
projectSelect({ userId }).then(({ code, msg, select }) => {
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
@ -208,93 +363,100 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
this.$message.error(msg);
|
this.$message.error(msg);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
selectdRegionCode ({ code }) {
|
selectdRegionCode({ code }) {
|
||||||
this.queryParams.provinceCode = code;
|
this.queryParams.provinceCode = code;
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery () {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
},
|
},
|
||||||
handleOneOTAUpdate ({ productId, nodeId, deviceId }) {
|
handleOneOTAUpdate({ productId, nodeId, deviceId }) {
|
||||||
this.$confirm(`是否确认升级${deviceId}?`, "警告", {
|
this.$confirm(`是否确认升级${deviceId}?`, '警告', {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: '取消',
|
||||||
type: "warning",
|
type: 'warning'
|
||||||
}).then(() => {
|
})
|
||||||
this.OTAUpdate([{ productId, nodeId, deviceId }])
|
.then(() => {
|
||||||
}).catch((res) => { });
|
this.OTAUpdate([{ productId, nodeId, deviceId }]);
|
||||||
|
})
|
||||||
|
.catch(res => {});
|
||||||
},
|
},
|
||||||
handleOTAUpdate () {
|
handleOTAUpdate() {
|
||||||
if (this.ids.length) {
|
if (this.ids.length) {
|
||||||
let snap = this.ids.map(({ productId, nodeId, deviceId }) => {
|
let snap = this.ids.map(({ productId, nodeId, deviceId }) => {
|
||||||
return { productId, nodeId, deviceId }
|
return { productId, nodeId, deviceId };
|
||||||
});
|
});
|
||||||
const h = this.$createElement;
|
const h = this.$createElement;
|
||||||
this.$confirm(`是否确认批量升级\r\n${snap.map(v => v.deviceId).join(',\r\n')}?`, "警告", {
|
this.$confirm(
|
||||||
confirmButtonText: "确定",
|
`是否确认批量升级\r\n${snap.map(v => v.deviceId).join(',\r\n')}?`,
|
||||||
cancelButtonText: "取消",
|
'警告',
|
||||||
type: "warning",
|
{
|
||||||
}).then(() => {
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}
|
||||||
|
)
|
||||||
|
.then(() => {
|
||||||
this.OTAUpdate(snap);
|
this.OTAUpdate(snap);
|
||||||
}).catch((res) => { });
|
})
|
||||||
|
.catch(res => {});
|
||||||
} else {
|
} else {
|
||||||
let snap = Object.assign({}, this.queryParams);
|
let snap = Object.assign({}, this.queryParams);
|
||||||
delete snap.pageNum;
|
delete snap.pageNum;
|
||||||
delete snap.pageSize;
|
delete snap.pageSize;
|
||||||
this.$confirm(`是否确认批量升级?`, "警告", {
|
this.$confirm(`是否确认批量升级?`, '警告', {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: '取消',
|
||||||
type: "warning",
|
type: 'warning'
|
||||||
}).then(() => {
|
})
|
||||||
|
.then(() => {
|
||||||
this.OTAUpdates(snap);
|
this.OTAUpdates(snap);
|
||||||
}).catch((res) => { });
|
})
|
||||||
|
.catch(res => {});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
OTAUpdate (device) {
|
OTAUpdate(device) {
|
||||||
OTAUpdate({ device }).then(({ code, msg }) => {
|
OTAUpdate({ device }).then(({ code, msg }) => {
|
||||||
if (200 == code) {
|
if (200 == code) {
|
||||||
this.msgSuccess(msg)
|
this.msgSuccess(msg);
|
||||||
} else {
|
} else {
|
||||||
this.msgError(msg)
|
this.msgError(msg);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
OTAUpdates (deviceNode) {
|
OTAUpdates(deviceNode) {
|
||||||
OTAUpdates(deviceNode).then(({ code, msg }) => {
|
OTAUpdates(deviceNode).then(({ code, msg }) => {
|
||||||
if (200 == code) {
|
if (200 == code) {
|
||||||
this.msgSuccess(msg)
|
this.msgSuccess(msg);
|
||||||
} else {
|
} else {
|
||||||
this.msgError(msg)
|
this.msgError(msg);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
resetQuery () {
|
resetQuery() {
|
||||||
this.queryParams = { pageNum: 1, pageSize: 10 };
|
this.queryParams = { pageNum: 1, pageSize: 10 };
|
||||||
this.resetForm("queryForm");
|
this.resetForm('queryForm');
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange (selection) {
|
handleSelectionChange(selection) {
|
||||||
console.log(selection)
|
console.log(selection);
|
||||||
this.ids = selection;
|
this.ids = selection;
|
||||||
},
|
},
|
||||||
getList () {
|
getList() {
|
||||||
list(this.queryParams).then((response) => {
|
list(this.queryParams).then(response => {
|
||||||
this.tableData = response.rows;
|
this.tableData = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handleUpdate () { },
|
handleUpdate() {}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style>
|
<style></style>
|
||||||
</style>
|
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
<span>创建时间:{{ info.createTime | formatDate }}</span>
|
<span>创建时间:{{ info.createTime | formatDate }}</span>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :offset="1" :span="15">
|
<el-col :offset="1" :span="15">
|
||||||
<el-scrollbar style="height: 550px;" wrap-class="scrollbar-wrapper">
|
<el-scrollbar style="height: 810px;" wrap-class="scrollbar-wrapper">
|
||||||
<div v-for="v in signal" :key="v.id" class="row_div">
|
<div v-for="v in signal" :key="v.id" class="row_div">
|
||||||
<el-row
|
<el-row
|
||||||
type="flex"
|
type="flex"
|
||||||
|
Reference in New Issue
Block a user