From 1115c7621626318e3fee0b0c8613a80af70cd0f8 Mon Sep 17 00:00:00 2001 From: WenG <450292408@qq.com> Date: Wed, 6 Apr 2022 23:42:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=86=E5=89=8D=E7=AB=AFOA?= =?UTF-8?q?=E8=8A=82=E7=82=B9=E7=AE=A1=E7=90=86=E4=BF=9D=E5=AD=98=E6=97=B6?= =?UTF-8?q?=E7=9A=84=E7=BA=A6=E6=9D=9F=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../properties-form-select-controller.js | 3 +- .../properties-oa-node-manage-controller.js | 69 +++++++++++++++++-- 2 files changed, 66 insertions(+), 6 deletions(-) diff --git a/module-activiti/src/main/resources/static/editor-app/configuration/properties-form-select-controller.js b/module-activiti/src/main/resources/static/editor-app/configuration/properties-form-select-controller.js index 27e0c7be..8709a473 100644 --- a/module-activiti/src/main/resources/static/editor-app/configuration/properties-form-select-controller.js +++ b/module-activiti/src/main/resources/static/editor-app/configuration/properties-form-select-controller.js @@ -61,7 +61,6 @@ var FormSelectController = ['$scope', function($scope) { $scope.property.value = ''; $scope.property.value = $scope.form.formId; $scope.updatePropertyInModel($scope.property); - $scope.$hide(); $scope.close(); }; @@ -72,7 +71,7 @@ var FormSelectController = ['$scope', function($scope) { // Close button handler $scope.close = function() { - $scope.$hide(); $scope.property.mode = 'read'; + $scope.$hide(); }; }]; \ No newline at end of file diff --git a/module-activiti/src/main/resources/static/editor-app/configuration/properties-oa-node-manage-controller.js b/module-activiti/src/main/resources/static/editor-app/configuration/properties-oa-node-manage-controller.js index dda96b9b..e4fa8bc8 100644 --- a/module-activiti/src/main/resources/static/editor-app/configuration/properties-oa-node-manage-controller.js +++ b/module-activiti/src/main/resources/static/editor-app/configuration/properties-oa-node-manage-controller.js @@ -10,12 +10,13 @@ var OaNodeManageCtrl = ['$scope', '$modal', '$timeout', '$translate', function ( var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $timeout, $http) { // console.log($scope.selectedItem); - // console.log($scope.editor); + console.log($scope.editor); // console.log($scope.editor.modelMetaData.model.childShapes); // console.log($scope.stencilItemGroups) // 获取流程中的配置 - var model = $scope.editor.modelMetaData.model; - var childShapes = model.childShapes; + var modelJson = $scope.editor.getJSON(); + console.log(modelJson); + var childShapes = modelJson.childShapes; // 关联到的属性 var multiInstanceType = $scope.selectedItem.properties[7]; var multiInstanceCollection = $scope.selectedItem.properties[9]; @@ -170,7 +171,7 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t // 选择用户 $scope.selectAssignee = function () { var assignee = $scope.oaNodeManage.assignee; - top.dialog.dialogData.selectedUserIds = assignee.multipleAssignees; + top.dialog.dialogData.selectedUserIds = assignee.assignee; top.dialog.open({ url: top.restAjax.path('route/department/user/select-user', []), title: '选择代理人【单选】', @@ -522,6 +523,66 @@ var OaNodeManagePopupCtrl = ['$scope', '$timeout', '$http', function ($scope, $t // Click handler for save button $scope.save = function () { + var assignee = $scope.oaNodeManage.assignee; + // 验证输入内容是否设置 + if(assignee.nodeType === 'normal') { + if(assignee.assigneeType === 'appoint') { + if(assignee.assigneeCount === 'single') { + if(!assignee.assignee) { + top.dialog.msg('请选择代理人'); + return; + } + } + if(assignee.assigneeCount === 'candidate') { + if(!assignee.candidates) { + top.dialog.msg('请选择候选人'); + return; + } + } + } + } + if(assignee.nodeType === 'multiple') { + if(assignee.multipleType === 'parallel') { + if(assignee.completeCondition === 'customPass') { + if(!assignee.completeCount) { + top.dialog.msg('请输入完成条件中的通过人数'); + return; + } + } + } + if(assignee.assigneeType === 'appoint') { + if(!assignee.multipleAssignees) { + top.dialog.msg('请选择(多实例)代理人'); + return; + } + } + } + if(assignee.autoAssignType === 'scope') { + if(assignee.departmentType === 'appoint') { + if(!assignee.departments && !assignee.roles && !assignee.positions) { + top.dialog.msg('请选择部门、角色、职位中的至少一个类型'); + return; + } + } + if(assignee.departmentType === 'belong') { + if(!assignee.roles && !assignee.positions) { + top.dialog.msg('请选择角色、职位中的至少一个类型'); + return; + } + } + } + if(assignee.assigneeType === 'auto') { + if(assignee.autoAssignType === 'quick') { + if(assignee.quickAssignee === 'previousNStepAssigneeSubordinatePosition') { + if(!assignee.previousNStep) { + top.dialog.msg('请确认获取前哪一步的代理人'); + return; + } + } + } + } + + $scope.property.value = {}; $scope.property.value = $scope.oaNodeManage; $scope.updatePropertyInModel($scope.property);