@byteluck-fe/model-driven-upgrade 2.22.0-beta.1 → 2.22.0-beta.2

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.
@@ -1,4 +1,4 @@
1
- import { decamelizeKeys, loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
1
+ import { decamelizeKeys, loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
2
2
  var dataCleaner = function(schemaItems, payload) {
3
3
  var isArray = Array.isArray(schemaItems);
4
4
  var schemaArray = isArray ? schemaItems : [
@@ -22,23 +22,23 @@ function conversion(schema, payload) {
22
22
  CONTROL_TYPE.FORM_SELECT_BUTTON,
23
23
  CONTROL_TYPE.LIST_SELECT_BUTTON
24
24
  ].includes(schema.type)) {
25
- if (schema.props.button_type === 'default') {
26
- schema.props.button_type = 'secondary';
25
+ if (schema.props.button_type === "default") {
26
+ schema.props.button_type = "secondary";
27
27
  }
28
- if (schema.props.button_type === 'danger') {
29
- schema.props.button_type = 'secondary';
30
- schema.props.color = 'danger';
28
+ if (schema.props.button_type === "danger") {
29
+ schema.props.button_type = "secondary";
30
+ schema.props.color = "danger";
31
31
  }
32
32
  // 没有icon的按钮,给添加一个默认icon @余石伟
33
33
  if (!schema.props.icon) {
34
- schema.props.icon = 'iconfenlei2';
34
+ schema.props.icon = "iconfenlei2";
35
35
  }
36
36
  }
37
37
  if (schema.type === CONTROL_TYPE.IMPORT_RECORD_LIST_BUTTON) {
38
- schema.props.icon = 'iconshangchuan3';
38
+ schema.props.icon = "iconshangchuan3";
39
39
  }
40
40
  if (schema.type === CONTROL_TYPE.EXPORT_LIST_BUTTON) {
41
- schema.props.icon = 'iconxiazai1';
41
+ schema.props.icon = "iconxiazai1";
42
42
  }
43
43
  return schema;
44
44
  }
@@ -1,4 +1,4 @@
1
- import { loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
1
+ import { loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
2
2
  var dataCleaner = function(schemaItems, payload) {
3
3
  var isArray = Array.isArray(schemaItems);
4
4
  var schemaArray = isArray ? schemaItems : [
@@ -1,4 +1,4 @@
1
- import { decamelizeKeys, loop } from '@byteluck-fe/model-driven-shared';
1
+ import { decamelizeKeys, loop } from "@byteluck-fe/model-driven-shared";
2
2
  var dataCleaner = function(schemaItems, payload) {
3
3
  var isArray = Array.isArray(schemaItems);
4
4
  var schemaArray = isArray ? schemaItems : [
@@ -14,23 +14,23 @@ function conversion(schema, payload) {
14
14
  if (schema.props.icon) {
15
15
  var icon = schema.props.icon;
16
16
  switch(icon){
17
- case 'icongeren':
18
- icon = 'iconyyzy-renyuan';
17
+ case "icongeren":
18
+ icon = "iconyyzy-renyuan";
19
19
  break;
20
- case 'iconjine1':
21
- icon = 'iconcaiwu';
20
+ case "iconjine1":
21
+ icon = "iconcaiwu";
22
22
  break;
23
- case 'iconhuibao':
24
- icon = 'iconyyzy-tianxie';
23
+ case "iconhuibao":
24
+ icon = "iconyyzy-tianxie";
25
25
  break;
26
- case 'iconwenjian':
27
- icon = 'iconyyzy-wenjianjia1';
26
+ case "iconwenjian":
27
+ icon = "iconyyzy-wenjianjia1";
28
28
  break;
29
- case 'iconyingpin':
30
- icon = 'iconyyzy-gongzuo';
29
+ case "iconyingpin":
30
+ icon = "iconyyzy-gongzuo";
31
31
  break;
32
- case 'iconpiliangtijiaojilu':
33
- icon = 'iconyyzy-renwu';
32
+ case "iconpiliangtijiaojilu":
33
+ icon = "iconyyzy-renwu";
34
34
  break;
35
35
  }
36
36
  schema.props.icon = icon;
@@ -1,5 +1,5 @@
1
- import { decamelizeKeys, loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
2
- import { GridRow, Col } from '@byteluck-fe/model-driven-controls';
1
+ import { decamelizeKeys, loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
2
+ import { GridRow, Col } from "@byteluck-fe/model-driven-controls";
3
3
  var dataCleaner = function(schemaItems, payload) {
4
4
  var isArray = Array.isArray(schemaItems);
5
5
  var schemaArray = isArray ? schemaItems : [
@@ -1,4 +1,4 @@
1
- import { decamelizeKeys, loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
1
+ import { decamelizeKeys, loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
2
2
  var dataCleaner = function(schemaItems, payload) {
3
3
  var isArray = Array.isArray(schemaItems);
4
4
  var schemaArray = isArray ? schemaItems : [
@@ -1,4 +1,4 @@
1
- import { loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
1
+ import { loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
2
2
  var dataCleaner = function(schemaItems, payload) {
3
3
  var isArray = Array.isArray(schemaItems);
4
4
  var schemaArray = isArray ? schemaItems : [
@@ -11,7 +11,7 @@ function _define_property(obj, key, value) {
11
11
  }
12
12
  return obj;
13
13
  }
14
- import { loop, CONTROL_TYPE, FieldTypes } from '@byteluck-fe/model-driven-shared';
14
+ import { loop, CONTROL_TYPE, FieldTypes } from "@byteluck-fe/model-driven-shared";
15
15
  var dataCleaner = function(schemaItems, payload) {
16
16
  var isArray = Array.isArray(schemaItems);
17
17
  var schemaArray = isArray ? schemaItems : [
@@ -1,4 +1,4 @@
1
- import { loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
1
+ import { loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
2
2
  var dataCleaner = function(schemaItems, payload) {
3
3
  var isArray = Array.isArray(schemaItems);
4
4
  var schemaArray = isArray ? schemaItems : [
@@ -12,14 +12,14 @@ var dataCleaner = function(schemaItems, payload) {
12
12
  function conversion(schema, payload) {
13
13
  if (schema.type === CONTROL_TYPE.GRID_TABLE) {
14
14
  schema.props.headers.forEach(function(column) {
15
- if (column.type.endsWith('-column')) {
15
+ if (column.type.endsWith("-column")) {
16
16
  if (column.props.fixed) {
17
- column.props.fixed = 'left';
17
+ column.props.fixed = "left";
18
18
  if (column.type === CONTROL_TYPE.OPERATION_COLUMN) {
19
- column.props.fixed = 'right';
19
+ column.props.fixed = "right";
20
20
  }
21
21
  } else {
22
- column.props.fixed = 'none';
22
+ column.props.fixed = "none";
23
23
  }
24
24
  }
25
25
  });
@@ -1,4 +1,4 @@
1
- import { loop, CONTROL_TYPE, FieldTypes } from '@byteluck-fe/model-driven-shared';
1
+ import { loop, CONTROL_TYPE, FieldTypes } from "@byteluck-fe/model-driven-shared";
2
2
  var dataCleaner = function(schemaItems, payload) {
3
3
  var isArray = Array.isArray(schemaItems);
4
4
  var schemaArray = isArray ? schemaItems : [
@@ -21,7 +21,7 @@ function conversion(schema, payload) {
21
21
  FieldTypes.AUTO_NUMBER
22
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
- query_type: 'LIKE',
24
+ query_type: "LIKE",
25
25
  field_code: item.props.data_bind.field_code
26
26
  });
27
27
  }
@@ -5,7 +5,7 @@
5
5
  * @LastEditTime: 2023-03-03 13:42:29
6
6
  * @FilePath: /model-driven/packages/upgrade/src/upgrade/v2_9.ts
7
7
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
- */ import { loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
8
+ */ import { loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
9
9
  var dataCleaner = function(schemaItems, payload) {
10
10
  var isArray = Array.isArray(schemaItems);
11
11
  var schemaArray = isArray ? schemaItems : [
@@ -5,9 +5,9 @@
5
5
  * @LastEditTime: 2023-03-03 13:42:45
6
6
  * @FilePath: /model-driven/packages/upgrade/src/upgrade/v2_10.ts
7
7
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
8
- */ import { loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
9
- import { OperationButton } from '@byteluck-fe/model-driven-controls';
10
- import { TitleConfigEnum } from '@byteluck-fe/model-driven-controls';
8
+ */ import { loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
9
+ import { OperationButton } from "@byteluck-fe/model-driven-controls";
10
+ import { TitleConfigEnum } from "@byteluck-fe/model-driven-controls";
11
11
  var dataCleaner = function(schemaItems, payload) {
12
12
  var isArray = Array.isArray(schemaItems);
13
13
  var schemaArray = isArray ? schemaItems : [
@@ -27,32 +27,32 @@ function conversion(schema, payload) {
27
27
  schema.props.headers.map(function(item) {
28
28
  if (item.type === CONTROL_TYPE.OPERATION_COLUMN) {
29
29
  var _item_props, _item_props1, _item_props2;
30
- if (item.props.width_type === 'auto') {
30
+ if (item.props.width_type === "auto") {
31
31
  item.props.auto_width = {
32
32
  min_width: 120,
33
33
  max_width: 120,
34
34
  flex: 1
35
35
  };
36
- } else if (item.props.width_type === 'px') {
36
+ } else if (item.props.width_type === "px") {
37
37
  item.props.auto_width = {
38
38
  min_width: item.props.width,
39
39
  max_width: item.props.width,
40
40
  flex: 1
41
41
  };
42
42
  }
43
- item.props.width_type = 'auto';
43
+ item.props.width_type = "auto";
44
44
  var _item_children;
45
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
47
  if (((_item_props = item.props) === null || _item_props === void 0 ? void 0 : _item_props.check) !== undefined) {
48
48
  var _item_props3, _item_props4, _item_props5, _item_props6, _item_props7, _item_props8;
49
49
  var optbtn = new OperationButton.Designer();
50
- Object.defineProperty(optbtn, 'id', {
51
- value: 'listPageCheckBtnId'
50
+ Object.defineProperty(optbtn, "id", {
51
+ value: "listPageCheckBtnId"
52
52
  });
53
- optbtn.props.code = 'view';
54
- optbtn.props.icon = 'iconliulan1';
55
- optbtn.props.command = 'view';
53
+ optbtn.props.code = "view";
54
+ optbtn.props.icon = "iconliulan1";
55
+ optbtn.props.command = "view";
56
56
  optbtn.props.content = (_item_props3 = item.props) === null || _item_props3 === void 0 ? void 0 : _item_props3.check.content;
57
57
  optbtn.props.priorityProcess = (_item_props4 = item.props) === null || _item_props4 === void 0 ? void 0 : _item_props4.check.priority_process;
58
58
  optbtn.props.openType = (_item_props5 = item.props) === null || _item_props5 === void 0 ? void 0 : _item_props5.check.open_type;
@@ -65,12 +65,12 @@ function conversion(schema, payload) {
65
65
  if (((_item_props1 = item.props) === null || _item_props1 === void 0 ? void 0 : _item_props1.edit) !== undefined) {
66
66
  var _item_props9, _item_props10, _item_props11, _item_props12, _item_props13, _item_props14;
67
67
  var optbtn1 = new OperationButton.Designer();
68
- Object.defineProperty(optbtn1, 'id', {
69
- value: 'listPageEditBtnId'
68
+ Object.defineProperty(optbtn1, "id", {
69
+ value: "listPageEditBtnId"
70
70
  });
71
- optbtn1.props.code = 'edit';
72
- optbtn1.props.icon = 'iconbianji1';
73
- optbtn1.props.command = 'edit';
71
+ optbtn1.props.code = "edit";
72
+ optbtn1.props.icon = "iconbianji1";
73
+ optbtn1.props.command = "edit";
74
74
  optbtn1.props.content = (_item_props9 = item.props) === null || _item_props9 === void 0 ? void 0 : _item_props9.edit.content;
75
75
  optbtn1.props.priorityProcess = (_item_props10 = item.props) === null || _item_props10 === void 0 ? void 0 : _item_props10.edit.priority_process;
76
76
  optbtn1.props.openType = (_item_props11 = item.props) === null || _item_props11 === void 0 ? void 0 : _item_props11.edit.open_type;
@@ -83,18 +83,18 @@ function conversion(schema, payload) {
83
83
  if (((_item_props2 = item.props) === null || _item_props2 === void 0 ? void 0 : _item_props2.delete) !== undefined) {
84
84
  var _item_props15, _item_props16, _item_props17, _item_props18, _item_props19, _item_props20;
85
85
  var optbtn2 = new OperationButton.Designer();
86
- Object.defineProperty(optbtn2, 'id', {
87
- value: 'listPageDeleteBtnId'
86
+ Object.defineProperty(optbtn2, "id", {
87
+ value: "listPageDeleteBtnId"
88
88
  });
89
- optbtn2.props.code = 'delete';
90
- optbtn2.props.icon = 'iconlajitong';
91
- optbtn2.props.command = 'delete';
89
+ optbtn2.props.code = "delete";
90
+ optbtn2.props.icon = "iconlajitong";
91
+ optbtn2.props.command = "delete";
92
92
  optbtn2.props.content = (_item_props15 = item.props) === null || _item_props15 === void 0 ? void 0 : _item_props15.delete.content;
93
93
  optbtn2.props.priorityProcess = (_item_props16 = item.props) === null || _item_props16 === void 0 ? void 0 : _item_props16.delete.priority_process;
94
94
  optbtn2.props.openType = (_item_props17 = item.props) === null || _item_props17 === void 0 ? void 0 : _item_props17.delete.open_type;
95
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
- optbtn2.props.confirmMessage = '确定要删除此条数据吗?';
97
+ optbtn2.props.confirmMessage = "确定要删除此条数据吗?";
98
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
  }
@@ -17,8 +17,8 @@
17
17
  }
18
18
  return obj;
19
19
  }
20
- import { loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
21
- import { MetaAutoWidth, AutoWidth } from '@byteluck-fe/model-driven-core';
20
+ import { loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
21
+ import { MetaAutoWidth, AutoWidth } from "@byteluck-fe/model-driven-core";
22
22
  var dataCleaner = function(schemaItems, payload) {
23
23
  var isArray = Array.isArray(schemaItems);
24
24
  var schemaArray = isArray ? schemaItems : [
@@ -35,9 +35,9 @@ function conversion(schema, payload) {
35
35
  schema.props.headers.map(function(item) {
36
36
  var _item_children;
37
37
  item.props.meta_auto_width = new MetaAutoWidth();
38
- if (item.props.width_type === 'px') {
38
+ if (item.props.width_type === "px") {
39
39
  item.props.meta_auto_width.pc.width = item.props.width;
40
- item.props.meta_auto_width.pc.width_type = 'px';
40
+ item.props.meta_auto_width.pc.width_type = "px";
41
41
  }
42
42
  delete item.props.width;
43
43
  delete item.props.width_type;
@@ -68,15 +68,15 @@ function conversion(schema, payload) {
68
68
  //默认值 赋值
69
69
  var addKeysDefaultValueMapping = (_obj = {}, _define_property(_obj, CONTROL_TYPE.SUBTABLE, [
70
70
  {
71
- key: 'page_index',
71
+ key: "page_index",
72
72
  value: 1
73
73
  },
74
74
  {
75
- key: 'page_size',
75
+ key: "page_size",
76
76
  value: 10
77
77
  },
78
78
  {
79
- key: 'page_size_options',
79
+ key: "page_size_options",
80
80
  value: [
81
81
  10,
82
82
  20,
@@ -85,20 +85,20 @@ function conversion(schema, payload) {
85
85
  ]
86
86
  },
87
87
  {
88
- key: 'total_count',
88
+ key: "total_count",
89
89
  value: 0
90
90
  }
91
91
  ]), _define_property(_obj, CONTROL_TYPE.GRID_TABLE, [
92
92
  {
93
- key: 'page_index',
93
+ key: "page_index",
94
94
  value: 1
95
95
  },
96
96
  {
97
- key: 'page_size',
97
+ key: "page_size",
98
98
  value: 20
99
99
  },
100
100
  {
101
- key: 'page_size_options',
101
+ key: "page_size_options",
102
102
  value: [
103
103
  10,
104
104
  20,
@@ -107,39 +107,39 @@ function conversion(schema, payload) {
107
107
  ]
108
108
  },
109
109
  {
110
- key: 'total_count',
110
+ key: "total_count",
111
111
  value: 0
112
112
  },
113
113
  {
114
- key: 'is_show_selection',
114
+ key: "is_show_selection",
115
115
  value: false
116
116
  }
117
117
  ]), _define_property(_obj, CONTROL_TYPE.LIST_VIEW, [
118
118
  {
119
- key: 'selection_type',
120
- value: 'multiple'
119
+ key: "selection_type",
120
+ value: "multiple"
121
121
  },
122
122
  {
123
- key: 'row_style_type',
124
- value: 'none'
123
+ key: "row_style_type",
124
+ value: "none"
125
125
  },
126
126
  {
127
- key: 'is_show_selection',
127
+ key: "is_show_selection",
128
128
  value: false
129
129
  }
130
130
  ]), _define_property(_obj, CONTROL_TYPE.SIMPLE_SEARCH, [
131
131
  {
132
- key: 'col-gap',
132
+ key: "col-gap",
133
133
  value: 24
134
134
  },
135
135
  {
136
- key: 'child-min-width',
136
+ key: "child-min-width",
137
137
  value: 230
138
138
  }
139
139
  ]), _define_property(_obj, CONTROL_TYPE.IMPORT_RECORD_LIST_BUTTON, [
140
140
  {
141
- key: 'template-type',
142
- value: 'system'
141
+ key: "template-type",
142
+ value: "system"
143
143
  }
144
144
  ]), _obj);
145
145
  if (schema.type in addKeysDefaultValueMapping) {
@@ -157,7 +157,7 @@ function conversion(schema, payload) {
157
157
  item.props.limit = 3;
158
158
  }
159
159
  if (item.props.show_type === undefined) {
160
- item.props.show_type = 'icon';
160
+ item.props.show_type = "icon";
161
161
  }
162
162
  }
163
163
  if (item.props.flex === undefined) {
@@ -189,11 +189,11 @@ function conversionListener(payload) {
189
189
  payload.listeners[controlId].forEach(function(event, index) {
190
190
  var eventKey = event.event_key || event.eventKey;
191
191
  switch(eventKey){
192
- case 'on_click_finish':
192
+ case "on_click_finish":
193
193
  onClickFinish = event;
194
194
  onClickFinishIndex = index;
195
195
  break;
196
- case 'on_click':
196
+ case "on_click":
197
197
  onClick = event;
198
198
  break;
199
199
  }
@@ -207,14 +207,14 @@ function conversionListener(payload) {
207
207
  // @ts-ignore
208
208
  payload.listeners[controlId].splice(onClickFinishIndex, 1);
209
209
  } else {
210
- onClickFinish.event_key = 'on_click';
210
+ onClickFinish.event_key = "on_click";
211
211
  }
212
212
  }
213
213
  });
214
214
  if (!payload.listeners.form_submit) {
215
215
  payload.listeners.form_submit = [
216
216
  {
217
- event_key: 'on_click',
217
+ event_key: "on_click",
218
218
  event_param: [],
219
219
  cases: [
220
220
  getDefaultActionOperateCase()
@@ -225,7 +225,7 @@ function conversionListener(payload) {
225
225
  if (payload.listeners.form_submit && payload.listeners.form_submit[0] && payload.listeners.form_submit[0].cases && payload.listeners.form_submit[0].cases[0] && payload.listeners.form_submit[0].cases[0].handlers) {
226
226
  var hasActionOperateHandler = false;
227
227
  payload.listeners.form_submit[0].cases[0].handlers.forEach(function(handler) {
228
- if (handler.method === 'actionOperate') {
228
+ if (handler.method === "actionOperate") {
229
229
  hasActionOperateHandler = true;
230
230
  }
231
231
  });
@@ -237,9 +237,9 @@ function conversionListener(payload) {
237
237
  }
238
238
  function getDefaultActionOperateCase() {
239
239
  return {
240
- id: 'case' + new Date().getTime(),
241
- name: '默认情形',
242
- match_type: 'AND',
240
+ id: "case" + new Date().getTime(),
241
+ name: "默认情形",
242
+ match_type: "AND",
243
243
  match_rules: [],
244
244
  handlers: [
245
245
  getDefaultActionOperateHandler()
@@ -248,12 +248,12 @@ function getDefaultActionOperateCase() {
248
248
  }
249
249
  function getDefaultActionOperateHandler() {
250
250
  return {
251
- id: 'handler' + new Date().getTime(),
252
- method: 'actionOperate',
251
+ id: "handler" + new Date().getTime(),
252
+ method: "actionOperate",
253
253
  params: {
254
- control_id: '',
255
- opt_type: '',
256
- opt_code: '',
254
+ control_id: "",
255
+ opt_type: "",
256
+ opt_code: "",
257
257
  is_error_continue: false
258
258
  }
259
259
  };
@@ -54,7 +54,7 @@ function getListenerOpenPageControlIdOfCurrent(payload) {
54
54
  if (!handler) {
55
55
  return;
56
56
  }
57
- if (handler.method === 'openPage') {
57
+ if (handler.method === "openPage") {
58
58
  var _handler_params;
59
59
  var relationControlId = (_handler_params = handler.params) === null || _handler_params === void 0 ? void 0 : _handler_params.relation_control_id;
60
60
  if (relationControlId) {
@@ -4,8 +4,8 @@
4
4
  * @Date: 2023-02-16 14:45:22
5
5
  * @LastEditors: SuperLuckyqi
6
6
  * @LastEditTime: 2024-04-01 11:23:43
7
- */ import { loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
8
- import { RegularRules } from '@byteluck-fe/model-driven-core';
7
+ */ import { loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
8
+ import { RegularRules } from "@byteluck-fe/model-driven-core";
9
9
  var dataCleaner = function(schemaItems, payload) {
10
10
  var isArray = Array.isArray(schemaItems);
11
11
  var schemaArray = isArray ? schemaItems : [
@@ -40,7 +40,7 @@ function conversion(schema, payload) {
40
40
  }
41
41
  });
42
42
  }
43
- if (schema.props.caption === '') {
43
+ if (schema.props.caption === "") {
44
44
  schema.props.caption = payload === null || payload === void 0 ? void 0 : payload.formName;
45
45
  }
46
46
  if (schema.props.is_all_loaded === undefined) {
@@ -54,7 +54,7 @@ function conversion(schema, payload) {
54
54
  }
55
55
  if (schema.type === CONTROL_TYPE.SUBTABLE) {
56
56
  if (schema.props.mobile_default_num === undefined) {
57
- schema.props.mobile_default_num = schema.props.mobile_show_type === 'tile' ? 5 : 10;
57
+ schema.props.mobile_default_num = schema.props.mobile_show_type === "tile" ? 5 : 10;
58
58
  }
59
59
  }
60
60
  if (schema.type === CONTROL_TYPE.TREE) {
@@ -17,7 +17,7 @@
17
17
  }
18
18
  return obj;
19
19
  }
20
- import { loop, CONTROL_TYPE } from '@byteluck-fe/model-driven-shared';
20
+ import { loop, CONTROL_TYPE } from "@byteluck-fe/model-driven-shared";
21
21
  var dataCleaner = function(schemaItems, payload) {
22
22
  var isArray = Array.isArray(schemaItems);
23
23
  var schemaArray = isArray ? schemaItems : [
@@ -32,16 +32,16 @@ function conversion(schema, payload) {
32
32
  //默认值 赋值
33
33
  var addKeysDefaultValueMapping = _define_property({}, CONTROL_TYPE.SUBTABLE, [
34
34
  {
35
- key: 'import_config',
35
+ key: "import_config",
36
36
  value: {
37
- template_type: 'system',
37
+ template_type: "system",
38
38
  template_list: []
39
39
  }
40
40
  },
41
41
  {
42
- key: 'export_config',
42
+ key: "export_config",
43
43
  value: {
44
- template_type: 'system',
44
+ template_type: "system",
45
45
  template_list: []
46
46
  }
47
47
  }
@@ -53,7 +53,7 @@ function conversion(schema, payload) {
53
53
  }
54
54
  });
55
55
  }
56
- if (schema.type === 'card-group') {
56
+ if (schema.type === "card-group") {
57
57
  if (schema.props.isHideCaption === undefined) {
58
58
  schema.props.isHideCaption = false;
59
59
  }
@@ -71,11 +71,11 @@ function conversion(schema, payload) {
71
71
  CONTROL_TYPE.LIST_PAGE_BTN_BATCH_PRINT
72
72
  ];
73
73
  if (listBtnArrs.includes(schema.type)) {
74
- schema.control_type = 'base';
74
+ schema.control_type = "base";
75
75
  }
76
76
  if (schema.type === CONTROL_TYPE.SUBTABLE) {
77
77
  if (schema.props.mobile_default_num === undefined) {
78
- schema.props.mobile_default_num = schema.props.mobile_show_type === 'tile' ? 5 : 10;
78
+ schema.props.mobile_default_num = schema.props.mobile_show_type === "tile" ? 5 : 10;
79
79
  }
80
80
  }
81
81
  return schema;
@@ -4,8 +4,8 @@
4
4
  * @Date: 2024-01-22 14:16:13
5
5
  * @LastEditors: SuperLuckyqi
6
6
  * @LastEditTime: 2024-05-11 14:44:13
7
- */ import { loop, CONTROL_TYPE, decamelizeKeys } from '@byteluck-fe/model-driven-shared';
8
- import { MetaRowHeight } from '@byteluck-fe/model-driven-core';
7
+ */ import { loop, CONTROL_TYPE, decamelizeKeys } from "@byteluck-fe/model-driven-shared";
8
+ import { MetaRowHeight } from "@byteluck-fe/model-driven-core";
9
9
  function postProcess(controlMap, payload) {
10
10
  if ((payload === null || payload === void 0 ? void 0 : payload.formType) === 1 && (payload === null || payload === void 0 ? void 0 : payload.events) !== undefined) {
11
11
  var _payload_events;
@@ -14,12 +14,12 @@ function postProcess(controlMap, payload) {
14
14
  //本次转换将把原有的列表did_mount事件内容更换到did_init事件中。
15
15
  var did_mount = (_payload_events_did_mount = payload === null || payload === void 0 ? void 0 : (_payload_events = payload.events) === null || _payload_events === void 0 ? void 0 : _payload_events.did_mount) !== null && _payload_events_did_mount !== void 0 ? _payload_events_did_mount : [];
16
16
  if (did_mount.length > 0) {
17
- payload.events['did_init'] = did_mount;
18
- payload.events['did_mount'] = [];
17
+ payload.events["did_init"] = did_mount;
18
+ payload.events["did_mount"] = [];
19
19
  }
20
20
  //默认需要补充新的 did_init 事件
21
- if (payload.events['did_init'] === undefined) {
22
- payload.events['did_init'] = [];
21
+ if (payload.events["did_init"] === undefined) {
22
+ payload.events["did_init"] = [];
23
23
  }
24
24
  // 注意:这里没有改变schema,仅升级表单的可视化事件
25
25
  }
@@ -42,7 +42,7 @@ function conversion(schema, payload) {
42
42
  if (schema.type === CONTROL_TYPE.TEXTAREA) {
43
43
  var _schema_props_line_ellipsis, _schema_props_max_rows, _schema_props_line_ellipsis1;
44
44
  var setting = {
45
- rowHeightType: schema.props.auto_size === true ? 'auto' : 'fixed',
45
+ rowHeightType: schema.props.auto_size === true ? "auto" : "fixed",
46
46
  minRows: (_schema_props_line_ellipsis = schema.props.line_ellipsis) !== null && _schema_props_line_ellipsis !== void 0 ? _schema_props_line_ellipsis : 4,
47
47
  maxRows: (_schema_props_max_rows = schema.props.max_rows) !== null && _schema_props_max_rows !== void 0 ? _schema_props_max_rows : 20,
48
48
  fiexdRow: (_schema_props_line_ellipsis1 = schema.props.line_ellipsis) !== null && _schema_props_line_ellipsis1 !== void 0 ? _schema_props_line_ellipsis1 : 4
@@ -57,11 +57,11 @@ function conversion(schema, payload) {
57
57
  var displayBoList = config === null || config === void 0 ? void 0 : config.display_bo_list;
58
58
  if (displayBoList) {
59
59
  displayBoList.forEach(function(item) {
60
- if (item.value === 'org_type_code') {
61
- item.label = '业务类型';
60
+ if (item.value === "org_type_code") {
61
+ item.label = "业务类型";
62
62
  }
63
- if (item.value === 'org_pattern_code') {
64
- item.label = '组织形态';
63
+ if (item.value === "org_pattern_code") {
64
+ item.label = "组织形态";
65
65
  }
66
66
  });
67
67
  }