@skyfox2000/webui 1.3.16 → 1.3.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/package.json +1 -1
  2. package/src/components/layout/page/baseLayout.vue +44 -0
  3. package/src/components/layout/page/basicLayout.vue +11 -44
  4. package/src/typings/option.d.ts +1 -1
  5. package/src/utils/options.ts +2 -2
  6. package/lib/AceEditor.d.ts +0 -1
  7. package/lib/BasicLayout.d.ts +0 -1
  8. package/lib/Error403.d.ts +0 -1
  9. package/lib/Error404.d.ts +0 -1
  10. package/lib/ExcelForm.d.ts +0 -1
  11. package/lib/UploadForm.d.ts +0 -1
  12. package/lib/assets/modules/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
  13. package/lib/assets/modules/file-upload-JBIvw5Xx.js +0 -204
  14. package/lib/assets/modules/index-BMkaOjBS.js +0 -380
  15. package/lib/assets/modules/index-BOYtm8ib.js +0 -112
  16. package/lib/assets/modules/index-BkChvyed.js +0 -109
  17. package/lib/assets/modules/menuTabs-BFPjaQRI.js +0 -671
  18. package/lib/assets/modules/toolIcon-XOgjdQdO.js +0 -50
  19. package/lib/assets/modules/uploadList-BedljASx.js +0 -2407
  20. package/lib/assets/modules/uploadList-CW7OIDS3.js +0 -382
  21. package/lib/components/common/alert/index.vue.d.ts +0 -13
  22. package/lib/components/common/button/index.vue.d.ts +0 -41
  23. package/lib/components/common/icon/appicon.vue.d.ts +0 -11
  24. package/lib/components/common/icon/fullscreen.vue.d.ts +0 -3
  25. package/lib/components/common/icon/helper.vue.d.ts +0 -23
  26. package/lib/components/common/icon/index.vue.d.ts +0 -243
  27. package/lib/components/common/icon/layoutIcon.vue.d.ts +0 -43
  28. package/lib/components/common/icon/projectIcon.vue.d.ts +0 -59
  29. package/lib/components/common/icon/toolIcon.vue.d.ts +0 -43
  30. package/lib/components/common/index.d.ts +0 -22
  31. package/lib/components/common/loading/index.vue.d.ts +0 -3
  32. package/lib/components/common/tooltip/index.vue.d.ts +0 -21
  33. package/lib/components/content/dialog/index.vue.d.ts +0 -35
  34. package/lib/components/content/drawer/index.vue.d.ts +0 -28
  35. package/lib/components/content/form/formItem.vue.d.ts +0 -28
  36. package/lib/components/content/form/index.vue.d.ts +0 -25
  37. package/lib/components/content/index.d.ts +0 -22
  38. package/lib/components/content/search/index.vue.d.ts +0 -32
  39. package/lib/components/content/search/searchItem.vue.d.ts +0 -23
  40. package/lib/components/content/table/index.vue.d.ts +0 -127
  41. package/lib/components/content/table/tableOperate.vue.d.ts +0 -18
  42. package/lib/components/content/toolbar/icontool.vue.d.ts +0 -7
  43. package/lib/components/content/toolbar/index.vue.d.ts +0 -18
  44. package/lib/components/content/tree/index.vue.d.ts +0 -46
  45. package/lib/components/form/aceEditor/aceConfig.d.ts +0 -8
  46. package/lib/components/form/autoComplete/index.vue.d.ts +0 -101
  47. package/lib/components/form/cascader/index.vue.d.ts +0 -80
  48. package/lib/components/form/checkbox/index.vue.d.ts +0 -100
  49. package/lib/components/form/datePicker/index.vue.d.ts +0 -6
  50. package/lib/components/form/index.d.ts +0 -41
  51. package/lib/components/form/input/index.vue.d.ts +0 -29
  52. package/lib/components/form/input/inputIcon.vue.d.ts +0 -10
  53. package/lib/components/form/input/inputNumber.vue.d.ts +0 -3
  54. package/lib/components/form/input/inputPassword.vue.d.ts +0 -3
  55. package/lib/components/form/propEditor/index.vue.d.ts +0 -15
  56. package/lib/components/form/radio/index.vue.d.ts +0 -105
  57. package/lib/components/form/radio/radioStatus.vue.d.ts +0 -31
  58. package/lib/components/form/rangePicker/index.vue.d.ts +0 -16
  59. package/lib/components/form/select/index.vue.d.ts +0 -119
  60. package/lib/components/form/switch/index.vue.d.ts +0 -76
  61. package/lib/components/form/textarea/index.vue.d.ts +0 -3
  62. package/lib/components/form/timePicker/index.vue.d.ts +0 -6
  63. package/lib/components/form/transfer/index.vue.d.ts +0 -38
  64. package/lib/components/form/transfer/transferTable.vue.d.ts +0 -38
  65. package/lib/components/form/treeSelect/index.vue.d.ts +0 -47
  66. package/lib/components/form/upload/uploadList.vue.d.ts +0 -488
  67. package/lib/components/index.d.ts +0 -4
  68. package/lib/components/layout/breadcrumb/index.vue.d.ts +0 -3
  69. package/lib/components/layout/content/index.vue.d.ts +0 -22
  70. package/lib/components/layout/datetime/index.vue.d.ts +0 -3
  71. package/lib/components/layout/header/headerExits.vue.d.ts +0 -3
  72. package/lib/components/layout/header/index.vue.d.ts +0 -3
  73. package/lib/components/layout/header/user.vue.d.ts +0 -3
  74. package/lib/components/layout/index.d.ts +0 -14
  75. package/lib/components/layout/menu/index.vue.d.ts +0 -6
  76. package/lib/components/layout/menu/menuTabs.vue.d.ts +0 -3
  77. package/lib/const/options.d.ts +0 -32
  78. package/lib/directives/enter-submit.d.ts +0 -4
  79. package/lib/directives/index.d.ts +0 -2
  80. package/lib/directives/permission.d.ts +0 -5
  81. package/lib/es/AceEditor/index.js +0 -167
  82. package/lib/es/BasicLayout/index.js +0 -101
  83. package/lib/es/Error403/index.js +0 -39
  84. package/lib/es/Error404/index.js +0 -39
  85. package/lib/es/ExcelForm/index.js +0 -491
  86. package/lib/es/UploadForm/index.js +0 -110
  87. package/lib/index.d.ts +0 -46
  88. package/lib/router/index.d.ts +0 -15
  89. package/lib/stores/appInfo.d.ts +0 -31
  90. package/lib/stores/hostInfo.d.ts +0 -11
  91. package/lib/stores/pageInfo.d.ts +0 -18
  92. package/lib/stores/pinia.d.ts +0 -3
  93. package/lib/stores/settingInfo.d.ts +0 -8
  94. package/lib/stores/userInfo.d.ts +0 -25
  95. package/lib/typings/data.d.ts +0 -80
  96. package/lib/typings/form.d.ts +0 -206
  97. package/lib/typings/menu.d.ts +0 -7
  98. package/lib/typings/option.d.ts +0 -209
  99. package/lib/typings/page.d.ts +0 -70
  100. package/lib/typings/table.d.ts +0 -181
  101. package/lib/typings/tools.d.ts +0 -130
  102. package/lib/typings/tree.d.ts +0 -72
  103. package/lib/typings/upload.d.ts +0 -161
  104. package/lib/typings/urls.d.ts +0 -69
  105. package/lib/utils/cache.d.ts +0 -23
  106. package/lib/utils/data.d.ts +0 -6
  107. package/lib/utils/download.d.ts +0 -6
  108. package/lib/utils/eventbus.d.ts +0 -16
  109. package/lib/utils/excel-preview.d.ts +0 -24
  110. package/lib/utils/excel-view.d.ts +0 -25
  111. package/lib/utils/export-table.d.ts +0 -12
  112. package/lib/utils/file-upload.d.ts +0 -17
  113. package/lib/utils/form-csv.d.ts +0 -18
  114. package/lib/utils/form-excel.d.ts +0 -36
  115. package/lib/utils/form-validate.d.ts +0 -29
  116. package/lib/utils/form.d.ts +0 -9
  117. package/lib/utils/icon-loader.d.ts +0 -125
  118. package/lib/utils/isEmpty.d.ts +0 -1
  119. package/lib/utils/main-openapis.d.ts +0 -8
  120. package/lib/utils/menu.d.ts +0 -6
  121. package/lib/utils/options.d.ts +0 -7
  122. package/lib/utils/page.d.ts +0 -30
  123. package/lib/utils/table.d.ts +0 -21
  124. package/lib/utils/tools.d.ts +0 -18
  125. package/lib/utils/tree.d.ts +0 -3
  126. package/lib/vite-env.d.ts +0 -8
  127. package/lib/webui.css +0 -1
  128. package/lib/webui.es.js +0 -2345
