@gct-paas/excel 0.1.40-beta.13 → 0.1.40-beta.17
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/README.md +3 -4
- package/dist/{BaseComponent-BNYlBwRp.js → BaseComponent-CCne4pQR.js} +2 -2
- package/dist/{VueVideoPlayer-CA8iKJQb.js → VueVideoPlayer-2S5BFaL_.js} +2 -2
- package/dist/{align-editor-BLoPPjyE.js → align-editor-ClmAs0I2.js} +1 -1
- package/dist/{barcode-design-Dqvxi5NV.js → barcode-design-DCKN2kXs.js} +2 -2
- package/dist/base/index.es.js +196 -181
- package/dist/{diagonal-design-DG-Dx4ts.js → diagonal-design-DgL_knX1.js} +2 -2
- package/dist/{dynamic-table-action-Bank1QhA.js → dynamic-table-action-PCfL4kn8.js} +356 -213
- package/dist/{dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CMUJIaqF.js → dynamic-table-action.vue_vue_type_style_index_0_scoped_8710052f_lang-DNH0HQ7d.js} +1427 -322
- package/dist/{edit.utils-CXmmCnxE-CjdKEddt.js → edit.utils-CXmmCnxE-eEvfPyLJ.js} +1 -1
- package/dist/excel.css +5943 -5155
- package/dist/{exceljs.min-UvFp3sV4.js → exceljs.min-CoCfKi-7.js} +2 -2
- package/dist/{font-editor-DnMEr3MH.js → font-editor-U4uNllXl.js} +3 -3
- package/dist/{image-design-CwtJAv3F.js → image-design-9F6prQTp.js} +3 -8
- package/dist/{index-BQYnbcBb.js → index-0igALLOR.js} +1 -1
- package/dist/{index-CaT3CiHe.js → index-6OopHjlb.js} +1 -1
- package/dist/{index-3MWFMn8S.js → index-B-xjIbiI.js} +3 -3
- package/dist/{index-CJiS8qwY.js → index-BD266iSg.js} +2 -2
- package/dist/{index-BggSZyva.js → index-BDxVLxSI.js} +2 -2
- package/dist/{index-B_XnofhV.js → index-BGm-MVKB.js} +2 -2
- package/dist/{index-B9lsZxiJ.js → index-BLWe4Vz0.js} +1 -1
- package/dist/{index-Cd_mJxU6.js → index-BLvlOZ2D.js} +3 -3
- package/dist/{index-B5OUUXeo.js → index-BOk29nnL.js} +1 -1
- package/dist/{index-D_SKDlr_.js → index-BPN7XFwR.js} +2 -2
- package/dist/{index-bu7pivuw.js → index-BQnLQV0A.js} +2 -2
- package/dist/{index-DyW4nBh7.js → index-BRDf6SKK.js} +2 -2
- package/dist/{index-XT4AMdYd.js → index-BWSegp47.js} +4 -4
- package/dist/{index-C_Yhjehy.js → index-BY_qQ37w.js} +2 -2
- package/dist/{index-CGZ_QXnT.js → index-BbiyVhS-.js} +2 -2
- package/dist/{index-BPY-u_dg.js → index-BiMaezbB.js} +3 -3
- package/dist/{index-Aza4NNmK.js → index-Bns57FNX.js} +2 -2
- package/dist/{index-C5Ldbkko.js → index-BsiUX7YD.js} +2 -2
- package/dist/{index-BqKnOPo_.js → index-Bt91J3fW.js} +1 -1
- package/dist/{index-BeVxjuh9.js → index-CDEmNgZo.js} +1 -1
- package/dist/{index-VbBHe0-r.js → index-CDrtUoUX.js} +3 -3
- package/dist/{index-BKQuT0fA.js → index-CE2DJqcE.js} +1 -1
- package/dist/{index-CKRFb60x.js → index-CnK65t9M.js} +2 -2
- package/dist/{index-D29NlAJu.js → index-CqKBqL3p.js} +2 -2
- package/dist/{index-CszU9umD.js → index-Cr-9RN_m.js} +1 -1
- package/dist/{index-d8vCiBu7.js → index-Cv7MTDYJ.js} +1 -1
- package/dist/{index-CHKEoI0-.js → index-DNaJ9kfU.js} +3 -3
- package/dist/{index-BBn6MJSx.js → index-DNxZxXFS.js} +2 -2
- package/dist/{index-BtRVxr4g.js → index-DohyZRFn.js} +2 -2
- package/dist/{index-CwADS2FU.js → index-FO_jC7SK.js} +1 -1
- package/dist/{index-DFSzmsEj.js → index-WFLjE8W5.js} +2 -2
- package/dist/{index-DLjQtnue.js → index-WWyJn_DL.js} +43141 -36530
- package/dist/{index-D5aotGHm.js → index-ku7ct8PU.js} +2 -2
- package/dist/{index-Cq-XyRHo.js → index-tdchiGpE.js} +2 -2
- package/dist/index.es.js +50 -48
- package/dist/{online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-Mtk2wCxy.js → online-form-model-select.vue_vue_type_script_setup_true_name_online-form-model-select_lang-CpcHJZof.js} +26 -3
- package/dist/{pagination-design-BEykgAvG.js → pagination-design-Br4MXfw1.js} +2 -2
- package/dist/paper-widget-design-DTlDdmYc.js +4 -0
- package/dist/{print-runtime-instance-4ZDfLM5V.js → print-runtime-instance-CfWuydpH.js} +1 -1
- package/dist/{print-snapshot-renderer-zOa_XHc0.js → print-snapshot-renderer-CJy_9TnN.js} +3 -3
- package/dist/{qrcode-design-CvYHvmMW.js → qrcode-design-BdMl2NKL.js} +1 -1
- package/dist/{revo-grid.entry-CAz8pEMB.js → revo-grid.entry-teEsaxO_.js} +1 -1
- package/dist/{revogr-attribution_7.entry-RBj_kk6o.js → revogr-attribution_7.entry-CZUc_246.js} +3 -3
- package/dist/{revogr-clipboard_3.entry-B_WeVhDK.js → revogr-clipboard_3.entry-25oO7inv.js} +2 -2
- package/dist/{revogr-data_4.entry-VaYdG5rT.js → revogr-data_4.entry-BzB9qFPe.js} +2 -2
- package/dist/{revogr-filter-panel.entry-BCwmMUrv.js → revogr-filter-panel.entry-BGrVTJ1g.js} +1 -1
- package/dist/seal-design-mfWFp1C2.js +4 -0
- package/dist/{serialnumber-design-DHQVyTpR.js → serialnumber-design-CXxSkCLn.js} +1 -1
- package/dist/shared/index.es.js +29 -28
- package/dist/{single-field-drop-D9h6cfEW.js → single-field-drop-BmzX-Z8I.js} +2 -3
- package/dist/{size-editor-CYH_vGEJ.js → size-editor-CspaebYh.js} +1 -1
- package/dist/src/adapter/adapter.d.ts +1 -1
- package/dist/src/adapter/index.d.ts +2 -0
- package/dist/src/{nocode-web-render/src/render/sub-table/common → adapter/web}/inventory-scan-columns.d.ts +1 -1
- package/dist/src/{nocode-web-render/src/render/sub-table/material-balance/mb-web-render.d.ts → adapter/web/material-balance-render.d.ts} +1 -1
- package/dist/src/{nocode-web-render/src/render/sub-table/material-balance → adapter/web}/material-consume-modal.vue.d.ts +1 -1
- package/dist/src/adapter/web/material-consume-render.d.ts +25 -0
- package/dist/src/{nocode-web-render/src/render/common → adapter/web}/open-util.d.ts +1 -1
- package/dist/src/{nocode-web-render/src/render/sub-table/stocktake/stocktake-web-render.d.ts → adapter/web/stocktake-render.d.ts} +2 -2
- package/dist/src/{nocode-web-render/src/render/sub-table/common → adapter/web}/sub-table-render.d.ts +2 -5
- package/dist/src/nocode-base/src/components/document-sub-table-action/dynamic-table-action.vue.d.ts +0 -2
- package/dist/src/nocode-base/src/components/document-sub-table-action/sub-table-action.vue.d.ts +0 -3
- package/dist/src/nocode-base/src/components/document-sub-table-action/type.d.ts +0 -4
- package/dist/src/nocode-base/src/components/material-consume/types.d.ts +1 -5
- package/dist/src/nocode-base/src/core/sub-table/sub-table-core.d.ts +0 -4
- package/dist/src/nocode-base/src/hooks/material-consume/material-consume-table-controller.d.ts +0 -12
- package/dist/src/nocode-base/src/hooks/material-consume/mc-render.d.ts +1 -28
- package/dist/src/nocode-base/src/hooks/render-page/initialize-runtime.d.ts +3 -1
- package/dist/src/nocode-base/src/hooks/render-page/sterilization-date.d.ts +1 -1
- package/dist/src/nocode-base/src/types/render/mc-render.d.ts +2 -15
- package/dist/src/nocode-base/src/types/render/sub-table-render.d.ts +0 -10
- package/dist/src/online-form/src/views/__cell_widgets__/common/default-value-rdo-editor/base-vxe-table.vue.d.ts +1 -1
- package/dist/src/online-form/src/views/__cell_widgets__/common/default-value-rdo-editor/default-value-rdo-editor.vue.d.ts +4 -4
- package/dist/src/online-form/src/views/__cell_widgets__/common/default-value-rdo-editor/rdo-table-dropdown.vue.d.ts +3 -3
- package/dist/src/{nocode-web-render/src/render/parse-rule → online-form/src/views/designer/modules/panel/sub-table/comps}/add-rule-btn.vue.d.ts +1 -1
- package/dist/src/online-form/src/views/designer/modules/panel/sub-table/panel-check-table/select-check-ds-modal.vue.d.ts +3 -3
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-auto-complete.vue.d.ts +2 -2
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-date-picker.vue.d.ts +2 -2
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-text-input.vue.d.ts +2 -2
- package/dist/src/online-form/src/views/render/__components__/_field_/_base_/cell/cell-textarea.vue.d.ts +2 -2
- package/dist/src/online-form/src/views/render/__components__/_field_/trace/common/base-vxe-table.vue.d.ts +1 -1
- package/dist/src/shared/components/ColorPicker/src/ColorPicker.vue.d.ts +1 -1
- package/dist/src/{nocode-web-render/src → shared}/hooks/useWebUpload.d.ts +1 -1
- package/dist/src/shared/index.d.ts +1 -0
- package/dist/src/shared/types/index.d.ts +1 -0
- package/dist/src/shared/types/upload.d.ts +11 -0
- package/dist/{sub-table-factory-B0zWW-QG.js → sub-table-factory-BI9zILxh.js} +2 -2
- package/dist/{text-design-DOQAiCNS.js → text-design-B_MucoKI.js} +2 -2
- package/dist/{throttle-Cpk1LoGk-CMJVKhfH.js → throttle-Cpk1LoGk-CAjnQv90.js} +1 -1
- package/dist/{timediff-design-BpVtGq2d.js → timediff-design-DeOjrlwW.js} +1 -1
- package/dist/{trace-like-wrapper-CfQ-z7OG.js → trace-like-wrapper-dM7TzPyV.js} +2 -2
- package/dist/{value-editor.vue_vue_type_style_index_0_lang-dI4Svbwa.js → value-editor.vue_vue_type_style_index_0_lang-CIn45Z8Q.js} +2 -2
- package/dist/{widget-barcode-Q35uB5iK.js → widget-barcode-lWGbOIin.js} +4 -4
- package/dist/{widget-diagonal-DqhdnkvW.js → widget-diagonal-BHu_oZPc.js} +3 -4
- package/dist/{widget-image-BXD0sEE3.js → widget-image-ky181dVc.js} +5 -7
- package/dist/{widget-line-DH-692Ln.js → widget-line-Bmx-OCDG.js} +2 -2
- package/dist/{widget-pagination-fIAO2QPA.js → widget-pagination-CmUiNeCs.js} +5 -5
- package/dist/{widget-power-DWVhbXTd.js → widget-power-DOgb24Gq.js} +3 -4
- package/dist/{widget-qrcode-Bo1KSkKG.js → widget-qrcode-TLKTPfMv.js} +3 -3
- package/dist/{widget-rangelimit-BFKtZq_w.js → widget-rangelimit-DfdOkk1r.js} +3 -4
- package/dist/{widget-serialnumber-DZqKmj9h.js → widget-serialnumber-Bqayj0OA.js} +1 -1
- package/dist/{widget-text-CY_4aox8.js → widget-text-BGdFlv3o.js} +5 -5
- package/dist/{widget-timediff-CPMbymXT.js → widget-timediff-CxIXuLZd.js} +2 -2
- package/package.json +2 -6
- package/dist/AntdIcon-DCIaV352.js +0 -1108
- package/dist/index-BVs40sek.js +0 -4353
- package/dist/mb-render-CAIFQRQe.js +0 -276
- package/dist/paper-widget-design-ooxHgZry.js +0 -4
- package/dist/seal-design-CG41_ii2.js +0 -4
- package/dist/src/nocode-web-render/src/components/print-fill-background-selector.vue.d.ts +0 -2
- package/dist/src/nocode-web-render/src/hooks/index.d.ts +0 -2
- package/dist/src/nocode-web-render/src/hooks/userFormPrint.d.ts +0 -15
- package/dist/src/nocode-web-render/src/index.d.ts +0 -6
- package/dist/src/nocode-web-render/src/logic/index.d.ts +0 -1
- package/dist/src/nocode-web-render/src/render/common/index.d.ts +0 -2
- package/dist/src/nocode-web-render/src/render/common/modal-manager.d.ts +0 -20
- package/dist/src/nocode-web-render/src/render/index.d.ts +0 -10
- package/dist/src/nocode-web-render/src/render/parse-rule/index.d.ts +0 -3
- package/dist/src/nocode-web-render/src/render/parse-rule/parse-rule-modal.vue.d.ts +0 -15
- package/dist/src/nocode-web-render/src/render/sub-table/allocate/allocate-web-render.d.ts +0 -4
- package/dist/src/nocode-web-render/src/render/sub-table/allocate/index.d.ts +0 -1
- package/dist/src/nocode-web-render/src/render/sub-table/common/multi-rows-modal.vue.d.ts +0 -15
- package/dist/src/nocode-web-render/src/render/sub-table/common/scan-modal.vue.d.ts +0 -19
- package/dist/src/nocode-web-render/src/render/sub-table/index.d.ts +0 -3
- package/dist/src/nocode-web-render/src/render/sub-table/material-balance/index.d.ts +0 -1
- package/dist/src/nocode-web-render/src/render/sub-table/material-consume/bom-modal.vue.d.ts +0 -11
- package/dist/src/nocode-web-render/src/render/sub-table/material-consume/index.d.ts +0 -4
- package/dist/src/nocode-web-render/src/render/sub-table/material-consume/mc-web-render.d.ts +0 -42
- package/dist/src/nocode-web-render/src/render/sub-table/stocktake/index.d.ts +0 -2
- package/dist/src/nocode-web-render/src/types/hooks/index.d.ts +0 -1
- package/dist/src/nocode-web-render/src/types/index.d.ts +0 -1
- package/dist/web-render/index.d.ts +0 -1
- package/dist/web-render/index.es.js +0 -596
- /package/dist/src/{nocode-web-render/src/adapter/index.d.ts → adapter/web/setup.d.ts} +0 -0
- /package/dist/src/{nocode-web-render/src/logic/utils.d.ts → adapter/web/upload.d.ts} +0 -0
|
@@ -1,276 +0,0 @@
|
|
|
1
|
-
import { reactive, inject, provide } from "vue";
|
|
2
|
-
import { p as api, F as FIELD_TYPE, I as CreateType } from "./dynamic-table-action.vue_vue_type_style_index_0_scoped_53d7e66c_lang-CMUJIaqF.js";
|
|
3
|
-
class MCRender {
|
|
4
|
-
/**
|
|
5
|
-
* 提示信息
|
|
6
|
-
* @param opts
|
|
7
|
-
*/
|
|
8
|
-
message(opts) {
|
|
9
|
-
throw new Error("Function message not implemented.");
|
|
10
|
-
}
|
|
11
|
-
/** 每个表单实例独立维护 BOM 弹层参数。 */
|
|
12
|
-
bomModalProps = /* @__PURE__ */ new Map();
|
|
13
|
-
async openScanModal(opts) {
|
|
14
|
-
throw new Error("Function openScanModal not implemented.");
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* 实际打开UIModal的函数
|
|
18
|
-
*/
|
|
19
|
-
async _openBomModal(reactiveOpts) {
|
|
20
|
-
}
|
|
21
|
-
// 同一实例重复打开时更新已有弹层,不同实例则允许各自持有独立弹层状态。
|
|
22
|
-
async openBomModal(opts) {
|
|
23
|
-
const ownerId = opts.ownerId;
|
|
24
|
-
if (!ownerId) throw new Error("打开 BOM 弹层缺少运行时实例标识");
|
|
25
|
-
const current = this.bomModalProps.get(ownerId);
|
|
26
|
-
if (current) {
|
|
27
|
-
Object.assign(current, opts);
|
|
28
|
-
return;
|
|
29
|
-
}
|
|
30
|
-
const modalProps = reactive(opts);
|
|
31
|
-
this.bomModalProps.set(ownerId, modalProps);
|
|
32
|
-
try {
|
|
33
|
-
await this._openBomModal(modalProps);
|
|
34
|
-
} finally {
|
|
35
|
-
this.bomModalProps.delete(ownerId);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* 打开修改条码解析规则的modal
|
|
40
|
-
* 返回空或者修改后的规则字段id
|
|
41
|
-
* @param opts \
|
|
42
|
-
* - config 回显用的配置对象
|
|
43
|
-
* @return {*}
|
|
44
|
-
*/
|
|
45
|
-
async openChangeRuleModal(opts) {
|
|
46
|
-
throw new Error("Function openChangeRuleModal not implemented.");
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* 扫码返回多条候选时,弹窗选择其中一条
|
|
50
|
-
* 取消返回 undefined
|
|
51
|
-
*/
|
|
52
|
-
async openMultiRowsModal(opts) {
|
|
53
|
-
throw new Error("Function openMultiRowsModal not implemented.");
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* 销毁所有固定的模态
|
|
57
|
-
*/
|
|
58
|
-
// overlay 弹层按实例销毁;form-base 弹层通过其全局关闭接口清理。
|
|
59
|
-
destroyAllModals(_ownerId) {
|
|
60
|
-
throw new Error("Function destroyAllModals not implemented.");
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
class BaseFormModelFetcher {
|
|
64
|
-
/** 默认接口 */
|
|
65
|
-
apis = {
|
|
66
|
-
getFieldMetaList: api.apaas.fieldMeta.getList,
|
|
67
|
-
getModelMetaSubModelList: api.apaas.modelComprehensive.getSubModelList,
|
|
68
|
-
getModelDetail2FieldList: api.apaas.modelMeta.getDetail
|
|
69
|
-
};
|
|
70
|
-
/**
|
|
71
|
-
* 模型映射缓存
|
|
72
|
-
*/
|
|
73
|
-
modelMetaMap = {};
|
|
74
|
-
async load(opts) {
|
|
75
|
-
const { model } = opts;
|
|
76
|
-
this.modelMetaMap = {};
|
|
77
|
-
await this.loadModelFields(model);
|
|
78
|
-
await this.loadSubModelsFields(model);
|
|
79
|
-
return Object.values(this.modelMetaMap);
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* 补全字段信息
|
|
83
|
-
* @param modelKey 字段所属的模型
|
|
84
|
-
* @param [fields=[]]
|
|
85
|
-
* @return {*}
|
|
86
|
-
*/
|
|
87
|
-
completeFields(modelKey, fields = []) {
|
|
88
|
-
return fields.map((field) => {
|
|
89
|
-
if (!field.modelKey) {
|
|
90
|
-
field.modelKey = modelKey;
|
|
91
|
-
}
|
|
92
|
-
return field;
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* 根据模型key加载模型字段
|
|
97
|
-
*
|
|
98
|
-
* @param [modelKey=this.model]
|
|
99
|
-
* @return {*}
|
|
100
|
-
*/
|
|
101
|
-
async loadModelFields(modelKey) {
|
|
102
|
-
if (typeof this.apis.getFieldMetaList !== "function") {
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
const res = await this.apis.getFieldMetaList({
|
|
106
|
-
modelKey
|
|
107
|
-
});
|
|
108
|
-
this.modelMetaMap[modelKey] = {
|
|
109
|
-
key: modelKey,
|
|
110
|
-
name: "",
|
|
111
|
-
fields: this.completeFields(modelKey, res)
|
|
112
|
-
};
|
|
113
|
-
return res;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* 加载表单所有子表字段对应模型的字段信息集合
|
|
117
|
-
*/
|
|
118
|
-
async loadSubModelsFields(modelKey) {
|
|
119
|
-
const res = await this.apis.getModelMetaSubModelList({
|
|
120
|
-
modelKey
|
|
121
|
-
});
|
|
122
|
-
(res ?? []).forEach((m) => {
|
|
123
|
-
if (!this.modelMetaMap[m.key]) {
|
|
124
|
-
this.modelMetaMap[m.key] = {
|
|
125
|
-
key: m.key,
|
|
126
|
-
name: m.name,
|
|
127
|
-
subModel: m.subModel,
|
|
128
|
-
fields: this.completeFields(m.key, m.fieldMetaList)
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
class FormModelController {
|
|
135
|
-
/** 主模型的key */
|
|
136
|
-
masterModelKey;
|
|
137
|
-
/** 主模型的名称 */
|
|
138
|
-
masterModelName;
|
|
139
|
-
/** 模型请求器 */
|
|
140
|
-
fetcher = new BaseFormModelFetcher();
|
|
141
|
-
/** 模型映射缓存 */
|
|
142
|
-
modelMetaMap = reactive({});
|
|
143
|
-
/** 主模型信息 */
|
|
144
|
-
get masterModel() {
|
|
145
|
-
return this.modelMetaMap[this.masterModelKey];
|
|
146
|
-
}
|
|
147
|
-
/** 获取主模型字段集合 */
|
|
148
|
-
get masterFields() {
|
|
149
|
-
return this.masterModel?.fields;
|
|
150
|
-
}
|
|
151
|
-
/** 获取子模型 */
|
|
152
|
-
getSubModel(subModelKey) {
|
|
153
|
-
return this.modelMetaMap[subModelKey];
|
|
154
|
-
}
|
|
155
|
-
/** 获取子模型字段集合 */
|
|
156
|
-
getSubModelFields(subModelKey) {
|
|
157
|
-
return this.getSubModel(subModelKey)?.fields;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* 表单字段下拉选项(排除系统字段和子表字段)
|
|
161
|
-
* value 格式为 modelKey.fieldKey,与字段映射存储格式一致
|
|
162
|
-
*/
|
|
163
|
-
getFormFieldOptions(subModelKey) {
|
|
164
|
-
const fields = subModelKey ? this.getSubModelFields(subModelKey) : this.masterModel?.fields;
|
|
165
|
-
return (fields ?? []).filter(
|
|
166
|
-
(field) => !this.isSystemField(field) && !this.isSubField(field) && !this.isObjectField(field)
|
|
167
|
-
).map((field) => ({
|
|
168
|
-
...field,
|
|
169
|
-
label: `${field.name}`,
|
|
170
|
-
value: `${field.modelKey}.${field.key}`
|
|
171
|
-
}));
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* 初始化
|
|
175
|
-
*
|
|
176
|
-
* @param opts
|
|
177
|
-
* - model 主模型key
|
|
178
|
-
* - name 主模型名称
|
|
179
|
-
*/
|
|
180
|
-
async init(opts) {
|
|
181
|
-
this.masterModelKey = opts.model;
|
|
182
|
-
this.masterModelName = opts.name;
|
|
183
|
-
await this.load();
|
|
184
|
-
}
|
|
185
|
-
/** 刷新数据 */
|
|
186
|
-
async refresh() {
|
|
187
|
-
await this.load();
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* 加载数据并填充到modelMetaMap中
|
|
191
|
-
* @protected
|
|
192
|
-
* @return {*}
|
|
193
|
-
*/
|
|
194
|
-
async load() {
|
|
195
|
-
if (!this.masterModelKey) {
|
|
196
|
-
console.error("缺少主模型的key");
|
|
197
|
-
return;
|
|
198
|
-
}
|
|
199
|
-
const models = await this.fetcher.load({ model: this.masterModelKey });
|
|
200
|
-
this.modelMetaMap = models.reduce((acc, cur) => {
|
|
201
|
-
acc[cur.key] = cur;
|
|
202
|
-
if (cur.key === this.masterModelKey) {
|
|
203
|
-
cur.name = this.masterModelName;
|
|
204
|
-
}
|
|
205
|
-
return acc;
|
|
206
|
-
}, {});
|
|
207
|
-
}
|
|
208
|
-
/** 是否是子模型字段 */
|
|
209
|
-
isSubField(field) {
|
|
210
|
-
return field.type === FIELD_TYPE.MASTERSLAVE && field.bindInfo;
|
|
211
|
-
}
|
|
212
|
-
/** 是否是预置字段,包括系统字段和业务内置字段 */
|
|
213
|
-
isPresetField(field) {
|
|
214
|
-
return [CreateType.BUILTIN, CreateType.SYSTEM].includes(field.createType);
|
|
215
|
-
}
|
|
216
|
-
/** 是否是系统字段 */
|
|
217
|
-
isSystemField(field) {
|
|
218
|
-
return field.createType === CreateType.SYSTEM;
|
|
219
|
-
}
|
|
220
|
-
/** 是否是对象字段类型 */
|
|
221
|
-
isObjectField(field) {
|
|
222
|
-
return field.type === FIELD_TYPE.OBJECT_TYPE;
|
|
223
|
-
}
|
|
224
|
-
/**
|
|
225
|
-
* 获取主模型里子表字段对应的子模型key
|
|
226
|
-
*
|
|
227
|
-
* @param fieldKey 子表字段在主表里的字段key
|
|
228
|
-
* @return {*}
|
|
229
|
-
*/
|
|
230
|
-
getSubFieldModelKey(fieldKey) {
|
|
231
|
-
return this.masterFields.find((field) => field.key === fieldKey)?.bindInfo;
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* 获取字段信息
|
|
235
|
-
* @param [modelKey=this.masterModelKey] 模型key
|
|
236
|
-
* @param fieldKey 字段key
|
|
237
|
-
* @return {*}
|
|
238
|
-
*/
|
|
239
|
-
findField(modelKey = this.masterModelKey, fieldKey) {
|
|
240
|
-
const model = this.modelMetaMap[modelKey];
|
|
241
|
-
if (!model) {
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
return model.fields.find((field) => field.key === fieldKey);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
const FormModelControllerKey = "GctFormModelController";
|
|
248
|
-
function useFormModel() {
|
|
249
|
-
function provideController(c = new FormModelController()) {
|
|
250
|
-
provide(FormModelControllerKey, c);
|
|
251
|
-
return c;
|
|
252
|
-
}
|
|
253
|
-
function injectController() {
|
|
254
|
-
return inject(FormModelControllerKey);
|
|
255
|
-
}
|
|
256
|
-
return {
|
|
257
|
-
provideController,
|
|
258
|
-
injectController
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
class MBRender {
|
|
262
|
-
// 多 Sheet / 同屏场景用 ownerId 隔离实例;基类仅声明宿主需要实现的能力。
|
|
263
|
-
async openConsumeModal(_ownerId, _data) {
|
|
264
|
-
throw new Error("Function openConsumeModal not implemented.");
|
|
265
|
-
}
|
|
266
|
-
destoryConsumeModal(_ownerId) {
|
|
267
|
-
throw new Error("Function destoryConsumeModal not implemented.");
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
export {
|
|
271
|
-
BaseFormModelFetcher as B,
|
|
272
|
-
FormModelController as F,
|
|
273
|
-
MBRender as M,
|
|
274
|
-
MCRender as a,
|
|
275
|
-
useFormModel as u
|
|
276
|
-
};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, HTMLDivElement>;
|
|
2
|
-
export default _default;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare enum PrintModeEnum {
|
|
2
|
-
ASYNC = "async",
|
|
3
|
-
SYNC = "sync"
|
|
4
|
-
}
|
|
5
|
-
export declare enum FileModeEnum {
|
|
6
|
-
ZIP = "zip",
|
|
7
|
-
UN_ZIP = "unZip"
|
|
8
|
-
}
|
|
9
|
-
/**表单打印 */
|
|
10
|
-
export declare function formPrint(tmplInstantId: string, printConfig?: {
|
|
11
|
-
apiMode: PrintModeEnum;
|
|
12
|
-
fileMode: FileModeEnum;
|
|
13
|
-
/** 是否打印填报内容区底色 */
|
|
14
|
-
showPrintFieldBg?: boolean;
|
|
15
|
-
}): Promise<void>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { initWebPaasUploadApis } from './utils';
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { IModalOptions, IOverlayContainer } from '../../../../shared/types';
|
|
2
|
-
export declare class ModalManager {
|
|
3
|
-
/**
|
|
4
|
-
* 所有打开的modal集合
|
|
5
|
-
*/
|
|
6
|
-
modals: Array<IOverlayContainer>;
|
|
7
|
-
/**
|
|
8
|
-
* 打开模态
|
|
9
|
-
* @template T
|
|
10
|
-
* @param component
|
|
11
|
-
* @param [props]
|
|
12
|
-
* @param [opts]
|
|
13
|
-
* @return {*}
|
|
14
|
-
*/
|
|
15
|
-
openModal<T>(component: unknown, props?: IParams, opts?: IModalOptions): Promise<T>;
|
|
16
|
-
/**
|
|
17
|
-
* 销毁所有未关闭的modal
|
|
18
|
-
*/
|
|
19
|
-
destroyAllModals(): void;
|
|
20
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { BomViewerModal } from './sub-table/material-consume';
|
|
2
|
-
import { default as CommonScanModal } from './sub-table/common/scan-modal.vue';
|
|
3
|
-
import { default as MultiRowsModal } from './sub-table/common/multi-rows-modal.vue';
|
|
4
|
-
export { BomViewerModal, CommonScanModal, MultiRowsModal };
|
|
5
|
-
export * from './parse-rule';
|
|
6
|
-
/**
|
|
7
|
-
* 挂载render
|
|
8
|
-
* @export
|
|
9
|
-
*/
|
|
10
|
-
export declare function initRenderToAdapter(): void;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IModal } from '../../../../shared/types';
|
|
2
|
-
import { ParseRuleProps } from '../../../../online-form/src/views/designer/types/cell-widget';
|
|
3
|
-
import { FormModelController } from '../../../../nocode-base/src';
|
|
4
|
-
type __VLS_Props = {
|
|
5
|
-
modal: IModal;
|
|
6
|
-
config?: ParseRuleProps;
|
|
7
|
-
subModelKey?: string;
|
|
8
|
-
formModelController: FormModelController;
|
|
9
|
-
ruleTip?: string;
|
|
10
|
-
readonly?: boolean;
|
|
11
|
-
};
|
|
12
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
13
|
-
formRef: unknown;
|
|
14
|
-
}, HTMLDivElement>;
|
|
15
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './allocate-web-render';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { IModal } from '../../../../../shared/types';
|
|
2
|
-
/** 扫码校验返回的候选行(与 materialCheck 对齐) */
|
|
3
|
-
type MultiRowsItem = {
|
|
4
|
-
materialId?: string;
|
|
5
|
-
materialNo?: string;
|
|
6
|
-
productionIdentificationId?: string;
|
|
7
|
-
productionIdentificationName?: string;
|
|
8
|
-
[key: string]: any;
|
|
9
|
-
};
|
|
10
|
-
type __VLS_Props = {
|
|
11
|
-
modal: IModal;
|
|
12
|
-
rows: MultiRowsItem[];
|
|
13
|
-
};
|
|
14
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
|
-
export default _default;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { IModal } from '../../../../../shared/types';
|
|
2
|
-
import { ParseRuleProps, FormFieldOption } from '../../../../../nocode-base/src';
|
|
3
|
-
import { ScanParamType } from '../../../../../nocode-base/src/types/common/base';
|
|
4
|
-
type __VLS_Props = {
|
|
5
|
-
modal: IModal;
|
|
6
|
-
scanParam?: ScanParamType;
|
|
7
|
-
scanRules?: ParseRuleProps;
|
|
8
|
-
formFieldOptions?: FormFieldOption[];
|
|
9
|
-
onScan: (params: {
|
|
10
|
-
str?: string;
|
|
11
|
-
parsedValue?: any;
|
|
12
|
-
transformedData?: any;
|
|
13
|
-
}) => void;
|
|
14
|
-
ruleTip?: string;
|
|
15
|
-
};
|
|
16
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
17
|
-
formRef: unknown;
|
|
18
|
-
}, HTMLDivElement>;
|
|
19
|
-
export default _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './mb-web-render';
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { IModal } from '../../../../../shared/types';
|
|
2
|
-
import { IBomEntry } from '../../../../../nocode-base/src';
|
|
3
|
-
type __VLS_Props = {
|
|
4
|
-
modal: IModal;
|
|
5
|
-
opts: {
|
|
6
|
-
bomList: IBomEntry[];
|
|
7
|
-
onSubstitute: Function;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
11
|
-
export default _default;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { FormModelController, MCRender, ParseRuleProps } from '../../../../../nocode-base/src';
|
|
2
|
-
import { IOverlayContainer } from '../../../../../shared/types';
|
|
3
|
-
import { ScanParamType } from '../../../../../nocode-base/src/types/common/base.ts';
|
|
4
|
-
export declare class McWebRender extends MCRender {
|
|
5
|
-
/** overlay 弹层按实例记录,form-base 弹层通过其全局管理器关闭。 */
|
|
6
|
-
modals: Array<{
|
|
7
|
-
ownerId?: string;
|
|
8
|
-
modal: IOverlayContainer;
|
|
9
|
-
}>;
|
|
10
|
-
handleModal(modal: IOverlayContainer, ownerId?: string): Promise<void>;
|
|
11
|
-
destroyAllModals(ownerId: string): void;
|
|
12
|
-
message(opts: {
|
|
13
|
-
type: 'error' | 'warning';
|
|
14
|
-
content: string;
|
|
15
|
-
}): void;
|
|
16
|
-
_openBomModal(opts: {
|
|
17
|
-
ownerId: string;
|
|
18
|
-
bomList: any[];
|
|
19
|
-
onSubstitute: Function;
|
|
20
|
-
}): Promise<void>;
|
|
21
|
-
openScanModal(opts: {
|
|
22
|
-
title: string;
|
|
23
|
-
subModelKey?: string;
|
|
24
|
-
formModelController: FormModelController;
|
|
25
|
-
scanRules?: ParseRuleProps;
|
|
26
|
-
scanParam?: ScanParamType;
|
|
27
|
-
onScan: (params: {
|
|
28
|
-
str?: string;
|
|
29
|
-
parsedValue?: any;
|
|
30
|
-
transformedData?: any;
|
|
31
|
-
}) => void;
|
|
32
|
-
}): Promise<void>;
|
|
33
|
-
openChangeRuleModal(opts: {
|
|
34
|
-
config: ParseRuleProps;
|
|
35
|
-
subModelKey?: string;
|
|
36
|
-
formModelController: FormModelController;
|
|
37
|
-
}): Promise<ParseRuleProps | undefined>;
|
|
38
|
-
openMultiRowsModal(opts: {
|
|
39
|
-
rows: any[];
|
|
40
|
-
title?: string;
|
|
41
|
-
}): Promise<any | undefined>;
|
|
42
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { IWebUploadApis, IUploadParams } from './i-use-web-upload';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './hooks';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '../src/nocode-web-render/src/index';
|