cloud-web-corejs 1.0.225 → 1.0.227
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/designer.js +708 -378
- package/src/components/xform/form-designer/form-widget/container-widget/containerMixin.js +1 -110
- package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +1 -282
- package/src/components/xform/form-designer/form-widget/container-widget/detail-pane-widget.vue +3 -2
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +29 -5
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +104 -62
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +38 -38
- package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +65 -46
- package/src/components/xform/form-designer/form-widget/indexMixin.js +1 -179
- package/src/components/xform/form-designer/indexMixin.js +1 -823
- package/src/components/xform/form-designer/refMixinDesign.js +1 -28
- package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -324
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +3 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +102 -36
- package/src/components/xform/form-designer/setting-panel/property-editor/container-detail/detail-editor.vue +3 -3
- package/src/components/xform/form-designer/setting-panel/property-editor/dropdownFlag-editor.vue +68 -24
- package/src/components/xform/form-designer/setting-panel/property-editor/event-handler/onClick-editor.vue +14 -6
- package/src/components/xform/form-designer/toolbar-panel/indexMixin.js +1 -566
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +1 -290
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +3 -0
- package/src/components/xform/form-render/container-item/containerItemMixin.js +1 -378
- package/src/components/xform/form-render/container-item/data-table-mixin.js +214 -180
- package/src/components/xform/form-render/container-item/detail-item.vue +72 -48
- package/src/components/xform/form-render/container-item/table2-item.vue +40 -10
- package/src/components/xform/form-render/dynamicDialogRender.js +1 -195
- package/src/components/xform/form-render/refMixin.js +1 -29
- package/src/components/xform/mixins/scriptHttp.js +1 -172
- package/src/components/xform/utils/smart-vue-i18n/index.js +2 -1
- package/src/components/xform/utils/util.js +7 -1
- package/src/components/xform/utils/validators.js +1 -133
- package/src/lang/locale/en/login.js +26 -19
- package/src/lang/locale/zh/login.js +25 -19
|
@@ -1,28 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<static-content-wrapper
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
<static-content-wrapper
|
|
3
|
+
:designer="designer"
|
|
4
|
+
:field="field"
|
|
5
|
+
:design-state="designState"
|
|
6
|
+
:display-style="field.options.displayStyle"
|
|
7
|
+
:parent-widget="parentWidget"
|
|
8
|
+
:parent-list="parentList"
|
|
9
|
+
:index-of-parent-list="indexOfParentList"
|
|
10
|
+
:sub-form-row-index="subFormRowIndex"
|
|
11
|
+
:sub-form-col-index="subFormColIndex"
|
|
12
|
+
:sub-form-row-id="subFormRowId"
|
|
13
|
+
>
|
|
14
|
+
<el-dropdown
|
|
15
|
+
:trigger="field.options.dropdownTrigger"
|
|
16
|
+
:disabled="field.options.disabled"
|
|
17
|
+
>
|
|
18
|
+
<el-button
|
|
19
|
+
type="primary"
|
|
20
|
+
class="button-sty"
|
|
21
|
+
size="mini"
|
|
22
|
+
v-if="field.options.dropdownType === 'button'"
|
|
23
|
+
>
|
|
24
|
+
<span>{{ getI18nLabel(field.options.label) }}</span
|
|
25
|
+
><span class="line"></span>
|
|
26
|
+
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
13
27
|
</el-button>
|
|
28
|
+
<span class="el-dropdown-link" v-else>
|
|
29
|
+
<a class="a-link">
|
|
30
|
+
<span>
|
|
31
|
+
<span>{{ getI18nLabel(field.options.label) }}</span>
|
|
32
|
+
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
33
|
+
</span>
|
|
34
|
+
</a>
|
|
35
|
+
</span>
|
|
36
|
+
<!-- <span class="el-dropdown-link button-sty" v-else>
|
|
37
|
+
|
|
38
|
+
</span> -->
|
|
14
39
|
<el-dropdown-menu slot="dropdown">
|
|
15
|
-
<template v-for="(subWidget,index) in field.widgetList">
|
|
16
|
-
<el-dropdown-item
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
40
|
+
<template v-for="(subWidget, index) in field.widgetList">
|
|
41
|
+
<el-dropdown-item
|
|
42
|
+
v-show="!subWidget.options.hidden"
|
|
43
|
+
:key="index"
|
|
44
|
+
:icon="subWidget.options.icon"
|
|
45
|
+
@click.native="(e) => handleSubButtonWidgetClick(e, index)"
|
|
46
|
+
:disabled="subWidget.options.disabled"
|
|
47
|
+
>
|
|
48
|
+
<!-- {{ getI18nLabel(subWidget.options.label) }}-->
|
|
49
|
+
<dropdownItemWidget
|
|
50
|
+
:field="subWidget"
|
|
51
|
+
:parent-list="field.widgetList"
|
|
52
|
+
:index-of-parent-list="index"
|
|
53
|
+
:parent-widget="field"
|
|
54
|
+
:tableParam="tableParam"
|
|
55
|
+
:formItemProp="formItemProp"
|
|
56
|
+
:ref="'item' + index"
|
|
57
|
+
@hiddenChange="handleHidden"
|
|
58
|
+
@disabledChange="handleDisabled"
|
|
59
|
+
>
|
|
23
60
|
</dropdownItemWidget>
|
|
24
61
|
</el-dropdown-item>
|
|
25
|
-
|
|
26
62
|
</template>
|
|
27
63
|
</el-dropdown-menu>
|
|
28
64
|
</el-dropdown>
|
|
@@ -30,15 +66,15 @@
|
|
|
30
66
|
</template>
|
|
31
67
|
|
|
32
68
|
<script>
|
|
33
|
-
import StaticContentWrapper from
|
|
34
|
-
import emitter from
|
|
69
|
+
import StaticContentWrapper from "./static-content-wrapper";
|
|
70
|
+
import emitter from "../../../utils/emitter";
|
|
35
71
|
import i18n from "../../../utils/i18n";
|
|
36
72
|
import fieldMixin from "./fieldMixin";
|
|
37
|
-
import dropdownItemWidget from
|
|
73
|
+
import dropdownItemWidget from "./dropdown-item-widget.vue";
|
|
38
74
|
|
|
39
75
|
export default {
|
|
40
76
|
name: "dropdown-widget",
|
|
41
|
-
componentName:
|
|
77
|
+
componentName: "FieldWidget", //必须固定为FieldWidget,用于接收父级组件的broadcast事件
|
|
42
78
|
mixins: [emitter, fieldMixin, i18n],
|
|
43
79
|
props: {
|
|
44
80
|
field: Object,
|
|
@@ -49,30 +85,27 @@ export default {
|
|
|
49
85
|
|
|
50
86
|
designState: {
|
|
51
87
|
type: Boolean,
|
|
52
|
-
default: false
|
|
88
|
+
default: false,
|
|
53
89
|
},
|
|
54
90
|
|
|
55
|
-
subFormRowIndex: {
|
|
56
|
-
type: Number,
|
|
57
|
-
default: -1
|
|
91
|
+
subFormRowIndex: {
|
|
92
|
+
/* 子表单组件行索引,从0开始计数 */ type: Number,
|
|
93
|
+
default: -1,
|
|
58
94
|
},
|
|
59
|
-
subFormColIndex: {
|
|
60
|
-
type: Number,
|
|
61
|
-
default: -1
|
|
95
|
+
subFormColIndex: {
|
|
96
|
+
/* 子表单组件列索引,从0开始计数 */ type: Number,
|
|
97
|
+
default: -1,
|
|
62
98
|
},
|
|
63
|
-
subFormRowId: {
|
|
64
|
-
type: String,
|
|
65
|
-
default:
|
|
99
|
+
subFormRowId: {
|
|
100
|
+
/* 子表单组件行Id,唯一id且不可变 */ type: String,
|
|
101
|
+
default: "",
|
|
66
102
|
},
|
|
67
|
-
|
|
68
103
|
},
|
|
69
104
|
components: {
|
|
70
105
|
StaticContentWrapper,
|
|
71
|
-
dropdownItemWidget
|
|
72
|
-
},
|
|
73
|
-
computed: {
|
|
74
|
-
|
|
106
|
+
dropdownItemWidget,
|
|
75
107
|
},
|
|
108
|
+
computed: {},
|
|
76
109
|
beforeCreate() {
|
|
77
110
|
/* 这里不能访问方法和属性!! */
|
|
78
111
|
},
|
|
@@ -80,49 +113,58 @@ export default {
|
|
|
80
113
|
created() {
|
|
81
114
|
/* 注意:子组件mounted在父组件created之后、父组件mounted之前触发,故子组件mounted需要用到的prop
|
|
82
115
|
需要在父组件created中初始化!! */
|
|
83
|
-
this.registerToRefList()
|
|
84
|
-
this.initEventHandler()
|
|
85
|
-
this.init()
|
|
86
|
-
this.handleOnCreated()
|
|
116
|
+
this.registerToRefList();
|
|
117
|
+
this.initEventHandler();
|
|
118
|
+
this.init();
|
|
119
|
+
this.handleOnCreated();
|
|
87
120
|
},
|
|
88
121
|
|
|
89
122
|
mounted() {
|
|
90
|
-
this.handleOnMounted()
|
|
123
|
+
this.handleOnMounted();
|
|
91
124
|
},
|
|
92
125
|
|
|
93
126
|
beforeDestroy() {
|
|
94
|
-
this.unregisterFromRefList()
|
|
127
|
+
this.unregisterFromRefList();
|
|
95
128
|
},
|
|
96
129
|
|
|
97
130
|
methods: {
|
|
98
|
-
init(){
|
|
99
|
-
if(this.designState)return
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
131
|
+
init() {
|
|
132
|
+
if (this.designState) return;
|
|
133
|
+
if (!this.field.options.dropdownType)
|
|
134
|
+
this.field.options.dropdownType = "button";
|
|
135
|
+
if (!this.field.options.dropdownTrigger)
|
|
136
|
+
this.field.options.dropdownTrigger = "hover";
|
|
137
|
+
let isShow = this.field.widgetList.some((item) => !item.options.hidden);
|
|
138
|
+
if (!isShow) {
|
|
139
|
+
this.field.options.hidden = true;
|
|
103
140
|
}
|
|
104
|
-
let isEnabled = this.field.widgetList.some(
|
|
105
|
-
|
|
106
|
-
|
|
141
|
+
let isEnabled = this.field.widgetList.some(
|
|
142
|
+
(item) => !item.options.disabled
|
|
143
|
+
);
|
|
144
|
+
if (!isEnabled) {
|
|
145
|
+
this.field.options.disabled = true;
|
|
107
146
|
}
|
|
108
147
|
},
|
|
109
148
|
handleSubButtonWidgetClick(e, index) {
|
|
110
|
-
this.$refs["item"+index][0].handleButtonWidgetClick(e)
|
|
149
|
+
this.$refs["item" + index][0].handleButtonWidgetClick(e);
|
|
111
150
|
},
|
|
112
151
|
handleHidden() {
|
|
113
|
-
let isShow = this.field.widgetList.some((item) => !item.options.hidden)
|
|
114
|
-
this.setHidden(!isShow)
|
|
152
|
+
let isShow = this.field.widgetList.some((item) => !item.options.hidden);
|
|
153
|
+
this.setHidden(!isShow);
|
|
115
154
|
},
|
|
116
155
|
handleDisabled() {
|
|
117
|
-
let isEnabled = this.field.widgetList.some(
|
|
118
|
-
|
|
156
|
+
let isEnabled = this.field.widgetList.some(
|
|
157
|
+
(item) => !item.options.disabled
|
|
158
|
+
);
|
|
159
|
+
this.setDisabled(!isEnabled);
|
|
119
160
|
},
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
}
|
|
161
|
+
},
|
|
162
|
+
};
|
|
123
163
|
</script>
|
|
124
164
|
|
|
125
165
|
<style lang="scss" scoped>
|
|
126
166
|
@import "~@/styles/global.scss"; //* static-content-wrapper已引入,还需要重复引入吗? *//
|
|
127
|
-
|
|
167
|
+
.el-dropdown-link[disabled] a.a-link {
|
|
168
|
+
cursor: not-allowed;
|
|
169
|
+
}
|
|
128
170
|
</style>
|
|
@@ -229,7 +229,7 @@ modules = {
|
|
|
229
229
|
},
|
|
230
230
|
findInArray: function (e, t) {
|
|
231
231
|
if (!Array.isArray(e)) return -1;
|
|
232
|
-
|
|
232
|
+
let i = -1;
|
|
233
233
|
return (
|
|
234
234
|
e.forEach(function (e, n) {
|
|
235
235
|
e === t && (i = n);
|
|
@@ -253,14 +253,14 @@ modules = {
|
|
|
253
253
|
}
|
|
254
254
|
},
|
|
255
255
|
initFieldModel: function (flag) {
|
|
256
|
-
|
|
256
|
+
let e = this;
|
|
257
257
|
if (this.field.formItemFlag) {
|
|
258
258
|
let currentData =
|
|
259
259
|
this.tableParam && this.tableParam.row
|
|
260
260
|
? this.tableParam.row
|
|
261
261
|
: this.formModel;
|
|
262
262
|
/*if (this.subFormItemFlag && !this.designState) {
|
|
263
|
-
|
|
263
|
+
let t = currentData[this.subFormName];
|
|
264
264
|
return void 0 !== t && void 0 !== t[this.subFormRowIndex] && void 0 !== t[this.subFormRowIndex][
|
|
265
265
|
this.fieldKeyName
|
|
266
266
|
] || void 0 === this.field.options.defaultValue ? void 0 === t[this.subFormRowIndex][this
|
|
@@ -281,11 +281,11 @@ modules = {
|
|
|
281
281
|
let dataId = this.getFormRef()?.dataId ?? null;
|
|
282
282
|
let nullValue = null;
|
|
283
283
|
let widgetType = this.field.type;
|
|
284
|
-
if (widgetType
|
|
284
|
+
if (widgetType === "number") {
|
|
285
285
|
nullValue = undefined;
|
|
286
286
|
} else if (widgetType === 'checkbox' || (widgetType === 'select' && this.field.options.multiple)) {
|
|
287
287
|
nullValue = [];
|
|
288
|
-
} else if (widgetType
|
|
288
|
+
} else if (widgetType === "time-range" || widgetType === "date-range" || (widgetType === 'date' && this.field.options.type === "dates")) {
|
|
289
289
|
nullValue = [];
|
|
290
290
|
}
|
|
291
291
|
if (void 0 === currentData[this.fieldKeyName]) {
|
|
@@ -304,7 +304,7 @@ modules = {
|
|
|
304
304
|
let userInfo = this.getFormRef().getUserInfo();
|
|
305
305
|
let valueSourceField = "id";
|
|
306
306
|
let labelSourceField = "nick_name";
|
|
307
|
-
if (this.field.options.clickBindEvent
|
|
307
|
+
if (this.field.options.clickBindEvent === "1") {
|
|
308
308
|
if (searchDialogConfig.valueSourceField) valueSourceField = searchDialogConfig.valueSourceField
|
|
309
309
|
if (searchDialogConfig.labelSourceField) labelSourceField = searchDialogConfig.labelSourceField
|
|
310
310
|
}
|
|
@@ -315,7 +315,7 @@ modules = {
|
|
|
315
315
|
if (saleOrgDTO) {
|
|
316
316
|
let valueSourceField = "id";
|
|
317
317
|
let labelSourceField = "name";
|
|
318
|
-
if (this.field.options.clickBindEvent
|
|
318
|
+
if (this.field.options.clickBindEvent === "1") {
|
|
319
319
|
if (searchDialogConfig.valueSourceField) valueSourceField = searchDialogConfig.valueSourceField
|
|
320
320
|
if (searchDialogConfig.labelSourceField) labelSourceField = searchDialogConfig.labelSourceField
|
|
321
321
|
}
|
|
@@ -348,13 +348,13 @@ modules = {
|
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
-
/*if (this.fieldKeyName
|
|
351
|
+
/*if (this.fieldKeyName === "f_mobile" && !this.fieldModel) {
|
|
352
352
|
}*/
|
|
353
353
|
/*void 0 === currentData[this.fieldKeyName] && void 0 !== this.field.options.defaultValue
|
|
354
354
|
? this.fieldModel = this.field.options.defaultValue :
|
|
355
355
|
void 0 === currentData[this.fieldKeyName] ? currentData[this.fieldKeyName] = null : this.fieldModel = currentData[this.fieldKeyName];*/
|
|
356
356
|
this.oldFieldValue = baseRefUtil.deepClone(this.fieldModel);
|
|
357
|
-
/*if (this.fieldKeyName
|
|
357
|
+
/*if (this.fieldKeyName === "f_contract" && !this.fieldModel) {
|
|
358
358
|
}*/
|
|
359
359
|
this.initFileList();
|
|
360
360
|
}
|
|
@@ -403,7 +403,7 @@ modules = {
|
|
|
403
403
|
}),
|
|
404
404
|
/* this.$on("field-value-changed", function (e) {
|
|
405
405
|
if (this.subFormItemFlag) {
|
|
406
|
-
|
|
406
|
+
let t = this.formModel[this.subFormName];
|
|
407
407
|
this.handleOnChangeForSubForm(e[0], e[1], t, this.subFormRowId);
|
|
408
408
|
} else this.handleOnChange(e[0], e[1]);
|
|
409
409
|
}), */
|
|
@@ -478,7 +478,7 @@ modules = {
|
|
|
478
478
|
handleCustomEvent(funtionStr, eventParamNames = [], eventParamValues = []) {
|
|
479
479
|
if (!this.designState && funtionStr) {
|
|
480
480
|
let eventParam = this.getEventParam();
|
|
481
|
-
|
|
481
|
+
let e = new Function(
|
|
482
482
|
...eventParam.eventParamNames,
|
|
483
483
|
...eventParamNames,
|
|
484
484
|
funtionStr
|
|
@@ -559,7 +559,7 @@ modules = {
|
|
|
559
559
|
},
|
|
560
560
|
unregisterFromRefList: function () {
|
|
561
561
|
if (null !== this.refList && this.field.options.name) {
|
|
562
|
-
|
|
562
|
+
let e = this.field.options.name;
|
|
563
563
|
this.tableParam && !this.designState
|
|
564
564
|
? delete this.refList[e + "@row" + this.tableParam.rowIndex]
|
|
565
565
|
: delete this.refList[e];
|
|
@@ -577,7 +577,7 @@ modules = {
|
|
|
577
577
|
this.initGloatOptionItems(true);
|
|
578
578
|
},
|
|
579
579
|
initGloatOptionItems(initFlag) {
|
|
580
|
-
|
|
580
|
+
let t = this;
|
|
581
581
|
if (this.designState) {
|
|
582
582
|
return;
|
|
583
583
|
}
|
|
@@ -705,19 +705,19 @@ modules = {
|
|
|
705
705
|
widget.options.optionItems = optionItems
|
|
706
706
|
})
|
|
707
707
|
if (tableParam.column.params.widget) {
|
|
708
|
-
if (tableParam.column.params.widget.options.name
|
|
708
|
+
if (tableParam.column.params.widget.options.name === widgetName) {
|
|
709
709
|
tableParam.column.params.widget.options.optionItems = optionItems
|
|
710
710
|
}
|
|
711
711
|
|
|
712
712
|
}
|
|
713
713
|
if (tableParam.column.params.editWidget) {
|
|
714
|
-
if (tableParam.column.params.editWidget.options.name
|
|
714
|
+
if (tableParam.column.params.editWidget.options.name === widgetName) {
|
|
715
715
|
tableParam.column.params.editWidget.options.optionItems = optionItems
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
718
|
if (tableParam.column.params.widgetList?.length) {
|
|
719
719
|
this.loopHandleWidget(tableParam.column.params.widgetList, (item1) => {
|
|
720
|
-
if (item1.options.name
|
|
720
|
+
if (item1.options.name === widgetName) {
|
|
721
721
|
item1.options.optionItems = optionItems
|
|
722
722
|
}
|
|
723
723
|
});
|
|
@@ -727,7 +727,7 @@ modules = {
|
|
|
727
727
|
}
|
|
728
728
|
},
|
|
729
729
|
async initOptionItems(gloatFlag) {
|
|
730
|
-
|
|
730
|
+
let t = this;
|
|
731
731
|
if (this.designState) {
|
|
732
732
|
return;
|
|
733
733
|
}
|
|
@@ -979,19 +979,19 @@ modules = {
|
|
|
979
979
|
if (this.tableRow) {
|
|
980
980
|
this.tableRow[this.fieldKeyName] = e;
|
|
981
981
|
} else if (this.subFormItemFlag) {
|
|
982
|
-
|
|
982
|
+
let t = this.formModel[this.subFormName] || [{}],
|
|
983
983
|
i = t[this.subFormRowIndex];
|
|
984
984
|
i[this.fieldKeyName] = e;
|
|
985
985
|
} else this.formModel[this.fieldKeyName] = e;
|
|
986
986
|
},
|
|
987
987
|
handleChangeEvent: function (e) {
|
|
988
988
|
let widgetType = this.field.type;
|
|
989
|
-
if(widgetType
|
|
989
|
+
if(widgetType === "select"){
|
|
990
990
|
if(e===""){
|
|
991
991
|
e = this.field.options.multiple? [] : null;
|
|
992
992
|
this.fieldModel = e;
|
|
993
993
|
}
|
|
994
|
-
}else if(widgetType
|
|
994
|
+
}else if(widgetType === "number"){
|
|
995
995
|
if(e===undefined){
|
|
996
996
|
e = null;
|
|
997
997
|
this.fieldModel = e;
|
|
@@ -1008,13 +1008,13 @@ modules = {
|
|
|
1008
1008
|
((this.oldFieldValue = baseRefUtil.deepClone(this.fieldModel)),
|
|
1009
1009
|
this.field.options.onFocus)
|
|
1010
1010
|
) {
|
|
1011
|
-
|
|
1011
|
+
let t = new Function("event", this.field.options.onFocus);
|
|
1012
1012
|
t.call(this, e);
|
|
1013
1013
|
}
|
|
1014
1014
|
},
|
|
1015
1015
|
handleBlurCustomEvent: function (e) {
|
|
1016
1016
|
if (this.field.options.onBlur) {
|
|
1017
|
-
|
|
1017
|
+
let t = new Function("event", this.field.options.onBlur);
|
|
1018
1018
|
t.call(this, e);
|
|
1019
1019
|
}
|
|
1020
1020
|
},
|
|
@@ -1024,7 +1024,7 @@ modules = {
|
|
|
1024
1024
|
this.dispatch("VFormRender", "fieldValidation", [this.getPropName()]),
|
|
1025
1025
|
this.field.options.onInput)
|
|
1026
1026
|
) {
|
|
1027
|
-
|
|
1027
|
+
let t = new Function("value", this.field.options.onInput);
|
|
1028
1028
|
t.call(this, e);
|
|
1029
1029
|
}
|
|
1030
1030
|
},
|
|
@@ -1057,10 +1057,10 @@ modules = {
|
|
|
1057
1057
|
let clickBindEvent = !flag ? this.field.options.clickBindEvent : this.field.options.widgetTextLinkConfig?.options?.clickBindEvent;
|
|
1058
1058
|
|
|
1059
1059
|
const done = () => {
|
|
1060
|
-
if (clickBindEvent
|
|
1060
|
+
if (clickBindEvent === "1") {
|
|
1061
1061
|
//打开选择弹框
|
|
1062
1062
|
this.openSearchDialog(tableParam, flag);
|
|
1063
|
-
} else if (clickBindEvent
|
|
1063
|
+
} else if (clickBindEvent === "2") {
|
|
1064
1064
|
//列表插入数据
|
|
1065
1065
|
this.handleAddTableDataEvent(flag);
|
|
1066
1066
|
}
|
|
@@ -1083,13 +1083,13 @@ modules = {
|
|
|
1083
1083
|
},
|
|
1084
1084
|
handleOnChange: function (e, t) {
|
|
1085
1085
|
if (this.field.options.onChange) {
|
|
1086
|
-
|
|
1086
|
+
let i = new Function("value", "oldValue", this.field.options.onChange);
|
|
1087
1087
|
i.call(this, e, t);
|
|
1088
1088
|
}
|
|
1089
1089
|
},
|
|
1090
1090
|
handleOnChangeForSubForm: function (e, t, i, n) {
|
|
1091
1091
|
if (this.field.options.onChange) {
|
|
1092
|
-
|
|
1092
|
+
let o = new Function(
|
|
1093
1093
|
"value",
|
|
1094
1094
|
"oldValue",
|
|
1095
1095
|
"subFormData",
|
|
@@ -1172,7 +1172,7 @@ modules = {
|
|
|
1172
1172
|
},
|
|
1173
1173
|
handleClearSearchDialog() {
|
|
1174
1174
|
let clickBindEvent = this.field.options.clickBindEvent;
|
|
1175
|
-
if (clickBindEvent
|
|
1175
|
+
if (clickBindEvent === "1") {
|
|
1176
1176
|
this.handleConfirmSearchDialog(null, true);
|
|
1177
1177
|
}
|
|
1178
1178
|
},
|
|
@@ -1181,7 +1181,7 @@ modules = {
|
|
|
1181
1181
|
return multipleChoices;
|
|
1182
1182
|
},
|
|
1183
1183
|
hasVabsearchFlag() {
|
|
1184
|
-
return this.field.type
|
|
1184
|
+
return this.field.type === "vabsearch" || this.field.type === "singerSearch" || this.field.type === "multiSearch"
|
|
1185
1185
|
},
|
|
1186
1186
|
handleConfirmSearchDialog(rows, isClear, flag) {
|
|
1187
1187
|
if (!isClear && !rows.length) return;
|
|
@@ -1335,7 +1335,7 @@ modules = {
|
|
|
1335
1335
|
},
|
|
1336
1336
|
remoteQuery: function (e) {
|
|
1337
1337
|
if (this.field.options.onRemoteQuery) {
|
|
1338
|
-
|
|
1338
|
+
let t = new Function("keyword", this.field.options.onRemoteQuery);
|
|
1339
1339
|
t.call(this, e);
|
|
1340
1340
|
}
|
|
1341
1341
|
},
|
|
@@ -1343,7 +1343,7 @@ modules = {
|
|
|
1343
1343
|
return this.refList ? this.refList["v_form_ref"] : null;
|
|
1344
1344
|
},
|
|
1345
1345
|
getWidgetRef: function (e, t) {
|
|
1346
|
-
|
|
1346
|
+
let i = this.refList[e];
|
|
1347
1347
|
return (
|
|
1348
1348
|
!i &&
|
|
1349
1349
|
t &&
|
|
@@ -1379,7 +1379,7 @@ modules = {
|
|
|
1379
1379
|
this.$set(currentData, this.fieldKeyName, null);
|
|
1380
1380
|
}
|
|
1381
1381
|
|
|
1382
|
-
|
|
1382
|
+
let t = baseRefUtil.deepClone(this.fieldModel);
|
|
1383
1383
|
(this.fieldModel = value),
|
|
1384
1384
|
this.initFileList(),
|
|
1385
1385
|
this.syncUpdateFormModel(value),
|
|
@@ -1391,7 +1391,7 @@ modules = {
|
|
|
1391
1391
|
},
|
|
1392
1392
|
resetField: function () {
|
|
1393
1393
|
if (!this.subFormItemFlag) {
|
|
1394
|
-
|
|
1394
|
+
let e = this.field.options.defaultValue;
|
|
1395
1395
|
this.setValue(e),
|
|
1396
1396
|
("picture-upload" !== this.field.type &&
|
|
1397
1397
|
"file-upload" !== this.field.type) ||
|
|
@@ -1518,7 +1518,7 @@ modules = {
|
|
|
1518
1518
|
return this.subFormItemFlag;
|
|
1519
1519
|
},
|
|
1520
1520
|
setReadMode: function () {
|
|
1521
|
-
|
|
1521
|
+
let e =
|
|
1522
1522
|
!(arguments.length > 0 && void 0 !== arguments[0]) || arguments[0];
|
|
1523
1523
|
this.fieldReadonlyFlag = e;
|
|
1524
1524
|
},
|
|
@@ -1529,7 +1529,7 @@ modules = {
|
|
|
1529
1529
|
},
|
|
1530
1530
|
removeCssClass: function (e) {
|
|
1531
1531
|
if (this.field.options.customClass) {
|
|
1532
|
-
|
|
1532
|
+
let t = -1;
|
|
1533
1533
|
this.field.options.customClass.map(function (i, n) {
|
|
1534
1534
|
i === e && (t = n);
|
|
1535
1535
|
}),
|
|
@@ -1556,10 +1556,10 @@ modules = {
|
|
|
1556
1556
|
if (!dsModel.headers) dsModel.headers = [];
|
|
1557
1557
|
if (!dsModel.params) dsModel.params = [];
|
|
1558
1558
|
if (!dsModel.data) dsModel.data = [];
|
|
1559
|
-
if (dsModel.dataHandlerCode
|
|
1560
|
-
if (dsModel.configHandlerCode
|
|
1559
|
+
if (dsModel.dataHandlerCode === null || dsModel.dataHandlerCode === undefined) dsModel.dataHandlerCode = "";
|
|
1560
|
+
if (dsModel.configHandlerCode === null || dsModel.configHandlerCode === undefined)
|
|
1561
1561
|
dsModel.configHandlerCode = "";
|
|
1562
|
-
if (dsModel.errorHandlerCode
|
|
1562
|
+
if (dsModel.errorHandlerCode === null || dsModel.errorHandlerCode === undefined) dsModel.errorHandlerCode = "";
|
|
1563
1563
|
|
|
1564
1564
|
requestAccess.dsModel = dsModel;
|
|
1565
1565
|
this.requestAccess = requestAccess;
|