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"
|
<el-input size="mini" type="text"
|
||||||
class="text-item"
|
class="text-item"
|
||||||
:placeholder="$t('custom_field.field_text')"
|
:placeholder="$t('custom_field.field_text')"
|
||||||
v-if="editIndex === idx && isKv"
|
v-if="editIndex === idx"
|
||||||
@blur="handleTextEdit(element)"
|
@blur="handleTextEdit(element)"
|
||||||
v-model="element.text"/>
|
v-model="element.text"/>
|
||||||
<span class="text-item" v-else-if="isKv">
|
<span class="text-item" v-else>
|
||||||
<span v-if="element.system">
|
<span v-if="element.system">
|
||||||
({{$t(element.text)}})
|
{{$t(element.text)}}
|
||||||
</span>
|
</span>
|
||||||
<span v-else>
|
<span v-else>
|
||||||
{{element.text}}
|
{{element.text}}
|
||||||
|
@ -33,10 +33,10 @@
|
||||||
<el-input size="mini" type="value"
|
<el-input size="mini" type="value"
|
||||||
class="text-item"
|
class="text-item"
|
||||||
:placeholder="$t('custom_field.field_value')"
|
:placeholder="$t('custom_field.field_value')"
|
||||||
v-if="editIndex === idx"
|
v-if="editIndex === idx && isKv"
|
||||||
@blur="handleValueEdit(element)"
|
@blur="handleValueEdit(element)"
|
||||||
v-model="element.value"/>
|
v-model="element.value"/>
|
||||||
<span class="text-item" v-else>
|
<span class="text-item" v-else-if="isKv">
|
||||||
<span v-if="element.system">
|
<span v-if="element.system">
|
||||||
{{$t(element.text)}}
|
{{$t(element.text)}}
|
||||||
</span>
|
</span>
|
||||||
|
@ -59,6 +59,7 @@
|
||||||
<script>
|
<script>
|
||||||
import draggable from "vuedraggable";
|
import draggable from "vuedraggable";
|
||||||
import MsInstructionsIcon from "@/business/components/common/components/MsInstructionsIcon";
|
import MsInstructionsIcon from "@/business/components/common/components/MsInstructionsIcon";
|
||||||
|
import {getUUID} from "@/common/js/utils";
|
||||||
export default {
|
export default {
|
||||||
name: "MsSingleHandleDrag",
|
name: "MsSingleHandleDrag",
|
||||||
components: {
|
components: {
|
||||||
|
@ -111,24 +112,23 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add: function() {
|
add() {
|
||||||
let item = {
|
let item = {
|
||||||
text: "",
|
text: '',
|
||||||
value: ""
|
value: ''
|
||||||
};
|
};
|
||||||
|
if (!this.isKv) {
|
||||||
|
item.value = getUUID().substring(0, 8);
|
||||||
|
}
|
||||||
this.data.push(item);
|
this.data.push(item);
|
||||||
this.editIndex = this.data.length - 1;
|
this.editIndex = this.data.length - 1;
|
||||||
},
|
},
|
||||||
handleTextEdit(element) {
|
handleTextEdit() {
|
||||||
if (!this.isKv) {
|
if (!this.isKv) {
|
||||||
element.text = element.value;
|
|
||||||
this.editIndex = -1;
|
this.editIndex = -1;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleValueEdit(element) {
|
handleValueEdit(element) {
|
||||||
if (!this.isKv) {
|
|
||||||
element.text = element.value;
|
|
||||||
}
|
|
||||||
if (element.value && element.text) {
|
if (element.value && element.text) {
|
||||||
this.editIndex = -1;
|
this.editIndex = -1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,9 +221,23 @@ export default {
|
||||||
this.form.tags = [];
|
this.form.tags = [];
|
||||||
}
|
}
|
||||||
listenGoBack(this.close);
|
listenGoBack(this.close);
|
||||||
|
this.setEmptyStage();
|
||||||
this.dialogFormVisible = true;
|
this.dialogFormVisible = true;
|
||||||
this.reload();
|
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() {
|
testPlanInfo() {
|
||||||
this.$refs['planFrom'].validate((valid) => {
|
this.$refs['planFrom'].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
Loading…
Reference in New Issue