fix(测试跟踪): 批量编辑标签未选择追加标签无法保存

--bug=1014990 --user=李玉号 【测试跟踪】功能用例-批量编辑用例-属性-标签-不追加标签保存失败-提示请选择属性对应的值
https://www.tapd.cn/55049933/s/1204091
This commit is contained in:
shiziyuan9527 2022-07-19 15:01:03 +08:00 committed by shiziyuan9527
parent d27f7fb0ac
commit b66ef0c30e
2 changed files with 17 additions and 12 deletions

View File

@ -20,8 +20,8 @@
<el-form-item v-else-if="form.type === 'tags'" :label="$t('test_track.case.updated_attr_value')">
<ms-input-tag :currentScenario="form" v-if="showInputTag" ref="tag" class="ms-case-input"></ms-input-tag>
<el-checkbox v-model="form.appendTag">
追加标签
<el-tooltip class="item" effect="dark" content="勾选:新增标签;不勾选:覆盖原有标签;" placement="top">
{{ $t('commons.append_tag') }}
<el-tooltip class="item" effect="dark" :content="$t('commons.append_tag_tip')" placement="top">
<i class="el-icon-info"></i>
</el-tooltip>
</el-checkbox>
@ -46,11 +46,11 @@
</template>
<script>
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
import {listenGoBack, removeGoBackListener} from "@/common/js/utils";
import MsInputTag from "@/business/components/api/automation/scenario/MsInputTag";
import MsDialogFooter from "../../../../common/components/MsDialogFooter";
import {listenGoBack, removeGoBackListener} from "@/common/js/utils";
import MsInputTag from "@/business/components/api/automation/scenario/MsInputTag";
export default {
export default {
name: "BatchEdit",
components: {
MsDialogFooter,

View File

@ -30,11 +30,7 @@
ref="envPopover"/>
</el-form-item>
<el-form-item v-else-if="fieldType === 'custom'" prop="customFieldValue" :label="$t('test_track.case.updated_attr_value')">
<custom-filed-component :data="customField" prop="defaultValue"/>
</el-form-item>
<el-form-item v-else-if="form.type === 'tags'" prop="tags" :label="$t('test_track.case.updated_attr_value')">
<el-form-item v-else-if="form.type === 'tags'" :label="$t('test_track.case.updated_attr_value')">
<ms-input-tag :currentScenario="form" v-if="showInputTag" ref="tag" class="ms-case-input"></ms-input-tag>
<el-checkbox v-model="form.appendTag">
{{ $t('commons.append_tag') }}
@ -44,6 +40,10 @@
</el-checkbox>
</el-form-item>
<el-form-item v-else-if="fieldType === 'custom'" prop="customFieldValue" :label="$t('test_track.case.updated_attr_value')">
<custom-filed-component :data="customField" prop="defaultValue"/>
</el-form-item>
<el-form-item v-else :label="$t('test_track.case.updated_attr_value')" prop="value">
<el-select v-model="form.value" style="width: 100%" :filterable="filterable">
<el-option v-for="(option, index) in options" :key="index" :value="option.id" :label="option.name">
@ -214,7 +214,12 @@ export default {
if (val && val.startsWith("custom")) {
this._handleCustomField(val);
}
this.$set(this.form, "value", "");
if (val === 'tags') {
// form rules
this.$set(this.form, "value", "tags");
} else {
this.$set(this.form, "value", "");
}
if (val === 'projectEnv' && this.isScenario !== '') {
this.projectIds.clear();
this.map.clear();