@gct-paas/word 0.1.63-beta.7 → 0.1.63-beta.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/core/data/enrichers/hyperlink-enricher.d.ts +5 -0
- package/dist/index.es.js +105 -90
- package/dist/runtime/renderer/dialogs/field-hyperlink/open-field-hyperlink.d.ts +24 -0
- package/dist/sdk/doc-runtime/factories/runtime-json-builder.d.ts +1 -9
- package/dist/suites/edhr/panel-schema/paper/modules/page-size-config/index.d.ts +12 -0
- package/dist/suites/edhr/panel-schema/paper/modules/page-size-config/page-size-config.vue.d.ts +6 -0
- package/dist/word.css +3 -3
- package/package.json +1 -1
- package/dist/suites/edhr/panel-schema/paper/modules/page-size-config.vue.d.ts +0 -2
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Doc } from '../../view/Doc';
|
|
2
2
|
import { WidgetMeta } from '../../widget';
|
|
3
3
|
import { DataEnricherRegistration } from '../types';
|
|
4
|
+
/**
|
|
5
|
+
* 用批次号调用 biz_judge_jump,判断是否可超链接。
|
|
6
|
+
* 不可链时返回 null;可链时返回非空字符串(供弹框/跳转使用)。
|
|
7
|
+
*/
|
|
8
|
+
export declare function resolveHyperlinkHrefByMaterialNo(materialNo: unknown): Promise<string | null>;
|
|
4
9
|
type HyperlinkEnricherOptions = Omit<DataEnricherRegistration, 'enrich'> & {
|
|
5
10
|
doc: Doc;
|
|
6
11
|
widgetMeta: WidgetMeta;
|
package/dist/index.es.js
CHANGED
|
@@ -84440,8 +84440,8 @@ function createCompanionEnricher(reg, config) {
|
|
|
84440
84440
|
}
|
|
84441
84441
|
};
|
|
84442
84442
|
}
|
|
84443
|
-
async function
|
|
84444
|
-
if (
|
|
84443
|
+
async function resolveHyperlinkHrefByMaterialNo(materialNo) {
|
|
84444
|
+
if (!isPresent(materialNo)) return null;
|
|
84445
84445
|
try {
|
|
84446
84446
|
const bool = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
|
|
84447
84447
|
{
|
|
@@ -84449,10 +84449,10 @@ async function resolveHyperlinkHref(_path, value) {
|
|
|
84449
84449
|
modelKey: "gct_edhr_instance",
|
|
84450
84450
|
modelCategory: "entity"
|
|
84451
84451
|
},
|
|
84452
|
-
{ materialNo
|
|
84452
|
+
{ materialNo },
|
|
84453
84453
|
{}
|
|
84454
84454
|
);
|
|
84455
|
-
return bool ? String(
|
|
84455
|
+
return bool ? String(materialNo) : null;
|
|
84456
84456
|
} catch {
|
|
84457
84457
|
return null;
|
|
84458
84458
|
}
|
|
@@ -84463,7 +84463,7 @@ function createHyperlinkEnricher(reg) {
|
|
|
84463
84463
|
defaultIdPrefix: "hyperlink:",
|
|
84464
84464
|
getCompanionPath: getHrefPath,
|
|
84465
84465
|
buildCacheKey: (path, value) => ({ path, value }),
|
|
84466
|
-
resolveCompanion: (
|
|
84466
|
+
resolveCompanion: (_path, value) => resolveHyperlinkHrefByMaterialNo(value)
|
|
84467
84467
|
});
|
|
84468
84468
|
}
|
|
84469
84469
|
function resolveProductId(doc, path) {
|
|
@@ -89396,24 +89396,6 @@ const profile$1 = {
|
|
|
89396
89396
|
}
|
|
89397
89397
|
};
|
|
89398
89398
|
const PRODUCTION_CONTAINER_FIELD_KEY = "production_container_id_";
|
|
89399
|
-
async function resolveHrefByLabel(path, doc) {
|
|
89400
|
-
const materialNo = doc.dataManager.get(getLabelPath(path));
|
|
89401
|
-
if (!isPresent(materialNo)) return null;
|
|
89402
|
-
try {
|
|
89403
|
-
const bool = await api.apaas.modelComprehensive.postBizServiceModelCategoryModelKeyBsKey(
|
|
89404
|
-
{
|
|
89405
|
-
bsKey: "biz_judge_jump",
|
|
89406
|
-
modelKey: "gct_edhr_instance",
|
|
89407
|
-
modelCategory: "entity"
|
|
89408
|
-
},
|
|
89409
|
-
{ materialNo },
|
|
89410
|
-
{}
|
|
89411
|
-
);
|
|
89412
|
-
return bool ? String(materialNo) : null;
|
|
89413
|
-
} catch {
|
|
89414
|
-
return null;
|
|
89415
|
-
}
|
|
89416
|
-
}
|
|
89417
89399
|
function createProductionContainerHyperlinkEnricher(doc, tableType) {
|
|
89418
89400
|
const subFieldKeys = new Set(
|
|
89419
89401
|
TableRuntimeContext.collectAll(doc).filter((ctx) => ctx.profile.type === tableType).map((ctx) => ctx.subFieldKey)
|
|
@@ -89436,9 +89418,11 @@ function createProductionContainerHyperlinkEnricher(doc, tableType) {
|
|
|
89436
89418
|
buildCacheKey: (path, value, currentDoc) => ({
|
|
89437
89419
|
path,
|
|
89438
89420
|
value,
|
|
89421
|
+
// 生产批次号存的是 id,biz_judge_jump 需用展示批次号(_lb_)
|
|
89422
|
+
// 注意:不要用 dataManager.getLabel(无 _lb_ 时会回落到 id)
|
|
89439
89423
|
materialNo: currentDoc.dataManager.get(getLabelPath(path))
|
|
89440
89424
|
}),
|
|
89441
|
-
resolveCompanion: (path, _value, currentDoc) =>
|
|
89425
|
+
resolveCompanion: (path, _value, currentDoc) => resolveHyperlinkHrefByMaterialNo(currentDoc.dataManager.get(getLabelPath(path)))
|
|
89442
89426
|
}
|
|
89443
89427
|
);
|
|
89444
89428
|
}
|
|
@@ -91760,6 +91744,7 @@ class WsecPr extends ModelNode {
|
|
|
91760
91744
|
* 从原始 XML JSON 转换为 WsecPr 实例
|
|
91761
91745
|
*/
|
|
91762
91746
|
static fromXmlJson(json) {
|
|
91747
|
+
const { paperSize } = json;
|
|
91763
91748
|
const pgSzRaw = pickElement(json, "w:pgSz");
|
|
91764
91749
|
const pageSize = pgSzRaw ? {
|
|
91765
91750
|
width: pgSzRaw["@attrs"]?.["w:w"] ? parseInt(pgSzRaw["@attrs"]["w:w"]) : void 0,
|
|
@@ -91788,6 +91773,7 @@ class WsecPr extends ModelNode {
|
|
|
91788
91773
|
const titlePg = pickElement(json, "w:titlePg");
|
|
91789
91774
|
return new WsecPr({
|
|
91790
91775
|
attrs: json["@attrs"],
|
|
91776
|
+
paperSize,
|
|
91791
91777
|
pageSize,
|
|
91792
91778
|
margins,
|
|
91793
91779
|
columns: columns2,
|
|
@@ -102466,9 +102452,9 @@ class Section {
|
|
|
102466
102452
|
return { ...res, paperSize };
|
|
102467
102453
|
}
|
|
102468
102454
|
getPaperSize() {
|
|
102469
|
-
const
|
|
102470
|
-
const mmWidth = UnitConverter.twipToMm(
|
|
102471
|
-
const mmHeight = UnitConverter.twipToMm(
|
|
102455
|
+
const twipPageSize = this.wsecPr?.pageSize;
|
|
102456
|
+
const mmWidth = UnitConverter.twipToMm(twipPageSize.width);
|
|
102457
|
+
const mmHeight = UnitConverter.twipToMm(twipPageSize.height);
|
|
102472
102458
|
const w2 = Math.min(mmWidth, mmHeight);
|
|
102473
102459
|
const h2 = Math.max(mmWidth, mmHeight);
|
|
102474
102460
|
const tolerance = 3;
|
|
@@ -108016,33 +108002,16 @@ const DefaultDocxJson = {
|
|
|
108016
108002
|
fontTable,
|
|
108017
108003
|
footers
|
|
108018
108004
|
};
|
|
108019
|
-
const
|
|
108020
|
-
const
|
|
108021
|
-
|
|
108022
|
-
|
|
108023
|
-
|
|
108024
|
-
|
|
108025
|
-
|
|
108026
|
-
|
|
108027
|
-
|
|
108028
|
-
|
|
108029
|
-
width = 8391;
|
|
108030
|
-
height = 11906;
|
|
108031
|
-
break;
|
|
108032
|
-
case PaperSizeConst.CUSTOM:
|
|
108033
|
-
width = Number(UnitConverter.mmToTwip(options.width));
|
|
108034
|
-
height = Number(UnitConverter.mmToTwip(options.height));
|
|
108035
|
-
break;
|
|
108036
|
-
default:
|
|
108037
|
-
width = 11906;
|
|
108038
|
-
height = 16838;
|
|
108039
|
-
break;
|
|
108040
|
-
}
|
|
108041
|
-
if (direction === "landscape") {
|
|
108042
|
-
[width, height] = [height, width];
|
|
108043
|
-
}
|
|
108044
|
-
pgSz["@attrs"]["w:w"] = String(width);
|
|
108045
|
-
pgSz["@attrs"]["w:h"] = String(height);
|
|
108005
|
+
const getDirectedSize = (direction, mmWidth, mmHeight) => {
|
|
108006
|
+
const [short, long] = [mmWidth, mmHeight].sort((a, b2) => a - b2);
|
|
108007
|
+
const isLandscape = direction === "landscape";
|
|
108008
|
+
const width = isLandscape ? long : short;
|
|
108009
|
+
const height = isLandscape ? short : long;
|
|
108010
|
+
return { width, height };
|
|
108011
|
+
};
|
|
108012
|
+
const updatePgSzElInfo = (pgSz, mmWidth, mmHeight) => {
|
|
108013
|
+
pgSz["@attrs"]["w:w"] = String(UnitConverter.mmToTwip(mmWidth));
|
|
108014
|
+
pgSz["@attrs"]["w:h"] = String(UnitConverter.mmToTwip(mmHeight));
|
|
108046
108015
|
};
|
|
108047
108016
|
class RuntimeJsonBuilder {
|
|
108048
108017
|
json;
|
|
@@ -108065,10 +108034,11 @@ class RuntimeJsonBuilder {
|
|
|
108065
108034
|
/**
|
|
108066
108035
|
* 页面设置
|
|
108067
108036
|
*/
|
|
108068
|
-
setPageSize(
|
|
108037
|
+
setPageSize(mmWidth, mmHeight) {
|
|
108069
108038
|
const pgSz = this.findNode(this.json.document, "w:pgSz");
|
|
108070
|
-
if (
|
|
108071
|
-
|
|
108039
|
+
if (pgSz) {
|
|
108040
|
+
updatePgSzElInfo(pgSz, mmWidth, mmHeight);
|
|
108041
|
+
}
|
|
108072
108042
|
return this;
|
|
108073
108043
|
}
|
|
108074
108044
|
/**
|
|
@@ -109519,14 +109489,13 @@ const syncMaterialConsumeTableBomInfo = async (templateId, docModel) => {
|
|
|
109519
109489
|
};
|
|
109520
109490
|
const initMaterialConsumeTableConfig = (doc, subConfig, tmplBomC) => {
|
|
109521
109491
|
if (!tmplBomC?.formInstBom?.formTmplBomList) return;
|
|
109492
|
+
const useBomMode = tmplBomC.defaultMCPattern === MaterialConsumptionPatternEnum.BOM;
|
|
109522
109493
|
tmplBomC.formInstBom.formTmplBomList.forEach(({
|
|
109523
|
-
material_consumption_pattern_,
|
|
109524
109494
|
personal_bom_enabled_,
|
|
109525
109495
|
entries_,
|
|
109526
109496
|
table_key_
|
|
109527
109497
|
}) => {
|
|
109528
|
-
|
|
109529
|
-
if (isBomMode) {
|
|
109498
|
+
if (useBomMode) {
|
|
109530
109499
|
const entries = personal_bom_enabled_ ? entries_ : tmplBomC.bomEntries;
|
|
109531
109500
|
const includedIds = [];
|
|
109532
109501
|
(entries || []).forEach((e) => {
|
|
@@ -109686,29 +109655,31 @@ class SingleTemplateStrategy extends DocRequestStrategy {
|
|
|
109686
109655
|
console.warn(`Document template ${id} not found`);
|
|
109687
109656
|
return null;
|
|
109688
109657
|
}
|
|
109689
|
-
const {
|
|
109658
|
+
const {
|
|
109659
|
+
baseId,
|
|
109660
|
+
id: tmpId,
|
|
109661
|
+
paperSize,
|
|
109662
|
+
direction,
|
|
109663
|
+
width: w2,
|
|
109664
|
+
height: h2
|
|
109665
|
+
} = requestInfo;
|
|
109666
|
+
const { width, height } = getDirectedSize(direction, w2, h2);
|
|
109667
|
+
requestInfo.width = width;
|
|
109668
|
+
requestInfo.height = height;
|
|
109690
109669
|
if (!requestInfo.runtimeJson) {
|
|
109691
|
-
const json = new RuntimeJsonBuilder(DefaultDocxJson).setPageSize(
|
|
109692
|
-
width: requestInfo.width,
|
|
109693
|
-
height: requestInfo.height,
|
|
109694
|
-
direction: requestInfo.direction
|
|
109695
|
-
}).build();
|
|
109670
|
+
const json = new RuntimeJsonBuilder(DefaultDocxJson).setPageSize(width, height).build();
|
|
109696
109671
|
requestInfo.runtimeJson = JSON.stringify(json);
|
|
109697
109672
|
} else {
|
|
109698
109673
|
const jsonObj = JSON.parse(requestInfo.runtimeJson);
|
|
109699
|
-
const
|
|
109700
|
-
if (
|
|
109701
|
-
|
|
109702
|
-
|
|
109703
|
-
|
|
109704
|
-
|
|
109705
|
-
|
|
109706
|
-
|
|
109707
|
-
direction: requestInfo.direction
|
|
109708
|
-
}
|
|
109709
|
-
);
|
|
109674
|
+
const wSec = jsonObj.document.elements[0]?.elements?.find((el) => el.name === "w:sectPr");
|
|
109675
|
+
if (wSec) {
|
|
109676
|
+
wSec.paperSize = paperSize;
|
|
109677
|
+
const pgSzEl = wSec.elements?.find((el) => el.name === "w:pgSz");
|
|
109678
|
+
if (pgSzEl) {
|
|
109679
|
+
updatePgSzElInfo(pgSzEl, width, height);
|
|
109680
|
+
}
|
|
109681
|
+
requestInfo.runtimeJson = JSON.stringify(jsonObj);
|
|
109710
109682
|
}
|
|
109711
|
-
requestInfo.runtimeJson = JSON.stringify(jsonObj);
|
|
109712
109683
|
}
|
|
109713
109684
|
return {
|
|
109714
109685
|
id,
|
|
@@ -114107,6 +114078,43 @@ async function openESopViewModal(doc, widgetMeta, runtimeValuePath) {
|
|
|
114107
114078
|
if (!options) return;
|
|
114108
114079
|
await triggerUtil.handle("OPEN_E_SOP_VIEW_MODAL", options);
|
|
114109
114080
|
}
|
|
114081
|
+
function resolveFieldKey(widgetMeta, runtimeValuePath) {
|
|
114082
|
+
const sub = parseSubtableFieldPath(runtimeValuePath);
|
|
114083
|
+
if (sub?.fieldKey) return sub.fieldKey;
|
|
114084
|
+
const fromPath = parseValuePath(runtimeValuePath).fieldKey;
|
|
114085
|
+
if (fromPath) return fromPath;
|
|
114086
|
+
return getLastSegment(widgetMeta.field?.fieldLink) || "";
|
|
114087
|
+
}
|
|
114088
|
+
function resolveOpenFieldHyperlinkModalOptions(doc, widgetMeta, runtimeValuePath) {
|
|
114089
|
+
const raw = doc.dataManager.getLabel(runtimeValuePath);
|
|
114090
|
+
const sub = parseSubtableFieldPath(runtimeValuePath);
|
|
114091
|
+
const subFieldKey = sub?.subFieldKey || widgetMeta.field?.subFieldKey;
|
|
114092
|
+
const tableType = subFieldKey ? TableRuntimeContext.find(doc, subFieldKey)?.profile.type : void 0;
|
|
114093
|
+
console.log("TJ::", {
|
|
114094
|
+
materialNo: getValue$1(raw, false),
|
|
114095
|
+
fieldType: widgetMeta.field?.fieldType,
|
|
114096
|
+
href: doc.dataManager.getHref(runtimeValuePath) ?? void 0,
|
|
114097
|
+
fieldKey: resolveFieldKey(widgetMeta, runtimeValuePath) || void 0,
|
|
114098
|
+
tableType,
|
|
114099
|
+
subFieldKey: subFieldKey || void 0,
|
|
114100
|
+
rowIndex: sub?.rowIndex,
|
|
114101
|
+
valuePath: runtimeValuePath
|
|
114102
|
+
});
|
|
114103
|
+
return {
|
|
114104
|
+
materialNo: getValue$1(raw, false),
|
|
114105
|
+
fieldType: widgetMeta.field?.fieldType,
|
|
114106
|
+
href: doc.dataManager.getHref(runtimeValuePath) ?? void 0,
|
|
114107
|
+
fieldKey: resolveFieldKey(widgetMeta, runtimeValuePath) || void 0,
|
|
114108
|
+
tableType,
|
|
114109
|
+
subFieldKey: subFieldKey || void 0,
|
|
114110
|
+
rowIndex: sub?.rowIndex,
|
|
114111
|
+
valuePath: runtimeValuePath
|
|
114112
|
+
};
|
|
114113
|
+
}
|
|
114114
|
+
async function openFieldHyperlinkModal(doc, widgetMeta, runtimeValuePath) {
|
|
114115
|
+
const options = resolveOpenFieldHyperlinkModalOptions(doc, widgetMeta, runtimeValuePath);
|
|
114116
|
+
await triggerUtil.handle("OPEN_FIELD_HYPERLINK_MODAL", options);
|
|
114117
|
+
}
|
|
114110
114118
|
const _sfc_main$38 = /* @__PURE__ */ defineComponent({
|
|
114111
114119
|
__name: "index",
|
|
114112
114120
|
props: {
|
|
@@ -114245,11 +114253,7 @@ const _sfc_main$38 = /* @__PURE__ */ defineComponent({
|
|
|
114245
114253
|
void openESopViewModal(props.doc, w2.widgetMeta, runtimeValuePath);
|
|
114246
114254
|
return;
|
|
114247
114255
|
}
|
|
114248
|
-
|
|
114249
|
-
void triggerUtil.handle("OPEN_FIELD_HYPERLINK_MODAL", {
|
|
114250
|
-
materialNo: getValue$1(raw, false),
|
|
114251
|
-
fieldType: w2.widgetMeta?.field?.fieldType
|
|
114252
|
-
});
|
|
114256
|
+
void openFieldHyperlinkModal(props.doc, w2.widgetMeta, runtimeValuePath);
|
|
114253
114257
|
return;
|
|
114254
114258
|
}
|
|
114255
114259
|
const isShowMark = interCtx.annotationIds && interCtx.annotationIds.length !== 0 && interCtx.annotationIds.includes(runtimeValuePath);
|
|
@@ -124047,7 +124051,7 @@ const manifest$j = {
|
|
|
124047
124051
|
...commonDefaultProps
|
|
124048
124052
|
},
|
|
124049
124053
|
computed: {
|
|
124050
|
-
onValueChangeRule:
|
|
124054
|
+
onValueChangeRule: [...hyperlinkAndIdOnValueChangeRules]
|
|
124051
124055
|
}
|
|
124052
124056
|
};
|
|
124053
124057
|
const __vite_glob_0_53 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -127415,9 +127419,13 @@ const _hoisted_1$1w = {
|
|
|
127415
127419
|
};
|
|
127416
127420
|
const _sfc_main$1U = /* @__PURE__ */ defineComponent({
|
|
127417
127421
|
__name: "page-size-config",
|
|
127422
|
+
props: {
|
|
127423
|
+
orientation: {}
|
|
127424
|
+
},
|
|
127418
127425
|
setup(__props) {
|
|
127419
127426
|
const { docInst } = useDocPubApiContext();
|
|
127420
127427
|
const { active, widget } = useActivePanel();
|
|
127428
|
+
const props = __props;
|
|
127421
127429
|
const isCustom = (s) => s === PaperSizeConst.CUSTOM;
|
|
127422
127430
|
const paperSizeOptions = Object.entries(PaperSizeConst).map(([paperSize2, value]) => {
|
|
127423
127431
|
const label = isCustom(paperSize2) ? "自定义" : `${paperSize2} (${PaperSizeMmMap[paperSize2].join("×")}mm)`;
|
|
@@ -127452,6 +127460,15 @@ const _sfc_main$1U = /* @__PURE__ */ defineComponent({
|
|
|
127452
127460
|
const [mmWidth, mmHeight] = PaperSizeMmMap[_sizeEnum];
|
|
127453
127461
|
handlePageSizeChange(mmWidth, mmHeight);
|
|
127454
127462
|
};
|
|
127463
|
+
watch(
|
|
127464
|
+
() => props.orientation,
|
|
127465
|
+
() => {
|
|
127466
|
+
const { mmWidth, mmHeight } = activeSecSize.value;
|
|
127467
|
+
const { width, height } = getDirectedSize(props.orientation, mmWidth, mmHeight);
|
|
127468
|
+
activeSecSize.value.mmWidth = width;
|
|
127469
|
+
activeSecSize.value.mmHeight = height;
|
|
127470
|
+
}
|
|
127471
|
+
);
|
|
127455
127472
|
return (_ctx, _cache) => {
|
|
127456
127473
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
127457
127474
|
createVNode(unref(GctFormItem), {
|
|
@@ -127507,7 +127524,7 @@ const _sfc_main$1U = /* @__PURE__ */ defineComponent({
|
|
|
127507
127524
|
};
|
|
127508
127525
|
}
|
|
127509
127526
|
});
|
|
127510
|
-
const PageSizeConfig = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["__scopeId", "data-v-
|
|
127527
|
+
const PageSizeConfig = /* @__PURE__ */ _export_sfc(_sfc_main$1U, [["__scopeId", "data-v-0c96db84"]]);
|
|
127511
127528
|
const _hoisted_1$1v = { style: { "display": "flex", "align-items": "center" } };
|
|
127512
127529
|
const _hoisted_2$V = { class: "form-item-end" };
|
|
127513
127530
|
const _hoisted_3$F = { style: { "margin-top": "8px" } };
|
|
@@ -127702,7 +127719,7 @@ const _sfc_main$1S = /* @__PURE__ */ defineComponent({
|
|
|
127702
127719
|
}, {
|
|
127703
127720
|
default: withCtx(() => [
|
|
127704
127721
|
createElementVNode("div", _hoisted_3$E, [
|
|
127705
|
-
createVNode(PageSizeConfig),
|
|
127722
|
+
createVNode(PageSizeConfig, { orientation: orient.value }, null, 8, ["orientation"]),
|
|
127706
127723
|
createVNode(unref(GctFormItem), {
|
|
127707
127724
|
label: "页面方向",
|
|
127708
127725
|
inline: false
|
|
@@ -127765,7 +127782,7 @@ const _sfc_main$1S = /* @__PURE__ */ defineComponent({
|
|
|
127765
127782
|
};
|
|
127766
127783
|
}
|
|
127767
127784
|
});
|
|
127768
|
-
const PaperPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["__scopeId", "data-v-
|
|
127785
|
+
const PaperPanel = /* @__PURE__ */ _export_sfc(_sfc_main$1S, [["__scopeId", "data-v-243a03df"]]);
|
|
127769
127786
|
const schema$j = {
|
|
127770
127787
|
key: "paper.basic",
|
|
127771
127788
|
title: "表单属性",
|
|
@@ -132542,9 +132559,7 @@ function resolveParamFieldTree(doc) {
|
|
|
132542
132559
|
const modelKey = sub.bindInfo;
|
|
132543
132560
|
const modelName = doc.fieldModelQuery.getModel(modelKey)?.modelName ?? sub.name;
|
|
132544
132561
|
const fields2 = doc.fieldModelQuery.getFieldList(modelKey).filter(
|
|
132545
|
-
(field) => field.createType !== "SYSTEM" && [FIELD_TYPE.
|
|
132546
|
-
field.type
|
|
132547
|
-
)
|
|
132562
|
+
(field) => field.createType !== "SYSTEM" && [FIELD_TYPE.DOUBLE, FIELD_TYPE.INTEGER, FIELD_TYPE.DECIMAL].includes(field.type)
|
|
132548
132563
|
);
|
|
132549
132564
|
if (!fields2.length) continue;
|
|
132550
132565
|
nodes.push({
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Doc, WidgetMeta } from '../../../../core';
|
|
2
|
+
import { BusinessSubTableType } from '../../../../domain/table/types';
|
|
3
|
+
/** 填报只读超链接字段点击 → 宿主打开追溯弹框 */
|
|
4
|
+
interface OpenFieldHyperlinkModalOptions {
|
|
5
|
+
/** 展示值(批次号等) */
|
|
6
|
+
materialNo?: string;
|
|
7
|
+
/** 字段 manifest 类型(如 material_no);同类型可能对应不同业务弹框,需配合 fieldKey/tableType */
|
|
8
|
+
fieldType?: string;
|
|
9
|
+
/** enrich 写入的 _href_(可能为空,如 newHrefSuffix 静态链) */
|
|
10
|
+
href?: string | null;
|
|
11
|
+
/** 业务字段 key,如 production_container_id_ / material_container_no_ */
|
|
12
|
+
fieldKey?: string;
|
|
13
|
+
/** 业务表类型,如 pretreatment-list;主表字段为空 */
|
|
14
|
+
tableType?: BusinessSubTableType;
|
|
15
|
+
/** 子表字段 key(子模型挂载点) */
|
|
16
|
+
subFieldKey?: string;
|
|
17
|
+
/** 子表行号 */
|
|
18
|
+
rowIndex?: number;
|
|
19
|
+
/** 运行时 valuePath */
|
|
20
|
+
valuePath?: string;
|
|
21
|
+
}
|
|
22
|
+
export declare function resolveOpenFieldHyperlinkModalOptions(doc: Doc, widgetMeta: WidgetMeta, runtimeValuePath: string): OpenFieldHyperlinkModalOptions;
|
|
23
|
+
export declare function openFieldHyperlinkModal(doc: Doc, widgetMeta: WidgetMeta, runtimeValuePath: string): Promise<void>;
|
|
24
|
+
export {};
|
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import { PaperSize } from '../../../core/constants';
|
|
2
|
-
interface IPageSizeOptions {
|
|
3
|
-
width: number;
|
|
4
|
-
height: number;
|
|
5
|
-
direction?: 'portrait' | 'landscape';
|
|
6
|
-
}
|
|
7
|
-
export declare const updatePgSzElInfo: (pgSz: any, paperSize: PaperSize, options: IPageSizeOptions) => void;
|
|
8
1
|
export declare class RuntimeJsonBuilder {
|
|
9
2
|
private json;
|
|
10
3
|
constructor(base: any);
|
|
@@ -12,10 +5,9 @@ export declare class RuntimeJsonBuilder {
|
|
|
12
5
|
/**
|
|
13
6
|
* 页面设置
|
|
14
7
|
*/
|
|
15
|
-
setPageSize(
|
|
8
|
+
setPageSize(mmWidth: number, mmHeight: number): this;
|
|
16
9
|
/**
|
|
17
10
|
* 构建
|
|
18
11
|
*/
|
|
19
12
|
build(): any;
|
|
20
13
|
}
|
|
21
|
-
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { VOrientationType } from '../../../../../../domain/constants/enum';
|
|
2
|
+
/**
|
|
3
|
+
* 根据纸张方向计算实际展示的宽、高(单位mm)
|
|
4
|
+
*/
|
|
5
|
+
export declare const getDirectedSize: (direction: VOrientationType, mmWidth: number, mmHeight: number) => {
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* 更新 sec 下 pgSz 的 twip 尺寸信息
|
|
11
|
+
*/
|
|
12
|
+
export declare const updatePgSzElInfo: (pgSz: any, mmWidth: number, mmHeight: number) => void;
|
package/dist/suites/edhr/panel-schema/paper/modules/page-size-config/page-size-config.vue.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { VOrientationType } from '../../../../../../domain/constants/enum';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
orientation: VOrientationType;
|
|
4
|
+
};
|
|
5
|
+
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, {}, any>;
|
|
6
|
+
export default _default;
|
package/dist/word.css
CHANGED
|
@@ -10540,7 +10540,7 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
10540
10540
|
height: 36px;
|
|
10541
10541
|
color: #bebdc7;
|
|
10542
10542
|
}
|
|
10543
|
-
.page-size-custom-setting[data-v-
|
|
10543
|
+
.page-size-custom-setting[data-v-0c96db84] {
|
|
10544
10544
|
margin: 12px 0;
|
|
10545
10545
|
display: flex;
|
|
10546
10546
|
align-items: center;
|
|
@@ -10559,10 +10559,10 @@ svg.portrait-icon[data-v-8bdb451e] {
|
|
|
10559
10559
|
width: 240px;
|
|
10560
10560
|
color: #666;
|
|
10561
10561
|
}
|
|
10562
|
-
.panel-paper[data-v-
|
|
10562
|
+
.panel-paper[data-v-243a03df] {
|
|
10563
10563
|
position: relative;
|
|
10564
10564
|
}
|
|
10565
|
-
.panel-paper .container[data-v-
|
|
10565
|
+
.panel-paper .container[data-v-243a03df] {
|
|
10566
10566
|
padding: 16px;
|
|
10567
10567
|
}
|
|
10568
10568
|
.qrcode-parse-modal[data-v-7a8c7960] {
|
package/package.json
CHANGED
|
@@ -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, {}, any>;
|
|
2
|
-
export default _default;
|