fix(测试跟踪): 公共用例库自定义字段责任人查看有误
--bug=1024436 --user=宋昌昌 【测试跟踪】公共用例库-查看,责任人为空 https://www.tapd.cn/55049933/s/1350590
This commit is contained in:
parent
dae7e3cf8f
commit
d3c2fba41b
|
@ -201,19 +201,14 @@ export default {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.projectId) {
|
if (this.projectId) {
|
||||||
getProjectMemberById(this.projectId).then((r) => {
|
getProjectMemberById(this.projectId)
|
||||||
this.memberOptions = r.data;
|
.then((r) => {
|
||||||
if (this.data.name === '责任人' && this.data.system && this.isTemplateEdit) {
|
this.handleMemberOptions(r.data);
|
||||||
this.memberOptions.unshift({id: 'CURRENT_USER', name: '创建人', email: ''});
|
});
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
} else {
|
||||||
getProjectMemberOption()
|
getProjectMemberOption()
|
||||||
.then((r) => {
|
.then((r) => {
|
||||||
this.memberOptions = r.data;
|
this.handleMemberOptions(r.data);
|
||||||
if (this.data.name === '责任人' && this.data.system && this.isTemplateEdit) {
|
|
||||||
this.memberOptions.unshift({id: 'CURRENT_USER', name: '创建人', email: ''});
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -223,6 +218,12 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleMemberOptions(data) {
|
||||||
|
this.memberOptions = data;
|
||||||
|
if (this.data.name === '责任人' && this.data.system && this.isTemplateEdit) {
|
||||||
|
this.memberOptions.unshift({id: 'CURRENT_USER', name: '创建人', email: ''});
|
||||||
|
}
|
||||||
|
},
|
||||||
clickPane(){
|
clickPane(){
|
||||||
this.$emit("onClick");
|
this.$emit("onClick");
|
||||||
},
|
},
|
||||||
|
|
|
@ -221,30 +221,23 @@ export default {
|
||||||
getMemberOptions() {
|
getMemberOptions() {
|
||||||
if (this.projectId) {
|
if (this.projectId) {
|
||||||
getProjectMemberById(this.projectId).then((r) => {
|
getProjectMemberById(this.projectId).then((r) => {
|
||||||
let tempMemberOptions = r.data || [];
|
this.handelMemberOptions(r.data);
|
||||||
let tempArr = [];
|
|
||||||
tempMemberOptions.forEach((e) => {
|
|
||||||
tempArr.push({
|
|
||||||
value: e.id,
|
|
||||||
text: e.name,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.memberOptions = tempArr;
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
getProjectMemberOption().then((r) => {
|
this.handelMemberOptions(r.data);
|
||||||
let tempMemberOptions = r.data || [];
|
|
||||||
let tempArr = [];
|
|
||||||
tempMemberOptions.forEach((e) => {
|
|
||||||
tempArr.push({
|
|
||||||
value: e.id,
|
|
||||||
text: e.name,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
this.memberOptions = tempArr;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handelMemberOptions(data) {
|
||||||
|
let tempMemberOptions = data || [];
|
||||||
|
let tempArr = [];
|
||||||
|
tempMemberOptions.forEach((e) => {
|
||||||
|
tempArr.push({
|
||||||
|
value: e.id,
|
||||||
|
text: e.name,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
this.memberOptions = tempArr;
|
||||||
|
},
|
||||||
getTranslateOption(item) {
|
getTranslateOption(item) {
|
||||||
if (!item) {
|
if (!item) {
|
||||||
return '';
|
return '';
|
||||||
|
|
Loading…
Reference in New Issue