cloud-web-corejs 1.0.54-dev.160 → 1.0.54-dev.161
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/VabUpload/view.vue +18 -3
- package/src/components/xform/form-designer/form-widget/field-widget/vabUpload-widget.vue +6 -0
- package/src/components/xform/form-designer/setting-panel/property-editor/field-vabUpload/field-vabUpload-editor.vue +30 -1
- package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +10 -4
- package/src/views/bd/setting/table_model/edit.vue +3 -1
- package/src/views/bd/setting/table_model/mixins/edit.js +50 -9
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
<template>
|
2
2
|
<div>
|
3
|
-
<div id="uploadImage" :class="
|
3
|
+
<div id="uploadImage" :class="classList">
|
4
4
|
<div class="upload-list" model="singer" v-for="(attachment, index) in attachments" :key="index"
|
5
5
|
style="display: inline-block;vertical-align: middle;float: left;">
|
6
6
|
<template v-if="$attrs.hideInfo !== true && $attrs.hideInfo !== 'true'">
|
@@ -22,7 +22,7 @@
|
|
22
22
|
<div class="el-upload-list__item-name">
|
23
23
|
<el-tooltip :enterable="false" class="item" effect="dark" :content="getAttachmentName(attachment)"
|
24
24
|
placement="top">
|
25
|
-
<p>{{ getAttachmentName(attachment) }}</p>
|
25
|
+
<p v-if="$attrs.hideName !== true">{{ getAttachmentName(attachment) }}</p>
|
26
26
|
</el-tooltip>
|
27
27
|
<p v-if="$attrs.showSize === true || $attrs.showSize === 'true'">
|
28
28
|
{{ formatFileSize(attachment.fileSize) }}</p>
|
@@ -115,6 +115,21 @@ import {viewMixins} from './mixins';
|
|
115
115
|
|
116
116
|
export default {
|
117
117
|
mixins: [viewMixins],
|
118
|
-
components: {propertiesDialog: () => import('./propertiesDialog.vue'), ElImageViewer: () => import('./image-viewer')}
|
118
|
+
components: {propertiesDialog: () => import('./propertiesDialog.vue'), ElImageViewer: () => import('./image-viewer')},
|
119
|
+
computed:{
|
120
|
+
classList(){
|
121
|
+
// 'upload-img': this.dataType || (this.$attrs.hideInfo == true || this.$attrs.hideInfo == 'true')
|
122
|
+
let arr = [];
|
123
|
+
if(this.dataType || (this.$attrs.hideInfo == true || this.$attrs.hideInfo == 'true')){
|
124
|
+
arr.push('upload-img')
|
125
|
+
}
|
126
|
+
let widgetSize = this.$attrs.widgetSize || 1
|
127
|
+
if(widgetSize){
|
128
|
+
let str1 = "widgetSize-" + widgetSize
|
129
|
+
arr.push(str1)
|
130
|
+
}
|
131
|
+
return arr
|
132
|
+
},
|
133
|
+
}
|
119
134
|
};
|
120
135
|
</script>
|
@@ -17,6 +17,12 @@
|
|
17
17
|
resultType="Array"
|
18
18
|
:edit="!field.options.disabled"
|
19
19
|
@callback="submitFile"
|
20
|
+
:hideInfo="field.options.hideFileInfo"
|
21
|
+
:hideName="field.options.hideFileName"
|
22
|
+
:showSize="!!field.options.showFileSize"
|
23
|
+
:createBy="!!field.options.showFileCreateBy"
|
24
|
+
:createDate="!!field.options.showFileCreateDate"
|
25
|
+
:widgetSize="field.options.fileShowImageSize"
|
20
26
|
v-else></baseUpload>
|
21
27
|
</form-item-wrapper>
|
22
28
|
</template>
|
@@ -1,5 +1,34 @@
|
|
1
1
|
<template>
|
2
|
-
<div
|
2
|
+
<div>
|
3
|
+
<el-form-item label-width="0">
|
4
|
+
<el-divider class="custom-divider-margin-top">文件信息设置</el-divider>
|
5
|
+
</el-form-item>
|
6
|
+
<el-form-item :label="i18nt('隐藏所有文件信息')">
|
7
|
+
<el-switch v-model="optionModel.hideFileInfo"></el-switch>
|
8
|
+
</el-form-item>
|
9
|
+
<el-form-item :label="i18nt('隐藏文件名')">
|
10
|
+
<el-switch v-model="optionModel.hideFileName"></el-switch>
|
11
|
+
</el-form-item>
|
12
|
+
<el-form-item :label="i18nt('显示文件大小')">
|
13
|
+
<el-switch v-model="optionModel.showFileSize"></el-switch>
|
14
|
+
</el-form-item>
|
15
|
+
<el-form-item :label="i18nt('显示创建人')">
|
16
|
+
<el-switch v-model="optionModel.showFileCreateBy"></el-switch>
|
17
|
+
</el-form-item>
|
18
|
+
<el-form-item :label="i18nt('显示创建时间')">
|
19
|
+
<el-switch v-model="optionModel.showFileCreateDate"></el-switch>
|
20
|
+
</el-form-item>
|
21
|
+
<el-form-item :label="i18nt('缩略图大小')">
|
22
|
+
<el-select v-model="optionModel.fileShowImageSize">
|
23
|
+
<el-option :value="1" label="1"></el-option>
|
24
|
+
<el-option :value="2" label="2"></el-option>
|
25
|
+
<el-option :value="3" label="3"></el-option>
|
26
|
+
<el-option :value="4" label="4"></el-option>
|
27
|
+
<el-option :value="5" label="5"></el-option>
|
28
|
+
</el-select>
|
29
|
+
</el-form-item>
|
30
|
+
|
31
|
+
</div>
|
3
32
|
</template>
|
4
33
|
|
5
34
|
<script>
|
@@ -2500,7 +2500,13 @@ export const advancedFields = [
|
|
2500
2500
|
|
2501
2501
|
showRuleFlag: 1,
|
2502
2502
|
showRuleEnabled: 1,
|
2503
|
-
showRules: []
|
2503
|
+
showRules: [],
|
2504
|
+
|
2505
|
+
hiddenFileInfo: false,
|
2506
|
+
hiddenFileName: false,
|
2507
|
+
showFileSize: false,
|
2508
|
+
showFileCreateBy: false,
|
2509
|
+
showFileCreateDate: false,
|
2504
2510
|
}
|
2505
2511
|
},
|
2506
2512
|
{
|
@@ -2810,8 +2816,8 @@ export const advancedFields = [
|
|
2810
2816
|
onBeforeImport: '',
|
2811
2817
|
enabledImportPreHandle: false,
|
2812
2818
|
|
2813
|
-
importSaveDisabled:false,
|
2814
|
-
onConfirmImport:'',
|
2819
|
+
importSaveDisabled: false,
|
2820
|
+
onConfirmImport: '',
|
2815
2821
|
|
2816
2822
|
showRuleFlag: 1,
|
2817
2823
|
showRuleEnabled: 1,
|
@@ -2987,7 +2993,7 @@ export const advancedFields = [
|
|
2987
2993
|
onCreated: "if(this.dataId)this.loadDataDefaultHandle();",
|
2988
2994
|
onMounted: "",
|
2989
2995
|
onClick: "",
|
2990
|
-
vabUpload: 1,
|
2996
|
+
// vabUpload: 1,
|
2991
2997
|
formScriptEnabled: true,
|
2992
2998
|
formScriptCode: "getList",
|
2993
2999
|
formScriptParam: null,
|
@@ -327,6 +327,7 @@
|
|
327
327
|
@clear="$forceUpdate()"
|
328
328
|
v-el-readonly
|
329
329
|
v-if="row.zdType == 'Reference'"
|
330
|
+
:disabled="!row.zdEn"
|
330
331
|
>
|
331
332
|
<i
|
332
333
|
slot="suffix"
|
@@ -352,7 +353,8 @@
|
|
352
353
|
:rules="[{ required: true, trigger: ['blur', 'change'] }]"
|
353
354
|
:style="!!row.relationZd ? 'padding-left:20px' : ''"
|
354
355
|
>
|
355
|
-
<el-input v-model="row.zdEn"
|
356
|
+
<el-input v-model="row.zdEn" @keydown.native="inputZdEn(row)"
|
357
|
+
@input="(val)=>{changeZdEn(val,row)}" />
|
356
358
|
</el-form-item>
|
357
359
|
</template>
|
358
360
|
</template>
|
@@ -81,6 +81,9 @@ modules = {
|
|
81
81
|
toTaBmZdField: null,
|
82
82
|
showEntityDialog3: false,
|
83
83
|
showEntityFieldDialog3: false,
|
84
|
+
|
85
|
+
inputValue: null, // 当前值
|
86
|
+
preValue: null // 上一次的值(变更前的值)
|
84
87
|
};
|
85
88
|
},
|
86
89
|
created() {
|
@@ -317,6 +320,11 @@ modules = {
|
|
317
320
|
default: "referenceZd",
|
318
321
|
},
|
319
322
|
},
|
323
|
+
{
|
324
|
+
title: this.$t1("来源关联字段"),
|
325
|
+
field: "relationZd",
|
326
|
+
width: 250,
|
327
|
+
},
|
320
328
|
{
|
321
329
|
title: this.$t1("关联表对应服务名"),
|
322
330
|
field: "refServiceName",
|
@@ -516,10 +524,11 @@ modules = {
|
|
516
524
|
},
|
517
525
|
deleteItem(row, rowIndex) {
|
518
526
|
let referenceZd = row.referenceZd;
|
527
|
+
let referenceZd2 = row.referenceZd +"."+row.zdEn;
|
519
528
|
this.szTaMb.szTaZdMbDTOs.splice(rowIndex, 1);
|
520
529
|
if (referenceZd) {
|
521
530
|
this.szTaMb.szTaZdMbDTOs = this.szTaMb.szTaZdMbDTOs.filter((item) => {
|
522
|
-
return referenceZd !== item.relationZd;
|
531
|
+
return referenceZd !== item.relationZd && referenceZd2 !== item.relationZd;
|
523
532
|
});
|
524
533
|
}
|
525
534
|
},
|
@@ -591,6 +600,7 @@ modules = {
|
|
591
600
|
},
|
592
601
|
openReferenceZdDialog(row, rowIndex, $table) {
|
593
602
|
let referenceZd = row.referenceZd;
|
603
|
+
let referenceZd2 = row.referenceZd + "." + row.zdEn;
|
594
604
|
let referenceEntity = null;
|
595
605
|
let referenceKey = null;
|
596
606
|
let referenceShowFields = [];
|
@@ -601,9 +611,16 @@ modules = {
|
|
601
611
|
referenceKey = referenceZd.substr(index + 1);
|
602
612
|
referenceShowFields = this.szTaMb.szTaZdMbDTOs
|
603
613
|
.filter((item) => {
|
604
|
-
return referenceZd == item.relationZd;
|
614
|
+
// return referenceZd == item.relationZd;
|
615
|
+
let flag = false;
|
616
|
+
if (item.relationZd === referenceZd || item.relationZd === referenceZd2) {
|
617
|
+
flag = true
|
618
|
+
}
|
619
|
+
return flag;
|
620
|
+
// return referenceZd == item.relationZd ;
|
605
621
|
})
|
606
622
|
.map((item) => {
|
623
|
+
// return item.referenceZd.split(".")[1]
|
607
624
|
return item.referenceZd.substr(index + 1);
|
608
625
|
});
|
609
626
|
}
|
@@ -625,6 +642,7 @@ modules = {
|
|
625
642
|
confirmReferenceZdDialog() {
|
626
643
|
let row = this.szTaMb.szTaZdMbDTOs[this.currentIndex];
|
627
644
|
let oldReferenceZd = row.referenceZd;
|
645
|
+
let oldReferenceZd2 = row.referenceZd + "." + row.zdEn;
|
628
646
|
|
629
647
|
let referenceEntity = this.referenceEntity;
|
630
648
|
let refServiceName = this.refServiceName;
|
@@ -640,7 +658,7 @@ modules = {
|
|
640
658
|
let delIndex = [];
|
641
659
|
if (referenceEntity != oldReferenceEntity) {
|
642
660
|
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
643
|
-
if (item.relationZd && oldReferenceZd == item.relationZd) {
|
661
|
+
if (item.relationZd && (oldReferenceZd == item.relationZd || oldReferenceZd2 == item.relationZd)) {
|
644
662
|
delIndex.push(index);
|
645
663
|
}
|
646
664
|
});
|
@@ -652,7 +670,7 @@ modules = {
|
|
652
670
|
})
|
653
671
|
}*/ else {
|
654
672
|
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
655
|
-
if (oldReferenceZd == item.relationZd) {
|
673
|
+
if (oldReferenceZd == item.relationZd || oldReferenceZd2 == item.relationZd) {
|
656
674
|
if (!keys.includes(item.referenceZd)) {
|
657
675
|
delIndex.push(index);
|
658
676
|
} else {
|
@@ -675,7 +693,7 @@ modules = {
|
|
675
693
|
return !keys.includes(item)
|
676
694
|
})*/
|
677
695
|
let oldKeys = this.szTaMb.szTaZdMbDTOs
|
678
|
-
.filter((item) => referenceZd == item.relationZd)
|
696
|
+
.filter((item) => (referenceZd == item.relationZd || (referenceZd + "." + item.zdEn) == item.relationZd))
|
679
697
|
.map((item) => item.referenceZd);
|
680
698
|
let addReferenceShowFields = referenceShowFields.filter((item, index) => {
|
681
699
|
return !oldKeys.includes(referenceEntity + "." + item);
|
@@ -683,7 +701,7 @@ modules = {
|
|
683
701
|
|
684
702
|
let addIndex = -1;
|
685
703
|
let lastIndex = this.szTaMb.szTaZdMbDTOs.findLastIndex((item) => {
|
686
|
-
return referenceZd == item.relationZd;
|
704
|
+
return referenceZd == item.relationZd || (referenceZd + "." + item.zdEn) == item.relationZd;
|
687
705
|
});
|
688
706
|
addIndex = lastIndex >= 0 ? lastIndex + 1 : this.currentIndex + 1;
|
689
707
|
|
@@ -701,7 +719,7 @@ modules = {
|
|
701
719
|
zdCh: item.zdCh,
|
702
720
|
zdType: "Text",
|
703
721
|
referenceZd: referenceEntity + "." + item.taZdMc,
|
704
|
-
relationZd: referenceZd,
|
722
|
+
relationZd: referenceZd + "." + row.zdEn,
|
705
723
|
refServiceName,
|
706
724
|
zdTypeValues: null,
|
707
725
|
required: false,
|
@@ -726,9 +744,9 @@ modules = {
|
|
726
744
|
let orders = row.orders || 0;
|
727
745
|
if (referenceZd) {
|
728
746
|
this.szTaMb.szTaZdMbDTOs
|
729
|
-
.filter((item) => referenceZd === item.relationZd)
|
747
|
+
.filter((item) => referenceZd === item.relationZd || (referenceZd + "." + item.zdEn === item.relationZd))
|
730
748
|
.forEach((item, index) => {
|
731
|
-
if (referenceZd === item.relationZd) {
|
749
|
+
if (referenceZd === item.relationZd || (referenceZd + "." + item.zdEn === item.relationZd)) {
|
732
750
|
item.orders = orders + index + 1;
|
733
751
|
}
|
734
752
|
});
|
@@ -1052,6 +1070,29 @@ modules = {
|
|
1052
1070
|
this.toTaBmZdField = row.taZdMc;
|
1053
1071
|
}
|
1054
1072
|
},
|
1073
|
+
inputZdEn(row) {
|
1074
|
+
|
1075
|
+
this.preValue = row.zdEn; // 更新旧值
|
1076
|
+
this.fkey = true
|
1077
|
+
},
|
1078
|
+
changeZdEn(val, row) {
|
1079
|
+
if(!this.fkey)return
|
1080
|
+
let oldVal = this.preValue;
|
1081
|
+
let newVal = val
|
1082
|
+
if (row.zdType === 'Reference') {
|
1083
|
+
let referenceZd = row.referenceZd;
|
1084
|
+
if (referenceZd) {
|
1085
|
+
let referenceZd2 = row.referenceZd + "." + oldVal
|
1086
|
+
let relationZd = row.referenceZd + "." + newVal
|
1087
|
+
this.szTaMb.szTaZdMbDTOs.forEach((item, index) => {
|
1088
|
+
if (referenceZd == item.relationZd || referenceZd2 == item.relationZd) {
|
1089
|
+
item.relationZd = relationZd;
|
1090
|
+
}
|
1091
|
+
});
|
1092
|
+
}
|
1093
|
+
}
|
1094
|
+
this.fkey = false
|
1095
|
+
}
|
1055
1096
|
},
|
1056
1097
|
};
|
1057
1098
|
export default modules;
|