fix(项目管理): 修复环境组不能添加多个项目环境的缺陷

--bug=1037601 --user=王孝刚 【项目管理】环境管理-环境组-新建环境组-不能添加多个项目环境
https://www.tapd.cn/55049933/s/1479453
This commit is contained in:
wxg0103 2024-03-22 19:26:00 +08:00 committed by Craftsman
parent d89d432f70
commit 54f7adf4f0
2 changed files with 5 additions and 2 deletions

View File

@ -740,7 +740,10 @@
emitChange('addTableLine addLineDisabled', isInit);
return;
}
if (rowIndex === paramsData.value.length - 1 && paramsData.value[rowIndex].key) {
if (
rowIndex === paramsData.value.length - 1 &&
(paramsData.value[rowIndex].key || paramsData.value[rowIndex].projectId)
) {
//
const id = new Date().getTime().toString();
paramsData.value.push({

View File

@ -560,7 +560,7 @@
store.setCurrentId(envList.value[0].id);
return;
}
const matchingItem = envList.value.find((item) => item.id === id);
const matchingItem = evnGroupList.value.find((item) => item.id === id);
const itemName = matchingItem ? matchingItem.name : null;
openModal({
type: 'error',