无法从camForm获取'comment'值

时间:2018-04-05 13:58:10

标签: angularjs camunda camunda-modeler

我想从我的表单中获取'refusalComment'(当我在其中写入一些值时)但是我每次部署项目时都无法进行此操作我得到了这个错误:

  

ReferenceError:未定义variableValue   在Array.eval(eval at(camunda-tasklist-ui.js?bust = 7.8.0:5),:27:84)

这是我的代码示例:

<form role=“form”>

var selectedDocuments=$scope.selectedDocuments=[];
var variableManager=camForm.variableManager;
var json=$scope.json={
id:1,
cardNumber:“12345678”,
organizationNameGE:“ptp”,
organizationNameEN:“psp”
};
$scope.selectedDocuments.push($scope.json);

   camForm.on('form-loaded', function() {

    // declare a 'json' variable 'customer'
    camForm.variableManager.createVariable({
      name: 'selectedDocuments',
      type: 'String',
      value: $scope.selectedDocuments
    });
  });

var comments = $scope.comments=[];
comments.length =$scope.selectedDocuments.length ;

  camForm.on('variables-fetched', function() {
    // value has been fetched, bind to $scope.user
    $scope.refusalComment = $( '#refusalComment', camForm.formElement).textContent(variableValue);
    console.log( $scope.refusalComment+"see comment");
    $scope.selectedDocuments=EnrichValue(variableManager.variable('selectedDocuments').value,$scope.refusalComment);
  });
 camForm.on('submit', function(evt) {
    // set value in variable manager so that it can be sent to backend


    variableManager.variableValue('selectedDocuments', $scope.selectedDocuments);

  });


function EnrichValue(data,comment){
for(var  i=0;i<Object.keys(json).length;i++){
json[i].comment=comment;
comments[i]=comment;
}

return json;
}

我应该做些什么来摆脱这个错误?

0 个答案:

没有答案