cloud-web-corejs 1.0.54-dev.663 → 1.0.54-dev.665
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 +112 -208
- 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/labelIconPosition-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 -150
- package/src/components/xform/utils/tableColumnHelper.js +1 -1
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,
|
|
@@ -615,7 +615,7 @@
|
|
|
615
615
|
<el-option value="#ea5353" label="红"></el-option>
|
|
616
616
|
</el-select>
|
|
617
617
|
</el-form-item>
|
|
618
|
-
<el-form-item label-width="0">
|
|
618
|
+
<el-form-item label-width="0" class="form-item-full">
|
|
619
619
|
<el-divider class="custom-divider">{{
|
|
620
620
|
i18nt("designer.setting.customLabelIcon")
|
|
621
621
|
}}</el-divider>
|
|
@@ -624,12 +624,19 @@
|
|
|
624
624
|
<icon-picker v-model="rowData.labelIconClass"></icon-picker>
|
|
625
625
|
</el-form-item>
|
|
626
626
|
<el-form-item :label="i18nt('designer.setting.labelIconPosition')">
|
|
627
|
-
<el-select
|
|
628
|
-
|
|
629
|
-
|
|
627
|
+
<el-select
|
|
628
|
+
v-model="rowData.labelIconPosition"
|
|
629
|
+
clearable
|
|
630
|
+
placeholder="默认后面"
|
|
631
|
+
>
|
|
632
|
+
<el-option label="前面" value="front"></el-option>
|
|
633
|
+
<el-option label="后面" value="rear"></el-option>
|
|
630
634
|
</el-select>
|
|
631
635
|
</el-form-item>
|
|
632
|
-
<el-form-item
|
|
636
|
+
<el-form-item
|
|
637
|
+
:label="i18nt('designer.setting.labelTooltip')"
|
|
638
|
+
class="form-item-full"
|
|
639
|
+
>
|
|
633
640
|
<el-input
|
|
634
641
|
type="text"
|
|
635
642
|
v-model="rowData.labelTooltip"
|
|
@@ -1035,19 +1042,17 @@ export default {
|
|
|
1035
1042
|
return;
|
|
1036
1043
|
}
|
|
1037
1044
|
if (key === "columnOption") {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
: val;
|
|
1045
|
+
if (!row.widget) {
|
|
1046
|
+
cloned.columnOption =
|
|
1047
|
+
val !== null && typeof val === "object" ? deepClone(val) : val;
|
|
1048
|
+
}
|
|
1043
1049
|
return;
|
|
1044
1050
|
}
|
|
1045
1051
|
if (key === "editColumnOption") {
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
: val;
|
|
1052
|
+
if (!row.editWidget) {
|
|
1053
|
+
cloned.editColumnOption =
|
|
1054
|
+
val !== null && typeof val === "object" ? deepClone(val) : val;
|
|
1055
|
+
}
|
|
1051
1056
|
return;
|
|
1052
1057
|
}
|
|
1053
1058
|
if (val !== null && typeof val === "object") {
|
|
@@ -1066,12 +1071,6 @@ export default {
|
|
|
1066
1071
|
if (row.editWidget && !cloned.editWidget) {
|
|
1067
1072
|
cloned.editWidget = row.editWidget;
|
|
1068
1073
|
}
|
|
1069
|
-
if (row.widget) {
|
|
1070
|
-
cloned.columnOption = row.widget.options;
|
|
1071
|
-
}
|
|
1072
|
-
if (row.editWidget) {
|
|
1073
|
-
cloned.editColumnOption = row.editWidget.options;
|
|
1074
|
-
}
|
|
1075
1074
|
return cloned;
|
|
1076
1075
|
};
|
|
1077
1076
|
return columns.map(cloneRow);
|
|
@@ -1112,18 +1111,6 @@ export default {
|
|
|
1112
1111
|
next.widgetList = orig.widgetList;
|
|
1113
1112
|
}
|
|
1114
1113
|
}
|
|
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
1114
|
if (next.children && next.children.length) {
|
|
1128
1115
|
next.children = this.restoreColumnWidgetRefs(
|
|
1129
1116
|
next.children,
|
|
@@ -1196,8 +1183,6 @@ export default {
|
|
|
1196
1183
|
const source = this.optionModel.tableColumns || [];
|
|
1197
1184
|
this.sourceTableColumnsSnapshot = source;
|
|
1198
1185
|
this.tableData = this.cloneTableColumnsForEdit(source);
|
|
1199
|
-
debugger;
|
|
1200
|
-
let a = 1;
|
|
1201
1186
|
},
|
|
1202
1187
|
colSubmit() {
|
|
1203
1188
|
this.dialogVisible = !1;
|
|
@@ -1338,7 +1323,7 @@ export default {
|
|
|
1338
1323
|
rowEditShow: null,
|
|
1339
1324
|
utcTransformEnabled: false,
|
|
1340
1325
|
labelIconClass: null,
|
|
1341
|
-
labelIconPosition: "
|
|
1326
|
+
labelIconPosition: "rear",
|
|
1342
1327
|
labelTooltip: null,
|
|
1343
1328
|
// treeNode: false,
|
|
1344
1329
|
};
|
|
@@ -1553,17 +1538,12 @@ export default {
|
|
|
1553
1538
|
changeFormatS(row, isEdit) {
|
|
1554
1539
|
let formatS = isEdit ? row.editFormatS : row.formatS;
|
|
1555
1540
|
let isButtontCell = this.getIsButtontCell(formatS);
|
|
1556
|
-
// let columnWidgetConfig = this.getColumnWidgetConfig(row, true, isEdit);
|
|
1557
|
-
// let { columnSelectedWidget, columnEditFields } = columnWidgetConfig;
|
|
1558
1541
|
let attachmentPrefix = this.designer.getAttachmentPrefix();
|
|
1559
1542
|
let columnSelectedWidget = this.designer.createColumnWidget(row, isEdit);
|
|
1560
1543
|
if (!isEdit) {
|
|
1561
|
-
//格式化类型
|
|
1562
1544
|
if (columnSelectedWidget) {
|
|
1563
|
-
row.columnOption = columnSelectedWidget.options;
|
|
1564
1545
|
row.widget = columnSelectedWidget;
|
|
1565
1546
|
} else {
|
|
1566
|
-
row.columnOption = {};
|
|
1567
1547
|
row.widget = null;
|
|
1568
1548
|
}
|
|
1569
1549
|
row.utcTransformEnabled = false;
|
|
@@ -1573,12 +1553,9 @@ export default {
|
|
|
1573
1553
|
columnSelectedWidget.options.keyName = row.prop;
|
|
1574
1554
|
columnSelectedWidget.options.keyNameSuffix = suffix;
|
|
1575
1555
|
}
|
|
1576
|
-
//编辑插槽类型
|
|
1577
1556
|
if (columnSelectedWidget) {
|
|
1578
|
-
row.columnOption = columnSelectedWidget.options;
|
|
1579
1557
|
row.editWidget = columnSelectedWidget;
|
|
1580
1558
|
} else {
|
|
1581
|
-
row.editColumnOption = {};
|
|
1582
1559
|
row.editWidget = null;
|
|
1583
1560
|
}
|
|
1584
1561
|
}
|
|
@@ -1589,7 +1566,6 @@ export default {
|
|
|
1589
1566
|
row.label = null;
|
|
1590
1567
|
row.sortable = false;
|
|
1591
1568
|
row.width = 150;
|
|
1592
|
-
row.columnOption = {};
|
|
1593
1569
|
row.widget = null;
|
|
1594
1570
|
} else if (isButtontCell) {
|
|
1595
1571
|
if (row.formatS == "dropdown") {
|
|
@@ -1638,100 +1614,79 @@ export default {
|
|
|
1638
1614
|
let type = this.columnFormatMap[formatS];
|
|
1639
1615
|
|
|
1640
1616
|
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;
|
|
1658
|
-
if ("editDelete" == formatS) {
|
|
1659
|
-
columnOption.hiddenByWf = columnOption.hiddenByWf ?? true;
|
|
1660
|
-
columnOption.prefixIcon =
|
|
1661
|
-
columnOption.prefixIcon || "el-icon-delete";
|
|
1662
|
-
} else if ("editButton" == formatS) {
|
|
1663
|
-
columnOption.prefixIcon = columnOption.prefixIcon || "el-icon-edit";
|
|
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
|
-
|
|
1617
|
+
const applyNewWidgetDefaults = (widget) => {
|
|
1618
|
+
widget.options.required = row.required || false;
|
|
1684
1619
|
if ("editDelete" == formatS) {
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1620
|
+
widget.options.prefixIcon = "el-icon-delete";
|
|
1621
|
+
widget.options.label = "删除";
|
|
1622
|
+
widget.options.labelHidden = true;
|
|
1623
|
+
widget.options.hiddenByWf = true;
|
|
1624
|
+
widget.options.onClick =
|
|
1690
1625
|
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.deleteRow(tableParam.row,tableParam.rowIndex);";
|
|
1691
1626
|
} else if ("editButton" == formatS) {
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1627
|
+
widget.options.prefixIcon = "el-icon-edit";
|
|
1628
|
+
widget.options.label = "查看";
|
|
1629
|
+
widget.options.labelHidden = true;
|
|
1630
|
+
widget.options.onClick =
|
|
1696
1631
|
"let tableParam = this.tableParam;\nlet tableRef = this.getWidgetRef(this.parentWidget.options.name);\ntableRef.openEditDialog(tableParam.row)";
|
|
1697
1632
|
} else if ("addSiblingEditRow" == formatS) {
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1633
|
+
widget.options.prefixIcon = "el-icon-plus";
|
|
1634
|
+
widget.options.label = "新增兄弟节点";
|
|
1635
|
+
widget.options.labelHidden = false;
|
|
1636
|
+
widget.options.onClick =
|
|
1702
1637
|
"let tableParam = this.tableParam;\nthis.getParentTarget().addSiblingTreeRow(null,tableParam);";
|
|
1703
1638
|
} else if ("addChildTreeRow" == formatS) {
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1639
|
+
widget.options.prefixIcon = "el-icon-plus";
|
|
1640
|
+
widget.options.label = "新增子节点";
|
|
1641
|
+
widget.options.labelHidden = false;
|
|
1642
|
+
widget.options.onClick =
|
|
1708
1643
|
"let tableParam = this.tableParam;\nthis.getParentTarget().addChildTreeRow(null,tableParam);";
|
|
1709
1644
|
} else if ("moveUpRow" == formatS) {
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
columnSelectedWidget.options.onClick =
|
|
1645
|
+
widget.options.label = "↑上移";
|
|
1646
|
+
widget.options.labelHidden = false;
|
|
1647
|
+
widget.options.onClick =
|
|
1714
1648
|
"let tableParam = this.tableParam;\nthis.getParentTarget().moveUpRow(tableParam);";
|
|
1715
1649
|
} else if ("moveDownRow" == formatS) {
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
columnSelectedWidget.options.onClick =
|
|
1650
|
+
widget.options.label = "↓下移";
|
|
1651
|
+
widget.options.labelHidden = false;
|
|
1652
|
+
widget.options.onClick =
|
|
1720
1653
|
"let tableParam = this.tableParam;\nthis.getParentTarget().moveDownRow(tableParam);";
|
|
1721
1654
|
} else if ("removeTreeRow" == formatS) {
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1655
|
+
widget.options.prefixIcon = "el-icon-delete";
|
|
1656
|
+
widget.options.label = "删除";
|
|
1657
|
+
widget.options.labelHidden = true;
|
|
1658
|
+
widget.options.onClick =
|
|
1726
1659
|
"let tableParam = this.tableParam;\nthis.getParentTarget().removeTreeRow(tableParam);";
|
|
1727
1660
|
}
|
|
1661
|
+
};
|
|
1728
1662
|
|
|
1729
|
-
|
|
1663
|
+
if (!isChange) {
|
|
1664
|
+
const sourceWidget = this.designer.getColumnWidget(row, isEdit);
|
|
1665
|
+
if (sourceWidget) {
|
|
1666
|
+
columnSelectedWidget = this.$baseLodash.cloneDeep(sourceWidget);
|
|
1667
|
+
columnSelectedWidget.options.required = row.required || false;
|
|
1668
|
+
if ("editDelete" == formatS) {
|
|
1669
|
+
columnSelectedWidget.options.hiddenByWf =
|
|
1670
|
+
columnSelectedWidget.options.hiddenByWf ?? true;
|
|
1671
|
+
columnSelectedWidget.options.prefixIcon =
|
|
1672
|
+
columnSelectedWidget.options.prefixIcon || "el-icon-delete";
|
|
1673
|
+
} else if ("editButton" == formatS) {
|
|
1674
|
+
columnSelectedWidget.options.prefixIcon =
|
|
1675
|
+
columnSelectedWidget.options.prefixIcon || "el-icon-edit";
|
|
1676
|
+
}
|
|
1677
|
+
} else {
|
|
1678
|
+
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
|
1679
|
+
this.designer.getFieldWidgetByType(type)
|
|
1680
|
+
);
|
|
1681
|
+
applyNewWidgetDefaults(columnSelectedWidget);
|
|
1682
|
+
}
|
|
1683
|
+
} else {
|
|
1684
|
+
columnSelectedWidget = this.designer.copyNewFieldWidget(
|
|
1685
|
+
this.designer.getFieldWidgetByType(type)
|
|
1686
|
+
);
|
|
1687
|
+
applyNewWidgetDefaults(columnSelectedWidget);
|
|
1730
1688
|
}
|
|
1731
1689
|
|
|
1732
|
-
// columnSelectedWidget.options.name = isEdit? (type + row.columnId) : row.prop;
|
|
1733
|
-
// columnSelectedWidget.options.name = type + row.columnId;
|
|
1734
|
-
// columnSelectedWidget.options.name = row.prop;
|
|
1735
1690
|
if (columnSelectedWidget.options.hasOwnProperty("keyName")) {
|
|
1736
1691
|
columnSelectedWidget.options.keyName = row.prop;
|
|
1737
1692
|
columnSelectedWidget.options.keyNameEnabled = true;
|
|
@@ -1750,8 +1705,6 @@ export default {
|
|
|
1750
1705
|
let result = null;
|
|
1751
1706
|
if (columnList) {
|
|
1752
1707
|
let column = columnList.find((item) => item.columnId == columnId);
|
|
1753
|
-
if (!column) {
|
|
1754
|
-
}
|
|
1755
1708
|
for (let column of columnList) {
|
|
1756
1709
|
if (column.columnId == columnId) {
|
|
1757
1710
|
result = column;
|
|
@@ -1847,12 +1800,8 @@ export default {
|
|
|
1847
1800
|
tableColumns: this.tableData,
|
|
1848
1801
|
index: index,
|
|
1849
1802
|
columnEditFields,
|
|
1850
|
-
callback: (
|
|
1851
|
-
this.confirmFormatConfigDialog(
|
|
1852
|
-
columnOption,
|
|
1853
|
-
row,
|
|
1854
|
-
columnSelectedWidget
|
|
1855
|
-
);
|
|
1803
|
+
callback: (confirmedWidget) => {
|
|
1804
|
+
this.confirmFormatConfigDialog(confirmedWidget, row);
|
|
1856
1805
|
},
|
|
1857
1806
|
});
|
|
1858
1807
|
},
|
|
@@ -1860,35 +1809,15 @@ export default {
|
|
|
1860
1809
|
let o = options.name;
|
|
1861
1810
|
return (options.keyNameEnabled && options.keyName) || o;
|
|
1862
1811
|
},
|
|
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
|
-
}
|
|
1812
|
+
confirmFormatConfigDialog(columnSelectedWidget, row) {
|
|
1813
|
+
row.widget = columnSelectedWidget;
|
|
1814
|
+
const options = columnSelectedWidget.options;
|
|
1886
1815
|
|
|
1887
1816
|
let isButtontCell = this.getIsButtontCell(row.formatS);
|
|
1888
1817
|
if (!isButtontCell) {
|
|
1889
|
-
row.prop = this.getFieldKeyNameByOptions(
|
|
1890
|
-
row.label =
|
|
1891
|
-
row.required =
|
|
1818
|
+
row.prop = this.getFieldKeyNameByOptions(options);
|
|
1819
|
+
row.label = options.label;
|
|
1820
|
+
row.required = options.required;
|
|
1892
1821
|
}
|
|
1893
1822
|
},
|
|
1894
1823
|
openEditFormatConfigDialog(row, index) {
|
|
@@ -1908,43 +1837,13 @@ export default {
|
|
|
1908
1837
|
columnSelectedWidget,
|
|
1909
1838
|
index: index,
|
|
1910
1839
|
columnEditFields,
|
|
1911
|
-
callback: (
|
|
1912
|
-
this.confirmEditFormatConfigDialog(
|
|
1913
|
-
columnOption,
|
|
1914
|
-
row,
|
|
1915
|
-
columnSelectedWidget
|
|
1916
|
-
);
|
|
1840
|
+
callback: (confirmedWidget) => {
|
|
1841
|
+
this.confirmEditFormatConfigDialog(confirmedWidget, row);
|
|
1917
1842
|
},
|
|
1918
1843
|
});
|
|
1919
1844
|
},
|
|
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;*/
|
|
1845
|
+
confirmEditFormatConfigDialog(columnSelectedWidget, row) {
|
|
1846
|
+
row.editWidget = columnSelectedWidget;
|
|
1948
1847
|
},
|
|
1949
1848
|
openTableColumnConfigDialog(row, index) {
|
|
1950
1849
|
this.operateIndex = index;
|
|
@@ -1962,7 +1861,6 @@ export default {
|
|
|
1962
1861
|
this.showTableColumnConfigDialog = true;
|
|
1963
1862
|
},
|
|
1964
1863
|
saveTableColumnConfigDialog() {
|
|
1965
|
-
// let row = this.tableData[this.operateIndex];
|
|
1966
1864
|
let row = this.currentTableColumn;
|
|
1967
1865
|
const codeHints = this.$refs.ecEditor.getEditorAnnotations();
|
|
1968
1866
|
let syntaxErrorFlag = false;
|
|
@@ -2011,25 +1909,15 @@ export default {
|
|
|
2011
1909
|
)
|
|
2012
1910
|
: null;
|
|
2013
1911
|
|
|
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;
|
|
1912
|
+
if (newWidget && newWidget.formItemFlag && row.widget) {
|
|
1913
|
+
if (row.widget.options[key] !== undefined) {
|
|
1914
|
+
row.widget.options[key] = value;
|
|
2022
1915
|
}
|
|
2023
1916
|
}
|
|
2024
1917
|
|
|
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;
|
|
1918
|
+
if (newEditWidget && newEditWidget.formItemFlag && row.editWidget) {
|
|
1919
|
+
if (row.editWidget.options[key] !== undefined) {
|
|
1920
|
+
row.editWidget.options[key] = value;
|
|
2033
1921
|
}
|
|
2034
1922
|
}
|
|
2035
1923
|
},
|
|
@@ -2043,11 +1931,9 @@ export default {
|
|
|
2043
1931
|
Object.assign(this.editRowData, this.rowData);
|
|
2044
1932
|
if (this.rowData.widget) {
|
|
2045
1933
|
this.editRowData.widget = this.rowData.widget;
|
|
2046
|
-
this.editRowData.columnOption = this.rowData.widget.options;
|
|
2047
1934
|
}
|
|
2048
1935
|
if (this.rowData.editWidget) {
|
|
2049
1936
|
this.editRowData.editWidget = this.rowData.editWidget;
|
|
2050
|
-
this.editRowData.editColumnOption = this.rowData.editWidget.options;
|
|
2051
1937
|
}
|
|
2052
1938
|
if (this.rowData.widgetList && this.rowData.widgetList.length) {
|
|
2053
1939
|
this.editRowData.widgetList = this.rowData.widgetList;
|
|
@@ -2096,5 +1982,23 @@ export default {
|
|
|
2096
1982
|
.table-column-row-edit-cont {
|
|
2097
1983
|
padding-bottom: 8px;
|
|
2098
1984
|
box-sizing: border-box;
|
|
1985
|
+
|
|
1986
|
+
::v-deep .form-m2 {
|
|
1987
|
+
height: auto;
|
|
1988
|
+
overflow: visible;
|
|
1989
|
+
|
|
1990
|
+
.form-item-full {
|
|
1991
|
+
width: calc(100% - 20px) !important;
|
|
1992
|
+
display: block;
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
.form-item-full .el-input {
|
|
1996
|
+
width: 100% !important;
|
|
1997
|
+
}
|
|
1998
|
+
}
|
|
1999
|
+
|
|
2000
|
+
::v-deep .custom-divider.el-divider--horizontal {
|
|
2001
|
+
margin: 10px 0;
|
|
2002
|
+
}
|
|
2099
2003
|
}
|
|
2100
2004
|
</style>
|
|
@@ -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 {
|
|
@@ -965,25 +952,6 @@ modules = {
|
|
|
965
952
|
newColumns.push(col);
|
|
966
953
|
});
|
|
967
954
|
|
|
968
|
-
/* let tableConfig = this.tableConfig;
|
|
969
|
-
let flag = tableConfig?.config?.toolbarConfig?.custom !== false;
|
|
970
|
-
if (
|
|
971
|
-
baseRefUtil.tableConfig &&
|
|
972
|
-
baseRefUtil.tableConfig.className === "list-table" &&
|
|
973
|
-
flag
|
|
974
|
-
) {
|
|
975
|
-
if (tableColumns.length) {
|
|
976
|
-
let tableColumn = tableColumns[tableColumns.length - 1];
|
|
977
|
-
if (tableColumn.fixed !== "right") {
|
|
978
|
-
newColumns.push({
|
|
979
|
-
width: 47,
|
|
980
|
-
title: "",
|
|
981
|
-
fixed: "right",
|
|
982
|
-
sortable: false,
|
|
983
|
-
});
|
|
984
|
-
}
|
|
985
|
-
}
|
|
986
|
-
} */
|
|
987
955
|
this.rowWidgetList = rowWidgetList;
|
|
988
956
|
return this.$baseLodash.cloneDeep(newColumns);
|
|
989
957
|
},
|
|
@@ -1290,9 +1258,6 @@ modules = {
|
|
|
1290
1258
|
let editWidget = item.editWidget;
|
|
1291
1259
|
if (editWidget && editWidget.options.required) {
|
|
1292
1260
|
let formField = this.getFieldKeyName(editWidget);
|
|
1293
|
-
/* editRules[formField] = [
|
|
1294
|
-
{ required: true, message: `[${editWidget.options.label}]不能为空` }
|
|
1295
|
-
]; */
|
|
1296
1261
|
}
|
|
1297
1262
|
}
|
|
1298
1263
|
});
|
|
@@ -2220,118 +2185,10 @@ modules = {
|
|
|
2220
2185
|
let newData = this.createNewTableData();
|
|
2221
2186
|
tableRows.push(newData);
|
|
2222
2187
|
}
|
|
2223
|
-
// this.formModel[this.fieldKeyName] = this.$baseLodash(this.fieldModel)
|
|
2224
|
-
// this.fieldModel = tableRows
|
|
2225
2188
|
this.setValue(tableRows);
|
|
2226
2189
|
this.$nextTick(() => {
|
|
2227
2190
|
this.handleWbs();
|
|
2228
2191
|
});
|
|
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
2192
|
},
|
|
2336
2193
|
getColumnProp2(fieldWidget, obj) {
|
|
2337
2194
|
let isQueryTable = this.widget.options.isQueryTable || false;
|
|
@@ -49,7 +49,7 @@ export function applyColumnLabelIcon(col, columnConfig) {
|
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
const iconClass = columnConfig.labelIconClass;
|
|
52
|
-
const position = columnConfig.labelIconPosition || "
|
|
52
|
+
const position = columnConfig.labelIconPosition || "rear";
|
|
53
53
|
const tooltip = columnConfig.labelTooltip;
|
|
54
54
|
const required = !!columnConfig.required;
|
|
55
55
|
const title = col.title;
|