@gct-paas/word 0.1.25 → 0.1.27
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/core/interaction/InteractionController.d.ts +2 -0
- package/dist/core/utils/expand.d.ts +18 -23
- package/dist/core/view/Doc.d.ts +5 -1
- package/dist/core/view/TableCell.d.ts +2 -0
- package/dist/core/widget/widget-state.d.ts +5 -0
- package/dist/index.es.js +546 -471
- package/dist/runtime/canvas/table/utils/index.d.ts +6 -17
- package/dist/runtime/interface/render.d.ts +0 -6
- package/dist/sdk/doc-runtime/factories/document-initializer.d.ts +1 -1
- package/dist/sdk/types/index.d.ts +10 -4
- package/dist/utils/func/form.d.ts +2 -0
- package/dist/word.css +17 -17
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -27393,6 +27393,240 @@ function isClickPaperWidgetAllNode(node) {
|
|
|
27393
27393
|
const raw = node.raw;
|
|
27394
27394
|
return raw.isPageWidgetRun;
|
|
27395
27395
|
}
|
|
27396
|
+
const EmptySymbolTypeConst = {
|
|
27397
|
+
"/": "/",
|
|
27398
|
+
"--": "--",
|
|
27399
|
+
"——": "——",
|
|
27400
|
+
NA: "NA",
|
|
27401
|
+
"N/A": "N/A"
|
|
27402
|
+
};
|
|
27403
|
+
const ViewStateTypeConst = {
|
|
27404
|
+
/** 文本显示 */
|
|
27405
|
+
Readonly: "readonly",
|
|
27406
|
+
/** 组件显示-禁用 */
|
|
27407
|
+
Disabled: "disabled",
|
|
27408
|
+
/** 组件显示-跟随设计 */
|
|
27409
|
+
Auto: "auto"
|
|
27410
|
+
};
|
|
27411
|
+
const RenderCompTypeConst = {
|
|
27412
|
+
/** 圆形 */
|
|
27413
|
+
Radio: "radio",
|
|
27414
|
+
/** 方形 */
|
|
27415
|
+
Checkbox: "checkbox",
|
|
27416
|
+
/** 下拉 */
|
|
27417
|
+
Select: "select"
|
|
27418
|
+
};
|
|
27419
|
+
const BooleanShowModeTypeConst = {
|
|
27420
|
+
/** 只显示真 */
|
|
27421
|
+
OnlyTrue: "onlyTrue",
|
|
27422
|
+
/** 只显示真 */
|
|
27423
|
+
OnlyFalse: "onlyFalse",
|
|
27424
|
+
/** 同时显示真和假 */
|
|
27425
|
+
Both: "both"
|
|
27426
|
+
};
|
|
27427
|
+
const LabelPositionTypeConst = {
|
|
27428
|
+
/** 文字在前 */
|
|
27429
|
+
Before: "before",
|
|
27430
|
+
/** 文字在后 */
|
|
27431
|
+
After: "after"
|
|
27432
|
+
};
|
|
27433
|
+
const OrientationTypeConst = {
|
|
27434
|
+
/** 纵 */
|
|
27435
|
+
Portrait: "portrait",
|
|
27436
|
+
/** 横 */
|
|
27437
|
+
Landscape: "landscape"
|
|
27438
|
+
};
|
|
27439
|
+
const DecimalDisplayModeTypeConst = {
|
|
27440
|
+
/** 显示百分比(%) */
|
|
27441
|
+
PERCENT: "percent",
|
|
27442
|
+
/** 显示原始数值 */
|
|
27443
|
+
ORIGIN: "origin"
|
|
27444
|
+
};
|
|
27445
|
+
const RangeValidateModeTypeConst = {
|
|
27446
|
+
/** 不校验 */
|
|
27447
|
+
No_Validate: "NoValidate",
|
|
27448
|
+
/** 固定输入校验 */
|
|
27449
|
+
Fixed_Number: "FixedNumber",
|
|
27450
|
+
/** 变量校验 */
|
|
27451
|
+
Variable_Validate: "VariableValidate"
|
|
27452
|
+
};
|
|
27453
|
+
const FieldSysVarDefaultValueConst = {
|
|
27454
|
+
NULL: "",
|
|
27455
|
+
/** 系统登录用户 */
|
|
27456
|
+
CURRENT_USER: "CURRENT_USER",
|
|
27457
|
+
/** 当前登录用户主部门 */
|
|
27458
|
+
CURRENT_ORG: "CURRENT_ORG"
|
|
27459
|
+
};
|
|
27460
|
+
const SignatureNumberTypeConst = {
|
|
27461
|
+
/** 单人签名 */
|
|
27462
|
+
SIGNATURE_SINGLE: "signature_single",
|
|
27463
|
+
/** 多人签名 */
|
|
27464
|
+
SIGNATURE_MULTIPLE: "signature_multiple"
|
|
27465
|
+
};
|
|
27466
|
+
const SignatureTypeConst = {
|
|
27467
|
+
/** 仅签名 */
|
|
27468
|
+
SIGNATURE_ONLY: "signature_only",
|
|
27469
|
+
/** 签名及日期 */
|
|
27470
|
+
SIGNATURE_DATE: "signature_date",
|
|
27471
|
+
/** 签名及日期时间 */
|
|
27472
|
+
SIGNATURE_DATETIME: "signature_datetime"
|
|
27473
|
+
};
|
|
27474
|
+
const SignatureTimeTypeConst = {
|
|
27475
|
+
/** 跟随签名 */
|
|
27476
|
+
FOLLOW_SIGNATURE: "follow_signature",
|
|
27477
|
+
/** 填充新字段 */
|
|
27478
|
+
POPULATE_FIELD: "populate_field"
|
|
27479
|
+
};
|
|
27480
|
+
const SignDisplayTypeConst = {
|
|
27481
|
+
/** 垂直显示 */
|
|
27482
|
+
VERTICAL: "vertical",
|
|
27483
|
+
/** 水平显示 */
|
|
27484
|
+
HORIZONTAL: "horizontal"
|
|
27485
|
+
};
|
|
27486
|
+
const ImageDisplayModeConst = {
|
|
27487
|
+
/** 自定义 */
|
|
27488
|
+
CUSTOM: "CUSTOM",
|
|
27489
|
+
/** 自适应 */
|
|
27490
|
+
ADAPTIVE: "ADAPTIVE"
|
|
27491
|
+
};
|
|
27492
|
+
const FieldDependencyTypeConst = {
|
|
27493
|
+
/**隐藏 */
|
|
27494
|
+
Hidden: "hidden",
|
|
27495
|
+
/**只读 */
|
|
27496
|
+
Readonly: "readonly",
|
|
27497
|
+
/**禁用 */
|
|
27498
|
+
Disabled: "disabled",
|
|
27499
|
+
/**必填 */
|
|
27500
|
+
Required: "required",
|
|
27501
|
+
/**赋值 */
|
|
27502
|
+
Assignment: "assignment"
|
|
27503
|
+
};
|
|
27504
|
+
const AssignmentStrategyTypeConst = {
|
|
27505
|
+
/**始终覆盖 */
|
|
27506
|
+
AlwaysCover: "alwaysCover",
|
|
27507
|
+
/**不覆盖已修改 */
|
|
27508
|
+
NotCovered: "notCovered"
|
|
27509
|
+
};
|
|
27510
|
+
const FormTypeConst = {
|
|
27511
|
+
/** 基础表单 */
|
|
27512
|
+
BASE: "BASE",
|
|
27513
|
+
/** 流程表单 */
|
|
27514
|
+
PROCESS: "PROCESS",
|
|
27515
|
+
/** 视图表单 */
|
|
27516
|
+
VIEW: "VIEW",
|
|
27517
|
+
/** 文本表单 */
|
|
27518
|
+
TEXT: "TEXT",
|
|
27519
|
+
/** 文件表单 */
|
|
27520
|
+
FILE: "FILE"
|
|
27521
|
+
};
|
|
27522
|
+
const ViewTypeConst = {
|
|
27523
|
+
/** 视图模型(查询视图) */
|
|
27524
|
+
VIEW_MODEL: "VIEW_MODEL",
|
|
27525
|
+
/** SQL数据视图 */
|
|
27526
|
+
VIEW_SQL: "SQL",
|
|
27527
|
+
/** 自定义模型 */
|
|
27528
|
+
VIEW_JS: "JS"
|
|
27529
|
+
};
|
|
27530
|
+
const BwipCodeTypeConst = {
|
|
27531
|
+
Code39: "code39",
|
|
27532
|
+
Code128: "code128",
|
|
27533
|
+
QRCode: "qrcode",
|
|
27534
|
+
GS1DataMatrix: "gs1datamatrix"
|
|
27535
|
+
};
|
|
27536
|
+
const ValueTypeConst = {
|
|
27537
|
+
/** 固定值 */
|
|
27538
|
+
Fixed: "fixed",
|
|
27539
|
+
/** 字段 */
|
|
27540
|
+
Field: "field",
|
|
27541
|
+
/** 公式 */
|
|
27542
|
+
Formula: "formula"
|
|
27543
|
+
};
|
|
27544
|
+
const ImageSizeModeTypeConst = {
|
|
27545
|
+
/** 自适应,响应式的适应外层容器的大小 */
|
|
27546
|
+
RESPONSIVE: "responsive",
|
|
27547
|
+
/** 固定值,高宽设了多少就是多少 */
|
|
27548
|
+
FIXED: "fixed"
|
|
27549
|
+
};
|
|
27550
|
+
const DiagonalDirectionTypeConst = {
|
|
27551
|
+
/** 从左上到右下 */
|
|
27552
|
+
Forward: "forward",
|
|
27553
|
+
/** 从右上到左下 / */
|
|
27554
|
+
Backward: "backward"
|
|
27555
|
+
};
|
|
27556
|
+
function resolveDisplayStatusFromAuth(options) {
|
|
27557
|
+
const { info, readonlyString, editString } = options;
|
|
27558
|
+
if (isEmpty(info)) return null;
|
|
27559
|
+
if (info.edit && !info.readonly) {
|
|
27560
|
+
return editString;
|
|
27561
|
+
}
|
|
27562
|
+
if (info.readonly && !info.edit) {
|
|
27563
|
+
return readonlyString;
|
|
27564
|
+
}
|
|
27565
|
+
return null;
|
|
27566
|
+
}
|
|
27567
|
+
function isWidgetMetaInteractionBlockedInFillMode(doc, widgetMeta) {
|
|
27568
|
+
if (!doc.isInFillMode() || !widgetMeta) return false;
|
|
27569
|
+
const state = resolveWidgetState({
|
|
27570
|
+
doc,
|
|
27571
|
+
viewState: widgetMeta.props.viewState,
|
|
27572
|
+
required: widgetMeta.props.required,
|
|
27573
|
+
newRequired: widgetMeta.props.newSpecificConfig?.newRequired,
|
|
27574
|
+
readonly: widgetMeta.props.readonly,
|
|
27575
|
+
newReadonly: widgetMeta.props.newSpecificConfig?.newReadonly,
|
|
27576
|
+
disabled: widgetMeta.props.disabled,
|
|
27577
|
+
newDisabled: widgetMeta.props.newSpecificConfig?.newDisabled,
|
|
27578
|
+
cannotInput: widgetMeta.props.cannotInput,
|
|
27579
|
+
isLinkedModelField: widgetMeta.field?.isLinkedModelField,
|
|
27580
|
+
fieldLink: widgetMeta.field?.fieldLink || "",
|
|
27581
|
+
modelLink: widgetMeta.field?.modelLink || ""
|
|
27582
|
+
});
|
|
27583
|
+
const isReadonly = state.displayStatus === "readonly-component" || state.displayStatus === "readonly-text";
|
|
27584
|
+
return state.disabled || isReadonly;
|
|
27585
|
+
}
|
|
27586
|
+
function resolveWidgetState(ctx) {
|
|
27587
|
+
const required4 = ctx.doc.isInEditMode() ? !!ctx.required : !!ctx.newRequired;
|
|
27588
|
+
let readonly2 = false;
|
|
27589
|
+
if (ctx.doc.isInEditMode()) {
|
|
27590
|
+
readonly2 = false;
|
|
27591
|
+
} else if (ctx.doc.isInPrintMode()) {
|
|
27592
|
+
readonly2 = true;
|
|
27593
|
+
} else if (ctx.newReadonly !== void 0) {
|
|
27594
|
+
readonly2 = !!ctx.newReadonly;
|
|
27595
|
+
}
|
|
27596
|
+
const disabled = ctx.doc.isInEditMode() ? !!ctx.disabled : !!ctx.newDisabled;
|
|
27597
|
+
const readonlyString = ctx.viewState === ViewStateTypeConst.Disabled || ctx.viewState === ViewStateTypeConst.Auto ? "readonly-component" : "readonly-text";
|
|
27598
|
+
const editString = readonly2 ? "readonly-component" : "edit-component";
|
|
27599
|
+
let displayStatus;
|
|
27600
|
+
const fromAuth = resolveDisplayStatusFromAuth({
|
|
27601
|
+
info: ctx.doc.docRuntimeMeta.handleInfo.bpmnFieldAuthMap?.[`${ctx.modelLink}.${ctx.fieldLink}`],
|
|
27602
|
+
readonlyString,
|
|
27603
|
+
editString
|
|
27604
|
+
});
|
|
27605
|
+
if (ctx.isLinkedModelField || ctx.cannotInput) {
|
|
27606
|
+
displayStatus = readonlyString;
|
|
27607
|
+
} else if (ctx.doc.mode === DocModeTypeConst.Print) {
|
|
27608
|
+
displayStatus = readonlyString;
|
|
27609
|
+
} else if (ctx.doc.mode === DocModeTypeConst.Fill) {
|
|
27610
|
+
if (fromAuth) {
|
|
27611
|
+
displayStatus = fromAuth;
|
|
27612
|
+
} else if (ctx.doc.formType !== FormTypeConst.PROCESS) {
|
|
27613
|
+
displayStatus = editString;
|
|
27614
|
+
} else {
|
|
27615
|
+
const bpmnType = ctx.doc.docRuntimeMeta.handleInfo?.bpmnType;
|
|
27616
|
+
const isReadonlyNode = bpmnType === "bpmnApproval" || bpmnType === "bpmnJudge";
|
|
27617
|
+
displayStatus = isReadonlyNode ? readonlyString : editString;
|
|
27618
|
+
}
|
|
27619
|
+
} else {
|
|
27620
|
+
displayStatus = editString;
|
|
27621
|
+
}
|
|
27622
|
+
const finalDisabled = displayStatus === "edit-component" ? disabled : ctx.viewState === ViewStateTypeConst.Disabled || disabled;
|
|
27623
|
+
return {
|
|
27624
|
+
required: required4,
|
|
27625
|
+
readonly: readonly2,
|
|
27626
|
+
disabled: finalDisabled,
|
|
27627
|
+
displayStatus
|
|
27628
|
+
};
|
|
27629
|
+
}
|
|
27396
27630
|
class TextHitHandler {
|
|
27397
27631
|
handleHitDetection(doc, node, actualX, actualY) {
|
|
27398
27632
|
const base = getBaseMetaInfo(node);
|
|
@@ -27435,6 +27669,9 @@ class TextHitHandler {
|
|
|
27435
27669
|
if (doc.isInFillMode() && !isClickSelectAllNode(node)) {
|
|
27436
27670
|
return null;
|
|
27437
27671
|
}
|
|
27672
|
+
if (doc.isInFillMode() && isClickSelectAllNode(node) && validateTextWidgetMarker(node.raw, true) && isWidgetMetaInteractionBlockedInFillMode(doc, node.raw.widgetMeta)) {
|
|
27673
|
+
return null;
|
|
27674
|
+
}
|
|
27438
27675
|
if (Array.isArray(node.charOffsets) && node.charOffsets.length > 0) {
|
|
27439
27676
|
return resolveCharHit(node, base, actualX);
|
|
27440
27677
|
}
|
|
@@ -30708,166 +30945,81 @@ function toFixedPoint(str, e, z2) {
|
|
|
30708
30945
|
return str;
|
|
30709
30946
|
}
|
|
30710
30947
|
var BigNumber = clone();
|
|
30711
|
-
|
|
30712
|
-
"
|
|
30713
|
-
"
|
|
30714
|
-
"
|
|
30715
|
-
|
|
30716
|
-
"
|
|
30717
|
-
|
|
30718
|
-
|
|
30719
|
-
|
|
30720
|
-
|
|
30721
|
-
|
|
30722
|
-
|
|
30723
|
-
|
|
30724
|
-
|
|
30725
|
-
|
|
30726
|
-
|
|
30727
|
-
|
|
30728
|
-
|
|
30729
|
-
|
|
30730
|
-
|
|
30731
|
-
|
|
30732
|
-
|
|
30733
|
-
|
|
30734
|
-
|
|
30735
|
-
|
|
30736
|
-
|
|
30737
|
-
|
|
30738
|
-
|
|
30739
|
-
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
|
|
30743
|
-
|
|
30744
|
-
|
|
30745
|
-
|
|
30746
|
-
|
|
30747
|
-
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
|
|
30752
|
-
|
|
30753
|
-
|
|
30754
|
-
|
|
30755
|
-
|
|
30756
|
-
|
|
30757
|
-
|
|
30758
|
-
|
|
30759
|
-
|
|
30760
|
-
|
|
30761
|
-
|
|
30762
|
-
|
|
30763
|
-
|
|
30764
|
-
|
|
30765
|
-
|
|
30766
|
-
|
|
30767
|
-
|
|
30768
|
-
|
|
30769
|
-
|
|
30770
|
-
|
|
30771
|
-
|
|
30772
|
-
|
|
30773
|
-
|
|
30774
|
-
|
|
30775
|
-
|
|
30776
|
-
|
|
30777
|
-
|
|
30778
|
-
|
|
30779
|
-
|
|
30780
|
-
|
|
30781
|
-
|
|
30782
|
-
|
|
30783
|
-
|
|
30784
|
-
|
|
30785
|
-
|
|
30786
|
-
/** 签名及日期时间 */
|
|
30787
|
-
SIGNATURE_DATETIME: "signature_datetime"
|
|
30788
|
-
};
|
|
30789
|
-
const SignatureTimeTypeConst = {
|
|
30790
|
-
/** 跟随签名 */
|
|
30791
|
-
FOLLOW_SIGNATURE: "follow_signature",
|
|
30792
|
-
/** 填充新字段 */
|
|
30793
|
-
POPULATE_FIELD: "populate_field"
|
|
30794
|
-
};
|
|
30795
|
-
const SignDisplayTypeConst = {
|
|
30796
|
-
/** 垂直显示 */
|
|
30797
|
-
VERTICAL: "vertical",
|
|
30798
|
-
/** 水平显示 */
|
|
30799
|
-
HORIZONTAL: "horizontal"
|
|
30800
|
-
};
|
|
30801
|
-
const ImageDisplayModeConst = {
|
|
30802
|
-
/** 自定义 */
|
|
30803
|
-
CUSTOM: "CUSTOM",
|
|
30804
|
-
/** 自适应 */
|
|
30805
|
-
ADAPTIVE: "ADAPTIVE"
|
|
30806
|
-
};
|
|
30807
|
-
const FieldDependencyTypeConst = {
|
|
30808
|
-
/**隐藏 */
|
|
30809
|
-
Hidden: "hidden",
|
|
30810
|
-
/**只读 */
|
|
30811
|
-
Readonly: "readonly",
|
|
30812
|
-
/**禁用 */
|
|
30813
|
-
Disabled: "disabled",
|
|
30814
|
-
/**必填 */
|
|
30815
|
-
Required: "required",
|
|
30816
|
-
/**赋值 */
|
|
30817
|
-
Assignment: "assignment"
|
|
30818
|
-
};
|
|
30819
|
-
const AssignmentStrategyTypeConst = {
|
|
30820
|
-
/**始终覆盖 */
|
|
30821
|
-
AlwaysCover: "alwaysCover",
|
|
30822
|
-
/**不覆盖已修改 */
|
|
30823
|
-
NotCovered: "notCovered"
|
|
30824
|
-
};
|
|
30825
|
-
const FormTypeConst = {
|
|
30826
|
-
/** 基础表单 */
|
|
30827
|
-
BASE: "BASE",
|
|
30828
|
-
/** 流程表单 */
|
|
30829
|
-
PROCESS: "PROCESS",
|
|
30830
|
-
/** 视图表单 */
|
|
30831
|
-
VIEW: "VIEW",
|
|
30832
|
-
/** 文本表单 */
|
|
30833
|
-
TEXT: "TEXT",
|
|
30834
|
-
/** 文件表单 */
|
|
30835
|
-
FILE: "FILE"
|
|
30836
|
-
};
|
|
30837
|
-
const ViewTypeConst = {
|
|
30838
|
-
/** 视图模型(查询视图) */
|
|
30839
|
-
VIEW_MODEL: "VIEW_MODEL",
|
|
30840
|
-
/** SQL数据视图 */
|
|
30841
|
-
VIEW_SQL: "SQL",
|
|
30842
|
-
/** 自定义模型 */
|
|
30843
|
-
VIEW_JS: "JS"
|
|
30844
|
-
};
|
|
30845
|
-
const BwipCodeTypeConst = {
|
|
30846
|
-
Code39: "code39",
|
|
30847
|
-
Code128: "code128",
|
|
30848
|
-
QRCode: "qrcode",
|
|
30849
|
-
GS1DataMatrix: "gs1datamatrix"
|
|
30850
|
-
};
|
|
30851
|
-
const ValueTypeConst = {
|
|
30852
|
-
/** 固定值 */
|
|
30853
|
-
Fixed: "fixed",
|
|
30854
|
-
/** 字段 */
|
|
30855
|
-
Field: "field",
|
|
30856
|
-
/** 公式 */
|
|
30857
|
-
Formula: "formula"
|
|
30858
|
-
};
|
|
30859
|
-
const ImageSizeModeTypeConst = {
|
|
30860
|
-
/** 自适应,响应式的适应外层容器的大小 */
|
|
30861
|
-
RESPONSIVE: "responsive",
|
|
30862
|
-
/** 固定值,高宽设了多少就是多少 */
|
|
30863
|
-
FIXED: "fixed"
|
|
30864
|
-
};
|
|
30865
|
-
const DiagonalDirectionTypeConst = {
|
|
30866
|
-
/** 从左上到右下 */
|
|
30867
|
-
Forward: "forward",
|
|
30868
|
-
/** 从右上到左下 / */
|
|
30869
|
-
Backward: "backward"
|
|
30870
|
-
};
|
|
30948
|
+
var FIELD_TYPE = /* @__PURE__ */ ((FIELD_TYPE2) => {
|
|
30949
|
+
FIELD_TYPE2["PRIMARY_KEY"] = "primary_key";
|
|
30950
|
+
FIELD_TYPE2["ASSOCIATED_PRIMARY_KEY"] = "associated_primary_key";
|
|
30951
|
+
FIELD_TYPE2["TEXT"] = "text";
|
|
30952
|
+
FIELD_TYPE2["LONG_TEXT"] = "long_text";
|
|
30953
|
+
FIELD_TYPE2["INTEGER"] = "integer";
|
|
30954
|
+
FIELD_TYPE2["LONG"] = "long";
|
|
30955
|
+
FIELD_TYPE2["DOUBLE"] = "double";
|
|
30956
|
+
FIELD_TYPE2["DECIMAL"] = "decimal";
|
|
30957
|
+
FIELD_TYPE2["BOOLEAN"] = "boolean";
|
|
30958
|
+
FIELD_TYPE2["DATE"] = "date";
|
|
30959
|
+
FIELD_TYPE2["TIME"] = "time";
|
|
30960
|
+
FIELD_TYPE2["DATE_TIME"] = "date_time";
|
|
30961
|
+
FIELD_TYPE2["IMAGE"] = "image";
|
|
30962
|
+
FIELD_TYPE2["ATTACHMENT"] = "attachment";
|
|
30963
|
+
FIELD_TYPE2["SERIAL"] = "serial_number";
|
|
30964
|
+
FIELD_TYPE2["MASTERSLAVE"] = "master_slave";
|
|
30965
|
+
FIELD_TYPE2["USER"] = "user";
|
|
30966
|
+
FIELD_TYPE2["USER_MULTI"] = "user_multi";
|
|
30967
|
+
FIELD_TYPE2["ORG"] = "org";
|
|
30968
|
+
FIELD_TYPE2["ORG_MULTI"] = "org_multi";
|
|
30969
|
+
FIELD_TYPE2["ENUM"] = "enum";
|
|
30970
|
+
FIELD_TYPE2["ENUM_MULTI"] = "enum_multi";
|
|
30971
|
+
FIELD_TYPE2["OPTION"] = "option";
|
|
30972
|
+
FIELD_TYPE2["OPTION_MULTI"] = "option_multi";
|
|
30973
|
+
FIELD_TYPE2["REF"] = "ref";
|
|
30974
|
+
FIELD_TYPE2["REF_MULTI"] = "ref_multi";
|
|
30975
|
+
FIELD_TYPE2["RDO_REF"] = "rdo_ref";
|
|
30976
|
+
FIELD_TYPE2["EXPRESSION"] = "expression";
|
|
30977
|
+
FIELD_TYPE2["EXPRESSION_CONDITION"] = "expression_condition";
|
|
30978
|
+
FIELD_TYPE2["FUNCTION"] = "function";
|
|
30979
|
+
FIELD_TYPE2["AGG"] = "agg";
|
|
30980
|
+
FIELD_TYPE2["ESOP"] = "esop";
|
|
30981
|
+
FIELD_TYPE2["TRANSACTION"] = "transaction";
|
|
30982
|
+
FIELD_TYPE2["LABEL_TEMPLATE"] = "label_template";
|
|
30983
|
+
FIELD_TYPE2["LABEL_TEMPLATE_REF"] = "label_template_ref";
|
|
30984
|
+
FIELD_TYPE2["SERIALRULE"] = "serial_number_rule";
|
|
30985
|
+
FIELD_TYPE2["PRINTER"] = "printer";
|
|
30986
|
+
FIELD_TYPE2["MESSAGE_TMPL"] = "message_tmpl";
|
|
30987
|
+
FIELD_TYPE2["RANGE_USER"] = "range_user";
|
|
30988
|
+
FIELD_TYPE2["SIGNATURE"] = "electronic_signature";
|
|
30989
|
+
FIELD_TYPE2["ONLINE_FORM_TEMPLATE"] = "online_form_tmpl";
|
|
30990
|
+
FIELD_TYPE2["E_DHR_TEMPLATE"] = "edhr_tmpl";
|
|
30991
|
+
FIELD_TYPE2["DATA_TABLE_FORMULA"] = "data_table_formula";
|
|
30992
|
+
FIELD_TYPE2["READONLYCMP"] = "readonlycmp";
|
|
30993
|
+
FIELD_TYPE2["MATERIAL_NO"] = "material_no";
|
|
30994
|
+
FIELD_TYPE2["PRODUCT"] = "product";
|
|
30995
|
+
FIELD_TYPE2["DEVICE"] = "device";
|
|
30996
|
+
FIELD_TYPE2["Biz_Process"] = "biz_process";
|
|
30997
|
+
FIELD_TYPE2["Approval_Process"] = "approval_process";
|
|
30998
|
+
FIELD_TYPE2["MFG_ORDER"] = "mfg_order";
|
|
30999
|
+
FIELD_TYPE2["RECORD_NO"] = "record_no";
|
|
31000
|
+
FIELD_TYPE2["TRACE_DATE"] = "trace_date";
|
|
31001
|
+
FIELD_TYPE2["ROUTING_OPERATION"] = "routing_operation";
|
|
31002
|
+
FIELD_TYPE2["GOOD_QTY"] = "good_qty";
|
|
31003
|
+
FIELD_TYPE2["NOT_GOOD_QTY"] = "not_good_qty";
|
|
31004
|
+
FIELD_TYPE2["REPORT_START_TIME"] = "report_start_time";
|
|
31005
|
+
FIELD_TYPE2["REPORT_END_TIME"] = "report_end_time";
|
|
31006
|
+
FIELD_TYPE2["WORK_HOURS"] = "work_hours";
|
|
31007
|
+
FIELD_TYPE2["PRODUCTION_DATE"] = "production_date";
|
|
31008
|
+
FIELD_TYPE2["REPORTER"] = "reporter";
|
|
31009
|
+
FIELD_TYPE2["NOT_GOOD_REASON"] = "not_good_reason";
|
|
31010
|
+
FIELD_TYPE2["NOT_GOOD_GROUP"] = "not_good_group";
|
|
31011
|
+
FIELD_TYPE2["SCRAP_REASON"] = "scrap_reason";
|
|
31012
|
+
FIELD_TYPE2["SCRAP_GROUP"] = "scrap_group";
|
|
31013
|
+
FIELD_TYPE2["SCRAP_QTY"] = "scrap_qty";
|
|
31014
|
+
FIELD_TYPE2["SCRAP_MATERIAL"] = "scrap_material";
|
|
31015
|
+
FIELD_TYPE2["SCRAP_MATERIAL_NO"] = "scrap_material_no";
|
|
31016
|
+
FIELD_TYPE2["DESTRUCTIVE_TEST_QTY"] = "destructive_test_qty";
|
|
31017
|
+
FIELD_TYPE2["PRODUCT_CHECK_QTY"] = "product_check_qty";
|
|
31018
|
+
FIELD_TYPE2["MATERIAL_CHECK_QTY"] = "material_check_qty";
|
|
31019
|
+
FIELD_TYPE2["DEVICE_REF"] = "device_ref";
|
|
31020
|
+
FIELD_TYPE2["DEVICE_REF_MULTI"] = "device_ref_multi";
|
|
31021
|
+
return FIELD_TYPE2;
|
|
31022
|
+
})(FIELD_TYPE || {});
|
|
30871
31023
|
function getValue$1(value, multiple) {
|
|
30872
31024
|
if (multiple) {
|
|
30873
31025
|
return Array.isArray(value) ? value : value?.split(",").filter((i) => !isNil(i)) ?? [];
|
|
@@ -30916,6 +31068,18 @@ function toBoolean(value) {
|
|
|
30916
31068
|
}
|
|
30917
31069
|
return Boolean(parseInt(value));
|
|
30918
31070
|
}
|
|
31071
|
+
function toFormatValue(fieldType, value) {
|
|
31072
|
+
if ([FIELD_TYPE.INTEGER, FIELD_TYPE.LONG].includes(fieldType)) {
|
|
31073
|
+
const _val_ = parseInt(value);
|
|
31074
|
+
return isNaN(_val_) ? null : _val_;
|
|
31075
|
+
} else if (fieldType === FIELD_TYPE.DECIMAL) {
|
|
31076
|
+
const _val_ = parseFloat(value);
|
|
31077
|
+
return isNaN(_val_) ? null : _val_;
|
|
31078
|
+
} else if (fieldType === FIELD_TYPE.BOOLEAN) {
|
|
31079
|
+
return toBoolean(value);
|
|
31080
|
+
}
|
|
31081
|
+
return value;
|
|
31082
|
+
}
|
|
30919
31083
|
function toDictValue(field, value, row) {
|
|
30920
31084
|
const dictValue = row?._DICT?.[field]?.[value];
|
|
30921
31085
|
if (Array.isArray(dictValue)) {
|
|
@@ -42309,7 +42473,8 @@ class TableExpander {
|
|
|
42309
42473
|
initializeBoundedItemDataIndex() {
|
|
42310
42474
|
this.table.bounded.forEach((region) => {
|
|
42311
42475
|
if (region.itemRegion) {
|
|
42312
|
-
const
|
|
42476
|
+
const fillDirection = region.widgetMeta?.props?.fillDirection ?? "x";
|
|
42477
|
+
const map2 = this.computeDataIndexMap(region, region.itemRegion, fillDirection);
|
|
42313
42478
|
map2.forEach((obj, key) => {
|
|
42314
42479
|
this.boundedCellDataIndexMap.set(key, {
|
|
42315
42480
|
dataIndex: obj.dataIndex,
|
|
@@ -42319,10 +42484,22 @@ class TableExpander {
|
|
|
42319
42484
|
}
|
|
42320
42485
|
});
|
|
42321
42486
|
}
|
|
42487
|
+
// [数据关联]上、下超出子表范围的部分需要撑开
|
|
42488
|
+
getDataGroup2DItemRange(range3, itemRange) {
|
|
42489
|
+
const {
|
|
42490
|
+
start: { row: startRow },
|
|
42491
|
+
end: { row: endRow }
|
|
42492
|
+
} = itemRange;
|
|
42493
|
+
const expandedRange = cloneDeep(pick(range3, "start", "end"));
|
|
42494
|
+
expandedRange.start.row = startRow;
|
|
42495
|
+
expandedRange.end.row = endRow;
|
|
42496
|
+
return expandedRange;
|
|
42497
|
+
}
|
|
42322
42498
|
initializeDataGroup2DDataIndex() {
|
|
42323
42499
|
this.table.checkTable.forEach((region) => {
|
|
42324
42500
|
if (region.itemRegion) {
|
|
42325
|
-
const
|
|
42501
|
+
const expandedRange = this.getDataGroup2DItemRange(region, region.itemRegion);
|
|
42502
|
+
const map2 = this.computeDataIndexMap(expandedRange, region.itemRegion);
|
|
42326
42503
|
map2.forEach((obj, key) => {
|
|
42327
42504
|
this.checkTableCellDataIndexMap.set(key, {
|
|
42328
42505
|
dataIndex: obj.dataIndex,
|
|
@@ -42333,7 +42510,8 @@ class TableExpander {
|
|
|
42333
42510
|
});
|
|
42334
42511
|
this.table._2DTable.forEach((region) => {
|
|
42335
42512
|
if (region.itemRegion) {
|
|
42336
|
-
const
|
|
42513
|
+
const expandedRange = this.getDataGroup2DItemRange(region, region.itemRegion);
|
|
42514
|
+
const map2 = this.computeDataIndexMap(expandedRange, region.itemRegion);
|
|
42337
42515
|
map2.forEach((obj, key) => {
|
|
42338
42516
|
this._2DTableCellDataIndexMap.set(key, {
|
|
42339
42517
|
dataIndex: obj.dataIndex,
|
|
@@ -42580,16 +42758,18 @@ class TableExpander {
|
|
|
42580
42758
|
*
|
|
42581
42759
|
* @param range - 整体范围 {start:{row,col} end:{row,col}},表示需要分配数据项的总区域
|
|
42582
42760
|
* @param itemRange - 局部范围 {start:{row,col} end:{row,col}},表示一个数据项的模板大小
|
|
42761
|
+
* @param fillDirection - `x`:先横向扩展再换行;`y`:先纵向扩展再换列(与 `x` 的行列外层循环互为镜像)
|
|
42583
42762
|
* @returns Map,key 为字符串 "row,col",值为对应的数据索引
|
|
42584
42763
|
*
|
|
42585
|
-
*
|
|
42764
|
+
* 横向(x)算法:
|
|
42586
42765
|
* 1. 局部范围内的单元格数据索引为 0
|
|
42587
42766
|
* 2. 从局部范围右侧开始,按 itemWidth 宽度逐个扩展数据项
|
|
42588
|
-
* 3.
|
|
42589
|
-
* 4.
|
|
42590
|
-
*
|
|
42767
|
+
* 3. 当同一行带内无法再放置更多数据项时,换到下一个 itemHeight 行带
|
|
42768
|
+
* 4. 换行后从整体范围的最左侧列开始继续扩展
|
|
42769
|
+
*
|
|
42770
|
+
* 纵向(y)算法:与 x 对称——先在模板列宽内从模板下方按 itemHeight 向下铺,再换到下一组列(列宽对齐 itemWidth),新一组列从整体范围最顶行重新起铺。
|
|
42591
42771
|
*/
|
|
42592
|
-
computeDataIndexMap(range3, itemRange) {
|
|
42772
|
+
computeDataIndexMap(range3, itemRange, fillDirection = "x") {
|
|
42593
42773
|
const indexMap = /* @__PURE__ */ new Map();
|
|
42594
42774
|
const itemWidth = itemRange.end.col - itemRange.start.col + 1;
|
|
42595
42775
|
const itemHeight = itemRange.end.row - itemRange.start.row + 1;
|
|
@@ -42602,28 +42782,43 @@ class TableExpander {
|
|
|
42602
42782
|
}
|
|
42603
42783
|
const tlr = itemRange.start.row;
|
|
42604
42784
|
const tlc = itemRange.start.col;
|
|
42785
|
+
const stampBlock = (blockTopRow, blockLeftCol, di) => {
|
|
42786
|
+
for (let r = blockTopRow; r < blockTopRow + itemHeight; r++) {
|
|
42787
|
+
for (let c2 = blockLeftCol; c2 < blockLeftCol + itemWidth; c2++) {
|
|
42788
|
+
const refR = tlr + r - blockTopRow;
|
|
42789
|
+
const refC = tlc + c2 - blockLeftCol;
|
|
42790
|
+
const refCell = this.table.getChildAt(refR).getChildAt(refC);
|
|
42791
|
+
indexMap.set(`${r},${c2}`, {
|
|
42792
|
+
dataIndex: di,
|
|
42793
|
+
refPos: `${refR},${refC}`,
|
|
42794
|
+
refCellId: refCell.id
|
|
42795
|
+
});
|
|
42796
|
+
}
|
|
42797
|
+
}
|
|
42798
|
+
};
|
|
42605
42799
|
let dataIndex = 1;
|
|
42606
|
-
|
|
42607
|
-
|
|
42608
|
-
|
|
42800
|
+
if (fillDirection === "x") {
|
|
42801
|
+
let currentRow = itemRange.start.row;
|
|
42802
|
+
let currentCol = itemRange.end.col + 1;
|
|
42803
|
+
while (currentRow + itemHeight - 1 <= range3.end.row) {
|
|
42804
|
+
while (currentCol + itemWidth - 1 <= range3.end.col) {
|
|
42805
|
+
stampBlock(currentRow, currentCol, dataIndex++);
|
|
42806
|
+
currentCol += itemWidth;
|
|
42807
|
+
}
|
|
42808
|
+
currentRow += itemHeight;
|
|
42809
|
+
currentCol = range3.start.col;
|
|
42810
|
+
}
|
|
42811
|
+
} else {
|
|
42812
|
+
let currentCol = itemRange.start.col;
|
|
42813
|
+
let currentRow = itemRange.end.row + 1;
|
|
42609
42814
|
while (currentCol + itemWidth - 1 <= range3.end.col) {
|
|
42610
|
-
|
|
42611
|
-
|
|
42612
|
-
|
|
42613
|
-
const refC = tlc + c2 - currentCol;
|
|
42614
|
-
const refCell = this.table.getChildAt(refR).getChildAt(refC);
|
|
42615
|
-
indexMap.set(`${r},${c2}`, {
|
|
42616
|
-
dataIndex,
|
|
42617
|
-
refPos: `${refR},${refC}`,
|
|
42618
|
-
refCellId: refCell.id
|
|
42619
|
-
});
|
|
42620
|
-
}
|
|
42815
|
+
while (currentRow + itemHeight - 1 <= range3.end.row) {
|
|
42816
|
+
stampBlock(currentRow, currentCol, dataIndex++);
|
|
42817
|
+
currentRow += itemHeight;
|
|
42621
42818
|
}
|
|
42622
42819
|
currentCol += itemWidth;
|
|
42623
|
-
|
|
42820
|
+
currentRow = range3.start.row;
|
|
42624
42821
|
}
|
|
42625
|
-
currentRow += itemHeight;
|
|
42626
|
-
currentCol = range3.start.col;
|
|
42627
42822
|
}
|
|
42628
42823
|
return indexMap;
|
|
42629
42824
|
}
|
|
@@ -42673,7 +42868,9 @@ class TableInfoProvider {
|
|
|
42673
42868
|
xDataIndex: cell.xDataIndex,
|
|
42674
42869
|
yDataIndex: cell.yDataIndex,
|
|
42675
42870
|
valuePath: region?.valuePath,
|
|
42676
|
-
widgetMeta: region?.widgetMeta
|
|
42871
|
+
widgetMeta: region?.widgetMeta,
|
|
42872
|
+
// 数据关联
|
|
42873
|
+
dataGroup2DRange: pick(region?.itemRegion, "start", "end")
|
|
42677
42874
|
};
|
|
42678
42875
|
} else if (cell.boundedId) {
|
|
42679
42876
|
const region = this.wtbl.getBoundedById(cell.boundedId);
|
|
@@ -42691,7 +42888,9 @@ class TableInfoProvider {
|
|
|
42691
42888
|
type: "check-table",
|
|
42692
42889
|
dataIndex: cell.dataIndex,
|
|
42693
42890
|
valuePath: region?.valuePath,
|
|
42694
|
-
widgetMeta: region?.widgetMeta
|
|
42891
|
+
widgetMeta: region?.widgetMeta,
|
|
42892
|
+
// 数据关联
|
|
42893
|
+
dataGroup2DRange: pick(region?.itemRegion, "start", "end")
|
|
42695
42894
|
};
|
|
42696
42895
|
} else if (cell.headerId) {
|
|
42697
42896
|
return {
|
|
@@ -44390,6 +44589,18 @@ class InteractionController {
|
|
|
44390
44589
|
clearActiveTableId() {
|
|
44391
44590
|
this.doc.interactionManager.clear("activeTableId");
|
|
44392
44591
|
}
|
|
44592
|
+
/** 填报模式下点击只读/禁用组件:与点空白一致,收起字段焦点并回到纸张 */
|
|
44593
|
+
settleFillModeNonInteractiveField(secRefId) {
|
|
44594
|
+
this.onActivePanelData({
|
|
44595
|
+
type: this.doc.interactionManager.get("isHeaderFooterEdit") ? "panel:paper-header-footer" : "panel:paper",
|
|
44596
|
+
extra: { secRefId }
|
|
44597
|
+
});
|
|
44598
|
+
this.onFocusWidget({ modelId: "", focusTick: 0 });
|
|
44599
|
+
this.doc.eventManager.cursorController.applyCursorPhase({
|
|
44600
|
+
phase: "preview",
|
|
44601
|
+
syncCaret: true
|
|
44602
|
+
});
|
|
44603
|
+
}
|
|
44393
44604
|
syncActiveTableByMeta(meta) {
|
|
44394
44605
|
if (!meta?.line || meta.line.lineType !== "tablerow" || isClickPaperWidgetAllNode(meta)) {
|
|
44395
44606
|
this.clearActiveTableId();
|
|
@@ -44411,7 +44622,13 @@ class InteractionController {
|
|
|
44411
44622
|
}
|
|
44412
44623
|
if (meta) {
|
|
44413
44624
|
if (isClickSelectAllNode(meta)) {
|
|
44414
|
-
const
|
|
44625
|
+
const raw = meta.raw;
|
|
44626
|
+
const blockedInFill = isFillMode && isWidgetMetaInteractionBlockedInFillMode(this.doc, raw.widgetMeta);
|
|
44627
|
+
if (blockedInFill) {
|
|
44628
|
+
this.settleFillModeNonInteractiveField(meta.secRefId);
|
|
44629
|
+
return;
|
|
44630
|
+
}
|
|
44631
|
+
const widgetMeta = raw.widgetMeta;
|
|
44415
44632
|
this.onActivePanelData({
|
|
44416
44633
|
type: "panel:widget",
|
|
44417
44634
|
modelId: meta.raw?.modelRef?.id,
|
|
@@ -44435,6 +44652,11 @@ class InteractionController {
|
|
|
44435
44652
|
);
|
|
44436
44653
|
if (tableMeta && cellMeta && cellMeta.isSubRenderer) {
|
|
44437
44654
|
if (isClickPaperWidgetAllNode(meta)) {
|
|
44655
|
+
const raw = meta.raw;
|
|
44656
|
+
if (isFillMode && isWidgetMetaInteractionBlockedInFillMode(this.doc, raw.widgetMeta)) {
|
|
44657
|
+
this.settleFillModeNonInteractiveField(meta.secRefId);
|
|
44658
|
+
return;
|
|
44659
|
+
}
|
|
44438
44660
|
this.onActivePanelData({
|
|
44439
44661
|
type: "panel:widget",
|
|
44440
44662
|
modelId: meta.raw?.modelRef?.id,
|
|
@@ -44465,6 +44687,12 @@ class InteractionController {
|
|
|
44465
44687
|
}
|
|
44466
44688
|
}
|
|
44467
44689
|
if (isClickPaperWidgetAllNode(meta)) {
|
|
44690
|
+
const raw = meta.raw;
|
|
44691
|
+
const wm = raw.pageWidgetMeta ?? raw.widgetMeta;
|
|
44692
|
+
if (isFillMode && isWidgetMetaInteractionBlockedInFillMode(this.doc, wm)) {
|
|
44693
|
+
this.settleFillModeNonInteractiveField(meta.secRefId);
|
|
44694
|
+
return;
|
|
44695
|
+
}
|
|
44468
44696
|
this.onActivePanelData({
|
|
44469
44697
|
type: "panel:widget",
|
|
44470
44698
|
modelId: meta.raw?.modelRef?.id,
|
|
@@ -44551,61 +44779,6 @@ class InteractionController {
|
|
|
44551
44779
|
destroy() {
|
|
44552
44780
|
}
|
|
44553
44781
|
}
|
|
44554
|
-
function resolveDisplayStatusFromAuth(options) {
|
|
44555
|
-
const { info, readonlyString, editString } = options;
|
|
44556
|
-
if (isEmpty(info)) return null;
|
|
44557
|
-
if (info.edit && !info.readonly) {
|
|
44558
|
-
return editString;
|
|
44559
|
-
}
|
|
44560
|
-
if (info.readonly && !info.edit) {
|
|
44561
|
-
return readonlyString;
|
|
44562
|
-
}
|
|
44563
|
-
return null;
|
|
44564
|
-
}
|
|
44565
|
-
function resolveWidgetState(ctx) {
|
|
44566
|
-
const required4 = ctx.doc.isInEditMode() ? !!ctx.required : !!ctx.newRequired;
|
|
44567
|
-
let readonly2 = false;
|
|
44568
|
-
if (ctx.doc.isInEditMode()) {
|
|
44569
|
-
readonly2 = false;
|
|
44570
|
-
} else if (ctx.doc.isInPrintMode()) {
|
|
44571
|
-
readonly2 = true;
|
|
44572
|
-
} else if (ctx.newReadonly !== void 0) {
|
|
44573
|
-
readonly2 = !!ctx.newReadonly;
|
|
44574
|
-
}
|
|
44575
|
-
const disabled = ctx.doc.isInEditMode() ? !!ctx.disabled : !!ctx.newDisabled;
|
|
44576
|
-
const readonlyString = ctx.viewState === ViewStateTypeConst.Disabled || ctx.viewState === ViewStateTypeConst.Auto ? "readonly-component" : "readonly-text";
|
|
44577
|
-
const editString = readonly2 ? "readonly-component" : "edit-component";
|
|
44578
|
-
let displayStatus;
|
|
44579
|
-
const fromAuth = resolveDisplayStatusFromAuth({
|
|
44580
|
-
info: ctx.doc.docRuntimeMeta.handleInfo.bpmnFieldAuthMap?.[`${ctx.modelLink}.${ctx.fieldLink}`],
|
|
44581
|
-
readonlyString,
|
|
44582
|
-
editString
|
|
44583
|
-
});
|
|
44584
|
-
if (ctx.isLinkedModelField || ctx.cannotInput) {
|
|
44585
|
-
displayStatus = readonlyString;
|
|
44586
|
-
} else if (ctx.doc.mode === DocModeTypeConst.Print) {
|
|
44587
|
-
displayStatus = readonlyString;
|
|
44588
|
-
} else if (ctx.doc.mode === DocModeTypeConst.Fill) {
|
|
44589
|
-
if (fromAuth) {
|
|
44590
|
-
displayStatus = fromAuth;
|
|
44591
|
-
} else if (ctx.doc.formType !== FormTypeConst.PROCESS) {
|
|
44592
|
-
displayStatus = editString;
|
|
44593
|
-
} else {
|
|
44594
|
-
const bpmnType = ctx.doc.docRuntimeMeta.handleInfo?.bpmnType;
|
|
44595
|
-
const isReadonlyNode = bpmnType === "bpmnApproval" || bpmnType === "bpmnJudge";
|
|
44596
|
-
displayStatus = isReadonlyNode ? readonlyString : editString;
|
|
44597
|
-
}
|
|
44598
|
-
} else {
|
|
44599
|
-
displayStatus = editString;
|
|
44600
|
-
}
|
|
44601
|
-
const finalDisabled = displayStatus === "edit-component" ? disabled : ctx.viewState === ViewStateTypeConst.Disabled || disabled;
|
|
44602
|
-
return {
|
|
44603
|
-
required: required4,
|
|
44604
|
-
readonly: readonly2,
|
|
44605
|
-
disabled: finalDisabled,
|
|
44606
|
-
displayStatus
|
|
44607
|
-
};
|
|
44608
|
-
}
|
|
44609
44782
|
class InteractionPolicy {
|
|
44610
44783
|
doc;
|
|
44611
44784
|
constructor(doc) {
|
|
@@ -46082,6 +46255,8 @@ class Doc {
|
|
|
46082
46255
|
id;
|
|
46083
46256
|
/** 渲染模式 */
|
|
46084
46257
|
mode;
|
|
46258
|
+
/** 按钮区渲染模式 */
|
|
46259
|
+
btnRenderModeType;
|
|
46085
46260
|
/** 是否是设计器预览模式 */
|
|
46086
46261
|
preview;
|
|
46087
46262
|
model;
|
|
@@ -46127,6 +46302,7 @@ class Doc {
|
|
|
46127
46302
|
constructor(options) {
|
|
46128
46303
|
this.id = uuid();
|
|
46129
46304
|
this.mode = options.mode ?? DocModeTypeConst.Edit;
|
|
46305
|
+
this.btnRenderModeType = options.btnRenderModeType;
|
|
46130
46306
|
this.preview = options.preview ?? false;
|
|
46131
46307
|
this.model = options.model;
|
|
46132
46308
|
this.mainModelKey = options.mainModelKey;
|
|
@@ -46175,8 +46351,11 @@ class Doc {
|
|
|
46175
46351
|
this.model = model;
|
|
46176
46352
|
this.layout();
|
|
46177
46353
|
}
|
|
46178
|
-
setMode(modeType) {
|
|
46354
|
+
setMode(modeType, updateButton = false) {
|
|
46179
46355
|
this.mode = modeType;
|
|
46356
|
+
if (updateButton) {
|
|
46357
|
+
this.btnRenderModeType = modeType;
|
|
46358
|
+
}
|
|
46180
46359
|
this.layout();
|
|
46181
46360
|
}
|
|
46182
46361
|
/** 触发布局计算 */
|
|
@@ -49216,81 +49395,6 @@ async function processDocumentRequest(props, payload, id) {
|
|
|
49216
49395
|
} finally {
|
|
49217
49396
|
}
|
|
49218
49397
|
}
|
|
49219
|
-
var FIELD_TYPE = /* @__PURE__ */ ((FIELD_TYPE2) => {
|
|
49220
|
-
FIELD_TYPE2["PRIMARY_KEY"] = "primary_key";
|
|
49221
|
-
FIELD_TYPE2["ASSOCIATED_PRIMARY_KEY"] = "associated_primary_key";
|
|
49222
|
-
FIELD_TYPE2["TEXT"] = "text";
|
|
49223
|
-
FIELD_TYPE2["LONG_TEXT"] = "long_text";
|
|
49224
|
-
FIELD_TYPE2["INTEGER"] = "integer";
|
|
49225
|
-
FIELD_TYPE2["LONG"] = "long";
|
|
49226
|
-
FIELD_TYPE2["DOUBLE"] = "double";
|
|
49227
|
-
FIELD_TYPE2["DECIMAL"] = "decimal";
|
|
49228
|
-
FIELD_TYPE2["BOOLEAN"] = "boolean";
|
|
49229
|
-
FIELD_TYPE2["DATE"] = "date";
|
|
49230
|
-
FIELD_TYPE2["TIME"] = "time";
|
|
49231
|
-
FIELD_TYPE2["DATE_TIME"] = "date_time";
|
|
49232
|
-
FIELD_TYPE2["IMAGE"] = "image";
|
|
49233
|
-
FIELD_TYPE2["ATTACHMENT"] = "attachment";
|
|
49234
|
-
FIELD_TYPE2["SERIAL"] = "serial_number";
|
|
49235
|
-
FIELD_TYPE2["MASTERSLAVE"] = "master_slave";
|
|
49236
|
-
FIELD_TYPE2["USER"] = "user";
|
|
49237
|
-
FIELD_TYPE2["USER_MULTI"] = "user_multi";
|
|
49238
|
-
FIELD_TYPE2["ORG"] = "org";
|
|
49239
|
-
FIELD_TYPE2["ORG_MULTI"] = "org_multi";
|
|
49240
|
-
FIELD_TYPE2["ENUM"] = "enum";
|
|
49241
|
-
FIELD_TYPE2["ENUM_MULTI"] = "enum_multi";
|
|
49242
|
-
FIELD_TYPE2["OPTION"] = "option";
|
|
49243
|
-
FIELD_TYPE2["OPTION_MULTI"] = "option_multi";
|
|
49244
|
-
FIELD_TYPE2["REF"] = "ref";
|
|
49245
|
-
FIELD_TYPE2["REF_MULTI"] = "ref_multi";
|
|
49246
|
-
FIELD_TYPE2["RDO_REF"] = "rdo_ref";
|
|
49247
|
-
FIELD_TYPE2["EXPRESSION"] = "expression";
|
|
49248
|
-
FIELD_TYPE2["EXPRESSION_CONDITION"] = "expression_condition";
|
|
49249
|
-
FIELD_TYPE2["FUNCTION"] = "function";
|
|
49250
|
-
FIELD_TYPE2["AGG"] = "agg";
|
|
49251
|
-
FIELD_TYPE2["ESOP"] = "esop";
|
|
49252
|
-
FIELD_TYPE2["TRANSACTION"] = "transaction";
|
|
49253
|
-
FIELD_TYPE2["LABEL_TEMPLATE"] = "label_template";
|
|
49254
|
-
FIELD_TYPE2["LABEL_TEMPLATE_REF"] = "label_template_ref";
|
|
49255
|
-
FIELD_TYPE2["SERIALRULE"] = "serial_number_rule";
|
|
49256
|
-
FIELD_TYPE2["PRINTER"] = "printer";
|
|
49257
|
-
FIELD_TYPE2["MESSAGE_TMPL"] = "message_tmpl";
|
|
49258
|
-
FIELD_TYPE2["RANGE_USER"] = "range_user";
|
|
49259
|
-
FIELD_TYPE2["SIGNATURE"] = "electronic_signature";
|
|
49260
|
-
FIELD_TYPE2["ONLINE_FORM_TEMPLATE"] = "online_form_tmpl";
|
|
49261
|
-
FIELD_TYPE2["E_DHR_TEMPLATE"] = "edhr_tmpl";
|
|
49262
|
-
FIELD_TYPE2["DATA_TABLE_FORMULA"] = "data_table_formula";
|
|
49263
|
-
FIELD_TYPE2["READONLYCMP"] = "readonlycmp";
|
|
49264
|
-
FIELD_TYPE2["MATERIAL_NO"] = "material_no";
|
|
49265
|
-
FIELD_TYPE2["PRODUCT"] = "product";
|
|
49266
|
-
FIELD_TYPE2["DEVICE"] = "device";
|
|
49267
|
-
FIELD_TYPE2["Biz_Process"] = "biz_process";
|
|
49268
|
-
FIELD_TYPE2["Approval_Process"] = "approval_process";
|
|
49269
|
-
FIELD_TYPE2["MFG_ORDER"] = "mfg_order";
|
|
49270
|
-
FIELD_TYPE2["RECORD_NO"] = "record_no";
|
|
49271
|
-
FIELD_TYPE2["TRACE_DATE"] = "trace_date";
|
|
49272
|
-
FIELD_TYPE2["ROUTING_OPERATION"] = "routing_operation";
|
|
49273
|
-
FIELD_TYPE2["GOOD_QTY"] = "good_qty";
|
|
49274
|
-
FIELD_TYPE2["NOT_GOOD_QTY"] = "not_good_qty";
|
|
49275
|
-
FIELD_TYPE2["REPORT_START_TIME"] = "report_start_time";
|
|
49276
|
-
FIELD_TYPE2["REPORT_END_TIME"] = "report_end_time";
|
|
49277
|
-
FIELD_TYPE2["WORK_HOURS"] = "work_hours";
|
|
49278
|
-
FIELD_TYPE2["PRODUCTION_DATE"] = "production_date";
|
|
49279
|
-
FIELD_TYPE2["REPORTER"] = "reporter";
|
|
49280
|
-
FIELD_TYPE2["NOT_GOOD_REASON"] = "not_good_reason";
|
|
49281
|
-
FIELD_TYPE2["NOT_GOOD_GROUP"] = "not_good_group";
|
|
49282
|
-
FIELD_TYPE2["SCRAP_REASON"] = "scrap_reason";
|
|
49283
|
-
FIELD_TYPE2["SCRAP_GROUP"] = "scrap_group";
|
|
49284
|
-
FIELD_TYPE2["SCRAP_QTY"] = "scrap_qty";
|
|
49285
|
-
FIELD_TYPE2["SCRAP_MATERIAL"] = "scrap_material";
|
|
49286
|
-
FIELD_TYPE2["SCRAP_MATERIAL_NO"] = "scrap_material_no";
|
|
49287
|
-
FIELD_TYPE2["DESTRUCTIVE_TEST_QTY"] = "destructive_test_qty";
|
|
49288
|
-
FIELD_TYPE2["PRODUCT_CHECK_QTY"] = "product_check_qty";
|
|
49289
|
-
FIELD_TYPE2["MATERIAL_CHECK_QTY"] = "material_check_qty";
|
|
49290
|
-
FIELD_TYPE2["DEVICE_REF"] = "device_ref";
|
|
49291
|
-
FIELD_TYPE2["DEVICE_REF_MULTI"] = "device_ref_multi";
|
|
49292
|
-
return FIELD_TYPE2;
|
|
49293
|
-
})(FIELD_TYPE || {});
|
|
49294
49398
|
class RequestCache {
|
|
49295
49399
|
pendingMap = /* @__PURE__ */ new Map();
|
|
49296
49400
|
cacheMap = /* @__PURE__ */ new Map();
|
|
@@ -50702,32 +50806,6 @@ const DEFAULT_FROM_STATE = {
|
|
|
50702
50806
|
_MCTABLE: {}
|
|
50703
50807
|
// 物料消耗表业务数据
|
|
50704
50808
|
};
|
|
50705
|
-
const renderUtils = {
|
|
50706
|
-
getBoolValue: (value) => {
|
|
50707
|
-
if (isNil(value)) {
|
|
50708
|
-
return null;
|
|
50709
|
-
}
|
|
50710
|
-
if (value === "true" || value === "false") {
|
|
50711
|
-
return JSON.parse(value);
|
|
50712
|
-
}
|
|
50713
|
-
if (isNaN(parseInt(value))) {
|
|
50714
|
-
return Boolean(value);
|
|
50715
|
-
}
|
|
50716
|
-
return Boolean(parseInt(value));
|
|
50717
|
-
},
|
|
50718
|
-
formatValue: (fieldType, value) => {
|
|
50719
|
-
if ([FIELD_TYPE.INTEGER, FIELD_TYPE.LONG].includes(fieldType)) {
|
|
50720
|
-
const _val_ = parseInt(value);
|
|
50721
|
-
return isNaN(_val_) ? void 0 : _val_;
|
|
50722
|
-
} else if (fieldType === FIELD_TYPE.DECIMAL) {
|
|
50723
|
-
const _val_ = parseFloat(value);
|
|
50724
|
-
return isNaN(_val_) ? void 0 : _val_;
|
|
50725
|
-
} else if (fieldType === FIELD_TYPE.BOOLEAN) {
|
|
50726
|
-
return renderUtils.getBoolValue(value);
|
|
50727
|
-
}
|
|
50728
|
-
return value;
|
|
50729
|
-
}
|
|
50730
|
-
};
|
|
50731
50809
|
function getDefaultQueryIdsByFieldType(payload) {
|
|
50732
50810
|
const defaultQueryIds = {
|
|
50733
50811
|
[FIELD_TYPE.MATERIAL_NO]: payload.materialNumber,
|
|
@@ -50815,7 +50893,7 @@ const handleParameterMapping = (parameterMapping, paramsConfig, subTableInfo, fi
|
|
|
50815
50893
|
const processParamItem = (item) => {
|
|
50816
50894
|
if (!referenceMap.has(item.formKey)) return;
|
|
50817
50895
|
const value = referenceMap.get(item.formKey);
|
|
50818
|
-
const formattedValue =
|
|
50896
|
+
const formattedValue = toFormatValue(item.fieldType, value);
|
|
50819
50897
|
const target = item?.subModel ? (subMappedFields[item.subFieldKey] ??= {}, subMappedFields[item.subFieldKey]) : paramMap;
|
|
50820
50898
|
merge(target, { [item.field]: formattedValue });
|
|
50821
50899
|
};
|
|
@@ -50865,10 +50943,13 @@ const getFormDataItem = (onFieldMap, subTableInfo, result) => {
|
|
|
50865
50943
|
} else if (item.subModel === 1) {
|
|
50866
50944
|
const sInfo = subTableInfo.find((aa2) => aa2.field === item.subFieldKey) || {};
|
|
50867
50945
|
const fieldList = result.data.map(
|
|
50868
|
-
(data) => item.fields.reduce(
|
|
50869
|
-
prev
|
|
50870
|
-
|
|
50871
|
-
|
|
50946
|
+
(data) => item.fields.reduce(
|
|
50947
|
+
(prev, { isFieldModel, leftFieldKey, fieldLink, rightFieldKey }) => {
|
|
50948
|
+
prev[leftFieldKey] = isFieldModel ? data?.__FOREIGN__?.[fieldLink] : data[rightFieldKey];
|
|
50949
|
+
return prev;
|
|
50950
|
+
},
|
|
50951
|
+
{}
|
|
50952
|
+
)
|
|
50872
50953
|
);
|
|
50873
50954
|
let fieldList2d;
|
|
50874
50955
|
if (sInfo.subTable2d && sInfo.key === "dyn" || sInfo.checkTable2d && sInfo.key === "newfixed") {
|
|
@@ -51063,12 +51144,19 @@ const handleCustomDataSource = async (customDataSource, paramsConfig, subTableIn
|
|
|
51063
51144
|
const loadDataInitValues = async (runtimeJson, paramsConfig, subTableInfo, fieldPermission, instanceId) => {
|
|
51064
51145
|
const { document: document2 } = JSON.parse(runtimeJson || "{}");
|
|
51065
51146
|
if (!document2?.config?.dataInit) return {};
|
|
51066
|
-
const {
|
|
51067
|
-
|
|
51068
|
-
|
|
51069
|
-
|
|
51070
|
-
|
|
51071
|
-
|
|
51147
|
+
const { parameterMapping = [], customDataSource = [] } = document2.config.dataInit;
|
|
51148
|
+
const paramMap = handleParameterMapping(
|
|
51149
|
+
parameterMapping,
|
|
51150
|
+
paramsConfig,
|
|
51151
|
+
subTableInfo,
|
|
51152
|
+
fieldPermission
|
|
51153
|
+
);
|
|
51154
|
+
const dsMap = await handleCustomDataSource(
|
|
51155
|
+
customDataSource,
|
|
51156
|
+
paramsConfig,
|
|
51157
|
+
subTableInfo,
|
|
51158
|
+
instanceId
|
|
51159
|
+
);
|
|
51072
51160
|
return {
|
|
51073
51161
|
...mainData2WordData(paramMap),
|
|
51074
51162
|
...mainData2WordData(dsMap)
|
|
@@ -51228,7 +51316,10 @@ async function fetchRenderData(payload) {
|
|
|
51228
51316
|
function snapshotDocInfo(docInst) {
|
|
51229
51317
|
return {
|
|
51230
51318
|
pages: docInst?.pages ?? [],
|
|
51231
|
-
updateTick: docInst?.updateTick ?? 0
|
|
51319
|
+
updateTick: docInst?.updateTick ?? 0,
|
|
51320
|
+
mode: docInst?.mode ?? null,
|
|
51321
|
+
modeLabel: docInst?.modeLabel ?? "",
|
|
51322
|
+
btnRenderModeType: docInst?.btnRenderModeType ?? null
|
|
51232
51323
|
};
|
|
51233
51324
|
}
|
|
51234
51325
|
async function initializeDocumentEngine(props, payload, result) {
|
|
@@ -51283,7 +51374,6 @@ async function initializeDocumentEngine(props, payload, result) {
|
|
|
51283
51374
|
const docRuntimeMeta = {
|
|
51284
51375
|
...requestInfo,
|
|
51285
51376
|
handleInfo: {
|
|
51286
|
-
btnRenderModeType: result.btnModelType,
|
|
51287
51377
|
bpmnType: result.bpmnType,
|
|
51288
51378
|
bpmnFieldAuthMap: result.bpmnFieldAuthMap,
|
|
51289
51379
|
initDocModelJson: JSON.stringify(docModel.toXmlJson())
|
|
@@ -51292,6 +51382,7 @@ async function initializeDocumentEngine(props, payload, result) {
|
|
|
51292
51382
|
const doc = new Doc({
|
|
51293
51383
|
model: docModel,
|
|
51294
51384
|
mode: fillModeType,
|
|
51385
|
+
btnRenderModeType: result.btnModelType,
|
|
51295
51386
|
mainModelKey,
|
|
51296
51387
|
formType: requestInfo.formType || FormTypeConst.BASE,
|
|
51297
51388
|
preview: payload.isPreview,
|
|
@@ -54792,6 +54883,7 @@ const builtinComponents = {
|
|
|
54792
54883
|
[BuiltinComponentTypeConst.InlineImage]: _sfc_main$2K,
|
|
54793
54884
|
[BuiltinComponentTypeConst.Text]: _sfc_main$2J
|
|
54794
54885
|
};
|
|
54886
|
+
const OUTLINE_BORDER_INSET = 1;
|
|
54795
54887
|
const borderConfig = {
|
|
54796
54888
|
outer: {
|
|
54797
54889
|
color: "rgb(128, 128, 128)",
|
|
@@ -54899,7 +54991,6 @@ function createTableOutlineLayer(options) {
|
|
|
54899
54991
|
const minY = Math.min(...cells.map((c2) => c2.y));
|
|
54900
54992
|
const maxX = Math.max(...cells.map((c2) => c2.x + c2.width));
|
|
54901
54993
|
const maxY = Math.max(...cells.map((c2) => c2.y + c2.height));
|
|
54902
|
-
Math.min(...cells.map((c2) => c2.layoutX));
|
|
54903
54994
|
const minLY = Math.min(...cells.map((c2) => c2.layoutY));
|
|
54904
54995
|
const maxLX = Math.max(...cells.map((c2) => c2.layoutX + c2.width));
|
|
54905
54996
|
const maxLY = Math.max(...cells.map((c2) => c2.layoutY + c2.height));
|
|
@@ -54961,43 +55052,47 @@ function buildPosMap(layers, getRect, toDom) {
|
|
|
54961
55052
|
}
|
|
54962
55053
|
return res;
|
|
54963
55054
|
}
|
|
54964
|
-
function
|
|
54965
|
-
|
|
54966
|
-
|
|
55055
|
+
function getDataIndexLayersMap({
|
|
55056
|
+
type: type4,
|
|
55057
|
+
cells,
|
|
55058
|
+
isEdit,
|
|
55059
|
+
convertExtraProps
|
|
55060
|
+
}) {
|
|
55061
|
+
const getDataIndex = (cell) => {
|
|
55062
|
+
return type4 === "2d-table" && isEdit ? cell.subRenderer?.xDataIndex : cell.subRenderer?.dataIndex;
|
|
54967
55063
|
};
|
|
54968
|
-
const
|
|
54969
|
-
(cell) =>
|
|
55064
|
+
const _cells = cells.filter(
|
|
55065
|
+
(cell) => getDataIndex(cell) != null && cell?.subRenderer?.type === type4
|
|
54970
55066
|
);
|
|
54971
|
-
if (!
|
|
55067
|
+
if (!_cells.length) return {};
|
|
54972
55068
|
const grouped = groupBy(
|
|
54973
|
-
|
|
54974
|
-
(cell) => `${cell.subRenderer.id}_dataIndex${
|
|
54975
|
-
);
|
|
54976
|
-
return Object.fromEntries(
|
|
54977
|
-
Object.entries(grouped).map(([id, cells2]) => {
|
|
54978
|
-
const firstCell = cells2[0];
|
|
54979
|
-
const lastCell = cells2[cells2.length - 1];
|
|
54980
|
-
const isZeroGroup = getDIVal(firstCell) === 0;
|
|
54981
|
-
const bgLayer = createTableOutlineLayer({
|
|
54982
|
-
cells: mapCellsToOutlineCells(cells2),
|
|
54983
|
-
inset: opts.GROUP_BG_INSET
|
|
54984
|
-
});
|
|
54985
|
-
const borderLayer = isZeroGroup ? createTableOutlineLayer({
|
|
54986
|
-
cells: mapCellsToOutlineCells(cells2),
|
|
54987
|
-
inset: opts.BORDER_INSET
|
|
54988
|
-
}) : { hLines: [], vLines: [], backgroundRect: null, labelPos: void 0 };
|
|
54989
|
-
return [
|
|
54990
|
-
id,
|
|
54991
|
-
{
|
|
54992
|
-
...borderLayer,
|
|
54993
|
-
...extra(firstCell),
|
|
54994
|
-
showBorder: isZeroGroup,
|
|
54995
|
-
placeholderBjRect: bgLayer.backgroundRect,
|
|
54996
|
-
lastCell
|
|
54997
|
-
}
|
|
54998
|
-
];
|
|
54999
|
-
})
|
|
55069
|
+
_cells,
|
|
55070
|
+
(cell) => `${cell.subRenderer.id}_dataIndex${getDataIndex(cell)}`
|
|
55000
55071
|
);
|
|
55072
|
+
const layersMapEntries = Object.entries(grouped).map(([id, __cells]) => {
|
|
55073
|
+
const firstCell = __cells[0];
|
|
55074
|
+
const lastCell = __cells[__cells.length - 1];
|
|
55075
|
+
const isFirstDataGroup = getDataIndex(firstCell) === 0;
|
|
55076
|
+
const bgLayer = createTableOutlineLayer({
|
|
55077
|
+
cells: mapCellsToOutlineCells(__cells),
|
|
55078
|
+
inset: 4
|
|
55079
|
+
});
|
|
55080
|
+
const borderLayer = isFirstDataGroup ? createTableOutlineLayer({
|
|
55081
|
+
cells: mapCellsToOutlineCells(__cells),
|
|
55082
|
+
inset: OUTLINE_BORDER_INSET
|
|
55083
|
+
}) : { hLines: [], vLines: [], backgroundRect: null, labelPos: void 0 };
|
|
55084
|
+
return [
|
|
55085
|
+
id,
|
|
55086
|
+
{
|
|
55087
|
+
...borderLayer,
|
|
55088
|
+
...convertExtraProps(firstCell),
|
|
55089
|
+
showBorder: isFirstDataGroup,
|
|
55090
|
+
placeholderBjRect: bgLayer.backgroundRect,
|
|
55091
|
+
lastCell
|
|
55092
|
+
}
|
|
55093
|
+
];
|
|
55094
|
+
});
|
|
55095
|
+
return Object.fromEntries(layersMapEntries);
|
|
55001
55096
|
}
|
|
55002
55097
|
const baseCanvasAttrs = {
|
|
55003
55098
|
/** 不参与事件命中检测 */
|
|
@@ -55268,8 +55363,6 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
|
|
|
55268
55363
|
}
|
|
55269
55364
|
});
|
|
55270
55365
|
const PlaceholderLabel = /* @__PURE__ */ _export_sfc(_sfc_main$2D, [["__scopeId", "data-v-0efd8725"]]);
|
|
55271
|
-
const BORDER_INSET$1 = 1;
|
|
55272
|
-
const GROUP_BG_INSET$1 = 4;
|
|
55273
55366
|
const TAG_WIDTH = 56;
|
|
55274
55367
|
const TAG_HEIGHT = 22;
|
|
55275
55368
|
const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
@@ -55302,7 +55395,7 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55302
55395
|
});
|
|
55303
55396
|
const isActive = (id) => interCtx.panelData?.context.regionId === id;
|
|
55304
55397
|
const isHovered = (id, type4) => hoverTarget.value === type4 && targetId.value === id;
|
|
55305
|
-
const
|
|
55398
|
+
const subTableCells = computed(
|
|
55306
55399
|
() => props.rows.flatMap(
|
|
55307
55400
|
(row) => row.cells.filter((cell) => cell?.subRenderer?.id).map((cell) => ({
|
|
55308
55401
|
...cell,
|
|
@@ -55322,12 +55415,12 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55322
55415
|
};
|
|
55323
55416
|
});
|
|
55324
55417
|
const outlineLayers = computed(() => {
|
|
55325
|
-
const grouped = groupBy(
|
|
55418
|
+
const grouped = groupBy(subTableCells.value, (cell) => cell.subRenderer.id);
|
|
55326
55419
|
return Object.fromEntries(
|
|
55327
55420
|
Object.entries(grouped).map(([id, cells]) => {
|
|
55328
55421
|
const outline = createTableOutlineLayer({
|
|
55329
55422
|
cells: mapCellsToOutlineCells(cells),
|
|
55330
|
-
inset:
|
|
55423
|
+
inset: OUTLINE_BORDER_INSET
|
|
55331
55424
|
});
|
|
55332
55425
|
return [
|
|
55333
55426
|
id,
|
|
@@ -55340,89 +55433,77 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55340
55433
|
})
|
|
55341
55434
|
);
|
|
55342
55435
|
});
|
|
55343
|
-
const
|
|
55344
|
-
() =>
|
|
55345
|
-
"fixed-table",
|
|
55346
|
-
|
|
55347
|
-
|
|
55348
|
-
|
|
55349
|
-
GROUP_BG_INSET: GROUP_BG_INSET$1,
|
|
55350
|
-
isEdit: props.doc.mode === DocModeTypeConst.Edit
|
|
55351
|
-
},
|
|
55352
|
-
(cell) => ({
|
|
55436
|
+
const fixedTableDataGroupLayersMap = computed(
|
|
55437
|
+
() => getDataIndexLayersMap({
|
|
55438
|
+
type: "fixed-table",
|
|
55439
|
+
cells: subTableCells.value,
|
|
55440
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
55441
|
+
convertExtraProps: (cell) => ({
|
|
55353
55442
|
type: "data-group",
|
|
55354
55443
|
valuePath: cell.subRenderer.valuePath,
|
|
55355
55444
|
placeholder: `${cell.subRenderer.dataIndex}`
|
|
55356
55445
|
})
|
|
55357
|
-
)
|
|
55446
|
+
})
|
|
55358
55447
|
);
|
|
55359
|
-
const
|
|
55360
|
-
() =>
|
|
55361
|
-
"check-table",
|
|
55362
|
-
|
|
55363
|
-
|
|
55364
|
-
|
|
55365
|
-
GROUP_BG_INSET: GROUP_BG_INSET$1,
|
|
55366
|
-
isEdit: props.doc.mode === DocModeTypeConst.Edit
|
|
55367
|
-
},
|
|
55368
|
-
(cell) => ({
|
|
55448
|
+
const checkTableDataGroup2DLayersMap = computed(
|
|
55449
|
+
() => getDataIndexLayersMap({
|
|
55450
|
+
type: "check-table",
|
|
55451
|
+
cells: subTableCells.value,
|
|
55452
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
55453
|
+
convertExtraProps: (cell) => ({
|
|
55369
55454
|
type: "data-group-2d",
|
|
55370
55455
|
valuePath: cell.subRenderer.valuePath,
|
|
55371
55456
|
placeholder: `${cell.subRenderer.dataIndex}`
|
|
55372
55457
|
})
|
|
55373
|
-
)
|
|
55458
|
+
})
|
|
55374
55459
|
);
|
|
55375
|
-
const
|
|
55376
|
-
() =>
|
|
55377
|
-
"2d-table",
|
|
55378
|
-
|
|
55379
|
-
|
|
55380
|
-
|
|
55381
|
-
GROUP_BG_INSET: GROUP_BG_INSET$1,
|
|
55382
|
-
isEdit: props.doc.mode === DocModeTypeConst.Edit
|
|
55383
|
-
},
|
|
55384
|
-
(cell) => ({
|
|
55460
|
+
const _2DTableDataGroup2DLayersMap = computed(
|
|
55461
|
+
() => getDataIndexLayersMap({
|
|
55462
|
+
type: "2d-table",
|
|
55463
|
+
cells: subTableCells.value,
|
|
55464
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
55465
|
+
convertExtraProps: (cell) => ({
|
|
55385
55466
|
type: "data-group-2d",
|
|
55386
55467
|
valuePath: cell.subRenderer.valuePath,
|
|
55387
55468
|
placeholder: `${cell.subRenderer.xDataIndex}`
|
|
55388
55469
|
})
|
|
55389
|
-
)
|
|
55470
|
+
})
|
|
55390
55471
|
);
|
|
55391
55472
|
const tableTypePos = computed(
|
|
55392
55473
|
() => buildPosMap(
|
|
55393
55474
|
outlineLayers.value,
|
|
55394
55475
|
(l2) => l2.labelPos,
|
|
55395
|
-
(p) => labelPosToDom(p
|
|
55476
|
+
(p) => labelPosToDom(p)
|
|
55396
55477
|
)
|
|
55397
55478
|
);
|
|
55398
55479
|
const dataGroupTypePos = computed(
|
|
55399
55480
|
() => buildPosMap(
|
|
55400
55481
|
{
|
|
55401
|
-
...
|
|
55402
|
-
...
|
|
55403
|
-
...
|
|
55482
|
+
...fixedTableDataGroupLayersMap.value,
|
|
55483
|
+
...checkTableDataGroup2DLayersMap.value,
|
|
55484
|
+
..._2DTableDataGroup2DLayersMap.value
|
|
55404
55485
|
},
|
|
55405
55486
|
(l2) => l2.labelPos,
|
|
55406
|
-
(p) => labelPosToDom(p
|
|
55487
|
+
(p) => labelPosToDom(p)
|
|
55407
55488
|
)
|
|
55408
55489
|
);
|
|
55409
55490
|
const dataGroupPlaceholderPos = computed(
|
|
55410
55491
|
() => buildPosMap(
|
|
55411
55492
|
{
|
|
55412
|
-
...
|
|
55413
|
-
...
|
|
55414
|
-
...
|
|
55493
|
+
...fixedTableDataGroupLayersMap.value,
|
|
55494
|
+
...checkTableDataGroup2DLayersMap.value,
|
|
55495
|
+
..._2DTableDataGroup2DLayersMap.value
|
|
55415
55496
|
},
|
|
55416
55497
|
(l2) => l2.lastCell,
|
|
55417
55498
|
(p) => centerRectToDom(p)
|
|
55418
55499
|
)
|
|
55419
55500
|
);
|
|
55420
|
-
function labelPosToDom(labelPos
|
|
55501
|
+
function labelPosToDom(labelPos) {
|
|
55421
55502
|
const base = pageBaseOffset.value;
|
|
55422
55503
|
if (!base) return null;
|
|
55423
55504
|
return {
|
|
55424
55505
|
left: `${labelPos.x + base.leftBase - TAG_WIDTH}px`,
|
|
55425
|
-
top: `${labelPos.y1 + base.topBase +
|
|
55506
|
+
top: `${labelPos.y1 + base.topBase + OUTLINE_BORDER_INSET}px`,
|
|
55426
55507
|
width: `${TAG_WIDTH}px`,
|
|
55427
55508
|
height: `${TAG_HEIGHT}px`
|
|
55428
55509
|
};
|
|
@@ -55517,9 +55598,9 @@ const _sfc_main$2C = /* @__PURE__ */ defineComponent({
|
|
|
55517
55598
|
}, 1024);
|
|
55518
55599
|
}), 128)),
|
|
55519
55600
|
(openBlock(true), createElementBlock(Fragment, null, renderList([
|
|
55520
|
-
|
|
55521
|
-
|
|
55522
|
-
|
|
55601
|
+
fixedTableDataGroupLayersMap.value,
|
|
55602
|
+
checkTableDataGroup2DLayersMap.value,
|
|
55603
|
+
_2DTableDataGroup2DLayersMap.value
|
|
55523
55604
|
], (layers, layersIndex) => {
|
|
55524
55605
|
return openBlock(), createElementBlock(Fragment, { key: layersIndex }, [
|
|
55525
55606
|
(openBlock(true), createElementBlock(Fragment, null, renderList(layers, (layer, id) => {
|
|
@@ -56378,8 +56459,6 @@ const _sfc_main$2x = /* @__PURE__ */ defineComponent({
|
|
|
56378
56459
|
}
|
|
56379
56460
|
});
|
|
56380
56461
|
const SubTableAction = /* @__PURE__ */ _export_sfc(_sfc_main$2x, [["__scopeId", "data-v-adc8fb9a"]]);
|
|
56381
|
-
const BORDER_INSET = 1;
|
|
56382
|
-
const GROUP_BG_INSET = 4;
|
|
56383
56462
|
const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
56384
56463
|
__name: "index",
|
|
56385
56464
|
props: {
|
|
@@ -56420,22 +56499,18 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
|
56420
56499
|
};
|
|
56421
56500
|
});
|
|
56422
56501
|
const buildDataIndexLayersWith = (type4) => {
|
|
56423
|
-
return
|
|
56424
|
-
type4,
|
|
56425
|
-
cellsWithId.value,
|
|
56426
|
-
|
|
56427
|
-
|
|
56428
|
-
GROUP_BG_INSET,
|
|
56429
|
-
isEdit: props.doc.mode === DocModeTypeConst.Edit
|
|
56430
|
-
},
|
|
56431
|
-
() => ({
|
|
56502
|
+
return getDataIndexLayersMap({
|
|
56503
|
+
type: type4,
|
|
56504
|
+
cells: cellsWithId.value,
|
|
56505
|
+
isEdit: props.doc.mode === DocModeTypeConst.Edit,
|
|
56506
|
+
convertExtraProps: () => ({
|
|
56432
56507
|
type: type4,
|
|
56433
56508
|
placeholder: "",
|
|
56434
56509
|
valuePath: ""
|
|
56435
56510
|
})
|
|
56436
|
-
);
|
|
56511
|
+
});
|
|
56437
56512
|
};
|
|
56438
|
-
const
|
|
56513
|
+
const subTableOutlineLayersMap = computed(() => {
|
|
56439
56514
|
return {
|
|
56440
56515
|
...buildDataIndexLayersWith("dynamic-table"),
|
|
56441
56516
|
...buildDataIndexLayersWith("2d-table")
|
|
@@ -56444,13 +56519,13 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
|
56444
56519
|
const subTableActionPos = computed(() => {
|
|
56445
56520
|
const res = {};
|
|
56446
56521
|
const ACTION_WIDTH = 24;
|
|
56447
|
-
for (const [id, layer] of Object.entries(
|
|
56522
|
+
for (const [id, layer] of Object.entries(subTableOutlineLayersMap.value)) {
|
|
56448
56523
|
const lastCell = layer.lastCell;
|
|
56449
56524
|
if (!lastCell) continue;
|
|
56450
56525
|
const base = pageBaseOffset.value;
|
|
56451
56526
|
if (base) {
|
|
56452
56527
|
res[id] = {
|
|
56453
|
-
left: `${lastCell.layoutX + base.leftBase + lastCell.width +
|
|
56528
|
+
left: `${lastCell.layoutX + base.leftBase + lastCell.width + OUTLINE_BORDER_INSET}px`,
|
|
56454
56529
|
top: `${lastCell.layoutY + base.topBase + lastCell.height - ACTION_WIDTH}px`
|
|
56455
56530
|
};
|
|
56456
56531
|
}
|
|
@@ -56459,7 +56534,7 @@ const _sfc_main$2w = /* @__PURE__ */ defineComponent({
|
|
|
56459
56534
|
});
|
|
56460
56535
|
return (_ctx, _cache) => {
|
|
56461
56536
|
const _component_v_group = resolveComponent("v-group");
|
|
56462
|
-
return openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
56537
|
+
return openBlock(true), createElementBlock(Fragment, null, renderList(subTableOutlineLayersMap.value, (subLayer, subId) => {
|
|
56463
56538
|
return openBlock(), createBlock(_component_v_group, {
|
|
56464
56539
|
key: subId,
|
|
56465
56540
|
config: baseLayerProps
|
|
@@ -57020,12 +57095,12 @@ function useDocController(factory2, ops) {
|
|
|
57020
57095
|
return doc.pages.find((p) => p.section.refId === id) ?? null;
|
|
57021
57096
|
}
|
|
57022
57097
|
},
|
|
57023
|
-
// 响应式状态
|
|
57024
57098
|
docRuntimeMeta: doc.docRuntimeMeta,
|
|
57025
|
-
mode: computed(() =>
|
|
57026
|
-
modeLabel: computed(() =>
|
|
57027
|
-
|
|
57028
|
-
|
|
57099
|
+
mode: computed(() => factory2.docInfo.value.mode),
|
|
57100
|
+
modeLabel: computed(() => factory2.docInfo.value.modeLabel),
|
|
57101
|
+
btnRenderModeType: computed(() => factory2.docInfo.value.btnRenderModeType),
|
|
57102
|
+
updateTick: computed(() => factory2.docInfo.value.updateTick),
|
|
57103
|
+
pages: computed(() => factory2.docInfo.value.pages),
|
|
57029
57104
|
// Doc 内置命令系统
|
|
57030
57105
|
execute(command, payload) {
|
|
57031
57106
|
doc.execute(command, payload);
|
|
@@ -57036,8 +57111,8 @@ function useDocController(factory2, ops) {
|
|
|
57036
57111
|
redo() {
|
|
57037
57112
|
doc.redo();
|
|
57038
57113
|
},
|
|
57039
|
-
setMode(mode) {
|
|
57040
|
-
doc.setMode(mode);
|
|
57114
|
+
setMode(mode, updateButton = false) {
|
|
57115
|
+
doc.setMode(mode, updateButton);
|
|
57041
57116
|
},
|
|
57042
57117
|
setModel(model) {
|
|
57043
57118
|
doc.setModel(model);
|
|
@@ -58606,7 +58681,7 @@ const _sfc_main$2l = /* @__PURE__ */ defineComponent({
|
|
|
58606
58681
|
};
|
|
58607
58682
|
}
|
|
58608
58683
|
});
|
|
58609
|
-
const SetTableHeaderFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$2l, [["__scopeId", "data-v-
|
|
58684
|
+
const SetTableHeaderFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$2l, [["__scopeId", "data-v-d5785019"]]);
|
|
58610
58685
|
const _hoisted_1$1F = { class: "items-container" };
|
|
58611
58686
|
const _hoisted_2$14 = { class: "ribbon-tab-item" };
|
|
58612
58687
|
const _hoisted_3$P = { class: "ribbon-tab-item" };
|
|
@@ -59019,7 +59094,7 @@ const _sfc_main$2k = /* @__PURE__ */ defineComponent({
|
|
|
59019
59094
|
};
|
|
59020
59095
|
}
|
|
59021
59096
|
});
|
|
59022
|
-
const WordTable = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["__scopeId", "data-v-
|
|
59097
|
+
const WordTable = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["__scopeId", "data-v-880a7ed3"]]);
|
|
59023
59098
|
const _hoisted_1$1E = { class: "ribbon" };
|
|
59024
59099
|
const _hoisted_2$13 = { class: "ribbon-content-wrapper" };
|
|
59025
59100
|
const _sfc_main$2j = /* @__PURE__ */ defineComponent({
|
|
@@ -60414,7 +60489,7 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
60414
60489
|
};
|
|
60415
60490
|
}
|
|
60416
60491
|
});
|
|
60417
|
-
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["__scopeId", "data-v-
|
|
60492
|
+
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["__scopeId", "data-v-8bfe3f32"]]);
|
|
60418
60493
|
const OFFSET = 4;
|
|
60419
60494
|
const _sfc_main$27 = /* @__PURE__ */ defineComponent({
|
|
60420
60495
|
__name: "index",
|
|
@@ -66792,7 +66867,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
66792
66867
|
return (_ctx, _cache) => {
|
|
66793
66868
|
return openBlock(), createElementBlock("div", _hoisted_1$1h, [
|
|
66794
66869
|
createVNode(unref(GctCollapse), {
|
|
66795
|
-
title: "
|
|
66870
|
+
title: "数据分组配置",
|
|
66796
66871
|
class: "panel-collapse is-first"
|
|
66797
66872
|
}, {
|
|
66798
66873
|
default: withCtx(() => [
|
|
@@ -66849,7 +66924,7 @@ const _sfc_main$1y = /* @__PURE__ */ defineComponent({
|
|
|
66849
66924
|
};
|
|
66850
66925
|
}
|
|
66851
66926
|
});
|
|
66852
|
-
const DataGroupPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["__scopeId", "data-v-
|
|
66927
|
+
const DataGroupPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1y, [["__scopeId", "data-v-4572267c"]]);
|
|
66853
66928
|
const schema$7 = {
|
|
66854
66929
|
key: "data-group.basic",
|
|
66855
66930
|
title: [
|