cloud-web-corejs 1.0.54-dev.171 → 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 +31 -32
- 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
@@ -471,7 +471,7 @@ modules = {
|
|
471
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,17 +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];
|
496
|
-
let optionItems = this.getGlobalParam(key);
|
492
|
+
/*if(tableParam){
|
493
|
+
let optionItems = this.getGloatOptionItems()
|
497
494
|
if(optionItems!==undefined){
|
498
495
|
return
|
499
496
|
}
|
500
|
-
|
501
|
-
|
502
|
-
}
|
497
|
+
this.setGloatOptionItems(null)
|
498
|
+
}*/
|
503
499
|
let accessParam = this.handleCustomEvent(
|
504
500
|
this.field.options.formScriptParam
|
505
501
|
);
|
@@ -526,17 +522,13 @@ modules = {
|
|
526
522
|
} else if (this.field.options.commonAttributeEnabled) {
|
527
523
|
let commonAttributeCode = this.field.options.commonAttributeCode;
|
528
524
|
if (!commonAttributeCode) return;
|
529
|
-
if(tableParam){
|
530
|
-
|
531
|
-
let key = this.getOptionKey();
|
532
|
-
// let optionItems = tableParam.column.params[key];
|
533
|
-
let optionItems = this.getGlobalParam(key);
|
525
|
+
/*if(tableParam){
|
526
|
+
let optionItems = this.getGloatOptionItems();
|
534
527
|
if(optionItems!==undefined){
|
535
528
|
return
|
536
529
|
}
|
537
|
-
|
538
|
-
|
539
|
-
}
|
530
|
+
this.setGloatOptionItems(null)
|
531
|
+
}*/
|
540
532
|
this.$getBaseDicts({
|
541
533
|
code: commonAttributeCode,
|
542
534
|
success: ({dicts, dictMap}) => {
|
@@ -551,12 +543,14 @@ modules = {
|
|
551
543
|
}else{
|
552
544
|
if(tableParam){
|
553
545
|
// tableParam.column.params.optionItems
|
554
|
-
let key = this.getOptionKey();
|
555
|
-
let optionItems = tableParam.column.params[key];
|
546
|
+
// let key = this.getOptionKey();
|
547
|
+
// let optionItems = tableParam.column.params[key];
|
548
|
+
let optionItems = this.getGloatOptionItems();
|
556
549
|
if(optionItems!==undefined){
|
557
550
|
return
|
558
551
|
}
|
559
|
-
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));
|
560
554
|
}
|
561
555
|
}
|
562
556
|
|
@@ -1139,26 +1133,33 @@ modules = {
|
|
1139
1133
|
this.field.options.valueKey || "value"
|
1140
1134
|
);
|
1141
1135
|
this.field.options.optionItems = optionItems
|
1142
|
-
let tableParam = this.tableParam;
|
1136
|
+
/*let tableParam = this.tableParam;
|
1143
1137
|
if(tableParam){
|
1144
|
-
|
1145
|
-
// tableParam.column.params[key] = optionItems;
|
1146
|
-
// this.setGlobalParam(key,optionItems)
|
1147
|
-
// tableParam.column.params.optionItems = optionItems;
|
1138
|
+
this.setGloatOptionItems(optionItems)
|
1148
1139
|
tableParam.column.params.rowOptionFlag = rowOptionFlag
|
1149
|
-
}
|
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);
|
1150
1149
|
},
|
1151
1150
|
reloadOptions: function (e) {
|
1152
|
-
|
1151
|
+
let optionItems = baseRefUtil.translateOptionItems(
|
1153
1152
|
e,
|
1154
1153
|
this.field.type,
|
1155
1154
|
this.field.options.labelKey || "label",
|
1156
1155
|
this.field.options.valueKey || "value"
|
1157
1156
|
);
|
1157
|
+
this.field.options.optionItems = optionItems;
|
1158
1158
|
let tableParam = this.tableParam;
|
1159
1159
|
if(tableParam){
|
1160
|
-
let key = this.getOptionKey();
|
1161
|
-
tableParam.column.params[key] = optionItems;
|
1160
|
+
// let key = this.getOptionKey();
|
1161
|
+
// tableParam.column.params[key] = optionItems;
|
1162
|
+
this.setGloatOptionItems(optionItems)
|
1162
1163
|
// tableParam.column.params.optionItems = optionItems;
|
1163
1164
|
}
|
1164
1165
|
},
|
@@ -1176,9 +1177,7 @@ modules = {
|
|
1176
1177
|
let tableParam = this.tableParam;
|
1177
1178
|
let optionItems = this.field.options.optionItems;
|
1178
1179
|
/*if(tableParam){
|
1179
|
-
let
|
1180
|
-
// let rows = tableParam.column.params[key];
|
1181
|
-
let rows = this.getGlobalParam(key)
|
1180
|
+
let rows = this.getGloatOptionItems()
|
1182
1181
|
if(!tableParam.column.params.rowOptionFlag && rows!==undefined){
|
1183
1182
|
optionItems = rows || []
|
1184
1183
|
}
|
@@ -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(){
|