diff --git a/xiuosiot-frontend/src/views/dashboard/index.vue b/xiuosiot-frontend/src/views/dashboard/index.vue index b41c0ea..150f419 100644 --- a/xiuosiot-frontend/src/views/dashboard/index.vue +++ b/xiuosiot-frontend/src/views/dashboard/index.vue @@ -238,7 +238,7 @@ export default { }, mounted() { const doms = document.getElementsByClassName('chart') - doms.forEach(dom => { + Array.prototype.forEach.call(doms, dom => { this.myCharts.push(this.$echarts.init(dom)) }) this.getData() diff --git a/xiuosiot-frontend/src/views/data/realTime/index.vue b/xiuosiot-frontend/src/views/data/realTime/index.vue index a235ecb..f791c66 100644 --- a/xiuosiot-frontend/src/views/data/realTime/index.vue +++ b/xiuosiot-frontend/src/views/data/realTime/index.vue @@ -118,7 +118,7 @@ export default { // PMOption赋值,PMchart初始化 initPMChart() { const domList = document.getElementsByClassName('pm-chart') - domList.forEach((dom) => { + Array.prototype.forEach.call(domList, (dom) => { const chart = this.$echarts.init(dom) this.PMCharts.push(chart) }) @@ -313,7 +313,7 @@ export default { // 温湿度图表初始化 initTempChart() { const domList = document.getElementsByClassName('temp-chart') - domList.forEach((dom) => { + Array.prototype.forEach.call(domList, (dom) => { const chart = this.$echarts.init(dom) this.tempCharts.push(chart) }) @@ -466,7 +466,7 @@ export default { }, initChemicalChart() { const domList = document.getElementsByClassName('chemical-chart') - domList.forEach((dom) => { + Array.prototype.forEach.call(domList, (dom) => { const chart = this.$echarts.init(dom) this.chemicalCharts.push(chart) }) diff --git a/xiuosiot-frontend/src/views/data/value/index.vue b/xiuosiot-frontend/src/views/data/value/index.vue index e7f5be3..8776e92 100644 --- a/xiuosiot-frontend/src/views/data/value/index.vue +++ b/xiuosiot-frontend/src/views/data/value/index.vue @@ -775,7 +775,7 @@ export default { this.options[4].series[0].data = ethanol this.options[5].series[0].data = methane const charts = document.getElementsByClassName('chart') - charts.forEach((chart) => { + Array.prototype.forEach.call(charts, chart => { this.myCharts.push(this.$echarts.init(chart)) }) this.options.forEach((option, index) => { diff --git a/xiuosiot-frontend/src/views/overview/index.vue b/xiuosiot-frontend/src/views/overview/index.vue index 81158cf..94b7b4f 100644 --- a/xiuosiot-frontend/src/views/overview/index.vue +++ b/xiuosiot-frontend/src/views/overview/index.vue @@ -2,7 +2,7 @@ * @Author: 龚祖望 573413756@qq.com * @Date: 2022-05-16 09:16:41 * @LastEditors: 龚祖望 573413756@qq.com - * @LastEditTime: 2023-04-18 17:02:58 + * @LastEditTime: 2023-09-12 15:01:20 * @FilePath: \dashengda\src\views\dashboard\index.vue * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE --> @@ -72,7 +72,7 @@ export default { }, mounted() { const imgs = document.getElementsByClassName('slide-img') - imgs.forEach(item => { + Array.prototype.forEach.call(imgs, item => { item.style.height = (window.innerHeight - 115) + 'px' }) } diff --git a/xiuosiot-frontend/src/views/terminal/OTA/index.vue b/xiuosiot-frontend/src/views/terminal/OTA/index.vue index 4e49d4e..d1d2547 100644 --- a/xiuosiot-frontend/src/views/terminal/OTA/index.vue +++ b/xiuosiot-frontend/src/views/terminal/OTA/index.vue @@ -151,6 +151,7 @@ :file-list="firmwareList" :on-success="handleSuccess" :on-error="handleError" + :on-change="handleFileChange" >
将文件拖到此处,或点击上传
@@ -480,12 +481,20 @@ export default { this.addTaskVisible = false }, handleSuccess(res) { - const { fileName, fileMd5, fileSize } = res.data - this.newFile.fileName = fileName - this.newFile.fileMd5 = fileMd5 - this.newFile.fileSize = fileSize - this.nextDisabled = false - this.$message.success('上传成功') + if (res.code === '200000') { + const { fileName, fileMd5, fileSize } = res.data + this.newFile.fileName = fileName + this.newFile.fileMd5 = fileMd5 + this.newFile.fileSize = fileSize + this.nextDisabled = false + this.$message.success('上传成功') + } else { + this.$refs.upload.clearFiles() + this.$message.error(res.message) + } + }, + handleFileChange() { + console.log('file change') }, handleError() { this.$message.error('上传失败') diff --git a/xiuosiot-frontend/vue.config.js b/xiuosiot-frontend/vue.config.js index 240aac1..db6ac77 100644 --- a/xiuosiot-frontend/vue.config.js +++ b/xiuosiot-frontend/vue.config.js @@ -31,7 +31,8 @@ module.exports = { proxy: { '/dashengda': { // target: 'http://115.238.53.60:33333/', // 大胜达 - target: 'http://192.168.140.64:8080/', // wty + // target: 'http://192.168.140.64:8080/', // wty-AIIT-SOFTWARE(无线) + target: 'http://192.168.130.52:8080/', // wty-AIIT-SOFTWARE(有线) // target: 'http://10.0.30.23:8080', changeOrigin: true, pathRewrite: {