From c061998c347b0735c8a1db8d2e191de050caf7e8 Mon Sep 17 00:00:00 2001 From: wangting <675591594@qq.com> Date: 星期五, 14 六月 2024 15:21:36 +0800 Subject: [PATCH] 启动流程action --- Source/plt-web/plt-web-ui/src/components/actions/base/RevisionDialog.vue | 85 +++++++++++++++++++++++++++++++----------- 1 files changed, 63 insertions(+), 22 deletions(-) diff --git a/Source/plt-web/plt-web-ui/src/components/actions/base/RevisionDialog.vue b/Source/plt-web/plt-web-ui/src/components/actions/base/RevisionDialog.vue index 5469dc2..8cc6c6a 100644 --- a/Source/plt-web/plt-web-ui/src/components/actions/base/RevisionDialog.vue +++ b/Source/plt-web/plt-web-ui/src/components/actions/base/RevisionDialog.vue @@ -175,13 +175,24 @@ this.formDefineId=this.$refs.uiViewRef.data[key].DefineVO.id; if (this.paramVOS.savebeforeevent) { var urlobj = parseEventByUrl(this.paramVOS.savebeforeevent,null,null,'doAction'); - import(`./${urlobj.jsPath}.js`).then(module => { - module[urlobj.methodName]({ - paramVOS: this.paramVOS, - dataStore: this.dataStore, - sourceData:this.sourceData - },this.formSaveHandle); - }) + if(urlobj.params){ + Object.assign(this.paramVOS,urlobj.params); + } + if(validatenull(urlobj.jsPath)){ + this.saveBforeHandle(this.paramVOS); + }else{ + try { + import(`./${urlobj.jsPath}.js`).then(module => { + module[urlobj.methodName]({ + paramVOS: this.paramVOS, + dataStore: this.dataStore, + sourceData:this.sourceData + },this.formSaveHandle); + }) + } catch (error) { + this.$message.error('鏈壘鍒颁繚瀛樺墠缃簨浠舵墽琛宩s'); + } + } } else { this.formSaveHandle(); } @@ -196,13 +207,24 @@ this.formDefineId=this.paramVOS.form; if (this.paramVOS.savebeforeevent) { var urlobj = parseEventByUrl(this.paramVOS.savebeforeevent,null,null,'doAction'); - import(`./${urlobj.jsPath}.js`).then(module => { - module[urlobj.methodName]({ - paramVOS: this.paramVOS, - dataStore: this.dataStore, - sourceData:this.sourceData - },that.formSaveHandle); - }) + if(urlobj.params){ + Object.assign(this.paramVOS,urlobj.params); + } + if(validatenull(urlobj.jsPath)){ + this.saveBforeHandle(this.paramVOS); + }else{ + try { + import(`./${urlobj.jsPath}.js`).then(module => { + module[urlobj.methodName]({ + paramVOS: this.paramVOS, + dataStore: this.dataStore, + sourceData:this.sourceData + },this.formSaveHandle); + }) + } catch (error) { + this.$message.error('鏈壘鍒颁繚瀛樺墠缃簨浠舵墽琛宩s'); + } + } } else { that.formSaveHandle(); } @@ -243,13 +265,24 @@ } if (this.paramVOS.saveafterevent) { let urlobj = parseEventByUrl(this.paramVOS.saveafterevent,null,null,'doAction'); - import(`./${urlobj.jsPath}.js`).then(module => { - module[urlobj.methodName]({ - paramVOS: this.paramVOS, - dataStore: this.dataStore, - sourceData:this.sourceData - }); - }) + if(urlobj.params){ + Object.assign(this.paramVOS,urlobj.params); + } + if(validatenull(urlobj.jsPath)){ + this.saveAfterHandle(this.paramVOS); + }else{ + try { + import(`./${urlobj.jsPath}.js`).then(module => { + module[urlobj.methodName]({ + paramVOS: this.paramVOS, + dataStore: this.dataStore, + sourceData:this.sourceData + }); + }) + } catch (error) { + this.$message.error('鏈壘鍒颁繚瀛樺悗缃簨浠舵墽琛宩s'); + } + } } that.dialogClose(); }); @@ -275,7 +308,15 @@ }, getFormData(form) { this.form = form; - } + }, + //淇濆瓨鍓嶇疆浜嬩欢 + saveBforeHandle(params){ + this.$message.info('鎵ц淇濆瓨鍓嶇疆浜嬩欢'); + }, + //淇濆瓨鍚庣疆浜嬩欢 + saveAfterHandle(params){ + this.$message.info('淇濆瓨鍚庣疆浜嬩欢鎵ц'); + }, } } </script> -- Gitblit v1.9.3