|
|
|
@ -283,6 +283,7 @@ export default { |
|
|
|
|
}, (resp) => { |
|
|
|
|
resp.data._editing = true; |
|
|
|
|
this.columns.push(resp.data) |
|
|
|
|
this.initColLoadvals(resp.data) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -405,15 +406,21 @@ export default { |
|
|
|
|
if (!editing) { |
|
|
|
|
this.submitColChange(col) |
|
|
|
|
} else { |
|
|
|
|
let origvals = {}; |
|
|
|
|
_.each(col, (v, k) => { |
|
|
|
|
if (k[0] != '_') origvals[k] = v |
|
|
|
|
}) |
|
|
|
|
this.$set(this.columns[n], '_loadvals', origvals) |
|
|
|
|
this.initColLoadvals(col) |
|
|
|
|
this.$set(this.columns[n], '_editing', true) |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
initColLoadvals(col) { |
|
|
|
|
let n = this.colPos(col) |
|
|
|
|
|
|
|
|
|
let origvals = {}; |
|
|
|
|
_.each(col, (v, k) => { |
|
|
|
|
if (k[0] != '_') origvals[k] = v |
|
|
|
|
}) |
|
|
|
|
this.$set(this.columns[n], '_loadvals', origvals) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
/** Test if a value cell is changed */ |
|
|
|
|
isChanged (col, cell) { |
|
|
|
|
return col._changed && col._changed.indexOf(cell) > -1 |
|
|
|
|