cloud-web-corejs 1.0.325 → 1.0.327
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 +2 -1
- package/src/app-bootstrap.js +4 -0
- package/src/app-bootstrap.sync.js +4 -0
- package/src/components/baseAutocomplete/README.md +157 -0
- package/src/components/baseAutocomplete/index.vue +489 -0
- package/src/components/baseAutocomplete/query.js +36 -0
- package/src/components/xform/form-designer/form-widget/field-widget/autocomplete-widget.vue +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/cascader-widget.vue +403 -10
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +6 -0
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload2-widget.vue +325 -59
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +52 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClear-editor.vue +30 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onLazyLoad-editor.vue +34 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-cascader/cascader-lazy-editor.vue +108 -0
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +3 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +7 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<el-form-item :label="i18nt('designer.setting.lazy')">
|
|
4
|
+
<el-switch v-model="optionModel.lazy"></el-switch>
|
|
5
|
+
</el-form-item>
|
|
6
|
+
<template v-if="optionModel.lazy">
|
|
7
|
+
<el-form-item class="form-item-label-top">
|
|
8
|
+
<span slot="label">
|
|
9
|
+
{{ $t1("父级字段") }}
|
|
10
|
+
<el-tooltip effect="light" placement="top">
|
|
11
|
+
<div slot="content" class="cascader-lazy-tip">
|
|
12
|
+
{{
|
|
13
|
+
$t1(
|
|
14
|
+
"按 list 请求下一级,不走分页。展开节点时,取该节点「关联字段」的值,以父级字段为参数名放入 data。父级字段默认 f_parent,值可能是 ID 或编码。有子节点标识默认 f_has_child,为 false 时视为末级。taBm 用字段本身。根节点值为 null。"
|
|
15
|
+
)
|
|
16
|
+
}}
|
|
17
|
+
</div>
|
|
18
|
+
<i class="el-icon-info cascader-lazy-tip-icon"></i>
|
|
19
|
+
</el-tooltip>
|
|
20
|
+
</span>
|
|
21
|
+
<el-input
|
|
22
|
+
v-model="parentKey"
|
|
23
|
+
clearable
|
|
24
|
+
:placeholder="$t1('默认 f_parent')"
|
|
25
|
+
></el-input>
|
|
26
|
+
</el-form-item>
|
|
27
|
+
<el-form-item :label="$t1('有子节点标识')" class="form-item-label-top">
|
|
28
|
+
<el-input
|
|
29
|
+
v-model="hasChildKey"
|
|
30
|
+
clearable
|
|
31
|
+
:placeholder="$t1('默认 f_has_child')"
|
|
32
|
+
></el-input>
|
|
33
|
+
</el-form-item>
|
|
34
|
+
<el-form-item :label="$t1('传参脚本')" class="form-item-label-top">
|
|
35
|
+
<a
|
|
36
|
+
href="javascript:void(0);"
|
|
37
|
+
class="a-link link-oneLind"
|
|
38
|
+
@click="editEventHandler('lazyParamScript', lazyParamEventParams)"
|
|
39
|
+
>
|
|
40
|
+
<span>{{ optionModel.lazyParamScript }}</span>
|
|
41
|
+
<i class="el-icon-edit"></i>
|
|
42
|
+
</a>
|
|
43
|
+
</el-form-item>
|
|
44
|
+
</template>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<script>
|
|
49
|
+
import i18n from "../../../../../../components/xform/utils/i18n";
|
|
50
|
+
import eventMixin from "../../../../../../components/xform/form-designer/setting-panel/property-editor/event-handler/eventMixin";
|
|
51
|
+
|
|
52
|
+
export default {
|
|
53
|
+
name: "cascader-lazy-editor",
|
|
54
|
+
mixins: [i18n, eventMixin],
|
|
55
|
+
props: {
|
|
56
|
+
designer: Object,
|
|
57
|
+
selectedWidget: Object,
|
|
58
|
+
optionModel: Object,
|
|
59
|
+
},
|
|
60
|
+
computed: {
|
|
61
|
+
parentKey: {
|
|
62
|
+
get() {
|
|
63
|
+
return this.optionModel.parentKey || "";
|
|
64
|
+
},
|
|
65
|
+
set(val) {
|
|
66
|
+
this.$set(this.optionModel, "parentKey", val == null ? "" : val);
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
hasChildKey: {
|
|
70
|
+
get() {
|
|
71
|
+
return this.optionModel.hasChildKey || "";
|
|
72
|
+
},
|
|
73
|
+
set(val) {
|
|
74
|
+
this.$set(this.optionModel, "hasChildKey", val == null ? "" : val);
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
lazyParamEventParams() {
|
|
78
|
+
return [
|
|
79
|
+
"dataId",
|
|
80
|
+
"formCode",
|
|
81
|
+
"row",
|
|
82
|
+
"level",
|
|
83
|
+
"path",
|
|
84
|
+
"pathLabels",
|
|
85
|
+
"pathRows",
|
|
86
|
+
"levels",
|
|
87
|
+
];
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
};
|
|
91
|
+
</script>
|
|
92
|
+
|
|
93
|
+
<style scoped>
|
|
94
|
+
.cascader-lazy-tip-icon {
|
|
95
|
+
margin-left: 4px;
|
|
96
|
+
color: #909399;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
vertical-align: middle;
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
102
|
+
|
|
103
|
+
<style>
|
|
104
|
+
.cascader-lazy-tip {
|
|
105
|
+
max-width: 320px;
|
|
106
|
+
line-height: 1.4;
|
|
107
|
+
}
|
|
108
|
+
</style>
|
|
@@ -63,6 +63,7 @@ const COMMON_PROPERTIES = {
|
|
|
63
63
|
automaticDropdown: "automaticDropdown-editor",
|
|
64
64
|
checkStrictly: "checkStrictly-editor",
|
|
65
65
|
showAllLevels: "showAllLevels-editor",
|
|
66
|
+
"cascader-lazy": "cascader-lazy-editor",
|
|
66
67
|
multiple: "multiple-editor",
|
|
67
68
|
multipleLimit: "multipleLimit-editor",
|
|
68
69
|
contentPosition: "contentPosition-editor",
|
|
@@ -250,9 +251,11 @@ const EVENT_PROPERTIES = {
|
|
|
250
251
|
onInput: "onInput-editor",
|
|
251
252
|
onChange: "onChange-editor",
|
|
252
253
|
onSelect: "onSelect-editor",
|
|
254
|
+
onClear: "onClear-editor",
|
|
253
255
|
onFocus: "onFocus-editor",
|
|
254
256
|
onBlur: "onBlur-editor",
|
|
255
257
|
onRemoteQuery: "onRemoteQuery-editor",
|
|
258
|
+
onLazyLoad: "onLazyLoad-editor",
|
|
256
259
|
onBeforeUpload: "onBeforeUpload-editor",
|
|
257
260
|
onUploadSuccess: "onUploadSuccess-editor",
|
|
258
261
|
onUploadError: "onUploadError-editor",
|
|
@@ -3924,6 +3924,10 @@ export const advancedFields = [
|
|
|
3924
3924
|
flatCollapseTags: false,
|
|
3925
3925
|
checkStrictly: false, //可选择任意一级选项,默认不开启
|
|
3926
3926
|
showAllLevels: true, //显示完整路径
|
|
3927
|
+
lazy: false, //展开节点时按级请求「请求访问」脚本,只走 list,不走分页
|
|
3928
|
+
parentKey: "", //未维护时请求仍用 f_parent,不回填到输入框
|
|
3929
|
+
hasChildKey: "", //未维护时用 f_has_child 判断是否有子节点,不回填到输入框
|
|
3930
|
+
lazyParamScript: "", //懒加载传参脚本,返回选中行的其他字段并入 data
|
|
3927
3931
|
dsEnabled: false, // 是否使用数据源数据
|
|
3928
3932
|
dsName: "", // 数据源名称
|
|
3929
3933
|
dataSetName: "", //数据集名称
|
|
@@ -3956,9 +3960,12 @@ export const advancedFields = [
|
|
|
3956
3960
|
onCreated: "",
|
|
3957
3961
|
onMounted: "",
|
|
3958
3962
|
onChange: "",
|
|
3963
|
+
onSelect: "", //用户选中时触发,item.level 为 0 省、1 市、2 区、3 镇
|
|
3964
|
+
onClear: "", //用户清空时触发,不走 onSelect
|
|
3959
3965
|
onFocus: "",
|
|
3960
3966
|
onBlur: "",
|
|
3961
3967
|
onValidate: "",
|
|
3968
|
+
onLazyLoad: "", //未启用请求访问时的自定义懒加载:onLazyLoad(node, resolve)
|
|
3962
3969
|
},
|
|
3963
3970
|
},
|
|
3964
3971
|
];
|