@@ -1,181 +0,0 @@
1
- import { Ref, ShallowRef } from 'vue';
2
- import { ButtonTools } from './tools';
3
- import { PageControl, PrimaryKey } from './page';
4
- import { EditorControl } from './form';
5
- import { AnyData, IUrlInfo, ReqParams, FindResult } from '../../../502417_fapi';
6
- /**
7
- * 表格控制默认设置
8
- */
9
- export interface GridControlOption {
10
- /**
11
- * 自动加载表格,默认true
12
- */
13
- autoload: boolean;
14
- /**
15
- * 主键名,默认为Id
16
- */
17
- primaryKey: string | 'Id' | 'id';
18
- /**
19
- * 记录行状态,默认为Enabled
20
- */
21
- statusKey: string | 'Enabled' | 'enabled';
22
- /**
23
- * 是否支持多行选择
24
- */
25
- selectable: Ref<boolean>;
26
- /**
27
- * 搜索栏是否可见
28
- */
29
- searchBar: Ref<boolean>;
30
- /**
31
- * 分页数量,默认10
32
- */
33
- pageSize: Ref<number>;
34
- /**
35
- * 主操作按钮列表
36
- * - 空[]则不显示
37
- * - 外部控制可用状态
38
- * - 默认:New
39
- * - 可用:
40
- * - New 新增
41
- * - 下载表格
42
- */
43
- buttons: Ref<ButtonTools>;
44
- /**
45
- * 平铺数量,超过N个的按钮,会折叠成下拉菜单
46
- * 默认值:3
47
- */
48
- flat?: number;
49
- /**
50
- * 常用操作图标,默认显示,空[]则不显示
51
- *
52
- * tool开头的可通过后端权限控制
53
- * - 默认:Reload/RowHeight/TableHeadset/Fullscreen
54
- * - 可用
55
- * - Reload: 刷新表格
56
- * - Query: 展开搜索栏
57
- * - RowHeight: 行高调整
58
- * - tool.multiple.checkbox: 显示多选框
59
- * - tool.expand.rows: 展开记录行
60
- * - tool.export.excel: 导出Excel
61
- * - tool.export.excel.all: 全部记录
62
- * - tool.export.pdf: 导出PDF
63
- * - TableHeadset: 表头设置
64
- * - Fullscreen: 设置全屏
65
- */
66
- tools: string[];
67
- /**
68
- * 远程分页,标准接口需改为find
69
- * 非标准接口需要返回data.total字段
70
- */
71
- remotePage: boolean;
72
- /**
73
- * 是否全部行展开
74
- */
75
- rowExpand: Ref<boolean>;
76
- /**
77
- * 默认行高
78
- * - 大 / 中 / 小
79
- */
80
- tableSize: Ref<'large' | 'middle' | 'small'>;
81
- /**
82
- * 表格行操作
83
- * - 默认:Edit/Delete
84
- * - 可用:
85
- * - Edit 编辑
86
- * - Delete 删除
87
- */
88
- operates: ButtonTools;
89
- }
90
- /**
91
- * 页面表格数据交互标准定义
92
- */
93
- export type GridControl<T> = GridControlOption & {
94
- /**
95
- * 重新加载表格数据
96
- */
97
- reload: Ref<boolean>;
98
- /**
99
- * 所属页面控制器
100
- */
101
- page: PageControl<AnyData>;
102
- /**
103
- * 编辑表单控制器
104
- */
105
- editor?: EditorControl<T>;
106
- /**
107
- * 当前表格点击的数据行
108
- */
109
- rowData: Ref<T | undefined>;
110
- /**
111
- * 选择的数据行
112
- */
113
- selectRows: Ref<T[]>;
114
- /**
115
- * 选择的数据行主键
116
- */
117
- selectKeys: Ref<PrimaryKey[]>;
118
- /**
119
- * 当前页码
120
- */
121
- pageNo: Ref<number>;
122
- /**
123
- * 总数量
124
- */
125
- total: Ref<number>;
126
- /**
127
- * 表格列
128
- */
129
- columns: Ref<Record<string, any>[]>;
130
- /**
131
- * 当前表格查询条件
132
- */
133
- gridQuery?: ReqParams;
134
- /**
135
- * 当前表格全部数据
136
- */
137
- tableData: ShallowRef<T[] | undefined>;
138
- /**
139
- * 数据行展开数据,主键为行主键
140
- * - 通过gridData.expandRows[record.Id]获取数据
141
- */
142
- expandRows: Ref<Record<string, AnyData>>;
143
- /**
144
- * 表格查询接口
145
- * - 优先使用
146
- * - 或使用PageData.urls.list
147
- */
148
- gridUrl?: IUrlInfo;
149
- /**
150
- * 表格更新接口
151
- * - 优先使用
152
- * - 或使用PageData.urls.update
153
- */
154
- updateUrl?: IUrlInfo;
155
- /**
156
- * 表格删除接口
157
- * - 优先使用
158
- * - 或使用PageData.urls.delete
159
- */
160
- deleteUrl?: IUrlInfo;
161
- /**
162
- * 表格是否正在加载中
163
- */
164
- isGridLoading: Ref<boolean>;
165
- /**
166
- * 表格是否正在存储中
167
- */
168
- isGridSaving: Ref<boolean>;
169
- /**
170
- * 表格数据加载后回调
171
- */
172
- afterLoad?: (result: FindResult | T[] | null) => void;
173
- /**
174
- * 表格数据更新后回调
175
- */
176
- afterUpdate?: (record: T) => void;
177
- /**
178
- * 表格数据删除后回调
179
- */
180
- afterDelete?: (record: T) => void;
181
- };
@@ -1,130 +0,0 @@
1
- import { GridControl } from './table.d';
2
- import { EditorControl } from './form.d';
3
- import { PageControl } from './page.d';
4
- import { AnyData } from '../../../502417_fapi';
5
- import { VNode, Ref, ShallowRef } from 'vue';
6
- export type ButtonType = 'link' | 'default' | 'primary' | 'ghost' | 'dashed' | 'text';
7
- export type RowRecord = Record<string, any> | RowRecord[];
8
- /**
9
- * 工具/操作按钮定义
10
- */
11
- export interface ButtonTool {
12
- /**
13
- * 按钮关键字,与权限控制相关
14
- * 功能码,必须唯一
15
- * 字符串配置时,使用默认设置
16
- */
17
- key: string;
18
- /**
19
- * 文字
20
- */
21
- label?: string;
22
- /**
23
- * 状态文字,与状态图标对应
24
- * 可切换
25
- */
26
- labels?: string[];
27
- /**
28
- * 图标
29
- */
30
- icon?: string;
31
- /**
32
- * 状态图标
33
- */
34
- icons?: string[];
35
- /**
36
- * 图标状态位
37
- * - 当前文字
38
- * - 当前图标
39
- */
40
- iconStatus?: number;
41
- /**
42
- * 下拉操作
43
- */
44
- children?: (IconTool | ButtonTool)[];
45
- /**
46
- * 控制表单控制自动弹窗
47
- * - 配置表单控制器visible
48
- * - 配置后,可不配置click事件(click自动执行)
49
- */
50
- formVisible?: Ref;
51
- /**
52
- * /// 主工具栏批量操作
53
- * @param pageCtrl 页面控制对象
54
- * @param gridCtrl 表格控制对象
55
- * @param record 数据表行记录
56
- * - 配置formVibible后,可自动执行click事件
57
- * - 实现 grid.rowData.value = record
58
- * - 实现 formVisible.value = true
59
- * - 未配置formVisible时,会提示未配置点击处理事件
60
- * 操作
61
- * @example
62
- click: <T>(_: PageControl<T>, _: GridControl<T>, row: T) => {
63
- const rowData = row as OrderEntity;
64
- },
65
- * @returns
66
- */
67
- click?: <T>(pageCtrl: PageControl<T>, gridCtrl?: GridControl<T>, record?: T | RowRecord | string[]) => void;
68
- /**
69
- * 按钮主样式
70
- */
71
- type?: ButtonType;
72
- /**
73
- * 是否禁用
74
- * @example
75
- visible: (row: OrderEntity) => { }
76
- */
77
- disabled?: boolean | ((record) => boolean); /// 表格操作
78
- /**
79
- * 是否可见
80
- * @example
81
- visible: (row: OrderEntity) => { }
82
- */
83
- visible?: boolean | ((record) => boolean); /// 表格操作
84
- /**
85
- * 是否弹出确认框,确认操作由确认方法执行
86
- */
87
- confirm?: boolean;
88
- /**
89
- * 确认框提示文字
90
- */
91
- confirmText?: string;
92
- /**
93
- * 警告色
94
- */
95
- danger?: boolean;
96
- /**
97
- * 自定义样式
98
- */
99
- class?: string;
100
- /**
101
- * 图标属性
102
- */
103
- iconProps?: Record<string, any>;
104
- /**
105
- * 下拉组件
106
- */
107
- dropdown?: string;
108
- /**
109
- * 下拉容器样式
110
- */
111
- dropdownClass?: string;
112
- /**
113
- * 角色权限控制
114
- */
115
- role?: string | string[];
116
- /**
117
- * 权限控制
118
- */
119
- permit?: string;
120
- }
121
-
122
- export type IconTool = Omit<ButtonTool, 'disabled' | 'children'> & {
123
- disabled?: boolean;
124
- children?: (IconTool | ButtonTool)[];
125
- };
126
-
127
- /**
128
- * 工具/操作按钮定义组
129
- */
130
- export type ButtonTools = (IconTool | ButtonTool | string)[];
@@ -1,72 +0,0 @@
1
- import { Ref, ShallowRef } from 'vue';
2
- import { AnyData, IUrlInfo, ReqParams } from '../../../502417_fapi';
3
- import { PageControl } from './page';
4
- export interface TreeNode {
5
- /**
6
- * 节点名称
7
- */
8
- title: string;
9
- /**
10
- * 节点ID
11
- */
12
- key: string;
13
- /**
14
- * 节点子节点
15
- */
16
- children?: TreeNode[];
17
- /**
18
- * 节点数据
19
- */
20
- [key: string]: AnyData;
21
- }
22
- /**
23
- * 树控制默认设置
24
- */
25
- export interface TreeControlOption {
26
- /**
27
- * 自动加载树,默认true
28
- */
29
- autoload: boolean;
30
- }
31
-
32
- /**
33
- * 页面左侧树数据交互标准定义
34
- */
35
- export type TreeControl = TreeControlOption & {
36
- /**
37
- * 重新加载树数据
38
- */
39
- reload: Ref<boolean>;
40
- /**
41
- * 所属页面控制器
42
- */
43
- page: PageControl<AnyData>;
44
- /**
45
- * 当前选择节点
46
- */
47
- node: Ref<TreeNode | undefined>;
48
- /**
49
- * 当前表格查询条件
50
- */
51
- treeQuery?: ReqParams;
52
- /**
53
- * 当前树数据
54
- */
55
- data: ShallowRef<TreeNode[] | undefined>;
56
- /**
57
- * 字段转换控制
58
- * - Key:目的字段
59
- * - Value:源字段,支持模板 ${}
60
- */
61
- fieldMap?: Record<string, string>;
62
- /**
63
- * 树查询接口
64
- * - 优先使用
65
- * - 或使用PageData.urls.tree
66
- */
67
- url?: IUrlInfo;
68
- /**
69
- * 是否正在加载中
70
- */
71
- isTreeLoading: Ref<boolean>;
72
- };
@@ -1,161 +0,0 @@
1
- import { ImgHTMLAttributes } from 'vue';
2
- import { AjaxResponse, IUrlInfo } from '../../../502417_fapi';
3
- /**
4
- * 上传文件的状态枚举
5
- */
6
- export enum UploadStatus {
7
- /** 正在等待上传 */
8
- Pending = 'pending',
9
-
10
- /** 正在上传中 */
11
- Uploading = 'uploading',
12
-
13
- /** 上传成功 */
14
- Success = 'success',
15
-
16
- /** 上传失败 */
17
- Error = 'error',
18
-
19
- /** 在线 */
20
- Online = 'online',
21
- /** 下线 */
22
- Offline = 'offline',
23
- }
24
-
25
- /**
26
- * Minio文件格式定义
27
- */
28
- export interface MinioFile {
29
- /**
30
- * 唯一键,Etag
31
- */
32
- ETag: string;
33
- /**
34
- * 主键文件名
35
- */
36
- Key: string;
37
- /**
38
- * - 实际文件名
39
- */
40
- FileName?: string;
41
- /**
42
- * 文件大小
43
- */
44
- Size: number;
45
- /**
46
- * 在线状态
47
- * - Online
48
- * - Offline
49
- */
50
- Status: UploadStatus;
51
- /**
52
- * 所属桶
53
- */
54
- Bucket?: string;
55
- /**
56
- * 文件类型
57
- */
58
- Type?: string;
59
- /**
60
- * 上传时间
61
- */
62
- UpdateTime?: string;
63
- /**
64
- * 文件内容
65
- * - base64
66
- * - 二进制
67
- */
68
- Content?: string | Array;
69
- }
70
-
71
- /**
72
- * 上传文件接口定义
73
- */
74
- export interface UploadFile<T = AjaxResponse> {
75
- /** 文件的唯一标识符 */
76
- uid: string;
77
-
78
- /** 文件大小(可选) */
79
- size?: number;
80
-
81
- /** 文件名称 */
82
- name: string;
83
-
84
- /** 文件名(可选,用于特殊需求) */
85
- fileName?: string;
86
-
87
- /** 最后修改时间戳(可选) */
88
- lastModified?: number;
89
-
90
- /** 最后修改日期(可选) */
91
- lastModifiedDate?: Date;
92
-
93
- /** 文件的网络地址(可选) */
94
- url?: string;
95
-
96
- /** 文件上传状态 */
97
- status?: UploadStatus;
98
-
99
- /** 文件上传的百分比进度(0 到 100,单位:%) */
100
- percent?: number;
101
-
102
- /** 文件的缩略图 URL(可选) */
103
- thumbUrl?: string;
104
-
105
- /** 图片的跨域属性(对应 `<img>` 标签的 `crossorigin`) */
106
- crossOrigin?: ImgHTMLAttributes['crossorigin'];
107
-
108
- /** 原始文件对象(可选) */
109
- originFileObj?: any;
110
-
111
- /** 服务器返回的响应数据(根据 `T` 泛型定义) */
112
- response?: T;
113
-
114
- /** 上传错误信息(可选) */
115
- error?: any;
116
-
117
- /** 文件链接的附加属性(可用于自定义跳转逻辑等) */
118
- linkProps?: any;
119
-
120
- /** 文件类型(MIME 类型) */
121
- type?: string;
122
-
123
- /** XMLHttpRequest 对象(可选,底层上传使用的请求对象) */
124
- xhr?: T;
125
-
126
- /** 文件预览 URL(可选,用于生成临时预览图片等) */
127
- preview?: string;
128
-
129
- /**
130
- * 自定义上传参数
131
- * 仅支持字符串或二进制
132
- */
133
- params: Record<string, string | Blob>;
134
-
135
- /**
136
- * minio文件信息
137
- */
138
- minioFile?: MinioFile;
139
- }
140
-
141
- /**
142
- * Excel文件上传参数
143
- */
144
- export interface ExcelFileParams {
145
- /**
146
- * 基础路径
147
- */
148
- basePath?: string;
149
- /**
150
- * 上传地址和参数
151
- */
152
- uploadUrl: IUrlInfo;
153
- /**
154
- * 重复数据检测,限制重复的字段
155
- */
156
- duplicateRules?: Array<string>;
157
- /**
158
- * 重复数据服务端检测
159
- */
160
- duplicateUrl?: IUrlInfo;
161
- }
@@ -1,69 +0,0 @@
1
- import { IUrlInfo, RequestOptions } from '../../../502417_fapi';
2
- /**
3
- * 请求相关常用地址接口定义
4
- */
5
- export interface ReqUrls {
6
- /**
7
- * 获取分页数据列表
8
- */
9
- find?: IUrlInfo;
10
- /**
11
- * 获取数据列表
12
- */
13
- list?: IUrlInfo;
14
- /**
15
- * 获取树列表
16
- */
17
- tree?: IUrlInfo;
18
- /**
19
- * 获取数据详情
20
- */
21
- detail?: IUrlInfo;
22
- /**
23
- * 默认保存数据地址
24
- */
25
- save?: IUrlInfo;
26
- /**
27
- * 默认新增数据地址
28
- */
29
- insert?: IUrlInfo;
30
- /**
31
- * 默认更新数据地址
32
- */
33
- update?: IUrlInfo;
34
- /**
35
- * 默认删除数据地址
36
- */
37
- delete?: IUrlInfo;
38
- /**
39
- * 默认上传地址
40
- */
41
- upload?: IUrlInfo;
42
- /**
43
- * 默认下载地址
44
- */
45
- download?: IUrlInfo;
46
-
47
- [key: string]: IUrlInfo | undefined;
48
- }
49
-
50
- export interface ApiUrls {
51
- /**
52
- * 所使用的API地址
53
- * - API_HOST字段名
54
- */
55
- api: string;
56
- /**
57
- * 是否需要授权Token
58
- * 方法内配置授权,返回是否允许继续调用
59
- * @param options 请求实际参数配置
60
- * @param urlInfo 前端请求配置
61
- * @param token 当前token
62
- * @returns 是否允许调用接口
63
- */
64
- authorize?: boolean | ((options: RequestOptions, urlInfo: IUrlInfo, token: string) => boolean);
65
- /**
66
- * 常用接口定义
67
- */
68
- urls: ReqUrls;
69
- }
@@ -1,23 +0,0 @@
1
- export declare enum CacheKeys {
2
- SYS_CONFIG = "SYS_CONFIG_",
3
- APP_MENU = "APP_MENU_",
4
- DICT_TYPE = "DICT_TYPE_",
5
- HOST_INFO = "HOST_INFO_",
6
- APP_PERMITS = "APP_PERMITS_",
7
- USER_SETTINGS = "USER_SETTINGS_",
8
- DICT_DATA = "DICT_DATA_",
9
- COMMON_OPTIONS = "COMMON_OPTIONS_"
10
- }
11
- export declare class Cache {
12
- static setWithServerTime<T>(key: string, data: T, lastTime: number): void;
13
- static setData<T>(key: string, data: T): void;
14
- static getData<T>(key: string): T | null;
15
- static remove(key: string): void;
16
- static clearByPrefix(prefix: string): void;
17
- static clearAll(): void;
18
- private static isTimedData;
19
- }
20
- export interface LastTimeMap {
21
- [key: string]: number;
22
- }
23
- export declare function initCacheCheck(): Promise<void>;
@@ -1,6 +0,0 @@
1
- import { AnyControl, ExecuteOptions, PostOptions } from '../typings/data.d';
2
- import { ApiResponse } from '../../../502417_fapi';
3
- export declare const doQuery: <T>(control: AnyControl, options: PostOptions<T>) => Promise<ApiResponse<T> | null>;
4
- export declare const doExecute: <T>(control: AnyControl, options: ExecuteOptions<T>) => Promise<ApiResponse<T> | null>;
5
- export declare const doSave: <T>(control: AnyControl, options?: Partial<ExecuteOptions<T>>) => Promise<ApiResponse<T> | null>;
6
- export declare const doDelete: <T>(control: AnyControl, record: string[] | Record<string, any>, options?: Partial<ExecuteOptions<T>>) => Promise<ApiResponse<T> | null>;
@@ -1,6 +0,0 @@
1
- import { PageControl } from '../typings/page.d';
2
- import { IUrlInfo, ReqParams } from '../../../502417_fapi';
3
- export declare const downloadBlob: (blob: Blob, fileName: string) => void;
4
- export declare const donwloadFromMinio: <T>(url: IUrlInfo, params?: ReqParams, pageCtrl?: PageControl<T>) => Promise<undefined> | undefined;
5
- export declare const CanPreviewFileExt: string[];
6
- export declare const previewFromMinio: (url: IUrlInfo, fileName: string, params?: ReqParams) => false | Promise<undefined>;
@@ -1,16 +0,0 @@
1
- export declare enum EventPrefix {
2
- SelectReload = "Select.Reload",
3
- RadioReload = "Radio.Reload",
4
- CheckboxReload = "Checkbox.Reload",
5
- TreeSelectReload = "TreeSelect.Reload",
6
- TreeCheckReload = "TreeCheck.Reload"
7
- }
8
- declare class EventBus {
9
- private listeners;
10
- private isValidPrefix;
11
- on(event: string, listener: (...args: any[]) => void): void;
12
- off(event: string, listener: (...args: any[]) => void): void;
13
- emit(event: string, ...args: any[]): void;
14
- }
15
- declare const eventBus: EventBus;
16
- export default eventBus;
@@ -1,24 +0,0 @@
1
- import { IUrlInfo } from '../../../502417_fapi';
2
- export declare const isCsvContent: (data: string) => boolean;
3
- export declare const isCsvType: (type?: string, filename?: string) => boolean;
4
- export declare const isExcelType: (type?: string, filename?: string) => boolean;
5
- export declare const processCsvContent: (content: string, filename?: string) => Promise<{
6
- success: boolean;
7
- blobUrl: string;
8
- fileName: string;
9
- }>;
10
- export declare const processExcelContent: (content: string, mimeType?: string, filename?: string) => {
11
- success: boolean;
12
- blobUrl: string;
13
- fileName: string;
14
- };
15
- export declare const handleFileData: (data: any, isRawMode?: boolean) => Promise<{
16
- success: boolean;
17
- blobUrl: any;
18
- fileName: any;
19
- }>;
20
- export declare const loadPreviewFile: (previewUrl: IUrlInfo, excelCtrl: any) => Promise<{
21
- success: boolean;
22
- blobUrl?: string;
23
- fileName?: string;
24
- }>;