cloud-web-corejs 1.0.54-dev.350 → 1.0.54-dev.352

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 (25) hide show
  1. package/package.json +1 -1
  2. package/src/components/baseInputExport/mixins.js +1 -386
  3. package/src/components/errorMsg/mixins.js +1 -89
  4. package/src/components/excelImport/mixins.js +1 -749
  5. package/src/components/jsonImport/mixins.js +1 -332
  6. package/src/components/langImport/mixins.js +1 -484
  7. package/src/components/wf/mixins/wfFlowEleScriptDialog.js +1 -129
  8. package/src/components/wf/wf.js +1 -2117
  9. package/src/components/xform/form-designer/designer.js +1 -1645
  10. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +1 -281
  11. package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1 -1328
  12. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1591
  13. package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +0 -7
  14. package/src/components/xform/form-designer/indexMixin.js +1 -823
  15. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +0 -1
  16. package/src/components/xform/form-render/container-item/containerItemMixin.js +1 -348
  17. package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -2707
  18. package/src/components/xform/form-render/container-item/table2-item.vue +141 -88
  19. package/src/components/xform/form-render/indexMixin.js +1 -3139
  20. package/src/components/xform/mixins/scriptHttp.js +1 -173
  21. package/src/components/xform/utils/util.js +1 -1451
  22. package/src/utils/request.js +1 -359
  23. package/src/utils/vab.js +1 -1095
  24. package/src/views/user/notify_message/dialog.vue +0 -1
  25. package/src/views/user/wf/wfReport/index.vue +1 -51
@@ -1,42 +1,51 @@
1
1
  <template>
2
2
  <container-item-wrapper :widget="widget">
3
-
4
- <div :key="widget.id" class="table-container"
5
- v-show="!widget.options.hidden">
6
- <table :ref="widget.id" class="table-layout table-d-box" :class="[customClass,widget.options.styleTableClass]"
7
- :style="tableStyle">
3
+ <div :key="widget.id" class="table-container" v-show="!widget.options.hidden">
4
+ <table
5
+ :ref="widget.id"
6
+ class="table-layout table-d-box"
7
+ :class="[customClass, widget.options.styleTableClass]"
8
+ :style="tableStyle"
9
+ >
8
10
  <tbody>
9
- <tr v-for="(row, rowIdx) in widget.rows" :key="row.id">
10
- <template v-for="(colWidget, colIdx) in row.cols">
11
- <table-cell-item v-if="!colWidget.merged" :widget="colWidget" :key="colIdx" :parent-list="widget.cols"
12
- :row-index="rowIdx" :col-index="colIdx" :parent-widget="widget" :parent-target="_self"
13
- :row.sync="rowData">
14
- <!-- 递归传递插槽!!! -->
15
- <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
16
- <slot :name="slot" v-bind="scope"/>
17
- </template>
18
- </table-cell-item>
19
- </template>
20
- </tr>
11
+ <tr v-for="(row, rowIdx) in widget.rows" :key="row.id">
12
+ <template v-for="(colWidget, colIdx) in row.cols">
13
+ <table-cell-item
14
+ v-if="!colWidget.merged"
15
+ :widget="colWidget"
16
+ :key="colIdx"
17
+ :parent-list="widget.cols"
18
+ :row-index="rowIdx"
19
+ :col-index="colIdx"
20
+ :parent-widget="widget"
21
+ :parent-target="_self"
22
+ :row.sync="rowData"
23
+ >
24
+ <!-- 递归传递插槽!!! -->
25
+ <template v-for="slot in Object.keys($scopedSlots)" v-slot:[slot]="scope">
26
+ <slot :name="slot" v-bind="scope" />
27
+ </template>
28
+ </table-cell-item>
29
+ </template>
30
+ </tr>
21
31
  </tbody>
22
32
  </table>
23
33
  </div>
24
-
25
34
  </container-item-wrapper>
26
35
  </template>
27
36
 
28
37
  <script>
29
- import emitter from '../../../../components/xform/utils/emitter'
30
- import i18n from "../../../../components/xform/utils/i18n"
31
- import refMixin from "../../../../components/xform/form-render/refMixin"
32
- import ContainerItemWrapper from './container-item-wrapper'
33
- import TableCellItem from './table2-cell-item'
38
+ import emitter from "../../../../components/xform/utils/emitter";
39
+ import i18n from "../../../../components/xform/utils/i18n";
40
+ import refMixin from "../../../../components/xform/form-render/refMixin";
41
+ import ContainerItemWrapper from "./container-item-wrapper";
42
+ import TableCellItem from "./table2-cell-item";
34
43
  import containerItemMixin from "./containerItemMixin";
35
- import {generateId} from "../../../../components/xform/utils/util"
44
+ import { generateId } from "../../../../components/xform/utils/util";
36
45
 
