openxiangda-cli 2.0.0-alpha.61 → 2.0.0-alpha.66
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.
- package/dist/create-workspace.d.ts.map +1 -1
- package/dist/create-workspace.js +1 -0
- package/dist/create-workspace.js.map +1 -1
- package/package.json +4 -4
- package/template/AGENTS.md +1 -1
- package/template/README.md +7 -7
- package/template/apps/server/Dockerfile +2 -1
- package/template/apps/server/package.json +1 -1
- package/template/apps/server/src/app.module.ts +1 -3
- package/template/apps/server/test/smoke.test.ts +6 -23
- package/template/apps/web/e2e/resources.spec.ts +20 -0
- package/template/apps/web/index.html +1 -1
- package/template/apps/web/package.json +1 -1
- package/template/apps/web/src/AuthoritativeSelector.tsx +298 -41
- package/template/apps/web/src/Shell.tsx +39 -211
- package/template/apps/web/src/components/platform-fields/AttachmentFileList.tsx +1 -1
- package/template/apps/web/src/components/resource/GeneratedResourceCrud.tsx +229 -16
- package/template/apps/web/src/components/resource/SurfaceFields.tsx +142 -2
- package/template/apps/web/src/data-provider.ts +23 -102
- package/template/apps/web/src/main.tsx +35 -83
- package/template/apps/web/src/platform-client.ts +112 -424
- package/template/apps/web/src/runtime-meta.ts +1 -1
- package/template/apps/web/src/styles.css +285 -3
- package/template/apps/web/test/contracts.test.ts +43 -769
- package/template/openxiangda.config.ts +14 -81
- package/template/package.json +3 -3
- package/template/packages/contracts/src/generated.ts +7 -804
- package/template/apps/server/src/instrument-context.controller.ts +0 -25
- package/template/apps/web/e2e/instruments.spec.ts +0 -1338
- package/template/apps/web/src/CollegePage.tsx +0 -181
- package/template/apps/web/src/InstrumentDetailPage.tsx +0 -176
- package/template/apps/web/src/InstrumentForm.tsx +0 -380
- package/template/apps/web/src/InstrumentFormPage.tsx +0 -82
- package/template/apps/web/src/InstrumentListPage.tsx +0 -457
- package/template/apps/web/src/fields.ts +0 -18
- package/template/apps/web/src/instrument.ts +0 -56
- package/template/platform/data/colleges.ts +0 -21
- package/template/platform/data/instrument-surface.ts +0 -125
- package/template/platform/data/instruments.ts +0 -83
|
@@ -1,705 +1,11 @@
|
|
|
1
1
|
// Generated by OpenXiangda 2.0 Native compiler. Do not edit by hand.
|
|
2
2
|
export const compilerContractVersion = "native-2" as const;
|
|
3
|
-
export const appCode = "
|
|
4
|
-
export const resourceCodes = [
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
] as const;
|
|
8
|
-
export const resourceSurfaces = {
|
|
9
|
-
"instruments": {
|
|
10
|
-
"generated": false,
|
|
11
|
-
"fields": {
|
|
12
|
-
"address": {
|
|
13
|
-
"label": "详细地址",
|
|
14
|
-
"widget": "textarea",
|
|
15
|
-
"section": "materials"
|
|
16
|
-
},
|
|
17
|
-
"aliasName": {
|
|
18
|
-
"label": "别名",
|
|
19
|
-
"widget": "text",
|
|
20
|
-
"section": "basic"
|
|
21
|
-
},
|
|
22
|
-
"assetCode": {
|
|
23
|
-
"label": "资产编码",
|
|
24
|
-
"widget": "text",
|
|
25
|
-
"section": "asset",
|
|
26
|
-
"requiredHint": true,
|
|
27
|
-
"createCapability": "app:instrument-center:instrument:field:asset-code:create",
|
|
28
|
-
"updateCapability": "app:instrument-center:instrument:field:asset-code:update",
|
|
29
|
-
"list": true,
|
|
30
|
-
"searchable": true,
|
|
31
|
-
"sortable": true
|
|
32
|
-
},
|
|
33
|
-
"assetValue": {
|
|
34
|
-
"label": "资产价值(元)",
|
|
35
|
-
"widget": "number",
|
|
36
|
-
"section": "asset",
|
|
37
|
-
"createCapability": "app:instrument-center:instrument:field:asset-value:create",
|
|
38
|
-
"updateCapability": "app:instrument-center:instrument:field:asset-value:update"
|
|
39
|
-
},
|
|
40
|
-
"attachments": {
|
|
41
|
-
"label": "仪器资料",
|
|
42
|
-
"widget": "file",
|
|
43
|
-
"section": "materials",
|
|
44
|
-
"multiple": true,
|
|
45
|
-
"maxCount": 8
|
|
46
|
-
},
|
|
47
|
-
"categoryId": {
|
|
48
|
-
"label": "仪器分类",
|
|
49
|
-
"widget": "select",
|
|
50
|
-
"section": "basic",
|
|
51
|
-
"requiredHint": true,
|
|
52
|
-
"options": [
|
|
53
|
-
{
|
|
54
|
-
"label": "显微成像",
|
|
55
|
-
"value": "analysis_microscope"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"label": "光谱分析",
|
|
59
|
-
"value": "analysis_spectrum"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"label": "色谱质谱",
|
|
63
|
-
"value": "analysis_ms"
|
|
64
|
-
}
|
|
65
|
-
]
|
|
66
|
-
},
|
|
67
|
-
"chineseName": {
|
|
68
|
-
"label": "仪器中文名",
|
|
69
|
-
"widget": "text",
|
|
70
|
-
"section": "basic",
|
|
71
|
-
"requiredHint": true,
|
|
72
|
-
"list": true,
|
|
73
|
-
"searchable": true,
|
|
74
|
-
"sortable": true
|
|
75
|
-
},
|
|
76
|
-
"collegeId": {
|
|
77
|
-
"label": "所属学院",
|
|
78
|
-
"widget": "scope",
|
|
79
|
-
"section": "usage",
|
|
80
|
-
"requiredHint": true,
|
|
81
|
-
"createCapability": "app:instrument-center:instrument:field:college-id:create",
|
|
82
|
-
"updateCapability": "app:instrument-center:instrument:field:college-id:update",
|
|
83
|
-
"list": true
|
|
84
|
-
},
|
|
85
|
-
"contactEmail": {
|
|
86
|
-
"label": "联系邮箱",
|
|
87
|
-
"widget": "email",
|
|
88
|
-
"section": "management"
|
|
89
|
-
},
|
|
90
|
-
"contactPhone": {
|
|
91
|
-
"label": "联系电话",
|
|
92
|
-
"widget": "phone",
|
|
93
|
-
"section": "management",
|
|
94
|
-
"requiredHint": true
|
|
95
|
-
},
|
|
96
|
-
"contactUserIds": {
|
|
97
|
-
"label": "联系人",
|
|
98
|
-
"widget": "directory-user",
|
|
99
|
-
"section": "management",
|
|
100
|
-
"requiredHint": true,
|
|
101
|
-
"multiple": true
|
|
102
|
-
},
|
|
103
|
-
"enabledDate": {
|
|
104
|
-
"label": "启用日期",
|
|
105
|
-
"widget": "date",
|
|
106
|
-
"section": "asset",
|
|
107
|
-
"requiredHint": true
|
|
108
|
-
},
|
|
109
|
-
"englishName": {
|
|
110
|
-
"label": "仪器英文名",
|
|
111
|
-
"widget": "text",
|
|
112
|
-
"section": "basic"
|
|
113
|
-
},
|
|
114
|
-
"id": {
|
|
115
|
-
"label": "记录 ID",
|
|
116
|
-
"widget": "text",
|
|
117
|
-
"section": "basic",
|
|
118
|
-
"system": true
|
|
119
|
-
},
|
|
120
|
-
"image": {
|
|
121
|
-
"label": "仪器图片",
|
|
122
|
-
"widget": "file",
|
|
123
|
-
"section": "basic",
|
|
124
|
-
"maxCount": 1,
|
|
125
|
-
"accept": "image/*",
|
|
126
|
-
"list": true
|
|
127
|
-
},
|
|
128
|
-
"instrumentAdminIds": {
|
|
129
|
-
"label": "仪器管理员",
|
|
130
|
-
"widget": "directory-user",
|
|
131
|
-
"section": "management",
|
|
132
|
-
"requiredHint": true,
|
|
133
|
-
"createCapability": "app:instrument-center:instrument:field:instrument-admin-ids:create",
|
|
134
|
-
"updateCapability": "app:instrument-center:instrument:field:instrument-admin-ids:update",
|
|
135
|
-
"multiple": true,
|
|
136
|
-
"list": true
|
|
137
|
-
},
|
|
138
|
-
"instrumentCode": {
|
|
139
|
-
"label": "仪器编码",
|
|
140
|
-
"widget": "text",
|
|
141
|
-
"section": "basic",
|
|
142
|
-
"requiredHint": true,
|
|
143
|
-
"createCapability": "app:instrument-center:instrument:field:instrument-code:create",
|
|
144
|
-
"updateCapability": "app:instrument-center:instrument:field:instrument-code:update",
|
|
145
|
-
"list": true,
|
|
146
|
-
"searchable": true,
|
|
147
|
-
"sortable": true
|
|
148
|
-
},
|
|
149
|
-
"instrumentSource": {
|
|
150
|
-
"label": "仪器来源",
|
|
151
|
-
"widget": "select",
|
|
152
|
-
"section": "basic",
|
|
153
|
-
"options": [
|
|
154
|
-
{
|
|
155
|
-
"label": "购置",
|
|
156
|
-
"value": "purchase"
|
|
157
|
-
},
|
|
158
|
-
{
|
|
159
|
-
"label": "捐赠",
|
|
160
|
-
"value": "donation"
|
|
161
|
-
},
|
|
162
|
-
{
|
|
163
|
-
"label": "调拨",
|
|
164
|
-
"value": "transfer"
|
|
165
|
-
}
|
|
166
|
-
]
|
|
167
|
-
},
|
|
168
|
-
"instrumentStatus": {
|
|
169
|
-
"label": "仪器状态",
|
|
170
|
-
"widget": "select",
|
|
171
|
-
"section": "usage",
|
|
172
|
-
"requiredHint": true,
|
|
173
|
-
"options": [
|
|
174
|
-
{
|
|
175
|
-
"label": "正常",
|
|
176
|
-
"value": "normal"
|
|
177
|
-
},
|
|
178
|
-
{
|
|
179
|
-
"label": "维修",
|
|
180
|
-
"value": "maintenance"
|
|
181
|
-
},
|
|
182
|
-
{
|
|
183
|
-
"label": "停用",
|
|
184
|
-
"value": "disabled"
|
|
185
|
-
},
|
|
186
|
-
{
|
|
187
|
-
"label": "报废",
|
|
188
|
-
"value": "scrapped"
|
|
189
|
-
}
|
|
190
|
-
],
|
|
191
|
-
"list": true
|
|
192
|
-
},
|
|
193
|
-
"locationId": {
|
|
194
|
-
"label": "存放点",
|
|
195
|
-
"widget": "select",
|
|
196
|
-
"section": "materials",
|
|
197
|
-
"options": [
|
|
198
|
-
{
|
|
199
|
-
"label": "A 区 101",
|
|
200
|
-
"value": "A-101"
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
"label": "B 区 203",
|
|
204
|
-
"value": "B-203"
|
|
205
|
-
}
|
|
206
|
-
]
|
|
207
|
-
},
|
|
208
|
-
"manageDepartmentId": {
|
|
209
|
-
"label": "管理部门",
|
|
210
|
-
"widget": "directory-department",
|
|
211
|
-
"section": "management",
|
|
212
|
-
"requiredHint": true
|
|
213
|
-
},
|
|
214
|
-
"manufacturer": {
|
|
215
|
-
"label": "制造商",
|
|
216
|
-
"widget": "text",
|
|
217
|
-
"section": "basic"
|
|
218
|
-
},
|
|
219
|
-
"openToOutside": {
|
|
220
|
-
"label": "是否对外开放",
|
|
221
|
-
"widget": "boolean",
|
|
222
|
-
"section": "usage",
|
|
223
|
-
"requiredHint": true,
|
|
224
|
-
"list": true
|
|
225
|
-
},
|
|
226
|
-
"platformProperty": {
|
|
227
|
-
"label": "平台属性",
|
|
228
|
-
"widget": "select",
|
|
229
|
-
"section": "usage",
|
|
230
|
-
"options": [
|
|
231
|
-
{
|
|
232
|
-
"label": "共享平台设备",
|
|
233
|
-
"value": "shared"
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
"label": "课题组设备",
|
|
237
|
-
"value": "research"
|
|
238
|
-
}
|
|
239
|
-
]
|
|
240
|
-
},
|
|
241
|
-
"revision": {
|
|
242
|
-
"label": "修订版本",
|
|
243
|
-
"widget": "number",
|
|
244
|
-
"section": "basic",
|
|
245
|
-
"system": true
|
|
246
|
-
},
|
|
247
|
-
"serviceContent": {
|
|
248
|
-
"label": "服务内容与主要功能",
|
|
249
|
-
"widget": "textarea",
|
|
250
|
-
"section": "materials"
|
|
251
|
-
},
|
|
252
|
-
"specModel": {
|
|
253
|
-
"label": "规格型号",
|
|
254
|
-
"widget": "text",
|
|
255
|
-
"section": "basic",
|
|
256
|
-
"requiredHint": true,
|
|
257
|
-
"list": true
|
|
258
|
-
},
|
|
259
|
-
"subjectAreas": {
|
|
260
|
-
"label": "学科领域",
|
|
261
|
-
"widget": "multi",
|
|
262
|
-
"section": "usage",
|
|
263
|
-
"options": [
|
|
264
|
-
{
|
|
265
|
-
"label": "材料",
|
|
266
|
-
"value": "material"
|
|
267
|
-
},
|
|
268
|
-
{
|
|
269
|
-
"label": "生命科学",
|
|
270
|
-
"value": "life"
|
|
271
|
-
},
|
|
272
|
-
{
|
|
273
|
-
"label": "化学",
|
|
274
|
-
"value": "chemistry"
|
|
275
|
-
},
|
|
276
|
-
{
|
|
277
|
-
"label": "物理",
|
|
278
|
-
"value": "physics"
|
|
279
|
-
}
|
|
280
|
-
]
|
|
281
|
-
},
|
|
282
|
-
"usageStatus": {
|
|
283
|
-
"label": "使用状况",
|
|
284
|
-
"widget": "select",
|
|
285
|
-
"section": "usage",
|
|
286
|
-
"requiredHint": true,
|
|
287
|
-
"options": [
|
|
288
|
-
{
|
|
289
|
-
"label": "在用",
|
|
290
|
-
"value": "active"
|
|
291
|
-
},
|
|
292
|
-
{
|
|
293
|
-
"label": "闲置",
|
|
294
|
-
"value": "idle"
|
|
295
|
-
},
|
|
296
|
-
{
|
|
297
|
-
"label": "借出",
|
|
298
|
-
"value": "lent"
|
|
299
|
-
}
|
|
300
|
-
]
|
|
301
|
-
},
|
|
302
|
-
"useDepartmentId": {
|
|
303
|
-
"label": "使用部门",
|
|
304
|
-
"widget": "directory-department",
|
|
305
|
-
"section": "management",
|
|
306
|
-
"requiredHint": true
|
|
307
|
-
}
|
|
308
|
-
},
|
|
309
|
-
"list": {
|
|
310
|
-
"defaultPageSize": 20,
|
|
311
|
-
"searchableFields": [
|
|
312
|
-
"chineseName",
|
|
313
|
-
"instrumentCode",
|
|
314
|
-
"assetCode"
|
|
315
|
-
],
|
|
316
|
-
"filterFields": [
|
|
317
|
-
"collegeId",
|
|
318
|
-
"instrumentAdminIds",
|
|
319
|
-
"instrumentStatus",
|
|
320
|
-
"openToOutside",
|
|
321
|
-
"enabledDate",
|
|
322
|
-
"assetValue"
|
|
323
|
-
],
|
|
324
|
-
"defaultSort": {
|
|
325
|
-
"field": "instrumentCode",
|
|
326
|
-
"order": "asc"
|
|
327
|
-
}
|
|
328
|
-
},
|
|
329
|
-
"form": {
|
|
330
|
-
"layout": "sections"
|
|
331
|
-
},
|
|
332
|
-
"detail": {
|
|
333
|
-
"layout": "sections"
|
|
334
|
-
},
|
|
335
|
-
"mobile": {
|
|
336
|
-
"enabled": true
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
} as const;
|
|
340
|
-
export const resourceDefinitions = {
|
|
341
|
-
"instruments": {
|
|
342
|
-
"code": "instruments",
|
|
343
|
-
"name": "仪器资源",
|
|
344
|
-
"capabilities": {
|
|
345
|
-
"read": "app:instrument-center:data:instruments:read",
|
|
346
|
-
"create": "app:instrument-center:data:instruments:create",
|
|
347
|
-
"update": "app:instrument-center:data:instruments:update",
|
|
348
|
-
"delete": "app:instrument-center:data:instruments:delete"
|
|
349
|
-
},
|
|
350
|
-
"surface": {
|
|
351
|
-
"generated": false,
|
|
352
|
-
"fields": {
|
|
353
|
-
"address": {
|
|
354
|
-
"label": "详细地址",
|
|
355
|
-
"widget": "textarea",
|
|
356
|
-
"section": "materials"
|
|
357
|
-
},
|
|
358
|
-
"aliasName": {
|
|
359
|
-
"label": "别名",
|
|
360
|
-
"widget": "text",
|
|
361
|
-
"section": "basic"
|
|
362
|
-
},
|
|
363
|
-
"assetCode": {
|
|
364
|
-
"label": "资产编码",
|
|
365
|
-
"widget": "text",
|
|
366
|
-
"section": "asset",
|
|
367
|
-
"requiredHint": true,
|
|
368
|
-
"createCapability": "app:instrument-center:instrument:field:asset-code:create",
|
|
369
|
-
"updateCapability": "app:instrument-center:instrument:field:asset-code:update",
|
|
370
|
-
"list": true,
|
|
371
|
-
"searchable": true,
|
|
372
|
-
"sortable": true
|
|
373
|
-
},
|
|
374
|
-
"assetValue": {
|
|
375
|
-
"label": "资产价值(元)",
|
|
376
|
-
"widget": "number",
|
|
377
|
-
"section": "asset",
|
|
378
|
-
"createCapability": "app:instrument-center:instrument:field:asset-value:create",
|
|
379
|
-
"updateCapability": "app:instrument-center:instrument:field:asset-value:update"
|
|
380
|
-
},
|
|
381
|
-
"attachments": {
|
|
382
|
-
"label": "仪器资料",
|
|
383
|
-
"widget": "file",
|
|
384
|
-
"section": "materials",
|
|
385
|
-
"multiple": true,
|
|
386
|
-
"maxCount": 8
|
|
387
|
-
},
|
|
388
|
-
"categoryId": {
|
|
389
|
-
"label": "仪器分类",
|
|
390
|
-
"widget": "select",
|
|
391
|
-
"section": "basic",
|
|
392
|
-
"requiredHint": true,
|
|
393
|
-
"options": [
|
|
394
|
-
{
|
|
395
|
-
"label": "显微成像",
|
|
396
|
-
"value": "analysis_microscope"
|
|
397
|
-
},
|
|
398
|
-
{
|
|
399
|
-
"label": "光谱分析",
|
|
400
|
-
"value": "analysis_spectrum"
|
|
401
|
-
},
|
|
402
|
-
{
|
|
403
|
-
"label": "色谱质谱",
|
|
404
|
-
"value": "analysis_ms"
|
|
405
|
-
}
|
|
406
|
-
]
|
|
407
|
-
},
|
|
408
|
-
"chineseName": {
|
|
409
|
-
"label": "仪器中文名",
|
|
410
|
-
"widget": "text",
|
|
411
|
-
"section": "basic",
|
|
412
|
-
"requiredHint": true,
|
|
413
|
-
"list": true,
|
|
414
|
-
"searchable": true,
|
|
415
|
-
"sortable": true
|
|
416
|
-
},
|
|
417
|
-
"collegeId": {
|
|
418
|
-
"label": "所属学院",
|
|
419
|
-
"widget": "scope",
|
|
420
|
-
"section": "usage",
|
|
421
|
-
"requiredHint": true,
|
|
422
|
-
"createCapability": "app:instrument-center:instrument:field:college-id:create",
|
|
423
|
-
"updateCapability": "app:instrument-center:instrument:field:college-id:update",
|
|
424
|
-
"list": true
|
|
425
|
-
},
|
|
426
|
-
"contactEmail": {
|
|
427
|
-
"label": "联系邮箱",
|
|
428
|
-
"widget": "email",
|
|
429
|
-
"section": "management"
|
|
430
|
-
},
|
|
431
|
-
"contactPhone": {
|
|
432
|
-
"label": "联系电话",
|
|
433
|
-
"widget": "phone",
|
|
434
|
-
"section": "management",
|
|
435
|
-
"requiredHint": true
|
|
436
|
-
},
|
|
437
|
-
"contactUserIds": {
|
|
438
|
-
"label": "联系人",
|
|
439
|
-
"widget": "directory-user",
|
|
440
|
-
"section": "management",
|
|
441
|
-
"requiredHint": true,
|
|
442
|
-
"multiple": true
|
|
443
|
-
},
|
|
444
|
-
"enabledDate": {
|
|
445
|
-
"label": "启用日期",
|
|
446
|
-
"widget": "date",
|
|
447
|
-
"section": "asset",
|
|
448
|
-
"requiredHint": true
|
|
449
|
-
},
|
|
450
|
-
"englishName": {
|
|
451
|
-
"label": "仪器英文名",
|
|
452
|
-
"widget": "text",
|
|
453
|
-
"section": "basic"
|
|
454
|
-
},
|
|
455
|
-
"id": {
|
|
456
|
-
"label": "记录 ID",
|
|
457
|
-
"widget": "text",
|
|
458
|
-
"section": "basic",
|
|
459
|
-
"system": true
|
|
460
|
-
},
|
|
461
|
-
"image": {
|
|
462
|
-
"label": "仪器图片",
|
|
463
|
-
"widget": "file",
|
|
464
|
-
"section": "basic",
|
|
465
|
-
"maxCount": 1,
|
|
466
|
-
"accept": "image/*",
|
|
467
|
-
"list": true
|
|
468
|
-
},
|
|
469
|
-
"instrumentAdminIds": {
|
|
470
|
-
"label": "仪器管理员",
|
|
471
|
-
"widget": "directory-user",
|
|
472
|
-
"section": "management",
|
|
473
|
-
"requiredHint": true,
|
|
474
|
-
"createCapability": "app:instrument-center:instrument:field:instrument-admin-ids:create",
|
|
475
|
-
"updateCapability": "app:instrument-center:instrument:field:instrument-admin-ids:update",
|
|
476
|
-
"multiple": true,
|
|
477
|
-
"list": true
|
|
478
|
-
},
|
|
479
|
-
"instrumentCode": {
|
|
480
|
-
"label": "仪器编码",
|
|
481
|
-
"widget": "text",
|
|
482
|
-
"section": "basic",
|
|
483
|
-
"requiredHint": true,
|
|
484
|
-
"createCapability": "app:instrument-center:instrument:field:instrument-code:create",
|
|
485
|
-
"updateCapability": "app:instrument-center:instrument:field:instrument-code:update",
|
|
486
|
-
"list": true,
|
|
487
|
-
"searchable": true,
|
|
488
|
-
"sortable": true
|
|
489
|
-
},
|
|
490
|
-
"instrumentSource": {
|
|
491
|
-
"label": "仪器来源",
|
|
492
|
-
"widget": "select",
|
|
493
|
-
"section": "basic",
|
|
494
|
-
"options": [
|
|
495
|
-
{
|
|
496
|
-
"label": "购置",
|
|
497
|
-
"value": "purchase"
|
|
498
|
-
},
|
|
499
|
-
{
|
|
500
|
-
"label": "捐赠",
|
|
501
|
-
"value": "donation"
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
"label": "调拨",
|
|
505
|
-
"value": "transfer"
|
|
506
|
-
}
|
|
507
|
-
]
|
|
508
|
-
},
|
|
509
|
-
"instrumentStatus": {
|
|
510
|
-
"label": "仪器状态",
|
|
511
|
-
"widget": "select",
|
|
512
|
-
"section": "usage",
|
|
513
|
-
"requiredHint": true,
|
|
514
|
-
"options": [
|
|
515
|
-
{
|
|
516
|
-
"label": "正常",
|
|
517
|
-
"value": "normal"
|
|
518
|
-
},
|
|
519
|
-
{
|
|
520
|
-
"label": "维修",
|
|
521
|
-
"value": "maintenance"
|
|
522
|
-
},
|
|
523
|
-
{
|
|
524
|
-
"label": "停用",
|
|
525
|
-
"value": "disabled"
|
|
526
|
-
},
|
|
527
|
-
{
|
|
528
|
-
"label": "报废",
|
|
529
|
-
"value": "scrapped"
|
|
530
|
-
}
|
|
531
|
-
],
|
|
532
|
-
"list": true
|
|
533
|
-
},
|
|
534
|
-
"locationId": {
|
|
535
|
-
"label": "存放点",
|
|
536
|
-
"widget": "select",
|
|
537
|
-
"section": "materials",
|
|
538
|
-
"options": [
|
|
539
|
-
{
|
|
540
|
-
"label": "A 区 101",
|
|
541
|
-
"value": "A-101"
|
|
542
|
-
},
|
|
543
|
-
{
|
|
544
|
-
"label": "B 区 203",
|
|
545
|
-
"value": "B-203"
|
|
546
|
-
}
|
|
547
|
-
]
|
|
548
|
-
},
|
|
549
|
-
"manageDepartmentId": {
|
|
550
|
-
"label": "管理部门",
|
|
551
|
-
"widget": "directory-department",
|
|
552
|
-
"section": "management",
|
|
553
|
-
"requiredHint": true
|
|
554
|
-
},
|
|
555
|
-
"manufacturer": {
|
|
556
|
-
"label": "制造商",
|
|
557
|
-
"widget": "text",
|
|
558
|
-
"section": "basic"
|
|
559
|
-
},
|
|
560
|
-
"openToOutside": {
|
|
561
|
-
"label": "是否对外开放",
|
|
562
|
-
"widget": "boolean",
|
|
563
|
-
"section": "usage",
|
|
564
|
-
"requiredHint": true,
|
|
565
|
-
"list": true
|
|
566
|
-
},
|
|
567
|
-
"platformProperty": {
|
|
568
|
-
"label": "平台属性",
|
|
569
|
-
"widget": "select",
|
|
570
|
-
"section": "usage",
|
|
571
|
-
"options": [
|
|
572
|
-
{
|
|
573
|
-
"label": "共享平台设备",
|
|
574
|
-
"value": "shared"
|
|
575
|
-
},
|
|
576
|
-
{
|
|
577
|
-
"label": "课题组设备",
|
|
578
|
-
"value": "research"
|
|
579
|
-
}
|
|
580
|
-
]
|
|
581
|
-
},
|
|
582
|
-
"revision": {
|
|
583
|
-
"label": "修订版本",
|
|
584
|
-
"widget": "number",
|
|
585
|
-
"section": "basic",
|
|
586
|
-
"system": true
|
|
587
|
-
},
|
|
588
|
-
"serviceContent": {
|
|
589
|
-
"label": "服务内容与主要功能",
|
|
590
|
-
"widget": "textarea",
|
|
591
|
-
"section": "materials"
|
|
592
|
-
},
|
|
593
|
-
"specModel": {
|
|
594
|
-
"label": "规格型号",
|
|
595
|
-
"widget": "text",
|
|
596
|
-
"section": "basic",
|
|
597
|
-
"requiredHint": true,
|
|
598
|
-
"list": true
|
|
599
|
-
},
|
|
600
|
-
"subjectAreas": {
|
|
601
|
-
"label": "学科领域",
|
|
602
|
-
"widget": "multi",
|
|
603
|
-
"section": "usage",
|
|
604
|
-
"options": [
|
|
605
|
-
{
|
|
606
|
-
"label": "材料",
|
|
607
|
-
"value": "material"
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
"label": "生命科学",
|
|
611
|
-
"value": "life"
|
|
612
|
-
},
|
|
613
|
-
{
|
|
614
|
-
"label": "化学",
|
|
615
|
-
"value": "chemistry"
|
|
616
|
-
},
|
|
617
|
-
{
|
|
618
|
-
"label": "物理",
|
|
619
|
-
"value": "physics"
|
|
620
|
-
}
|
|
621
|
-
]
|
|
622
|
-
},
|
|
623
|
-
"usageStatus": {
|
|
624
|
-
"label": "使用状况",
|
|
625
|
-
"widget": "select",
|
|
626
|
-
"section": "usage",
|
|
627
|
-
"requiredHint": true,
|
|
628
|
-
"options": [
|
|
629
|
-
{
|
|
630
|
-
"label": "在用",
|
|
631
|
-
"value": "active"
|
|
632
|
-
},
|
|
633
|
-
{
|
|
634
|
-
"label": "闲置",
|
|
635
|
-
"value": "idle"
|
|
636
|
-
},
|
|
637
|
-
{
|
|
638
|
-
"label": "借出",
|
|
639
|
-
"value": "lent"
|
|
640
|
-
}
|
|
641
|
-
]
|
|
642
|
-
},
|
|
643
|
-
"useDepartmentId": {
|
|
644
|
-
"label": "使用部门",
|
|
645
|
-
"widget": "directory-department",
|
|
646
|
-
"section": "management",
|
|
647
|
-
"requiredHint": true
|
|
648
|
-
}
|
|
649
|
-
},
|
|
650
|
-
"list": {
|
|
651
|
-
"defaultPageSize": 20,
|
|
652
|
-
"searchableFields": [
|
|
653
|
-
"chineseName",
|
|
654
|
-
"instrumentCode",
|
|
655
|
-
"assetCode"
|
|
656
|
-
],
|
|
657
|
-
"filterFields": [
|
|
658
|
-
"collegeId",
|
|
659
|
-
"instrumentAdminIds",
|
|
660
|
-
"instrumentStatus",
|
|
661
|
-
"openToOutside",
|
|
662
|
-
"enabledDate",
|
|
663
|
-
"assetValue"
|
|
664
|
-
],
|
|
665
|
-
"defaultSort": {
|
|
666
|
-
"field": "instrumentCode",
|
|
667
|
-
"order": "asc"
|
|
668
|
-
}
|
|
669
|
-
},
|
|
670
|
-
"form": {
|
|
671
|
-
"layout": "sections"
|
|
672
|
-
},
|
|
673
|
-
"detail": {
|
|
674
|
-
"layout": "sections"
|
|
675
|
-
},
|
|
676
|
-
"mobile": {
|
|
677
|
-
"enabled": true
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
} as const;
|
|
3
|
+
export const appCode = "openxiangda-application" as const;
|
|
4
|
+
export const resourceCodes = [] as const;
|
|
5
|
+
export const resourceSurfaces = {} as const;
|
|
6
|
+
export const resourceDefinitions = {} as const;
|
|
682
7
|
export const capabilities = [
|
|
683
|
-
"app:
|
|
684
|
-
"app:instrument-center:data:colleges:delete",
|
|
685
|
-
"app:instrument-center:data:colleges:read",
|
|
686
|
-
"app:instrument-center:data:colleges:update",
|
|
687
|
-
"app:instrument-center:data:instruments:create",
|
|
688
|
-
"app:instrument-center:data:instruments:delete",
|
|
689
|
-
"app:instrument-center:data:instruments:read",
|
|
690
|
-
"app:instrument-center:data:instruments:update",
|
|
691
|
-
"app:instrument-center:directory:read",
|
|
692
|
-
"app:instrument-center:instrument:context:read",
|
|
693
|
-
"app:instrument-center:instrument:field:asset-code:create",
|
|
694
|
-
"app:instrument-center:instrument:field:asset-code:update",
|
|
695
|
-
"app:instrument-center:instrument:field:asset-value:create",
|
|
696
|
-
"app:instrument-center:instrument:field:asset-value:update",
|
|
697
|
-
"app:instrument-center:instrument:field:college-id:create",
|
|
698
|
-
"app:instrument-center:instrument:field:college-id:update",
|
|
699
|
-
"app:instrument-center:instrument:field:instrument-admin-ids:create",
|
|
700
|
-
"app:instrument-center:instrument:field:instrument-admin-ids:update",
|
|
701
|
-
"app:instrument-center:instrument:field:instrument-code:create",
|
|
702
|
-
"app:instrument-center:instrument:field:instrument-code:update",
|
|
8
|
+
"app:openxiangda-application:directory:read",
|
|
703
9
|
"app:role:assign",
|
|
704
10
|
"app:role:define",
|
|
705
11
|
"app:role:grant-capability",
|
|
@@ -707,71 +13,8 @@ export const capabilities = [
|
|
|
707
13
|
"app:scope-grant:manage",
|
|
708
14
|
"app:super-admin:manage"
|
|
709
15
|
] as const;
|
|
710
|
-
export const appOperations = {
|
|
711
|
-
|
|
712
|
-
"code": "instrument-context.inspect",
|
|
713
|
-
"method": "GET",
|
|
714
|
-
"path": "/api/instruments/context",
|
|
715
|
-
"requiredCapability": "app:instrument-center:instrument:context:read",
|
|
716
|
-
"requestSchemaDigest": "cd1a463c46d6264134447db17a8c3c7abe5b9a2488c6d759fea66da1f96b133e",
|
|
717
|
-
"responseSchemaDigest": "a2c799262a3ce3c19ef5cdd983bf3d12b43ab3c426227091b909dcb7054738c0"
|
|
718
|
-
}
|
|
719
|
-
} as const;
|
|
720
|
-
export const appRoutes = {
|
|
721
|
-
colleges: {
|
|
722
|
-
"code": "colleges",
|
|
723
|
-
"path": "/colleges",
|
|
724
|
-
"label": "学院字典",
|
|
725
|
-
"surface": "admin",
|
|
726
|
-
"navigation": "menu",
|
|
727
|
-
"capability": "app:instrument-center:data:colleges:read",
|
|
728
|
-
"tabPersistence": "session",
|
|
729
|
-
"keepAlive": "none"
|
|
730
|
-
},
|
|
731
|
-
instrumentCreate: {
|
|
732
|
-
"code": "instrument-create",
|
|
733
|
-
"path": "/instruments/new",
|
|
734
|
-
"label": "新增仪器",
|
|
735
|
-
"surface": "admin",
|
|
736
|
-
"navigation": "hidden",
|
|
737
|
-
"parentCode": "instruments",
|
|
738
|
-
"capability": "app:instrument-center:data:instruments:create",
|
|
739
|
-
"tabPersistence": "session",
|
|
740
|
-
"keepAlive": "none"
|
|
741
|
-
},
|
|
742
|
-
instrumentDetail: {
|
|
743
|
-
"code": "instrument-detail",
|
|
744
|
-
"path": "/instruments/:id",
|
|
745
|
-
"label": "仪器详情",
|
|
746
|
-
"surface": "admin",
|
|
747
|
-
"navigation": "hidden",
|
|
748
|
-
"parentCode": "instruments",
|
|
749
|
-
"capability": "app:instrument-center:data:instruments:read",
|
|
750
|
-
"tabPersistence": "none",
|
|
751
|
-
"keepAlive": "none"
|
|
752
|
-
},
|
|
753
|
-
instrumentEdit: {
|
|
754
|
-
"code": "instrument-edit",
|
|
755
|
-
"path": "/instruments/:id/edit",
|
|
756
|
-
"label": "编辑仪器",
|
|
757
|
-
"surface": "admin",
|
|
758
|
-
"navigation": "hidden",
|
|
759
|
-
"parentCode": "instruments",
|
|
760
|
-
"capability": "app:instrument-center:data:instruments:update",
|
|
761
|
-
"tabPersistence": "none",
|
|
762
|
-
"keepAlive": "none"
|
|
763
|
-
},
|
|
764
|
-
instruments: {
|
|
765
|
-
"code": "instruments",
|
|
766
|
-
"path": "/instruments",
|
|
767
|
-
"label": "仪器资源",
|
|
768
|
-
"surface": "admin",
|
|
769
|
-
"navigation": "menu",
|
|
770
|
-
"capability": "app:instrument-center:data:instruments:read",
|
|
771
|
-
"tabPersistence": "session",
|
|
772
|
-
"keepAlive": "none"
|
|
773
|
-
}
|
|
774
|
-
} as const;
|
|
16
|
+
export const appOperations = {} as const;
|
|
17
|
+
export const appRoutes = {} as const;
|
|
775
18
|
export const eventTypes = [] as const;
|
|
776
19
|
export const eventSubscriptionCodes = [] as const;
|
|
777
20
|
export const workflowCodes = [] as const;
|
|
@@ -783,43 +26,3 @@ export type AppRoute = (typeof appRoutes)[keyof typeof appRoutes];
|
|
|
783
26
|
export type EventType = (typeof eventTypes)[number];
|
|
784
27
|
export type EventSubscriptionCode = (typeof eventSubscriptionCodes)[number];
|
|
785
28
|
export type WorkflowCode = (typeof workflowCodes)[number];
|
|
786
|
-
|
|
787
|
-
export interface CollegesRecord {
|
|
788
|
-
id: string;
|
|
789
|
-
revision: number;
|
|
790
|
-
name: string;
|
|
791
|
-
enabled: boolean;
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
export interface InstrumentsRecord {
|
|
795
|
-
id: string;
|
|
796
|
-
revision: number;
|
|
797
|
-
instrumentCode: string;
|
|
798
|
-
chineseName: string;
|
|
799
|
-
englishName?: string | null;
|
|
800
|
-
aliasName?: string | null;
|
|
801
|
-
image?: string | null;
|
|
802
|
-
specModel: string;
|
|
803
|
-
categoryId: string;
|
|
804
|
-
instrumentSource?: string | null;
|
|
805
|
-
manufacturer?: string | null;
|
|
806
|
-
assetCode: string;
|
|
807
|
-
assetValue?: number | null;
|
|
808
|
-
enabledDate: string;
|
|
809
|
-
usageStatus: string;
|
|
810
|
-
instrumentStatus: string;
|
|
811
|
-
openToOutside: boolean;
|
|
812
|
-
subjectAreas?: unknown | null;
|
|
813
|
-
platformProperty?: string | null;
|
|
814
|
-
collegeId: string;
|
|
815
|
-
manageDepartmentId: string;
|
|
816
|
-
useDepartmentId: string;
|
|
817
|
-
instrumentAdminIds: unknown;
|
|
818
|
-
contactUserIds: unknown;
|
|
819
|
-
contactPhone: string;
|
|
820
|
-
contactEmail?: string | null;
|
|
821
|
-
locationId?: string | null;
|
|
822
|
-
address?: string | null;
|
|
823
|
-
serviceContent?: string | null;
|
|
824
|
-
attachments?: string | null;
|
|
825
|
-
}
|