cloud-web-corejs 1.0.54-dev.688 → 1.0.54-dev.689

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.
Files changed (24) hide show
  1. package/package.json +1 -1
  2. package/src/components/fileLibrary/index.vue +113 -33
  3. package/src/components/xform/docs//345/220/216/345/217/260/345/255/227/346/256/265/357/274/210/345/212/250/346/200/201/347/224/237/346/210/220/357/274/211JSON /350/257/264/346/230/216.md" +210 -305
  4. package/src/components/xform/docs//346/225/260/346/215/256/350/241/250/346/240/274/345/212/250/346/200/201/345/210/227 JSON /350/257/264/346/230/216.md" +657 -0
  5. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +80 -14
  6. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +18 -13
  7. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +11 -8
  8. package/src/components/xform/form-designer/form-widget/field-widget/script-input-widget.vue +143 -0
  9. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +87 -25
  10. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +5 -0
  11. package/src/components/xform/form-designer/setting-panel/property-editor/container-table/table-dynamicField-editor.vue +80 -34
  12. package/src/components/xform/form-designer/setting-panel/property-editor/field-script-input/script-input-editor.vue +54 -0
  13. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
  14. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +56 -1
  15. package/src/components/xform/form-render/container-item/data-table-mixin.js +296 -118
  16. package/src/components/xform/form-render/container-item/dynamicFieldMixin.js +25 -37
  17. package/src/components/xform/form-render/container-item/list-h5-item.vue +5 -1
  18. package/src/components/xform/form-render/indexMixin.js +175 -6
  19. package/src/components/xform/lang/en-US.js +1 -0
  20. package/src/components/xform/lang/zh-CN.js +1 -0
  21. package/src/components/xform/utils/dynamicSchemaUtil.js +312 -0
  22. package/src/components/xform/utils/tableCellValidateUtil.js +148 -0
  23. package/src/components/xform/utils/tableColumnHelper.js +21 -1
  24. package/src/components/xform/utils/util.js +126 -0
@@ -1,11 +1,28 @@
1
1
  <template>
2
2
  <div class="table-dynamic-field-editor">
3
3
  <!-- 后台字段(动态生成):字段定义本身由后台查询下发 -->
4
- <el-divider class="custom-divider">后台字段(动态生成)</el-divider>
4
+ <el-divider class="custom-divider">
5
+ 后台字段
6
+ <el-tooltip effect="light" placement="top">
7
+ <div slot="content" class="field-tip-content">
8
+ 字段「显隐/必填/只读/禁用/取值」等动态规则请到「表单设置 -
9
+ 动态字段规则」统一配置
10
+ </div>
11
+ <i class="el-icon-info label-tip-icon"></i>
12
+ </el-tooltip>
13
+ </el-divider>
5
14
 
6
- <el-form-item label="启用后台字段">
15
+ <el-form-item>
16
+ <span slot="label">
17
+ 启用后台字段
18
+ <el-tooltip effect="light" placement="top">
19
+ <div slot="content" class="field-tip-content">
20
+ 字段由后台查询下发,无需在设计器预先配置
21
+ </div>
22
+ <i class="el-icon-info label-tip-icon"></i>
23
+ </el-tooltip>
24
+ </span>
7
25
  <el-switch v-model="optionModel.dynamicSchemaEnabled"></el-switch>
8
- <div class="tip-text">字段由后台查询下发,无需在设计器预先配置</div>
9
26
  </el-form-item>
10
27
 
11
28
  <template v-if="optionModel.dynamicSchemaEnabled">
@@ -16,7 +33,17 @@
16
33
  placeholder="scriptCode 或 formCode/scriptCode"
17
34
  ></el-input>
18
35
  </el-form-item>
19
- <el-form-item label="额外参数">
36
+ <el-form-item>
37
+ <span slot="label">
38
+ 额外参数
39
+ <el-tooltip effect="light" placement="top">
40
+ <div slot="content" class="field-tip-content">
41
+ 与数据表格动态列一致:return { bizType: this.formModel.type },固定附带
42
+ formData
43
+ </div>
44
+ <i class="el-icon-info label-tip-icon"></i>
45
+ </el-tooltip>
46
+ </span>
20
47
  <a
21
48
  href="javascript:void(0);"
22
49
  class="a-link link-oneLind"
@@ -25,12 +52,18 @@
25
52
  <span>{{ optionModel.dynamicSchemaScriptParam }}</span>
26
53
  <i class="el-icon-edit"></i>
27
54
  </a>
28
- <div class="tip-text">
29
- 格式: return { bizType:
30
- formModel.type }
31
- </div>
32
55
  </el-form-item>
33
- <el-form-item label="转换脚本">
56
+ <el-form-item>
57
+ <span slot="label">
58
+ 转换脚本
59
+ <el-tooltip effect="light" placement="top">
60
+ <div slot="content" class="field-tip-content">
61
+ 可选。入参 res,返回标准定义数组或 { fields/columns: [...] };不填时默认取
62
+ res.objx(数组)或 res.objx.fields / res.objx.columns
63
+ </div>
64
+ <i class="el-icon-info label-tip-icon"></i>
65
+ </el-tooltip>
66
+ </span>
34
67
  <a
