检验申请审批时节点是否为空

This commit is contained in:
ChenXinXin committed 2024-05-07 15:51:01 +08:00
1 parent 8fd707c203
commit 332255518e
1 file changed
+10 -3
+10 -3
View File
@@ -200,9 +200,9 @@ Vue.component("create-task-drawer", {
case 'createTask': case 'createTask':
await this.prepareCreateValidate(); await this.prepareCreateValidate();
await this.confirmCreateWorkDialog(); await this.confirmCreateWorkDialog();
await this.prepareDoWorkItem(); // await this.prepareDoWorkItem();
await this.doCreateWork(); // await this.doCreateWork();
await this.doUiAction('close') // await this.doUiAction('close')
break; break;
default: default:
console.error("[doUiAction] uiActionId not find", {uiActionId}); console.error("[doUiAction] uiActionId not find", {uiActionId});
@@ -534,6 +534,13 @@ Vue.component("create-task-drawer", {
}, },
async prepareCreateValidate() { async prepareCreateValidate() {
this.curWorkflow.forEach(n => {
if(!n.properties.userIdList.length){
window.vtoast.fail("存在节点没有设置人员!")
throw new Error("存在节点没有设置人员!")
}
})
this.taskData.workflowForm.forEach(f => { this.taskData.workflowForm.forEach(f => {
if(f.type == 'time' && !this.isValidDateTime(f.answer)){ if(f.type == 'time' && !this.isValidDateTime(f.answer)){
window.vtoast.fail("时间日期格式不正确!") window.vtoast.fail("时间日期格式不正确!")