This commit is contained in:
wangzzpeng
2026-09-24 10:10:43 +08:00
commit 7bc84bbe5e
194 changed files with 22571 additions and 0 deletions

31
src/types/api.d.ts vendored Normal file
View File

@@ -0,0 +1,31 @@
// 接口通用结构(PRD 4.8)
/** 业务类型(跨模块共享) */
export type BusinessType = 'internet' | 'hardware' | 'iot' | 'manufacturing' | 'other'
/** 统一响应结构 */
export interface ApiResponse<T> {
code: number
msg: string
data: T
}
/** 分页结果 */
export interface PageResult<T> {
list: T[]
total: number
}
/** 通用分页查询参数 */
export interface PageQuery {
page: number
pageSize: number
}
/** 附件/文件信息 */
export interface FileInfo {
name: string
size: number
uploadTime: string
url: string
}

38
src/types/business/cases.d.ts vendored Normal file
View File

@@ -0,0 +1,38 @@
// 案例实体(PRD 4.1,home/cases/profile.favorites 共享)
import type { BusinessType } from '@/types/api'
/** 项目规模区间 */
export type ScaleRange = 'lt50w' | '50to100w' | '100to300w' | '300to500w' | 'gt500w'
/** 案例 */
export interface Case {
id: string
title: string
category: BusinessType
cover: string
finishDate: string
teamSize: number
/** 规模展示值(如 '300万'、'10-50万'),筛选区间见 CaseQuery.scales */
scale: string
industry: string
duration: string
clientType: string
background: string
painPoints: string
requirements: string
deliverables: string
video: string
isFavorite: boolean
}
/** 案例筛选条件 */
export interface CaseQuery {
category: BusinessType | 'all'
industries: string[]
scales: ScaleRange[]
dateRange: [string, string] | null
keyword: string
page: number
pageSize: number
}

29
src/types/business/contract.d.ts vendored Normal file
View File

@@ -0,0 +1,29 @@
// 合同中心实体(PRD M6)
import type { FileInfo } from '@/types/api'
/** 签署状态 */
export type SignStatus = '履行中' | '已过期' | '待签署'
/** 合同 */
export interface Contract {
id: string
contractNo: string
contractName: string
contractType: string
contractAmount: number
relatedProjectName: string
projectNo: string
signStatus: SignStatus
signDate?: string
effectiveDate: string
expiryDate: string
files: FileInfo[]
}
/** 合同列表查询条件 */
export interface ContractQuery {
keyword: string
page: number
pageSize: number
}

20
src/types/business/demand.d.ts vendored Normal file
View File

@@ -0,0 +1,20 @@
// 需求提报实体(M3,page-architecture)
import type { BusinessType, FileInfo } from '@/types/api'
/** 预算范围 */
export type BudgetRange = 'lt1w' | '1to5w' | '5to10w' | 'gt10w' | ''
/** 需求提报表单 */
export interface Demand {
businessType: BusinessType
projectName: string
attachments: FileInfo[]
coreDescription: string
expectedDuration: number | ''
budgetRange: 'lt1w' | '1to5w' | '5to10w' | 'gt10w' | ''
userName: string
userPhone: string
remark: string
status: 'draft' | 'submitted'
}

92
src/types/business/finance.d.ts vendored Normal file
View File

@@ -0,0 +1,92 @@
// 财务中心实体(账单/支付/发票/抬头/统计)
/** 账单状态 */
export type BillStatus = '待支付' | '已支付' | '未到期'
/** 发票状态 */
export type InvoiceStatus = '已开票' | '开票中' | '未开票'
/** 支付方式 */
export type PayMethod = 'wechat' | 'alipay'
/** 账单 */
export interface Bill {
id: string
/** 分期计划名,如 '第一期·预付款 比例33%' */
planName: string
billNo: string
tradeNo?: string
projectName: string
amount: number
status: BillStatus
createTime: string
}
/** 账单查询条件 */
export interface BillQuery {
keyword: string
status: BillStatus | 'all'
page: number
pageSize: number
}
/** 支付单(二维码) */
export interface Payment {
billId: string
method: PayMethod
amount: number
qrExpiresInSeconds: number
}
/** 支付结果 */
export interface PaymentResult {
method: PayMethod
amount: number
payTime: string
tradeNo: string
bills: Bill[]
}
/** 发票 */
export interface Invoice {
id: string
planName: string
billNo: string
tradeNo?: string
projectName: string
amount: number
status: InvoiceStatus
applyTime: string
}
/** 发票查询条件 */
export interface InvoiceQuery {
keyword: string
status: InvoiceStatus | 'all'
page: number
pageSize: number
}
/** 发票抬头 */
export interface InvoiceTitle {
id: string
type: '企业单位' | '非企业单位'
title: string
taxNo: string
isDefault: boolean
}
/** 新增/编辑发票抬头入参 */
export interface InvoiceTitlePayload {
type: InvoiceTitle['type']
title: string
taxNo: string
}
/** 财务统计 */
export interface FinanceStats {
totalExpense: number
month: string
pendingCount: number
distribution: Array<{ name: string; value: number; color: string }>
}

