cloud-web-corejs 1.0.54-dev.9 → 1.0.54-dev.91
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 +9 -3
- package/src/components/VabUpload/index.vue +2 -1
- package/src/components/VabUpload/mixins.js +1 -1
- package/src/components/VabUpload/view.vue +2 -1
- package/src/components/excelExport/exportFieldDialog.vue +17 -7
- package/src/components/excelExport/index.js +2 -1
- package/src/components/excelExport/index.vue +8 -6
- package/src/components/excelExport/mixins.js +1 -2
- package/src/components/excelImport/index.vue +2 -1
- package/src/components/excelImport/mixins.js +1 -1
- package/src/components/fileLibrary/fileObjAuthDialog.vue +1 -1
- package/src/components/fileLibrary/fileObjAuthEditDialog.vue +1 -1
- package/src/components/fileLibrary/fileObjNotifyEdit.vue +90 -68
- package/src/components/fileLibrary/index.vue +3 -3
- package/src/components/fileLibrary/mixins/fileObjAuthDialogMixin.js +8 -3
- package/src/components/fileLibrary/mixins/fileObjAuthEditDialogMixin.js +4 -1
- package/src/components/fileLibrary/mixins/fileObjAuthEditMixin.js +1 -1
- package/src/components/fileLibrary/mixins/indexMixins.js +31 -17
- package/src/components/fileLibrary/mixins/propertiesDialogMixins.js +2 -1
- package/src/components/fileLibrary/propertiesDialog.vue +4 -0
- package/src/components/jsonImport/mixins.js +1 -1
- package/src/components/onlineTalk/index.vue +327 -5
- package/src/components/onlineTalk/mixins.js +1 -1
- package/src/components/table/index.js +2 -1
- package/src/components/tempStorage/tempStorageDialog.vue +2 -2
- package/src/components/xform/form-designer/form-widget/dialog/formDialog.vue +1 -0
- package/src/components/xform/form-designer/form-widget/dialog/formDrawer.vue +1 -0
- package/src/components/xform/form-designer/form-widget/dialog/formFieldDialog.vue +2 -2
- package/src/components/xform/form-designer/form-widget/dialog/importDialog.vue +35 -5
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +3 -1
- package/src/components/xform/form-designer/form-widget/dialog/preformDialog.vue +2 -2
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +8 -5
- package/src/components/xform/form-designer/form-widget/dialog/vabSearchDialog.vue +2 -2
- package/src/components/xform/form-designer/form-widget/field-widget/baseAttachment-widget.vue +6 -2
- package/src/components/xform/form-designer/form-widget/field-widget/date-range-widget.vue +1 -0
- package/src/components/xform/form-designer/form-widget/field-widget/echart-bar-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-category-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/echart-pie-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js +49 -8
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js +61 -88
- package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js +13 -0
- package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue +6 -1
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +79 -0
- package/src/components/xform/form-designer/indexMixin.js +1 -1
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +6 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +6 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/onCheckboxChange-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +13 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onAfterConfirmFile-editor.vue +32 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +2 -2
- package/src/components/xform/form-designer/setting-panel/property-editor/field-date-range/date-range-defaultTime-editor.vue +27 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-bar-editor.vue +185 -69
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-category-editor.vue +188 -86
- package/src/components/xform/form-designer/setting-panel/property-editor/field-echart/echart-pie-editor.vue +84 -39
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +3 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-table-export-button/table-export-button-editor.vue +26 -7
- package/src/components/xform/form-designer/setting-panel/property-editor/placeholder-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/showRuleFlag-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +109 -22
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +2 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +53 -4
- package/src/components/xform/form-render/container-item/data-table-item.vue +5 -4
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1881 -1
- package/src/components/xform/form-render/indexMixin.js +1669 -1
- package/src/layout/components/Sidebar/default.vue +18 -6
- package/src/mixins/selectDialog/index.js +1 -1
- package/src/router/modules/customer.js +15 -0
- package/src/store/config/index.js +1 -1
- package/src/store/modules/permission.js +1 -1
- package/src/store/modules/user.js +302 -1
- package/src/utils/pddLog.js +2 -0
- package/src/utils/request.js +28 -28
- package/src/utils/vab.js +1 -1
- package/src/views/bd/setting/form_template/batchWfObjConfigDialog.vue +105 -0
- package/src/views/bd/setting/form_template/edit.vue +2 -2
- package/src/views/bd/setting/form_template/editWfObjConfigDialog.vue +2 -2
- package/src/views/bd/setting/form_template/list.vue +4 -2
- package/src/views/bd/setting/form_template/mixins/batchWfObjConfigDialog.js +4 -0
- package/src/views/bd/setting/form_template/mixins/edit.js +1 -1
- package/src/views/bd/setting/form_template/mixins/list.js +1 -1
- package/src/views/bd/setting/form_template/mixins/wf_list.js +12 -0
- package/src/views/bd/setting/form_template/wfObjConfigDialog.vue +254 -0
- package/src/views/bd/setting/form_template/wf_list.vue +127 -0
- package/src/views/bd/setting/menu_kind/authDialog.vue +1 -1
- package/src/views/bd/setting/menu_kind/mixins/authDialog.js +1 -1
- package/src/views/bd/setting/table_model/edit.vue +1 -1
- package/src/views/bd/setting/table_model/list.vue +4 -2
- package/src/views/bd/setting/table_model/mixins/list.js +14 -14
- package/src/views/user/area/dialog.vue +21 -8
- package/src/views/user/bill_setting/edit.vue +1 -1
- package/src/views/user/bill_setting/list.vue +1 -1
- package/src/views/user/common_attribute/itemEdit.vue +2 -2
- package/src/views/user/common_attribute/list.vue +1 -1
- package/src/views/user/common_script/edit.vue +1 -1
- package/src/views/user/common_script/list.vue +1 -1
- package/src/views/user/company_info/dialog.vue +19 -9
- package/src/views/user/company_info/edit.vue +1 -1
- package/src/views/user/extend_datasource/dialog.vue +1 -0
- package/src/views/user/extend_datasource/edit.vue +3 -0
- package/src/views/user/extend_datasource/list.vue +2 -1
- package/src/views/user/file_type/edit.vue +30 -1
- package/src/views/user/file_type/list.vue +28 -0
- package/src/views/user/groups/edit.vue +2 -0
- package/src/views/user/groups/list.vue +1 -0
- package/src/views/user/home/dev.vue +29 -0
- package/src/views/user/home/index.vue +16 -6
- package/src/views/user/login/default.vue +4 -2
- package/src/views/user/outLink/form_view.vue +39 -12
- package/src/views/user/outLink/index.vue +17 -0
- package/src/views/user/outLink/view.vue +39 -13
- package/src/views/user/push_setting/list.vue +2 -2
- package/src/views/user/user/edit.vue +9 -9
- package/src/views/user/user/form_edit.vue +117 -49
- package/src/views/user/user/form_info.vue +210 -0
- package/src/views/user/user/form_list.vue +1 -0
- package/src/views/user/user/list.vue +3 -3
- package/src/views/user/wf/wf_obj_config/list.vue +19 -3
- package/src/views/user/wf/wf_obj_config/wfBizDataSettingDialog.vue +292 -0
package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-bar-mixin.js
CHANGED
@@ -3,7 +3,7 @@ import i18n from '../../../../../../components/xform/utils/i18n';
|
|
3
3
|
import fieldMixin from '../../../../../../components/xform/form-designer/form-widget/field-widget/fieldMixin';
|
4
4
|
|
5
5
|
import {deepClone} from '../../../../../../components/xform/utils/util';
|
6
|
-
|
6
|
+
import {extendDeeply} from "@base/utils/index.js";
|
7
7
|
import {use} from 'echarts/core';
|
8
8
|
import {CanvasRenderer} from 'echarts/renderers';
|
9
9
|
import {BarChart} from 'echarts/charts';
|
@@ -53,7 +53,6 @@ modules = {
|
|
53
53
|
serieClone: {},
|
54
54
|
showChart: true,
|
55
55
|
colors: [
|
56
|
-
|
57
56
|
{
|
58
57
|
type: 'linear',
|
59
58
|
x: 0.5,
|
@@ -206,6 +205,9 @@ modules = {
|
|
206
205
|
delete chartOptions.yAxis.data;
|
207
206
|
}
|
208
207
|
}
|
208
|
+
},
|
209
|
+
chartOption() {
|
210
|
+
return this.field.options.echarBarOption
|
209
211
|
}
|
210
212
|
},
|
211
213
|
beforeCreate() {
|
@@ -220,6 +222,7 @@ modules = {
|
|
220
222
|
this.initEventHandler();
|
221
223
|
|
222
224
|
this.handleOnCreated();
|
225
|
+
this.initOption();
|
223
226
|
this.serieClone = deepClone(this.field.options.echarBarOption.series[0]);
|
224
227
|
},
|
225
228
|
|
@@ -232,6 +235,37 @@ modules = {
|
|
232
235
|
},
|
233
236
|
|
234
237
|
methods: {
|
238
|
+
reflush(){
|
239
|
+
this.showChart = false;
|
240
|
+
this.$nextTick(()=>{
|
241
|
+
this.showChart = true
|
242
|
+
})
|
243
|
+
},
|
244
|
+
getColors(){
|
245
|
+
let chartColors = this.field.options.echarBarOption.colors || [];
|
246
|
+
let colors = [...chartColors, ...this.colors];
|
247
|
+
return colors
|
248
|
+
},
|
249
|
+
adjustColor() {
|
250
|
+
let colors = this.getColors();
|
251
|
+
let colorsSize = colors.length;
|
252
|
+
this.field.options.echarBarOption.series.forEach((serie, index) => {
|
253
|
+
if (colorsSize > index) {
|
254
|
+
if (serie.itemStyle) {
|
255
|
+
serie.itemStyle.color = colors[index]
|
256
|
+
} else {
|
257
|
+
serie.itemStyle = {
|
258
|
+
color: colors[index]
|
259
|
+
}
|
260
|
+
}
|
261
|
+
}
|
262
|
+
})
|
263
|
+
},
|
264
|
+
initOption() {
|
265
|
+
let echartConfig = this.handleCustomEvent(this.field.options.echartConfig) || {};
|
266
|
+
this.field.options.echarBarOption = extendDeeply(this.field.options.echarBarOption, echartConfig);
|
267
|
+
this.adjustColor();
|
268
|
+
},
|
235
269
|
/*async loadData() {
|
236
270
|
if (this.designState) {
|
237
271
|
this.showChart = true;
|
@@ -364,7 +398,7 @@ modules = {
|
|
364
398
|
});
|
365
399
|
},
|
366
400
|
setValue(rows) {
|
367
|
-
this.showChart
|
401
|
+
this.showChart = false;
|
368
402
|
let serieClone = this.serieClone;
|
369
403
|
let resDatas = rows || [];
|
370
404
|
let axisDatas = [];
|
@@ -383,14 +417,18 @@ modules = {
|
|
383
417
|
nameDatas.push(resData.name);
|
384
418
|
}
|
385
419
|
});
|
386
|
-
let colors = this.
|
420
|
+
let colors = this.getColors();
|
387
421
|
let colorsSize = colors.length;
|
388
422
|
nameDatas.forEach((nameItem, index) => {
|
389
423
|
let serie = deepClone(serieClone);
|
390
424
|
serie.name = nameItem;
|
391
|
-
if (
|
392
|
-
if (
|
425
|
+
if (colorsSize > index) {
|
426
|
+
if (serie.itemStyle) {
|
393
427
|
serie.itemStyle.color = colors[index]
|
428
|
+
} else {
|
429
|
+
serie.itemStyle = {
|
430
|
+
color: colors[index]
|
431
|
+
}
|
394
432
|
}
|
395
433
|
}
|
396
434
|
let serieDatas = [];
|
@@ -409,9 +447,12 @@ modules = {
|
|
409
447
|
let chartOptions = this.field.options.echarBarOption;
|
410
448
|
chartOptions[this.alignField].data = axisDatas;
|
411
449
|
chartOptions.series = newSeries;
|
412
|
-
this.$nextTick(()=>{
|
413
|
-
this.showChart
|
450
|
+
this.$nextTick(() => {
|
451
|
+
this.showChart = true;
|
414
452
|
})
|
453
|
+
},
|
454
|
+
getChart() {
|
455
|
+
return this.$refs.chart;
|
415
456
|
}
|
416
457
|
}
|
417
458
|
};
|
package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-category-mixin.js
CHANGED
@@ -9,6 +9,7 @@ import {CanvasRenderer} from 'echarts/renderers';
|
|
9
9
|
import {LineChart} from 'echarts/charts';
|
10
10
|
import {TitleComponent, TooltipComponent, LegendComponent} from 'echarts/components';
|
11
11
|
import {THEME_KEY} from 'vue-echarts';
|
12
|
+
import {extendDeeply} from "@base/utils/index.js";
|
12
13
|
|
13
14
|
use([CanvasRenderer, LineChart, TitleComponent, TooltipComponent, LegendComponent]);
|
14
15
|
let modules = {};
|
@@ -52,87 +53,8 @@ modules = {
|
|
52
53
|
requestAccesses: [],
|
53
54
|
requestAccess: null,
|
54
55
|
serieClone: {},
|
55
|
-
showChart:true,
|
56
|
-
colors: [
|
57
|
-
|
58
|
-
{
|
59
|
-
type: 'linear',
|
60
|
-
x: 0.5,
|
61
|
-
y: 0.9,
|
62
|
-
r: 0.2,
|
63
|
-
colorStops: [{
|
64
|
-
offset: 1, color: '#08C084' // 0% 处的颜色
|
65
|
-
}, {
|
66
|
-
offset: 0, color: '#97EACE' // 100% 处的颜色
|
67
|
-
}],
|
68
|
-
},
|
69
|
-
{
|
70
|
-
type: 'linear',
|
71
|
-
x: 0.5,
|
72
|
-
y: 0.9,
|
73
|
-
r: 0.2,
|
74
|
-
colorStops: [{
|
75
|
-
offset: 1, color: '#29ABE3' // 0% 处的颜色
|
76
|
-
}, {
|
77
|
-
offset: 0, color: '#AADEF4' // 100% 处的颜色
|
78
|
-
}],
|
79
|
-
},
|
80
|
-
{
|
81
|
-
type: 'linear',
|
82
|
-
x: 0.5,
|
83
|
-
y: 0.9,
|
84
|
-
r: 0.2,
|
85
|
-
colorStops: [{
|
86
|
-
offset: 1, color: '#0044FE' // 0% 处的颜色
|
87
|
-
}, {
|
88
|
-
offset: 0, color: '#97B3FF' // 100% 处的颜色
|
89
|
-
}],
|
90
|
-
},
|
91
|
-
{
|
92
|
-
type: 'linear',
|
93
|
-
x: 0.5,
|
94
|
-
y: 0.9,
|
95
|
-
r: 0.2,
|
96
|
-
colorStops: [{
|
97
|
-
offset: 1, color: '#75018A' // 0% 处的颜色
|
98
|
-
}, {
|
99
|
-
offset: 0, color: '#C492CD' // 100% 处的颜色
|
100
|
-
}],
|
101
|
-
},
|
102
|
-
{
|
103
|
-
type: 'linear',
|
104
|
-
x: 0.5,
|
105
|
-
y: 0.9,
|
106
|
-
r: 0.2,
|
107
|
-
colorStops: [{
|
108
|
-
offset: 1, color: '#BF0104' // 0% 处的颜色
|
109
|
-
}, {
|
110
|
-
offset: 0, color: '#E59697' // 100% 处的颜色
|
111
|
-
}],
|
112
|
-
},
|
113
|
-
{
|
114
|
-
type: 'linear',
|
115
|
-
x: 0.5,
|
116
|
-
y: 0.9,
|
117
|
-
r: 0.2,
|
118
|
-
colorStops: [{
|
119
|
-
offset: 1, color: '#FF8B01' // 0% 处的颜色
|
120
|
-
}, {
|
121
|
-
offset: 0, color: '#FFCF95' // 100% 处的颜色
|
122
|
-
}],
|
123
|
-
},
|
124
|
-
{
|
125
|
-
type: 'linear',
|
126
|
-
x: 0.5,
|
127
|
-
y: 0.9,
|
128
|
-
r: 0.2,
|
129
|
-
colorStops: [{
|
130
|
-
offset: 1, color: '#FAFE09' // 0% 处的颜色
|
131
|
-
}, {
|
132
|
-
offset: 0, color: '#FCFFAF' // 100% 处的颜色
|
133
|
-
}],
|
134
|
-
}
|
135
|
-
]
|
56
|
+
showChart: true,
|
57
|
+
colors: []
|
136
58
|
};
|
137
59
|
},
|
138
60
|
computed: {
|
@@ -157,6 +79,9 @@ modules = {
|
|
157
79
|
return height;
|
158
80
|
}
|
159
81
|
return '';
|
82
|
+
},
|
83
|
+
chartOption() {
|
84
|
+
return this.field.options.echarCategoryOption
|
160
85
|
}
|
161
86
|
},
|
162
87
|
beforeCreate() {
|
@@ -171,6 +96,7 @@ modules = {
|
|
171
96
|
this.initEventHandler();
|
172
97
|
|
173
98
|
this.handleOnCreated();
|
99
|
+
this.initOption();
|
174
100
|
this.serieClone = deepClone(this.field.options.echarCategoryOption.series[0]);
|
175
101
|
// this.loadData();
|
176
102
|
},
|
@@ -184,6 +110,38 @@ modules = {
|
|
184
110
|
},
|
185
111
|
|
186
112
|
methods: {
|
113
|
+
getColors() {
|
114
|
+
let chartColors = this.field.options.echarCategoryOption.colors || [];
|
115
|
+
let colors = [...chartColors, ...this.colors];
|
116
|
+
return colors
|
117
|
+
},
|
118
|
+
adjustColor() {
|
119
|
+
let colors = this.getColors();
|
120
|
+
let colorsSize = colors.length;
|
121
|
+
this.field.options.echarCategoryOption.series.forEach((serie, index) => {
|
122
|
+
if (colorsSize > index) {
|
123
|
+
if (serie.lineStyle) {
|
124
|
+
serie.lineStyle.color = colors[index]
|
125
|
+
} else {
|
126
|
+
serie.lineStyle = {
|
127
|
+
color: colors[index]
|
128
|
+
}
|
129
|
+
}
|
130
|
+
if (serie.itemStyle) {
|
131
|
+
serie.itemStyle.color = colors[index]
|
132
|
+
} else {
|
133
|
+
serie.itemStyle = {
|
134
|
+
color: colors[index]
|
135
|
+
}
|
136
|
+
}
|
137
|
+
}
|
138
|
+
})
|
139
|
+
},
|
140
|
+
initOption() {
|
141
|
+
let echartConfig = this.handleCustomEvent(this.field.options.echartConfig) || {};
|
142
|
+
this.field.options.echarCategoryOption = extendDeeply(this.field.options.echarCategoryOption, echartConfig);
|
143
|
+
this.adjustColor();
|
144
|
+
},
|
187
145
|
/*async loadData() {
|
188
146
|
if (this.designState) {
|
189
147
|
return;
|
@@ -312,7 +270,7 @@ modules = {
|
|
312
270
|
});
|
313
271
|
},
|
314
272
|
setValue(rows) {
|
315
|
-
this.showChart
|
273
|
+
this.showChart = false;
|
316
274
|
let serieClone = this.serieClone;
|
317
275
|
let resDatas = rows || [];
|
318
276
|
let axisDatas = [];
|
@@ -331,16 +289,28 @@ modules = {
|
|
331
289
|
nameDatas.push(resData.name);
|
332
290
|
}
|
333
291
|
});
|
334
|
-
let colors = this.
|
292
|
+
let colors = this.getColors();
|
335
293
|
let colorsSize = colors.length;
|
336
294
|
nameDatas.forEach((nameItem, index) => {
|
337
295
|
let serie = deepClone(serieClone);
|
338
296
|
serie.name = nameItem;
|
339
|
-
|
340
|
-
if (
|
297
|
+
if (colorsSize > index) {
|
298
|
+
if (serie.lineStyle) {
|
341
299
|
serie.lineStyle.color = colors[index]
|
300
|
+
} else {
|
301
|
+
serie.lineStyle = {
|
302
|
+
color: colors[index]
|
303
|
+
}
|
304
|
+
}
|
305
|
+
if (serie.itemStyle) {
|
306
|
+
serie.itemStyle.color = colors[index]
|
307
|
+
} else {
|
308
|
+
serie.itemStyle = {
|
309
|
+
color: colors[index]
|
310
|
+
}
|
342
311
|
}
|
343
|
-
}
|
312
|
+
}
|
313
|
+
|
344
314
|
delete serie.lineStyle
|
345
315
|
|
346
316
|
let serieDatas = [];
|
@@ -360,9 +330,12 @@ modules = {
|
|
360
330
|
chartOptions.xAxis.data = axisDatas;
|
361
331
|
chartOptions.series = newSeries;
|
362
332
|
|
363
|
-
this.$nextTick(()=>{
|
364
|
-
this.showChart
|
333
|
+
this.$nextTick(() => {
|
334
|
+
this.showChart = true;
|
365
335
|
})
|
336
|
+
},
|
337
|
+
getChart() {
|
338
|
+
return this.$refs.chart;
|
366
339
|
}
|
367
340
|
}
|
368
341
|
};
|
package/src/components/xform/form-designer/form-widget/field-widget/mixins/echart-pie-mixin.js
CHANGED
@@ -9,6 +9,7 @@ import {CanvasRenderer} from 'echarts/renderers';
|
|
9
9
|
import {PieChart} from 'echarts/charts';
|
10
10
|
import {TitleComponent, TooltipComponent, LegendComponent} from 'echarts/components';
|
11
11
|
import {THEME_KEY} from 'vue-echarts';
|
12
|
+
import {extendDeeply} from "@base/utils/index.js";
|
12
13
|
|
13
14
|
use([CanvasRenderer, PieChart, TitleComponent, TooltipComponent, LegendComponent]);
|
14
15
|
|
@@ -53,6 +54,7 @@ modules = {
|
|
53
54
|
requestAccess: null,
|
54
55
|
serieClone: {},
|
55
56
|
showChart: true,
|
57
|
+
colors:[]
|
56
58
|
};
|
57
59
|
},
|
58
60
|
computed: {
|
@@ -77,6 +79,9 @@ modules = {
|
|
77
79
|
return height;
|
78
80
|
}
|
79
81
|
return '';
|
82
|
+
},
|
83
|
+
chartOption() {
|
84
|
+
return this.field.options.echarPieOption
|
80
85
|
}
|
81
86
|
},
|
82
87
|
beforeCreate() {
|
@@ -91,6 +96,7 @@ modules = {
|
|
91
96
|
this.initEventHandler();
|
92
97
|
|
93
98
|
this.handleOnCreated();
|
99
|
+
this.initOption();
|
94
100
|
this.serieClone = deepClone(this.field.options.echarPieOption.series[0]);
|
95
101
|
// this.loadData();
|
96
102
|
},
|
@@ -104,6 +110,10 @@ modules = {
|
|
104
110
|
},
|
105
111
|
|
106
112
|
methods: {
|
113
|
+
initOption() {
|
114
|
+
let echartConfig = this.handleCustomEvent(this.field.options.echartConfig) || {};
|
115
|
+
this.field.options.echarPieOption = extendDeeply(this.field.options.echarPieOption, echartConfig);
|
116
|
+
},
|
107
117
|
/*async loadData() {
|
108
118
|
if (this.designState) {
|
109
119
|
return;
|
@@ -188,6 +198,9 @@ modules = {
|
|
188
198
|
this.$nextTick(() => {
|
189
199
|
this.showChart = true;
|
190
200
|
})
|
201
|
+
},
|
202
|
+
getChart() {
|
203
|
+
return this.$refs.chart;
|
191
204
|
}
|
192
205
|
}
|
193
206
|
};
|
package/src/components/xform/form-designer/form-widget/field-widget/table-export-button-widget.vue
CHANGED
@@ -76,7 +76,12 @@ export default {
|
|
76
76
|
if (this.designState) {
|
77
77
|
return
|
78
78
|
}
|
79
|
-
let opt = {
|
79
|
+
let opt = {
|
80
|
+
title: this.field.options.exportFileName || null,
|
81
|
+
targetRef: this.field.options.tableRef || null,
|
82
|
+
pageSize: (this.field.options.exportPageSize || null),
|
83
|
+
showImageAtTable: this.field.options.showImageAtTable || null
|
84
|
+
};
|
80
85
|
let tableExportParam = this.handleCustomEvent(this.field.options.tableExportParam);
|
81
86
|
let options = {...opt, ...tableExportParam, type: type};
|
82
87
|
let tableRef = options?.targetRef;
|
@@ -16,6 +16,7 @@
|
|
16
16
|
:limit.sync="limit"
|
17
17
|
resultType="Array"
|
18
18
|
:edit="!field.options.disabled"
|
19
|
+
@callback="submitFile"
|
19
20
|
v-else></baseUpload>
|
20
21
|
</form-item-wrapper>
|
21
22
|
</template>
|
@@ -144,6 +145,84 @@ export default {
|
|
144
145
|
});
|
145
146
|
}
|
146
147
|
},
|
148
|
+
submitFile(rows, fileInfos) {
|
149
|
+
// this.handlLineCode(fileInfos);
|
150
|
+
let eventParamNames = ['attachments', 'fileInfos'];
|
151
|
+
let eventParamValues = [rows, fileInfos];
|
152
|
+
this.handleCustomEvent(this.field.options.onAfterConfirmFile, eventParamNames, eventParamValues)
|
153
|
+
},
|
154
|
+
/*handlLineCode(fileInfos) {
|
155
|
+
let allPromise = [];
|
156
|
+
fileInfos.forEach(async fileInfo => {
|
157
|
+
await this.processFile(fileInfo.file, (lineCode) => {
|
158
|
+
fileInfo.lineCode = lineCode;
|
159
|
+
})
|
160
|
+
})
|
161
|
+
|
162
|
+
},
|
163
|
+
processFile(file, callback) {
|
164
|
+
return new Promise((resolve, reject) => {
|
165
|
+
const reader = new FileReader();
|
166
|
+
reader.onload = (e) => this.processImage(e.target.result, (lineCode) => {
|
167
|
+
resolve(lineCode)
|
168
|
+
callback(lineCode)
|
169
|
+
});
|
170
|
+
reader.onerror = () => {
|
171
|
+
resolve(null)
|
172
|
+
callback(null)
|
173
|
+
this.setError('文件读取失败')
|
174
|
+
};
|
175
|
+
reader.readAsDataURL(file);
|
176
|
+
})
|
177
|
+
},
|
178
|
+
async processImage(base64, callback) {
|
179
|
+
try {
|
180
|
+
// 使用 ZXing 3.x 的 API
|
181
|
+
const result = await decode(base64, (result, err) => {
|
182
|
+
if (err) {
|
183
|
+
this.handleError(`条码识别失败: ${err}`);
|
184
|
+
callback && callback(null)
|
185
|
+
return;
|
186
|
+
}
|
187
|
+
this.scannedText = result.text;
|
188
|
+
this.loading = false;
|
189
|
+
callback && callback(result.text)
|
190
|
+
});
|
191
|
+
} catch (err) {
|
192
|
+
console.error(err);
|
193
|
+
callback && callback(null)
|
194
|
+
this.handleError(`条码识别失败: ${err.message}`);
|
195
|
+
}
|
196
|
+
},
|
197
|
+
handleLineCode(fileInfos) {
|
198
|
+
fileInfos.forEach(fileInfo => {
|
199
|
+
let file = fileInfo.file;
|
200
|
+
})
|
201
|
+
},
|
202
|
+
handleImage(base64, fileName, callback) {
|
203
|
+
// 创建 ZXing Scanner
|
204
|
+
|
205
|
+
|
206
|
+
// 将 Base64 转换为 ImageLuminanceSource
|
207
|
+
// const imageData = Uint8Array.from(atob(base64), c => c.charCodeAt(0));
|
208
|
+
// const source = new ZXing.ImageLuminanceSource(imageData, base64.length);
|
209
|
+
|
210
|
+
decode(base64, (result, err) => {
|
211
|
+
if (err) {
|
212
|
+
this.handleError(`条码识别失败: ${err}`);
|
213
|
+
callback && callback(null)
|
214
|
+
return;
|
215
|
+
}
|
216
|
+
this.scannedText = result.text;
|
217
|
+
this.loading = false;
|
218
|
+
callback && callback(result.text)
|
219
|
+
});
|
220
|
+
},
|
221
|
+
|
222
|
+
handleError(errorMessage) {
|
223
|
+
this.error = errorMessage;
|
224
|
+
this.loading = false;
|
225
|
+
},*/
|
147
226
|
}
|
148
227
|
}
|
149
228
|
</script>
|