| | |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 第二层对话框,参照配置组件 --> |
| | | <refer-config-dialog |
| | | ref="referConfigDialog" |
| | | <!-- 第二层对话框,自定义参照配置Form组件 --> |
| | | <refer-config-form-dialog |
| | | ref="referConfigFormDialog" |
| | | @echoReferConfig="echoReferConfig" > |
| | | </refer-config-dialog> |
| | | </refer-config-form-dialog> |
| | | <!-- 第二层对话框,直接选择参照配置curd组件 --> |
| | | <refer-config-crud-dialog |
| | | ref="referConfigCrudDialog"> |
| | | </refer-config-crud-dialog> |
| | | |
| | | </el-dialog> |
| | | |
| | |
| | | echoReferConfig(content){ |
| | | this.form.referBtmId = content.referType; |
| | | this.form.referBtmName = content.referTypeName; |
| | | //console.log(content); |
| | | //转换成JSON字符串进行父组件回显 |
| | | let submitFormJson = JSON.stringify(content); |
| | | this.form.referConfig = submitFormJson; |
| | |
| | | this.isShowSelectReferBtmOption = true; |
| | | this.refreshReferBtmDataChange(); |
| | | }else if(condition === 'referConfig'){ |
| | | this.$refs.referConfigDialog.isShowReferConfig = true; |
| | | if(func.notEmpty(this.form.referConfig)){ |
| | | this.$refs.referConfigDialog.initPageData(this.form.referConfig); |
| | | if(func.notEmpty(this.form.referConfig) || func.notEmpty(this.form.referBtmName)){ |
| | | this.$refs.referConfigFormDialog.isShowReferConfig = true; |
| | | let value = { |
| | | referTypeName: this.form.referBtmName, |
| | | referType: this.form.referBtmId, |
| | | referConfig: this.form.referConfig, |
| | | } |
| | | this.$refs.referConfigFormDialog.initPageData(value); |
| | | }else{ |
| | | this.openTipsChooseOrCust(); |
| | | } |
| | | //表格错行的问题所 |
| | | this.$refs.referConfigDialog.onloadAttrData(); |
| | | //this.$refs.referConfigFormDialog.onloadAttrData(); |
| | | } |
| | | }, |
| | | // 打开自定义参照配置或直接选择参照配置界面 |
| | | openTipsChooseOrCust(){ |
| | | this.$confirm('请选择参照配置的定义方式?','参照配置的方式', { |
| | | distinguishCancelAndClose: true, |
| | | closeOnClickModal: false, |
| | | confirmButtonText: '自定义参照配置', |
| | | cancelButtonText: '直接选择参照配置' |
| | | }) |
| | | .then(() => { |
| | | // 打开自定参照配置对话框 |
| | | this.$refs.referConfigFormDialog.isShowReferConfigForm = true; |
| | | // 表格错行的问题 |
| | | this.$refs.referConfigFormDialog.onloadAttrData(); |
| | | }) |
| | | .catch(action => { |
| | | if (action === "cancel") { |
| | | // 打开直接选择参照配置对话框 |
| | | this.$refs.referConfigCrudDialog.isShowReferConfigCrud = true; |
| | | this.$refs.referConfigCrudDialog.referConfigOnload(); |
| | | } |
| | | //console.log(action); |
| | | }); |
| | | // 让参照配置输入框失去焦点,否则该提示框无法被关闭 |
| | | this.$refs.referConfig.$el.querySelector('input').blur(); |
| | | }, |
| | | |
| | | // 点击输入框的×号,清空输入框中的内容 |
| | | clearAttrDataByIcon(condition){ |
| | | if(condition === 'attr'){ |