完善流程引擎前端OA节点管理功能
This commit is contained in:
parent
ae44fe6a2a
commit
b16e720feb
@ -3,6 +3,7 @@ package ink.wgink.module.activiti.dao.oa;
|
|||||||
import ink.wgink.exceptions.RemoveException;
|
import ink.wgink.exceptions.RemoveException;
|
||||||
import ink.wgink.exceptions.SaveException;
|
import ink.wgink.exceptions.SaveException;
|
||||||
import ink.wgink.exceptions.UpdateException;
|
import ink.wgink.exceptions.UpdateException;
|
||||||
|
import ink.wgink.interfaces.init.IInitBaseTable;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
@ -15,7 +16,7 @@ import java.util.Map;
|
|||||||
* @Version: 1.0
|
* @Version: 1.0
|
||||||
*/
|
*/
|
||||||
@Repository
|
@Repository
|
||||||
public interface INodeAssigneeDao {
|
public interface INodeAssigneeDao extends IInitBaseTable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增
|
* 新增
|
||||||
|
@ -55,6 +55,8 @@ public class AssigneeVO {
|
|||||||
private String positionNames;
|
private String positionNames;
|
||||||
@ApiModelProperty(name = "quickAssignee", value = "快速代理人")
|
@ApiModelProperty(name = "quickAssignee", value = "快速代理人")
|
||||||
private String quickAssignee;
|
private String quickAssignee;
|
||||||
|
@ApiModelProperty(name = "previousNStep", value = "前N步")
|
||||||
|
private Integer previousNStep;
|
||||||
|
|
||||||
public String getNodeType() {
|
public String getNodeType() {
|
||||||
return nodeType == null ? "" : nodeType.trim();
|
return nodeType == null ? "" : nodeType.trim();
|
||||||
@ -224,52 +226,39 @@ public class AssigneeVO {
|
|||||||
this.quickAssignee = quickAssignee;
|
this.quickAssignee = quickAssignee;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Integer getPreviousNStep() {
|
||||||
|
return previousNStep;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPreviousNStep(Integer previousNStep) {
|
||||||
|
this.previousNStep = previousNStep;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
final StringBuilder sb = new StringBuilder("{");
|
return "AssigneeVO{" +
|
||||||
sb.append("\"nodeType\":\"")
|
"nodeType='" + nodeType + '\'' +
|
||||||
.append(nodeType).append('\"');
|
", assigneeCount='" + assigneeCount + '\'' +
|
||||||
sb.append(",\"assigneeCount\":\"")
|
", assignee='" + assignee + '\'' +
|
||||||
.append(assigneeCount).append('\"');
|
", assigneeName='" + assigneeName + '\'' +
|
||||||
sb.append(",\"assignee\":\"")
|
", candidates='" + candidates + '\'' +
|
||||||
.append(assignee).append('\"');
|
", candidateNames='" + candidateNames + '\'' +
|
||||||
sb.append(",\"assigneeName\":\"")
|
", multipleType='" + multipleType + '\'' +
|
||||||
.append(assigneeName).append('\"');
|
", completeCondition='" + completeCondition + '\'' +
|
||||||
sb.append(",\"candidates\":\"")
|
", completeCount=" + completeCount +
|
||||||
.append(candidates).append('\"');
|
", multipleAssignees='" + multipleAssignees + '\'' +
|
||||||
sb.append(",\"candidateNames\":\"")
|
", multipleAssigneeNames='" + multipleAssigneeNames + '\'' +
|
||||||
.append(candidateNames).append('\"');
|
", assigneeType='" + assigneeType + '\'' +
|
||||||
sb.append(",\"multipleType\":\"")
|
", autoAssignType='" + autoAssignType + '\'' +
|
||||||
.append(multipleType).append('\"');
|
", departmentType='" + departmentType + '\'' +
|
||||||
sb.append(",\"completeCondition\":\"")
|
", departments='" + departments + '\'' +
|
||||||
.append(completeCondition).append('\"');
|
", departmentNames='" + departmentNames + '\'' +
|
||||||
sb.append(",\"completeCount\":")
|
", roles='" + roles + '\'' +
|
||||||
.append(completeCount);
|
", roleNames='" + roleNames + '\'' +
|
||||||
sb.append(",\"multipleAssignees\":\"")
|
", positions='" + positions + '\'' +
|
||||||
.append(multipleAssignees).append('\"');
|
", positionNames='" + positionNames + '\'' +
|
||||||
sb.append(",\"multipleAssigneeNames\":\"")
|
", quickAssignee='" + quickAssignee + '\'' +
|
||||||
.append(multipleAssigneeNames).append('\"');
|
", previousNStep=" + previousNStep +
|
||||||
sb.append(",\"assigneeType\":\"")
|
'}';
|
||||||
.append(assigneeType).append('\"');
|
|
||||||
sb.append(",\"autoAssignType\":\"")
|
|
||||||
.append(autoAssignType).append('\"');
|
|
||||||
sb.append(",\"departmentType\":\"")
|
|
||||||
.append(departmentType).append('\"');
|
|
||||||
sb.append(",\"departments\":\"")
|
|
||||||
.append(departments).append('\"');
|
|
||||||
sb.append(",\"departmentNames\":\"")
|
|
||||||
.append(departmentNames).append('\"');
|
|
||||||
sb.append(",\"roles\":\"")
|
|
||||||
.append(roles).append('\"');
|
|
||||||
sb.append(",\"roleNames\":\"")
|
|
||||||
.append(roleNames).append('\"');
|
|
||||||
sb.append(",\"positions\":\"")
|
|
||||||
.append(positions).append('\"');
|
|
||||||
sb.append(",\"positionNames\":\"")
|
|
||||||
.append(positionNames).append('\"');
|
|
||||||
sb.append(",\"quickAssignee\":\"")
|
|
||||||
.append(quickAssignee).append('\"');
|
|
||||||
sb.append('}');
|
|
||||||
return sb.toString();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,8 @@
|
|||||||
role_names,
|
role_names,
|
||||||
positions,
|
positions,
|
||||||
position_names,
|
position_names,
|
||||||
quick_assignee
|
quick_assignee,
|
||||||
|
previous_n_step
|
||||||
) VALUES(
|
) VALUES(
|
||||||
#{nodeFieldId},
|
#{nodeFieldId},
|
||||||
#{modelId},
|
#{modelId},
|
||||||
@ -91,7 +92,8 @@
|
|||||||
#{roleNames},
|
#{roleNames},
|
||||||
#{positions},
|
#{positions},
|
||||||
#{positionNames},
|
#{positionNames},
|
||||||
#{quickAssignee}
|
#{quickAssignee},
|
||||||
|
#{previousNStep}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
|
@ -17,6 +17,10 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t
|
|||||||
var model = $scope.editor.modelMetaData.model;
|
var model = $scope.editor.modelMetaData.model;
|
||||||
var childShapes = model.childShapes;
|
var childShapes = model.childShapes;
|
||||||
// 关联到的属性
|
// 关联到的属性
|
||||||
|
var multiInstanceType = $scope.selectedItem.properties[7];
|
||||||
|
var multiInstanceCollection = $scope.selectedItem.properties[9];
|
||||||
|
var multiInstanceVariable = $scope.selectedItem.properties[10];
|
||||||
|
var multiInstanceCondition = $scope.selectedItem.properties[11];
|
||||||
var assigneeProperty = $scope.selectedItem.properties[13];
|
var assigneeProperty = $scope.selectedItem.properties[13];
|
||||||
var taskListenerProperty = $scope.selectedItem.properties[16];
|
var taskListenerProperty = $scope.selectedItem.properties[16];
|
||||||
|
|
||||||
@ -25,26 +29,27 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t
|
|||||||
$scope.oaNodeManage = {
|
$scope.oaNodeManage = {
|
||||||
assignee: {
|
assignee: {
|
||||||
nodeType: 'normal',
|
nodeType: 'normal',
|
||||||
assigneeCount: '',
|
assigneeCount: 'single',
|
||||||
assignee: '',
|
assignee: '',
|
||||||
assigneeName: '',
|
assigneeName: '',
|
||||||
candidates: '',
|
candidates: '',
|
||||||
candidateNames: '',
|
candidateNames: '',
|
||||||
multipleType: 'parallel',
|
multipleType: 'parallel',
|
||||||
completeCondition: 'allPass',
|
completeCondition: 'allPass',
|
||||||
completeCount: 0,
|
completeCount: 1,
|
||||||
multipleAssignees: '',
|
multipleAssignees: '',
|
||||||
multipleAssigneeNames: '',
|
multipleAssigneeNames: '',
|
||||||
assigneeType: '',
|
assigneeType: 'appoint',
|
||||||
autoAssignType: '',
|
autoAssignType: 'scope',
|
||||||
departmentType: '',
|
departmentType: 'appoint',
|
||||||
departments: '',
|
departments: '',
|
||||||
departmentNames: '',
|
departmentNames: '',
|
||||||
roles: '',
|
roles: '',
|
||||||
roleNames: '',
|
roleNames: '',
|
||||||
positions: '',
|
positions: '',
|
||||||
positionNames: '',
|
positionNames: '',
|
||||||
quickAssignee: '',
|
quickAssignee: 'starter',
|
||||||
|
previousNStep: 1
|
||||||
},
|
},
|
||||||
formId: '',
|
formId: '',
|
||||||
formFields: [],
|
formFields: [],
|
||||||
@ -140,6 +145,28 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t
|
|||||||
$scope.oaNodeManage.oaUserTaskListeners.splice(index, 1);
|
$scope.oaNodeManage.oaUserTaskListeners.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$scope.checkCompleteCount = function() {
|
||||||
|
var assignee = $scope.oaNodeManage.assignee;
|
||||||
|
if(!assignee.completeCount) {
|
||||||
|
assignee.completeCount = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(assignee.completeCount < 1) {
|
||||||
|
assignee.completeCount = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$scope.checkPreviousNStep = function() {
|
||||||
|
var assignee = $scope.oaNodeManage.assignee;
|
||||||
|
if(!assignee.previousNStep) {
|
||||||
|
assignee.previousNStep = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(assignee.previousNStep < 1) {
|
||||||
|
assignee.previousNStep = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 选择用户
|
// 选择用户
|
||||||
$scope.selectAssignee = function () {
|
$scope.selectAssignee = function () {
|
||||||
var assignee = $scope.oaNodeManage.assignee;
|
var assignee = $scope.oaNodeManage.assignee;
|
||||||
@ -366,6 +393,7 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t
|
|||||||
value: item
|
value: item
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
$scope.updatePropertyInModel(assigneeProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 更新手动指定多个候选人
|
// 更新手动指定多个候选人
|
||||||
@ -376,9 +404,75 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新多实例
|
||||||
|
*/
|
||||||
|
function updateMultipleInstance() {
|
||||||
|
$scope.updatePropertyInModel(multiInstanceType);
|
||||||
|
$scope.updatePropertyInModel(multiInstanceCollection);
|
||||||
|
$scope.updatePropertyInModel(multiInstanceVariable);
|
||||||
|
$scope.updatePropertyInModel(multiInstanceCondition);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新并行
|
||||||
|
*/
|
||||||
|
function updateParallel() {
|
||||||
|
multiInstanceType.value = $scope.oaNodeManage.assignee.multipleType;
|
||||||
|
multiInstanceCollection.value = '${multipleAssignees}';
|
||||||
|
multiInstanceVariable.value = 'multipleAssignees';
|
||||||
|
if (assignee.completeCondition === 'allPass') {
|
||||||
|
// 全部通过
|
||||||
|
multiInstanceCondition.value = '${nrOfCompletedInstances == nrOfInstances}'
|
||||||
|
} else if (assignee.completeCondition === 'singlePass') {
|
||||||
|
// 单人通过
|
||||||
|
multiInstanceCondition.value = '${nrOfCompletedInstances == 1}'
|
||||||
|
} else if (assignee.completeCondition === 'customPass') {
|
||||||
|
// 通过多少人
|
||||||
|
multiInstanceCondition.value = '${nrOfCompletedInstances == '+ assignee.completeCount +'}'
|
||||||
|
} else {
|
||||||
|
top.dialog.msg('多实例(完成)通过条件错误');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
updateMultipleInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新串行
|
||||||
|
*/
|
||||||
|
function updateSequential() {
|
||||||
|
multiInstanceType.value = $scope.oaNodeManage.assignee.multipleType;
|
||||||
|
multiInstanceCollection.value = '${assigneeList}';
|
||||||
|
multiInstanceVariable.value = 'assignee';
|
||||||
|
multiInstanceCondition.value = '';
|
||||||
|
updateMultipleInstance();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清空代理人候选人
|
||||||
|
*/
|
||||||
|
function clearAssigneeAndCandidate() {
|
||||||
|
assigneeProperty.value = {};
|
||||||
|
$scope.updatePropertyInModel(assigneeProperty);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 清空多实例配置
|
||||||
|
*/
|
||||||
|
function clearMultipleInstance() {
|
||||||
|
multiInstanceType.value = '';
|
||||||
|
multiInstanceCollection.value = '';
|
||||||
|
multiInstanceVariable.value = '';
|
||||||
|
multiInstanceCondition.value = '';
|
||||||
|
updateMultipleInstance();
|
||||||
|
}
|
||||||
|
|
||||||
var assignee = $scope.oaNodeManage.assignee;
|
var assignee = $scope.oaNodeManage.assignee;
|
||||||
// 普通节点
|
// 普通节点
|
||||||
if (assignee.nodeType === 'normal') {
|
if (assignee.nodeType === 'normal') {
|
||||||
|
// 清空多实例选项
|
||||||
|
clearMultipleInstance();
|
||||||
// 手动指定
|
// 手动指定
|
||||||
if (assignee.assigneeType === 'appoint') {
|
if (assignee.assigneeType === 'appoint') {
|
||||||
// 单选
|
// 单选
|
||||||
@ -401,6 +495,20 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (assignee.nodeType === 'multiple') {
|
||||||
|
// 清空代理人选项
|
||||||
|
clearAssigneeAndCandidate();
|
||||||
|
// 并行
|
||||||
|
if (assignee.multipleType === 'parallel') {
|
||||||
|
updateParallel();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(assignee.multipleType === 'sequential') {
|
||||||
|
updateSequential();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -417,8 +525,6 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t
|
|||||||
$scope.property.value = {};
|
$scope.property.value = {};
|
||||||
$scope.property.value = $scope.oaNodeManage;
|
$scope.property.value = $scope.oaNodeManage;
|
||||||
$scope.updatePropertyInModel($scope.property);
|
$scope.updatePropertyInModel($scope.property);
|
||||||
console.log($scope.property)
|
|
||||||
|
|
||||||
|
|
||||||
updateAssignment();
|
updateAssignment();
|
||||||
updateTaskListener();
|
updateTaskListener();
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
<li class="active">
|
<li class="active">
|
||||||
<a href="#nodeConfig" aria-controls="home" role="tab" data-toggle="tab"><h5>代理人配置</h5></a>
|
<a href="#nodeConfig" aria-controls="home" role="tab" data-toggle="tab"><h5>代理人配置</h5></a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<!-- <li>-->
|
||||||
<a href="#buttonConfig" aria-controls="profile" role="tab" data-toggle="tab"><h5>按钮配置</h5></a>
|
<!-- <a href="#buttonConfig" aria-controls="profile" role="tab" data-toggle="tab"><h5>按钮配置</h5></a>-->
|
||||||
</li>
|
<!-- </li>-->
|
||||||
<li>
|
<li>
|
||||||
<a href="#formFieldConfig" aria-controls="profile" role="tab" data-toggle="tab"><h5>表单字段配置</h5></a>
|
<a href="#formFieldConfig" aria-controls="profile" role="tab" data-toggle="tab"><h5>表单字段配置</h5></a>
|
||||||
</li>
|
</li>
|
||||||
@ -80,7 +80,7 @@
|
|||||||
<label class="radio-inline">
|
<label class="radio-inline">
|
||||||
<input ng-model="oaNodeManage.assignee.completeCondition" type="radio" name="completeCondition" value="customPass"> 通过
|
<input ng-model="oaNodeManage.assignee.completeCondition" type="radio" name="completeCondition" value="customPass"> 通过
|
||||||
</label>
|
</label>
|
||||||
<input ng-model="oaNodeManage.assignee.completeCount" type="number" step="1" name="completeCount" ng-disabled="oaNodeManage.assignee.completeCondition != 'customPass'"> 人
|
<input ng-model="oaNodeManage.assignee.completeCount" type="number" step="1" name="completeCount" ng-change="checkCompleteCount()" ng-disabled="oaNodeManage.assignee.completeCondition != 'customPass'" style="width: 60px;"> 人
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -282,7 +282,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="radio">
|
<div class="radio">
|
||||||
<label>
|
<label>
|
||||||
<input ng-model="oaNodeManage.assignee.quickAssignee" type="radio" name="quickAssignee" value="previousNStepAssigneeSubordinatePosition"> 上 <input type="number" step="1" name="previousNStep" ng-disabled="oaNodeManage.assignee.quickAssignee != 'previousNStepAssigneeSubordinatePosition'"> 步代理人
|
<input ng-model="oaNodeManage.assignee.quickAssignee" type="radio" name="quickAssignee" value="previousNStepAssigneeSubordinatePosition"> 上 <input type="number" step="1" name="previousNStep" ng-model="oaNodeManage.assignee.previousNStep" ng-change="checkPreviousNStep()" ng-disabled="oaNodeManage.assignee.quickAssignee != 'previousNStepAssigneeSubordinatePosition'" style="width: 60px;"> 步代理人
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
@ -291,7 +291,7 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div role="tabpanel" class="tab-pane" id="buttonConfig" style="padding: 15px 0;"></div>
|
<!-- <div role="tabpanel" class="tab-pane" id="buttonConfig" style="padding: 15px 0;"></div>-->
|
||||||
<div role="tabpanel" class="tab-pane" id="formFieldConfig" style="padding: 15px 0;">
|
<div role="tabpanel" class="tab-pane" id="formFieldConfig" style="padding: 15px 0;">
|
||||||
<table class="table table-bordered table-hover">
|
<table class="table table-bordered table-hover">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
|
Loading…
Reference in New Issue
Block a user