web修改
This commit is contained in:
@@ -28,16 +28,13 @@ declare module 'shared/components/iframe/IframeView.vue' {
|
||||
export default IframeView
|
||||
}
|
||||
|
||||
declare module 'shared/components/iframe/IframeView.vue' {
|
||||
import { DefineComponent } from 'vue'
|
||||
const IframeView: DefineComponent<{}, {}, any>
|
||||
export default IframeView
|
||||
}
|
||||
|
||||
// ========== API 模块 ==========
|
||||
declare module 'shared/api' {
|
||||
export const api: any
|
||||
export const TokenManager: any
|
||||
export const authAPI: any
|
||||
export const fileAPI: any
|
||||
export const workcaseAPI: any
|
||||
}
|
||||
|
||||
declare module 'shared/api/auth' {
|
||||
@@ -48,26 +45,64 @@ declare module 'shared/api/file' {
|
||||
export const fileAPI: any
|
||||
}
|
||||
|
||||
declare module 'shared/api' {
|
||||
export const authAPI: any
|
||||
export const fileAPI: any
|
||||
export const TokenManager: any
|
||||
export const api: any
|
||||
declare module 'shared/api/ai' {
|
||||
export const agentAPI: any
|
||||
export const aiKnowledgeAPI: any
|
||||
export const aiChatAPI: any
|
||||
}
|
||||
|
||||
// 保留旧的导出路径(向后兼容)
|
||||
declare module 'shared/FileUpload' {
|
||||
import { DefineComponent } from 'vue'
|
||||
const FileUpload: DefineComponent<{}, {}, any>
|
||||
export default FileUpload
|
||||
declare module 'shared/api/workcase' {
|
||||
export const workcaseAPI: any
|
||||
}
|
||||
|
||||
declare module 'shared/DynamicFormItem' {
|
||||
import { DefineComponent } from 'vue'
|
||||
const DynamicFormItem: DefineComponent<{}, {}, any>
|
||||
export default DynamicFormItem
|
||||
// ============ types模块 ==================
|
||||
declare module 'shared/types' {
|
||||
import type { BaseDTO } from '../../../shared/src/types/base'
|
||||
|
||||
// 重新导出 base
|
||||
export type { BaseDTO }
|
||||
|
||||
// 重新导出 response
|
||||
export type { ResultDomain } from '../../../shared/src/types/response'
|
||||
|
||||
// 重新导出 page
|
||||
export type { PageDomain, PageParam, PageRequest } from '../../../shared/src/types/page'
|
||||
|
||||
// 重新导出 auth
|
||||
export type { LoginParam, LoginDomain } from '../../../shared/src/types/auth'
|
||||
|
||||
// 重新导出 sys
|
||||
export type { SysUserVO, SysConfigVO, TbSysViewDTO } from '../../../shared/src/types/sys'
|
||||
|
||||
// 重新导出 file
|
||||
export type { TbSysFileDTO } from '../../../shared/src/types/file'
|
||||
|
||||
// 重新导出 ai
|
||||
export type {
|
||||
TbKnowledge,
|
||||
TbKnowledgeFile,
|
||||
TbAgent,
|
||||
PromptCard,
|
||||
TbChat,
|
||||
TbChatMessage,
|
||||
DifyFileInfo,
|
||||
ChatPrepareData,
|
||||
StopChatParams,
|
||||
CommentMessageParams
|
||||
} from '../../../shared/src/types/ai'
|
||||
|
||||
// 重新导出 workcase
|
||||
export type {
|
||||
TbWorkcaseDTO,
|
||||
TbWorkcaseProcessDTO,
|
||||
TbWorkcaseDeviceDTO
|
||||
} from '../../../shared/src/types/workcase'
|
||||
|
||||
// 重新导出 menu
|
||||
export type { MenuItem, toMenuItem, toMenuItems } from '../../../shared/src/types/menu'
|
||||
}
|
||||
|
||||
// ================ utils工具 ==========================
|
||||
declare module 'shared/utils' {
|
||||
export const initAesEncrypt: any
|
||||
export const getAesInstance: any
|
||||
@@ -78,47 +113,6 @@ declare module 'shared/utils' {
|
||||
export const getFilePreviewUrl: any
|
||||
}
|
||||
|
||||
declare module 'shared/types' {
|
||||
import { RouteRecordRaw } from 'vue-router'
|
||||
|
||||
export type LoginParam = any
|
||||
export type LoginDomain = any
|
||||
export type SysUserVO = any
|
||||
export type TbSysFileDTO = any
|
||||
export type SysConfigVO = any
|
||||
export type ResultDomain<T = any> = any
|
||||
|
||||
// 视图类型(用于路由和菜单)
|
||||
export interface TbSysViewDTO {
|
||||
viewId?: string
|
||||
name?: string
|
||||
parentId?: string
|
||||
url?: string
|
||||
component?: string
|
||||
iframeUrl?: string
|
||||
icon?: string
|
||||
type?: number
|
||||
viewType?: string
|
||||
service?: string
|
||||
layout?: string
|
||||
orderNum?: number
|
||||
description?: string
|
||||
children?: TbSysViewDTO[]
|
||||
}
|
||||
|
||||
// 菜单项类型(扩展 TbSysViewDTO)
|
||||
export interface MenuItem extends TbSysViewDTO {
|
||||
key: string
|
||||
label: string
|
||||
expanded?: boolean
|
||||
children?: MenuItem[]
|
||||
}
|
||||
|
||||
// 菜单工具函数
|
||||
export function toMenuItem(view: TbSysViewDTO, expanded?: boolean): MenuItem
|
||||
export function toMenuItems(views: TbSysViewDTO[], defaultExpanded?: boolean): MenuItem[]
|
||||
}
|
||||
|
||||
declare module 'shared/utils/route' {
|
||||
import { RouteRecordRaw } from 'vue-router'
|
||||
import type { TbSysViewDTO } from 'shared/types'
|
||||
|
||||
Reference in New Issue
Block a user