| | |
| | | @close="onClose"> |
| | | <slot></slot> |
| | | <template slot="footer"> |
| | | <el-button @click="visible = false" v-show="editAble">{{ $t('cancel') }}</el-button> |
| | | <el-button type="primary" @click="formSubmit()" v-preventReClick v-show="editAble && hasConfirm">{{ $t('confirm') }} |
| | | </el-button> <!-- 确定 --> |
| | | <el-button type="warning" @click="formSubmit()" v-show="stepMarker">提交 |
| | | <template v-if="stepMarker && stepMarker.indexOf('first')>0"> |
| | | <el-button type="warning" @click="formSubmit('zc')">暂存</el-button> |
| | | <el-button type="warning" @click="formSubmit('tj')" v-if="">提交 |
| | | </el-button> |
| | | <el-button type="warning" @click="formSubmit()" v-show="!stepMarker">保存 |
| | | </template> |
| | | <template v-else-if="stepMarker"> |
| | | <el-button type="warning" @click="formSubmit('zc')">暂存</el-button> |
| | | <el-button type="warning" @click="formSubmit('bl')">办理</el-button> |
| | | </template> |
| | | <el-button type="primary" @click="formSubmit('qd')" v-preventReClick v-else-if="editAble && hasConfirm">{{ |
| | | $t('confirm') }} |
| | | </el-button> |
| | | <el-button type="info" @click="close()" v-show="!editAble">{{ $t('close') }}</el-button> |
| | | <el-button type="warning" @click="formSubmit('bc')" v-else-if="editAble">保存 |
| | | </el-button> |
| | | <el-button @click="visible = false" v-if="editAble||stepMarker">{{ $t('cancel') }}</el-button> |
| | | <el-button type="info" @click="close()" v-else>{{ $t('close') }}</el-button> |
| | | |
| | | <slot name="footer"></slot> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | type: String, |
| | | default: '1' |
| | | }, |
| | | stepMarker:{ |
| | | |
| | | }, |
| | | stepMarker: {}, |
| | | appendToBody: { |
| | | type: Boolean, |
| | | default: false |
| | | }, |
| | | hasConfirm: { |
| | | type: Boolean, |
| | | default: true |
| | | default: false |
| | | }, |
| | | editAble: { |
| | | type: Boolean, |
| | |
| | | this.$parent.$refs.dataForm.resetFields() |
| | | } |
| | | |
| | | this.editAble = isView !== true // 是否可编辑 |
| | | // this.editAble = isView !== true // 是否可编辑 |
| | | |
| | | // 设置dialog父页面初始化表单 |
| | | this.$parent.dataForm = cloneDeep(this.dataFormBack) |
| | |
| | | this.open() |
| | | }, |
| | | // 表单提交 |
| | | formSubmit() { |
| | | formSubmit(submitType) { |
| | | let dataForm = this.$parent.$refs.dataForm |
| | | if (dataForm) { |
| | | dataForm.validate(async valid => { |
| | | if (valid) { |
| | | this.$emit('confirm') |
| | | this.$emit('confirm', submitType) |
| | | } else { |
| | | this.$nextTick(() => { |
| | | let isError = document.getElementsByClassName('is-error') |
| | |
| | | } |
| | | }) |
| | | } else { |
| | | this.$emit('confirm') |
| | | this.$emit('confirm', submitType) |
| | | } |
| | | }, |
| | | open() { |
| | |
| | | top:50% !important; |
| | | left: 50% !important; |
| | | transform: translate(-50%, -50%); |
| | | |
| | | .el-form > .el-form-item, .el-form .el-collapse-item__content > .el-form-item { |
| | | width: 50%; |
| | | float: left; |
| | |
| | | top:50% !important; |
| | | left: 50% !important; |
| | | transform: translate(-50%, -50%); |
| | | |
| | | .el-form > .el-form-item, .el-form .el-collapse-item__content > .el-form-item { |
| | | //width: 33.33333%; |
| | | float: left; |
| | |
| | | top:50% !important; |
| | | left: 50% !important; |
| | | transform: translate(-50%, -50%); |
| | | |
| | | .el-form > .el-form-item, .el-form .el-collapse-item__content > .el-form-item { |
| | | //width: 33.33333%; |
| | | float: left; |