diff --git a/src/pages/src/components/layouts/MainBreadcrumbsDetails.vue b/src/pages/src/components/layouts/MainBreadcrumbsDetails.vue index 029af7230..077b0714a 100644 --- a/src/pages/src/components/layouts/MainBreadcrumbsDetails.vue +++ b/src/pages/src/components/layouts/MainBreadcrumbsDetails.vue @@ -21,8 +21,8 @@ diff --git a/src/pages/src/http/authSourceFiles.ts b/src/pages/src/http/authSourceFiles.ts new file mode 100644 index 000000000..ccef32e9b --- /dev/null +++ b/src/pages/src/http/authSourceFiles.ts @@ -0,0 +1,24 @@ +import http from './fetch'; +import type { + NewIdpsParams, +} from './types/authSourceFiles'; + +/** + * 认证源列表 + */ +export const getIdps = (keyword: string) => http.get(`/api/v1/web/idps/?keyword=${keyword}`); + +/** + * 认证源插件列表 + */ +export const getIdpsPlugins = () => http.get('/api/v1/web/idps/plugins/'); + +/** + * 新建认证源 + */ +export const postIdps = (params: NewIdpsParams) => http.post('/api/v1/web/idps/plugins/', params); + +/** + * 认证源详情 + */ +export const getIdpsDetails = (id: string) => http.get(`/api/v1/web/idps/${id}/`); diff --git a/src/pages/src/http/types/authSourceFiles.ts b/src/pages/src/http/types/authSourceFiles.ts new file mode 100644 index 000000000..8a8e490f0 --- /dev/null +++ b/src/pages/src/http/types/authSourceFiles.ts @@ -0,0 +1,15 @@ +/** + * 新建认证源参数 + */ +export interface NewIdpsParams { + name: string, + plugin_id: string, + plugin_config: {}, + data_source_match_rules?: { + data_source_id: number, + field_compare_rules: { + source_field: string, + target_field: string, + }[], + }[], +} diff --git a/src/pages/src/images/wecom.svg b/src/pages/src/images/wecom.svg new file mode 100644 index 000000000..02a95b6d3 --- /dev/null +++ b/src/pages/src/images/wecom.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/pages/src/router/index.ts b/src/pages/src/router/index.ts index f9871508e..19d4c0e00 100644 --- a/src/pages/src/router/index.ts +++ b/src/pages/src/router/index.ts @@ -118,15 +118,40 @@ export default createRouter({ { path: '/auth-source', name: 'authSource', - component: () => import('@/views/auth-source/index.vue'), - }, - { - path: '/auth-source/new', - name: 'newAuthSource', meta: { - navName: '新建认证源', + navName: '认证源管理', }, - component: () => import('@/views/auth-source/new-data/NewConfig.vue'), + component: () => import('@/views/auth-source/index.vue'), + children: [ + { + path: '', + name: 'authSourceList', + meta: { + routeParentName: 'authSource', + navName: '认证源管理', + }, + component: () => import('@/views/auth-source/List.vue'), + }, + { + path: 'new', + name: 'newAuthSource', + meta: { + routeParentName: 'authSource', + navName: '新建认证源', + }, + component: () => import('@/views/auth-source/new-data/index.vue'), + }, + { + path: 'edit/:id', + name: 'editAuthSource', + meta: { + routeParentName: 'authSource', + navName: '编辑本地认证源', + showBack: true, + }, + component: () => import('@/views/auth-source/edit-data/index.vue'), + }, + ], }, { path: '/audit', diff --git a/src/pages/src/views/Header.vue b/src/pages/src/views/Header.vue index 76725a7d6..c3eb60d16 100644 --- a/src/pages/src/views/Header.vue +++ b/src/pages/src/views/Header.vue @@ -114,7 +114,7 @@ const userInfo = computed(() => { const baseNav = [ { name: '组织架构', path: 'organization' }, { name: '数据源管理', path: 'dataSource' }, - { name: '认证源管理', path: 'authSource' }, + { name: '认证源管理', path: 'authSourceList' }, ]; if (role === 'super_manager') { headerNav.value = [...baseNav, { name: '租户管理', path: 'tenant' }, { name: '设置', path: 'setting' }]; diff --git a/src/pages/src/views/auth-source/List.vue b/src/pages/src/views/auth-source/List.vue new file mode 100644 index 000000000..f0e475ac1 --- /dev/null +++ b/src/pages/src/views/auth-source/List.vue @@ -0,0 +1,337 @@ + + + + + diff --git a/src/pages/src/views/auth-source/ViewDetails.vue b/src/pages/src/views/auth-source/ViewDetails.vue new file mode 100644 index 000000000..f5577d955 --- /dev/null +++ b/src/pages/src/views/auth-source/ViewDetails.vue @@ -0,0 +1,340 @@ + + + + + diff --git a/src/pages/src/views/auth-source/edit-data/index.vue b/src/pages/src/views/auth-source/edit-data/index.vue new file mode 100644 index 000000000..375b7802c --- /dev/null +++ b/src/pages/src/views/auth-source/edit-data/index.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/src/pages/src/views/auth-source/index.vue b/src/pages/src/views/auth-source/index.vue index f532b1ecf..98393de41 100644 --- a/src/pages/src/views/auth-source/index.vue +++ b/src/pages/src/views/auth-source/index.vue @@ -1,278 +1,9 @@ diff --git a/src/pages/src/views/auth-source/new-data/Local.vue b/src/pages/src/views/auth-source/new-data/Local.vue new file mode 100644 index 000000000..e63202243 --- /dev/null +++ b/src/pages/src/views/auth-source/new-data/Local.vue @@ -0,0 +1,495 @@ + + + + + diff --git a/src/pages/src/views/auth-source/new-data/NewConfig.vue b/src/pages/src/views/auth-source/new-data/NewConfig.vue deleted file mode 100644 index 34d6ccb54..000000000 --- a/src/pages/src/views/auth-source/new-data/NewConfig.vue +++ /dev/null @@ -1,253 +0,0 @@ - - - - - diff --git a/src/pages/src/views/auth-source/new-data/WeCom.vue b/src/pages/src/views/auth-source/new-data/WeCom.vue new file mode 100644 index 000000000..a0e63a61e --- /dev/null +++ b/src/pages/src/views/auth-source/new-data/WeCom.vue @@ -0,0 +1,522 @@ + + + + + diff --git a/src/pages/src/views/auth-source/new-data/config.vue b/src/pages/src/views/auth-source/new-data/config.vue new file mode 100644 index 000000000..f2dd4ec24 --- /dev/null +++ b/src/pages/src/views/auth-source/new-data/config.vue @@ -0,0 +1,197 @@ + + + + + diff --git a/src/pages/src/views/auth-source/new-data/index.vue b/src/pages/src/views/auth-source/new-data/index.vue new file mode 100644 index 000000000..eb6ea5753 --- /dev/null +++ b/src/pages/src/views/auth-source/new-data/index.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/src/pages/src/views/data-source/local-details/index.vue b/src/pages/src/views/data-source/local-details/index.vue index cce54d76a..67fcf762c 100644 --- a/src/pages/src/views/data-source/local-details/index.vue +++ b/src/pages/src/views/data-source/local-details/index.vue @@ -1,6 +1,6 @@