diff --git a/xiuosiot-frontend/src/views/terminal/OTA/index.vue b/xiuosiot-frontend/src/views/terminal/OTA/index.vue index e776b2c..04dc65e 100644 --- a/xiuosiot-frontend/src/views/terminal/OTA/index.vue +++ b/xiuosiot-frontend/src/views/terminal/OTA/index.vue @@ -74,19 +74,19 @@ item.verify }} -
+
{{ item.fileVersion }}
-
+
{{ item.fileName }}
-
+
- {{ item.fileMd5 }} + MD5
-
+
{{ item.createTime }}
@@ -132,11 +132,20 @@
+ + + + + + + - - - @@ -192,11 +198,9 @@
-
{{ item.deviceId }}
-

{{ item.fileName }}

-

{{ item.fileVersion }}

-

2023-08-24

-

15:00:00

+
{{ item.id }}
+

升级设备id:
{{ item.deviceId }}

+

创建时间:
{{ item.date + ' ' + item.time }}

- + @@ -312,7 +319,7 @@ export default { primaryColor: '#00CCF2', fileDesc: '', fileMd5: '', - totalSize: 0, + fileSize: 0, createTime: '' }, taskList: [], @@ -334,6 +341,11 @@ export default { deviceOnline: false } }, + watch: { + fileList: function(val) { + this.sum = this.fileList.length + } + }, created() { this.getList() }, @@ -468,10 +480,10 @@ export default { this.addTaskVisible = false }, handleSuccess(res) { - const { fileName, fileMd5, totalSize } = res.data + const { fileName, fileMd5, fileSize } = res.data this.newFile.fileName = fileName this.newFile.fileMd5 = fileMd5 - this.newFile.totalSize = totalSize + this.newFile.fileSize = fileSize this.nextDisabled = false this.$message.success('上传成功') }, @@ -529,24 +541,28 @@ export default { updateType: task.updateType, id: task.id } - this.$confirm('确认重试任务?', '提示', { type: 'warning' }).then(() => { - retryTask(data).then(res => { - if (res.code === '200000') { - this.$message.success('任务重试发起成功') - this.refresh(false) - } + this.$confirm('确认重试任务?', '提示', { type: 'warning' }) + .then(() => { + retryTask(data).then((res) => { + if (res.code === '200000') { + this.$message.success('任务重试发起成功') + this.refresh(false) + } + }) }) - }).catch(err => {}) + .catch((err) => {}) }, endTask(id) { - this.$confirm('确认强制结束任务?', '提示', { type: 'warning' }).then(() => { - endTask({ id }).then(res => { - if (res.code === '200000') { - this.$message.success('任务强制结束成功') - this.refresh() - } + this.$confirm('确认强制结束任务?', '提示', { type: 'warning' }) + .then(() => { + endTask({ id }).then((res) => { + if (res.code === '200000') { + this.$message.success('任务强制结束成功') + this.refresh() + } + }) }) - }).catch(err => {}) + .catch((err) => {}) }, refresh(needMsg = true) { getTaskList({ fileName: this.currentFileName }).then((res) => { @@ -595,10 +611,10 @@ export default { }) }, submit() { - if (!this.deviceOnline) { - this.$message.warning('请先检测设备是否在线并确保在线后再提交') - return - } + // if (!this.deviceOnline) { + // this.$message.warning('请先检测设备是否在线并确保在线后再提交') + // return + // } const date = new Date() const year = date.getFullYear() let month = date.getMonth() + 1 @@ -848,10 +864,13 @@ export default { p { margin: 0; text-align: center; - font-size: 22px; + font-size: 16px; font-family: Microsoft YaHei; line-height: 30px; color: #2e4765; + strong{ + font-size: 18px; + } .success { color: #20be0b; margin: auto 10px; diff --git a/xiuosiot-frontend/vue.config.js b/xiuosiot-frontend/vue.config.js index 84499b9..240aac1 100644 --- a/xiuosiot-frontend/vue.config.js +++ b/xiuosiot-frontend/vue.config.js @@ -31,7 +31,7 @@ module.exports = { proxy: { '/dashengda': { // target: 'http://115.238.53.60:33333/', // 大胜达 - target: 'http://192.168.130.52:8080/', // wty + target: 'http://192.168.140.64:8080/', // wty // target: 'http://10.0.30.23:8080', changeOrigin: true, pathRewrite: {