centaline-data-driven 1.3.5 → 1.3.6
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/centaline/dialogList/src/dialogList.vue +3 -0
- package/src/centaline/dynamicViewerFile/src/dynamicViewerFile.vue +25 -18
- package/src/centaline/dynamicViewerFile/src/dynamicViewerImage.vue +6 -2
- package/src/centaline/dynamicViewerFile/src/dynamicViewerPDF.vue +9 -11
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div
|
|
3
|
+
style="height: 100%"
|
|
4
|
+
id="viewer-file"
|
|
5
|
+
ref="viewerfile"
|
|
6
|
+
@contextmenu="handleMouse"
|
|
7
|
+
>
|
|
3
8
|
<el-container style="height: 100%; border: 1px solid #eee">
|
|
4
9
|
<el-aside style="background-color: rgb(238, 241, 246)"
|
|
5
10
|
><div style="height: 100%" class="viewerMenu">
|
|
@@ -40,18 +45,18 @@
|
|
|
40
45
|
</el-aside>
|
|
41
46
|
<el-main ref="displayArea">
|
|
42
47
|
<div
|
|
43
|
-
style="position: relative; width: 100
|
|
48
|
+
style="position: relative; width: 100%"
|
|
49
|
+
:style="{ height: displayAreaHeight - 78 + 'px' }"
|
|
44
50
|
v-if="resultObject"
|
|
45
51
|
>
|
|
46
52
|
<!--VR-->
|
|
47
53
|
<template v-if="itemFile.mediaTypeID == '1'">
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</div>
|
|
54
|
+
<iframe
|
|
55
|
+
:src="resultObject"
|
|
56
|
+
:height="displayAreaHeight - 80 + 'px'"
|
|
57
|
+
:width="displayAreaWidth + 'px'"
|
|
58
|
+
>
|
|
59
|
+
</iframe>
|
|
55
60
|
</template>
|
|
56
61
|
<!--Photo-->
|
|
57
62
|
<template v-else-if="itemFile.mediaTypeID == '2'">
|
|
@@ -100,13 +105,13 @@
|
|
|
100
105
|
<template v-else-if="itemFile.mediaTypeID == '6'">
|
|
101
106
|
<template
|
|
102
107
|
v-if="
|
|
103
|
-
'doc,docx,xlsx'.search(
|
|
108
|
+
'doc,docx,xlsx'.search(itemFile.fileExtension.toLowerCase()) >
|
|
104
109
|
-1
|
|
105
110
|
"
|
|
106
111
|
>
|
|
107
112
|
<div
|
|
108
113
|
class="viewerContent"
|
|
109
|
-
style="
|
|
114
|
+
style="max-height: 200px; text-align: center"
|
|
110
115
|
>
|
|
111
116
|
<a :href="resultObject">
|
|
112
117
|
<img :src="itemFile.thumbnailUrl" /><br />{{
|
|
@@ -120,9 +125,12 @@
|
|
|
120
125
|
'pdf'.search(itemFile.fileExtension.toLowerCase()) > -1
|
|
121
126
|
"
|
|
122
127
|
>
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
128
|
+
<ct-viewerPDF
|
|
129
|
+
:pdfUrl="resultObject"
|
|
130
|
+
:displayAreaHeight="displayAreaHeight"
|
|
131
|
+
:displayAreaWidth="displayAreaWidth"
|
|
132
|
+
>
|
|
133
|
+
</ct-viewerPDF>
|
|
126
134
|
</template>
|
|
127
135
|
</template>
|
|
128
136
|
<template v-else> 不支持此类型:{{ itemFile.mediaTypeID }} </template>
|
|
@@ -248,12 +256,12 @@ export default {
|
|
|
248
256
|
self.displayAreaWidth = this.DomWidth();
|
|
249
257
|
self.displayArealeft = self.DomLeft();
|
|
250
258
|
self.displayAreabtm = self.DomTop(self.$refs.displayArea.$el);
|
|
251
|
-
self.displayAreaHeight =self.$refs.displayArea.$el.offsetHeight;
|
|
259
|
+
self.displayAreaHeight = self.$refs.displayArea.$el.offsetHeight;
|
|
252
260
|
window.onresize = () => {
|
|
253
261
|
self.displayAreaWidth = self.DomWidth();
|
|
254
262
|
self.displayArealeft = self.DomLeft();
|
|
255
263
|
self.displayAreabtm = self.DomTop(self.$refs.displayArea.$el);
|
|
256
|
-
|
|
264
|
+
self.displayAreaHeight = self.$refs.displayArea.$el.offsetHeight;
|
|
257
265
|
};
|
|
258
266
|
|
|
259
267
|
if (
|
|
@@ -267,7 +275,6 @@ export default {
|
|
|
267
275
|
}
|
|
268
276
|
},
|
|
269
277
|
methods: {
|
|
270
|
-
|
|
271
278
|
handleMouse(e) {
|
|
272
279
|
e.preventDefault();
|
|
273
280
|
},
|
|
@@ -404,7 +411,7 @@ export default {
|
|
|
404
411
|
this.$refs.viewerImage.zoom(n);
|
|
405
412
|
},
|
|
406
413
|
},
|
|
407
|
-
};
|
|
414
|
+
};
|
|
408
415
|
</script>
|
|
409
416
|
|
|
410
417
|
<style>
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
<template>
|
|
3
|
-
<div class="Imagebox" @mousewheel="bagimg($event)">
|
|
3
|
+
<div class="Imagebox" @mousewheel="bagimg($event)" v-loading="loading">
|
|
4
4
|
<img
|
|
5
|
-
v-loading="loading"
|
|
6
5
|
id="ViewerImage"
|
|
7
6
|
class="scaleimg"
|
|
8
7
|
border="0"
|
|
@@ -44,6 +43,11 @@ export default {
|
|
|
44
43
|
document.getElementById("ViewerImage"),
|
|
45
44
|
document.getElementById("ViewerImage")
|
|
46
45
|
);
|
|
46
|
+
},
|
|
47
|
+
watch: {
|
|
48
|
+
imgUrl(newValue, oldValue) {
|
|
49
|
+
this.loading = true;
|
|
50
|
+
},
|
|
47
51
|
},
|
|
48
52
|
methods: {
|
|
49
53
|
complete() {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
|
|
2
2
|
<template>
|
|
3
|
-
<div>
|
|
4
|
-
<iframe
|
|
3
|
+
<div v-loading="loading">
|
|
4
|
+
<iframe
|
|
5
5
|
ref="previewPdf"
|
|
6
6
|
id="previewPdf"
|
|
7
7
|
:src="'/static/pdf/web/viewer.html?' + fileUrl"
|
|
8
8
|
:height="displayAreaHeight - 78 + 'px'"
|
|
9
9
|
:width="displayAreaWidth + 'px'"
|
|
10
|
-
@load="
|
|
10
|
+
@load="complete()"
|
|
11
11
|
>
|
|
12
12
|
</iframe>
|
|
13
13
|
</div>
|
|
@@ -21,6 +21,7 @@ export default {
|
|
|
21
21
|
},
|
|
22
22
|
data() {
|
|
23
23
|
return {
|
|
24
|
+
loading: true,
|
|
24
25
|
numPages: 1,
|
|
25
26
|
fileUrl: "",
|
|
26
27
|
};
|
|
@@ -28,19 +29,15 @@ export default {
|
|
|
28
29
|
mounted() {
|
|
29
30
|
this.init(this.pdfUrl);
|
|
30
31
|
},
|
|
31
|
-
created() {
|
|
32
|
-
this.$nextTick(() => {
|
|
33
|
-
// 可以使用回调函数的写法
|
|
34
|
-
// 这个函数中DOM必定渲染完成
|
|
35
|
-
//this.loadFrame();
|
|
36
|
-
});
|
|
32
|
+
created() {
|
|
37
33
|
},
|
|
38
|
-
methods: {
|
|
34
|
+
methods: {
|
|
39
35
|
init(pdfUrl) {
|
|
40
36
|
var self = this;
|
|
41
37
|
self.fileUrl = 'r='+Math.random()+'&file='+encodeURIComponent(pdfUrl);
|
|
42
38
|
},
|
|
43
|
-
|
|
39
|
+
complete() {
|
|
40
|
+
this.loading = false;
|
|
44
41
|
var doc = document.getElementById("previewPdf").contentWindow.document;
|
|
45
42
|
doc.getElementById("download").style.display = "none";
|
|
46
43
|
doc.getElementById("openFile").style.display = "none";
|
|
@@ -50,6 +47,7 @@ export default {
|
|
|
50
47
|
},
|
|
51
48
|
watch: {
|
|
52
49
|
pdfUrl(newValue, oldValue) {
|
|
50
|
+
this.loading = true;
|
|
53
51
|
this.init(newValue);
|
|
54
52
|
},
|
|
55
53
|
},
|