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>
<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> <version-create-other-info-select @confirmOtherInfo="confirmOtherInfo" ref="selectPropDialog"></version-create-other-info-select>
</div> </div>
</el-card> </el-card>
@ -237,6 +245,8 @@ export default {
result: {}, result: {},
dialogFormVisible: false, dialogFormVisible: false,
showFollow: false, showFollow: false,
isValidate:false,
currentValidateName:"",
form: { form: {
name: '', name: '',
module: 'default-module', module: 'default-module',
@ -992,6 +1002,17 @@ export default {
this.$refs['customFieldForm'].validate((valid) => { this.$refs['customFieldForm'].validate((valid) => {
if (!valid) { if (!valid) {
isValidate = false; 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; return false;
} }
}); });