35
68
  href="javascript:void(0);"
36
69
  class="a-link link-oneLind"
@@ -39,24 +72,35 @@
39
72
  <span>{{ optionModel.dynamicSchemaConvert }}</span>
40
73
  <i class="el-icon-edit"></i>
41
74
  </a>
42
- <div class="tip-text">
43
- 可选。入参 res,返回标准字段定义数组;不填时默认取 res.objx(数组)或
44
- res.objx.fields / res.objx.columns
45
- </div>
46
75
  </el-form-item>
47
- <el-form-item label="生成模式">
76
+ <el-form-item>
77
+ <span slot="label">
78
+ 生成模式
79
+ <el-tooltip effect="light" placement="top">
80
+ <div slot="content" class="field-tip-content">
81
+ 追加=保留已配字段并在其后生成;替换=清空已配行后全部由后台生成;锚点插入=插到设计期某占位行位置
82
+ </div>
83
+ <i class="el-icon-info label-tip-icon"></i>
84
+ </el-tooltip>
85
+ </span>
48
86
  <el-radio-group v-model="optionModel.dynamicSchemaMode" size="mini">
49
87
  <el-radio-button label="append">追加</el-radio-button>
50
88
  <el-radio-button label="replace">替换</el-radio-button>
51
89
  <el-radio-button label="anchor">锚点插入</el-radio-button>
52
90
  </el-radio-group>
53
- <div class="tip-text">
54
- 追加=保留已配字段并在其后生成;替换=清空已配行后全部由后台生成;锚点插入=插到设计期某占位行位置
55
- </div>
56
91
  </el-form-item>
57
92
 
58
93
  <template v-if="optionModel.dynamicSchemaMode === 'anchor'">
59
- <el-form-item label="占位锚点行">
94
+ <el-form-item>
95
+ <span slot="label">
96
+ 占位锚点行
97
+ <el-tooltip effect="light" placement="top">
98
+ <div slot="content" class="field-tip-content">
99
+ 建议预留一个空行作为占位锚点
100
+ </div>
101
+ <i class="el-icon-info label-tip-icon"></i>
102
+ </el-tooltip>
103
+ </span>
60
104
  <el-select
61
105
  v-model="optionModel.dynamicSchemaAnchorRowId"
62
106
  size="mini"
@@ -70,7 +114,6 @@
70
114
  :value="r.value"
71
115
  ></el-option>
72
116
  </el-select>
73
- <div class="tip-text">建议预留一个空行作为占位锚点</div>
74
117
  </el-form-item>
75
118
  <el-form-item label="插入位置">
76
119
  <el-radio-group
@@ -82,13 +125,19 @@
82
125
  <el-radio-button label="after">之后</el-radio-button>
83
126
  </el-radio-group>
84
127
  </el-form-item>
85
- <el-form-item label="继承行布局">
128
+ <el-form-item>
129
+ <span slot="label">
130
+ 继承行布局
131
+ <el-tooltip effect="light" placement="top">
132
+ <div slot="content" class="field-tip-content">
133
+ 开启后生成行沿用占位行的单元格数量/宽度/跨列,否则按"每行列数"平铺
134
+ </div>
135
+ <i class="el-icon-info label-tip-icon"></i>
136
+ </el-tooltip>
137
+ </span>
86
138
  <el-switch
87
139
  v-model="optionModel.dynamicSchemaInheritLayout"
88
140
  ></el-switch>
89
- <div class="tip-text">
90
- 开启后生成行沿用占位行的单元格数量/宽度/跨列,否则按"每行列数"平铺
91
- </div>
92
141
  </el-form-item>
93
142
  </template>
94
143
 
@@ -108,11 +157,6 @@
108
157
  </el-form-item>
109
158
  </template>
110
159
 
111
- <div class="tip-text scope-tip">
112
- 字段「显隐/必填/只读/禁用/取值」等动态规则请到「表单设置 -
113
- 动态字段规则」统一配置
114
- </div>
115
-
116
160
  <el-dialog
117
161
  title="额外参数"
118
162
  :visible.sync="scriptParamDialogVisible"
