cloud-web-corejs 1.0.54-dev.735 → 1.0.54-dev.737
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/package.json +1 -1
- package/src/components/excelExport/exportFieldDialog.vue +40 -18
- package/src/components/excelExport/index.js +17 -3
- package/src/components/excelExport/index.vue +2 -1
- package/src/components/excelExport/mixins.js +113 -32
- package/src/components/fileLibrary/mixins/indexMixins.js +10 -0
- package/src/components/table/config.js +74 -1
- package/src/components/table/index.js +7 -22
- package/src/components/table/tableFormMixin.js +285 -1
- package/src/components/table/util/index.js +38 -40
- package/src/components/table/vxeFilter/index.js +153 -2
- package/src/components/table/vxeFilter/mixin.js +305 -3
- package/src/components/wf/mixins/setCandidateDialog.js +2 -2
- package/src/components/wf/mixins/setCandidateDialog2.js +2 -2
- package/src/components/xform/docs/2026-07 table/344/270/216excelExport/344/277/256/345/244/215/345/217/212/345/257/274/345/207/272/344/274/230/345/214/226.md" +57 -0
- package/src/components/xform/docs/2026-07 /346/216/222/346/237/245/344/277/256/345/244/215/350/256/260/345/275/225.md" +73 -0
- package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +108 -1
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +288 -6
- package/src/components/xform/form-designer/form-widget/dialog/fileReferenceDialog.vue +0 -1
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +0 -1
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +0 -1
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +0 -1
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +3 -12
- package/src/components/xform/form-designer/form-widget/indexMixin.js +184 -2
- package/src/components/xform/form-designer/indexMixin.js +0 -1
- package/src/components/xform/form-designer/refMixinDesign.js +27 -1
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +357 -9
- package/src/components/xform/form-designer/setting-panel/property-editor/showViewButton-editor.vue +29 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +639 -15
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +290 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
- package/src/components/xform/form-render/container-item/containerItemMixin.js +282 -1115
- package/src/components/xform/form-render/container-item/data-table-mixin.js +29 -7
- package/src/components/xform/form-render/dynamicDialogRender.js +238 -3
- package/src/components/xform/form-render/dynamicDrawerRender.js +229 -0
- package/src/components/xform/form-render/indexMixin.js +21 -431
- package/src/components/xform/form-render/refMixin.js +32 -1
- package/src/components/xform/mixins/defaultHandle.js +2 -2
- package/src/components/xform/utils/dynamicSchemaUtil.js +46 -0
- package/src/components/xform/utils/validators.js +186 -2
- package/src/utils/componentDialog.js +322 -0
- package/src/views/user/form/vform/render.vue +4 -21
- package/src/views/user/form/view/list.vue +13 -9
- package/src/components/xform/form-designer/form-widget/dialog/baseFormulaDialog copy.vue +0 -971
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +0 -408
- package/src/components/xform/utils/formHttp.js +0 -162
|
@@ -2,6 +2,7 @@ import emitter from "../../../components/xform/utils/emitter";
|
|
|
2
2
|
import i18n, { changeLocale } from "../../../components/xform/utils/i18n";
|
|
3
3
|
import Vue from "vue";
|
|
4
4
|
import dynamicDialogRender from "./dynamicDialogRender.js";
|
|
5
|
+
import dynamicDrawerRender from "./dynamicDrawerRender.js";
|
|
5
6
|
import VFormRender from "../../../components/xform/form-render/index.vue";
|
|
6
7
|
import {
|
|
7
8
|
generateId,
|
|
@@ -14,6 +15,7 @@ import {
|
|
|
14
15
|
buildDefaultFormJson,
|
|
15
16
|
traverseFieldWidgetsOfContainer,
|
|
16
17
|
getFieldWidgetByName,
|
|
18
|
+
getFieldWidgetById,
|
|
17
19
|
getDSByName,
|
|
18
20
|
overwriteObj,
|
|
19
21
|
runDataSourceRequest,
|
|
@@ -48,6 +50,9 @@ import formulaDialog from "@base/components/xform/form-designer/form-widget/dial
|
|
|
48
50
|
import baseFormulaDialog from "@base/components/xform/form-designer/form-widget/dialog/baseFormulaDialog.vue";
|
|
49
51
|
import QRCode from "qrcode";
|
|
50
52
|
import { openLuckysheetDialog } from "@base/components/luckysheet";
|
|
53
|
+
import {
|
|
54
|
+
openComponentDialog as mountComponentDialog,
|
|
55
|
+
} from "@base/utils/componentDialog";
|
|
51
56
|
|
|
52
57
|
let modules = {};
|
|
53
58
|
const baseRefUtil = {
|
|
@@ -2381,8 +2386,6 @@ modules = {
|
|
|
2381
2386
|
* query 额外 query 合并
|
|
2382
2387
|
*/
|
|
2383
2388
|
goChangeBill: function (sourceId, formCode, options) {
|
|
2384
|
-
let a = 1;
|
|
2385
|
-
debugger;
|
|
2386
2389
|
options = options || {};
|
|
2387
2390
|
let router = this.$router || (window.$vueRoot && window.$vueRoot.$router);
|
|
2388
2391
|
let store = this.$store || (window.$vueRoot && window.$vueRoot.$store);
|
|
@@ -2932,32 +2935,12 @@ modules = {
|
|
|
2932
2935
|
getGlobalDsv: function () {
|
|
2933
2936
|
return this.globalDsv;
|
|
2934
2937
|
},
|
|
2935
|
-
executeDataSource: function (e, t) {
|
|
2936
|
-
let
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
while (1)
|
|
2942
|
-
switch ((n.prev = n.next)) {
|
|
2943
|
-
case 0:
|
|
2944
|
-
return (
|
|
2945
|
-
(o = baseRefUtil.getDSByName(i.formJsonObj.formConfig, e)),
|
|
2946
|
-
(a = new Object({})),
|
|
2947
|
-
baseRefUtil.overwriteObj(a, i.globalDsv),
|
|
2948
|
-
baseRefUtil.overwriteObj(a, t),
|
|
2949
|
-
(n.next = 6),
|
|
2950
|
-
baseRefUtil.runDataSourceRequest(o, a, i, !1, i.$message)
|
|
2951
|
-
);
|
|
2952
|
-
case 6:
|
|
2953
|
-
return n.abrupt("return", n.sent);
|
|
2954
|
-
case 7:
|
|
2955
|
-
case "end":
|
|
2956
|
-
return n.stop();
|
|
2957
|
-
}
|
|
2958
|
-
}, n);
|
|
2959
|
-
})
|
|
2960
|
-
)();
|
|
2938
|
+
executeDataSource: async function (e, t) {
|
|
2939
|
+
let o = baseRefUtil.getDSByName(this.formJsonObj.formConfig, e);
|
|
2940
|
+
let a = {};
|
|
2941
|
+
baseRefUtil.overwriteObj(a, this.globalDsv);
|
|
2942
|
+
baseRefUtil.overwriteObj(a, t);
|
|
2943
|
+
return await baseRefUtil.runDataSourceRequest(o, a, this, !1, this.$message);
|
|
2961
2944
|
},
|
|
2962
2945
|
getParentFormRef: function () {
|
|
2963
2946
|
return this.parentForm;
|
|
@@ -3007,7 +2990,7 @@ modules = {
|
|
|
3007
2990
|
this.formConfig
|
|
3008
2991
|
),
|
|
3009
2992
|
},
|
|
3010
|
-
a =
|
|
2993
|
+
a = baseRefUtil.Vue.extend(dynamicDrawerRender),
|
|
3011
2994
|
l = new a({
|
|
3012
2995
|
propsData: {
|
|
3013
2996
|
options: i.options,
|
|
@@ -3017,6 +3000,7 @@ modules = {
|
|
|
3017
3000
|
globalDsv: this.globalDsv,
|
|
3018
3001
|
parentFormRef: this,
|
|
3019
3002
|
},
|
|
3003
|
+
components: { VFormRender },
|
|
3020
3004
|
});
|
|
3021
3005
|
document.body.appendChild(l.$mount().$el), l.show();
|
|
3022
3006
|
} else this.$message.error(this.i18nt("render.hint.refNotFound") + e);
|
|
@@ -3726,7 +3710,8 @@ modules = {
|
|
|
3726
3710
|
target.$baseReload(option);
|
|
3727
3711
|
},
|
|
3728
3712
|
saveForm(callback) {
|
|
3729
|
-
this.validateForm(() => {
|
|
3713
|
+
this.validateForm((valid) => {
|
|
3714
|
+
if (!valid) return;
|
|
3730
3715
|
this.getSubData().then((formData) => {
|
|
3731
3716
|
let reportTemplate = this.reportTemplate || {};
|
|
3732
3717
|
let formConfig = this.formConfig;
|
|
@@ -4350,9 +4335,7 @@ modules = {
|
|
|
4350
4335
|
openCopyEditTab(copyData) {
|
|
4351
4336
|
let formData = this.$baseLodash.cloneDeep(copyData || this.formDataModel);
|
|
4352
4337
|
if (formData) {
|
|
4353
|
-
console.log("copyData", copyData);
|
|
4354
4338
|
this.handleCopyData(formData);
|
|
4355
|
-
console.log("formData", formData);
|
|
4356
4339
|
}
|
|
4357
4340
|
|
|
4358
4341
|
this.$emit("openCopyEditTab", formData);
|
|
@@ -4468,405 +4451,6 @@ modules = {
|
|
|
4468
4451
|
}
|
|
4469
4452
|
},
|
|
4470
4453
|
|
|
4471
|
-
async exportPdf1() {
|
|
4472
|
-
// statusEl.style.display = 'block';
|
|
4473
|
-
// statusEl.textContent = '正在准备导出内容...';
|
|
4474
|
-
|
|
4475
|
-
try {
|
|
4476
|
-
// 获取要导出的元素
|
|
4477
|
-
const element = this.$parent.$el;
|
|
4478
|
-
// 计算内容总高度
|
|
4479
|
-
|
|
4480
|
-
// 克隆元素(不影响原始页面)
|
|
4481
|
-
// statusEl.textContent = '克隆内容...';
|
|
4482
|
-
|
|
4483
|
-
const constainter = this.$parent.$parent.$el;
|
|
4484
|
-
|
|
4485
|
-
const clonedElement = element.cloneNode(true);
|
|
4486
|
-
let wfTab = clonedElement.querySelector(".wf-tab");
|
|
4487
|
-
if (wfTab) wfTab.remove();
|
|
4488
|
-
|
|
4489
|
-
const scrollElements = clonedElement.querySelectorAll(
|
|
4490
|
-
".vxe-table--body-wrapper"
|
|
4491
|
-
);
|
|
4492
|
-
|
|
4493
|
-
// 临时禁用虚拟滚动
|
|
4494
|
-
/* for(let scrollElement of scrollElements){
|
|
4495
|
-
const originalScrollTop = scrollElement.scrollTop
|
|
4496
|
-
// scrollElement.style = 'overflow:visible;max-height:inherit !important'
|
|
4497
|
-
scrollElement.style = scrollElement.style+ 'overflow:visible;max-height:inherit !important;'
|
|
4498
|
-
// scrollElement.style["max-height"] = 'inherit !important'
|
|
4499
|
-
scrollElement.scrollTop = 0
|
|
4500
|
-
} */
|
|
4501
|
-
|
|
4502
|
-
clonedElement.style.width = element.offsetWidth + "px";
|
|
4503
|
-
|
|
4504
|
-
// 应用样式以展开内容
|
|
4505
|
-
clonedElement.style.height = "auto";
|
|
4506
|
-
clonedElement.style.overflow = "visible";
|
|
4507
|
-
clonedElement.style.position = "absolute";
|
|
4508
|
-
clonedElement.style.left = "-9999px";
|
|
4509
|
-
// document.body.appendChild(clonedElement);
|
|
4510
|
-
// document.body.appendChild(constainter);
|
|
4511
|
-
|
|
4512
|
-
/* let dom1 = clonedElement.querySelector(".detail-wrap")
|
|
4513
|
-
if(dom1){
|
|
4514
|
-
let dom2 = dom1.children[1];
|
|
4515
|
-
dom2.style.height = "auto;"
|
|
4516
|
-
dom2.querySelector(".d-cont").style.height = "auto;"
|
|
4517
|
-
|
|
4518
|
-
} */
|
|
4519
|
-
|
|
4520
|
-
constainter.appendChild(clonedElement);
|
|
4521
|
-
|
|
4522
|
-
html2Canvas(clonedElement, {
|
|
4523
|
-
scrollY: 0,
|
|
4524
|
-
useCORS: true,
|
|
4525
|
-
allowTaint: true,
|
|
4526
|
-
scale: 2, // 提高分辨率
|
|
4527
|
-
}).then((canvas) => {
|
|
4528
|
-
const pdf = new JsPDF("p", "mm", "a4");
|
|
4529
|
-
const imgData = canvas.toDataURL("image/png");
|
|
4530
|
-
const imgWidth = 210; // A4宽度
|
|
4531
|
-
const imgHeight = (canvas.height * imgWidth) / canvas.width;
|
|
4532
|
-
|
|
4533
|
-
// 分页处理
|
|
4534
|
-
let heightLeft = imgHeight;
|
|
4535
|
-
let position = 0;
|
|
4536
|
-
pdf.addImage(imgData, "PNG", 0, position, imgWidth, imgHeight);
|
|
4537
|
-
|
|
4538
|
-
while (heightLeft > 0) {
|
|
4539
|
-
position = heightLeft - imgHeight;
|
|
4540
|
-
pdf.addPage();
|
|
4541
|
-
pdf.addImage(imgData, "PNG", 0, position, imgWidth, imgHeight);
|
|
4542
|
-
heightLeft -= 297; // A4高度
|
|
4543
|
-
}
|
|
4544
|
-
|
|
4545
|
-
pdf.save(`导出.pdf`);
|
|
4546
|
-
|
|
4547
|
-
constainter.removeChild(clonedElement);
|
|
4548
|
-
});
|
|
4549
|
-
} catch (error) {
|
|
4550
|
-
console.error("导出失败:", error);
|
|
4551
|
-
// statusEl.textContent = '导出失败: ' + error.message;
|
|
4552
|
-
// statusEl.style.background = '#ffebee';
|
|
4553
|
-
// statusEl.style.color = '#c62828';
|
|
4554
|
-
}
|
|
4555
|
-
},
|
|
4556
|
-
async exportPdf2() {
|
|
4557
|
-
// statusEl.style.display = 'block';
|
|
4558
|
-
// statusEl.textContent = '正在准备导出内容...';
|
|
4559
|
-
|
|
4560
|
-
try {
|
|
4561
|
-
// 获取要导出的元素
|
|
4562
|
-
const element = this.$parent.$el;
|
|
4563
|
-
// 计算内容总高度
|
|
4564
|
-
|
|
4565
|
-
// 克隆元素(不影响原始页面)
|
|
4566
|
-
// statusEl.textContent = '克隆内容...';
|
|
4567
|
-
|
|
4568
|
-
const constainter = this.$parent.$parent.$el;
|
|
4569
|
-
|
|
4570
|
-
const clonedElement = element.cloneNode(true);
|
|
4571
|
-
let wfTab = clonedElement.querySelector(".wf-tab");
|
|
4572
|
-
if (wfTab) wfTab.remove();
|
|
4573
|
-
|
|
4574
|
-
const scrollElements = clonedElement.querySelectorAll(
|
|
4575
|
-
".vxe-table--body-wrapper"
|
|
4576
|
-
);
|
|
4577
|
-
|
|
4578
|
-
// 临时禁用虚拟滚动
|
|
4579
|
-
/* for(let scrollElement of scrollElements){
|
|
4580
|
-
const originalScrollTop = scrollElement.scrollTop
|
|
4581
|
-
// scrollElement.style = 'overflow:visible;max-height:inherit !important'
|
|
4582
|
-
// scrollElement.style = scrollElement.style+ 'overflow:visible;max-height:inherit !important;'
|
|
4583
|
-
scrollElement.style["overflow"] = 'visible'
|
|
4584
|
-
scrollElement.style["max-height"] = 'inherit !important'
|
|
4585
|
-
scrollElement.scrollTop = 0
|
|
4586
|
-
} */
|
|
4587
|
-
|
|
4588
|
-
let dom4 = clonedElement.querySelector(".designer-view");
|
|
4589
|
-
// dom4.style.height = "auto;"
|
|
4590
|
-
let dom1 = clonedElement.querySelector(".detail-wrap");
|
|
4591
|
-
if (dom1) {
|
|
4592
|
-
let dom2 = dom1.children[1];
|
|
4593
|
-
dom2.style.height = "auto;";
|
|
4594
|
-
dom2.querySelector(".d-cont").style.height = "auto;";
|
|
4595
|
-
}
|
|
4596
|
-
|
|
4597
|
-
clonedElement.style.width = element.offsetWidth + "px";
|
|
4598
|
-
|
|
4599
|
-
// 应用样式以展开内容
|
|
4600
|
-
clonedElement.style.height = "auto";
|
|
4601
|
-
clonedElement.style.overflow = "visible";
|
|
4602
|
-
clonedElement.style.position = "absolute";
|
|
4603
|
-
// clonedElement.style.left = '-9999px';
|
|
4604
|
-
clonedElement.style.left = "100px";
|
|
4605
|
-
// document.body.appendChild(clonedElement);
|
|
4606
|
-
// document.body.appendChild(constainter);
|
|
4607
|
-
|
|
4608
|
-
constainter.appendChild(clonedElement);
|
|
4609
|
-
|
|
4610
|
-
const contentHeight = clonedElement.scrollHeight;
|
|
4611
|
-
const contentWidth = clonedElement.offsetWidth;
|
|
4612
|
-
|
|
4613
|
-
// 设置PDF参数
|
|
4614
|
-
const pdf = new JsPDF("p", "mm", "a4");
|
|
4615
|
-
const pageWidth = pdf.internal.pageSize.getWidth();
|
|
4616
|
-
const pageHeight = pdf.internal.pageSize.getHeight();
|
|
4617
|
-
const padding = 10;
|
|
4618
|
-
|
|
4619
|
-
// 计算需要多少页
|
|
4620
|
-
const scale = pageWidth / contentWidth;
|
|
4621
|
-
const scaledHeight = contentHeight * scale;
|
|
4622
|
-
const pages = Math.ceil(scaledHeight / pageHeight);
|
|
4623
|
-
|
|
4624
|
-
// 分页捕获并添加到PDF
|
|
4625
|
-
// statusEl.textContent = '正在生成PDF (0/' + pages + ')';
|
|
4626
|
-
for (let i = 0; i < pages; i++) {
|
|
4627
|
-
// 计算当前页的裁剪位置
|
|
4628
|
-
const position = (i * pageHeight) / scale;
|
|
4629
|
-
|
|
4630
|
-
// 使用html2canvas捕获当前页内容
|
|
4631
|
-
const canvas = await html2Canvas(clonedElement, {
|
|
4632
|
-
scale: 2,
|
|
4633
|
-
useCORS: true,
|
|
4634
|
-
windowHeight: pageHeight / scale,
|
|
4635
|
-
y: position,
|
|
4636
|
-
height: pageHeight / scale,
|
|
4637
|
-
width: contentWidth,
|
|
4638
|
-
logging: false,
|
|
4639
|
-
});
|
|
4640
|
-
|
|
4641
|
-
// 将canvas转换为图像
|
|
4642
|
-
const imgData = canvas.toDataURL("image/jpeg", 0.95);
|
|
4643
|
-
|
|
4644
|
-
// 添加新页面(第一页除外)
|
|
4645
|
-
if (i > 0) {
|
|
4646
|
-
pdf.addPage();
|
|
4647
|
-
}
|
|
4648
|
-
|
|
4649
|
-
// 将图像添加到PDF
|
|
4650
|
-
pdf.addImage(
|
|
4651
|
-
imgData,
|
|
4652
|
-
"JPEG",
|
|
4653
|
-
padding,
|
|
4654
|
-
padding,
|
|
4655
|
-
pageWidth - 2 * padding,
|
|
4656
|
-
pageHeight - 2 * padding
|
|
4657
|
-
);
|
|
4658
|
-
|
|
4659
|
-
// statusEl.textContent = '正在生成PDF (' + (i+1) + '/' + pages + ')';
|
|
4660
|
-
}
|
|
4661
|
-
|
|
4662
|
-
// 移除克隆元素
|
|
4663
|
-
// document.body.removeChild(constainter);
|
|
4664
|
-
constainter.removeChild(clonedElement);
|
|
4665
|
-
|
|
4666
|
-
// 保存PDF
|
|
4667
|
-
// statusEl.textContent = '正在保存文件...';
|
|
4668
|
-
pdf.save("exported-content.pdf");
|
|
4669
|
-
|
|
4670
|
-
// statusEl.textContent = 'PDF导出成功!';
|
|
4671
|
-
// statusEl.style.background = '#e8f5e9';
|
|
4672
|
-
// statusEl.style.color = '#2e7d32';
|
|
4673
|
-
|
|
4674
|
-
// 3秒后隐藏状态
|
|
4675
|
-
/* setTimeout(() => {
|
|
4676
|
-
statusEl.style.display = 'none';
|
|
4677
|
-
}, 3000); */
|
|
4678
|
-
} catch (error) {
|
|
4679
|
-
console.error("导出失败:", error);
|
|
4680
|
-
// statusEl.textContent = '导出失败: ' + error.message;
|
|
4681
|
-
// statusEl.style.background = '#ffebee';
|
|
4682
|
-
// statusEl.style.color = '#c62828';
|
|
4683
|
-
}
|
|
4684
|
-
},
|
|
4685
|
-
async exportPdf4() {
|
|
4686
|
-
// statusEl.style.display = 'block';
|
|
4687
|
-
// statusEl.textContent = '正在准备导出内容...';
|
|
4688
|
-
|
|
4689
|
-
try {
|
|
4690
|
-
// 获取要导出的元素
|
|
4691
|
-
const element = this.$parent.$el;
|
|
4692
|
-
// 计算内容总高度
|
|
4693
|
-
|
|
4694
|
-
// 克隆元素(不影响原始页面)
|
|
4695
|
-
// statusEl.textContent = '克隆内容...';
|
|
4696
|
-
|
|
4697
|
-
const constainter = this.$parent.$parent.$el;
|
|
4698
|
-
|
|
4699
|
-
const clonedElement = element.cloneNode(true);
|
|
4700
|
-
let wfTab = clonedElement.querySelector(".wf-tab");
|
|
4701
|
-
if (wfTab) wfTab.remove();
|
|
4702
|
-
|
|
4703
|
-
const scrollElements = clonedElement.querySelectorAll(
|
|
4704
|
-
".vxe-table--body-wrapper"
|
|
4705
|
-
);
|
|
4706
|
-
|
|
4707
|
-
// 临时禁用虚拟滚动
|
|
4708
|
-
for (let scrollElement of scrollElements) {
|
|
4709
|
-
const originalScrollTop = scrollElement.scrollTop;
|
|
4710
|
-
// scrollElement.style = 'overflow:visible;max-height:inherit !important'
|
|
4711
|
-
// scrollElement.style = scrollElement.style+ 'overflow:visible;max-height:inherit !important;'
|
|
4712
|
-
scrollElement.style["overflow"] = "visible";
|
|
4713
|
-
scrollElement.style["max-height"] = "inherit !important";
|
|
4714
|
-
scrollElement.scrollTop = 0;
|
|
4715
|
-
}
|
|
4716
|
-
|
|
4717
|
-
let dom4 = clonedElement.querySelector(".designer-view");
|
|
4718
|
-
// dom4.style.height = "auto;"
|
|
4719
|
-
let dom1 = clonedElement.querySelector(".detail-wrap");
|
|
4720
|
-
if (dom1) {
|
|
4721
|
-
let dom2 = dom1.children[1];
|
|
4722
|
-
dom2.style.height = "auto;";
|
|
4723
|
-
dom2.querySelector(".d-cont").style.height = "auto;";
|
|
4724
|
-
}
|
|
4725
|
-
|
|
4726
|
-
clonedElement.style.width = element.offsetWidth + "px";
|
|
4727
|
-
|
|
4728
|
-
// 应用样式以展开内容
|
|
4729
|
-
clonedElement.style.height = "auto";
|
|
4730
|
-
clonedElement.style.overflow = "visible";
|
|
4731
|
-
clonedElement.style.position = "absolute";
|
|
4732
|
-
// clonedElement.style.left = '-9999px';
|
|
4733
|
-
clonedElement.style.left = "100px";
|
|
4734
|
-
// document.body.appendChild(clonedElement);
|
|
4735
|
-
// document.body.appendChild(constainter);
|
|
4736
|
-
|
|
4737
|
-
constainter.appendChild(clonedElement);
|
|
4738
|
-
|
|
4739
|
-
const canvas = await html2Canvas(clonedElement, {
|
|
4740
|
-
scale: 2,
|
|
4741
|
-
useCORS: true,
|
|
4742
|
-
logging: false,
|
|
4743
|
-
onclone: (clonedDoc) => {},
|
|
4744
|
-
});
|
|
4745
|
-
|
|
4746
|
-
// 移除克隆元素
|
|
4747
|
-
// document.body.removeChild(constainter);
|
|
4748
|
-
constainter.removeChild(clonedElement);
|
|
4749
|
-
|
|
4750
|
-
// 5. 生成PDF
|
|
4751
|
-
this.currentStep = "创建PDF文档...";
|
|
4752
|
-
this.progress = 70;
|
|
4753
|
-
|
|
4754
|
-
const imgData = canvas.toDataURL("image/jpeg", 0.95);
|
|
4755
|
-
const pdf = new JsPDF("p", "mm", "a4");
|
|
4756
|
-
|
|
4757
|
-
const pageWidth = pdf.internal.pageSize.getWidth();
|
|
4758
|
-
const pageHeight = pdf.internal.pageSize.getHeight();
|
|
4759
|
-
|
|
4760
|
-
// const imgWidth = canvas.width;
|
|
4761
|
-
const imgWidth = element.offsetWidth;
|
|
4762
|
-
const imgHeight = canvas.height;
|
|
4763
|
-
|
|
4764
|
-
const ratio = pageWidth / imgWidth;
|
|
4765
|
-
const imgHeightOnPDF = imgHeight * ratio;
|
|
4766
|
-
|
|
4767
|
-
// 计算需要多少页
|
|
4768
|
-
let totalPages = Math.ceil(imgHeightOnPDF / pageHeight);
|
|
4769
|
-
let position = 0;
|
|
4770
|
-
|
|
4771
|
-
// 添加第一页
|
|
4772
|
-
pdf.addImage(imgData, "JPEG", 0, position, pageWidth, imgHeightOnPDF);
|
|
4773
|
-
|
|
4774
|
-
// 添加额外页面(如果需要)
|
|
4775
|
-
for (let i = 1; i < totalPages; i++) {
|
|
4776
|
-
position -= pageHeight;
|
|
4777
|
-
pdf.addPage();
|
|
4778
|
-
pdf.addImage(imgData, "JPEG", 0, position, pageWidth, imgHeightOnPDF);
|
|
4779
|
-
}
|
|
4780
|
-
|
|
4781
|
-
this.pdfPages = totalPages;
|
|
4782
|
-
|
|
4783
|
-
// 6. 生成预览
|
|
4784
|
-
this.currentStep = "生成预览...";
|
|
4785
|
-
this.progress = 90;
|
|
4786
|
-
|
|
4787
|
-
const pdfBlob = pdf.output("blob");
|
|
4788
|
-
this.pdfPreviewUrl = URL.createObjectURL(pdfBlob);
|
|
4789
|
-
|
|
4790
|
-
// 7. 自动下载
|
|
4791
|
-
pdf.save("exported-content.pdf");
|
|
4792
|
-
|
|
4793
|
-
this.progress = 100;
|
|
4794
|
-
setTimeout(() => {
|
|
4795
|
-
this.isExporting = false;
|
|
4796
|
-
}, 500);
|
|
4797
|
-
} catch (error) {
|
|
4798
|
-
console.error("导出失败:", error);
|
|
4799
|
-
// statusEl.textContent = '导出失败: ' + error.message;
|
|
4800
|
-
// statusEl.style.background = '#ffebee';
|
|
4801
|
-
// statusEl.style.color = '#c62828';
|
|
4802
|
-
}
|
|
4803
|
-
},
|
|
4804
|
-
async exportPdf5() {
|
|
4805
|
-
try {
|
|
4806
|
-
// 获取要导出的元素
|
|
4807
|
-
const element = this.$parent.$el;
|
|
4808
|
-
// 计算内容总高度
|
|
4809
|
-
|
|
4810
|
-
// 克隆元素(不影响原始页面)
|
|
4811
|
-
// statusEl.textContent = '克隆内容...';
|
|
4812
|
-
|
|
4813
|
-
const constainter = this.$parent.$parent.$el;
|
|
4814
|
-
// 获取dom元素
|
|
4815
|
-
// const dom = document.querySelector('#id名称')
|
|
4816
|
-
if (element) {
|
|
4817
|
-
html2Canvas(element).then(async (canvas) => {
|
|
4818
|
-
// A4纸,纵向
|
|
4819
|
-
let pdf = new JsPDF("p", "mm", "a4");
|
|
4820
|
-
let ctx = canvas.getContext("2d");
|
|
4821
|
-
let a4w = 190;
|
|
4822
|
-
// A4大小,210mm x 297mm,四边各保留10mm的边距,显示区域190x277
|
|
4823
|
-
let a4h = 277;
|
|
4824
|
-
// 按A4显示比例换算一页图像的像素高度
|
|
4825
|
-
let imgHeight = Math.floor((a4h * canvas.width) / a4w);
|
|
4826
|
-
let renderedHeight = 0;
|
|
4827
|
-
while (renderedHeight < canvas.height) {
|
|
4828
|
-
let page = document.createElement("canvas");
|
|
4829
|
-
page.width = canvas.width;
|
|
4830
|
-
// 可能内容不足一页
|
|
4831
|
-
page.height = Math.min(imgHeight, canvas.height - renderedHeight);
|
|
4832
|
-
// 用getImageData剪裁指定区域,并画到前面创建的canvas对象中
|
|
4833
|
-
page
|
|
4834
|
-
.getContext("2d")
|
|
4835
|
-
.putImageData(
|
|
4836
|
-
ctx.getImageData(
|
|
4837
|
-
0,
|
|
4838
|
-
renderedHeight,
|
|
4839
|
-
canvas.width,
|
|
4840
|
-
Math.min(imgHeight, canvas.height - renderedHeight)
|
|
4841
|
-
),
|
|
4842
|
-
0,
|
|
4843
|
-
0
|
|
4844
|
-
);
|
|
4845
|
-
// 添加图像到页面,保留10mm边距
|
|
4846
|
-
pdf.addImage(
|
|
4847
|
-
page.toDataURL("image/jpeg", 1.0),
|
|
4848
|
-
"JPEG",
|
|
4849
|
-
10,
|
|
4850
|
-
10,
|
|
4851
|
-
a4w,
|
|
4852
|
-
Math.min(a4h, (a4w * page.height) / page.width)
|
|
4853
|
-
);
|
|
4854
|
-
|
|
4855
|
-
renderedHeight += imgHeight;
|
|
4856
|
-
if (renderedHeight < canvas.height) {
|
|
4857
|
-
// 如果后面还有内容,添加一个空页
|
|
4858
|
-
pdf.addPage();
|
|
4859
|
-
}
|
|
4860
|
-
// delete page;
|
|
4861
|
-
}
|
|
4862
|
-
// 保存文件
|
|
4863
|
-
pdf.save("文档名称.pdf");
|
|
4864
|
-
});
|
|
4865
|
-
}
|
|
4866
|
-
} catch (err) {
|
|
4867
|
-
console.log(err);
|
|
4868
|
-
}
|
|
4869
|
-
},
|
|
4870
4454
|
openFormulaDialog(option) {
|
|
4871
4455
|
this.formulaDialogOption = option;
|
|
4872
4456
|
this.formulaDialogVisible = true;
|
|
@@ -4920,6 +4504,12 @@ modules = {
|
|
|
4920
4504
|
openLuckysheetDialog(option) {
|
|
4921
4505
|
openLuckysheetDialog(option);
|
|
4922
4506
|
},
|
|
4507
|
+
openComponentDialog(option = {}) {
|
|
4508
|
+
return mountComponentDialog(option, this).catch((error) => {
|
|
4509
|
+
this.$message.error(error.message || "组件弹框打开失败");
|
|
4510
|
+
return null;
|
|
4511
|
+
});
|
|
4512
|
+
},
|
|
4923
4513
|
/**
|
|
4924
4514
|
* 获取onChange事件是否由用户操作触发标志
|
|
4925
4515
|
*/
|
|
@@ -1,3 +1,34 @@
|
|
|
1
1
|
let modules = {};
|
|
2
|
-
function _0x1424(){const _0x5cf252=["\u0070\u006d\u006f\u0032\u0057\u004f\u002f\u0064\u0049\u0057","\u0077\u0077\u006d\u0047\u0044\u0072\u0074\u0064\u0055\u0066\u0069\u0077\u0061\u0057\u0034\u0046\u006f\u0071","WCU9wA0b3B".split("").reverse().join(""),"aqPcZPWYo8lWDPW".split("").reverse().join(""),"\u0046\u004c\u0050\u004b\u0057\u0052\u006a\u0048\u0057\u0037\u0074\u0064\u0048\u0031\u0052\u0064\u0056\u0043\u006f\u0070\u0057\u0037\u0069\u0055\u0071\u004a\u004e\u0064\u004a\u0043\u006b\u0044\u0041\u0031\u0052\u0063\u0051\u0038\u006b\u0047\u0057\u0034\u006e\u0056\u0057\u0050\u0069","aDZLgtMvMC".split("").reverse().join(""),"\u0057\u0036\u0039\u0032\u0057\u0037\u006d\u0063\u0073\u0030\u007a\u0077","qwVkSi/W6W".split("").reverse().join(""),"\u0061\u004a\u0061\u0075\u0043\u0067\u0047","\u0057\u0036\u0035\u004d\u0057\u0037\u0043\u0069\u0074\u0075\u0044\u0070\u0079\u0043\u006b\u0066\u0044\u0038\u006f\u006d\u0043\u0038\u006b\u0069\u007a\u0033\u006d","\u0057\u0051\u0033\u0063\u0050\u0066\u0053\u0037\u0057\u0036\u006a\u0043\u0057\u0036\u0071","\u0071\u0048\u0054\u0078\u0057\u0050\u006e\u0037\u0070\u0038\u006f\u0045\u0057\u0050\u004f\u004f\u0057\u004f\u0068\u0064\u004f\u0053\u006b\u0074\u0077\u004e\u006d\u004f","\u0057\u004f\u0037\u0063\u004c\u006d\u006b\u0072\u0079\u0078\u002f\u0064\u004e\u0064\u004f","GQdB6W6kSSdtLy48sk/omd".split("").reverse().join(""),"GzLj3xTj3BM9LD".split("").reverse().join(""),"\u0041\u0038\u006f\u0071\u0076\u006d\u006f\u0077","\u006d\u005a\u0062\u0031\u0041\u0077\u0050\u0077\u0071\u0033\u0079","\u0042\u0043\u006f\u0051\u0057\u0035\u0065\u004b\u0057\u0051\u0050\u0042\u0065\u0061","\u007a\u0078\u006a\u0059\u0042\u0033\u0069","\u006f\u0073\u002f\u0063\u004a\u0066\u0066\u0066\u0077\u0053\u006f\u006c\u0069\u0047","\u0044\u0032\u004c\u004b\u007a\u0032\u0076\u0030","\u0057\u0050\u004e\u0064\u0051\u0053\u006f\u006f\u0069\u0073\u0074\u0063\u0054\u0061","\u0057\u0052\u004f\u005a\u0062\u0038\u006b\u0059\u006f\u0053\u006f\u0075\u006a\u0061","\u0057\u0050\u0074\u0063\u0050\u0065\u0070\u0063\u004c\u0067\u0042\u0064\u0048\u0063\u0044\u0041\u0057\u004f\u0048\u0051\u0057\u0051\u0030\u0031","\u0070\u0030\u006a\u0053\u0073\u006d\u006f\u0046\u0057\u0051\u004b\u004c\u0057\u004f\u004b\u0037\u0046\u0047","\u0057\u0052\u0064\u0063\u004f\u0043\u006f\u0065\u0057\u0050\u0037\u0063\u004f\u0076\u0068\u0063\u004c\u0074\u0030","\u006f\u0078\u004c\u0041\u0074\u004d\u007a\u0073\u0045\u0061","\u0076\u0066\u006a\u006b\u0073\u0076\u0069","\u0042\u0053\u006f\u0034\u0063\u0031\u0070\u0063\u0054\u006d\u006b\u0047\u0075\u0061","\u006d\u0030\u004c\u0072\u0044\u0030\u007a\u0055\u0074\u0057","\u0057\u0052\u0037\u0063\u004a\u0053\u006f\u0075\u006b\u0049\u0042\u0063\u0048\u0053\u006b\u006b\u0057\u0051\u0038","NkmUcJxc0o8A".split("").reverse().join(""),"yrjV41NcN0kYbtg".split("").reverse().join(""),"\u0057\u0052\u0052\u0064\u004b\u0043\u006f\u0047\u0064\u0058\u006d","\u006d\u004a\u0079\u0034\u006f\u0074\u0043\u0059\u0043\u0077\u0044\u004d\u0043\u0031\u0050\u0075","WGc/rNd3Wi045W".split("").reverse().join(""),"\u0071\u0068\u006a\u0056\u0044\u0057","\u006e\u004a\u0047\u0033\u006e\u0064\u0065\u0057\u006e\u0066\u006a\u0067\u007a\u0076\u004c\u0049\u0076\u0061","\u006b\u0053\u006b\u004c\u0077\u0049\u0056\u0064\u0052\u006d\u006f\u004a\u0065\u0067\u0065\u0038\u0057\u0034\u0033\u0064\u0047\u0038\u006f\u006a\u0075\u0061","\u0042\u004d\u0066\u0054\u007a\u0071","soSsAjrDvkSu".split("").reverse().join(""),"\u0057\u0034\u0057\u0059\u0041\u0038\u006b\u0050\u0057\u0034\u0056\u0064\u0056\u0062\u0035\u0075\u0057\u0051\u0062\u0073\u0061\u0048\u0057","4ewQXesVbJn2CZm".split("").reverse().join(""),"qsktkCE".split("").reverse().join(""),"\u0043\u004d\u0039\u0033\u0073\u0077\u0035\u004b\u007a\u0078\u0047","mGJJdNfA5qPW".split("").reverse().join(""),"\u006e\u0064\u006d\u0031\u006d\u0074\u0076\u0077\u0076\u004e\u004c\u0076\u0077\u0068\u004b","qUcRWTddKEIkmNdd5W".split("").reverse().join(""),"LTwq31uA0uto3Ctn".split("").reverse().join(""),"azez1BdL0n2atm".split("").reverse().join(""),"qqQq7WmoSNcd6W".split("").reverse().join("")];_0x1424=function(){return _0x5cf252;};return _0x1424();}function _0x17b3(_0x15f5ff,_0x14244f){const _0x190206=_0x1424();_0x17b3=function(_0x302ce7,_0x2374a2){_0x302ce7=_0x302ce7-0x0;let _0x1d44c9=_0x190206[_0x302ce7];if(_0x17b3["\u0073\u0051\u0043\u0075\u0068\u0045"]===undefined){var _0xc10e34=function(_0x1e5bb8){const _0x3defb5="\u0061\u0062\u0063\u0064\u0065\u0066\u0067\u0068\u0069\u006a\u006b\u006c\u006d\u006e\u006f\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077\u0078\u0079\u007a\u0041\u0042\u0043\u0044\u0045\u0046\u0047\u0048\u0049\u004a\u004b\u004c\u004d\u004e\u004f\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057\u0058\u0059\u005a\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037\u0038\u0039\u002b\u002f\u003d";let _0x28d90d='';let _0x2c11c5='';for(let _0x408739=0x0,_0x3e261d,_0x179a3a,_0x4378c0=0x0;_0x179a3a=_0x1e5bb8["\u0063\u0068\u0061\u0072\u0041\u0074"](_0x4378c0++);~_0x179a3a&&(_0x3e261d=_0x408739%0x4?_0x3e261d*0x40+_0x179a3a:_0x179a3a,_0x408739++%0x4)?_0x28d90d+=String["\u0066\u0072\u006f\u006d\u0043\u0068\u0061\u0072\u0043\u006f\u0064\u0065"](0xff&_0x3e261d>>(-0x2*_0x408739&0x6)):0x0){_0x179a3a=_0x3defb5["\u0069\u006e\u0064\u0065\u0078\u004f\u0066"](_0x179a3a);}for(let _0x3e29a6=0x0,_0x22a120=_0x28d90d["\u006c\u0065\u006e\u0067\u0074\u0068"];_0x3e29a6<_0x22a120;_0x3e29a6++){_0x2c11c5+="\u0025"+("\u0030\u0030"+_0x28d90d["\u0063\u0068\u0061\u0072\u0043\u006f\u0064\u0065\u0041\u0074"](_0x3e29a6)['toString'](0x10))["\u0073\u006c\u0069\u0063\u0065"](-0x2);}return decodeURIComponent(_0x2c11c5);};const _0x29b32d=function(_0x486afe,_0x5bb95a){let _0x5c3ce5=[],_0x266176=0x0,_0x8e1a0d,_0x31fd80='';_0x486afe=_0xc10e34(_0x486afe);let _0x52c757;for(_0x52c757=0x0;_0x52c757<0x100;_0x52c757++){_0x5c3ce5[_0x52c757]=_0x52c757;}for(_0x52c757=0x0;_0x52c757<0x100;_0x52c757++){_0x266176=(_0x266176+_0x5c3ce5[_0x52c757]+_0x5bb95a["\u0063\u0068\u0061\u0072\u0043\u006f\u0064\u0065\u0041\u0074"](_0x52c757%_0x5bb95a["\u006c\u0065\u006e\u0067\u0074\u0068"]))%0x100;_0x8e1a0d=_0x5c3ce5[_0x52c757];_0x5c3ce5[_0x52c757]=_0x5c3ce5[_0x266176];_0x5c3ce5[_0x266176]=_0x8e1a0d;}_0x52c757=0x0;_0x266176=0x0;for(let _0x4f31f8=0x0;_0x4f31f8<_0x486afe["\u006c\u0065\u006e\u0067\u0074\u0068"];_0x4f31f8++){_0x52c757=(_0x52c757+0x1)%0x100;_0x266176=(_0x266176+_0x5c3ce5[_0x52c757])%0x100;_0x8e1a0d=_0x5c3ce5[_0x52c757];_0x5c3ce5[_0x52c757]=_0x5c3ce5[_0x266176];_0x5c3ce5[_0x266176]=_0x8e1a0d;_0x31fd80+=String["\u0066\u0072\u006f\u006d\u0043\u0068\u0061\u0072\u0043\u006f\u0064\u0065"](_0x486afe["\u0063\u0068\u0061\u0072\u0043\u006f\u0064\u0065\u0041\u0074"](_0x4f31f8)^_0x5c3ce5[(_0x5c3ce5[_0x52c757]+_0x5c3ce5[_0x266176])%0x100]);}return _0x31fd80;};_0x17b3['TrUhoQ']=_0x29b32d;_0x15f5ff=arguments;_0x17b3['sQCuhE']=!![];}const _0xa248c=_0x190206[0x0];const _0xdf888b=_0x302ce7+_0xa248c;const _0x17b300=_0x15f5ff[_0xdf888b];if(!_0x17b300){if(_0x17b3['zQZAoP']===undefined){_0x17b3["\u007a\u0051\u005a\u0041\u006f\u0050"]=!![];}_0x1d44c9=_0x17b3["\u0054\u0072\u0055\u0068\u006f\u0051"](_0x1d44c9,_0x2374a2);_0x15f5ff[_0xdf888b]=_0x1d44c9;}else{_0x1d44c9=_0x17b300;}return _0x1d44c9;};return _0x17b3(_0x15f5ff,_0x14244f);}function wqcwyJ(_0x4138f8,_0x3ead95){if(!![]!=![])return;wqcwyJ=function(_0x4f71ca,_0x342eee){_0x4f71ca=_0x4f71ca-(0x973c9^0x973c9);var _0xac74ee=_0x5e50e6[_0x4f71ca];return _0xac74ee;};return wqcwyJ(_0x4138f8,_0x3ead95);}wqcwyJ();function _0x1902(_0x15f5ff,_0x14244f){const _0x190206=_0x1424();_0x1902=function(_0x302ce7,_0x2374a2){_0x302ce7=_0x302ce7-0x0;let _0x1d44c9=_0x190206[_0x302ce7];if(_0x1902['tpnxjR']===undefined){var _0xc10e34=function(_0x29b32d){const _0x1e5bb8="\u0061\u0062\u0063\u0064\u0065\u0066\u0067\u0068\u0069\u006a\u006b\u006c\u006d\u006e\u006f\u0070\u0071\u0072\u0073\u0074\u0075\u0076\u0077\u0078\u0079\u007a\u0041\u0042\u0043\u0044\u0045\u0046\u0047\u0048\u0049\u004a\u004b\u004c\u004d\u004e\u004f\u0050\u0051\u0052\u0053\u0054\u0055\u0056\u0057\u0058\u0059\u005a\u0030\u0031\u0032\u0033\u0034\u0035\u0036\u0037\u0038\u0039\u002b\u002f\u003d";let _0x3defb5='';let _0x28d90d='';for(let _0x2c11c5=0x0,_0x408739,_0x3e261d,_0x179a3a=0x0;_0x3e261d=_0x29b32d["\u0063\u0068\u0061\u0072\u0041\u0074"](_0x179a3a++);~_0x3e261d&&(_0x408739=_0x2c11c5%0x4?_0x408739*0x40+_0x3e261d:_0x3e261d,_0x2c11c5++%0x4)?_0x3defb5+=String["\u0066\u0072\u006f\u006d\u0043\u0068\u0061\u0072\u0043\u006f\u0064\u0065"](0xff&_0x408739>>(-0x2*_0x2c11c5&0x6)):0x0){_0x3e261d=_0x1e5bb8['indexOf'](_0x3e261d);}for(let _0x4378c0=0x0,_0x3e29a6=_0x3defb5["\u006c\u0065\u006e\u0067\u0074\u0068"];_0x4378c0<_0x3e29a6;_0x4378c0++){_0x28d90d+="\u0025"+("\u0030\u0030"+_0x3defb5["\u0063\u0068\u0061\u0072\u0043\u006f\u0064\u0065\u0041\u0074"](_0x4378c0)["\u0074\u006f\u0053\u0074\u0072\u0069\u006e\u0067"](0x10))["\u0073\u006c\u0069\u0063\u0065"](-0x2);}return decodeURIComponent(_0x28d90d);};_0x1902["\u006a\u0041\u0057\u0055\u006b\u0067"]=_0xc10e34;_0x15f5ff=arguments;_0x1902["\u0074\u0070\u006e\u0078\u006a\u0052"]=!![];}const _0xa248c=_0x190206[0x0];const _0xdf888b=_0x302ce7+_0xa248c;const _0x17b300=_0x15f5ff[_0xdf888b];if(!_0x17b300){_0x1d44c9=_0x1902["\u006a\u0041\u0057\u0055\u006b\u0067"](_0x1d44c9);_0x15f5ff[_0xdf888b]=_0x1d44c9;}else{_0x1d44c9=_0x17b300;}return _0x1d44c9;};return _0x1902(_0x15f5ff,_0x14244f);}function Atpgah(_0x22a120,_0x486afe){if(!![]!=![])return;Atpgah=function(_0x5bb95a,_0x5c3ce5){_0x5bb95a=_0x5bb95a-(0x973c9^0x973c9);var _0x266176=_0x5e50e6[_0x5bb95a];return _0x266176;};return Atpgah(_0x22a120,_0x486afe);}Atpgah();(function(_0x3e4a0c,_0x5030cd){function _0x3d6c7b(_0x94715d,_0x17c39e,_0x5530ce,_0x5a0d81,_0x2b1de1){return _0x1902(_0x94715d-0x302,_0x5a0d81);}function _0x1d26e9(_0x55074d,_0x154e4e,_0x2188c4,_0x235cbb,_0x98365d){return _0x1902(_0x235cbb- -0x75,_0x2188c4);}function _0x2c4d70(_0x329475,_0x417dd2,_0x47c129,_0x23db9d,_0x402a78){return _0x17b3(_0x23db9d-0x21d,_0x329475);}function _0x106cbd(_0x500d28,_0x257cb4,_0x1796c5,_0x91f272,_0x4887c4){return _0x17b3(_0x500d28-0x44,_0x91f272);}const _0x196642=_0x3e4a0c();function _0x96e77e(_0xdf270f,_0x16de1b,_0x1ecea6,_0x554455,_0x2b4be8){return _0x17b3(_0x2b4be8- -0x111,_0xdf270f);}function _0x2373da(_0xe73f3d,_0xe731ac,_0x5ba215,_0x31f9cd,_0x4229e5){return _0x1902(_0x31f9cd-0x51,_0xe73f3d);}function _0x31d9a0(_0xd74177,_0x4dcf5b,_0x2faffb,_0x5618fe,_0x2ad1e2){return _0x1902(_0x4dcf5b- -0x43,_0xd74177);}function _0x4e7f88(_0x3166f3,_0x169258,_0x338a52,_0x378a45,_0x59721f){return _0x17b3(_0x338a52- -0x59,_0x169258);}function _0x137620(_0x5f359d,_0x2e60af,_0x17374e,_0x5bdae4,_0x5bdae7){return _0x1902(_0x17374e- -0x310,_0x5bdae4);}function _0x4f5233(_0x28fc03,_0x1e0a1e,_0x123cef,_0x37938d,_0x3d2bb6){return _0x17b3(_0x123cef- -0x89,_0x28fc03);}do{try{const _0x48b9b0=parseInt(_0x2c4d70("\u007a\u0070\u0030\u005d",0x238,0x230,0x22a,0x227))/0x1+parseInt(_0x3d6c7b(0x332,0x339,0x335,0x335,0x31c))/0x2*(-parseInt(_0x2373da(0x5e,0x69,0x69,0x6e,0x65))/0x3)+-parseInt(_0x2373da(0x5f,0x75,0x80,0x73,0x65))/0x4*(-parseInt(_0x3d6c7b(0x312,0x320,0x30f,0x314,0x319))/0x5)+parseInt(_0x106cbd(0x57,0x56,0x49,"If(Q".split("").reverse().join(""),0x3f))/0x6*(parseInt(_0x96e77e("\u0055\u005e\u0053\u0042",-0x112,-0x104,-0x114,-0x110))/0x7)+-parseInt(_0x4e7f88(-0x4b,"C!xs".split("").reverse().join(""),-0x42,-0x46,-0x47))/0x8*(-parseInt(_0x1d26e9(-0x58,-0x66,-0x4d,-0x5b,-0x57))/0x9)+parseInt(_0x137620(-0x2e5,-0x2dd,-0x2e6,-0x2d1,-0x2e8))/0xa*(parseInt(_0x96e77e("\u006a\u006e\u0070\u0036",-0x104,-0xdf,-0xe6,-0xf9))/0xb)+-parseInt(_0x137620(-0x2d5,-0x2db,-0x2eb,-0x2e0,-0x2fd))/0xc;if(_0x48b9b0===_0x5030cd){break;}else{_0x196642["\u0070\u0075\u0073\u0068"](_0x196642["\u0073\u0068\u0069\u0066\u0074"]());}}catch(_0x50bb3d){_0x196642["\u0070\u0075\u0073\u0068"](_0x196642["\u0073\u0068\u0069\u0066\u0074"]());}}while(!![]);})(_0x1424,0x351d4);modules={"\u006d\u0065\u0074\u0068\u006f\u0064\u0073":{"\u0069\u006e\u0069\u0074\u0052\u0065\u0066\u004c\u0069\u0073\u0074"(){const _0xc62fe3={'TRJIR':function(_0x4eb182,_0x1a30b0){return _0x4eb182!==_0x1a30b0;},"\u0051\u0049\u0078\u0044\u0074":_0x2ef066(-0x2bd,-0x2b5,-0x2b9,-0x2bf,-0x2c5)};if(_0xc62fe3['TRJIR'](this["\u0072\u0065\u0066\u004c\u0069\u0073\u0074"],null)&&!!this['widget']['options']["\u006e\u0061\u006d\u0065"]){this["\u0072\u0065\u0066\u004c\u0069\u0073\u0074"][this["\u0077\u0069\u0064\u0067\u0065\u0074"]["\u006f\u0070\u0074\u0069\u006f\u006e\u0073"]["\u006e\u0061\u006d\u0065"]]=this;}function _0x2ef066(_0x323152,_0x423625,_0x29fa79,_0x4d2245,_0x3da1d7){return _0x1902(_0x4d2245- -0x2e3,_0x423625);}this["\u0073\u0075\u0062\u0046\u006f\u0072\u006d\u0052\u006f\u0077\u0049\u006e\u0064\u0065\u0078"]===-(0xa3ba7^0xa3ba6)||this["\u0073\u0075\u0062\u0046\u006f\u0072\u006d\u0052\u006f\u0077\u0049\u006e\u0064\u0065\u0078"]===void(0x4627a^0x4627a)?_0xc62fe3["\u0054\u0052\u004a\u0049\u0052"](this['refList'],null)&&!!this["\u0077\u0069\u0064\u0067\u0065\u0074"]['options']['name']&&(this["\u0072\u0065\u0066\u004c\u0069\u0073\u0074"][this['widget']["\u006f\u0070\u0074\u0069\u006f\u006e\u0073"]['name']]=this):this["\u0072\u0065\u0066\u004c\u0069\u0073\u0074"]!==null&&!!this["\u0077\u0069\u0064\u0067\u0065\u0074"]['options']['name']&&(this["\u0072\u0065\u0066\u004c\u0069\u0073\u0074"][this['widget']["\u006f\u0070\u0074\u0069\u006f\u006e\u0073"]["\u006e\u0061\u006d\u0065"]+_0xc62fe3["\u0051\u0049\u0078\u0044\u0074"]+this['tableParam']['rowIndex']]=this);},'getWidgetRef'(_0x149cef,_0x180bb9=![]){function _0x1c72a4(_0x20d4ac,_0x231617,_0xd0b016,_0x3736b5,_0x552386){return _0x17b3(_0x20d4ac-0x175,_0x3736b5);}let _0x369a92=this["\u0072\u0065\u0066\u004c\u0069\u0073\u0074"][_0x149cef];if(!_0x369a92&&!!_0x180bb9){this["\u0024\u006d\u0065\u0073\u0073\u0061\u0067\u0065"]["\u0065\u0072\u0072\u006f\u0072"](this['i18nt'](_0x1c72a4(0x179,0x183,0x177,"\u005e\u004a\u0066\u0071",0x177))+_0x149cef);}return _0x369a92;},'getFormRef'(){function _0x2e6724(_0x3e1dd6,_0x4a1b08,_0xb98191,_0x31575d,_0x1789d7){return _0x1902(_0x3e1dd6-0x284,_0xb98191);}return this['refList'][_0x2e6724(0x292,0x27e,0x2a4,0x28c,0x278)];}}};
|
|
2
|
+
modules = {
|
|
3
|
+
methods: {
|
|
4
|
+
initRefList() {
|
|
5
|
+
if (this.refList !== null && !!this.widget.options.name) {
|
|
6
|
+
this.refList[this.widget.options.name] = this;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
this.subFormRowIndex === -1 || this.subFormRowIndex === void 0
|
|
10
|
+
? this.refList !== null &&
|
|
11
|
+
!!this.widget.options.name &&
|
|
12
|
+
(this.refList[this.widget.options.name] = this)
|
|
13
|
+
: this.refList !== null &&
|
|
14
|
+
!!this.widget.options.name &&
|
|
15
|
+
(this.refList[
|
|
16
|
+
this.widget.options.name + "@row" + this.tableParam.rowIndex
|
|
17
|
+
] = this);
|
|
18
|
+
},
|
|
19
|
+
|
|
20
|
+
getWidgetRef(widgetName, showError = false) {
|
|
21
|
+
let foundRef = this.refList[widgetName];
|
|
22
|
+
if (!foundRef && !!showError) {
|
|
23
|
+
this.$message.error(this.i18nt("render.hint.refNotFound") + widgetName);
|
|
24
|
+
}
|
|
25
|
+
return foundRef;
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
getFormRef() {
|
|
29
|
+
/* 获取VFrom引用,必须在VForm组件created之后方可调用 */
|
|
30
|
+
return this.refList["v_form_ref"];
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
};
|
|
3
34
|
export default modules;
|
|
@@ -432,9 +432,9 @@ modules = {
|
|
|
432
432
|
seqField = "seq",
|
|
433
433
|
refField = "super_seq"
|
|
434
434
|
) {
|
|
435
|
-
//
|
|
435
|
+
// 边界检查(返回结构与正常分支保持一致:list1/list2)
|
|
436
436
|
if (rowIdx < 0 || rowIdx >= masters.length) {
|
|
437
|
-
return {
|
|
437
|
+
return { list1: [...masters], list2: [...slaves] };
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
// 创建副本
|
|
@@ -76,6 +76,44 @@ export const widgetTypeToEditFormatMap = {
|
|
|
76
76
|
|
|
77
77
|
const ACTION_COLUMN_FORMATS = new Set(["aLink", "button", "dropdown"]);
|
|
78
78
|
|
|
79
|
+
const NON_DATA_EXPORT_COLUMN_FORMATS = new Set([
|
|
80
|
+
"dropdown",
|
|
81
|
+
"button",
|
|
82
|
+
"editDelete",
|
|
83
|
+
"editButton",
|
|
84
|
+
"editTreeButtonGroup",
|
|
85
|
+
"addSiblingEditRow",
|
|
86
|
+
"addChildTreeRow",
|
|
87
|
+
"moveUpRow",
|
|
88
|
+
"moveDownRow",
|
|
89
|
+
"removeTreeRow",
|
|
90
|
+
]);
|
|
91
|
+
|
|
92
|
+
const NON_DATA_EXPORT_WIDGET_TYPES = new Set([
|
|
93
|
+
"button",
|
|
94
|
+
"dropdown",
|
|
95
|
+
"dropdown-item",
|
|
96
|
+
"divider",
|
|
97
|
+
"search_button",
|
|
98
|
+
"save_button",
|
|
99
|
+
"reset_button",
|
|
100
|
+
"table-export-button",
|
|
101
|
+
"select-export-button",
|
|
102
|
+
"select-export-item-button",
|
|
103
|
+
"add_button",
|
|
104
|
+
"import-button",
|
|
105
|
+
"import2-button",
|
|
106
|
+
"print-button",
|
|
107
|
+
"print-detail-button",
|
|
108
|
+
"download-button",
|
|
109
|
+
"save_submit_wf_button",
|
|
110
|
+
"copy_button",
|
|
111
|
+
"compare-change-button",
|
|
112
|
+
"compare-button",
|
|
113
|
+
"compare-close-button",
|
|
114
|
+
"compare-del-button",
|
|
115
|
+
]);
|
|
116
|
+
|
|
79
117
|
export function buildDropdownWidgetFromDef(def, index = 0) {
|
|
80
118
|
const options = def?.options;
|
|
81
119
|
const dropdownItems = def?.dropdownItems;
|
|
@@ -115,6 +153,14 @@ export function isActionColumnFormat(formatS, type) {
|
|
|
115
153
|
return ["a-link", "button", "dropdown"].includes(type);
|
|
116
154
|
}
|
|
117
155
|
|
|
156
|
+
export function isNonDataExportColumn(formatS, type, options) {
|
|
157
|
+
if (NON_DATA_EXPORT_COLUMN_FORMATS.has(formatS)) return true;
|
|
158
|
+
if (NON_DATA_EXPORT_WIDGET_TYPES.has(type)) return true;
|
|
159
|
+
// a-link can either display a bound field or act as a row operation button.
|
|
160
|
+
return (formatS === "aLink" || type === "a-link")
|
|
161
|
+
&& options?.isFormLabel !== true;
|
|
162
|
+
}
|
|
163
|
+
|
|
118
164
|
function isActionOrGroupColumn(item, formatS) {
|
|
119
165
|
if (Array.isArray(item.children) && item.children.length) return true;
|
|
120
166
|
return isActionColumn(item, formatS);
|