@gct-paas/excel 0.1.19 → 0.1.21
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/{VueVideoPlayer-Bt1Le9qP.js → VueVideoPlayer-Bf0x69CJ.js} +2 -2
- package/dist/{agg-design-B_5evAJ0.js → agg-design-CLSOm6QJ.js} +1 -1
- package/dist/{agg-props-C62Ecenu.js → agg-props-4nnDqWtf.js} +1 -1
- package/dist/{agg-style-Q0xSL8Ye.js → agg-style-FHSkeH5u.js} +1 -1
- package/dist/{align-editor-D_LtYlh3.js → align-editor-Bf391dfO.js} +1 -1
- package/dist/{attach-fields-editor-3v3VNOfe.js → attach-fields-editor-U0Vg4ar8.js} +3 -2
- package/dist/{barcode-design-lusKmMnv.js → barcode-design-XLuURxqD.js} +2 -2
- package/dist/base/index.es.js +352 -177
- package/dist/{base-font-editor-DmasOst9.js → base-font-editor-adnb7ShQ.js} +3 -2
- package/dist/{boolean-design-BqGJVhKn.js → boolean-design-Bk3jIc2m.js} +2 -2
- package/dist/{boolean-props-DS7J4GHS.js → boolean-props-D1C7P7oX.js} +3 -3
- package/dist/{boolean-style-C9FslVV7.js → boolean-style-CWmep9-Y.js} +4 -4
- package/dist/{cell-upload-BFw5Yg_j.js → cell-upload-wzPF8ovv.js} +3 -2
- package/dist/{date-range-editor-PmJBHc8i.js → date-range-editor-CGCLkDFp.js} +3 -2
- package/dist/{date-time-design-DQ_Z-xUx.js → date-time-design-CG6fhsBd.js} +1 -1
- package/dist/{date-time-props-DfZoJukN.js → date-time-props-DGa4XIFD.js} +3 -3
- package/dist/{date-time-style-Doye-MHk.js → date-time-style-C5xs_HQX.js} +1 -1
- package/dist/{decimal-design-Bg-tdrtL.js → decimal-design-Dg2PWB7J.js} +1 -1
- package/dist/{decimal-display-mode-D_K6_XX1.js → decimal-display-mode-B5nxWZnK.js} +2 -2
- package/dist/{decimal-props-4QveEdf3.js → decimal-props-BUduwEu5.js} +4 -4
- package/dist/{decimal-style-B-n8SfAy.js → decimal-style-CW6QyMh0.js} +1 -1
- package/dist/{default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-B3GvGAje.js → default-value-editor.vue_vue_type_script_setup_true_name_default-value-editor_lang-BlQSjkvP.js} +3 -2
- package/dist/{diagonal-design-B_l3lV5s.js → diagonal-design-xlveiCza.js} +2 -2
- package/dist/{double-design-BaWZXLjK.js → double-design-Dkzgoo0g.js} +1 -1
- package/dist/{double-props-sDsBpAER.js → double-props-DwI5z-Mz.js} +4 -4
- package/dist/{double-style--oSjQw07.js → double-style-B09n2Oup.js} +1 -1
- package/dist/{dynamic-table-action-zLjamAaN.js → dynamic-table-action-KwzaoPBC.js} +130 -271
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_94e9d614_lang-UooIxEeL.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-ByU7Owiw.js} +436 -306
- package/dist/{edit.utils-CXmmCnxE-BrwRVXLT.js → edit.utils-CXmmCnxE-Do4weQUL.js} +1 -1
- package/dist/{enum-design-BgVuHvvu.js → enum-design-D_hYB8q2.js} +2 -2
- package/dist/{enum-props-DYN6LsLg.js → enum-props-SHpVl7is.js} +4 -4
- package/dist/{enum-style-D56_-gMw.js → enum-style-zTZKj6Li.js} +3 -3
- package/dist/excel.css +10119 -10237
- package/dist/{exceljs.min-DQkwXbni.js → exceljs.min-Dy4OavkS.js} +2 -2
- package/dist/{expression-design-CIMwIArR.js → expression-design-DH37JCnd.js} +1 -1
- package/dist/{expression-props--l3LwKAM.js → expression-props-D4aZ2FzY.js} +1 -1
- package/dist/{expression-style-CjM5oro9.js → expression-style-Bj0tEmqJ.js} +1 -1
- package/dist/{file-design-BYcXA55B.js → file-design-hV82bwcT.js} +1 -1
- package/dist/{file-props-DvsQZUcL.js → file-props-BR0xOn8f.js} +2 -2
- package/dist/{file-style-BiWmCsMZ.js → file-style-CPXRGFCR.js} +1 -1
- package/dist/{font-editor-BaRVmXey.js → font-editor-QrOFLcNA.js} +3 -3
- package/dist/{image-design-Bad-BXel.js → image-design-B3FASJvR.js} +2 -2
- package/dist/{image-design-Dr_w89Hq.js → image-design-WqYFe8Hz.js} +2 -2
- package/dist/{image-props-4lKEAwDq.js → image-props-DZ0lHvNN.js} +1 -1
- package/dist/{image-style-LoHD1zvr.js → image-style-D3jSU46p.js} +1 -1
- package/dist/{index--Bxx_VqV.js → index-4aWfyi4S.js} +2 -2
- package/dist/{index-pPTh0-mL.js → index-B2JfWmQ5.js} +1 -1
- package/dist/{index-D4Yb4Urx.js → index-BCRANZ6N.js} +1 -1
- package/dist/index-BYFfjfXo.js +4198 -0
- package/dist/{index-Bsjegt_0.js → index-BYnhPyxm.js} +1 -1
- package/dist/{index-Vx5npC-J.js → index-B_bGf5j3.js} +2 -2
- package/dist/{index-DRYxbbtG.js → index-BgJenclY.js} +1 -1
- package/dist/{index-CH--dgZ4.js → index-BocrGDq2.js} +1 -1
- package/dist/{index-3qfB5NN-.js → index-BpacgAuY.js} +1 -1
- package/dist/{index-DDnUeBCP.js → index-C9uva5U9.js} +1 -1
- package/dist/{index-D-mFMP7t.js → index-CAp9OIUg.js} +2 -2
- package/dist/{index-COiTpNXf.js → index-CVsM5Bam.js} +1 -1
- package/dist/{index-Ce0SltjH.js → index-Cblyq6yH.js} +1 -1
- package/dist/{index-ByXwQO9g.js → index-ChFaMPeg.js} +2 -2
- package/dist/{index-CqjhgxKH.js → index-Cqh9EW_d.js} +9 -3
- package/dist/{index-B-2N8GeG.js → index-CquVE9ii.js} +1 -1
- package/dist/{index-Dk-CUvB9.js → index-CsLZerBY.js} +42714 -4640
- package/dist/{index-CQ7Hcly4.js → index-D8uy8whi.js} +1 -1
- package/dist/{index-CEufXc_2.js → index-DKR79OBc.js} +1 -1
- package/dist/{index-C7KdVTwU.js → index-DNHA-joo.js} +1 -1
- package/dist/{index-Bki98NXv.js → index-DU3SF4eg.js} +1 -1
- package/dist/{index-CcLTIQGc.js → index-DVaUctcz.js} +1 -1
- package/dist/{index-B9IMST50.js → index-DegtNz07.js} +1 -1
- package/dist/{index-B_VejD7m.js → index-DpFPYL8b.js} +1 -1
- package/dist/{index-BSfbsA-W.js → index-Dvp79b5b.js} +1 -1
- package/dist/{index-CP099vf_.js → index-DxgKf-wy.js} +1 -1
- package/dist/{index-BZYuG4zS.js → index-Jz0_ApK0.js} +1 -1
- package/dist/{index-C6mtZJIQ.js → index-Ol6_R1tg.js} +1 -1
- package/dist/{index-B3YoA1vo.js → index-RY064UmV.js} +1 -1
- package/dist/{index-BsUkUBZV.js → index-dECIkP6q.js} +1 -1
- package/dist/{index-DpPrrfLV.js → index-iGA3l7nd.js} +5 -1
- package/dist/{index-D9CHdykS.js → index-pMF19I7H.js} +1 -1
- package/dist/{index-Dq72GFzs.js → index-wmbtcxzT.js} +2 -2
- package/dist/index.es.js +45 -45
- package/dist/{integer-design-C2EkL0hc.js → integer-design-_-oIGMZi.js} +1 -1
- package/dist/{integer-props-Cs-CvjQS.js → integer-props-CbhqGTWT.js} +5 -4
- package/dist/{integer-style-BtAfQCAn.js → integer-style-CRDDq2e1.js} +1 -1
- package/dist/{mb-render-CsWNoQnS.js → mb-render-Bh6EegbE.js} +1 -30
- package/dist/{number-input-ex-eza87s5O.js → number-input-ex-n0MRaA8Z.js} +2 -1
- package/dist/{org-props-BJ6FKaVj.js → org-props-B_ED1XJd.js} +2 -2
- package/dist/{org-style-LRy5QsV5.js → org-style-P7mL2u1-.js} +1 -1
- package/dist/{pagination-design-sA-kbILI.js → pagination-design-CC2ZvE5K.js} +2 -2
- package/dist/paper-widget-design-CvvM0OZ2.js +4 -0
- package/dist/{qrcode-design-BsWJrsvD.js → qrcode-design-C_G8R7Lo.js} +1 -1
- package/dist/ref-autofill-editor-DdUMjliQ.js +2333 -0
- package/dist/{ref-props-BInJu7PN.js → ref-props-CCwA0E2w.js} +17 -9
- package/dist/{ref-style-Dgc_9tko.js → ref-style-C3Qy3L2V.js} +1 -1
- package/dist/{regex-editor-C09XpMhm.js → regex-editor-CswiNY9l.js} +3 -2
- package/dist/{revo-grid.entry-BIm5A5wM.js → revo-grid.entry-fhJrZlXs.js} +1 -1
- package/dist/{revogr-attribution_7.entry-B06XF5B_.js → revogr-attribution_7.entry-BxX5Aax7.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-C8dVJYtR.js → revogr-clipboard_3.entry-B84Mg6_S.js} +2 -2
- package/dist/{revogr-data_4.entry-Dgp6vYqe.js → revogr-data_4.entry-BSSMKH9X.js} +2 -2
- package/dist/{revogr-filter-panel.entry-xo_juIUc.js → revogr-filter-panel.entry-xjYp1Z8c.js} +1 -1
- package/dist/{select-render-type-editor.vue_vue_type_script_setup_true_lang-vIUGBOWr.js → select-render-type-editor.vue_vue_type_script_setup_true_lang-JwULnnUe.js} +2 -2
- package/dist/{serialnumber-design-mWcys6hI.js → serialnumber-design-qdEzFAi4.js} +1 -1
- package/dist/shared/index.es.js +26 -27
- package/dist/{signature-design-Dl-Lv5Z5.js → signature-design-DyLTKEwS.js} +1 -1
- package/dist/{signature-props-DSzpO-_r.js → signature-props-CXwqrh0H.js} +3 -3
- package/dist/{signature-style-Bk34vOsk.js → signature-style-ibNQSAPQ.js} +1 -1
- package/dist/{single-field-drop-CiPUMT9B.js → single-field-drop-BSdWy-C4.js} +3 -2
- package/dist/{size-editor-B5aunbUM.js → size-editor-8C1AxONY.js} +1 -1
- package/dist/src/nocode-base/src/components/document-quick-fill/fixed-quick-fill-modal.vue.d.ts +5 -1
- package/dist/src/nocode-base/src/components/document-quick-fill/quick-fill.util.d.ts +11 -6
- package/dist/src/nocode-base/src/components/document-sub-table-action/fixed-table-action.vue.d.ts +4 -0
- package/dist/src/nocode-base/src/hooks/annotation/form-annotation-controller.d.ts +14 -148
- package/dist/src/nocode-base/src/hooks/annotation/index.d.ts +0 -1
- package/dist/src/nocode-base/src/types/fields/i-select.d.ts +4 -0
- package/dist/src/nocode-base/src/types/fields/i-trace.d.ts +7 -0
- package/dist/src/nocode-web-render/src/index.d.ts +0 -1
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields-editor.vue.d.ts +15 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/display-fields.util.d.ts +11 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/display-fields-editor/index.d.ts +3 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/index.d.ts +3 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/quick-search-editor.vue.d.ts +15 -0
- package/dist/src/online-form/src/views/__cell_widgets__/common/quick-search-editor/quick-search.util.d.ts +14 -0
- package/dist/src/online-form/src/views/designer/modules/panel/comps/quick-fill-config.vue.d.ts +1 -0
- package/dist/src/online-form/src/views/designer/modules/panel/panel-data-init-config/common/data-source-title.vue.d.ts +2 -2
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/common-select.util.d.ts +47 -0
- package/dist/src/shared/components/Signature/ui/sign-editor.vue.d.ts +2 -2
- package/dist/src/shared/components/field-transfer/components/field-transfer-modal.vue.d.ts +30 -0
- package/dist/src/shared/components/field-transfer/components/modal-wrapper.vue.d.ts +65 -0
- package/dist/src/shared/components/field-transfer/hooks/useModelField.d.ts +169 -0
- package/dist/src/shared/components/field-transfer/hooks/useTreeData.d.ts +139 -0
- package/dist/src/shared/components/field-transfer/index.d.ts +21 -0
- package/dist/src/shared/components/field-transfer/useFieldTransfer.d.ts +47 -0
- package/dist/src/shared/components/field-transfer/utils/enum.d.ts +6 -0
- package/dist/src/shared/components/field-transfer/utils/i18n.d.ts +1 -0
- package/dist/src/shared/components/field-transfer/utils/tree-tool.d.ts +6 -0
- package/dist/src/shared/components/version-select/version-select.vue.d.ts +2 -2
- package/dist/{text-design-BIFz5gw1.js → text-design-BzDtceUO.js} +2 -2
- package/dist/{text-design-C0dORvkP.js → text-design-Di-2lpQC.js} +2 -2
- package/dist/{text-props-ClHI-4aM.js → text-props-YXtd9DCt.js} +5 -5
- package/dist/{text-style-DANM5fvy.js → text-style-BtclwHUQ.js} +1 -1
- package/dist/{throttle-Cpk1LoGk-Da5HSLWc.js → throttle-Cpk1LoGk-BFMM5iqm.js} +1 -1
- package/dist/{timediff-design-BDCsQIal.js → timediff-design-DPDNHC4C.js} +1 -1
- package/dist/{trace-design-CKqq1WH_.js → trace-design-B2tffMF2.js} +2 -2
- package/dist/{trace-props-BI24XFMc.js → trace-props-CWTXFYZ9.js} +24 -16
- package/dist/{trace-style-CX1f7oZH.js → trace-style-AmSVnHXF.js} +1 -1
- package/dist/use-namespace-qtLS8nEh.js +88 -0
- package/dist/{user-props-gF7KPnP8.js → user-props-hR1saiG7.js} +2 -2
- package/dist/{user-style-DIouAMWa.js → user-style-BsMfhFHo.js} +1 -1
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-DHj-zNxm.js → value-editor.vue_vue_type_style_index_0_lang-zAPZ-2E_.js} +2 -2
- package/dist/{version-select-CL3QQGND.js → version-select-CeQP0Bne.js} +1041 -4
- package/dist/web-render/index.es.js +12 -955
- package/dist/{widget-barcode-DZiCyrQW.js → widget-barcode-DPdsvAF5.js} +4 -4
- package/dist/{widget-diagonal-D_Oz8te1.js → widget-diagonal-BfjZGony.js} +4 -3
- package/dist/{widget-image-TL_SLOap.js → widget-image-D_E_0ZEd.js} +5 -5
- package/dist/{widget-line-BQ-qcBUA.js → widget-line-SDiSxrzr.js} +2 -2
- package/dist/{widget-pagination-DciJE9qC.js → widget-pagination-DdIoe9Yy.js} +5 -5
- package/dist/{widget-power-B9KTIpwA.js → widget-power-hifeC3T0.js} +4 -3
- package/dist/{widget-qrcode-DRoj5rSy.js → widget-qrcode-DBEsM1iE.js} +3 -3
- package/dist/{widget-rangelimit-Ckgx3i4r.js → widget-rangelimit-clQ84tvq.js} +4 -3
- package/dist/{widget-serialnumber-aUkR-0yC.js → widget-serialnumber-BXvzHCYR.js} +1 -1
- package/dist/{widget-text-CJIT-hY3.js → widget-text-CPojsb_9.js} +5 -5
- package/dist/{widget-timediff-x-RQMdNg.js → widget-timediff-DGBZsme_.js} +2 -2
- package/package.json +1 -1
- package/dist/AntdIcon-C3RMq2zm.js +0 -1040
- package/dist/form-annotation-controller-Zw6OoPLe.js +0 -707
- package/dist/index-Bm6Hdoud.js +0 -41849
- package/dist/paper-widget-design-BGY5qu-K.js +0 -4
- package/dist/ref-autofill-editor-BbozAOcm.js +0 -673
- package/dist/src/nocode-base/src/hooks/annotation/types.d.ts +0 -16
- package/dist/src/nocode-web-render/src/annotation/form-abandon-medpro-modal.vue.d.ts +0 -15
- package/dist/src/nocode-web-render/src/annotation/form-abandon-modal.vue.d.ts +0 -15
- package/dist/src/nocode-web-render/src/annotation/form-abandon-v2-modal.vue.d.ts +0 -11
- package/dist/src/nocode-web-render/src/annotation/index.d.ts +0 -2
- package/dist/src/nocode-web-render/src/annotation/submit-form-change-modal.vue.d.ts +0 -104
- package/dist/src/nocode-web-render/src/annotation/use-annotation.d.ts +0 -37
|
@@ -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_94e9d614_lang-UooIxEeL.js";
|
|
3
|
-
import { isEmpty } from "lodash-es";
|
|
4
|
-
import "dayjs";
|
|
5
|
-
import "ant-design-vue";
|
|
6
|
-
import { I as InstanceStatusValues } from "./mb-render-CsWNoQnS.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
|
-
};
|