34
src/types/business/home.d.ts vendored Normal file
View File

@@ -0,0 +1,34 @@
// 首页实体(PRD 3.1/3.2,page-architecture M1)
import type { BusinessType } from '@/types/api'
/** 数据看板 */
export interface HomeStats {
pending: number
inProgress: number
total: number
}
/** 快捷入口 */
export interface QuickLink {
label: string
path: string
}
/** 服务类型子项 */
export interface ServiceType {
label: string
desc: string
}
/** 业务线(首页业务卡片 + 业务详情页共用) */
export interface BusinessLine {
id: BusinessType
name: string
desc: string
slogan: string
icon: string
serviceContent: string
serviceTypes: ServiceType[]
video: string
}

27
src/types/business/message.d.ts vendored Normal file
View File

@@ -0,0 +1,27 @@
// 消息实体(PRD M8 消息中心)
import type { FileInfo } from '@/types/api'
/** 消息类型 */
export type MessageType = '在线客服' | '状态通知' | '系统通知'
/** 站内消息 */
export interface Message {
id: string
type: MessageType
title: string
summary: string
/** 正文纯文本,详情页 pre-wrap 渲染 */
content: string
publishTime: string
isRead: boolean
attachments: FileInfo[]
}
/** 消息查询条件 */
export interface MessageQuery {
keyword: string
type: MessageType | 'all'
page: number
pageSize: number
}

87
src/types/business/profile.d.ts vendored Normal file
View File

@@ -0,0 +1,87 @@
// 个人中心实体(M10:security/address/favorites/qualifications/feedback/help/about/hotline 共享)
import type { BusinessType, FileInfo } from '@/types/api'
/** 账号资料 */
export interface Profile {
nickname: string
phone: string
email: string
/** 密码上次修改时间(展示值,如 '15天前') */
passwordModifiedAt: string
}
/** 修改密码入参 */
export interface ChangePasswordParams {
code: string
password: string
}
/** 收货地址 */
export interface Address {
id: string
receiverName: string
phone: string
region: string
detailAddress: string
isDefault: boolean
}
/** 资质类型 */
export type QualificationType =
| '营业执照'
| '生产许可证'
| '体系认证'
| '检测报告'
| '授权书'
| '其他资质'
/** 资质审核状态 */
export type QualificationStatus = '已认证' | '审核中' | '未通过'
/** 资质 */
export interface Qualification {
id: string
type: QualificationType
certName: string
certNo: string
issuer: string
validFrom: string
validTo: string
status: QualificationStatus
attachments: FileInfo[]
}
/** 资质新增/编辑提交载荷(id 存在为编辑) */
export type QualificationInput = Omit<Qualification, 'id' | 'status'> & { id?: string }
/** 意见反馈 */
export interface Feedback {
title: string
description: string
attachments: FileInfo[]
}
/** 列表分页查询 */
export interface ListQuery {
page: number
pageSize: number
}
/** 我的收藏查询(关键字 + 分类 + 分页) */
export interface FavoritesQuery extends ListQuery {
keyword: string
category: BusinessType | 'all'
}
/** 帮助中心 FAQ 条目 */
export interface HelpFaqItem {
q: string
a: string
}
/** 帮助中心 FAQ 分组 */
export interface HelpFaqGroup {
title: string
items: HelpFaqItem[]
}

79
src/types/business/project.d.ts vendored Normal file
View File

@@ -0,0 +1,79 @@
// 项目中心实体(PRD M5)
import type { BusinessType, FileInfo } from '@/types/api'
/** 项目状态 */
export type ProjectStatus = '待立项' | '进行中' | '待验收' | '已完成' | '售后中' | '已取消'
/** 里程碑节点 */
export interface Milestone {
name: string
status: '待开始' | '进行中' | '已完成'
time?: string
}
/** 团队成员 */
export interface TeamMember {
role: string
name: string
avatarChar: string
}
/** 项目账单(付款计划) */
export interface ProjectBill {
id: string
planName: string
billNo: string
amount: number
status: '待支付' | '已支付' | '未到期'
tradeNo?: string
projectName: string
}
/** 售后工单 */
export interface AfterSales {
status: '无' | '处理中'
type: string
description: string
remark: string
attachments: FileInfo[]
createTime: string
}
/** 售后提交入参 */
export interface AfterSalesPayload {
type: string
description: string
remark: string
attachments: FileInfo[]
}
/** 项目 */
export interface Project {
id: string
projectNo: string
projectName: string
businessType: BusinessType
progress: number
status: ProjectStatus
submitTime: string
startTime?: string
endTime?: string
milestones: Milestone[]
team: TeamMember[]
files: FileInfo[]
paymentPlans: ProjectBill[]
invoiceRecords: FileInfo[]
contractFile?: FileInfo
afterSales?: AfterSales
}
/** 项目列表查询条件 */
export interface ProjectQuery {
keyword: string
businessType: BusinessType | 'all'
status: ProjectStatus | 'all'
timeShortcut: 'all' | '3m' | '6m' | '1y'
page: number
pageSize: number
}

