Skip to content

Commit 47368a5

Browse files
fix: bugs
1 parent aa901c7 commit 47368a5

File tree

37 files changed

+367
-354
lines changed

37 files changed

+367
-354
lines changed

ui/src/api/workspace/workspace.ts

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,42 @@
11
import { Result } from '@/request/Result'
22
import type { Ref } from 'vue'
33
import { get, post, del } from '@/request/index'
4-
import type { WorkspaceItem, CreateWorkspaceMemberParamsItem, WorkspaceMemberItem } from '@/api/type/workspace'
4+
import type {
5+
WorkspaceItem,
6+
CreateWorkspaceMemberParamsItem,
7+
WorkspaceMemberItem,
8+
} from '@/api/type/workspace'
59
import type { pageRequest, PageList } from '@/api/type/common'
610

711
const prefix = '/workspace'
812

913
/**
1014
* 获取首页的工作空间下拉列表
1115
*/
12-
const getWorkspaceListByUser: (loading?: Ref<boolean>) => Promise<Result<WorkspaceItem[]>> = (loading) => {
16+
const getWorkspaceListByUser: (loading?: Ref<boolean>) => Promise<Result<WorkspaceItem[]>> = (
17+
loading,
18+
) => {
1319
return get('/workspace/by_user', undefined, loading)
1420
}
1521

1622
/**
1723
* 获取添加成员时的工作空间下拉列表
1824
*/
19-
const getWorkspaceList: (loading?: Ref<boolean>) => Promise<Result<Record<string, any>[]>> = (loading) => {
25+
const getWorkspaceList: (loading?: Ref<boolean>) => Promise<Result<Record<string, any>[]>> = (
26+
loading,
27+
) => {
2028
return get('/workspace/current_user', undefined, loading)
2129
}
2230

2331
/**
2432
* 获取工作空间列表
2533
*/
26-
const getSystemWorkspaceList: (loading?: Ref<boolean>) => Promise<Result<WorkspaceItem[]>> = (loading) => {
34+
const getSystemWorkspaceList: (loading?: Ref<boolean>) => Promise<Result<WorkspaceItem[]>> = (
35+
loading,
36+
) => {
2737
return get(`${prefix}`, undefined, loading)
2838
}
2939

30-
3140
/**
3241
* 获取工作空间成员列表
3342
*/
@@ -47,14 +56,11 @@ const getWorkspaceMemberList: (
4756
/**
4857
* 获取工作空间全部成员列表
4958
*/
50-
const getAllMemberList: (
51-
workspace_id: string,
52-
loading?: Ref<boolean>,
53-
) => Promise<Result<any[]>> = (workspace_id, loading) => {
54-
return get(
55-
`${prefix}/${workspace_id}/user_list`,
56-
loading,
57-
)
59+
const getAllMemberList: (workspace_id: string, loading?: Ref<boolean>) => Promise<Result<any[]>> = (
60+
workspace_id,
61+
loading,
62+
) => {
63+
return get(`${prefix}/${workspace_id}/user_list`, undefined, loading)
5864
}
5965

6066
/**
@@ -71,18 +77,20 @@ const CreateWorkspaceMember: (
7177
/**
7278
* 删除工作空间成员
7379
*/
74-
const deleteWorkspaceMember: (workspace_id: string, user_relation_id: string, loading?: Ref<boolean>) => Promise<Result<any>> = (
75-
workspace_id,
76-
user_relation_id,
77-
loading,
78-
) => {
80+
const deleteWorkspaceMember: (
81+
workspace_id: string,
82+
user_relation_id: string,
83+
loading?: Ref<boolean>,
84+
) => Promise<Result<any>> = (workspace_id, user_relation_id, loading) => {
7985
return post(`${prefix}/${workspace_id}/remove_member/${user_relation_id}`, undefined, {}, loading)
8086
}
8187

8288
/**
8389
* 获取添加成员时的角色下拉列表
8490
*/
85-
const getWorkspaceRoleList: (loading?: Ref<boolean>) => Promise<Result<Record<string, any>[]>> = (loading) => {
91+
const getWorkspaceRoleList: (loading?: Ref<boolean>) => Promise<Result<Record<string, any>[]>> = (
92+
loading,
93+
) => {
8694
return get('/role_list/current_user', undefined, loading)
8795
}
8896

ui/src/components/ai-chat/KnowledgeSource.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ import { computed, ref } from 'vue'
7171
import ParagraphSourceDialog from './ParagraphSourceDialog.vue'
7272
import ExecutionDetailDialog from './ExecutionDetailDialog.vue'
7373
import { isWorkFlow } from '@/utils/application'
74-
import { getImgUrl, getNormalizedUrl } from '@/utils/utils'
74+
import { getImgUrl, getNormalizedUrl } from '@/utils/common'
7575
const props = defineProps({
7676
data: {
7777
type: Object,

ui/src/components/ai-chat/ParagraphSourceDialog.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<script setup lang="ts">
1818
import { ref, watch, onBeforeUnmount } from 'vue'
1919
import { cloneDeep } from 'lodash'
20-
import { arraySort } from '@/utils/utils'
20+
import { arraySort } from '@/utils/array'
2121
import ParagraphSourceContent from './component/ParagraphSourceContent.vue'
2222
const emit = defineEmits(['refresh'])
2323

ui/src/components/ai-chat/component/ExecutionDetailContent.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -700,10 +700,10 @@
700700
<script setup lang="ts">
701701
import { ref } from 'vue'
702702
import ParagraphCard from '@/components/ai-chat/component/ParagraphCard.vue'
703-
import { arraySort } from '@/utils/utils'
703+
import { arraySort } from '@/utils/array'
704704
import { iconComponent } from '@/workflow/icons/utils'
705705
import { WorkflowType } from '@/enums/application'
706-
import { getImgUrl } from '@/utils/utils'
706+
import { getImgUrl } from '@/utils/common'
707707
import DynamicsForm from '@/components/dynamics-form/index.vue'
708708
import { isWorkFlow } from '@/utils/application'
709709

ui/src/components/ai-chat/component/ParagraphCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
</CardBox>
5454
</template>
5555
<script setup lang="ts">
56-
import { getImgUrl, getNormalizedUrl } from '@/utils/utils'
56+
import { getImgUrl, getNormalizedUrl } from '@/utils/common'
5757
import { computed } from 'vue'
5858
5959
const props = defineProps({

ui/src/components/ai-chat/component/chat-input-operate/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ import UserForm from '@/components/ai-chat/component/user-form/index.vue'
301301
import { MsgAlert } from '@/utils/message'
302302
import { type chatType } from '@/api/type/application'
303303
import { useRoute, useRouter } from 'vue-router'
304-
import { getImgUrl } from '@/utils/utils'
304+
import { getImgUrl } from '@/utils/common'
305305
import bus from '@/bus'
306306
import 'recorder-core/src/engine/mp3'
307307
import 'recorder-core/src/engine/mp3-engine'

ui/src/components/ai-chat/component/question-content/index.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@
9696
</template>
9797
<script setup lang="ts">
9898
import { type chatType } from '@/api/type/application'
99-
import { getImgUrl, getAttrsArray, downloadByURL } from '@/utils/utils'
99+
import { getImgUrl, downloadByURL } from '@/utils/common'
100+
import { getAttrsArray } from '@/utils/array'
100101
import { onMounted, computed } from 'vue'
101102
import useStore from '@/stores'
102103
const props = defineProps<{
@@ -116,7 +117,7 @@ const document_list = computed(() => {
116117
return props.chatRecord.upload_meta?.document_list || []
117118
}
118119
const startNode = props.chatRecord.execution_details?.find(
119-
(detail) => detail.type === 'start-node'
120+
(detail) => detail.type === 'start-node',
120121
)
121122
return startNode?.document_list || []
122123
})
@@ -125,7 +126,7 @@ const image_list = computed(() => {
125126
return props.chatRecord.upload_meta?.image_list || []
126127
}
127128
const startNode = props.chatRecord.execution_details?.find(
128-
(detail) => detail.type === 'start-node'
129+
(detail) => detail.type === 'start-node',
129130
)
130131
return startNode?.image_list || []
131132
})
@@ -134,7 +135,7 @@ const audio_list = computed(() => {
134135
return props.chatRecord.upload_meta?.audio_list || []
135136
}
136137
const startNode = props.chatRecord.execution_details?.find(
137-
(detail) => detail.type === 'start-node'
138+
(detail) => detail.type === 'start-node',
138139
)
139140
return startNode?.audio_list || []
140141
})
@@ -143,7 +144,7 @@ const other_list = computed(() => {
143144
return props.chatRecord.upload_meta?.other_list || []
144145
}
145146
const startNode = props.chatRecord.execution_details?.find(
146-
(detail) => detail.type === 'start-node'
147+
(detail) => detail.type === 'start-node',
147148
)
148149
return startNode?.other_list || []
149150
})

ui/src/components/ai-chat/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ import applicationApi from '@/api/application/application'
102102
import chatAPI from '@/api/chat/chat'
103103
import chatLogApi from '@/api/application/chat-log'
104104
import { ChatManagement, type chatType } from '@/api/type/application'
105-
import { randomId } from '@/utils/utils'
105+
import { randomId } from '@/utils/common'
106106
import useStore from '@/stores'
107107
import { isWorkFlow } from '@/utils/application'
108108
import { debounce } from 'lodash'

ui/src/components/app-charts/components/LineCharts.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<script lang="ts" setup>
55
import { onMounted, nextTick, watch, onBeforeUnmount } from 'vue'
66
import * as echarts from 'echarts'
7-
import { numberFormat } from '@/utils/utils'
7+
import { numberFormat } from '@/utils/common'
88
const props = defineProps({
99
id: {
1010
type: String,

ui/src/components/model-select/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
<script setup lang="ts">
8080
import { computed, ref, onMounted } from 'vue'
8181
import type { Provider } from '@/api/type/model'
82-
import { relatedObject } from '@/utils/common'
82+
import { relatedObject } from '@/utils/array'
8383
import CreateModelDialog from '@/views/model/component/CreateModelDialog.vue'
8484
import SelectProviderDialog from '@/views/model/component/SelectProviderDialog.vue'
8585

0 commit comments

Comments
 (0)