Skip to content

Commit

Permalink
bugfix: add transiton can just select at most 10record source or dest…
Browse files Browse the repository at this point in the history
… states
  • Loading branch information
blackholll committed Dec 8, 2019
1 parent 674e942 commit 200437a
Showing 1 changed file with 25 additions and 7 deletions.
32 changes: 25 additions & 7 deletions templates/workflow/workflow_manage_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,30 @@ <h4 class="modal-title">工作流流转</h4>
$("#workflow_transiton_form")[0].reset();
$("#transitionId").val("");
});

$("#transitionModal").on("show.bs.modal", function() {
var param = {};
param.per_page = 1000;
param.page = 1
$.ajax({
type: "GET",
url: "/api/v1.0/workflows/" + "{{ workflow_id }}" + "/states",
cache: false, //禁用缓存
data: param, //传入组装的参数
dataType: "json",
success: function (result) {
result.data.value.map(function (currentValue, index, arr) {
$("#sourceStateId").append("<option value=" + "'" + currentValue.id + "'" + ">" + currentValue.name + "</option>");
})
result.data.value.map(function (currentValue, index, arr) {
$("#destinationStateId").append("<option value=" + "'" + currentValue.id + "'" + ">" + currentValue.name + "</option>");
})
},


});
})

$("#customFieldModal").on("hidden.bs.modal", function() {
$(this).removeData("bs.modal");
$("#workflow_custom_field_form")[0].reset();
Expand Down Expand Up @@ -698,12 +722,7 @@ <h4 class="modal-title">工作流流转</h4>
//console.log(returnData);
//调用DataTables提供的callback方法,代表数据已封装完成并传回DataTables进行渲染
//此时的数据需确保正确无误,异常判断应在执行此回调前自行处理完毕

// 填充新增流转记录表单中可选的源和目标状态
$("#sourceStateId").empty();
$("#destinationStateId").empty();
result.data.value.map(function(currentValue,index,arr){$("#sourceStateId").append("<option value=" + "'" + currentValue.id + "'" + ">" + currentValue.name + "</option>");})
result.data.value.map(function(currentValue,index,arr){$("#destinationStateId").append("<option value=" + "'" + currentValue.id + "'" + ">" + currentValue.name + "</option>");})

callback(returnData);
},

Expand Down Expand Up @@ -1315,7 +1334,6 @@ <h4 class="modal-title">工作流流转</h4>
$('#alertEnable').attr('checked', false);
};


$('#transitionModal').modal('show');
}
function submitTransiton(){
Expand Down

0 comments on commit 200437a

Please sign in to comment.