@gct-paas/word 0.1.52-beta.11 → 0.1.52-beta.12

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/index.es.js CHANGED
@@ -355,116 +355,85 @@ function setupGlobDirectives(app) {
355
355
  }
356
356
  const apiConfig$2 = [
357
357
  {
358
- name: "medPro",
359
- entityName: "medPro",
358
+ name: "ai",
359
+ entityName: "ai",
360
360
  apis: [
361
361
  {
362
362
  mode: "post",
363
- method: "postModelMetaDataAssociation",
364
- path: "modelMeta/dataAssociation",
363
+ method: "postFormConvertBatchAddFormTmpl",
364
+ path: "form-convert/batch-add-form-tmpl",
365
365
  hasData: true
366
366
  },
367
- {
368
- mode: "get",
369
- method: "getModelMetaGetSysConfig",
370
- path: "modelMeta/getSysConfig",
371
- hasQuery: true
372
- },
373
- {
374
- mode: "get",
375
- method: "getModelMetaHasDataAssociation",
376
- path: "modelMeta/hasDataAssociation",
377
- hasQuery: true
378
- },
379
- {
380
- mode: "get",
381
- method: "getModelMetaModelDataAssociation",
382
- path: "modelMeta/modelDataAssociation",
383
- hasQuery: true
384
- },
385
367
  {
386
368
  mode: "post",
387
- method: "postApproveProcessApprove",
388
- path: "approve/process/approve",
369
+ method: "postFormConvertBatchFailReasons",
370
+ path: "form-convert/batch/fail-reasons",
389
371
  hasData: true
390
372
  },
391
373
  {
392
374
  mode: "post",
393
- method: "postApproveProcessInterfereReassign",
394
- path: "approve/process/interfere/reassign",
375
+ method: "postFormConvertBatchList",
376
+ path: "form-convert/batch/list",
395
377
  hasData: true
396
378
  },
397
379
  {
398
380
  mode: "post",
399
- method: "postApproveProcessInterfereReturn",
400
- path: "approve/process/interfere/return",
381
+ method: "postFormConvertBatchUpload",
382
+ path: "form-convert/batch/upload",
401
383
  hasData: true
402
384
  },
403
385
  {
404
- mode: "post",
405
- method: "postApproveProcessJump",
406
- path: "approve/process/jump",
407
- hasData: true
386
+ mode: "get",
387
+ method: "getFormConvertBatchId",
388
+ path: "form-convert/batch/{id}",
389
+ hasPathParams: true
408
390
  },
409
391
  {
410
- mode: "post",
411
- method: "postApproveProcessReassign",
412
- path: "approve/process/reassign",
413
- hasData: true
392
+ mode: "delete",
393
+ method: "deleteFormConvertBatchId",
394
+ path: "form-convert/batch/{id}",
395
+ hasPathParams: true
414
396
  },
415
397
  {
416
398
  mode: "post",
417
- method: "postApproveProcessReturn",
418
- path: "approve/process/return",
399
+ method: "postFormConvertFailReasons",
400
+ path: "form-convert/fail-reasons",
419
401
  hasData: true
420
402
  },
421
- {
422
- mode: "get",
423
- method: "getEdhrAttachmentGetEdhrAttachment",
424
- path: "edhrAttachment/getEdhrAttachment",
425
- hasQuery: true
426
- },
427
- {
428
- mode: "post",
429
- method: "postFileUnzip",
430
- path: "file/unzip",
431
- hasQuery: true
432
- },
433
403
  {
434
404
  mode: "post",
435
- method: "postFormChangeProcessApprove",
436
- path: "form/change/process/approve",
405
+ method: "postFormConvertList",
406
+ path: "form-convert/list",
437
407
  hasData: true
438
408
  },
439
409
  {
440
410
  mode: "post",
441
- method: "postFormChangeProcessInterfereReassign",
442
- path: "form/change/process/interfere/reassign",
443
- hasData: true
411
+ method: "postFormConvertRefresh",
412
+ path: "form-convert/refresh"
444
413
  },
445
414
  {
446
415
  mode: "post",
447
- method: "postFormChangeProcessInterfereReturn",
448
- path: "form/change/process/interfere/return",
416
+ method: "postFormConvertSave",
417
+ path: "form-convert/save",
449
418
  hasData: true
450
419
  },
451
420
  {
452
- mode: "post",
453
- method: "postFormChangeProcessJump",
454
- path: "form/change/process/jump",
421
+ mode: "put",
422
+ method: "putFormConvertUpdate",
423
+ path: "form-convert/update",
455
424
  hasData: true
456
425
  },
457
426
  {
458
- mode: "post",
459
- method: "postFormChangeProcessReassign",
460
- path: "form/change/process/reassign",
461
- hasData: true
427
+ mode: "get",
428
+ method: "getFormConvertId",
429
+ path: "form-convert/{id}",
430
+ hasPathParams: true
462
431
  },
463
432
  {
464
- mode: "post",
465
- method: "postFormChangeProcessReturn",
466
- path: "form/change/process/return",
467
- hasData: true
433
+ mode: "delete",
434
+ method: "deleteFormConvertId",
435
+ path: "form-convert/{id}",
436
+ hasPathParams: true
468
437
  }
469
438
  ]
470
439
  },
@@ -563,6 +532,12 @@ const apiConfig$2 = [
563
532
  path: "batch",
564
533
  hasData: true
565
534
  },
535
+ {
536
+ mode: "get",
537
+ method: "getCheckUserNeedTransfer",
538
+ path: "checkUserNeedTransfer",
539
+ hasQuery: true
540
+ },
566
541
  {
567
542
  mode: "get",
568
543
  method: "getGrantedStatistic",
@@ -4801,36 +4776,6 @@ const apiConfig$2 = [
4801
4776
  path: "appendix/form/list",
4802
4777
  hasQuery: true
4803
4778
  },
4804
- {
4805
- mode: "post",
4806
- method: "postDataCollectionAbandon",
4807
- path: "data-collection/abandon",
4808
- hasData: true
4809
- },
4810
- {
4811
- mode: "post",
4812
- method: "postDataCollectionCreate",
4813
- path: "data-collection/create",
4814
- hasData: true
4815
- },
4816
- {
4817
- mode: "get",
4818
- method: "getDataCollectionListAll",
4819
- path: "data-collection/listAll",
4820
- hasQuery: true
4821
- },
4822
- {
4823
- mode: "post",
4824
- method: "postDataCollectionUpdateAlias",
4825
- path: "data-collection/update-alias",
4826
- hasData: true
4827
- },
4828
- {
4829
- mode: "post",
4830
- method: "postDataCollectionUpdateStatus",
4831
- path: "data-collection/update-status",
4832
- hasData: true
4833
- },
4834
4779
  {
4835
4780
  mode: "get",
4836
4781
  method: "getDataIds",
@@ -7689,34 +7634,6 @@ const apiConfig$2 = [
7689
7634
  }
7690
7635
  ]
7691
7636
  },
7692
- {
7693
- name: "ss",
7694
- entityName: "ss",
7695
- apis: [
7696
- {
7697
- mode: "post",
7698
- method: "postUploadExcel",
7699
- path: "upload/excel",
7700
- hasUpload: true,
7701
- hasQuery: true,
7702
- hasData: true
7703
- },
7704
- {
7705
- mode: "post",
7706
- method: "postUploadImportSerialWorkflow",
7707
- path: "upload/importSerialWorkflow",
7708
- hasUpload: true,
7709
- hasData: true
7710
- },
7711
- {
7712
- mode: "post",
7713
- method: "postUploadZip",
7714
- path: "upload/zip",
7715
- hasUpload: true,
7716
- hasData: true
7717
- }
7718
- ]
7719
- },
7720
7637
  {
7721
7638
  name: "stash",
7722
7639
  entityName: "stash",
@@ -8397,6 +8314,18 @@ const apiConfig$2 = [
8397
8314
  name: "api",
8398
8315
  entityName: "api",
8399
8316
  apis: [
8317
+ {
8318
+ mode: "post",
8319
+ method: "postAiFormConvertCallbackRestore",
8320
+ path: "ai/form-convert/callback/restore",
8321
+ hasData: true
8322
+ },
8323
+ {
8324
+ mode: "post",
8325
+ method: "postAiFormConvertCallbackStatus",
8326
+ path: "ai/form-convert/callback/status",
8327
+ hasData: true
8328
+ },
8400
8329
  {
8401
8330
  mode: "post",
8402
8331
  method: "postAppCreateBranch",
@@ -108203,25 +108132,56 @@ async function prepareDocumentFieldContext(options) {
108203
108132
  if (loadSubModels) {
108204
108133
  await addSubModelsToFieldScope(mainModelKey, payload.ctx);
108205
108134
  }
108135
+ const fieldList = payload.ctx.runtime.getFieldList(mainModelKey);
108206
108136
  const masterSlaveList = payload.ctx.runtime.getMasterSlaveFieldList(mainModelKey);
108207
- return { mainModelKey, masterSlaveList };
108208
- }
108209
- const initObjectTypeFieldDefaultValue = (runtimeJson, rawData) => {
108137
+ return { mainModelKey, fieldList, masterSlaveList };
108138
+ }
108139
+ const initObjectTypeFieldDefaultValue = (rawData, instances, fieldList, runtimeJson) => {
108140
+ const usingObjectFieldMap = instances.map((i) => {
108141
+ const { belongingObject, fieldLink } = i.widgetMeta.field;
108142
+ return belongingObject ? { belongingObject, fieldLink } : null;
108143
+ }).reduce((map, cur) => {
108144
+ if (!cur) return map;
108145
+ const { belongingObject, fieldLink } = cur;
108146
+ if (!map[belongingObject]) {
108147
+ map[belongingObject] = [];
108148
+ }
108149
+ map[belongingObject].push(fieldLink);
108150
+ return map;
108151
+ }, {});
108152
+ const allObjectFieldMap = groupBy$1(fieldList.filter((f) => !!f.belongingObject), "belongingObject");
108153
+ Object.entries(allObjectFieldMap).forEach(([belongingObject, fields2]) => {
108154
+ const allFieldKeys = fields2.map((f) => f.key);
108155
+ const isNotUsed = allFieldKeys.every((fk) => !usingObjectFieldMap[belongingObject]?.includes(fk));
108156
+ if (isNotUsed) {
108157
+ delete rawData[belongingObject];
108158
+ }
108159
+ });
108210
108160
  const res = JSON.parse(runtimeJson);
108211
108161
  const { objectInitialValues } = res?.document?.config?.dataInit || {};
108212
108162
  if (!objectInitialValues?.length) return;
108213
- objectInitialValues.forEach(({ values }) => {
108214
- if (!values) return;
108163
+ objectInitialValues.forEach(({ objectField, values }) => {
108164
+ if (!objectField || !values) return;
108215
108165
  for (const [key, value] of Object.entries(values)) {
108216
108166
  if (value === void 0 || value === null) continue;
108217
108167
  const existing = rawData[key];
108218
108168
  if (existing !== void 0 && existing !== null) continue;
108219
108169
  rawData[key] = value;
108220
108170
  }
108171
+ rawData[objectField] = null;
108221
108172
  });
108222
108173
  };
108223
108174
  async function prepareDocumentRenderData(options) {
108224
- const { requestInfo, payload, materialNo, query, instances, subTableInfoList, masterSlaveList } = options;
108175
+ const {
108176
+ requestInfo,
108177
+ payload,
108178
+ materialNo,
108179
+ query,
108180
+ instances,
108181
+ subTableInfoList,
108182
+ fieldList,
108183
+ masterSlaveList
108184
+ } = options;
108225
108185
  const interfaceData = await fetchRenderData({
108226
108186
  info: requestInfo,
108227
108187
  fetchConfig: { _gct_materialNo_: materialNo },
@@ -108234,7 +108194,7 @@ async function prepareDocumentRenderData(options) {
108234
108194
  interfaceData,
108235
108195
  subTableInfoList
108236
108196
  });
108237
- initObjectTypeFieldDefaultValue(requestInfo.runtimeJson, rawData);
108197
+ initObjectTypeFieldDefaultValue(rawData, instances, fieldList, requestInfo.runtimeJson);
108238
108198
  return rawData;
108239
108199
  }
108240
108200
  async function loadDocumentInitMappings(options) {
@@ -108268,7 +108228,7 @@ async function initializeDocumentEngine(props, payload, result) {
108268
108228
  configurePipelineLoggingForDev();
108269
108229
  const { id, requestInfo, fillModeType, paramsConfig, tmplBomC } = result;
108270
108230
  const materialNo = paramsConfig?.materialNo || requestInfo.materialNo;
108271
- const { mainModelKey, masterSlaveList } = await prepareDocumentFieldContext({
108231
+ const { mainModelKey, fieldList, masterSlaveList } = await prepareDocumentFieldContext({
108272
108232
  requestInfo,
108273
108233
  payload,
108274
108234
  loadSubModels: true
@@ -108332,6 +108292,7 @@ async function initializeDocumentEngine(props, payload, result) {
108332
108292
  query: result.query,
108333
108293
  instances,
108334
108294
  subTableInfoList: docModel.getSubTableInfoList() ?? [],
108295
+ fieldList,
108335
108296
  masterSlaveList
108336
108297
  });
108337
108298
  const docRuntimeMeta = {
@@ -108500,7 +108461,7 @@ function useDocumentFactory(props, payload) {
108500
108461
  bpmnFieldAuthMap
108501
108462
  } = freshExecute;
108502
108463
  const materialNo = paramsConfig?.materialNo || props.materialNo;
108503
- const { masterSlaveList } = await prepareDocumentFieldContext({
108464
+ const { fieldList, masterSlaveList } = await prepareDocumentFieldContext({
108504
108465
  requestInfo,
108505
108466
  payload,
108506
108467
  loadSubModels: false
@@ -108528,6 +108489,7 @@ function useDocumentFactory(props, payload) {
108528
108489
  query,
108529
108490
  instances: doc.model?.getWidgetInstances() ?? [],
108530
108491
  subTableInfoList: doc.model?.getSubTableInfoList() ?? [],
108492
+ fieldList,
108531
108493
  masterSlaveList
108532
108494
  });
108533
108495
  doc.dataManager.setRawData(rawData);
@@ -22,6 +22,7 @@ export interface PrepareFieldContextOptions {
22
22
  }
23
23
  export interface DocumentFieldContext {
24
24
  mainModelKey: string;
25
+ fieldList: FieldMeta[];
25
26
  masterSlaveList: FieldMeta[];
26
27
  }
27
28
  export declare function prepareDocumentFieldContext(options: PrepareFieldContextOptions): Promise<DocumentFieldContext>;
@@ -32,6 +33,7 @@ export interface PrepareRenderDataOptions {
32
33
  query: Record<string, any>;
33
34
  instances: any[];
34
35
  subTableInfoList: any[];
36
+ fieldList: FieldMeta[];
35
37
  masterSlaveList: FieldMeta[];
36
38
  }
37
39
  export declare function prepareDocumentRenderData(options: PrepareRenderDataOptions): Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gct-paas/word",
3
- "version": "0.1.52-beta.11",
3
+ "version": "0.1.52-beta.12",
4
4
  "description": "GCT 在线 word",
5
5
  "keywords": [
6
6
  "vue",