cloud-web-corejs 1.0.174 → 1.0.175
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/components/Tinymce/index.vue +112 -71
- package/src/components/VabUpload/image-viewer.vue +2 -2
- package/src/components/VabUpload/index.js +2 -1
- package/src/components/VabUpload/mixins.js +1 -1
- package/src/components/VabUpload/privateProfileDialogMixins.js +1 -1063
- package/src/components/VabUpload/view.vue +4 -2
- package/src/components/baseAlert/mixins.js +1 -1
- package/src/components/baseAttachment/mixins.js +2 -1
- package/src/components/baseInputExport/index.vue +19 -12
- package/src/components/baseInputExport/mixins.js +1 -1
- package/src/components/baseTabs/mixins.js +1 -1
- package/src/components/code-editor/index.vue +102 -63
- package/src/components/confirmDialog/index.vue +24 -17
- package/src/components/confirmDialog/mixins.js +1 -1
- package/src/components/errorMsg/index.vue +42 -34
- package/src/components/errorMsg/mixins.js +1 -1
- package/src/components/excelExport/index.js +1 -2
- package/src/components/excelExport/mixins.js +1 -1
- package/src/components/scriptDescription/button.vue +12 -4
- package/src/components/scriptTest/mixins.js +1 -1
- package/src/components/table/index.js +1 -1
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.es6.min.js +11028 -0
- package/src/components/table/plugins/extend-cell-area/vxe-table-extend-cell-area.min.css +200 -0
- package/src/components/vb-tabs/x-tabs.vue +0 -1
- package/src/components/xform/form-designer/designer.js +1 -1
- package/src/components/xform/form-designer/form-widget/components/gantt/index.vue +16 -1
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +17 -4
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +1 -1
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +247 -187
- package/src/components/xform/form-designer/form-widget/field-widget/gantt-widget.vue +2 -0
- package/src/components/xform/form-designer/form-widget/field-widget/html-text-widget.vue +6 -2
- package/src/components/xform/form-designer/form-widget/field-widget/static-content-wrapper.vue +10 -0
- package/src/components/xform/form-designer/form-widget/field-widget/text-widget.vue +65 -4
- package/src/components/xform/form-designer/setting-panel/form-setting.vue +131 -118
- package/src/components/xform/form-designer/setting-panel/property-editor/autoValueEnabled-editor.vue +1 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/formatType-editor.vue +137 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/name-editor.vue +124 -50
- package/src/components/xform/form-designer/setting-panel/propertyRegister.js +1 -0
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +5 -1
- package/src/components/xform/form-render/indexMixin copy.js +3462 -0
- package/src/components/xform/form-render/indexMixin.js +1 -1
- package/src/components/xform/mixins/defaultHandle.js +1 -1
- package/src/components/xform/utils/format.js +14 -4
- package/src/components/xform/utils/formula-util.js +0 -4
- package/src/components/xform/utils/util.js +1 -1
- package/src/layout/components/Sidebar/default.vue +1421 -1266
- package/src/layout/components/createCompany/createCompanyDialog.vue +157 -0
- package/src/utils/index.js +1 -6
- package/src/utils/vab.js +1 -1
- package/src/views/user/form/vform/designer.vue +2 -1
- package/src/views/user/outLink/index.vue +57 -18
|
@@ -9,24 +9,35 @@
|
|
|
9
9
|
-->
|
|
10
10
|
|
|
11
11
|
<template>
|
|
12
|
-
<div
|
|
13
|
-
|
|
12
|
+
<div
|
|
13
|
+
class="field-wrapper"
|
|
14
|
+
:class="{ 'design-time-bottom-margin': !!this.designer }"
|
|
15
|
+
v-show="!field.options.hidden || designState === true"
|
|
16
|
+
>
|
|
14
17
|
<div>
|
|
15
|
-
<template v-if="formItemProp==='false'">
|
|
18
|
+
<template v-if="formItemProp === 'false'">
|
|
16
19
|
<template v-if="!field.options.hidden">
|
|
17
20
|
<template v-if="isShowWidget()">
|
|
18
21
|
<slot></slot>
|
|
19
22
|
</template>
|
|
20
|
-
<template
|
|
23
|
+
<template
|
|
24
|
+
v-else-if="
|
|
25
|
+
field.options.widgetTextFlag === 3 && field.options.widgetTextLinkConfig
|
|
26
|
+
"
|
|
27
|
+
>
|
|
21
28
|
<div class="ellipsis">
|
|
22
29
|
<a class="a-link" :class="getWidgetClass()" @click.native="handleClick">
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
<span>
|
|
31
|
+
<i
|
|
32
|
+
:class="field.options.widgetTextLinkConfig.options.prefixIcon"
|
|
33
|
+
v-if="!!field.options.widgetTextLinkConfig.options.prefixIcon"
|
|
34
|
+
></i>
|
|
35
|
+
<span>{{ getWidgetValue() }}</span>
|
|
36
|
+
<i
|
|
37
|
+
:class="field.options.widgetTextLinkConfig.options.suffixIcon"
|
|
38
|
+
v-if="!!field.options.widgetTextLinkConfig.options.suffixIcon"
|
|
39
|
+
></i>
|
|
40
|
+
</span>
|
|
30
41
|
</a>
|
|
31
42
|
</div>
|
|
32
43
|
</template>
|
|
@@ -36,46 +47,76 @@
|
|
|
36
47
|
</template>
|
|
37
48
|
</template>
|
|
38
49
|
<template v-else>
|
|
39
|
-
<el-form-item
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
50
|
+
<el-form-item
|
|
51
|
+
v-if="!!field.formItemFlag && (!field.options.hidden || designState === true)"
|
|
52
|
+
:label="label"
|
|
53
|
+
:label-width="labelWidth"
|
|
54
|
+
:title="field.options.labelTooltip"
|
|
55
|
+
:rules="getRules()"
|
|
56
|
+
:prop="getPropName()"
|
|
57
|
+
:class="[
|
|
58
|
+
selected ? 'selected' : '',
|
|
59
|
+
labelAlign,
|
|
60
|
+
customClass,
|
|
61
|
+
field.options.required ? 'required' : '',
|
|
62
|
+
]"
|
|
63
|
+
@click.native.stop="selectField(field)"
|
|
64
|
+
>
|
|
65
|
+
<span
|
|
66
|
+
v-if="!!field.options.labelIconClass"
|
|
67
|
+
slot="label"
|
|
68
|
+
class="custom-label"
|
|
69
|
+
:style="{ color: field.options.labelColor }"
|
|
70
|
+
>
|
|
48
71
|
<template v-if="field.options.labelIconPosition === 'front'">
|
|
49
72
|
<template v-if="!!field.options.labelTooltip">
|
|
50
73
|
<el-tooltip :content="field.options.labelTooltip" effect="light">
|
|
51
|
-
<i :class="field.options.labelIconClass"></i></el-tooltip
|
|
74
|
+
<i :class="field.options.labelIconClass"></i></el-tooltip
|
|
75
|
+
>{{ label }}</template
|
|
76
|
+
>
|
|
52
77
|
<template v-else>
|
|
53
|
-
<i :class="field.options.labelIconClass"></i>{{ label }}</template
|
|
78
|
+
<i :class="field.options.labelIconClass"></i>{{ label }}</template
|
|
79
|
+
>
|
|
54
80
|
</template>
|
|
55
81
|
<template v-else-if="field.options.labelIconPosition === 'rear'">
|
|
56
82
|
<template v-if="!!field.options.labelTooltip">
|
|
57
|
-
{{ label
|
|
58
|
-
<
|
|
83
|
+
{{ label
|
|
84
|
+
}}<el-tooltip :content="field.options.labelTooltip" effect="light">
|
|
85
|
+
<i :class="field.options.labelIconClass"></i></el-tooltip
|
|
86
|
+
></template>
|
|
59
87
|
<template v-else>
|
|
60
|
-
{{ label }}<i :class="field.options.labelIconClass"></i
|
|
88
|
+
{{ label }}<i :class="field.options.labelIconClass"></i
|
|
89
|
+
></template>
|
|
61
90
|
</template>
|
|
62
91
|
</span>
|
|
63
|
-
<span
|
|
92
|
+
<span
|
|
93
|
+
v-if="!!field.options.labelColor"
|
|
94
|
+
slot="label"
|
|
95
|
+
:style="{ color: field.options.labelColor }"
|
|
96
|
+
>
|
|
64
97
|
{{ label }}
|
|
65
98
|
</span>
|
|
66
99
|
<template v-if="isShowWidget()">
|
|
67
100
|
<slot></slot>
|
|
68
101
|
</template>
|
|
69
|
-
<template
|
|
102
|
+
<template
|
|
103
|
+
v-else-if="
|
|
104
|
+
field.options.widgetTextFlag === 3 && field.options.widgetTextLinkConfig
|
|
105
|
+
"
|
|
106
|
+
>
|
|
70
107
|
<div class="ellipsis">
|
|
71
108
|
<a class="a-link" :class="getWidgetClass()" @click="handleClick">
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
109
|
+
<span>
|
|
110
|
+
<i
|
|
111
|
+
:class="field.options.widgetTextLinkConfig.options.prefixIcon"
|
|
112
|
+
v-if="!!field.options.widgetTextLinkConfig.options.prefixIcon"
|
|
113
|
+
></i>
|
|
114
|
+
<span>{{ getWidgetValue() }}</span>
|
|
115
|
+
<i
|
|
116
|
+
:class="field.options.widgetTextLinkConfig.options.suffixIcon"
|
|
117
|
+
v-if="!!field.options.widgetTextLinkConfig.options.suffixIcon"
|
|
118
|
+
></i>
|
|
119
|
+
</span>
|
|
79
120
|
</a>
|
|
80
121
|
</div>
|
|
81
122
|
</template>
|
|
@@ -87,20 +128,41 @@
|
|
|
87
128
|
</div>
|
|
88
129
|
<template v-if="!!this.designer">
|
|
89
130
|
<div class="field-action" v-if="designer.selectedId === field.id">
|
|
90
|
-
<i
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<i
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
131
|
+
<i
|
|
132
|
+
class="el-icon-back"
|
|
133
|
+
:title="i18nt('designer.hint.selectParentWidget')"
|
|
134
|
+
@click.stop="selectParentWidget(field)"
|
|
135
|
+
></i>
|
|
136
|
+
<i
|
|
137
|
+
class="el-icon-top"
|
|
138
|
+
v-if="!!parentList && parentList.length > 1"
|
|
139
|
+
:title="i18nt('designer.hint.moveUpWidget')"
|
|
140
|
+
@click.stop="moveUpWidget(field)"
|
|
141
|
+
></i>
|
|
142
|
+
<i
|
|
143
|
+
class="el-icon-bottom"
|
|
144
|
+
v-if="!!parentList && parentList.length > 1"
|
|
145
|
+
:title="i18nt('designer.hint.moveDownWidget')"
|
|
146
|
+
@click.stop="moveDownWidget(field)"
|
|
147
|
+
></i>
|
|
148
|
+
<i
|
|
149
|
+
class="el-icon-delete"
|
|
150
|
+
:title="i18nt('designer.hint.remove')"
|
|
151
|
+
@click.stop="removeFieldWidget"
|
|
152
|
+
></i>
|
|
99
153
|
</div>
|
|
100
154
|
|
|
101
|
-
<div
|
|
155
|
+
<div
|
|
156
|
+
class="drag-handler background-opacity"
|
|
157
|
+
v-if="designer.selectedId === field.id"
|
|
158
|
+
>
|
|
102
159
|
<i class="el-icon-rank" :title="i18nt('designer.hint.dragHandler')"></i>
|
|
103
|
-
<i>{{
|
|
160
|
+
<i>{{
|
|
161
|
+
i18n2t(
|
|
162
|
+
`designer.widgetLabel.${field.type}`,
|
|
163
|
+
`extension.widgetLabel.${field.type}`
|
|
164
|
+
)
|
|
165
|
+
}}</i>
|
|
104
166
|
<i v-if="field.options.hidden === true" class="iconfont icon-hide"></i>
|
|
105
167
|
</div>
|
|
106
168
|
</template>
|
|
@@ -109,8 +171,7 @@
|
|
|
109
171
|
|
|
110
172
|
<script>
|
|
111
173
|
import i18n from "../../../../../components/xform/utils/i18n";
|
|
112
|
-
import {getSubFormNameByFieldId} from "../../../../../components/xform/utils/util";
|
|
113
|
-
|
|
174
|
+
import { getSubFormNameByFieldId } from "../../../../../components/xform/utils/util";
|
|
114
175
|
|
|
115
176
|
export default {
|
|
116
177
|
name: "form-item-wrapper",
|
|
@@ -124,89 +185,101 @@ export default {
|
|
|
124
185
|
|
|
125
186
|
designState: {
|
|
126
187
|
type: Boolean,
|
|
127
|
-
default: false
|
|
188
|
+
default: false,
|
|
128
189
|
},
|
|
129
|
-
subFormRowIndex: {
|
|
130
|
-
type: Number,
|
|
131
|
-
default: -1
|
|
190
|
+
subFormRowIndex: {
|
|
191
|
+
/* 子表单组件行索引,从0开始计数 */ type: Number,
|
|
192
|
+
default: -1,
|
|
132
193
|
},
|
|
133
|
-
subFormColIndex: {
|
|
134
|
-
type: Number,
|
|
135
|
-
default: -1
|
|
194
|
+
subFormColIndex: {
|
|
195
|
+
/* 子表单组件列索引,从0开始计数 */ type: Number,
|
|
196
|
+
default: -1,
|
|
136
197
|
},
|
|
137
|
-
subFormRowId: {
|
|
138
|
-
type: String,
|
|
139
|
-
default:
|
|
198
|
+
subFormRowId: {
|
|
199
|
+
/* 子表单组件行Id,唯一id且不可变 */ type: String,
|
|
200
|
+
default: "",
|
|
140
201
|
},
|
|
141
202
|
|
|
142
203
|
rules: Array,
|
|
143
204
|
},
|
|
144
|
-
inject: [
|
|
145
|
-
|
|
205
|
+
inject: [
|
|
206
|
+
"getFormConfig",
|
|
207
|
+
"getSubFormFieldFlag",
|
|
208
|
+
"getSubFormName",
|
|
209
|
+
"tableParam",
|
|
210
|
+
"formItemProp",
|
|
211
|
+
"getObjectFieldFlag",
|
|
212
|
+
"getObjectName",
|
|
213
|
+
],
|
|
214
|
+
data() {
|
|
146
215
|
return {
|
|
147
|
-
encryptFormula:null
|
|
148
|
-
}
|
|
216
|
+
encryptFormula: null,
|
|
217
|
+
};
|
|
149
218
|
},
|
|
150
219
|
computed: {
|
|
151
220
|
formConfig: function () {
|
|
152
|
-
return this.getFormConfig()
|
|
221
|
+
return this.getFormConfig();
|
|
153
222
|
},
|
|
154
223
|
selected() {
|
|
155
|
-
return !!this.designer && this.field.id === this.designer.selectedId
|
|
224
|
+
return !!this.designer && this.field.id === this.designer.selectedId;
|
|
156
225
|
},
|
|
157
226
|
|
|
158
227
|
label() {
|
|
159
228
|
if (!!this.field.options.labelHidden) {
|
|
160
|
-
return
|
|
229
|
+
return "";
|
|
161
230
|
}
|
|
162
|
-
return this.getI18nLabel(this.field.options.label)
|
|
231
|
+
return this.getI18nLabel(this.field.options.label);
|
|
163
232
|
// let label = this.field.options.label
|
|
164
233
|
// return label ? this.$t2(label) : label;
|
|
165
234
|
},
|
|
166
235
|
|
|
167
236
|
labelWidth() {
|
|
168
237
|
if (!!this.field.options.labelHidden) {
|
|
169
|
-
return (!!this.designState ? 5 : 0)+"px"
|
|
238
|
+
return (!!this.designState ? 5 : 0) + "px"; //设计期间标签最小宽度5像素,以便于鼠标点击可选中组件!!
|
|
170
239
|
}
|
|
171
240
|
|
|
172
241
|
if (!!this.field.options.labelWidth) {
|
|
173
|
-
return this.field.options.labelWidth + "px !important"
|
|
242
|
+
return this.field.options.labelWidth + "px !important";
|
|
174
243
|
}
|
|
175
244
|
|
|
176
245
|
if (!!this.designer) {
|
|
177
|
-
return this.designer.formConfig.labelWidth + "px"
|
|
246
|
+
return this.designer.formConfig.labelWidth + "px";
|
|
178
247
|
} else {
|
|
179
|
-
return this.formConfig.labelWidth + "px"
|
|
248
|
+
return this.formConfig.labelWidth + "px";
|
|
180
249
|
}
|
|
181
250
|
},
|
|
182
251
|
|
|
183
252
|
labelAlign() {
|
|
184
253
|
if (!this?.field?.options?.labelAlign) {
|
|
185
|
-
return ""
|
|
254
|
+
return "";
|
|
186
255
|
}
|
|
187
256
|
if (!!this.field.options.labelAlign) {
|
|
188
|
-
return this.field.options.labelAlign
|
|
257
|
+
return this.field.options.labelAlign;
|
|
189
258
|
}
|
|
190
259
|
|
|
191
260
|
if (!!this.designer) {
|
|
192
|
-
return this.designer.formConfig.labelAlign ||
|
|
261
|
+
return this.designer.formConfig.labelAlign || "label-left-align";
|
|
193
262
|
} else {
|
|
194
|
-
return this.formConfig.labelAlign ||
|
|
263
|
+
return this.formConfig.labelAlign || "label-left-align";
|
|
195
264
|
}
|
|
196
265
|
},
|
|
197
266
|
|
|
198
267
|
customClass() {
|
|
199
|
-
return !!this.field.options.customClass
|
|
268
|
+
return !!this.field.options.customClass
|
|
269
|
+
? this.field.options.customClass.join(" ")
|
|
270
|
+
: "";
|
|
200
271
|
},
|
|
201
272
|
|
|
202
273
|
subFormName() {
|
|
203
|
-
return !!this.parentWidget ? this.parentWidget.options.name :
|
|
274
|
+
return !!this.parentWidget ? this.parentWidget.options.name : "";
|
|
204
275
|
},
|
|
205
276
|
|
|
206
277
|
subFormItemFlag() {
|
|
207
|
-
return
|
|
278
|
+
return (
|
|
279
|
+
this.isSubFormItem() ||
|
|
280
|
+
(!!this.parentWidget ? this.parentWidget.type === "sub-form" : false)
|
|
281
|
+
);
|
|
208
282
|
},
|
|
209
|
-
|
|
210
283
|
},
|
|
211
284
|
created() {
|
|
212
285
|
//
|
|
@@ -218,122 +291,103 @@ export default {
|
|
|
218
291
|
},
|
|
219
292
|
selectField(field) {
|
|
220
293
|
if (!!this.designer) {
|
|
221
|
-
this.designer.setSelected(field)
|
|
222
|
-
this.designer.emitEvent(
|
|
294
|
+
this.designer.setSelected(field);
|
|
295
|
+
this.designer.emitEvent("field-selected", this.parentWidget); //发送选中组件的父组件对象
|
|
223
296
|
}
|
|
224
297
|
},
|
|
225
298
|
|
|
226
299
|
selectParentWidget() {
|
|
227
300
|
if (this.parentWidget) {
|
|
228
|
-
this.designer.setSelected(this.parentWidget)
|
|
301
|
+
this.designer.setSelected(this.parentWidget);
|
|
229
302
|
} else {
|
|
230
|
-
this.designer.clearSelected()
|
|
303
|
+
this.designer.clearSelected();
|
|
231
304
|
}
|
|
232
305
|
},
|
|
233
306
|
|
|
234
307
|
moveUpWidget() {
|
|
235
|
-
this.designer.moveUpWidget(this.parentList, this.indexOfParentList)
|
|
236
|
-
this.designer.emitHistoryChange()
|
|
308
|
+
this.designer.moveUpWidget(this.parentList, this.indexOfParentList);
|
|
309
|
+
this.designer.emitHistoryChange();
|
|
237
310
|
},
|
|
238
311
|
|
|
239
312
|
moveDownWidget() {
|
|
240
|
-
this.designer.moveDownWidget(this.parentList, this.indexOfParentList)
|
|
241
|
-
this.designer.emitHistoryChange()
|
|
313
|
+
this.designer.moveDownWidget(this.parentList, this.indexOfParentList);
|
|
314
|
+
this.designer.emitHistoryChange();
|
|
242
315
|
},
|
|
243
316
|
|
|
244
317
|
removeFieldWidget() {
|
|
245
318
|
if (!!this.parentList) {
|
|
246
319
|
const selectedWidgetName = this.designer.selectedWidgetName;
|
|
247
320
|
let selectedId = this.designer.selectedId;
|
|
248
|
-
let nextSelected = null
|
|
321
|
+
let nextSelected = null;
|
|
249
322
|
if (this.parentList.length === 1) {
|
|
250
323
|
if (!!this.parentWidget) {
|
|
251
|
-
nextSelected = this.parentWidget
|
|
324
|
+
nextSelected = this.parentWidget;
|
|
252
325
|
}
|
|
253
|
-
} else if (this.parentList.length ===
|
|
254
|
-
nextSelected = this.parentList[this.indexOfParentList - 1]
|
|
326
|
+
} else if (this.parentList.length === 1 + this.indexOfParentList) {
|
|
327
|
+
nextSelected = this.parentList[this.indexOfParentList - 1];
|
|
255
328
|
} else {
|
|
256
|
-
nextSelected = this.parentList[this.indexOfParentList + 1]
|
|
329
|
+
nextSelected = this.parentList[this.indexOfParentList + 1];
|
|
257
330
|
}
|
|
258
331
|
|
|
259
332
|
this.$nextTick(() => {
|
|
260
|
-
const l = getSubFormNameByFieldId(
|
|
261
|
-
|
|
262
|
-
selectedId
|
|
263
|
-
);
|
|
264
|
-
this.parentList.splice(this.indexOfParentList, 1)
|
|
333
|
+
const l = getSubFormNameByFieldId(this.designer.widgetList, selectedId);
|
|
334
|
+
this.parentList.splice(this.indexOfParentList, 1);
|
|
265
335
|
//if (!!nextSelected) {
|
|
266
|
-
this.designer.setSelected(nextSelected)
|
|
336
|
+
this.designer.setSelected(nextSelected);
|
|
267
337
|
//}
|
|
268
|
-
this.designer.formWidget.deleteWidgetRef(
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
this.designer.emitHistoryChange()
|
|
273
|
-
this.designer.emitEvent(
|
|
274
|
-
"canvas-remove-field",
|
|
275
|
-
selectedWidgetName
|
|
276
|
-
);
|
|
277
|
-
})
|
|
338
|
+
this.designer.formWidget.deleteWidgetRef(selectedWidgetName, l);
|
|
339
|
+
this.designer.emitHistoryChange();
|
|
340
|
+
this.designer.emitEvent("canvas-remove-field", selectedWidgetName);
|
|
341
|
+
});
|
|
278
342
|
}
|
|
279
343
|
},
|
|
280
|
-
getIsFormItemUnabled(){
|
|
281
|
-
return this.field.type == "vabUpload" || this.field.type == "baseAttachment"
|
|
344
|
+
getIsFormItemUnabled() {
|
|
345
|
+
return this.field.type == "vabUpload" || this.field.type == "baseAttachment";
|
|
282
346
|
},
|
|
283
|
-
getRules(){
|
|
284
|
-
if(this.getIsFormItemUnabled()){
|
|
285
|
-
return null
|
|
347
|
+
getRules() {
|
|
348
|
+
if (this.getIsFormItemUnabled()) {
|
|
349
|
+
return null;
|
|
286
350
|
}
|
|
287
351
|
return this.rules;
|
|
288
352
|
},
|
|
289
353
|
getPropName() {
|
|
290
|
-
if(this.getIsFormItemUnabled()){
|
|
291
|
-
return null
|
|
354
|
+
if (this.getIsFormItemUnabled()) {
|
|
355
|
+
return null;
|
|
292
356
|
}
|
|
293
357
|
if (this.formItemProp) {
|
|
294
358
|
return this.formItemProp;
|
|
295
359
|
}
|
|
296
360
|
let o = this.field.options.name;
|
|
297
|
-
let propName =
|
|
298
|
-
(o
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
this.
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
+ "."
|
|
307
|
-
+ o
|
|
308
|
-
: this.getObjectFieldFlag() && !this.designState
|
|
309
|
-
? this.getObjectName() + "." + o
|
|
310
|
-
: o
|
|
311
|
-
);
|
|
312
|
-
|
|
313
|
-
return propName
|
|
361
|
+
let propName =
|
|
362
|
+
((o = (this.field.options.keyNameEnabled && this.field.options.keyName) || o),
|
|
363
|
+
this.subFormItemFlag && !this.designState
|
|
364
|
+
? this.subFormName + "." + this.subFormRowIndex + "." + o
|
|
365
|
+
: this.getObjectFieldFlag() && !this.designState
|
|
366
|
+
? this.getObjectName() + "." + o
|
|
367
|
+
: o);
|
|
368
|
+
|
|
369
|
+
return propName;
|
|
314
370
|
},
|
|
315
371
|
getI18nLabel(label, path, param) {
|
|
316
372
|
return !this.designState && label ? this.$t2(label, path, param) : label;
|
|
317
373
|
},
|
|
318
|
-
getProcessText(text,pattern) {
|
|
319
|
-
|
|
320
|
-
if (pattern == '' || pattern === null || pattern === undefined) {
|
|
374
|
+
getProcessText(text, pattern) {
|
|
375
|
+
if (pattern == "" || pattern === null || pattern === undefined) {
|
|
321
376
|
return text;
|
|
322
377
|
}
|
|
323
378
|
|
|
324
|
-
let result =
|
|
379
|
+
let result = "";
|
|
325
380
|
|
|
326
381
|
// 处理固定模式
|
|
327
|
-
if (pattern ===
|
|
328
|
-
result =
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
result = '*****';
|
|
382
|
+
if (pattern === "-") {
|
|
383
|
+
result = "-";
|
|
384
|
+
} else if (pattern === "*") {
|
|
385
|
+
result = "*****";
|
|
332
386
|
}
|
|
333
387
|
// 处理自定义模式
|
|
334
|
-
else if (pattern.includes(
|
|
335
|
-
text = text ?? ""
|
|
336
|
-
const parts = pattern.split(
|
|
388
|
+
else if (pattern.includes("*")) {
|
|
389
|
+
text = text ?? "";
|
|
390
|
+
const parts = pattern.split("*");
|
|
337
391
|
|
|
338
392
|
// 处理 A*B 模式
|
|
339
393
|
if (parts.length === 2 && parts[0] && parts[1]) {
|
|
@@ -344,10 +398,10 @@ export default {
|
|
|
344
398
|
if (text.length >= a + b) {
|
|
345
399
|
const prefix = text.substring(0, a);
|
|
346
400
|
const suffix = text.substring(text.length - b);
|
|
347
|
-
const stars =
|
|
401
|
+
const stars = "*".repeat(text.length - a - b);
|
|
348
402
|
result = prefix + stars + suffix;
|
|
349
403
|
} else {
|
|
350
|
-
result =
|
|
404
|
+
result = "*****";
|
|
351
405
|
}
|
|
352
406
|
} else {
|
|
353
407
|
// result = '无效模式:A和B必须是数字';
|
|
@@ -361,10 +415,10 @@ export default {
|
|
|
361
415
|
if (!isNaN(a) && a >= 0) {
|
|
362
416
|
if (text.length >= a) {
|
|
363
417
|
const prefix = text.substring(0, a);
|
|
364
|
-
const stars =
|
|
418
|
+
const stars = "*".repeat(text.length - a);
|
|
365
419
|
result = prefix + stars;
|
|
366
420
|
} else {
|
|
367
|
-
result =
|
|
421
|
+
result = "*****";
|
|
368
422
|
}
|
|
369
423
|
} else {
|
|
370
424
|
// result = '无效模式:A必须是数字';
|
|
@@ -378,10 +432,10 @@ export default {
|
|
|
378
432
|
if (!isNaN(b) && b >= 0) {
|
|
379
433
|
if (text.length >= b) {
|
|
380
434
|
const suffix = text.substring(text.length - b);
|
|
381
|
-
const stars =
|
|
435
|
+
const stars = "*".repeat(text.length - b);
|
|
382
436
|
result = stars + suffix;
|
|
383
437
|
} else {
|
|
384
|
-
result =
|
|
438
|
+
result = "*****";
|
|
385
439
|
}
|
|
386
440
|
} else {
|
|
387
441
|
// result = '无效模式:B必须是数字';
|
|
@@ -390,26 +444,26 @@ export default {
|
|
|
390
444
|
}
|
|
391
445
|
// 处理无效模式
|
|
392
446
|
else {
|
|
393
|
-
result =
|
|
447
|
+
result = "*****";
|
|
394
448
|
}
|
|
395
449
|
}
|
|
396
450
|
// 处理其他无效模式
|
|
397
451
|
else {
|
|
398
|
-
result =
|
|
452
|
+
result = "*****";
|
|
399
453
|
}
|
|
400
454
|
|
|
401
455
|
return result;
|
|
402
456
|
},
|
|
403
457
|
initShowType() {
|
|
404
|
-
if (!!this.designer) return
|
|
405
|
-
let that = this.$parent
|
|
458
|
+
if (!!this.designer) return;
|
|
459
|
+
let that = this.$parent;
|
|
406
460
|
let formRef = that.getFormRef ? that.getFormRef() : that;
|
|
407
461
|
|
|
408
|
-
if(!formRef)return
|
|
462
|
+
if (!formRef) return;
|
|
409
463
|
//详情页,新增页面不加密
|
|
410
464
|
let fJson = formRef.formJson;
|
|
411
465
|
let formConfig = fJson.formConfig;
|
|
412
|
-
if (formConfig.isLoadEntity && !formRef.dataId) return
|
|
466
|
+
if (formConfig.isLoadEntity && !formRef.dataId) return;
|
|
413
467
|
|
|
414
468
|
let bdService = formRef.bdService;
|
|
415
469
|
let companyCode = this.$store.getters.companyCode;
|
|
@@ -418,12 +472,12 @@ export default {
|
|
|
418
472
|
let userSaleOrgDTOs = formRef.userSaleOrgDTOs;
|
|
419
473
|
let userRoleDTOs = formRef.userRoleDTOs;
|
|
420
474
|
|
|
421
|
-
let saleOrgCodeList = userSaleOrgDTOs.map(item => item.sn);
|
|
422
|
-
let roleCodeList = userRoleDTOs.map(item => item.roleCode);
|
|
475
|
+
let saleOrgCodeList = userSaleOrgDTOs.map((item) => item.sn);
|
|
476
|
+
let roleCodeList = userRoleDTOs.map((item) => item.roleCode);
|
|
423
477
|
|
|
424
478
|
let optionModel = this.field.options;
|
|
425
479
|
|
|
426
|
-
let flag = 0
|
|
480
|
+
let flag = 0; //0 原本组件,1明文文本,2密文文本
|
|
427
481
|
/*if (optionModel.showTextEnabled) {
|
|
428
482
|
flag = 1;
|
|
429
483
|
} else if (optionModel.showEncryptTextEnabled) {
|
|
@@ -433,11 +487,13 @@ export default {
|
|
|
433
487
|
}*/
|
|
434
488
|
if (optionModel.userTextRuleEnabled) {
|
|
435
489
|
let userTextRuleConfig = optionModel.userTextRuleConfig || [];
|
|
436
|
-
userTextRuleConfig.forEach(item => {
|
|
490
|
+
userTextRuleConfig.forEach((item) => {
|
|
437
491
|
let type = item.type ?? null;
|
|
438
492
|
if (type !== null && type !== "") {
|
|
439
493
|
let companyCodeStr = item.companyCodes;
|
|
440
|
-
let companyCodes = companyCodeStr
|
|
494
|
+
let companyCodes = companyCodeStr
|
|
495
|
+
? companyCodeStr.split(",").filter((item) => !!item)
|
|
496
|
+
: [];
|
|
441
497
|
/*
|
|
442
498
|
|
|
443
499
|
let loginAccountStr = item.loginAccounts;
|
|
@@ -448,27 +504,29 @@ export default {
|
|
|
448
504
|
*/
|
|
449
505
|
|
|
450
506
|
let roleCodeStr = item.roleCodes;
|
|
451
|
-
let roleCodes = roleCodeStr
|
|
507
|
+
let roleCodes = roleCodeStr
|
|
508
|
+
? roleCodeStr.split(",").filter((item) => !!item)
|
|
509
|
+
: [];
|
|
452
510
|
|
|
453
511
|
let flag1 = !item.serveName || item.serveName == bdService;
|
|
454
|
-
let flag2 = !companyCodes.length || companyCodes.includes(companyCode)
|
|
512
|
+
let flag2 = !companyCodes.length || companyCodes.includes(companyCode);
|
|
455
513
|
// let flag3 = !loginAccounts.length || loginAccounts.includes(loginAccount)
|
|
456
514
|
// let flag4 = this.compareToList(saleOrgCodes, saleOrgCodeList)
|
|
457
|
-
if(flag1 && flag2){
|
|
458
|
-
this.encryptFormula = item.encryptFormula
|
|
459
|
-
let flag5 = this.compareToList(roleCodes, roleCodeList)
|
|
460
|
-
if(flag5){
|
|
515
|
+
if (flag1 && flag2) {
|
|
516
|
+
this.encryptFormula = item.encryptFormula;
|
|
517
|
+
let flag5 = this.compareToList(roleCodes, roleCodeList);
|
|
518
|
+
if (flag5) {
|
|
461
519
|
//匹配角色
|
|
462
|
-
if(type == 2)flag = 2//type=2时加密
|
|
463
|
-
}else {
|
|
520
|
+
if (type == 2) flag = 2; //type=2时加密
|
|
521
|
+
} else {
|
|
464
522
|
//角色不匹配
|
|
465
|
-
if(type == 1)flag = 2
|
|
523
|
+
if (type == 1) flag = 2;
|
|
466
524
|
}
|
|
467
525
|
}
|
|
468
526
|
}
|
|
469
|
-
})
|
|
527
|
+
});
|
|
470
528
|
}
|
|
471
|
-
this.field.options.widgetTextFlag = flag
|
|
529
|
+
this.field.options.widgetTextFlag = flag;
|
|
472
530
|
// this.showType = flag;
|
|
473
531
|
},
|
|
474
532
|
compareToList(list1, list2) {
|
|
@@ -478,21 +536,23 @@ export default {
|
|
|
478
536
|
if (!list2.length) {
|
|
479
537
|
return false;
|
|
480
538
|
}
|
|
481
|
-
return list1.some(item => {
|
|
482
|
-
return list2.some(item2 => item == item2)
|
|
539
|
+
return list1.some((item) => {
|
|
540
|
+
return list2.some((item2) => item == item2);
|
|
483
541
|
});
|
|
484
542
|
},
|
|
485
543
|
isShowWidget() {
|
|
486
544
|
let widgetTextFlag = this.field.options.widgetTextFlag;
|
|
487
|
-
return
|
|
545
|
+
return (
|
|
546
|
+
widgetTextFlag === undefined || widgetTextFlag === null || widgetTextFlag === 0
|
|
547
|
+
);
|
|
488
548
|
},
|
|
489
549
|
getShowValue() {
|
|
490
550
|
let widgetTextFlag = this.field.options.widgetTextFlag;
|
|
491
551
|
let fieldModel = this.$parent.fieldModel;
|
|
492
552
|
if (this.$parent.fieldModelLabel) fieldModel = this.$parent.fieldModelLabel();
|
|
493
|
-
let showValue = fieldModel
|
|
553
|
+
let showValue = fieldModel;
|
|
494
554
|
if (widgetTextFlag == 2) {
|
|
495
|
-
showValue = this.getProcessText(showValue,this.encryptFormula)
|
|
555
|
+
showValue = this.getProcessText(showValue, this.encryptFormula);
|
|
496
556
|
}
|
|
497
557
|
|
|
498
558
|
return showValue;
|
|
@@ -501,13 +561,13 @@ export default {
|
|
|
501
561
|
let list = [];
|
|
502
562
|
let optionModel = this.field.options.widgetTextLinkConfig?.options || {};
|
|
503
563
|
if (optionModel.colorClass) list.push(optionModel.colorClass);
|
|
504
|
-
if (optionModel.underline) list.push(
|
|
505
|
-
if (this.field.options.disabled) list.push(
|
|
506
|
-
return list
|
|
564
|
+
if (optionModel.underline) list.push("underLine");
|
|
565
|
+
if (this.field.options.disabled) list.push("is-disabled");
|
|
566
|
+
return list;
|
|
507
567
|
},
|
|
508
568
|
handleClick(event) {
|
|
509
|
-
if(this.field.options.disabled) return;
|
|
510
|
-
this.$parent.handleButtonWidgetClick(event, true)
|
|
569
|
+
if (this.field.options.disabled) return;
|
|
570
|
+
this.$parent.handleButtonWidgetClick(event, true);
|
|
511
571
|
if (!this.designState && this.field.options.widgetTextLinkConfig?.options.href) {
|
|
512
572
|
window.open(this.field.options.widgetTextLinkConfig?.options.href);
|
|
513
573
|
}
|
|
@@ -516,9 +576,9 @@ export default {
|
|
|
516
576
|
let fieldModel = this.$parent.fieldModel;
|
|
517
577
|
if (this.$parent.fieldModelLabel) fieldModel = this.$parent.fieldModelLabel();
|
|
518
578
|
return fieldModel;
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
579
|
+
},
|
|
580
|
+
},
|
|
581
|
+
};
|
|
522
582
|
</script>
|
|
523
583
|
|
|
524
584
|
<style lang="scss" scoped>
|
|
@@ -607,8 +667,8 @@ export default {
|
|
|
607
667
|
}
|
|
608
668
|
|
|
609
669
|
.required ::v-deep .el-form-item__label::before {
|
|
610
|
-
content:
|
|
611
|
-
color: #
|
|
670
|
+
content: "*";
|
|
671
|
+
color: #f56c6c;
|
|
612
672
|
margin-right: 4px;
|
|
613
673
|
}
|
|
614
674
|
|
|
@@ -622,7 +682,8 @@ export default {
|
|
|
622
682
|
}
|
|
623
683
|
}
|
|
624
684
|
|
|
625
|
-
.el-form-item.selected,
|
|
685
|
+
.el-form-item.selected,
|
|
686
|
+
.static-content-item.selected {
|
|
626
687
|
outline: 2px solid $--color-primary;
|
|
627
688
|
}
|
|
628
689
|
|
|
@@ -641,5 +702,4 @@ export default {
|
|
|
641
702
|
.a-link.is-disabled {
|
|
642
703
|
cursor: no-drop;
|
|
643
704
|
}
|
|
644
|
-
|
|
645
705
|
</style>
|