@gct-paas/word 0.1.18 → 0.1.20
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/base/calendar/src/calendar.vue.d.ts +6 -4
- package/dist/base/calendar/src/time.vue.d.ts +1 -0
- package/dist/core/command/commands/Backspace.d.ts +2 -0
- package/dist/core/command/commands/MergeCells.d.ts +7 -1
- package/dist/core/command/commands/SetDataGroup2D.d.ts +3 -11
- package/dist/core/command/commands/UnmergeCells.d.ts +7 -1
- package/dist/core/interaction/InteractionController.d.ts +1 -0
- package/dist/core/interaction/types.d.ts +1 -0
- package/dist/core/interaction/useInteraction.d.ts +1 -0
- package/dist/core/layout/handlers/fields/BaseHandler.d.ts +1 -1
- package/dist/core/model/base/ModelGroup.d.ts +6 -0
- package/dist/core/model/document/Wtc.d.ts +1 -0
- package/dist/core/model/document/Wtr.d.ts +2 -2
- package/dist/core/model/document/WtrPr.d.ts +13 -1
- package/dist/core/view/TableRow.d.ts +3 -0
- package/dist/core/view/utils/TextUtil.d.ts +17 -0
- package/dist/index.es.js +1481 -866
- package/dist/runtime/canvas/__common__/context-menu/index.type.d.ts +3 -0
- package/dist/runtime/canvas/__common__/context-menu/index.vue.d.ts +2 -1
- package/dist/runtime/canvas/__common__/context-menu/table-menu.vue.d.ts +6 -1
- package/dist/runtime/canvas/doc-layout.vue.d.ts +3 -1
- package/dist/runtime/canvas/table/utils/useTableSelection.d.ts +1 -0
- package/dist/runtime/designer/main/editable-canvas.vue.d.ts +3 -1
- package/dist/runtime/renderer/main/preview-canvas.vue.d.ts +3 -1
- package/dist/sdk/doc-runtime/composables/useDocOperations.d.ts +6 -0
- package/dist/sdk/engine/index.d.ts +1 -1
- package/dist/sdk/types/index.d.ts +8 -1
- package/dist/sdk/vue/layouts/doc-design-layout.vue.d.ts +2 -1
- package/dist/sdk/vue/layouts/doc-render-layout.vue.d.ts +3 -1
- package/dist/utils/composables/useDragLine.d.ts +18 -0
- package/dist/utils/func/form.d.ts +5 -0
- package/dist/word.css +343 -292
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useSlots, computed, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, unref, renderSlot, cloneVNode, provide, Fragment, renderList, createBlock, resolveDynamicComponent, inject, reactive, watch, nextTick, createVNode, withCtx, toDisplayString, createTextVNode, ref, withModifiers, Transition, withDirectives, vShow, onBeforeMount, normalizeStyle, mergeProps, onMounted, TransitionGroup, render, isVNode, onBeforeUnmount, Teleport, createApp, h as h$1,
|
|
1
|
+
import { defineComponent, useSlots, computed, createElementBlock, openBlock, normalizeClass, createCommentVNode, createElementVNode, unref, renderSlot, cloneVNode, provide, Fragment, renderList, createBlock, resolveDynamicComponent, inject, reactive, watch, nextTick, createVNode, withCtx, toDisplayString, createTextVNode, ref, withModifiers, Transition, withDirectives, vShow, onBeforeMount, normalizeStyle, mergeProps, getCurrentInstance, onMounted, TransitionGroup, render, isVNode, onBeforeUnmount, Teleport, createApp, h as h$1, onUnmounted, resolveComponent, isRef, withKeys, useCssVars, mergeModels, useModel, readonly, shallowRef, defineAsyncComponent, Suspense, normalizeProps, guardReactiveProps, toRef, getCurrentScope, onScopeDispose, toValue, watchEffect, createStaticVNode, createSlots, toRaw, vModelText } from "vue";
|
|
2
2
|
import FloatingVue, { PopperWrapper } from "floating-vue";
|
|
3
3
|
import VueKonva from "vue-konva";
|
|
4
4
|
import Konva from "konva";
|
|
@@ -20797,21 +20797,29 @@ class ModelNode {
|
|
|
20797
20797
|
});
|
|
20798
20798
|
return section ?? null;
|
|
20799
20799
|
}
|
|
20800
|
-
const
|
|
20800
|
+
const headerFooterOverlayNode = (() => {
|
|
20801
20801
|
let node = current;
|
|
20802
20802
|
while (node) {
|
|
20803
|
-
if (node?.name === "w:hdr" || node?.name === "w:ftr") return node;
|
|
20803
|
+
if (node?.name === "w:hdr" || node?.name === "w:ftr" || node?.name === "w:ovl") return node;
|
|
20804
20804
|
node = node.parent;
|
|
20805
20805
|
}
|
|
20806
20806
|
return null;
|
|
20807
20807
|
})();
|
|
20808
|
-
if (!
|
|
20808
|
+
if (!headerFooterOverlayNode?.relId) return null;
|
|
20809
20809
|
const root2 = this.getRoot();
|
|
20810
20810
|
const bodyChildren = root2?.document?.body?.children ?? [];
|
|
20811
20811
|
const sections = bodyChildren.filter((item) => item?.name === "w:secPr");
|
|
20812
20812
|
const targetSection = sections.find((sec) => {
|
|
20813
|
-
|
|
20814
|
-
|
|
20813
|
+
if (headerFooterOverlayNode.name === "w:hdr") {
|
|
20814
|
+
return sec.headerRefManager?.refs?.some((ref2) => ref2.rId === headerFooterOverlayNode.relId);
|
|
20815
|
+
}
|
|
20816
|
+
if (headerFooterOverlayNode.name === "w:ftr") {
|
|
20817
|
+
return sec.footerRefManager?.refs?.some((ref2) => ref2.rId === headerFooterOverlayNode.relId);
|
|
20818
|
+
}
|
|
20819
|
+
if (headerFooterOverlayNode.name === "w:ovl") {
|
|
20820
|
+
return sec.overlayRefManager?.refs?.some((ref2) => ref2.rId === headerFooterOverlayNode.relId);
|
|
20821
|
+
}
|
|
20822
|
+
return false;
|
|
20815
20823
|
});
|
|
20816
20824
|
return targetSection ?? sections[0] ?? null;
|
|
20817
20825
|
}
|
|
@@ -20948,6 +20956,24 @@ class ModelGroup extends ModelNode {
|
|
|
20948
20956
|
getFirstChild() {
|
|
20949
20957
|
return this.children.length > 0 ? this.children[0] : void 0;
|
|
20950
20958
|
}
|
|
20959
|
+
/**
|
|
20960
|
+
* 深度优先查找第一个段落节点(w:p)
|
|
20961
|
+
* @returns 第一个 Wp,如果未找到则返回 undefined
|
|
20962
|
+
*/
|
|
20963
|
+
getFirstWp() {
|
|
20964
|
+
for (const child of this.children) {
|
|
20965
|
+
if (child instanceof ModelNode) {
|
|
20966
|
+
if (child.name === "w:p") {
|
|
20967
|
+
return child;
|
|
20968
|
+
}
|
|
20969
|
+
if (child instanceof ModelGroup) {
|
|
20970
|
+
const firstWp = child.getFirstWp();
|
|
20971
|
+
if (firstWp) return firstWp;
|
|
20972
|
+
}
|
|
20973
|
+
}
|
|
20974
|
+
}
|
|
20975
|
+
return void 0;
|
|
20976
|
+
}
|
|
20951
20977
|
/**
|
|
20952
20978
|
* 获取最后一个子节点
|
|
20953
20979
|
* @returns 最后一个子节点,如果没有子节点则返回 undefined
|
|
@@ -22741,6 +22767,16 @@ class Wtc extends ModelGroup {
|
|
|
22741
22767
|
p?.clearChildren();
|
|
22742
22768
|
this.children = p ? [p] : [];
|
|
22743
22769
|
}
|
|
22770
|
+
clearFieldRuns() {
|
|
22771
|
+
this.contents.forEach((paragraph) => {
|
|
22772
|
+
for (let i = paragraph.children.length - 1; i >= 0; i--) {
|
|
22773
|
+
const child = paragraph.children[i];
|
|
22774
|
+
if (child?.name === "w:r" && child?.widgetMeta && child?.widgetMeta?.field?.subFieldKey) {
|
|
22775
|
+
paragraph.removeChildAt(i);
|
|
22776
|
+
}
|
|
22777
|
+
}
|
|
22778
|
+
});
|
|
22779
|
+
}
|
|
22744
22780
|
/**
|
|
22745
22781
|
* 从 XML JSON 创建单元格(返回数组,因为 colspan 会产生多个单元格)
|
|
22746
22782
|
*/
|
|
@@ -23122,7 +23158,7 @@ class WtrPr extends ModelNode {
|
|
|
23122
23158
|
*
|
|
23123
23159
|
* @returns RawElement 格式的 XML JSON
|
|
23124
23160
|
*/
|
|
23125
|
-
toXmlJson() {
|
|
23161
|
+
toXmlJson(options) {
|
|
23126
23162
|
const result = {
|
|
23127
23163
|
name: this.name,
|
|
23128
23164
|
type: this.type
|
|
@@ -23130,9 +23166,29 @@ class WtrPr extends ModelNode {
|
|
|
23130
23166
|
if (this.attrs) {
|
|
23131
23167
|
result["@attrs"] = { ...this.attrs };
|
|
23132
23168
|
}
|
|
23133
|
-
|
|
23134
|
-
|
|
23169
|
+
const nextElements = [...this.elements || []];
|
|
23170
|
+
if (options?.syncRowHeight) {
|
|
23171
|
+
const trHeightIndex = nextElements.findIndex((el) => el.name === "w:trHeight");
|
|
23172
|
+
const hasRowHeight = options.rowHeight !== void 0 && Number.isFinite(options.rowHeight);
|
|
23173
|
+
if (hasRowHeight) {
|
|
23174
|
+
const trHeight = {
|
|
23175
|
+
name: "w:trHeight",
|
|
23176
|
+
type: "element",
|
|
23177
|
+
"@attrs": {
|
|
23178
|
+
"w:val": String(Math.round(options.rowHeight)),
|
|
23179
|
+
"w:hRule": options.rowHeightRule ?? "atLeast"
|
|
23180
|
+
}
|
|
23181
|
+
};
|
|
23182
|
+
if (trHeightIndex >= 0) {
|
|
23183
|
+
nextElements[trHeightIndex] = trHeight;
|
|
23184
|
+
} else {
|
|
23185
|
+
nextElements.push(trHeight);
|
|
23186
|
+
}
|
|
23187
|
+
} else if (trHeightIndex >= 0) {
|
|
23188
|
+
nextElements.splice(trHeightIndex, 1);
|
|
23189
|
+
}
|
|
23135
23190
|
}
|
|
23191
|
+
result.elements = nextElements;
|
|
23136
23192
|
return result;
|
|
23137
23193
|
}
|
|
23138
23194
|
/**
|
|
@@ -23184,6 +23240,30 @@ class WtrPr extends ModelNode {
|
|
|
23184
23240
|
}
|
|
23185
23241
|
return false;
|
|
23186
23242
|
}
|
|
23243
|
+
getRowHeight() {
|
|
23244
|
+
const trHeight = this.getElement("w:trHeight");
|
|
23245
|
+
const val = trHeight?.["@attrs"]?.["w:val"];
|
|
23246
|
+
const rule = trHeight?.["@attrs"]?.["w:hRule"];
|
|
23247
|
+
const parsedHeight = val === void 0 ? void 0 : Number(val);
|
|
23248
|
+
return {
|
|
23249
|
+
rowHeight: Number.isFinite(parsedHeight) ? parsedHeight : void 0,
|
|
23250
|
+
rowHeightRule: rule === "auto" || rule === "atLeast" || rule === "exact" ? rule : void 0
|
|
23251
|
+
};
|
|
23252
|
+
}
|
|
23253
|
+
setRowHeight(rowHeight, rowHeightRule = "atLeast") {
|
|
23254
|
+
if (rowHeight === void 0 || !Number.isFinite(rowHeight)) {
|
|
23255
|
+
this.removeElement("w:trHeight");
|
|
23256
|
+
return;
|
|
23257
|
+
}
|
|
23258
|
+
this.setElement({
|
|
23259
|
+
name: "w:trHeight",
|
|
23260
|
+
type: "element",
|
|
23261
|
+
"@attrs": {
|
|
23262
|
+
"w:val": String(Math.round(rowHeight)),
|
|
23263
|
+
"w:hRule": rowHeightRule
|
|
23264
|
+
}
|
|
23265
|
+
});
|
|
23266
|
+
}
|
|
23187
23267
|
static fromTemplate() {
|
|
23188
23268
|
const json = JSON.parse(JSON.stringify(TABLE_TRPR_TEMPLATE));
|
|
23189
23269
|
return new WtrPr({
|
|
@@ -23237,9 +23317,12 @@ class Wtr extends ModelGroup {
|
|
|
23237
23317
|
tds.push(...tc);
|
|
23238
23318
|
}
|
|
23239
23319
|
});
|
|
23320
|
+
const parsedRowHeight = trPr?.getRowHeight() ?? {};
|
|
23240
23321
|
const wtr = new Wtr({
|
|
23241
23322
|
attrs: trRaw["@attrs"],
|
|
23242
23323
|
trPr,
|
|
23324
|
+
rowHeight: parsedRowHeight.rowHeight,
|
|
23325
|
+
rowHeightRule: parsedRowHeight.rowHeightRule,
|
|
23243
23326
|
children: tds
|
|
23244
23327
|
});
|
|
23245
23328
|
tds.forEach((cell) => {
|
|
@@ -23256,7 +23339,22 @@ class Wtr extends ModelGroup {
|
|
|
23256
23339
|
toXmlJson() {
|
|
23257
23340
|
const elements = [];
|
|
23258
23341
|
if (this.trPr) {
|
|
23259
|
-
elements.push(
|
|
23342
|
+
elements.push(
|
|
23343
|
+
this.trPr.toXmlJson({
|
|
23344
|
+
syncRowHeight: true,
|
|
23345
|
+
rowHeight: this.rowHeight,
|
|
23346
|
+
rowHeightRule: this.rowHeightRule
|
|
23347
|
+
})
|
|
23348
|
+
);
|
|
23349
|
+
} else if (this.rowHeight !== void 0 && Number.isFinite(this.rowHeight)) {
|
|
23350
|
+
const tempTrPr = new WtrPr({ elements: [] });
|
|
23351
|
+
elements.push(
|
|
23352
|
+
tempTrPr.toXmlJson({
|
|
23353
|
+
syncRowHeight: true,
|
|
23354
|
+
rowHeight: this.rowHeight,
|
|
23355
|
+
rowHeightRule: this.rowHeightRule
|
|
23356
|
+
})
|
|
23357
|
+
);
|
|
23260
23358
|
}
|
|
23261
23359
|
this.children.forEach((cell) => {
|
|
23262
23360
|
if (cell instanceof Wtc && typeof cell.toXmlJson === "function") {
|
|
@@ -23297,9 +23395,12 @@ class Wtr extends ModelGroup {
|
|
|
23297
23395
|
return Wtc.fromTemplate(width);
|
|
23298
23396
|
});
|
|
23299
23397
|
const trPr = WtrPr.fromTemplate();
|
|
23398
|
+
const parsedRowHeight = trPr.getRowHeight();
|
|
23300
23399
|
const wtr = new Wtr({
|
|
23301
23400
|
children: cells,
|
|
23302
23401
|
trPr,
|
|
23402
|
+
rowHeight: parsedRowHeight.rowHeight,
|
|
23403
|
+
rowHeightRule: parsedRowHeight.rowHeightRule,
|
|
23303
23404
|
attrs: templateWithValues["@attrs"]
|
|
23304
23405
|
});
|
|
23305
23406
|
cells.forEach((cell) => {
|
|
@@ -23489,6 +23590,7 @@ class CheckTableRegion extends Region {
|
|
|
23489
23590
|
endRowIdx: this.itemRegion.end.row,
|
|
23490
23591
|
endColIdx: this.itemRegion.end.col,
|
|
23491
23592
|
callback: (cell) => {
|
|
23593
|
+
cell.clearFieldRuns();
|
|
23492
23594
|
cell.dataGroup2DId = void 0;
|
|
23493
23595
|
}
|
|
23494
23596
|
});
|
|
@@ -23589,6 +23691,7 @@ class _2DTableRegion extends Region {
|
|
|
23589
23691
|
endRowIdx: this.itemRegion.end.row,
|
|
23590
23692
|
endColIdx: this.itemRegion.end.col,
|
|
23591
23693
|
callback: (cell) => {
|
|
23694
|
+
cell.clearFieldRuns();
|
|
23592
23695
|
cell.dataGroup2DId = void 0;
|
|
23593
23696
|
}
|
|
23594
23697
|
});
|
|
@@ -23688,6 +23791,7 @@ class BoundedRegion extends Region {
|
|
|
23688
23791
|
endRowIdx: this.itemRegion.end.row,
|
|
23689
23792
|
endColIdx: this.itemRegion.end.col,
|
|
23690
23793
|
callback: (cell) => {
|
|
23794
|
+
cell.clearFieldRuns();
|
|
23691
23795
|
cell.boundedItemId = void 0;
|
|
23692
23796
|
}
|
|
23693
23797
|
});
|
|
@@ -24457,15 +24561,19 @@ class WtblRegionManager {
|
|
|
24457
24561
|
endColIdx: end.col,
|
|
24458
24562
|
callback: (cell) => {
|
|
24459
24563
|
if (isRepeating) {
|
|
24564
|
+
cell.clearFieldRuns();
|
|
24460
24565
|
cell.repeatingId = void 0;
|
|
24461
24566
|
cell.dataGroup2DId = void 0;
|
|
24462
24567
|
} else if (is2DTable) {
|
|
24568
|
+
cell.clearFieldRuns();
|
|
24463
24569
|
cell._2DTableId = void 0;
|
|
24464
24570
|
cell.dataGroup2DId = void 0;
|
|
24465
24571
|
} else if (isBounded) {
|
|
24572
|
+
cell.clearFieldRuns();
|
|
24466
24573
|
cell.boundedId = void 0;
|
|
24467
24574
|
cell.boundedItemId = void 0;
|
|
24468
24575
|
} else if (isCheckTable) {
|
|
24576
|
+
cell.clearFieldRuns();
|
|
24469
24577
|
cell.checkTableId = void 0;
|
|
24470
24578
|
cell.dataGroup2DId = void 0;
|
|
24471
24579
|
} else if (isThead) {
|
|
@@ -27886,6 +27994,9 @@ class Backspace extends CommandBase {
|
|
|
27886
27994
|
if (run?.isPlaceholderRun) {
|
|
27887
27995
|
return this.handlePlaceholderRun(modelWp);
|
|
27888
27996
|
}
|
|
27997
|
+
if (run?.isPageWidgetRun && (run.pageWidgetMeta?.type === "pw:pagination" || run.pageWidgetMeta?.type === "pw:line")) {
|
|
27998
|
+
return this.handleOverlayPageWidgetRun(modelWr);
|
|
27999
|
+
}
|
|
27889
28000
|
if (run?.isWidgetRun) {
|
|
27890
28001
|
return this.handleWidgetRun(modelWr, modelWp, position, run);
|
|
27891
28002
|
}
|
|
@@ -27940,6 +28051,20 @@ class Backspace extends CommandBase {
|
|
|
27940
28051
|
};
|
|
27941
28052
|
}
|
|
27942
28053
|
}
|
|
28054
|
+
/** 处理悬浮 run 的删除 */
|
|
28055
|
+
handleOverlayPageWidgetRun(modelWr) {
|
|
28056
|
+
const wlayout = modelWr.getWlayout?.();
|
|
28057
|
+
if (!wlayout || wlayout.name !== "w:lyt" || wlayout.parent?.name !== "w:ovl") {
|
|
28058
|
+
return null;
|
|
28059
|
+
}
|
|
28060
|
+
wlayout.remove();
|
|
28061
|
+
const firstWp = this.doc.model?.document.getFirstWp();
|
|
28062
|
+
return {
|
|
28063
|
+
wp: firstWp,
|
|
28064
|
+
pos: -1,
|
|
28065
|
+
side: "after"
|
|
28066
|
+
};
|
|
28067
|
+
}
|
|
27943
28068
|
/**
|
|
27944
28069
|
* 处理位置 >= 0 的删除情况
|
|
27945
28070
|
*/
|
|
@@ -28862,7 +28987,8 @@ class InsertField extends CommandBase {
|
|
|
28862
28987
|
mainModelFields
|
|
28863
28988
|
} = this.payload;
|
|
28864
28989
|
const mapper = this.doc.layoutMapper;
|
|
28865
|
-
const
|
|
28990
|
+
const node = mapper.getBaseMetaNodeById(nodeId);
|
|
28991
|
+
const run = node.raw;
|
|
28866
28992
|
const wp = mapper.getModelNodeById(run.parent.modelRef.id);
|
|
28867
28993
|
let valuePath = _valuePath;
|
|
28868
28994
|
if (run.modelRef?.valuePath2D) {
|
|
@@ -28900,7 +29026,7 @@ class InsertField extends CommandBase {
|
|
|
28900
29026
|
wp.appendChild(wr);
|
|
28901
29027
|
}
|
|
28902
29028
|
return {
|
|
28903
|
-
wr,
|
|
29029
|
+
wr: node.pageArea === "body" ? wr : wr.cloneWithSuffix("$p", "1"),
|
|
28904
29030
|
pos: -1,
|
|
28905
29031
|
side: "before"
|
|
28906
29032
|
};
|
|
@@ -29391,7 +29517,8 @@ class InsertPaperWidget extends CommandBase {
|
|
|
29391
29517
|
const { nodeId, offset: offset2, side } = cursor.getCursor();
|
|
29392
29518
|
const { pageWidgetMeta } = this.payload;
|
|
29393
29519
|
const mapper = this.doc.layoutMapper;
|
|
29394
|
-
const
|
|
29520
|
+
const node = mapper.getBaseMetaNodeById(nodeId);
|
|
29521
|
+
const run = node.raw;
|
|
29395
29522
|
const wp = mapper.getModelNodeById(run.parent.modelRef.id);
|
|
29396
29523
|
const wr = new WrPageWidget({ text: "*", pageWidgetMeta });
|
|
29397
29524
|
if (pageWidgetMeta.type === "pw:diagonal" && wp.parent.name === "w:tc") {
|
|
@@ -29423,7 +29550,7 @@ class InsertPaperWidget extends CommandBase {
|
|
|
29423
29550
|
wp.appendChild(wr);
|
|
29424
29551
|
}
|
|
29425
29552
|
return {
|
|
29426
|
-
wr,
|
|
29553
|
+
wr: node.pageArea === "body" ? wr : wr.cloneWithSuffix("$p", "1"),
|
|
29427
29554
|
pos: -1,
|
|
29428
29555
|
side: "before"
|
|
29429
29556
|
};
|
|
@@ -29512,12 +29639,18 @@ class InsertTable extends CommandBase {
|
|
|
29512
29639
|
const wp = mapper.getModelNodeById(run.parent.modelRef.id);
|
|
29513
29640
|
let targetIndex = 0;
|
|
29514
29641
|
if (!run.isPlaceholderRun) {
|
|
29515
|
-
|
|
29516
|
-
id
|
|
29517
|
-
|
|
29518
|
-
|
|
29519
|
-
}
|
|
29520
|
-
|
|
29642
|
+
if (run.isWidgetRun || run.isPageWidgetRun) {
|
|
29643
|
+
const hitwr = mapper.getModelNodeByLayoutId(run.id);
|
|
29644
|
+
let wrIndex = wp.children.findIndex((r) => r.id === hitwr.id);
|
|
29645
|
+
targetIndex = ++wrIndex;
|
|
29646
|
+
} else {
|
|
29647
|
+
const result = CommandBase.splitRunAt(this.doc, {
|
|
29648
|
+
id: nodeId,
|
|
29649
|
+
offset: offset2,
|
|
29650
|
+
side
|
|
29651
|
+
});
|
|
29652
|
+
targetIndex = result.modelIndex;
|
|
29653
|
+
}
|
|
29521
29654
|
}
|
|
29522
29655
|
const [beforeWp, afterWp] = wp.splitAt(targetIndex);
|
|
29523
29656
|
if (wp.parent.name === "w:body") {
|
|
@@ -29531,6 +29664,12 @@ class InsertTable extends CommandBase {
|
|
|
29531
29664
|
} else if (afterWp) {
|
|
29532
29665
|
wp.parent.insertBefore(afterWp, table);
|
|
29533
29666
|
}
|
|
29667
|
+
const firstWp = table.getFirstWp();
|
|
29668
|
+
return {
|
|
29669
|
+
wp: firstWp,
|
|
29670
|
+
pos: 0,
|
|
29671
|
+
side: "after"
|
|
29672
|
+
};
|
|
29534
29673
|
}
|
|
29535
29674
|
} else {
|
|
29536
29675
|
const { mode, models } = CommandBase.getSelectionResult(this.doc, cursor.getSelection());
|
|
@@ -30036,12 +30175,14 @@ const _hoisted_1$2j = { class: "gct-time-container" };
|
|
|
30036
30175
|
const _hoisted_2$1v = { class: "scrollbar-container" };
|
|
30037
30176
|
const _hoisted_3$1a = ["onClick"];
|
|
30038
30177
|
const _hoisted_4$O = { class: "gct-time-footer" };
|
|
30178
|
+
const _hoisted_5$D = { class: "gct-right-btns" };
|
|
30039
30179
|
const _sfc_main$3s = /* @__PURE__ */ defineComponent({
|
|
30040
30180
|
__name: "time",
|
|
30041
30181
|
props: {
|
|
30042
30182
|
modelValue: {},
|
|
30043
30183
|
disabled: { type: Boolean },
|
|
30044
30184
|
format: {},
|
|
30185
|
+
showClearBtn: { type: Boolean },
|
|
30045
30186
|
disabledTime: { type: Function }
|
|
30046
30187
|
},
|
|
30047
30188
|
emits: ["update:modelValue", "change"],
|
|
@@ -30141,6 +30282,16 @@ const _sfc_main$3s = /* @__PURE__ */ defineComponent({
|
|
|
30141
30282
|
timeMap[type4].value = value;
|
|
30142
30283
|
scrollToCenter(type4, value);
|
|
30143
30284
|
}
|
|
30285
|
+
function clear() {
|
|
30286
|
+
emit("update:modelValue", null);
|
|
30287
|
+
emit("change", {
|
|
30288
|
+
hour: null,
|
|
30289
|
+
minute: null,
|
|
30290
|
+
second: null,
|
|
30291
|
+
value: null,
|
|
30292
|
+
isNowDay: false
|
|
30293
|
+
});
|
|
30294
|
+
}
|
|
30144
30295
|
function confirm(isNow = false) {
|
|
30145
30296
|
if (props.disabled) return;
|
|
30146
30297
|
const { hour, minute, second } = timeMap;
|
|
@@ -30216,38 +30367,56 @@ const _sfc_main$3s = /* @__PURE__ */ defineComponent({
|
|
|
30216
30367
|
class: "gct-now-btn",
|
|
30217
30368
|
onClick: nowDay
|
|
30218
30369
|
}, "此刻"),
|
|
30219
|
-
|
|
30220
|
-
|
|
30221
|
-
|
|
30222
|
-
|
|
30223
|
-
|
|
30224
|
-
|
|
30225
|
-
|
|
30226
|
-
|
|
30227
|
-
|
|
30228
|
-
|
|
30229
|
-
|
|
30230
|
-
|
|
30370
|
+
createElementVNode("div", _hoisted_5$D, [
|
|
30371
|
+
__props.showClearBtn && __props.modelValue ? (openBlock(), createBlock(unref(GctButton), {
|
|
30372
|
+
key: 0,
|
|
30373
|
+
class: "gct-sure-btn",
|
|
30374
|
+
size: "small",
|
|
30375
|
+
disabled: __props.disabled,
|
|
30376
|
+
onClick: clear
|
|
30377
|
+
}, {
|
|
30378
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
30379
|
+
createTextVNode(" 清除 ", -1)
|
|
30380
|
+
])]),
|
|
30381
|
+
_: 1
|
|
30382
|
+
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
30383
|
+
createVNode(unref(GctButton), {
|
|
30384
|
+
class: "gct-sure-btn",
|
|
30385
|
+
type: "primary",
|
|
30386
|
+
size: "small",
|
|
30387
|
+
disabled: __props.disabled,
|
|
30388
|
+
onClick: confirm
|
|
30389
|
+
}, {
|
|
30390
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
30391
|
+
createTextVNode(" 确定 ", -1)
|
|
30392
|
+
])]),
|
|
30393
|
+
_: 1
|
|
30394
|
+
}, 8, ["disabled"])
|
|
30395
|
+
])
|
|
30231
30396
|
])
|
|
30232
30397
|
], 2);
|
|
30233
30398
|
};
|
|
30234
30399
|
}
|
|
30235
30400
|
});
|
|
30236
|
-
const GctTimer = /* @__PURE__ */ _export_sfc(_sfc_main$3s, [["__scopeId", "data-v-
|
|
30401
|
+
const GctTimer = /* @__PURE__ */ _export_sfc(_sfc_main$3s, [["__scopeId", "data-v-ee92739f"]]);
|
|
30237
30402
|
const _hoisted_1$2i = { class: "gct-dtp-panel-inner" };
|
|
30238
30403
|
const _hoisted_2$1u = { class: "gct-dtp-date" };
|
|
30239
30404
|
const _hoisted_3$19 = { class: "gct-dtp-header" };
|
|
30240
30405
|
const _hoisted_4$N = { class: "text" };
|
|
30241
|
-
const _hoisted_5$
|
|
30406
|
+
const _hoisted_5$C = { class: "gct-dtp-head" };
|
|
30242
30407
|
const _hoisted_6$r = { class: "gct-dtp-rows-wrapper" };
|
|
30243
30408
|
const _hoisted_7$n = ["onClick"];
|
|
30244
|
-
const _hoisted_8$
|
|
30245
|
-
const _hoisted_9$
|
|
30409
|
+
const _hoisted_8$i = { class: "dtp-day-label" };
|
|
30410
|
+
const _hoisted_9$b = {
|
|
30411
|
+
key: 0,
|
|
30412
|
+
class: "gct-date-footer"
|
|
30413
|
+
};
|
|
30414
|
+
const _hoisted_10$8 = {
|
|
30246
30415
|
key: 0,
|
|
30247
30416
|
class: "gct-dtp-time"
|
|
30248
30417
|
};
|
|
30249
|
-
const
|
|
30250
|
-
const
|
|
30418
|
+
const _hoisted_11$5 = { class: "gct-dtp-time-header" };
|
|
30419
|
+
const _hoisted_12$4 = { class: "gct-dtp-time-container" };
|
|
30251
30420
|
const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
30252
30421
|
__name: "calendar",
|
|
30253
30422
|
props: {
|
|
@@ -30258,7 +30427,8 @@ const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
|
30258
30427
|
disabledDates: {},
|
|
30259
30428
|
minDate: {},
|
|
30260
30429
|
maxDate: {},
|
|
30261
|
-
timeFormat: {}
|
|
30430
|
+
timeFormat: {},
|
|
30431
|
+
showClearBtn: { type: Boolean, default: false }
|
|
30262
30432
|
},
|
|
30263
30433
|
emits: ["update:modelValue", "change"],
|
|
30264
30434
|
setup(__props, { emit: __emit }) {
|
|
@@ -30402,9 +30572,18 @@ const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
|
30402
30572
|
emitChange(selectedDate.value);
|
|
30403
30573
|
}
|
|
30404
30574
|
}
|
|
30575
|
+
function clear() {
|
|
30576
|
+
emit("update:modelValue", null);
|
|
30577
|
+
emit("change", null);
|
|
30578
|
+
}
|
|
30405
30579
|
function onSelectTimeDate(timeObj) {
|
|
30406
|
-
|
|
30407
|
-
|
|
30580
|
+
if (props.showClearBtn && timeObj.value === null) {
|
|
30581
|
+
emit("update:modelValue", null);
|
|
30582
|
+
emit("change", null);
|
|
30583
|
+
} else {
|
|
30584
|
+
const d = (timeObj.isNowDay ? dayjs() : selectedDate.value).hour(timeObj.hour).minute(timeObj.minute).second(timeObj.second);
|
|
30585
|
+
emitChange(d);
|
|
30586
|
+
}
|
|
30408
30587
|
}
|
|
30409
30588
|
function emitChange(d) {
|
|
30410
30589
|
const date4 = d.toDate();
|
|
@@ -30433,7 +30612,7 @@ const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
|
30433
30612
|
onClick: withModifiers(nextMonth, ["stop"])
|
|
30434
30613
|
})
|
|
30435
30614
|
]),
|
|
30436
|
-
createElementVNode("div", _hoisted_5$
|
|
30615
|
+
createElementVNode("div", _hoisted_5$C, [
|
|
30437
30616
|
(openBlock(true), createElementBlock(Fragment, null, renderList(weekdayShort.value, (d) => {
|
|
30438
30617
|
return openBlock(), createElementBlock("div", {
|
|
30439
30618
|
class: "day head",
|
|
@@ -30462,7 +30641,7 @@ const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
|
30462
30641
|
class: normalizeClass(dayClasses(day)),
|
|
30463
30642
|
onClick: ($event) => onSelectDay(day)
|
|
30464
30643
|
}, [
|
|
30465
|
-
createElementVNode("div", _hoisted_8$
|
|
30644
|
+
createElementVNode("div", _hoisted_8$i, toDisplayString(day.label), 1)
|
|
30466
30645
|
], 10, _hoisted_7$n);
|
|
30467
30646
|
}), 128))
|
|
30468
30647
|
]);
|
|
@@ -30471,17 +30650,31 @@ const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
|
30471
30650
|
]),
|
|
30472
30651
|
_: 1
|
|
30473
30652
|
}, 8, ["name"])
|
|
30474
|
-
])
|
|
30653
|
+
]),
|
|
30654
|
+
__props.showClearBtn && !showTimeLocal.value && __props.modelValue ? (openBlock(), createElementBlock("div", _hoisted_9$b, [
|
|
30655
|
+
createVNode(unref(GctButton), {
|
|
30656
|
+
class: "gct-clear-btn",
|
|
30657
|
+
size: "small",
|
|
30658
|
+
disabled: __props.disabled,
|
|
30659
|
+
onClick: clear
|
|
30660
|
+
}, {
|
|
30661
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
30662
|
+
createTextVNode(" 清除 ", -1)
|
|
30663
|
+
])]),
|
|
30664
|
+
_: 1
|
|
30665
|
+
}, 8, ["disabled"])
|
|
30666
|
+
])) : createCommentVNode("", true)
|
|
30475
30667
|
]),
|
|
30476
|
-
showTimeLocal.value ? (openBlock(), createElementBlock("div",
|
|
30477
|
-
createElementVNode("div",
|
|
30478
|
-
createElementVNode("div",
|
|
30668
|
+
showTimeLocal.value ? (openBlock(), createElementBlock("div", _hoisted_10$8, [
|
|
30669
|
+
createElementVNode("div", _hoisted_11$5, toDisplayString(timeValue.value), 1),
|
|
30670
|
+
createElementVNode("div", _hoisted_12$4, [
|
|
30479
30671
|
createVNode(GctTimer, {
|
|
30480
30672
|
"model-value": timeValue.value,
|
|
30481
30673
|
format: __props.timeFormat,
|
|
30482
30674
|
disabledTime,
|
|
30675
|
+
showClearBtn: __props.showClearBtn,
|
|
30483
30676
|
onChange: onSelectTimeDate
|
|
30484
|
-
}, null, 8, ["model-value", "format"])
|
|
30677
|
+
}, null, 8, ["model-value", "format", "showClearBtn"])
|
|
30485
30678
|
])
|
|
30486
30679
|
])) : createCommentVNode("", true)
|
|
30487
30680
|
])
|
|
@@ -30489,7 +30682,7 @@ const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
|
30489
30682
|
};
|
|
30490
30683
|
}
|
|
30491
30684
|
});
|
|
30492
|
-
const GctCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$3r, [["__scopeId", "data-v-
|
|
30685
|
+
const GctCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$3r, [["__scopeId", "data-v-3e5daf47"]]);
|
|
30493
30686
|
const _hoisted_1$2h = { class: "gct-checkbox-label" };
|
|
30494
30687
|
const _sfc_main$3q = /* @__PURE__ */ defineComponent({
|
|
30495
30688
|
__name: "checkbox",
|
|
@@ -30661,14 +30854,14 @@ const _hoisted_3$17 = {
|
|
|
30661
30854
|
class: "group-label"
|
|
30662
30855
|
};
|
|
30663
30856
|
const _hoisted_4$M = ["onClick"];
|
|
30664
|
-
const _hoisted_5$
|
|
30857
|
+
const _hoisted_5$B = { class: "option-label" };
|
|
30665
30858
|
const _hoisted_6$q = { class: "option-right" };
|
|
30666
30859
|
const _hoisted_7$m = {
|
|
30667
30860
|
key: 1,
|
|
30668
30861
|
class: "divider"
|
|
30669
30862
|
};
|
|
30670
|
-
const _hoisted_8$
|
|
30671
|
-
const _hoisted_9$
|
|
30863
|
+
const _hoisted_8$h = ["onClick"];
|
|
30864
|
+
const _hoisted_9$a = { class: "option-right" };
|
|
30672
30865
|
const _hoisted_10$7 = { class: "title" };
|
|
30673
30866
|
const _sfc_main$3m = /* @__PURE__ */ defineComponent({
|
|
30674
30867
|
__name: "dropdown-basic-select",
|
|
@@ -30777,7 +30970,7 @@ const _sfc_main$3m = /* @__PURE__ */ defineComponent({
|
|
|
30777
30970
|
createTextVNode(toDisplayString(item.tip || item.label), 1)
|
|
30778
30971
|
]),
|
|
30779
30972
|
default: withCtx(() => [
|
|
30780
|
-
createElementVNode("span", _hoisted_5$
|
|
30973
|
+
createElementVNode("span", _hoisted_5$B, toDisplayString(item.label), 1)
|
|
30781
30974
|
]),
|
|
30782
30975
|
_: 2
|
|
30783
30976
|
}, 1032, ["disabled"]),
|
|
@@ -30837,7 +31030,7 @@ const _sfc_main$3m = /* @__PURE__ */ defineComponent({
|
|
|
30837
31030
|
]),
|
|
30838
31031
|
_: 2
|
|
30839
31032
|
}, 1032, ["disabled"]),
|
|
30840
|
-
createElementVNode("div", _hoisted_9$
|
|
31033
|
+
createElementVNode("div", _hoisted_9$a, [
|
|
30841
31034
|
withDirectives(createVNode(unref(GctIcon), {
|
|
30842
31035
|
class: "edit-icon",
|
|
30843
31036
|
icon: "icon-sheji-2",
|
|
@@ -30855,7 +31048,7 @@ const _sfc_main$3m = /* @__PURE__ */ defineComponent({
|
|
|
30855
31048
|
})) : createCommentVNode("", true)
|
|
30856
31049
|
])
|
|
30857
31050
|
], 64))
|
|
30858
|
-
], 10, _hoisted_8$
|
|
31051
|
+
], 10, _hoisted_8$h);
|
|
30859
31052
|
}), 128))
|
|
30860
31053
|
])
|
|
30861
31054
|
]),
|
|
@@ -31089,7 +31282,7 @@ const _hoisted_1$2a = {
|
|
|
31089
31282
|
const _hoisted_2$1o = ["src"];
|
|
31090
31283
|
const _hoisted_3$13 = { class: "upload-img-mask" };
|
|
31091
31284
|
const _hoisted_4$L = { class: "tip-text" };
|
|
31092
|
-
const _hoisted_5$
|
|
31285
|
+
const _hoisted_5$A = {
|
|
31093
31286
|
key: 2,
|
|
31094
31287
|
class: "upload-loading"
|
|
31095
31288
|
};
|
|
@@ -31183,7 +31376,7 @@ const _sfc_main$3h = /* @__PURE__ */ defineComponent({
|
|
|
31183
31376
|
createElementVNode("div", _hoisted_4$L, toDisplayString(__props.tip), 1)
|
|
31184
31377
|
])
|
|
31185
31378
|
])),
|
|
31186
|
-
loading.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
31379
|
+
loading.value ? (openBlock(), createElementBlock("div", _hoisted_5$A, [..._cache[2] || (_cache[2] = [
|
|
31187
31380
|
createElementVNode("i", { class: "iconfont icon-gongzuotai_gongshi" }, null, -1)
|
|
31188
31381
|
])])) : createCommentVNode("", true)
|
|
31189
31382
|
], 4),
|
|
@@ -31211,7 +31404,7 @@ const _hoisted_1$29 = {
|
|
|
31211
31404
|
key: 0,
|
|
31212
31405
|
class: "gct-input-prepend-icon"
|
|
31213
31406
|
};
|
|
31214
|
-
const _hoisted_2$1n = ["id", "type", "value", "placeholder", "disabled", "readonly", "maxlength", "autocomplete", "autofocus", "
|
|
31407
|
+
const _hoisted_2$1n = ["id", "name", "type", "value", "placeholder", "disabled", "readonly", "maxlength", "autocomplete", "autofocus", "spellcheck"];
|
|
31215
31408
|
const _hoisted_3$12 = {
|
|
31216
31409
|
key: 1,
|
|
31217
31410
|
class: "gct-input-clear-icon-default"
|
|
@@ -31220,7 +31413,7 @@ const _hoisted_4$K = {
|
|
|
31220
31413
|
key: 2,
|
|
31221
31414
|
class: "gct-input-count"
|
|
31222
31415
|
};
|
|
31223
|
-
const _hoisted_5$
|
|
31416
|
+
const _hoisted_5$z = { key: 0 };
|
|
31224
31417
|
const _hoisted_6$o = {
|
|
31225
31418
|
key: 3,
|
|
31226
31419
|
class: "gct-input-suffix"
|
|
@@ -31249,7 +31442,7 @@ const _sfc_main$3g = /* @__PURE__ */ defineComponent({
|
|
|
31249
31442
|
showPasswordToggle: { type: Boolean, default: true },
|
|
31250
31443
|
maxLength: { default: void 0 },
|
|
31251
31444
|
autofocus: { type: Boolean, default: false },
|
|
31252
|
-
autocomplete: { default:
|
|
31445
|
+
autocomplete: { default: void 0 },
|
|
31253
31446
|
name: { default: "" },
|
|
31254
31447
|
rows: { default: 3 },
|
|
31255
31448
|
bordered: { type: Boolean, default: true },
|
|
@@ -31263,15 +31456,14 @@ const _sfc_main$3g = /* @__PURE__ */ defineComponent({
|
|
|
31263
31456
|
const props = __props;
|
|
31264
31457
|
const emit = __emit;
|
|
31265
31458
|
const inputRef = ref(null);
|
|
31266
|
-
const
|
|
31267
|
-
props.type;
|
|
31268
|
-
});
|
|
31459
|
+
const componentUid = getCurrentInstance()?.uid ?? Date.now();
|
|
31269
31460
|
const inputClasses = computed(() => ({
|
|
31270
31461
|
"gct-input-lg": props.size === "large",
|
|
31271
31462
|
"gct-input-sm": props.size === "small",
|
|
31272
31463
|
"gct-input-disabled": props.disabled,
|
|
31273
31464
|
"gct-input-readonly": props.readonly,
|
|
31274
|
-
"gct-input-borderless": !props.bordered
|
|
31465
|
+
"gct-input-borderless": !props.bordered,
|
|
31466
|
+
"gct-input-password-masked": props.type === "password"
|
|
31275
31467
|
}));
|
|
31276
31468
|
const wrapperClasses = computed(() => ({
|
|
31277
31469
|
"gct-input-wrapper-disabled": props.disabled
|
|
@@ -31286,6 +31478,27 @@ const _sfc_main$3g = /* @__PURE__ */ defineComponent({
|
|
|
31286
31478
|
const inputStyle = computed(() => ({
|
|
31287
31479
|
...props.type === "textarea" && props.showCount ? { paddingBottom: "24px" } : {}
|
|
31288
31480
|
}));
|
|
31481
|
+
const realType = computed(() => {
|
|
31482
|
+
if (props.type === "password") {
|
|
31483
|
+
return "text";
|
|
31484
|
+
}
|
|
31485
|
+
return props.type;
|
|
31486
|
+
});
|
|
31487
|
+
const resolvedAutocomplete = computed(() => {
|
|
31488
|
+
if (props.autocomplete) {
|
|
31489
|
+
return props.autocomplete;
|
|
31490
|
+
}
|
|
31491
|
+
return props.type === "password" ? "one-time-code" : "off";
|
|
31492
|
+
});
|
|
31493
|
+
const resolvedInputName = computed(() => {
|
|
31494
|
+
if (props.name) {
|
|
31495
|
+
return props.name;
|
|
31496
|
+
}
|
|
31497
|
+
if (props.id) {
|
|
31498
|
+
return props.id;
|
|
31499
|
+
}
|
|
31500
|
+
return `gct-field-${componentUid}`;
|
|
31501
|
+
});
|
|
31289
31502
|
const countValue = computed(() => {
|
|
31290
31503
|
const value = props.modelValue ? String(props.modelValue) : "";
|
|
31291
31504
|
return value.length;
|
|
@@ -31366,17 +31579,24 @@ const _sfc_main$3g = /* @__PURE__ */ defineComponent({
|
|
|
31366
31579
|
ref_key: "inputRef",
|
|
31367
31580
|
ref: inputRef,
|
|
31368
31581
|
id: props.id,
|
|
31582
|
+
name: resolvedInputName.value,
|
|
31369
31583
|
class: normalizeClass(["gct-input", inputClasses.value]),
|
|
31370
31584
|
style: normalizeStyle(inputStyle.value),
|
|
31371
|
-
type:
|
|
31585
|
+
type: realType.value,
|
|
31372
31586
|
value: props.modelValue,
|
|
31373
31587
|
placeholder: props.placeholder,
|
|
31374
31588
|
disabled: props.disabled,
|
|
31375
31589
|
readonly: props.readonly,
|
|
31376
31590
|
maxlength: props.maxLength,
|
|
31377
|
-
autocomplete:
|
|
31591
|
+
autocomplete: resolvedAutocomplete.value,
|
|
31592
|
+
autocapitalize: "off",
|
|
31593
|
+
autocorrect: "off",
|
|
31594
|
+
"aria-autocomplete": "none",
|
|
31595
|
+
"data-form-type": "other",
|
|
31596
|
+
"data-lpignore": "true",
|
|
31597
|
+
"data-1p-ignore": "true",
|
|
31598
|
+
"data-bwignore": "true",
|
|
31378
31599
|
autofocus: props.autofocus,
|
|
31379
|
-
name: props.name,
|
|
31380
31600
|
spellcheck: props.spellcheck,
|
|
31381
31601
|
onInput: handleInput,
|
|
31382
31602
|
onChange: handleChange,
|
|
@@ -31401,7 +31621,7 @@ const _sfc_main$3g = /* @__PURE__ */ defineComponent({
|
|
|
31401
31621
|
])) : createCommentVNode("", true),
|
|
31402
31622
|
props.showCount ? (openBlock(), createElementBlock("span", _hoisted_4$K, [
|
|
31403
31623
|
createTextVNode(toDisplayString(countValue.value), 1),
|
|
31404
|
-
props.maxLength ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
31624
|
+
props.maxLength ? (openBlock(), createElementBlock("span", _hoisted_5$z, " / " + toDisplayString(props.maxLength), 1)) : createCommentVNode("", true)
|
|
31405
31625
|
])) : createCommentVNode("", true),
|
|
31406
31626
|
props.suffix ? (openBlock(), createElementBlock("span", _hoisted_6$o, [
|
|
31407
31627
|
createElementVNode("span", _hoisted_7$k, toDisplayString(__props.suffix), 1)
|
|
@@ -31411,7 +31631,7 @@ const _sfc_main$3g = /* @__PURE__ */ defineComponent({
|
|
|
31411
31631
|
};
|
|
31412
31632
|
}
|
|
31413
31633
|
});
|
|
31414
|
-
const GctInput = /* @__PURE__ */ _export_sfc(_sfc_main$3g, [["__scopeId", "data-v-
|
|
31634
|
+
const GctInput = /* @__PURE__ */ _export_sfc(_sfc_main$3g, [["__scopeId", "data-v-c407ada7"]]);
|
|
31415
31635
|
var isNumeric = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, mathceil = Math.ceil, mathfloor = Math.floor, bignumberError = "[BigNumber Error] ", tooManyDigits = bignumberError + "Number primitive has more than 15 significant digits: ", BASE = 1e14, LOG_BASE = 14, MAX_SAFE_INTEGER = 9007199254740991, POWS_TEN = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], SQRT_BASE = 1e7, MAX = 1e9;
|
|
31416
31636
|
function clone(configObject) {
|
|
31417
31637
|
var div, convertBase, parseNumeric, P2 = BigNumber2.prototype = { constructor: BigNumber2, toString: null, valueOf: null }, ONE = new BigNumber2(1), DECIMAL_PLACES = 20, ROUNDING_MODE = 4, TO_EXP_NEG = -7, TO_EXP_POS = 21, MIN_EXP = -1e7, MAX_EXP = 1e7, CRYPTO = false, MODULO_MODE = 1, POW_PRECISION = 0, FORMAT = {
|
|
@@ -32756,7 +32976,7 @@ const _hoisted_4$J = {
|
|
|
32756
32976
|
key: 2,
|
|
32757
32977
|
class: "gct-input-number-suffix"
|
|
32758
32978
|
};
|
|
32759
|
-
const _hoisted_5$
|
|
32979
|
+
const _hoisted_5$y = { class: "gct-input-number-suffix-text" };
|
|
32760
32980
|
const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
32761
32981
|
__name: "input-number",
|
|
32762
32982
|
props: {
|
|
@@ -32780,6 +33000,7 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
32780
33000
|
const props = __props;
|
|
32781
33001
|
const emit = __emit;
|
|
32782
33002
|
const inputRef = ref(null);
|
|
33003
|
+
const isFocused = ref(false);
|
|
32783
33004
|
const inputValue = ref("");
|
|
32784
33005
|
const isInteger = computed(() => props.integer === true);
|
|
32785
33006
|
function normalizeLimit(val) {
|
|
@@ -32869,6 +33090,9 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
32869
33090
|
watch(
|
|
32870
33091
|
() => props.modelValue,
|
|
32871
33092
|
(val) => {
|
|
33093
|
+
if (isFocused.value && props.emitOnInput) {
|
|
33094
|
+
return;
|
|
33095
|
+
}
|
|
32872
33096
|
if (isNil(val) || val === "") {
|
|
32873
33097
|
inputValue.value = "";
|
|
32874
33098
|
return;
|
|
@@ -32879,10 +33103,14 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
32879
33103
|
}
|
|
32880
33104
|
const parsed = parseInput(String(val));
|
|
32881
33105
|
if (!parsed) return;
|
|
32882
|
-
|
|
33106
|
+
const rounded = roundValue(parsed, String(val));
|
|
33107
|
+
inputValue.value = formatValue(rounded, String(val));
|
|
32883
33108
|
},
|
|
32884
33109
|
{ immediate: true }
|
|
32885
33110
|
);
|
|
33111
|
+
const handleFocus = () => {
|
|
33112
|
+
isFocused.value = true;
|
|
33113
|
+
};
|
|
32886
33114
|
const handleInput = (e) => {
|
|
32887
33115
|
const val = e.target.value;
|
|
32888
33116
|
inputValue.value = val;
|
|
@@ -32892,6 +33120,7 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
32892
33120
|
emit("update:modelValue", props.returnString ? val : parsed.toNumber());
|
|
32893
33121
|
};
|
|
32894
33122
|
const handleBlur = () => {
|
|
33123
|
+
isFocused.value = false;
|
|
32895
33124
|
emit("blur");
|
|
32896
33125
|
const { bn, display } = normalizeValue2(inputValue.value);
|
|
32897
33126
|
if (!bn) {
|
|
@@ -32970,6 +33199,7 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
32970
33199
|
max: __props.max,
|
|
32971
33200
|
disabled: __props.disabled,
|
|
32972
33201
|
placeholder: __props.placeholder,
|
|
33202
|
+
onFocus: handleFocus,
|
|
32973
33203
|
onInput: handleInput,
|
|
32974
33204
|
onBlur: handleBlur
|
|
32975
33205
|
}, null, 40, _hoisted_1$28),
|
|
@@ -33009,13 +33239,13 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
33009
33239
|
], 2)
|
|
33010
33240
|
])) : createCommentVNode("", true),
|
|
33011
33241
|
props.suffix ? (openBlock(), createElementBlock("span", _hoisted_4$J, [
|
|
33012
|
-
createElementVNode("span", _hoisted_5$
|
|
33242
|
+
createElementVNode("span", _hoisted_5$y, toDisplayString(__props.suffix), 1)
|
|
33013
33243
|
])) : createCommentVNode("", true)
|
|
33014
33244
|
], 2);
|
|
33015
33245
|
};
|
|
33016
33246
|
}
|
|
33017
33247
|
});
|
|
33018
|
-
const GctInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$3f, [["__scopeId", "data-v-
|
|
33248
|
+
const GctInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$3f, [["__scopeId", "data-v-4b906773"]]);
|
|
33019
33249
|
const _hoisted_1$27 = ["value", "placeholder", "disabled", "readonly", "maxlength", "rows", "autocomplete", "autofocus", "name", "spellcheck"];
|
|
33020
33250
|
const _hoisted_2$1l = {
|
|
33021
33251
|
key: 1,
|
|
@@ -34531,13 +34761,13 @@ const _hoisted_1$1$ = { class: "popper-container" };
|
|
|
34531
34761
|
const _hoisted_2$1h = { class: "group-name" };
|
|
34532
34762
|
const _hoisted_3$Y = ["onClick"];
|
|
34533
34763
|
const _hoisted_4$H = ["onClick"];
|
|
34534
|
-
const _hoisted_5$
|
|
34764
|
+
const _hoisted_5$x = {
|
|
34535
34765
|
key: 2,
|
|
34536
34766
|
class: "empty"
|
|
34537
34767
|
};
|
|
34538
34768
|
const _hoisted_6$n = ["title"];
|
|
34539
34769
|
const _hoisted_7$j = { class: "selection-tag-content" };
|
|
34540
|
-
const _hoisted_8$
|
|
34770
|
+
const _hoisted_8$g = {
|
|
34541
34771
|
key: 2,
|
|
34542
34772
|
class: "placeholder"
|
|
34543
34773
|
};
|
|
@@ -34730,7 +34960,7 @@ const _sfc_main$35 = /* @__PURE__ */ defineComponent({
|
|
|
34730
34960
|
], 64))
|
|
34731
34961
|
], 10, _hoisted_4$H);
|
|
34732
34962
|
}), 128)),
|
|
34733
|
-
!normalizedFlatOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
34963
|
+
!normalizedFlatOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$x, " 暂无数据 ")) : createCommentVNode("", true)
|
|
34734
34964
|
])
|
|
34735
34965
|
]),
|
|
34736
34966
|
_: 3
|
|
@@ -34764,7 +34994,7 @@ const _sfc_main$35 = /* @__PURE__ */ defineComponent({
|
|
|
34764
34994
|
}, null, 8, ["onClick"])
|
|
34765
34995
|
]);
|
|
34766
34996
|
}), 128)) : createCommentVNode("", true),
|
|
34767
|
-
!selectedOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
34997
|
+
!selectedOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_8$g, toDisplayString(__props.placeholder), 1)) : createCommentVNode("", true),
|
|
34768
34998
|
!__props.multiple && !__props.noArrow ? (openBlock(), createBlock(unref(GctIcon), {
|
|
34769
34999
|
key: 3,
|
|
34770
35000
|
class: "change-icon",
|
|
@@ -34931,7 +35161,7 @@ const _hoisted_3$X = {
|
|
|
34931
35161
|
class: "selection-col"
|
|
34932
35162
|
};
|
|
34933
35163
|
const _hoisted_4$G = ["onClick"];
|
|
34934
|
-
const _hoisted_5$
|
|
35164
|
+
const _hoisted_5$w = {
|
|
34935
35165
|
key: 0,
|
|
34936
35166
|
class: "selection-col"
|
|
34937
35167
|
};
|
|
@@ -35055,7 +35285,7 @@ const _sfc_main$32 = /* @__PURE__ */ defineComponent({
|
|
|
35055
35285
|
}),
|
|
35056
35286
|
onClick: ($event) => _ctx.$emit("row-click", row)
|
|
35057
35287
|
}, [
|
|
35058
|
-
__props.selectable ? (openBlock(), createElementBlock("td", _hoisted_5$
|
|
35288
|
+
__props.selectable ? (openBlock(), createElementBlock("td", _hoisted_5$w, [
|
|
35059
35289
|
renderSlot(_ctx.$slots, "select", {
|
|
35060
35290
|
row,
|
|
35061
35291
|
checked: getIsSelected(row)
|
|
@@ -36925,7 +37155,7 @@ const _hoisted_1$1W = { class: "color-picker-container" };
|
|
|
36925
37155
|
const _hoisted_2$1e = { class: "color-submenu-panel" };
|
|
36926
37156
|
const _hoisted_3$V = { class: "color-content-standard" };
|
|
36927
37157
|
const _hoisted_4$F = { class: "items" };
|
|
36928
|
-
const _hoisted_5$
|
|
37158
|
+
const _hoisted_5$v = ["onClick"];
|
|
36929
37159
|
const _sfc_main$2$ = /* @__PURE__ */ defineComponent({
|
|
36930
37160
|
__name: "ColorPicker",
|
|
36931
37161
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -36986,7 +37216,7 @@ const _sfc_main$2$ = /* @__PURE__ */ defineComponent({
|
|
|
36986
37216
|
class: normalizeClass(["color-icon", { active: model.value === c2.color }]),
|
|
36987
37217
|
style: normalizeStyle({ backgroundColor: c2.color }),
|
|
36988
37218
|
onClick: ($event) => handleColorClick(c2.color)
|
|
36989
|
-
}, null, 14, _hoisted_5$
|
|
37219
|
+
}, null, 14, _hoisted_5$v)
|
|
36990
37220
|
]),
|
|
36991
37221
|
_: 2
|
|
36992
37222
|
}, 1024);
|
|
@@ -37300,7 +37530,15 @@ class MergeCells extends CommandBase {
|
|
|
37300
37530
|
const mapper = this.doc.layoutMapper;
|
|
37301
37531
|
const normalized = this.doc.cursorManager.normalizeRange(cursor.getSelection());
|
|
37302
37532
|
const start = mapper.getLayoutNodeById(normalized.rangeStart.nodeId);
|
|
37303
|
-
|
|
37533
|
+
if (start?.isPlaceholderRun) {
|
|
37534
|
+
const wp = mapper.getModelNodeById(start.parent.modelRef.id);
|
|
37535
|
+
return {
|
|
37536
|
+
wp,
|
|
37537
|
+
pos: -1,
|
|
37538
|
+
side: "after"
|
|
37539
|
+
};
|
|
37540
|
+
}
|
|
37541
|
+
const wr = mapper.getModelNodeById(start.modelRef?.id);
|
|
37304
37542
|
return {
|
|
37305
37543
|
wr,
|
|
37306
37544
|
pos: -1,
|
|
@@ -37329,7 +37567,12 @@ class ResizeCol extends CommandBase {
|
|
|
37329
37567
|
);
|
|
37330
37568
|
}
|
|
37331
37569
|
table.resizeCol(colIndex, UnitConverter.pixelToDxa(width));
|
|
37332
|
-
|
|
37570
|
+
const firstWp = table.getFirstWp();
|
|
37571
|
+
return {
|
|
37572
|
+
wp: firstWp,
|
|
37573
|
+
pos: 0,
|
|
37574
|
+
side: "after"
|
|
37575
|
+
};
|
|
37333
37576
|
}
|
|
37334
37577
|
}
|
|
37335
37578
|
const __vite_glob_0_22$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -37398,7 +37641,12 @@ class ResizeRow extends CommandBase {
|
|
|
37398
37641
|
);
|
|
37399
37642
|
}
|
|
37400
37643
|
table.resizeRow(rowIndex, UnitConverter.pixelToTwip(height));
|
|
37401
|
-
|
|
37644
|
+
const firstWp = table.getFirstWp();
|
|
37645
|
+
return {
|
|
37646
|
+
wp: firstWp,
|
|
37647
|
+
pos: 0,
|
|
37648
|
+
side: "after"
|
|
37649
|
+
};
|
|
37402
37650
|
}
|
|
37403
37651
|
}
|
|
37404
37652
|
const __vite_glob_0_25$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -37667,6 +37915,7 @@ class SetBoundedItem extends CommandBase {
|
|
|
37667
37915
|
};
|
|
37668
37916
|
const boundedRegion = this.getBoundedRegion(startCell, endCell);
|
|
37669
37917
|
if (!boundedRegion) {
|
|
37918
|
+
GctMessage.warning("选区不在固定表范围内");
|
|
37670
37919
|
throw new Error("Cells are not in a bounded region");
|
|
37671
37920
|
}
|
|
37672
37921
|
this.output = boundedRegion.setItemRegion({
|
|
@@ -37684,6 +37933,7 @@ class SetBoundedItem extends CommandBase {
|
|
|
37684
37933
|
getBoundedRegion(startCell, endCell) {
|
|
37685
37934
|
const region = this.getRegion(startCell, endCell);
|
|
37686
37935
|
if (!region) {
|
|
37936
|
+
GctMessage.warning("选区超出子表范围");
|
|
37687
37937
|
throw new Error("Cells are not in the same region");
|
|
37688
37938
|
}
|
|
37689
37939
|
return region.type === "bounded" ? region : void 0;
|
|
@@ -37767,6 +38017,7 @@ class SetDataGroup2D extends CommandBase {
|
|
|
37767
38017
|
if (models.length === 0) return null;
|
|
37768
38018
|
const startCell = models[0].model;
|
|
37769
38019
|
const endCell = models[models.length - 1].model;
|
|
38020
|
+
const cellList = [...models.map((m) => m.model)];
|
|
37770
38021
|
const start = {
|
|
37771
38022
|
row: startCell.parent?.getCurrentIndex(),
|
|
37772
38023
|
col: startCell.getCurrentIndex()
|
|
@@ -37775,7 +38026,7 @@ class SetDataGroup2D extends CommandBase {
|
|
|
37775
38026
|
row: endCell.parent?.getCurrentIndex(),
|
|
37776
38027
|
col: endCell.getCurrentIndex()
|
|
37777
38028
|
};
|
|
37778
|
-
const subTableRegion = this.getSubTableRegion(
|
|
38029
|
+
const subTableRegion = this.getSubTableRegion(cellList);
|
|
37779
38030
|
if (!subTableRegion) {
|
|
37780
38031
|
throw new Error("Cells are not in a sub table region supporting data-group-2d");
|
|
37781
38032
|
}
|
|
@@ -37787,33 +38038,22 @@ class SetDataGroup2D extends CommandBase {
|
|
|
37787
38038
|
}
|
|
37788
38039
|
/**
|
|
37789
38040
|
*
|
|
37790
|
-
* @param
|
|
37791
|
-
* @param endCell
|
|
38041
|
+
* @param cellList
|
|
37792
38042
|
* @returns
|
|
37793
38043
|
*/
|
|
37794
|
-
getSubTableRegion(
|
|
37795
|
-
|
|
38044
|
+
getSubTableRegion(cellList) {
|
|
38045
|
+
let region;
|
|
38046
|
+
cellList.some((cell) => {
|
|
38047
|
+
const r = cell.getRegion();
|
|
38048
|
+
if (r && ["check-table", "2d-table"].includes(r.type)) {
|
|
38049
|
+
region = r;
|
|
38050
|
+
return true;
|
|
38051
|
+
}
|
|
38052
|
+
});
|
|
37796
38053
|
if (!region) {
|
|
37797
|
-
throw new Error("
|
|
38054
|
+
throw new Error("No region found");
|
|
37798
38055
|
}
|
|
37799
|
-
return
|
|
37800
|
-
}
|
|
37801
|
-
/**
|
|
37802
|
-
* 获取公共区域
|
|
37803
|
-
* @param startCell
|
|
37804
|
-
* @param endCell
|
|
37805
|
-
* @returns
|
|
37806
|
-
*/
|
|
37807
|
-
getRegion(startCell, endCell) {
|
|
37808
|
-
if (startCell === endCell) {
|
|
37809
|
-
return startCell.getRegion();
|
|
37810
|
-
}
|
|
37811
|
-
const startRegion = startCell.getRegion();
|
|
37812
|
-
const endRegion = endCell.getRegion();
|
|
37813
|
-
if (startRegion && endRegion && startRegion === endRegion) {
|
|
37814
|
-
return startRegion;
|
|
37815
|
-
}
|
|
37816
|
-
return;
|
|
38056
|
+
return region;
|
|
37817
38057
|
}
|
|
37818
38058
|
}
|
|
37819
38059
|
const __vite_glob_0_33$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
@@ -37950,11 +38190,7 @@ class SetPadding extends CommandBase {
|
|
|
37950
38190
|
return null;
|
|
37951
38191
|
}
|
|
37952
38192
|
const [top, right, bottom, left] = padding;
|
|
37953
|
-
section.
|
|
37954
|
-
section.margins.top = top;
|
|
37955
|
-
section.margins.right = right;
|
|
37956
|
-
section.margins.bottom = bottom;
|
|
37957
|
-
section.margins.left = left;
|
|
38193
|
+
section.setMargins(top, bottom, left, right);
|
|
37958
38194
|
return null;
|
|
37959
38195
|
}
|
|
37960
38196
|
}
|
|
@@ -38134,6 +38370,14 @@ class UnmergeCells extends CommandBase {
|
|
|
38134
38370
|
const mapper = this.doc.layoutMapper;
|
|
38135
38371
|
const normalized = this.doc.cursorManager.normalizeRange(cursor.getSelection());
|
|
38136
38372
|
const start = mapper.getLayoutNodeById(normalized.rangeStart.nodeId);
|
|
38373
|
+
if (start?.isPlaceholderRun) {
|
|
38374
|
+
const wp = mapper.getModelNodeById(start.parent.modelRef.id);
|
|
38375
|
+
return {
|
|
38376
|
+
wp,
|
|
38377
|
+
pos: -1,
|
|
38378
|
+
side: "after"
|
|
38379
|
+
};
|
|
38380
|
+
}
|
|
38137
38381
|
const wr = mapper.getModelNodeById(start.modelRef.id);
|
|
38138
38382
|
return {
|
|
38139
38383
|
wr,
|
|
@@ -38681,6 +38925,10 @@ class TextUtil {
|
|
|
38681
38925
|
static FONT_METRICS_CACHE_LIMIT = 50;
|
|
38682
38926
|
/** 布局大小缓存限制 */
|
|
38683
38927
|
static LAYOUT_SIZE_CACHE_LIMIT = 100;
|
|
38928
|
+
/** 东亚常见全宽字符块 */
|
|
38929
|
+
static EAST_ASIAN_FULL_WIDTH_REGEX = /[\u3000-\u303F\u3040-\u30FF\u31F0-\u31FF\uFF01-\uFF60\uFFE0-\uFFE6]/u;
|
|
38930
|
+
/** 表单/文档中常见的几何符号 */
|
|
38931
|
+
static FULL_WIDTH_SYMBOL_REGEX = /[□■○●△▲▽▼◇◆◎※]/u;
|
|
38684
38932
|
static fontMetricsCache = /* @__PURE__ */ new Map();
|
|
38685
38933
|
static layoutSizeCache = /* @__PURE__ */ new Map();
|
|
38686
38934
|
/**
|
|
@@ -38691,6 +38939,35 @@ class TextUtil {
|
|
|
38691
38939
|
static isHanChar(char) {
|
|
38692
38940
|
return new RegExp("\\p{Script=Han}", "u").test(char);
|
|
38693
38941
|
}
|
|
38942
|
+
/**
|
|
38943
|
+
* 验证是否为应按 1em 处理的全宽单字符
|
|
38944
|
+
* @param char
|
|
38945
|
+
* @returns
|
|
38946
|
+
*/
|
|
38947
|
+
static isFullWidthChar(char) {
|
|
38948
|
+
if ([...char].length !== 1) {
|
|
38949
|
+
return false;
|
|
38950
|
+
}
|
|
38951
|
+
return this.isHanChar(char) || this.EAST_ASIAN_FULL_WIDTH_REGEX.test(char) || this.FULL_WIDTH_SYMBOL_REGEX.test(char);
|
|
38952
|
+
}
|
|
38953
|
+
/**
|
|
38954
|
+
* 生成文本度量缓存键
|
|
38955
|
+
* @param payload
|
|
38956
|
+
* @param includeText
|
|
38957
|
+
* @returns
|
|
38958
|
+
*/
|
|
38959
|
+
static getMeasureCacheKey(payload, includeText = true) {
|
|
38960
|
+
return JSON.stringify({
|
|
38961
|
+
text: includeText ? payload.text ?? "" : "",
|
|
38962
|
+
fontSize: payload.fontSize ?? "",
|
|
38963
|
+
fontFamily: payload.fontFamily ?? "",
|
|
38964
|
+
fontStyle: payload.fontStyle ?? "",
|
|
38965
|
+
fontVariant: payload.fontVariant ?? "",
|
|
38966
|
+
lineHeight: payload.lineHeight ?? "",
|
|
38967
|
+
padding: payload.padding ?? "",
|
|
38968
|
+
letterSpacing: payload.letterSpacing ?? ""
|
|
38969
|
+
});
|
|
38970
|
+
}
|
|
38694
38971
|
/**
|
|
38695
38972
|
* 计算度量 - 基于 JSON 序列化的缓存(LRU)
|
|
38696
38973
|
* 将最终的 config 序列化为缓存键,相同配置直接返回缓存结果
|
|
@@ -38704,7 +38981,7 @@ class TextUtil {
|
|
|
38704
38981
|
text: targetText,
|
|
38705
38982
|
lineHeight: 1
|
|
38706
38983
|
});
|
|
38707
|
-
const cacheKey =
|
|
38984
|
+
const cacheKey = this.getMeasureCacheKey(config, false);
|
|
38708
38985
|
if (this.fontMetricsCache.has(cacheKey)) {
|
|
38709
38986
|
const result2 = this.fontMetricsCache.get(cacheKey);
|
|
38710
38987
|
this.fontMetricsCache.delete(cacheKey);
|
|
@@ -38730,16 +39007,17 @@ class TextUtil {
|
|
|
38730
39007
|
* @returns
|
|
38731
39008
|
*/
|
|
38732
39009
|
static getLayoutSize(payload) {
|
|
38733
|
-
if (this.
|
|
39010
|
+
if (this.isFullWidthChar(payload.text ?? "")) {
|
|
39011
|
+
const fontSize2 = payload.fontSize ?? 0;
|
|
38734
39012
|
return {
|
|
38735
|
-
width:
|
|
38736
|
-
height:
|
|
39013
|
+
width: fontSize2,
|
|
39014
|
+
height: fontSize2
|
|
38737
39015
|
};
|
|
38738
39016
|
}
|
|
38739
39017
|
const config = Object.assign({}, payload, {
|
|
38740
39018
|
lineHeight: 1
|
|
38741
39019
|
});
|
|
38742
|
-
const cacheKey =
|
|
39020
|
+
const cacheKey = this.getMeasureCacheKey(config);
|
|
38743
39021
|
if (this.layoutSizeCache.has(cacheKey)) {
|
|
38744
39022
|
const result2 = this.layoutSizeCache.get(cacheKey);
|
|
38745
39023
|
this.layoutSizeCache.delete(cacheKey);
|
|
@@ -39716,6 +39994,166 @@ class TextWidget extends TextRun {
|
|
|
39716
39994
|
this.dataIndex = options.dataIndex;
|
|
39717
39995
|
}
|
|
39718
39996
|
}
|
|
39997
|
+
const EmptySymbolTypeConst = {
|
|
39998
|
+
"/": "/",
|
|
39999
|
+
"--": "--",
|
|
40000
|
+
"——": "——",
|
|
40001
|
+
NA: "NA",
|
|
40002
|
+
"N/A": "N/A"
|
|
40003
|
+
};
|
|
40004
|
+
const ViewStateTypeConst = {
|
|
40005
|
+
/** 文本显示 */
|
|
40006
|
+
Readonly: "readonly",
|
|
40007
|
+
/** 组件显示-禁用 */
|
|
40008
|
+
Disabled: "disabled",
|
|
40009
|
+
/** 组件显示-跟随设计 */
|
|
40010
|
+
Auto: "auto"
|
|
40011
|
+
};
|
|
40012
|
+
const RenderCompTypeConst = {
|
|
40013
|
+
/** 圆形 */
|
|
40014
|
+
Radio: "radio",
|
|
40015
|
+
/** 方形 */
|
|
40016
|
+
Checkbox: "checkbox",
|
|
40017
|
+
/** 下拉 */
|
|
40018
|
+
Select: "select"
|
|
40019
|
+
};
|
|
40020
|
+
const BooleanShowModeTypeConst = {
|
|
40021
|
+
/** 只显示真 */
|
|
40022
|
+
OnlyTrue: "onlyTrue",
|
|
40023
|
+
/** 只显示真 */
|
|
40024
|
+
OnlyFalse: "onlyFalse",
|
|
40025
|
+
/** 同时显示真和假 */
|
|
40026
|
+
Both: "both"
|
|
40027
|
+
};
|
|
40028
|
+
const LabelPositionTypeConst = {
|
|
40029
|
+
/** 文字在前 */
|
|
40030
|
+
Before: "before",
|
|
40031
|
+
/** 文字在后 */
|
|
40032
|
+
After: "after"
|
|
40033
|
+
};
|
|
40034
|
+
const OrientationTypeConst = {
|
|
40035
|
+
/** 纵 */
|
|
40036
|
+
Portrait: "portrait",
|
|
40037
|
+
/** 横 */
|
|
40038
|
+
Landscape: "landscape"
|
|
40039
|
+
};
|
|
40040
|
+
const DecimalDisplayModeTypeConst = {
|
|
40041
|
+
/** 显示百分比(%) */
|
|
40042
|
+
PERCENT: "percent",
|
|
40043
|
+
/** 显示原始数值 */
|
|
40044
|
+
ORIGIN: "origin"
|
|
40045
|
+
};
|
|
40046
|
+
const RangeValidateModeTypeConst = {
|
|
40047
|
+
/** 不校验 */
|
|
40048
|
+
No_Validate: "NoValidate",
|
|
40049
|
+
/** 固定输入校验 */
|
|
40050
|
+
Fixed_Number: "FixedNumber",
|
|
40051
|
+
/** 变量校验 */
|
|
40052
|
+
Variable_Validate: "VariableValidate"
|
|
40053
|
+
};
|
|
40054
|
+
const FieldSysVarDefaultValueConst = {
|
|
40055
|
+
NULL: "",
|
|
40056
|
+
/** 系统登录用户 */
|
|
40057
|
+
CURRENT_USER: "CURRENT_USER",
|
|
40058
|
+
/** 当前登录用户主部门 */
|
|
40059
|
+
CURRENT_ORG: "CURRENT_ORG"
|
|
40060
|
+
};
|
|
40061
|
+
const SignatureNumberTypeConst = {
|
|
40062
|
+
/** 单人签名 */
|
|
40063
|
+
SIGNATURE_SINGLE: "signature_single",
|
|
40064
|
+
/** 多人签名 */
|
|
40065
|
+
SIGNATURE_MULTIPLE: "signature_multiple"
|
|
40066
|
+
};
|
|
40067
|
+
const SignatureTypeConst = {
|
|
40068
|
+
/** 仅签名 */
|
|
40069
|
+
SIGNATURE_ONLY: "signature_only",
|
|
40070
|
+
/** 签名及日期 */
|
|
40071
|
+
SIGNATURE_DATE: "signature_date",
|
|
40072
|
+
/** 签名及日期时间 */
|
|
40073
|
+
SIGNATURE_DATETIME: "signature_datetime"
|
|
40074
|
+
};
|
|
40075
|
+
const SignatureTimeTypeConst = {
|
|
40076
|
+
/** 跟随签名 */
|
|
40077
|
+
FOLLOW_SIGNATURE: "follow_signature",
|
|
40078
|
+
/** 填充新字段 */
|
|
40079
|
+
POPULATE_FIELD: "populate_field"
|
|
40080
|
+
};
|
|
40081
|
+
const SignDisplayTypeConst = {
|
|
40082
|
+
/** 垂直显示 */
|
|
40083
|
+
VERTICAL: "vertical",
|
|
40084
|
+
/** 水平显示 */
|
|
40085
|
+
HORIZONTAL: "horizontal"
|
|
40086
|
+
};
|
|
40087
|
+
const ImageDisplayModeConst = {
|
|
40088
|
+
/** 自定义 */
|
|
40089
|
+
CUSTOM: "CUSTOM",
|
|
40090
|
+
/** 自适应 */
|
|
40091
|
+
ADAPTIVE: "ADAPTIVE"
|
|
40092
|
+
};
|
|
40093
|
+
const FieldDependencyTypeConst = {
|
|
40094
|
+
/**隐藏 */
|
|
40095
|
+
Hidden: "hidden",
|
|
40096
|
+
/**只读 */
|
|
40097
|
+
Readonly: "readonly",
|
|
40098
|
+
/**禁用 */
|
|
40099
|
+
Disabled: "disabled",
|
|
40100
|
+
/**必填 */
|
|
40101
|
+
Required: "required",
|
|
40102
|
+
/**赋值 */
|
|
40103
|
+
Assignment: "assignment"
|
|
40104
|
+
};
|
|
40105
|
+
const AssignmentStrategyTypeConst = {
|
|
40106
|
+
/**始终覆盖 */
|
|
40107
|
+
AlwaysCover: "alwaysCover",
|
|
40108
|
+
/**不覆盖已修改 */
|
|
40109
|
+
NotCovered: "notCovered"
|
|
40110
|
+
};
|
|
40111
|
+
const FormTypeConst = {
|
|
40112
|
+
/** 基础表单 */
|
|
40113
|
+
BASE: "BASE",
|
|
40114
|
+
/** 流程表单 */
|
|
40115
|
+
PROCESS: "PROCESS",
|
|
40116
|
+
/** 视图表单 */
|
|
40117
|
+
VIEW: "VIEW",
|
|
40118
|
+
/** 文本表单 */
|
|
40119
|
+
TEXT: "TEXT",
|
|
40120
|
+
/** 文件表单 */
|
|
40121
|
+
FILE: "FILE"
|
|
40122
|
+
};
|
|
40123
|
+
const ViewTypeConst = {
|
|
40124
|
+
/** 视图模型(查询视图) */
|
|
40125
|
+
VIEW_MODEL: "VIEW_MODEL",
|
|
40126
|
+
/** SQL数据视图 */
|
|
40127
|
+
VIEW_SQL: "SQL",
|
|
40128
|
+
/** 自定义模型 */
|
|
40129
|
+
VIEW_JS: "JS"
|
|
40130
|
+
};
|
|
40131
|
+
const BwipCodeTypeConst = {
|
|
40132
|
+
Code39: "code39",
|
|
40133
|
+
Code128: "code128",
|
|
40134
|
+
QRCode: "qrcode",
|
|
40135
|
+
GS1DataMatrix: "gs1datamatrix"
|
|
40136
|
+
};
|
|
40137
|
+
const ValueTypeConst = {
|
|
40138
|
+
/** 固定值 */
|
|
40139
|
+
Fixed: "fixed",
|
|
40140
|
+
/** 字段 */
|
|
40141
|
+
Field: "field",
|
|
40142
|
+
/** 公式 */
|
|
40143
|
+
Formula: "formula"
|
|
40144
|
+
};
|
|
40145
|
+
const ImageSizeModeTypeConst = {
|
|
40146
|
+
/** 自适应,响应式的适应外层容器的大小 */
|
|
40147
|
+
RESPONSIVE: "responsive",
|
|
40148
|
+
/** 固定值,高宽设了多少就是多少 */
|
|
40149
|
+
FIXED: "fixed"
|
|
40150
|
+
};
|
|
40151
|
+
const DiagonalDirectionTypeConst = {
|
|
40152
|
+
/** 从左上到右下 */
|
|
40153
|
+
Forward: "forward",
|
|
40154
|
+
/** 从右上到左下 / */
|
|
40155
|
+
Backward: "backward"
|
|
40156
|
+
};
|
|
39719
40157
|
function getValue$1(value, multiple) {
|
|
39720
40158
|
if (multiple) {
|
|
39721
40159
|
return Array.isArray(value) ? value : value?.split(",").filter((i) => !isNil(i)) ?? [];
|
|
@@ -39803,6 +40241,31 @@ function formatDateTimeHook(props, value) {
|
|
|
39803
40241
|
]);
|
|
39804
40242
|
return formatDateTime(formats, value);
|
|
39805
40243
|
}
|
|
40244
|
+
function formatNumber(attrs, type4, value) {
|
|
40245
|
+
if (value === void 0 || value === null || value === "") {
|
|
40246
|
+
return value;
|
|
40247
|
+
}
|
|
40248
|
+
const { newSpecificConfig = {}, displayMode = DecimalDisplayModeTypeConst.ORIGIN } = attrs;
|
|
40249
|
+
const { digits = 0, rulesForRounding } = newSpecificConfig;
|
|
40250
|
+
const num = Number(value);
|
|
40251
|
+
if (Number.isNaN(num)) {
|
|
40252
|
+
return value;
|
|
40253
|
+
}
|
|
40254
|
+
if (displayMode === DecimalDisplayModeTypeConst.PERCENT) {
|
|
40255
|
+
if (type4 === "fw:double") {
|
|
40256
|
+
return new BigNumber(num).multipliedBy(100) + "%";
|
|
40257
|
+
}
|
|
40258
|
+
return new BigNumber(num).multipliedBy(100).toFixed(digits, rulesForRounding || 1) + "%";
|
|
40259
|
+
}
|
|
40260
|
+
if (type4 === "fw:double") {
|
|
40261
|
+
return num;
|
|
40262
|
+
}
|
|
40263
|
+
return new BigNumber(num).toFixed(digits, rulesForRounding || 1);
|
|
40264
|
+
}
|
|
40265
|
+
function formatNumberHook(props, type4, value) {
|
|
40266
|
+
const formats = pick(props, ["newSpecificConfig", "displayMode"]);
|
|
40267
|
+
return formatNumber(formats, type4, value);
|
|
40268
|
+
}
|
|
39806
40269
|
let BaseHandler$1 = class BaseHandler {
|
|
39807
40270
|
static hasValue(value) {
|
|
39808
40271
|
return value !== void 0 && value !== null;
|
|
@@ -39847,7 +40310,7 @@ let BaseHandler$1 = class BaseHandler {
|
|
|
39847
40310
|
static getNoValueLabel(ctx) {
|
|
39848
40311
|
const { context, wr } = ctx;
|
|
39849
40312
|
if (context.doc.mode === DocModeTypeConst.Print) {
|
|
39850
|
-
return { label: "
|
|
40313
|
+
return { label: wr.widgetMeta?.props.emptySymbol ?? "", type: "noneLabel" };
|
|
39851
40314
|
} else {
|
|
39852
40315
|
if (wr.widgetMeta?.props?.placeholder) {
|
|
39853
40316
|
return {
|
|
@@ -39866,7 +40329,7 @@ let BaseHandler$1 = class BaseHandler {
|
|
|
39866
40329
|
type: "default"
|
|
39867
40330
|
};
|
|
39868
40331
|
}
|
|
39869
|
-
static
|
|
40332
|
+
static formatFieldValue(ctx, valuePath) {
|
|
39870
40333
|
const { context, wr } = ctx;
|
|
39871
40334
|
let value = valuePath ? this.getLabel(ctx, valuePath) : void 0;
|
|
39872
40335
|
if (value && ["fw:date", "fw:date-time", "fw:time"].includes(wr.widgetMeta.type)) {
|
|
@@ -39874,6 +40337,8 @@ let BaseHandler$1 = class BaseHandler {
|
|
|
39874
40337
|
value = normalizeDateTime(value);
|
|
39875
40338
|
}
|
|
39876
40339
|
value = formatDateTimeHook(wr.widgetMeta.props, value);
|
|
40340
|
+
} else if (value && context.doc.mode === DocModeTypeConst.Print && ["fw:number", "fw:double"].includes(wr.widgetMeta.type)) {
|
|
40341
|
+
value = formatNumberHook(wr.widgetMeta.props, wr.widgetMeta.type, value);
|
|
39877
40342
|
}
|
|
39878
40343
|
return value;
|
|
39879
40344
|
}
|
|
@@ -39884,7 +40349,7 @@ let BaseHandler$1 = class BaseHandler {
|
|
|
39884
40349
|
static layoutValue(ctx) {
|
|
39885
40350
|
const { context, wr } = ctx;
|
|
39886
40351
|
const valuePath = context.getValuePath(wr.valuePath);
|
|
39887
|
-
let label = this.
|
|
40352
|
+
let label = this.formatFieldValue(ctx, valuePath);
|
|
39888
40353
|
if (!this.hasValue(label)) {
|
|
39889
40354
|
label = this.getNoValueLabel(ctx).label;
|
|
39890
40355
|
}
|
|
@@ -40282,166 +40747,6 @@ let ImageHandler$1 = class ImageHandler2 extends BaseHandler$1 {
|
|
|
40282
40747
|
}
|
|
40283
40748
|
}
|
|
40284
40749
|
};
|
|
40285
|
-
const EmptySymbolTypeConst = {
|
|
40286
|
-
"/": "/",
|
|
40287
|
-
"--": "--",
|
|
40288
|
-
"——": "——",
|
|
40289
|
-
NA: "NA",
|
|
40290
|
-
"N/A": "N/A"
|
|
40291
|
-
};
|
|
40292
|
-
const ViewStateTypeConst = {
|
|
40293
|
-
/** 文本显示 */
|
|
40294
|
-
Readonly: "readonly",
|
|
40295
|
-
/** 组件显示-禁用 */
|
|
40296
|
-
Disabled: "disabled",
|
|
40297
|
-
/** 组件显示-跟随设计 */
|
|
40298
|
-
Auto: "auto"
|
|
40299
|
-
};
|
|
40300
|
-
const RenderCompTypeConst = {
|
|
40301
|
-
/** 圆形 */
|
|
40302
|
-
Radio: "radio",
|
|
40303
|
-
/** 方形 */
|
|
40304
|
-
Checkbox: "checkbox",
|
|
40305
|
-
/** 下拉 */
|
|
40306
|
-
Select: "select"
|
|
40307
|
-
};
|
|
40308
|
-
const BooleanShowModeTypeConst = {
|
|
40309
|
-
/** 只显示真 */
|
|
40310
|
-
OnlyTrue: "onlyTrue",
|
|
40311
|
-
/** 只显示真 */
|
|
40312
|
-
OnlyFalse: "onlyFalse",
|
|
40313
|
-
/** 同时显示真和假 */
|
|
40314
|
-
Both: "both"
|
|
40315
|
-
};
|
|
40316
|
-
const LabelPositionTypeConst = {
|
|
40317
|
-
/** 文字在前 */
|
|
40318
|
-
Before: "before",
|
|
40319
|
-
/** 文字在后 */
|
|
40320
|
-
After: "after"
|
|
40321
|
-
};
|
|
40322
|
-
const OrientationTypeConst = {
|
|
40323
|
-
/** 纵 */
|
|
40324
|
-
Portrait: "portrait",
|
|
40325
|
-
/** 横 */
|
|
40326
|
-
Landscape: "landscape"
|
|
40327
|
-
};
|
|
40328
|
-
const DecimalDisplayModeTypeConst = {
|
|
40329
|
-
/** 显示百分比(%) */
|
|
40330
|
-
PERCENT: "percent",
|
|
40331
|
-
/** 显示原始数值 */
|
|
40332
|
-
ORIGIN: "origin"
|
|
40333
|
-
};
|
|
40334
|
-
const RangeValidateModeTypeConst = {
|
|
40335
|
-
/** 不校验 */
|
|
40336
|
-
No_Validate: "NoValidate",
|
|
40337
|
-
/** 固定输入校验 */
|
|
40338
|
-
Fixed_Number: "FixedNumber",
|
|
40339
|
-
/** 变量校验 */
|
|
40340
|
-
Variable_Validate: "VariableValidate"
|
|
40341
|
-
};
|
|
40342
|
-
const FieldSysVarDefaultValueConst = {
|
|
40343
|
-
NULL: "",
|
|
40344
|
-
/** 系统登录用户 */
|
|
40345
|
-
CURRENT_USER: "CURRENT_USER",
|
|
40346
|
-
/** 当前登录用户主部门 */
|
|
40347
|
-
CURRENT_ORG: "CURRENT_ORG"
|
|
40348
|
-
};
|
|
40349
|
-
const SignatureNumberTypeConst = {
|
|
40350
|
-
/** 单人签名 */
|
|
40351
|
-
SIGNATURE_SINGLE: "signature_single",
|
|
40352
|
-
/** 多人签名 */
|
|
40353
|
-
SIGNATURE_MULTIPLE: "signature_multiple"
|
|
40354
|
-
};
|
|
40355
|
-
const SignatureTypeConst = {
|
|
40356
|
-
/** 仅签名 */
|
|
40357
|
-
SIGNATURE_ONLY: "signature_only",
|
|
40358
|
-
/** 签名及日期 */
|
|
40359
|
-
SIGNATURE_DATE: "signature_date",
|
|
40360
|
-
/** 签名及日期时间 */
|
|
40361
|
-
SIGNATURE_DATETIME: "signature_datetime"
|
|
40362
|
-
};
|
|
40363
|
-
const SignatureTimeTypeConst = {
|
|
40364
|
-
/** 跟随签名 */
|
|
40365
|
-
FOLLOW_SIGNATURE: "follow_signature",
|
|
40366
|
-
/** 填充新字段 */
|
|
40367
|
-
POPULATE_FIELD: "populate_field"
|
|
40368
|
-
};
|
|
40369
|
-
const SignDisplayTypeConst = {
|
|
40370
|
-
/** 垂直显示 */
|
|
40371
|
-
VERTICAL: "vertical",
|
|
40372
|
-
/** 水平显示 */
|
|
40373
|
-
HORIZONTAL: "horizontal"
|
|
40374
|
-
};
|
|
40375
|
-
const ImageDisplayModeConst = {
|
|
40376
|
-
/** 自定义 */
|
|
40377
|
-
CUSTOM: "CUSTOM",
|
|
40378
|
-
/** 自适应 */
|
|
40379
|
-
ADAPTIVE: "ADAPTIVE"
|
|
40380
|
-
};
|
|
40381
|
-
const FieldDependencyTypeConst = {
|
|
40382
|
-
/**隐藏 */
|
|
40383
|
-
Hidden: "hidden",
|
|
40384
|
-
/**只读 */
|
|
40385
|
-
Readonly: "readonly",
|
|
40386
|
-
/**禁用 */
|
|
40387
|
-
Disabled: "disabled",
|
|
40388
|
-
/**必填 */
|
|
40389
|
-
Required: "required",
|
|
40390
|
-
/**赋值 */
|
|
40391
|
-
Assignment: "assignment"
|
|
40392
|
-
};
|
|
40393
|
-
const AssignmentStrategyTypeConst = {
|
|
40394
|
-
/**始终覆盖 */
|
|
40395
|
-
AlwaysCover: "alwaysCover",
|
|
40396
|
-
/**不覆盖已修改 */
|
|
40397
|
-
NotCovered: "notCovered"
|
|
40398
|
-
};
|
|
40399
|
-
const FormTypeConst = {
|
|
40400
|
-
/** 基础表单 */
|
|
40401
|
-
BASE: "BASE",
|
|
40402
|
-
/** 流程表单 */
|
|
40403
|
-
PROCESS: "PROCESS",
|
|
40404
|
-
/** 视图表单 */
|
|
40405
|
-
VIEW: "VIEW",
|
|
40406
|
-
/** 文本表单 */
|
|
40407
|
-
TEXT: "TEXT",
|
|
40408
|
-
/** 文件表单 */
|
|
40409
|
-
FILE: "FILE"
|
|
40410
|
-
};
|
|
40411
|
-
const ViewTypeConst = {
|
|
40412
|
-
/** 视图模型(查询视图) */
|
|
40413
|
-
VIEW_MODEL: "VIEW_MODEL",
|
|
40414
|
-
/** SQL数据视图 */
|
|
40415
|
-
VIEW_SQL: "SQL",
|
|
40416
|
-
/** 自定义模型 */
|
|
40417
|
-
VIEW_JS: "JS"
|
|
40418
|
-
};
|
|
40419
|
-
const BwipCodeTypeConst = {
|
|
40420
|
-
Code39: "code39",
|
|
40421
|
-
Code128: "code128",
|
|
40422
|
-
QRCode: "qrcode",
|
|
40423
|
-
GS1DataMatrix: "gs1datamatrix"
|
|
40424
|
-
};
|
|
40425
|
-
const ValueTypeConst = {
|
|
40426
|
-
/** 固定值 */
|
|
40427
|
-
Fixed: "fixed",
|
|
40428
|
-
/** 字段 */
|
|
40429
|
-
Field: "field",
|
|
40430
|
-
/** 公式 */
|
|
40431
|
-
Formula: "formula"
|
|
40432
|
-
};
|
|
40433
|
-
const ImageSizeModeTypeConst = {
|
|
40434
|
-
/** 自适应,响应式的适应外层容器的大小 */
|
|
40435
|
-
RESPONSIVE: "responsive",
|
|
40436
|
-
/** 固定值,高宽设了多少就是多少 */
|
|
40437
|
-
FIXED: "fixed"
|
|
40438
|
-
};
|
|
40439
|
-
const DiagonalDirectionTypeConst = {
|
|
40440
|
-
/** 从左上到右下 */
|
|
40441
|
-
Forward: "forward",
|
|
40442
|
-
/** 从右上到左下 / */
|
|
40443
|
-
Backward: "backward"
|
|
40444
|
-
};
|
|
40445
40750
|
class SignatureHandler extends BaseHandler$1 {
|
|
40446
40751
|
static layout(ctx) {
|
|
40447
40752
|
this.layoutField(ctx);
|
|
@@ -40540,7 +40845,7 @@ class InputHandler extends BaseHandler$1 {
|
|
|
40540
40845
|
static layoutField(ctx) {
|
|
40541
40846
|
const { context, wr } = ctx;
|
|
40542
40847
|
const valuePath = context.getValuePath(wr.valuePath);
|
|
40543
|
-
let label = this.
|
|
40848
|
+
let label = this.formatFieldValue(ctx, valuePath);
|
|
40544
40849
|
let isEmptyPlaceholder = false;
|
|
40545
40850
|
if (!this.hasValue(label)) {
|
|
40546
40851
|
label = this.getNoValueLabel(ctx).label;
|
|
@@ -41095,11 +41400,16 @@ class TableRow extends LayoutGroup {
|
|
|
41095
41400
|
component = BuiltinComponentTypeConst.TableRow;
|
|
41096
41401
|
// 允许行内分割
|
|
41097
41402
|
allowRowSplit = true;
|
|
41403
|
+
// 原始模型中的真实行索引
|
|
41404
|
+
realRowIndex = -1;
|
|
41098
41405
|
constructor(options) {
|
|
41099
41406
|
super(options);
|
|
41100
41407
|
if (options.allowRowSplit !== void 0) {
|
|
41101
41408
|
this.allowRowSplit = options.allowRowSplit;
|
|
41102
41409
|
}
|
|
41410
|
+
if (typeof options.realRowIndex === "number") {
|
|
41411
|
+
this.realRowIndex = options.realRowIndex;
|
|
41412
|
+
}
|
|
41103
41413
|
}
|
|
41104
41414
|
get width() {
|
|
41105
41415
|
return this.parent.width;
|
|
@@ -41367,14 +41677,16 @@ class TableSplitter {
|
|
|
41367
41677
|
doc: this.table.doc,
|
|
41368
41678
|
height: tHeight,
|
|
41369
41679
|
y: row.y,
|
|
41370
|
-
modelRef: row.modelRef
|
|
41680
|
+
modelRef: row.modelRef,
|
|
41681
|
+
realRowIndex: row.realRowIndex
|
|
41371
41682
|
});
|
|
41372
41683
|
const bRow = new TableRow({
|
|
41373
41684
|
doc: this.table.doc,
|
|
41374
41685
|
height: bHeight,
|
|
41375
41686
|
// height: 0,
|
|
41376
41687
|
// height: 33,
|
|
41377
|
-
modelRef: row.modelRef
|
|
41688
|
+
modelRef: row.modelRef,
|
|
41689
|
+
realRowIndex: row.realRowIndex
|
|
41378
41690
|
});
|
|
41379
41691
|
row.getChildren().forEach((cell) => {
|
|
41380
41692
|
const opt = {
|
|
@@ -41405,7 +41717,8 @@ class TableSplitter {
|
|
|
41405
41717
|
doc: this.table.doc,
|
|
41406
41718
|
height: originalRow.height,
|
|
41407
41719
|
y: originalRow.y,
|
|
41408
|
-
modelRef: originalRow.modelRef
|
|
41720
|
+
modelRef: originalRow.modelRef,
|
|
41721
|
+
realRowIndex: originalRow.realRowIndex
|
|
41409
41722
|
});
|
|
41410
41723
|
originalRow.getChildren().forEach((cell) => {
|
|
41411
41724
|
const newCell = new TableCell({
|
|
@@ -41435,7 +41748,8 @@ class TableSplitter {
|
|
|
41435
41748
|
const newRow = new TableRow({
|
|
41436
41749
|
doc: this.table.doc,
|
|
41437
41750
|
height: originalRow.height,
|
|
41438
|
-
modelRef: originalRow.modelRef
|
|
41751
|
+
modelRef: originalRow.modelRef,
|
|
41752
|
+
realRowIndex: originalRow.realRowIndex
|
|
41439
41753
|
});
|
|
41440
41754
|
originalRow.getChildren().forEach((cell) => {
|
|
41441
41755
|
let finalCell;
|
|
@@ -42044,8 +42358,8 @@ class TableExpander {
|
|
|
42044
42358
|
const tlr = itemRange.start.row;
|
|
42045
42359
|
const tlc = itemRange.start.col;
|
|
42046
42360
|
let dataIndex = 1;
|
|
42047
|
-
let currentCol = itemRange.end.col + 1;
|
|
42048
42361
|
let currentRow = itemRange.start.row;
|
|
42362
|
+
let currentCol = itemRange.end.col + 1;
|
|
42049
42363
|
while (currentRow + itemHeight - 1 <= range3.end.row) {
|
|
42050
42364
|
while (currentCol + itemWidth - 1 <= range3.end.col) {
|
|
42051
42365
|
for (let r = currentRow; r < currentRow + itemHeight; r++) {
|
|
@@ -42449,7 +42763,8 @@ class LayoutManager {
|
|
|
42449
42763
|
const tableRow = new TableRow({
|
|
42450
42764
|
doc: this.doc,
|
|
42451
42765
|
modelRef: provider.getRowModelRef(row),
|
|
42452
|
-
allowRowSplit: provider.getAllowRowSplit(rIndex)
|
|
42766
|
+
allowRowSplit: provider.getAllowRowSplit(rIndex),
|
|
42767
|
+
realRowIndex: rIndex
|
|
42453
42768
|
});
|
|
42454
42769
|
table.addChild(tableRow);
|
|
42455
42770
|
tableRow.applyHeightRule(provider.getWtr(row));
|
|
@@ -42535,7 +42850,8 @@ class LayoutManager {
|
|
|
42535
42850
|
if (!row) return;
|
|
42536
42851
|
const tableRow = new TableRow({
|
|
42537
42852
|
doc: this.doc,
|
|
42538
|
-
modelRef: provider.getRowModelRef(row)
|
|
42853
|
+
modelRef: provider.getRowModelRef(row),
|
|
42854
|
+
realRowIndex: rowIndex
|
|
42539
42855
|
});
|
|
42540
42856
|
next.insertChild(rowIndex, tableRow);
|
|
42541
42857
|
tableRow.applyHeightRule(provider.getWtr(row));
|
|
@@ -43599,12 +43915,12 @@ class CursorController {
|
|
|
43599
43915
|
resolveCursorAtNode(data) {
|
|
43600
43916
|
const node = this.doc.layoutMapper.getBaseMetaNodeById(data.nodeId);
|
|
43601
43917
|
const cursor = this.doc.cursorManager.getCursor();
|
|
43602
|
-
if (!node
|
|
43918
|
+
if (!node) return;
|
|
43603
43919
|
const registry2 = getRegistry();
|
|
43604
43920
|
const intent = {
|
|
43605
43921
|
kind: "point",
|
|
43606
|
-
offset: cursor
|
|
43607
|
-
side: data.side || cursor
|
|
43922
|
+
offset: cursor?.offset || 0,
|
|
43923
|
+
side: data.side || cursor?.side || "after"
|
|
43608
43924
|
};
|
|
43609
43925
|
const hitResult = registry2.resolveCursorIntent(this.doc, node, intent);
|
|
43610
43926
|
if (hitResult) {
|
|
@@ -43799,7 +44115,8 @@ class InteractionController {
|
|
|
43799
44115
|
this.doc.interactionManager.set("tableSelection", {
|
|
43800
44116
|
tableId: payload.id,
|
|
43801
44117
|
axis: "row",
|
|
43802
|
-
index: payload.index
|
|
44118
|
+
index: payload.index,
|
|
44119
|
+
realRowIndex: payload.realRowIndex
|
|
43803
44120
|
});
|
|
43804
44121
|
}
|
|
43805
44122
|
onSelectTableCol(payload) {
|
|
@@ -43834,11 +44151,12 @@ class InteractionController {
|
|
|
43834
44151
|
return;
|
|
43835
44152
|
}
|
|
43836
44153
|
const tableId = meta.line.tableId;
|
|
43837
|
-
|
|
44154
|
+
const tableMeta = this.doc.layoutMapper.getBaseMetaNodeById(tableId);
|
|
44155
|
+
if (!tableMeta) {
|
|
43838
44156
|
this.clearActiveTableId();
|
|
43839
44157
|
return;
|
|
43840
44158
|
}
|
|
43841
|
-
this.onSetActiveTableId(
|
|
44159
|
+
this.onSetActiveTableId(tableMeta.raw?.modelRef.id);
|
|
43842
44160
|
}
|
|
43843
44161
|
resolveIntent(id, hitId) {
|
|
43844
44162
|
const meta = this.doc.layoutMapper.getBaseMetaNodeById(id);
|
|
@@ -50647,7 +50965,8 @@ async function initializeDocumentEngine(props, payload, result) {
|
|
|
50647
50965
|
handleInfo: {
|
|
50648
50966
|
btnRenderModeType: result.btnModelType,
|
|
50649
50967
|
bpmnType: result.bpmnType,
|
|
50650
|
-
bpmnFieldAuthMap: result.bpmnFieldAuthMap
|
|
50968
|
+
bpmnFieldAuthMap: result.bpmnFieldAuthMap,
|
|
50969
|
+
initDocModelJson: JSON.stringify(docModel.toXmlJson())
|
|
50651
50970
|
}
|
|
50652
50971
|
};
|
|
50653
50972
|
const doc = new Doc({
|
|
@@ -53093,6 +53412,7 @@ function useSpecificConfig(options) {
|
|
|
53093
53412
|
if (digits !== void 0) {
|
|
53094
53413
|
specificConfig.digits = digits;
|
|
53095
53414
|
}
|
|
53415
|
+
specificConfig.rulesForRounding = fieldInfo?.value?.specificConfig?.rulesForRounding ?? 6;
|
|
53096
53416
|
}
|
|
53097
53417
|
function useWidgetInitializer(options) {
|
|
53098
53418
|
const init2 = (isSupport) => {
|
|
@@ -53210,6 +53530,15 @@ const _sfc_main$2P = /* @__PURE__ */ defineComponent({
|
|
|
53210
53530
|
if (!activeRules.length) return;
|
|
53211
53531
|
const errors = await validateField(runtimeValuePath.value, modelValue.value, activeRules, {});
|
|
53212
53532
|
props.doc.eventManager.dispatchCustom("inter:show-validation-comment", errors);
|
|
53533
|
+
setTimeout(() => {
|
|
53534
|
+
const scrollContainer = document.querySelector(".render-container");
|
|
53535
|
+
if (scrollContainer) {
|
|
53536
|
+
scrollContainer.scrollTo({
|
|
53537
|
+
left: scrollContainer.scrollWidth,
|
|
53538
|
+
behavior: "smooth"
|
|
53539
|
+
});
|
|
53540
|
+
}
|
|
53541
|
+
}, 120);
|
|
53213
53542
|
}
|
|
53214
53543
|
function openDialog() {
|
|
53215
53544
|
if (!isDialog.value || showReadonly.value || showDisabled.value) return;
|
|
@@ -53303,7 +53632,7 @@ const _sfc_main$2P = /* @__PURE__ */ defineComponent({
|
|
|
53303
53632
|
};
|
|
53304
53633
|
}
|
|
53305
53634
|
});
|
|
53306
|
-
const OverlayRender = /* @__PURE__ */ _export_sfc(_sfc_main$2P, [["__scopeId", "data-v-
|
|
53635
|
+
const OverlayRender = /* @__PURE__ */ _export_sfc(_sfc_main$2P, [["__scopeId", "data-v-fdedefbc"]]);
|
|
53307
53636
|
let activeHoverId = 0;
|
|
53308
53637
|
function useHoverDelay(callback, delay = 120) {
|
|
53309
53638
|
let timer = null;
|
|
@@ -54879,10 +55208,10 @@ const _hoisted_1$1Q = { class: "col-headers" };
|
|
|
54879
55208
|
const _hoisted_2$1b = ["onMouseenter"];
|
|
54880
55209
|
const _hoisted_3$T = ["onClick"];
|
|
54881
55210
|
const _hoisted_4$E = ["onMousedown"];
|
|
54882
|
-
const _hoisted_5$
|
|
55211
|
+
const _hoisted_5$u = { class: "row-headers" };
|
|
54883
55212
|
const _hoisted_6$m = ["onMouseenter"];
|
|
54884
55213
|
const _hoisted_7$i = ["onClick"];
|
|
54885
|
-
const _hoisted_8$
|
|
55214
|
+
const _hoisted_8$f = ["onMousedown"];
|
|
54886
55215
|
const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
54887
55216
|
__name: "index",
|
|
54888
55217
|
props: {
|
|
@@ -54913,7 +55242,7 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
54913
55242
|
});
|
|
54914
55243
|
const tableId = computed(() => props.widget.id);
|
|
54915
55244
|
const isCurrentTableActive = computed(() => {
|
|
54916
|
-
return interaction.activeTableId ===
|
|
55245
|
+
return interaction.activeTableId === props.widget.modelRef?.id;
|
|
54917
55246
|
});
|
|
54918
55247
|
const pageBaseOffset = computed(() => {
|
|
54919
55248
|
const node = props.doc.layoutMapper.getBaseMetaNodeById(tableId.value);
|
|
@@ -54934,8 +55263,15 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
54934
55263
|
};
|
|
54935
55264
|
});
|
|
54936
55265
|
const isPreview = computed(() => props.widget.doc.preview);
|
|
54937
|
-
function onHeaderEnter(axis, index2) {
|
|
54938
|
-
emit("update:axis-hover", {
|
|
55266
|
+
function onHeaderEnter(axis, index2, row) {
|
|
55267
|
+
emit("update:axis-hover", {
|
|
55268
|
+
...props.axisHover,
|
|
55269
|
+
show: false,
|
|
55270
|
+
axis,
|
|
55271
|
+
index: index2,
|
|
55272
|
+
realRowIndex: row?.realRowIndex,
|
|
55273
|
+
side: null
|
|
55274
|
+
});
|
|
54939
55275
|
}
|
|
54940
55276
|
function onHeaderMove(axis, e) {
|
|
54941
55277
|
if (!props.axisHover) return;
|
|
@@ -54958,19 +55294,19 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
54958
55294
|
function selectAll() {
|
|
54959
55295
|
dispatch("inter:stall", { id: tableId.value });
|
|
54960
55296
|
}
|
|
54961
|
-
function selectAxis(axis, index2) {
|
|
55297
|
+
function selectAxis(axis, index2, row) {
|
|
54962
55298
|
if (axis === "row") {
|
|
54963
|
-
dispatch("inter:str", { id: tableId.value, index: index2 });
|
|
55299
|
+
dispatch("inter:str", { id: tableId.value, index: index2, realRowIndex: row.realRowIndex });
|
|
54964
55300
|
} else {
|
|
54965
55301
|
dispatch("inter:stc", { id: tableId.value, index: index2 });
|
|
54966
55302
|
}
|
|
54967
55303
|
}
|
|
54968
|
-
function onResizeMouseDown(axis, index2, e) {
|
|
55304
|
+
function onResizeMouseDown(axis, index2, e, row) {
|
|
54969
55305
|
e.preventDefault();
|
|
54970
55306
|
e.stopPropagation();
|
|
54971
55307
|
const start = axis === "col" ? e.clientX : e.clientY;
|
|
54972
55308
|
const base = axis === "col" ? props.colWidths.slice(0, index2 + 1).reduce((a, b2) => a + b2, 0) : props.rows.slice(0, index2 + 1).reduce((a, r) => a + r.height, 0);
|
|
54973
|
-
dragging.value = { axis, index: index2, start, base };
|
|
55309
|
+
dragging.value = { axis, index: index2, realRowIndex: row?.realRowIndex, start, base };
|
|
54974
55310
|
axis === "col" ? guideColX.value = base : guideRowY.value = base;
|
|
54975
55311
|
document.addEventListener("mousemove", onResizeMove);
|
|
54976
55312
|
document.addEventListener("mouseup", onResizeUp);
|
|
@@ -54995,7 +55331,10 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
54995
55331
|
const rowIndex = dragging.value.index;
|
|
54996
55332
|
const delta = guideRowY.value - dragging.value.base;
|
|
54997
55333
|
const newHeight = props.rows[rowIndex]?.height + delta;
|
|
54998
|
-
actionHandlers["resizeRow"]?.({
|
|
55334
|
+
actionHandlers["resizeRow"]?.({
|
|
55335
|
+
index: dragging.value.realRowIndex || dragging.value.index,
|
|
55336
|
+
height: newHeight
|
|
55337
|
+
});
|
|
54999
55338
|
}
|
|
55000
55339
|
guideColX.value = null;
|
|
55001
55340
|
guideRowY.value = null;
|
|
@@ -55016,7 +55355,7 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55016
55355
|
},
|
|
55017
55356
|
insertRow() {
|
|
55018
55357
|
if (!props.axisHover) return;
|
|
55019
|
-
const hoverIndex = props.axisHover.
|
|
55358
|
+
const hoverIndex = props.axisHover.realRowIndex || 0;
|
|
55020
55359
|
const index2 = props.axisHover.side === "top" ? hoverIndex : hoverIndex + 1;
|
|
55021
55360
|
docInst.value.execute(CommandType.insertRow, {
|
|
55022
55361
|
tableId: tableId.value,
|
|
@@ -55035,7 +55374,7 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55035
55374
|
if (!interaction.tableSelection) return;
|
|
55036
55375
|
docInst.value.execute(CommandType.deleteRow, {
|
|
55037
55376
|
tableId: tableId.value,
|
|
55038
|
-
rowIndex: interaction.tableSelection.index
|
|
55377
|
+
rowIndex: interaction.tableSelection.realRowIndex || interaction.tableSelection.index
|
|
55039
55378
|
});
|
|
55040
55379
|
},
|
|
55041
55380
|
deleteAll() {
|
|
@@ -55163,14 +55502,14 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55163
55502
|
]);
|
|
55164
55503
|
}), 128))
|
|
55165
55504
|
]),
|
|
55166
|
-
createElementVNode("div", _hoisted_5$
|
|
55505
|
+
createElementVNode("div", _hoisted_5$u, [
|
|
55167
55506
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row, rowIndex) => {
|
|
55168
55507
|
return openBlock(), createElementBlock("div", {
|
|
55169
55508
|
key: row.id,
|
|
55170
55509
|
class: "row-header"
|
|
55171
55510
|
}, [
|
|
55172
55511
|
createElementVNode("div", {
|
|
55173
|
-
onMouseenter: ($event) => onHeaderEnter("row", rowIndex),
|
|
55512
|
+
onMouseenter: ($event) => onHeaderEnter("row", rowIndex, row),
|
|
55174
55513
|
onMousemove: _cache[12] || (_cache[12] = ($event) => onHeaderMove("row", $event)),
|
|
55175
55514
|
onMouseleave: _cache[13] || (_cache[13] = ($event) => onHeaderLeave())
|
|
55176
55515
|
}, [
|
|
@@ -55180,7 +55519,7 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55180
55519
|
"is-remove-hover": __props.removeHoverBool
|
|
55181
55520
|
}]),
|
|
55182
55521
|
style: normalizeStyle({ height: row.height + "px" }),
|
|
55183
|
-
onClick: ($event) => selectAxis("row", rowIndex)
|
|
55522
|
+
onClick: ($event) => selectAxis("row", rowIndex, row)
|
|
55184
55523
|
}, null, 14, _hoisted_7$i),
|
|
55185
55524
|
__props.axisHover?.axis === "row" && __props.axisHover.index === rowIndex ? (openBlock(), createElementBlock("div", {
|
|
55186
55525
|
key: 0,
|
|
@@ -55215,8 +55554,8 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55215
55554
|
style: normalizeStyle({
|
|
55216
55555
|
width: `${__props.tableWidth}px`
|
|
55217
55556
|
}),
|
|
55218
|
-
onMousedown: ($event) => onResizeMouseDown("row", rowIndex, $event)
|
|
55219
|
-
}, null, 46, _hoisted_8$
|
|
55557
|
+
onMousedown: ($event) => onResizeMouseDown("row", rowIndex, $event, row)
|
|
55558
|
+
}, null, 46, _hoisted_8$f)
|
|
55220
55559
|
]);
|
|
55221
55560
|
}), 128))
|
|
55222
55561
|
])
|
|
@@ -55225,7 +55564,7 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55225
55564
|
};
|
|
55226
55565
|
}
|
|
55227
55566
|
});
|
|
55228
|
-
const TableActionOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$2B, [["__scopeId", "data-v-
|
|
55567
|
+
const TableActionOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$2B, [["__scopeId", "data-v-c40eef9f"]]);
|
|
55229
55568
|
const _sfc_main$2A = /* @__PURE__ */ defineComponent({
|
|
55230
55569
|
__name: "table-guide-line",
|
|
55231
55570
|
props: {
|
|
@@ -55458,10 +55797,10 @@ const _hoisted_1$1P = { class: "sub-table-action-content" };
|
|
|
55458
55797
|
const _hoisted_2$1a = { class: "action-group" };
|
|
55459
55798
|
const _hoisted_3$S = { class: "insert-row-container" };
|
|
55460
55799
|
const _hoisted_4$D = { class: "insert-row-item" };
|
|
55461
|
-
const _hoisted_5$
|
|
55800
|
+
const _hoisted_5$t = { class: "insert-row-item" };
|
|
55462
55801
|
const _hoisted_6$l = { class: "sub-table-btn" };
|
|
55463
55802
|
const _hoisted_7$h = { class: "sub-table-action-bar" };
|
|
55464
|
-
const _hoisted_8$
|
|
55803
|
+
const _hoisted_8$e = { class: "sub-table-btn" };
|
|
55465
55804
|
const _sfc_main$2x = /* @__PURE__ */ defineComponent({
|
|
55466
55805
|
__name: "sub-table-action",
|
|
55467
55806
|
props: {
|
|
@@ -55591,7 +55930,7 @@ const _sfc_main$2x = /* @__PURE__ */ defineComponent({
|
|
|
55591
55930
|
style: { "width": "68px" }
|
|
55592
55931
|
}, null, 8, ["modelValue"])
|
|
55593
55932
|
]),
|
|
55594
|
-
createElementVNode("div", _hoisted_5$
|
|
55933
|
+
createElementVNode("div", _hoisted_5$t, [
|
|
55595
55934
|
createElementVNode("div", {
|
|
55596
55935
|
class: "title",
|
|
55597
55936
|
onClick: _cache[4] || (_cache[4] = ($event) => handleAction("insertRowAfterMore"))
|
|
@@ -55630,7 +55969,7 @@ const _sfc_main$2x = /* @__PURE__ */ defineComponent({
|
|
|
55630
55969
|
]),
|
|
55631
55970
|
default: withCtx(() => [
|
|
55632
55971
|
createElementVNode("div", _hoisted_7$h, [
|
|
55633
|
-
createElementVNode("div", _hoisted_8$
|
|
55972
|
+
createElementVNode("div", _hoisted_8$e, [
|
|
55634
55973
|
createVNode(unref(GctIcon), {
|
|
55635
55974
|
icon: "icon-neibuyingyong",
|
|
55636
55975
|
color: "#5378ff"
|
|
@@ -55805,6 +56144,7 @@ const _sfc_main$2u = /* @__PURE__ */ defineComponent({
|
|
|
55805
56144
|
y: row.y,
|
|
55806
56145
|
layoutY: row.layoutY,
|
|
55807
56146
|
height: row.height,
|
|
56147
|
+
realRowIndex: row.realRowIndex,
|
|
55808
56148
|
cells: row.getChildren().map((cell) => ({
|
|
55809
56149
|
id: cell.id,
|
|
55810
56150
|
x: cell.x,
|
|
@@ -56166,6 +56506,14 @@ function useDocOperations(docRef) {
|
|
|
56166
56506
|
function getDoc() {
|
|
56167
56507
|
return docRef.value ?? null;
|
|
56168
56508
|
}
|
|
56509
|
+
function buildSaveCheckpoint() {
|
|
56510
|
+
const doc = getDoc();
|
|
56511
|
+
if (!doc) return null;
|
|
56512
|
+
return {
|
|
56513
|
+
interfaceModel: doc.docRuntimeMeta.handleInfo.initDocModelJson,
|
|
56514
|
+
currentModel: JSON.stringify(exportModel())
|
|
56515
|
+
};
|
|
56516
|
+
}
|
|
56169
56517
|
async function validate() {
|
|
56170
56518
|
const doc = getDoc();
|
|
56171
56519
|
if (!doc) return null;
|
|
@@ -56219,13 +56567,27 @@ function useDocOperations(docRef) {
|
|
|
56219
56567
|
focus: ids.length ? `root::${firstPage.id}` : null
|
|
56220
56568
|
});
|
|
56221
56569
|
}
|
|
56570
|
+
function getUnsavedChanges() {
|
|
56571
|
+
const currentCheckpoint = buildSaveCheckpoint();
|
|
56572
|
+
if (!currentCheckpoint) {
|
|
56573
|
+
return { dirty: false };
|
|
56574
|
+
}
|
|
56575
|
+
const changedScopes = [];
|
|
56576
|
+
if (!isEqual(currentCheckpoint.currentModel, currentCheckpoint.interfaceModel)) {
|
|
56577
|
+
changedScopes.push("model");
|
|
56578
|
+
}
|
|
56579
|
+
return {
|
|
56580
|
+
dirty: changedScopes.length > 0
|
|
56581
|
+
};
|
|
56582
|
+
}
|
|
56222
56583
|
return {
|
|
56223
56584
|
validate,
|
|
56224
56585
|
exportModel,
|
|
56225
56586
|
getDocumentAttachmentPaths,
|
|
56226
56587
|
enterBaseline,
|
|
56227
56588
|
computeBaselineChanges,
|
|
56228
|
-
setAnnotation
|
|
56589
|
+
setAnnotation,
|
|
56590
|
+
getUnsavedChanges
|
|
56229
56591
|
};
|
|
56230
56592
|
}
|
|
56231
56593
|
function useDocController(factory2, ops) {
|
|
@@ -56292,6 +56654,9 @@ function useDocController(factory2, ops) {
|
|
|
56292
56654
|
computeBaselineChanges(ctx) {
|
|
56293
56655
|
return ops.computeBaselineChanges(ctx);
|
|
56294
56656
|
},
|
|
56657
|
+
getUnsavedChanges() {
|
|
56658
|
+
return ops.getUnsavedChanges();
|
|
56659
|
+
},
|
|
56295
56660
|
setAnnotation(ids, list) {
|
|
56296
56661
|
ops.setAnnotation(ids, list);
|
|
56297
56662
|
}
|
|
@@ -56301,6 +56666,314 @@ function useDocController(factory2, ops) {
|
|
|
56301
56666
|
);
|
|
56302
56667
|
return controller;
|
|
56303
56668
|
}
|
|
56669
|
+
var DeviceLink;
|
|
56670
|
+
((DeviceLink2) => {
|
|
56671
|
+
((TmplTypeEnum2) => {
|
|
56672
|
+
TmplTypeEnum2["DEVICE_INTERCONNECTION"] = "DEVICE_INTERCONNECTION";
|
|
56673
|
+
TmplTypeEnum2["AI_OCR"] = "AI_OCR";
|
|
56674
|
+
})(DeviceLink2.TmplTypeEnum || (DeviceLink2.TmplTypeEnum = {}));
|
|
56675
|
+
((DenoiseMethodEnum2) => {
|
|
56676
|
+
DenoiseMethodEnum2["GAUSSIAN"] = "gaussian";
|
|
56677
|
+
DenoiseMethodEnum2["BILATERAL"] = "bilateral";
|
|
56678
|
+
DenoiseMethodEnum2["MEDIAN"] = "bilateral";
|
|
56679
|
+
})(DeviceLink2.DenoiseMethodEnum || (DeviceLink2.DenoiseMethodEnum = {}));
|
|
56680
|
+
((BinarizeMethodEnum2) => {
|
|
56681
|
+
BinarizeMethodEnum2["ADAPTIVE"] = "adaptive";
|
|
56682
|
+
BinarizeMethodEnum2["OTSU"] = "otsu";
|
|
56683
|
+
BinarizeMethodEnum2["SIMPLE"] = "simple";
|
|
56684
|
+
})(DeviceLink2.BinarizeMethodEnum || (DeviceLink2.BinarizeMethodEnum = {}));
|
|
56685
|
+
((AiInputModeEnum2) => {
|
|
56686
|
+
AiInputModeEnum2["UPLOAD"] = "UPLOAD";
|
|
56687
|
+
AiInputModeEnum2["CAMERA"] = "CAMERA";
|
|
56688
|
+
})(DeviceLink2.AiInputModeEnum || (DeviceLink2.AiInputModeEnum = {}));
|
|
56689
|
+
((DeviceLinkTypeEnum2) => {
|
|
56690
|
+
DeviceLinkTypeEnum2["IPAAS"] = "IPAAS";
|
|
56691
|
+
DeviceLinkTypeEnum2["MQTT"] = "MQTT";
|
|
56692
|
+
})(DeviceLink2.DeviceLinkTypeEnum || (DeviceLink2.DeviceLinkTypeEnum = {}));
|
|
56693
|
+
})(DeviceLink || (DeviceLink = {}));
|
|
56694
|
+
class DeviceLinkTmplUtil {
|
|
56695
|
+
/**
|
|
56696
|
+
* 创建模板数据
|
|
56697
|
+
* @param type
|
|
56698
|
+
* @return {*}
|
|
56699
|
+
*/
|
|
56700
|
+
static createTmpl(type4) {
|
|
56701
|
+
const tmpl = {
|
|
56702
|
+
id: uuid(),
|
|
56703
|
+
type: type4
|
|
56704
|
+
};
|
|
56705
|
+
if (type4 === DeviceLink.TmplTypeEnum.AI_OCR) {
|
|
56706
|
+
Object.assign(tmpl, {
|
|
56707
|
+
identifyParams: [
|
|
56708
|
+
{
|
|
56709
|
+
prompt: void 0,
|
|
56710
|
+
formField: void 0
|
|
56711
|
+
}
|
|
56712
|
+
],
|
|
56713
|
+
denoiseMethod: DeviceLink.DenoiseMethodEnum.GAUSSIAN,
|
|
56714
|
+
binarizeMethod: DeviceLink.BinarizeMethodEnum.ADAPTIVE
|
|
56715
|
+
});
|
|
56716
|
+
}
|
|
56717
|
+
return tmpl;
|
|
56718
|
+
}
|
|
56719
|
+
/**
|
|
56720
|
+
* 计算完整的提示词
|
|
56721
|
+
* @static
|
|
56722
|
+
* @param tmpl
|
|
56723
|
+
* @return {*}
|
|
56724
|
+
*/
|
|
56725
|
+
static calcEntirePrompt(tmpl) {
|
|
56726
|
+
const paramsStr = tmpl.identifyParams?.map((item) => {
|
|
56727
|
+
return `图中${item.prompt}绑定${item.formField?.split(".")[1]}字段`;
|
|
56728
|
+
}).join(",");
|
|
56729
|
+
const jsonObj = tmpl.identifyParams?.reduce((acc, cur) => {
|
|
56730
|
+
acc[cur.formField?.split(".")[1]] = {
|
|
56731
|
+
value: null
|
|
56732
|
+
};
|
|
56733
|
+
return acc;
|
|
56734
|
+
}, {});
|
|
56735
|
+
const result = `这是一台${tmpl.deviceName ?? ""}设备/仪器图片,${paramsStr},请识别图片中的读数,以
|
|
56736
|
+
${JSON.stringify(
|
|
56737
|
+
jsonObj,
|
|
56738
|
+
null,
|
|
56739
|
+
2
|
|
56740
|
+
)}
|
|
56741
|
+
格式返回,${tmpl.extraPrompt ?? ""}`;
|
|
56742
|
+
return result;
|
|
56743
|
+
}
|
|
56744
|
+
/** 平台设备互联接口对象转换格式 */
|
|
56745
|
+
static transfer2DeviceLink(data) {
|
|
56746
|
+
const result = {
|
|
56747
|
+
id: data.id,
|
|
56748
|
+
name: data.name,
|
|
56749
|
+
type: data.type,
|
|
56750
|
+
params: data.schema ? [] : void 0
|
|
56751
|
+
};
|
|
56752
|
+
if (data.schema) {
|
|
56753
|
+
const params = [];
|
|
56754
|
+
const obj = JSON.parse(data.schema);
|
|
56755
|
+
for (const key in obj.properties) {
|
|
56756
|
+
const temp = {
|
|
56757
|
+
code: key,
|
|
56758
|
+
name: obj.properties[key].description || "数组结构",
|
|
56759
|
+
type: obj.properties[key].type,
|
|
56760
|
+
remark: obj.properties[key].remark,
|
|
56761
|
+
children: []
|
|
56762
|
+
};
|
|
56763
|
+
if (obj.properties[key].items && obj.properties[key].items.properties) {
|
|
56764
|
+
temp.children = [];
|
|
56765
|
+
for (const subkey in obj.properties[key].items.properties) {
|
|
56766
|
+
temp.children.push({
|
|
56767
|
+
code: subkey,
|
|
56768
|
+
name: obj.properties[key].items.properties[subkey].description,
|
|
56769
|
+
type: obj.properties[key].items.properties[subkey].type,
|
|
56770
|
+
remark: obj.properties[key].remark
|
|
56771
|
+
});
|
|
56772
|
+
}
|
|
56773
|
+
}
|
|
56774
|
+
params.push(temp);
|
|
56775
|
+
}
|
|
56776
|
+
result.params = params;
|
|
56777
|
+
}
|
|
56778
|
+
return result;
|
|
56779
|
+
}
|
|
56780
|
+
/**
|
|
56781
|
+
* 通过设备id转换成IDeviceLink结构
|
|
56782
|
+
* - 请求获取完整的带参数的数据
|
|
56783
|
+
* - 把参数数据转换成IDeviceLink结构
|
|
56784
|
+
* @static
|
|
56785
|
+
* @param deviceId
|
|
56786
|
+
*/
|
|
56787
|
+
static async getDeviceLink(deviceId) {
|
|
56788
|
+
const res = await api.platform.deviceInterconnection.getInfo({ id: deviceId });
|
|
56789
|
+
if (!res) {
|
|
56790
|
+
return;
|
|
56791
|
+
}
|
|
56792
|
+
return this.transfer2DeviceLink(res);
|
|
56793
|
+
}
|
|
56794
|
+
/**
|
|
56795
|
+
* 初始化设备字段和表单字段映射关系
|
|
56796
|
+
* @static
|
|
56797
|
+
* @param deviceLink
|
|
56798
|
+
*/
|
|
56799
|
+
static initDevice2FormFieldMap(deviceLink) {
|
|
56800
|
+
const fieldMap = [];
|
|
56801
|
+
deviceLink.params?.forEach((item) => {
|
|
56802
|
+
fieldMap.push({
|
|
56803
|
+
isSubField: item.type === "Array",
|
|
56804
|
+
deviceField: item.code,
|
|
56805
|
+
deviceLinkParams: cloneDeep(omit(item, ["children"])),
|
|
56806
|
+
// 冗余参数自身的信息,不存子数据
|
|
56807
|
+
formField: void 0,
|
|
56808
|
+
children: item.children?.map((subItem) => {
|
|
56809
|
+
return {
|
|
56810
|
+
deviceField: subItem.code,
|
|
56811
|
+
deviceLinkParams: cloneDeep(subItem),
|
|
56812
|
+
formField: void 0
|
|
56813
|
+
};
|
|
56814
|
+
})
|
|
56815
|
+
});
|
|
56816
|
+
});
|
|
56817
|
+
return fieldMap;
|
|
56818
|
+
}
|
|
56819
|
+
}
|
|
56820
|
+
const AITooltips = {
|
|
56821
|
+
/** 降噪 */
|
|
56822
|
+
denoise: {
|
|
56823
|
+
title: "适用于照片有噪点、模糊、拍摄环境光线不足的情况",
|
|
56824
|
+
content: "降噪方法\n· 高斯模糊 (gaussian):通用降噪,适合大多数场景\n· 双边滤波 (bilateral):保留边缘细节,适合需要清晰数字的场景\n· 中值滤波 (median):去除椒盐噪点,适合有明显噪点的照片"
|
|
56825
|
+
},
|
|
56826
|
+
/** 对比度 */
|
|
56827
|
+
contrast: {
|
|
56828
|
+
title: "适用于屏幕显示模糊、数字与背景对比度低、反光\n导致看不清的情况",
|
|
56829
|
+
content: "对比度强度\n· 1.0 - 1.5 :轻微增强,适合轻微模糊\n· 1.5 - 2.0 :中等增强,适合一般情况\n· 2.0 - 3.0 :强烈增强,适合严重模糊或低对比度"
|
|
56830
|
+
},
|
|
56831
|
+
/** 二值化 */
|
|
56832
|
+
binarize: {
|
|
56833
|
+
title: "适用于 LCD/LED 屏幕、黑白显示屏、需要突出数字轮廓的场景",
|
|
56834
|
+
content: "二值化方法\n· 自适应阈值 (adaptive):适合光照不均匀的场景,自动调整阈值\n· Otsu 自适应 (Otsu):自动计算最佳阈值,适合大多数场景\n· 简单阈值 (simple):固定阈值,适合光照均匀的场景"
|
|
56835
|
+
},
|
|
56836
|
+
/** 识别参数提示词 */
|
|
56837
|
+
identifyParam: {
|
|
56838
|
+
content: "一般在多值识别时描述位置或值标题名称,\n如:“第一行左上的值”“氢气输入压力”"
|
|
56839
|
+
}
|
|
56840
|
+
};
|
|
56841
|
+
const DenoiseMethodMap = {
|
|
56842
|
+
bilateral: "双边滤波",
|
|
56843
|
+
gaussian: "高斯滤波",
|
|
56844
|
+
median: "中值滤波"
|
|
56845
|
+
};
|
|
56846
|
+
const BinarizeMethodMap = {
|
|
56847
|
+
adaptive: "自适应阈值",
|
|
56848
|
+
otsu: "Otsu 自适应",
|
|
56849
|
+
simple: "简单阈值"
|
|
56850
|
+
};
|
|
56851
|
+
const DenoiseMethodOptions = computed(() => {
|
|
56852
|
+
return Object.values(DeviceLink.DenoiseMethodEnum).map((item) => {
|
|
56853
|
+
return {
|
|
56854
|
+
label: DenoiseMethodMap[item],
|
|
56855
|
+
value: item
|
|
56856
|
+
};
|
|
56857
|
+
});
|
|
56858
|
+
});
|
|
56859
|
+
const BinarizeMethodOptions = computed(() => {
|
|
56860
|
+
return Object.values(DeviceLink.BinarizeMethodEnum).map((item) => {
|
|
56861
|
+
return {
|
|
56862
|
+
label: BinarizeMethodMap[item],
|
|
56863
|
+
value: item
|
|
56864
|
+
};
|
|
56865
|
+
});
|
|
56866
|
+
});
|
|
56867
|
+
const DeviceParamsTypeTitle = {
|
|
56868
|
+
String: "文本",
|
|
56869
|
+
Integer: "整数",
|
|
56870
|
+
Long: "长整数",
|
|
56871
|
+
Float: "小数",
|
|
56872
|
+
Boolean: "布尔",
|
|
56873
|
+
Date: "日期",
|
|
56874
|
+
Array: "数组结构"
|
|
56875
|
+
};
|
|
56876
|
+
class FormTmplConfigController {
|
|
56877
|
+
/** 存储响应式变量 */
|
|
56878
|
+
state = reactive({
|
|
56879
|
+
tmpls: [],
|
|
56880
|
+
runningTmpls: []
|
|
56881
|
+
});
|
|
56882
|
+
/** 表单模板id */
|
|
56883
|
+
tmplId = "";
|
|
56884
|
+
/** 是否手动模式,手动模式不触发接口 */
|
|
56885
|
+
isManual = false;
|
|
56886
|
+
/**
|
|
56887
|
+
* 初始化
|
|
56888
|
+
*
|
|
56889
|
+
* @param opts
|
|
56890
|
+
* - tmplId 表单模板id
|
|
56891
|
+
*/
|
|
56892
|
+
async init(opts) {
|
|
56893
|
+
this.isManual = !!opts.isManual;
|
|
56894
|
+
this.tmplId = opts.tmplId;
|
|
56895
|
+
this.state.runningTmpls = [];
|
|
56896
|
+
if (!this.isManual) {
|
|
56897
|
+
await this.load();
|
|
56898
|
+
}
|
|
56899
|
+
}
|
|
56900
|
+
/**
|
|
56901
|
+
* 设置获取到的配置数据字符串
|
|
56902
|
+
* @param configStr
|
|
56903
|
+
*/
|
|
56904
|
+
setConfigStr(configStr) {
|
|
56905
|
+
const config = configStr ? JSON.parse(configStr) : {};
|
|
56906
|
+
this.state.tmpls = config.tmpls || [];
|
|
56907
|
+
}
|
|
56908
|
+
getConfigStr() {
|
|
56909
|
+
const cloneTmpls = cloneDeep(this.state.tmpls);
|
|
56910
|
+
cloneTmpls.forEach((tmpl) => {
|
|
56911
|
+
if (tmpl.type === DeviceLink.TmplTypeEnum.AI_OCR) {
|
|
56912
|
+
tmpl.runtimePrompt = DeviceLinkTmplUtil.calcEntirePrompt(tmpl);
|
|
56913
|
+
}
|
|
56914
|
+
});
|
|
56915
|
+
const config = {
|
|
56916
|
+
tmpls: cloneTmpls
|
|
56917
|
+
};
|
|
56918
|
+
console.log("保存数据", config);
|
|
56919
|
+
return JSON.stringify(config);
|
|
56920
|
+
}
|
|
56921
|
+
/** 调用接口加载数据 */
|
|
56922
|
+
async load() {
|
|
56923
|
+
const res = await api.apaas.onlineFormTmpl.getGetCommunicationConfig({ id: this.tmplId });
|
|
56924
|
+
this.setConfigStr(res);
|
|
56925
|
+
}
|
|
56926
|
+
/** 调用接口保存数据 */
|
|
56927
|
+
async save() {
|
|
56928
|
+
const configStr = this.getConfigStr();
|
|
56929
|
+
await api.apaas.onlineFormTmpl.postUpdateCommunicationConfigId(
|
|
56930
|
+
{ id: this.tmplId },
|
|
56931
|
+
{ communicationConfig: configStr }
|
|
56932
|
+
);
|
|
56933
|
+
}
|
|
56934
|
+
/** 调用接口刷新数据 */
|
|
56935
|
+
async refresh() {
|
|
56936
|
+
await this.load();
|
|
56937
|
+
}
|
|
56938
|
+
/** 添加或更新模板,并且调用接口保存并刷新数据 */
|
|
56939
|
+
async createOrUpdate(tmpl) {
|
|
56940
|
+
const index2 = this.state.tmpls.findIndex((item) => item.id === tmpl.id);
|
|
56941
|
+
if (index2 > -1) {
|
|
56942
|
+
this.state.tmpls[index2] = tmpl;
|
|
56943
|
+
} else {
|
|
56944
|
+
this.state.tmpls.push(tmpl);
|
|
56945
|
+
}
|
|
56946
|
+
if (!this.isManual) {
|
|
56947
|
+
await this.save();
|
|
56948
|
+
await this.refresh();
|
|
56949
|
+
}
|
|
56950
|
+
}
|
|
56951
|
+
/** 缓存运行中的模板 */
|
|
56952
|
+
cacheRunningTmpl(tmpl) {
|
|
56953
|
+
if (tmpl.type === DeviceLink.TmplTypeEnum.DEVICE_INTERCONNECTION) {
|
|
56954
|
+
const index2 = this.state.runningTmpls.findIndex((item) => item.id === tmpl.id);
|
|
56955
|
+
if (index2 > -1) {
|
|
56956
|
+
this.state.runningTmpls[index2] = tmpl;
|
|
56957
|
+
} else {
|
|
56958
|
+
this.state.runningTmpls.push(tmpl);
|
|
56959
|
+
}
|
|
56960
|
+
}
|
|
56961
|
+
}
|
|
56962
|
+
}
|
|
56963
|
+
const FormTmplConfigControllerKey = "GctFormTmplConfigControllerWord";
|
|
56964
|
+
function useFormTmplConfig() {
|
|
56965
|
+
function provideController(c2 = new FormTmplConfigController()) {
|
|
56966
|
+
provide(FormTmplConfigControllerKey, c2);
|
|
56967
|
+
return c2;
|
|
56968
|
+
}
|
|
56969
|
+
function injectController() {
|
|
56970
|
+
return inject(FormTmplConfigControllerKey);
|
|
56971
|
+
}
|
|
56972
|
+
return {
|
|
56973
|
+
provideController,
|
|
56974
|
+
injectController
|
|
56975
|
+
};
|
|
56976
|
+
}
|
|
56304
56977
|
function toComputed(val) {
|
|
56305
56978
|
return computed(() => typeof val === "function" ? val() : val);
|
|
56306
56979
|
}
|
|
@@ -56323,8 +56996,10 @@ function useWord(props, options) {
|
|
|
56323
56996
|
const ops = useDocOperations(factory2.docIns);
|
|
56324
56997
|
const controller = useDocController(factory2, ops);
|
|
56325
56998
|
useDocRuntimeProvider(factory2, controller);
|
|
56999
|
+
const formTmplConfigController = useFormTmplConfig().provideController();
|
|
56326
57000
|
return {
|
|
56327
57001
|
controller,
|
|
57002
|
+
formTmplConfigController,
|
|
56328
57003
|
docInfo: factory2.docInfo
|
|
56329
57004
|
};
|
|
56330
57005
|
}
|
|
@@ -56939,11 +57614,11 @@ const _hoisted_1$1J = { class: "color-picker-container" };
|
|
|
56939
57614
|
const _hoisted_2$15 = { class: "color-content-auto" };
|
|
56940
57615
|
const _hoisted_3$Q = { class: "color-content-theme" };
|
|
56941
57616
|
const _hoisted_4$C = ["onClick"];
|
|
56942
|
-
const _hoisted_5$
|
|
57617
|
+
const _hoisted_5$s = { class: "color-content-standard" };
|
|
56943
57618
|
const _hoisted_6$k = { class: "items" };
|
|
56944
57619
|
const _hoisted_7$g = ["onClick"];
|
|
56945
|
-
const _hoisted_8$
|
|
56946
|
-
const _hoisted_9$
|
|
57620
|
+
const _hoisted_8$d = { class: "color-content-used" };
|
|
57621
|
+
const _hoisted_9$9 = { class: "items" };
|
|
56947
57622
|
const _hoisted_10$6 = ["onClick"];
|
|
56948
57623
|
const _hoisted_11$4 = {
|
|
56949
57624
|
key: 1,
|
|
@@ -57029,7 +57704,7 @@ const _sfc_main$2o = /* @__PURE__ */ defineComponent({
|
|
|
57029
57704
|
]);
|
|
57030
57705
|
}), 128))
|
|
57031
57706
|
]),
|
|
57032
|
-
createElementVNode("div", _hoisted_5$
|
|
57707
|
+
createElementVNode("div", _hoisted_5$s, [
|
|
57033
57708
|
_cache[4] || (_cache[4] = createElementVNode("div", { class: "title" }, "标准色", -1)),
|
|
57034
57709
|
createElementVNode("div", _hoisted_6$k, [
|
|
57035
57710
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(colorUtils).standard, (c2, idx) => {
|
|
@@ -57053,9 +57728,9 @@ const _sfc_main$2o = /* @__PURE__ */ defineComponent({
|
|
|
57053
57728
|
}), 256))
|
|
57054
57729
|
])
|
|
57055
57730
|
]),
|
|
57056
|
-
createElementVNode("div", _hoisted_8$
|
|
57731
|
+
createElementVNode("div", _hoisted_8$d, [
|
|
57057
57732
|
_cache[5] || (_cache[5] = createElementVNode("div", { class: "title" }, "已使用字体颜色", -1)),
|
|
57058
|
-
createElementVNode("div", _hoisted_9$
|
|
57733
|
+
createElementVNode("div", _hoisted_9$9, [
|
|
57059
57734
|
unref(colorUtils).standard.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(colorUtils).standard, (c2, idx) => {
|
|
57060
57735
|
return openBlock(), createBlock(unref(_sfc_main$31), {
|
|
57061
57736
|
distance: 12,
|
|
@@ -57123,6 +57798,13 @@ const _sfc_main$2o = /* @__PURE__ */ defineComponent({
|
|
|
57123
57798
|
}
|
|
57124
57799
|
});
|
|
57125
57800
|
const TextColorSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2o, [["__scopeId", "data-v-cd12b35c"]]);
|
|
57801
|
+
var FontFamilyEnum = /* @__PURE__ */ ((FontFamilyEnum2) => {
|
|
57802
|
+
FontFamilyEnum2["Serif"] = "Roboto,RobotoDraft,Helvetica,Arial,sans-serif";
|
|
57803
|
+
FontFamilyEnum2["SimSun"] = '"SimSun", "宋体", "华文宋体", STSong, STSongti-SC-Light, sans-serif';
|
|
57804
|
+
FontFamilyEnum2["SimHei"] = '"SimHei", "黑体", "华文黑体", STHeiti, sans-serif';
|
|
57805
|
+
FontFamilyEnum2["KaiTi"] = '"Kai", "STKai", "楷体", "KaiTi", "华文楷体", sans-serif';
|
|
57806
|
+
return FontFamilyEnum2;
|
|
57807
|
+
})(FontFamilyEnum || {});
|
|
57126
57808
|
const FontFamilyOptions = [
|
|
57127
57809
|
{
|
|
57128
57810
|
label: "默认",
|
|
@@ -57328,8 +58010,9 @@ const _sfc_main$2n = /* @__PURE__ */ defineComponent({
|
|
|
57328
58010
|
label: "行"
|
|
57329
58011
|
}, {
|
|
57330
58012
|
default: withCtx(() => [
|
|
57331
|
-
createVNode(unref(
|
|
58013
|
+
createVNode(unref(GctInputNumber), {
|
|
57332
58014
|
placeholder: "请输入",
|
|
58015
|
+
min: 1,
|
|
57333
58016
|
modelValue: formData.value.rowCount,
|
|
57334
58017
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.value.rowCount = $event),
|
|
57335
58018
|
style: { "width": "100%", "height": "28px", "border-radius": "4px", "border": "1px solid #d9d9d9" }
|
|
@@ -57342,8 +58025,9 @@ const _sfc_main$2n = /* @__PURE__ */ defineComponent({
|
|
|
57342
58025
|
label: "列"
|
|
57343
58026
|
}, {
|
|
57344
58027
|
default: withCtx(() => [
|
|
57345
|
-
createVNode(unref(
|
|
58028
|
+
createVNode(unref(GctInputNumber), {
|
|
57346
58029
|
placeholder: "请输入",
|
|
58030
|
+
min: 1,
|
|
57347
58031
|
modelValue: formData.value.colCount,
|
|
57348
58032
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.value.colCount = $event),
|
|
57349
58033
|
style: { "width": "100%", "height": "28px", "border-radius": "4px", "border": "1px solid #d9d9d9" }
|
|
@@ -57355,7 +58039,7 @@ const _sfc_main$2n = /* @__PURE__ */ defineComponent({
|
|
|
57355
58039
|
};
|
|
57356
58040
|
}
|
|
57357
58041
|
});
|
|
57358
|
-
const InsertTableFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$2n, [["__scopeId", "data-v-
|
|
58042
|
+
const InsertTableFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$2n, [["__scopeId", "data-v-7ac9005c"]]);
|
|
57359
58043
|
const _hoisted_1$1H = { class: "container" };
|
|
57360
58044
|
const _sfc_main$2m = /* @__PURE__ */ defineComponent({
|
|
57361
58045
|
__name: "sub-table-form-modal",
|
|
@@ -57505,7 +58189,7 @@ const _hoisted_1$1F = { class: "items-container" };
|
|
|
57505
58189
|
const _hoisted_2$14 = { class: "ribbon-tab-item" };
|
|
57506
58190
|
const _hoisted_3$P = { class: "ribbon-tab-item" };
|
|
57507
58191
|
const _hoisted_4$B = { class: "ribbon-tab-item" };
|
|
57508
|
-
const _hoisted_5$
|
|
58192
|
+
const _hoisted_5$r = { class: "ribbon-tab-item" };
|
|
57509
58193
|
const _hoisted_6$j = { class: "ribbon-tab-item" };
|
|
57510
58194
|
const _hoisted_7$f = { class: "ribbon-tab-item" };
|
|
57511
58195
|
const _sfc_main$2k = /* @__PURE__ */ defineComponent({
|
|
@@ -57516,8 +58200,8 @@ const _sfc_main$2k = /* @__PURE__ */ defineComponent({
|
|
|
57516
58200
|
const modelKey = toRef(docInst.value, "mainModelKey");
|
|
57517
58201
|
const { fields } = useModelData(modelKey);
|
|
57518
58202
|
const { open: handleUploadImage, onChange: onImageUpload, reset } = useFileDialog({});
|
|
57519
|
-
const useSelectLabel = (valueRef, options) => computed(() => options.find((o) => o.value === valueRef.value)?.label || "");
|
|
57520
|
-
const fontFamily = ref(
|
|
58203
|
+
const useSelectLabel = (valueRef, options) => computed(() => options.find((o) => o.value === valueRef.value)?.label || valueRef.value || "");
|
|
58204
|
+
const fontFamily = ref(FontFamilyEnum.Serif);
|
|
57521
58205
|
const fontFamilyLabel = useSelectLabel(fontFamily, FontFamilyOptions);
|
|
57522
58206
|
const fontSize2 = ref("10.5");
|
|
57523
58207
|
const fontSizeLabel = useSelectLabel(fontSize2, FontSizeOptions);
|
|
@@ -57836,7 +58520,7 @@ const _sfc_main$2k = /* @__PURE__ */ defineComponent({
|
|
|
57836
58520
|
})
|
|
57837
58521
|
]),
|
|
57838
58522
|
_cache[27] || (_cache[27] = createElementVNode("div", { class: "split-divider" }, null, -1)),
|
|
57839
|
-
createElementVNode("div", _hoisted_5$
|
|
58523
|
+
createElementVNode("div", _hoisted_5$r, [
|
|
57840
58524
|
createVNode(ButtonIcon, {
|
|
57841
58525
|
tooltip: "左对齐",
|
|
57842
58526
|
iconExtraProps: { icon: "icon-zuoduiqi2" },
|
|
@@ -57913,7 +58597,7 @@ const _sfc_main$2k = /* @__PURE__ */ defineComponent({
|
|
|
57913
58597
|
};
|
|
57914
58598
|
}
|
|
57915
58599
|
});
|
|
57916
|
-
const WordTable = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["__scopeId", "data-v-
|
|
58600
|
+
const WordTable = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["__scopeId", "data-v-66a2a1b2"]]);
|
|
57917
58601
|
const _hoisted_1$1E = { class: "ribbon" };
|
|
57918
58602
|
const _hoisted_2$13 = { class: "ribbon-content-wrapper" };
|
|
57919
58603
|
const _sfc_main$2j = /* @__PURE__ */ defineComponent({
|
|
@@ -57933,7 +58617,7 @@ const _hoisted_1$1D = { class: "toolkit-item" };
|
|
|
57933
58617
|
const _hoisted_2$12 = { class: "toolkit-popper-wrap" };
|
|
57934
58618
|
const _hoisted_3$O = { class: "toolkit-popper-title" };
|
|
57935
58619
|
const _hoisted_4$A = { class: "title" };
|
|
57936
|
-
const _hoisted_5$
|
|
58620
|
+
const _hoisted_5$q = { class: "label" };
|
|
57937
58621
|
const _sfc_main$2i = /* @__PURE__ */ defineComponent({
|
|
57938
58622
|
__name: "toolkit-item",
|
|
57939
58623
|
props: {
|
|
@@ -57990,7 +58674,7 @@ const _sfc_main$2i = /* @__PURE__ */ defineComponent({
|
|
|
57990
58674
|
version: __props.version,
|
|
57991
58675
|
size: "20"
|
|
57992
58676
|
}, null, 8, ["icon", "version"]),
|
|
57993
|
-
createElementVNode("span", _hoisted_5$
|
|
58677
|
+
createElementVNode("span", _hoisted_5$q, toDisplayString(__props.label), 1)
|
|
57994
58678
|
], 2)
|
|
57995
58679
|
]),
|
|
57996
58680
|
_: 2
|
|
@@ -58151,14 +58835,14 @@ const _hoisted_1$1C = { class: "content-fields-wrapper" };
|
|
|
58151
58835
|
const _hoisted_2$11 = { class: "search" };
|
|
58152
58836
|
const _hoisted_3$N = { class: "container" };
|
|
58153
58837
|
const _hoisted_4$z = { class: "item main" };
|
|
58154
|
-
const _hoisted_5$
|
|
58838
|
+
const _hoisted_5$p = {
|
|
58155
58839
|
key: 0,
|
|
58156
58840
|
class: "field-list-wrap"
|
|
58157
58841
|
};
|
|
58158
58842
|
const _hoisted_6$i = { class: "field-list" };
|
|
58159
58843
|
const _hoisted_7$e = ["draggable", "onDragstart"];
|
|
58160
|
-
const _hoisted_8$
|
|
58161
|
-
const _hoisted_9$
|
|
58844
|
+
const _hoisted_8$c = ["innerHTML", "title"];
|
|
58845
|
+
const _hoisted_9$8 = {
|
|
58162
58846
|
key: 1,
|
|
58163
58847
|
class: "empty"
|
|
58164
58848
|
};
|
|
@@ -58255,7 +58939,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
|
|
|
58255
58939
|
]),
|
|
58256
58940
|
createElementVNode("div", _hoisted_3$N, [
|
|
58257
58941
|
createElementVNode("div", _hoisted_4$z, toDisplayString(unref(modelMeta)?.modelName), 1),
|
|
58258
|
-
filteredFields.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
58942
|
+
filteredFields.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$p, [
|
|
58259
58943
|
createVNode(unref(GctScrollbar), null, {
|
|
58260
58944
|
default: withCtx(() => [
|
|
58261
58945
|
createElementVNode("div", _hoisted_6$i, [
|
|
@@ -58279,14 +58963,14 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
|
|
|
58279
58963
|
class: "field-title",
|
|
58280
58964
|
innerHTML: f.highlightName || f.field.name,
|
|
58281
58965
|
title: f.field.name
|
|
58282
|
-
}, null, 8, _hoisted_8$
|
|
58966
|
+
}, null, 8, _hoisted_8$c)
|
|
58283
58967
|
], 40, _hoisted_7$e);
|
|
58284
58968
|
}), 128))
|
|
58285
58969
|
])
|
|
58286
58970
|
]),
|
|
58287
58971
|
_: 1
|
|
58288
58972
|
})
|
|
58289
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_9$
|
|
58973
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_9$8, "暂无字段"))
|
|
58290
58974
|
])
|
|
58291
58975
|
]);
|
|
58292
58976
|
};
|
|
@@ -58479,7 +59163,7 @@ const _hoisted_4$y = {
|
|
|
58479
59163
|
key: 1,
|
|
58480
59164
|
class: "title"
|
|
58481
59165
|
};
|
|
58482
|
-
const _hoisted_5$
|
|
59166
|
+
const _hoisted_5$o = {
|
|
58483
59167
|
key: 1,
|
|
58484
59168
|
class: "empty"
|
|
58485
59169
|
};
|
|
@@ -58565,7 +59249,7 @@ const _sfc_main$2e = /* @__PURE__ */ defineComponent({
|
|
|
58565
59249
|
key: 0,
|
|
58566
59250
|
widget: unref(widget),
|
|
58567
59251
|
active: unref(active)
|
|
58568
|
-
}, null, 8, ["widget", "active"])) : (openBlock(), createElementBlock("div", _hoisted_5$
|
|
59252
|
+
}, null, 8, ["widget", "active"])) : (openBlock(), createElementBlock("div", _hoisted_5$o, "请选择一个元素"))
|
|
58569
59253
|
]),
|
|
58570
59254
|
_: 1
|
|
58571
59255
|
})
|
|
@@ -59087,9 +59771,18 @@ const _hoisted_3$K = { class: "item-suffix" };
|
|
|
59087
59771
|
const _hoisted_4$x = { class: "item-suffix" };
|
|
59088
59772
|
const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
59089
59773
|
__name: "table-menu",
|
|
59774
|
+
props: {
|
|
59775
|
+
table: {},
|
|
59776
|
+
tableRow: {},
|
|
59777
|
+
tableCell: {}
|
|
59778
|
+
},
|
|
59090
59779
|
setup(__props) {
|
|
59091
59780
|
const { docInst } = useDocPubApiContext();
|
|
59092
59781
|
const { interaction } = useTableSelection();
|
|
59782
|
+
const props = __props;
|
|
59783
|
+
const tableId = props.table?.id;
|
|
59784
|
+
const rowIndex = props.tableRow?.pathIndex.at(-1);
|
|
59785
|
+
const colIndex = props.tableCell?.pathIndex.at(-1);
|
|
59093
59786
|
const insertBeforeColCount = ref(1);
|
|
59094
59787
|
const insertAfterColCount = ref(1);
|
|
59095
59788
|
const insertBeforeRowCount = ref(1);
|
|
@@ -59116,35 +59809,35 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59116
59809
|
const handleAction = (type4, options) => {
|
|
59117
59810
|
switch (type4) {
|
|
59118
59811
|
case "add-col":
|
|
59119
|
-
if (!
|
|
59812
|
+
if (!tableId || colIndex === void 0) return;
|
|
59120
59813
|
docInst?.value?.execute(CommandType.insertCol, {
|
|
59121
|
-
tableId
|
|
59122
|
-
colIndex
|
|
59814
|
+
tableId,
|
|
59815
|
+
colIndex,
|
|
59123
59816
|
position: options,
|
|
59124
59817
|
count: options === "before" ? insertBeforeColCount.value : insertAfterColCount.value
|
|
59125
59818
|
});
|
|
59126
59819
|
break;
|
|
59127
59820
|
case "delete-col":
|
|
59128
|
-
if (!
|
|
59821
|
+
if (!tableId || colIndex === void 0) return;
|
|
59129
59822
|
docInst.value.execute(CommandType.deleteCol, {
|
|
59130
|
-
tableId
|
|
59131
|
-
colIndex
|
|
59823
|
+
tableId,
|
|
59824
|
+
colIndex
|
|
59132
59825
|
});
|
|
59133
59826
|
break;
|
|
59134
59827
|
case "add-row":
|
|
59135
|
-
if (!
|
|
59828
|
+
if (!tableId || rowIndex === void 0) return;
|
|
59136
59829
|
docInst?.value?.execute(CommandType.insertRow, {
|
|
59137
|
-
tableId
|
|
59138
|
-
rowIndex
|
|
59830
|
+
tableId,
|
|
59831
|
+
rowIndex,
|
|
59139
59832
|
position: options,
|
|
59140
59833
|
count: options === "before" ? insertBeforeRowCount.value : insertAfterRowCount.value
|
|
59141
59834
|
});
|
|
59142
59835
|
break;
|
|
59143
59836
|
case "delete-row":
|
|
59144
|
-
if (!
|
|
59837
|
+
if (!tableId || rowIndex === void 0) return;
|
|
59145
59838
|
docInst?.value?.execute(CommandType.deleteRow, {
|
|
59146
|
-
tableId
|
|
59147
|
-
rowIndex
|
|
59839
|
+
tableId,
|
|
59840
|
+
rowIndex
|
|
59148
59841
|
});
|
|
59149
59842
|
break;
|
|
59150
59843
|
case "data-group":
|
|
@@ -59196,8 +59889,8 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59196
59889
|
_cache[18] || (_cache[18] = createElementVNode("i", { class: "item-icon icon iconfont icon-zuocecharulie" }, null, -1)),
|
|
59197
59890
|
_cache[19] || (_cache[19] = createElementVNode("span", { class: "item-name" }, "在左侧插入列", -1)),
|
|
59198
59891
|
createElementVNode("div", _hoisted_1$1y, [
|
|
59199
|
-
createVNode(unref(
|
|
59200
|
-
|
|
59892
|
+
createVNode(unref(GctInputNumber), {
|
|
59893
|
+
min: 1,
|
|
59201
59894
|
modelValue: insertBeforeColCount.value,
|
|
59202
59895
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => insertBeforeColCount.value = $event),
|
|
59203
59896
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
@@ -59212,8 +59905,8 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59212
59905
|
_cache[20] || (_cache[20] = createElementVNode("i", { class: "item-icon icon iconfont icon-youcecharulie" }, null, -1)),
|
|
59213
59906
|
_cache[21] || (_cache[21] = createElementVNode("span", { class: "item-name" }, "在右侧插入列", -1)),
|
|
59214
59907
|
createElementVNode("div", _hoisted_2$_, [
|
|
59215
|
-
createVNode(unref(
|
|
59216
|
-
|
|
59908
|
+
createVNode(unref(GctInputNumber), {
|
|
59909
|
+
min: 1,
|
|
59217
59910
|
modelValue: insertAfterColCount.value,
|
|
59218
59911
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => insertAfterColCount.value = $event),
|
|
59219
59912
|
onClick: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
@@ -59235,8 +59928,8 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59235
59928
|
_cache[23] || (_cache[23] = createElementVNode("i", { class: "item-icon icon iconfont icon-a-shangcharuhang1" }, null, -1)),
|
|
59236
59929
|
_cache[24] || (_cache[24] = createElementVNode("span", { class: "item-name" }, "在上方插入行", -1)),
|
|
59237
59930
|
createElementVNode("div", _hoisted_3$K, [
|
|
59238
|
-
createVNode(unref(
|
|
59239
|
-
|
|
59931
|
+
createVNode(unref(GctInputNumber), {
|
|
59932
|
+
min: 1,
|
|
59240
59933
|
modelValue: insertBeforeRowCount.value,
|
|
59241
59934
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => insertBeforeRowCount.value = $event),
|
|
59242
59935
|
onClick: _cache[8] || (_cache[8] = withModifiers(() => {
|
|
@@ -59251,8 +59944,8 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59251
59944
|
_cache[25] || (_cache[25] = createElementVNode("i", { class: "item-icon icon iconfont icon-a-xiacharuhang1" }, null, -1)),
|
|
59252
59945
|
_cache[26] || (_cache[26] = createElementVNode("span", { class: "item-name" }, "在下方插入行", -1)),
|
|
59253
59946
|
createElementVNode("div", _hoisted_4$x, [
|
|
59254
|
-
createVNode(unref(
|
|
59255
|
-
|
|
59947
|
+
createVNode(unref(GctInputNumber), {
|
|
59948
|
+
min: 1,
|
|
59256
59949
|
modelValue: insertAfterRowCount.value,
|
|
59257
59950
|
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => insertAfterRowCount.value = $event),
|
|
59258
59951
|
onClick: _cache[11] || (_cache[11] = withModifiers(() => {
|
|
@@ -59299,7 +59992,7 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59299
59992
|
};
|
|
59300
59993
|
}
|
|
59301
59994
|
});
|
|
59302
|
-
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["__scopeId", "data-v-
|
|
59995
|
+
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["__scopeId", "data-v-05c3a67d"]]);
|
|
59303
59996
|
const OFFSET = 4;
|
|
59304
59997
|
const _sfc_main$27 = /* @__PURE__ */ defineComponent({
|
|
59305
59998
|
__name: "index",
|
|
@@ -59311,16 +60004,31 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
|
|
|
59311
60004
|
};
|
|
59312
60005
|
const menuVisible = ref(false);
|
|
59313
60006
|
const pos = ref({ x: 0, y: 0 });
|
|
60007
|
+
const contextMenuRef = ref(null);
|
|
60008
|
+
const menuProps = ref({});
|
|
59314
60009
|
const menuComponent = ref(null);
|
|
59315
|
-
const menuRef = ref(null);
|
|
59316
60010
|
const show = (params) => {
|
|
59317
|
-
const {
|
|
60011
|
+
const {
|
|
60012
|
+
x: x2,
|
|
60013
|
+
y: y2,
|
|
60014
|
+
type: type4,
|
|
60015
|
+
table,
|
|
60016
|
+
tableRow,
|
|
60017
|
+
tableCell
|
|
60018
|
+
} = params;
|
|
60019
|
+
if (type4 === "table") {
|
|
60020
|
+
menuProps.value = {
|
|
60021
|
+
table,
|
|
60022
|
+
tableRow,
|
|
60023
|
+
tableCell
|
|
60024
|
+
};
|
|
60025
|
+
}
|
|
59318
60026
|
pos.value = { x: x2, y: y2 };
|
|
59319
60027
|
menuComponent.value = menuMap[type4];
|
|
59320
60028
|
menuVisible.value = true;
|
|
59321
60029
|
nextTick(() => {
|
|
59322
|
-
if (!
|
|
59323
|
-
const { x: x22, y: y22, width, height } =
|
|
60030
|
+
if (!contextMenuRef.value) return;
|
|
60031
|
+
const { x: x22, y: y22, width, height } = contextMenuRef.value.getBoundingClientRect();
|
|
59324
60032
|
const { innerWidth, innerHeight } = window;
|
|
59325
60033
|
const right = x22 + width;
|
|
59326
60034
|
const bottom = y22 + height;
|
|
@@ -59331,29 +60039,30 @@ const _sfc_main$27 = /* @__PURE__ */ defineComponent({
|
|
|
59331
60039
|
});
|
|
59332
60040
|
};
|
|
59333
60041
|
const container2 = document.querySelector(".render-container");
|
|
59334
|
-
const
|
|
60042
|
+
const hide = () => {
|
|
59335
60043
|
menuVisible.value = false;
|
|
59336
60044
|
};
|
|
59337
60045
|
onMounted(() => {
|
|
59338
|
-
window.addEventListener("click",
|
|
59339
|
-
container2?.addEventListener("scroll",
|
|
60046
|
+
window.addEventListener("click", hide);
|
|
60047
|
+
container2?.addEventListener("scroll", hide);
|
|
59340
60048
|
});
|
|
59341
60049
|
onBeforeUnmount(() => {
|
|
59342
|
-
window.removeEventListener("click",
|
|
59343
|
-
container2?.removeEventListener("scroll",
|
|
60050
|
+
window.removeEventListener("click", hide);
|
|
60051
|
+
container2?.removeEventListener("scroll", hide);
|
|
59344
60052
|
});
|
|
59345
60053
|
__expose({
|
|
59346
|
-
show
|
|
60054
|
+
show,
|
|
60055
|
+
hide
|
|
59347
60056
|
});
|
|
59348
60057
|
return (_ctx, _cache) => {
|
|
59349
60058
|
return menuVisible.value ? (openBlock(), createElementBlock("div", {
|
|
59350
60059
|
key: 0,
|
|
59351
|
-
ref_key: "
|
|
59352
|
-
ref:
|
|
60060
|
+
ref_key: "contextMenuRef",
|
|
60061
|
+
ref: contextMenuRef,
|
|
59353
60062
|
class: "context-menu",
|
|
59354
60063
|
style: normalizeStyle({ left: pos.value.x + "px", top: pos.value.y + "px" })
|
|
59355
60064
|
}, [
|
|
59356
|
-
(openBlock(), createBlock(resolveDynamicComponent(menuComponent.value)))
|
|
60065
|
+
(openBlock(), createBlock(resolveDynamicComponent(menuComponent.value), normalizeProps(guardReactiveProps(menuProps.value)), null, 16))
|
|
59357
60066
|
], 4)) : createCommentVNode("", true);
|
|
59358
60067
|
};
|
|
59359
60068
|
}
|
|
@@ -59362,7 +60071,7 @@ const _hoisted_1$1x = { class: "validation-comment-item" };
|
|
|
59362
60071
|
const _hoisted_2$Z = { class: "validation-comment-panel-container" };
|
|
59363
60072
|
const _hoisted_3$J = { class: "comment-header" };
|
|
59364
60073
|
const _hoisted_4$w = { class: "comment-messages" };
|
|
59365
|
-
const _hoisted_5$
|
|
60074
|
+
const _hoisted_5$n = { class: "message-item" };
|
|
59366
60075
|
const _hoisted_6$h = { class: "field-name" };
|
|
59367
60076
|
const _hoisted_7$d = { class: "error-text" };
|
|
59368
60077
|
const _sfc_main$26 = /* @__PURE__ */ defineComponent({
|
|
@@ -59448,7 +60157,7 @@ const _sfc_main$26 = /* @__PURE__ */ defineComponent({
|
|
|
59448
60157
|
]),
|
|
59449
60158
|
createElementVNode("div", _hoisted_4$w, [
|
|
59450
60159
|
(openBlock(true), createElementBlock(Fragment, null, renderList(fieldErrorList.value, (item) => {
|
|
59451
|
-
return openBlock(), createElementBlock("div", _hoisted_5$
|
|
60160
|
+
return openBlock(), createElementBlock("div", _hoisted_5$n, [
|
|
59452
60161
|
createElementVNode("div", _hoisted_6$h, toDisplayString(unref(fieldInfo)?.name) + ":", 1),
|
|
59453
60162
|
createElementVNode("div", _hoisted_7$d, toDisplayString(item.message), 1)
|
|
59454
60163
|
]);
|
|
@@ -59542,17 +60251,17 @@ const _hoisted_1$1v = { class: "cl__item" };
|
|
|
59542
60251
|
const _hoisted_2$Y = { class: "cl__item-panel-container" };
|
|
59543
60252
|
const _hoisted_3$I = { class: "cl__hdr" };
|
|
59544
60253
|
const _hoisted_4$v = { class: "cl__hdr-title" };
|
|
59545
|
-
const _hoisted_5$
|
|
60254
|
+
const _hoisted_5$m = {
|
|
59546
60255
|
key: 0,
|
|
59547
60256
|
class: "cl__hdr-flag"
|
|
59548
60257
|
};
|
|
59549
60258
|
const _hoisted_6$g = { class: "cl__user" };
|
|
59550
60259
|
const _hoisted_7$c = ["dateTime"];
|
|
59551
|
-
const _hoisted_8$
|
|
60260
|
+
const _hoisted_8$b = {
|
|
59552
60261
|
key: 0,
|
|
59553
60262
|
class: "cl__row"
|
|
59554
60263
|
};
|
|
59555
|
-
const _hoisted_9$
|
|
60264
|
+
const _hoisted_9$7 = { class: "cl__info-val" };
|
|
59556
60265
|
const _hoisted_10$5 = {
|
|
59557
60266
|
key: 1,
|
|
59558
60267
|
class: "cl__row"
|
|
@@ -59657,7 +60366,7 @@ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
|
|
|
59657
60366
|
createElementVNode("article", _hoisted_2$Y, [
|
|
59658
60367
|
createElementVNode("header", _hoisted_3$I, [
|
|
59659
60368
|
createElementVNode("div", _hoisted_4$v, toDisplayString(getHeaderLabel(__props.data.changeType)), 1),
|
|
59660
|
-
__props.data.isCurrentChange ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
60369
|
+
__props.data.isCurrentChange ? (openBlock(), createElementBlock("div", _hoisted_5$m, "本次变更")) : createCommentVNode("", true)
|
|
59661
60370
|
]),
|
|
59662
60371
|
createElementVNode("div", _hoisted_6$g, [
|
|
59663
60372
|
createVNode(unref(GctAvatar), {
|
|
@@ -59671,11 +60380,11 @@ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
|
|
|
59671
60380
|
dateTime: __props.data.time
|
|
59672
60381
|
}, toDisplayString(__props.data.time), 9, _hoisted_7$c)
|
|
59673
60382
|
]),
|
|
59674
|
-
__props.data.reason ? (openBlock(), createElementBlock("div", _hoisted_8$
|
|
60383
|
+
__props.data.reason ? (openBlock(), createElementBlock("div", _hoisted_8$b, [
|
|
59675
60384
|
createElementVNode("div", {
|
|
59676
60385
|
class: normalizeClass(["cl__label", __props.data.changeType])
|
|
59677
60386
|
}, toDisplayString(getReasonLabel(__props.data.changeType)) + ":", 3),
|
|
59678
|
-
createElementVNode("div", _hoisted_9$
|
|
60387
|
+
createElementVNode("div", _hoisted_9$7, toDisplayString(__props.data.reason), 1)
|
|
59679
60388
|
])) : createCommentVNode("", true),
|
|
59680
60389
|
__props.data.beforeLabel ? (openBlock(), createElementBlock("div", _hoisted_10$5, [
|
|
59681
60390
|
_cache[0] || (_cache[0] = createElementVNode("div", { class: "cl__label before" }, "变更前:", -1)),
|
|
@@ -59887,14 +60596,42 @@ const _sfc_main$22 = /* @__PURE__ */ defineComponent({
|
|
|
59887
60596
|
y: docInst.value.pageOffsets[id]?.top
|
|
59888
60597
|
};
|
|
59889
60598
|
}
|
|
60599
|
+
const getParentIds = (node, ids = []) => {
|
|
60600
|
+
if (!node) return ids;
|
|
60601
|
+
if (node.attrs?.id) {
|
|
60602
|
+
ids.push(node.attrs.id);
|
|
60603
|
+
}
|
|
60604
|
+
return getParentIds(node.parent, ids);
|
|
60605
|
+
};
|
|
59890
60606
|
const handleKonvaContextMenu = (e) => {
|
|
59891
60607
|
e.evt.preventDefault();
|
|
60608
|
+
const closestParentId = getParentIds(e.target)[0];
|
|
60609
|
+
if (!closestParentId) return;
|
|
60610
|
+
const pathIdList = docInst.value.layoutMapper.dataCenter.get(closestParentId)?.path;
|
|
60611
|
+
if (!pathIdList) return;
|
|
60612
|
+
const nodeList = pathIdList.map((id) => id ? docInst.value.layoutMapper.dataCenter.get(id) : void 0);
|
|
60613
|
+
const nodeTypes = nodeList.map((n) => n?.component);
|
|
60614
|
+
const isInTable = nodeTypes.some((t) => ["table", "tableRow", "tableCell"].includes(t));
|
|
60615
|
+
const table = nodeList.find((n) => n?.component === "table");
|
|
60616
|
+
const tableRow = nodeList.find((n) => n?.component === "tableRow");
|
|
60617
|
+
const tableCell = nodeList.find((n) => n?.component === "tableCell");
|
|
60618
|
+
if (!isInTable) {
|
|
60619
|
+
contextMenuRef.value.hide();
|
|
60620
|
+
return;
|
|
60621
|
+
}
|
|
60622
|
+
const visibleMap = {
|
|
60623
|
+
table: isInTable
|
|
60624
|
+
};
|
|
59892
60625
|
const { clientX: x2, clientY: y2 } = e.evt;
|
|
60626
|
+
const type4 = Object.entries(visibleMap).find(([, isTrue]) => isTrue)[0];
|
|
59893
60627
|
docInst.value.eventManager.dispatchCustom("konva:contextmenu", {
|
|
59894
60628
|
contextMenuRef,
|
|
59895
60629
|
x: x2,
|
|
59896
60630
|
y: y2,
|
|
59897
|
-
type:
|
|
60631
|
+
type: type4,
|
|
60632
|
+
table,
|
|
60633
|
+
tableRow,
|
|
60634
|
+
tableCell
|
|
59898
60635
|
});
|
|
59899
60636
|
};
|
|
59900
60637
|
function getPagesDataURL() {
|
|
@@ -60011,7 +60748,7 @@ const _sfc_main$22 = /* @__PURE__ */ defineComponent({
|
|
|
60011
60748
|
};
|
|
60012
60749
|
}
|
|
60013
60750
|
});
|
|
60014
|
-
const DocLayout = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["__scopeId", "data-v-
|
|
60751
|
+
const DocLayout = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["__scopeId", "data-v-fcaa8330"]]);
|
|
60015
60752
|
const _sfc_main$21 = /* @__PURE__ */ defineComponent({
|
|
60016
60753
|
__name: "editable-canvas",
|
|
60017
60754
|
props: {
|
|
@@ -60159,334 +60896,85 @@ const useDocDesignLayoutProps = () => {
|
|
|
60159
60896
|
injectProps
|
|
60160
60897
|
};
|
|
60161
60898
|
};
|
|
60162
|
-
var
|
|
60163
|
-
|
|
60164
|
-
|
|
60165
|
-
|
|
60166
|
-
|
|
60167
|
-
|
|
60168
|
-
|
|
60169
|
-
|
|
60170
|
-
|
|
60171
|
-
|
|
60172
|
-
|
|
60173
|
-
|
|
60174
|
-
|
|
60175
|
-
|
|
60176
|
-
|
|
60177
|
-
|
|
60178
|
-
|
|
60179
|
-
|
|
60180
|
-
|
|
60181
|
-
|
|
60182
|
-
|
|
60183
|
-
|
|
60184
|
-
|
|
60185
|
-
|
|
60186
|
-
}
|
|
60187
|
-
|
|
60188
|
-
|
|
60189
|
-
|
|
60190
|
-
|
|
60191
|
-
|
|
60192
|
-
|
|
60193
|
-
|
|
60194
|
-
|
|
60195
|
-
|
|
60196
|
-
|
|
60197
|
-
|
|
60198
|
-
|
|
60199
|
-
|
|
60200
|
-
|
|
60201
|
-
|
|
60202
|
-
|
|
60203
|
-
|
|
60204
|
-
|
|
60205
|
-
|
|
60206
|
-
|
|
60207
|
-
|
|
60208
|
-
|
|
60209
|
-
|
|
60210
|
-
|
|
60211
|
-
|
|
60212
|
-
|
|
60213
|
-
|
|
60214
|
-
|
|
60215
|
-
* @param tmpl
|
|
60216
|
-
* @return {*}
|
|
60217
|
-
*/
|
|
60218
|
-
static calcEntirePrompt(tmpl) {
|
|
60219
|
-
const paramsStr = tmpl.identifyParams?.map((item) => {
|
|
60220
|
-
return `图中${item.prompt}绑定${item.formField?.split(".")[1]}字段`;
|
|
60221
|
-
}).join(",");
|
|
60222
|
-
const jsonObj = tmpl.identifyParams?.reduce((acc, cur) => {
|
|
60223
|
-
acc[cur.formField?.split(".")[1]] = {
|
|
60224
|
-
value: null
|
|
60225
|
-
};
|
|
60226
|
-
return acc;
|
|
60227
|
-
}, {});
|
|
60228
|
-
const result = `这是一台${tmpl.deviceName ?? ""}设备/仪器图片,${paramsStr},请识别图片中的读数,以
|
|
60229
|
-
${JSON.stringify(
|
|
60230
|
-
jsonObj,
|
|
60231
|
-
null,
|
|
60232
|
-
2
|
|
60233
|
-
)}
|
|
60234
|
-
格式返回,${tmpl.extraPrompt ?? ""}`;
|
|
60235
|
-
return result;
|
|
60236
|
-
}
|
|
60237
|
-
/** 平台设备互联接口对象转换格式 */
|
|
60238
|
-
static transfer2DeviceLink(data) {
|
|
60239
|
-
const result = {
|
|
60240
|
-
id: data.id,
|
|
60241
|
-
name: data.name,
|
|
60242
|
-
type: data.type,
|
|
60243
|
-
params: data.schema ? [] : void 0
|
|
60244
|
-
};
|
|
60245
|
-
if (data.schema) {
|
|
60246
|
-
const params = [];
|
|
60247
|
-
const obj = JSON.parse(data.schema);
|
|
60248
|
-
for (const key in obj.properties) {
|
|
60249
|
-
const temp = {
|
|
60250
|
-
code: key,
|
|
60251
|
-
name: obj.properties[key].description || "数组结构",
|
|
60252
|
-
type: obj.properties[key].type,
|
|
60253
|
-
remark: obj.properties[key].remark,
|
|
60254
|
-
children: []
|
|
60255
|
-
};
|
|
60256
|
-
if (obj.properties[key].items && obj.properties[key].items.properties) {
|
|
60257
|
-
temp.children = [];
|
|
60258
|
-
for (const subkey in obj.properties[key].items.properties) {
|
|
60259
|
-
temp.children.push({
|
|
60260
|
-
code: subkey,
|
|
60261
|
-
name: obj.properties[key].items.properties[subkey].description,
|
|
60262
|
-
type: obj.properties[key].items.properties[subkey].type,
|
|
60263
|
-
remark: obj.properties[key].remark
|
|
60264
|
-
});
|
|
60265
|
-
}
|
|
60266
|
-
}
|
|
60267
|
-
params.push(temp);
|
|
60268
|
-
}
|
|
60269
|
-
result.params = params;
|
|
60270
|
-
}
|
|
60271
|
-
return result;
|
|
60272
|
-
}
|
|
60273
|
-
/**
|
|
60274
|
-
* 通过设备id转换成IDeviceLink结构
|
|
60275
|
-
* - 请求获取完整的带参数的数据
|
|
60276
|
-
* - 把参数数据转换成IDeviceLink结构
|
|
60277
|
-
* @static
|
|
60278
|
-
* @param deviceId
|
|
60279
|
-
*/
|
|
60280
|
-
static async getDeviceLink(deviceId) {
|
|
60281
|
-
const res = await api.platform.deviceInterconnection.getInfo({ id: deviceId });
|
|
60282
|
-
if (!res) {
|
|
60283
|
-
return;
|
|
60899
|
+
var COLUMNS_TYPE = /* @__PURE__ */ ((COLUMNS_TYPE2) => {
|
|
60900
|
+
COLUMNS_TYPE2["LEFT"] = "left";
|
|
60901
|
+
COLUMNS_TYPE2["CENTER"] = "center";
|
|
60902
|
+
COLUMNS_TYPE2["RIGHT"] = "right";
|
|
60903
|
+
COLUMNS_TYPE2["TOP"] = "top";
|
|
60904
|
+
COLUMNS_TYPE2["BOTTOM"] = "bottom";
|
|
60905
|
+
return COLUMNS_TYPE2;
|
|
60906
|
+
})(COLUMNS_TYPE || {});
|
|
60907
|
+
const REVERSE_TYPES = [
|
|
60908
|
+
"right",
|
|
60909
|
+
"bottom"
|
|
60910
|
+
/* BOTTOM */
|
|
60911
|
+
];
|
|
60912
|
+
function useDragLine(startValue, rowType, config = {}) {
|
|
60913
|
+
const { minValue = 10 } = config;
|
|
60914
|
+
const startMove = ref(startValue);
|
|
60915
|
+
let containerSize = 2e3;
|
|
60916
|
+
let lastClient = 0;
|
|
60917
|
+
const isVertical = rowType === "top" || rowType === "bottom";
|
|
60918
|
+
const isReverse = REVERSE_TYPES.includes(rowType);
|
|
60919
|
+
const clientKey = isVertical ? "clientY" : "clientX";
|
|
60920
|
+
const sizeKey = isVertical ? "offsetHeight" : "offsetWidth";
|
|
60921
|
+
function normalizeValue2(value) {
|
|
60922
|
+
return isReverse ? containerSize - value : value;
|
|
60923
|
+
}
|
|
60924
|
+
function clamp(value) {
|
|
60925
|
+
return Math.min(Math.max(value, minValue), containerSize - minValue);
|
|
60926
|
+
}
|
|
60927
|
+
function moveHandle(client) {
|
|
60928
|
+
const delta = client - lastClient;
|
|
60929
|
+
const nextValue = normalizeValue2(normalizeValue2(startMove.value) + delta);
|
|
60930
|
+
startMove.value = clamp(nextValue);
|
|
60931
|
+
lastClient = client;
|
|
60932
|
+
}
|
|
60933
|
+
function moveDomDown(event, el, onMouseUp) {
|
|
60934
|
+
containerSize = el[sizeKey];
|
|
60935
|
+
lastClient = event[clientKey];
|
|
60936
|
+
event.preventDefault();
|
|
60937
|
+
const handleMouseMove = (e) => {
|
|
60938
|
+
moveHandle(e[clientKey]);
|
|
60939
|
+
};
|
|
60940
|
+
const handleMouseUp = () => {
|
|
60941
|
+
document.removeEventListener("mousemove", handleMouseMove);
|
|
60942
|
+
document.removeEventListener("mouseup", handleMouseUp);
|
|
60943
|
+
onMouseUp?.();
|
|
60944
|
+
};
|
|
60945
|
+
document.addEventListener("mousemove", handleMouseMove);
|
|
60946
|
+
document.addEventListener("mouseup", handleMouseUp);
|
|
60947
|
+
}
|
|
60948
|
+
const start = computed({
|
|
60949
|
+
get: () => clamp(startMove.value),
|
|
60950
|
+
set: (value) => {
|
|
60951
|
+
startMove.value = clamp(value);
|
|
60284
60952
|
}
|
|
60285
|
-
return this.transfer2DeviceLink(res);
|
|
60286
|
-
}
|
|
60287
|
-
/**
|
|
60288
|
-
* 初始化设备字段和表单字段映射关系
|
|
60289
|
-
* @static
|
|
60290
|
-
* @param deviceLink
|
|
60291
|
-
*/
|
|
60292
|
-
static initDevice2FormFieldMap(deviceLink) {
|
|
60293
|
-
const fieldMap = [];
|
|
60294
|
-
deviceLink.params?.forEach((item) => {
|
|
60295
|
-
fieldMap.push({
|
|
60296
|
-
isSubField: item.type === "Array",
|
|
60297
|
-
deviceField: item.code,
|
|
60298
|
-
deviceLinkParams: cloneDeep(omit(item, ["children"])),
|
|
60299
|
-
// 冗余参数自身的信息,不存子数据
|
|
60300
|
-
formField: void 0,
|
|
60301
|
-
children: item.children?.map((subItem) => {
|
|
60302
|
-
return {
|
|
60303
|
-
deviceField: subItem.code,
|
|
60304
|
-
deviceLinkParams: cloneDeep(subItem),
|
|
60305
|
-
formField: void 0
|
|
60306
|
-
};
|
|
60307
|
-
})
|
|
60308
|
-
});
|
|
60309
|
-
});
|
|
60310
|
-
return fieldMap;
|
|
60311
|
-
}
|
|
60312
|
-
}
|
|
60313
|
-
const AITooltips = {
|
|
60314
|
-
/** 降噪 */
|
|
60315
|
-
denoise: {
|
|
60316
|
-
title: "适用于照片有噪点、模糊、拍摄环境光线不足的情况",
|
|
60317
|
-
content: "降噪方法\n· 高斯模糊 (gaussian):通用降噪,适合大多数场景\n· 双边滤波 (bilateral):保留边缘细节,适合需要清晰数字的场景\n· 中值滤波 (median):去除椒盐噪点,适合有明显噪点的照片"
|
|
60318
|
-
},
|
|
60319
|
-
/** 对比度 */
|
|
60320
|
-
contrast: {
|
|
60321
|
-
title: "适用于屏幕显示模糊、数字与背景对比度低、反光\n导致看不清的情况",
|
|
60322
|
-
content: "对比度强度\n· 1.0 - 1.5 :轻微增强,适合轻微模糊\n· 1.5 - 2.0 :中等增强,适合一般情况\n· 2.0 - 3.0 :强烈增强,适合严重模糊或低对比度"
|
|
60323
|
-
},
|
|
60324
|
-
/** 二值化 */
|
|
60325
|
-
binarize: {
|
|
60326
|
-
title: "适用于 LCD/LED 屏幕、黑白显示屏、需要突出数字轮廓的场景",
|
|
60327
|
-
content: "二值化方法\n· 自适应阈值 (adaptive):适合光照不均匀的场景,自动调整阈值\n· Otsu 自适应 (Otsu):自动计算最佳阈值,适合大多数场景\n· 简单阈值 (simple):固定阈值,适合光照均匀的场景"
|
|
60328
|
-
},
|
|
60329
|
-
/** 识别参数提示词 */
|
|
60330
|
-
identifyParam: {
|
|
60331
|
-
content: "一般在多值识别时描述位置或值标题名称,\n如:“第一行左上的值”“氢气输入压力”"
|
|
60332
|
-
}
|
|
60333
|
-
};
|
|
60334
|
-
const DenoiseMethodMap = {
|
|
60335
|
-
bilateral: "双边滤波",
|
|
60336
|
-
gaussian: "高斯滤波",
|
|
60337
|
-
median: "中值滤波"
|
|
60338
|
-
};
|
|
60339
|
-
const BinarizeMethodMap = {
|
|
60340
|
-
adaptive: "自适应阈值",
|
|
60341
|
-
otsu: "Otsu 自适应",
|
|
60342
|
-
simple: "简单阈值"
|
|
60343
|
-
};
|
|
60344
|
-
const DenoiseMethodOptions = computed(() => {
|
|
60345
|
-
return Object.values(DeviceLink.DenoiseMethodEnum).map((item) => {
|
|
60346
|
-
return {
|
|
60347
|
-
label: DenoiseMethodMap[item],
|
|
60348
|
-
value: item
|
|
60349
|
-
};
|
|
60350
60953
|
});
|
|
60351
|
-
});
|
|
60352
|
-
const BinarizeMethodOptions = computed(() => {
|
|
60353
|
-
return Object.values(DeviceLink.BinarizeMethodEnum).map((item) => {
|
|
60354
|
-
return {
|
|
60355
|
-
label: BinarizeMethodMap[item],
|
|
60356
|
-
value: item
|
|
60357
|
-
};
|
|
60358
|
-
});
|
|
60359
|
-
});
|
|
60360
|
-
const DeviceParamsTypeTitle = {
|
|
60361
|
-
String: "文本",
|
|
60362
|
-
Integer: "整数",
|
|
60363
|
-
Long: "长整数",
|
|
60364
|
-
Float: "小数",
|
|
60365
|
-
Boolean: "布尔",
|
|
60366
|
-
Date: "日期",
|
|
60367
|
-
Array: "数组结构"
|
|
60368
|
-
};
|
|
60369
|
-
class FormTmplConfigController {
|
|
60370
|
-
/** 存储响应式变量 */
|
|
60371
|
-
state = reactive({
|
|
60372
|
-
tmpls: [],
|
|
60373
|
-
runningTmpls: []
|
|
60374
|
-
});
|
|
60375
|
-
/** 表单模板id */
|
|
60376
|
-
tmplId = "";
|
|
60377
|
-
/** 是否手动模式,手动模式不触发接口 */
|
|
60378
|
-
isManual = false;
|
|
60379
|
-
/**
|
|
60380
|
-
* 初始化
|
|
60381
|
-
*
|
|
60382
|
-
* @param opts
|
|
60383
|
-
* - tmplId 表单模板id
|
|
60384
|
-
*/
|
|
60385
|
-
async init(opts) {
|
|
60386
|
-
this.isManual = !!opts.isManual;
|
|
60387
|
-
this.tmplId = opts.tmplId;
|
|
60388
|
-
this.state.runningTmpls = [];
|
|
60389
|
-
if (!this.isManual) {
|
|
60390
|
-
await this.load();
|
|
60391
|
-
}
|
|
60392
|
-
}
|
|
60393
|
-
/**
|
|
60394
|
-
* 设置获取到的配置数据字符串
|
|
60395
|
-
* @param configStr
|
|
60396
|
-
*/
|
|
60397
|
-
setConfigStr(configStr) {
|
|
60398
|
-
const config = configStr ? JSON.parse(configStr) : {};
|
|
60399
|
-
this.state.tmpls = config.tmpls || [];
|
|
60400
|
-
}
|
|
60401
|
-
getConfigStr() {
|
|
60402
|
-
const cloneTmpls = cloneDeep(this.state.tmpls);
|
|
60403
|
-
cloneTmpls.forEach((tmpl) => {
|
|
60404
|
-
if (tmpl.type === DeviceLink.TmplTypeEnum.AI_OCR) {
|
|
60405
|
-
tmpl.runtimePrompt = DeviceLinkTmplUtil.calcEntirePrompt(tmpl);
|
|
60406
|
-
}
|
|
60407
|
-
});
|
|
60408
|
-
const config = {
|
|
60409
|
-
tmpls: cloneTmpls
|
|
60410
|
-
};
|
|
60411
|
-
console.log("保存数据", config);
|
|
60412
|
-
return JSON.stringify(config);
|
|
60413
|
-
}
|
|
60414
|
-
/** 调用接口加载数据 */
|
|
60415
|
-
async load() {
|
|
60416
|
-
const res = await api.apaas.onlineFormTmpl.getGetCommunicationConfig({ id: this.tmplId });
|
|
60417
|
-
this.setConfigStr(res);
|
|
60418
|
-
}
|
|
60419
|
-
/** 调用接口保存数据 */
|
|
60420
|
-
async save() {
|
|
60421
|
-
const configStr = this.getConfigStr();
|
|
60422
|
-
await api.apaas.onlineFormTmpl.postUpdateCommunicationConfigId(
|
|
60423
|
-
{ id: this.tmplId },
|
|
60424
|
-
{ communicationConfig: configStr }
|
|
60425
|
-
);
|
|
60426
|
-
}
|
|
60427
|
-
/** 调用接口刷新数据 */
|
|
60428
|
-
async refresh() {
|
|
60429
|
-
await this.load();
|
|
60430
|
-
}
|
|
60431
|
-
/** 添加或更新模板,并且调用接口保存并刷新数据 */
|
|
60432
|
-
async createOrUpdate(tmpl) {
|
|
60433
|
-
const index2 = this.state.tmpls.findIndex((item) => item.id === tmpl.id);
|
|
60434
|
-
if (index2 > -1) {
|
|
60435
|
-
this.state.tmpls[index2] = tmpl;
|
|
60436
|
-
} else {
|
|
60437
|
-
this.state.tmpls.push(tmpl);
|
|
60438
|
-
}
|
|
60439
|
-
if (!this.isManual) {
|
|
60440
|
-
await this.save();
|
|
60441
|
-
await this.refresh();
|
|
60442
|
-
}
|
|
60443
|
-
}
|
|
60444
|
-
/** 缓存运行中的模板 */
|
|
60445
|
-
cacheRunningTmpl(tmpl) {
|
|
60446
|
-
if (tmpl.type === DeviceLink.TmplTypeEnum.DEVICE_INTERCONNECTION) {
|
|
60447
|
-
const index2 = this.state.runningTmpls.findIndex((item) => item.id === tmpl.id);
|
|
60448
|
-
if (index2 > -1) {
|
|
60449
|
-
this.state.runningTmpls[index2] = tmpl;
|
|
60450
|
-
} else {
|
|
60451
|
-
this.state.runningTmpls.push(tmpl);
|
|
60452
|
-
}
|
|
60453
|
-
}
|
|
60454
|
-
}
|
|
60455
|
-
}
|
|
60456
|
-
const FormTmplConfigControllerKey = "GctFormTmplConfigController";
|
|
60457
|
-
function useFormTmplConfig() {
|
|
60458
|
-
function provideController(c2 = new FormTmplConfigController()) {
|
|
60459
|
-
provide(FormTmplConfigControllerKey, c2);
|
|
60460
|
-
return c2;
|
|
60461
|
-
}
|
|
60462
|
-
function injectController() {
|
|
60463
|
-
return inject(FormTmplConfigControllerKey);
|
|
60464
|
-
}
|
|
60465
60954
|
return {
|
|
60466
|
-
|
|
60467
|
-
|
|
60955
|
+
moveDomDown,
|
|
60956
|
+
start
|
|
60468
60957
|
};
|
|
60469
60958
|
}
|
|
60470
|
-
const _hoisted_1$1s = { class: "
|
|
60471
|
-
const _hoisted_2$W = {
|
|
60472
|
-
const _hoisted_3$H = {
|
|
60959
|
+
const _hoisted_1$1s = { class: "design-body" };
|
|
60960
|
+
const _hoisted_2$W = {
|
|
60473
60961
|
class: "design-main",
|
|
60474
60962
|
ref: "scrollRef"
|
|
60475
60963
|
};
|
|
60476
|
-
const
|
|
60964
|
+
const _hoisted_3$H = {
|
|
60477
60965
|
key: 1,
|
|
60478
60966
|
class: "empty-container"
|
|
60479
60967
|
};
|
|
60480
|
-
const
|
|
60968
|
+
const _hoisted_4$u = {
|
|
60481
60969
|
key: 0,
|
|
60482
60970
|
class: "right-container"
|
|
60483
60971
|
};
|
|
60484
|
-
const
|
|
60972
|
+
const _hoisted_5$l = {
|
|
60485
60973
|
key: 1,
|
|
60486
60974
|
class: "design-footer"
|
|
60487
60975
|
};
|
|
60976
|
+
const _hoisted_6$f = { style: { "padding": "0 12px" } };
|
|
60488
60977
|
const _hoisted_7$b = { style: { "padding": "0 12px" } };
|
|
60489
|
-
const _hoisted_8$b = { style: { "padding": "0 12px" } };
|
|
60490
60978
|
const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
60491
60979
|
__name: "doc-design-layout",
|
|
60492
60980
|
props: {
|
|
@@ -60496,8 +60984,23 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
|
60496
60984
|
const props = __props;
|
|
60497
60985
|
const { provideProps } = useDocDesignLayoutProps();
|
|
60498
60986
|
const { docInst, docInfo, loading, hasData, hasPages } = useDocPubApiContext();
|
|
60499
|
-
useFormTmplConfig().injectController();
|
|
60500
60987
|
provideProps(props);
|
|
60988
|
+
const formTmplC = useFormTmplConfig().injectController();
|
|
60989
|
+
const layoutRef = ref();
|
|
60990
|
+
const { start: rightWidth, moveDomDown: rightMoveDomDown } = useDragLine(
|
|
60991
|
+
348,
|
|
60992
|
+
COLUMNS_TYPE.RIGHT,
|
|
60993
|
+
{
|
|
60994
|
+
minValue: 348
|
|
60995
|
+
}
|
|
60996
|
+
);
|
|
60997
|
+
const handleMouseDown = (e) => {
|
|
60998
|
+
if (!layoutRef.value) return;
|
|
60999
|
+
rightMoveDomDown(e, layoutRef.value);
|
|
61000
|
+
};
|
|
61001
|
+
const isPreview = computed(() => {
|
|
61002
|
+
return docInst.value?.preview ?? false;
|
|
61003
|
+
});
|
|
60501
61004
|
const {
|
|
60502
61005
|
open: handleUploadFile,
|
|
60503
61006
|
onChange: onFileUpload,
|
|
@@ -60506,10 +61009,7 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
|
60506
61009
|
multiple: false,
|
|
60507
61010
|
accept: ".docx"
|
|
60508
61011
|
});
|
|
60509
|
-
const
|
|
60510
|
-
return docInst.value?.preview ?? false;
|
|
60511
|
-
});
|
|
60512
|
-
const onImportTemplate = (payload) => {
|
|
61012
|
+
const onImportTemplate = () => {
|
|
60513
61013
|
handleUploadFile();
|
|
60514
61014
|
};
|
|
60515
61015
|
const onImportData = (mainData) => {
|
|
@@ -60521,15 +61021,24 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
|
60521
61021
|
if (!file) return;
|
|
60522
61022
|
try {
|
|
60523
61023
|
const res = await serviceUtil.parseFile(file);
|
|
60524
|
-
if (res)
|
|
60525
|
-
|
|
60526
|
-
|
|
60527
|
-
|
|
60528
|
-
}
|
|
61024
|
+
if (!res) return;
|
|
61025
|
+
const json = JSON.parse(res);
|
|
61026
|
+
const docModel = ModelConverter.toModel(json);
|
|
61027
|
+
docInst.value?.setModel(docModel);
|
|
60529
61028
|
} finally {
|
|
60530
61029
|
reset();
|
|
60531
61030
|
}
|
|
60532
61031
|
});
|
|
61032
|
+
watch(
|
|
61033
|
+
() => docInst.value?.docRuntimeMeta.id,
|
|
61034
|
+
(tmplId) => {
|
|
61035
|
+
if (!tmplId) return;
|
|
61036
|
+
formTmplC.init({ tmplId });
|
|
61037
|
+
},
|
|
61038
|
+
{
|
|
61039
|
+
immediate: true
|
|
61040
|
+
}
|
|
61041
|
+
);
|
|
60533
61042
|
__expose({
|
|
60534
61043
|
onImportTemplate,
|
|
60535
61044
|
onImportData
|
|
@@ -60540,15 +61049,19 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
|
60540
61049
|
"has-data": unref(hasData)
|
|
60541
61050
|
}, {
|
|
60542
61051
|
default: withCtx(() => [
|
|
60543
|
-
createElementVNode("div",
|
|
61052
|
+
createElementVNode("div", {
|
|
61053
|
+
class: "doc-design-layout",
|
|
61054
|
+
ref_key: "layoutRef",
|
|
61055
|
+
ref: layoutRef
|
|
61056
|
+
}, [
|
|
60544
61057
|
!isPreview.value ? (openBlock(), createBlock(Ribbon, { key: 0 })) : createCommentVNode("", true),
|
|
60545
|
-
createElementVNode("div",
|
|
60546
|
-
_cache[
|
|
60547
|
-
createElementVNode("section",
|
|
61058
|
+
createElementVNode("div", _hoisted_1$1s, [
|
|
61059
|
+
_cache[1] || (_cache[1] = createElementVNode("aside", { class: "design-sidebar left" }, null, -1)),
|
|
61060
|
+
createElementVNode("section", _hoisted_2$W, [
|
|
60548
61061
|
unref(docInfo) && unref(hasPages) ? (openBlock(), createBlock(EditableCanvas, {
|
|
60549
61062
|
key: 0,
|
|
60550
61063
|
pages: unref(docInfo).pages
|
|
60551
|
-
}, null, 8, ["pages"])) : (openBlock(), createElementBlock("div",
|
|
61064
|
+
}, null, 8, ["pages"])) : (openBlock(), createElementBlock("div", _hoisted_3$H, [
|
|
60552
61065
|
createVNode(unref(GctEmpty), {
|
|
60553
61066
|
iconSrc: unref(emptyPng),
|
|
60554
61067
|
iconHeight: 120
|
|
@@ -60557,28 +61070,34 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
|
60557
61070
|
], 512),
|
|
60558
61071
|
createElementVNode("aside", {
|
|
60559
61072
|
class: "design-sidebar right",
|
|
60560
|
-
style: normalizeStyle({
|
|
61073
|
+
style: normalizeStyle({
|
|
61074
|
+
width: isPreview.value ? "0px" : `${unref(rightWidth)}px`
|
|
61075
|
+
})
|
|
60561
61076
|
}, [
|
|
60562
|
-
!isPreview.value ? (openBlock(), createElementBlock("div",
|
|
61077
|
+
!isPreview.value ? (openBlock(), createElementBlock("div", _hoisted_4$u, [
|
|
61078
|
+
createElementVNode("div", {
|
|
61079
|
+
class: "divider",
|
|
61080
|
+
onMousedown: _cache[0] || (_cache[0] = (e) => handleMouseDown(e))
|
|
61081
|
+
}, null, 32),
|
|
60563
61082
|
createVNode(Toolkit),
|
|
60564
61083
|
createVNode(Panel)
|
|
60565
61084
|
])) : createCommentVNode("", true)
|
|
60566
61085
|
], 4)
|
|
60567
61086
|
]),
|
|
60568
|
-
!isPreview.value ? (openBlock(), createElementBlock("footer",
|
|
61087
|
+
!isPreview.value ? (openBlock(), createElementBlock("footer", _hoisted_5$l, [
|
|
60569
61088
|
createElementVNode("div", null, [
|
|
60570
|
-
createElementVNode("span",
|
|
60571
|
-
createElementVNode("span",
|
|
61089
|
+
createElementVNode("span", _hoisted_6$f, " 布局刷新次数:" + toDisplayString(unref(docInfo).updateTick), 1),
|
|
61090
|
+
createElementVNode("span", _hoisted_7$b, " 模式:" + toDisplayString(unref(docInst)?.modeLabel), 1)
|
|
60572
61091
|
])
|
|
60573
61092
|
])) : createCommentVNode("", true)
|
|
60574
|
-
])
|
|
61093
|
+
], 512)
|
|
60575
61094
|
]),
|
|
60576
61095
|
_: 1
|
|
60577
61096
|
}, 8, ["loading", "has-data"]);
|
|
60578
61097
|
};
|
|
60579
61098
|
}
|
|
60580
61099
|
});
|
|
60581
|
-
const docDesignLayout = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["__scopeId", "data-v-
|
|
61100
|
+
const docDesignLayout = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["__scopeId", "data-v-e6b0dcfe"]]);
|
|
60582
61101
|
function convertPxToPaperSize(pageSize, customSize) {
|
|
60583
61102
|
if (pageSize === PageSizeEnumConst.A3) {
|
|
60584
61103
|
return {
|
|
@@ -60623,82 +61142,125 @@ function usePrint() {
|
|
|
60623
61142
|
};
|
|
60624
61143
|
const printView = async (paperList, options) => {
|
|
60625
61144
|
const { pageSize, customSize, direction } = options;
|
|
61145
|
+
const paperSize = convertPxToPaperSize(pageSize, customSize);
|
|
61146
|
+
const isGlobalLandscape = direction === OrientationTypeConst.Landscape;
|
|
60626
61147
|
const iframe = document.createElement("iframe");
|
|
60627
61148
|
iframe.style.cssText = `
|
|
60628
|
-
|
|
60629
|
-
|
|
60630
|
-
|
|
60631
|
-
|
|
60632
|
-
|
|
60633
|
-
|
|
60634
|
-
|
|
60635
|
-
|
|
61149
|
+
position:fixed;
|
|
61150
|
+
right:0;
|
|
61151
|
+
bottom:0;
|
|
61152
|
+
width:0;
|
|
61153
|
+
height:0;
|
|
61154
|
+
border:none;
|
|
61155
|
+
visibility:hidden;
|
|
61156
|
+
`;
|
|
60636
61157
|
document.body.appendChild(iframe);
|
|
60637
|
-
const
|
|
61158
|
+
const win = iframe.contentWindow;
|
|
61159
|
+
const doc = win.document;
|
|
60638
61160
|
doc.open();
|
|
60639
|
-
|
|
60640
|
-
|
|
60641
|
-
|
|
61161
|
+
doc.write(`
|
|
61162
|
+
<!DOCTYPE html>
|
|
61163
|
+
<html>
|
|
61164
|
+
<head>
|
|
61165
|
+
<title>print</title>
|
|
61166
|
+
|
|
61167
|
+
<style>
|
|
61168
|
+
* {
|
|
61169
|
+
margin: 0;
|
|
61170
|
+
padding: 0;
|
|
61171
|
+
box-sizing: border-box;
|
|
61172
|
+
}
|
|
61173
|
+
|
|
61174
|
+
html,
|
|
61175
|
+
body {
|
|
61176
|
+
width: 100%;
|
|
61177
|
+
height: 100%;
|
|
61178
|
+
}
|
|
61179
|
+
|
|
61180
|
+
body {
|
|
61181
|
+
overflow: hidden;
|
|
61182
|
+
}
|
|
61183
|
+
|
|
61184
|
+
@page {
|
|
61185
|
+
margin: 0;
|
|
61186
|
+
size: ${paperSize.size} ${isGlobalLandscape ? "landscape" : "portrait"};
|
|
61187
|
+
}
|
|
61188
|
+
|
|
61189
|
+
.print-page {
|
|
61190
|
+
position:relative;
|
|
61191
|
+
overflow:hidden;
|
|
61192
|
+
|
|
61193
|
+
width:${isGlobalLandscape ? paperSize.height : paperSize.width};
|
|
61194
|
+
height:${isGlobalLandscape ? paperSize.width : paperSize.height};
|
|
61195
|
+
|
|
61196
|
+
page-break-after:always;
|
|
61197
|
+
break-after:page;
|
|
61198
|
+
}
|
|
61199
|
+
|
|
61200
|
+
.print-page:last-child{
|
|
61201
|
+
page-break-after:auto;
|
|
61202
|
+
break-after:auto;
|
|
61203
|
+
}
|
|
61204
|
+
|
|
61205
|
+
.print-image{
|
|
61206
|
+
position:absolute;
|
|
61207
|
+
|
|
61208
|
+
left:0;
|
|
61209
|
+
top:0;
|
|
61210
|
+
|
|
61211
|
+
width:100%;
|
|
61212
|
+
height:100%;
|
|
61213
|
+
|
|
61214
|
+
object-fit:fill;
|
|
61215
|
+
}
|
|
61216
|
+
|
|
61217
|
+
.print-image.rotate{
|
|
61218
|
+
left:50%;
|
|
61219
|
+
top:50%;
|
|
61220
|
+
|
|
61221
|
+
width:${isGlobalLandscape ? paperSize.width : paperSize.height};
|
|
61222
|
+
height:${isGlobalLandscape ? paperSize.height : paperSize.width};
|
|
61223
|
+
|
|
61224
|
+
transform:translate(-50%, -50%) rotate(90deg);
|
|
61225
|
+
transform-origin:center center;
|
|
61226
|
+
}
|
|
61227
|
+
</style>
|
|
61228
|
+
</head>
|
|
61229
|
+
|
|
61230
|
+
<body></body>
|
|
61231
|
+
</html>
|
|
61232
|
+
`);
|
|
61233
|
+
doc.close();
|
|
61234
|
+
const body = doc.body;
|
|
60642
61235
|
const imgTasks = [];
|
|
60643
61236
|
paperList.forEach((item) => {
|
|
60644
|
-
const
|
|
60645
|
-
|
|
60646
|
-
position:relative;
|
|
60647
|
-
width:${paperSize.width};
|
|
60648
|
-
height:${paperSize.height};
|
|
60649
|
-
`;
|
|
61237
|
+
const page = doc.createElement("div");
|
|
61238
|
+
page.className = "print-page";
|
|
60650
61239
|
const isPageLandscape = item.width > item.height;
|
|
60651
61240
|
const needRotate = isGlobalLandscape && !isPageLandscape || !isGlobalLandscape && isPageLandscape;
|
|
60652
|
-
const img =
|
|
61241
|
+
const img = doc.createElement("img");
|
|
61242
|
+
img.className = `print-image ${needRotate ? "rotate" : ""}`;
|
|
60653
61243
|
img.src = item.base64;
|
|
60654
|
-
if (needRotate) {
|
|
60655
|
-
img.style.cssText = `
|
|
60656
|
-
position:absolute;
|
|
60657
|
-
left:50%;
|
|
60658
|
-
top:50%;
|
|
60659
|
-
width:${isGlobalLandscape ? paperSize.width : paperSize.height};
|
|
60660
|
-
height:${isGlobalLandscape ? paperSize.height : paperSize.width};
|
|
60661
|
-
transform:translate(-50%, -50%) rotate(90deg);
|
|
60662
|
-
`;
|
|
60663
|
-
} else {
|
|
60664
|
-
img.style.cssText = `
|
|
60665
|
-
position:absolute;
|
|
60666
|
-
left: 0;
|
|
60667
|
-
top:0;
|
|
60668
|
-
width:100%;
|
|
60669
|
-
height:100%;
|
|
60670
|
-
`;
|
|
60671
|
-
}
|
|
60672
61244
|
imgTasks.push(waitImageLoad(img));
|
|
60673
|
-
|
|
60674
|
-
|
|
60675
|
-
});
|
|
60676
|
-
const style = document.createElement("style");
|
|
60677
|
-
style.innerHTML = `
|
|
60678
|
-
* { margin:0; padding:0; }
|
|
60679
|
-
@page {
|
|
60680
|
-
margin:0;
|
|
60681
|
-
size:${paperSize.size} ${isGlobalLandscape ? "landscape" : "portrait"};
|
|
60682
|
-
}
|
|
60683
|
-
`;
|
|
60684
|
-
doc.write(style.outerHTML + container2.innerHTML);
|
|
61245
|
+
page.appendChild(img);
|
|
61246
|
+
body.appendChild(page);
|
|
61247
|
+
});
|
|
60685
61248
|
await Promise.all(imgTasks);
|
|
60686
|
-
|
|
60687
|
-
|
|
60688
|
-
|
|
60689
|
-
|
|
60690
|
-
"mouseover",
|
|
60691
|
-
() => {
|
|
60692
|
-
iframe?.remove();
|
|
60693
|
-
},
|
|
60694
|
-
{
|
|
60695
|
-
once: true
|
|
60696
|
-
}
|
|
60697
|
-
);
|
|
61249
|
+
await new Promise((resolve) => {
|
|
61250
|
+
requestAnimationFrame(() => {
|
|
61251
|
+
requestAnimationFrame(resolve);
|
|
61252
|
+
});
|
|
60698
61253
|
});
|
|
61254
|
+
win.focus();
|
|
61255
|
+
setTimeout(() => {
|
|
61256
|
+
win.print();
|
|
61257
|
+
setTimeout(() => {
|
|
61258
|
+
iframe.remove();
|
|
61259
|
+
}, 1e3);
|
|
61260
|
+
}, 300);
|
|
60699
61261
|
};
|
|
60700
|
-
const
|
|
60701
|
-
const { pageSize, customSize
|
|
61262
|
+
const createPdfInstance = (paperList, options) => {
|
|
61263
|
+
const { pageSize, customSize } = options;
|
|
60702
61264
|
const paperSize = convertPxToPaperSize(pageSize, customSize);
|
|
60703
61265
|
let pdf = null;
|
|
60704
61266
|
paperList.forEach((item, index2) => {
|
|
@@ -60709,24 +61271,20 @@ function usePrint() {
|
|
|
60709
61271
|
unit: "mm",
|
|
60710
61272
|
format: [width, height]
|
|
60711
61273
|
});
|
|
60712
|
-
} else {
|
|
61274
|
+
} else if (index2 !== 0) {
|
|
60713
61275
|
pdf.addPage([width, height], isLandscape ? "landscape" : "portrait");
|
|
60714
61276
|
}
|
|
60715
61277
|
pdf.addImage(item.base64, "PNG", 0, 0, width, height);
|
|
60716
61278
|
});
|
|
61279
|
+
return pdf;
|
|
61280
|
+
};
|
|
61281
|
+
const exportWordPDF = (paperList, options) => {
|
|
61282
|
+
const { fileName = "document.pdf" } = options;
|
|
61283
|
+
const pdf = createPdfInstance(paperList, options);
|
|
60717
61284
|
pdf.save(fileName);
|
|
60718
61285
|
};
|
|
60719
61286
|
const getPdfBuffer = (paperList, options) => {
|
|
60720
|
-
const
|
|
60721
|
-
const paperSize = convertPxToPaperSize(pageSize, customSize);
|
|
60722
|
-
const pdf = new jsPDF({ unit: "mm" });
|
|
60723
|
-
paperList.forEach((item, index2) => {
|
|
60724
|
-
const { isLandscape, width, height } = getPageSize(item, paperSize);
|
|
60725
|
-
if (index2 !== 0) {
|
|
60726
|
-
pdf.addPage([width, height], isLandscape ? "landscape" : "portrait");
|
|
60727
|
-
}
|
|
60728
|
-
pdf.addImage(item.base64, "PNG", 0, 0, width, height);
|
|
60729
|
-
});
|
|
61287
|
+
const pdf = createPdfInstance(paperList, options);
|
|
60730
61288
|
return pdf.output("arraybuffer");
|
|
60731
61289
|
};
|
|
60732
61290
|
return {
|
|
@@ -63778,6 +64336,7 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
63778
64336
|
widget: {}
|
|
63779
64337
|
},
|
|
63780
64338
|
setup(__props) {
|
|
64339
|
+
const designCtx = useDesignSuiteContext();
|
|
63781
64340
|
const props = __props;
|
|
63782
64341
|
const { docInst, isDesignMode, pageWidgetProps } = usePaperWidgetStaticAttrs(props.widget);
|
|
63783
64342
|
const width = computed(() => props.widget.width);
|
|
@@ -63819,9 +64378,12 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
63819
64378
|
}
|
|
63820
64379
|
const fieldMeta = pageWidgetProps.value.bindFields?.[index2];
|
|
63821
64380
|
if (fieldMeta && fieldMeta.fieldData) {
|
|
64381
|
+
const modelKey = getLastSegment(fieldMeta.fieldData.modelLink);
|
|
64382
|
+
const fieldKey = getLastSegment(fieldMeta.fieldData.fieldLink);
|
|
64383
|
+
const fieldInfo = modelKey && fieldKey ? designCtx.runtime.getFieldList(modelKey)?.find((f) => f.key === fieldKey) ?? null : null;
|
|
63822
64384
|
const path2 = fieldMeta.fieldData?.valuePath;
|
|
63823
64385
|
if (isDesignMode.value) {
|
|
63824
|
-
return path2;
|
|
64386
|
+
return fieldInfo?.name ? `\${${fieldInfo.name}}` : path2;
|
|
63825
64387
|
}
|
|
63826
64388
|
if (path2) {
|
|
63827
64389
|
const runtimePath = replacePathIndexPlaceholder(props.widget.dataIndex, path2);
|
|
@@ -64733,7 +65295,7 @@ const _hoisted_3$F = {
|
|
|
64733
65295
|
class: "head"
|
|
64734
65296
|
};
|
|
64735
65297
|
const _hoisted_4$s = { class: "title" };
|
|
64736
|
-
const _hoisted_5$
|
|
65298
|
+
const _hoisted_5$k = {
|
|
64737
65299
|
key: 1,
|
|
64738
65300
|
class: "link"
|
|
64739
65301
|
};
|
|
@@ -64785,7 +65347,7 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
|
|
|
64785
65347
|
onClick: withModifiers(($event) => _ctx.$emit("delete-thead", item), ["stop"])
|
|
64786
65348
|
}, null, 8, ["onClick"])
|
|
64787
65349
|
])) : createCommentVNode("", true),
|
|
64788
|
-
__props.type !== "table-header" && item?.thead ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
65350
|
+
__props.type !== "table-header" && item?.thead ? (openBlock(), createElementBlock("div", _hoisted_5$k, [
|
|
64789
65351
|
createVNode(unref(GctIcon), {
|
|
64790
65352
|
class: "icon",
|
|
64791
65353
|
icon: "icon-lianjie2",
|
|
@@ -65198,7 +65760,7 @@ const _hoisted_1$1l = { class: "panel-dynamic-table" };
|
|
|
65198
65760
|
const _hoisted_2$R = { class: "container" };
|
|
65199
65761
|
const _hoisted_3$D = { class: "container" };
|
|
65200
65762
|
const _hoisted_4$r = { class: "form-custom-label" };
|
|
65201
|
-
const _hoisted_5$
|
|
65763
|
+
const _hoisted_5$j = { class: "content" };
|
|
65202
65764
|
const _sfc_main$1C = /* @__PURE__ */ defineComponent({
|
|
65203
65765
|
__name: "DynamicTablePanel",
|
|
65204
65766
|
props: {
|
|
@@ -65316,7 +65878,7 @@ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
|
|
|
65316
65878
|
])
|
|
65317
65879
|
]),
|
|
65318
65880
|
default: withCtx(() => [
|
|
65319
|
-
createElementVNode("div", _hoisted_5$
|
|
65881
|
+
createElementVNode("div", _hoisted_5$j, [
|
|
65320
65882
|
createVNode(unref(GctSwitch), {
|
|
65321
65883
|
modelValue: unref(regionProps).quickFill,
|
|
65322
65884
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(regionProps).quickFill = $event),
|
|
@@ -66974,7 +67536,7 @@ const _hoisted_1$1a = { class: "data-source-model-link-wrapper" };
|
|
|
66974
67536
|
const _hoisted_2$I = { class: "model-link-container" };
|
|
66975
67537
|
const _hoisted_3$w = { class: "model-link-content" };
|
|
66976
67538
|
const _hoisted_4$l = { class: "model-link-item" };
|
|
66977
|
-
const _hoisted_5$
|
|
67539
|
+
const _hoisted_5$i = { class: "model-link-item" };
|
|
66978
67540
|
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
66979
67541
|
__name: "data-source-model-link",
|
|
66980
67542
|
props: {
|
|
@@ -67226,7 +67788,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
67226
67788
|
return openBlock(), createElementBlock(Fragment, {
|
|
67227
67789
|
key: item.id
|
|
67228
67790
|
}, [
|
|
67229
|
-
createElementVNode("div", _hoisted_5$
|
|
67791
|
+
createElementVNode("div", _hoisted_5$i, [
|
|
67230
67792
|
createVNode(_sfc_main$1o, {
|
|
67231
67793
|
class: "custom-select",
|
|
67232
67794
|
placeholder: "请选择字段",
|
|
@@ -67404,7 +67966,7 @@ const _hoisted_1$18 = { class: "data-source-field-map-wrapper" };
|
|
|
67404
67966
|
const _hoisted_2$G = { class: "field-map-container" };
|
|
67405
67967
|
const _hoisted_3$u = { class: "field-map-content" };
|
|
67406
67968
|
const _hoisted_4$k = { class: "field-map-item" };
|
|
67407
|
-
const _hoisted_5$
|
|
67969
|
+
const _hoisted_5$h = { class: "blank last" };
|
|
67408
67970
|
const _hoisted_6$d = ["onClick"];
|
|
67409
67971
|
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
67410
67972
|
__name: "data-source-field-map",
|
|
@@ -67609,7 +68171,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
67609
68171
|
field.fieldLink = opt.fieldLink;
|
|
67610
68172
|
}
|
|
67611
68173
|
}, null, 8, ["joinModelType", "joinFormRefId", "joinModelKey", "filterFieldType", "selectCascaderValue", "onUpdate:selectCascaderValue", "selectFieldKey", "onUpdate:selectFieldKey", "onOnSelect"])),
|
|
67612
|
-
createElementVNode("span", _hoisted_5$
|
|
68174
|
+
createElementVNode("span", _hoisted_5$h, [
|
|
67613
68175
|
createElementVNode("i", {
|
|
67614
68176
|
class: "iconfont icon-shanchu",
|
|
67615
68177
|
onClick: ($event) => removeFieldItem(field)
|
|
@@ -67633,7 +68195,7 @@ const _hoisted_1$17 = { class: "param-link-container" };
|
|
|
67633
68195
|
const _hoisted_2$F = { class: "param-link-content" };
|
|
67634
68196
|
const _hoisted_3$t = { class: "param-link-item" };
|
|
67635
68197
|
const _hoisted_4$j = { class: "blank last" };
|
|
67636
|
-
const _hoisted_5$
|
|
68198
|
+
const _hoisted_5$g = ["onClick"];
|
|
67637
68199
|
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
67638
68200
|
__name: "param-field-link",
|
|
67639
68201
|
props: {
|
|
@@ -67778,7 +68340,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
67778
68340
|
createElementVNode("i", {
|
|
67779
68341
|
class: "iconfont icon-shanchu",
|
|
67780
68342
|
onClick: ($event) => removeFieldItem(fieldItem)
|
|
67781
|
-
}, null, 8, _hoisted_5$
|
|
68343
|
+
}, null, 8, _hoisted_5$g)
|
|
67782
68344
|
])
|
|
67783
68345
|
]);
|
|
67784
68346
|
}), 128))
|
|
@@ -68090,7 +68652,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
68090
68652
|
src: unref(svgAI),
|
|
68091
68653
|
class: "item-icon"
|
|
68092
68654
|
}, null, 8, _hoisted_3$r),
|
|
68093
|
-
_cache[3] || (_cache[3] = createElementVNode("div", { class: "item-name" }, "
|
|
68655
|
+
_cache[3] || (_cache[3] = createElementVNode("div", { class: "item-name" }, "OCR图像识别", -1))
|
|
68094
68656
|
])
|
|
68095
68657
|
])
|
|
68096
68658
|
]),
|
|
@@ -68115,7 +68677,7 @@ const _sfc_main$1f = /* @__PURE__ */ defineComponent({
|
|
|
68115
68677
|
};
|
|
68116
68678
|
}
|
|
68117
68679
|
});
|
|
68118
|
-
const AddTmplBtn = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-
|
|
68680
|
+
const AddTmplBtn = /* @__PURE__ */ _export_sfc(_sfc_main$1f, [["__scopeId", "data-v-25c2d428"]]);
|
|
68119
68681
|
const _hoisted_1$14 = { class: "remove-icon" };
|
|
68120
68682
|
const _sfc_main$1e = /* @__PURE__ */ defineComponent({
|
|
68121
68683
|
__name: "remove-icon",
|
|
@@ -68137,7 +68699,7 @@ const _hoisted_1$13 = { class: "tmpl-card" };
|
|
|
68137
68699
|
const _hoisted_2$C = { class: "tmpl-card__header" };
|
|
68138
68700
|
const _hoisted_3$q = { class: "header_title" };
|
|
68139
68701
|
const _hoisted_4$i = { class: "tmpl-card__icon" };
|
|
68140
|
-
const _hoisted_5$
|
|
68702
|
+
const _hoisted_5$f = { class: "tmpl-card__title" };
|
|
68141
68703
|
const _hoisted_6$c = { class: "tmpl-card__body" };
|
|
68142
68704
|
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
68143
68705
|
__name: "tmpl-card",
|
|
@@ -68153,7 +68715,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
68153
68715
|
};
|
|
68154
68716
|
const type2Title = {
|
|
68155
68717
|
[DeviceLink.TmplTypeEnum.DEVICE_INTERCONNECTION]: "设备互联",
|
|
68156
|
-
[DeviceLink.TmplTypeEnum.AI_OCR]: "
|
|
68718
|
+
[DeviceLink.TmplTypeEnum.AI_OCR]: "OCR图像识别"
|
|
68157
68719
|
};
|
|
68158
68720
|
const emit = __emit;
|
|
68159
68721
|
return (_ctx, _cache) => {
|
|
@@ -68165,7 +68727,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
68165
68727
|
class: normalizeClass([`${type2Icon[props.type]}`, "text-14px!"])
|
|
68166
68728
|
}, null, 2)
|
|
68167
68729
|
]),
|
|
68168
|
-
createElementVNode("div", _hoisted_5$
|
|
68730
|
+
createElementVNode("div", _hoisted_5$f, toDisplayString(type2Title[props.type]), 1)
|
|
68169
68731
|
]),
|
|
68170
68732
|
createVNode(RemoveIcon, {
|
|
68171
68733
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("remove"))
|
|
@@ -68178,7 +68740,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
68178
68740
|
};
|
|
68179
68741
|
}
|
|
68180
68742
|
});
|
|
68181
|
-
const TmplCard = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-
|
|
68743
|
+
const TmplCard = /* @__PURE__ */ _export_sfc(_sfc_main$1d, [["__scopeId", "data-v-5eca0a1c"]]);
|
|
68182
68744
|
const _hoisted_1$12 = { class: "device-field-status" };
|
|
68183
68745
|
const _hoisted_2$B = { class: "device-field-status__item-label" };
|
|
68184
68746
|
const _hoisted_3$p = { class: "device-field-status__item-value" };
|
|
@@ -68230,7 +68792,7 @@ const _hoisted_1$11 = { class: "params-item-card" };
|
|
|
68230
68792
|
const _hoisted_2$A = { class: "card-header" };
|
|
68231
68793
|
const _hoisted_3$o = ["title"];
|
|
68232
68794
|
const _hoisted_4$h = { class: "header-name" };
|
|
68233
|
-
const _hoisted_5$
|
|
68795
|
+
const _hoisted_5$e = ["title"];
|
|
68234
68796
|
const _hoisted_6$b = { class: "card-body" };
|
|
68235
68797
|
const _hoisted_7$9 = { class: "slot" };
|
|
68236
68798
|
const _hoisted_8$9 = {
|
|
@@ -68261,7 +68823,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
68261
68823
|
createElementVNode("span", {
|
|
68262
68824
|
class: "name-text",
|
|
68263
68825
|
title: __props.deviceParams.name
|
|
68264
|
-
}, toDisplayString(__props.deviceParams.name), 9, _hoisted_5$
|
|
68826
|
+
}, toDisplayString(__props.deviceParams.name), 9, _hoisted_5$e),
|
|
68265
68827
|
createVNode(unref(_sfc_main$31), null, {
|
|
68266
68828
|
popper: withCtx(() => [
|
|
68267
68829
|
createVNode(DeviceFieldStatus, { deviceParams: __props.deviceParams }, null, 8, ["deviceParams"])
|
|
@@ -68638,7 +69200,7 @@ const _hoisted_1$Y = { class: "editor-module" };
|
|
|
68638
69200
|
const _hoisted_2$x = { class: "row-end" };
|
|
68639
69201
|
const _hoisted_3$m = { class: "row-end" };
|
|
68640
69202
|
const _hoisted_4$g = { class: "row-end" };
|
|
68641
|
-
const _hoisted_5$
|
|
69203
|
+
const _hoisted_5$d = { class: "row-end" };
|
|
68642
69204
|
const _hoisted_6$a = { class: "row-end" };
|
|
68643
69205
|
const _hoisted_7$8 = { class: "editor-module ai-tmpl-editor__border-top" };
|
|
68644
69206
|
const _hoisted_8$8 = { class: "preview-prompt" };
|
|
@@ -68776,7 +69338,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
68776
69338
|
}, null, 8, ["content", "title"])
|
|
68777
69339
|
]),
|
|
68778
69340
|
default: withCtx(() => [
|
|
68779
|
-
createElementVNode("div", _hoisted_5$
|
|
69341
|
+
createElementVNode("div", _hoisted_5$d, [
|
|
68780
69342
|
createVNode(unref(GctSwitch), {
|
|
68781
69343
|
size: "small",
|
|
68782
69344
|
modelValue: formState.value.enableBinarize,
|
|
@@ -68945,11 +69507,11 @@ const _hoisted_1$W = { class: "field-dependency-form" };
|
|
|
68945
69507
|
const _hoisted_2$v = { class: "form-row current-component" };
|
|
68946
69508
|
const _hoisted_3$l = { class: "control" };
|
|
68947
69509
|
const _hoisted_4$f = { class: "field-icon" };
|
|
68948
|
-
const _hoisted_5$
|
|
69510
|
+
const _hoisted_5$c = { class: "form-row" };
|
|
68949
69511
|
const _hoisted_6$9 = { class: "control" };
|
|
68950
69512
|
const _hoisted_7$7 = { class: "form-row" };
|
|
68951
69513
|
const _hoisted_8$7 = { class: "control" };
|
|
68952
|
-
const _hoisted_9$
|
|
69514
|
+
const _hoisted_9$6 = { class: "form-row current-component" };
|
|
68953
69515
|
const _hoisted_10$4 = { class: "control" };
|
|
68954
69516
|
const _hoisted_11$2 = {
|
|
68955
69517
|
key: 0,
|
|
@@ -69073,7 +69635,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
69073
69635
|
})
|
|
69074
69636
|
])
|
|
69075
69637
|
]),
|
|
69076
|
-
createElementVNode("div", _hoisted_5$
|
|
69638
|
+
createElementVNode("div", _hoisted_5$c, [
|
|
69077
69639
|
_cache[8] || (_cache[8] = createElementVNode("div", { class: "label" }, "组件行为", -1)),
|
|
69078
69640
|
createElementVNode("div", _hoisted_6$9, [
|
|
69079
69641
|
createVNode(unref(GctRadioGroup), {
|
|
@@ -69120,7 +69682,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
69120
69682
|
}, 8, ["modelValue"])
|
|
69121
69683
|
])
|
|
69122
69684
|
]),
|
|
69123
|
-
createElementVNode("div", _hoisted_9$
|
|
69685
|
+
createElementVNode("div", _hoisted_9$6, [
|
|
69124
69686
|
_cache[11] || (_cache[11] = createElementVNode("div", { class: "label required" }, "新值", -1)),
|
|
69125
69687
|
createElementVNode("div", _hoisted_10$4, [
|
|
69126
69688
|
createVNode(_sfc_main$13, {
|
|
@@ -69178,7 +69740,7 @@ const _hoisted_1$V = { class: "field-dependency-module" };
|
|
|
69178
69740
|
const _hoisted_2$u = { class: "field-dependency-list" };
|
|
69179
69741
|
const _hoisted_3$k = { class: "item-header" };
|
|
69180
69742
|
const _hoisted_4$e = { class: "title" };
|
|
69181
|
-
const _hoisted_5$
|
|
69743
|
+
const _hoisted_5$b = { class: "main" };
|
|
69182
69744
|
const _hoisted_6$8 = {
|
|
69183
69745
|
key: 0,
|
|
69184
69746
|
class: "label"
|
|
@@ -69321,7 +69883,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
69321
69883
|
}, [
|
|
69322
69884
|
createElementVNode("div", _hoisted_3$k, [
|
|
69323
69885
|
createElementVNode("div", _hoisted_4$e, [
|
|
69324
|
-
createElementVNode("span", _hoisted_5$
|
|
69886
|
+
createElementVNode("span", _hoisted_5$b, toDisplayString(unref(FieldDependencyTypeCh)[type4]), 1),
|
|
69325
69887
|
type4 === unref(FieldDependencyTypeConst).Assignment ? (openBlock(), createElementBlock("span", _hoisted_6$8, " 公式计算 ")) : createCommentVNode("", true)
|
|
69326
69888
|
]),
|
|
69327
69889
|
createElementVNode("div", _hoisted_7$6, [
|
|
@@ -70372,14 +70934,14 @@ const _hoisted_1$M = { class: "autofill-rules-modal" };
|
|
|
70372
70934
|
const _hoisted_2$p = { class: "container" };
|
|
70373
70935
|
const _hoisted_3$f = { class: "header" };
|
|
70374
70936
|
const _hoisted_4$c = { class: "header-action" };
|
|
70375
|
-
const _hoisted_5$
|
|
70937
|
+
const _hoisted_5$a = { class: "autofill-form" };
|
|
70376
70938
|
const _hoisted_6$7 = { class: "form-col" };
|
|
70377
70939
|
const _hoisted_7$5 = {
|
|
70378
70940
|
key: 0,
|
|
70379
70941
|
class: "error-text"
|
|
70380
70942
|
};
|
|
70381
70943
|
const _hoisted_8$5 = { class: "form-col" };
|
|
70382
|
-
const _hoisted_9$
|
|
70944
|
+
const _hoisted_9$5 = {
|
|
70383
70945
|
key: 0,
|
|
70384
70946
|
class: "error-text"
|
|
70385
70947
|
};
|
|
@@ -70550,7 +71112,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
70550
71112
|
})
|
|
70551
71113
|
])
|
|
70552
71114
|
]),
|
|
70553
|
-
createElementVNode("div", _hoisted_5$
|
|
71115
|
+
createElementVNode("div", _hoisted_5$a, [
|
|
70554
71116
|
(openBlock(true), createElementBlock(Fragment, null, renderList(formState.rules, (rule) => {
|
|
70555
71117
|
return openBlock(), createElementBlock("div", {
|
|
70556
71118
|
key: rule.id,
|
|
@@ -70577,7 +71139,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
70577
71139
|
validateRule(rule);
|
|
70578
71140
|
}
|
|
70579
71141
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onChange"]),
|
|
70580
|
-
getError(rule, "toField") ? (openBlock(), createElementBlock("div", _hoisted_9$
|
|
71142
|
+
getError(rule, "toField") ? (openBlock(), createElementBlock("div", _hoisted_9$5, toDisplayString(getError(rule, "toField")), 1)) : createCommentVNode("", true)
|
|
70581
71143
|
]),
|
|
70582
71144
|
createElementVNode("div", {
|
|
70583
71145
|
class: "action",
|
|
@@ -70806,7 +71368,7 @@ const _hoisted_2$o = {
|
|
|
70806
71368
|
};
|
|
70807
71369
|
const _hoisted_3$e = { class: "date-format-editor__col-left" };
|
|
70808
71370
|
const _hoisted_4$b = { class: "date-format-editor__col-right" };
|
|
70809
|
-
const _hoisted_5$
|
|
71371
|
+
const _hoisted_5$9 = {
|
|
70810
71372
|
key: 1,
|
|
70811
71373
|
class: "date-format-editor__row"
|
|
70812
71374
|
};
|
|
@@ -70869,7 +71431,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
70869
71431
|
options: unref(templateOptions)
|
|
70870
71432
|
}, null, 8, ["modelValue", "options"])
|
|
70871
71433
|
])
|
|
70872
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_5$
|
|
71434
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_5$9, [
|
|
70873
71435
|
createElementVNode("div", _hoisted_6$6, [
|
|
70874
71436
|
createVNode(unref(GctInput), {
|
|
70875
71437
|
modelValue: unref(customFormatValue),
|
|
@@ -71294,14 +71856,14 @@ const _hoisted_4$a = {
|
|
|
71294
71856
|
key: 0,
|
|
71295
71857
|
class: "error"
|
|
71296
71858
|
};
|
|
71297
|
-
const _hoisted_5$
|
|
71859
|
+
const _hoisted_5$8 = { class: "form-row" };
|
|
71298
71860
|
const _hoisted_6$5 = { class: "control" };
|
|
71299
71861
|
const _hoisted_7$4 = {
|
|
71300
71862
|
key: 0,
|
|
71301
71863
|
class: "error"
|
|
71302
71864
|
};
|
|
71303
71865
|
const _hoisted_8$4 = { class: "form-row" };
|
|
71304
|
-
const _hoisted_9$
|
|
71866
|
+
const _hoisted_9$4 = { class: "control" };
|
|
71305
71867
|
const _hoisted_10$2 = { class: "form-row" };
|
|
71306
71868
|
const _hoisted_11$1 = { class: "control" };
|
|
71307
71869
|
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
@@ -71408,7 +71970,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
71408
71970
|
errors.label ? (openBlock(), createElementBlock("div", _hoisted_4$a, toDisplayString(errors.label), 1)) : createCommentVNode("", true)
|
|
71409
71971
|
])
|
|
71410
71972
|
]),
|
|
71411
|
-
createElementVNode("div", _hoisted_5$
|
|
71973
|
+
createElementVNode("div", _hoisted_5$8, [
|
|
71412
71974
|
_cache[7] || (_cache[7] = createElementVNode("div", { class: "label" }, "实际值", -1)),
|
|
71413
71975
|
createElementVNode("div", _hoisted_6$5, [
|
|
71414
71976
|
createVNode(unref(GctInput), {
|
|
@@ -71422,7 +71984,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
71422
71984
|
]),
|
|
71423
71985
|
createElementVNode("div", _hoisted_8$4, [
|
|
71424
71986
|
_cache[8] || (_cache[8] = createElementVNode("div", { class: "label" }, "默认选中", -1)),
|
|
71425
|
-
createElementVNode("div", _hoisted_9$
|
|
71987
|
+
createElementVNode("div", _hoisted_9$4, [
|
|
71426
71988
|
createVNode(unref(GctSwitch), {
|
|
71427
71989
|
modelValue: formState.defaultSelected,
|
|
71428
71990
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => formState.defaultSelected = $event)
|
|
@@ -72994,7 +73556,7 @@ const _hoisted_3$a = {
|
|
|
72994
73556
|
class: "single-drop-item"
|
|
72995
73557
|
};
|
|
72996
73558
|
const _hoisted_4$8 = { class: "single-drop-item-content" };
|
|
72997
|
-
const _hoisted_5$
|
|
73559
|
+
const _hoisted_5$7 = { class: "single-drop-item-label" };
|
|
72998
73560
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
72999
73561
|
__name: "single-drop",
|
|
73000
73562
|
props: {
|
|
@@ -73018,7 +73580,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
73018
73580
|
color: "#026ac8",
|
|
73019
73581
|
size: "16"
|
|
73020
73582
|
}, null, 8, ["icon", "version"]),
|
|
73021
|
-
createElementVNode("span", _hoisted_5$
|
|
73583
|
+
createElementVNode("span", _hoisted_5$7, toDisplayString(__props.data.fieldIdentity.label), 1)
|
|
73022
73584
|
]),
|
|
73023
73585
|
createVNode(unref(GctIcon), {
|
|
73024
73586
|
class: "single-drop-item-icon-remove",
|
|
@@ -73529,7 +74091,7 @@ const _hoisted_1$i = { class: "panel-widget-line-config" };
|
|
|
73529
74091
|
const _hoisted_2$b = { class: "line-direction-item" };
|
|
73530
74092
|
const _hoisted_3$9 = { class: "line-direction-item" };
|
|
73531
74093
|
const _hoisted_4$7 = { class: "content" };
|
|
73532
|
-
const _hoisted_5$
|
|
74094
|
+
const _hoisted_5$6 = { class: "content" };
|
|
73533
74095
|
const _hoisted_6$4 = { class: "value" };
|
|
73534
74096
|
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
73535
74097
|
__name: "widget-line-config",
|
|
@@ -73652,7 +74214,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
73652
74214
|
}, null, 8, ["model-value"])
|
|
73653
74215
|
])
|
|
73654
74216
|
]),
|
|
73655
|
-
createElementVNode("div", _hoisted_5$
|
|
74217
|
+
createElementVNode("div", _hoisted_5$6, [
|
|
73656
74218
|
_cache[10] || (_cache[10] = createElementVNode("div", { class: "label" }, "线条外观", -1)),
|
|
73657
74219
|
createElementVNode("div", _hoisted_6$4, [
|
|
73658
74220
|
createVNode(unref(GctSelect), {
|
|
@@ -73975,7 +74537,7 @@ const _hoisted_1$e = { class: "options-dropdown" };
|
|
|
73975
74537
|
const _hoisted_2$9 = { class: "options-search" };
|
|
73976
74538
|
const _hoisted_3$7 = { class: "options-dropdown-container" };
|
|
73977
74539
|
const _hoisted_4$5 = ["onClick"];
|
|
73978
|
-
const _hoisted_5$
|
|
74540
|
+
const _hoisted_5$5 = ["innerHTML", "title"];
|
|
73979
74541
|
const _hoisted_6$3 = { class: "option-right" };
|
|
73980
74542
|
const _hoisted_7$3 = {
|
|
73981
74543
|
key: 0,
|
|
@@ -73985,6 +74547,10 @@ const _hoisted_8$3 = {
|
|
|
73985
74547
|
key: 0,
|
|
73986
74548
|
class: "options-footer"
|
|
73987
74549
|
};
|
|
74550
|
+
const _hoisted_9$3 = {
|
|
74551
|
+
key: 1,
|
|
74552
|
+
class: "options-footer"
|
|
74553
|
+
};
|
|
73988
74554
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
73989
74555
|
__name: "option-dropdown",
|
|
73990
74556
|
props: {
|
|
@@ -74075,6 +74641,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
74075
74641
|
function handleOk() {
|
|
74076
74642
|
emitChange(innerValue.value);
|
|
74077
74643
|
}
|
|
74644
|
+
function handleClear() {
|
|
74645
|
+
emitChange(null);
|
|
74646
|
+
}
|
|
74078
74647
|
function emitChange(value) {
|
|
74079
74648
|
const data = setValue(value, runtimeValuePath.value, {
|
|
74080
74649
|
multiple: props.isMultiple,
|
|
@@ -74124,7 +74693,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
74124
74693
|
class: "option-label",
|
|
74125
74694
|
innerHTML: item.highlightName || item.label,
|
|
74126
74695
|
title: item.label
|
|
74127
|
-
}, null, 8, _hoisted_5$
|
|
74696
|
+
}, null, 8, _hoisted_5$5)
|
|
74128
74697
|
]),
|
|
74129
74698
|
_: 2
|
|
74130
74699
|
}, 1032, ["disabled"]),
|
|
@@ -74153,12 +74722,17 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
74153
74722
|
class: "btn-item",
|
|
74154
74723
|
onClick: withModifiers(handleOk, ["stop"])
|
|
74155
74724
|
}, "确认")
|
|
74725
|
+
])) : innerValue.value ? (openBlock(), createElementBlock("div", _hoisted_9$3, [
|
|
74726
|
+
createElementVNode("div", {
|
|
74727
|
+
class: "btn-center",
|
|
74728
|
+
onClick: withModifiers(handleClear, ["stop"])
|
|
74729
|
+
}, "清除")
|
|
74156
74730
|
])) : createCommentVNode("", true)
|
|
74157
74731
|
]);
|
|
74158
74732
|
};
|
|
74159
74733
|
}
|
|
74160
74734
|
});
|
|
74161
|
-
const optionDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
74735
|
+
const optionDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-acc41a8a"]]);
|
|
74162
74736
|
const optionDropdown$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74163
74737
|
__proto__: null,
|
|
74164
74738
|
default: optionDropdown
|
|
@@ -74260,6 +74834,10 @@ const _hoisted_4$4 = {
|
|
|
74260
74834
|
key: 0,
|
|
74261
74835
|
class: "options-footer"
|
|
74262
74836
|
};
|
|
74837
|
+
const _hoisted_5$4 = {
|
|
74838
|
+
key: 1,
|
|
74839
|
+
class: "options-footer"
|
|
74840
|
+
};
|
|
74263
74841
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
74264
74842
|
__name: "tree-dropdown",
|
|
74265
74843
|
props: {
|
|
@@ -74324,6 +74902,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
74324
74902
|
function handleOk() {
|
|
74325
74903
|
emitChange(innerValue.value);
|
|
74326
74904
|
}
|
|
74905
|
+
function handleClear() {
|
|
74906
|
+
emitChange(null);
|
|
74907
|
+
}
|
|
74327
74908
|
function emitChange(value) {
|
|
74328
74909
|
const data = setValue(value, runtimeValuePath.value, {
|
|
74329
74910
|
multiple: props.isMultiple,
|
|
@@ -74362,12 +74943,17 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
74362
74943
|
class: "btn-item",
|
|
74363
74944
|
onClick: withModifiers(handleOk, ["stop"])
|
|
74364
74945
|
}, "确认")
|
|
74946
|
+
])) : innerValue.value ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
|
|
74947
|
+
createElementVNode("div", {
|
|
74948
|
+
class: "btn-center",
|
|
74949
|
+
onClick: withModifiers(handleClear, ["stop"])
|
|
74950
|
+
}, "清除")
|
|
74365
74951
|
])) : createCommentVNode("", true)
|
|
74366
74952
|
]);
|
|
74367
74953
|
};
|
|
74368
74954
|
}
|
|
74369
74955
|
});
|
|
74370
|
-
const treeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
74956
|
+
const treeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-2eb67208"]]);
|
|
74371
74957
|
const treeDropdown$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74372
74958
|
__proto__: null,
|
|
74373
74959
|
default: treeDropdown
|
|
@@ -74387,7 +74973,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
74387
74973
|
const isDateTime = computed(() => widgetMeta.value.type === "fw:date-time");
|
|
74388
74974
|
const pickerFormat = computed(() => isDateTime.value ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD");
|
|
74389
74975
|
function onPanelChange(v) {
|
|
74390
|
-
const data = setValue(dayjs(v).format(pickerFormat.value), runtimeValuePath.value);
|
|
74976
|
+
const data = setValue(v ? dayjs(v).format(pickerFormat.value) : v, runtimeValuePath.value);
|
|
74391
74977
|
emit("change", data);
|
|
74392
74978
|
}
|
|
74393
74979
|
return (_ctx, _cache) => {
|
|
@@ -74396,13 +74982,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
74396
74982
|
modelValue: __props.modelValue,
|
|
74397
74983
|
onChange: onPanelChange,
|
|
74398
74984
|
mode: isDateTime.value ? "datetime" : "date",
|
|
74399
|
-
timeFormat: unref(widgetProps).timeFormat
|
|
74985
|
+
timeFormat: unref(widgetProps).timeFormat,
|
|
74986
|
+
"show-clear-btn": ""
|
|
74400
74987
|
}, null, 8, ["modelValue", "mode", "timeFormat"])
|
|
74401
74988
|
]);
|
|
74402
74989
|
};
|
|
74403
74990
|
}
|
|
74404
74991
|
});
|
|
74405
|
-
const datetimeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
74992
|
+
const datetimeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-aab79189"]]);
|
|
74406
74993
|
const datetimeDropdown$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74407
74994
|
__proto__: null,
|
|
74408
74995
|
default: datetimeDropdown
|
|
@@ -74427,13 +75014,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
74427
75014
|
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
74428
75015
|
createVNode(unref(GctTimer), {
|
|
74429
75016
|
"model-value": __props.modelValue,
|
|
74430
|
-
onChange: onPanelChange
|
|
75017
|
+
onChange: onPanelChange,
|
|
75018
|
+
"show-clear-btn": ""
|
|
74431
75019
|
}, null, 8, ["model-value"])
|
|
74432
75020
|
]);
|
|
74433
75021
|
};
|
|
74434
75022
|
}
|
|
74435
75023
|
});
|
|
74436
|
-
const timeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
75024
|
+
const timeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-0875dd7d"]]);
|
|
74437
75025
|
const timeDropdown$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74438
75026
|
__proto__: null,
|
|
74439
75027
|
default: timeDropdown
|
|
@@ -75385,7 +75973,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
75385
75973
|
});
|
|
75386
75974
|
Object.assign(data, clearData);
|
|
75387
75975
|
}
|
|
75388
|
-
emit("change", data, row
|
|
75976
|
+
emit("change", data, row?._item);
|
|
75389
75977
|
};
|
|
75390
75978
|
__expose({
|
|
75391
75979
|
getRef: () => xTable.value,
|
|
@@ -75414,17 +76002,28 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
75414
76002
|
type: "primary",
|
|
75415
76003
|
onClick: unref(search)
|
|
75416
76004
|
}, {
|
|
75417
|
-
default: withCtx(() => [..._cache[
|
|
76005
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
75418
76006
|
createTextVNode("搜索", -1)
|
|
75419
76007
|
])]),
|
|
75420
76008
|
_: 1
|
|
75421
76009
|
}, 8, ["onClick"]),
|
|
75422
76010
|
createVNode(unref(GctButton), { onClick: unref(reset) }, {
|
|
75423
|
-
default: withCtx(() => [..._cache[
|
|
76011
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
75424
76012
|
createTextVNode("重置", -1)
|
|
75425
76013
|
])]),
|
|
75426
76014
|
_: 1
|
|
75427
|
-
}, 8, ["onClick"])
|
|
76015
|
+
}, 8, ["onClick"]),
|
|
76016
|
+
__props.modelValue ? (openBlock(), createBlock(unref(GctButton), {
|
|
76017
|
+
key: 0,
|
|
76018
|
+
type: "danger",
|
|
76019
|
+
plain: "",
|
|
76020
|
+
onClick: _cache[1] || (_cache[1] = () => onChangeSelect())
|
|
76021
|
+
}, {
|
|
76022
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
76023
|
+
createTextVNode("清除", -1)
|
|
76024
|
+
])]),
|
|
76025
|
+
_: 1
|
|
76026
|
+
})) : createCommentVNode("", true)
|
|
75428
76027
|
])) : createCommentVNode("", true),
|
|
75429
76028
|
unref(message) ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
|
|
75430
76029
|
createVNode(unref(GctIcon), {
|
|
@@ -75449,8 +76048,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
75449
76048
|
pagination: unref(pagination),
|
|
75450
76049
|
hasNextPage: unref(hasNextPage),
|
|
75451
76050
|
hasPrevPage: unref(hasPrevPage),
|
|
75452
|
-
onOnNext: _cache[
|
|
75453
|
-
onOnPrev: _cache[
|
|
76051
|
+
onOnNext: _cache[2] || (_cache[2] = ($event) => unref(handlePagination)("next")),
|
|
76052
|
+
onOnPrev: _cache[3] || (_cache[3] = ($event) => unref(handlePagination)("prev"))
|
|
75454
76053
|
}, null, 8, ["pagination", "hasNextPage", "hasPrevPage"])) : createCommentVNode("", true)
|
|
75455
76054
|
]);
|
|
75456
76055
|
};
|
|
@@ -75519,21 +76118,23 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
75519
76118
|
});
|
|
75520
76119
|
const onChangeSelect = (row) => {
|
|
75521
76120
|
const { __VALUE__, __DEFAULT__, __HAS_ONE_CHILD__, __SHOW_LABEL__, __VERSION_NAME__ } = row || {};
|
|
75522
|
-
const value = __VALUE__ || row
|
|
76121
|
+
const value = __VALUE__ || row?.value || row?._item.id_;
|
|
75523
76122
|
const shouldHideName = props.hideSingleVersion && __HAS_ONE_CHILD__;
|
|
75524
76123
|
let showValue;
|
|
75525
76124
|
let showLabel;
|
|
75526
|
-
if (
|
|
75527
|
-
if (
|
|
75528
|
-
|
|
75529
|
-
|
|
76125
|
+
if (value) {
|
|
76126
|
+
if (__DEFAULT__) {
|
|
76127
|
+
if (props.parentToDefault) {
|
|
76128
|
+
showLabel = shouldHideName ? __SHOW_LABEL__ : `${__SHOW_LABEL__}:${__DEFAULT__.__VERSION_NAME__}`;
|
|
76129
|
+
showValue = `${value}:${__DEFAULT__._item.id_}`;
|
|
76130
|
+
} else {
|
|
76131
|
+
showLabel = __SHOW_LABEL__;
|
|
76132
|
+
showValue = value;
|
|
76133
|
+
}
|
|
75530
76134
|
} else {
|
|
75531
|
-
showLabel = __SHOW_LABEL__
|
|
76135
|
+
showLabel = shouldHideName ? __SHOW_LABEL__ : `${__SHOW_LABEL__}:${__VERSION_NAME__}`;
|
|
75532
76136
|
showValue = value;
|
|
75533
76137
|
}
|
|
75534
|
-
} else {
|
|
75535
|
-
showLabel = shouldHideName ? __SHOW_LABEL__ : `${__SHOW_LABEL__}:${__VERSION_NAME__}`;
|
|
75536
|
-
showValue = value;
|
|
75537
76138
|
}
|
|
75538
76139
|
const data = setValue(showValue, runtimeValuePath.value, {
|
|
75539
76140
|
needLabel: true,
|
|
@@ -75542,7 +76143,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
75542
76143
|
},
|
|
75543
76144
|
labelKey: "showLabel"
|
|
75544
76145
|
});
|
|
75545
|
-
emit("change", data, __DEFAULT__ ? __DEFAULT__._item : row
|
|
76146
|
+
emit("change", data, __DEFAULT__ ? __DEFAULT__._item : row?._item);
|
|
75546
76147
|
};
|
|
75547
76148
|
__expose({
|
|
75548
76149
|
getRef: () => xTable.value,
|
|
@@ -75571,17 +76172,28 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
75571
76172
|
type: "primary",
|
|
75572
76173
|
onClick: unref(search)
|
|
75573
76174
|
}, {
|
|
75574
|
-
default: withCtx(() => [..._cache[
|
|
76175
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
75575
76176
|
createTextVNode("搜索", -1)
|
|
75576
76177
|
])]),
|
|
75577
76178
|
_: 1
|
|
75578
76179
|
}, 8, ["onClick"]),
|
|
75579
76180
|
createVNode(unref(GctButton), { onClick: unref(reset) }, {
|
|
75580
|
-
default: withCtx(() => [..._cache[
|
|
76181
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
75581
76182
|
createTextVNode("重置", -1)
|
|
75582
76183
|
])]),
|
|
75583
76184
|
_: 1
|
|
75584
|
-
}, 8, ["onClick"])
|
|
76185
|
+
}, 8, ["onClick"]),
|
|
76186
|
+
__props.modelValue ? (openBlock(), createBlock(unref(GctButton), {
|
|
76187
|
+
key: 0,
|
|
76188
|
+
type: "danger",
|
|
76189
|
+
plain: "",
|
|
76190
|
+
onClick: _cache[1] || (_cache[1] = () => onChangeSelect())
|
|
76191
|
+
}, {
|
|
76192
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
76193
|
+
createTextVNode("清除", -1)
|
|
76194
|
+
])]),
|
|
76195
|
+
_: 1
|
|
76196
|
+
})) : createCommentVNode("", true)
|
|
75585
76197
|
]),
|
|
75586
76198
|
createVNode(BaseVxeTable, {
|
|
75587
76199
|
ref_key: "xTable",
|
|
@@ -75604,8 +76216,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
75604
76216
|
pagination: unref(pagination),
|
|
75605
76217
|
hasNextPage: unref(hasNextPage),
|
|
75606
76218
|
hasPrevPage: unref(hasPrevPage),
|
|
75607
|
-
onOnNext: _cache[
|
|
75608
|
-
onOnPrev: _cache[
|
|
76219
|
+
onOnNext: _cache[2] || (_cache[2] = ($event) => unref(handlePagination)("next")),
|
|
76220
|
+
onOnPrev: _cache[3] || (_cache[3] = ($event) => unref(handlePagination)("prev"))
|
|
75609
76221
|
}, null, 8, ["pagination", "hasNextPage", "hasPrevPage"])) : createCommentVNode("", true)
|
|
75610
76222
|
]);
|
|
75611
76223
|
};
|
|
@@ -76383,6 +76995,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76383
76995
|
modelValue: formState.username,
|
|
76384
76996
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formState.username = $event),
|
|
76385
76997
|
placeholder: "请输入",
|
|
76998
|
+
allowClear: "",
|
|
76386
76999
|
onBlur: _cache[1] || (_cache[1] = ($event) => validateField("username"))
|
|
76387
77000
|
}, null, 8, ["modelValue"]),
|
|
76388
77001
|
errors.username ? (openBlock(), createElementBlock("div", _hoisted_4, toDisplayString(errors.username), 1)) : createCommentVNode("", true)
|
|
@@ -76395,6 +77008,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76395
77008
|
modelValue: formState.password,
|
|
76396
77009
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formState.password = $event),
|
|
76397
77010
|
placeholder: "请输入",
|
|
77011
|
+
type: "password",
|
|
77012
|
+
allowClear: "",
|
|
76398
77013
|
onBlur: _cache[3] || (_cache[3] = ($event) => validateField("password"))
|
|
76399
77014
|
}, null, 8, ["modelValue"]),
|
|
76400
77015
|
errors.password ? (openBlock(), createElementBlock("div", _hoisted_8, toDisplayString(errors.password), 1)) : createCommentVNode("", true)
|
|
@@ -76417,7 +77032,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76417
77032
|
};
|
|
76418
77033
|
}
|
|
76419
77034
|
});
|
|
76420
|
-
const signatureDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
77035
|
+
const signatureDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f0714089"]]);
|
|
76421
77036
|
const signatureDialog$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
76422
77037
|
__proto__: null,
|
|
76423
77038
|
default: signatureDialog
|