123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- /** 用户相关模块 */
- declare namespace Auth {
- /**
- * 用户角色类型(前端静态路由用角色类型进行路由权限的控制)
- * - super: 超级管理员(该权限具有所有路由数据)
- * - admin: 管理员
- * - user: 用户
- */
- type RoleType = 'super' | 'admin' | 'user';
- /** 用户信息 */
- interface UserInfo {
- /** 用户id */
- userId: string;
- /** 用户名 */
- userName: string;
- /** 用户角色类型 */
- userRole: RoleType;
- }
- }
- declare namespace UserManagement {
- interface User extends ApiUserManagement.User {
- /** 序号 */
- index: number;
- /** 表格的key(id) */
- key: string;
- }
- /**
- * 用户性别
- * - 0: 女
- * - 1: 男
- */
- type GenderKey = NonNullable<User['gender']>;
- /**
- * 用户状态
- * - 1: 启用
- * - 2: 禁用
- * - 3: 冻结
- * - 4: 软删除
- */
- type UserStatusKey = NonNullable<User['userStatus']>;
- }
- declare namespace BackgroundField {
- interface Field extends ApiBackground.Field {
- /** 序号 */
- index: number;
- /** 表格的key(id) */
- key: number;
- }
- /**
- * 组件类型
- * 0 单行文本
- * 1 多行文本
- * 2 下拉框
- * 3 单选框
- * 4 多选框
- * 5 日期选择器
- * 6 时间选择器
- * 7 开关
- */
- type ComponentsTypeKey = NonNullable<Field['components_type']>;
- /**
- * 字段类型
- * 0 无效类型
- * 1 日期类型
- * 2 时间类型
- * 3 字符串
- * 4 小数类型
- * 5 bool类型
- * 6 整数类型
- */
- type FieldTypeKey = NonNullable<Field['field_type']>;
- }
- declare namespace BackgroundEvent {
- interface Event extends ApiBackground.Event {
- /** 序号 */
- index: number;
- /** 表格的key(id) */
- key: number;
- }
- /**
- * 是否启动
- * 0 无效
- * 1:是
- * 2: 否
- */
- type IsShowKey = NonNullable<Event['is_show']>;
- }
- declare namespace BackgroundIndicators {
- interface Indicators extends ApiBackground.Indicators {
- /** 序号 */
- index: number;
- /** 表格的key(id) */
- key: number;
- }
- /**
- * 是否启动
- * 0 无效
- * 1:是
- * 2: 否
- */
- type IsShowKey = NonNullable<Indicators['is_show']>;
- }
- declare namespace BackgroundWorkflow {
- interface Workflow extends ApiBackground.Workflow {
- /** 序号 */
- index: number;
- /** 表格的key(id) */
- key: number;
- }
- /**
- * 是否启动
- * 0 无效
- * 1:是
- * 2: 否
- */
- type IsShowKey = NonNullable<Workflow['is_show']>;
- }
- declare namespace BackgroundMqttAuth {
- interface Auth extends ApiBackground.MqttAuth {
- /** 序号 */
- index: number;
- /** 表格的key(id) */
- key: number;
- }
- /**
- * 是否启动
- * 0 无效
- * 1:是
- * 2: 否
- */
- type IsShowKey = NonNullable<Auth['is_show']>;
- }
|