@ibiz-template/runtime 0.7.41-alpha.58 → 0.7.41-alpha.60
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +57 -1
- package/dist/index.system.min.js +1 -1
- package/out/controller/control/form/edit-form/edit-form.service.d.ts.map +1 -1
- package/out/controller/control/form/edit-form/edit-form.service.js +8 -0
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts +19 -0
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-detail/form-detail.controller.js +46 -0
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.d.ts.map +1 -1
- package/out/controller/control/form/form-detail/form-mdctrl/form-mdctrl-repeater.controller.js +3 -1
- package/out/interface/api/controller/control/form-detail/i-api-form-detail.controller.d.ts +13 -0
- package/out/interface/api/controller/control/form-detail/i-api-form-detail.controller.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -54737,6 +54737,12 @@ var FormDetailController = class {
|
|
|
54737
54737
|
* @param {T} model
|
|
54738
54738
|
*/
|
|
54739
54739
|
constructor(model, form, parent) {
|
|
54740
|
+
/**
|
|
54741
|
+
* @description 是否为自定义代码
|
|
54742
|
+
* @type {boolean}
|
|
54743
|
+
* @memberof FormDetailController
|
|
54744
|
+
*/
|
|
54745
|
+
this.isCustomCode = false;
|
|
54740
54746
|
/**
|
|
54741
54747
|
* 动态逻辑结果
|
|
54742
54748
|
* @author lxm
|
|
@@ -54762,6 +54768,9 @@ var FormDetailController = class {
|
|
|
54762
54768
|
if (tag !== void 0 && tag > -1) {
|
|
54763
54769
|
this.state.visible = false;
|
|
54764
54770
|
}
|
|
54771
|
+
const renderCode = this.getRenderCode();
|
|
54772
|
+
if (renderCode)
|
|
54773
|
+
this.isCustomCode = true;
|
|
54765
54774
|
}
|
|
54766
54775
|
/**
|
|
54767
54776
|
* 表单数据
|
|
@@ -55095,6 +55104,47 @@ var FormDetailController = class {
|
|
|
55095
55104
|
event
|
|
55096
55105
|
});
|
|
55097
55106
|
}
|
|
55107
|
+
/**
|
|
55108
|
+
* @description 获取脚本代码html
|
|
55109
|
+
* @param {IData} data
|
|
55110
|
+
* @returns {*} {(Promise<string | undefined>)}
|
|
55111
|
+
* @memberof FormDetailController
|
|
55112
|
+
*/
|
|
55113
|
+
async getCustomHtml(data) {
|
|
55114
|
+
let renderCode = this.getRenderCode();
|
|
55115
|
+
if (renderCode) {
|
|
55116
|
+
if (!renderCode.includes("return")) {
|
|
55117
|
+
renderCode = "return (".concat(renderCode, ")");
|
|
55118
|
+
}
|
|
55119
|
+
return await ScriptFactory.asyncExecScriptFn(
|
|
55120
|
+
{
|
|
55121
|
+
data,
|
|
55122
|
+
context: this.context,
|
|
55123
|
+
params: this.params,
|
|
55124
|
+
controller: this,
|
|
55125
|
+
ctrl: this.form,
|
|
55126
|
+
view: this.form.view,
|
|
55127
|
+
metadata: { model: this.model }
|
|
55128
|
+
},
|
|
55129
|
+
renderCode
|
|
55130
|
+
);
|
|
55131
|
+
}
|
|
55132
|
+
}
|
|
55133
|
+
/**
|
|
55134
|
+
* @description 获取绘制器模型代码
|
|
55135
|
+
* @returns {*} {string}
|
|
55136
|
+
* @memberof FormDetailController
|
|
55137
|
+
*/
|
|
55138
|
+
getRenderCode() {
|
|
55139
|
+
let result = "";
|
|
55140
|
+
const { controlRenders = [] } = this.model;
|
|
55141
|
+
const item = controlRenders.find(
|
|
55142
|
+
(renderItem) => renderItem.renderType === "LAYOUTPANEL_MODEL"
|
|
55143
|
+
);
|
|
55144
|
+
if (item)
|
|
55145
|
+
result = item.layoutPanelModel || "";
|
|
55146
|
+
return result;
|
|
55147
|
+
}
|
|
55098
55148
|
};
|
|
55099
55149
|
|
|
55100
55150
|
// src/controller/control/form/form-detail/form-button/form-button.state.ts
|
|
@@ -56990,10 +57040,12 @@ var FormMDCtrlRepeaterController = class extends FormMDCtrlController {
|
|
|
56990
57040
|
id,
|
|
56991
57041
|
codeName: id,
|
|
56992
57042
|
name: id,
|
|
56993
|
-
// 重复器忽略消息中心通知变更
|
|
56994
57043
|
controlParam: {
|
|
56995
57044
|
ctrlParams: {
|
|
57045
|
+
// 重复器忽略消息中心通知变更
|
|
56996
57046
|
ignoremcmsg: "true",
|
|
57047
|
+
// 启用重复表单
|
|
57048
|
+
enablerepeatedform: "true",
|
|
56997
57049
|
appId: this.model.appId
|
|
56998
57050
|
},
|
|
56999
57051
|
id,
|
|
@@ -57910,6 +57962,10 @@ var EditFormService = class extends FormService {
|
|
|
57910
57962
|
dataType: formItem.dataType,
|
|
57911
57963
|
isOneToMultiField: uiKeys && uiKeys.length > 1
|
|
57912
57964
|
});
|
|
57965
|
+
} else if (this.model.controlParam && this.model.controlParam.ctrlParams && this.model.controlParam.ctrlParams.enablerepeatedform === "true") {
|
|
57966
|
+
mapField = new UIMapField(uiKey, uiKey, {
|
|
57967
|
+
isOriginField: true
|
|
57968
|
+
});
|
|
57913
57969
|
} else {
|
|
57914
57970
|
mapField = new UIMapField(uiKey, uiKey, {
|
|
57915
57971
|
isOriginField: presetFields.includes(uiKey)
|