@gct-paas/word 0.1.18 → 0.1.19
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/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/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/index.es.js +1132 -752
- package/dist/runtime/canvas/table/utils/useTableSelection.d.ts +1 -0
- package/dist/sdk/types/index.d.ts +2 -0
- package/dist/utils/func/form.d.ts +5 -0
- package/dist/word.css +310 -266
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -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
|
|
@@ -23122,7 +23148,7 @@ class WtrPr extends ModelNode {
|
|
|
23122
23148
|
*
|
|
23123
23149
|
* @returns RawElement 格式的 XML JSON
|
|
23124
23150
|
*/
|
|
23125
|
-
toXmlJson() {
|
|
23151
|
+
toXmlJson(options) {
|
|
23126
23152
|
const result = {
|
|
23127
23153
|
name: this.name,
|
|
23128
23154
|
type: this.type
|
|
@@ -23130,9 +23156,29 @@ class WtrPr extends ModelNode {
|
|
|
23130
23156
|
if (this.attrs) {
|
|
23131
23157
|
result["@attrs"] = { ...this.attrs };
|
|
23132
23158
|
}
|
|
23133
|
-
|
|
23134
|
-
|
|
23159
|
+
const nextElements = [...this.elements || []];
|
|
23160
|
+
if (options?.syncRowHeight) {
|
|
23161
|
+
const trHeightIndex = nextElements.findIndex((el) => el.name === "w:trHeight");
|
|
23162
|
+
const hasRowHeight = options.rowHeight !== void 0 && Number.isFinite(options.rowHeight);
|
|
23163
|
+
if (hasRowHeight) {
|
|
23164
|
+
const trHeight = {
|
|
23165
|
+
name: "w:trHeight",
|
|
23166
|
+
type: "element",
|
|
23167
|
+
"@attrs": {
|
|
23168
|
+
"w:val": String(Math.round(options.rowHeight)),
|
|
23169
|
+
"w:hRule": options.rowHeightRule ?? "atLeast"
|
|
23170
|
+
}
|
|
23171
|
+
};
|
|
23172
|
+
if (trHeightIndex >= 0) {
|
|
23173
|
+
nextElements[trHeightIndex] = trHeight;
|
|
23174
|
+
} else {
|
|
23175
|
+
nextElements.push(trHeight);
|
|
23176
|
+
}
|
|
23177
|
+
} else if (trHeightIndex >= 0) {
|
|
23178
|
+
nextElements.splice(trHeightIndex, 1);
|
|
23179
|
+
}
|
|
23135
23180
|
}
|
|
23181
|
+
result.elements = nextElements;
|
|
23136
23182
|
return result;
|
|
23137
23183
|
}
|
|
23138
23184
|
/**
|
|
@@ -23184,6 +23230,30 @@ class WtrPr extends ModelNode {
|
|
|
23184
23230
|
}
|
|
23185
23231
|
return false;
|
|
23186
23232
|
}
|
|
23233
|
+
getRowHeight() {
|
|
23234
|
+
const trHeight = this.getElement("w:trHeight");
|
|
23235
|
+
const val = trHeight?.["@attrs"]?.["w:val"];
|
|
23236
|
+
const rule = trHeight?.["@attrs"]?.["w:hRule"];
|
|
23237
|
+
const parsedHeight = val === void 0 ? void 0 : Number(val);
|
|
23238
|
+
return {
|
|
23239
|
+
rowHeight: Number.isFinite(parsedHeight) ? parsedHeight : void 0,
|
|
23240
|
+
rowHeightRule: rule === "auto" || rule === "atLeast" || rule === "exact" ? rule : void 0
|
|
23241
|
+
};
|
|
23242
|
+
}
|
|
23243
|
+
setRowHeight(rowHeight, rowHeightRule = "atLeast") {
|
|
23244
|
+
if (rowHeight === void 0 || !Number.isFinite(rowHeight)) {
|
|
23245
|
+
this.removeElement("w:trHeight");
|
|
23246
|
+
return;
|
|
23247
|
+
}
|
|
23248
|
+
this.setElement({
|
|
23249
|
+
name: "w:trHeight",
|
|
23250
|
+
type: "element",
|
|
23251
|
+
"@attrs": {
|
|
23252
|
+
"w:val": String(Math.round(rowHeight)),
|
|
23253
|
+
"w:hRule": rowHeightRule
|
|
23254
|
+
}
|
|
23255
|
+
});
|
|
23256
|
+
}
|
|
23187
23257
|
static fromTemplate() {
|
|
23188
23258
|
const json = JSON.parse(JSON.stringify(TABLE_TRPR_TEMPLATE));
|
|
23189
23259
|
return new WtrPr({
|
|
@@ -23237,9 +23307,12 @@ class Wtr extends ModelGroup {
|
|
|
23237
23307
|
tds.push(...tc);
|
|
23238
23308
|
}
|
|
23239
23309
|
});
|
|
23310
|
+
const parsedRowHeight = trPr?.getRowHeight() ?? {};
|
|
23240
23311
|
const wtr = new Wtr({
|
|
23241
23312
|
attrs: trRaw["@attrs"],
|
|
23242
23313
|
trPr,
|
|
23314
|
+
rowHeight: parsedRowHeight.rowHeight,
|
|
23315
|
+
rowHeightRule: parsedRowHeight.rowHeightRule,
|
|
23243
23316
|
children: tds
|
|
23244
23317
|
});
|
|
23245
23318
|
tds.forEach((cell) => {
|
|
@@ -23256,7 +23329,22 @@ class Wtr extends ModelGroup {
|
|
|
23256
23329
|
toXmlJson() {
|
|
23257
23330
|
const elements = [];
|
|
23258
23331
|
if (this.trPr) {
|
|
23259
|
-
elements.push(
|
|
23332
|
+
elements.push(
|
|
23333
|
+
this.trPr.toXmlJson({
|
|
23334
|
+
syncRowHeight: true,
|
|
23335
|
+
rowHeight: this.rowHeight,
|
|
23336
|
+
rowHeightRule: this.rowHeightRule
|
|
23337
|
+
})
|
|
23338
|
+
);
|
|
23339
|
+
} else if (this.rowHeight !== void 0 && Number.isFinite(this.rowHeight)) {
|
|
23340
|
+
const tempTrPr = new WtrPr({ elements: [] });
|
|
23341
|
+
elements.push(
|
|
23342
|
+
tempTrPr.toXmlJson({
|
|
23343
|
+
syncRowHeight: true,
|
|
23344
|
+
rowHeight: this.rowHeight,
|
|
23345
|
+
rowHeightRule: this.rowHeightRule
|
|
23346
|
+
})
|
|
23347
|
+
);
|
|
23260
23348
|
}
|
|
23261
23349
|
this.children.forEach((cell) => {
|
|
23262
23350
|
if (cell instanceof Wtc && typeof cell.toXmlJson === "function") {
|
|
@@ -23297,9 +23385,12 @@ class Wtr extends ModelGroup {
|
|
|
23297
23385
|
return Wtc.fromTemplate(width);
|
|
23298
23386
|
});
|
|
23299
23387
|
const trPr = WtrPr.fromTemplate();
|
|
23388
|
+
const parsedRowHeight = trPr.getRowHeight();
|
|
23300
23389
|
const wtr = new Wtr({
|
|
23301
23390
|
children: cells,
|
|
23302
23391
|
trPr,
|
|
23392
|
+
rowHeight: parsedRowHeight.rowHeight,
|
|
23393
|
+
rowHeightRule: parsedRowHeight.rowHeightRule,
|
|
23303
23394
|
attrs: templateWithValues["@attrs"]
|
|
23304
23395
|
});
|
|
23305
23396
|
cells.forEach((cell) => {
|
|
@@ -27886,6 +27977,9 @@ class Backspace extends CommandBase {
|
|
|
27886
27977
|
if (run?.isPlaceholderRun) {
|
|
27887
27978
|
return this.handlePlaceholderRun(modelWp);
|
|
27888
27979
|
}
|
|
27980
|
+
if (run?.isPageWidgetRun && (run.pageWidgetMeta?.type === "pw:pagination" || run.pageWidgetMeta?.type === "pw:line")) {
|
|
27981
|
+
return this.handleOverlayPageWidgetRun(modelWr);
|
|
27982
|
+
}
|
|
27889
27983
|
if (run?.isWidgetRun) {
|
|
27890
27984
|
return this.handleWidgetRun(modelWr, modelWp, position, run);
|
|
27891
27985
|
}
|
|
@@ -27940,6 +28034,20 @@ class Backspace extends CommandBase {
|
|
|
27940
28034
|
};
|
|
27941
28035
|
}
|
|
27942
28036
|
}
|
|
28037
|
+
/** 处理悬浮 run 的删除 */
|
|
28038
|
+
handleOverlayPageWidgetRun(modelWr) {
|
|
28039
|
+
const wlayout = modelWr.getWlayout?.();
|
|
28040
|
+
if (!wlayout || wlayout.name !== "w:lyt" || wlayout.parent?.name !== "w:ovl") {
|
|
28041
|
+
return null;
|
|
28042
|
+
}
|
|
28043
|
+
wlayout.remove();
|
|
28044
|
+
const firstWp = this.doc.model?.document.getFirstWp();
|
|
28045
|
+
return {
|
|
28046
|
+
wp: firstWp,
|
|
28047
|
+
pos: -1,
|
|
28048
|
+
side: "after"
|
|
28049
|
+
};
|
|
28050
|
+
}
|
|
27943
28051
|
/**
|
|
27944
28052
|
* 处理位置 >= 0 的删除情况
|
|
27945
28053
|
*/
|
|
@@ -28862,7 +28970,8 @@ class InsertField extends CommandBase {
|
|
|
28862
28970
|
mainModelFields
|
|
28863
28971
|
} = this.payload;
|
|
28864
28972
|
const mapper = this.doc.layoutMapper;
|
|
28865
|
-
const
|
|
28973
|
+
const node = mapper.getBaseMetaNodeById(nodeId);
|
|
28974
|
+
const run = node.raw;
|
|
28866
28975
|
const wp = mapper.getModelNodeById(run.parent.modelRef.id);
|
|
28867
28976
|
let valuePath = _valuePath;
|
|
28868
28977
|
if (run.modelRef?.valuePath2D) {
|
|
@@ -28900,7 +29009,7 @@ class InsertField extends CommandBase {
|
|
|
28900
29009
|
wp.appendChild(wr);
|
|
28901
29010
|
}
|
|
28902
29011
|
return {
|
|
28903
|
-
wr,
|
|
29012
|
+
wr: node.pageArea === "body" ? wr : wr.cloneWithSuffix("$p", "1"),
|
|
28904
29013
|
pos: -1,
|
|
28905
29014
|
side: "before"
|
|
28906
29015
|
};
|
|
@@ -29391,7 +29500,8 @@ class InsertPaperWidget extends CommandBase {
|
|
|
29391
29500
|
const { nodeId, offset: offset2, side } = cursor.getCursor();
|
|
29392
29501
|
const { pageWidgetMeta } = this.payload;
|
|
29393
29502
|
const mapper = this.doc.layoutMapper;
|
|
29394
|
-
const
|
|
29503
|
+
const node = mapper.getBaseMetaNodeById(nodeId);
|
|
29504
|
+
const run = node.raw;
|
|
29395
29505
|
const wp = mapper.getModelNodeById(run.parent.modelRef.id);
|
|
29396
29506
|
const wr = new WrPageWidget({ text: "*", pageWidgetMeta });
|
|
29397
29507
|
if (pageWidgetMeta.type === "pw:diagonal" && wp.parent.name === "w:tc") {
|
|
@@ -29423,7 +29533,7 @@ class InsertPaperWidget extends CommandBase {
|
|
|
29423
29533
|
wp.appendChild(wr);
|
|
29424
29534
|
}
|
|
29425
29535
|
return {
|
|
29426
|
-
wr,
|
|
29536
|
+
wr: node.pageArea === "body" ? wr : wr.cloneWithSuffix("$p", "1"),
|
|
29427
29537
|
pos: -1,
|
|
29428
29538
|
side: "before"
|
|
29429
29539
|
};
|
|
@@ -30036,12 +30146,14 @@ const _hoisted_1$2j = { class: "gct-time-container" };
|
|
|
30036
30146
|
const _hoisted_2$1v = { class: "scrollbar-container" };
|
|
30037
30147
|
const _hoisted_3$1a = ["onClick"];
|
|
30038
30148
|
const _hoisted_4$O = { class: "gct-time-footer" };
|
|
30149
|
+
const _hoisted_5$D = { class: "gct-right-btns" };
|
|
30039
30150
|
const _sfc_main$3s = /* @__PURE__ */ defineComponent({
|
|
30040
30151
|
__name: "time",
|
|
30041
30152
|
props: {
|
|
30042
30153
|
modelValue: {},
|
|
30043
30154
|
disabled: { type: Boolean },
|
|
30044
30155
|
format: {},
|
|
30156
|
+
showClearBtn: { type: Boolean },
|
|
30045
30157
|
disabledTime: { type: Function }
|
|
30046
30158
|
},
|
|
30047
30159
|
emits: ["update:modelValue", "change"],
|
|
@@ -30141,6 +30253,16 @@ const _sfc_main$3s = /* @__PURE__ */ defineComponent({
|
|
|
30141
30253
|
timeMap[type4].value = value;
|
|
30142
30254
|
scrollToCenter(type4, value);
|
|
30143
30255
|
}
|
|
30256
|
+
function clear() {
|
|
30257
|
+
emit("update:modelValue", null);
|
|
30258
|
+
emit("change", {
|
|
30259
|
+
hour: null,
|
|
30260
|
+
minute: null,
|
|
30261
|
+
second: null,
|
|
30262
|
+
value: null,
|
|
30263
|
+
isNowDay: false
|
|
30264
|
+
});
|
|
30265
|
+
}
|
|
30144
30266
|
function confirm(isNow = false) {
|
|
30145
30267
|
if (props.disabled) return;
|
|
30146
30268
|
const { hour, minute, second } = timeMap;
|
|
@@ -30216,38 +30338,56 @@ const _sfc_main$3s = /* @__PURE__ */ defineComponent({
|
|
|
30216
30338
|
class: "gct-now-btn",
|
|
30217
30339
|
onClick: nowDay
|
|
30218
30340
|
}, "此刻"),
|
|
30219
|
-
|
|
30220
|
-
|
|
30221
|
-
|
|
30222
|
-
|
|
30223
|
-
|
|
30224
|
-
|
|
30225
|
-
|
|
30226
|
-
|
|
30227
|
-
|
|
30228
|
-
|
|
30229
|
-
|
|
30230
|
-
|
|
30341
|
+
createElementVNode("div", _hoisted_5$D, [
|
|
30342
|
+
__props.showClearBtn && __props.modelValue ? (openBlock(), createBlock(unref(GctButton), {
|
|
30343
|
+
key: 0,
|
|
30344
|
+
class: "gct-sure-btn",
|
|
30345
|
+
size: "small",
|
|
30346
|
+
disabled: __props.disabled,
|
|
30347
|
+
onClick: clear
|
|
30348
|
+
}, {
|
|
30349
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
30350
|
+
createTextVNode(" 清除 ", -1)
|
|
30351
|
+
])]),
|
|
30352
|
+
_: 1
|
|
30353
|
+
}, 8, ["disabled"])) : createCommentVNode("", true),
|
|
30354
|
+
createVNode(unref(GctButton), {
|
|
30355
|
+
class: "gct-sure-btn",
|
|
30356
|
+
type: "primary",
|
|
30357
|
+
size: "small",
|
|
30358
|
+
disabled: __props.disabled,
|
|
30359
|
+
onClick: confirm
|
|
30360
|
+
}, {
|
|
30361
|
+
default: withCtx(() => [..._cache[1] || (_cache[1] = [
|
|
30362
|
+
createTextVNode(" 确定 ", -1)
|
|
30363
|
+
])]),
|
|
30364
|
+
_: 1
|
|
30365
|
+
}, 8, ["disabled"])
|
|
30366
|
+
])
|
|
30231
30367
|
])
|
|
30232
30368
|
], 2);
|
|
30233
30369
|
};
|
|
30234
30370
|
}
|
|
30235
30371
|
});
|
|
30236
|
-
const GctTimer = /* @__PURE__ */ _export_sfc(_sfc_main$3s, [["__scopeId", "data-v-
|
|
30372
|
+
const GctTimer = /* @__PURE__ */ _export_sfc(_sfc_main$3s, [["__scopeId", "data-v-ee92739f"]]);
|
|
30237
30373
|
const _hoisted_1$2i = { class: "gct-dtp-panel-inner" };
|
|
30238
30374
|
const _hoisted_2$1u = { class: "gct-dtp-date" };
|
|
30239
30375
|
const _hoisted_3$19 = { class: "gct-dtp-header" };
|
|
30240
30376
|
const _hoisted_4$N = { class: "text" };
|
|
30241
|
-
const _hoisted_5$
|
|
30377
|
+
const _hoisted_5$C = { class: "gct-dtp-head" };
|
|
30242
30378
|
const _hoisted_6$r = { class: "gct-dtp-rows-wrapper" };
|
|
30243
30379
|
const _hoisted_7$n = ["onClick"];
|
|
30244
30380
|
const _hoisted_8$j = { class: "dtp-day-label" };
|
|
30245
|
-
const _hoisted_9$
|
|
30381
|
+
const _hoisted_9$b = {
|
|
30382
|
+
key: 0,
|
|
30383
|
+
class: "gct-date-footer"
|
|
30384
|
+
};
|
|
30385
|
+
const _hoisted_10$8 = {
|
|
30246
30386
|
key: 0,
|
|
30247
30387
|
class: "gct-dtp-time"
|
|
30248
30388
|
};
|
|
30249
|
-
const
|
|
30250
|
-
const
|
|
30389
|
+
const _hoisted_11$5 = { class: "gct-dtp-time-header" };
|
|
30390
|
+
const _hoisted_12$4 = { class: "gct-dtp-time-container" };
|
|
30251
30391
|
const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
30252
30392
|
__name: "calendar",
|
|
30253
30393
|
props: {
|
|
@@ -30258,7 +30398,8 @@ const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
|
30258
30398
|
disabledDates: {},
|
|
30259
30399
|
minDate: {},
|
|
30260
30400
|
maxDate: {},
|
|
30261
|
-
timeFormat: {}
|
|
30401
|
+
timeFormat: {},
|
|
30402
|
+
showClearBtn: { type: Boolean, default: false }
|
|
30262
30403
|
},
|
|
30263
30404
|
emits: ["update:modelValue", "change"],
|
|
30264
30405
|
setup(__props, { emit: __emit }) {
|
|
@@ -30402,9 +30543,18 @@ const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
|
30402
30543
|
emitChange(selectedDate.value);
|
|
30403
30544
|
}
|
|
30404
30545
|
}
|
|
30546
|
+
function clear() {
|
|
30547
|
+
emit("update:modelValue", null);
|
|
30548
|
+
emit("change", null);
|
|
30549
|
+
}
|
|
30405
30550
|
function onSelectTimeDate(timeObj) {
|
|
30406
|
-
|
|
30407
|
-
|
|
30551
|
+
if (props.showClearBtn && timeObj.value === null) {
|
|
30552
|
+
emit("update:modelValue", null);
|
|
30553
|
+
emit("change", null);
|
|
30554
|
+
} else {
|
|
30555
|
+
const d = (timeObj.isNowDay ? dayjs() : selectedDate.value).hour(timeObj.hour).minute(timeObj.minute).second(timeObj.second);
|
|
30556
|
+
emitChange(d);
|
|
30557
|
+
}
|
|
30408
30558
|
}
|
|
30409
30559
|
function emitChange(d) {
|
|
30410
30560
|
const date4 = d.toDate();
|
|
@@ -30433,7 +30583,7 @@ const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
|
30433
30583
|
onClick: withModifiers(nextMonth, ["stop"])
|
|
30434
30584
|
})
|
|
30435
30585
|
]),
|
|
30436
|
-
createElementVNode("div", _hoisted_5$
|
|
30586
|
+
createElementVNode("div", _hoisted_5$C, [
|
|
30437
30587
|
(openBlock(true), createElementBlock(Fragment, null, renderList(weekdayShort.value, (d) => {
|
|
30438
30588
|
return openBlock(), createElementBlock("div", {
|
|
30439
30589
|
class: "day head",
|
|
@@ -30471,17 +30621,31 @@ const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
|
30471
30621
|
]),
|
|
30472
30622
|
_: 1
|
|
30473
30623
|
}, 8, ["name"])
|
|
30474
|
-
])
|
|
30624
|
+
]),
|
|
30625
|
+
__props.showClearBtn && !showTimeLocal.value && __props.modelValue ? (openBlock(), createElementBlock("div", _hoisted_9$b, [
|
|
30626
|
+
createVNode(unref(GctButton), {
|
|
30627
|
+
class: "gct-clear-btn",
|
|
30628
|
+
size: "small",
|
|
30629
|
+
disabled: __props.disabled,
|
|
30630
|
+
onClick: clear
|
|
30631
|
+
}, {
|
|
30632
|
+
default: withCtx(() => [..._cache[0] || (_cache[0] = [
|
|
30633
|
+
createTextVNode(" 清除 ", -1)
|
|
30634
|
+
])]),
|
|
30635
|
+
_: 1
|
|
30636
|
+
}, 8, ["disabled"])
|
|
30637
|
+
])) : createCommentVNode("", true)
|
|
30475
30638
|
]),
|
|
30476
|
-
showTimeLocal.value ? (openBlock(), createElementBlock("div",
|
|
30477
|
-
createElementVNode("div",
|
|
30478
|
-
createElementVNode("div",
|
|
30639
|
+
showTimeLocal.value ? (openBlock(), createElementBlock("div", _hoisted_10$8, [
|
|
30640
|
+
createElementVNode("div", _hoisted_11$5, toDisplayString(timeValue.value), 1),
|
|
30641
|
+
createElementVNode("div", _hoisted_12$4, [
|
|
30479
30642
|
createVNode(GctTimer, {
|
|
30480
30643
|
"model-value": timeValue.value,
|
|
30481
30644
|
format: __props.timeFormat,
|
|
30482
30645
|
disabledTime,
|
|
30646
|
+
showClearBtn: __props.showClearBtn,
|
|
30483
30647
|
onChange: onSelectTimeDate
|
|
30484
|
-
}, null, 8, ["model-value", "format"])
|
|
30648
|
+
}, null, 8, ["model-value", "format", "showClearBtn"])
|
|
30485
30649
|
])
|
|
30486
30650
|
])) : createCommentVNode("", true)
|
|
30487
30651
|
])
|
|
@@ -30489,7 +30653,7 @@ const _sfc_main$3r = /* @__PURE__ */ defineComponent({
|
|
|
30489
30653
|
};
|
|
30490
30654
|
}
|
|
30491
30655
|
});
|
|
30492
|
-
const GctCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$3r, [["__scopeId", "data-v-
|
|
30656
|
+
const GctCalendar = /* @__PURE__ */ _export_sfc(_sfc_main$3r, [["__scopeId", "data-v-3e5daf47"]]);
|
|
30493
30657
|
const _hoisted_1$2h = { class: "gct-checkbox-label" };
|
|
30494
30658
|
const _sfc_main$3q = /* @__PURE__ */ defineComponent({
|
|
30495
30659
|
__name: "checkbox",
|
|
@@ -30661,14 +30825,14 @@ const _hoisted_3$17 = {
|
|
|
30661
30825
|
class: "group-label"
|
|
30662
30826
|
};
|
|
30663
30827
|
const _hoisted_4$M = ["onClick"];
|
|
30664
|
-
const _hoisted_5$
|
|
30828
|
+
const _hoisted_5$B = { class: "option-label" };
|
|
30665
30829
|
const _hoisted_6$q = { class: "option-right" };
|
|
30666
30830
|
const _hoisted_7$m = {
|
|
30667
30831
|
key: 1,
|
|
30668
30832
|
class: "divider"
|
|
30669
30833
|
};
|
|
30670
30834
|
const _hoisted_8$i = ["onClick"];
|
|
30671
|
-
const _hoisted_9$
|
|
30835
|
+
const _hoisted_9$a = { class: "option-right" };
|
|
30672
30836
|
const _hoisted_10$7 = { class: "title" };
|
|
30673
30837
|
const _sfc_main$3m = /* @__PURE__ */ defineComponent({
|
|
30674
30838
|
__name: "dropdown-basic-select",
|
|
@@ -30777,7 +30941,7 @@ const _sfc_main$3m = /* @__PURE__ */ defineComponent({
|
|
|
30777
30941
|
createTextVNode(toDisplayString(item.tip || item.label), 1)
|
|
30778
30942
|
]),
|
|
30779
30943
|
default: withCtx(() => [
|
|
30780
|
-
createElementVNode("span", _hoisted_5$
|
|
30944
|
+
createElementVNode("span", _hoisted_5$B, toDisplayString(item.label), 1)
|
|
30781
30945
|
]),
|
|
30782
30946
|
_: 2
|
|
30783
30947
|
}, 1032, ["disabled"]),
|
|
@@ -30837,7 +31001,7 @@ const _sfc_main$3m = /* @__PURE__ */ defineComponent({
|
|
|
30837
31001
|
]),
|
|
30838
31002
|
_: 2
|
|
30839
31003
|
}, 1032, ["disabled"]),
|
|
30840
|
-
createElementVNode("div", _hoisted_9$
|
|
31004
|
+
createElementVNode("div", _hoisted_9$a, [
|
|
30841
31005
|
withDirectives(createVNode(unref(GctIcon), {
|
|
30842
31006
|
class: "edit-icon",
|
|
30843
31007
|
icon: "icon-sheji-2",
|
|
@@ -31089,7 +31253,7 @@ const _hoisted_1$2a = {
|
|
|
31089
31253
|
const _hoisted_2$1o = ["src"];
|
|
31090
31254
|
const _hoisted_3$13 = { class: "upload-img-mask" };
|
|
31091
31255
|
const _hoisted_4$L = { class: "tip-text" };
|
|
31092
|
-
const _hoisted_5$
|
|
31256
|
+
const _hoisted_5$A = {
|
|
31093
31257
|
key: 2,
|
|
31094
31258
|
class: "upload-loading"
|
|
31095
31259
|
};
|
|
@@ -31183,7 +31347,7 @@ const _sfc_main$3h = /* @__PURE__ */ defineComponent({
|
|
|
31183
31347
|
createElementVNode("div", _hoisted_4$L, toDisplayString(__props.tip), 1)
|
|
31184
31348
|
])
|
|
31185
31349
|
])),
|
|
31186
|
-
loading.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
31350
|
+
loading.value ? (openBlock(), createElementBlock("div", _hoisted_5$A, [..._cache[2] || (_cache[2] = [
|
|
31187
31351
|
createElementVNode("i", { class: "iconfont icon-gongzuotai_gongshi" }, null, -1)
|
|
31188
31352
|
])])) : createCommentVNode("", true)
|
|
31189
31353
|
], 4),
|
|
@@ -31220,7 +31384,7 @@ const _hoisted_4$K = {
|
|
|
31220
31384
|
key: 2,
|
|
31221
31385
|
class: "gct-input-count"
|
|
31222
31386
|
};
|
|
31223
|
-
const _hoisted_5$
|
|
31387
|
+
const _hoisted_5$z = { key: 0 };
|
|
31224
31388
|
const _hoisted_6$o = {
|
|
31225
31389
|
key: 3,
|
|
31226
31390
|
class: "gct-input-suffix"
|
|
@@ -31263,9 +31427,6 @@ const _sfc_main$3g = /* @__PURE__ */ defineComponent({
|
|
|
31263
31427
|
const props = __props;
|
|
31264
31428
|
const emit = __emit;
|
|
31265
31429
|
const inputRef = ref(null);
|
|
31266
|
-
const inputType = computed(() => {
|
|
31267
|
-
props.type;
|
|
31268
|
-
});
|
|
31269
31430
|
const inputClasses = computed(() => ({
|
|
31270
31431
|
"gct-input-lg": props.size === "large",
|
|
31271
31432
|
"gct-input-sm": props.size === "small",
|
|
@@ -31368,7 +31529,7 @@ const _sfc_main$3g = /* @__PURE__ */ defineComponent({
|
|
|
31368
31529
|
id: props.id,
|
|
31369
31530
|
class: normalizeClass(["gct-input", inputClasses.value]),
|
|
31370
31531
|
style: normalizeStyle(inputStyle.value),
|
|
31371
|
-
type:
|
|
31532
|
+
type: props.type,
|
|
31372
31533
|
value: props.modelValue,
|
|
31373
31534
|
placeholder: props.placeholder,
|
|
31374
31535
|
disabled: props.disabled,
|
|
@@ -31401,7 +31562,7 @@ const _sfc_main$3g = /* @__PURE__ */ defineComponent({
|
|
|
31401
31562
|
])) : createCommentVNode("", true),
|
|
31402
31563
|
props.showCount ? (openBlock(), createElementBlock("span", _hoisted_4$K, [
|
|
31403
31564
|
createTextVNode(toDisplayString(countValue.value), 1),
|
|
31404
|
-
props.maxLength ? (openBlock(), createElementBlock("span", _hoisted_5$
|
|
31565
|
+
props.maxLength ? (openBlock(), createElementBlock("span", _hoisted_5$z, " / " + toDisplayString(props.maxLength), 1)) : createCommentVNode("", true)
|
|
31405
31566
|
])) : createCommentVNode("", true),
|
|
31406
31567
|
props.suffix ? (openBlock(), createElementBlock("span", _hoisted_6$o, [
|
|
31407
31568
|
createElementVNode("span", _hoisted_7$k, toDisplayString(__props.suffix), 1)
|
|
@@ -31411,7 +31572,7 @@ const _sfc_main$3g = /* @__PURE__ */ defineComponent({
|
|
|
31411
31572
|
};
|
|
31412
31573
|
}
|
|
31413
31574
|
});
|
|
31414
|
-
const GctInput = /* @__PURE__ */ _export_sfc(_sfc_main$3g, [["__scopeId", "data-v-
|
|
31575
|
+
const GctInput = /* @__PURE__ */ _export_sfc(_sfc_main$3g, [["__scopeId", "data-v-6fcf124f"]]);
|
|
31415
31576
|
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
31577
|
function clone(configObject) {
|
|
31417
31578
|
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 +32917,7 @@ const _hoisted_4$J = {
|
|
|
32756
32917
|
key: 2,
|
|
32757
32918
|
class: "gct-input-number-suffix"
|
|
32758
32919
|
};
|
|
32759
|
-
const _hoisted_5$
|
|
32920
|
+
const _hoisted_5$y = { class: "gct-input-number-suffix-text" };
|
|
32760
32921
|
const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
32761
32922
|
__name: "input-number",
|
|
32762
32923
|
props: {
|
|
@@ -32780,6 +32941,7 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
32780
32941
|
const props = __props;
|
|
32781
32942
|
const emit = __emit;
|
|
32782
32943
|
const inputRef = ref(null);
|
|
32944
|
+
const isFocused = ref(false);
|
|
32783
32945
|
const inputValue = ref("");
|
|
32784
32946
|
const isInteger = computed(() => props.integer === true);
|
|
32785
32947
|
function normalizeLimit(val) {
|
|
@@ -32869,6 +33031,9 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
32869
33031
|
watch(
|
|
32870
33032
|
() => props.modelValue,
|
|
32871
33033
|
(val) => {
|
|
33034
|
+
if (isFocused.value && props.emitOnInput) {
|
|
33035
|
+
return;
|
|
33036
|
+
}
|
|
32872
33037
|
if (isNil(val) || val === "") {
|
|
32873
33038
|
inputValue.value = "";
|
|
32874
33039
|
return;
|
|
@@ -32879,10 +33044,14 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
32879
33044
|
}
|
|
32880
33045
|
const parsed = parseInput(String(val));
|
|
32881
33046
|
if (!parsed) return;
|
|
32882
|
-
|
|
33047
|
+
const rounded = roundValue(parsed, String(val));
|
|
33048
|
+
inputValue.value = formatValue(rounded, String(val));
|
|
32883
33049
|
},
|
|
32884
33050
|
{ immediate: true }
|
|
32885
33051
|
);
|
|
33052
|
+
const handleFocus = () => {
|
|
33053
|
+
isFocused.value = true;
|
|
33054
|
+
};
|
|
32886
33055
|
const handleInput = (e) => {
|
|
32887
33056
|
const val = e.target.value;
|
|
32888
33057
|
inputValue.value = val;
|
|
@@ -32892,6 +33061,7 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
32892
33061
|
emit("update:modelValue", props.returnString ? val : parsed.toNumber());
|
|
32893
33062
|
};
|
|
32894
33063
|
const handleBlur = () => {
|
|
33064
|
+
isFocused.value = false;
|
|
32895
33065
|
emit("blur");
|
|
32896
33066
|
const { bn, display } = normalizeValue2(inputValue.value);
|
|
32897
33067
|
if (!bn) {
|
|
@@ -32970,6 +33140,7 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
32970
33140
|
max: __props.max,
|
|
32971
33141
|
disabled: __props.disabled,
|
|
32972
33142
|
placeholder: __props.placeholder,
|
|
33143
|
+
onFocus: handleFocus,
|
|
32973
33144
|
onInput: handleInput,
|
|
32974
33145
|
onBlur: handleBlur
|
|
32975
33146
|
}, null, 40, _hoisted_1$28),
|
|
@@ -33009,13 +33180,13 @@ const _sfc_main$3f = /* @__PURE__ */ defineComponent({
|
|
|
33009
33180
|
], 2)
|
|
33010
33181
|
])) : createCommentVNode("", true),
|
|
33011
33182
|
props.suffix ? (openBlock(), createElementBlock("span", _hoisted_4$J, [
|
|
33012
|
-
createElementVNode("span", _hoisted_5$
|
|
33183
|
+
createElementVNode("span", _hoisted_5$y, toDisplayString(__props.suffix), 1)
|
|
33013
33184
|
])) : createCommentVNode("", true)
|
|
33014
33185
|
], 2);
|
|
33015
33186
|
};
|
|
33016
33187
|
}
|
|
33017
33188
|
});
|
|
33018
|
-
const GctInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$3f, [["__scopeId", "data-v-
|
|
33189
|
+
const GctInputNumber = /* @__PURE__ */ _export_sfc(_sfc_main$3f, [["__scopeId", "data-v-4b906773"]]);
|
|
33019
33190
|
const _hoisted_1$27 = ["value", "placeholder", "disabled", "readonly", "maxlength", "rows", "autocomplete", "autofocus", "name", "spellcheck"];
|
|
33020
33191
|
const _hoisted_2$1l = {
|
|
33021
33192
|
key: 1,
|
|
@@ -34531,7 +34702,7 @@ const _hoisted_1$1$ = { class: "popper-container" };
|
|
|
34531
34702
|
const _hoisted_2$1h = { class: "group-name" };
|
|
34532
34703
|
const _hoisted_3$Y = ["onClick"];
|
|
34533
34704
|
const _hoisted_4$H = ["onClick"];
|
|
34534
|
-
const _hoisted_5$
|
|
34705
|
+
const _hoisted_5$x = {
|
|
34535
34706
|
key: 2,
|
|
34536
34707
|
class: "empty"
|
|
34537
34708
|
};
|
|
@@ -34730,7 +34901,7 @@ const _sfc_main$35 = /* @__PURE__ */ defineComponent({
|
|
|
34730
34901
|
], 64))
|
|
34731
34902
|
], 10, _hoisted_4$H);
|
|
34732
34903
|
}), 128)),
|
|
34733
|
-
!normalizedFlatOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
34904
|
+
!normalizedFlatOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$x, " 暂无数据 ")) : createCommentVNode("", true)
|
|
34734
34905
|
])
|
|
34735
34906
|
]),
|
|
34736
34907
|
_: 3
|
|
@@ -34931,7 +35102,7 @@ const _hoisted_3$X = {
|
|
|
34931
35102
|
class: "selection-col"
|
|
34932
35103
|
};
|
|
34933
35104
|
const _hoisted_4$G = ["onClick"];
|
|
34934
|
-
const _hoisted_5$
|
|
35105
|
+
const _hoisted_5$w = {
|
|
34935
35106
|
key: 0,
|
|
34936
35107
|
class: "selection-col"
|
|
34937
35108
|
};
|
|
@@ -35055,7 +35226,7 @@ const _sfc_main$32 = /* @__PURE__ */ defineComponent({
|
|
|
35055
35226
|
}),
|
|
35056
35227
|
onClick: ($event) => _ctx.$emit("row-click", row)
|
|
35057
35228
|
}, [
|
|
35058
|
-
__props.selectable ? (openBlock(), createElementBlock("td", _hoisted_5$
|
|
35229
|
+
__props.selectable ? (openBlock(), createElementBlock("td", _hoisted_5$w, [
|
|
35059
35230
|
renderSlot(_ctx.$slots, "select", {
|
|
35060
35231
|
row,
|
|
35061
35232
|
checked: getIsSelected(row)
|
|
@@ -36925,7 +37096,7 @@ const _hoisted_1$1W = { class: "color-picker-container" };
|
|
|
36925
37096
|
const _hoisted_2$1e = { class: "color-submenu-panel" };
|
|
36926
37097
|
const _hoisted_3$V = { class: "color-content-standard" };
|
|
36927
37098
|
const _hoisted_4$F = { class: "items" };
|
|
36928
|
-
const _hoisted_5$
|
|
37099
|
+
const _hoisted_5$v = ["onClick"];
|
|
36929
37100
|
const _sfc_main$2$ = /* @__PURE__ */ defineComponent({
|
|
36930
37101
|
__name: "ColorPicker",
|
|
36931
37102
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -36986,7 +37157,7 @@ const _sfc_main$2$ = /* @__PURE__ */ defineComponent({
|
|
|
36986
37157
|
class: normalizeClass(["color-icon", { active: model.value === c2.color }]),
|
|
36987
37158
|
style: normalizeStyle({ backgroundColor: c2.color }),
|
|
36988
37159
|
onClick: ($event) => handleColorClick(c2.color)
|
|
36989
|
-
}, null, 14, _hoisted_5$
|
|
37160
|
+
}, null, 14, _hoisted_5$v)
|
|
36990
37161
|
]),
|
|
36991
37162
|
_: 2
|
|
36992
37163
|
}, 1024);
|
|
@@ -37300,7 +37471,15 @@ class MergeCells extends CommandBase {
|
|
|
37300
37471
|
const mapper = this.doc.layoutMapper;
|
|
37301
37472
|
const normalized = this.doc.cursorManager.normalizeRange(cursor.getSelection());
|
|
37302
37473
|
const start = mapper.getLayoutNodeById(normalized.rangeStart.nodeId);
|
|
37303
|
-
|
|
37474
|
+
if (start?.isPlaceholderRun) {
|
|
37475
|
+
const wp = mapper.getModelNodeById(start.parent.modelRef.id);
|
|
37476
|
+
return {
|
|
37477
|
+
wp,
|
|
37478
|
+
pos: -1,
|
|
37479
|
+
side: "after"
|
|
37480
|
+
};
|
|
37481
|
+
}
|
|
37482
|
+
const wr = mapper.getModelNodeById(start.modelRef?.id);
|
|
37304
37483
|
return {
|
|
37305
37484
|
wr,
|
|
37306
37485
|
pos: -1,
|
|
@@ -38134,6 +38313,14 @@ class UnmergeCells extends CommandBase {
|
|
|
38134
38313
|
const mapper = this.doc.layoutMapper;
|
|
38135
38314
|
const normalized = this.doc.cursorManager.normalizeRange(cursor.getSelection());
|
|
38136
38315
|
const start = mapper.getLayoutNodeById(normalized.rangeStart.nodeId);
|
|
38316
|
+
if (start?.isPlaceholderRun) {
|
|
38317
|
+
const wp = mapper.getModelNodeById(start.parent.modelRef.id);
|
|
38318
|
+
return {
|
|
38319
|
+
wp,
|
|
38320
|
+
pos: -1,
|
|
38321
|
+
side: "after"
|
|
38322
|
+
};
|
|
38323
|
+
}
|
|
38137
38324
|
const wr = mapper.getModelNodeById(start.modelRef.id);
|
|
38138
38325
|
return {
|
|
38139
38326
|
wr,
|
|
@@ -39716,6 +39903,166 @@ class TextWidget extends TextRun {
|
|
|
39716
39903
|
this.dataIndex = options.dataIndex;
|
|
39717
39904
|
}
|
|
39718
39905
|
}
|
|
39906
|
+
const EmptySymbolTypeConst = {
|
|
39907
|
+
"/": "/",
|
|
39908
|
+
"--": "--",
|
|
39909
|
+
"——": "——",
|
|
39910
|
+
NA: "NA",
|
|
39911
|
+
"N/A": "N/A"
|
|
39912
|
+
};
|
|
39913
|
+
const ViewStateTypeConst = {
|
|
39914
|
+
/** 文本显示 */
|
|
39915
|
+
Readonly: "readonly",
|
|
39916
|
+
/** 组件显示-禁用 */
|
|
39917
|
+
Disabled: "disabled",
|
|
39918
|
+
/** 组件显示-跟随设计 */
|
|
39919
|
+
Auto: "auto"
|
|
39920
|
+
};
|
|
39921
|
+
const RenderCompTypeConst = {
|
|
39922
|
+
/** 圆形 */
|
|
39923
|
+
Radio: "radio",
|
|
39924
|
+
/** 方形 */
|
|
39925
|
+
Checkbox: "checkbox",
|
|
39926
|
+
/** 下拉 */
|
|
39927
|
+
Select: "select"
|
|
39928
|
+
};
|
|
39929
|
+
const BooleanShowModeTypeConst = {
|
|
39930
|
+
/** 只显示真 */
|
|
39931
|
+
OnlyTrue: "onlyTrue",
|
|
39932
|
+
/** 只显示真 */
|
|
39933
|
+
OnlyFalse: "onlyFalse",
|
|
39934
|
+
/** 同时显示真和假 */
|
|
39935
|
+
Both: "both"
|
|
39936
|
+
};
|
|
39937
|
+
const LabelPositionTypeConst = {
|
|
39938
|
+
/** 文字在前 */
|
|
39939
|
+
Before: "before",
|
|
39940
|
+
/** 文字在后 */
|
|
39941
|
+
After: "after"
|
|
39942
|
+
};
|
|
39943
|
+
const OrientationTypeConst = {
|
|
39944
|
+
/** 纵 */
|
|
39945
|
+
Portrait: "portrait",
|
|
39946
|
+
/** 横 */
|
|
39947
|
+
Landscape: "landscape"
|
|
39948
|
+
};
|
|
39949
|
+
const DecimalDisplayModeTypeConst = {
|
|
39950
|
+
/** 显示百分比(%) */
|
|
39951
|
+
PERCENT: "percent",
|
|
39952
|
+
/** 显示原始数值 */
|
|
39953
|
+
ORIGIN: "origin"
|
|
39954
|
+
};
|
|
39955
|
+
const RangeValidateModeTypeConst = {
|
|
39956
|
+
/** 不校验 */
|
|
39957
|
+
No_Validate: "NoValidate",
|
|
39958
|
+
/** 固定输入校验 */
|
|
39959
|
+
Fixed_Number: "FixedNumber",
|
|
39960
|
+
/** 变量校验 */
|
|
39961
|
+
Variable_Validate: "VariableValidate"
|
|
39962
|
+
};
|
|
39963
|
+
const FieldSysVarDefaultValueConst = {
|
|
39964
|
+
NULL: "",
|
|
39965
|
+
/** 系统登录用户 */
|
|
39966
|
+
CURRENT_USER: "CURRENT_USER",
|
|
39967
|
+
/** 当前登录用户主部门 */
|
|
39968
|
+
CURRENT_ORG: "CURRENT_ORG"
|
|
39969
|
+
};
|
|
39970
|
+
const SignatureNumberTypeConst = {
|
|
39971
|
+
/** 单人签名 */
|
|
39972
|
+
SIGNATURE_SINGLE: "signature_single",
|
|
39973
|
+
/** 多人签名 */
|
|
39974
|
+
SIGNATURE_MULTIPLE: "signature_multiple"
|
|
39975
|
+
};
|
|
39976
|
+
const SignatureTypeConst = {
|
|
39977
|
+
/** 仅签名 */
|
|
39978
|
+
SIGNATURE_ONLY: "signature_only",
|
|
39979
|
+
/** 签名及日期 */
|
|
39980
|
+
SIGNATURE_DATE: "signature_date",
|
|
39981
|
+
/** 签名及日期时间 */
|
|
39982
|
+
SIGNATURE_DATETIME: "signature_datetime"
|
|
39983
|
+
};
|
|
39984
|
+
const SignatureTimeTypeConst = {
|
|
39985
|
+
/** 跟随签名 */
|
|
39986
|
+
FOLLOW_SIGNATURE: "follow_signature",
|
|
39987
|
+
/** 填充新字段 */
|
|
39988
|
+
POPULATE_FIELD: "populate_field"
|
|
39989
|
+
};
|
|
39990
|
+
const SignDisplayTypeConst = {
|
|
39991
|
+
/** 垂直显示 */
|
|
39992
|
+
VERTICAL: "vertical",
|
|
39993
|
+
/** 水平显示 */
|
|
39994
|
+
HORIZONTAL: "horizontal"
|
|
39995
|
+
};
|
|
39996
|
+
const ImageDisplayModeConst = {
|
|
39997
|
+
/** 自定义 */
|
|
39998
|
+
CUSTOM: "CUSTOM",
|
|
39999
|
+
/** 自适应 */
|
|
40000
|
+
ADAPTIVE: "ADAPTIVE"
|
|
40001
|
+
};
|
|
40002
|
+
const FieldDependencyTypeConst = {
|
|
40003
|
+
/**隐藏 */
|
|
40004
|
+
Hidden: "hidden",
|
|
40005
|
+
/**只读 */
|
|
40006
|
+
Readonly: "readonly",
|
|
40007
|
+
/**禁用 */
|
|
40008
|
+
Disabled: "disabled",
|
|
40009
|
+
/**必填 */
|
|
40010
|
+
Required: "required",
|
|
40011
|
+
/**赋值 */
|
|
40012
|
+
Assignment: "assignment"
|
|
40013
|
+
};
|
|
40014
|
+
const AssignmentStrategyTypeConst = {
|
|
40015
|
+
/**始终覆盖 */
|
|
40016
|
+
AlwaysCover: "alwaysCover",
|
|
40017
|
+
/**不覆盖已修改 */
|
|
40018
|
+
NotCovered: "notCovered"
|
|
40019
|
+
};
|
|
40020
|
+
const FormTypeConst = {
|
|
40021
|
+
/** 基础表单 */
|
|
40022
|
+
BASE: "BASE",
|
|
40023
|
+
/** 流程表单 */
|
|
40024
|
+
PROCESS: "PROCESS",
|
|
40025
|
+
/** 视图表单 */
|
|
40026
|
+
VIEW: "VIEW",
|
|
40027
|
+
/** 文本表单 */
|
|
40028
|
+
TEXT: "TEXT",
|
|
40029
|
+
/** 文件表单 */
|
|
40030
|
+
FILE: "FILE"
|
|
40031
|
+
};
|
|
40032
|
+
const ViewTypeConst = {
|
|
40033
|
+
/** 视图模型(查询视图) */
|
|
40034
|
+
VIEW_MODEL: "VIEW_MODEL",
|
|
40035
|
+
/** SQL数据视图 */
|
|
40036
|
+
VIEW_SQL: "SQL",
|
|
40037
|
+
/** 自定义模型 */
|
|
40038
|
+
VIEW_JS: "JS"
|
|
40039
|
+
};
|
|
40040
|
+
const BwipCodeTypeConst = {
|
|
40041
|
+
Code39: "code39",
|
|
40042
|
+
Code128: "code128",
|
|
40043
|
+
QRCode: "qrcode",
|
|
40044
|
+
GS1DataMatrix: "gs1datamatrix"
|
|
40045
|
+
};
|
|
40046
|
+
const ValueTypeConst = {
|
|
40047
|
+
/** 固定值 */
|
|
40048
|
+
Fixed: "fixed",
|
|
40049
|
+
/** 字段 */
|
|
40050
|
+
Field: "field",
|
|
40051
|
+
/** 公式 */
|
|
40052
|
+
Formula: "formula"
|
|
40053
|
+
};
|
|
40054
|
+
const ImageSizeModeTypeConst = {
|
|
40055
|
+
/** 自适应,响应式的适应外层容器的大小 */
|
|
40056
|
+
RESPONSIVE: "responsive",
|
|
40057
|
+
/** 固定值,高宽设了多少就是多少 */
|
|
40058
|
+
FIXED: "fixed"
|
|
40059
|
+
};
|
|
40060
|
+
const DiagonalDirectionTypeConst = {
|
|
40061
|
+
/** 从左上到右下 */
|
|
40062
|
+
Forward: "forward",
|
|
40063
|
+
/** 从右上到左下 / */
|
|
40064
|
+
Backward: "backward"
|
|
40065
|
+
};
|
|
39719
40066
|
function getValue$1(value, multiple) {
|
|
39720
40067
|
if (multiple) {
|
|
39721
40068
|
return Array.isArray(value) ? value : value?.split(",").filter((i) => !isNil(i)) ?? [];
|
|
@@ -39803,6 +40150,31 @@ function formatDateTimeHook(props, value) {
|
|
|
39803
40150
|
]);
|
|
39804
40151
|
return formatDateTime(formats, value);
|
|
39805
40152
|
}
|
|
40153
|
+
function formatNumber(attrs, type4, value) {
|
|
40154
|
+
if (value === void 0 || value === null || value === "") {
|
|
40155
|
+
return value;
|
|
40156
|
+
}
|
|
40157
|
+
const { newSpecificConfig = {}, displayMode = DecimalDisplayModeTypeConst.ORIGIN } = attrs;
|
|
40158
|
+
const { digits = 0, rulesForRounding } = newSpecificConfig;
|
|
40159
|
+
const num = Number(value);
|
|
40160
|
+
if (Number.isNaN(num)) {
|
|
40161
|
+
return value;
|
|
40162
|
+
}
|
|
40163
|
+
if (displayMode === DecimalDisplayModeTypeConst.PERCENT) {
|
|
40164
|
+
if (type4 === "fw:double") {
|
|
40165
|
+
return new BigNumber(num).multipliedBy(100) + "%";
|
|
40166
|
+
}
|
|
40167
|
+
return new BigNumber(num).multipliedBy(100).toFixed(digits, rulesForRounding || 1) + "%";
|
|
40168
|
+
}
|
|
40169
|
+
if (type4 === "fw:double") {
|
|
40170
|
+
return num;
|
|
40171
|
+
}
|
|
40172
|
+
return new BigNumber(num).toFixed(digits, rulesForRounding || 1);
|
|
40173
|
+
}
|
|
40174
|
+
function formatNumberHook(props, type4, value) {
|
|
40175
|
+
const formats = pick(props, ["newSpecificConfig", "displayMode"]);
|
|
40176
|
+
return formatNumber(formats, type4, value);
|
|
40177
|
+
}
|
|
39806
40178
|
let BaseHandler$1 = class BaseHandler {
|
|
39807
40179
|
static hasValue(value) {
|
|
39808
40180
|
return value !== void 0 && value !== null;
|
|
@@ -39847,7 +40219,7 @@ let BaseHandler$1 = class BaseHandler {
|
|
|
39847
40219
|
static getNoValueLabel(ctx) {
|
|
39848
40220
|
const { context, wr } = ctx;
|
|
39849
40221
|
if (context.doc.mode === DocModeTypeConst.Print) {
|
|
39850
|
-
return { label: "--", type: "noneLabel" };
|
|
40222
|
+
return { label: wr.widgetMeta?.props.emptySymbol ?? "--", type: "noneLabel" };
|
|
39851
40223
|
} else {
|
|
39852
40224
|
if (wr.widgetMeta?.props?.placeholder) {
|
|
39853
40225
|
return {
|
|
@@ -39866,7 +40238,7 @@ let BaseHandler$1 = class BaseHandler {
|
|
|
39866
40238
|
type: "default"
|
|
39867
40239
|
};
|
|
39868
40240
|
}
|
|
39869
|
-
static
|
|
40241
|
+
static formatFieldValue(ctx, valuePath) {
|
|
39870
40242
|
const { context, wr } = ctx;
|
|
39871
40243
|
let value = valuePath ? this.getLabel(ctx, valuePath) : void 0;
|
|
39872
40244
|
if (value && ["fw:date", "fw:date-time", "fw:time"].includes(wr.widgetMeta.type)) {
|
|
@@ -39874,6 +40246,8 @@ let BaseHandler$1 = class BaseHandler {
|
|
|
39874
40246
|
value = normalizeDateTime(value);
|
|
39875
40247
|
}
|
|
39876
40248
|
value = formatDateTimeHook(wr.widgetMeta.props, value);
|
|
40249
|
+
} else if (value && context.doc.mode === DocModeTypeConst.Print && ["fw:number", "fw:double"].includes(wr.widgetMeta.type)) {
|
|
40250
|
+
value = formatNumberHook(wr.widgetMeta.props, wr.widgetMeta.type, value);
|
|
39877
40251
|
}
|
|
39878
40252
|
return value;
|
|
39879
40253
|
}
|
|
@@ -39884,7 +40258,7 @@ let BaseHandler$1 = class BaseHandler {
|
|
|
39884
40258
|
static layoutValue(ctx) {
|
|
39885
40259
|
const { context, wr } = ctx;
|
|
39886
40260
|
const valuePath = context.getValuePath(wr.valuePath);
|
|
39887
|
-
let label = this.
|
|
40261
|
+
let label = this.formatFieldValue(ctx, valuePath);
|
|
39888
40262
|
if (!this.hasValue(label)) {
|
|
39889
40263
|
label = this.getNoValueLabel(ctx).label;
|
|
39890
40264
|
}
|
|
@@ -40282,166 +40656,6 @@ let ImageHandler$1 = class ImageHandler2 extends BaseHandler$1 {
|
|
|
40282
40656
|
}
|
|
40283
40657
|
}
|
|
40284
40658
|
};
|
|
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
40659
|
class SignatureHandler extends BaseHandler$1 {
|
|
40446
40660
|
static layout(ctx) {
|
|
40447
40661
|
this.layoutField(ctx);
|
|
@@ -40540,7 +40754,7 @@ class InputHandler extends BaseHandler$1 {
|
|
|
40540
40754
|
static layoutField(ctx) {
|
|
40541
40755
|
const { context, wr } = ctx;
|
|
40542
40756
|
const valuePath = context.getValuePath(wr.valuePath);
|
|
40543
|
-
let label = this.
|
|
40757
|
+
let label = this.formatFieldValue(ctx, valuePath);
|
|
40544
40758
|
let isEmptyPlaceholder = false;
|
|
40545
40759
|
if (!this.hasValue(label)) {
|
|
40546
40760
|
label = this.getNoValueLabel(ctx).label;
|
|
@@ -41095,11 +41309,16 @@ class TableRow extends LayoutGroup {
|
|
|
41095
41309
|
component = BuiltinComponentTypeConst.TableRow;
|
|
41096
41310
|
// 允许行内分割
|
|
41097
41311
|
allowRowSplit = true;
|
|
41312
|
+
// 原始模型中的真实行索引
|
|
41313
|
+
realRowIndex = -1;
|
|
41098
41314
|
constructor(options) {
|
|
41099
41315
|
super(options);
|
|
41100
41316
|
if (options.allowRowSplit !== void 0) {
|
|
41101
41317
|
this.allowRowSplit = options.allowRowSplit;
|
|
41102
41318
|
}
|
|
41319
|
+
if (typeof options.realRowIndex === "number") {
|
|
41320
|
+
this.realRowIndex = options.realRowIndex;
|
|
41321
|
+
}
|
|
41103
41322
|
}
|
|
41104
41323
|
get width() {
|
|
41105
41324
|
return this.parent.width;
|
|
@@ -41367,14 +41586,16 @@ class TableSplitter {
|
|
|
41367
41586
|
doc: this.table.doc,
|
|
41368
41587
|
height: tHeight,
|
|
41369
41588
|
y: row.y,
|
|
41370
|
-
modelRef: row.modelRef
|
|
41589
|
+
modelRef: row.modelRef,
|
|
41590
|
+
realRowIndex: row.realRowIndex
|
|
41371
41591
|
});
|
|
41372
41592
|
const bRow = new TableRow({
|
|
41373
41593
|
doc: this.table.doc,
|
|
41374
41594
|
height: bHeight,
|
|
41375
41595
|
// height: 0,
|
|
41376
41596
|
// height: 33,
|
|
41377
|
-
modelRef: row.modelRef
|
|
41597
|
+
modelRef: row.modelRef,
|
|
41598
|
+
realRowIndex: row.realRowIndex
|
|
41378
41599
|
});
|
|
41379
41600
|
row.getChildren().forEach((cell) => {
|
|
41380
41601
|
const opt = {
|
|
@@ -41405,7 +41626,8 @@ class TableSplitter {
|
|
|
41405
41626
|
doc: this.table.doc,
|
|
41406
41627
|
height: originalRow.height,
|
|
41407
41628
|
y: originalRow.y,
|
|
41408
|
-
modelRef: originalRow.modelRef
|
|
41629
|
+
modelRef: originalRow.modelRef,
|
|
41630
|
+
realRowIndex: originalRow.realRowIndex
|
|
41409
41631
|
});
|
|
41410
41632
|
originalRow.getChildren().forEach((cell) => {
|
|
41411
41633
|
const newCell = new TableCell({
|
|
@@ -41435,7 +41657,8 @@ class TableSplitter {
|
|
|
41435
41657
|
const newRow = new TableRow({
|
|
41436
41658
|
doc: this.table.doc,
|
|
41437
41659
|
height: originalRow.height,
|
|
41438
|
-
modelRef: originalRow.modelRef
|
|
41660
|
+
modelRef: originalRow.modelRef,
|
|
41661
|
+
realRowIndex: originalRow.realRowIndex
|
|
41439
41662
|
});
|
|
41440
41663
|
originalRow.getChildren().forEach((cell) => {
|
|
41441
41664
|
let finalCell;
|
|
@@ -42449,7 +42672,8 @@ class LayoutManager {
|
|
|
42449
42672
|
const tableRow = new TableRow({
|
|
42450
42673
|
doc: this.doc,
|
|
42451
42674
|
modelRef: provider.getRowModelRef(row),
|
|
42452
|
-
allowRowSplit: provider.getAllowRowSplit(rIndex)
|
|
42675
|
+
allowRowSplit: provider.getAllowRowSplit(rIndex),
|
|
42676
|
+
realRowIndex: rIndex
|
|
42453
42677
|
});
|
|
42454
42678
|
table.addChild(tableRow);
|
|
42455
42679
|
tableRow.applyHeightRule(provider.getWtr(row));
|
|
@@ -42535,7 +42759,8 @@ class LayoutManager {
|
|
|
42535
42759
|
if (!row) return;
|
|
42536
42760
|
const tableRow = new TableRow({
|
|
42537
42761
|
doc: this.doc,
|
|
42538
|
-
modelRef: provider.getRowModelRef(row)
|
|
42762
|
+
modelRef: provider.getRowModelRef(row),
|
|
42763
|
+
realRowIndex: rowIndex
|
|
42539
42764
|
});
|
|
42540
42765
|
next.insertChild(rowIndex, tableRow);
|
|
42541
42766
|
tableRow.applyHeightRule(provider.getWtr(row));
|
|
@@ -43599,12 +43824,12 @@ class CursorController {
|
|
|
43599
43824
|
resolveCursorAtNode(data) {
|
|
43600
43825
|
const node = this.doc.layoutMapper.getBaseMetaNodeById(data.nodeId);
|
|
43601
43826
|
const cursor = this.doc.cursorManager.getCursor();
|
|
43602
|
-
if (!node
|
|
43827
|
+
if (!node) return;
|
|
43603
43828
|
const registry2 = getRegistry();
|
|
43604
43829
|
const intent = {
|
|
43605
43830
|
kind: "point",
|
|
43606
|
-
offset: cursor
|
|
43607
|
-
side: data.side || cursor
|
|
43831
|
+
offset: cursor?.offset || 0,
|
|
43832
|
+
side: data.side || cursor?.side || "after"
|
|
43608
43833
|
};
|
|
43609
43834
|
const hitResult = registry2.resolveCursorIntent(this.doc, node, intent);
|
|
43610
43835
|
if (hitResult) {
|
|
@@ -43799,7 +44024,8 @@ class InteractionController {
|
|
|
43799
44024
|
this.doc.interactionManager.set("tableSelection", {
|
|
43800
44025
|
tableId: payload.id,
|
|
43801
44026
|
axis: "row",
|
|
43802
|
-
index: payload.index
|
|
44027
|
+
index: payload.index,
|
|
44028
|
+
realRowIndex: payload.realRowIndex
|
|
43803
44029
|
});
|
|
43804
44030
|
}
|
|
43805
44031
|
onSelectTableCol(payload) {
|
|
@@ -43834,11 +44060,12 @@ class InteractionController {
|
|
|
43834
44060
|
return;
|
|
43835
44061
|
}
|
|
43836
44062
|
const tableId = meta.line.tableId;
|
|
43837
|
-
|
|
44063
|
+
const tableMeta = this.doc.layoutMapper.getBaseMetaNodeById(tableId);
|
|
44064
|
+
if (!tableMeta) {
|
|
43838
44065
|
this.clearActiveTableId();
|
|
43839
44066
|
return;
|
|
43840
44067
|
}
|
|
43841
|
-
this.onSetActiveTableId(
|
|
44068
|
+
this.onSetActiveTableId(tableMeta.raw?.modelRef.id);
|
|
43842
44069
|
}
|
|
43843
44070
|
resolveIntent(id, hitId) {
|
|
43844
44071
|
const meta = this.doc.layoutMapper.getBaseMetaNodeById(id);
|
|
@@ -53093,6 +53320,7 @@ function useSpecificConfig(options) {
|
|
|
53093
53320
|
if (digits !== void 0) {
|
|
53094
53321
|
specificConfig.digits = digits;
|
|
53095
53322
|
}
|
|
53323
|
+
specificConfig.rulesForRounding = fieldInfo?.value?.specificConfig?.rulesForRounding ?? 6;
|
|
53096
53324
|
}
|
|
53097
53325
|
function useWidgetInitializer(options) {
|
|
53098
53326
|
const init2 = (isSupport) => {
|
|
@@ -53210,6 +53438,15 @@ const _sfc_main$2P = /* @__PURE__ */ defineComponent({
|
|
|
53210
53438
|
if (!activeRules.length) return;
|
|
53211
53439
|
const errors = await validateField(runtimeValuePath.value, modelValue.value, activeRules, {});
|
|
53212
53440
|
props.doc.eventManager.dispatchCustom("inter:show-validation-comment", errors);
|
|
53441
|
+
setTimeout(() => {
|
|
53442
|
+
const scrollContainer = document.querySelector(".render-container");
|
|
53443
|
+
if (scrollContainer) {
|
|
53444
|
+
scrollContainer.scrollTo({
|
|
53445
|
+
left: scrollContainer.scrollWidth,
|
|
53446
|
+
behavior: "smooth"
|
|
53447
|
+
});
|
|
53448
|
+
}
|
|
53449
|
+
}, 120);
|
|
53213
53450
|
}
|
|
53214
53451
|
function openDialog() {
|
|
53215
53452
|
if (!isDialog.value || showReadonly.value || showDisabled.value) return;
|
|
@@ -53303,7 +53540,7 @@ const _sfc_main$2P = /* @__PURE__ */ defineComponent({
|
|
|
53303
53540
|
};
|
|
53304
53541
|
}
|
|
53305
53542
|
});
|
|
53306
|
-
const OverlayRender = /* @__PURE__ */ _export_sfc(_sfc_main$2P, [["__scopeId", "data-v-
|
|
53543
|
+
const OverlayRender = /* @__PURE__ */ _export_sfc(_sfc_main$2P, [["__scopeId", "data-v-fdedefbc"]]);
|
|
53307
53544
|
let activeHoverId = 0;
|
|
53308
53545
|
function useHoverDelay(callback, delay = 120) {
|
|
53309
53546
|
let timer = null;
|
|
@@ -54879,7 +55116,7 @@ const _hoisted_1$1Q = { class: "col-headers" };
|
|
|
54879
55116
|
const _hoisted_2$1b = ["onMouseenter"];
|
|
54880
55117
|
const _hoisted_3$T = ["onClick"];
|
|
54881
55118
|
const _hoisted_4$E = ["onMousedown"];
|
|
54882
|
-
const _hoisted_5$
|
|
55119
|
+
const _hoisted_5$u = { class: "row-headers" };
|
|
54883
55120
|
const _hoisted_6$m = ["onMouseenter"];
|
|
54884
55121
|
const _hoisted_7$i = ["onClick"];
|
|
54885
55122
|
const _hoisted_8$g = ["onMousedown"];
|
|
@@ -54913,7 +55150,7 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
54913
55150
|
});
|
|
54914
55151
|
const tableId = computed(() => props.widget.id);
|
|
54915
55152
|
const isCurrentTableActive = computed(() => {
|
|
54916
|
-
return interaction.activeTableId ===
|
|
55153
|
+
return interaction.activeTableId === props.widget.modelRef?.id;
|
|
54917
55154
|
});
|
|
54918
55155
|
const pageBaseOffset = computed(() => {
|
|
54919
55156
|
const node = props.doc.layoutMapper.getBaseMetaNodeById(tableId.value);
|
|
@@ -54934,8 +55171,15 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
54934
55171
|
};
|
|
54935
55172
|
});
|
|
54936
55173
|
const isPreview = computed(() => props.widget.doc.preview);
|
|
54937
|
-
function onHeaderEnter(axis, index2) {
|
|
54938
|
-
emit("update:axis-hover", {
|
|
55174
|
+
function onHeaderEnter(axis, index2, row) {
|
|
55175
|
+
emit("update:axis-hover", {
|
|
55176
|
+
...props.axisHover,
|
|
55177
|
+
show: false,
|
|
55178
|
+
axis,
|
|
55179
|
+
index: index2,
|
|
55180
|
+
realRowIndex: row?.realRowIndex,
|
|
55181
|
+
side: null
|
|
55182
|
+
});
|
|
54939
55183
|
}
|
|
54940
55184
|
function onHeaderMove(axis, e) {
|
|
54941
55185
|
if (!props.axisHover) return;
|
|
@@ -54958,19 +55202,19 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
54958
55202
|
function selectAll() {
|
|
54959
55203
|
dispatch("inter:stall", { id: tableId.value });
|
|
54960
55204
|
}
|
|
54961
|
-
function selectAxis(axis, index2) {
|
|
55205
|
+
function selectAxis(axis, index2, row) {
|
|
54962
55206
|
if (axis === "row") {
|
|
54963
|
-
dispatch("inter:str", { id: tableId.value, index: index2 });
|
|
55207
|
+
dispatch("inter:str", { id: tableId.value, index: index2, realRowIndex: row.realRowIndex });
|
|
54964
55208
|
} else {
|
|
54965
55209
|
dispatch("inter:stc", { id: tableId.value, index: index2 });
|
|
54966
55210
|
}
|
|
54967
55211
|
}
|
|
54968
|
-
function onResizeMouseDown(axis, index2, e) {
|
|
55212
|
+
function onResizeMouseDown(axis, index2, e, row) {
|
|
54969
55213
|
e.preventDefault();
|
|
54970
55214
|
e.stopPropagation();
|
|
54971
55215
|
const start = axis === "col" ? e.clientX : e.clientY;
|
|
54972
55216
|
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 };
|
|
55217
|
+
dragging.value = { axis, index: index2, realRowIndex: row.realRowIndex, start, base };
|
|
54974
55218
|
axis === "col" ? guideColX.value = base : guideRowY.value = base;
|
|
54975
55219
|
document.addEventListener("mousemove", onResizeMove);
|
|
54976
55220
|
document.addEventListener("mouseup", onResizeUp);
|
|
@@ -54995,7 +55239,10 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
54995
55239
|
const rowIndex = dragging.value.index;
|
|
54996
55240
|
const delta = guideRowY.value - dragging.value.base;
|
|
54997
55241
|
const newHeight = props.rows[rowIndex]?.height + delta;
|
|
54998
|
-
actionHandlers["resizeRow"]?.({
|
|
55242
|
+
actionHandlers["resizeRow"]?.({
|
|
55243
|
+
index: dragging.value.realRowIndex || dragging.value.index,
|
|
55244
|
+
height: newHeight
|
|
55245
|
+
});
|
|
54999
55246
|
}
|
|
55000
55247
|
guideColX.value = null;
|
|
55001
55248
|
guideRowY.value = null;
|
|
@@ -55016,7 +55263,7 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55016
55263
|
},
|
|
55017
55264
|
insertRow() {
|
|
55018
55265
|
if (!props.axisHover) return;
|
|
55019
|
-
const hoverIndex = props.axisHover.
|
|
55266
|
+
const hoverIndex = props.axisHover.realRowIndex || 0;
|
|
55020
55267
|
const index2 = props.axisHover.side === "top" ? hoverIndex : hoverIndex + 1;
|
|
55021
55268
|
docInst.value.execute(CommandType.insertRow, {
|
|
55022
55269
|
tableId: tableId.value,
|
|
@@ -55035,7 +55282,7 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55035
55282
|
if (!interaction.tableSelection) return;
|
|
55036
55283
|
docInst.value.execute(CommandType.deleteRow, {
|
|
55037
55284
|
tableId: tableId.value,
|
|
55038
|
-
rowIndex: interaction.tableSelection.index
|
|
55285
|
+
rowIndex: interaction.tableSelection.realRowIndex || interaction.tableSelection.index
|
|
55039
55286
|
});
|
|
55040
55287
|
},
|
|
55041
55288
|
deleteAll() {
|
|
@@ -55163,14 +55410,14 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55163
55410
|
]);
|
|
55164
55411
|
}), 128))
|
|
55165
55412
|
]),
|
|
55166
|
-
createElementVNode("div", _hoisted_5$
|
|
55413
|
+
createElementVNode("div", _hoisted_5$u, [
|
|
55167
55414
|
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rows, (row, rowIndex) => {
|
|
55168
55415
|
return openBlock(), createElementBlock("div", {
|
|
55169
55416
|
key: row.id,
|
|
55170
55417
|
class: "row-header"
|
|
55171
55418
|
}, [
|
|
55172
55419
|
createElementVNode("div", {
|
|
55173
|
-
onMouseenter: ($event) => onHeaderEnter("row", rowIndex),
|
|
55420
|
+
onMouseenter: ($event) => onHeaderEnter("row", rowIndex, row),
|
|
55174
55421
|
onMousemove: _cache[12] || (_cache[12] = ($event) => onHeaderMove("row", $event)),
|
|
55175
55422
|
onMouseleave: _cache[13] || (_cache[13] = ($event) => onHeaderLeave())
|
|
55176
55423
|
}, [
|
|
@@ -55180,7 +55427,7 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55180
55427
|
"is-remove-hover": __props.removeHoverBool
|
|
55181
55428
|
}]),
|
|
55182
55429
|
style: normalizeStyle({ height: row.height + "px" }),
|
|
55183
|
-
onClick: ($event) => selectAxis("row", rowIndex)
|
|
55430
|
+
onClick: ($event) => selectAxis("row", rowIndex, row)
|
|
55184
55431
|
}, null, 14, _hoisted_7$i),
|
|
55185
55432
|
__props.axisHover?.axis === "row" && __props.axisHover.index === rowIndex ? (openBlock(), createElementBlock("div", {
|
|
55186
55433
|
key: 0,
|
|
@@ -55215,7 +55462,7 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55215
55462
|
style: normalizeStyle({
|
|
55216
55463
|
width: `${__props.tableWidth}px`
|
|
55217
55464
|
}),
|
|
55218
|
-
onMousedown: ($event) => onResizeMouseDown("row", rowIndex, $event)
|
|
55465
|
+
onMousedown: ($event) => onResizeMouseDown("row", rowIndex, $event, row)
|
|
55219
55466
|
}, null, 46, _hoisted_8$g)
|
|
55220
55467
|
]);
|
|
55221
55468
|
}), 128))
|
|
@@ -55225,7 +55472,7 @@ const _sfc_main$2B = /* @__PURE__ */ defineComponent({
|
|
|
55225
55472
|
};
|
|
55226
55473
|
}
|
|
55227
55474
|
});
|
|
55228
|
-
const TableActionOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$2B, [["__scopeId", "data-v-
|
|
55475
|
+
const TableActionOverlay = /* @__PURE__ */ _export_sfc(_sfc_main$2B, [["__scopeId", "data-v-47aab70a"]]);
|
|
55229
55476
|
const _sfc_main$2A = /* @__PURE__ */ defineComponent({
|
|
55230
55477
|
__name: "table-guide-line",
|
|
55231
55478
|
props: {
|
|
@@ -55458,7 +55705,7 @@ const _hoisted_1$1P = { class: "sub-table-action-content" };
|
|
|
55458
55705
|
const _hoisted_2$1a = { class: "action-group" };
|
|
55459
55706
|
const _hoisted_3$S = { class: "insert-row-container" };
|
|
55460
55707
|
const _hoisted_4$D = { class: "insert-row-item" };
|
|
55461
|
-
const _hoisted_5$
|
|
55708
|
+
const _hoisted_5$t = { class: "insert-row-item" };
|
|
55462
55709
|
const _hoisted_6$l = { class: "sub-table-btn" };
|
|
55463
55710
|
const _hoisted_7$h = { class: "sub-table-action-bar" };
|
|
55464
55711
|
const _hoisted_8$f = { class: "sub-table-btn" };
|
|
@@ -55591,7 +55838,7 @@ const _sfc_main$2x = /* @__PURE__ */ defineComponent({
|
|
|
55591
55838
|
style: { "width": "68px" }
|
|
55592
55839
|
}, null, 8, ["modelValue"])
|
|
55593
55840
|
]),
|
|
55594
|
-
createElementVNode("div", _hoisted_5$
|
|
55841
|
+
createElementVNode("div", _hoisted_5$t, [
|
|
55595
55842
|
createElementVNode("div", {
|
|
55596
55843
|
class: "title",
|
|
55597
55844
|
onClick: _cache[4] || (_cache[4] = ($event) => handleAction("insertRowAfterMore"))
|
|
@@ -55805,6 +56052,7 @@ const _sfc_main$2u = /* @__PURE__ */ defineComponent({
|
|
|
55805
56052
|
y: row.y,
|
|
55806
56053
|
layoutY: row.layoutY,
|
|
55807
56054
|
height: row.height,
|
|
56055
|
+
realRowIndex: row.realRowIndex,
|
|
55808
56056
|
cells: row.getChildren().map((cell) => ({
|
|
55809
56057
|
id: cell.id,
|
|
55810
56058
|
x: cell.x,
|
|
@@ -56301,6 +56549,314 @@ function useDocController(factory2, ops) {
|
|
|
56301
56549
|
);
|
|
56302
56550
|
return controller;
|
|
56303
56551
|
}
|
|
56552
|
+
var DeviceLink;
|
|
56553
|
+
((DeviceLink2) => {
|
|
56554
|
+
((TmplTypeEnum2) => {
|
|
56555
|
+
TmplTypeEnum2["DEVICE_INTERCONNECTION"] = "DEVICE_INTERCONNECTION";
|
|
56556
|
+
TmplTypeEnum2["AI_OCR"] = "AI_OCR";
|
|
56557
|
+
})(DeviceLink2.TmplTypeEnum || (DeviceLink2.TmplTypeEnum = {}));
|
|
56558
|
+
((DenoiseMethodEnum2) => {
|
|
56559
|
+
DenoiseMethodEnum2["GAUSSIAN"] = "gaussian";
|
|
56560
|
+
DenoiseMethodEnum2["BILATERAL"] = "bilateral";
|
|
56561
|
+
DenoiseMethodEnum2["MEDIAN"] = "bilateral";
|
|
56562
|
+
})(DeviceLink2.DenoiseMethodEnum || (DeviceLink2.DenoiseMethodEnum = {}));
|
|
56563
|
+
((BinarizeMethodEnum2) => {
|
|
56564
|
+
BinarizeMethodEnum2["ADAPTIVE"] = "adaptive";
|
|
56565
|
+
BinarizeMethodEnum2["OTSU"] = "otsu";
|
|
56566
|
+
BinarizeMethodEnum2["SIMPLE"] = "simple";
|
|
56567
|
+
})(DeviceLink2.BinarizeMethodEnum || (DeviceLink2.BinarizeMethodEnum = {}));
|
|
56568
|
+
((AiInputModeEnum2) => {
|
|
56569
|
+
AiInputModeEnum2["UPLOAD"] = "UPLOAD";
|
|
56570
|
+
AiInputModeEnum2["CAMERA"] = "CAMERA";
|
|
56571
|
+
})(DeviceLink2.AiInputModeEnum || (DeviceLink2.AiInputModeEnum = {}));
|
|
56572
|
+
((DeviceLinkTypeEnum2) => {
|
|
56573
|
+
DeviceLinkTypeEnum2["IPAAS"] = "IPAAS";
|
|
56574
|
+
DeviceLinkTypeEnum2["MQTT"] = "MQTT";
|
|
56575
|
+
})(DeviceLink2.DeviceLinkTypeEnum || (DeviceLink2.DeviceLinkTypeEnum = {}));
|
|
56576
|
+
})(DeviceLink || (DeviceLink = {}));
|
|
56577
|
+
class DeviceLinkTmplUtil {
|
|
56578
|
+
/**
|
|
56579
|
+
* 创建模板数据
|
|
56580
|
+
* @param type
|
|
56581
|
+
* @return {*}
|
|
56582
|
+
*/
|
|
56583
|
+
static createTmpl(type4) {
|
|
56584
|
+
const tmpl = {
|
|
56585
|
+
id: uuid(),
|
|
56586
|
+
type: type4
|
|
56587
|
+
};
|
|
56588
|
+
if (type4 === DeviceLink.TmplTypeEnum.AI_OCR) {
|
|
56589
|
+
Object.assign(tmpl, {
|
|
56590
|
+
identifyParams: [
|
|
56591
|
+
{
|
|
56592
|
+
prompt: void 0,
|
|
56593
|
+
formField: void 0
|
|
56594
|
+
}
|
|
56595
|
+
],
|
|
56596
|
+
denoiseMethod: DeviceLink.DenoiseMethodEnum.GAUSSIAN,
|
|
56597
|
+
binarizeMethod: DeviceLink.BinarizeMethodEnum.ADAPTIVE
|
|
56598
|
+
});
|
|
56599
|
+
}
|
|
56600
|
+
return tmpl;
|
|
56601
|
+
}
|
|
56602
|
+
/**
|
|
56603
|
+
* 计算完整的提示词
|
|
56604
|
+
* @static
|
|
56605
|
+
* @param tmpl
|
|
56606
|
+
* @return {*}
|
|
56607
|
+
*/
|
|
56608
|
+
static calcEntirePrompt(tmpl) {
|
|
56609
|
+
const paramsStr = tmpl.identifyParams?.map((item) => {
|
|
56610
|
+
return `图中${item.prompt}绑定${item.formField?.split(".")[1]}字段`;
|
|
56611
|
+
}).join(",");
|
|
56612
|
+
const jsonObj = tmpl.identifyParams?.reduce((acc, cur) => {
|
|
56613
|
+
acc[cur.formField?.split(".")[1]] = {
|
|
56614
|
+
value: null
|
|
56615
|
+
};
|
|
56616
|
+
return acc;
|
|
56617
|
+
}, {});
|
|
56618
|
+
const result = `这是一台${tmpl.deviceName ?? ""}设备/仪器图片,${paramsStr},请识别图片中的读数,以
|
|
56619
|
+
${JSON.stringify(
|
|
56620
|
+
jsonObj,
|
|
56621
|
+
null,
|
|
56622
|
+
2
|
|
56623
|
+
)}
|
|
56624
|
+
格式返回,${tmpl.extraPrompt ?? ""}`;
|
|
56625
|
+
return result;
|
|
56626
|
+
}
|
|
56627
|
+
/** 平台设备互联接口对象转换格式 */
|
|
56628
|
+
static transfer2DeviceLink(data) {
|
|
56629
|
+
const result = {
|
|
56630
|
+
id: data.id,
|
|
56631
|
+
name: data.name,
|
|
56632
|
+
type: data.type,
|
|
56633
|
+
params: data.schema ? [] : void 0
|
|
56634
|
+
};
|
|
56635
|
+
if (data.schema) {
|
|
56636
|
+
const params = [];
|
|
56637
|
+
const obj = JSON.parse(data.schema);
|
|
56638
|
+
for (const key in obj.properties) {
|
|
56639
|
+
const temp = {
|
|
56640
|
+
code: key,
|
|
56641
|
+
name: obj.properties[key].description || "数组结构",
|
|
56642
|
+
type: obj.properties[key].type,
|
|
56643
|
+
remark: obj.properties[key].remark,
|
|
56644
|
+
children: []
|
|
56645
|
+
};
|
|
56646
|
+
if (obj.properties[key].items && obj.properties[key].items.properties) {
|
|
56647
|
+
temp.children = [];
|
|
56648
|
+
for (const subkey in obj.properties[key].items.properties) {
|
|
56649
|
+
temp.children.push({
|
|
56650
|
+
code: subkey,
|
|
56651
|
+
name: obj.properties[key].items.properties[subkey].description,
|
|
56652
|
+
type: obj.properties[key].items.properties[subkey].type,
|
|
56653
|
+
remark: obj.properties[key].remark
|
|
56654
|
+
});
|
|
56655
|
+
}
|
|
56656
|
+
}
|
|
56657
|
+
params.push(temp);
|
|
56658
|
+
}
|
|
56659
|
+
result.params = params;
|
|
56660
|
+
}
|
|
56661
|
+
return result;
|
|
56662
|
+
}
|
|
56663
|
+
/**
|
|
56664
|
+
* 通过设备id转换成IDeviceLink结构
|
|
56665
|
+
* - 请求获取完整的带参数的数据
|
|
56666
|
+
* - 把参数数据转换成IDeviceLink结构
|
|
56667
|
+
* @static
|
|
56668
|
+
* @param deviceId
|
|
56669
|
+
*/
|
|
56670
|
+
static async getDeviceLink(deviceId) {
|
|
56671
|
+
const res = await api.platform.deviceInterconnection.getInfo({ id: deviceId });
|
|
56672
|
+
if (!res) {
|
|
56673
|
+
return;
|
|
56674
|
+
}
|
|
56675
|
+
return this.transfer2DeviceLink(res);
|
|
56676
|
+
}
|
|
56677
|
+
/**
|
|
56678
|
+
* 初始化设备字段和表单字段映射关系
|
|
56679
|
+
* @static
|
|
56680
|
+
* @param deviceLink
|
|
56681
|
+
*/
|
|
56682
|
+
static initDevice2FormFieldMap(deviceLink) {
|
|
56683
|
+
const fieldMap = [];
|
|
56684
|
+
deviceLink.params?.forEach((item) => {
|
|
56685
|
+
fieldMap.push({
|
|
56686
|
+
isSubField: item.type === "Array",
|
|
56687
|
+
deviceField: item.code,
|
|
56688
|
+
deviceLinkParams: cloneDeep(omit(item, ["children"])),
|
|
56689
|
+
// 冗余参数自身的信息,不存子数据
|
|
56690
|
+
formField: void 0,
|
|
56691
|
+
children: item.children?.map((subItem) => {
|
|
56692
|
+
return {
|
|
56693
|
+
deviceField: subItem.code,
|
|
56694
|
+
deviceLinkParams: cloneDeep(subItem),
|
|
56695
|
+
formField: void 0
|
|
56696
|
+
};
|
|
56697
|
+
})
|
|
56698
|
+
});
|
|
56699
|
+
});
|
|
56700
|
+
return fieldMap;
|
|
56701
|
+
}
|
|
56702
|
+
}
|
|
56703
|
+
const AITooltips = {
|
|
56704
|
+
/** 降噪 */
|
|
56705
|
+
denoise: {
|
|
56706
|
+
title: "适用于照片有噪点、模糊、拍摄环境光线不足的情况",
|
|
56707
|
+
content: "降噪方法\n· 高斯模糊 (gaussian):通用降噪,适合大多数场景\n· 双边滤波 (bilateral):保留边缘细节,适合需要清晰数字的场景\n· 中值滤波 (median):去除椒盐噪点,适合有明显噪点的照片"
|
|
56708
|
+
},
|
|
56709
|
+
/** 对比度 */
|
|
56710
|
+
contrast: {
|
|
56711
|
+
title: "适用于屏幕显示模糊、数字与背景对比度低、反光\n导致看不清的情况",
|
|
56712
|
+
content: "对比度强度\n· 1.0 - 1.5 :轻微增强,适合轻微模糊\n· 1.5 - 2.0 :中等增强,适合一般情况\n· 2.0 - 3.0 :强烈增强,适合严重模糊或低对比度"
|
|
56713
|
+
},
|
|
56714
|
+
/** 二值化 */
|
|
56715
|
+
binarize: {
|
|
56716
|
+
title: "适用于 LCD/LED 屏幕、黑白显示屏、需要突出数字轮廓的场景",
|
|
56717
|
+
content: "二值化方法\n· 自适应阈值 (adaptive):适合光照不均匀的场景,自动调整阈值\n· Otsu 自适应 (Otsu):自动计算最佳阈值,适合大多数场景\n· 简单阈值 (simple):固定阈值,适合光照均匀的场景"
|
|
56718
|
+
},
|
|
56719
|
+
/** 识别参数提示词 */
|
|
56720
|
+
identifyParam: {
|
|
56721
|
+
content: "一般在多值识别时描述位置或值标题名称,\n如:“第一行左上的值”“氢气输入压力”"
|
|
56722
|
+
}
|
|
56723
|
+
};
|
|
56724
|
+
const DenoiseMethodMap = {
|
|
56725
|
+
bilateral: "双边滤波",
|
|
56726
|
+
gaussian: "高斯滤波",
|
|
56727
|
+
median: "中值滤波"
|
|
56728
|
+
};
|
|
56729
|
+
const BinarizeMethodMap = {
|
|
56730
|
+
adaptive: "自适应阈值",
|
|
56731
|
+
otsu: "Otsu 自适应",
|
|
56732
|
+
simple: "简单阈值"
|
|
56733
|
+
};
|
|
56734
|
+
const DenoiseMethodOptions = computed(() => {
|
|
56735
|
+
return Object.values(DeviceLink.DenoiseMethodEnum).map((item) => {
|
|
56736
|
+
return {
|
|
56737
|
+
label: DenoiseMethodMap[item],
|
|
56738
|
+
value: item
|
|
56739
|
+
};
|
|
56740
|
+
});
|
|
56741
|
+
});
|
|
56742
|
+
const BinarizeMethodOptions = computed(() => {
|
|
56743
|
+
return Object.values(DeviceLink.BinarizeMethodEnum).map((item) => {
|
|
56744
|
+
return {
|
|
56745
|
+
label: BinarizeMethodMap[item],
|
|
56746
|
+
value: item
|
|
56747
|
+
};
|
|
56748
|
+
});
|
|
56749
|
+
});
|
|
56750
|
+
const DeviceParamsTypeTitle = {
|
|
56751
|
+
String: "文本",
|
|
56752
|
+
Integer: "整数",
|
|
56753
|
+
Long: "长整数",
|
|
56754
|
+
Float: "小数",
|
|
56755
|
+
Boolean: "布尔",
|
|
56756
|
+
Date: "日期",
|
|
56757
|
+
Array: "数组结构"
|
|
56758
|
+
};
|
|
56759
|
+
class FormTmplConfigController {
|
|
56760
|
+
/** 存储响应式变量 */
|
|
56761
|
+
state = reactive({
|
|
56762
|
+
tmpls: [],
|
|
56763
|
+
runningTmpls: []
|
|
56764
|
+
});
|
|
56765
|
+
/** 表单模板id */
|
|
56766
|
+
tmplId = "";
|
|
56767
|
+
/** 是否手动模式,手动模式不触发接口 */
|
|
56768
|
+
isManual = false;
|
|
56769
|
+
/**
|
|
56770
|
+
* 初始化
|
|
56771
|
+
*
|
|
56772
|
+
* @param opts
|
|
56773
|
+
* - tmplId 表单模板id
|
|
56774
|
+
*/
|
|
56775
|
+
async init(opts) {
|
|
56776
|
+
this.isManual = !!opts.isManual;
|
|
56777
|
+
this.tmplId = opts.tmplId;
|
|
56778
|
+
this.state.runningTmpls = [];
|
|
56779
|
+
if (!this.isManual) {
|
|
56780
|
+
await this.load();
|
|
56781
|
+
}
|
|
56782
|
+
}
|
|
56783
|
+
/**
|
|
56784
|
+
* 设置获取到的配置数据字符串
|
|
56785
|
+
* @param configStr
|
|
56786
|
+
*/
|
|
56787
|
+
setConfigStr(configStr) {
|
|
56788
|
+
const config = configStr ? JSON.parse(configStr) : {};
|
|
56789
|
+
this.state.tmpls = config.tmpls || [];
|
|
56790
|
+
}
|
|
56791
|
+
getConfigStr() {
|
|
56792
|
+
const cloneTmpls = cloneDeep(this.state.tmpls);
|
|
56793
|
+
cloneTmpls.forEach((tmpl) => {
|
|
56794
|
+
if (tmpl.type === DeviceLink.TmplTypeEnum.AI_OCR) {
|
|
56795
|
+
tmpl.runtimePrompt = DeviceLinkTmplUtil.calcEntirePrompt(tmpl);
|
|
56796
|
+
}
|
|
56797
|
+
});
|
|
56798
|
+
const config = {
|
|
56799
|
+
tmpls: cloneTmpls
|
|
56800
|
+
};
|
|
56801
|
+
console.log("保存数据", config);
|
|
56802
|
+
return JSON.stringify(config);
|
|
56803
|
+
}
|
|
56804
|
+
/** 调用接口加载数据 */
|
|
56805
|
+
async load() {
|
|
56806
|
+
const res = await api.apaas.onlineFormTmpl.getGetCommunicationConfig({ id: this.tmplId });
|
|
56807
|
+
this.setConfigStr(res);
|
|
56808
|
+
}
|
|
56809
|
+
/** 调用接口保存数据 */
|
|
56810
|
+
async save() {
|
|
56811
|
+
const configStr = this.getConfigStr();
|
|
56812
|
+
await api.apaas.onlineFormTmpl.postUpdateCommunicationConfigId(
|
|
56813
|
+
{ id: this.tmplId },
|
|
56814
|
+
{ communicationConfig: configStr }
|
|
56815
|
+
);
|
|
56816
|
+
}
|
|
56817
|
+
/** 调用接口刷新数据 */
|
|
56818
|
+
async refresh() {
|
|
56819
|
+
await this.load();
|
|
56820
|
+
}
|
|
56821
|
+
/** 添加或更新模板,并且调用接口保存并刷新数据 */
|
|
56822
|
+
async createOrUpdate(tmpl) {
|
|
56823
|
+
const index2 = this.state.tmpls.findIndex((item) => item.id === tmpl.id);
|
|
56824
|
+
if (index2 > -1) {
|
|
56825
|
+
this.state.tmpls[index2] = tmpl;
|
|
56826
|
+
} else {
|
|
56827
|
+
this.state.tmpls.push(tmpl);
|
|
56828
|
+
}
|
|
56829
|
+
if (!this.isManual) {
|
|
56830
|
+
await this.save();
|
|
56831
|
+
await this.refresh();
|
|
56832
|
+
}
|
|
56833
|
+
}
|
|
56834
|
+
/** 缓存运行中的模板 */
|
|
56835
|
+
cacheRunningTmpl(tmpl) {
|
|
56836
|
+
if (tmpl.type === DeviceLink.TmplTypeEnum.DEVICE_INTERCONNECTION) {
|
|
56837
|
+
const index2 = this.state.runningTmpls.findIndex((item) => item.id === tmpl.id);
|
|
56838
|
+
if (index2 > -1) {
|
|
56839
|
+
this.state.runningTmpls[index2] = tmpl;
|
|
56840
|
+
} else {
|
|
56841
|
+
this.state.runningTmpls.push(tmpl);
|
|
56842
|
+
}
|
|
56843
|
+
}
|
|
56844
|
+
}
|
|
56845
|
+
}
|
|
56846
|
+
const FormTmplConfigControllerKey = "GctFormTmplConfigControllerWord";
|
|
56847
|
+
function useFormTmplConfig() {
|
|
56848
|
+
function provideController(c2 = new FormTmplConfigController()) {
|
|
56849
|
+
provide(FormTmplConfigControllerKey, c2);
|
|
56850
|
+
return c2;
|
|
56851
|
+
}
|
|
56852
|
+
function injectController() {
|
|
56853
|
+
return inject(FormTmplConfigControllerKey);
|
|
56854
|
+
}
|
|
56855
|
+
return {
|
|
56856
|
+
provideController,
|
|
56857
|
+
injectController
|
|
56858
|
+
};
|
|
56859
|
+
}
|
|
56304
56860
|
function toComputed(val) {
|
|
56305
56861
|
return computed(() => typeof val === "function" ? val() : val);
|
|
56306
56862
|
}
|
|
@@ -56323,8 +56879,10 @@ function useWord(props, options) {
|
|
|
56323
56879
|
const ops = useDocOperations(factory2.docIns);
|
|
56324
56880
|
const controller = useDocController(factory2, ops);
|
|
56325
56881
|
useDocRuntimeProvider(factory2, controller);
|
|
56882
|
+
const formTmplConfigController = useFormTmplConfig().provideController();
|
|
56326
56883
|
return {
|
|
56327
56884
|
controller,
|
|
56885
|
+
formTmplConfigController,
|
|
56328
56886
|
docInfo: factory2.docInfo
|
|
56329
56887
|
};
|
|
56330
56888
|
}
|
|
@@ -56939,11 +57497,11 @@ const _hoisted_1$1J = { class: "color-picker-container" };
|
|
|
56939
57497
|
const _hoisted_2$15 = { class: "color-content-auto" };
|
|
56940
57498
|
const _hoisted_3$Q = { class: "color-content-theme" };
|
|
56941
57499
|
const _hoisted_4$C = ["onClick"];
|
|
56942
|
-
const _hoisted_5$
|
|
57500
|
+
const _hoisted_5$s = { class: "color-content-standard" };
|
|
56943
57501
|
const _hoisted_6$k = { class: "items" };
|
|
56944
57502
|
const _hoisted_7$g = ["onClick"];
|
|
56945
57503
|
const _hoisted_8$e = { class: "color-content-used" };
|
|
56946
|
-
const _hoisted_9$
|
|
57504
|
+
const _hoisted_9$9 = { class: "items" };
|
|
56947
57505
|
const _hoisted_10$6 = ["onClick"];
|
|
56948
57506
|
const _hoisted_11$4 = {
|
|
56949
57507
|
key: 1,
|
|
@@ -57029,7 +57587,7 @@ const _sfc_main$2o = /* @__PURE__ */ defineComponent({
|
|
|
57029
57587
|
]);
|
|
57030
57588
|
}), 128))
|
|
57031
57589
|
]),
|
|
57032
|
-
createElementVNode("div", _hoisted_5$
|
|
57590
|
+
createElementVNode("div", _hoisted_5$s, [
|
|
57033
57591
|
_cache[4] || (_cache[4] = createElementVNode("div", { class: "title" }, "标准色", -1)),
|
|
57034
57592
|
createElementVNode("div", _hoisted_6$k, [
|
|
57035
57593
|
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(colorUtils).standard, (c2, idx) => {
|
|
@@ -57055,7 +57613,7 @@ const _sfc_main$2o = /* @__PURE__ */ defineComponent({
|
|
|
57055
57613
|
]),
|
|
57056
57614
|
createElementVNode("div", _hoisted_8$e, [
|
|
57057
57615
|
_cache[5] || (_cache[5] = createElementVNode("div", { class: "title" }, "已使用字体颜色", -1)),
|
|
57058
|
-
createElementVNode("div", _hoisted_9$
|
|
57616
|
+
createElementVNode("div", _hoisted_9$9, [
|
|
57059
57617
|
unref(colorUtils).standard.length ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(unref(colorUtils).standard, (c2, idx) => {
|
|
57060
57618
|
return openBlock(), createBlock(unref(_sfc_main$31), {
|
|
57061
57619
|
distance: 12,
|
|
@@ -57123,6 +57681,13 @@ const _sfc_main$2o = /* @__PURE__ */ defineComponent({
|
|
|
57123
57681
|
}
|
|
57124
57682
|
});
|
|
57125
57683
|
const TextColorSelect = /* @__PURE__ */ _export_sfc(_sfc_main$2o, [["__scopeId", "data-v-cd12b35c"]]);
|
|
57684
|
+
var FontFamilyEnum = /* @__PURE__ */ ((FontFamilyEnum2) => {
|
|
57685
|
+
FontFamilyEnum2["Serif"] = "Roboto,RobotoDraft,Helvetica,Arial,sans-serif";
|
|
57686
|
+
FontFamilyEnum2["SimSun"] = '"SimSun", "宋体", "华文宋体", STSong, STSongti-SC-Light, sans-serif';
|
|
57687
|
+
FontFamilyEnum2["SimHei"] = '"SimHei", "黑体", "华文黑体", STHeiti, sans-serif';
|
|
57688
|
+
FontFamilyEnum2["KaiTi"] = '"Kai", "STKai", "楷体", "KaiTi", "华文楷体", sans-serif';
|
|
57689
|
+
return FontFamilyEnum2;
|
|
57690
|
+
})(FontFamilyEnum || {});
|
|
57126
57691
|
const FontFamilyOptions = [
|
|
57127
57692
|
{
|
|
57128
57693
|
label: "默认",
|
|
@@ -57328,8 +57893,9 @@ const _sfc_main$2n = /* @__PURE__ */ defineComponent({
|
|
|
57328
57893
|
label: "行"
|
|
57329
57894
|
}, {
|
|
57330
57895
|
default: withCtx(() => [
|
|
57331
|
-
createVNode(unref(
|
|
57896
|
+
createVNode(unref(GctInputNumber), {
|
|
57332
57897
|
placeholder: "请输入",
|
|
57898
|
+
min: 1,
|
|
57333
57899
|
modelValue: formData.value.rowCount,
|
|
57334
57900
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formData.value.rowCount = $event),
|
|
57335
57901
|
style: { "width": "100%", "height": "28px", "border-radius": "4px", "border": "1px solid #d9d9d9" }
|
|
@@ -57342,8 +57908,9 @@ const _sfc_main$2n = /* @__PURE__ */ defineComponent({
|
|
|
57342
57908
|
label: "列"
|
|
57343
57909
|
}, {
|
|
57344
57910
|
default: withCtx(() => [
|
|
57345
|
-
createVNode(unref(
|
|
57911
|
+
createVNode(unref(GctInputNumber), {
|
|
57346
57912
|
placeholder: "请输入",
|
|
57913
|
+
min: 1,
|
|
57347
57914
|
modelValue: formData.value.colCount,
|
|
57348
57915
|
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => formData.value.colCount = $event),
|
|
57349
57916
|
style: { "width": "100%", "height": "28px", "border-radius": "4px", "border": "1px solid #d9d9d9" }
|
|
@@ -57355,7 +57922,7 @@ const _sfc_main$2n = /* @__PURE__ */ defineComponent({
|
|
|
57355
57922
|
};
|
|
57356
57923
|
}
|
|
57357
57924
|
});
|
|
57358
|
-
const InsertTableFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$2n, [["__scopeId", "data-v-
|
|
57925
|
+
const InsertTableFormModal = /* @__PURE__ */ _export_sfc(_sfc_main$2n, [["__scopeId", "data-v-7ac9005c"]]);
|
|
57359
57926
|
const _hoisted_1$1H = { class: "container" };
|
|
57360
57927
|
const _sfc_main$2m = /* @__PURE__ */ defineComponent({
|
|
57361
57928
|
__name: "sub-table-form-modal",
|
|
@@ -57505,7 +58072,7 @@ const _hoisted_1$1F = { class: "items-container" };
|
|
|
57505
58072
|
const _hoisted_2$14 = { class: "ribbon-tab-item" };
|
|
57506
58073
|
const _hoisted_3$P = { class: "ribbon-tab-item" };
|
|
57507
58074
|
const _hoisted_4$B = { class: "ribbon-tab-item" };
|
|
57508
|
-
const _hoisted_5$
|
|
58075
|
+
const _hoisted_5$r = { class: "ribbon-tab-item" };
|
|
57509
58076
|
const _hoisted_6$j = { class: "ribbon-tab-item" };
|
|
57510
58077
|
const _hoisted_7$f = { class: "ribbon-tab-item" };
|
|
57511
58078
|
const _sfc_main$2k = /* @__PURE__ */ defineComponent({
|
|
@@ -57516,8 +58083,8 @@ const _sfc_main$2k = /* @__PURE__ */ defineComponent({
|
|
|
57516
58083
|
const modelKey = toRef(docInst.value, "mainModelKey");
|
|
57517
58084
|
const { fields } = useModelData(modelKey);
|
|
57518
58085
|
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(
|
|
58086
|
+
const useSelectLabel = (valueRef, options) => computed(() => options.find((o) => o.value === valueRef.value)?.label || valueRef.value || "");
|
|
58087
|
+
const fontFamily = ref(FontFamilyEnum.Serif);
|
|
57521
58088
|
const fontFamilyLabel = useSelectLabel(fontFamily, FontFamilyOptions);
|
|
57522
58089
|
const fontSize2 = ref("10.5");
|
|
57523
58090
|
const fontSizeLabel = useSelectLabel(fontSize2, FontSizeOptions);
|
|
@@ -57836,7 +58403,7 @@ const _sfc_main$2k = /* @__PURE__ */ defineComponent({
|
|
|
57836
58403
|
})
|
|
57837
58404
|
]),
|
|
57838
58405
|
_cache[27] || (_cache[27] = createElementVNode("div", { class: "split-divider" }, null, -1)),
|
|
57839
|
-
createElementVNode("div", _hoisted_5$
|
|
58406
|
+
createElementVNode("div", _hoisted_5$r, [
|
|
57840
58407
|
createVNode(ButtonIcon, {
|
|
57841
58408
|
tooltip: "左对齐",
|
|
57842
58409
|
iconExtraProps: { icon: "icon-zuoduiqi2" },
|
|
@@ -57913,7 +58480,7 @@ const _sfc_main$2k = /* @__PURE__ */ defineComponent({
|
|
|
57913
58480
|
};
|
|
57914
58481
|
}
|
|
57915
58482
|
});
|
|
57916
|
-
const WordTable = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["__scopeId", "data-v-
|
|
58483
|
+
const WordTable = /* @__PURE__ */ _export_sfc(_sfc_main$2k, [["__scopeId", "data-v-66a2a1b2"]]);
|
|
57917
58484
|
const _hoisted_1$1E = { class: "ribbon" };
|
|
57918
58485
|
const _hoisted_2$13 = { class: "ribbon-content-wrapper" };
|
|
57919
58486
|
const _sfc_main$2j = /* @__PURE__ */ defineComponent({
|
|
@@ -57933,7 +58500,7 @@ const _hoisted_1$1D = { class: "toolkit-item" };
|
|
|
57933
58500
|
const _hoisted_2$12 = { class: "toolkit-popper-wrap" };
|
|
57934
58501
|
const _hoisted_3$O = { class: "toolkit-popper-title" };
|
|
57935
58502
|
const _hoisted_4$A = { class: "title" };
|
|
57936
|
-
const _hoisted_5$
|
|
58503
|
+
const _hoisted_5$q = { class: "label" };
|
|
57937
58504
|
const _sfc_main$2i = /* @__PURE__ */ defineComponent({
|
|
57938
58505
|
__name: "toolkit-item",
|
|
57939
58506
|
props: {
|
|
@@ -57990,7 +58557,7 @@ const _sfc_main$2i = /* @__PURE__ */ defineComponent({
|
|
|
57990
58557
|
version: __props.version,
|
|
57991
58558
|
size: "20"
|
|
57992
58559
|
}, null, 8, ["icon", "version"]),
|
|
57993
|
-
createElementVNode("span", _hoisted_5$
|
|
58560
|
+
createElementVNode("span", _hoisted_5$q, toDisplayString(__props.label), 1)
|
|
57994
58561
|
], 2)
|
|
57995
58562
|
]),
|
|
57996
58563
|
_: 2
|
|
@@ -58151,14 +58718,14 @@ const _hoisted_1$1C = { class: "content-fields-wrapper" };
|
|
|
58151
58718
|
const _hoisted_2$11 = { class: "search" };
|
|
58152
58719
|
const _hoisted_3$N = { class: "container" };
|
|
58153
58720
|
const _hoisted_4$z = { class: "item main" };
|
|
58154
|
-
const _hoisted_5$
|
|
58721
|
+
const _hoisted_5$p = {
|
|
58155
58722
|
key: 0,
|
|
58156
58723
|
class: "field-list-wrap"
|
|
58157
58724
|
};
|
|
58158
58725
|
const _hoisted_6$i = { class: "field-list" };
|
|
58159
58726
|
const _hoisted_7$e = ["draggable", "onDragstart"];
|
|
58160
58727
|
const _hoisted_8$d = ["innerHTML", "title"];
|
|
58161
|
-
const _hoisted_9$
|
|
58728
|
+
const _hoisted_9$8 = {
|
|
58162
58729
|
key: 1,
|
|
58163
58730
|
class: "empty"
|
|
58164
58731
|
};
|
|
@@ -58255,7 +58822,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
|
|
|
58255
58822
|
]),
|
|
58256
58823
|
createElementVNode("div", _hoisted_3$N, [
|
|
58257
58824
|
createElementVNode("div", _hoisted_4$z, toDisplayString(unref(modelMeta)?.modelName), 1),
|
|
58258
|
-
filteredFields.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
58825
|
+
filteredFields.value.length ? (openBlock(), createElementBlock("div", _hoisted_5$p, [
|
|
58259
58826
|
createVNode(unref(GctScrollbar), null, {
|
|
58260
58827
|
default: withCtx(() => [
|
|
58261
58828
|
createElementVNode("div", _hoisted_6$i, [
|
|
@@ -58286,7 +58853,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
|
|
|
58286
58853
|
]),
|
|
58287
58854
|
_: 1
|
|
58288
58855
|
})
|
|
58289
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_9$
|
|
58856
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_9$8, "暂无字段"))
|
|
58290
58857
|
])
|
|
58291
58858
|
]);
|
|
58292
58859
|
};
|
|
@@ -58479,7 +59046,7 @@ const _hoisted_4$y = {
|
|
|
58479
59046
|
key: 1,
|
|
58480
59047
|
class: "title"
|
|
58481
59048
|
};
|
|
58482
|
-
const _hoisted_5$
|
|
59049
|
+
const _hoisted_5$o = {
|
|
58483
59050
|
key: 1,
|
|
58484
59051
|
class: "empty"
|
|
58485
59052
|
};
|
|
@@ -58565,7 +59132,7 @@ const _sfc_main$2e = /* @__PURE__ */ defineComponent({
|
|
|
58565
59132
|
key: 0,
|
|
58566
59133
|
widget: unref(widget),
|
|
58567
59134
|
active: unref(active)
|
|
58568
|
-
}, null, 8, ["widget", "active"])) : (openBlock(), createElementBlock("div", _hoisted_5$
|
|
59135
|
+
}, null, 8, ["widget", "active"])) : (openBlock(), createElementBlock("div", _hoisted_5$o, "请选择一个元素"))
|
|
58569
59136
|
]),
|
|
58570
59137
|
_: 1
|
|
58571
59138
|
})
|
|
@@ -59135,7 +59702,7 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59135
59702
|
if (!interaction.tableSelection) return;
|
|
59136
59703
|
docInst?.value?.execute(CommandType.insertRow, {
|
|
59137
59704
|
tableId: interaction.tableSelection.tableId,
|
|
59138
|
-
rowIndex: interaction.tableSelection.index,
|
|
59705
|
+
rowIndex: interaction.tableSelection.realRowIndex || interaction.tableSelection.index,
|
|
59139
59706
|
position: options,
|
|
59140
59707
|
count: options === "before" ? insertBeforeRowCount.value : insertAfterRowCount.value
|
|
59141
59708
|
});
|
|
@@ -59144,7 +59711,7 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59144
59711
|
if (!interaction.tableSelection) return;
|
|
59145
59712
|
docInst?.value?.execute(CommandType.deleteRow, {
|
|
59146
59713
|
tableId: interaction.tableSelection.tableId,
|
|
59147
|
-
rowIndex: interaction.tableSelection.index
|
|
59714
|
+
rowIndex: interaction.tableSelection.realRowIndex || interaction.tableSelection.index
|
|
59148
59715
|
});
|
|
59149
59716
|
break;
|
|
59150
59717
|
case "data-group":
|
|
@@ -59196,8 +59763,8 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59196
59763
|
_cache[18] || (_cache[18] = createElementVNode("i", { class: "item-icon icon iconfont icon-zuocecharulie" }, null, -1)),
|
|
59197
59764
|
_cache[19] || (_cache[19] = createElementVNode("span", { class: "item-name" }, "在左侧插入列", -1)),
|
|
59198
59765
|
createElementVNode("div", _hoisted_1$1y, [
|
|
59199
|
-
createVNode(unref(
|
|
59200
|
-
|
|
59766
|
+
createVNode(unref(GctInputNumber), {
|
|
59767
|
+
min: 1,
|
|
59201
59768
|
modelValue: insertBeforeColCount.value,
|
|
59202
59769
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => insertBeforeColCount.value = $event),
|
|
59203
59770
|
onClick: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
@@ -59212,8 +59779,8 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59212
59779
|
_cache[20] || (_cache[20] = createElementVNode("i", { class: "item-icon icon iconfont icon-youcecharulie" }, null, -1)),
|
|
59213
59780
|
_cache[21] || (_cache[21] = createElementVNode("span", { class: "item-name" }, "在右侧插入列", -1)),
|
|
59214
59781
|
createElementVNode("div", _hoisted_2$_, [
|
|
59215
|
-
createVNode(unref(
|
|
59216
|
-
|
|
59782
|
+
createVNode(unref(GctInputNumber), {
|
|
59783
|
+
min: 1,
|
|
59217
59784
|
modelValue: insertAfterColCount.value,
|
|
59218
59785
|
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => insertAfterColCount.value = $event),
|
|
59219
59786
|
onClick: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
@@ -59235,8 +59802,8 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59235
59802
|
_cache[23] || (_cache[23] = createElementVNode("i", { class: "item-icon icon iconfont icon-a-shangcharuhang1" }, null, -1)),
|
|
59236
59803
|
_cache[24] || (_cache[24] = createElementVNode("span", { class: "item-name" }, "在上方插入行", -1)),
|
|
59237
59804
|
createElementVNode("div", _hoisted_3$K, [
|
|
59238
|
-
createVNode(unref(
|
|
59239
|
-
|
|
59805
|
+
createVNode(unref(GctInputNumber), {
|
|
59806
|
+
min: 1,
|
|
59240
59807
|
modelValue: insertBeforeRowCount.value,
|
|
59241
59808
|
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => insertBeforeRowCount.value = $event),
|
|
59242
59809
|
onClick: _cache[8] || (_cache[8] = withModifiers(() => {
|
|
@@ -59251,8 +59818,8 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59251
59818
|
_cache[25] || (_cache[25] = createElementVNode("i", { class: "item-icon icon iconfont icon-a-xiacharuhang1" }, null, -1)),
|
|
59252
59819
|
_cache[26] || (_cache[26] = createElementVNode("span", { class: "item-name" }, "在下方插入行", -1)),
|
|
59253
59820
|
createElementVNode("div", _hoisted_4$x, [
|
|
59254
|
-
createVNode(unref(
|
|
59255
|
-
|
|
59821
|
+
createVNode(unref(GctInputNumber), {
|
|
59822
|
+
min: 1,
|
|
59256
59823
|
modelValue: insertAfterRowCount.value,
|
|
59257
59824
|
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => insertAfterRowCount.value = $event),
|
|
59258
59825
|
onClick: _cache[11] || (_cache[11] = withModifiers(() => {
|
|
@@ -59299,7 +59866,7 @@ const _sfc_main$28 = /* @__PURE__ */ defineComponent({
|
|
|
59299
59866
|
};
|
|
59300
59867
|
}
|
|
59301
59868
|
});
|
|
59302
|
-
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["__scopeId", "data-v-
|
|
59869
|
+
const TableMenu = /* @__PURE__ */ _export_sfc(_sfc_main$28, [["__scopeId", "data-v-2e53d82b"]]);
|
|
59303
59870
|
const OFFSET = 4;
|
|
59304
59871
|
const _sfc_main$27 = /* @__PURE__ */ defineComponent({
|
|
59305
59872
|
__name: "index",
|
|
@@ -59362,7 +59929,7 @@ const _hoisted_1$1x = { class: "validation-comment-item" };
|
|
|
59362
59929
|
const _hoisted_2$Z = { class: "validation-comment-panel-container" };
|
|
59363
59930
|
const _hoisted_3$J = { class: "comment-header" };
|
|
59364
59931
|
const _hoisted_4$w = { class: "comment-messages" };
|
|
59365
|
-
const _hoisted_5$
|
|
59932
|
+
const _hoisted_5$n = { class: "message-item" };
|
|
59366
59933
|
const _hoisted_6$h = { class: "field-name" };
|
|
59367
59934
|
const _hoisted_7$d = { class: "error-text" };
|
|
59368
59935
|
const _sfc_main$26 = /* @__PURE__ */ defineComponent({
|
|
@@ -59448,7 +60015,7 @@ const _sfc_main$26 = /* @__PURE__ */ defineComponent({
|
|
|
59448
60015
|
]),
|
|
59449
60016
|
createElementVNode("div", _hoisted_4$w, [
|
|
59450
60017
|
(openBlock(true), createElementBlock(Fragment, null, renderList(fieldErrorList.value, (item) => {
|
|
59451
|
-
return openBlock(), createElementBlock("div", _hoisted_5$
|
|
60018
|
+
return openBlock(), createElementBlock("div", _hoisted_5$n, [
|
|
59452
60019
|
createElementVNode("div", _hoisted_6$h, toDisplayString(unref(fieldInfo)?.name) + ":", 1),
|
|
59453
60020
|
createElementVNode("div", _hoisted_7$d, toDisplayString(item.message), 1)
|
|
59454
60021
|
]);
|
|
@@ -59542,7 +60109,7 @@ const _hoisted_1$1v = { class: "cl__item" };
|
|
|
59542
60109
|
const _hoisted_2$Y = { class: "cl__item-panel-container" };
|
|
59543
60110
|
const _hoisted_3$I = { class: "cl__hdr" };
|
|
59544
60111
|
const _hoisted_4$v = { class: "cl__hdr-title" };
|
|
59545
|
-
const _hoisted_5$
|
|
60112
|
+
const _hoisted_5$m = {
|
|
59546
60113
|
key: 0,
|
|
59547
60114
|
class: "cl__hdr-flag"
|
|
59548
60115
|
};
|
|
@@ -59552,7 +60119,7 @@ const _hoisted_8$c = {
|
|
|
59552
60119
|
key: 0,
|
|
59553
60120
|
class: "cl__row"
|
|
59554
60121
|
};
|
|
59555
|
-
const _hoisted_9$
|
|
60122
|
+
const _hoisted_9$7 = { class: "cl__info-val" };
|
|
59556
60123
|
const _hoisted_10$5 = {
|
|
59557
60124
|
key: 1,
|
|
59558
60125
|
class: "cl__row"
|
|
@@ -59657,7 +60224,7 @@ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
|
|
|
59657
60224
|
createElementVNode("article", _hoisted_2$Y, [
|
|
59658
60225
|
createElementVNode("header", _hoisted_3$I, [
|
|
59659
60226
|
createElementVNode("div", _hoisted_4$v, toDisplayString(getHeaderLabel(__props.data.changeType)), 1),
|
|
59660
|
-
__props.data.isCurrentChange ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
60227
|
+
__props.data.isCurrentChange ? (openBlock(), createElementBlock("div", _hoisted_5$m, "本次变更")) : createCommentVNode("", true)
|
|
59661
60228
|
]),
|
|
59662
60229
|
createElementVNode("div", _hoisted_6$g, [
|
|
59663
60230
|
createVNode(unref(GctAvatar), {
|
|
@@ -59675,7 +60242,7 @@ const _sfc_main$24 = /* @__PURE__ */ defineComponent({
|
|
|
59675
60242
|
createElementVNode("div", {
|
|
59676
60243
|
class: normalizeClass(["cl__label", __props.data.changeType])
|
|
59677
60244
|
}, toDisplayString(getReasonLabel(__props.data.changeType)) + ":", 3),
|
|
59678
|
-
createElementVNode("div", _hoisted_9$
|
|
60245
|
+
createElementVNode("div", _hoisted_9$7, toDisplayString(__props.data.reason), 1)
|
|
59679
60246
|
])) : createCommentVNode("", true),
|
|
59680
60247
|
__props.data.beforeLabel ? (openBlock(), createElementBlock("div", _hoisted_10$5, [
|
|
59681
60248
|
_cache[0] || (_cache[0] = createElementVNode("div", { class: "cl__label before" }, "变更前:", -1)),
|
|
@@ -59887,14 +60454,28 @@ const _sfc_main$22 = /* @__PURE__ */ defineComponent({
|
|
|
59887
60454
|
y: docInst.value.pageOffsets[id]?.top
|
|
59888
60455
|
};
|
|
59889
60456
|
}
|
|
60457
|
+
const getParentIds = (node, ids = []) => {
|
|
60458
|
+
if (!node) return ids;
|
|
60459
|
+
if (node.attrs?.id) {
|
|
60460
|
+
ids.push(node.attrs.id);
|
|
60461
|
+
}
|
|
60462
|
+
return getParentIds(node.parent, ids);
|
|
60463
|
+
};
|
|
59890
60464
|
const handleKonvaContextMenu = (e) => {
|
|
59891
60465
|
e.evt.preventDefault();
|
|
59892
60466
|
const { clientX: x2, clientY: y2 } = e.evt;
|
|
60467
|
+
const componentTypes = getParentIds(e.target).map((id) => docInst.value.layoutMapper.dataCenter.get(id)?.component);
|
|
60468
|
+
const isInTable = componentTypes.some((t) => ["table", "tableCell"].includes(t));
|
|
60469
|
+
if (!isInTable) return;
|
|
60470
|
+
const map2 = {
|
|
60471
|
+
table: isInTable
|
|
60472
|
+
};
|
|
60473
|
+
const type4 = Object.entries(map2).find(([, isTrue]) => isTrue)[0];
|
|
59893
60474
|
docInst.value.eventManager.dispatchCustom("konva:contextmenu", {
|
|
59894
60475
|
contextMenuRef,
|
|
59895
60476
|
x: x2,
|
|
59896
60477
|
y: y2,
|
|
59897
|
-
type:
|
|
60478
|
+
type: type4
|
|
59898
60479
|
});
|
|
59899
60480
|
};
|
|
59900
60481
|
function getPagesDataURL() {
|
|
@@ -60011,7 +60592,7 @@ const _sfc_main$22 = /* @__PURE__ */ defineComponent({
|
|
|
60011
60592
|
};
|
|
60012
60593
|
}
|
|
60013
60594
|
});
|
|
60014
|
-
const DocLayout = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["__scopeId", "data-v-
|
|
60595
|
+
const DocLayout = /* @__PURE__ */ _export_sfc(_sfc_main$22, [["__scopeId", "data-v-ddab7707"]]);
|
|
60015
60596
|
const _sfc_main$21 = /* @__PURE__ */ defineComponent({
|
|
60016
60597
|
__name: "editable-canvas",
|
|
60017
60598
|
props: {
|
|
@@ -60159,314 +60740,6 @@ const useDocDesignLayoutProps = () => {
|
|
|
60159
60740
|
injectProps
|
|
60160
60741
|
};
|
|
60161
60742
|
};
|
|
60162
|
-
var DeviceLink;
|
|
60163
|
-
((DeviceLink2) => {
|
|
60164
|
-
((TmplTypeEnum2) => {
|
|
60165
|
-
TmplTypeEnum2["DEVICE_INTERCONNECTION"] = "DEVICE_INTERCONNECTION";
|
|
60166
|
-
TmplTypeEnum2["AI_OCR"] = "AI_OCR";
|
|
60167
|
-
})(DeviceLink2.TmplTypeEnum || (DeviceLink2.TmplTypeEnum = {}));
|
|
60168
|
-
((DenoiseMethodEnum2) => {
|
|
60169
|
-
DenoiseMethodEnum2["GAUSSIAN"] = "gaussian";
|
|
60170
|
-
DenoiseMethodEnum2["BILATERAL"] = "bilateral";
|
|
60171
|
-
DenoiseMethodEnum2["MEDIAN"] = "bilateral";
|
|
60172
|
-
})(DeviceLink2.DenoiseMethodEnum || (DeviceLink2.DenoiseMethodEnum = {}));
|
|
60173
|
-
((BinarizeMethodEnum2) => {
|
|
60174
|
-
BinarizeMethodEnum2["ADAPTIVE"] = "adaptive";
|
|
60175
|
-
BinarizeMethodEnum2["OTSU"] = "otsu";
|
|
60176
|
-
BinarizeMethodEnum2["SIMPLE"] = "simple";
|
|
60177
|
-
})(DeviceLink2.BinarizeMethodEnum || (DeviceLink2.BinarizeMethodEnum = {}));
|
|
60178
|
-
((AiInputModeEnum2) => {
|
|
60179
|
-
AiInputModeEnum2["UPLOAD"] = "UPLOAD";
|
|
60180
|
-
AiInputModeEnum2["CAMERA"] = "CAMERA";
|
|
60181
|
-
})(DeviceLink2.AiInputModeEnum || (DeviceLink2.AiInputModeEnum = {}));
|
|
60182
|
-
((DeviceLinkTypeEnum2) => {
|
|
60183
|
-
DeviceLinkTypeEnum2["IPAAS"] = "IPAAS";
|
|
60184
|
-
DeviceLinkTypeEnum2["MQTT"] = "MQTT";
|
|
60185
|
-
})(DeviceLink2.DeviceLinkTypeEnum || (DeviceLink2.DeviceLinkTypeEnum = {}));
|
|
60186
|
-
})(DeviceLink || (DeviceLink = {}));
|
|
60187
|
-
class DeviceLinkTmplUtil {
|
|
60188
|
-
/**
|
|
60189
|
-
* 创建模板数据
|
|
60190
|
-
* @param type
|
|
60191
|
-
* @return {*}
|
|
60192
|
-
*/
|
|
60193
|
-
static createTmpl(type4) {
|
|
60194
|
-
const tmpl = {
|
|
60195
|
-
id: uuid(),
|
|
60196
|
-
type: type4
|
|
60197
|
-
};
|
|
60198
|
-
if (type4 === DeviceLink.TmplTypeEnum.AI_OCR) {
|
|
60199
|
-
Object.assign(tmpl, {
|
|
60200
|
-
identifyParams: [
|
|
60201
|
-
{
|
|
60202
|
-
prompt: void 0,
|
|
60203
|
-
formField: void 0
|
|
60204
|
-
}
|
|
60205
|
-
],
|
|
60206
|
-
denoiseMethod: DeviceLink.DenoiseMethodEnum.GAUSSIAN,
|
|
60207
|
-
binarizeMethod: DeviceLink.BinarizeMethodEnum.ADAPTIVE
|
|
60208
|
-
});
|
|
60209
|
-
}
|
|
60210
|
-
return tmpl;
|
|
60211
|
-
}
|
|
60212
|
-
/**
|
|
60213
|
-
* 计算完整的提示词
|
|
60214
|
-
* @static
|
|
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;
|
|
60284
|
-
}
|
|
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
|
-
});
|
|
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
|
-
return {
|
|
60466
|
-
provideController,
|
|
60467
|
-
injectController
|
|
60468
|
-
};
|
|
60469
|
-
}
|
|
60470
60743
|
const _hoisted_1$1s = { class: "doc-design-layout" };
|
|
60471
60744
|
const _hoisted_2$W = { class: "design-body" };
|
|
60472
60745
|
const _hoisted_3$H = {
|
|
@@ -60477,7 +60750,7 @@ const _hoisted_4$u = {
|
|
|
60477
60750
|
key: 1,
|
|
60478
60751
|
class: "empty-container"
|
|
60479
60752
|
};
|
|
60480
|
-
const _hoisted_5$
|
|
60753
|
+
const _hoisted_5$l = {
|
|
60481
60754
|
key: 0,
|
|
60482
60755
|
class: "right-container"
|
|
60483
60756
|
};
|
|
@@ -60496,7 +60769,7 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
|
60496
60769
|
const props = __props;
|
|
60497
60770
|
const { provideProps } = useDocDesignLayoutProps();
|
|
60498
60771
|
const { docInst, docInfo, loading, hasData, hasPages } = useDocPubApiContext();
|
|
60499
|
-
useFormTmplConfig().injectController();
|
|
60772
|
+
const formTmplC = useFormTmplConfig().injectController();
|
|
60500
60773
|
provideProps(props);
|
|
60501
60774
|
const {
|
|
60502
60775
|
open: handleUploadFile,
|
|
@@ -60530,6 +60803,17 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
|
60530
60803
|
reset();
|
|
60531
60804
|
}
|
|
60532
60805
|
});
|
|
60806
|
+
watch(
|
|
60807
|
+
() => docInst.value?.docRuntimeMeta.id,
|
|
60808
|
+
(tmplId) => {
|
|
60809
|
+
if (tmplId) {
|
|
60810
|
+
formTmplC.init({ tmplId });
|
|
60811
|
+
}
|
|
60812
|
+
},
|
|
60813
|
+
{
|
|
60814
|
+
immediate: true
|
|
60815
|
+
}
|
|
60816
|
+
);
|
|
60533
60817
|
__expose({
|
|
60534
60818
|
onImportTemplate,
|
|
60535
60819
|
onImportData
|
|
@@ -60559,7 +60843,7 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
|
60559
60843
|
class: "design-sidebar right",
|
|
60560
60844
|
style: normalizeStyle({ width: isPreview.value ? "0px" : "348px" })
|
|
60561
60845
|
}, [
|
|
60562
|
-
!isPreview.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
60846
|
+
!isPreview.value ? (openBlock(), createElementBlock("div", _hoisted_5$l, [
|
|
60563
60847
|
createVNode(Toolkit),
|
|
60564
60848
|
createVNode(Panel)
|
|
60565
60849
|
])) : createCommentVNode("", true)
|
|
@@ -60578,7 +60862,7 @@ const _sfc_main$20 = /* @__PURE__ */ defineComponent({
|
|
|
60578
60862
|
};
|
|
60579
60863
|
}
|
|
60580
60864
|
});
|
|
60581
|
-
const docDesignLayout = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["__scopeId", "data-v-
|
|
60865
|
+
const docDesignLayout = /* @__PURE__ */ _export_sfc(_sfc_main$20, [["__scopeId", "data-v-90a572b9"]]);
|
|
60582
60866
|
function convertPxToPaperSize(pageSize, customSize) {
|
|
60583
60867
|
if (pageSize === PageSizeEnumConst.A3) {
|
|
60584
60868
|
return {
|
|
@@ -60623,82 +60907,125 @@ function usePrint() {
|
|
|
60623
60907
|
};
|
|
60624
60908
|
const printView = async (paperList, options) => {
|
|
60625
60909
|
const { pageSize, customSize, direction } = options;
|
|
60910
|
+
const paperSize = convertPxToPaperSize(pageSize, customSize);
|
|
60911
|
+
const isGlobalLandscape = direction === OrientationTypeConst.Landscape;
|
|
60626
60912
|
const iframe = document.createElement("iframe");
|
|
60627
60913
|
iframe.style.cssText = `
|
|
60628
|
-
|
|
60629
|
-
|
|
60630
|
-
|
|
60631
|
-
|
|
60632
|
-
|
|
60633
|
-
|
|
60634
|
-
|
|
60635
|
-
|
|
60914
|
+
position:fixed;
|
|
60915
|
+
right:0;
|
|
60916
|
+
bottom:0;
|
|
60917
|
+
width:0;
|
|
60918
|
+
height:0;
|
|
60919
|
+
border:none;
|
|
60920
|
+
visibility:hidden;
|
|
60921
|
+
`;
|
|
60636
60922
|
document.body.appendChild(iframe);
|
|
60637
|
-
const
|
|
60923
|
+
const win = iframe.contentWindow;
|
|
60924
|
+
const doc = win.document;
|
|
60638
60925
|
doc.open();
|
|
60639
|
-
|
|
60640
|
-
|
|
60641
|
-
|
|
60926
|
+
doc.write(`
|
|
60927
|
+
<!DOCTYPE html>
|
|
60928
|
+
<html>
|
|
60929
|
+
<head>
|
|
60930
|
+
<title>print</title>
|
|
60931
|
+
|
|
60932
|
+
<style>
|
|
60933
|
+
* {
|
|
60934
|
+
margin: 0;
|
|
60935
|
+
padding: 0;
|
|
60936
|
+
box-sizing: border-box;
|
|
60937
|
+
}
|
|
60938
|
+
|
|
60939
|
+
html,
|
|
60940
|
+
body {
|
|
60941
|
+
width: 100%;
|
|
60942
|
+
height: 100%;
|
|
60943
|
+
}
|
|
60944
|
+
|
|
60945
|
+
body {
|
|
60946
|
+
overflow: hidden;
|
|
60947
|
+
}
|
|
60948
|
+
|
|
60949
|
+
@page {
|
|
60950
|
+
margin: 0;
|
|
60951
|
+
size: ${paperSize.size} ${isGlobalLandscape ? "landscape" : "portrait"};
|
|
60952
|
+
}
|
|
60953
|
+
|
|
60954
|
+
.print-page{
|
|
60955
|
+
position:relative;
|
|
60956
|
+
overflow:hidden;
|
|
60957
|
+
|
|
60958
|
+
width:${paperSize.width};
|
|
60959
|
+
height:${paperSize.height};
|
|
60960
|
+
|
|
60961
|
+
page-break-after:always;
|
|
60962
|
+
break-after:page;
|
|
60963
|
+
}
|
|
60964
|
+
|
|
60965
|
+
.print-page:last-child{
|
|
60966
|
+
page-break-after:auto;
|
|
60967
|
+
break-after:auto;
|
|
60968
|
+
}
|
|
60969
|
+
|
|
60970
|
+
.print-image{
|
|
60971
|
+
position:absolute;
|
|
60972
|
+
|
|
60973
|
+
left:0;
|
|
60974
|
+
top:0;
|
|
60975
|
+
|
|
60976
|
+
width:100%;
|
|
60977
|
+
height:100%;
|
|
60978
|
+
|
|
60979
|
+
object-fit:fill;
|
|
60980
|
+
}
|
|
60981
|
+
|
|
60982
|
+
.print-image.rotate{
|
|
60983
|
+
left:50%;
|
|
60984
|
+
top:50%;
|
|
60985
|
+
|
|
60986
|
+
width:${paperSize.height};
|
|
60987
|
+
height:${paperSize.width};
|
|
60988
|
+
|
|
60989
|
+
transform:translate(-50%, -50%) rotate(90deg);
|
|
60990
|
+
transform-origin:center center;
|
|
60991
|
+
}
|
|
60992
|
+
</style>
|
|
60993
|
+
</head>
|
|
60994
|
+
|
|
60995
|
+
<body></body>
|
|
60996
|
+
</html>
|
|
60997
|
+
`);
|
|
60998
|
+
doc.close();
|
|
60999
|
+
const body = doc.body;
|
|
60642
61000
|
const imgTasks = [];
|
|
60643
61001
|
paperList.forEach((item) => {
|
|
60644
|
-
const
|
|
60645
|
-
|
|
60646
|
-
position:relative;
|
|
60647
|
-
width:${paperSize.width};
|
|
60648
|
-
height:${paperSize.height};
|
|
60649
|
-
`;
|
|
61002
|
+
const page = doc.createElement("div");
|
|
61003
|
+
page.className = "print-page";
|
|
60650
61004
|
const isPageLandscape = item.width > item.height;
|
|
60651
61005
|
const needRotate = isGlobalLandscape && !isPageLandscape || !isGlobalLandscape && isPageLandscape;
|
|
60652
|
-
const img =
|
|
61006
|
+
const img = doc.createElement("img");
|
|
61007
|
+
img.className = `print-image ${needRotate ? "rotate" : ""}`;
|
|
60653
61008
|
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
61009
|
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);
|
|
61010
|
+
page.appendChild(img);
|
|
61011
|
+
body.appendChild(page);
|
|
61012
|
+
});
|
|
60685
61013
|
await Promise.all(imgTasks);
|
|
60686
|
-
|
|
60687
|
-
|
|
60688
|
-
|
|
60689
|
-
|
|
60690
|
-
"mouseover",
|
|
60691
|
-
() => {
|
|
60692
|
-
iframe?.remove();
|
|
60693
|
-
},
|
|
60694
|
-
{
|
|
60695
|
-
once: true
|
|
60696
|
-
}
|
|
60697
|
-
);
|
|
61014
|
+
await new Promise((resolve) => {
|
|
61015
|
+
requestAnimationFrame(() => {
|
|
61016
|
+
requestAnimationFrame(resolve);
|
|
61017
|
+
});
|
|
60698
61018
|
});
|
|
61019
|
+
win.focus();
|
|
61020
|
+
setTimeout(() => {
|
|
61021
|
+
win.print();
|
|
61022
|
+
setTimeout(() => {
|
|
61023
|
+
iframe.remove();
|
|
61024
|
+
}, 1e3);
|
|
61025
|
+
}, 300);
|
|
60699
61026
|
};
|
|
60700
|
-
const
|
|
60701
|
-
const { pageSize, customSize
|
|
61027
|
+
const createPdfInstance = (paperList, options) => {
|
|
61028
|
+
const { pageSize, customSize } = options;
|
|
60702
61029
|
const paperSize = convertPxToPaperSize(pageSize, customSize);
|
|
60703
61030
|
let pdf = null;
|
|
60704
61031
|
paperList.forEach((item, index2) => {
|
|
@@ -60709,24 +61036,20 @@ function usePrint() {
|
|
|
60709
61036
|
unit: "mm",
|
|
60710
61037
|
format: [width, height]
|
|
60711
61038
|
});
|
|
60712
|
-
} else {
|
|
61039
|
+
} else if (index2 !== 0) {
|
|
60713
61040
|
pdf.addPage([width, height], isLandscape ? "landscape" : "portrait");
|
|
60714
61041
|
}
|
|
60715
61042
|
pdf.addImage(item.base64, "PNG", 0, 0, width, height);
|
|
60716
61043
|
});
|
|
61044
|
+
return pdf;
|
|
61045
|
+
};
|
|
61046
|
+
const exportWordPDF = (paperList, options) => {
|
|
61047
|
+
const { fileName = "document.pdf" } = options;
|
|
61048
|
+
const pdf = createPdfInstance(paperList, options);
|
|
60717
61049
|
pdf.save(fileName);
|
|
60718
61050
|
};
|
|
60719
61051
|
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
|
-
});
|
|
61052
|
+
const pdf = createPdfInstance(paperList, options);
|
|
60730
61053
|
return pdf.output("arraybuffer");
|
|
60731
61054
|
};
|
|
60732
61055
|
return {
|
|
@@ -63778,6 +64101,7 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
63778
64101
|
widget: {}
|
|
63779
64102
|
},
|
|
63780
64103
|
setup(__props) {
|
|
64104
|
+
const designCtx = useDesignSuiteContext();
|
|
63781
64105
|
const props = __props;
|
|
63782
64106
|
const { docInst, isDesignMode, pageWidgetProps } = usePaperWidgetStaticAttrs(props.widget);
|
|
63783
64107
|
const width = computed(() => props.widget.width);
|
|
@@ -63819,7 +64143,10 @@ const _sfc_main$1N = /* @__PURE__ */ defineComponent({
|
|
|
63819
64143
|
}
|
|
63820
64144
|
const fieldMeta = pageWidgetProps.value.bindFields?.[index2];
|
|
63821
64145
|
if (fieldMeta && fieldMeta.fieldData) {
|
|
63822
|
-
const
|
|
64146
|
+
const modelKey = getLastSegment(fieldMeta.fieldData.modelLink);
|
|
64147
|
+
const fieldKey = getLastSegment(fieldMeta.fieldData.fieldLink);
|
|
64148
|
+
const fieldInfo = modelKey && fieldKey ? designCtx.runtime.getFieldList(modelKey)?.find((f) => f.key === fieldKey) ?? null : null;
|
|
64149
|
+
const path2 = fieldInfo?.name ? `\${${fieldInfo.name}}` : fieldMeta.fieldData?.valuePath;
|
|
63823
64150
|
if (isDesignMode.value) {
|
|
63824
64151
|
return path2;
|
|
63825
64152
|
}
|
|
@@ -64733,7 +65060,7 @@ const _hoisted_3$F = {
|
|
|
64733
65060
|
class: "head"
|
|
64734
65061
|
};
|
|
64735
65062
|
const _hoisted_4$s = { class: "title" };
|
|
64736
|
-
const _hoisted_5$
|
|
65063
|
+
const _hoisted_5$k = {
|
|
64737
65064
|
key: 1,
|
|
64738
65065
|
class: "link"
|
|
64739
65066
|
};
|
|
@@ -64785,7 +65112,7 @@ const _sfc_main$1E = /* @__PURE__ */ defineComponent({
|
|
|
64785
65112
|
onClick: withModifiers(($event) => _ctx.$emit("delete-thead", item), ["stop"])
|
|
64786
65113
|
}, null, 8, ["onClick"])
|
|
64787
65114
|
])) : createCommentVNode("", true),
|
|
64788
|
-
__props.type !== "table-header" && item?.thead ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
65115
|
+
__props.type !== "table-header" && item?.thead ? (openBlock(), createElementBlock("div", _hoisted_5$k, [
|
|
64789
65116
|
createVNode(unref(GctIcon), {
|
|
64790
65117
|
class: "icon",
|
|
64791
65118
|
icon: "icon-lianjie2",
|
|
@@ -65198,7 +65525,7 @@ const _hoisted_1$1l = { class: "panel-dynamic-table" };
|
|
|
65198
65525
|
const _hoisted_2$R = { class: "container" };
|
|
65199
65526
|
const _hoisted_3$D = { class: "container" };
|
|
65200
65527
|
const _hoisted_4$r = { class: "form-custom-label" };
|
|
65201
|
-
const _hoisted_5$
|
|
65528
|
+
const _hoisted_5$j = { class: "content" };
|
|
65202
65529
|
const _sfc_main$1C = /* @__PURE__ */ defineComponent({
|
|
65203
65530
|
__name: "DynamicTablePanel",
|
|
65204
65531
|
props: {
|
|
@@ -65316,7 +65643,7 @@ const _sfc_main$1C = /* @__PURE__ */ defineComponent({
|
|
|
65316
65643
|
])
|
|
65317
65644
|
]),
|
|
65318
65645
|
default: withCtx(() => [
|
|
65319
|
-
createElementVNode("div", _hoisted_5$
|
|
65646
|
+
createElementVNode("div", _hoisted_5$j, [
|
|
65320
65647
|
createVNode(unref(GctSwitch), {
|
|
65321
65648
|
modelValue: unref(regionProps).quickFill,
|
|
65322
65649
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => unref(regionProps).quickFill = $event),
|
|
@@ -66974,7 +67301,7 @@ const _hoisted_1$1a = { class: "data-source-model-link-wrapper" };
|
|
|
66974
67301
|
const _hoisted_2$I = { class: "model-link-container" };
|
|
66975
67302
|
const _hoisted_3$w = { class: "model-link-content" };
|
|
66976
67303
|
const _hoisted_4$l = { class: "model-link-item" };
|
|
66977
|
-
const _hoisted_5$
|
|
67304
|
+
const _hoisted_5$i = { class: "model-link-item" };
|
|
66978
67305
|
const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
66979
67306
|
__name: "data-source-model-link",
|
|
66980
67307
|
props: {
|
|
@@ -67226,7 +67553,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
67226
67553
|
return openBlock(), createElementBlock(Fragment, {
|
|
67227
67554
|
key: item.id
|
|
67228
67555
|
}, [
|
|
67229
|
-
createElementVNode("div", _hoisted_5$
|
|
67556
|
+
createElementVNode("div", _hoisted_5$i, [
|
|
67230
67557
|
createVNode(_sfc_main$1o, {
|
|
67231
67558
|
class: "custom-select",
|
|
67232
67559
|
placeholder: "请选择字段",
|
|
@@ -67404,7 +67731,7 @@ const _hoisted_1$18 = { class: "data-source-field-map-wrapper" };
|
|
|
67404
67731
|
const _hoisted_2$G = { class: "field-map-container" };
|
|
67405
67732
|
const _hoisted_3$u = { class: "field-map-content" };
|
|
67406
67733
|
const _hoisted_4$k = { class: "field-map-item" };
|
|
67407
|
-
const _hoisted_5$
|
|
67734
|
+
const _hoisted_5$h = { class: "blank last" };
|
|
67408
67735
|
const _hoisted_6$d = ["onClick"];
|
|
67409
67736
|
const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
67410
67737
|
__name: "data-source-field-map",
|
|
@@ -67609,7 +67936,7 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
67609
67936
|
field.fieldLink = opt.fieldLink;
|
|
67610
67937
|
}
|
|
67611
67938
|
}, null, 8, ["joinModelType", "joinFormRefId", "joinModelKey", "filterFieldType", "selectCascaderValue", "onUpdate:selectCascaderValue", "selectFieldKey", "onUpdate:selectFieldKey", "onOnSelect"])),
|
|
67612
|
-
createElementVNode("span", _hoisted_5$
|
|
67939
|
+
createElementVNode("span", _hoisted_5$h, [
|
|
67613
67940
|
createElementVNode("i", {
|
|
67614
67941
|
class: "iconfont icon-shanchu",
|
|
67615
67942
|
onClick: ($event) => removeFieldItem(field)
|
|
@@ -67633,7 +67960,7 @@ const _hoisted_1$17 = { class: "param-link-container" };
|
|
|
67633
67960
|
const _hoisted_2$F = { class: "param-link-content" };
|
|
67634
67961
|
const _hoisted_3$t = { class: "param-link-item" };
|
|
67635
67962
|
const _hoisted_4$j = { class: "blank last" };
|
|
67636
|
-
const _hoisted_5$
|
|
67963
|
+
const _hoisted_5$g = ["onClick"];
|
|
67637
67964
|
const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
67638
67965
|
__name: "param-field-link",
|
|
67639
67966
|
props: {
|
|
@@ -67778,7 +68105,7 @@ const _sfc_main$1h = /* @__PURE__ */ defineComponent({
|
|
|
67778
68105
|
createElementVNode("i", {
|
|
67779
68106
|
class: "iconfont icon-shanchu",
|
|
67780
68107
|
onClick: ($event) => removeFieldItem(fieldItem)
|
|
67781
|
-
}, null, 8, _hoisted_5$
|
|
68108
|
+
}, null, 8, _hoisted_5$g)
|
|
67782
68109
|
])
|
|
67783
68110
|
]);
|
|
67784
68111
|
}), 128))
|
|
@@ -68137,7 +68464,7 @@ const _hoisted_1$13 = { class: "tmpl-card" };
|
|
|
68137
68464
|
const _hoisted_2$C = { class: "tmpl-card__header" };
|
|
68138
68465
|
const _hoisted_3$q = { class: "header_title" };
|
|
68139
68466
|
const _hoisted_4$i = { class: "tmpl-card__icon" };
|
|
68140
|
-
const _hoisted_5$
|
|
68467
|
+
const _hoisted_5$f = { class: "tmpl-card__title" };
|
|
68141
68468
|
const _hoisted_6$c = { class: "tmpl-card__body" };
|
|
68142
68469
|
const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
68143
68470
|
__name: "tmpl-card",
|
|
@@ -68165,7 +68492,7 @@ const _sfc_main$1d = /* @__PURE__ */ defineComponent({
|
|
|
68165
68492
|
class: normalizeClass([`${type2Icon[props.type]}`, "text-14px!"])
|
|
68166
68493
|
}, null, 2)
|
|
68167
68494
|
]),
|
|
68168
|
-
createElementVNode("div", _hoisted_5$
|
|
68495
|
+
createElementVNode("div", _hoisted_5$f, toDisplayString(type2Title[props.type]), 1)
|
|
68169
68496
|
]),
|
|
68170
68497
|
createVNode(RemoveIcon, {
|
|
68171
68498
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("remove"))
|
|
@@ -68230,7 +68557,7 @@ const _hoisted_1$11 = { class: "params-item-card" };
|
|
|
68230
68557
|
const _hoisted_2$A = { class: "card-header" };
|
|
68231
68558
|
const _hoisted_3$o = ["title"];
|
|
68232
68559
|
const _hoisted_4$h = { class: "header-name" };
|
|
68233
|
-
const _hoisted_5$
|
|
68560
|
+
const _hoisted_5$e = ["title"];
|
|
68234
68561
|
const _hoisted_6$b = { class: "card-body" };
|
|
68235
68562
|
const _hoisted_7$9 = { class: "slot" };
|
|
68236
68563
|
const _hoisted_8$9 = {
|
|
@@ -68261,7 +68588,7 @@ const _sfc_main$1b = /* @__PURE__ */ defineComponent({
|
|
|
68261
68588
|
createElementVNode("span", {
|
|
68262
68589
|
class: "name-text",
|
|
68263
68590
|
title: __props.deviceParams.name
|
|
68264
|
-
}, toDisplayString(__props.deviceParams.name), 9, _hoisted_5$
|
|
68591
|
+
}, toDisplayString(__props.deviceParams.name), 9, _hoisted_5$e),
|
|
68265
68592
|
createVNode(unref(_sfc_main$31), null, {
|
|
68266
68593
|
popper: withCtx(() => [
|
|
68267
68594
|
createVNode(DeviceFieldStatus, { deviceParams: __props.deviceParams }, null, 8, ["deviceParams"])
|
|
@@ -68638,7 +68965,7 @@ const _hoisted_1$Y = { class: "editor-module" };
|
|
|
68638
68965
|
const _hoisted_2$x = { class: "row-end" };
|
|
68639
68966
|
const _hoisted_3$m = { class: "row-end" };
|
|
68640
68967
|
const _hoisted_4$g = { class: "row-end" };
|
|
68641
|
-
const _hoisted_5$
|
|
68968
|
+
const _hoisted_5$d = { class: "row-end" };
|
|
68642
68969
|
const _hoisted_6$a = { class: "row-end" };
|
|
68643
68970
|
const _hoisted_7$8 = { class: "editor-module ai-tmpl-editor__border-top" };
|
|
68644
68971
|
const _hoisted_8$8 = { class: "preview-prompt" };
|
|
@@ -68776,7 +69103,7 @@ const _sfc_main$15 = /* @__PURE__ */ defineComponent({
|
|
|
68776
69103
|
}, null, 8, ["content", "title"])
|
|
68777
69104
|
]),
|
|
68778
69105
|
default: withCtx(() => [
|
|
68779
|
-
createElementVNode("div", _hoisted_5$
|
|
69106
|
+
createElementVNode("div", _hoisted_5$d, [
|
|
68780
69107
|
createVNode(unref(GctSwitch), {
|
|
68781
69108
|
size: "small",
|
|
68782
69109
|
modelValue: formState.value.enableBinarize,
|
|
@@ -68945,11 +69272,11 @@ const _hoisted_1$W = { class: "field-dependency-form" };
|
|
|
68945
69272
|
const _hoisted_2$v = { class: "form-row current-component" };
|
|
68946
69273
|
const _hoisted_3$l = { class: "control" };
|
|
68947
69274
|
const _hoisted_4$f = { class: "field-icon" };
|
|
68948
|
-
const _hoisted_5$
|
|
69275
|
+
const _hoisted_5$c = { class: "form-row" };
|
|
68949
69276
|
const _hoisted_6$9 = { class: "control" };
|
|
68950
69277
|
const _hoisted_7$7 = { class: "form-row" };
|
|
68951
69278
|
const _hoisted_8$7 = { class: "control" };
|
|
68952
|
-
const _hoisted_9$
|
|
69279
|
+
const _hoisted_9$6 = { class: "form-row current-component" };
|
|
68953
69280
|
const _hoisted_10$4 = { class: "control" };
|
|
68954
69281
|
const _hoisted_11$2 = {
|
|
68955
69282
|
key: 0,
|
|
@@ -69073,7 +69400,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
69073
69400
|
})
|
|
69074
69401
|
])
|
|
69075
69402
|
]),
|
|
69076
|
-
createElementVNode("div", _hoisted_5$
|
|
69403
|
+
createElementVNode("div", _hoisted_5$c, [
|
|
69077
69404
|
_cache[8] || (_cache[8] = createElementVNode("div", { class: "label" }, "组件行为", -1)),
|
|
69078
69405
|
createElementVNode("div", _hoisted_6$9, [
|
|
69079
69406
|
createVNode(unref(GctRadioGroup), {
|
|
@@ -69120,7 +69447,7 @@ const _sfc_main$12 = /* @__PURE__ */ defineComponent({
|
|
|
69120
69447
|
}, 8, ["modelValue"])
|
|
69121
69448
|
])
|
|
69122
69449
|
]),
|
|
69123
|
-
createElementVNode("div", _hoisted_9$
|
|
69450
|
+
createElementVNode("div", _hoisted_9$6, [
|
|
69124
69451
|
_cache[11] || (_cache[11] = createElementVNode("div", { class: "label required" }, "新值", -1)),
|
|
69125
69452
|
createElementVNode("div", _hoisted_10$4, [
|
|
69126
69453
|
createVNode(_sfc_main$13, {
|
|
@@ -69178,7 +69505,7 @@ const _hoisted_1$V = { class: "field-dependency-module" };
|
|
|
69178
69505
|
const _hoisted_2$u = { class: "field-dependency-list" };
|
|
69179
69506
|
const _hoisted_3$k = { class: "item-header" };
|
|
69180
69507
|
const _hoisted_4$e = { class: "title" };
|
|
69181
|
-
const _hoisted_5$
|
|
69508
|
+
const _hoisted_5$b = { class: "main" };
|
|
69182
69509
|
const _hoisted_6$8 = {
|
|
69183
69510
|
key: 0,
|
|
69184
69511
|
class: "label"
|
|
@@ -69321,7 +69648,7 @@ const _sfc_main$11 = /* @__PURE__ */ defineComponent({
|
|
|
69321
69648
|
}, [
|
|
69322
69649
|
createElementVNode("div", _hoisted_3$k, [
|
|
69323
69650
|
createElementVNode("div", _hoisted_4$e, [
|
|
69324
|
-
createElementVNode("span", _hoisted_5$
|
|
69651
|
+
createElementVNode("span", _hoisted_5$b, toDisplayString(unref(FieldDependencyTypeCh)[type4]), 1),
|
|
69325
69652
|
type4 === unref(FieldDependencyTypeConst).Assignment ? (openBlock(), createElementBlock("span", _hoisted_6$8, " 公式计算 ")) : createCommentVNode("", true)
|
|
69326
69653
|
]),
|
|
69327
69654
|
createElementVNode("div", _hoisted_7$6, [
|
|
@@ -70372,14 +70699,14 @@ const _hoisted_1$M = { class: "autofill-rules-modal" };
|
|
|
70372
70699
|
const _hoisted_2$p = { class: "container" };
|
|
70373
70700
|
const _hoisted_3$f = { class: "header" };
|
|
70374
70701
|
const _hoisted_4$c = { class: "header-action" };
|
|
70375
|
-
const _hoisted_5$
|
|
70702
|
+
const _hoisted_5$a = { class: "autofill-form" };
|
|
70376
70703
|
const _hoisted_6$7 = { class: "form-col" };
|
|
70377
70704
|
const _hoisted_7$5 = {
|
|
70378
70705
|
key: 0,
|
|
70379
70706
|
class: "error-text"
|
|
70380
70707
|
};
|
|
70381
70708
|
const _hoisted_8$5 = { class: "form-col" };
|
|
70382
|
-
const _hoisted_9$
|
|
70709
|
+
const _hoisted_9$5 = {
|
|
70383
70710
|
key: 0,
|
|
70384
70711
|
class: "error-text"
|
|
70385
70712
|
};
|
|
@@ -70550,7 +70877,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
70550
70877
|
})
|
|
70551
70878
|
])
|
|
70552
70879
|
]),
|
|
70553
|
-
createElementVNode("div", _hoisted_5$
|
|
70880
|
+
createElementVNode("div", _hoisted_5$a, [
|
|
70554
70881
|
(openBlock(true), createElementBlock(Fragment, null, renderList(formState.rules, (rule) => {
|
|
70555
70882
|
return openBlock(), createElementBlock("div", {
|
|
70556
70883
|
key: rule.id,
|
|
@@ -70577,7 +70904,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
70577
70904
|
validateRule(rule);
|
|
70578
70905
|
}
|
|
70579
70906
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "options", "onChange"]),
|
|
70580
|
-
getError(rule, "toField") ? (openBlock(), createElementBlock("div", _hoisted_9$
|
|
70907
|
+
getError(rule, "toField") ? (openBlock(), createElementBlock("div", _hoisted_9$5, toDisplayString(getError(rule, "toField")), 1)) : createCommentVNode("", true)
|
|
70581
70908
|
]),
|
|
70582
70909
|
createElementVNode("div", {
|
|
70583
70910
|
class: "action",
|
|
@@ -70806,7 +71133,7 @@ const _hoisted_2$o = {
|
|
|
70806
71133
|
};
|
|
70807
71134
|
const _hoisted_3$e = { class: "date-format-editor__col-left" };
|
|
70808
71135
|
const _hoisted_4$b = { class: "date-format-editor__col-right" };
|
|
70809
|
-
const _hoisted_5$
|
|
71136
|
+
const _hoisted_5$9 = {
|
|
70810
71137
|
key: 1,
|
|
70811
71138
|
class: "date-format-editor__row"
|
|
70812
71139
|
};
|
|
@@ -70869,7 +71196,7 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
70869
71196
|
options: unref(templateOptions)
|
|
70870
71197
|
}, null, 8, ["modelValue", "options"])
|
|
70871
71198
|
])
|
|
70872
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_5$
|
|
71199
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_5$9, [
|
|
70873
71200
|
createElementVNode("div", _hoisted_6$6, [
|
|
70874
71201
|
createVNode(unref(GctInput), {
|
|
70875
71202
|
modelValue: unref(customFormatValue),
|
|
@@ -71294,14 +71621,14 @@ const _hoisted_4$a = {
|
|
|
71294
71621
|
key: 0,
|
|
71295
71622
|
class: "error"
|
|
71296
71623
|
};
|
|
71297
|
-
const _hoisted_5$
|
|
71624
|
+
const _hoisted_5$8 = { class: "form-row" };
|
|
71298
71625
|
const _hoisted_6$5 = { class: "control" };
|
|
71299
71626
|
const _hoisted_7$4 = {
|
|
71300
71627
|
key: 0,
|
|
71301
71628
|
class: "error"
|
|
71302
71629
|
};
|
|
71303
71630
|
const _hoisted_8$4 = { class: "form-row" };
|
|
71304
|
-
const _hoisted_9$
|
|
71631
|
+
const _hoisted_9$4 = { class: "control" };
|
|
71305
71632
|
const _hoisted_10$2 = { class: "form-row" };
|
|
71306
71633
|
const _hoisted_11$1 = { class: "control" };
|
|
71307
71634
|
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
@@ -71408,7 +71735,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
71408
71735
|
errors.label ? (openBlock(), createElementBlock("div", _hoisted_4$a, toDisplayString(errors.label), 1)) : createCommentVNode("", true)
|
|
71409
71736
|
])
|
|
71410
71737
|
]),
|
|
71411
|
-
createElementVNode("div", _hoisted_5$
|
|
71738
|
+
createElementVNode("div", _hoisted_5$8, [
|
|
71412
71739
|
_cache[7] || (_cache[7] = createElementVNode("div", { class: "label" }, "实际值", -1)),
|
|
71413
71740
|
createElementVNode("div", _hoisted_6$5, [
|
|
71414
71741
|
createVNode(unref(GctInput), {
|
|
@@ -71422,7 +71749,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
71422
71749
|
]),
|
|
71423
71750
|
createElementVNode("div", _hoisted_8$4, [
|
|
71424
71751
|
_cache[8] || (_cache[8] = createElementVNode("div", { class: "label" }, "默认选中", -1)),
|
|
71425
|
-
createElementVNode("div", _hoisted_9$
|
|
71752
|
+
createElementVNode("div", _hoisted_9$4, [
|
|
71426
71753
|
createVNode(unref(GctSwitch), {
|
|
71427
71754
|
modelValue: formState.defaultSelected,
|
|
71428
71755
|
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => formState.defaultSelected = $event)
|
|
@@ -72994,7 +73321,7 @@ const _hoisted_3$a = {
|
|
|
72994
73321
|
class: "single-drop-item"
|
|
72995
73322
|
};
|
|
72996
73323
|
const _hoisted_4$8 = { class: "single-drop-item-content" };
|
|
72997
|
-
const _hoisted_5$
|
|
73324
|
+
const _hoisted_5$7 = { class: "single-drop-item-label" };
|
|
72998
73325
|
const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
72999
73326
|
__name: "single-drop",
|
|
73000
73327
|
props: {
|
|
@@ -73018,7 +73345,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
73018
73345
|
color: "#026ac8",
|
|
73019
73346
|
size: "16"
|
|
73020
73347
|
}, null, 8, ["icon", "version"]),
|
|
73021
|
-
createElementVNode("span", _hoisted_5$
|
|
73348
|
+
createElementVNode("span", _hoisted_5$7, toDisplayString(__props.data.fieldIdentity.label), 1)
|
|
73022
73349
|
]),
|
|
73023
73350
|
createVNode(unref(GctIcon), {
|
|
73024
73351
|
class: "single-drop-item-icon-remove",
|
|
@@ -73529,7 +73856,7 @@ const _hoisted_1$i = { class: "panel-widget-line-config" };
|
|
|
73529
73856
|
const _hoisted_2$b = { class: "line-direction-item" };
|
|
73530
73857
|
const _hoisted_3$9 = { class: "line-direction-item" };
|
|
73531
73858
|
const _hoisted_4$7 = { class: "content" };
|
|
73532
|
-
const _hoisted_5$
|
|
73859
|
+
const _hoisted_5$6 = { class: "content" };
|
|
73533
73860
|
const _hoisted_6$4 = { class: "value" };
|
|
73534
73861
|
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
73535
73862
|
__name: "widget-line-config",
|
|
@@ -73652,7 +73979,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
73652
73979
|
}, null, 8, ["model-value"])
|
|
73653
73980
|
])
|
|
73654
73981
|
]),
|
|
73655
|
-
createElementVNode("div", _hoisted_5$
|
|
73982
|
+
createElementVNode("div", _hoisted_5$6, [
|
|
73656
73983
|
_cache[10] || (_cache[10] = createElementVNode("div", { class: "label" }, "线条外观", -1)),
|
|
73657
73984
|
createElementVNode("div", _hoisted_6$4, [
|
|
73658
73985
|
createVNode(unref(GctSelect), {
|
|
@@ -73975,7 +74302,7 @@ const _hoisted_1$e = { class: "options-dropdown" };
|
|
|
73975
74302
|
const _hoisted_2$9 = { class: "options-search" };
|
|
73976
74303
|
const _hoisted_3$7 = { class: "options-dropdown-container" };
|
|
73977
74304
|
const _hoisted_4$5 = ["onClick"];
|
|
73978
|
-
const _hoisted_5$
|
|
74305
|
+
const _hoisted_5$5 = ["innerHTML", "title"];
|
|
73979
74306
|
const _hoisted_6$3 = { class: "option-right" };
|
|
73980
74307
|
const _hoisted_7$3 = {
|
|
73981
74308
|
key: 0,
|
|
@@ -73985,6 +74312,10 @@ const _hoisted_8$3 = {
|
|
|
73985
74312
|
key: 0,
|
|
73986
74313
|
class: "options-footer"
|
|
73987
74314
|
};
|
|
74315
|
+
const _hoisted_9$3 = {
|
|
74316
|
+
key: 1,
|
|
74317
|
+
class: "options-footer"
|
|
74318
|
+
};
|
|
73988
74319
|
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
73989
74320
|
__name: "option-dropdown",
|
|
73990
74321
|
props: {
|
|
@@ -74075,6 +74406,9 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
74075
74406
|
function handleOk() {
|
|
74076
74407
|
emitChange(innerValue.value);
|
|
74077
74408
|
}
|
|
74409
|
+
function handleClear() {
|
|
74410
|
+
emitChange(null);
|
|
74411
|
+
}
|
|
74078
74412
|
function emitChange(value) {
|
|
74079
74413
|
const data = setValue(value, runtimeValuePath.value, {
|
|
74080
74414
|
multiple: props.isMultiple,
|
|
@@ -74124,7 +74458,7 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
74124
74458
|
class: "option-label",
|
|
74125
74459
|
innerHTML: item.highlightName || item.label,
|
|
74126
74460
|
title: item.label
|
|
74127
|
-
}, null, 8, _hoisted_5$
|
|
74461
|
+
}, null, 8, _hoisted_5$5)
|
|
74128
74462
|
]),
|
|
74129
74463
|
_: 2
|
|
74130
74464
|
}, 1032, ["disabled"]),
|
|
@@ -74153,12 +74487,17 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
74153
74487
|
class: "btn-item",
|
|
74154
74488
|
onClick: withModifiers(handleOk, ["stop"])
|
|
74155
74489
|
}, "确认")
|
|
74490
|
+
])) : innerValue.value ? (openBlock(), createElementBlock("div", _hoisted_9$3, [
|
|
74491
|
+
createElementVNode("div", {
|
|
74492
|
+
class: "btn-center",
|
|
74493
|
+
onClick: withModifiers(handleClear, ["stop"])
|
|
74494
|
+
}, "清除")
|
|
74156
74495
|
])) : createCommentVNode("", true)
|
|
74157
74496
|
]);
|
|
74158
74497
|
};
|
|
74159
74498
|
}
|
|
74160
74499
|
});
|
|
74161
|
-
const optionDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-
|
|
74500
|
+
const optionDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-acc41a8a"]]);
|
|
74162
74501
|
const optionDropdown$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74163
74502
|
__proto__: null,
|
|
74164
74503
|
default: optionDropdown
|
|
@@ -74260,6 +74599,10 @@ const _hoisted_4$4 = {
|
|
|
74260
74599
|
key: 0,
|
|
74261
74600
|
class: "options-footer"
|
|
74262
74601
|
};
|
|
74602
|
+
const _hoisted_5$4 = {
|
|
74603
|
+
key: 1,
|
|
74604
|
+
class: "options-footer"
|
|
74605
|
+
};
|
|
74263
74606
|
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
74264
74607
|
__name: "tree-dropdown",
|
|
74265
74608
|
props: {
|
|
@@ -74324,6 +74667,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
74324
74667
|
function handleOk() {
|
|
74325
74668
|
emitChange(innerValue.value);
|
|
74326
74669
|
}
|
|
74670
|
+
function handleClear() {
|
|
74671
|
+
emitChange(null);
|
|
74672
|
+
}
|
|
74327
74673
|
function emitChange(value) {
|
|
74328
74674
|
const data = setValue(value, runtimeValuePath.value, {
|
|
74329
74675
|
multiple: props.isMultiple,
|
|
@@ -74362,12 +74708,17 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
74362
74708
|
class: "btn-item",
|
|
74363
74709
|
onClick: withModifiers(handleOk, ["stop"])
|
|
74364
74710
|
}, "确认")
|
|
74711
|
+
])) : innerValue.value ? (openBlock(), createElementBlock("div", _hoisted_5$4, [
|
|
74712
|
+
createElementVNode("div", {
|
|
74713
|
+
class: "btn-center",
|
|
74714
|
+
onClick: withModifiers(handleClear, ["stop"])
|
|
74715
|
+
}, "清除")
|
|
74365
74716
|
])) : createCommentVNode("", true)
|
|
74366
74717
|
]);
|
|
74367
74718
|
};
|
|
74368
74719
|
}
|
|
74369
74720
|
});
|
|
74370
|
-
const treeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-
|
|
74721
|
+
const treeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-2eb67208"]]);
|
|
74371
74722
|
const treeDropdown$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74372
74723
|
__proto__: null,
|
|
74373
74724
|
default: treeDropdown
|
|
@@ -74387,7 +74738,7 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
74387
74738
|
const isDateTime = computed(() => widgetMeta.value.type === "fw:date-time");
|
|
74388
74739
|
const pickerFormat = computed(() => isDateTime.value ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD");
|
|
74389
74740
|
function onPanelChange(v) {
|
|
74390
|
-
const data = setValue(dayjs(v).format(pickerFormat.value), runtimeValuePath.value);
|
|
74741
|
+
const data = setValue(v ? dayjs(v).format(pickerFormat.value) : v, runtimeValuePath.value);
|
|
74391
74742
|
emit("change", data);
|
|
74392
74743
|
}
|
|
74393
74744
|
return (_ctx, _cache) => {
|
|
@@ -74396,13 +74747,14 @@ const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
|
74396
74747
|
modelValue: __props.modelValue,
|
|
74397
74748
|
onChange: onPanelChange,
|
|
74398
74749
|
mode: isDateTime.value ? "datetime" : "date",
|
|
74399
|
-
timeFormat: unref(widgetProps).timeFormat
|
|
74750
|
+
timeFormat: unref(widgetProps).timeFormat,
|
|
74751
|
+
"show-clear-btn": ""
|
|
74400
74752
|
}, null, 8, ["modelValue", "mode", "timeFormat"])
|
|
74401
74753
|
]);
|
|
74402
74754
|
};
|
|
74403
74755
|
}
|
|
74404
74756
|
});
|
|
74405
|
-
const datetimeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-
|
|
74757
|
+
const datetimeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__scopeId", "data-v-aab79189"]]);
|
|
74406
74758
|
const datetimeDropdown$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74407
74759
|
__proto__: null,
|
|
74408
74760
|
default: datetimeDropdown
|
|
@@ -74427,13 +74779,14 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
|
74427
74779
|
return openBlock(), createElementBlock("div", _hoisted_1$a, [
|
|
74428
74780
|
createVNode(unref(GctTimer), {
|
|
74429
74781
|
"model-value": __props.modelValue,
|
|
74430
|
-
onChange: onPanelChange
|
|
74782
|
+
onChange: onPanelChange,
|
|
74783
|
+
"show-clear-btn": ""
|
|
74431
74784
|
}, null, 8, ["model-value"])
|
|
74432
74785
|
]);
|
|
74433
74786
|
};
|
|
74434
74787
|
}
|
|
74435
74788
|
});
|
|
74436
|
-
const timeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-
|
|
74789
|
+
const timeDropdown = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-0875dd7d"]]);
|
|
74437
74790
|
const timeDropdown$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74438
74791
|
__proto__: null,
|
|
74439
74792
|
default: timeDropdown
|
|
@@ -75385,7 +75738,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
75385
75738
|
});
|
|
75386
75739
|
Object.assign(data, clearData);
|
|
75387
75740
|
}
|
|
75388
|
-
emit("change", data, row
|
|
75741
|
+
emit("change", data, row?._item);
|
|
75389
75742
|
};
|
|
75390
75743
|
__expose({
|
|
75391
75744
|
getRef: () => xTable.value,
|
|
@@ -75414,17 +75767,28 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
75414
75767
|
type: "primary",
|
|
75415
75768
|
onClick: unref(search)
|
|
75416
75769
|
}, {
|
|
75417
|
-
default: withCtx(() => [..._cache[
|
|
75770
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
75418
75771
|
createTextVNode("搜索", -1)
|
|
75419
75772
|
])]),
|
|
75420
75773
|
_: 1
|
|
75421
75774
|
}, 8, ["onClick"]),
|
|
75422
75775
|
createVNode(unref(GctButton), { onClick: unref(reset) }, {
|
|
75423
|
-
default: withCtx(() => [..._cache[
|
|
75776
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
75424
75777
|
createTextVNode("重置", -1)
|
|
75425
75778
|
])]),
|
|
75426
75779
|
_: 1
|
|
75427
|
-
}, 8, ["onClick"])
|
|
75780
|
+
}, 8, ["onClick"]),
|
|
75781
|
+
__props.modelValue ? (openBlock(), createBlock(unref(GctButton), {
|
|
75782
|
+
key: 0,
|
|
75783
|
+
type: "danger",
|
|
75784
|
+
plain: "",
|
|
75785
|
+
onClick: _cache[1] || (_cache[1] = () => onChangeSelect())
|
|
75786
|
+
}, {
|
|
75787
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
75788
|
+
createTextVNode("清除", -1)
|
|
75789
|
+
])]),
|
|
75790
|
+
_: 1
|
|
75791
|
+
})) : createCommentVNode("", true)
|
|
75428
75792
|
])) : createCommentVNode("", true),
|
|
75429
75793
|
unref(message) ? (openBlock(), createElementBlock("div", _hoisted_3$3, [
|
|
75430
75794
|
createVNode(unref(GctIcon), {
|
|
@@ -75449,8 +75813,8 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
|
75449
75813
|
pagination: unref(pagination),
|
|
75450
75814
|
hasNextPage: unref(hasNextPage),
|
|
75451
75815
|
hasPrevPage: unref(hasPrevPage),
|
|
75452
|
-
onOnNext: _cache[
|
|
75453
|
-
onOnPrev: _cache[
|
|
75816
|
+
onOnNext: _cache[2] || (_cache[2] = ($event) => unref(handlePagination)("next")),
|
|
75817
|
+
onOnPrev: _cache[3] || (_cache[3] = ($event) => unref(handlePagination)("prev"))
|
|
75454
75818
|
}, null, 8, ["pagination", "hasNextPage", "hasPrevPage"])) : createCommentVNode("", true)
|
|
75455
75819
|
]);
|
|
75456
75820
|
};
|
|
@@ -75519,21 +75883,23 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
75519
75883
|
});
|
|
75520
75884
|
const onChangeSelect = (row) => {
|
|
75521
75885
|
const { __VALUE__, __DEFAULT__, __HAS_ONE_CHILD__, __SHOW_LABEL__, __VERSION_NAME__ } = row || {};
|
|
75522
|
-
const value = __VALUE__ || row
|
|
75886
|
+
const value = __VALUE__ || row?.value || row?._item.id_;
|
|
75523
75887
|
const shouldHideName = props.hideSingleVersion && __HAS_ONE_CHILD__;
|
|
75524
75888
|
let showValue;
|
|
75525
75889
|
let showLabel;
|
|
75526
|
-
if (
|
|
75527
|
-
if (
|
|
75528
|
-
|
|
75529
|
-
|
|
75890
|
+
if (value) {
|
|
75891
|
+
if (__DEFAULT__) {
|
|
75892
|
+
if (props.parentToDefault) {
|
|
75893
|
+
showLabel = shouldHideName ? __SHOW_LABEL__ : `${__SHOW_LABEL__}:${__DEFAULT__.__VERSION_NAME__}`;
|
|
75894
|
+
showValue = `${value}:${__DEFAULT__._item.id_}`;
|
|
75895
|
+
} else {
|
|
75896
|
+
showLabel = __SHOW_LABEL__;
|
|
75897
|
+
showValue = value;
|
|
75898
|
+
}
|
|
75530
75899
|
} else {
|
|
75531
|
-
showLabel = __SHOW_LABEL__
|
|
75900
|
+
showLabel = shouldHideName ? __SHOW_LABEL__ : `${__SHOW_LABEL__}:${__VERSION_NAME__}`;
|
|
75532
75901
|
showValue = value;
|
|
75533
75902
|
}
|
|
75534
|
-
} else {
|
|
75535
|
-
showLabel = shouldHideName ? __SHOW_LABEL__ : `${__SHOW_LABEL__}:${__VERSION_NAME__}`;
|
|
75536
|
-
showValue = value;
|
|
75537
75903
|
}
|
|
75538
75904
|
const data = setValue(showValue, runtimeValuePath.value, {
|
|
75539
75905
|
needLabel: true,
|
|
@@ -75542,7 +75908,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
75542
75908
|
},
|
|
75543
75909
|
labelKey: "showLabel"
|
|
75544
75910
|
});
|
|
75545
|
-
emit("change", data, __DEFAULT__ ? __DEFAULT__._item : row
|
|
75911
|
+
emit("change", data, __DEFAULT__ ? __DEFAULT__._item : row?._item);
|
|
75546
75912
|
};
|
|
75547
75913
|
__expose({
|
|
75548
75914
|
getRef: () => xTable.value,
|
|
@@ -75571,17 +75937,28 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
75571
75937
|
type: "primary",
|
|
75572
75938
|
onClick: unref(search)
|
|
75573
75939
|
}, {
|
|
75574
|
-
default: withCtx(() => [..._cache[
|
|
75940
|
+
default: withCtx(() => [..._cache[4] || (_cache[4] = [
|
|
75575
75941
|
createTextVNode("搜索", -1)
|
|
75576
75942
|
])]),
|
|
75577
75943
|
_: 1
|
|
75578
75944
|
}, 8, ["onClick"]),
|
|
75579
75945
|
createVNode(unref(GctButton), { onClick: unref(reset) }, {
|
|
75580
|
-
default: withCtx(() => [..._cache[
|
|
75946
|
+
default: withCtx(() => [..._cache[5] || (_cache[5] = [
|
|
75581
75947
|
createTextVNode("重置", -1)
|
|
75582
75948
|
])]),
|
|
75583
75949
|
_: 1
|
|
75584
|
-
}, 8, ["onClick"])
|
|
75950
|
+
}, 8, ["onClick"]),
|
|
75951
|
+
__props.modelValue ? (openBlock(), createBlock(unref(GctButton), {
|
|
75952
|
+
key: 0,
|
|
75953
|
+
type: "danger",
|
|
75954
|
+
plain: "",
|
|
75955
|
+
onClick: _cache[1] || (_cache[1] = () => onChangeSelect())
|
|
75956
|
+
}, {
|
|
75957
|
+
default: withCtx(() => [..._cache[6] || (_cache[6] = [
|
|
75958
|
+
createTextVNode("清除", -1)
|
|
75959
|
+
])]),
|
|
75960
|
+
_: 1
|
|
75961
|
+
})) : createCommentVNode("", true)
|
|
75585
75962
|
]),
|
|
75586
75963
|
createVNode(BaseVxeTable, {
|
|
75587
75964
|
ref_key: "xTable",
|
|
@@ -75604,8 +75981,8 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
|
75604
75981
|
pagination: unref(pagination),
|
|
75605
75982
|
hasNextPage: unref(hasNextPage),
|
|
75606
75983
|
hasPrevPage: unref(hasPrevPage),
|
|
75607
|
-
onOnNext: _cache[
|
|
75608
|
-
onOnPrev: _cache[
|
|
75984
|
+
onOnNext: _cache[2] || (_cache[2] = ($event) => unref(handlePagination)("next")),
|
|
75985
|
+
onOnPrev: _cache[3] || (_cache[3] = ($event) => unref(handlePagination)("prev"))
|
|
75609
75986
|
}, null, 8, ["pagination", "hasNextPage", "hasPrevPage"])) : createCommentVNode("", true)
|
|
75610
75987
|
]);
|
|
75611
75988
|
};
|
|
@@ -76383,6 +76760,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76383
76760
|
modelValue: formState.username,
|
|
76384
76761
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => formState.username = $event),
|
|
76385
76762
|
placeholder: "请输入",
|
|
76763
|
+
allowClear: "",
|
|
76386
76764
|
onBlur: _cache[1] || (_cache[1] = ($event) => validateField("username"))
|
|
76387
76765
|
}, null, 8, ["modelValue"]),
|
|
76388
76766
|
errors.username ? (openBlock(), createElementBlock("div", _hoisted_4, toDisplayString(errors.username), 1)) : createCommentVNode("", true)
|
|
@@ -76395,6 +76773,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76395
76773
|
modelValue: formState.password,
|
|
76396
76774
|
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => formState.password = $event),
|
|
76397
76775
|
placeholder: "请输入",
|
|
76776
|
+
type: "password",
|
|
76777
|
+
allowClear: "",
|
|
76398
76778
|
onBlur: _cache[3] || (_cache[3] = ($event) => validateField("password"))
|
|
76399
76779
|
}, null, 8, ["modelValue"]),
|
|
76400
76780
|
errors.password ? (openBlock(), createElementBlock("div", _hoisted_8, toDisplayString(errors.password), 1)) : createCommentVNode("", true)
|
|
@@ -76417,7 +76797,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
76417
76797
|
};
|
|
76418
76798
|
}
|
|
76419
76799
|
});
|
|
76420
|
-
const signatureDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
76800
|
+
const signatureDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f0714089"]]);
|
|
76421
76801
|
const signatureDialog$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
76422
76802
|
__proto__: null,
|
|
76423
76803
|
default: signatureDialog
|