@gct-paas/excel 0.1.20 → 0.1.22

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 (170) hide show
  1. package/dist/{VueVideoPlayer-DePpm38H.js → VueVideoPlayer-dfgekKID.js} +2 -2
  2. package/dist/{agg-design-hreKYp5a.js → agg-design-yDLZkVkR.js} +1 -1
  3. package/dist/{agg-props-CCDh2o6E.js → agg-props-DrXyaNCT.js} +1 -1
  4. package/dist/{agg-style-Bh8vdJvs.js → agg-style-D_6r9Myg.js} +1 -1
  5. package/dist/{align-editor-DpDuDOMr.js → align-editor-D5Ra4SB6.js} +1 -1
  6. package/dist/{attach-fields-editor-BeGxW6de.js → attach-fields-editor-C4JBi-p_.js} +3 -2
  7. package/dist/{barcode-design-CFVTZNAy.js → barcode-design-D3JH5Afi.js} +2 -2
  8. package/dist/base/index.es.js +350 -172
  9. package/dist/{base-font-editor-laOkjBe1.js → base-font-editor-B6J_Ts2T.js} +3 -2
  10. package/dist/{boolean-design-DIlM9Nrt.js → boolean-design-DQvGDcd9.js} +2 -2
  11. package/dist/{boolean-props-CGuFs72-.js → boolean-props-BPxPHLqI.js} +3 -3
  12. package/dist/{boolean-style-BUz6sBUN.js → boolean-style-BSc1-meP.js} +4 -4
  13. package/dist/{cell-upload-Dw3t7ZKJ.js → cell-upload-CiWekXUb.js} +3 -2
  14. package/dist/{date-range-editor-rXaru-8n.js → date-range-editor-DPt8-LqQ.js} +3 -2
  15. package/dist/{date-time-design-HfjWK3SA.js → date-time-design-Dv4dW-Iy.js} +1 -1
  16. package/dist/{date-time-props-C_cG-6wI.js → date-time-props-Cs4GVKqC.js} +3 -3
  17. package/dist/{date-time-style-BeCDP5TE.js → date-time-style-iSIC_SNA.js} +1 -1
  18. package/dist/{decimal-design-DzLpjX9N.js → decimal-design-C-GvHZPx.js} +1 -1
  19. package/dist/{decimal-display-mode-BhD1cOOe.js → decimal-display-mode-C_ooE9xL.js} +2 -2
  20. package/dist/{decimal-props-C6f22071.js → decimal-props-Vv8GsEHC.js} +4 -4
  21. package/dist/{decimal-style-XN3rLM2j.js → decimal-style-CY-zOSpD.js} +1 -1
  22. package/dist/{default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-CJC4kBNh.js → default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-Bw0TkvW-.js} +3 -2
  23. package/dist/{diagonal-design-Dh0qhgSq.js → diagonal-design-DS1kXGt1.js} +16 -4
  24. package/dist/{double-design-XHHlqmEp.js → double-design-DAz8wmRS.js} +1 -1
  25. package/dist/{double-props-Cvi36aBN.js → double-props-e76nS4qi.js} +4 -4
  26. package/dist/{double-style-Dkoth54S.js → double-style-kWIo_xYy.js} +1 -1
  27. package/dist/{dynamic-table-action-mGrBO_bn.js → dynamic-table-action-CbHoY76E.js} +42 -3
  28. package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-OPdk2I5p.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-BfGYCqH5.js} +205 -266
  29. package/dist/{edit.utils-CXmmCnxE-DeDBtyJd.js → edit.utils-CXmmCnxE-CLCBDG4R.js} +1 -1
  30. package/dist/{enum-design-CAOAFdI6.js → enum-design-DVoXOTIU.js} +2 -2
  31. package/dist/{enum-props-CBN-AvBS.js → enum-props-DgsIc2Fz.js} +4 -4
  32. package/dist/{enum-style-cOiK44Ae.js → enum-style-C4r86NqC.js} +3 -3
  33. package/dist/excel.css +9781 -10010
  34. package/dist/{exceljs.min-pnja99MZ.js → exceljs.min-D-mqoZsC.js} +2 -2
  35. package/dist/{expression-design-CqgcK8eO.js → expression-design-D7PiPYQJ.js} +1 -1
  36. package/dist/{expression-props-wXQOIrMY.js → expression-props-DDcg6alT.js} +1 -1
  37. package/dist/{expression-style-BzavnOux.js → expression-style-C0GgXqbp.js} +1 -1
  38. package/dist/{file-design-BSQknhnY.js → file-design-CeAmaBow.js} +1 -1
  39. package/dist/{file-props-CwiuBVHW.js → file-props-e06WxwTc.js} +2 -2
  40. package/dist/{file-style-CG4a3THb.js → file-style-FigMgXwH.js} +1 -1
  41. package/dist/{font-editor--CgwL-wF.js → font-editor-DYBI1FXx.js} +3 -3
  42. package/dist/{image-design-D1D0SN5W.js → image-design-CcHGCTJH.js} +2 -2
  43. package/dist/{image-design-CwPjfDxf.js → image-design-DxKCuSrx.js} +2 -2
  44. package/dist/{image-props-C4E9gMsG.js → image-props-Co5Kp-ZH.js} +1 -1
  45. package/dist/{image-style-CIb1mi13.js → image-style-D6I5jBAk.js} +1 -1
  46. package/dist/{index-BJYSmTeW.js → index-8-tnvhRC.js} +1 -1
  47. package/dist/{index-0mxMA4vZ.js → index-B2Rk7ex6.js} +1 -1
  48. package/dist/{index-Drf0Arr4.js → index-BC-Zhsm-.js} +1 -1
  49. package/dist/{index-D9tUJAeF.js → index-BZfGHVOt.js} +1 -1
  50. package/dist/{index-B7DDYlzm.js → index-Bsabb65u.js} +1 -1
  51. package/dist/{index-DOj318_B.js → index-C7EF3bU6.js} +2 -2
  52. package/dist/{index-CeMBvNee.js → index-CRcKdyyr.js} +1 -1
  53. package/dist/{index-DLoQlQk6.js → index-CTEoW7C9.js} +2 -2
  54. package/dist/{index-ZrNXSw4w.js → index-CgDvaY3D.js} +1 -1
  55. package/dist/{index-CcmNFTia.js → index-CpsQzaA9.js} +2 -2
  56. package/dist/{index-CIl6oWcB.js → index-CwwHZhmI.js} +1 -1
  57. package/dist/{index-CKqLoN9r.js → index-D3H3AjqQ.js} +1 -1
  58. package/dist/{index-B2ZNkbGm.js → index-D51-PvAq.js} +1 -1
  59. package/dist/{index-BAlLZmfu.js → index-D6YzCpCw.js} +2 -1
  60. package/dist/{index-Dl2FIifp.js → index-D7DRfQTh.js} +1 -1
  61. package/dist/{index-PWmkKVZV.js → index-DFGBKBau.js} +1 -1
  62. package/dist/{index-BG_CEaW0.js → index-DJdI2Xy_.js} +41808 -3703
  63. package/dist/{index-A2MbCZtS.js → index-DSSHWwFD.js} +4 -1
  64. package/dist/{index-D0XkCn_x.js → index-DXtJ-139.js} +1 -1
  65. package/dist/index-Dacbq4L4.js +4420 -0
  66. package/dist/{index-D0n65ya-.js → index-DgBJVPsK.js} +1 -1
  67. package/dist/{index-BKoXo3Ha.js → index-Dku5Txlf.js} +1 -1
  68. package/dist/{index-PMDIMwwL.js → index-DsBusJ7S.js} +1 -1
  69. package/dist/{index-BneV2tbp.js → index-Dx6OiqW2.js} +1 -1
  70. package/dist/{index-Cgka0WmQ.js → index-E-flWZFi.js} +1 -1
  71. package/dist/{index-B2tFXR--.js → index-GGZRPnYe.js} +2 -2
  72. package/dist/{index-Bi4hE4Ye.js → index-H9YwRWK1.js} +2 -2
  73. package/dist/{index-CGSTq7zN.js → index-J1Nf5wgV.js} +1 -1
  74. package/dist/{index-BSHUFede.js → index-OK49_noi.js} +1 -1
  75. package/dist/{index-HHF5iK-6.js → index-UeWlvtDf.js} +1 -1
  76. package/dist/{index-UUDS4nmS.js → index-l3TfFIxY.js} +1 -1
  77. package/dist/{index-ByTKu8n6.js → index-xg8BpbDL.js} +1 -1
  78. package/dist/{index-Hg59RKKE.js → index-yclgXrqJ.js} +1 -1
  79. package/dist/index.es.js +45 -45
  80. package/dist/{integer-design-Cy9c0fzI.js → integer-design-DJ4aKAz0.js} +1 -1
  81. package/dist/{integer-props-DFDOIb2a.js → integer-props-CaSOySHa.js} +5 -4
  82. package/dist/{integer-style-CfIX5ReH.js → integer-style-CCLqQ4ys.js} +1 -1
  83. package/dist/{mb-render-D_uumPQr.js → mb-render-JGHghp5L.js} +1 -30
  84. package/dist/{number-input-ex-CWci0pCj.js → number-input-ex-CtHpEamV.js} +2 -1
  85. package/dist/{org-props-B5dk289u.js → org-props-CRAmwHlJ.js} +2 -2
  86. package/dist/{org-style-BoSDPuw9.js → org-style-BWj_AEnP.js} +1 -1
  87. package/dist/{pagination-design-Ci4wxUIk.js → pagination-design-BGUqZKxh.js} +2 -2
  88. package/dist/paper-widget-design-CgmZ8LSm.js +4 -0
  89. package/dist/{qrcode-design-CJ9R5DIn.js → qrcode-design-CjN0UWN3.js} +1 -1
  90. package/dist/{ref-autofill-editor-B4KDvHhR.js → ref-autofill-editor-BKYPW69A.js} +2 -3
  91. package/dist/{ref-props-CwDGepT3.js → ref-props-M99PRlsI.js} +3 -3
  92. package/dist/{ref-style-B35CsOQO.js → ref-style-BCeprSYg.js} +1 -1
  93. package/dist/{regex-editor-CIVvr_Lx.js → regex-editor-BGaFYbF4.js} +3 -2
  94. package/dist/{revo-grid.entry-DeWzC35s.js → revo-grid.entry-Bokapeoj.js} +1 -1
  95. package/dist/{revogr-attribution_7.entry-BJZ-twfj.js → revogr-attribution_7.entry-D7WJHpFT.js} +3 -3
  96. package/dist/{revogr-clipboard_3.entry-DkgRA8qw.js → revogr-clipboard_3.entry-Bk1SGzbF.js} +2 -2
  97. package/dist/{revogr-data_4.entry-BZLzvcbo.js → revogr-data_4.entry-2v7X9qHp.js} +2 -2
  98. package/dist/{revogr-filter-panel.entry-zGvhshno.js → revogr-filter-panel.entry-DXaW46ts.js} +1 -1
  99. package/dist/{select-render-type-editor.vue_vue_type_script_setup_true_lang-Asn5-ZRz.js → select-render-type-editor.vue_vue_type_script_setup_true_lang-ygXwKc_C.js} +2 -2
  100. package/dist/{serialnumber-design-CYFU5TVt.js → serialnumber-design-Bo13RmJa.js} +1 -1
  101. package/dist/shared/index.es.js +18 -19
  102. package/dist/{signature-design-Cwi0cZOI.js → signature-design-DT5T5nus.js} +1 -1
  103. package/dist/{signature-props-cQRB8U8x.js → signature-props-cW9R4qcY.js} +3 -3
  104. package/dist/{signature-style-C90NsLxg.js → signature-style-XPxgyfzG.js} +1 -1
  105. package/dist/{single-field-drop-BFhQs-3z.js → single-field-drop-CjK8KjfH.js} +3 -2
  106. package/dist/{size-editor-Dx3y_otg.js → size-editor-aLyY3Bsr.js} +1 -1
  107. package/dist/src/nocode-base/src/constant/index.d.ts +16 -1
  108. package/dist/src/nocode-base/src/hooks/annotation/form-annotation-controller.d.ts +14 -148
  109. package/dist/src/nocode-base/src/hooks/annotation/index.d.ts +0 -1
  110. package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +3 -1
  111. package/dist/src/nocode-base/src/hooks/material-consume/mc-render.d.ts +8 -1
  112. package/dist/src/nocode-base/src/hooks/material-consume/types.d.ts +13 -0
  113. package/dist/src/nocode-base/src/types/common/base.d.ts +8 -0
  114. package/dist/src/nocode-base/src/types/fields/i-trace.d.ts +6 -0
  115. package/dist/src/nocode-base/src/types/render/mc-render.d.ts +8 -1
  116. package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +8 -1
  117. package/dist/src/nocode-base/src/types/widgets/i-diagonal.d.ts +4 -2
  118. package/dist/src/nocode-web-render/src/index.d.ts +0 -1
  119. package/dist/src/nocode-web-render/src/render/sub-table/common/scan-modal.vue.d.ts +12 -1
  120. package/dist/src/nocode-web-render/src/render/sub-table/common/sub-table-render.d.ts +8 -1
  121. package/dist/src/nocode-web-render/src/render/sub-table/material-consume/mc-web-render.d.ts +7 -0
  122. package/dist/src/online-form/src/views/__cell_widgets__/common/assoc-filter-editor/assoc-filter-editor.vue.d.ts +20 -0
  123. package/dist/src/online-form/src/views/__cell_widgets__/common/assoc-filter-editor/assoc-filter.util.d.ts +30 -0
  124. package/dist/src/online-form/src/views/__cell_widgets__/common/assoc-filter-editor/assoc-source-field-select.vue.d.ts +22 -0
  125. package/dist/src/online-form/src/views/__cell_widgets__/common/assoc-filter-editor/index.d.ts +3 -0
  126. package/dist/src/online-form/src/views/designer/hooks/useAllSpreadSheets.d.ts +40 -0
  127. package/dist/src/online-form/src/views/designer/hooks/useSpreadSheet.d.ts +55 -0
  128. package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/common/data-source-title.vue.d.ts +2 -2
  129. package/dist/src/online-form/src/views/render/__components__/_field_/trace/composables/assoc-filter.d.ts +11 -0
  130. package/dist/src/shared/components/Signature/ui/sign-editor.vue.d.ts +2 -2
  131. package/dist/src/shared/components/version-select/version-select.vue.d.ts +2 -2
  132. package/dist/{text-design-TEheiKQx.js → text-design-DIR_98fe.js} +2 -2
  133. package/dist/{text-design-jMPxIgZW.js → text-design-Dz8pIESR.js} +2 -2
  134. package/dist/{text-props-CrkSvg6D.js → text-props-BxirdX2V.js} +5 -5
  135. package/dist/{text-style-DmwTt8KQ.js → text-style-MPmJRVRg.js} +1 -1
  136. package/dist/{throttle-Cpk1LoGk-DTkhEkFR.js → throttle-Cpk1LoGk-C22z7VFi.js} +1 -1
  137. package/dist/{timediff-design-D_if-K1S.js → timediff-design-Pud7SFpe.js} +1 -1
  138. package/dist/{trace-design-oN7pgtab.js → trace-design-DNVZ_y9D.js} +2 -2
  139. package/dist/trace-props-LPvWrrti.js +610 -0
  140. package/dist/{trace-style-TNnFcvfw.js → trace-style-DnaicSRA.js} +1 -1
  141. package/dist/use-namespace-qtLS8nEh.js +88 -0
  142. package/dist/{user-props-Ce-ilCmU.js → user-props-DdTpHX3B.js} +2 -2
  143. package/dist/{user-style-4rp0jKYP.js → user-style-6SWgJi8d.js} +1 -1
  144. package/dist/{value-editor.vue_vue_type_style_index_0_lang-DMuR0u4j.js → value-editor.vue_vue_type_style_index_0_lang-DKeZWlc0.js} +2 -2
  145. package/dist/{version-select-DSFIlYgX.js → version-select-CXWtI4W-.js} +1041 -4
  146. package/dist/web-render/index.es.js +12 -955
  147. package/dist/{widget-barcode-Du7LOaiy.js → widget-barcode-iBjDv4NF.js} +4 -4
  148. package/dist/{widget-diagonal-D-q7WK6T.js → widget-diagonal-4ZMgaI9y.js} +73 -17
  149. package/dist/{widget-image-Da5mvgMm.js → widget-image-B63wZzz4.js} +5 -5
  150. package/dist/{widget-line-oIFH8P04.js → widget-line-CIG-L--W.js} +2 -2
  151. package/dist/{widget-pagination-CSonelt_.js → widget-pagination-CAmhXECi.js} +5 -5
  152. package/dist/{widget-power-CWczWA7K.js → widget-power-CsiguFSe.js} +4 -3
  153. package/dist/{widget-qrcode-MQ-cSphb.js → widget-qrcode-BuEayrLO.js} +3 -3
  154. package/dist/{widget-rangelimit-CFDeRJIf.js → widget-rangelimit-CqaLvV8n.js} +4 -3
  155. package/dist/{widget-serialnumber-DlE2-jvp.js → widget-serialnumber-C_wAw0TS.js} +1 -1
  156. package/dist/{widget-text-B1SnpOGN.js → widget-text-CRApo2EO.js} +5 -5
  157. package/dist/{widget-timediff-DeyJbqRE.js → widget-timediff-D1q5VNhe.js} +2 -2
  158. package/package.json +1 -1
  159. package/dist/AntdIcon-C3RMq2zm.js +0 -1040
  160. package/dist/form-annotation-controller-DDDyHAwe.js +0 -707
  161. package/dist/index-CWpratsK.js +0 -41850
  162. package/dist/paper-widget-design-BilYU9rh.js +0 -4
  163. package/dist/src/nocode-base/src/hooks/annotation/types.d.ts +0 -16
  164. package/dist/src/nocode-web-render/src/annotation/form-abandon-medpro-modal.vue.d.ts +0 -15
  165. package/dist/src/nocode-web-render/src/annotation/form-abandon-modal.vue.d.ts +0 -15
  166. package/dist/src/nocode-web-render/src/annotation/form-abandon-v2-modal.vue.d.ts +0 -11
  167. package/dist/src/nocode-web-render/src/annotation/index.d.ts +0 -2
  168. package/dist/src/nocode-web-render/src/annotation/submit-form-change-modal.vue.d.ts +0 -104
  169. package/dist/src/nocode-web-render/src/annotation/use-annotation.d.ts +0 -37
  170. package/dist/trace-props-BFnUk6kv.js +0 -275
