diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 000000000..908473635 Binary files /dev/null and b/.DS_Store differ diff --git a/ui/src/api/dataset.ts b/ui/src/api/dataset.ts new file mode 100644 index 000000000..aaba9eb48 --- /dev/null +++ b/ui/src/api/dataset.ts @@ -0,0 +1,30 @@ +import { Result } from '@/request/Result' +import { get, post, del, put } from '@/request/index' +import type { datasetListRequest } from '@/api/type/dataset' + +const prefix = '/dataset' + +/** + * 获取分页数据集 + * @param 参数 { + "current_page": "string", + "page_size": "string", + "search_text": "string", + } + */ +const getDateset: (param: datasetListRequest) => Promise> = (param) => { + return get(`${prefix}`, param) +} + +/** + * 获取全部数据集 + * @param 参数 search_text + */ +const getAllDateset: (param?: String) => Promise> = (param) => { + return get(`${prefix}`, param && { search_text: param }) +} + +export default { + getDateset, + getAllDateset +} diff --git a/ui/src/api/team.ts b/ui/src/api/team.ts index b427f50d1..1e08b684b 100644 --- a/ui/src/api/team.ts +++ b/ui/src/api/team.ts @@ -1,6 +1,6 @@ import { Result } from '@/request/Result' import { get, post, del, put } from '@/request/index' -import type { TeamMember, TeamMemberRequest } from '@/api/type/team' +import type { TeamMember } from '@/api/type/team' // import type { Ref } from 'vue' const prefix = '/team/member' @@ -16,8 +16,8 @@ const getTeamMember: () => Promise> = () => { * 添加成员 * @param 参数 { "username_or_email": "string" } */ -const postCreatTeamMember: (body: TeamMemberRequest) => Promise> = (body) => { - return post(`${prefix}`, body) +const postCreatTeamMember: (data: String) => Promise> = (data) => { + return post(`${prefix}`, { username_or_email: data }) } /** diff --git a/ui/src/api/type/dataset.ts b/ui/src/api/type/dataset.ts new file mode 100644 index 000000000..f8247e1ac --- /dev/null +++ b/ui/src/api/type/dataset.ts @@ -0,0 +1,7 @@ +interface datasetListRequest { + current_page: number + page_size: number + search_text: string +} + +export type { datasetListRequest } diff --git a/ui/src/api/type/team.ts b/ui/src/api/type/team.ts index be1a4c45a..9e17a842a 100644 --- a/ui/src/api/type/team.ts +++ b/ui/src/api/type/team.ts @@ -10,8 +10,4 @@ interface TeamMember { user_id: string } -interface TeamMemberRequest { - username_or_email: string -} - -export type { TeamMember, TeamMemberRequest } +export type { TeamMember } diff --git a/ui/src/components/app-avatar/index.vue b/ui/src/components/app-avatar/index.vue new file mode 100644 index 000000000..cfee6ad60 --- /dev/null +++ b/ui/src/components/app-avatar/index.vue @@ -0,0 +1,20 @@ + + + diff --git a/ui/src/components/card-add/index.vue b/ui/src/components/card-add/index.vue new file mode 100644 index 000000000..c6f7673be --- /dev/null +++ b/ui/src/components/card-add/index.vue @@ -0,0 +1,38 @@ + + + diff --git a/ui/src/components/card-box/index.vue b/ui/src/components/card-box/index.vue new file mode 100644 index 000000000..e5fc5fb1f --- /dev/null +++ b/ui/src/components/card-box/index.vue @@ -0,0 +1,74 @@ + + + diff --git a/ui/src/components/content-container/LayoutContent.vue b/ui/src/components/content-container/LayoutContent.vue index e59f6675b..20db34851 100644 --- a/ui/src/components/content-container/LayoutContent.vue +++ b/ui/src/components/content-container/LayoutContent.vue @@ -6,7 +6,7 @@ -
+
@@ -25,7 +25,7 @@ defineProps({ \ No newline at end of file + diff --git a/ui/src/layout/main-layout/index.vue b/ui/src/layout/main-layout/index.vue index 5e766ba3a..9d3fc311d 100644 --- a/ui/src/layout/main-layout/index.vue +++ b/ui/src/layout/main-layout/index.vue @@ -20,6 +20,5 @@ import { Sidebar, AppMain } from '../components' } .view-container { width: 100%; - padding: var(--app-view-padding); } diff --git a/ui/src/router/routes.ts b/ui/src/router/routes.ts index 637eb98f4..e7e9ab22b 100644 --- a/ui/src/router/routes.ts +++ b/ui/src/router/routes.ts @@ -11,12 +11,12 @@ export const routes: Array = [ component: () => import('@/layout/app-layout/index.vue'), redirect: '/setting', children: [ - { - path: '/first', - name: 'first', - meta: { icon: 'House', title: '首页' }, - component: () => import('@/views/first/index.vue') - }, + // { + // path: '/first', + // name: 'first', + // meta: { icon: 'House', title: '首页' }, + // component: () => import('@/views/first/index.vue') + // }, ...rolesRoutes ] }, diff --git a/ui/src/styles/app.scss b/ui/src/styles/app.scss index 8edee08bb..9e8793f50 100644 --- a/ui/src/styles/app.scss +++ b/ui/src/styles/app.scss @@ -136,6 +136,15 @@ ul { cursor: pointer; } +.ellipsis { + display: inline-block; + max-width: 100px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +// 内容部分 自适应高度 .main-calc-height { height: calc(100vh - 125px); } diff --git a/ui/src/views/dataset/index.vue b/ui/src/views/dataset/index.vue index fa1fd78b1..969477762 100644 --- a/ui/src/views/dataset/index.vue +++ b/ui/src/views/dataset/index.vue @@ -1,9 +1,95 @@ - \ No newline at end of file + diff --git a/ui/src/views/setting/component/CreateMemberDialog.vue b/ui/src/views/setting/component/CreateMemberDialog.vue index 4ccb896ef..539508cdc 100644 --- a/ui/src/views/setting/component/CreateMemberDialog.vue +++ b/ui/src/views/setting/component/CreateMemberDialog.vue @@ -81,12 +81,10 @@ const submitMember = async (formEl: FormInstance | undefined) => { await formEl.validate((valid, fields) => { if (valid) { loading.value = true - const obj: any = { - username_or_email: memberForm.value.users?.length - ? memberForm.value.users.toString() - : memberForm.value.user - } - TeamApi.postCreatTeamMember(obj).then(() => { + const submitValue: string = memberForm.value.users?.length + ? memberForm.value.users.toString() + : memberForm.value.user + TeamApi.postCreatTeamMember(submitValue).then(() => { MsgSuccess('提交成功') emit('refresh') dialogVisible.value = false diff --git a/ui/src/views/setting/component/PermissionSetting.vue b/ui/src/views/setting/component/PermissionSetting.vue index ed97ba50f..37b962cbe 100644 --- a/ui/src/views/setting/component/PermissionSetting.vue +++ b/ui/src/views/setting/component/PermissionSetting.vue @@ -47,7 +47,7 @@ const allChecked: any = ref({ [USE]: false }) -const tableHeight = ref(100) +const tableHeight = ref(0) watch( () => props.data,