fix bug: forEach error
This commit is contained in:
parent
8b68509a99
commit
d9fa1f4a49
|
@ -238,7 +238,7 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const doms = document.getElementsByClassName('chart')
|
const doms = document.getElementsByClassName('chart')
|
||||||
doms.forEach(dom => {
|
Array.prototype.forEach.call(doms, dom => {
|
||||||
this.myCharts.push(this.$echarts.init(dom))
|
this.myCharts.push(this.$echarts.init(dom))
|
||||||
})
|
})
|
||||||
this.getData()
|
this.getData()
|
||||||
|
|
|
@ -118,7 +118,7 @@ export default {
|
||||||
// PMOption赋值,PMchart初始化
|
// PMOption赋值,PMchart初始化
|
||||||
initPMChart() {
|
initPMChart() {
|
||||||
const domList = document.getElementsByClassName('pm-chart')
|
const domList = document.getElementsByClassName('pm-chart')
|
||||||
domList.forEach((dom) => {
|
Array.prototype.forEach.call(domList, (dom) => {
|
||||||
const chart = this.$echarts.init(dom)
|
const chart = this.$echarts.init(dom)
|
||||||
this.PMCharts.push(chart)
|
this.PMCharts.push(chart)
|
||||||
})
|
})
|
||||||
|
@ -313,7 +313,7 @@ export default {
|
||||||
// 温湿度图表初始化
|
// 温湿度图表初始化
|
||||||
initTempChart() {
|
initTempChart() {
|
||||||
const domList = document.getElementsByClassName('temp-chart')
|
const domList = document.getElementsByClassName('temp-chart')
|
||||||
domList.forEach((dom) => {
|
Array.prototype.forEach.call(domList, (dom) => {
|
||||||
const chart = this.$echarts.init(dom)
|
const chart = this.$echarts.init(dom)
|
||||||
this.tempCharts.push(chart)
|
this.tempCharts.push(chart)
|
||||||
})
|
})
|
||||||
|
@ -466,7 +466,7 @@ export default {
|
||||||
},
|
},
|
||||||
initChemicalChart() {
|
initChemicalChart() {
|
||||||
const domList = document.getElementsByClassName('chemical-chart')
|
const domList = document.getElementsByClassName('chemical-chart')
|
||||||
domList.forEach((dom) => {
|
Array.prototype.forEach.call(domList, (dom) => {
|
||||||
const chart = this.$echarts.init(dom)
|
const chart = this.$echarts.init(dom)
|
||||||
this.chemicalCharts.push(chart)
|
this.chemicalCharts.push(chart)
|
||||||
})
|
})
|
||||||
|
|
|
@ -775,7 +775,7 @@ export default {
|
||||||
this.options[4].series[0].data = ethanol
|
this.options[4].series[0].data = ethanol
|
||||||
this.options[5].series[0].data = methane
|
this.options[5].series[0].data = methane
|
||||||
const charts = document.getElementsByClassName('chart')
|
const charts = document.getElementsByClassName('chart')
|
||||||
charts.forEach((chart) => {
|
Array.prototype.forEach.call(charts, chart => {
|
||||||
this.myCharts.push(this.$echarts.init(chart))
|
this.myCharts.push(this.$echarts.init(chart))
|
||||||
})
|
})
|
||||||
this.options.forEach((option, index) => {
|
this.options.forEach((option, index) => {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: 龚祖望 573413756@qq.com
|
* @Author: 龚祖望 573413756@qq.com
|
||||||
* @Date: 2022-05-16 09:16:41
|
* @Date: 2022-05-16 09:16:41
|
||||||
* @LastEditors: 龚祖望 573413756@qq.com
|
* @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
|
* @FilePath: \dashengda\src\views\dashboard\index.vue
|
||||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
-->
|
-->
|
||||||
|
@ -72,7 +72,7 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
const imgs = document.getElementsByClassName('slide-img')
|
const imgs = document.getElementsByClassName('slide-img')
|
||||||
imgs.forEach(item => {
|
Array.prototype.forEach.call(imgs, item => {
|
||||||
item.style.height = (window.innerHeight - 115) + 'px'
|
item.style.height = (window.innerHeight - 115) + 'px'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -151,6 +151,7 @@
|
||||||
:file-list="firmwareList"
|
:file-list="firmwareList"
|
||||||
:on-success="handleSuccess"
|
:on-success="handleSuccess"
|
||||||
:on-error="handleError"
|
:on-error="handleError"
|
||||||
|
:on-change="handleFileChange"
|
||||||
>
|
>
|
||||||
<i class="el-icon-upload" />
|
<i class="el-icon-upload" />
|
||||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||||
|
@ -480,12 +481,20 @@ export default {
|
||||||
this.addTaskVisible = false
|
this.addTaskVisible = false
|
||||||
},
|
},
|
||||||
handleSuccess(res) {
|
handleSuccess(res) {
|
||||||
const { fileName, fileMd5, fileSize } = res.data
|
if (res.code === '200000') {
|
||||||
this.newFile.fileName = fileName
|
const { fileName, fileMd5, fileSize } = res.data
|
||||||
this.newFile.fileMd5 = fileMd5
|
this.newFile.fileName = fileName
|
||||||
this.newFile.fileSize = fileSize
|
this.newFile.fileMd5 = fileMd5
|
||||||
this.nextDisabled = false
|
this.newFile.fileSize = fileSize
|
||||||
this.$message.success('上传成功')
|
this.nextDisabled = false
|
||||||
|
this.$message.success('上传成功')
|
||||||
|
} else {
|
||||||
|
this.$refs.upload.clearFiles()
|
||||||
|
this.$message.error(res.message)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleFileChange() {
|
||||||
|
console.log('file change')
|
||||||
},
|
},
|
||||||
handleError() {
|
handleError() {
|
||||||
this.$message.error('上传失败')
|
this.$message.error('上传失败')
|
||||||
|
|
|
@ -31,7 +31,8 @@ module.exports = {
|
||||||
proxy: {
|
proxy: {
|
||||||
'/dashengda': {
|
'/dashengda': {
|
||||||
// target: 'http://115.238.53.60:33333/', // 大胜达
|
// 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',
|
// target: 'http://10.0.30.23:8080',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
|
|
Loading…
Reference in New Issue