|
|
@@ -19,7 +19,7 @@
|
|
|
<el-button size="small" type="primary">点击上传</el-button>
|
|
|
</el-upload>
|
|
|
<em class="addMemo" v-show="fileList.length == 0" @click="addMemo">
|
|
|
- <i></i>添加备注
|
|
|
+ <i></i>添加固件
|
|
|
</em>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -59,7 +59,7 @@
|
|
|
<el-button size="small" type="primary" @click="startUpdate">开始更新</el-button>
|
|
|
<div class="version">
|
|
|
<em>NEW</em>
|
|
|
- <span>最新固件版本:v.2.0.1版本固件</span>
|
|
|
+ <span>最新固件版本:v{{LastVerion}} {{VersionTime}}</span>
|
|
|
</div>
|
|
|
<el-tooltip class="item" effect="dark" content="一键更新全部设备固件" placement="top">
|
|
|
<i class="question"></i>
|
|
|
@@ -74,6 +74,7 @@
|
|
|
:default-sort="{prop: 'date', order: 'descending'}"
|
|
|
v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.8)"
|
|
|
class=""
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
stripe
|
|
|
>
|
|
|
<el-table-column
|
|
|
@@ -94,6 +95,13 @@
|
|
|
prop="Location"
|
|
|
label="位置"
|
|
|
>
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-tooltip class="item" effect="dark" :content="scope.row.Location" placement="top-start">
|
|
|
+ <span>
|
|
|
+ {{ scope.row.Location.length > 11 ? scope.row.Location.substr(0,11)+'...' : scope.row.Location }}
|
|
|
+ </span>
|
|
|
+ </el-tooltip>
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
|
prop="FirmwareVersion"
|
|
|
@@ -143,6 +151,12 @@
|
|
|
>
|
|
|
<div class="dialogContent">
|
|
|
<el-row :gutter="20">
|
|
|
+ <el-col :span="20">
|
|
|
+ <label>
|
|
|
+ 固件版本号
|
|
|
+ </label>
|
|
|
+ <el-input type="text" v-model="dialog.version"></el-input>
|
|
|
+ </el-col>
|
|
|
<el-col :span="20">
|
|
|
<label>
|
|
|
备注
|
|
|
@@ -176,11 +190,15 @@
|
|
|
GetChildRegionSelect,
|
|
|
GetLastVerionFirmwareinfo,
|
|
|
RegionPictureGetByRegionId,
|
|
|
+ FirmwareAdd,
|
|
|
} from '../api/getApiRes.js'
|
|
|
+
|
|
|
let qs = require('qs');
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
+ LastVerion: '',
|
|
|
+ VersionTime: '',
|
|
|
// dialog
|
|
|
dialog_state: false,
|
|
|
dialog_title: '添加备注',
|
|
|
@@ -224,9 +242,9 @@
|
|
|
pageIndex: 1,
|
|
|
},
|
|
|
dialog: {
|
|
|
- name: 10,
|
|
|
- region: 10,
|
|
|
- memo: '',
|
|
|
+ version: '',
|
|
|
+ updateContent: '',
|
|
|
+ key : '',
|
|
|
},
|
|
|
draw: 1,
|
|
|
start: 0,
|
|
|
@@ -241,6 +259,7 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
this.getTableQuery();
|
|
|
+ this.getGetLastVerionFirmwareinfo();
|
|
|
},
|
|
|
methods: {
|
|
|
// 页面数据查询
|
|
|
@@ -278,6 +297,22 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ getGetLastVerionFirmwareinfo() {
|
|
|
+ let that = this;
|
|
|
+ let param = {
|
|
|
+ token: localStorage.token,
|
|
|
+ };
|
|
|
+ let postdata = qs.stringify(param);
|
|
|
+ GetLastVerionFirmwareinfo(postdata).then(res => {
|
|
|
+ let json = res;
|
|
|
+ if (json.Code == 0) {
|
|
|
+ that.LastVerion = json.Firmware.Version;
|
|
|
+ that.VersionTime = globalfmtDate(json.Firmware.CreateTime);
|
|
|
+ } else {
|
|
|
+ that.$message.error(json.Memo);
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
// 获取下级列表
|
|
|
getGetChildRegionSelect(regionId, level) {
|
|
|
let that = this;
|
|
|
@@ -386,7 +421,7 @@
|
|
|
if (!this.multipleSelection.length) {
|
|
|
this.$message({
|
|
|
showClose: true,
|
|
|
- message: '错了哦,需要先选中至少一条记录',
|
|
|
+ message: '错了哦,需要先选中至少一个设备',
|
|
|
type: 'error'
|
|
|
});
|
|
|
return false
|
|
|
@@ -398,7 +433,7 @@
|
|
|
if (!this.multipleSelection.length) {
|
|
|
this.$message({
|
|
|
showClose: true,
|
|
|
- message: '错了哦,需要先选中一条记录',
|
|
|
+ message: '错了哦,需要先选中一个设备',
|
|
|
type: 'error'
|
|
|
});
|
|
|
return false
|
|
|
@@ -406,7 +441,7 @@
|
|
|
if (this.multipleSelection.length > 1) {
|
|
|
this.$message({
|
|
|
showClose: true,
|
|
|
- message: '错了哦,只能选中一条记录',
|
|
|
+ message: '错了哦,只能选中一个设备',
|
|
|
type: 'error'
|
|
|
});
|
|
|
return false
|
|
|
@@ -426,6 +461,7 @@
|
|
|
let dialog_type = that.dialog_type;
|
|
|
let name = that.field_name;
|
|
|
let id = that.field_id;
|
|
|
+
|
|
|
},
|
|
|
// 添加备注
|
|
|
addMemo() {
|
|
|
@@ -437,7 +473,7 @@
|
|
|
if (!this.multipleSelection.length) {
|
|
|
this.$message({
|
|
|
showClose: true,
|
|
|
- message: '错了哦,需要先选中一条记录',
|
|
|
+ message: '错了哦,需要先选中一个设备',
|
|
|
type: 'error'
|
|
|
});
|
|
|
return false
|