cloud-web-corejs 1.0.54-dev.662 → 1.0.54-dev.664
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/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +21 -86
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +82 -196
- package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +34 -38
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +2 -3
- package/src/components/xform/form-designer/setting-panel/widgetPropertyDialogMixin.js +3 -3
- package/src/components/xform/form-render/container-item/data-table-mixin.js +7 -128
package/package.json
CHANGED
|
@@ -687,9 +687,9 @@ export default {
|
|
|
687
687
|
handleShowButtonsColumnChange: function (e) {
|
|
688
688
|
if (e) {
|
|
689
689
|
var t = this.designer.formWidget.getSelectedWidgetRef();
|
|
690
|
-
t
|
|
691
|
-
|
|
692
|
-
|
|
690
|
+
t &&
|
|
691
|
+
t.refreshLayout &&
|
|
692
|
+
this.$nextTick(function () {
|
|
693
693
|
t.refreshLayout();
|
|
694
694
|
});
|
|
695
695
|
}
|
|
@@ -702,8 +702,8 @@ export default {
|
|
|
702
702
|
this.optionModel.operationButtons.map(function (n, o) {
|
|
703
703
|
n.name === e && o !== t && (i = !0);
|
|
704
704
|
}),
|
|
705
|
-
i
|
|
706
|
-
|
|
705
|
+
i &&
|
|
706
|
+
(this.$message.error(
|
|
707
707
|
this.i18nt("designer.setting.operationButtonDuplicatedNameError")
|
|
708
708
|
),
|
|
709
709
|
(this.optionModel.operationButtons[t].name = this.oldButtonName));
|
|
@@ -744,9 +744,9 @@ export default {
|
|
|
744
744
|
},
|
|
745
745
|
refreshTableLayout: function () {
|
|
746
746
|
var e = this.designer.formWidget.getSelectedWidgetRef();
|
|
747
|
-
e
|
|
748
|
-
|
|
749
|
-
|
|
747
|
+
e &&
|
|
748
|
+
e.refreshLayout &&
|
|
749
|
+
this.$nextTick(function () {
|
|
750
750
|
e.refreshLayout();
|
|
751
751
|
});
|
|
752
752
|
},
|
|
@@ -768,13 +768,7 @@ export default {
|
|
|
768
768
|
}
|
|
769
769
|
},
|
|
770
770
|
changeFormatS(row) {
|
|
771
|
-
|
|
772
|
-
let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
|
773
|
-
if (columnSelectedWidget) {
|
|
774
|
-
row.columnOption = columnSelectedWidget.options;
|
|
775
|
-
} else {
|
|
776
|
-
row.columnOption = {};
|
|
777
|
-
}
|
|
771
|
+
row.widget = this.designer.createColumnWidget(row, false) || null;
|
|
778
772
|
if (row.formatS == "editDelete" || row.formatS == "editButton") {
|
|
779
773
|
row.width = 47;
|
|
780
774
|
row.prop = null;
|
|
@@ -788,72 +782,13 @@ export default {
|
|
|
788
782
|
row.sortable = true;
|
|
789
783
|
}
|
|
790
784
|
},
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
let columnSelectedWidget = null;
|
|
794
|
-
let columnEditFields = null;
|
|
795
|
-
|
|
796
|
-
let type = this.columnFormatMap[row.formatS];
|
|
797
|
-
|
|
798
|
-
if (type) {
|
|
799
|
-
columnSelectedWidget = this.$baseLodash.cloneDeep(
|
|
800
|
-
this.designer.getFieldWidgetByType(type)
|
|
801
|
-
);
|
|
802
|
-
let tmpId = generateId();
|
|
803
|
-
let idVal = row.prop ? row.prop : type + tmpId;
|
|
804
|
-
columnSelectedWidget.id = idVal;
|
|
805
|
-
columnSelectedWidget.options.name = idVal;
|
|
806
|
-
if (
|
|
807
|
-
!isChange
|
|
808
|
-
&& row.columnOption
|
|
809
|
-
&& Object.keys(row.columnOption).length
|
|
810
|
-
) {
|
|
811
|
-
row.columnOption.required = row.required || false;
|
|
812
|
-
columnSelectedWidget.options = row.columnOption;
|
|
813
|
-
} else {
|
|
814
|
-
columnSelectedWidget.options.required = row.required || false;
|
|
815
|
-
row.columnOption = columnSelectedWidget.options;
|
|
816
|
-
}
|
|
817
|
-
columnSelectedWidget.options.name = row.prop;
|
|
818
|
-
columnSelectedWidget.options.label = row.label;
|
|
819
|
-
columnSelectedWidget.options.labelHidden = true;
|
|
820
|
-
}
|
|
821
|
-
return { columnSelectedWidget, columnEditFields };
|
|
822
|
-
},
|
|
823
|
-
openFormatConfigDialog(row, index) {
|
|
824
|
-
let option = row.columnOption;
|
|
825
|
-
let selectedWidget;
|
|
826
|
-
let columnWidgetConfig = this.getColumnWidgetConfig(row);
|
|
827
|
-
let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
|
828
|
-
if (columnSelectedWidget) {
|
|
829
|
-
option = columnSelectedWidget.options;
|
|
830
|
-
selectedWidget = columnSelectedWidget;
|
|
831
|
-
} else {
|
|
832
|
-
option = {};
|
|
833
|
-
selectedWidget = {};
|
|
834
|
-
}
|
|
835
|
-
|
|
836
|
-
let columnOption = this.$baseLodash.cloneDeep(option);
|
|
837
|
-
row.columnOption = columnOption;
|
|
838
|
-
this.operateIndex = index;
|
|
839
|
-
|
|
840
|
-
this.openWidgetPropertyDialog({
|
|
841
|
-
row: row,
|
|
842
|
-
columnSelectedWidget: selectedWidget,
|
|
843
|
-
tableColumns: this.optionModel.tableColumns,
|
|
844
|
-
index: index,
|
|
845
|
-
columnEditFields: columnEditFields,
|
|
846
|
-
callback: (columnOption) => {
|
|
847
|
-
this.confirmFormatConfigDialog(columnOption);
|
|
848
|
-
},
|
|
849
|
-
});
|
|
850
|
-
},
|
|
851
|
-
confirmFormatConfigDialog(columnOption) {
|
|
785
|
+
confirmFormatConfigDialog(columnSelectedWidget) {
|
|
786
|
+
const options = columnSelectedWidget.options;
|
|
852
787
|
let row = this.optionModel.tableColumns[this.operateIndex];
|
|
853
|
-
row.
|
|
854
|
-
row.prop =
|
|
855
|
-
row.label =
|
|
856
|
-
row.required =
|
|
788
|
+
row.widget = columnSelectedWidget;
|
|
789
|
+
row.prop = options.name;
|
|
790
|
+
row.label = options.label;
|
|
791
|
+
row.required = options.required;
|
|
857
792
|
},
|
|
858
793
|
openFieldTreeDialog() {
|
|
859
794
|
this.treeData = [
|
|
@@ -923,8 +858,8 @@ export default {
|
|
|
923
858
|
this.treeData.forEach((item1) => {
|
|
924
859
|
item1.children.forEach((item2) => {
|
|
925
860
|
if (
|
|
926
|
-
fields.includes(item2.name)
|
|
927
|
-
|
|
861
|
+
fields.includes(item2.name) &&
|
|
862
|
+
!defaultCheckedKeys.includes(item2.name)
|
|
928
863
|
) {
|
|
929
864
|
defaultCheckedKeys.push(item2.name);
|
|
930
865
|
}
|
|
@@ -968,10 +903,10 @@ export default {
|
|
|
968
903
|
this.showTableConfigDialog = true;
|
|
969
904
|
},
|
|
970
905
|
downloadExcel() {
|
|
971
|
-
let defaultUrl
|
|
972
|
-
|
|
973
|
-
let xformImportTemplateFile
|
|
974
|
-
|
|
906
|
+
let defaultUrl =
|
|
907
|
+
"http://file.sc.5mall.com/download/repo1/b/mk1/2024/12/13/b2aea548-a9a8-4dca-bba7-8d9c6134ebe3.xlsx";
|
|
908
|
+
let xformImportTemplateFile =
|
|
909
|
+
setttingConfig.xformImportTemplateFile || defaultUrl;
|
|
975
910
|
if (!xformImportTemplateFile) return;
|
|
976
911
|
this.$commonFileUtil.downloadFile(
|
|
977
912
|
xformImportTemplateFile,
|
|
@@ -1035,19 +1035,17 @@ export default {
|
|
|
1035
1035
|
return;
|
|
1036
1036
|
}
|
|
1037
1037
|
if (key === "columnOption") {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
: val;
|
|
1038
|
+
if (!row.widget) {
|
|
1039
|
+
cloned.columnOption =
|
|
1040
|
+
val !== null && typeof val === "object" ? deepClone(val) : val;
|
|
1041
|
+
}
|
|
1043
1042
|
return;
|
|
1044
1043
|
}
|
|
1045
1044
|
if (key === "editColumnOption") {
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
: val;
|
|
1045
|
+
if (!row.editWidget) {
|
|
1046
|
+
cloned.editColumnOption =
|
|
1047
|
+
val !== null && typeof val === "object" ? deepClone(val) : val;
|
|
1048
|
+
}
|
|
1051
1049
|
return;
|
|
1052
1050
|
}
|
|
1053
1051
|
if (val !== null && typeof val === "object") {
|
|
@@ -1066,12 +1064,6 @@ export default {
|
|
|
1066
1064
|
if (row.editWidget && !cloned.editWidget) {
|
|
1067
1065
|
cloned.editWidget = row.editWidget;
|
|
1068
1066
|
}
|
|
1069
|
-
if (row.widget) {
|
|
1070
|
-
cloned.columnOption = row.widget.options;
|
|
1071
|
-
}
|
|
1072
|
-
if (row.editWidget) {
|
|
1073
|
-
cloned.editColumnOption = row.editWidget.options;
|
|
1074
|
-
}
|
|
1075
1067
|
return cloned;
|
|
1076
1068
|
};
|
|
1077
1069
|
return columns.map(cloneRow);
|
|
@@ -1112,18 +1104,6 @@ export default {
|
|
|
1112
1104
|
next.widgetList = orig.widgetList;
|
|
1113
1105
|
}
|
|
1114
1106
|
}
|
|
1115
|
-
if (next.widget) {
|
|
1116
|
-
next.columnOption = next.widget.options;
|
|
1117
|
-
} else if (orig && orig.widget) {
|
|
1118
|
-
next.widget = orig.widget;
|
|
1119
|
-
next.columnOption = orig.widget.options;
|
|
1120
|
-
}
|
|
1121
|
-
if (next.editWidget) {
|
|
1122
|
-
next.editColumnOption = next.editWidget.options;
|
|
1123
|
-
} else if (orig && orig.editWidget) {
|
|
1124
|
-
next.editWidget = orig.editWidget;
|
|
1125
|
-
next.editColumnOption = orig.editWidget.options;
|
|
1126
|
-
}
|
|
1127
1107
|
if (next.children && next.children.length) {
|
|
1128
1108
|
next.children = this.restoreColumnWidgetRefs(
|
|
1129
1109
|
next.children,
|
|
@@ -1551,17 +1531,12 @@ export default {
|
|
|
1551
1531
|
changeFormatS(row, isEdit) {
|
|
1552
1532
|
let formatS = isEdit ? row.editFormatS : row.formatS;
|
|
1553
1533
|
let isButtontCell = this.getIsButtontCell(formatS);
|
|
1554
|
-
// let columnWidgetConfig = this.getColumnWidgetConfig(row, true, isEdit);
|
|
1555
|
-
// let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
|
1556
1534
|
let attachmentPrefix = this.designer.getAttachmentPrefix();
|
|
1557
1535
|
let columnSelectedWidget = this.designer.createColumnWidget(row, isEdit);
|
|
1558
1536
|
if (!isEdit) {
|
|
1559
|
-
//格式化类型
|
|
1560
1537
|
if (columnSelectedWidget) {
|
|
1561
|
-
row.columnOption = columnSelectedWidget.options;
|
|
1562
1538
|
row.widget = columnSelectedWidget;
|
|
1563
1539
|
} else {
|
|
1564
|
-
row.columnOption = {};
|
|
1565
1540
|
row.widget = null;
|
|
1566
1541
|
}
|
|
1567
1542
|
row.utcTransformEnabled = false;
|
|
@@ -1571,12 +1546,9 @@ export default {
|
|
|
1571
1546
|
columnSelectedWidget.options.keyName = row.prop;
|
|
1572
1547
|
columnSelectedWidget.options.keyNameSuffix = suffix;
|
|
1573
1548
|
}
|
|
1574
|
-
//编辑插槽类型
|
|
1575
1549
|
if (columnSelectedWidget) {
|
|
1576
|
-
row.columnOption = columnSelectedWidget.options;
|
|
1577
1550
|
row.editWidget = columnSelectedWidget;
|
|
1578
1551
|
} else {
|
|
1579
|
-
row.editColumnOption = {};
|
|
1580
1552
|
row.editWidget = null;
|
|
1581
1553
|
}
|
|
1582
1554
|
}
|
|
@@ -1587,7 +1559,6 @@ export default {
|
|
|
1587
1559
|
row.label = null;
|
|
1588
1560
|
row.sortable = false;
|
|
1589
1561
|
row.width = 150;
|
|
1590
|
-
row.columnOption = {};
|
|
1591
1562
|
row.widget = null;
|
|
1592
1563
|
} else if (isButtontCell) {
|
|
1593
1564
|
if (row.formatS == "dropdown") {
|
|
@@ -1636,97 +1607,79 @@ export default {
|
|
|
1636
1607
|
let type = this.columnFormatMap[formatS];
|
|
1637
1608
|
|
|
1638
1609
|
if (type) {
|
|
1639
|
-
const
|
|
1640
|
-
|
|
1641
|
-
columnSelectedWidget = this.$baseLodash.cloneDeep(existingWidget);
|
|
1642
|
-
} else {
|
|
1643
|
-
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
|
1644
|
-
this.designer.getFieldWidgetByType(type)
|
|
1645
|
-
);
|
|
1646
|
-
}
|
|
1647
|
-
let columnOption;
|
|
1648
|
-
if (!isEdit) {
|
|
1649
|
-
columnOption = row.columnOption;
|
|
1650
|
-
} else {
|
|
1651
|
-
columnOption = row.editColumnOption;
|
|
1652
|
-
}
|
|
1653
|
-
if (!isChange && existingWidget) {
|
|
1654
|
-
columnOption = columnSelectedWidget.options;
|
|
1655
|
-
columnOption.required = row.required || false;
|
|
1610
|
+
const applyNewWidgetDefaults = (widget) => {
|
|
1611
|
+
widget.options.required = row.required || false;
|
|
1656
1612
|
if ("editDelete" == formatS) {
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
columnOption.prefixIcon || "el-icon-edit";
|
|
1663
|
-
}
|
|
1664
|
-
} else if (!isChange && columnOption && Object.keys(columnOption).length) {
|
|
1665
|
-
columnOption.required = row.required || false;
|
|
1666
|
-
columnSelectedWidget.options = columnOption;
|
|
1667
|
-
if ("editDelete" == formatS) {
|
|
1668
|
-
columnSelectedWidget.options.hiddenByWf =
|
|
1669
|
-
columnSelectedWidget.options.hiddenByWf ?? true;
|
|
1670
|
-
columnSelectedWidget.options.prefixIcon =
|
|
1671
|
-
columnSelectedWidget.options.prefixIcon || "el-icon-delete";
|
|
1672
|
-
} else if ("editButton" == formatS) {
|
|
1673
|
-
columnSelectedWidget.options.prefixIcon =
|
|
1674
|
-
columnSelectedWidget.options.prefixIcon || "el-icon-edit";
|
|
1675
|
-
}
|
|
1676
|
-
} else {
|
|
1677
|
-
columnSelectedWidget.options.required = row.required || false;
|
|
1678
|
-
|
|
1679
|
-
if ("editDelete" == formatS) {
|
|
1680
|
-
columnSelectedWidget.options.prefixIcon = "el-icon-delete";
|
|
1681
|
-
columnSelectedWidget.options.label = "删除";
|
|
1682
|
-
columnSelectedWidget.options.labelHidden = true;
|
|
1683
|
-
columnSelectedWidget.options.hiddenByWf = true;
|
|
1684
|
-
columnSelectedWidget.options.onClick =
|
|
1613
|
+
widget.options.prefixIcon = "el-icon-delete";
|
|
1614
|
+
widget.options.label = "删除";
|
|
1615
|
+
widget.options.labelHidden = true;
|
|
1616
|
+
widget.options.hiddenByWf = true;
|
|
1617
|
+
widget.options.onClick =
|
|
1685
1618
|
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
|
|
1686
1619
|
} else if ("editButton" == formatS) {
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1620
|
+
widget.options.prefixIcon = "el-icon-edit";
|
|
1621
|
+
widget.options.label = "查看";
|
|
1622
|
+
widget.options.labelHidden = true;
|
|
1623
|
+
widget.options.onClick =
|
|
1691
1624
|
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
|
|
1692
1625
|
} else if ("addSiblingEditRow" == formatS) {
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1626
|
+
widget.options.prefixIcon = "el-icon-plus";
|
|
1627
|
+
widget.options.label = "新增兄弟节点";
|
|
1628
|
+
widget.options.labelHidden = false;
|
|
1629
|
+
widget.options.onClick =
|
|
1697
1630
|
"let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
|
|
1698
1631
|
} else if ("addChildTreeRow" == formatS) {
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1632
|
+
widget.options.prefixIcon = "el-icon-plus";
|
|
1633
|
+
widget.options.label = "新增子节点";
|
|
1634
|
+
widget.options.labelHidden = false;
|
|
1635
|
+
widget.options.onClick =
|
|
1703
1636
|
"let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
|
|
1704
1637
|
} else if ("moveUpRow" == formatS) {
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
columnSelectedWidget.options.onClick =
|
|
1638
|
+
widget.options.label = "↑上移";
|
|
1639
|
+
widget.options.labelHidden = false;
|
|
1640
|
+
widget.options.onClick =
|
|
1709
1641
|
"let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
|
|
1710
1642
|
} else if ("moveDownRow" == formatS) {
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
columnSelectedWidget.options.onClick =
|
|
1643
|
+
widget.options.label = "↓下移";
|
|
1644
|
+
widget.options.labelHidden = false;
|
|
1645
|
+
widget.options.onClick =
|
|
1715
1646
|
"let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
|
|
1716
1647
|
} else if ("removeTreeRow" == formatS) {
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1648
|
+
widget.options.prefixIcon = "el-icon-delete";
|
|
1649
|
+
widget.options.label = "删除";
|
|
1650
|
+
widget.options.labelHidden = true;
|
|
1651
|
+
widget.options.onClick =
|
|
1721
1652
|
"let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
|
|
1722
1653
|
}
|
|
1654
|
+
};
|
|
1723
1655
|
|
|
1724
|
-
|
|
1656
|
+
if (!isChange) {
|
|
1657
|
+
const sourceWidget = this.designer.getColumnWidget(row, isEdit);
|
|
1658
|
+
if (sourceWidget) {
|
|
1659
|
+
columnSelectedWidget = this.$baseLodash.cloneDeep(sourceWidget);
|
|
1660
|
+
columnSelectedWidget.options.required = row.required || false;
|
|
1661
|
+
if ("editDelete" == formatS) {
|
|
1662
|
+
columnSelectedWidget.options.hiddenByWf =
|
|
1663
|
+
columnSelectedWidget.options.hiddenByWf ?? true;
|
|
1664
|
+
columnSelectedWidget.options.prefixIcon =
|
|
1665
|
+
columnSelectedWidget.options.prefixIcon || "el-icon-delete";
|
|
1666
|
+
} else if ("editButton" == formatS) {
|
|
1667
|
+
columnSelectedWidget.options.prefixIcon =
|
|
1668
|
+
columnSelectedWidget.options.prefixIcon || "el-icon-edit";
|
|
1669
|
+
}
|
|
1670
|
+
} else {
|
|
1671
|
+
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
|
1672
|
+
this.designer.getFieldWidgetByType(type)
|
|
1673
|
+
);
|
|
1674
|
+
applyNewWidgetDefaults(columnSelectedWidget);
|
|
1675
|
+
}
|
|
1676
|
+
} else {
|
|
1677
|
+
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
|
1678
|
+
this.designer.getFieldWidgetByType(type)
|
|
1679
|
+
);
|
|
1680
|
+
applyNewWidgetDefaults(columnSelectedWidget);
|
|
1725
1681
|
}
|
|
1726
1682
|
|
|
1727
|
-
// columnSelectedWidget.options.name = isEdit? (type + row.columnId) : row.prop;
|
|
1728
|
-
// columnSelectedWidget.options.name = type + row.columnId;
|
|
1729
|
-
// columnSelectedWidget.options.name = row.prop;
|
|
1730
1683
|
if (columnSelectedWidget.options.hasOwnProperty("keyName")) {
|
|
1731
1684
|
columnSelectedWidget.options.keyName = row.prop;
|
|
1732
1685
|
columnSelectedWidget.options.keyNameEnabled = true;
|
|
@@ -1745,8 +1698,6 @@ export default {
|
|
|
1745
1698
|
let result = null;
|
|
1746
1699
|
if (columnList) {
|
|
1747
1700
|
let column = columnList.find((item) => item.columnId == columnId);
|
|
1748
|
-
if (!column) {
|
|
1749
|
-
}
|
|
1750
1701
|
for (let column of columnList) {
|
|
1751
1702
|
if (column.columnId == columnId) {
|
|
1752
1703
|
result = column;
|
|
@@ -1791,9 +1742,7 @@ export default {
|
|
|
1791
1742
|
if (row.formatS == "widgetRender") {
|
|
1792
1743
|
let formWidgetList = deepClone(this.designer.widgetList);
|
|
1793
1744
|
const widgetMap = this.buildColumnWidgetMap(
|
|
1794
|
-
this.sourceTableColumnsSnapshot
|
|
1795
|
-
|| this.optionModel.tableColumns
|
|
1796
|
-
|| []
|
|
1745
|
+
this.sourceTableColumnsSnapshot || this.optionModel.tableColumns || []
|
|
1797
1746
|
);
|
|
1798
1747
|
let tableData = this.restoreColumnWidgetRefs(
|
|
1799
1748
|
this.cloneTableColumnsForEdit(this.tableData),
|
|
@@ -1844,8 +1793,8 @@ export default {
|
|
|
1844
1793
|
tableColumns: this.tableData,
|
|
1845
1794
|
index: index,
|
|
1846
1795
|
columnEditFields,
|
|
1847
|
-
callback: (
|
|
1848
|
-
this.confirmFormatConfigDialog(
|
|
1796
|
+
callback: (confirmedWidget) => {
|
|
1797
|
+
this.confirmFormatConfigDialog(confirmedWidget, row);
|
|
1849
1798
|
},
|
|
1850
1799
|
});
|
|
1851
1800
|
},
|
|
@@ -1853,35 +1802,15 @@ export default {
|
|
|
1853
1802
|
let o = options.name;
|
|
1854
1803
|
return (options.keyNameEnabled && options.keyName) || o;
|
|
1855
1804
|
},
|
|
1856
|
-
confirmFormatConfigDialog(
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
if (row.widget) {
|
|
1861
|
-
row.widget.options = columnOption;
|
|
1862
|
-
if (columnSelectedWidget && columnSelectedWidget.widgetList) {
|
|
1863
|
-
row.widget.widgetList = this.$baseLodash.cloneDeep(
|
|
1864
|
-
columnSelectedWidget.widgetList
|
|
1865
|
-
);
|
|
1866
|
-
}
|
|
1867
|
-
} else {
|
|
1868
|
-
let type = this.columnFormatMap[row.formatS];
|
|
1869
|
-
let fieldWidget = this.designer.createColumnWidget(row, false);
|
|
1870
|
-
fieldWidget.options = columnOption;
|
|
1871
|
-
if (columnSelectedWidget && columnSelectedWidget.widgetList) {
|
|
1872
|
-
fieldWidget.widgetList = this.$baseLodash.cloneDeep(
|
|
1873
|
-
columnSelectedWidget.widgetList
|
|
1874
|
-
);
|
|
1875
|
-
}
|
|
1876
|
-
row.widget = fieldWidget;
|
|
1877
|
-
this.$forceUpdate();
|
|
1878
|
-
}
|
|
1805
|
+
confirmFormatConfigDialog(columnSelectedWidget, row) {
|
|
1806
|
+
row.widget = columnSelectedWidget;
|
|
1807
|
+
const options = columnSelectedWidget.options;
|
|
1879
1808
|
|
|
1880
1809
|
let isButtontCell = this.getIsButtontCell(row.formatS);
|
|
1881
1810
|
if (!isButtontCell) {
|
|
1882
|
-
row.prop = this.getFieldKeyNameByOptions(
|
|
1883
|
-
row.label =
|
|
1884
|
-
row.required =
|
|
1811
|
+
row.prop = this.getFieldKeyNameByOptions(options);
|
|
1812
|
+
row.label = options.label;
|
|
1813
|
+
row.required = options.required;
|
|
1885
1814
|
}
|
|
1886
1815
|
},
|
|
1887
1816
|
openEditFormatConfigDialog(row, index) {
|
|
@@ -1901,43 +1830,13 @@ export default {
|
|
|
1901
1830
|
columnSelectedWidget,
|
|
1902
1831
|
index: index,
|
|
1903
1832
|
columnEditFields,
|
|
1904
|
-
callback: (
|
|
1905
|
-
this.confirmEditFormatConfigDialog(
|
|
1906
|
-
columnOption,
|
|
1907
|
-
row,
|
|
1908
|
-
columnSelectedWidget
|
|
1909
|
-
);
|
|
1833
|
+
callback: (confirmedWidget) => {
|
|
1834
|
+
this.confirmEditFormatConfigDialog(confirmedWidget, row);
|
|
1910
1835
|
},
|
|
1911
1836
|
});
|
|
1912
1837
|
},
|
|
1913
|
-
confirmEditFormatConfigDialog(
|
|
1914
|
-
|
|
1915
|
-
row.editColumnOption = columnOption;
|
|
1916
|
-
// row.editWidget.options = columnOption;
|
|
1917
|
-
|
|
1918
|
-
if (row.editWidget) {
|
|
1919
|
-
row.editWidget.options = columnOption;
|
|
1920
|
-
if (columnSelectedWidget && columnSelectedWidget.widgetList) {
|
|
1921
|
-
row.editWidget.widgetList = this.$baseLodash.cloneDeep(
|
|
1922
|
-
columnSelectedWidget.widgetList
|
|
1923
|
-
);
|
|
1924
|
-
}
|
|
1925
|
-
} else {
|
|
1926
|
-
let type = this.columnFormatMap[row.editFormatS];
|
|
1927
|
-
let fieldWidget = this.designer.createColumnWidget(row, true);
|
|
1928
|
-
fieldWidget.options = columnOption;
|
|
1929
|
-
if (columnSelectedWidget && columnSelectedWidget.widgetList) {
|
|
1930
|
-
fieldWidget.widgetList = this.$baseLodash.cloneDeep(
|
|
1931
|
-
columnSelectedWidget.widgetList
|
|
1932
|
-
);
|
|
1933
|
-
}
|
|
1934
|
-
row.editWidget = fieldWidget;
|
|
1935
|
-
this.$forceUpdate();
|
|
1936
|
-
}
|
|
1937
|
-
|
|
1938
|
-
/*row.prop = columnOption.name;
|
|
1939
|
-
row.label = columnOption.label;
|
|
1940
|
-
row.required = columnOption.required;*/
|
|
1838
|
+
confirmEditFormatConfigDialog(columnSelectedWidget, row) {
|
|
1839
|
+
row.editWidget = columnSelectedWidget;
|
|
1941
1840
|
},
|
|
1942
1841
|
openTableColumnConfigDialog(row, index) {
|
|
1943
1842
|
this.operateIndex = index;
|
|
@@ -1955,7 +1854,6 @@ export default {
|
|
|
1955
1854
|
this.showTableColumnConfigDialog = true;
|
|
1956
1855
|
},
|
|
1957
1856
|
saveTableColumnConfigDialog() {
|
|
1958
|
-
// let row = this.tableData[this.operateIndex];
|
|
1959
1857
|
let row = this.currentTableColumn;
|
|
1960
1858
|
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
|
1961
1859
|
let syntaxErrorFlag = false;
|
|
@@ -2004,25 +1902,15 @@ export default {
|
|
|
2004
1902
|
)
|
|
2005
1903
|
: null;
|
|
2006
1904
|
|
|
2007
|
-
if (newWidget.formItemFlag) {
|
|
2008
|
-
if (row.widget) {
|
|
2009
|
-
|
|
2010
|
-
row.widget.options[key] = value;
|
|
2011
|
-
}
|
|
2012
|
-
if (row.columnOption) {
|
|
2013
|
-
if (row.columnOption[key] !== undefined)
|
|
2014
|
-
row.columnOption[key] = value;
|
|
1905
|
+
if (newWidget && newWidget.formItemFlag && row.widget) {
|
|
1906
|
+
if (row.widget.options[key] !== undefined) {
|
|
1907
|
+
row.widget.options[key] = value;
|
|
2015
1908
|
}
|
|
2016
1909
|
}
|
|
2017
1910
|
|
|
2018
|
-
if (
|
|
2019
|
-
if (row.editWidget) {
|
|
2020
|
-
|
|
2021
|
-
row.editWidget.options[key] = value;
|
|
2022
|
-
}
|
|
2023
|
-
if (row.editColumnOption) {
|
|
2024
|
-
if (row.editColumnOption[key] !== undefined)
|
|
2025
|
-
row.editColumnOption[key] = value;
|
|
1911
|
+
if (newEditWidget && newEditWidget.formItemFlag && row.editWidget) {
|
|
1912
|
+
if (row.editWidget.options[key] !== undefined) {
|
|
1913
|
+
row.editWidget.options[key] = value;
|
|
2026
1914
|
}
|
|
2027
1915
|
}
|
|
2028
1916
|
},
|
|
@@ -2036,11 +1924,9 @@ export default {
|
|
|
2036
1924
|
Object.assign(this.editRowData, this.rowData);
|
|
2037
1925
|
if (this.rowData.widget) {
|
|
2038
1926
|
this.editRowData.widget = this.rowData.widget;
|
|
2039
|
-
this.editRowData.columnOption = this.rowData.widget.options;
|
|
2040
1927
|
}
|
|
2041
1928
|
if (this.rowData.editWidget) {
|
|
2042
1929
|
this.editRowData.editWidget = this.rowData.editWidget;
|
|
2043
|
-
this.editRowData.editColumnOption = this.rowData.editWidget.options;
|
|
2044
1930
|
}
|
|
2045
1931
|
if (this.rowData.widgetList && this.rowData.widgetList.length) {
|
|
2046
1932
|
this.editRowData.widgetList = this.rowData.widgetList;
|
|
@@ -668,13 +668,7 @@ export default {
|
|
|
668
668
|
}
|
|
669
669
|
},
|
|
670
670
|
changeFormatS(row) {
|
|
671
|
-
|
|
672
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
|
673
|
-
if (columnSelectedWidget) {
|
|
674
|
-
row.columnOption = columnSelectedWidget.options;
|
|
675
|
-
} else {
|
|
676
|
-
row.columnOption = {}
|
|
677
|
-
}
|
|
671
|
+
row.widget = this.designer.createColumnWidget(row, false) || null;
|
|
678
672
|
if (row.formatS == 'editDelete' || row.formatS == 'editButton') {
|
|
679
673
|
row.width = 47;
|
|
680
674
|
row.prop = null;
|
|
@@ -689,24 +683,32 @@ export default {
|
|
|
689
683
|
}
|
|
690
684
|
},
|
|
691
685
|
getColumnWidgetConfig(row, isChange) {
|
|
692
|
-
let formatS = row.formatS
|
|
693
686
|
let columnSelectedWidget = null;
|
|
694
687
|
let columnEditFields = null;
|
|
695
688
|
|
|
696
689
|
let type = this.columnFormatMap[row.formatS];
|
|
697
690
|
|
|
698
691
|
if (type) {
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
692
|
+
if (!isChange) {
|
|
693
|
+
const sourceWidget = this.designer.getColumnWidget(row, false);
|
|
694
|
+
if (sourceWidget) {
|
|
695
|
+
columnSelectedWidget = this.$baseLodash.cloneDeep(sourceWidget);
|
|
696
|
+
columnSelectedWidget.options.required = row.required || false;
|
|
697
|
+
} else {
|
|
698
|
+
columnSelectedWidget = this.$baseLodash.cloneDeep(this.designer.getFieldWidgetByType(type));
|
|
699
|
+
let tmpId = generateId();
|
|
700
|
+
let idVal = row.prop ? row.prop : (type + tmpId);
|
|
701
|
+
columnSelectedWidget.id = idVal;
|
|
702
|
+
columnSelectedWidget.options.name = idVal;
|
|
703
|
+
columnSelectedWidget.options.required = row.required || false;
|
|
704
|
+
}
|
|
707
705
|
} else {
|
|
706
|
+
columnSelectedWidget = this.$baseLodash.cloneDeep(this.designer.getFieldWidgetByType(type));
|
|
707
|
+
let tmpId = generateId();
|
|
708
|
+
let idVal = row.prop ? row.prop : (type + tmpId);
|
|
709
|
+
columnSelectedWidget.id = idVal;
|
|
710
|
+
columnSelectedWidget.options.name = idVal;
|
|
708
711
|
columnSelectedWidget.options.required = row.required || false;
|
|
709
|
-
row.columnOption = columnSelectedWidget.options;
|
|
710
712
|
}
|
|
711
713
|
columnSelectedWidget.options.name = row.prop;
|
|
712
714
|
columnSelectedWidget.options.label = row.label;
|
|
@@ -716,38 +718,32 @@ export default {
|
|
|
716
718
|
return {columnSelectedWidget, columnEditFields};
|
|
717
719
|
},
|
|
718
720
|
openFormatConfigDialog(row, index) {
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
|
723
|
-
if (columnSelectedWidget) {
|
|
724
|
-
option = columnSelectedWidget.options;
|
|
725
|
-
selectedWidget = columnSelectedWidget;
|
|
726
|
-
} else {
|
|
727
|
-
option = {}
|
|
728
|
-
selectedWidget = {};
|
|
721
|
+
const {columnSelectedWidget, columnEditFields} = this.getColumnWidgetConfig(row);
|
|
722
|
+
if (!columnSelectedWidget) {
|
|
723
|
+
return;
|
|
729
724
|
}
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
725
|
+
columnSelectedWidget.options = this.$baseLodash.cloneDeep(
|
|
726
|
+
columnSelectedWidget.options
|
|
727
|
+
);
|
|
733
728
|
this.operateIndex = index;
|
|
734
729
|
|
|
735
730
|
this.openWidgetPropertyDialog({
|
|
736
731
|
row: row,
|
|
737
|
-
columnSelectedWidget
|
|
732
|
+
columnSelectedWidget,
|
|
738
733
|
index: index,
|
|
739
734
|
columnEditFields: columnEditFields,
|
|
740
|
-
callback: (
|
|
741
|
-
this.confirmFormatConfigDialog(
|
|
735
|
+
callback: (confirmedWidget) => {
|
|
736
|
+
this.confirmFormatConfigDialog(confirmedWidget);
|
|
742
737
|
}
|
|
743
738
|
})
|
|
744
739
|
},
|
|
745
|
-
confirmFormatConfigDialog(
|
|
740
|
+
confirmFormatConfigDialog(columnSelectedWidget) {
|
|
741
|
+
const options = columnSelectedWidget.options;
|
|
746
742
|
let row = this.optionModel.tableColumns[this.operateIndex];
|
|
747
|
-
row.
|
|
748
|
-
row.prop =
|
|
749
|
-
row.label =
|
|
750
|
-
row.required =
|
|
743
|
+
row.widget = columnSelectedWidget;
|
|
744
|
+
row.prop = options.name;
|
|
745
|
+
row.label = options.label;
|
|
746
|
+
row.required = options.required;
|
|
751
747
|
},
|
|
752
748
|
openFieldTreeDialog() {
|
|
753
749
|
this.treeData = [{
|
package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue
CHANGED
|
@@ -107,8 +107,8 @@ export default {
|
|
|
107
107
|
openEditFormatConfigDialog(fieldWidget, index) {
|
|
108
108
|
this.openWidgetPropertyDialog({
|
|
109
109
|
columnSelectedWidget: deepClone(fieldWidget),
|
|
110
|
-
callback: (
|
|
111
|
-
fieldWidget.options =
|
|
110
|
+
callback: (columnSelectedWidget) => {
|
|
111
|
+
fieldWidget.options = columnSelectedWidget.options;
|
|
112
112
|
},
|
|
113
113
|
});
|
|
114
114
|
},
|
package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue
CHANGED
|
@@ -315,9 +315,8 @@ export default {
|
|
|
315
315
|
columnSelectedWidget: widget,
|
|
316
316
|
// index: index,
|
|
317
317
|
// columnEditFields: columnEditFields,
|
|
318
|
-
callback: (
|
|
319
|
-
widget.options =
|
|
320
|
-
// this.confirmFormatConfigDialog(columnOption, row);
|
|
318
|
+
callback: (columnSelectedWidget) => {
|
|
319
|
+
widget.options = columnSelectedWidget.options;
|
|
321
320
|
},
|
|
322
321
|
});
|
|
323
322
|
},
|
|
@@ -63,10 +63,10 @@ export default {
|
|
|
63
63
|
}
|
|
64
64
|
const dialog = this.widgetPropertyDialogs[index];
|
|
65
65
|
if (invokeCallback && dialog.formatConfig && dialog.formatConfig.callback) {
|
|
66
|
-
const
|
|
67
|
-
dialog.columnSelectedWidget
|
|
66
|
+
const columnSelectedWidget = this.$baseLodash.cloneDeep(
|
|
67
|
+
dialog.columnSelectedWidget
|
|
68
68
|
);
|
|
69
|
-
dialog.formatConfig.callback(
|
|
69
|
+
dialog.formatConfig.callback(columnSelectedWidget);
|
|
70
70
|
}
|
|
71
71
|
this.widgetPropertyDialogs.splice(index, 1);
|
|
72
72
|
if (this.activePropertyDialogId === id) {
|
|
@@ -799,22 +799,6 @@ modules = {
|
|
|
799
799
|
};
|
|
800
800
|
|
|
801
801
|
const addColumProperty = (col, t) => {
|
|
802
|
-
/*let columnOption;
|
|
803
|
-
let widget;
|
|
804
|
-
let columnWidgetConfig = this.getColumnWidgetConfig(t);
|
|
805
|
-
let {columnSelectedWidget, columnEditFields} = columnWidgetConfig;
|
|
806
|
-
if (columnSelectedWidget) {
|
|
807
|
-
widget = columnSelectedWidget;
|
|
808
|
-
columnOption = widget.options;
|
|
809
|
-
} else {
|
|
810
|
-
columnOption = {};
|
|
811
|
-
}
|
|
812
|
-
|
|
813
|
-
let {columnSelectedWidget: editWidget} = this.getColumnWidgetConfig(
|
|
814
|
-
t,
|
|
815
|
-
true
|
|
816
|
-
);*/
|
|
817
|
-
|
|
818
802
|
let widget = t.widget ?? null;
|
|
819
803
|
let editWidget = t.editWidget ?? null;
|
|
820
804
|
let columnOption = {};
|
|
@@ -828,9 +812,10 @@ modules = {
|
|
|
828
812
|
required: t.required || false,
|
|
829
813
|
columnConfig: t,
|
|
830
814
|
editWidget,
|
|
831
|
-
utcTransformEnabled:
|
|
832
|
-
|
|
833
|
-
|
|
815
|
+
utcTransformEnabled:
|
|
816
|
+
widget || editWidget
|
|
817
|
+
? !!columnOption.utcTransformEnabled
|
|
818
|
+
: this.isColumnLevelUtcFormat(t.formatS)
|
|
834
819
|
? !!t.utcTransformEnabled
|
|
835
820
|
: false,
|
|
836
821
|
};
|
|
@@ -908,7 +893,9 @@ modules = {
|
|
|
908
893
|
if (Array.isArray(displayVal)) {
|
|
909
894
|
return displayVal
|
|
910
895
|
.map((item) =>
|
|
911
|
-
typeof item === "string"
|
|
896
|
+
typeof item === "string"
|
|
897
|
+
? item.substring(0, 10)
|
|
898
|
+
: item
|
|
912
899
|
)
|
|
913
900
|
.join(",");
|
|
914
901
|
} else {
|
|
@@ -2220,118 +2207,10 @@ modules = {
|
|
|
2220
2207
|
let newData = this.createNewTableData();
|
|
2221
2208
|
tableRows.push(newData);
|
|
2222
2209
|
}
|
|
2223
|
-
// this.formModel[this.fieldKeyName] = this.$baseLodash(this.fieldModel)
|
|
2224
|
-
// this.fieldModel = tableRows
|
|
2225
2210
|
this.setValue(tableRows);
|
|
2226
2211
|
this.$nextTick(() => {
|
|
2227
2212
|
this.handleWbs();
|
|
2228
2213
|
});
|
|
2229
|
-
// $grid.loadData(tableRows);
|
|
2230
|
-
},
|
|
2231
|
-
getColumnWidgetConfig(row, isEdit) {
|
|
2232
|
-
let formatS = isEdit ? row.editFormatS : row.formatS;
|
|
2233
|
-
let formRef = this.getFormRef();
|
|
2234
|
-
let columnSelectedWidget = null;
|
|
2235
|
-
let columnEditFields = null;
|
|
2236
|
-
|
|
2237
|
-
let type = columnFormatMap[formatS];
|
|
2238
|
-
|
|
2239
|
-
if (type) {
|
|
2240
|
-
columnSelectedWidget = this.$baseLodash.cloneDeep(
|
|
2241
|
-
formRef.getFieldWidgetByType(type)
|
|
2242
|
-
);
|
|
2243
|
-
let tmpId = generateId();
|
|
2244
|
-
let idVal = row.prop ? row.prop : type + tmpId;
|
|
2245
|
-
/*
|
|
2246
|
-
columnSelectedWidget.id = idVal;*/
|
|
2247
|
-
/*if(isEdit){
|
|
2248
|
-
columnSelectedWidget.id = "edit_"+row.columnId;
|
|
2249
|
-
}else{
|
|
2250
|
-
columnSelectedWidget.id = row.columnId;
|
|
2251
|
-
}*/
|
|
2252
|
-
// columnSelectedWidget.id = row.columnId;
|
|
2253
|
-
|
|
2254
|
-
columnSelectedWidget.options.name = idVal;
|
|
2255
|
-
|
|
2256
|
-
let columnOption;
|
|
2257
|
-
if (!isEdit) {
|
|
2258
|
-
columnOption = row.columnOption;
|
|
2259
|
-
} else {
|
|
2260
|
-
columnOption = row.editColumnOption;
|
|
2261
|
-
}
|
|
2262
|
-
|
|
2263
|
-
if (columnOption && Object.keys(columnOption).length) {
|
|
2264
|
-
columnOption.required = row.required || false;
|
|
2265
|
-
columnSelectedWidget.options = columnOption;
|
|
2266
|
-
if ("editDelete" === formatS) {
|
|
2267
|
-
columnSelectedWidget.options.hiddenByWf =
|
|
2268
|
-
columnSelectedWidget.options.hiddenByWf ?? true;
|
|
2269
|
-
columnSelectedWidget.options.prefixIcon =
|
|
2270
|
-
columnSelectedWidget.options.prefixIcon || "el-icon-delete";
|
|
2271
|
-
} else if ("editButton" === formatS) {
|
|
2272
|
-
columnSelectedWidget.options.prefixIcon =
|
|
2273
|
-
columnSelectedWidget.options.prefixIcon || "el-icon-edit";
|
|
2274
|
-
}
|
|
2275
|
-
} else {
|
|
2276
|
-
columnSelectedWidget.options.required = row.required || false;
|
|
2277
|
-
if ("editDelete" === formatS) {
|
|
2278
|
-
columnSelectedWidget.options.prefixIcon = "el-icon-delete";
|
|
2279
|
-
columnSelectedWidget.options.label = "删除";
|
|
2280
|
-
columnSelectedWidget.options.labelHidden = true;
|
|
2281
|
-
columnSelectedWidget.options.hiddenByWf = true;
|
|
2282
|
-
columnSelectedWidget.options.onClick =
|
|
2283
|
-
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
|
|
2284
|
-
} else if ("editButton" === formatS) {
|
|
2285
|
-
columnSelectedWidget.options.prefixIcon = "el-icon-edit";
|
|
2286
|
-
columnSelectedWidget.options.label = "查看";
|
|
2287
|
-
columnSelectedWidget.options.labelHidden = true;
|
|
2288
|
-
columnSelectedWidget.options.onClick =
|
|
2289
|
-
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
|
|
2290
|
-
} else if ("addSiblingEditRow" === formatS) {
|
|
2291
|
-
columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
|
2292
|
-
columnSelectedWidget.options.label = "新增兄弟节点";
|
|
2293
|
-
columnSelectedWidget.options.labelHidden = false;
|
|
2294
|
-
columnSelectedWidget.options.onClick =
|
|
2295
|
-
"let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
|
|
2296
|
-
} else if ("addChildTreeRow" === formatS) {
|
|
2297
|
-
columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
|
2298
|
-
columnSelectedWidget.options.label = "新增子节点";
|
|
2299
|
-
columnSelectedWidget.options.labelHidden = false;
|
|
2300
|
-
columnSelectedWidget.options.onClick =
|
|
2301
|
-
"let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
|
|
2302
|
-
} else if ("moveUpRow" === formatS) {
|
|
2303
|
-
// columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
|
2304
|
-
columnSelectedWidget.options.label = "↑上移";
|
|
2305
|
-
columnSelectedWidget.options.labelHidden = false;
|
|
2306
|
-
columnSelectedWidget.options.onClick =
|
|
2307
|
-
"let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
|
|
2308
|
-
} else if ("moveDownRow" === formatS) {
|
|
2309
|
-
// columnSelectedWidget.options.prefixIcon = "el-icon-plus";
|
|
2310
|
-
columnSelectedWidget.options.label = "↓下移";
|
|
2311
|
-
columnSelectedWidget.options.labelHidden = false;
|
|
2312
|
-
columnSelectedWidget.options.onClick =
|
|
2313
|
-
"let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
|
|
2314
|
-
} else if ("removeTreeRow" === formatS) {
|
|
2315
|
-
columnSelectedWidget.options.prefixIcon = "el-icon-delete";
|
|
2316
|
-
columnSelectedWidget.options.label = "删除";
|
|
2317
|
-
columnSelectedWidget.options.labelHidden = true;
|
|
2318
|
-
columnSelectedWidget.options.onClick =
|
|
2319
|
-
"let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
|
|
2320
|
-
}
|
|
2321
|
-
columnOption = columnSelectedWidget.options;
|
|
2322
|
-
}
|
|
2323
|
-
if (columnSelectedWidget.options.hasOwnProperty("keyName")) {
|
|
2324
|
-
columnSelectedWidget.options.keyName = row.prop;
|
|
2325
|
-
columnSelectedWidget.options.keyNameEnabled = true;
|
|
2326
|
-
} else {
|
|
2327
|
-
columnSelectedWidget.options.name = row.prop;
|
|
2328
|
-
}
|
|
2329
|
-
if (type !== "button" && type !== "a-link") {
|
|
2330
|
-
columnSelectedWidget.options.label = row.label;
|
|
2331
|
-
columnSelectedWidget.options.labelHidden = true;
|
|
2332
|
-
}
|
|
2333
|
-
}
|
|
2334
|
-
return { columnSelectedWidget, columnEditFields };
|
|
2335
2214
|
},
|
|
2336
2215
|
getColumnProp2(fieldWidget, obj) {
|
|
2337
2216
|
let isQueryTable = this.widget.options.isQueryTable || false;
|