onchain-uikit 0.0.7 → 3.9.4-alpha2

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 (146) hide show
  1. package/dist/filePreview/fontawesome-webfont.woff2 +0 -0
  2. package/dist/filePreview/iconfont.css +457 -0
  3. package/dist/filePreview/loading.gif +0 -0
  4. package/dist/filePreview/logo.svg +1 -0
  5. package/dist/filePreview/luckyexcel.umd.js +26153 -0
  6. package/dist/filePreview/luckysheet.css +7145 -0
  7. package/dist/filePreview/luckysheet.umd.js +137608 -0
  8. package/dist/filePreview/plugin.js +29474 -0
  9. package/dist/filePreview/plugins.css +10 -0
  10. package/dist/filePreview/pluginsCss.css +1 -0
  11. package/dist/filePreview/waffle_sprite.png +0 -0
  12. package/dist/font/demo.css +539 -0
  13. package/dist/font/demo_index.html +20820 -0
  14. package/dist/font/iconfont.css +3604 -0
  15. package/dist/font/iconfont.js +70 -0
  16. package/dist/font/iconfont.json +6288 -0
  17. package/dist/font/iconfont.svg +1813 -0
  18. package/dist/font/iconfont.ttf +0 -0
  19. package/dist/font/iconfont.woff +0 -0
  20. package/dist/font/iconfont.woff2 +0 -0
  21. package/dist/index.cjs.js +529 -0
  22. package/dist/index.es.js +44594 -0
  23. package/dist/index.umd.js +633 -0
  24. package/dist/logo.svg +1 -0
  25. package/dist/onchain-uikit.css +10 -0
  26. package/dist/xlsx-C9icP-aY.mjs +24775 -0
  27. package/dist/xlsx-qn1xoUuv.js +105 -0
  28. package/lib/src/App.d.ts +1 -1
  29. package/lib/src/app/main/model/context.d.ts +30 -0
  30. package/lib/src/components/OnChainAI/index.d.ts +3 -0
  31. package/lib/src/{stories/Page.stories.d.ts → components/OnChainAI/index.stories.d.ts} +4 -2
  32. package/lib/src/components/OnChainAI/welcome.d.ts +6 -0
  33. package/lib/src/components/OnChainAdvancedSearch/index.d.ts +8 -0
  34. package/lib/src/{stories/XsButton.stories.d.ts → components/OnChainAdvancedSearch/index.stories.d.ts} +1 -1
  35. package/lib/src/components/OnChainBadge/index.d.ts +52 -0
  36. package/lib/src/{stories/PlmMosaic.stories.d.ts → components/OnChainBadge/index.stories.d.ts} +2 -2
  37. package/lib/src/components/OnChainCompositeForm/index.d.ts +26 -0
  38. package/lib/src/components/OnChainCompositeForm/index.stories.d.ts +14 -0
  39. package/lib/src/components/OnChainDropMenu/index.d.ts +21 -0
  40. package/lib/src/components/OnChainDropMenu/index.stories.d.ts +14 -0
  41. package/lib/src/components/OnChainExcelViewer/index.d.ts +8 -0
  42. package/lib/src/components/OnChainExcelViewer/index.stories.d.ts +14 -0
  43. package/lib/src/components/OnChainForm/index.d.ts +14 -0
  44. package/lib/src/components/OnChainForm/index.stories.d.ts +14 -0
  45. package/lib/src/components/OnChainFormItem/index.d.ts +175 -0
  46. package/lib/src/components/OnChainFormItem/index.stories.d.ts +19 -0
  47. package/lib/src/components/OnChainFormItem/title/index.d.ts +2 -0
  48. package/lib/src/components/OnChainGenAntImage/index.d.ts +5 -0
  49. package/lib/src/components/OnChainGenAntImage/index.stories.d.ts +14 -0
  50. package/lib/src/components/OnChainGlobalLoading/index.d.ts +9 -0
  51. package/lib/src/components/OnChainGlobalLoading/index.stories.d.ts +14 -0
  52. package/lib/src/components/OnChainHighLightWords/index.d.ts +9 -0
  53. package/lib/src/components/OnChainHighLightWords/index.stories.d.ts +14 -0
  54. package/lib/src/components/OnChainIcon/index.d.ts +31 -0
  55. package/lib/src/components/OnChainIcon/index.stories.d.ts +15 -0
  56. package/lib/src/components/OnChainImage/index.d.ts +9 -0
  57. package/lib/src/components/OnChainImage/index.stories.d.ts +18 -0
  58. package/lib/src/components/OnChainInput/index.d.ts +13 -0
  59. package/lib/src/components/OnChainInput/index.stories.d.ts +14 -0
  60. package/lib/src/components/OnChainLinkInstance/index.d.ts +1 -0
  61. package/lib/src/components/OnChainLoading/index.d.ts +10 -0
  62. package/lib/src/components/OnChainLoading/index.stories.d.ts +14 -0
  63. package/lib/src/components/OnChainLoadingSkCube/index.d.ts +6 -0
  64. package/lib/src/components/OnChainLoadingSkCube/index.stories.d.ts +14 -0
  65. package/lib/src/components/OnChainMarkdown/index.d.ts +16 -0
  66. package/lib/src/components/OnChainMarkdown/index.stories.d.ts +14 -0
  67. package/lib/src/components/OnChainModal/index.d.ts +22 -0
  68. package/lib/src/components/OnChainModal/index.stories.d.ts +14 -0
  69. package/lib/src/components/OnChainMosaic/index.d.ts +7 -0
  70. package/lib/src/components/OnChainMosaic/index.stories.d.ts +14 -0
  71. package/lib/src/components/OnChainPopoverTransfer/index.d.ts +49 -0
  72. package/lib/src/components/OnChainPopoverTransfer/select/index.d.ts +18 -0
  73. package/lib/src/components/OnChainPopupSelect/index.d.ts +32 -0
  74. package/lib/src/components/OnChainPopupSelect/index.stories.d.ts +14 -0
  75. package/lib/src/components/OnChainProgress/index.d.ts +7 -0
  76. package/lib/src/components/OnChainProgress/index.stories.d.ts +16 -0
  77. package/lib/src/components/OnChainProvider/index.d.ts +18 -0
  78. package/lib/src/components/OnChainProvider/index.stories.d.ts +14 -0
  79. package/lib/src/components/OnChainPublicTree/index.d.ts +20 -0
  80. package/lib/src/components/OnChainPublicTree/index.stories.d.ts +14 -0
  81. package/lib/src/components/OnChainQueryBuilder/AbcSelectTransfer/index.d.ts +15 -0
  82. package/lib/src/components/OnChainQueryBuilder/index.d.ts +31 -0
  83. package/lib/src/components/OnChainResourceTree/index.d.ts +26 -0
  84. package/lib/src/components/OnChainResourceTree/index.stories.d.ts +14 -0
  85. package/lib/src/components/OnChainScrollBar/index.d.ts +7 -0
  86. package/lib/src/components/OnChainScrollBar/index.stories.d.ts +14 -0
  87. package/lib/src/components/OnChainScrollBarAssembly/index.d.ts +11 -0
  88. package/lib/src/components/OnChainScrollBarAssembly/index.stories.d.ts +14 -0
  89. package/lib/src/components/OnChainSelect/index.d.ts +14 -0
  90. package/lib/src/{stories/PlmSelect/PlmSelect.stories.d.ts → components/OnChainSelect/index.stories.d.ts} +8 -3
  91. package/lib/src/components/OnChainSelectPopupForm/index.d.ts +45 -0
  92. package/lib/src/components/OnChainSelectPopupForm/select/index.d.ts +20 -0
  93. package/lib/src/components/OnChainTable/ContextMenu.d.ts +8 -0
  94. package/lib/src/components/OnChainTable/EditableCell.d.ts +39 -0
  95. package/lib/src/components/OnChainTable/EditableRow.d.ts +6 -0
  96. package/lib/src/components/OnChainTable/OnChainTableFormItem/index.d.ts +14 -0
  97. package/lib/src/components/OnChainTable/ResizableTitle.d.ts +2 -0
  98. package/lib/src/components/OnChainTable/TableFooter.d.ts +13 -0
  99. package/lib/src/components/OnChainTable/TableUtils.d.ts +78 -0
  100. package/lib/src/components/OnChainTable/const.d.ts +2 -0
  101. package/lib/src/components/OnChainTable/index.d.ts +101 -0
  102. package/lib/src/components/OnChainTable/index.stories.d.ts +28 -0
  103. package/lib/src/components/OnChainTable/type.d.ts +10 -0
  104. package/lib/src/components/OnChainTable/useClipboard.d.ts +67 -0
  105. package/lib/src/components/OnChainTable/useColumn.d.ts +5 -0
  106. package/lib/src/components/OnChainTable/useCopy.d.ts +5 -0
  107. package/lib/src/components/OnChainTable/useDynamicHeight.d.ts +13 -0
  108. package/lib/src/components/OnChainTable/useFiltered.d.ts +23 -0
  109. package/lib/src/components/OnChainTable/usePaste.d.ts +5 -0
  110. package/lib/src/components/OnChainTable/useVirtualScroll.d.ts +3 -0
  111. package/lib/src/components/OnChainTable/virtualScroll.d.ts +91 -0
  112. package/lib/src/components/OnChainTableSelection/index.d.ts +40 -0
  113. package/lib/src/components/OnChainTableSelection/index.stories.d.ts +14 -0
  114. package/lib/src/components/OnChainTabs/index.d.ts +20 -0
  115. package/lib/src/components/OnChainTabs/index.stories.d.ts +14 -0
  116. package/lib/src/components/OnChainViewerError/index.d.ts +6 -0
  117. package/lib/src/components/OnChainViewerError/index.stories.d.ts +14 -0
  118. package/lib/src/components/OnChainformUploader/index.d.ts +1 -0
  119. package/lib/src/components/PlmSearchSelect/index.d.ts +18 -0
  120. package/lib/src/hooks/useShortcutKey/index.d.ts +5 -0
  121. package/lib/src/hooks/useStore/index.d.ts +14 -0
  122. package/lib/src/index.d.ts +32 -4
  123. package/lib/src/language/index.d.ts +23 -0
  124. package/lib/src/language/translate.d.ts +5 -0
  125. package/lib/src/types/gantt.d.ts +269 -0
  126. package/lib/src/typings.d.ts +610 -612
  127. package/lib/src/utils/attribute.d.ts +70 -0
  128. package/lib/src/utils/authority/basicsAuthority.d.ts +0 -5
  129. package/lib/src/utils/authority/const.d.ts +30 -0
  130. package/lib/src/utils/itemCode.d.ts +159 -0
  131. package/lib/src/utils/utility.d.ts +46 -0
  132. package/lib/typings.d.ts +126 -130
  133. package/package.json +31 -7
  134. package/lib/instance.cjs.mjs +0 -366
  135. package/lib/instance.es.mjs +0 -29301
  136. package/lib/instance.umd.mjs +0 -366
  137. package/lib/src/components/PlmMosaic/index.d.ts +0 -5
  138. package/lib/src/stories/Button.d.ts +0 -14
  139. package/lib/src/stories/Button.stories.d.ts +0 -23
  140. package/lib/src/stories/Header.d.ts +0 -11
  141. package/lib/src/stories/Header.stories.d.ts +0 -18
  142. package/lib/src/stories/OnChainProvider.d.ts +0 -12
  143. package/lib/src/stories/Page.d.ts +0 -2
  144. package/lib/src/stories/PlmSelect/index.d.ts +0 -20
  145. package/lib/src/stories/XsButton.d.ts +0 -22
  146. /package/{lib → dist}/vite.svg +0 -0
