cloud-web-corejs 1.0.54-dev.334 → 1.0.54-dev.335
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 +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +18 -10
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +2 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +4 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +1 -0
package/package.json
CHANGED
@@ -540,6 +540,7 @@ tmixins = {
|
|
540
540
|
})
|
541
541
|
},
|
542
542
|
saveImportHandle(data, opt) {
|
543
|
+
var multi = this.option.multi;
|
543
544
|
let importOption = this.option.importOption;
|
544
545
|
|
545
546
|
let entity = importOption.importEntity;
|
@@ -553,16 +554,23 @@ tmixins = {
|
|
553
554
|
|
554
555
|
// let reqData = this.getReqFormData();
|
555
556
|
let fileCellFields = this.fileCellFields;
|
556
|
-
let formData =
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
557
|
+
let formData = null
|
558
|
+
if(multi){
|
559
|
+
formData = data
|
560
|
+
}else{
|
561
|
+
formData = {
|
562
|
+
[entity]: {...data}
|
563
|
+
}
|
564
|
+
if (fileCellFields.length) {
|
565
|
+
fileCellFields.forEach(field => {
|
566
|
+
let attachments = data[field] || [];
|
567
|
+
delete formData[entity][field]
|
568
|
+
formData[field] = attachments;
|
569
|
+
})
|
570
|
+
}
|
565
571
|
}
|
572
|
+
|
573
|
+
|
566
574
|
let reqData = {
|
567
575
|
formCode: formCode,
|
568
576
|
formVersion: reportTemplate.formVersion,
|
@@ -637,7 +645,7 @@ tmixins = {
|
|
637
645
|
doneNumObj.innerText = successNum + failNum;
|
638
646
|
that.percentageNum = percentageStr;
|
639
647
|
let isEnd = false;
|
640
|
-
if (uniqueFields.length) {
|
648
|
+
if (multi && uniqueFields.length) {
|
641
649
|
isEnd = groupIndex + 1 >= groupDatas.length;
|
642
650
|
} else {
|
643
651
|
isEnd = index + excNum >= size;
|
package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue
CHANGED
@@ -61,10 +61,12 @@ export default {
|
|
61
61
|
|
62
62
|
methods: {
|
63
63
|
importHandle() {
|
64
|
+
let multi = this.field.options.importMultiple || false;
|
64
65
|
this.getFormRef().openImportDialog({
|
65
66
|
target: this,
|
66
67
|
importOption: this.field.options,
|
67
68
|
importFrontOnly: false,
|
69
|
+
multi,
|
68
70
|
callback: (resultData, file, done) => {
|
69
71
|
|
70
72
|
}
|
@@ -29,6 +29,10 @@
|
|
29
29
|
<el-form-item label="执行后台脚本编码">
|
30
30
|
<el-input v-model="optionModel.importScriptCode"></el-input>
|
31
31
|
</el-form-item>
|
32
|
+
<el-form-item label="批量导入">
|
33
|
+
<el-switch v-model="optionModel.importMultiple"></el-switch>
|
34
|
+
</el-form-item>
|
35
|
+
|
32
36
|
<el-form-item label="启用图片处理">
|
33
37
|
<el-switch v-model="optionModel.enabledImportPreHandle"></el-switch>
|
34
38
|
</el-form-item>
|