cloud-web-corejs 1.0.156 → 1.0.157
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 +8 -10
- package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue +19 -10
- package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue +15 -6
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +54 -23
- package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +8 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +3 -0
package/src/components/xform/form-designer/form-widget/field-widget/import-button-widget.vue
CHANGED
|
@@ -61,18 +61,27 @@ export default {
|
|
|
61
61
|
|
|
62
62
|
methods: {
|
|
63
63
|
importHandle() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
64
|
+
const done = () => {
|
|
65
|
+
let multi = this.field.options.importMultiple || false;
|
|
66
|
+
let multiSize = this.field.options.importMultiSize || 1;
|
|
67
|
+
this.getFormRef().openImportDialog({
|
|
68
|
+
target: this,
|
|
69
|
+
importOption: this.field.options,
|
|
70
|
+
importFrontOnly: false,
|
|
71
|
+
multi,
|
|
72
|
+
multiSize,
|
|
73
|
+
callback: (resultData, file, done) => {
|
|
73
74
|
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
if (this.field.options.onBeforeClickButton) {
|
|
79
|
+
if (this.handleCustomEvent(this.field.options.onBeforeClickButton, ["done"], [done]) !== false) {
|
|
80
|
+
done();
|
|
74
81
|
}
|
|
75
|
-
}
|
|
82
|
+
} else {
|
|
83
|
+
done();
|
|
84
|
+
}
|
|
76
85
|
}
|
|
77
86
|
}
|
|
78
87
|
|
package/src/components/xform/form-designer/form-widget/field-widget/import2-button-widget.vue
CHANGED
|
@@ -61,14 +61,23 @@ export default {
|
|
|
61
61
|
|
|
62
62
|
methods: {
|
|
63
63
|
importHandle() {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
const done = () => {
|
|
65
|
+
this.getFormRef().openImportDialog({
|
|
66
|
+
target: this,
|
|
67
|
+
importOption: this.field.options,
|
|
68
|
+
importFrontOnly: true,
|
|
69
|
+
callback: (resultData, file, done) => {
|
|
69
70
|
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
if (this.field.options.onBeforeClickButton) {
|
|
75
|
+
if (this.handleCustomEvent(this.field.options.onBeforeClickButton, ["done"], [done]) !== false) {
|
|
76
|
+
done();
|
|
70
77
|
}
|
|
71
|
-
}
|
|
78
|
+
} else {
|
|
79
|
+
done();
|
|
80
|
+
}
|
|
72
81
|
}
|
|
73
82
|
}
|
|
74
83
|
|
|
@@ -7,7 +7,10 @@
|
|
|
7
7
|
<el-input v-model="optionModel.importEntity"></el-input>
|
|
8
8
|
</el-form-item>
|
|
9
9
|
<el-form-item label="文件大小限制(M)">
|
|
10
|
-
<base-input-number
|
|
10
|
+
<base-input-number
|
|
11
|
+
v-model="optionModel.importFileLimitSize"
|
|
12
|
+
:max="200"
|
|
13
|
+
></base-input-number>
|
|
11
14
|
</el-form-item>
|
|
12
15
|
<el-form-item label="导入模板文件编码">
|
|
13
16
|
<el-input
|
|
@@ -15,41 +18,66 @@
|
|
|
15
18
|
max="200"
|
|
16
19
|
:value="optionModel.importAttachCode"
|
|
17
20
|
clearable
|
|
18
|
-
@clear="
|
|
21
|
+
@clear="
|
|
22
|
+
optionModel.importAttachCode = null;
|
|
23
|
+
optionModel.importAttachName = null;
|
|
24
|
+
"
|
|
19
25
|
>
|
|
20
|
-
<i
|
|
26
|
+
<i
|
|
27
|
+
slot="suffix"
|
|
28
|
+
class="el-input__icon el-icon-search"
|
|
29
|
+
@click="showBdAttachSettingDialog = true"
|
|
30
|
+
></i>
|
|
21
31
|
</el-input>
|
|
22
32
|
</el-form-item>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
33
|
+
<el-form-item label="导入模板文件名称">
|
|
34
|
+
<span>{{ optionModel.importAttachName }}</span>
|
|
35
|
+
</el-form-item>
|
|
26
36
|
<el-form-item label="关联表格唯一名称">
|
|
27
37
|
<el-input v-model="optionModel.tableRef"></el-input>
|
|
28
38
|
</el-form-item>
|
|
29
39
|
<el-form-item label="执行后台脚本编码">
|
|
30
40
|
<el-input v-model="optionModel.importScriptCode"></el-input>
|
|
31
41
|
</el-form-item>
|
|
42
|
+
<el-form-item label="多sheet导入">
|
|
43
|
+
<el-switch v-model="optionModel.multipleSheet"></el-switch>
|
|
44
|
+
</el-form-item>
|
|
32
45
|
<el-form-item label="批量导入">
|
|
33
46
|
<el-switch v-model="optionModel.importMultiple"></el-switch>
|
|
34
47
|
</el-form-item>
|
|
35
48
|
<el-form-item label="批量导入大小">
|
|
36
|
-
<base-input-number
|
|
49
|
+
<base-input-number
|
|
50
|
+
v-model="optionModel.importMultiSize"
|
|
51
|
+
:max="200"
|
|
52
|
+
></base-input-number>
|
|
53
|
+
</el-form-item>
|
|
54
|
+
<el-form-item label="点击前置事件" label-width="150px">
|
|
55
|
+
<a href="javascript:void(0);" class="a-link link-oneLind"
|
|
56
|
+
@click="editEventHandler('onBeforeClickButton', eventParams)">
|
|
57
|
+
<span>{{ optionModel.onBeforeClickButton }}</span>
|
|
58
|
+
<i class="el-icon-edit"></i>
|
|
59
|
+
</a>
|
|
37
60
|
</el-form-item>
|
|
38
|
-
|
|
39
61
|
<el-form-item label="启用图片处理">
|
|
40
62
|
<el-switch v-model="optionModel.enabledImportPreHandle"></el-switch>
|
|
41
63
|
</el-form-item>
|
|
42
64
|
<el-form-item label="导入前数据处理" label-width="150px">
|
|
43
|
-
<a
|
|
44
|
-
|
|
65
|
+
<a
|
|
66
|
+
href="javascript:void(0);"
|
|
67
|
+
class="a-link link-oneLind"
|
|
68
|
+
@click="editEventHandler('onBeforeImport', onBeforeImportParams)"
|
|
69
|
+
>
|
|
45
70
|
<span>{{ optionModel.onBeforeImport }}</span>
|
|
46
71
|
<i class="el-icon-edit"></i>
|
|
47
72
|
</a>
|
|
48
73
|
</el-form-item>
|
|
49
74
|
|
|
50
75
|
<el-form-item label="导入完成回调" label-width="150px">
|
|
51
|
-
<a
|
|
52
|
-
|
|
76
|
+
<a
|
|
77
|
+
href="javascript:void(0);"
|
|
78
|
+
class="a-link link-oneLind"
|
|
79
|
+
@click="editEventHandler('onSuccessImport', onSuccessImportParams)"
|
|
80
|
+
>
|
|
53
81
|
<span>{{ optionModel.onSuccessImport }}</span>
|
|
54
82
|
<i class="el-icon-edit"></i>
|
|
55
83
|
</a>
|
|
@@ -58,20 +86,23 @@
|
|
|
58
86
|
<el-switch v-model="optionModel.hideCancelButton"></el-switch>
|
|
59
87
|
</el-form-item>
|
|
60
88
|
|
|
61
|
-
<bdAttachSettingDialog
|
|
62
|
-
|
|
89
|
+
<bdAttachSettingDialog
|
|
90
|
+
v-if="showBdAttachSettingDialog"
|
|
91
|
+
:visiable.sync="showBdAttachSettingDialog"
|
|
92
|
+
:multi="false"
|
|
93
|
+
@confirm="confirmBdAttachSettingDialog"
|
|
94
|
+
></bdAttachSettingDialog>
|
|
63
95
|
</div>
|
|
64
96
|
</template>
|
|
65
97
|
|
|
66
98
|
<script>
|
|
67
99
|
import i18n from "../../../../../../components/xform/utils/i18n";
|
|
68
|
-
import eventMixin
|
|
69
|
-
from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
|
|
100
|
+
import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
|
|
70
101
|
import bdAttachSettingDialog from "../../../../../../views/bd/setting/bd_attach_setting/dialog.vue";
|
|
71
102
|
|
|
72
103
|
export default {
|
|
73
104
|
name: "import-button-editor",
|
|
74
|
-
components: {bdAttachSettingDialog},
|
|
105
|
+
components: { bdAttachSettingDialog },
|
|
75
106
|
mixins: [i18n, eventMixin],
|
|
76
107
|
props: {
|
|
77
108
|
designer: Object,
|
|
@@ -80,11 +111,11 @@ export default {
|
|
|
80
111
|
},
|
|
81
112
|
data() {
|
|
82
113
|
return {
|
|
83
|
-
eventParams: [],
|
|
114
|
+
eventParams: ["dataId", "formCode", "done"],
|
|
84
115
|
showBdAttachSettingDialog: false,
|
|
85
|
-
onBeforeImportParams: ["dataId", "formCode",
|
|
86
|
-
onConfirmImportParams: ["dataId", "formCode",
|
|
87
|
-
onSuccessImportParams: ["dataId", "formCode",
|
|
116
|
+
onBeforeImportParams: ["dataId", "formCode", "file", "resultData", "done"],
|
|
117
|
+
onConfirmImportParams: ["dataId", "formCode", "resultData", "file", "done"],
|
|
118
|
+
onSuccessImportParams: ["dataId", "formCode", "resultData", "file"],
|
|
88
119
|
};
|
|
89
120
|
},
|
|
90
121
|
methods: {
|
|
@@ -94,8 +125,8 @@ export default {
|
|
|
94
125
|
this.optionModel.importAttachName = row.name;
|
|
95
126
|
this.optionModel.importAttachCode = row.code;
|
|
96
127
|
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
128
|
+
},
|
|
129
|
+
},
|
|
99
130
|
};
|
|
100
131
|
</script>
|
|
101
132
|
|
|
@@ -24,6 +24,13 @@
|
|
|
24
24
|
<el-form-item label="关联表格唯一名称">
|
|
25
25
|
<el-input v-model="optionModel.tableRef"></el-input>
|
|
26
26
|
</el-form-item>
|
|
27
|
+
<el-form-item label="点击前置事件" label-width="150px">
|
|
28
|
+
<a href="javascript:void(0);" class="a-link link-oneLind"
|
|
29
|
+
@click="editEventHandler('onBeforeClickButton', eventParams)">
|
|
30
|
+
<span>{{ optionModel.onBeforeClickButton }}</span>
|
|
31
|
+
<i class="el-icon-edit"></i>
|
|
32
|
+
</a>
|
|
33
|
+
</el-form-item>
|
|
27
34
|
<el-form-item label="启用确认回调">
|
|
28
35
|
<el-switch v-model="optionModel.onConfirmImportEnabled"></el-switch>
|
|
29
36
|
</el-form-item>
|
|
@@ -67,7 +74,7 @@ export default {
|
|
|
67
74
|
},
|
|
68
75
|
data() {
|
|
69
76
|
return {
|
|
70
|
-
eventParams: [],
|
|
77
|
+
eventParams: ["dataId", "formCode", "done"],
|
|
71
78
|
showBdAttachSettingDialog: false,
|
|
72
79
|
onBeforeImportParams: ["dataId", "formCode", 'file', 'resultData', 'done'],
|
|
73
80
|
onConfirmImportParams: ["dataId", "formCode", 'resultData', 'file', 'done'],
|
|
@@ -3063,6 +3063,8 @@ export const advancedFields = [
|
|
|
3063
3063
|
tableRef: "",
|
|
3064
3064
|
onSuccessImport: "",
|
|
3065
3065
|
hideCancelButton:false,
|
|
3066
|
+
multipleSheet: false,
|
|
3067
|
+
onBeforeClickButton:null,
|
|
3066
3068
|
|
|
3067
3069
|
showRuleFlag: 1,
|
|
3068
3070
|
showRuleEnabled: 1,
|
|
@@ -3110,6 +3112,7 @@ export const advancedFields = [
|
|
|
3110
3112
|
onConfirmImport: "",
|
|
3111
3113
|
onSuccessImport: "",
|
|
3112
3114
|
hideCancelButton:false,
|
|
3115
|
+
onBeforeClickButton:null,
|
|
3113
3116
|
|
|
3114
3117
|
showRuleFlag: 1,
|
|
3115
3118
|
showRuleEnabled: 1,
|