17
src/types/business/service.d.ts vendored Normal file
View File

@@ -0,0 +1,17 @@
// 在线客服会话实体(PRD M9 在线客服)
/** 会话角色 */
export type ChatRole = 'user' | 'assistant'
/** 会话消息 */
export interface ChatMessage {
id: string
role: ChatRole
content: string
/** 文件消息卡片(有值时按文件渲染) */
file?: {
name: string
size: number
}
time: string
}

47
src/types/business/user.d.ts vendored Normal file
View File

@@ -0,0 +1,47 @@
// 用户/认证实体(M4,page-architecture)
/** 用户 */
export interface User {
id: string
nickname: string
avatar: string
phone: string
email: string
passwordModifiedAt: string
}
/** 账号密码登录参数 */
export interface LoginByAccountParams {
account: string
password: string
}
/** 短信验证码登录参数 */
export interface LoginBySmsParams {
phone: string
code: string
}
/** 登录结果 */
export interface LoginResult {
token: string
user: User
}
/** 注册参数 */
export interface RegisterParams {
phone: string
code: string
password: string
confirmPassword: string
agree: boolean
}
/** 找回/重置密码参数 */
export interface ResetPasswordParams {
phone: string
code: string
password: string
confirmPassword: string
agree: boolean
}

8
src/types/global.d.ts vendored Normal file
View File

@@ -0,0 +1,8 @@
// 全局声明(Window 扩展等,按需添加)
export {}
declare global {
interface Window {
// 全局挂载扩展位
}
}

11
src/types/router.d.ts vendored Normal file
View File

@@ -0,0 +1,11 @@
// RouteMeta 扩展
export {}
declare module 'vue-router' {
interface RouteMeta {
/** 页面标题(document.title) */
title?: string
/** 是否需要登录 */
requiresAuth?: boolean
}
}

65
src/types/web/home.d.ts vendored Normal file
View File

@@ -0,0 +1,65 @@
// 后端「用户web端首页」接口真实返回类型
// 对应 vermis-maker: com.ruoyi.vermins.controller.pc.web.UserSideWebHomePageController
// 统一前缀: /web/home-page (公开接口,无需登录)
// 字段与后端 VO 严格对齐(驼峰、可空用 | null)。
/** GET /web/home-page/project-status-count —— 项目状态统计 */
export interface ProjectStatusCount {
/** 项目数量 */
projectCount: number
/** 进行中的项目数目 */
ongoingProjectCount: number
/** 待处理数目 */
pendingProjectCount: number
}
/** 服务类型子项(service-type-list / service-type-detail 内含) */
export interface ProjectServiceTypeVo {
id: number | null
projectId: number | null
serviceName: string | null
iconUrl: string | null
sortOrder: number | null
}
/** 项目背景(富文本) */
export interface ProjectBackgroundVo {
id: number | null
projectId: number | null
content: string | null
sortOrder: number | null
}
/** 项目提报视图对象:service-type-list / service-type-detail/{id} 的返回 */
export interface ProjectSubmissionVo {
id: number
businessType: string | null
title: string | null
subtitle: string | null
/** 是否启用:1 启用,0 停用 */
enabled: number | null
coverUrl: string | null
logoUrl: string | null
serviceTypes: ProjectServiceTypeVo[]
backgrounds: ProjectBackgroundVo[]
/** yyyy-MM-dd HH:mm:ss */
updateTime: string | null
}
/** GET /web/home-page/carousel-list —— 轮播图 */
export interface BannerVo {
id: number | null
imageUrl: string | null
sort: number | null
/** 是否启用(true 启用,false 停用) */
enabled: boolean | null
}
/** GET /web/home-page/platform-intro、contact-info —— 协议/静态文章富文本 */
export interface AgreementFormVo {
id: number | null
/** 协议类型(目前只有「关于我们」一条) */
type: string | null
/** 文章内容(富文本 HTML) */
content: string | null
}