cloud-web-corejs 1.0.54-dev.167 → 1.0.54-dev.169
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 +1 -248
- package/src/components/excelImport/mixins.js +1 -748
- package/src/components/xform/form-designer/form-widget/dialog/importDialogMixin.js +1 -1304
- package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +27 -2
- package/src/components/xform/form-designer/form-widget/field-widget/form-item-wrapper.vue +50 -18
- package/src/components/xform/form-designer/indexMixin.js +1 -784
- package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +51 -2
- package/src/components/xform/form-designer/widget-panel/indexMixin.js +1 -276
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +3 -1
- package/src/components/xform/form-render/container-item/containerItemMixin.js +1 -330
- package/src/components/xform/form-render/container-item/data-table-mixin.js +1 -2124
- package/src/components/xform/form-render/indexMixin.js +1 -2134
- package/src/components/xform/mixins/defaultHandle.js +1 -120
- package/src/components/xform/mixins/scriptHttp.js +1 -162
- package/src/components/xform/utils/util.js +1 -1631
- package/src/views/bd/setting/table_model/mixins/edit.js +1 -1087
- package/src/components/xform/form-render/indexMixin2.js +0 -2049
@@ -1118,7 +1118,16 @@ modules = {
|
|
1118
1118
|
? (this.fieldModel = [])
|
1119
1119
|
: (this.fieldModel = ""));
|
1120
1120
|
},
|
1121
|
-
|
1121
|
+
loadRowOptions: function (e) {
|
1122
|
+
let optionItems = baseRefUtil.translateOptionItems(
|
1123
|
+
e,
|
1124
|
+
this.field.type,
|
1125
|
+
this.field.options.labelKey || "label",
|
1126
|
+
this.field.options.valueKey || "value"
|
1127
|
+
);
|
1128
|
+
this.field.options.optionItems = optionItems
|
1129
|
+
},
|
1130
|
+
loadOptions: function (e,rowOptionFlag) {
|
1122
1131
|
let optionItems = baseRefUtil.translateOptionItems(
|
1123
1132
|
e,
|
1124
1133
|
this.field.type,
|
@@ -1131,6 +1140,7 @@ modules = {
|
|
1131
1140
|
let key = this.getOptionKey()
|
1132
1141
|
tableParam.column.params[key] = optionItems;
|
1133
1142
|
// tableParam.column.params.optionItems = optionItems;
|
1143
|
+
tableParam.column.params.rowOptionFlag = rowOptionFlag
|
1134
1144
|
}
|
1135
1145
|
},
|
1136
1146
|
reloadOptions: function (e) {
|
@@ -1163,7 +1173,7 @@ modules = {
|
|
1163
1173
|
if(tableParam){
|
1164
1174
|
let key = this.getOptionKey();
|
1165
1175
|
let rows = tableParam.column.params[key];
|
1166
|
-
if(rows!==undefined){
|
1176
|
+
if(!tableParam.column.params.rowOptionFlag && rows!==undefined){
|
1167
1177
|
optionItems = rows || []
|
1168
1178
|
}
|
1169
1179
|
}
|
@@ -1293,6 +1303,21 @@ modules = {
|
|
1293
1303
|
let name = this.parentWidget?.options?.name ?? null;
|
1294
1304
|
return name ? this.getWidgetRef(name) : null;
|
1295
1305
|
},
|
1306
|
+
setWidgetTextFlag(val){
|
1307
|
+
this.widgetTextFlag = val;
|
1308
|
+
},
|
1309
|
+
showWidget(){
|
1310
|
+
this.widgetTextFlag = 0;
|
1311
|
+
},
|
1312
|
+
showText(){
|
1313
|
+
this.widgetTextFlag = 1;
|
1314
|
+
},
|
1315
|
+
showEncryptText(){
|
1316
|
+
this.widgetTextFlag = 2;
|
1317
|
+
},
|
1318
|
+
showAText(){
|
1319
|
+
this.widgetTextFlag = 3;
|
1320
|
+
},
|
1296
1321
|
},
|
1297
1322
|
};
|
1298
1323
|
|
@@ -14,9 +14,20 @@
|
|
14
14
|
<div>
|
15
15
|
<template v-if="formItemProp=='false'">
|
16
16
|
<template v-if="!field.options.hidden">
|
17
|
-
<template v-if="
|
17
|
+
<template v-if="isShowWidget()">
|
18
18
|
<slot></slot>
|
19
19
|
</template>
|
20
|
+
<!-- <template v-else-if="field.options.widgetTextFlag===3">
|
21
|
+
<aLinkWidget
|
22
|
+
:field="field"
|
23
|
+
:form-model="$parent.formModel"
|
24
|
+
:designer="designer"
|
25
|
+
:key="field.options.widgetTextLinkConfig.id"
|
26
|
+
:parent-list="parentList"
|
27
|
+
:index-of-parent-list="indexOfParentList"
|
28
|
+
:parent-widget="parentWidget"
|
29
|
+
></aLinkWidget>
|
30
|
+
</template>-->
|
20
31
|
<template v-else>
|
21
32
|
<span>{{ getShowValue() }}</span>
|
22
33
|
</template>
|
@@ -50,9 +61,20 @@
|
|
50
61
|
<span v-if="!!field.options.labelColor" slot="label" :style="{'color':field.options.labelColor}">
|
51
62
|
{{ label }}
|
52
63
|
</span>
|
53
|
-
<template v-if="
|
64
|
+
<template v-if="isShowWidget()">
|
54
65
|
<slot></slot>
|
55
66
|
</template>
|
67
|
+
<!-- <template v-else-if="field.options.widgetTextFlag===3">
|
68
|
+
<aLinkWidget
|
69
|
+
:field="field"
|
70
|
+
:form-model="$parent.formModel"
|
71
|
+
:designer="designer"
|
72
|
+
:key="field.options.widgetTextLinkConfig.id"
|
73
|
+
:parent-list="parentList"
|
74
|
+
:index-of-parent-list="indexOfParentList"
|
75
|
+
:parent-widget="parentWidget"
|
76
|
+
></aLinkWidget>
|
77
|
+
</template>-->
|
56
78
|
<template v-else>
|
57
79
|
<span>{{ getShowValue() }}</span>
|
58
80
|
</template>
|
@@ -88,6 +110,7 @@ import {getSubFormNameByFieldId} from "../../../../../components/xform/utils/uti
|
|
88
110
|
|
89
111
|
export default {
|
90
112
|
name: "form-item-wrapper",
|
113
|
+
// components: {aLinkWidget: () => import("@base/components/xform/form-designer/form-widget/field-widget/a-text-widget.vue")},
|
91
114
|
mixins: [i18n],
|
92
115
|
props: {
|
93
116
|
field: Object,
|
@@ -174,11 +197,6 @@ export default {
|
|
174
197
|
},
|
175
198
|
|
176
199
|
},
|
177
|
-
data() {
|
178
|
-
return {
|
179
|
-
showType: 0
|
180
|
-
}
|
181
|
-
},
|
182
200
|
created() {
|
183
201
|
//
|
184
202
|
this.initShowType();
|
@@ -274,9 +292,15 @@ export default {
|
|
274
292
|
return !this.designState && label ? this.$t2(label, path, param) : label;
|
275
293
|
},
|
276
294
|
initShowType() {
|
277
|
-
if (!!this.designer)return
|
295
|
+
if (!!this.designer) return
|
278
296
|
let that = this.$parent
|
279
|
-
let formRef = that.getFormRef?that.getFormRef():that;
|
297
|
+
let formRef = that.getFormRef ? that.getFormRef() : that;
|
298
|
+
|
299
|
+
//详情页,新增页面不加密
|
300
|
+
let fJson = formRef.formJson;
|
301
|
+
let formConfig = fJson.formConfig;
|
302
|
+
if (formConfig.isLoadEntity && !formRef.dataId) return
|
303
|
+
|
280
304
|
let bdService = formRef.bdService;
|
281
305
|
let companyCode = this.$store.getters.companyCode;
|
282
306
|
let loginAccount = this.$store.getters.loginAccount;
|
@@ -294,6 +318,8 @@ export default {
|
|
294
318
|
flag = 1;
|
295
319
|
} else if (optionModel.showEncryptTextEnabled) {
|
296
320
|
flag = 2;
|
321
|
+
}else if (optionModel.showLinkTextEnabled) {
|
322
|
+
flag = 3;
|
297
323
|
}
|
298
324
|
if (optionModel.userTextRuleEnabled) {
|
299
325
|
let userTextRuleConfig = optionModel.userTextRuleConfig || [];
|
@@ -302,14 +328,14 @@ export default {
|
|
302
328
|
if (type !== null && type !== "") {
|
303
329
|
let companyCodeStr = item.companyCodes;
|
304
330
|
let companyCodes = companyCodeStr ? companyCodeStr.split(",").filter(item => !!item) : [];
|
305
|
-
/*
|
331
|
+
/*
|
306
332
|
|
307
|
-
|
308
|
-
|
333
|
+
let loginAccountStr = item.loginAccounts;
|
334
|
+
let loginAccounts = loginAccountStr ? loginAccountStr.split(",").filter(item => !!item) : [];
|
309
335
|
|
310
|
-
|
311
|
-
|
312
|
-
*/
|
336
|
+
let saleOrgCodeStr = item.saleOrgCodes;
|
337
|
+
let saleOrgCodes = saleOrgCodeStr ? saleOrgCodeStr.split(",").filter(item => !!item) : [];
|
338
|
+
*/
|
313
339
|
|
314
340
|
let roleCodeStr = item.roleCodes;
|
315
341
|
let roleCodes = roleCodeStr ? roleCodeStr.split(",").filter(item => !!item) : [];
|
@@ -319,14 +345,15 @@ export default {
|
|
319
345
|
// let flag3 = !loginAccounts.length || loginAccounts.includes(loginAccount)
|
320
346
|
// let flag4 = this.compareToList(saleOrgCodes, saleOrgCodeList)
|
321
347
|
let flag5 = this.compareToList(roleCodes, roleCodeList)
|
322
|
-
let result = flag1 && flag2 && flag5
|
348
|
+
let result = flag1 && flag2 && flag5;
|
323
349
|
if (result) {
|
324
350
|
flag = type;
|
325
351
|
}
|
326
352
|
}
|
327
353
|
})
|
328
354
|
}
|
329
|
-
this.
|
355
|
+
this.field.options.widgetTextFlag = flag
|
356
|
+
// this.showType = flag;
|
330
357
|
},
|
331
358
|
compareToList(list1, list2) {
|
332
359
|
if (!list1.length) {
|
@@ -339,10 +366,15 @@ export default {
|
|
339
366
|
return list2.some(item2 => item == item2)
|
340
367
|
});
|
341
368
|
},
|
369
|
+
isShowWidget() {
|
370
|
+
let widgetTextFlag = this.field.options.widgetTextFlag;
|
371
|
+
return widgetTextFlag === undefined || widgetTextFlag === null || widgetTextFlag === 0
|
372
|
+
},
|
342
373
|
getShowValue() {
|
374
|
+
let widgetTextFlag = this.field.options.widgetTextFlag;
|
343
375
|
let fieldModel = this.$parent.fieldModel;
|
344
376
|
let showValue = fieldModel
|
345
|
-
if (
|
377
|
+
if (widgetTextFlag == 2) {
|
346
378
|
let optionModel = this.field.options;
|
347
379
|
showValue = "*******";
|
348
380
|
if ((optionModel.textRule1 || optionModel.textRule2 || optionModel.textRule3)) {
|