fix bug: forEach error
This commit is contained in:
parent
8b68509a99
commit
d9fa1f4a49
|
@ -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()
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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'
|
||||
})
|
||||
}
|
||||
|
|
|
@ -151,6 +151,7 @@
|
|||
:file-list="firmwareList"
|
||||
:on-success="handleSuccess"
|
||||
:on-error="handleError"
|
||||
:on-change="handleFileChange"
|
||||
>
|
||||
<i class="el-icon-upload" />
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
|
@ -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('上传失败')
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Reference in New Issue