| | |
| | | <template> |
| | | <el-dialog v-dialogDrag |
| | | :append-to-body="true" |
| | | :close-on-click-modal="false" |
| | | :destroy-on-close="true" |
| | | :fullscreen="fullscreen" |
| | | :title="title" |
| | | :visible.sync="visible" |
| | | :width="width" |
| | | :fullscreen="fullscreen" |
| | | :append-to-body="true" |
| | | top="0" |
| | | class="avue-dialog" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | top="0" |
| | | @close="dialogClose"> |
| | | <basic-form ref="formRef" v-if="paramVOS.form" |
| | | :key="'dialog-'+paramVOS.form" |
| | | <basic-form v-if="paramVOS.form" :key="'dialog-'+paramVOS.form" |
| | | ref="formRef" |
| | | v-loading="loading" |
| | | :formData="form" |
| | | :formItems="formItems" |
| | | :initValue="paramVOS.initvalue" |
| | | :isEdit="true" |
| | | :span="span" |
| | | :style="fullscreen?'':'height:'+height" |
| | | :isEdit="true" |
| | | :formItems="formItems" |
| | | :formData="form" |
| | | :initValue="paramVOS.initvalue" |
| | | :uploadattachment="paramVOS.uploadattachment || false" |
| | | @getFormData="getFormData"> |
| | | </basic-form> |
| | | <ui-view ref="uiViewRef" v-else-if="paramVOS.context" |
| | | :key="'AddEditDialog-'+type" |
| | | :style="fullscreen?'':'height:'+height" |
| | | :btmType="paramVOS.type" |
| | | :context="paramVOS.context" |
| | | :inDialog="true" |
| | | :canEdit="true" |
| | | <ui-view v-else-if="paramVOS.context" :key="'AddEditDialog-'+type" |
| | | ref="uiViewRef" |
| | | :actionType="type" |
| | | :sourceData="sourceData" |
| | | :btmType="paramVOS.type" |
| | | :canEdit="true" |
| | | :context="paramVOS.context" |
| | | :dataStore="dataStore" |
| | | :inDialog="true" |
| | | :paramVOS="paramVOS" |
| | | :sourceData="sourceData" |
| | | :style="fullscreen?'':'height:'+height" |
| | | @getFormData="getFormData" |
| | | ></ui-view> |
| | | <div v-if="showSave" class="dialog-footer avue-dialog__footer"> |
| | | <el-button type="primary" plain size="small" @click="formSave" v-if="paramVOS.form">保 存</el-button> |
| | | <el-button type="primary" plain size="small" @click="contextSave" v-else>保 存</el-button> |
| | | <el-button v-if="paramVOS.form" plain size="small" type="primary" @click="formSave">保 存</el-button> |
| | | <el-button v-else plain size="small" type="primary" @click="contextSave">保 存</el-button> |
| | | <el-button size="small" @click="dialogClose">取 消</el-button> |
| | | <el-button size="small" @click="resetValue" v-if="paramVOS.form">重 置</el-button> |
| | | <el-button v-if="paramVOS.form" size="small" @click="resetValue">重 置</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </template> |
| | |
| | | }, |
| | | data(){ |
| | | return { |
| | | loading: false, |
| | | type:"add", |
| | | visible:false, |
| | | showSave:this.paramVOS.customBtn || true, |
| | |
| | | formDefineId: this.paramVOS.form, |
| | | oid: this.dataStore[0].oid |
| | | }, sourceDataMap), this.paramVOS.getdataurl, this.paramVOS.getdatamethod).then(res => { |
| | | this.form=res.data.obj; |
| | | this.form = res.data.obj.data; |
| | | this.loading = false; |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | this.loading = false; |
| | | }) |
| | | } |
| | | this.loading = false; |
| | | }).catch(error => { |
| | | this.$message.error(error); |
| | | this.loading = false; |