@@ -293,14 +337,16 @@ export default {
293
337
  </script>
294
338
 
295
339
  <style lang="scss" scoped>
296
- .tip-text {
297
- font-size: 12px;
340
+ .label-tip-icon {
341
+ margin-left: 4px;
298
342
  color: #909399;
299
- line-height: 1.4;
300
- margin-top: 2px;
343
+ cursor: pointer;
344
+ font-size: 14px;
345
+ vertical-align: middle;
301
346
  }
302
347
 
303
- .scope-tip {
304
- margin-top: 10px;
348
+ .field-tip-content {
349
+ line-height: 1.4;
350
+ max-width: 320px;
305
351
  }
306
352
  </style>
@@ -0,0 +1,54 @@
1
+ <template>
2
+ <div>
3
+ <el-form-item label="编辑器语言">
4
+ <el-select v-model="optionModel.editorMode">
5
+ <el-option value="javascript" label="JavaScript"></el-option>
6
+ <el-option value="java" label="Java"></el-option>
7
+ <el-option value="json" label="JSON"></el-option>
8
+ </el-select>
9
+ </el-form-item>
10
+ <el-form-item label="编辑器高度">
11
+ <el-input
12
+ v-model="optionModel.editorHeight"
13
+ placeholder="如 200px"
14
+ ></el-input>
15
+ </el-form-item>
16
+ <el-form-item label="最小行数">
17
+ <el-input-number
18
+ v-model="optionModel.editorMinLines"
19
+ :min="3"
20
+ :max="100"
21
+ controls-position="right"
22
+ style="width: 100%"
23
+ ></el-input-number>
24
+ </el-form-item>
25
+ <el-form-item label="最大行数">
26
+ <el-input-number
27
+ v-model="optionModel.editorMaxLines"
28
+ :min="3"
29
+ :max="200"
30
+ controls-position="right"
31
+ style="width: 100%"
32
+ ></el-input-number>
33
+ </el-form-item>
34
+ <el-form-item label="语法检查">
35
+ <el-switch v-model="optionModel.userWorker"></el-switch>
36
+ </el-form-item>
37
+ </div>
38
+ </template>
39
+
40
+ <script>
41
+ import i18n from "../../../../utils/i18n";
42
+
43
+ export default {
44
+ name: "script-input-editor",
45
+ mixins: [i18n],
46
+ props: {
47
+ designer: Object,
48
+ selectedWidget: Object,
49
+ optionModel: Object,
50
+ },
51
+ };
52
+ </script>
53
+
54
+ <style scoped></style>
@@ -127,6 +127,7 @@ const COMMON_PROPERTIES = {
127
127
 
128
128
  oplogFlag: "oplogFlag-editor",
129
129
  vuePageFlag: "vue-page-editor",
130
+ scriptInputFlag: "script-input-editor",
130
131
  ganttConfig: "gantt-editor",
131
132
 
132
133
  //弹框
@@ -176,6 +176,8 @@ export const containers = [
176
176
  label: "data-table",
177
177
  submitFlag: true,
178
178
  formField: "",
179
+ required: !1,
180
+ requiredHint: "",
179
181
  hidden: !1,
180
182
  rowSpacing: 8,
181
183
  tableHeight: "",
@@ -257,7 +259,7 @@ export const containers = [
257
259
  dynamicColumnMode: "append",
258
260
  dynamicColumnScriptCode: null,
259
261
  dynamicColumnScriptParam: null,
260
- onDynamicColumnsConvert: null,
262
+ dynamicSchemaConvert: null,
261
263
  dynamicColumnLoadScript: null,
262
264
  accessType: "1",
263
265
  accessUrl: null,
@@ -1121,6 +1123,59 @@ export const basicFields = [
1121
1123
  ...defaultTextFlagConfig,
1122
1124
  },
1123
1125
  },
1126
+ {
1127
+ type: "script-input",
1128
+ icon: "textarea-field",
1129
+ commonFlag: !0,
1130
+ formItemFlag: !0,
1131
+ columnFlag: true,
1132
+ tableField: null,
1133
+ options: {
1134
+ name: "",
1135
+ keyNameEnabled: !1,
1136
+ keyName: "",
1137
+ label: "",
1138
+ labelColor: "",
1139
+ submitFlag: true,
1140
+ labelAlign: "",
1141
+ defaultValue: "",
1142
+ placeholder: "",
1143
+ columnWidth: "200px",
1144
+ size: "",
1145
+ labelWidth: null,
1146
+ labelHidden: !1,
1147
+ readonly: !1,
1148
+ disabled: !1,
1149
+ hidden: !1,
1150
+ required: !1,
1151
+ requiredHint: "",
1152
+ validation: "",
1153
+ validationHint: "",
1154
+ customClass: "",
1155
+ labelIconClass: null,
1156
+ labelIconPosition: "rear",
1157
+ labelTooltip: null,
1158
+ scriptInputFlag: 1,
1159
+ editorMode: "java",
1160
+ editorHeight: "200px",
1161
+ editorMinLines: 8,
1162
+ editorMaxLines: 30,
1163
+ userWorker: !1,
1164
+ onCreated: "",
1165
+ onMounted: "",
1166
+ onInput: "",
1167
+ onChange: "",
1168
+ onFocus: "",
1169
+ onBlur: "",
1170
+ onValidate: "",
1171
+ accessType: "1",
1172
+ ...defaultWfConfig,
1173
+ showRuleFlag: 1,
1174
+ showRuleEnabled: 1,
1175
+ showRules: [],
1176
+ ...defaultTextFlagConfig,
1177
+ },
1178
+ },
1124
1179
  {
1125
1180
  type: "number",
1126
1181
  icon: "number-field",