审批流保存数据检验
This commit is contained in:
1 parent
7e094cd83e
commit
9bec3c6de0
8 files changed
+233
-94
No files matched your search
@@ -45,7 +45,7 @@
|
||||
<v-card-text class="pa-0">
|
||||
<div class="mt-1">
|
||||
<!-- <div class="text-subtitle-2 mb-2">基础信息</div> -->
|
||||
<workflow-basic-info :workflow-info="formObj.workflowInfo"></workflow-basic-info>
|
||||
<workflow-basic-info ref="basicInfo" :workflow-info="formObj.workflowInfo"></workflow-basic-info>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
@@ -55,7 +55,7 @@
|
||||
<v-card-text class="pa-0">
|
||||
<div class="mt-1">
|
||||
<!-- <div class="text-subtitle-2 mb-2">表单设置</div> -->
|
||||
<tpl-form-design :form="formObj.workflowForm" v-if="!loading"></tpl-form-design>
|
||||
<tpl-form-design ref="tplFormDesign" :form="formObj.workflowForm" v-if="!loading"></tpl-form-design>
|
||||
</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
@@ -125,6 +125,11 @@ Vue.component("workflow-editor-drawer", {
|
||||
step: 1
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
step(newVal, oldVal){
|
||||
console.log('step', newVal, oldVal);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
isMobile() {
|
||||
return window.innerWidth < 600;
|
||||
@@ -154,6 +159,7 @@ Vue.component("workflow-editor-drawer", {
|
||||
break;
|
||||
case 'createItem':
|
||||
await this.confirmCreateItemDialog();
|
||||
await this.prepareValidate();
|
||||
await this.prepareFormSubmitData();
|
||||
await this.doCreateItem();
|
||||
await this.syncUpdateFormObj();
|
||||
@@ -161,6 +167,7 @@ Vue.component("workflow-editor-drawer", {
|
||||
break;
|
||||
case 'updateItem':
|
||||
await this.confirmUpdateItemDialog();
|
||||
await this.prepareValidate();
|
||||
await this.prepareFormSubmitData();
|
||||
await this.doUpdateItem();
|
||||
await this.syncUpdateFormObj();
|
||||
@@ -258,7 +265,6 @@ Vue.component("workflow-editor-drawer", {
|
||||
},
|
||||
// -- <<<<<<<<<<<<< 获取数据 --------------------
|
||||
// -- constantObj 数据构建 >>>>>>>>>>> ---------------
|
||||
|
||||
buildConstantWorkflowConfig() {
|
||||
if (!this.formObj.workflowConfig) return;
|
||||
this.$refs.processFlow.doUiAction('complexModeInit');
|
||||
@@ -286,19 +292,23 @@ Vue.component("workflow-editor-drawer", {
|
||||
await this.prepareFormObj();
|
||||
this.hideLoading();
|
||||
},
|
||||
|
||||
hideLoading() {
|
||||
setTimeout(() => {
|
||||
this.loading = false;
|
||||
}, 300)
|
||||
},
|
||||
// TODO: 检验数据
|
||||
|
||||
prepareValidate(){
|
||||
const { id, workflowId, workflowInfo, workflowForm } = this.formObj;
|
||||
var submitAble = false
|
||||
// 判断info的数据
|
||||
// 判断form的数据
|
||||
|
||||
// 判断info的数据 ==>
|
||||
this.$refs.basicInfo.doUiAction('dataValidate')
|
||||
// 判断form的数据 ==> 判断单选多选是否有选项
|
||||
this.$refs.tplFormDesign.doUiAction('dataValidate')
|
||||
// 判断流程图的数据
|
||||
// 只允许在第一个节点设置条件节点
|
||||
// 不允许节点孤立
|
||||
this.$refs.processFlow.doUiAction('dataValidate')
|
||||
|
||||
},
|
||||
prepareFormSubmitData() {
|
||||
|
||||
Reference in new issue
Block a user