| | |
| | | :formItems="formItems" |
| | | :formData="form" |
| | | :initValue="paramVOS.initvalue" |
| | | :uploadattachment="paramVOS.uploadattachment || false" |
| | | @getFormData="getFormData"> |
| | | </basic-form> |
| | | <ui-view ref="uiViewRef" v-else-if="paramVOS.context" |
| | |
| | | :context="paramVOS.context" |
| | | :inDialog="true" |
| | | :canEdit="true" |
| | | :actionType="type" |
| | | :sourceData="sourceData" |
| | | :dataStore="dataStore" |
| | | :paramVOS="paramVOS" |
| | |
| | | |
| | | <script> |
| | | import uiView from "@/views/base/UIContentViewerInDialog" |
| | | import {parseEventByUrl} from "@/actions/base/BaseAction" |
| | | import {parseEventByUrl} from "@/components/actions/base/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 => { |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | |
| | | this.formDefineId=this.paramVOS.form; |
| | | if (this.paramVOS.savebeforeevent) { |
| | | var urlobj = parseEventByUrl(this.paramVOS.savebeforeevent,null,null,'doAction'); |
| | | import("../"+urlobj.jsPath+".js").then(module => { |
| | | import(`./${urlobj.jsPath}.js`).then(module => { |
| | | module[urlobj.methodName]({ |
| | | paramVOS: this.paramVOS, |
| | | dataStore: this.dataStore, |
| | |
| | | addSave(datas,that.paramVOS.url,that.paramVOS.method).then(() => { |
| | | that.$message({ |
| | | type: "success", |
| | | message: "保存成功!" |
| | | message: that.paramVOS.successmsg||"保存成功!" |
| | | }); |
| | | if(that.saveCallback){ |
| | | that.saveCallback(that.type,that.form); |
| | | } |
| | | 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 |
| | | }); |
| | | }) |
| | | } |
| | | that.dialogClose(); |
| | | }); |
| | | }else{ |
| | | editSave(that.form,that.paramVOS.url,that.paramVOS.method).then(() => { |
| | | editSave(datas,that.paramVOS.url,that.paramVOS.method).then(() => { |
| | | that.$message({ |
| | | type: "success", |
| | | message: "修改成功!" |
| | | message: that.paramVOS.successmsg||"修改成功!" |
| | | }); |
| | | if(that.saveCallback){ |
| | | that.saveCallback(that.type,that.form); |
| | | } |
| | | 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 |
| | | }); |
| | | }) |
| | | } |
| | | that.dialogClose(); |
| | | }); |
| | | } |