| | |
| | | </el-form> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="rowSaveHandler">确 定</el-button> |
| | | <el-button @click="dialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="rowSaveHandler">确 定</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | dialogData: [], |
| | | dialogOption: { |
| | | ...basicOption, |
| | | calcHeight: 50, |
| | | refreshBtn: false, |
| | | selection: false, |
| | | column: [ |
| | |
| | | row, |
| | | this.$refs.userCrud, |
| | | this.lastIndex, |
| | | (newIndex) => { this.lastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectList = []; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | |
| | | |
| | | // 对话框枚举保存 |
| | | rowSaveHandler() { |
| | | const lengthStatus = this.dialogData.some(item => item.value.length > this.form.length) |
| | | const lengthStatus = this.dialogData.some(item => item.value.length > this.form.length); |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | if (lengthStatus) { |
| | | this.$message.error('请检查枚举值是否超过最大长度!') |
| | | return; |
| | |
| | | } |
| | | }) |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // 枚举项新增 |