fix(测试跟踪): 测试阶段选项修改测试计划列表没有跟着修改
--bug=1010840 --user=陈建星 【测试跟踪】github#11140 MS 上自定义字段(测试阶段)—更新已有的测试阶段描述信息后,测试计划那边原先创建的阶段计划信息丢失 https://www.tapd.cn/55049933/s/1179747
This commit is contained in:
parent
c9eeb2c982
commit
5daa6a837b
|
@ -18,12 +18,12 @@
|
|||
<el-input size="mini" type="text"
|
||||
class="text-item"
|
||||
:placeholder="$t('custom_field.field_text')"
|
||||
v-if="editIndex === idx && isKv"
|
||||
v-if="editIndex === idx"
|
||||
@blur="handleTextEdit(element)"
|
||||
v-model="element.text"/>
|
||||
<span class="text-item" v-else-if="isKv">
|
||||
<span class="text-item" v-else>
|
||||
<span v-if="element.system">
|
||||
({{$t(element.text)}})
|
||||
{{$t(element.text)}}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{element.text}}
|
||||
|
@ -33,10 +33,10 @@
|
|||
<el-input size="mini" type="value"
|
||||
class="text-item"
|
||||
:placeholder="$t('custom_field.field_value')"
|
||||
v-if="editIndex === idx"
|
||||
v-if="editIndex === idx && isKv"
|
||||
@blur="handleValueEdit(element)"
|
||||
v-model="element.value"/>
|
||||
<span class="text-item" v-else>
|
||||
<span class="text-item" v-else-if="isKv">
|
||||
<span v-if="element.system">
|
||||
{{$t(element.text)}}
|
||||
</span>
|
||||
|
@ -59,6 +59,7 @@
|
|||
<script>
|
||||
import draggable from "vuedraggable";
|
||||
import MsInstructionsIcon from "@/business/components/common/components/MsInstructionsIcon";
|
||||
import {getUUID} from "@/common/js/utils";
|
||||
export default {
|
||||
name: "MsSingleHandleDrag",
|
||||
components: {
|
||||
|
@ -111,24 +112,23 @@ export default {
|
|||
|
||||
},
|
||||
methods: {
|
||||
add: function() {
|
||||
add() {
|
||||
let item = {
|
||||
text: "",
|
||||
value: ""
|
||||
text: '',
|
||||
value: ''
|
||||
};
|
||||
if (!this.isKv) {
|
||||
item.value = getUUID().substring(0, 8);
|
||||
}
|
||||
this.data.push(item);
|
||||
this.editIndex = this.data.length - 1;
|
||||
},
|
||||
handleTextEdit(element) {
|
||||
handleTextEdit() {
|
||||
if (!this.isKv) {
|
||||
element.text = element.value;
|
||||
this.editIndex = -1;
|
||||
}
|
||||
},
|
||||
handleValueEdit(element) {
|
||||
if (!this.isKv) {
|
||||
element.text = element.value;
|
||||
}
|
||||
if (element.value && element.text) {
|
||||
this.editIndex = -1;
|
||||
}
|
||||
|
|
|
@ -221,9 +221,23 @@ export default {
|
|||
this.form.tags = [];
|
||||
}
|
||||
listenGoBack(this.close);
|
||||
this.setEmptyStage();
|
||||
this.dialogFormVisible = true;
|
||||
this.reload();
|
||||
},
|
||||
setEmptyStage() {
|
||||
// 如果测试阶段选项中没有当前值,则置空
|
||||
let hasOptions = false;
|
||||
this.stageOption.forEach(item => {
|
||||
if (item.value === this.form.stage) {
|
||||
hasOptions = true;
|
||||
return;
|
||||
}
|
||||
});
|
||||
if (!hasOptions) {
|
||||
this.form.stage = '';
|
||||
}
|
||||
},
|
||||
testPlanInfo() {
|
||||
this.$refs['planFrom'].validate((valid) => {
|
||||
if (valid) {
|
||||
|
|
Loading…
Reference in New Issue