eoss-ui 0.5.79 → 0.5.80
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/lib/button-group.js +1 -1
- package/lib/button.js +1 -1
- package/lib/checkbox-group.js +1 -1
- package/lib/clients.js +9 -9
- package/lib/data-table-form.js +1 -1
- package/lib/data-table.js +16 -11
- package/lib/date-picker.js +1 -1
- package/lib/dialog.js +1 -1
- package/lib/eoss-ui.common.js +254 -147
- package/lib/flow-group.js +1 -1
- package/lib/flow-list.js +1 -1
- package/lib/flow.js +1 -1
- package/lib/form.js +109 -29
- package/lib/handle-user.js +1 -1
- package/lib/handler.js +1 -1
- package/lib/index.js +1 -1
- package/lib/input-number.js +1 -1
- package/lib/input.js +1 -5
- package/lib/login.js +3 -5
- package/lib/main.js +28 -27
- package/lib/nav.js +1 -1
- package/lib/page.js +1 -1
- package/lib/player.js +1 -1
- package/lib/qr-code.js +1 -1
- package/lib/radio-group.js +1 -1
- package/lib/retrial-auth.js +1 -1
- package/lib/select-ganged.js +1 -1
- package/lib/select.js +1 -1
- package/lib/selector-panel.js +1 -1
- package/lib/selector.js +1 -1
- package/lib/sizer.js +1 -1
- package/lib/steps.js +1 -1
- package/lib/switch.js +1 -1
- package/lib/table-form.js +1 -1
- package/lib/tabs.js +1 -1
- package/lib/theme-chalk/clients.css +1 -1
- package/lib/theme-chalk/data-table.css +1 -1
- package/lib/theme-chalk/form.css +1 -1
- package/lib/theme-chalk/index.css +1 -1
- package/lib/tips.js +1 -1
- package/lib/tree-group.js +1 -1
- package/lib/tree.js +1 -1
- package/lib/upload.js +68 -41
- package/lib/utils/util.js +1 -1
- package/lib/wujie.js +1 -1
- package/lib/wxlogin.js +1 -1
- package/package.json +2 -2
- package/packages/clients/src/main.vue +7 -7
- package/packages/data-table/src/main.vue +16 -5
- package/packages/form/src/main.vue +27 -13
- package/packages/input/src/main.vue +0 -4
- package/packages/login/src/main.vue +0 -1
- package/packages/main/src/main.vue +25 -24
- package/packages/theme-chalk/lib/clients.css +1 -1
- package/packages/theme-chalk/lib/data-table.css +1 -1
- package/packages/theme-chalk/lib/form.css +1 -1
- package/packages/theme-chalk/lib/index.css +1 -1
- package/packages/theme-chalk/src/clients.scss +1 -1
- package/packages/theme-chalk/src/data-table.scss +3 -0
- package/packages/theme-chalk/src/form.scss +2 -2
- package/packages/upload/src/main.vue +126 -72
- package/src/index.js +1 -1
- package/src/utils/util.js +1 -1
|
@@ -234,14 +234,14 @@
|
|
|
234
234
|
color: #c0c4cc;
|
|
235
235
|
line-height: 40px;
|
|
236
236
|
}
|
|
237
|
-
& > div:not(.es-range):not(.es-flex-none) {
|
|
237
|
+
& > div:not(.es-range):not(.es-flex-none):not(.fixed-width) {
|
|
238
238
|
flex: 1;
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
.el-form-item__error {
|
|
242
242
|
bottom: -16px;
|
|
243
243
|
}
|
|
244
|
-
& > .el-form-item {
|
|
244
|
+
& > .el-form-item:not(.fixed-width) {
|
|
245
245
|
flex: 1;
|
|
246
246
|
}
|
|
247
247
|
.es-button-inline {
|
|
@@ -433,9 +433,10 @@ export default {
|
|
|
433
433
|
videoChange: false,
|
|
434
434
|
source: '',
|
|
435
435
|
excludeNames: '',
|
|
436
|
-
previewAdjunct: previewAdjunct,
|
|
437
436
|
boxHeight: this.listHeight,
|
|
438
|
-
|
|
437
|
+
previewAdjunct: previewAdjunct,
|
|
438
|
+
kkfileview: null,
|
|
439
|
+
dochubConfig: {}
|
|
439
440
|
};
|
|
440
441
|
},
|
|
441
442
|
computed: {
|
|
@@ -485,8 +486,8 @@ export default {
|
|
|
485
486
|
let url = this.action
|
|
486
487
|
? this.action
|
|
487
488
|
: this.portrait
|
|
488
|
-
? uploadOnlyOne
|
|
489
|
-
: uploads;
|
|
489
|
+
? this.dochubConfig.reuploadDocument || uploadOnlyOne
|
|
490
|
+
: this.dochubConfig.uploadDocument || uploads;
|
|
490
491
|
return url.indexOf(this.host) > -1 ? url : this.host + url;
|
|
491
492
|
},
|
|
492
493
|
excludes() {
|
|
@@ -713,6 +714,7 @@ export default {
|
|
|
713
714
|
this.fileAccept = config.accept;
|
|
714
715
|
this.fileSize = config.size;
|
|
715
716
|
this.fileTotalSize = config.totalSize;
|
|
717
|
+
this.dochubConfig = config.dochubConfig;
|
|
716
718
|
} else {
|
|
717
719
|
util
|
|
718
720
|
.ajax({
|
|
@@ -734,6 +736,12 @@ export default {
|
|
|
734
736
|
})
|
|
735
737
|
.join(',');
|
|
736
738
|
}
|
|
739
|
+
if (
|
|
740
|
+
res.results.dochubConfig &&
|
|
741
|
+
Object.keys(res.results.dochubConfig).length
|
|
742
|
+
) {
|
|
743
|
+
this.dochubConfig = res.results.dochubConfig;
|
|
744
|
+
}
|
|
737
745
|
if (res.results.kkViewRootPath) {
|
|
738
746
|
this.kkfileview = res.results.kkViewRootPath;
|
|
739
747
|
}
|
|
@@ -744,7 +752,8 @@ export default {
|
|
|
744
752
|
store.set(this.code, {
|
|
745
753
|
accept: this.fileAccept,
|
|
746
754
|
size: this.fileSize,
|
|
747
|
-
totalSize: this.fileTotalSize
|
|
755
|
+
totalSize: this.fileTotalSize,
|
|
756
|
+
dochubConfig: this.dochubConfig
|
|
748
757
|
});
|
|
749
758
|
}
|
|
750
759
|
}
|
|
@@ -851,78 +860,117 @@ export default {
|
|
|
851
860
|
if (res.status === 'success') {
|
|
852
861
|
let suffix = file.suffix;
|
|
853
862
|
suffix = suffix.toLowerCase();
|
|
854
|
-
if (
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
863
|
+
if (this.dochubConfig.previewDocumentUrl) {
|
|
864
|
+
if (
|
|
865
|
+
suffix.includes('jpge') ||
|
|
866
|
+
suffix.includes('jpg') ||
|
|
867
|
+
suffix.includes('gif') ||
|
|
868
|
+
suffix.includes('png')
|
|
869
|
+
) {
|
|
870
|
+
this.imgUrl =
|
|
871
|
+
res.url && util.startWith(url, ['http', '/', true])
|
|
872
|
+
? res.url
|
|
873
|
+
: this.host +
|
|
874
|
+
(url
|
|
875
|
+
? url
|
|
876
|
+
: `${this.previewAdjunct}?adjunctId=${file.adjunctId}`);
|
|
877
|
+
this.title = file.originalName;
|
|
878
|
+
this.showImg = true;
|
|
879
|
+
this.$nextTick(() => {
|
|
880
|
+
this.loadImage();
|
|
881
|
+
});
|
|
882
|
+
} else if (suffix.includes('mp4')) {
|
|
883
|
+
this.source = {
|
|
884
|
+
src:
|
|
885
|
+
this.host +
|
|
886
|
+
(url
|
|
887
|
+
? url
|
|
888
|
+
: `${this.previewAdjunct}?adjunctId=${file.adjunctId}`)
|
|
889
|
+
};
|
|
890
|
+
this.title = file.originalName;
|
|
891
|
+
this.showVideo = true;
|
|
878
892
|
} else {
|
|
879
893
|
util.win.open(
|
|
880
894
|
this.host +
|
|
881
|
-
(url
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
'?adjunctId=' +
|
|
885
|
-
file.adjunctId
|
|
895
|
+
(url
|
|
896
|
+
? url
|
|
897
|
+
: `${this.dochubConfig.previewDocumentUrl}?documentId=${file.adjunctId}&action=附件预览`)
|
|
886
898
|
);
|
|
887
899
|
}
|
|
888
|
-
} else if (
|
|
889
|
-
suffix.includes('jpge') ||
|
|
890
|
-
suffix.includes('jpg') ||
|
|
891
|
-
suffix.includes('gif') ||
|
|
892
|
-
suffix.includes('png')
|
|
893
|
-
) {
|
|
894
|
-
this.imgUrl =
|
|
895
|
-
res.url && util.startWith(url, ['http', '/', true])
|
|
896
|
-
? res.url
|
|
897
|
-
: this.host +
|
|
898
|
-
(url ? url : this.previewAdjunct) +
|
|
899
|
-
'?adjunctId=' +
|
|
900
|
-
file.adjunctId;
|
|
901
|
-
this.title = file.originalName;
|
|
902
|
-
this.showImg = true;
|
|
903
|
-
this.$nextTick(() => {
|
|
904
|
-
this.loadImage();
|
|
905
|
-
});
|
|
906
|
-
} else if (suffix.includes('mp4')) {
|
|
907
|
-
this.source = {
|
|
908
|
-
src:
|
|
909
|
-
this.host +
|
|
910
|
-
(url ? url : this.previewAdjunct) +
|
|
911
|
-
'?adjunctId=' +
|
|
912
|
-
file.adjunctId
|
|
913
|
-
};
|
|
914
|
-
this.title = file.originalName;
|
|
915
|
-
this.showVideo = true;
|
|
916
900
|
} else {
|
|
917
|
-
if (
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
901
|
+
if (
|
|
902
|
+
suffix.includes('doc') ||
|
|
903
|
+
suffix.includes('docx') ||
|
|
904
|
+
suffix.includes('xls') ||
|
|
905
|
+
suffix.includes('xlsx') ||
|
|
906
|
+
suffix.includes('ppt')
|
|
907
|
+
) {
|
|
908
|
+
if (this.kkfileview) {
|
|
909
|
+
this.openKkfileview(file);
|
|
910
|
+
} else {
|
|
911
|
+
util.win.open(
|
|
912
|
+
this.host +
|
|
913
|
+
(url ? url : previewAdjunctOffice) +
|
|
914
|
+
'?cmd=view&bucketName=' +
|
|
915
|
+
file.absolutePath +
|
|
916
|
+
'&fileId=' +
|
|
917
|
+
file.adjunctId +
|
|
918
|
+
'&fileName=' +
|
|
919
|
+
file.newName
|
|
920
|
+
);
|
|
921
|
+
}
|
|
922
|
+
} else if (suffix.includes('pdf')) {
|
|
923
|
+
if (this.kkfileview) {
|
|
924
|
+
this.openKkfileview(file);
|
|
925
|
+
} else {
|
|
926
|
+
util.win.open(
|
|
927
|
+
this.host +
|
|
928
|
+
(url ? url : previewAdjunct2) +
|
|
929
|
+
'/' +
|
|
930
|
+
file.originalName +
|
|
931
|
+
'?adjunctId=' +
|
|
932
|
+
file.adjunctId
|
|
933
|
+
);
|
|
934
|
+
}
|
|
935
|
+
} else if (
|
|
936
|
+
suffix.includes('jpge') ||
|
|
937
|
+
suffix.includes('jpg') ||
|
|
938
|
+
suffix.includes('gif') ||
|
|
939
|
+
suffix.includes('png')
|
|
940
|
+
) {
|
|
941
|
+
this.imgUrl =
|
|
942
|
+
res.url && util.startWith(url, ['http', '/', true])
|
|
943
|
+
? res.url
|
|
944
|
+
: this.host +
|
|
945
|
+
(url ? url : this.previewAdjunct) +
|
|
946
|
+
'?adjunctId=' +
|
|
947
|
+
file.adjunctId;
|
|
948
|
+
this.title = file.originalName;
|
|
949
|
+
this.showImg = true;
|
|
950
|
+
this.$nextTick(() => {
|
|
951
|
+
this.loadImage();
|
|
952
|
+
});
|
|
953
|
+
} else if (suffix.includes('mp4')) {
|
|
954
|
+
this.source = {
|
|
955
|
+
src:
|
|
956
|
+
this.host +
|
|
922
957
|
(url ? url : this.previewAdjunct) +
|
|
923
958
|
'?adjunctId=' +
|
|
924
959
|
file.adjunctId
|
|
925
|
-
|
|
960
|
+
};
|
|
961
|
+
this.title = file.originalName;
|
|
962
|
+
this.showVideo = true;
|
|
963
|
+
} else {
|
|
964
|
+
if (this.kkfileview) {
|
|
965
|
+
this.openKkfileview(file);
|
|
966
|
+
} else {
|
|
967
|
+
util.win.open(
|
|
968
|
+
this.host +
|
|
969
|
+
(url ? url : this.previewAdjunct) +
|
|
970
|
+
'?adjunctId=' +
|
|
971
|
+
file.adjunctId
|
|
972
|
+
);
|
|
973
|
+
}
|
|
926
974
|
}
|
|
927
975
|
}
|
|
928
976
|
} else {
|
|
@@ -1034,17 +1082,19 @@ export default {
|
|
|
1034
1082
|
? this.deleted
|
|
1035
1083
|
: this.remove === 'string'
|
|
1036
1084
|
? this.remove
|
|
1037
|
-
: delAdjunct;
|
|
1085
|
+
: this.dochubConfig.deleteDocumentUrl || delAdjunct;
|
|
1038
1086
|
util
|
|
1039
1087
|
.ajax({
|
|
1040
1088
|
method: this.method,
|
|
1041
1089
|
url: url,
|
|
1042
1090
|
data: {
|
|
1043
1091
|
userName: userName,
|
|
1092
|
+
documentId: file.adjunctId || file.response.adjunctId,
|
|
1044
1093
|
id: file.adjunctId || file.response.adjunctId
|
|
1045
1094
|
},
|
|
1046
1095
|
params: {
|
|
1047
1096
|
userName: userName,
|
|
1097
|
+
documentId: file.adjunctId || file.response.adjunctId,
|
|
1048
1098
|
id: file.adjunctId || file.response.adjunctId
|
|
1049
1099
|
}
|
|
1050
1100
|
})
|
|
@@ -1078,7 +1128,9 @@ export default {
|
|
|
1078
1128
|
},
|
|
1079
1129
|
handleDownloads() {
|
|
1080
1130
|
let url =
|
|
1081
|
-
typeof this.downloads === 'string'
|
|
1131
|
+
typeof this.downloads === 'string'
|
|
1132
|
+
? this.downloads
|
|
1133
|
+
: this.dochubConfig.compressDownloadDocument || uploadDownloads;
|
|
1082
1134
|
util.win.open(
|
|
1083
1135
|
this.host +
|
|
1084
1136
|
url +
|
|
@@ -1094,11 +1146,13 @@ export default {
|
|
|
1094
1146
|
let url =
|
|
1095
1147
|
typeof this.download === 'string'
|
|
1096
1148
|
? this.download
|
|
1097
|
-
: downloadByAdjunctId;
|
|
1149
|
+
: this.dochubConfig.downloadDocumentUrl || downloadByAdjunctId;
|
|
1098
1150
|
util.win.open(
|
|
1099
1151
|
this.host +
|
|
1100
1152
|
url +
|
|
1101
1153
|
'?adjunctId=' +
|
|
1154
|
+
(file.adjunctId || file.response.adjunctId) +
|
|
1155
|
+
'&documentId=' +
|
|
1102
1156
|
(file.adjunctId || file.response.adjunctId)
|
|
1103
1157
|
);
|
|
1104
1158
|
} else {
|
|
@@ -1133,7 +1187,7 @@ export default {
|
|
|
1133
1187
|
util
|
|
1134
1188
|
.ajax({
|
|
1135
1189
|
method: this.method,
|
|
1136
|
-
url: uploadSort,
|
|
1190
|
+
url: this.dochubConfig.sortDocumentsUrl || uploadSort,
|
|
1137
1191
|
data: {
|
|
1138
1192
|
ids: ids
|
|
1139
1193
|
},
|
package/src/index.js
CHANGED
package/src/utils/util.js
CHANGED