diff --git a/src/views/firmware/firmwareUpdate/index.vue b/src/views/firmware/firmwareUpdate/index.vue index 388b330..98d84f6 100644 --- a/src/views/firmware/firmwareUpdate/index.vue +++ b/src/views/firmware/firmwareUpdate/index.vue @@ -162,7 +162,7 @@ {{ scope.row.deviceType - ? deviceTypeList.find((v) => v.value == scope.row.deviceType) + ? deviceTypeList.find(v => v.value == scope.row.deviceType) .label : '' }} @@ -177,8 +177,25 @@ - + + + + @@ -269,7 +286,7 @@ import { OTAUpdate, OTAUpdates, getNodeOTAHistory, - nodeOTAHistoryExport, + nodeOTAHistoryExport } from '@/api/firmware/firmwareupdate'; import { select as projectSelect } from '@/api/hardware/project'; import { select as productSelect } from '@/api/hardware/product'; @@ -279,7 +296,7 @@ import { userSelect } from '@/api/system/user'; export default { name: 'FirmwareUpdate', components: { - Region, + Region }, data() { return { @@ -290,7 +307,7 @@ export default { queryProjectSelectList: [], isUpdateList: [ { label: '已升级', value: 0 }, - { label: '可升级', value: 1 }, + { label: '可升级', value: 1 } ], value: '', options: '', @@ -303,14 +320,14 @@ export default { // 查询参数 queryParams: { pageNum: 1, - pageSize: 10, + pageSize: 10 }, deviceTypeList: [ { label: '锐能设备', value: 'rn' }, - { label: '铁塔设备', value: 'tt' }, + { label: '铁塔设备', value: 'tt' } ], nodeOTAHistoryDialog: false, - nodeOTAHistoryData: [], + nodeOTAHistoryData: [] }; }, created() { @@ -335,12 +352,12 @@ export default { this.$confirm('是否确认导出所有节点升级记录?', '警告', { confirmButtonText: '确定', cancelButtonText: '取消', - type: 'warning', + type: 'warning' }) - .then(function () { + .then(function() { return nodeOTAHistoryExport(); }) - .then((response) => { + .then(response => { this.download(response.msg); }); }, @@ -387,12 +404,12 @@ export default { this.$confirm(`是否确认升级${deviceId}?`, '警告', { confirmButtonText: '确定', cancelButtonText: '取消', - type: 'warning', + type: 'warning' }) .then(() => { this.OTAUpdate([{ productId, nodeId, deviceId }]); }) - .catch((res) => {}); + .catch(res => {}); }, handleOTAUpdate() { if (this.ids.length) { @@ -401,18 +418,18 @@ export default { }); const h = this.$createElement; this.$confirm( - `是否确认批量升级\r\n${snap.map((v) => v.deviceId).join(',\r\n')}?`, + `是否确认批量升级\r\n${snap.map(v => v.deviceId).join(',\r\n')}?`, '警告', { confirmButtonText: '确定', cancelButtonText: '取消', - type: 'warning', + type: 'warning' } ) .then(() => { this.OTAUpdate(snap); }) - .catch((res) => {}); + .catch(res => {}); } else { let snap = Object.assign({}, this.queryParams); delete snap.pageNum; @@ -420,12 +437,12 @@ export default { this.$confirm(`是否确认批量升级?`, '警告', { confirmButtonText: '确定', cancelButtonText: '取消', - type: 'warning', + type: 'warning' }) .then(() => { this.OTAUpdates(snap); }) - .catch((res) => {}); + .catch(res => {}); } }, @@ -458,14 +475,18 @@ export default { this.ids = selection; }, getList() { - list(this.queryParams).then((response) => { + list(this.queryParams).then(response => { this.tableData = response.rows; this.total = response.total; }); }, - handleUpdate() {}, - }, + handleUpdate() {} + } }; - + diff --git a/src/views/hardware/device/detail.vue b/src/views/hardware/device/detail.vue index 9d0303f..cef5424 100644 --- a/src/views/hardware/device/detail.vue +++ b/src/views/hardware/device/detail.vue @@ -10,7 +10,7 @@ 设备SN:{{ info.deviceId }} 设备类型:{{ + >设备类型:{{ info.deviceType ? this.deviceTypeList.find(v => v.value == info.deviceType).label : '' @@ -83,7 +83,7 @@ type="danger" size="mini" @click="handleCommand(item, 1)" - >设备重置 + >设备重置 @@ -128,8 +128,8 @@ {{ - signalUpdateTime | formatDate - }} + signalUpdateTime | formatDate + }} 点击输入 + >点击输入 历史性能 + >历史性能 @@ -196,7 +196,7 @@ 查询查询 @@ -204,10 +204,10 @@