@byteluck-fe/model-driven-upgrade 2.3.1-beta.2 → 2.3.1-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/VersionBuilder.js +2 -2
- package/dist/esm/upgrade/v1_0.js +43 -41
- package/dist/esm/upgrade/v2_1.js +1 -1
- package/dist/esm/upgrade/v2_10.js +2 -2
- package/dist/esm/upgrade/v2_3.js +1 -1
- package/dist/esm/upgrade/v2_6.js +2 -2
- package/dist/esm/upgrade/v2_8.js +2 -2
- package/dist/esm/upgrade/v2_9.js +2 -2
- package/dist/esm/upgrade/v3_0.js +29 -29
- package/dist/esm/upgrade/v3_1.js +3 -1
- package/dist/index.umd.js +1 -1
- package/package.json +5 -5
|
@@ -56,8 +56,8 @@ export var VersionBuilder = /*#__PURE__*/ function() {
|
|
|
56
56
|
return schema;
|
|
57
57
|
}
|
|
58
58
|
var result = this.callDataCleanerKeys.reduce(function(schema, currentVersion, index, arr) {
|
|
59
|
-
var
|
|
60
|
-
var nextVersion = (
|
|
59
|
+
var _arr_;
|
|
60
|
+
var nextVersion = (_arr_ = arr[index + 1]) !== null && _arr_ !== void 0 ? _arr_ : _this.toVersion;
|
|
61
61
|
log("Version Builder: current version: ".concat(currentVersion, ", nextVersion: ").concat(nextVersion));
|
|
62
62
|
var callback = dataCleaner[currentVersion];
|
|
63
63
|
var result = schema;
|
package/dist/esm/upgrade/v1_0.js
CHANGED
|
@@ -81,7 +81,7 @@ var baseControlKeys = [
|
|
|
81
81
|
CONTROL_TYPE.LINK,
|
|
82
82
|
CONTROL_TYPE.BUTTON,
|
|
83
83
|
"list-btn-export-list",
|
|
84
|
-
"list-btn-export-record"
|
|
84
|
+
"list-btn-export-record"
|
|
85
85
|
];
|
|
86
86
|
var listControlKeys = [
|
|
87
87
|
"subtable",
|
|
@@ -91,7 +91,7 @@ var searchViewControlKeys = [
|
|
|
91
91
|
"simple-search"
|
|
92
92
|
];
|
|
93
93
|
function conversion(item, payload) {
|
|
94
|
-
var
|
|
94
|
+
var _item_props, _item_props1, _item_props2;
|
|
95
95
|
var new_item = item;
|
|
96
96
|
if (!new_item.controlType) {
|
|
97
97
|
if (new_item.is_layout_control === true) {
|
|
@@ -122,13 +122,13 @@ function conversion(item, payload) {
|
|
|
122
122
|
item.props.defaultValue = item.props.value;
|
|
123
123
|
}
|
|
124
124
|
//caption/placeholder/placeholder_end 的 zh 属性将被保留,国际化资源都丢弃,放到外部
|
|
125
|
-
if (isLanguageObject(item === null || item === void 0 ? void 0 : (
|
|
125
|
+
if (isLanguageObject(item === null || item === void 0 ? void 0 : (_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.caption)) {
|
|
126
126
|
new_item.props.caption = item.props.caption.zh;
|
|
127
127
|
}
|
|
128
|
-
if (isLanguageObject(item === null || item === void 0 ? void 0 : (
|
|
128
|
+
if (isLanguageObject(item === null || item === void 0 ? void 0 : (_item_props1 = item.props) === null || _item_props1 === void 0 ? void 0 : _item_props1.placeholder)) {
|
|
129
129
|
new_item.props.placeholder = item.props.placeholder.zh;
|
|
130
130
|
}
|
|
131
|
-
if (isLanguageObject(item === null || item === void 0 ? void 0 : (
|
|
131
|
+
if (isLanguageObject(item === null || item === void 0 ? void 0 : (_item_props2 = item.props) === null || _item_props2 === void 0 ? void 0 : _item_props2.placeholder_end)) {
|
|
132
132
|
new_item.props.placeholder_end = item.props.placeholder_end.zh;
|
|
133
133
|
}
|
|
134
134
|
// 部门组件
|
|
@@ -146,14 +146,14 @@ function conversion(item, payload) {
|
|
|
146
146
|
}
|
|
147
147
|
// 附件类型转换
|
|
148
148
|
if (item.type === "file") {
|
|
149
|
-
var
|
|
149
|
+
var _item_attachment_format;
|
|
150
150
|
new_item.type = "attachment";
|
|
151
|
-
new_item.props.attachmentAccept = (
|
|
151
|
+
new_item.props.attachmentAccept = (_item_attachment_format = item.attachment_format) === null || _item_attachment_format === void 0 ? void 0 : _item_attachment_format.split(",");
|
|
152
152
|
new_item.props.showType = item.props.show_type === "title" ? "default" : "table";
|
|
153
153
|
}
|
|
154
154
|
if (item.type === "image") {
|
|
155
|
-
var
|
|
156
|
-
new_item.props.attachmentAccept = (
|
|
155
|
+
var _item_attachment_format1;
|
|
156
|
+
new_item.props.attachmentAccept = (_item_attachment_format1 = item.attachment_format) === null || _item_attachment_format1 === void 0 ? void 0 : _item_attachment_format1.split(",");
|
|
157
157
|
}
|
|
158
158
|
// 日期选择转换
|
|
159
159
|
if (item.type === "date-pick") {
|
|
@@ -191,16 +191,18 @@ function conversion(item, payload) {
|
|
|
191
191
|
}
|
|
192
192
|
//明细子表去掉 subtable-row,保留 subtable-column
|
|
193
193
|
if (new_item.type === "subtable") {
|
|
194
|
-
var
|
|
194
|
+
var _new_item_children_;
|
|
195
195
|
// 转换打开方式
|
|
196
196
|
var entryType = new_item.props.entry_type || new_item.props.entryType;
|
|
197
197
|
new_item.props.openType = entryType === "subpage" ? "modal" : "default";
|
|
198
|
-
if (((
|
|
198
|
+
if (((_new_item_children_ = new_item.children[0]) === null || _new_item_children_ === void 0 ? void 0 : _new_item_children_.type) === "subtable-row") {
|
|
199
199
|
if (new_item.props.headers) {
|
|
200
200
|
new_item.props.headers = new_item.props.headers.map(function(item, index) {
|
|
201
201
|
var subtableColumn = new SubTableColumn.Designer();
|
|
202
|
-
subtableColumn.props.widthType =
|
|
203
|
-
|
|
202
|
+
// subtableColumn.props.widthType =
|
|
203
|
+
// item.header_width_config === '1' ? 'auto' : 'px'
|
|
204
|
+
// subtableColumn.props.width =
|
|
205
|
+
// item.header_width === '' ? 200 : Number(item.header_width)
|
|
204
206
|
subtableColumn.props.caption = isLanguageObject(item.field_name) ? item.field_name["zh"] : item.field_name;
|
|
205
207
|
var schema = subtableColumn.toSchema();
|
|
206
208
|
schema.id = item.header_id;
|
|
@@ -361,7 +363,7 @@ function conversion(item, payload) {
|
|
|
361
363
|
}
|
|
362
364
|
function conversionDisplayBoListAndBehaviors(control, payload) {
|
|
363
365
|
if (!payload) return;
|
|
364
|
-
var
|
|
366
|
+
var _payload_displayBoList = payload.displayBoList, displayBoList = _payload_displayBoList === void 0 ? [] : _payload_displayBoList, _payload_behaviors = payload.behaviors, behaviors = _payload_behaviors === void 0 ? [] : _payload_behaviors;
|
|
365
367
|
var controlId = control.id;
|
|
366
368
|
var newId = control.children[0].id;
|
|
367
369
|
displayBoList.forEach(function(item) {
|
|
@@ -417,9 +419,9 @@ function conversionLayoutControl(schemArray) {
|
|
|
417
419
|
if (!(item && item.children)) return;
|
|
418
420
|
var controlArray = item.children;
|
|
419
421
|
for(var i = 0; i < controlArray.length; i++){
|
|
420
|
-
var
|
|
422
|
+
var _controlArray_i, _controlArray_i_children;
|
|
421
423
|
var control = controlArray[i];
|
|
422
|
-
var child = (
|
|
424
|
+
var child = (_controlArray_i = controlArray[i]) === null || _controlArray_i === void 0 ? void 0 : (_controlArray_i_children = _controlArray_i.children) === null || _controlArray_i_children === void 0 ? void 0 : _controlArray_i_children[0];
|
|
423
425
|
if (control.type === "grid-row" && child && [
|
|
424
426
|
"group-panel",
|
|
425
427
|
"subtable",
|
|
@@ -431,7 +433,7 @@ function conversionLayoutControl(schemArray) {
|
|
|
431
433
|
});
|
|
432
434
|
}
|
|
433
435
|
function conversionListPage(controlArray, payload) {
|
|
434
|
-
var
|
|
436
|
+
var _listPageProps_source_config, _listPageProps_source_config1, _listPageProps_source_config2, _listPageProps_source_config3, _listPageProps_sublist_page;
|
|
435
437
|
if (!(Array.isArray(controlArray) && controlArray.length === 1)) {
|
|
436
438
|
return controlArray;
|
|
437
439
|
}
|
|
@@ -443,19 +445,19 @@ function conversionListPage(controlArray, payload) {
|
|
|
443
445
|
var listPageProps = listPage.props, children = listPage.children;
|
|
444
446
|
var _children = _slicedToArray(children, 3), search = _children[0], toolbox = _children[1], table = _children[2];
|
|
445
447
|
conversionSearch(search);
|
|
446
|
-
table.props.is_fixed_header = listPageProps === null || listPageProps === void 0 ? void 0 : (
|
|
448
|
+
table.props.is_fixed_header = listPageProps === null || listPageProps === void 0 ? void 0 : (_listPageProps_source_config = listPageProps.source_config) === null || _listPageProps_source_config === void 0 ? void 0 : _listPageProps_source_config.is_fixed_header;
|
|
447
449
|
// table.props.datasource_bind = new DataSourceBind({
|
|
448
450
|
// dataCode: listPageProps?.source_config?data_code,
|
|
449
451
|
// svcCode: listPageProps?.source_config?svc_code,
|
|
450
452
|
// orders: camelizeKeys(listPageProps?.source_config?orders) as any[],
|
|
451
453
|
// })
|
|
452
454
|
conversionGridTable(table, toolbox);
|
|
453
|
-
var
|
|
454
|
-
var dataCode = (
|
|
455
|
-
var
|
|
456
|
-
var svcCode = ((
|
|
457
|
-
var
|
|
458
|
-
var orders = (
|
|
455
|
+
var _listPageProps_source_config_data_code;
|
|
456
|
+
var dataCode = (_listPageProps_source_config_data_code = listPageProps === null || listPageProps === void 0 ? void 0 : (_listPageProps_source_config1 = listPageProps.source_config) === null || _listPageProps_source_config1 === void 0 ? void 0 : _listPageProps_source_config1.data_code) !== null && _listPageProps_source_config_data_code !== void 0 ? _listPageProps_source_config_data_code : payload === null || payload === void 0 ? void 0 : payload.dataCode;
|
|
457
|
+
var _listPageProps_source_config_svc_code;
|
|
458
|
+
var svcCode = ((_listPageProps_source_config_svc_code = listPageProps === null || listPageProps === void 0 ? void 0 : (_listPageProps_source_config2 = listPageProps.source_config) === null || _listPageProps_source_config2 === void 0 ? void 0 : _listPageProps_source_config2.svc_code) !== null && _listPageProps_source_config_svc_code !== void 0 ? _listPageProps_source_config_svc_code : dataCode) ? "".concat(dataCode, "_selectMore") : undefined;
|
|
459
|
+
var _listPageProps_source_config_orders;
|
|
460
|
+
var orders = (_listPageProps_source_config_orders = listPageProps === null || listPageProps === void 0 ? void 0 : (_listPageProps_source_config3 = listPageProps.source_config) === null || _listPageProps_source_config3 === void 0 ? void 0 : _listPageProps_source_config3.orders) !== null && _listPageProps_source_config_orders !== void 0 ? _listPageProps_source_config_orders : [];
|
|
459
461
|
var listView = new ListView.Designer();
|
|
460
462
|
listView.props.datasourceBind = new DataSourceBind({
|
|
461
463
|
dataCode: dataCode,
|
|
@@ -465,7 +467,7 @@ function conversionListPage(controlArray, payload) {
|
|
|
465
467
|
listView.props.isShowSubList = listPageProps.is_show_sublist;
|
|
466
468
|
listView.props.triggerType = listPageProps.timing_type;
|
|
467
469
|
listView.props.triggerFieldCode = listPageProps.ctrl_field_code;
|
|
468
|
-
listPageProps === null || listPageProps === void 0 ? void 0 : (
|
|
470
|
+
listPageProps === null || listPageProps === void 0 ? void 0 : (_listPageProps_sublist_page = listPageProps.sublist_page) === null || _listPageProps_sublist_page === void 0 ? void 0 : _listPageProps_sublist_page.sublists.forEach(function(item) {
|
|
469
471
|
item.title = isLanguageObject(item.title) ? item.title.zh : item.title;
|
|
470
472
|
});
|
|
471
473
|
listView.props.sublistPage = listPageProps.sublist_page;
|
|
@@ -486,11 +488,11 @@ function conversionSearch(searchControl) {
|
|
|
486
488
|
item.placeholderEnd = placeholder;
|
|
487
489
|
}
|
|
488
490
|
if (item.type === "date-pick") {
|
|
489
|
-
var
|
|
491
|
+
var _item_dateType, _item_dateType_replace;
|
|
490
492
|
item.type = "search-date-range";
|
|
491
493
|
item.placeholderStart = placeholder;
|
|
492
494
|
item.placeholderEnd = placeholder;
|
|
493
|
-
item.dateType = (
|
|
495
|
+
item.dateType = (_item_dateType = item.dateType) === null || _item_dateType === void 0 ? void 0 : (_item_dateType_replace = _item_dateType.replace) === null || _item_dateType_replace === void 0 ? void 0 : _item_dateType_replace.call(_item_dateType, /range$/);
|
|
494
496
|
}
|
|
495
497
|
if (item.type === "automatic-number" || item.type === "auto-number") {
|
|
496
498
|
item.type = "search-input";
|
|
@@ -540,14 +542,14 @@ function conversionGridTable(tableControl, toolbox) {
|
|
|
540
542
|
obj.props.fixed = true;
|
|
541
543
|
} else if (item.table_header_type === "operation") {
|
|
542
544
|
obj.type = "operation-column";
|
|
543
|
-
var
|
|
544
|
-
obj.props.check = (
|
|
545
|
+
var _item_check;
|
|
546
|
+
obj.props.check = (_item_check = item.check) !== null && _item_check !== void 0 ? _item_check : {};
|
|
545
547
|
obj.props.check.openType = "window";
|
|
546
|
-
var
|
|
547
|
-
obj.props.delete = (
|
|
548
|
+
var _item_delete;
|
|
549
|
+
obj.props.delete = (_item_delete = item.delete) !== null && _item_delete !== void 0 ? _item_delete : {};
|
|
548
550
|
obj.props.delete.openType = "window";
|
|
549
|
-
var
|
|
550
|
-
obj.props.edit = (
|
|
551
|
+
var _item_edit;
|
|
552
|
+
obj.props.edit = (_item_edit = item.edit) !== null && _item_edit !== void 0 ? _item_edit : {};
|
|
551
553
|
obj.props.edit.openType = "window";
|
|
552
554
|
obj.props.fixed = true;
|
|
553
555
|
} else {
|
|
@@ -579,12 +581,12 @@ function conversionGridTable(tableControl, toolbox) {
|
|
|
579
581
|
function groupPanelHandler(controlArray) {
|
|
580
582
|
var group = null;
|
|
581
583
|
for(var i = 0; i < controlArray.length; i++){
|
|
582
|
-
var
|
|
584
|
+
var _item_children_;
|
|
583
585
|
var item = controlArray[i];
|
|
584
586
|
if (!item) {
|
|
585
587
|
continue;
|
|
586
588
|
}
|
|
587
|
-
if (item.children && ((
|
|
589
|
+
if (item.children && ((_item_children_ = item.children[0]) === null || _item_children_ === void 0 ? void 0 : _item_children_.type) === "group-panel") {
|
|
588
590
|
group = item.children[0];
|
|
589
591
|
continue;
|
|
590
592
|
}
|
|
@@ -610,7 +612,7 @@ function conversionPageEvents(events) {
|
|
|
610
612
|
});
|
|
611
613
|
}
|
|
612
614
|
function conversionControlEvents(control, controlEvents) {
|
|
613
|
-
var
|
|
615
|
+
var _controlEvents_control_id;
|
|
614
616
|
if (!controlEvents || !control.props.events) {
|
|
615
617
|
return;
|
|
616
618
|
}
|
|
@@ -619,7 +621,7 @@ function conversionControlEvents(control, controlEvents) {
|
|
|
619
621
|
return;
|
|
620
622
|
}
|
|
621
623
|
eventKeys.forEach(function(eventKey) {
|
|
622
|
-
var
|
|
624
|
+
var _controlEvents_control_id_eventKey;
|
|
623
625
|
if (!control.props.events[eventKey].length) {
|
|
624
626
|
return;
|
|
625
627
|
}
|
|
@@ -629,17 +631,17 @@ function conversionControlEvents(control, controlEvents) {
|
|
|
629
631
|
if (!controlEvents[control.id][eventKey]) {
|
|
630
632
|
controlEvents[control.id][eventKey] = [];
|
|
631
633
|
}
|
|
632
|
-
(
|
|
634
|
+
(_controlEvents_control_id_eventKey = controlEvents[control.id][eventKey]).push.apply(_controlEvents_control_id_eventKey, _toConsumableArray(control.props.events[eventKey].map(function(item) {
|
|
633
635
|
return item.name;
|
|
634
636
|
})));
|
|
635
637
|
});
|
|
636
638
|
// 将失焦事件转换为change事件
|
|
637
|
-
if ((
|
|
638
|
-
var
|
|
639
|
+
if ((_controlEvents_control_id = controlEvents[control.id]) === null || _controlEvents_control_id === void 0 ? void 0 : _controlEvents_control_id.on_blur) {
|
|
640
|
+
var _controlEvents_control_id_on_change;
|
|
639
641
|
if (!controlEvents[control.id].on_change) {
|
|
640
642
|
controlEvents[control.id].on_change = [];
|
|
641
643
|
}
|
|
642
|
-
(
|
|
644
|
+
(_controlEvents_control_id_on_change = controlEvents[control.id].on_change).push.apply(_controlEvents_control_id_on_change, _toConsumableArray(controlEvents[control.id].on_blur));
|
|
643
645
|
}
|
|
644
646
|
}
|
|
645
647
|
export { dataCleaner };
|
package/dist/esm/upgrade/v2_1.js
CHANGED
|
@@ -20,7 +20,7 @@ function conversion(schema, payload) {
|
|
|
20
20
|
CONTROL_TYPE.EXPORT_RECORD_LIST_BUTTON,
|
|
21
21
|
CONTROL_TYPE.EXPORT_LIST_BUTTON,
|
|
22
22
|
CONTROL_TYPE.FORM_SELECT_BUTTON,
|
|
23
|
-
CONTROL_TYPE.LIST_SELECT_BUTTON
|
|
23
|
+
CONTROL_TYPE.LIST_SELECT_BUTTON
|
|
24
24
|
].includes(schema.type)) {
|
|
25
25
|
if (schema.props.button_type === "default") {
|
|
26
26
|
schema.props.button_type = "secondary";
|
|
@@ -21,7 +21,7 @@ function conversion(schema, payload) {
|
|
|
21
21
|
CONTROL_TYPE.DEPARTMENT2,
|
|
22
22
|
CONTROL_TYPE.EMPLOYEE2,
|
|
23
23
|
CONTROL_TYPE.DEPARTMENT,
|
|
24
|
-
CONTROL_TYPE.EMPLOYEE
|
|
24
|
+
CONTROL_TYPE.EMPLOYEE
|
|
25
25
|
].includes(schema.type)) {
|
|
26
26
|
if (schema.props.open_multistage_filling === undefined) {
|
|
27
27
|
schema.props.open_multistage_filling = true;
|
|
@@ -40,7 +40,7 @@ function conversion(schema, payload) {
|
|
|
40
40
|
CONTROL_TYPE.DEPARTMENT2,
|
|
41
41
|
CONTROL_TYPE.EMPLOYEE2,
|
|
42
42
|
CONTROL_TYPE.DEPARTMENT,
|
|
43
|
-
CONTROL_TYPE.EMPLOYEE
|
|
43
|
+
CONTROL_TYPE.EMPLOYEE
|
|
44
44
|
].includes(item.children[0].type)) {
|
|
45
45
|
if (item.children[0].props.open_multistage_filling === undefined) {
|
|
46
46
|
item.children[0].props.open_multistage_filling = true;
|
package/dist/esm/upgrade/v2_3.js
CHANGED
package/dist/esm/upgrade/v2_6.js
CHANGED
|
@@ -47,8 +47,8 @@ function conversion(schema, payload) {
|
|
|
47
47
|
setFieldTypeToDataBind(schema.props.data_bind.max, FieldTypes.TIMESTAMP);
|
|
48
48
|
}
|
|
49
49
|
if (schema.type === CONTROL_TYPE.VUE_FORM_ITEM) {
|
|
50
|
-
var
|
|
51
|
-
setFieldTypeToDataBind(schema.props.data_bind, (
|
|
50
|
+
var _schema_field_type;
|
|
51
|
+
setFieldTypeToDataBind(schema.props.data_bind, (_schema_field_type = schema.field_type) !== null && _schema_field_type !== void 0 ? _schema_field_type : FieldTypes.ANY);
|
|
52
52
|
}
|
|
53
53
|
return schema;
|
|
54
54
|
}
|
package/dist/esm/upgrade/v2_8.js
CHANGED
|
@@ -14,12 +14,12 @@ function conversion(schema, payload) {
|
|
|
14
14
|
if (schema.type === CONTROL_TYPE.SIMPLE_SEARCH && schema.children.length) {
|
|
15
15
|
if (!schema.props.query_type_map) schema.props.query_type_map = [];
|
|
16
16
|
schema.children.forEach(function(item) {
|
|
17
|
-
var
|
|
17
|
+
var _item_props, _item_props_data_bind;
|
|
18
18
|
if ([
|
|
19
19
|
FieldTypes.VARCHAR,
|
|
20
20
|
FieldTypes.TEXT,
|
|
21
21
|
FieldTypes.AUTO_NUMBER
|
|
22
|
-
].includes((
|
|
22
|
+
].includes((_item_props = item.props) === null || _item_props === void 0 ? void 0 : (_item_props_data_bind = _item_props.data_bind) === null || _item_props_data_bind === void 0 ? void 0 : _item_props_data_bind.field_type)) {
|
|
23
23
|
schema.props.query_type_map.push({
|
|
24
24
|
query_type: "LIKE",
|
|
25
25
|
field_code: item.props.data_bind.field_code
|
package/dist/esm/upgrade/v2_9.js
CHANGED
|
@@ -28,7 +28,7 @@ function conversion(schema, payload) {
|
|
|
28
28
|
CONTROL_TYPE.DEPARTMENT2,
|
|
29
29
|
CONTROL_TYPE.EMPLOYEE2,
|
|
30
30
|
CONTROL_TYPE.DEPARTMENT,
|
|
31
|
-
CONTROL_TYPE.EMPLOYEE
|
|
31
|
+
CONTROL_TYPE.EMPLOYEE
|
|
32
32
|
].includes(schema.type)) {
|
|
33
33
|
if (schema.props.open_multistage_filling === undefined) {
|
|
34
34
|
schema.props.open_multistage_filling = true;
|
|
@@ -47,7 +47,7 @@ function conversion(schema, payload) {
|
|
|
47
47
|
CONTROL_TYPE.DEPARTMENT2,
|
|
48
48
|
CONTROL_TYPE.EMPLOYEE2,
|
|
49
49
|
CONTROL_TYPE.DEPARTMENT,
|
|
50
|
-
CONTROL_TYPE.EMPLOYEE
|
|
50
|
+
CONTROL_TYPE.EMPLOYEE
|
|
51
51
|
].includes(item.children[0].type)) {
|
|
52
52
|
if (item.children[0].props.open_multistage_filling === undefined) {
|
|
53
53
|
item.children[0].props.open_multistage_filling = true;
|
package/dist/esm/upgrade/v3_0.js
CHANGED
|
@@ -26,7 +26,7 @@ function conversion(schema, payload) {
|
|
|
26
26
|
if (schema.type === CONTROL_TYPE.GRID_TABLE) {
|
|
27
27
|
schema.props.headers.map(function(item) {
|
|
28
28
|
if (item.type === CONTROL_TYPE.OPERATION_COLUMN) {
|
|
29
|
-
var
|
|
29
|
+
var _item_props, _item_props1, _item_props2;
|
|
30
30
|
if (item.props.width_type === "auto") {
|
|
31
31
|
item.props.auto_width = {
|
|
32
32
|
min_width: 120,
|
|
@@ -41,11 +41,11 @@ function conversion(schema, payload) {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
item.props.width_type = "auto";
|
|
44
|
-
var
|
|
45
|
-
item.children = (
|
|
44
|
+
var _item_children;
|
|
45
|
+
item.children = (_item_children = item === null || item === void 0 ? void 0 : item.children) !== null && _item_children !== void 0 ? _item_children : [];
|
|
46
46
|
delete item.props.custom;
|
|
47
|
-
if (((
|
|
48
|
-
var
|
|
47
|
+
if (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.check) !== undefined) {
|
|
48
|
+
var _item_props3, _item_props4, _item_props5, _item_props6, _item_props7, _item_props8;
|
|
49
49
|
var optbtn = new OperationButton.Designer();
|
|
50
50
|
Object.defineProperty(optbtn, "id", {
|
|
51
51
|
value: "listPageCheckBtnId"
|
|
@@ -53,17 +53,17 @@ function conversion(schema, payload) {
|
|
|
53
53
|
optbtn.props.code = "view";
|
|
54
54
|
optbtn.props.icon = "iconliulan1";
|
|
55
55
|
optbtn.props.command = "view";
|
|
56
|
-
optbtn.props.content = (
|
|
57
|
-
optbtn.props.priorityProcess = (
|
|
58
|
-
optbtn.props.openType = (
|
|
59
|
-
optbtn.props.formKey = (
|
|
60
|
-
if ((
|
|
56
|
+
optbtn.props.content = (_item_props3 = item.props) === null || _item_props3 === void 0 ? void 0 : _item_props3.check.content;
|
|
57
|
+
optbtn.props.priorityProcess = (_item_props4 = item.props) === null || _item_props4 === void 0 ? void 0 : _item_props4.check.priority_process;
|
|
58
|
+
optbtn.props.openType = (_item_props5 = item.props) === null || _item_props5 === void 0 ? void 0 : _item_props5.check.open_type;
|
|
59
|
+
optbtn.props.formKey = (_item_props6 = item.props) === null || _item_props6 === void 0 ? void 0 : _item_props6.check.form_key;
|
|
60
|
+
if ((_item_props7 = item.props) === null || _item_props7 === void 0 ? void 0 : _item_props7.check.is_show) {
|
|
61
61
|
item.children.push(optbtn.toSchema());
|
|
62
62
|
}
|
|
63
|
-
(
|
|
63
|
+
(_item_props8 = item.props) === null || _item_props8 === void 0 ? void 0 : delete _item_props8.check;
|
|
64
64
|
}
|
|
65
|
-
if (((
|
|
66
|
-
var
|
|
65
|
+
if (((_item_props1 = item.props) === null || _item_props1 === void 0 ? void 0 : _item_props1.edit) !== undefined) {
|
|
66
|
+
var _item_props9, _item_props10, _item_props11, _item_props12, _item_props13, _item_props14;
|
|
67
67
|
var optbtn1 = new OperationButton.Designer();
|
|
68
68
|
Object.defineProperty(optbtn1, "id", {
|
|
69
69
|
value: "listPageEditBtnId"
|
|
@@ -71,17 +71,17 @@ function conversion(schema, payload) {
|
|
|
71
71
|
optbtn1.props.code = "edit";
|
|
72
72
|
optbtn1.props.icon = "iconbianji1";
|
|
73
73
|
optbtn1.props.command = "edit";
|
|
74
|
-
optbtn1.props.content = (
|
|
75
|
-
optbtn1.props.priorityProcess = (
|
|
76
|
-
optbtn1.props.openType = (
|
|
77
|
-
optbtn1.props.formKey = (
|
|
78
|
-
if ((
|
|
74
|
+
optbtn1.props.content = (_item_props9 = item.props) === null || _item_props9 === void 0 ? void 0 : _item_props9.edit.content;
|
|
75
|
+
optbtn1.props.priorityProcess = (_item_props10 = item.props) === null || _item_props10 === void 0 ? void 0 : _item_props10.edit.priority_process;
|
|
76
|
+
optbtn1.props.openType = (_item_props11 = item.props) === null || _item_props11 === void 0 ? void 0 : _item_props11.edit.open_type;
|
|
77
|
+
optbtn1.props.formKey = (_item_props12 = item.props) === null || _item_props12 === void 0 ? void 0 : _item_props12.edit.form_key;
|
|
78
|
+
if ((_item_props13 = item.props) === null || _item_props13 === void 0 ? void 0 : _item_props13.edit.is_show) {
|
|
79
79
|
item.children.push(optbtn1.toSchema());
|
|
80
80
|
}
|
|
81
|
-
(
|
|
81
|
+
(_item_props14 = item.props) === null || _item_props14 === void 0 ? void 0 : delete _item_props14.edit;
|
|
82
82
|
}
|
|
83
|
-
if (((
|
|
84
|
-
var
|
|
83
|
+
if (((_item_props2 = item.props) === null || _item_props2 === void 0 ? void 0 : _item_props2.delete) !== undefined) {
|
|
84
|
+
var _item_props15, _item_props16, _item_props17, _item_props18, _item_props19, _item_props20;
|
|
85
85
|
var optbtn2 = new OperationButton.Designer();
|
|
86
86
|
Object.defineProperty(optbtn2, "id", {
|
|
87
87
|
value: "listPageDeleteBtnId"
|
|
@@ -89,16 +89,16 @@ function conversion(schema, payload) {
|
|
|
89
89
|
optbtn2.props.code = "delete";
|
|
90
90
|
optbtn2.props.icon = "iconlajitong";
|
|
91
91
|
optbtn2.props.command = "delete";
|
|
92
|
-
optbtn2.props.content = (
|
|
93
|
-
optbtn2.props.priorityProcess = (
|
|
94
|
-
optbtn2.props.openType = (
|
|
95
|
-
optbtn2.props.formKey = (
|
|
92
|
+
optbtn2.props.content = (_item_props15 = item.props) === null || _item_props15 === void 0 ? void 0 : _item_props15.delete.content;
|
|
93
|
+
optbtn2.props.priorityProcess = (_item_props16 = item.props) === null || _item_props16 === void 0 ? void 0 : _item_props16.delete.priority_process;
|
|
94
|
+
optbtn2.props.openType = (_item_props17 = item.props) === null || _item_props17 === void 0 ? void 0 : _item_props17.delete.open_type;
|
|
95
|
+
optbtn2.props.formKey = (_item_props18 = item.props) === null || _item_props18 === void 0 ? void 0 : _item_props18.delete.form_key;
|
|
96
96
|
optbtn2.props.needConfirm = true;
|
|
97
97
|
optbtn2.props.confirmMessage = "确定要删除此条数据吗?";
|
|
98
|
-
if ((
|
|
98
|
+
if ((_item_props19 = item.props) === null || _item_props19 === void 0 ? void 0 : _item_props19.delete.is_show) {
|
|
99
99
|
item.children.push(optbtn2.toSchema());
|
|
100
100
|
}
|
|
101
|
-
(
|
|
101
|
+
(_item_props20 = item.props) === null || _item_props20 === void 0 ? void 0 : delete _item_props20.delete;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
104
104
|
});
|
|
@@ -114,7 +114,7 @@ function conversion(schema, payload) {
|
|
|
114
114
|
CONTROL_TYPE.DEPARTMENT2,
|
|
115
115
|
CONTROL_TYPE.EMPLOYEE2,
|
|
116
116
|
CONTROL_TYPE.DEPARTMENT,
|
|
117
|
-
CONTROL_TYPE.EMPLOYEE
|
|
117
|
+
CONTROL_TYPE.EMPLOYEE
|
|
118
118
|
].includes(schema.type)) {
|
|
119
119
|
if (schema.props.open_multistage_filling === undefined) {
|
|
120
120
|
schema.props.open_multistage_filling = true;
|
|
@@ -133,7 +133,7 @@ function conversion(schema, payload) {
|
|
|
133
133
|
CONTROL_TYPE.DEPARTMENT2,
|
|
134
134
|
CONTROL_TYPE.EMPLOYEE2,
|
|
135
135
|
CONTROL_TYPE.DEPARTMENT,
|
|
136
|
-
CONTROL_TYPE.EMPLOYEE
|
|
136
|
+
CONTROL_TYPE.EMPLOYEE
|
|
137
137
|
].includes(item.children[0].type)) {
|
|
138
138
|
if (item.children[0].props.open_multistage_filling === undefined) {
|
|
139
139
|
item.children[0].props.open_multistage_filling = true;
|
package/dist/esm/upgrade/v3_1.js
CHANGED
|
@@ -23,8 +23,10 @@ function conversion(schema, payload) {
|
|
|
23
23
|
item.props.meta_auto_width = new MetaAutoWidth();
|
|
24
24
|
if (item.props.width_type === "px") {
|
|
25
25
|
item.props.meta_auto_width.pc.width = item.props.width;
|
|
26
|
-
item.props.meta_auto_width.
|
|
26
|
+
item.props.meta_auto_width.pc.width_type = "px";
|
|
27
27
|
}
|
|
28
|
+
delete item.props.width;
|
|
29
|
+
delete item.props.width_type;
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
32
|
return schema.props.headers;
|