From 9bb6bced3110dc1ac2c0744078f225f99d70ac2c Mon Sep 17 00:00:00 2001
From: dangsn <dangsn@chicecm.com>
Date: 星期五, 21 六月 2024 17:36:09 +0800
Subject: [PATCH] 调整流程启动和流程执行
---
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