1

我想从我的表单中获取“拒绝评论”(当我在其中写入一些值时),但每次部署项目时我都无法进行此操作,但出现此错误:

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

这是我的代码示例:

<form role=“form”&gt;

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;
}

我应该改变什么来摆脱这个错误?

4

0 回答 0