cloud-web-corejs 1.0.54-dev.663 → 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 +81 -202
- 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,
|
|
@@ -1196,8 +1176,6 @@ export default {
|
|
|
1196
1176
|
const source = this.optionModel.tableColumns || [];
|
|
1197
1177
|
this.sourceTableColumnsSnapshot = source;
|
|
1198
1178
|
this.tableData = this.cloneTableColumnsForEdit(source);
|
|
1199
|
-
debugger;
|
|
1200
|
-
let a = 1;
|
|
1201
1179
|
},
|
|
1202
1180
|
colSubmit() {
|
|
1203
1181
|
this.dialogVisible = !1;
|
|
@@ -1553,17 +1531,12 @@ export default {
|
|
|
1553
1531
|
changeFormatS(row, isEdit) {
|
|
1554
1532
|
let formatS = isEdit ? row.editFormatS : row.formatS;
|
|
1555
1533
|
let isButtontCell = this.getIsButtontCell(formatS);
|
|
1556
|
-
// let columnWidgetConfig = this.getColumnWidgetConfig(row, true, isEdit);
|
|
1557
|
-
// let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
|
1558
1534
|
let attachmentPrefix = this.designer.getAttachmentPrefix();
|
|
1559
1535
|
let columnSelectedWidget = this.designer.createColumnWidget(row, isEdit);
|
|
1560
1536
|
if (!isEdit) {
|
|
1561
|
-
//格式化类型
|
|
1562
1537
|
if (columnSelectedWidget) {
|
|
1563
|
-
row.columnOption = columnSelectedWidget.options;
|
|
1564
1538
|
row.widget = columnSelectedWidget;
|
|
1565
1539
|
} else {
|
|
1566
|
-
row.columnOption = {};
|
|
1567
1540
|
row.widget = null;
|
|
1568
1541
|
}
|
|
1569
1542
|
row.utcTransformEnabled = false;
|
|
@@ -1573,12 +1546,9 @@ export default {
|
|
|
1573
1546
|
columnSelectedWidget.options.keyName = row.prop;
|
|
1574
1547
|
columnSelectedWidget.options.keyNameSuffix = suffix;
|
|
1575
1548
|
}
|
|
1576
|
-
//编辑插槽类型
|
|
1577
1549
|
if (columnSelectedWidget) {
|
|
1578
|
-
row.columnOption = columnSelectedWidget.options;
|
|
1579
1550
|
row.editWidget = columnSelectedWidget;
|
|
1580
1551
|
} else {
|
|
1581
|
-
row.editColumnOption = {};
|
|
1582
1552
|
row.editWidget = null;
|
|
1583
1553
|
}
|
|
1584
1554
|
}
|
|
@@ -1589,7 +1559,6 @@ export default {
|
|
|
1589
1559
|
row.label = null;
|
|
1590
1560
|
row.sortable = false;
|
|
1591
1561
|
row.width = 150;
|
|
1592
|
-
row.columnOption = {};
|
|
1593
1562
|
row.widget = null;
|
|
1594
1563
|
} else if (isButtontCell) {
|
|
1595
1564
|
if (row.formatS == "dropdown") {
|
|
@@ -1638,100 +1607,79 @@ export default {
|
|
|
1638
1607
|
let type = this.columnFormatMap[formatS];
|
|
1639
1608
|
|
|
1640
1609
|
if (type) {
|
|
1641
|
-
const
|
|
1642
|
-
|
|
1643
|
-
columnSelectedWidget = this.$baseLodash.cloneDeep(existingWidget);
|
|
1644
|
-
} else {
|
|
1645
|
-
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
|
1646
|
-
this.designer.getFieldWidgetByType(type)
|
|
1647
|
-
);
|
|
1648
|
-
}
|
|
1649
|
-
let columnOption;
|
|
1650
|
-
if (!isEdit) {
|
|
1651
|
-
columnOption = row.columnOption;
|
|
1652
|
-
} else {
|
|
1653
|
-
columnOption = row.editColumnOption;
|
|
1654
|
-
}
|
|
1655
|
-
if (!isChange && existingWidget) {
|
|
1656
|
-
columnOption = columnSelectedWidget.options;
|
|
1657
|
-
columnOption.required = row.required || false;
|
|
1610
|
+
const applyNewWidgetDefaults = (widget) => {
|
|
1611
|
+
widget.options.required = row.required || false;
|
|
1658
1612
|
if ("editDelete" == formatS) {
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
}
|
|
1665
|
-
} else if (
|
|
1666
|
-
!isChange &&
|
|
1667
|
-
columnOption &&
|
|
1668
|
-
Object.keys(columnOption).length
|
|
1669
|
-
) {
|
|
1670
|
-
columnOption.required = row.required || false;
|
|
1671
|
-
columnSelectedWidget.options = columnOption;
|
|
1672
|
-
if ("editDelete" == formatS) {
|
|
1673
|
-
columnSelectedWidget.options.hiddenByWf =
|
|
1674
|
-
columnSelectedWidget.options.hiddenByWf ?? true;
|
|
1675
|
-
columnSelectedWidget.options.prefixIcon =
|
|
1676
|
-
columnSelectedWidget.options.prefixIcon || "el-icon-delete";
|
|
1677
|
-
} else if ("editButton" == formatS) {
|
|
1678
|
-
columnSelectedWidget.options.prefixIcon =
|
|
1679
|
-
columnSelectedWidget.options.prefixIcon || "el-icon-edit";
|
|
1680
|
-
}
|
|
1681
|
-
} else {
|
|
1682
|
-
columnSelectedWidget.options.required = row.required || false;
|
|
1683
|
-
|
|
1684
|
-
if ("editDelete" == formatS) {
|
|
1685
|
-
columnSelectedWidget.options.prefixIcon = "el-icon-delete";
|
|
1686
|
-
columnSelectedWidget.options.label = "删除";
|
|
1687
|
-
columnSelectedWidget.options.labelHidden = true;
|
|
1688
|
-
columnSelectedWidget.options.hiddenByWf = true;
|
|
1689
|
-
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 =
|
|
1690
1618
|
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
|
|
1691
1619
|
} else if ("editButton" == formatS) {
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1620
|
+
widget.options.prefixIcon = "el-icon-edit";
|
|
1621
|
+
widget.options.label = "查看";
|
|
1622
|
+
widget.options.labelHidden = true;
|
|
1623
|
+
widget.options.onClick =
|
|
1696
1624
|
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
|
|
1697
1625
|
} else if ("addSiblingEditRow" == formatS) {
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1626
|
+
widget.options.prefixIcon = "el-icon-plus";
|
|
1627
|
+
widget.options.label = "新增兄弟节点";
|
|
1628
|
+
widget.options.labelHidden = false;
|
|
1629
|
+
widget.options.onClick =
|
|
1702
1630
|
"let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
|
|
1703
1631
|
} else if ("addChildTreeRow" == formatS) {
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1632
|
+
widget.options.prefixIcon = "el-icon-plus";
|
|
1633
|
+
widget.options.label = "新增子节点";
|
|
1634
|
+
widget.options.labelHidden = false;
|
|
1635
|
+
widget.options.onClick =
|
|
1708
1636
|
"let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
|
|
1709
1637
|
} else if ("moveUpRow" == formatS) {
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
columnSelectedWidget.options.onClick =
|
|
1638
|
+
widget.options.label = "↑上移";
|
|
1639
|
+
widget.options.labelHidden = false;
|
|
1640
|
+
widget.options.onClick =
|
|
1714
1641
|
"let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
|
|
1715
1642
|
} else if ("moveDownRow" == formatS) {
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
columnSelectedWidget.options.onClick =
|
|
1643
|
+
widget.options.label = "↓下移";
|
|
1644
|
+
widget.options.labelHidden = false;
|
|
1645
|
+
widget.options.onClick =
|
|
1720
1646
|
"let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
|
|
1721
1647
|
} else if ("removeTreeRow" == formatS) {
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1648
|
+
widget.options.prefixIcon = "el-icon-delete";
|
|
1649
|
+
widget.options.label = "删除";
|
|
1650
|
+
widget.options.labelHidden = true;
|
|
1651
|
+
widget.options.onClick =
|
|
1726
1652
|
"let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
|
|
1727
1653
|
}
|
|
1654
|
+
};
|
|
1728
1655
|
|
|
1729
|
-
|
|
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);
|
|
1730
1681
|
}
|
|
1731
1682
|
|
|
1732
|
-
// columnSelectedWidget.options.name = isEdit? (type + row.columnId) : row.prop;
|
|
1733
|
-
// columnSelectedWidget.options.name = type + row.columnId;
|
|
1734
|
-
// columnSelectedWidget.options.name = row.prop;
|
|
1735
1683
|
if (columnSelectedWidget.options.hasOwnProperty("keyName")) {
|
|
1736
1684
|
columnSelectedWidget.options.keyName = row.prop;
|
|
1737
1685
|
columnSelectedWidget.options.keyNameEnabled = true;
|
|
@@ -1750,8 +1698,6 @@ export default {
|
|
|
1750
1698
|
let result = null;
|
|
1751
1699
|
if (columnList) {
|
|
1752
1700
|
let column = columnList.find((item) => item.columnId == columnId);
|
|
1753
|
-
if (!column) {
|
|
1754
|
-
}
|
|
1755
1701
|
for (let column of columnList) {
|
|
1756
1702
|
if (column.columnId == columnId) {
|
|
1757
1703
|
result = column;
|
|
@@ -1847,12 +1793,8 @@ export default {
|
|
|
1847
1793
|
tableColumns: this.tableData,
|
|
1848
1794
|
index: index,
|
|
1849
1795
|
columnEditFields,
|
|
1850
|
-
callback: (
|
|
1851
|
-
this.confirmFormatConfigDialog(
|
|
1852
|
-
columnOption,
|
|
1853
|
-
row,
|
|
1854
|
-
columnSelectedWidget
|
|
1855
|
-
);
|
|
1796
|
+
callback: (confirmedWidget) => {
|
|
1797
|
+
this.confirmFormatConfigDialog(confirmedWidget, row);
|
|
1856
1798
|
},
|
|
1857
1799
|
});
|
|
1858
1800
|
},
|
|
@@ -1860,35 +1802,15 @@ export default {
|
|
|
1860
1802
|
let o = options.name;
|
|
1861
1803
|
return (options.keyNameEnabled && options.keyName) || o;
|
|
1862
1804
|
},
|
|
1863
|
-
confirmFormatConfigDialog(
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
if (row.widget) {
|
|
1868
|
-
row.widget.options = columnOption;
|
|
1869
|
-
if (columnSelectedWidget && columnSelectedWidget.widgetList) {
|
|
1870
|
-
row.widget.widgetList = this.$baseLodash.cloneDeep(
|
|
1871
|
-
columnSelectedWidget.widgetList
|
|
1872
|
-
);
|
|
1873
|
-
}
|
|
1874
|
-
} else {
|
|
1875
|
-
let type = this.columnFormatMap[row.formatS];
|
|
1876
|
-
let fieldWidget = this.designer.createColumnWidget(row, false);
|
|
1877
|
-
fieldWidget.options = columnOption;
|
|
1878
|
-
if (columnSelectedWidget && columnSelectedWidget.widgetList) {
|
|
1879
|
-
fieldWidget.widgetList = this.$baseLodash.cloneDeep(
|
|
1880
|
-
columnSelectedWidget.widgetList
|
|
1881
|
-
);
|
|
1882
|
-
}
|
|
1883
|
-
row.widget = fieldWidget;
|
|
1884
|
-
this.$forceUpdate();
|
|
1885
|
-
}
|
|
1805
|
+
confirmFormatConfigDialog(columnSelectedWidget, row) {
|
|
1806
|
+
row.widget = columnSelectedWidget;
|
|
1807
|
+
const options = columnSelectedWidget.options;
|
|
1886
1808
|
|
|
1887
1809
|
let isButtontCell = this.getIsButtontCell(row.formatS);
|
|
1888
1810
|
if (!isButtontCell) {
|
|
1889
|
-
row.prop = this.getFieldKeyNameByOptions(
|
|
1890
|
-
row.label =
|
|
1891
|
-
row.required =
|
|
1811
|
+
row.prop = this.getFieldKeyNameByOptions(options);
|
|
1812
|
+
row.label = options.label;
|
|
1813
|
+
row.required = options.required;
|
|
1892
1814
|
}
|
|
1893
1815
|
},
|
|
1894
1816
|
openEditFormatConfigDialog(row, index) {
|
|
@@ -1908,43 +1830,13 @@ export default {
|
|
|
1908
1830
|
columnSelectedWidget,
|
|
1909
1831
|
index: index,
|
|
1910
1832
|
columnEditFields,
|
|
1911
|
-
callback: (
|
|
1912
|
-
this.confirmEditFormatConfigDialog(
|
|
1913
|
-
columnOption,
|
|
1914
|
-
row,
|
|
1915
|
-
columnSelectedWidget
|
|
1916
|
-
);
|
|
1833
|
+
callback: (confirmedWidget) => {
|
|
1834
|
+
this.confirmEditFormatConfigDialog(confirmedWidget, row);
|
|
1917
1835
|
},
|
|
1918
1836
|
});
|
|
1919
1837
|
},
|
|
1920
|
-
confirmEditFormatConfigDialog(
|
|
1921
|
-
|
|
1922
|
-
row.editColumnOption = columnOption;
|
|
1923
|
-
// row.editWidget.options = columnOption;
|
|
1924
|
-
|
|
1925
|
-
if (row.editWidget) {
|
|
1926
|
-
row.editWidget.options = columnOption;
|
|
1927
|
-
if (columnSelectedWidget && columnSelectedWidget.widgetList) {
|
|
1928
|
-
row.editWidget.widgetList = this.$baseLodash.cloneDeep(
|
|
1929
|
-
columnSelectedWidget.widgetList
|
|
1930
|
-
);
|
|
1931
|
-
}
|
|
1932
|
-
} else {
|
|
1933
|
-
let type = this.columnFormatMap[row.editFormatS];
|
|
1934
|
-
let fieldWidget = this.designer.createColumnWidget(row, true);
|
|
1935
|
-
fieldWidget.options = columnOption;
|
|
1936
|
-
if (columnSelectedWidget && columnSelectedWidget.widgetList) {
|
|
1937
|
-
fieldWidget.widgetList = this.$baseLodash.cloneDeep(
|
|
1938
|
-
columnSelectedWidget.widgetList
|
|
1939
|
-
);
|
|
1940
|
-
}
|
|
1941
|
-
row.editWidget = fieldWidget;
|
|
1942
|
-
this.$forceUpdate();
|
|
1943
|
-
}
|
|
1944
|
-
|
|
1945
|
-
/*row.prop = columnOption.name;
|
|
1946
|
-
row.label = columnOption.label;
|
|
1947
|
-
row.required = columnOption.required;*/
|
|
1838
|
+
confirmEditFormatConfigDialog(columnSelectedWidget, row) {
|
|
1839
|
+
row.editWidget = columnSelectedWidget;
|
|
1948
1840
|
},
|
|
1949
1841
|
openTableColumnConfigDialog(row, index) {
|
|
1950
1842
|
this.operateIndex = index;
|
|
@@ -1962,7 +1854,6 @@ export default {
|
|
|
1962
1854
|
this.showTableColumnConfigDialog = true;
|
|
1963
1855
|
},
|
|
1964
1856
|
saveTableColumnConfigDialog() {
|
|
1965
|
-
// let row = this.tableData[this.operateIndex];
|
|
1966
1857
|
let row = this.currentTableColumn;
|
|
1967
1858
|
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
|
1968
1859
|
let syntaxErrorFlag = false;
|
|
@@ -2011,25 +1902,15 @@ export default {
|
|
|
2011
1902
|
)
|
|
2012
1903
|
: null;
|
|
2013
1904
|
|
|
2014
|
-
if (newWidget.formItemFlag) {
|
|
2015
|
-
if (row.widget) {
|
|
2016
|
-
|
|
2017
|
-
row.widget.options[key] = value;
|
|
2018
|
-
}
|
|
2019
|
-
if (row.columnOption) {
|
|
2020
|
-
if (row.columnOption[key] !== undefined)
|
|
2021
|
-
row.columnOption[key] = value;
|
|
1905
|
+
if (newWidget && newWidget.formItemFlag && row.widget) {
|
|
1906
|
+
if (row.widget.options[key] !== undefined) {
|
|
1907
|
+
row.widget.options[key] = value;
|
|
2022
1908
|
}
|
|
2023
1909
|
}
|
|
2024
1910
|
|
|
2025
|
-
if (
|
|
2026
|
-
if (row.editWidget) {
|
|
2027
|
-
|
|
2028
|
-
row.editWidget.options[key] = value;
|
|
2029
|
-
}
|
|
2030
|
-
if (row.editColumnOption) {
|
|
2031
|
-
if (row.editColumnOption[key] !== undefined)
|
|
2032
|
-
row.editColumnOption[key] = value;
|
|
1911
|
+
if (newEditWidget && newEditWidget.formItemFlag && row.editWidget) {
|
|
1912
|
+
if (row.editWidget.options[key] !== undefined) {
|
|
1913
|
+
row.editWidget.options[key] = value;
|
|
2033
1914
|
}
|
|
2034
1915
|
}
|
|
2035
1916
|
},
|
|
@@ -2043,11 +1924,9 @@ export default {
|
|
|
2043
1924
|
Object.assign(this.editRowData, this.rowData);
|
|
2044
1925
|
if (this.rowData.widget) {
|
|
2045
1926
|
this.editRowData.widget = this.rowData.widget;
|
|
2046
|
-
this.editRowData.columnOption = this.rowData.widget.options;
|
|
2047
1927
|
}
|
|
2048
1928
|
if (this.rowData.editWidget) {
|
|
2049
1929
|
this.editRowData.editWidget = this.rowData.editWidget;
|
|
2050
|
-
this.editRowData.editColumnOption = this.rowData.editWidget.options;
|
|
2051
1930
|
}
|
|
2052
1931
|
if (this.rowData.widgetList && this.rowData.widgetList.length) {
|
|
2053
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;
|