@@ -9,615 +9,613 @@ import { UserIdentity } from './utils/userIdentity';
9
9
  import { ArchivingStatusType } from './utils/itemCode';
10
10
  import { BasicsInstanceTab } from './hooks/useTabInfo/type';
11
11
  import { workflowApprove } from './pages/qualityData/utils';
12
-
13
-
14
- declare namespace APP {
15
- type user = {
16
- email: string;
17
- id: string;
18
- name: string;
19
- role: string;
20
- surname: string;
21
- username: string;
22
- avatar?: string;
23
- hasAuthFuncAuth: boolean;
24
- hasLogFuncAuth: boolean;
25
- hasUserFuncAuth: boolean;
26
- };
27
-
28
- type settings = {
29
- collapsed: boolean;
30
- };
31
- type appInfo = {
32
- title: string;
33
- name: string;
34
- };
35
- type pageInfo = {
36
- // 页面标题
37
- name: string;
38
-
39
- // 页面路径
40
- path: string;
41
-
42
- // 子页面
43
- route: {
44
- name: string;
45
- path: string;
46
- };
47
- };
48
-
49
- type historyBackOff = {
50
- // 当前页
51
- currentPage: number;
52
-
53
- // 页面路径
54
- path: string;
55
- };
56
-
57
- interface Message {
58
- error: (text: string) => void;
59
- [k: string]: any;
60
- }
61
-
62
- interface CodeItemList<T = string> {
63
- apicode: T;
64
- children: CodeItemList<T>[];
65
- description: string;
66
- icon: string;
67
- id: string;
68
- name: string;
69
- pid: null;
70
- readonly: boolean;
71
- sort: number;
72
- status: boolean;
73
- code?: string;
74
- value?: string;
75
- label?: string;
76
- [k: string]: any;
77
- }
78
-
79
- interface BudgetEditType<T = string> extends CodeItemList<T> {
80
- children: BudgetEditType<T>[];
81
- }
82
-
83
- interface CreateInstanceResult {
84
- affectedIn: string | null;
85
- canDel: boolean;
86
- checkOut: string | null;
87
- code: string;
88
- createBy: string;
89
- createTime: string;
90
- delFlag: number;
91
- id: string;
92
- itemCode: number;
93
- lifecycleId: string | null;
94
- objectApicode: string;
95
- objectId: string;
96
- publishTime: string | null;
97
- publishing: string | null;
98
- standardPartId: string | null;
99
- tenantId: string;
100
- updateBy: string | null;
101
- updateTime: string;
102
- versionNumber: string;
103
- versionOrder: string;
104
- workflowCode: string;
105
- workspaceId: string;
106
- }
107
-
108
- type Project = {
109
- /** 当前项目实例的id */
110
- id: string;
111
- name: string;
112
- projectName: string;
113
- healthList: HealthStatusObject[];
114
- /** 编辑预算费用方式的配置列表 */
115
- budgetEditTypeList: BudgetEditType<BudgetEditTypeApiCode>[];
116
- /** 概览进度列表数据 */
117
- dateTableData: {
118
- name: string;
119
- start: string;
120
- apicode: string;
121
- end: string;
122
- days: string;
123
- start_gap: string;
124
- end_gap: string;
125
- days_gap: string;
126
- progress: string;
127
- progress_name: string;
128
- forbiddenTime: Record<string, ForbiddenTime>;
129
- attrs: {
130
- days: BasicsAttribute;
131
- start: BasicsAttribute;
132
- end: BasicsAttribute;
133
- progress?: BasicsAttribute;
134
- };
135
- id: number;
136
- }[];
137
- /** 健康状态 */
138
- health?: HealthStatus;
139
- /** 所有者 */
140
- owner: string;
141
- /** 转移所有者目标用户 */
142
- transferOwner: string;
143
- /** 预算费用 */
144
- budget: string | number;
145
- /** 实际费用 */
146
- actual: string | number;
147
- /** 项目实例所在的项目id */
148
- projectId: string;
149
- /** 是否自上而下 */
150
- isTopDown: boolean;
151
- /** 日历 */
152
- ownerType: "" | "1";
153
- calendar: Partial<PlmProject.Calendar> & {
154
- startFormat: string;
155
- endFormat: string;
156
- isInit: boolean;
157
- };
158
- calendarInstance: PlmProject.GanttCalendarInstance<Moment> | null;
159
- /** 项目经理 */
160
- projectManager: string;
161
- projectStatusName: string;
162
- /** 项目大类 apicode: id 映射 */
163
- columnApiCodeIdMap: Record<string, any>;
164
- /** 是否模板下拉列表 */
165
- isTemplateList: CodeItemList<"Yes" | "No">[];
166
- /** 是否是模板状态 */
167
- // templateState: CodeItemList;
168
- /** 是否是模板 */
169
- isTemplate: boolean;
170
- /** 当前进度 */
171
- currentProcess: string;
172
- /** 计划进度 */
173
- scheduleProcess: string;
174
- /** 已用工时 */
175
- usedHours: string;
176
- /** 计划开始时间 */
177
- startDate: string;
178
- /** 计划结束时间 */
179
- endDate: string;
180
- /** 计划时长 */
181
- days: string;
182
- /** 当前实例是否在发布后 基线变更中删除 */
183
- isDeleteInProcess: boolean;
184
- /** listCode列表缓存对象 */
185
- listCodeListCacheObject: Record<string, APP.CodeItemList[]>;
186
- };
187
-
188
- type instanceInfoType<T = string> = {
189
- /** @deprecated 实例 id */
190
- id: string;
191
- /** 实例 id */
192
- insId: string;
193
- /** 产品id */
194
- productId: string;
195
- /** 产品名称 */
196
- productName: string;
197
- /** 通用描述(name) */
198
- insDesc: string;
199
- /** 服务端给的是`number`或者`string`,这里使用`any`类型处理,可以使用`==`隐方转换 */
200
- itemCode: any;
201
- /** 实例类型名称 */
202
- objectName: string;
203
- /** 实例类型 id */
204
- objectId: string;
205
- /** 实例类型 ApiCode */
206
- objectApicode: string;
207
- /** 实例拥有的使有公有属性 */
208
- BasicAttrs: BasicsAttribute<T>[];
209
- /** 编辑权限,以及所有的数据 */
210
- updateInstanceVo: Record<string, any>;
211
- /** 所有tab页签 */
212
- allTabs: BasicsInstanceTab[];
213
- /** 实际渲染的页签(例如概览就通过公有属性转换过来) */
214
- tabs: any[];
215
- /** 实施对象tab页签 */
216
- effectTabs: any;
217
- /** tab页签的数量 */
218
- tabInsCountMap: any;
219
- /** 是否有子节点 */
220
- insBom: boolean;
221
- /** 是否在变更流程中 */
222
- inChangeOrderWorkflow: any;
223
- /**@deprecated 项目是否在变更流程中 */
224
- affectedInPCO: boolean;
225
- /** 实例在哪些流程中 */
226
- affectedIn: string;
227
- /** 工作流id */
228
- workflowId: string;
229
- /** 编号 */
230
- number: string;
231
- Name: string;
232
- /** 当前版本 */
233
- currentVersion: string;
234
- /** 当前版号 */
235
- currentVersionOrder: string;
236
- /**@deprecated 最新版本 */
237
- insVersion: string;
238
- /** 最新版号 */
239
- insVersionOrder: string | number;
240
- /** 最新版本过权限 (有'~#~') */
241
- insVersionWithAuth: string;
242
- /** 最新版次过权限 (有'~#~') */
243
- insVersionOrderWithAuth: string;
244
- /** 最新版本(无'~#~') */
245
- insVersionUnbound: string;
246
- /** 最新版次(无'~#~') */
247
- insVersionOrderUnbound: string;
248
- /** 签出状态 */
249
- checkOut: boolean;
250
- /** 属性id:属性值 */
251
- attributes: { [k: string]: any };
252
- /** @deprecated */
253
- attributeList: {
254
- apiCode: string;
255
- attrId: string;
256
- attrValue: string;
257
- [k: string]: any;
258
- }[];
259
- /** 基本属性布局方式 upperAndLowerLayout: 上下布局 | leftAndRightLayout: 左右布局 */
260
- attributeStyle: AttributeStyle;
261
- userDetails: { [k: string]: any };
262
- userItemCode: any;
263
- UserContent: { [k: string]: any };
264
- archivingStatus?: ArchivingStatusType;
265
- /** 工作流拒绝时的指定目标用户ID */
266
- workflowRejectTargetUserId?: string;
267
- workflow: Workflow["workflow"];
268
-
269
- /** 生命周期 */
270
- lifecycle: {
271
- id: string;
272
- instanceId: string;
273
- objectId: string | null;
274
- apicode: string;
275
- name: string;
276
- showName: string;
277
- color: string;
278
- status: boolean;
279
- bomRule: string;
280
- sort: number;
281
- code: number;
282
- isBase: boolean;
283
- objectShowName: string | null;
284
- objectBomRule: string | null;
285
- };
286
- children?: instanceInfoType<T>[];
287
- [k: string]: any;
288
- };
289
-
290
- /** 工作流 */
291
- interface Workflow<T = string> extends instanceInfoType<T> {
292
- changeType: "order" | "request";
293
- children?: Workflow<T>[];
294
- workflow: {
295
- cancel: boolean;
296
- changeId: string;
297
- changeItemCode: number;
298
- changeNumber: string;
299
- changeTypeName: string;
300
- crtNodeClazz: string;
301
- crtNodeId: string;
302
- crtNodeIntoTime: string;
303
- crtNodeName: string;
304
- end: boolean;
305
- publish: boolean;
306
- waitingApprovalObjectInstanceIds: string;
307
- wfDefId: string;
308
- wfDefName: string;
309
- wfId: string;
310
- wfName: string;
311
- [k: string]: any;
312
- };
313
- workflowNodes: {
314
- children: Array<any>;
315
- code: string;
316
- id: string;
317
- name: string;
318
- sort: number;
319
- type: string;
320
- [k: string]: any;
321
- }[];
322
- workflowInstance: {
323
- change_instance_desc: string;
324
- change_instance_id: string;
325
- change_instance_item_code: number;
326
- change_instance_no: string;
327
- change_instance_type: string;
328
- create_by: string;
329
- create_time: string;
330
- follower: string;
331
- id: string;
332
- init_type: number;
333
- instance_name: string;
334
- is_cancel: boolean;
335
- is_denied: boolean;
336
- is_end: boolean;
337
- is_pause: boolean;
338
- is_publish: boolean;
339
- org_id: string;
340
- product_id: string;
341
- reject_src_node_id: string;
342
- remark: string;
343
- running_node_id: string;
344
- running_node_name: string;
345
- running_node_sort: number;
346
- status: string;
347
- update_by: string;
348
- update_time: string;
349
- workflow_definition_id: string;
350
- workflow_definition_name: string;
351
- workflow_definition_version: string;
352
- workflow_definition_version_id: string;
353
- [k: string]: any;
354
- };
355
- workflowNodesThumb: {
356
- ActiveNodes: any[];
357
- BranchNodes: any;
358
- MainNode: Record<string, any>;
359
- [k: string]: any;
360
- }[];
361
- }
362
-
363
- /** 文件实例 */
364
- interface FileInstance<T = string> extends instanceInfoType<T> {
365
- fileUrl: any;
366
- fileName: any;
367
- FileFormat: any;
368
- FileSize: any;
369
- FileSizeWithAuth: any;
370
- storeNumber: any;
371
- CheckOutUser: any;
372
- onlineEditStatus: any;
373
- LastEditTime: any;
374
- }
375
-
376
- /** 物料实例 */
377
- interface MaterialInstance<T = string> extends instanceInfoType<T> {
378
- extraAttr: any;
379
- }
380
-
381
- interface BasicsProjectInstance<T = string>
382
- extends instanceInfoType<T>,
383
- Workflow<T> {
384
- /** 实例在哪些流程中 (PSCO: 状态变更 | PCO: 基线变更) */
385
- affectedIn: "PCO" | "PSCO" | "";
386
- /** 日历id */
387
- calendarId: string;
388
- /** 前置任务已完成 */
389
- preComplete: boolean;
390
- /** 预算编辑方式 */
391
- budgetEditType: string;
392
- /** 项目版本号 */
393
- projectVersionOrder: string;
394
- /** 前置任务 */
395
- preTask: string;
396
- /** 后置任务 */
397
- postTask: string;
398
- /** 目标交付数量 */
399
- targetDeliveryCount: string;
400
- /** 资源用户 */
401
- resUsers?: string[];
402
- /** 是否模板 */
403
- isTemplate?: boolean;
404
- /** 父级预算费用 */
405
- pbudget?: string;
406
- /** 父级类型 */
407
- pobjectApicode?: string;
408
- children?: BasicsProjectInstance<T>[];
409
- }
410
-
411
- /** 项目实例 */
412
- interface ProjectInstance<T = string> extends BasicsProjectInstance<T> {
413
- project: Project;
414
- projectGeneral: ProjectGeneral;
415
- projectStatusExample: ProjectStatusExample;
416
- children?: ProjectInstance<T>[];
417
- }
418
-
419
- /** 个性化配置 */
420
- interface Personality extends PlmProject.Personality {
421
- /** 是否有科目数据 */
422
- isHasSubject: boolean;
423
- /** 全局可替代bom */
424
- globalSubstituteCopyBom: boolean;
425
- /** BOM位号和数量强制检查 */
426
- bomCheck: boolean;
427
- /** 是否显示无权限字段 */
428
- showNoPermissionField: boolean;
429
- /** 是否显示缩略图 */
430
- showThumb: boolean;
431
- /**页面滚动加载数量 */
432
- pageScrollingNum: number;
433
- [k: string]: any;
434
- }
435
-
436
- interface CurrentUserInfo {
437
- id?: any;
438
- consumerName?: any;
439
- empno?: any;
440
- orgCode?: any;
441
- email?: any;
442
- name?: any;
443
- avatar?: any;
444
- status?: any;
445
- deptname?: any;
446
- description?: any;
447
- managerRoles: string;
448
- otherRoles: string;
449
- managerRoleApicodes: string;
450
- otherRoleApicodes: string;
451
- hasLogFuncAuth: boolean;
452
- hasUserFuncAuth: boolean;
453
- hasAuthFuncAuth: boolean;
454
- userManager: boolean;
455
- }
456
-
457
- /** 产品清单对象 */
458
- interface Detailed {
459
- canDel: boolean;
460
- category: string;
461
- icon: string;
462
- id: string;
463
- isShow: number;
464
- name: string;
465
- parentId: string;
466
- sort: number;
467
- type: string;
468
- [k: string]: any;
469
- }
470
-
471
- /** 全局模块对象 */
472
- interface Module {
473
- alias: string;
474
- apiContext: string;
475
- apicode: string;
476
- id: string;
477
- itemCodes: null | number;
478
- name: string;
479
- pathCode: null | string;
480
- shortcutsCode: string;
481
- sort: number;
482
- status: boolean;
483
- }
484
-
485
- /** 产品数据实例分类对象 */
486
- interface InstanceClassify {
487
- belongModule: string;
488
- butTabCode: null;
489
- children: InstanceClassify | null;
490
- conditionId: null;
491
- count: number;
492
- delFlag: boolean;
493
- icon: string;
494
- id: string;
495
- itemCode: number;
496
- leaf: boolean;
497
- level: number;
498
- name: string;
499
- objectApicode: string | null;
500
- parentId: string | null;
501
- pathCode: string | null;
502
- sort: number;
503
- type: number;
504
- }
505
- }
506
-
507
- declare interface ResponseData<T = any> {
508
- code: number;
509
- message: string;
510
- result: T;
511
- success: boolean;
512
- warning: boolean;
513
- timestamp: number;
514
- [k: string]: any;
515
- }
516
- /**
517
- * Base props
518
- */
519
- interface BaseComponentProps<T = any> {
520
- className?: string;
521
- children?: React.ReactNode;
522
- id?: string;
523
- ref?: React.Ref<T>;
524
- style?: CSSProperties;
525
- }
526
-
527
- export type logType =
528
- | "create"
529
- | "add"
530
- | "del"
531
- | "update"
532
- | "sort"
533
- | "display"
534
- | "enable"
535
- | "disable"
536
- | "other"
537
- | "transfer"
538
- | "reduction"
539
- | "unlock"
540
- | "saveAs"
541
- | "export"
542
- | "release"
543
- | "upload"
544
- | "addAppro" //添加审批人
545
- | "addConcern" //添加关注人
546
- | "delAppro"
547
- | "delConcern"
548
- | "download"
549
- | "importCreate"
550
- | "importUpdate";
551
-
552
- export type tableType =
553
- | "menu"
554
- | "cad"
555
- | "coderule"
556
- | "version"
557
- | "authorization"
558
- | "list"
559
- | "condition"
560
- | "object"
561
- | "attribute"
562
- | "role"
563
- | "instance"
564
- | "lifecycle"
565
- | "extension"
566
- | "depart"
567
- | "tab"
568
- | "configEmail"
569
- | "configCustomization"
570
- | "configSso"
571
- | "configFormat"
572
- | "configPrint"
573
- | "departInfo"
574
- | "userStrategy"
575
- | "expression"
576
- | "workflow"
577
- | "user"
578
- | "userGroup"
579
- | "printSignature"
580
- | "filter"
581
- | "trigger"
582
- | "printTemplate";
583
-
584
- interface SetOperateLogProps {
585
- id: string;
586
- table: tableType;
587
- type: logType;
588
- val: {
589
- name?: string;
590
- description: string;
591
- };
592
- }
593
-
594
- export interface QiankunStateFromMaster {
595
- operateLog: (params: SetOperateLogProps) => void;
596
- generateAddDescription: (
597
- labelVal: Record<string, any>,
598
- newVal: Record<string, any>
599
- ) => string;
600
- generateUpdateDescription: (
601
- labelVal: Record<string, any>,
602
- oldVal: Record<string, any>,
603
- newVal: Record<string, any>
604
- ) => string;
605
- getLabelInOptions: (params: {
606
- value: string | boolean | string[];
607
- options: any;
608
- adaptor?:
609
- | {
610
- label: string;
611
- value: string;
612
- children?: string | undefined;
613
- }
614
- | undefined;
615
- }) => any;
616
- operateTypeMap: Record<logType, string>;
617
- }
618
-
619
- export interface ClipboardArray<T = any> extends Array<T> {
620
- namespace?: string;
621
- type?: "shear" | "copy";
622
- onPasteCallback?: (runtimeNamespace: string) => Promise<any[]>;
623
- }
12
+ declare namespace APP {
13
+ type user = {
14
+ email: string;
15
+ id: string;
16
+ name: string;
17
+ role: string;
18
+ surname: string;
19
+ username: string;
20
+ avatar?: string;
21
+ hasAuthFuncAuth: boolean;
22
+ hasLogFuncAuth: boolean;
23
+ hasUserFuncAuth: boolean;
24
+ };
25
+
26
+ type settings = {
27
+ collapsed: boolean;
28
+ };
29
+ type appInfo = {
30
+ title: string;
31
+ name: string;
32
+ };
33
+ type pageInfo = {
34
+ // 页面标题
35
+ name: string;
36
+
37
+ // 页面路径
38
+ path: string;
39
+
40
+ // 子页面
41
+ route: {
42
+ name: string;
43
+ path: string;
44
+ };
45
+ };
46
+
47
+ type historyBackOff = {
48
+ // 当前页
49
+ currentPage: number;
50
+
51
+ // 页面路径
52
+ path: string;
53
+ };
54
+
55
+ interface Message {
56
+ error: (text: string) => void;
57
+ [k: string]: any;
58
+ }
59
+
60
+ interface CodeItemList<T = string> {
61
+ apicode: T;
62
+ children: CodeItemList<T>[];
63
+ description: string;
64
+ icon: string;
65
+ id: string;
66
+ name: string;
67
+ pid: null;
68
+ readonly: boolean;
69
+ sort: number;
70
+ status: boolean;
71
+ code?: string;
72
+ value?: string;
73
+ label?: string;
74
+ [k: string]: any;
75
+ }
76
+
77
+ interface BudgetEditType<T = string> extends CodeItemList<T> {
78
+ children: BudgetEditType<T>[];
79
+ }
80
+
81
+ interface CreateInstanceResult {
82
+ affectedIn: string | null;
83
+ canDel: boolean;
84
+ checkOut: string | null;
85
+ code: string;
86
+ createBy: string;
87
+ createTime: string;
88
+ delFlag: number;
89
+ id: string;
90
+ itemCode: number;
91
+ lifecycleId: string | null;
92
+ objectApicode: string;
93
+ objectId: string;
94
+ publishTime: string | null;
95
+ publishing: string | null;
96
+ standardPartId: string | null;
97
+ tenantId: string;
98
+ updateBy: string | null;
99
+ updateTime: string;
100
+ versionNumber: string;
101
+ versionOrder: string;
102
+ workflowCode: string;
103
+ workspaceId: string;
104
+ }
105
+
106
+ type Project = {
107
+ /** 当前项目实例的id */
108
+ id: string;
109
+ name: string;
110
+ projectName: string;
111
+ healthList: HealthStatusObject[];
112
+ /** 编辑预算费用方式的配置列表 */
113
+ budgetEditTypeList: BudgetEditType<BudgetEditTypeApiCode>[];
114
+ /** 概览进度列表数据 */
115
+ dateTableData: {
116
+ name: string;
117
+ start: string;
118
+ apicode: string;
119
+ end: string;
120
+ days: string;
121
+ start_gap: string;
122
+ end_gap: string;
123
+ days_gap: string;
124
+ progress: string;
125
+ progress_name: string;
126
+ forbiddenTime: Record<string, ForbiddenTime>;
127
+ attrs: {
128
+ days: BasicsAttribute;
129
+ start: BasicsAttribute;
130
+ end: BasicsAttribute;
131
+ progress?: BasicsAttribute;
132
+ };
133
+ id: number;
134
+ }[];
135
+ /** 健康状态 */
136
+ health?: HealthStatus;
137
+ /** 所有者 */
138
+ owner: string;
139
+ /** 转移所有者目标用户 */
140
+ transferOwner: string;
141
+ /** 预算费用 */
142
+ budget: string | number;
143
+ /** 实际费用 */
144
+ actual: string | number;
145
+ /** 项目实例所在的项目id */
146
+ projectId: string;
147
+ /** 是否自上而下 */
148
+ isTopDown: boolean;
149
+ /** 日历 */
150
+ ownerType: "" | "1";
151
+ calendar: Partial<PlmProject.Calendar> & {
152
+ startFormat: string;
153
+ endFormat: string;
154
+ isInit: boolean;
155
+ };
156
+ calendarInstance: PlmProject.GanttCalendarInstance<Moment> | null;
157
+ /** 项目经理 */
158
+ projectManager: string;
159
+ projectStatusName: string;
160
+ /** 项目大类 apicode: id 映射 */
161
+ columnApiCodeIdMap: Record<string, any>;
162
+ /** 是否模板下拉列表 */
163
+ isTemplateList: CodeItemList<"Yes" | "No">[];
164
+ /** 是否是模板状态 */
165
+ // templateState: CodeItemList;
166
+ /** 是否是模板 */
167
+ isTemplate: boolean;
168
+ /** 当前进度 */
169
+ currentProcess: string;
170
+ /** 计划进度 */
171
+ scheduleProcess: string;
172
+ /** 已用工时 */
173
+ usedHours: string;
174
+ /** 计划开始时间 */
175
+ startDate: string;
176
+ /** 计划结束时间 */
177
+ endDate: string;
178
+ /** 计划时长 */
179
+ days: string;
180
+ /** 当前实例是否在发布后 基线变更中删除 */
181
+ isDeleteInProcess: boolean;
182
+ /** listCode列表缓存对象 */
183
+ listCodeListCacheObject: Record<string, APP.CodeItemList[]>;
184
+ };
185
+
186
+ type instanceInfoType<T = string> = {
187
+ /** @deprecated 实例 id */
188
+ id: string;
189
+ /** 实例 id */
190
+ insId: string;
191
+ /** 产品id */
192
+ productId: string;
193
+ /** 产品名称 */
194
+ productName: string;
195
+ /** 通用描述(name) */
196
+ insDesc: string;
197
+ /** 服务端给的是`number`或者`string`,这里使用`any`类型处理,可以使用`==`隐方转换 */
198
+ itemCode: any;
199
+ /** 实例类型名称 */
200
+ objectName: string;
201
+ /** 实例类型 id */
202
+ objectId: string;
203
+ /** 实例类型 ApiCode */
204
+ objectApicode: string;
205
+ /** 实例拥有的使有公有属性 */
206
+ BasicAttrs: BasicsAttribute<T>[];
207
+ /** 编辑权限,以及所有的数据 */
208
+ updateInstanceVo: Record<string, any>;
209
+ /** 所有tab页签 */
210
+ allTabs: BasicsInstanceTab[];
211
+ /** 实际渲染的页签(例如概览就通过公有属性转换过来) */
212
+ tabs: any[];
213
+ /** 实施对象tab页签 */
214
+ effectTabs: any;
215
+ /** tab页签的数量 */
216
+ tabInsCountMap: any;
217
+ /** 是否有子节点 */
218
+ insBom: boolean;
219
+ /** 是否在变更流程中 */
220
+ inChangeOrderWorkflow: any;
221
+ /**@deprecated 项目是否在变更流程中 */
222
+ affectedInPCO: boolean;
223
+ /** 实例在哪些流程中 */
224
+ affectedIn: string;
225
+ /** 工作流id */
226
+ workflowId: string;
227
+ /** 编号 */
228
+ number: string;
229
+ Name: string;
230
+ /** 当前版本 */
231
+ currentVersion: string;
232
+ /** 当前版号 */
233
+ currentVersionOrder: string;
234
+ /**@deprecated 最新版本 */
235
+ insVersion: string;
236
+ /** 最新版号 */
237
+ insVersionOrder: string | number;
238
+ /** 最新版本过权限 (有'~#~') */
239
+ insVersionWithAuth: string;
240
+ /** 最新版次过权限 (有'~#~') */
241
+ insVersionOrderWithAuth: string;
242
+ /** 最新版本(无'~#~') */
243
+ insVersionUnbound: string;
244
+ /** 最新版次(无'~#~') */
245
+ insVersionOrderUnbound: string;
246
+ /** 签出状态 */
247
+ checkOut: boolean;
248
+ /** 属性id:属性值 */
249
+ attributes: { [k: string]: any };
250
+ /** @deprecated */
251
+ attributeList: {
252
+ apiCode: string;
253
+ attrId: string;
254
+ attrValue: string;
255
+ [k: string]: any;
256
+ }[];
257
+ /** 基本属性布局方式 upperAndLowerLayout: 上下布局 | leftAndRightLayout: 左右布局 */
258
+ attributeStyle: AttributeStyle;
259
+ userDetails: { [k: string]: any };
260
+ userItemCode: any;
261
+ UserContent: { [k: string]: any };
262
+ archivingStatus?: ArchivingStatusType;
263
+ /** 工作流拒绝时的指定目标用户ID */
264
+ workflowRejectTargetUserId?: string;
265
+ workflow: Workflow["workflow"];
266
+
267
+ /** 生命周期 */
268
+ lifecycle: {
269
+ id: string;
270
+ instanceId: string;
271
+ objectId: string | null;
272
+ apicode: string;
273
+ name: string;
274
+ showName: string;
275
+ color: string;
276
+ status: boolean;
277
+ bomRule: string;
278
+ sort: number;
279
+ code: number;
280
+ isBase: boolean;
281
+ objectShowName: string | null;
282
+ objectBomRule: string | null;
283
+ };
284
+ children?: instanceInfoType<T>[];
285
+ [k: string]: any;
286
+ };
287
+
288
+ /** 工作流 */
289
+ interface Workflow<T = string> extends instanceInfoType<T> {
290
+ changeType: "order" | "request";
291
+ children?: Workflow<T>[];
292
+ workflow: {
293
+ cancel: boolean;
294
+ changeId: string;
295
+ changeItemCode: number;
296
+ changeNumber: string;
297
+ changeTypeName: string;
298
+ crtNodeClazz: string;
299
+ crtNodeId: string;
300
+ crtNodeIntoTime: string;
301
+ crtNodeName: string;
302
+ end: boolean;
303
+ publish: boolean;
304
+ waitingApprovalObjectInstanceIds: string;
305
+ wfDefId: string;
306
+ wfDefName: string;
307
+ wfId: string;
308
+ wfName: string;
309
+ [k: string]: any;
310
+ };
311
+ workflowNodes: {
312
+ children: Array<any>;
313
+ code: string;
314
+ id: string;
315
+ name: string;
316
+ sort: number;
317
+ type: string;
318
+ [k: string]: any;
319
+ }[];
320
+ workflowInstance: {
321
+ change_instance_desc: string;
322
+ change_instance_id: string;
323
+ change_instance_item_code: number;
324
+ change_instance_no: string;
325
+ change_instance_type: string;
326
+ create_by: string;
327
+ create_time: string;
328
+ follower: string;
329
+ id: string;
330
+ init_type: number;
331
+ instance_name: string;
332
+ is_cancel: boolean;
333
+ is_denied: boolean;
334
+ is_end: boolean;
335
+ is_pause: boolean;
336
+ is_publish: boolean;
337
+ org_id: string;
338
+ product_id: string;
339
+ reject_src_node_id: string;
340
+ remark: string;
341
+ running_node_id: string;
342
+ running_node_name: string;
343
+ running_node_sort: number;
344
+ status: string;
345
+ update_by: string;
346
+ update_time: string;
347
+ workflow_definition_id: string;
348
+ workflow_definition_name: string;
349
+ workflow_definition_version: string;
350
+ workflow_definition_version_id: string;
351
+ [k: string]: any;
352
+ };
353
+ workflowNodesThumb: {
354
+ ActiveNodes: any[];
355
+ BranchNodes: any;
356
+ MainNode: Record<string, any>;
357
+ [k: string]: any;
358
+ }[];
359
+ }
360
+
361
+ /** 文件实例 */
362
+ interface FileInstance<T = string> extends instanceInfoType<T> {
363
+ fileUrl: any;
364
+ fileName: any;
365
+ FileFormat: any;
366
+ FileSize: any;
367
+ FileSizeWithAuth: any;
368
+ storeNumber: any;
369
+ CheckOutUser: any;
370
+ onlineEditStatus: any;
371
+ LastEditTime: any;
372
+ }
373
+
374
+ /** 物料实例 */
375
+ interface MaterialInstance<T = string> extends instanceInfoType<T> {
376
+ extraAttr: any;
377
+ }
378
+
379
+ interface BasicsProjectInstance<T = string>
380
+ extends instanceInfoType<T>,
381
+ Workflow<T> {
382
+ /** 实例在哪些流程中 (PSCO: 状态变更 | PCO: 基线变更) */
383
+ affectedIn: "PCO" | "PSCO" | "";
384
+ /** 日历id */
385
+ calendarId: string;
386
+ /** 前置任务已完成 */
387
+ preComplete: boolean;
388
+ /** 预算编辑方式 */
389
+ budgetEditType: string;
390
+ /** 项目版本号 */
391
+ projectVersionOrder: string;
392
+ /** 前置任务 */
393
+ preTask: string;
394
+ /** 后置任务 */
395
+ postTask: string;
396
+ /** 目标交付数量 */
397
+ targetDeliveryCount: string;
398
+ /** 资源用户 */
399
+ resUsers?: string[];
400
+ /** 是否模板 */
401
+ isTemplate?: boolean;
402
+ /** 父级预算费用 */
403
+ pbudget?: string;
404
+ /** 父级类型 */
405
+ pobjectApicode?: string;
406
+ children?: BasicsProjectInstance<T>[];
407
+ }
408
+
409
+ /** 项目实例 */
410
+ interface ProjectInstance<T = string> extends BasicsProjectInstance<T> {
411
+ project: Project;
412
+ projectGeneral: ProjectGeneral;
413
+ projectStatusExample: ProjectStatusExample;
414
+ children?: ProjectInstance<T>[];
415
+ }
416
+
417
+ /** 个性化配置 */
418
+ interface Personality extends PlmProject.Personality {
419
+ /** 是否有科目数据 */
420
+ isHasSubject: boolean;
421
+ /** 全局可替代bom */
422
+ globalSubstituteCopyBom: boolean;
423
+ /** BOM位号和数量强制检查 */
424
+ bomCheck: boolean;
425
+ /** 是否显示无权限字段 */
426
+ showNoPermissionField: boolean;
427
+ /** 是否显示缩略图 */
428
+ showThumb: boolean;
429
+ /**页面滚动加载数量 */
430
+ pageScrollingNum: number;
431
+ [k: string]: any;
432
+ }
433
+
434
+ interface CurrentUserInfo {
435
+ id?: any;
436
+ consumerName?: any;
437
+ empno?: any;
438
+ orgCode?: any;
439
+ email?: any;
440
+ name?: any;
441
+ avatar?: any;
442
+ status?: any;
443
+ deptname?: any;
444
+ description?: any;
445
+ managerRoles: string;
446
+ otherRoles: string;
447
+ managerRoleApicodes: string;
448
+ otherRoleApicodes: string;
449
+ hasLogFuncAuth: boolean;
450
+ hasUserFuncAuth: boolean;
451
+ hasAuthFuncAuth: boolean;
452
+ userManager: boolean;
453
+ }
454
+
455
+ /** 产品清单对象 */
456
+ interface Detailed {
457
+ canDel: boolean;
458
+ category: string;
459
+ icon: string;
460
+ id: string;
461
+ isShow: number;
462
+ name: string;
463
+ parentId: string;
464
+ sort: number;
465
+ type: string;
466
+ [k: string]: any;
467
+ }
468
+
469
+ /** 全局模块对象 */
470
+ interface Module {
471
+ alias: string;
472
+ apiContext: string;
473
+ apicode: string;
474
+ id: string;
475
+ itemCodes: null | number;
476
+ name: string;
477
+ pathCode: null | string;
478
+ shortcutsCode: string;
479
+ sort: number;
480
+ status: boolean;
481
+ }
482
+
483
+ /** 产品数据实例分类对象 */
484
+ interface InstanceClassify {
485
+ belongModule: string;
486
+ butTabCode: null;
487
+ children: InstanceClassify | null;
488
+ conditionId: null;
489
+ count: number;
490
+ delFlag: boolean;
491
+ icon: string;
492
+ id: string;
493
+ itemCode: number;
494
+ leaf: boolean;
495
+ level: number;
496
+ name: string;
497
+ objectApicode: string | null;
498
+ parentId: string | null;
499
+ pathCode: string | null;
500
+ sort: number;
501
+ type: number;
502
+ }
503
+ }
504
+
505
+ declare interface ResponseData<T = any> {
506
+ code: number;
507
+ message: string;
508
+ result: T;
509
+ success: boolean;
510
+ warning: boolean;
511
+ timestamp: number;
512
+ [k: string]: any;
513
+ }
514
+ /**
515
+ * Base props
516
+ */
517
+ interface BaseComponentProps<T = any> {
518
+ className?: string;
519
+ children?: React.ReactNode;
520
+ id?: string;
521
+ ref?: React.Ref<T>;
522
+ style?: CSSProperties;
523
+ }
524
+
525
+ export type logType =
526
+ | "create"
527
+ | "add"
528
+ | "del"
529
+ | "update"
530
+ | "sort"
531
+ | "display"
532
+ | "enable"
533
+ | "disable"
534
+ | "other"
535
+ | "transfer"
536
+ | "reduction"
537
+ | "unlock"
538
+ | "saveAs"
539
+ | "export"
540
+ | "release"
541
+ | "upload"
542
+ | "addAppro" //添加审批人
543
+ | "addConcern" //添加关注人
544
+ | "delAppro"
545
+ | "delConcern"
546
+ | "download"
547
+ | "importCreate"
548
+ | "importUpdate";
549
+
550
+ export type tableType =
551
+ | "menu"
552
+ | "cad"
553
+ | "coderule"
554
+ | "version"
555
+ | "authorization"
556
+ | "list"
557
+ | "condition"
558
+ | "object"
559
+ | "attribute"
560
+ | "role"
561
+ | "instance"
562
+ | "lifecycle"
563
+ | "extension"
564
+ | "depart"
565
+ | "tab"
566
+ | "configEmail"
567
+ | "configCustomization"
568
+ | "configSso"
569
+ | "configFormat"
570
+ | "configPrint"
571
+ | "departInfo"
572
+ | "userStrategy"
573
+ | "expression"
574
+ | "workflow"
575
+ | "user"
576
+ | "userGroup"
577
+ | "printSignature"
578
+ | "filter"
579
+ | "trigger"
580
+ | "printTemplate";
581
+
582
+ interface SetOperateLogProps {
583
+ id: string;
584
+ table: tableType;
585
+ type: logType;
586
+ val: {
587
+ name?: string;
588
+ description: string;
589
+ };
590
+ }
591
+
592
+ export interface QiankunStateFromMaster {
593
+ operateLog: (params: SetOperateLogProps) => void;
594
+ generateAddDescription: (
595
+ labelVal: Record<string, any>,
596
+ newVal: Record<string, any>
597
+ ) => string;
598
+ generateUpdateDescription: (
599
+ labelVal: Record<string, any>,
600
+ oldVal: Record<string, any>,
601
+ newVal: Record<string, any>
602
+ ) => string;
603
+ getLabelInOptions: (params: {
604
+ value: string | boolean | string[];
605
+ options: any;
606
+ adaptor?:
607
+ | {
608
+ label: string;
609
+ value: string;
610
+ children?: string | undefined;
611
+ }
612
+ | undefined;
613
+ }) => any;
614
+ operateTypeMap: Record<logType, string>;
615
+ }
616
+
617
+ export interface ClipboardArray<T = any> extends Array<T> {
618
+ namespace?: string;
619
+ type?: "shear" | "copy";
620
+ onPasteCallback?: (runtimeNamespace: string) => Promise<any[]>;
621
+ }