diff --git a/frontend/src/models/projectManagement/environmental.ts b/frontend/src/models/projectManagement/environmental.ts index 07e12a9cd6..0f38b4b941 100644 --- a/frontend/src/models/projectManagement/environmental.ts +++ b/frontend/src/models/projectManagement/environmental.ts @@ -2,3 +2,15 @@ export interface EnvListItem { name: string; id: string; } + +export interface EnvGroupProjectListItem { + name: string; + env: string; + host: string; + description: string; +} +export interface EnvGroupListItem { + name: string; + id: string; + projectList: EnvGroupProjectListItem[]; +} diff --git a/frontend/src/store/modules/setting/useProjectEnvStore.ts b/frontend/src/store/modules/setting/useProjectEnvStore.ts index 8a00101887..8b03f1840e 100644 --- a/frontend/src/store/modules/setting/useProjectEnvStore.ts +++ b/frontend/src/store/modules/setting/useProjectEnvStore.ts @@ -1,5 +1,7 @@ import { defineStore } from 'pinia'; +import { EnvGroupListItem } from '@/models/projectManagement/environmental'; + export const ALL_PARAM = 'allParam'; const useProjectEnvStore = defineStore( @@ -7,8 +9,11 @@ const useProjectEnvStore = defineStore( () => { const currentId = ref(1); const httpNoWarning = ref(true); + const envGroupList = ref([]); + const getCurrentId = computed(() => currentId.value); const getHttpNoWarning = computed(() => httpNoWarning.value); + const getGroupLength = computed(() => 1); const getDatabaseList = computed(() => [{ id: 1, name: 'test' }]); function setCurrentId(id: string | number) { @@ -25,6 +30,8 @@ const useProjectEnvStore = defineStore( setHttpNoWarning, getHttpNoWarning, getDatabaseList, + envGroupList, + getGroupLength, }; }, { diff --git a/frontend/src/views/project-management/environmental/components/envGroup/EnvGroupBox.vue b/frontend/src/views/project-management/environmental/components/envGroup/EnvGroupBox.vue new file mode 100644 index 0000000000..3a820d77ba --- /dev/null +++ b/frontend/src/views/project-management/environmental/components/envGroup/EnvGroupBox.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/frontend/src/views/project-management/environmental/index.vue b/frontend/src/views/project-management/environmental/index.vue index 8334da4c52..269999d10b 100644 --- a/frontend/src/views/project-management/environmental/index.vue +++ b/frontend/src/views/project-management/environmental/index.vue @@ -7,50 +7,117 @@ {{ t('project.environmental.project') }} {{ t('project.environmental.projectGroup') }} - - -
- {{ t('project.environmental.allParam') }} -
-
- {{ t('project.environmental.allParam') }} -
- + +
@@ -119,6 +188,7 @@ import MsMoreAction from '@/components/pure/ms-table-more-action/index.vue'; import { ActionsItem } from '@/components/pure/ms-table-more-action/types'; import AllParamBox from './components/AllParamBox.vue'; + import EnvGroupBox from './components/envGroup/EnvGroupBox.vue'; import EnvParamBox from './components/envParams/EnvParamBox.vue'; import RenamePop from './components/RenamePop.vue'; @@ -189,6 +259,7 @@ default: break; } + console.log(item, id, scopeType); }; function changeShowType(value: string | number | boolean) { diff --git a/frontend/src/views/project-management/environmental/locale/zh-CN.ts b/frontend/src/views/project-management/environmental/locale/zh-CN.ts index 02ad0803b5..a99d167167 100644 --- a/frontend/src/views/project-management/environmental/locale/zh-CN.ts +++ b/frontend/src/views/project-management/environmental/locale/zh-CN.ts @@ -74,4 +74,9 @@ export default { 'project.environmental.host.hostNamePlaceholder': '请输入域名', 'project.environmental.host.desc': '描述', 'project.environmental.host.descPlaceholder': '请输入描述', + 'project.environmental.group.desc': '描述', + 'project.environmental.group.envGroup': '环境组', + 'project.environmental.group.envGroupName': '环境组名称', + 'project.environmental.group.envGroupNameIsRequire': '环境组名称不能为空', + 'project.environmental.group.envGroupPlaceholder': '请输入环境组', };