37
46
  export default {
38
47
  name: "table2-item",
39
- componentName: 'ContainerItem',
48
+ componentName: "ContainerItem",
40
49
  mixins: [emitter, i18n, refMixin, containerItemMixin],
41
50
  components: {
42
51
  ContainerItemWrapper,
@@ -45,46 +54,46 @@ export default {
45
54
  props: {
46
55
  widget: Object,
47
56
  },
48
- inject: ['refList', 'sfRefList', 'globalModel'],
57
+ inject: ["refList", "sfRefList", "globalModel"],
49
58
  provide: {
50
- getRows: () => this.rows
59
+ getRows: () => this.rows,
51
60
  },
52
61
  computed: {
53
62
  tableStyle() {
54
- return this.widget.options.fullWidth ? 'width:100%;' : '';
63
+ return this.widget.options.fullWidth ? "width:100%;" : "";
55
64
  },
56
65
  formModel: {
57
66
  cache: !1,
58
67
  get: function () {
59
68
  return this.globalModel.formModel;
60
- }
69
+ },
61
70
  },
62
71
  formDataId() {
63
72
  let formRef = this.getFormRef();
64
73
  return formRef.dataId;
65
- }
74
+ },
66
75
  },
67
76
  created() {
68
- this.initRefList()
69
- this.handleOnCreated()
77
+ this.initRefList();
78
+ this.handleOnCreated();
70
79
  },
71
80
  mounted() {
72
- this.handleOnMounted()
81
+ this.handleOnMounted();
73
82
  },
74
83
  beforeDestroy() {
75
- this.unregisterFromRefList()
84
+ this.unregisterFromRefList();
76
85
  },
77
86
  data() {
78
87
  return {
79
88
  rows: [],
80
89
  rowData: {},
81
90
  typeMap: {
82
- 0: 'input',
83
- 1: 'textarea',
84
- 2: 'date',
85
- 3: 'number',
86
- }
87
- }
91
+ 0: "input",
92
+ 1: "textarea",
93
+ 2: "date",
94
+ 3: "number",
95
+ },
96
+ };
88
97
  },
89
98
  watch: {},
90
99
  methods: {
@@ -95,13 +104,11 @@ export default {
95
104
  return this.rows;
96
105
  },
97
106
  getType(f_field_type) {
98
- return this.typeMap[f_field_type]
107
+ return this.typeMap[f_field_type];
99
108
  },
100
109
  setValue(items = []) {
101
-
102
-
103
110
  let dataMap = {};
104
- let widgetRows = []
111
+ let widgetRows = [];
105
112
  let currentSpan = 0;
106
113
  let index = -1;
107
114
 
@@ -111,65 +118,71 @@ export default {
111
118
  item.f_field_value = null;
112
119
  }
113
120
  let type = this.getType(item.f_field_type);
114
- let tableCell = this.$baseLodash.cloneDeep(formRef.getContainerByType("table-cell"));
121
+ let tableCell = this.$baseLodash.cloneDeep(
122
+ formRef.getContainerByType("table-cell")
123
+ );
115
124
  tableCell.options.rowIndex = rowIndex;
116
125
  let colspan = 1;
117
126
  let tc = 0;
118
127
  if (type == "textarea") {
119
128
  if (currentSpan && currentSpan < 4) {
120
- tc = 4 - currentSpan
129
+ tc = 4 - currentSpan;
121
130
  }
122
- colspan = 4
123
- tableCell.options.colspan = 4
131
+ colspan = 4;
132
+ tableCell.options.colspan = 4;
124
133
  }
125
134
 
126
- let widget = this.$baseLodash.cloneDeep(formRef.getFieldWidgetByType(type));
127
- let options = widget.options;
128
- options.keyNameEnabled = true;
129
- options.keyName = item.f_key;
130
- options.label = item.f_field_name;
131
- options.required = item.f_is_required;
132
-
133
- tableCell.widgetList.push(widget)
135
+ let widget = type
136
+ ? this.$baseLodash.cloneDeep(formRef.getFieldWidgetByType(type))
137
+ : null;
138
+ if (widget) {
139
+ let options = widget.options;
140
+ options.keyNameEnabled = true;
141
+ options.keyName = item.f_key;
142
+ options.label = item.f_field_name;
143
+ options.required = item.f_is_required;
144
+ tableCell.widgetList.push(widget);
145
+ }
134
146
 
135
147
  if (index === -1) {
136
- index++
148
+ index++;
137
149
  widgetRows.push({
138
- id: 'table-row-' + generateId(),
150
+ id: "table-row-" + generateId(),
139
151
  merged: false,
140
- cols: []
141
- })
152
+ cols: [],
153
+ });
142
154
  currentSpan = colspan;
143
155
  } else if (currentSpan + colspan > 4) {
144
- index++
156
+ index++;
145
157
  widgetRows.push({
146
- id: 'table-row-' + generateId(),
158
+ id: "table-row-" + generateId(),
147
159
  merged: false,
148
- cols: []
149
- })
160
+ cols: [],
161
+ });
150
162
  currentSpan = colspan;
151
163
  } else {
152
164
  currentSpan = colspan + currentSpan;
153
165
  }
154
166
 
