weaver-e10-builder 1.6.8 → 1.6.9
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/commands/form-attachment-setting.d.ts.map +1 -1
- package/dist/commands/form-attachment-setting.js +147 -50
- package/dist/commands/form-attachment-setting.js.map +1 -1
- package/dist/commands/form-code.d.ts.map +1 -1
- package/dist/commands/form-code.js +4 -1
- package/dist/commands/form-code.js.map +1 -1
- package/dist/commands/form-field-linkage.d.ts +2 -0
- package/dist/commands/form-field-linkage.d.ts.map +1 -1
- package/dist/commands/form-field-linkage.js +97 -41
- package/dist/commands/form-field-linkage.js.map +1 -1
- package/dist/commands/form-layout-code-reviewed.d.ts.map +1 -1
- package/dist/commands/form-layout-code-reviewed.js +5 -2
- package/dist/commands/form-layout-code-reviewed.js.map +1 -1
- package/dist/commands/form-layout.js +1 -1
- package/dist/commands/form-layout.js.map +1 -1
- package/dist/commands/menu.d.ts.map +1 -1
- package/dist/commands/menu.js +90 -1
- package/dist/commands/menu.js.map +1 -1
- package/dist/commands/wf-form.d.ts.map +1 -1
- package/dist/commands/wf-form.js +111 -39
- package/dist/commands/wf-form.js.map +1 -1
- package/dist/services/form-attachment-settings.d.ts +47 -20
- package/dist/services/form-attachment-settings.d.ts.map +1 -1
- package/dist/services/form-attachment-settings.js +148 -68
- package/dist/services/form-attachment-settings.js.map +1 -1
- package/dist/services/form-code.d.ts +1 -1
- package/dist/services/form-code.d.ts.map +1 -1
- package/dist/services/form-code.js +2 -2
- package/dist/services/form-code.js.map +1 -1
- package/dist/services/form-layout-code-reviewed.d.ts +2 -0
- package/dist/services/form-layout-code-reviewed.d.ts.map +1 -1
- package/dist/services/form-layout-code-reviewed.js +4 -3
- package/dist/services/form-layout-code-reviewed.js.map +1 -1
- package/dist/services/menu-catalog.d.ts +45 -0
- package/dist/services/menu-catalog.d.ts.map +1 -1
- package/dist/services/menu-catalog.js +76 -0
- package/dist/services/menu-catalog.js.map +1 -1
- package/dist/services/workflow-layout-init-reviewed.d.ts +2 -0
- package/dist/services/workflow-layout-init-reviewed.d.ts.map +1 -1
- package/dist/services/workflow-layout-init-reviewed.js +30 -2
- package/dist/services/workflow-layout-init-reviewed.js.map +1 -1
- package/dist/services/workflow-layout-structure.d.ts +3 -0
- package/dist/services/workflow-layout-structure.d.ts.map +1 -0
- package/dist/services/workflow-layout-structure.js +44 -0
- package/dist/services/workflow-layout-structure.js.map +1 -0
- package/package.json +1 -1
- package/skill-docs/SKILL.md +4 -4
- package/skill-docs/_catalog.md +1 -1
- package/skill-docs/references/common/capability-boundaries.md +6 -4
- package/skill-docs/references/common/ref-cli-commands.md +4 -3
- package/skill-docs/references/form/guide-field-linkage.md +9 -1
- package/skill-docs/references/form/guide-form-attachment-setting.md +31 -12
- package/skill-docs/references/form/guide-form-layout-planning.md +1 -1
- package/skill-docs/references/form/layout/code-block/code-block-guide.md +5 -5
- package/skill-docs/references/form/layout/code-block/layout-css.md +95 -15
- package/skill-docs/references/form/layout/template/advanced.md +2 -0
- package/skill-docs/references/form/layout/workflow-layout.md +10 -0
- package/skill-docs/references/menu/system-menus.md +21 -0
- package/skill-docs/references/code-block/guide-code-block.md +0 -141
- package/skill-docs/references/code-block/guide-layout-css.md +0 -107
- package/skill-docs/references/code-block/ref-controls.md +0 -60
- package/skill-docs/references/code-block/ref-coverage.md +0 -32
- package/skill-docs/references/code-block/ref-details.md +0 -57
- package/skill-docs/references/code-block/ref-events-validation.md +0 -42
- package/skill-docs/references/code-block/ref-foundations-fields.md +0 -56
- package/skill-docs/references/code-block/ref-recipes.md +0 -164
- package/skill-docs/references/code-block/ref-troubleshooting.md +0 -49
- package/skill-docs/references/code-block/ref-ui-global.md +0 -47
- package/skill-docs/references/form/form-template/style-templates-advanced-css-guide.md +0 -167
- package/skill-docs/references/form/form-template/style-templates-advanced.md +0 -315
- package/skill-docs/references/form/form-template/style-templates-easy.md +0 -55
- package/skill-docs/references/form/form-template/style-templates-flow.md +0 -27
- package/skill-docs/references/form/form-template/style-templates.md +0 -29
|
@@ -156,16 +156,60 @@ async function getFormMeta(client, baseUrl, objId, userId, tenantKey) {
|
|
|
156
156
|
name: String(d.fields?.[0]?.subFormName || d.name || ''),
|
|
157
157
|
fields: d.fields || [],
|
|
158
158
|
})).filter((d) => /^\d+$/.test(d.id));
|
|
159
|
-
|
|
159
|
+
const main = await annotateEsbFieldIds(client, baseUrl, objId, res?.data?.mainFields || []);
|
|
160
|
+
return { main, details };
|
|
160
161
|
}
|
|
161
162
|
async function getFormFields(client, baseUrl, objId, userId, tenantKey) {
|
|
162
163
|
return (await getFormMeta(client, baseUrl, objId, userId, tenantKey)).main;
|
|
163
164
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
165
|
+
/**
|
|
166
|
+
* 源表字段在 ESB 查询结果里的标识。
|
|
167
|
+
*
|
|
168
|
+
* 业务字段是 `field_<fieldId>`,**系统字段是裸 id**(「数据ID」= `id`、「标题」= `name`……)。
|
|
169
|
+
* 由平台 `getDataSourceFields` 给出,按显示名对上;拿不到就退回本地规则(系统字段没有
|
|
170
|
+
* ESB 标识时,调用方必须报错,不能拿 field_id 这种编出来的变量名去写设计)。
|
|
171
|
+
*/
|
|
172
|
+
const ESB_SOURCE_FIELDS_API = '/api/bs/esb/setting/component/getDataSourceFields';
|
|
173
|
+
async function annotateEsbFieldIds(client, baseUrl, objId, fields) {
|
|
174
|
+
let esbList = [];
|
|
175
|
+
try {
|
|
176
|
+
const res = await client.post(`${baseUrl}${ESB_SOURCE_FIELDS_API}`, { sourceType: 'LOGIC', groupId: 'weaver-ebuilder-form-service', sourceId: objId }, { ebbusinessid: objId });
|
|
177
|
+
if (res?.code === 200 && Array.isArray(res.data))
|
|
178
|
+
esbList = res.data;
|
|
179
|
+
}
|
|
180
|
+
catch { /* 查询失败走本地规则 */ }
|
|
181
|
+
const byName = new Map(esbList.filter((f) => f?.content).map((f) => [String(f.content), f]));
|
|
182
|
+
return (fields || []).map((f) => {
|
|
183
|
+
const hit = byName.get(String(f.fieldName));
|
|
184
|
+
const fallback = /^\d+$/.test(String(f.fieldId)) ? `field_${f.fieldId}` : '';
|
|
185
|
+
return { ...f, esbId: String(hit?.id || fallback), esbDbFieldType: hit?.dbFieldType };
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
/** 源字段在 ESB 报文里的变量名;系统字段没有规范标识时报错,而不是拼一个假的。 */
|
|
189
|
+
export function esbFieldIdOf(field) {
|
|
190
|
+
const id = String(field?.esbId ?? '');
|
|
191
|
+
if (id)
|
|
192
|
+
return id;
|
|
193
|
+
const fid = String(field?.fieldId ?? '');
|
|
194
|
+
if (/^\d+$/.test(fid))
|
|
195
|
+
return `field_${fid}`;
|
|
196
|
+
throw new Error(`字段「${field?.fieldName ?? fid}」不在该表单的 ESB 数据源字段里,无法作为联动字段使用`);
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* 按名称找字段。
|
|
200
|
+
*
|
|
201
|
+
* 默认只认业务字段(数值 fieldId)—— 触发字段/目标字段是「表单数据」本身,系统字段
|
|
202
|
+
* (数据ID/创建者等)不能当触发源或赋值落点。**带出侧**要允许系统字段,传 `allowSystem`。
|
|
203
|
+
*/
|
|
204
|
+
function findFieldId(fields, name, opts = {}) {
|
|
205
|
+
const matches = fields.filter((x) => x.fieldName === name || x.dataKey === name);
|
|
206
|
+
const f = matches.find((x) => opts.allowSystem === true || /^\d+$/.test(String(x.fieldId)));
|
|
207
|
+
if (f)
|
|
208
|
+
return f;
|
|
209
|
+
if (matches.length) {
|
|
210
|
+
throw new Error(`字段 "${name}" 是系统字段,不能作为触发字段或赋值目标;它可以作为查询/带出字段`);
|
|
211
|
+
}
|
|
212
|
+
throw new Error(`字段 "${name}" 未找到`);
|
|
169
213
|
}
|
|
170
214
|
export function registerFormFieldLinkageCommands(form, program) {
|
|
171
215
|
const fl = form.command('field-linkage').description('字段联动(跨表带出赋值):list / read / fields / add。本表字段间用公式赋值的是另一条链路,见 form formula-linkage');
|
|
@@ -535,15 +579,15 @@ export function registerFormFieldLinkageCommands(form, program) {
|
|
|
535
579
|
}
|
|
536
580
|
const { formId: sfFormId, formName: sfFormName } = await getFormId(client, baseUrl, appId, objId2);
|
|
537
581
|
const sfFields = await getFormFields(client, baseUrl, objId2, auth.userId, auth.tenantKey);
|
|
538
|
-
const qf = findFieldId(sfFields, fieldName);
|
|
539
|
-
hops.push({ srcFormObjId: objId2, srcFormId: sfFormId, srcFormName: sfFormName, queryFieldId: qf.fieldId, queryFieldName: qf.fieldName });
|
|
582
|
+
const qf = findFieldId(sfFields, fieldName, { allowSystem: true });
|
|
583
|
+
hops.push({ srcFormObjId: objId2, srcFormId: sfFormId, srcFormName: sfFormName, queryFieldId: qf.fieldId, queryFieldName: qf.fieldName, queryEsbId: esbFieldIdOf(qf) });
|
|
540
584
|
}
|
|
541
585
|
}
|
|
542
586
|
else if (cmdOpts.sourceForm && cmdOpts.queryField) {
|
|
543
587
|
const { formId: sfFormId, formName: sfFormName } = await getFormId(client, baseUrl, appId, cmdOpts.sourceForm);
|
|
544
588
|
const sfFields = await getFormFields(client, baseUrl, cmdOpts.sourceForm, auth.userId, auth.tenantKey);
|
|
545
|
-
const qf = findFieldId(sfFields, cmdOpts.queryField);
|
|
546
|
-
hops = [{ srcFormObjId: cmdOpts.sourceForm, srcFormId: sfFormId, srcFormName: sfFormName, queryFieldId: qf.fieldId, queryFieldName: qf.fieldName }];
|
|
589
|
+
const qf = findFieldId(sfFields, cmdOpts.queryField, { allowSystem: true });
|
|
590
|
+
hops = [{ srcFormObjId: cmdOpts.sourceForm, srcFormId: sfFormId, srcFormName: sfFormName, queryFieldId: qf.fieldId, queryFieldName: qf.fieldName, queryEsbId: esbFieldIdOf(qf) }];
|
|
547
591
|
}
|
|
548
592
|
else {
|
|
549
593
|
console.error('需要 --hops 或 --source-form/--query-field');
|
|
@@ -606,16 +650,17 @@ export function registerFormFieldLinkageCommands(form, program) {
|
|
|
606
650
|
* 才是「第 0 行」。查询条件是按数据 ID 精确过滤,结果最多一行,取第 0 行即可。
|
|
607
651
|
*/
|
|
608
652
|
function buildOutputFormulaValue(p) {
|
|
609
|
-
|
|
610
|
-
const
|
|
653
|
+
// 系统字段(数据ID 等)在查询结果里的变量名是裸 id,不能套 `field_` 前缀。
|
|
654
|
+
const sid = esbFieldIdOf(p.srcField);
|
|
655
|
+
const paramKey = `${p.srcFormObjId}[].${sid}`;
|
|
611
656
|
const parentName = `${p.srcFormName}[].${p.srcField.fieldName}`;
|
|
612
657
|
const rowRef = genSfId();
|
|
613
658
|
const formulaId = genSfId();
|
|
614
659
|
return {
|
|
615
|
-
paramKey, paramName:
|
|
660
|
+
paramKey, paramName: sid, showName: String(p.srcField.fieldName), paramType: 'string',
|
|
616
661
|
dataType: 'attribute', arrs: false, paramTypeString: 'STRING', dataTypeSting: 'ATTRIBUTE',
|
|
617
662
|
formulaId: '0', name: String(p.srcField.fieldName), source: p.sourceWId,
|
|
618
|
-
value: `FormData.${p.srcFormObjId}[${rowRef}]
|
|
663
|
+
value: `FormData.${p.srcFormObjId}[${rowRef}].${sid}`, type: '3', formulaType: 'string',
|
|
619
664
|
frontId: genSfId(), businessId: genSfId(), id: formulaId, applicationId: p.esbAppId,
|
|
620
665
|
childs: [{
|
|
621
666
|
formulaType: 'string', name: '0', id: genSfId(), position: rowRef,
|
|
@@ -631,8 +676,8 @@ function buildOutputFormulaValue(p) {
|
|
|
631
676
|
formulaVersion: 'V1', parentComId: 0, multName: '', multKey: '',
|
|
632
677
|
multTypeObj: {
|
|
633
678
|
currentName: parentName, allName: parentName,
|
|
634
|
-
currentParamKey: `FormData.${p.srcFormObjId}[]
|
|
635
|
-
allParamKey: `FormData.${p.srcFormObjId}[]
|
|
679
|
+
currentParamKey: `FormData.${p.srcFormObjId}[].${sid}`,
|
|
680
|
+
allParamKey: `FormData.${p.srcFormObjId}[].${sid}`,
|
|
636
681
|
},
|
|
637
682
|
},
|
|
638
683
|
parentId: '0', switchType: 'assign',
|
|
@@ -656,8 +701,8 @@ function buildSaveDesign(p) {
|
|
|
656
701
|
: (() => {
|
|
657
702
|
const prevHop = p.hops[i - 1];
|
|
658
703
|
const bizId = genSfId();
|
|
659
|
-
const pk = `${prevHop.srcFormObjId}[]
|
|
660
|
-
return { paramKey: pk, paramName:
|
|
704
|
+
const pk = `${prevHop.srcFormObjId}[].${prevHop.queryEsbId}`;
|
|
705
|
+
return { paramKey: pk, paramName: prevHop.queryEsbId, showName: prevHop.queryFieldName, paramType: 'string', dataType: 'attribute', arrs: false, paramTypeString: 'STRING', dataTypeSting: 'ATTRIBUTE', formulaId: '0', name: prevHop.queryFieldName, source: prevWId, value: `FormData.${prevHop.srcFormObjId}[${bizId}].${prevHop.queryEsbId}`, type: '3', formulaType: 'string', config: { paramKey: pk, paramType: 'string', parentName: `${prevHop.srcFormName}[].${prevHop.queryFieldName}`, newParentName: `${prevHop.srcFormName}[].${prevHop.queryFieldName}`, comId: prevWId, isMultCom: false, tableName: '表单数据', fieldInfo: { tablePrimaryKey: 'FormData', paramKey: pk }, switchType: 'assign' }, applicationId: p.esbAppId, fieldType: 'string' };
|
|
661
706
|
})();
|
|
662
707
|
enquiryActions.push({
|
|
663
708
|
id: eqWId, wId: eqWId, nodeType: 'Normal', comType: 'EnquiryForm', type: 'EnquiryForm',
|
|
@@ -669,7 +714,7 @@ function buildSaveDesign(p) {
|
|
|
669
714
|
dataSource: { id: hop.srcFormObjId, text: hop.srcFormName, type: 'LOGIC', groupId: 'weaver-ebuilder-form-service', isPhysical: true, usage: 'all', detailTable: false, objType: 'physical', module: 'ebuilder', appId: p.appId, isFormModuleSelected: true, enquiryId: -1 },
|
|
670
715
|
filterInput: { key: genSfId(), relationship: '1', isParent: true, isNewFilter: true, parentNode: '', datas: [{ isParent: false, parentNode: '', id: '5', fieldName: 'id', fieldType: 'String', optionType: '', text: '数据ID', objId: hop.srcFormObjId, compType: 'Text', type: 'condition', multiSelect: 'false', formInfo: { fieldId: '5' }, module: 'ebuilderform', mainField: true, subTableId: '', dbFieldType: 'Number', conditions: { func: 'eq', value: filterValue, text: filterValue.showName, isEsb: true, esbAssign: { wId: eqWId, textarea: false, withoutDftNum: true } } }], version: 1, filterIsNull: false, rootStr: `( 数据ID 等于 '${filterValue.showName}' )` },
|
|
671
716
|
authorityFlag: '0', opType: 'list',
|
|
672
|
-
queryFields: [{ id:
|
|
717
|
+
queryFields: [{ id: hop.queryEsbId, content: hop.queryFieldName, parseMark: true, type: 'Ebuilder', fieldGroup: { name: hop.srcFormName, id: hop.srcFormObjId }, dbFieldType: 'NUMBER', otherParams: { objType: 'physical' }, formId: hop.srcFormObjId }],
|
|
673
718
|
type: 'EventButton', applicationId: p.esbAppId,
|
|
674
719
|
},
|
|
675
720
|
ignoreFlowCheck: true,
|
|
@@ -688,7 +733,7 @@ function buildSaveDesign(p) {
|
|
|
688
733
|
outputStatus: '1', pageAction: '0', reminder: '0', fixedData: [], triggerFlag: false, nextAction: false, customOutputData: '', currentApplication: p.esbAppId,
|
|
689
734
|
fieldLinkCustomParamSetting: {
|
|
690
735
|
customId: '', formType: 'output', businessModule: '',
|
|
691
|
-
tableList: [{ id: genSfId(), formId: p.selfFormId, showName: p.selfFormName, orderNum: 0, main: true, isMain: true, fields: [{ id: genSfId(), paramName: '', showName: '', paramType: 'string', isRequired: false, fieldComments: '', skipNull: '0', assignFieldId: p.targetFieldId, fieldPath: `${p.selfFormId}.${p.targetFieldId}`, fieldType: 'Ebuilder', formulaValue: buildOutputFormulaValue({ srcFormObjId: lastHop.srcFormObjId, srcFormName: lastHop.srcFormName, srcField: { fieldId: lastHop.queryFieldId, fieldName: lastHop.queryFieldName }, sourceWId: prevWId, esbAppId: p.esbAppId }) }] }],
|
|
736
|
+
tableList: [{ id: genSfId(), formId: p.selfFormId, showName: p.selfFormName, orderNum: 0, main: true, isMain: true, fields: [{ id: genSfId(), paramName: '', showName: '', paramType: 'string', isRequired: false, fieldComments: '', skipNull: '0', assignFieldId: p.targetFieldId, fieldPath: `${p.selfFormId}.${p.targetFieldId}`, fieldType: 'Ebuilder', formulaValue: buildOutputFormulaValue({ srcFormObjId: lastHop.srcFormObjId, srcFormName: lastHop.srcFormName, srcField: { fieldId: lastHop.queryFieldId, fieldName: lastHop.queryFieldName, esbId: lastHop.queryEsbId }, sourceWId: prevWId, esbAppId: p.esbAppId }) }] }],
|
|
692
737
|
deleteTableIds: [], appId: p.esbAppId,
|
|
693
738
|
}, applicationId: p.esbAppId,
|
|
694
739
|
},
|
|
@@ -721,9 +766,9 @@ const CONDITION_OPT_CODE = {
|
|
|
721
766
|
*/
|
|
722
767
|
/** 查询结果字段的上下文公式(条件左右两侧共用)。 */
|
|
723
768
|
function buildContextFormula(field, srcFormObjId, srcFormName, eqWId) {
|
|
724
|
-
const fid =
|
|
725
|
-
const paramKey = `${srcFormObjId}[]
|
|
726
|
-
const valuePath = `FormData.${srcFormObjId}[]
|
|
769
|
+
const fid = esbFieldIdOf(field);
|
|
770
|
+
const paramKey = `${srcFormObjId}[].${fid}`;
|
|
771
|
+
const valuePath = `FormData.${srcFormObjId}[].${fid}`;
|
|
727
772
|
const parentName = `${srcFormName}[].${field.fieldName}`;
|
|
728
773
|
return {
|
|
729
774
|
paramType: 'string', formulaType: 'string', name: String(field.fieldName),
|
|
@@ -964,7 +1009,7 @@ async function addQuickLinkage(p) {
|
|
|
964
1009
|
const assigns = cmdOpts.assign.map(parseAssignExpr);
|
|
965
1010
|
const assignPairs = assigns.map(a => {
|
|
966
1011
|
const t = splitAssignTarget(a.target);
|
|
967
|
-
const srcField = findFieldId(srcFields, a.src);
|
|
1012
|
+
const srcField = findFieldId(srcFields, a.src, { allowSystem: true });
|
|
968
1013
|
if (!t.table)
|
|
969
1014
|
return { srcField, targetField: findFieldId(selfFields, t.field) };
|
|
970
1015
|
const detail = selfDetails.find(d => d.name === t.table);
|
|
@@ -988,7 +1033,7 @@ async function addQuickLinkage(p) {
|
|
|
988
1033
|
console.error(`明细表 "${tableName}" 未找到`);
|
|
989
1034
|
process.exit(1);
|
|
990
1035
|
}
|
|
991
|
-
basis.set(detail.id, findFieldId(srcFields, expr.slice(i + 1).trim()));
|
|
1036
|
+
basis.set(detail.id, findFieldId(srcFields, expr.slice(i + 1).trim(), { allowSystem: true }));
|
|
992
1037
|
}
|
|
993
1038
|
// 不给 --basis 时用「选表」作为明细行依据(查询结果整表),不再默认取第一个赋值源字段。
|
|
994
1039
|
// 字段级依据只在显式 --basis 明细表=源表字段 时使用。
|
|
@@ -1000,7 +1045,7 @@ async function addQuickLinkage(p) {
|
|
|
1000
1045
|
...assigns.map(a => a.src),
|
|
1001
1046
|
...[...basis.values()].map((f) => f.fieldName),
|
|
1002
1047
|
])];
|
|
1003
|
-
const queryFields = queryFieldList.map(n => findFieldId(srcFields, n));
|
|
1048
|
+
const queryFields = queryFieldList.map(n => findFieldId(srcFields, n, { allowSystem: true }));
|
|
1004
1049
|
if (queryFields.length === 0) {
|
|
1005
1050
|
console.error('需要 --query-fields 或 --assign 指定查询字段');
|
|
1006
1051
|
process.exit(1);
|
|
@@ -1106,7 +1151,18 @@ function parseConditionExpr(expr, srcFields) {
|
|
|
1106
1151
|
const j = rest.indexOf(':');
|
|
1107
1152
|
const rawFunc = (j < 0 ? rest : rest.slice(0, j)).trim();
|
|
1108
1153
|
let value = j < 0 ? '' : rest.slice(j + 1).trim();
|
|
1109
|
-
const field =
|
|
1154
|
+
const field = (() => {
|
|
1155
|
+
try {
|
|
1156
|
+
return findFieldId(srcFields, fieldName);
|
|
1157
|
+
}
|
|
1158
|
+
catch (error) {
|
|
1159
|
+
// 条件/赋值前提只认业务字段:系统字段的 ESB 条件形状与业务字段不同,没验证过不写。
|
|
1160
|
+
if (/系统字段/.test(error.message)) {
|
|
1161
|
+
throw new Error(`--condition 的源表字段「${fieldName}」是系统字段,条件只支持业务字段`);
|
|
1162
|
+
}
|
|
1163
|
+
throw error;
|
|
1164
|
+
}
|
|
1165
|
+
})();
|
|
1110
1166
|
const family = conditionFieldFamily(String(field.fieldKey || 'Text'), String(field.fieldType || field.type || ''));
|
|
1111
1167
|
const multiSelect = field.multiSelect === true || String(field.multiSelect) === 'true';
|
|
1112
1168
|
let func;
|
|
@@ -1240,7 +1296,7 @@ export function buildQuickSaveDesign(p) {
|
|
|
1240
1296
|
filterInput: { key: filterKey, relationship: '1', isParent: true, isNewFilter: true, parentNode: '', datas, version: 1, filterIsNull: false, rootStr },
|
|
1241
1297
|
authorityFlag: '0', opType: 'list',
|
|
1242
1298
|
queryFields: p.queryFields.map(f => ({
|
|
1243
|
-
id:
|
|
1299
|
+
id: esbFieldIdOf(f), content: String(f.fieldName), parseMark: parseMarkOf(f.fieldKey),
|
|
1244
1300
|
fieldGroup: { name: p.srcFormName, id: p.srcFormObjId }, formId: p.srcFormObjId,
|
|
1245
1301
|
})),
|
|
1246
1302
|
type: 'EventButton', applicationId: p.esbAppId,
|
|
@@ -1259,8 +1315,8 @@ export function buildQuickSaveDesign(p) {
|
|
|
1259
1315
|
const tf = a.targetField;
|
|
1260
1316
|
const isBasisSelf = !!basisField && String(basisField.fieldId) === String(sf.fieldId);
|
|
1261
1317
|
if (a.subForm && isBasisSelf) {
|
|
1262
|
-
const sid =
|
|
1263
|
-
const paramKey = `${p.srcFormObjId}[]
|
|
1318
|
+
const sid = esbFieldIdOf(sf);
|
|
1319
|
+
const paramKey = `${p.srcFormObjId}[].${sid}`;
|
|
1264
1320
|
return {
|
|
1265
1321
|
id: genSfId(), paramName: '', showName: '', paramType: 'string', isRequired: false,
|
|
1266
1322
|
fieldComments: '', skipNull: '1', assignFieldId: String(tf.fieldId),
|
|
@@ -1271,7 +1327,7 @@ export function buildQuickSaveDesign(p) {
|
|
|
1271
1327
|
config: {
|
|
1272
1328
|
originValue: 'esbAssignSelf', switchType: 'sub', id: 'esbAssignSelf',
|
|
1273
1329
|
content: `${sf.fieldName}(依据值本身)`, source: eqWId, frontId: genSfId(),
|
|
1274
|
-
value: `FormData.${p.srcFormObjId}[]
|
|
1330
|
+
value: `FormData.${p.srcFormObjId}[].${sid}`, paramKey,
|
|
1275
1331
|
config: baseFormulaValue(sf).config, level: 0, basisType: 'formSetting',
|
|
1276
1332
|
},
|
|
1277
1333
|
},
|
|
@@ -1286,15 +1342,15 @@ export function buildQuickSaveDesign(p) {
|
|
|
1286
1342
|
};
|
|
1287
1343
|
};
|
|
1288
1344
|
const buildBasisValue = (field) => {
|
|
1289
|
-
const fid =
|
|
1290
|
-
const paramKey = `${p.srcFormObjId}[]
|
|
1345
|
+
const fid = esbFieldIdOf(field);
|
|
1346
|
+
const paramKey = `${p.srcFormObjId}[].${fid}`;
|
|
1291
1347
|
return {
|
|
1292
|
-
id: genSfId(), deleteType: 0, paramKey, paramName:
|
|
1293
|
-
paramType: 'string', dataType: 'attribute', arrs: false, required: false, description:
|
|
1348
|
+
id: genSfId(), deleteType: 0, paramKey, paramName: fid, showName: String(field.fieldName),
|
|
1349
|
+
paramType: 'string', dataType: 'attribute', arrs: false, required: false, description: fid,
|
|
1294
1350
|
paramTypeString: 'STRING', dataTypeSting: 'ATTRIBUTE', formulaId: '0',
|
|
1295
1351
|
hideParamNameInSelect: false, hideParam: false, readonlyParam: false, sensitiveFlag: false, newdata: false,
|
|
1296
1352
|
parentName: `${p.srcFormName}[].${field.fieldName}`, name: String(field.fieldName),
|
|
1297
|
-
source: eqWId, value: `FormData.${p.srcFormObjId}[]
|
|
1353
|
+
source: eqWId, value: `FormData.${p.srcFormObjId}[].${fid}`, type: '3', formulaType: 'string',
|
|
1298
1354
|
frontId: genSfId(),
|
|
1299
1355
|
config: {
|
|
1300
1356
|
paramKey, paramType: 'string',
|
|
@@ -1350,7 +1406,7 @@ export function buildQuickSaveDesign(p) {
|
|
|
1350
1406
|
const buildTableBasisAssign = (a, tableId) => {
|
|
1351
1407
|
const sf = a.srcField;
|
|
1352
1408
|
const tf = a.targetField;
|
|
1353
|
-
const sid =
|
|
1409
|
+
const sid = esbFieldIdOf(sf);
|
|
1354
1410
|
return {
|
|
1355
1411
|
id: genSfId(), paramName: '', showName: '', paramType: 'string', isRequired: false,
|
|
1356
1412
|
fieldComments: '', skipNull: '1', assignFieldId: String(tf.fieldId),
|
|
@@ -1362,20 +1418,20 @@ export function buildQuickSaveDesign(p) {
|
|
|
1362
1418
|
id: genSfId(),
|
|
1363
1419
|
type: '10',
|
|
1364
1420
|
applicationId: p.esbAppId,
|
|
1365
|
-
value:
|
|
1421
|
+
value: sid,
|
|
1366
1422
|
childs: [],
|
|
1367
1423
|
config: {
|
|
1368
1424
|
frontId: genSfId(),
|
|
1369
|
-
paramKey: `${p.srcFormObjId}[]
|
|
1425
|
+
paramKey: `${p.srcFormObjId}[].${sid}`,
|
|
1370
1426
|
basisType: 'formSetting',
|
|
1371
1427
|
switchType: 'sub',
|
|
1372
1428
|
level: 1,
|
|
1373
|
-
id:
|
|
1429
|
+
id: sid,
|
|
1374
1430
|
source: eqWId,
|
|
1375
1431
|
formulaVersion: 'V1',
|
|
1376
1432
|
value: srcTableValue,
|
|
1377
1433
|
config: buildSrcTableConfig(),
|
|
1378
|
-
originValue:
|
|
1434
|
+
originValue: sid,
|
|
1379
1435
|
content: String(sf.fieldName),
|
|
1380
1436
|
},
|
|
1381
1437
|
parentId: '0',
|