Korsum 弹窗右侧表格切换数据不更新的问题
This commit is contained in:
		
							parent
							
								
									1845a928df
								
							
						
					
					
						commit
						5433dff98d
					
				| 
						 | 
					@ -14,9 +14,14 @@ export default {
 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    text: Number,
 | 
					    text: Number,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    value() {
 | 
				
			||||||
 | 
					      return this.text
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      value: this.text,
 | 
					      // value: this.text,
 | 
				
			||||||
      editable: false,
 | 
					      editable: false,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -281,7 +281,6 @@ export default {
 | 
				
			||||||
          ...this.efficiency,
 | 
					          ...this.efficiency,
 | 
				
			||||||
          energys: this.list.map((item) => item.energy),
 | 
					          energys: this.list.map((item) => item.energy),
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        console.log(success)
 | 
					 | 
				
			||||||
        if (success) {
 | 
					        if (success) {
 | 
				
			||||||
          this.list = result
 | 
					          this.list = result
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
| 
						 | 
					@ -301,7 +300,6 @@ export default {
 | 
				
			||||||
        this.isLoading = false
 | 
					        this.isLoading = false
 | 
				
			||||||
        if (success) {
 | 
					        if (success) {
 | 
				
			||||||
          this.analyseData = result
 | 
					          this.analyseData = result
 | 
				
			||||||
          console.log(result)
 | 
					 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.$message.error(message)
 | 
					          this.$message.error(message)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					@ -346,15 +344,12 @@ export default {
 | 
				
			||||||
      this.outputTableList = result
 | 
					      this.outputTableList = result
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    onCellChange(idx, label, value) {
 | 
					    onCellChange(idx, label, value) {
 | 
				
			||||||
      console.log(this.outputTableList)
 | 
					 | 
				
			||||||
      console.log(value)
 | 
					 | 
				
			||||||
      const dataSource = [...this.outputTableList]
 | 
					      const dataSource = [...this.outputTableList]
 | 
				
			||||||
      const target = dataSource.find((item, index) => index == idx)
 | 
					      const target = dataSource.find((item, index) => index == idx)
 | 
				
			||||||
      if (target) {
 | 
					      if (target) {
 | 
				
			||||||
        target[label] = value
 | 
					        target[label] = value
 | 
				
			||||||
        this.outputTableList = dataSource
 | 
					        this.outputTableList = dataSource
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      console.log(this.outputTableList)
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // 导出到excel
 | 
					    // 导出到excel
 | 
				
			||||||
| 
						 | 
					@ -372,7 +367,6 @@ export default {
 | 
				
			||||||
          console.log('Cancel')
 | 
					          console.log('Cancel')
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        onCancel() {
 | 
					        onCancel() {
 | 
				
			||||||
          console.log(_this.fileName)
 | 
					 | 
				
			||||||
          if (_this.fileName) {
 | 
					          if (_this.fileName) {
 | 
				
			||||||
            // saveAs(blob, `${_this.fileName}`)
 | 
					            // saveAs(blob, `${_this.fileName}`)
 | 
				
			||||||
            // 创建工作簿
 | 
					            // 创建工作簿
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user