cloud-web-corejs 1.0.54-dev.170 → 1.0.54-dev.172
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/baseAttachment/mixins.js +248 -1
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +35 -30
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +49 -25
- package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +4 -1
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +3 -3
- package/src/components/xform/form-render/indexMixin.js +2134 -1
- package/src/store/modules/permission.js +1 -1
- package/src/views/user/home/default.vue +4 -0
@@ -468,10 +468,10 @@ modules = {
|
|
468
468
|
}
|
469
469
|
},
|
470
470
|
getOptionKey(){
|
471
|
-
let key =
|
471
|
+
let key = "optionItems-"+ this.field.options.name
|
472
472
|
return key;
|
473
473
|
},
|
474
|
-
async initOptionItems(
|
474
|
+
async initOptionItems(gloatFlag) {
|
475
475
|
var t = this;
|
476
476
|
if (this.designState) {
|
477
477
|
return;
|
@@ -489,15 +489,13 @@ modules = {
|
|
489
489
|
let scriptCode = this.field.options.formScriptCode || "getList";
|
490
490
|
let tableParam = this.tableParam;
|
491
491
|
if (formScriptEnabled) {
|
492
|
-
if(tableParam){
|
493
|
-
|
494
|
-
let key = this.getOptionKey();
|
495
|
-
let optionItems = tableParam.column.params[key];
|
492
|
+
/*if(tableParam){
|
493
|
+
let optionItems = this.getGloatOptionItems()
|
496
494
|
if(optionItems!==undefined){
|
497
495
|
return
|
498
496
|
}
|
499
|
-
|
500
|
-
}
|
497
|
+
this.setGloatOptionItems(null)
|
498
|
+
}*/
|
501
499
|
let accessParam = this.handleCustomEvent(
|
502
500
|
this.field.options.formScriptParam
|
503
501
|
);
|
@@ -524,15 +522,13 @@ modules = {
|
|
524
522
|
} else if (this.field.options.commonAttributeEnabled) {
|
525
523
|
let commonAttributeCode = this.field.options.commonAttributeCode;
|
526
524
|
if (!commonAttributeCode) return;
|
527
|
-
if(tableParam){
|
528
|
-
|
529
|
-
let key = this.getOptionKey();
|
530
|
-
let optionItems = tableParam.column.params[key];
|
525
|
+
/*if(tableParam){
|
526
|
+
let optionItems = this.getGloatOptionItems();
|
531
527
|
if(optionItems!==undefined){
|
532
528
|
return
|
533
529
|
}
|
534
|
-
|
535
|
-
}
|
530
|
+
this.setGloatOptionItems(null)
|
531
|
+
}*/
|
536
532
|
this.$getBaseDicts({
|
537
533
|
code: commonAttributeCode,
|
538
534
|
success: ({dicts, dictMap}) => {
|
@@ -547,12 +543,14 @@ modules = {
|
|
547
543
|
}else{
|
548
544
|
if(tableParam){
|
549
545
|
// tableParam.column.params.optionItems
|
550
|
-
let key = this.getOptionKey();
|
551
|
-
let optionItems = tableParam.column.params[key];
|
546
|
+
// let key = this.getOptionKey();
|
547
|
+
// let optionItems = tableParam.column.params[key];
|
548
|
+
let optionItems = this.getGloatOptionItems();
|
552
549
|
if(optionItems!==undefined){
|
553
550
|
return
|
554
551
|
}
|
555
|
-
tableParam.column.params[key] = this.$baseLodash.cloneDeep(this.field.options.optionItems);
|
552
|
+
// tableParam.column.params[key] = this.$baseLodash.cloneDeep(this.field.options.optionItems);
|
553
|
+
this.setGloatOptionItems(this.$baseLodash.cloneDeep(this.field.options.optionItems));
|
556
554
|
}
|
557
555
|
}
|
558
556
|
|
@@ -1118,7 +1116,7 @@ modules = {
|
|
1118
1116
|
? (this.fieldModel = [])
|
1119
1117
|
: (this.fieldModel = ""));
|
1120
1118
|
},
|
1121
|
-
|
1119
|
+
loadRowGloatOptions: function (e) {
|
1122
1120
|
let optionItems = baseRefUtil.translateOptionItems(
|
1123
1121
|
e,
|
1124
1122
|
this.field.type,
|
@@ -1135,25 +1133,33 @@ modules = {
|
|
1135
1133
|
this.field.options.valueKey || "value"
|
1136
1134
|
);
|
1137
1135
|
this.field.options.optionItems = optionItems
|
1138
|
-
let tableParam = this.tableParam;
|
1136
|
+
/*let tableParam = this.tableParam;
|
1139
1137
|
if(tableParam){
|
1140
|
-
|
1141
|
-
tableParam.column.params[key] = optionItems;
|
1142
|
-
// tableParam.column.params.optionItems = optionItems;
|
1138
|
+
this.setGloatOptionItems(optionItems)
|
1143
1139
|
tableParam.column.params.rowOptionFlag = rowOptionFlag
|
1144
|
-
}
|
1140
|
+
}*/
|
1141
|
+
},
|
1142
|
+
getGloatOptionItems: function (e, rowOptionFlag) {
|
1143
|
+
let key = this.getOptionKey()
|
1144
|
+
return this.getGlobalParam(key);
|
1145
|
+
},
|
1146
|
+
setGloatOptionItems: function (optionItems) {
|
1147
|
+
let key = this.getOptionKey()
|
1148
|
+
return this.setGlobalParam(key,optionItems);
|
1145
1149
|
},
|
1146
1150
|
reloadOptions: function (e) {
|
1147
|
-
|
1151
|
+
let optionItems = baseRefUtil.translateOptionItems(
|
1148
1152
|
e,
|
1149
1153
|
this.field.type,
|
1150
1154
|
this.field.options.labelKey || "label",
|
1151
1155
|
this.field.options.valueKey || "value"
|
1152
1156
|
);
|
1157
|
+
this.field.options.optionItems = optionItems;
|
1153
1158
|
let tableParam = this.tableParam;
|
1154
1159
|
if(tableParam){
|
1155
|
-
let key = this.getOptionKey();
|
1156
|
-
tableParam.column.params[key] = optionItems;
|
1160
|
+
// let key = this.getOptionKey();
|
1161
|
+
// tableParam.column.params[key] = optionItems;
|
1162
|
+
this.setGloatOptionItems(optionItems)
|
1157
1163
|
// tableParam.column.params.optionItems = optionItems;
|
1158
1164
|
}
|
1159
1165
|
},
|
@@ -1170,13 +1176,12 @@ modules = {
|
|
1170
1176
|
// return this.field.options.optionItems;
|
1171
1177
|
let tableParam = this.tableParam;
|
1172
1178
|
let optionItems = this.field.options.optionItems;
|
1173
|
-
if(tableParam){
|
1174
|
-
let
|
1175
|
-
let rows = tableParam.column.params[key];
|
1179
|
+
/*if(tableParam){
|
1180
|
+
let rows = this.getGloatOptionItems()
|
1176
1181
|
if(!tableParam.column.params.rowOptionFlag && rows!==undefined){
|
1177
1182
|
optionItems = rows || []
|
1178
1183
|
}
|
1179
|
-
}
|
1184
|
+
}*/
|
1180
1185
|
return optionItems;
|
1181
1186
|
},
|
1182
1187
|
setUploadHeader: function (e, t) {
|
@@ -17,17 +17,19 @@
|
|
17
17
|
<template v-if="isShowWidget()">
|
18
18
|
<slot></slot>
|
19
19
|
</template>
|
20
|
-
|
21
|
-
<
|
22
|
-
:
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
20
|
+
<template v-else-if="field.options.widgetTextFlag===3 && field.options.widgetTextLinkConfig">
|
21
|
+
<div class="ellipsis">
|
22
|
+
<a class="a-link" :class="getWidgetClass()" @click="handleClick">
|
23
|
+
<span>
|
24
|
+
<i :class="field.options.widgetTextLinkConfig.options.prefixIcon"
|
25
|
+
v-if="!!field.options.widgetTextLinkConfig.options.prefixIcon"></i>
|
26
|
+
<span>{{ getWidgetValue() }}</span>
|
27
|
+
<i :class="field.options.widgetTextLinkConfig.options.suffixIcon"
|
28
|
+
v-if="!!field.options.widgetTextLinkConfig.options.suffixIcon"></i>
|
29
|
+
</span>
|
30
|
+
</a>
|
31
|
+
</div>
|
32
|
+
</template>
|
31
33
|
<template v-else>
|
32
34
|
<span>{{ getShowValue() }}</span>
|
33
35
|
</template>
|
@@ -64,17 +66,19 @@
|
|
64
66
|
<template v-if="isShowWidget()">
|
65
67
|
<slot></slot>
|
66
68
|
</template>
|
67
|
-
|
68
|
-
<
|
69
|
-
:
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
69
|
+
<template v-else-if="field.options.widgetTextFlag===3 && field.options.widgetTextLinkConfig">
|
70
|
+
<div class="ellipsis">
|
71
|
+
<a class="a-link" :class="getWidgetClass()" @click="handleClick">
|
72
|
+
<span>
|
73
|
+
<i :class="field.options.widgetTextLinkConfig.options.prefixIcon"
|
74
|
+
v-if="!!field.options.widgetTextLinkConfig.options.prefixIcon"></i>
|
75
|
+
<span>{{ getWidgetValue() }}</span>
|
76
|
+
<i :class="field.options.widgetTextLinkConfig.options.suffixIcon"
|
77
|
+
v-if="!!field.options.widgetTextLinkConfig.options.suffixIcon"></i>
|
78
|
+
</span>
|
79
|
+
</a>
|
80
|
+
</div>
|
81
|
+
</template>
|
78
82
|
<template v-else>
|
79
83
|
<span>{{ getShowValue() }}</span>
|
80
84
|
</template>
|
@@ -110,7 +114,6 @@ import {getSubFormNameByFieldId} from "../../../../../components/xform/utils/uti
|
|
110
114
|
|
111
115
|
export default {
|
112
116
|
name: "form-item-wrapper",
|
113
|
-
// components: {aLinkWidget: () => import("@base/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue")},
|
114
117
|
mixins: [i18n],
|
115
118
|
props: {
|
116
119
|
field: Object,
|
@@ -318,7 +321,7 @@ export default {
|
|
318
321
|
flag = 1;
|
319
322
|
} else if (optionModel.showEncryptTextEnabled) {
|
320
323
|
flag = 2;
|
321
|
-
}else if (optionModel.showLinkTextEnabled) {
|
324
|
+
} else if (optionModel.showLinkTextEnabled) {
|
322
325
|
flag = 3;
|
323
326
|
}
|
324
327
|
if (optionModel.userTextRuleEnabled) {
|
@@ -373,6 +376,7 @@ export default {
|
|
373
376
|
getShowValue() {
|
374
377
|
let widgetTextFlag = this.field.options.widgetTextFlag;
|
375
378
|
let fieldModel = this.$parent.fieldModel;
|
379
|
+
if (this.$parent.fieldModelLabel) fieldModel = this.$parent.fieldModelLabel();
|
376
380
|
let showValue = fieldModel
|
377
381
|
if (widgetTextFlag == 2) {
|
378
382
|
let optionModel = this.field.options;
|
@@ -417,7 +421,24 @@ export default {
|
|
417
421
|
|
418
422
|
return showValue;
|
419
423
|
},
|
420
|
-
|
424
|
+
getWidgetClass() {
|
425
|
+
let list = [];
|
426
|
+
let optionModel = this.field.options.widgetTextLinkConfig?.options || {};
|
427
|
+
if (optionModel.coloClass) list.push(optionModel.coloClass);
|
428
|
+
if (optionModel.underline) list.push('underLine');
|
429
|
+
if (this.field.options.disabled) list.push('is-disabled');
|
430
|
+
return list
|
431
|
+
},
|
432
|
+
handleClick() {
|
433
|
+
if (this.field.options.disabled) return;
|
434
|
+
let optionModel = this.field.options.widgetTextLinkConfig?.options || {};
|
435
|
+
this.$parent.handleCustomEvent(optionModel.onClick);
|
436
|
+
},
|
437
|
+
getWidgetValue() {
|
438
|
+
let fieldModel = this.$parent.fieldModel;
|
439
|
+
if (this.$parent.fieldModelLabel) fieldModel = this.$parent.fieldModelLabel();
|
440
|
+
return fieldModel;
|
441
|
+
}
|
421
442
|
}
|
422
443
|
}
|
423
444
|
</script>
|
@@ -539,5 +560,8 @@ export default {
|
|
539
560
|
text-align: right;
|
540
561
|
}
|
541
562
|
|
563
|
+
.a-link.is-disabled {
|
564
|
+
cursor: no-drop;
|
565
|
+
}
|
542
566
|
|
543
567
|
</style>
|
package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
<el-form-item label-width="0">
|
4
4
|
<el-divider class="custom-divider-margin-top">显示设置</el-divider>
|
5
5
|
</el-form-item>
|
6
|
-
|
6
|
+
<el-form-item :label="i18nt('显示超链接')">
|
7
7
|
<el-switch v-model="optionModel.showLinkTextEnabled" @change="changeShowLinkTextEnabled"></el-switch>
|
8
8
|
</el-form-item>
|
9
9
|
<el-form-item :label="i18nt('超链接配置')">
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<span></span>
|
12
12
|
<i class="el-icon-edit"></i>
|
13
13
|
</a>
|
14
|
-
</el-form-item
|
14
|
+
</el-form-item>
|
15
15
|
<el-form-item :label="i18nt('仅显示明文文本')">
|
16
16
|
<el-switch v-model="optionModel.showTextEnabled" @change="optionModel.showEncryptTextEnabled=false;optionModel.showLinkTextEnabled=false;"></el-switch>
|
17
17
|
</el-form-item>
|
@@ -229,6 +229,7 @@ export default {
|
|
229
229
|
if(!this.optionModel.widgetTextLinkConfig){
|
230
230
|
widget = this.designer.copyNewFieldWidget(this.designer.getFieldWidgetByType("a-link"));
|
231
231
|
this.$set(this.optionModel,'widgetTextLinkConfig',widget)
|
232
|
+
widget.options.underline = true;
|
232
233
|
}else{
|
233
234
|
widget = this.optionModel.widgetTextLinkConfig
|
234
235
|
}
|
@@ -236,7 +237,6 @@ export default {
|
|
236
237
|
widget.options.keyName = keyName;
|
237
238
|
widget.options.labelHidden = true
|
238
239
|
widget.options.isFormLabel = true
|
239
|
-
|
240
240
|
return widget;
|
241
241
|
},
|
242
242
|
openLinkConfig(){
|