今天根据客户反馈开源项目宁波阿成 (nbacheng) - Gitee.com
有一些bug,主要是前端的,所以今天修正一下
1、对于第一个节点是发起人,后面是多人选择的时候,approval数据被清空了
就是上面的流程,发现有问题
对这种情况,需要恢复this.taskForm.values.approval值
if (this.startUserForm.isStartUserNode && this.startUserForm.editFormType === 'oa' ) {this.$refs.refStartBuilder.validate();const approval = this.taskForm.values.approval;const variables=JSON.parse(this.formVal);const formData = JSON.parse(this.formViewData);formData.formValue = JSON.parse(this.formVal);variables.variables = formData;console.log("variables=", variables);this.taskForm.variables = variables;this.taskForm.values = variables;if(approval) {this.taskForm.values.approval = approval;}}
2、对于流程用户选择出现错乱问题
changeDataType(val) {// 清空 userTaskForm 所有属性值Object.keys(this.userTaskForm).forEach(key => this.userTaskForm[key] = null);this.userTaskForm.dataType = val;if (val === 'INITIATOR') {this.userTaskForm.assignee = "${INITIATOR}";this.userTaskForm.text = "流程发起人";const taskAttr = Object.create(null);taskAttr['assignee'] = this.userTaskForm['assignee'] || null;window.bpmnInstances.modeling.updateProperties(this.bpmnElement, taskAttr);}},
选择其它选项就清空其它内容,不在保留,以防止选择错乱
3、会签流程参数第一次使用时候不能编辑问题
在第一次使用会签流程选择模式的时候,下面的参数不能修改
getElementLoop(businessObject) {if (!businessObject.loopCharacteristics) {this.loopCharacteristics = "Null";this.loopInstanceForm = {collection: "",elementVariable: "",completionCondition: ""};return;}if (businessObject.loopCharacteristics.$type === "bpmn:StandardLoopCharacteristics") {this.loopCharacteristics = "StandardLoop";this.loopInstanceForm = {collection: "",elementVariable: "",completionCondition: ""};return;}
主要还是参数绑定问题,所以需要对这种情况,初始化参数,以便绑定有效。
通过上面修改后,前端的一些bug修正好了。
下一篇:带你手撕排序算法