@@ -1,707 +0,0 @@
1
- import { inject, onBeforeMount, watch, ref, computed } from "vue";
2
- import { aY as EBR_PROVIDE_ENUM, au as useNocodeEmitter, v as FormTypeEnum, aq as RenderModeEnum, aM as uuid2, b7 as collectFormChangeFieldLocations, bp as nextFormChangeRowViewHistoryId, i as api, b2 as SummaryApproveHisTypeEnum, a1 as EntityModelCategoryEnum } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-OPdk2I5p.js";
3
- import { isEmpty } from "lodash-es";
4
- import "dayjs";
5
- import "ant-design-vue";
6
- import { I as InstanceStatusValues } from "./mb-render-D_uumPQr.js";
7
- var MaterialStatusEnum = /* @__PURE__ */ ((MaterialStatusEnum2) => {
8
- MaterialStatusEnum2["LOT"] = "LOT";
9
- MaterialStatusEnum2["SN"] = "SN";
10
- MaterialStatusEnum2["FORM"] = "FORM";
11
- MaterialStatusEnum2["PRODUCT_RELEASE"] = "PRODUCT_RELEASE";
12
- MaterialStatusEnum2["LOT_SN_APPEND"] = "LOT_SN_APPEND";
13
- MaterialStatusEnum2["TXN"] = "TXN";
14
- MaterialStatusEnum2["DHR"] = "DHR";
15
- MaterialStatusEnum2["NOTEBOOK"] = "NOTEBOOK";
16
- MaterialStatusEnum2["REWORK"] = "REWORK";
17
- return MaterialStatusEnum2;
18
- })(MaterialStatusEnum || {});
19
- var FillingTypeEnum = /* @__PURE__ */ ((FillingTypeEnum2) => {
20
- FillingTypeEnum2["UNFILLED"] = "UNFILLED";
21
- FillingTypeEnum2["CREATED"] = "CREATED";
22
- FillingTypeEnum2["COMPLETED"] = "COMPLETED";
23
- return FillingTypeEnum2;
24
- })(FillingTypeEnum || {});
25
- var BuiltinAction = /* @__PURE__ */ ((BuiltinAction2) => {
26
- BuiltinAction2["ShowAnnotation"] = "ShowAnnotation";
27
- BuiltinAction2["CloseAnnotation"] = "CloseAnnotation";
28
- BuiltinAction2["DoFormChange"] = "DoFormChange";
29
- BuiltinAction2["SubmitFormChange"] = "SubmitFormChange";
30
- BuiltinAction2["SubmitMedProFormChange"] = "SubmitMedProFormChange";
31
- BuiltinAction2["DoFormAbandon"] = "DoFormAbandon";
32
- BuiltinAction2["DoFormResubmit"] = "DoFormResubmit";
33
- BuiltinAction2["DoMedProFormAbandon"] = "DoMedProFormAbandon";
34
- return BuiltinAction2;
35
- })(BuiltinAction || {});
36
- var ChangeType = /* @__PURE__ */ ((ChangeType2) => {
37
- ChangeType2["Form"] = "Form";
38
- ChangeType2["Resubmit"] = "Resubmit";
39
- ChangeType2["Abandon"] = "Abandon";
40
- return ChangeType2;
41
- })(ChangeType || {});
42
- function collectAnnotationItemsByLocation(map, cellLocation, fallback = []) {
43
- if (cellLocation == null || cellLocation === "") return fallback;
44
- const locs = Array.isArray(cellLocation) ? cellLocation : [cellLocation];
45
- const merged = [];
46
- const seen = /* @__PURE__ */ new Set();
47
- locs.forEach((loc) => {
48
- (map.get(loc) || []).forEach((item) => {
49
- if (seen.has(item.id)) return;
50
- seen.add(item.id);
51
- merged.push(item);
52
- });
53
- });
54
- return merged;
55
- }
56
- function annotationItemTime(item) {
57
- return Date.parse(item.time || item.createTime || "");
58
- }
59
- function filterAnnotationItemsUpToCurrent(items) {
60
- if (!items?.length) return [];
61
- const current = items.find((item) => item.isCurrentChange);
62
- if (!current) return items;
63
- const currentTs = annotationItemTime(current);
64
- if (Number.isNaN(currentTs)) {
65
- return items.filter((item) => item.isCurrentChange);
66
- }
67
- return items.filter((item) => {
68
- if (item.isCurrentChange) return true;
69
- const ts = annotationItemTime(item);
70
- if (Number.isNaN(ts)) return false;
71
- return ts <= currentTs;
72
- });
73
- }
74
- class FormAnnotationController {
75
- formIns;
76
- basicIns;
77
- needAbandonBtn;
78
- formRef;
79
- paramExtraProps;
80
- dataCollectionInfo;
81
- onBtnClick;
82
- onVisibleChange;
83
- checkedEditFormByUser;
84
- /**
85
- * 构造函数必须在setup里使用
86
- * @param params
87
- */
88
- constructor(params) {
89
- Object.assign(this, params);
90
- this.showAnnotation.value = this.paramExtraProps?._gct_default_annotation_status_ || false;
91
- this.roleBuiltinBtnPermission = inject(
92
- EBR_PROVIDE_ENUM.EDHR_BUTTON_PERMISSION,
93
- this.roleBuiltinBtnPermission
94
- );
95
- const { emitter, EmitterEnum } = useNocodeEmitter();
96
- onBeforeMount(() => {
97
- emitter.on(EmitterEnum.__on__open_single_annotation_detail_, (params2) => {
98
- console.log("打开单个批注详情 aaaa", params2);
99
- this.selectedCell.value = params2.cellLocation;
100
- });
101
- });
102
- watch(
103
- [this.ready, this.showAnnotation],
104
- async ([isReady, visible]) => {
105
- if (!isReady) {
106
- return;
107
- }
108
- if (!this.showButtonKeys.value.includes("annotate-button")) {
109
- return;
110
- }
111
- const uniqueId = this.basicIns.value?.uniqueId ?? "";
112
- if (!visible) {
113
- this.selectedCell.value = void 0;
114
- this.rowViewHistoryId.value = void 0;
115
- await this.formRef.setAnnotationViewStatus(uniqueId, false, []);
116
- return;
117
- }
118
- const defaultAnnotationStatus = !!this.paramExtraProps?._gct_default_annotation_status_;
119
- if (defaultAnnotationStatus) {
120
- await this.fetchApprovalFormChangeHistory();
121
- } else {
122
- await this.fetchAllFormChangeHistory();
123
- }
124
- this.rowViewHistoryId.value = void 0;
125
- await this.formRef.setAnnotationViewStatus(uniqueId, true, {
126
- locations: this.allCellLocation.value,
127
- rowDetails: []
128
- });
129
- },
130
- {
131
- immediate: true
132
- }
133
- );
134
- }
135
- /** 内置按钮权限控制 */
136
- roleBuiltinBtnPermission = ref({
137
- Annotate: false,
138
- Cancel: false,
139
- Update: false,
140
- _gct_summary_approve_type_: ""
141
- });
142
- /** 当前登录的用户名 */
143
- userName;
144
- //! 批注相关变量
145
- /** 正在标注 */
146
- showAnnotation = ref(false);
147
- /** 所有的父级批注数据 */
148
- annotationList = ref([]);
149
- /** 所有的修改过的单元格位置 */
150
- allCellLocation = ref();
151
- /** 当前展开行级展示的变更记录 id */
152
- rowViewHistoryId = ref();
153
- /** 是否已经加载过批注数据 */
154
- hasLoadedHistory = ref(false);
155
- //! 变更相关变量
156
- /** 正在进行表单变更 */
157
- formChanging = ref(false);
158
- /** 表单变更原因 */
159
- formChangeReason = ref();
160
- /** 选中单元格的位置 */
161
- selectedCell = ref();
162
- //! 表单相关变量
163
- /** 单据名称 */
164
- docName = computed(() => {
165
- return `【${this.formIns.value.tmplName}】`;
166
- });
167
- /** 表单是否是结束状态 */
168
- isFormEnded = computed(() => {
169
- const { formType, dataStatus, instanceStatus } = this.formIns.value;
170
- if (formType === FormTypeEnum.PROCESS) {
171
- return instanceStatus === InstanceStatusValues.COMPLETED || instanceStatus === InstanceStatusValues.ABANDON;
172
- } else {
173
- if (instanceStatus) {
174
- return instanceStatus === InstanceStatusValues.COMPLETED || instanceStatus === InstanceStatusValues.ABANDON;
175
- }
176
- return dataStatus === "SUBMIT";
177
- }
178
- });
179
- /** 表单是否是废弃状态 */
180
- isFormDeprecated = computed(() => {
181
- const { instanceStatus } = this.formIns.value;
182
- return instanceStatus === InstanceStatusValues.ABANDON;
183
- });
184
- /** 表单是否是变更审核中状态 */
185
- isFormInAudit = computed(() => {
186
- const { instanceStatus } = this.formIns.value;
187
- return instanceStatus === InstanceStatusValues.IN_AUDIT;
188
- });
189
- /** 表单是否是未填报、暂存、进行中的状态 */
190
- isFormUnfilled = computed(() => {
191
- const { instanceStatus } = this.formIns.value;
192
- return InstanceStatusValues.UNFILLED === instanceStatus || InstanceStatusValues.RUNNING === instanceStatus || InstanceStatusValues.STASH === instanceStatus;
193
- });
194
- /** 显示内置按钮 */
195
- showButtonKeys = computed(() => {
196
- const buttonKeys = [];
197
- const { Annotate, Cancel, Update } = this.roleBuiltinBtnPermission.value;
198
- const isBaseOrProcessOrFile = this.formIns.value.formType === FormTypeEnum.BASE || this.formIns.value.formType === FormTypeEnum.PROCESS || this.formIns.value.formType === FormTypeEnum.FILE;
199
- if ((this.isFormEnded.value || this.isFormInAudit.value) && (Annotate || this.paramExtraProps?._gct_is_form_change_approval_page_) && !this.formChanging.value && isBaseOrProcessOrFile) {
200
- buttonKeys.push("annotate-button");
201
- }
202
- const shouldShowAbandon = !this.showAnnotation.value && isBaseOrProcessOrFile;
203
- if (Cancel) {
204
- if (this.isFormEnded.value && !this.showAnnotation.value && this.formIns.value.businessType !== MaterialStatusEnum.PRODUCT_RELEASE) {
205
- buttonKeys.push(this.isFormDeprecated.value ? "resubmit-button" : "abandon-button");
206
- }
207
- } else if (this.needAbandonBtn && this.formIns.value.edhrInstanceId && this.isFormUnfilled.value && this.basicIns.value?.btnRenderModeType === RenderModeEnum.FormMode && shouldShowAbandon) {
208
- buttonKeys.push("abandon-button");
209
- }
210
- if (this.isFormEnded.value && Update && !this.showAnnotation.value && !this.isFormDeprecated.value) {
211
- buttonKeys.push("modify-button");
212
- }
213
- if (!!this.dataCollectionInfo && this.isFormUnfilled.value && this.basicIns.value?.btnRenderModeType === RenderModeEnum.FormMode) {
214
- buttonKeys.push("medpro-abandon-button");
215
- }
216
- return buttonKeys;
217
- });
218
- /**
219
- * 获取后台接口的参数
220
- */
221
- getBackendParams = async () => {
222
- const uniqueId = this.basicIns.value?.uniqueId ?? "";
223
- const formData = await this.formRef.getFormState(uniqueId);
224
- const data = { ...formData, __GCT_FOREIGN__: null };
225
- const taskId = this.formIns.value.ofProcessOperations?.taskId;
226
- return {
227
- data,
228
- ofInstId: this.formIns.value.id,
229
- taskId
230
- };
231
- };
232
- // 后端需要在请求头增加随机数
233
- getExConfig() {
234
- return {
235
- transferToConfig: {
236
- headers: {
237
- "Trace-Id": uuid2(32, 32)
238
- }
239
- }
240
- };
241
- }
242
- normalizeApprovalResponse = (res) => {
243
- if (!res) return [];
244
- return (res ?? []).map((item) => {
245
- const params = JSON.parse(item.params_ || "{}");
246
- return {
247
- id: item.id_,
248
- changeNo: item.change_no_,
249
- isCurrentChange: item.change_no_ === this.paramExtraProps?._gct_change_business_code_,
250
- changeType: params?.historyRequest?.changeType || params.btnKey,
251
- avatar: item.avatar_,
252
- createUserName: item.create_user_name_,
253
- createTime: item.create_time_,
254
- reason: params?.historyRequest?.reason || params?.reason,
255
- signInfo: item.signInfo_,
256
- details: params?.historyRequest?.details,
257
- processId: item.approve_process_id_,
258
- processInstId: item.proc_inst_id_
259
- };
260
- });
261
- };
262
- normalizeAllResponse = (res) => {
263
- if (!res) return [];
264
- return Array.isArray(res) ? res : res.data ?? [];
265
- };
266
- applyAnnotationItems = (items, callback) => {
267
- const scoped = this.scopeAnnotationItems(items || []);
268
- this.annotationList.value = scoped;
269
- const fieldItems = scoped.filter(
270
- (item) => item.changeType === ChangeType.Form && item.details?.length && callback?.(item)
271
- );
272
- this.allCellLocation.value = collectFormChangeFieldLocations(fieldItems);
273
- };
274
- scopeAnnotationItems(items) {
275
- if (!items?.length) return [];
276
- if (this.paramExtraProps?._gct_form_change_approval_handle_) {
277
- return items.filter((item) => item.isCurrentChange);
278
- }
279
- if (this.paramExtraProps?._gct_is_form_change_approval_page_ || this.paramExtraProps?._gct_change_business_code_) {
280
- return filterAnnotationItemsUpToCurrent(items);
281
- }
282
- return items;
283
- }
284
- toggleFormChangeRowView = async (historyId) => {
285
- const uniqueId = this.basicIns.value?.uniqueId ?? "";
286
- const next = nextFormChangeRowViewHistoryId(
287
- this.rowViewHistoryId.value,
288
- historyId,
289
- this.annotationList.value
290
- );
291
- this.rowViewHistoryId.value = next.historyId;
292
- await this.formRef.setFormChangeRowViewDetails?.(
293
- uniqueId,
294
- next.rowDetails.length ? next.rowDetails : null,
295
- next.historyId
296
- );
297
- };
298
- /** 加载审批的批注信息 */
299
- fetchApprovalFormChangeHistory = async () => {
300
- if (isEmpty(this.formIns.value)) {
301
- throw new Error($t("sys.onlineForm.formInstanceIsEmpty"));
302
- }
303
- try {
304
- const res = await api.apaas.bizService.getModelKeyBsKey(
305
- {
306
- modelKey: "em_edhr_summary_approve_his",
307
- bsKey: "list"
308
- },
309
- {
310
- onlineFormInstanceId: this.formIns.value.id
311
- }
312
- );
313
- const items = this.normalizeApprovalResponse(res);
314
- this.applyAnnotationItems(
315
- items,
316
- (item) => this.paramExtraProps?._gct_form_change_approval_handle_ ? item.isCurrentChange : true
317
- );
318
- return items;
319
- } catch (e) {
320
- console.error("加载审批的批注信息 error", e);
321
- throw e;
322
- }
323
- };
324
- /** 加载所有批注信息 */
325
- fetchAllFormChangeHistory = async () => {
326
- if (isEmpty(this.formIns.value)) {
327
- throw new Error($t("sys.onlineForm.formInstanceIsEmpty"));
328
- }
329
- try {
330
- const res = await api.apaas.onlineFormChangeHistory.getList({
331
- instanceId: this.formIns.value.id,
332
- tmplId: this.formIns.value.tmplId
333
- });
334
- const items = this.normalizeAllResponse(res);
335
- this.applyAnnotationItems(items, () => true);
336
- return items;
337
- } catch (e) {
338
- console.error("加载所有批注信息 error", e);
339
- throw e;
340
- }
341
- };
342
- /** 开启批注 */
343
- handleOpenAnnotation = async () => {
344
- this.showAnnotation.value = true;
345
- if (this.onVisibleChange && typeof this.onVisibleChange === "function") {
346
- this.onVisibleChange(false);
347
- }
348
- };
349
- /** 关闭批注 */
350
- handleCloseAnnotation = async () => {
351
- this.showAnnotation.value = false;
352
- this.selectedCell.value = void 0;
353
- };
354
- ready = computed(() => {
355
- return this.basicIns.value && this.basicIns.value.uniqueId;
356
- });
357
- /**
358
- * 点击表单废弃后续逻辑
359
- */
360
- doFormAbandon = async () => {
361
- if (this.formIns.value.formType === FormTypeEnum.TEXT || this.formIns.value.formType === FormTypeEnum.VIEW) {
362
- this.warn(`${$t(`sys.onlineForm.formTypeEnum.${this.formIns.value.formType}`)}不能作废`);
363
- return;
364
- }
365
- const res = await this.openFormAbandonV2Modal({});
366
- if (!res) return;
367
- const { reason, applicant, reviewer, approveTmplId } = res;
368
- console.log("确认废弃", reason, reviewer, applicant, approveTmplId);
369
- const { ofInstId, taskId } = await this.getBackendParams();
370
- let summaryApproveHisType;
371
- let notebookId;
372
- if (this.roleBuiltinBtnPermission.value.Cancel) {
373
- summaryApproveHisType = this.roleBuiltinBtnPermission.value._gct_summary_approve_type_;
374
- if (summaryApproveHisType === SummaryApproveHisTypeEnum.NOTEBOOK_CHANGE) {
375
- notebookId = this.paramExtraProps?._gct_record_id;
376
- }
377
- } else {
378
- summaryApproveHisType = SummaryApproveHisTypeEnum.DHR_CHANGE;
379
- if (this.paramExtraProps?._gct_is_form_dhr_release_page_) {
380
- summaryApproveHisType = SummaryApproveHisTypeEnum.FORM_CHANGE;
381
- }
382
- }
383
- const requestParams = {
384
- ofInstId,
385
- taskId,
386
- formType: this.formIns.value.formType,
387
- btnKey: ChangeType.Abandon,
388
- reason,
389
- signHistoryIds: [applicant.historyId],
390
- change: this.roleBuiltinBtnPermission.value.Cancel,
391
- buttonConfig: JSON.stringify({
392
- title: $t("sys.onlineForm.AnnotationChangeType.Abandon"),
393
- color: "#ff7875"
394
- }),
395
- approveTmplId,
396
- // 审批模板ID
397
- summaryApproveHisType,
398
- ...notebookId ? { notebookId } : {},
399
- edhrInstId: this.formIns.value.edhrInstanceId
400
- };
401
- await api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey(
402
- {
403
- modelCategory: EntityModelCategoryEnum.ENTITY,
404
- modelKey: "em_form_tmpl",
405
- bsKey: "submit_abandon"
406
- },
407
- {},
408
- requestParams,
409
- this.getExConfig()
410
- );
411
- if (this.formIns.value.ofRequired) {
412
- const { Cancel } = this.roleBuiltinBtnPermission.value;
413
- let param;
414
- if (Cancel) {
415
- param = {
416
- businessId: this.formIns.value.businessId,
417
- businessType: this.formIns.value.ext1 === "rework" ? "REWORK" : "DHR",
418
- ext1: this.formIns.value.ext1
419
- };
420
- } else {
421
- const ext1 = this.paramExtraProps?._gct_nocode_ext1_ ?? "production";
422
- param = {
423
- businessId: this.paramExtraProps?._gct_nocode_business_id_,
424
- // 当前工序节点id
425
- businessType: ext1 === "rework" ? "REWORK" : "DHR",
426
- ext1
427
- };
428
- }
429
- const res2 = await api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey(
430
- {
431
- modelCategory: EntityModelCategoryEnum.ENTITY,
432
- modelKey: "em_routing_operation_config",
433
- bsKey: "biz_form_list"
434
- },
435
- {},
436
- {
437
- ofTmplId: this.formIns.value.tmplId,
438
- // 判断是否需要创建实例只需要模版的父节点
439
- edhrInstanceId: this.formIns.value.edhrInstanceId,
440
- // edhr实例id
441
- ignoreAbandon: true,
442
- pageNo: 1,
443
- pageSize: 20,
444
- ...param
445
- }
446
- );
447
- if (res2) {
448
- this.info(
449
- $t("sys.onlineForm.thisFormIsRequiredAnInstanceHasBeenAutomaticallyCreatedForYou")
450
- );
451
- await api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey(
452
- {
453
- modelCategory: EntityModelCategoryEnum.ENTITY,
454
- modelKey: "gct_edhr_instance",
455
- bsKey: "insertFormInstance"
456
- },
457
- {},
458
- {
459
- docOutlineId: this.formIns.value.docOutlineId,
460
- edhrInstanceId: this.formIns.value.edhrInstanceId,
461
- // edhr实例id
462
- tmplId: this.formIns.value.tmplId,
463
- description: $t("sys.onlineForm.initializeInstance"),
464
- ...param
465
- }
466
- );
467
- } else {
468
- this.success($t("sys.operationSuccess"));
469
- }
470
- } else {
471
- this.success($t("sys.operationSuccess"));
472
- }
473
- this.onBtnClick({
474
- type: "Cancel",
475
- title: $t("sys.cancelText"),
476
- notNeedRefreshForm: false
477
- // 之前点击作废是直接会隐藏掉,所以不需要刷新,现在会走流程了,所以要主动刷新
478
- });
479
- };
480
- /**
481
- * 点击重新提交后续逻辑
482
- */
483
- doFormResubmit = async () => {
484
- console.log("重新提报");
485
- this.confirm({
486
- title: $t("sys.onlineForm.confirmResubmit"),
487
- onOk: async () => {
488
- const { ofInstId, taskId } = await this.getBackendParams();
489
- await api.apaas.onlineForm.postProcessResubmitOf(
490
- {
491
- ofInstId,
492
- taskId,
493
- formType: this.formIns.value.formType,
494
- btnKey: ChangeType.Resubmit,
495
- buttonConfig: JSON.stringify({
496
- title: $t("sys.onlineForm.AnnotationChangeType.Resubmit"),
497
- color: "var(--ant-primary-color)"
498
- })
499
- },
500
- this.getExConfig()
501
- );
502
- this.showAnnotation.value = false;
503
- this.onBtnClick({
504
- type: ChangeType.Resubmit,
505
- title: $t("sys.onlineForm.AnnotationChangeType.Resubmit")
506
- });
507
- },
508
- onCancel: () => {
509
- }
510
- });
511
- };
512
- /**
513
- * 点击表单变更后续逻辑
514
- */
515
- doFormChange = async () => {
516
- if (this.formIns.value.formType === FormTypeEnum.TEXT || this.formIns.value.formType === FormTypeEnum.VIEW) {
517
- this.warn(`${$t(`sys.onlineForm.formTypeEnum.${this.formIns.value.formType}`)}不能变更`);
518
- return;
519
- }
520
- this.checkedEditFormByUser && await this.checkedEditFormByUser();
521
- this.formChanging.value = true;
522
- const uniqueId = this.basicIns.value?.uniqueId ?? "";
523
- this.formRef.setFromEditStatus(uniqueId);
524
- };
525
- /**
526
- * 提交表单变更
527
- */
528
- submitFormChange = async () => {
529
- const res = await this.openFormAbandonV2Modal({ isFormChange: true });
530
- if (!res) return;
531
- const { reason, applicant, reviewer, approveTmplId } = res;
532
- console.log("提交表单变更", reason, reviewer, applicant, approveTmplId);
533
- const uniqueId = this.basicIns.value?.uniqueId ?? "";
534
- const { data, ofInstId, taskId } = await this.getBackendParams();
535
- const details = await this.formRef.getAnnotationContentList(uniqueId, {});
536
- const form = this.formIns.value;
537
- const applicantHist = applicant?.historyId;
538
- let summaryApproveHisType;
539
- let notebookId;
540
- if (this.roleBuiltinBtnPermission.value.Cancel) {
541
- summaryApproveHisType = this.roleBuiltinBtnPermission.value._gct_summary_approve_type_;
542
- if (summaryApproveHisType === SummaryApproveHisTypeEnum.NOTEBOOK_CHANGE) {
543
- notebookId = this.paramExtraProps?._gct_record_id;
544
- }
545
- } else {
546
- summaryApproveHisType = SummaryApproveHisTypeEnum.DHR_CHANGE;
547
- }
548
- const historyInsertBatchRequest = {
549
- changeType: ChangeType.Form,
550
- details,
551
- instanceId: form.id,
552
- reason,
553
- tmplId: form.tmplId,
554
- signHistoryIds: [applicantHist].filter(Boolean)
555
- };
556
- const requestParams = {
557
- btnKey: ChangeType.Form,
558
- buttonConfig: JSON.stringify({
559
- title: $t("sys.onlineForm.AnnotationChangeType.Form"),
560
- color: "var(--ant-primary-color)"
561
- }),
562
- data,
563
- historyRequest: historyInsertBatchRequest,
564
- ofInstId,
565
- opinion: reason,
566
- approveTmplId,
567
- // 审批模板ID
568
- summaryApproveHisType,
569
- ...notebookId ? { notebookId } : {},
570
- ...form.formType === FormTypeEnum.PROCESS && taskId ? { taskId } : {},
571
- edhrInstId: form.edhrInstanceId
572
- };
573
- await api.apaas.modelComprehensive.postBizServiceGeneralModelCategoryModelKeyBsKey(
574
- {
575
- modelCategory: EntityModelCategoryEnum.ENTITY,
576
- modelKey: "em_form_tmpl",
577
- bsKey: "submit_change"
578
- },
579
- {},
580
- requestParams,
581
- this.getExConfig()
582
- );
583
- this.success($t("sys.operationSuccess"));
584
- this.formChanging.value = false;
585
- this.onBtnClick({ type: "Cancel", title: $t("sys.cancelText") });
586
- };
587
- /**
588
- * medpro表单提交变更
589
- */
590
- doMedProSubmitFormChange = async () => {
591
- const res = await this.openFormAbandonMedProModal();
592
- if (!res) return;
593
- const { reason, applicant, reviewer } = res;
594
- console.log("medpro表单提交变更", res);
595
- const uniqueId = this.basicIns.value?.uniqueId ?? "";
596
- const details = await this.formRef.getAnnotationContentList(uniqueId, {});
597
- const form = this.formIns.value;
598
- const historyInsertBatchRequest = {
599
- changeType: ChangeType.Form,
600
- details,
601
- instanceId: form.id,
602
- reason,
603
- tmplId: form.tmplId,
604
- signHistoryIds: [applicant.historyId, reviewer.historyId]
605
- };
606
- const { data, ofInstId, taskId } = await this.getBackendParams();
607
- const buttonConfig = JSON.stringify({
608
- title: $t("sys.onlineForm.AnnotationChangeType.Form"),
609
- color: "var(--ant-primary-color)"
610
- });
611
- if (form.formType === FormTypeEnum.PROCESS) {
612
- await api.apaas.onlineForm.postProcessChange({
613
- btnKey: ChangeType.Form,
614
- buttonConfig,
615
- data,
616
- historyRequest: historyInsertBatchRequest,
617
- ofInstId,
618
- opinion: reason,
619
- taskId
620
- });
621
- } else {
622
- await api.apaas.onlineForm.postBaseSubmit({
623
- buttonConfig,
624
- data,
625
- btnKey: ChangeType.Form,
626
- historyRequest: historyInsertBatchRequest,
627
- ofInstId,
628
- opinion: reason
629
- });
630
- }
631
- this.getExConfig();
632
- this.formChanging.value = false;
633
- this.onBtnClick({ type: "Cancel", title: $t("sys.cancelText") });
634
- };
635
- /**
636
- * medpro表单废弃
637
- */
638
- doMedproFormAbandon = async () => {
639
- console.log(this.dataCollectionInfo);
640
- if (this.formIns.value.formType === FormTypeEnum.TEXT || this.formIns.value.formType === FormTypeEnum.VIEW) {
641
- this.warn(`${$t(`sys.onlineForm.formTypeEnum.${this.formIns.value.formType}`)}不能作废`);
642
- return;
643
- }
644
- const res = await this.openFormAbandonModal();
645
- if (!res) return;
646
- const { reason, applicant, reviewer } = res;
647
- const obj = await this.getBackendParams();
648
- await window.NocodeAdapter.apis?.postOnlineFormInstanceDataCollectionAbandon(
649
- {
650
- id: obj.ofInstId,
651
- reason,
652
- signHistoryIds: [applicant.historyId, reviewer.historyId],
653
- taskId: this.dataCollectionInfo.id
654
- },
655
- this.getExConfig()
656
- );
657
- this.onBtnClick({
658
- type: "Cancel",
659
- title: $t("sys.cancelText"),
660
- notNeedRefreshForm: !this.roleBuiltinBtnPermission.value.Cancel
661
- });
662
- };
663
- /** 处理内置按钮 */
664
- handleBuiltAction = async (action) => {
665
- switch (action) {
666
- case BuiltinAction.CloseAnnotation:
667
- await this.handleCloseAnnotation();
668
- break;
669
- case BuiltinAction.ShowAnnotation:
670
- await this.handleOpenAnnotation();
671
- break;
672
- case BuiltinAction.DoFormChange:
673
- await this.doFormChange();
674
- break;
675
- case BuiltinAction.SubmitFormChange:
676
- await this.submitFormChange();
677
- break;
678
- case BuiltinAction.SubmitMedProFormChange:
679
- await this.doMedProSubmitFormChange();
680
- break;
681
- case BuiltinAction.DoFormAbandon:
682
- await this.doFormAbandon();
683
- break;
684
- case BuiltinAction.DoFormResubmit:
685
- await this.doFormResubmit();
686
- break;
687
- case BuiltinAction.DoMedProFormAbandon:
688
- await this.doMedproFormAbandon();
689
- break;
690
- }
691
- };
692
- /**
693
- * 实例变化时候需要初始化状态
694
- */
695
- initState = () => {
696
- this.formChanging.value = false;
697
- };
698
- }
699
- export {
700
- BuiltinAction as B,
701
- ChangeType as C,
702
- FillingTypeEnum as F,
703
- MaterialStatusEnum as M,
704
- FormAnnotationController as a,
705
- collectAnnotationItemsByLocation as c,
706
- filterAnnotationItemsUpToCurrent as f
707
- };