| | |
| | | {pattern: /^[A-Za-z]+$/, message: '业务类型编号只能为英文', trigger: 'blur'}, |
| | | {min: 2, max: 20, message: '长度在2到20个字符', trigger: 'blur'} |
| | | ], |
| | | name: [ |
| | | {required: true, message: '请输入业务类型中文名称', trigger: 'blur'} |
| | | ], |
| | | domain: [ |
| | | {required: true, message: '请选择所属领域', trigger: 'blur'} |
| | | ] |
| | |
| | | // 添加业务类型 |
| | | submitBtmType() { |
| | | console.log(this.btmType); |
| | | if (!this.btmType.attributes){ |
| | | this.$message.warning("还没有为业务类型选择属性"); |
| | | return; |
| | | }else{ |
| | | let nullFlag = false; |
| | | this.btmType.attributes.forEach(item => { |
| | | if (!item.name){ |
| | | this.$message.warning("第" + (item.$index+1) + "行的中文名称不能为空"); |
| | | nullFlag = true; |
| | | return; |
| | | } |
| | | }) |
| | | if (nullFlag){ |
| | | return; |
| | | } |
| | | |
| | | } |
| | | add(this.btmType, true).then(res => { |
| | | // 添加完成,回调父组件的刷新 |
| | | this.$message.success('保存成功'); |