155
167
  for (let i = 0; i < tc; i++) {
156
- widgetRows[index - 1].cols.push(this.$baseLodash.cloneDeep(formRef.getContainerByType("table-cell")));
168
+ widgetRows[index - 1].cols.push(
169
+ this.$baseLodash.cloneDeep(formRef.getContainerByType("table-cell"))
170
+ );
157
171
  }
158
172
 
159
173
  let cols = widgetRows[index].cols;
160
174
 
161
-
162
175
  cols.push(tableCell);
163
176
 
164
177
  dataMap[item.f_key] = item.f_field_value ?? null;
165
- })
178
+ });
166
179
 
167
180
  this.rows = items;
168
181
  this.$set(this.formModel, this.fieldKeyName, items);
169
182
 
170
183
  this.rowData = dataMap;
171
- this.widget.rows.length = 0
172
- this.widget.rows.push(...widgetRows)
184
+ this.widget.rows.length = 0;
185
+ this.widget.rows.push(...widgetRows);
173
186
  },
174
187
  loadDataDefaultHandle() {
175
188
  /*this.init();
@@ -179,9 +192,9 @@ export default {
179
192
  let reportTemplate = this.getFormRef().reportTemplate;
180
193
  let formCode = reportTemplate.formCode;
181
194
  let formScriptEnabled = this.widget.options.formScriptEnabled || false;
182
- let scriptCode = this.widget.options.formScriptCode
195
+ let scriptCode = this.widget.options.formScriptCode;
183
196
  if (!scriptCode) return;
184
- let accessParam = this.handleCustomEvent(this.widget.options.formScriptParam)
197
+ let accessParam = this.handleCustomEvent(this.widget.options.formScriptParam);
185
198
  return this.formHttp({
186
199
  scriptCode: scriptCode,
187
200
  data: {
@@ -190,31 +203,72 @@ export default {
190
203
  taBm: this.fieldKeyName,
191
204
  data: {
192
205
  id: dataId,
193
- ...accessParam
194
- }
206
+ ...accessParam,
207
+ },
195
208
  },
196
- success: res => {
209
+ success: (res) => {
197
210
  let rows = res.objx || [];
198
- this.setValue(rows)
199
- }
211
+ this.setValue(rows);
212
+ },
200
213
  });
201
214
  },
202
215
  init() {
203
216
  let items = [
204
- {f_field_name: "a", f_key: "a", f_field_type: 0, f_is_required: true, f_field_value: '1'},
205
- {f_field_name: "b", f_key: "b", f_field_type: 3, f_is_required: true, f_field_value: 2},
206
- {f_field_name: "c", f_key: "c", f_field_type: 1, f_is_required: true, f_field_value: "11111"},
207
- {f_field_name: "d", f_key: "d", f_field_type: 0, f_is_required: true, f_field_value: '3'},
208
- {f_field_name: "e", f_key: "e", f_field_type: 0, f_is_required: true, f_field_value: '4'},
209
- {f_field_name: "f", f_key: "f", f_field_type: 0, f_is_required: true, f_field_value: '5'},
210
- {f_field_name: "g", f_key: "g", f_field_type: 0, f_is_required: true, f_field_value: '6'},
217
+ {
218
+ f_field_name: "a",
219
+ f_key: "a",
220
+ f_field_type: 0,
221
+ f_is_required: true,
222
+ f_field_value: "1",
223
+ },
224
+ {
225
+ f_field_name: "b",
226
+ f_key: "b",
227
+ f_field_type: 3,
228
+ f_is_required: true,
229
+ f_field_value: 2,
230
+ },
231
+ {
232
+ f_field_name: "c",
233
+ f_key: "c",
234
+ f_field_type: 1,
235
+ f_is_required: true,
236
+ f_field_value: "11111",
237
+ },
238
+ {
239
+ f_field_name: "d",
240
+ f_key: "d",
241
+ f_field_type: 0,
242
+ f_is_required: true,
243
+ f_field_value: "3",
244
+ },
245
+ {
246
+ f_field_name: "e",
247
+ f_key: "e",
248
+ f_field_type: 0,
249
+ f_is_required: true,
250
+ f_field_value: "4",
251
+ },
252
+ {
253
+ f_field_name: "f",
254
+ f_key: "f",
255
+ f_field_type: 0,
256
+ f_is_required: true,
257
+ f_field_value: "5",
258
+ },
259
+ {
260
+ f_field_name: "g",
261
+ f_key: "g",
262
+ f_field_type: 0,
263
+ f_is_required: true,
264
+ f_field_value: "6",
265
+ },
211
266
  ];
212
- let a = 1
267
+ let a = 1;
213
268
  this.setValue(items);
214
-
215
- }
269
+ },
216
270
  },
217
- }
271
+ };
218
272
  </script>
219
273
 
220
274
  <style lang="scss" scoped>
@@ -225,5 +279,4 @@ div.table-container {
225
279
  border-collapse: collapse;
226
280
  }
227
281
  }
228
-
229
282
  </style>