feat(product): 新增产品管理模块与字典组件功能
- 新增产品管理相关路由和页面(dashboard、list、requirement、setting) - 实现产品基础信息编辑弹窗组件(base-info-dialog.vue) - 添加运行时字典功能(dict-select、dict-text、dict-tag组件) - 集成字典管理store和API调用 - 规范ID类型定义为string避免精度丢失问题 - 完善国际化资源文件支持中英文对照 - 新增对象上下文业务域入口页导航实现说明 - 添加Vue DevTools浮动入口注释说明 - 统一权限控制支持全局和对象作用域区分 - 规范分页查询参数类型定义与使用方式
This commit is contained in:
57
src/typings/object-context.d.ts
vendored
Normal file
57
src/typings/object-context.d.ts
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
declare namespace App {
|
||||
namespace ObjectContext {
|
||||
type DomainKey = 'project' | 'product' | string;
|
||||
|
||||
type ObjectType = 'project' | 'product' | string;
|
||||
|
||||
type Menu = {
|
||||
/** 对象上下文菜单 key,优先约定为目标路由 name */
|
||||
key: string;
|
||||
/** 菜单文案 */
|
||||
label: string;
|
||||
/** 路由 name,可为空 */
|
||||
routeKey?: string | null;
|
||||
/** 路由 path,可为空 */
|
||||
routePath?: string | null;
|
||||
/** 子菜单 */
|
||||
children?: Menu[];
|
||||
};
|
||||
|
||||
interface DomainConfig {
|
||||
domainKey: DomainKey;
|
||||
mode: 'object-context';
|
||||
objectType: ObjectType;
|
||||
/** 用于识别当前路由是否属于该业务域 */
|
||||
routePathPrefixes: string[];
|
||||
/** 业务域入口页 */
|
||||
entryRouteKey: string;
|
||||
entryRoutePath: string;
|
||||
/** 对象默认首页兜底值 */
|
||||
fallbackDefaultRouteKey: string;
|
||||
fallbackDefaultRoutePath: string;
|
||||
/** 上下文接口 */
|
||||
contextApiPath: string;
|
||||
contextApiObjectIdParamKey: string;
|
||||
contextApiObjectIdPlacement?: 'query' | 'path';
|
||||
/** 第一版固定为 objectId */
|
||||
objectIdQueryKey: 'objectId';
|
||||
}
|
||||
|
||||
interface Summary {
|
||||
[key: string]: unknown;
|
||||
}
|
||||
|
||||
interface State {
|
||||
domainKey: DomainKey;
|
||||
objectType: ObjectType;
|
||||
objectId: string;
|
||||
objectName: string;
|
||||
objectSummary: Summary | null;
|
||||
contextScopedMenus: Menu[];
|
||||
buttonCodes: string[];
|
||||
defaultRouteKey: string;
|
||||
defaultRoutePath: string;
|
||||
isReady: boolean;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user