|
@@ -287,7 +287,14 @@ export default{
|
|
|
if(type == 'string'){
|
|
|
this.setColumnData('',field,property)
|
|
|
}else{
|
|
|
- this.setColumnData([{index:1}],field,property)
|
|
|
+ this.setColumnData([
|
|
|
+ {
|
|
|
+ index:1,
|
|
|
+ compareFile:"",
|
|
|
+ analysis:'',
|
|
|
+ compareRecord:[]
|
|
|
+ }
|
|
|
+ ],field,property)
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -435,11 +442,17 @@ export default{
|
|
|
property:property,
|
|
|
index:index,
|
|
|
}
|
|
|
- if(index === 0 || index){
|
|
|
- this.nowEdit.value = this.reportData[field][index][property]
|
|
|
- }else{
|
|
|
- this.nowEdit.value = this.reportData[field][property]
|
|
|
- }
|
|
|
+ try{
|
|
|
+ var editValue = this.reportData
|
|
|
+ if(typeof field == 'object'){
|
|
|
+ editValue = this.getDataByField(field)
|
|
|
+ editValue = this.getDataByField({property:property,index:index},editValue)
|
|
|
+ }else{
|
|
|
+ editValue = this.getDataByField({field:field,property:property,index:index})
|
|
|
+ }
|
|
|
+
|
|
|
+ this.nowEdit.value = editValue
|
|
|
+ }catch{}
|
|
|
var obj = this.editMessage.find(item=>{
|
|
|
return item.field == field && item.property == property && item.index == index
|
|
|
})
|
|
@@ -453,8 +466,22 @@ export default{
|
|
|
}
|
|
|
)
|
|
|
},
|
|
|
+ getDataByField(field,currentData=this.reportData){
|
|
|
+ var {field,property,index} = field
|
|
|
+ var data = currentData
|
|
|
+ if(field){
|
|
|
+ data = data[field]
|
|
|
+ }
|
|
|
+ if(index === 0 || index){
|
|
|
+ data = data[index]
|
|
|
+ }
|
|
|
+ if(property){
|
|
|
+ data = data[property]
|
|
|
+ }
|
|
|
+ return data
|
|
|
+ },
|
|
|
isEdit(field,property,index=''){
|
|
|
- if(this.nowEdit.field==field && this.nowEdit.property==property && this.nowEdit.index == index){
|
|
|
+ if(this.$_.isEqual(this.nowEdit.field,field) && this.nowEdit.property==property && this.nowEdit.index == index){
|
|
|
return true
|
|
|
}
|
|
|
return false
|
|
@@ -471,12 +498,24 @@ export default{
|
|
|
var field = this.nowEdit.field
|
|
|
var property = this.nowEdit.property
|
|
|
var index = this.nowEdit.index
|
|
|
- if(index){
|
|
|
- this.$set(this.reportData[field][index],property,value)
|
|
|
+
|
|
|
+ var editValue = this.reportData
|
|
|
+ if(typeof field == 'object'){
|
|
|
+ editValue = this.getDataByField(field)
|
|
|
+ if(index ===0 || index){
|
|
|
+ this.$set(editValue[index],property,value)
|
|
|
+ }else{
|
|
|
+ this.$set(editValue,property,value)
|
|
|
+ }
|
|
|
}else{
|
|
|
- this.$set(this.reportData[field],property,value)
|
|
|
+ if(index ===0 || index){
|
|
|
+ this.$set(this.reportData[field][index],property,value)
|
|
|
+ }else{
|
|
|
+ this.$set(this.reportData[field],property,value)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
+
|
|
|
if(fu && typeof fu == 'function'){
|
|
|
fu(value)
|
|
|
}
|