|
@@ -92,18 +92,20 @@ $(document).ready(function() {
|
|
|
}
|
|
|
|
|
|
$('body').on('blur', '#paramList input', function () {
|
|
|
- if($(this).val() != $(this).attr('data-old-value')){
|
|
|
+ const self = $(this);
|
|
|
+ if(self.val() != self.attr('data-old-value')){
|
|
|
const postInfo = {
|
|
|
- lib_id: parseInt($(this).attr('data-lib-id')),
|
|
|
- node_id: parseInt($(this).attr('data-node-id')),
|
|
|
- code: $(this).attr('data-code'),
|
|
|
+ lib_id: parseInt(self.attr('data-lib-id')),
|
|
|
+ node_id: parseInt(self.attr('data-node-id')),
|
|
|
+ code: self.attr('data-code'),
|
|
|
updateType: 'modify',
|
|
|
- value: parseFloat($(this).val())
|
|
|
+ value: parseFloat(self.val())
|
|
|
};
|
|
|
- $(this).attr('data-old-value', $(this).val());
|
|
|
const postUrl = '/lib/updateParamValue';
|
|
|
postData(postUrl, postInfo, function (result) {
|
|
|
- // console.log(result);
|
|
|
+ self.attr('data-old-value', result.param.calc_value);
|
|
|
+ },function (result) {
|
|
|
+ self.val(self.attr('data-old-value'));
|
|
|
});
|
|
|
}
|
|
|
})
|