fix(测试跟踪): 功能用例必填值加弹窗提示

--bug=1009922--user=郭雨琦
【ID1009922】【测试跟踪】-选择较早版本的用例-新建版本时因为该用例状态为空导致新建版本失败,失败的提示信息不明显
This commit is contained in:
guoyuqi 2022-01-26 19:02:08 +08:00 committed by xiaomeinvG
parent 332fb57dfd
commit 6ee6a530c2
1 changed files with 21 additions and 0 deletions

View File

@ -155,6 +155,14 @@
</el-dialog>
<el-dialog
:visible.sync="isValidate"
:destroy-on-close="true"
:title="$t('commons.prompt')"
>
<span>{{currentValidateName+$t('commons.cannot_be_null')}}</span>
</el-dialog>
<version-create-other-info-select @confirmOtherInfo="confirmOtherInfo" ref="selectPropDialog"></version-create-other-info-select>
</div>
</el-card>
@ -237,6 +245,8 @@ export default {
result: {},
dialogFormVisible: false,
showFollow: false,
isValidate:false,
currentValidateName:"",
form: {
name: '',
module: 'default-module',
@ -992,6 +1002,17 @@ export default {
this.$refs['customFieldForm'].validate((valid) => {
if (!valid) {
isValidate = false;
for (let i = 0; i < this.$refs['customFieldForm'].fields.length; i++) {
let customField = this.$refs['customFieldForm'].fields[i];
if(customField.validateState==='error'){
if(this.currentValidateName){
this.currentValidateName = this.currentValidateName+","+customField.label
}else{
this.currentValidateName = customField.label
}
}
}
this.isValidate = true;
return false;
}
});