fix(测试跟踪): 模板管理用例等级字段支持添加选项值

--story=1009371 --user=宋昌昌 【Bug转需求】[项目设置]github#16821项目设置模板管理-模板字段:用例等级,系统自带的等级不能修改删除 https://www.tapd.cn/55049933/s/1301738
This commit is contained in:
song-cc-rock 2022-11-22 19:59:25 +08:00 committed by jianxing
parent 00b1b352e5
commit 53bd5b0f95
4 changed files with 11 additions and 1 deletions

View File

@ -616,6 +616,7 @@ const message = {
option_check: 'Please add option values', option_check: 'Please add option values',
option_value_check: 'Please fill in the full option values', option_value_check: 'Please fill in the full option values',
sync_issue_tips: 'Note: The system will automatically synchronize at 00:00:00 every day', sync_issue_tips: 'Note: The system will automatically synchronize at 00:00:00 every day',
case_priority_option_check_error: 'Use case levels need to add option values in order, for example: P',
}, },
workspace: { workspace: {
id: 'Workspace ID', id: 'Workspace ID',

View File

@ -622,6 +622,7 @@ const message = {
option_check: '请添加选项值', option_check: '请添加选项值',
option_value_check: '请填写完整选项值', option_value_check: '请填写完整选项值',
sync_issue_tips: '注: 系统在每天00:00:00会自动同步一次', sync_issue_tips: '注: 系统在每天00:00:00会自动同步一次',
case_priority_option_check_error: '用例等级需按照顺序添加选项值, 例: P',
}, },
workspace: { workspace: {
id: '工作空间ID', id: '工作空间ID',

View File

@ -619,6 +619,7 @@ const message = {
option_check: '請添加選項值', option_check: '請添加選項值',
option_value_check: '請填寫完整選項值', option_value_check: '請填寫完整選項值',
sync_issue_tips: '注系統在每天00:00:00會自動同步一次', sync_issue_tips: '注系統在每天00:00:00會自動同步一次',
case_priority_option_check_error: '用例等級需按照順序添加選項值, 例: P',
}, },
workspace: { workspace: {
id: '工作空間ID', id: '工作空間ID',

View File

@ -63,7 +63,6 @@
prop="options" :label-width="labelWidth"> prop="options" :label-width="labelWidth">
<ms-single-handle-drag <ms-single-handle-drag
:is-kv="form.scene === 'ISSUE'" :is-kv="form.scene === 'ISSUE'"
:disable="form.name === '用例等级'"
:data="form.options"/> :data="form.options"/>
</el-form-item> </el-form-item>
@ -178,6 +177,14 @@ export default {
this.$error("名称不能包含'.'号"); this.$error("名称不能包含'.'号");
return; return;
} }
if (this.form.name === i18n.t('custom_field.case_priority')) {
for (let i = 0; i < this.form.options.length; i++) {
if (this.form.options[i].text !== "P" + i) {
this.$warning(this.$t('custom_field.case_priority_option_check_error') + i);
return;
}
}
}
Object.assign(param, this.form); Object.assign(param, this.form);
param.projectId = getCurrentProjectID(); param.projectId = getCurrentProjectID();
if (['select', 'multipleSelect', 'radio', 'checkbox'].indexOf(param.type) > -1) { if (['select', 'multipleSelect', 'radio', 'checkbox'].indexOf(param.type) > -1) {