fix(测试跟踪): 系统配置的默认资源池不可用时,执行测试计划弹窗中资源池的下拉框设置为空

--bug=1026439 --user=宋天阳 【测试跟踪】测试计划之前保存的资源池被禁用后会显示成ID
https://www.tapd.cn/55049933/s/1374332
This commit is contained in:
song-tianyang 2023-05-23 13:51:51 +08:00 committed by 建国
parent b9844c40c1
commit 037d23b8e9

View File

@ -304,6 +304,7 @@ export default {
getProjectApplication() {
getProjectConfig(getCurrentProjectID(), "").then((res) => {
let hasPool = false;
//
this.resourcePools.forEach((item) => {
if (item.id === this.runConfig.resourcePoolId) {
hasPool = true;
@ -311,8 +312,15 @@ export default {
});
if (!hasPool) {
if (res.data && res.data.poolEnable && res.data.resourcePoolId) {
this.runConfig.resourcePoolId = res.data.resourcePoolId;
hasPool = true;
//
this.resourcePools.forEach((item) => {
if (item.id === res.data.resourcePoolId) {
hasPool = true;
}
});
if (hasPool) {
this.runConfig.resourcePoolId = res.data.resourcePoolId;
}
}
}
if (!hasPool) {