| | |
| | | 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('未找到保存前置事件执行js'); |
| | | } |
| | | } |
| | | } else { |
| | | this.formSaveHandle(); |
| | | } |
| | |
| | | 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('未找到保存前置事件执行js'); |
| | | } |
| | | } |
| | | } else { |
| | | that.formSaveHandle(); |
| | | } |
| | |
| | | } |
| | | 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('未找到保存后置事件执行js'); |
| | | } |
| | | } |
| | | } |
| | | that.dialogClose(); |
| | | }); |
| | |
| | | }, |
| | | getFormData(form) { |
| | | this.form = form; |
| | | } |
| | | }, |
| | | //保存前置事件 |
| | | saveBforeHandle(params){ |
| | | this.$message.info('执行保存前置事件'); |
| | | }, |
| | | //保存后置事件 |
| | | saveAfterHandle(params){ |
| | | this.$message.info('保存后置事件执行'); |
| | | }, |
| | | } |
| | | } |
| | | </script> |