文件名从 Source/plt-web/plt-web-ui/src/components/actions/AddEditDialog.vue 修改 |
| | |
| | | top="0" |
| | | class="avue-dialog" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | @close="dialogClose"> |
| | | <basic-form ref="formRef" v-if="paramVOS.form" |
| | | :key="'dialog-'+paramVOS.form" |
| | |
| | | |
| | | <script> |
| | | import uiView from "@/views/base/UIContentViewerInDialog" |
| | | import {parseEventByUrl} from "@/components/actions/base/BaseAction" |
| | | import {parseEventByUrl} from "@/components/actions/BaseAction" |
| | | import {getFormDefineById,dataForm} from "@/api/base/ui"; |
| | | import {addSave,editSave} from "@/api/base/actions" |
| | | import {validatenull} from "@/util/validate" |
| | |
| | | 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(); |
| | | } |
| | |
| | | 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 |
| | | }, that.formSaveHandle); |
| | | }) |
| | | } catch (error) { |
| | | this.$message.error('鏈壘鍒颁繚瀛樺墠缃簨浠舵墽琛宩s'); |
| | | } |
| | | } |
| | | } 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('鏈壘鍒颁繚瀛樺悗缃簨浠舵墽琛宩s'); |
| | | } |
| | | } |
| | | } |
| | | that.dialogClose(); |
| | | }); |
| | |
| | | } |
| | | 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(); |
| | | }); |
| | |
| | | }, |
| | | getFormData(form) { |
| | | this.form = form; |
| | | } |
| | | }, |
| | | //淇濆瓨鍓嶇疆浜嬩欢 |
| | | saveBforeHandle(params){ |
| | | this.$message.info('鎵ц淇濆瓨鍓嶇疆浜嬩欢'); |
| | | }, |
| | | //淇濆瓨鍚庣疆浜嬩欢 |
| | | saveAfterHandle(params){ |
| | | this.$message.info('淇濆瓨鍚庣疆浜嬩欢鎵ц'); |
| | | }, |
| | | } |
| | | } |
| | | </script> |