fix(测试跟踪): 系统配置的默认资源池不可用时,执行测试计划弹窗中资源池的下拉框设置为空
--bug=1026439 --user=宋天阳 【测试跟踪】测试计划之前保存的资源池被禁用后会显示成ID https://www.tapd.cn/55049933/s/1374332
This commit is contained in:
parent
b9844c40c1
commit
037d23b8e9
|
@ -304,6 +304,7 @@ export default {
|
||||||
getProjectApplication() {
|
getProjectApplication() {
|
||||||
getProjectConfig(getCurrentProjectID(), "").then((res) => {
|
getProjectConfig(getCurrentProjectID(), "").then((res) => {
|
||||||
let hasPool = false;
|
let hasPool = false;
|
||||||
|
//判断之前配置的资源池是否在可用资源池中
|
||||||
this.resourcePools.forEach((item) => {
|
this.resourcePools.forEach((item) => {
|
||||||
if (item.id === this.runConfig.resourcePoolId) {
|
if (item.id === this.runConfig.resourcePoolId) {
|
||||||
hasPool = true;
|
hasPool = true;
|
||||||
|
@ -311,9 +312,16 @@ export default {
|
||||||
});
|
});
|
||||||
if (!hasPool) {
|
if (!hasPool) {
|
||||||
if (res.data && res.data.poolEnable && res.data.resourcePoolId) {
|
if (res.data && res.data.poolEnable && res.data.resourcePoolId) {
|
||||||
this.runConfig.resourcePoolId = res.data.resourcePoolId;
|
//判断系统配置的默认资源池是否可用
|
||||||
|
this.resourcePools.forEach((item) => {
|
||||||
|
if (item.id === res.data.resourcePoolId) {
|
||||||
hasPool = true;
|
hasPool = true;
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
if (hasPool) {
|
||||||
|
this.runConfig.resourcePoolId = res.data.resourcePoolId;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!hasPool) {
|
if (!hasPool) {
|
||||||
this.runConfig.resourcePoolId = null;
|
this.runConfig.resourcePoolId = null;
|
||||||
|
|
Loading…
Reference in New Issue