diff --git a/ui/src/api/model.ts b/ui/src/api/model.ts index cc52a072d..4ed44a9eb 100644 --- a/ui/src/api/model.ts +++ b/ui/src/api/model.ts @@ -21,7 +21,7 @@ const prefix_provider = '/provider' * @params 参数 name, model_type, model_name */ const getModel: ( - request: ListModelRequest, + request?: ListModelRequest, loading?: Ref ) => Promise>> = (data, loading) => { return get(`${prefix}`, data, loading) diff --git a/ui/src/api/type/application.ts b/ui/src/api/type/application.ts index 713964d51..6e15c8e5d 100644 --- a/ui/src/api/type/application.ts +++ b/ui/src/api/type/application.ts @@ -27,7 +27,7 @@ interface chatType { } export class ChatRecordManage { - id?: NodeJS.Timer + id?: any ms: number chat: chatType is_close?: boolean @@ -54,7 +54,9 @@ export class ChatRecordManage { this.chat.answer_text = this.chat.answer_text + s } else { if (this.is_close) { - clearInterval(this.id) + if(this.id){ + clearInterval(this.id) + } this.chat.write_ed = true this.write_ed = true if (this.loading) { diff --git a/ui/src/components/dynamics-form/type.ts b/ui/src/components/dynamics-form/type.ts index 181d2e96b..03f5bb0e4 100644 --- a/ui/src/components/dynamics-form/type.ts +++ b/ui/src/components/dynamics-form/type.ts @@ -1,4 +1,4 @@ -import { Dict } from '@/api/type/common' +import type { Dict } from '@/api/type/common' interface ViewCardItem { /** diff --git a/ui/src/views/application/CreateAndSetting.vue b/ui/src/views/application/CreateAndSetting.vue index bcd2274c5..37cdcec9f 100644 --- a/ui/src/views/application/CreateAndSetting.vue +++ b/ui/src/views/application/CreateAndSetting.vue @@ -192,6 +192,7 @@ import type { Provider } from '@/api/type/model' import { realatedObject } from '@/utils/utils' import { MsgSuccess } from '@/utils/message' import useStore from '@/stores' +import type Result from '@/request/Result' const { model, dataset, application, user } = useStore() const router = useRouter() @@ -297,8 +298,8 @@ function getDataset() { datasetList.value = res.data }) } else { - dataset.asyncGetAllDateset(datasetLoading).then((res: any) => { - datasetList.value = res.data?.filter((v) => v.user_id === user.userInfo?.id) + dataset.asyncGetAllDateset(datasetLoading).then((res:any) => { + datasetList.value = res.data?.filter((v:any) => v.user_id === user.userInfo?.id) }) } } diff --git a/ui/src/views/application/index.vue b/ui/src/views/application/index.vue index e8b47efa3..eed3eae65 100644 --- a/ui/src/views/application/index.vue +++ b/ui/src/views/application/index.vue @@ -129,8 +129,8 @@ function searchHandle() { getList() } function getAccessToken(id: string) { - application.asyncGetAccessToken(id, loading).then((res) => { - window.open(application.location + res?.data?.access_token) + application.asyncGetAccessToken(id, loading).then((res:any) => { + window.open(application.location + res?.data?.access_token) }) } diff --git a/ui/src/views/setting/component/CreateMemberDialog.vue b/ui/src/views/setting/component/CreateMemberDialog.vue index 0db8c8577..e2d002a0e 100644 --- a/ui/src/views/setting/component/CreateMemberDialog.vue +++ b/ui/src/views/setting/component/CreateMemberDialog.vue @@ -70,7 +70,7 @@ const SelectRemoteRef = ref() const addMemberFormRef = ref() const loading = ref(false) -const userOptions = ref([]) +const userOptions = ref>([]) const rules = ref({ users: [