centaline-data-driven 1.3.49 → 1.3.52
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/Form.vue +2 -6
- package/src/SearchList.vue +5 -5
- package/src/centaline/css/max.css +13 -0
- package/src/centaline/dialogList/src/dialog.vue +14 -2
- package/src/centaline/dynamicCheckbox/src/dynamicCheckbox.vue +1 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +24 -2
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +1 -0
- package/src/centaline/dynamicForm/src/dynamicForm.vue +27 -14
- package/src/centaline/dynamicPopupSearchList/src/dynamicPopupSearchList.vue +2 -2
- package/src/centaline/dynamicPopupSearchList/src/dynamicPopupSearchListTable.vue +40 -17
- package/src/centaline/dynamicSearchList/src/dynamicSearchList.vue +10 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +3 -3
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +15 -12
- package/src/centaline/dynamicSearchList/src/dynamicTableToolbar.vue +1 -1
- package/src/centaline/dynamicViewerFile/src/dynamicViewerFile.vue +338 -381
- package/src/centaline/loader/src/ctl/Base.js +9 -0
- package/src/centaline/loader/src/ctl/Checkbox.js +3 -0
- package/src/centaline/loader/src/ctl/SearchTable.js +5 -4
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +17 -7
- package/src/main.js +9 -6
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -1,87 +1,68 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
@contextmenu="handleMouse"
|
|
7
|
-
>
|
|
2
|
+
<div style="height: 100%"
|
|
3
|
+
id="viewer-file"
|
|
4
|
+
ref="viewerfile"
|
|
5
|
+
@contextmenu="handleMouse">
|
|
8
6
|
<el-container style="height: 100%; border: 1px solid #eee">
|
|
9
|
-
<el-aside style="background-color: rgb(238, 241, 246)"
|
|
10
|
-
|
|
11
|
-
<el-menu
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
:key="groupIndex"
|
|
18
|
-
:index="groupIndex.toString()"
|
|
19
|
-
v-for="(group, groupIndex) in MediaAlbum"
|
|
20
|
-
>
|
|
7
|
+
<el-aside style="background-color: rgb(238, 241, 246)">
|
|
8
|
+
<div style="height: 100%" class="viewerMenu">
|
|
9
|
+
<el-menu :default-openeds="openeds"
|
|
10
|
+
:default-active="activeitem"
|
|
11
|
+
style="height: 100%">
|
|
12
|
+
<el-submenu :key="groupIndex"
|
|
13
|
+
:index="groupIndex.toString()"
|
|
14
|
+
v-for="(group, groupIndex) in MediaAlbum">
|
|
21
15
|
<template slot="title">
|
|
22
16
|
<i></i>
|
|
23
|
-
<div
|
|
24
|
-
style="
|
|
17
|
+
<div style="
|
|
25
18
|
padding: 0 10px !important;
|
|
26
19
|
height: 30px !important;
|
|
27
20
|
line-height: 30px !important;
|
|
28
|
-
"
|
|
29
|
-
>
|
|
21
|
+
">
|
|
30
22
|
{{ group.albumName }}
|
|
31
23
|
</div>
|
|
32
24
|
</template>
|
|
33
25
|
<el-menu-item-group>
|
|
34
|
-
<el-menu-item
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
v-for="(item, index) in group.medias"
|
|
39
|
-
>{{ item.mediaLabelName || item.fileName }}</el-menu-item
|
|
40
|
-
>
|
|
26
|
+
<el-menu-item @click="handleClick(item, groupIndex, index)"
|
|
27
|
+
:key="index"
|
|
28
|
+
:index="groupIndex.toString() + '-' + index.toString()"
|
|
29
|
+
v-for="(item, index) in group.medias">{{ item.mediaLabelName || item.fileName }}</el-menu-item>
|
|
41
30
|
</el-menu-item-group>
|
|
42
31
|
</el-submenu>
|
|
43
32
|
</el-menu>
|
|
44
33
|
</div>
|
|
45
34
|
</el-aside>
|
|
46
35
|
<el-main ref="displayArea">
|
|
47
|
-
<div
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
v-if="resultObject"
|
|
51
|
-
>
|
|
36
|
+
<div style="position: relative; width: 100%"
|
|
37
|
+
:style="{ height: displayAreaHeight - 78 + 'px' }"
|
|
38
|
+
v-if="resultObject">
|
|
52
39
|
<!--VR-->
|
|
53
40
|
<template v-if="itemFile.mediaTypeID == '1'">
|
|
54
|
-
<iframe
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
:width="displayAreaWidth + 'px'"
|
|
58
|
-
>
|
|
41
|
+
<iframe :src="resultObject"
|
|
42
|
+
:height="displayAreaHeight - 80 + 'px'"
|
|
43
|
+
:width="displayAreaWidth + 'px'">
|
|
59
44
|
</iframe>
|
|
60
45
|
</template>
|
|
61
46
|
<!--Photo-->
|
|
62
47
|
<template v-else-if="itemFile.mediaTypeID == '2'">
|
|
63
|
-
<ct-viewerImage
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
:rotate="rotate"
|
|
67
|
-
></ct-viewerImage>
|
|
48
|
+
<ct-viewerImage ref="viewerImage"
|
|
49
|
+
:imgUrl="resultObject"
|
|
50
|
+
:rotate="rotate"></ct-viewerImage>
|
|
68
51
|
</template>
|
|
69
52
|
<!--ThreeDimensional-->
|
|
70
|
-
<template v-else-if="itemFile.mediaTypeID == '3'"
|
|
71
|
-
|
|
53
|
+
<template v-else-if="itemFile.mediaTypeID == '3'">
|
|
54
|
+
暂不支持ThreeDimensional
|
|
72
55
|
</template>
|
|
73
56
|
<!--Video-->
|
|
74
57
|
<template v-else-if="itemFile.mediaTypeID == '4'">
|
|
75
58
|
<div class="viewerContent">
|
|
76
|
-
<video
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
:width="800"
|
|
84
|
-
>
|
|
59
|
+
<video preload="none"
|
|
60
|
+
:src="resultObject"
|
|
61
|
+
controls="controls"
|
|
62
|
+
class="viewerContent"
|
|
63
|
+
controlslist="nodownload"
|
|
64
|
+
:height="500"
|
|
65
|
+
:width="800">
|
|
85
66
|
您的浏览器不支持 video 标签。
|
|
86
67
|
</video>
|
|
87
68
|
</div>
|
|
@@ -89,113 +70,82 @@
|
|
|
89
70
|
<!--Audio-->
|
|
90
71
|
<template v-else-if="itemFile.mediaTypeID == '5'">
|
|
91
72
|
<div class="viewerContent">
|
|
92
|
-
<audio
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
style="width: 50%"
|
|
99
|
-
>
|
|
73
|
+
<audio preload="none"
|
|
74
|
+
:src="resultObject"
|
|
75
|
+
controls="controls"
|
|
76
|
+
class="viewerContent"
|
|
77
|
+
controlslist="nodownload"
|
|
78
|
+
style="width: 50%">
|
|
100
79
|
您的浏览器不支持 audio 标签。
|
|
101
80
|
</audio>
|
|
102
81
|
</div>
|
|
103
82
|
</template>
|
|
104
83
|
<!--File-->
|
|
105
84
|
<template v-else-if="itemFile.mediaTypeID == '6'">
|
|
106
|
-
<template
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
-1
|
|
110
|
-
"
|
|
111
|
-
>
|
|
112
|
-
<div
|
|
113
|
-
class="viewerContent"
|
|
114
|
-
style="max-height: 200px; text-align: center"
|
|
115
|
-
>
|
|
85
|
+
<template v-if="'doc,docx,xlsx' .search(itemFile.fileExtension.toLowerCase())>-1">
|
|
86
|
+
<div class="viewerContent"
|
|
87
|
+
style="max-height: 200px; text-align: center">
|
|
116
88
|
<a :href="resultObject">
|
|
117
89
|
<img :src="itemFile.thumbnailUrl" /><br />{{
|
|
118
90
|
itemFile.mediaLabelName || itemFile.fileName
|
|
119
|
-
}}
|
|
120
|
-
>
|
|
91
|
+
}}
|
|
92
|
+
</a>
|
|
121
93
|
</div>
|
|
122
94
|
</template>
|
|
123
|
-
<template
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
>
|
|
128
|
-
<ct-viewerPDF
|
|
129
|
-
:pdfUrl="resultObject"
|
|
130
|
-
:displayAreaHeight="displayAreaHeight"
|
|
131
|
-
:displayAreaWidth="displayAreaWidth"
|
|
132
|
-
>
|
|
95
|
+
<template v-else-if="'pdf' .search(itemFile.fileExtension.toLowerCase())>-1 ">
|
|
96
|
+
<ct-viewerPDF :pdfUrl="resultObject"
|
|
97
|
+
:displayAreaHeight="displayAreaHeight"
|
|
98
|
+
:displayAreaWidth="displayAreaWidth">
|
|
133
99
|
</ct-viewerPDF>
|
|
134
100
|
</template>
|
|
135
101
|
</template>
|
|
136
|
-
<template v-else>
|
|
102
|
+
<template v-else>
|
|
103
|
+
不支持此类型:{{ itemFile.mediaTypeID }}
|
|
104
|
+
</template>
|
|
137
105
|
|
|
138
106
|
<template v-if="resultObject != ''">
|
|
139
|
-
<div
|
|
140
|
-
|
|
141
|
-
:style="{
|
|
107
|
+
<div class="magnify-footer"
|
|
108
|
+
:style="{
|
|
142
109
|
width: displayAreaWidth + 'px',
|
|
143
110
|
bottom: displayAreabtm + 10 + 'px',
|
|
144
|
-
}"
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
@click="jump(-1)"
|
|
155
|
-
></a
|
|
156
|
-
><a
|
|
157
|
-
href="javascript:void(0)"
|
|
158
|
-
class="magnify-btn el-icon-right"
|
|
159
|
-
title="下一个"
|
|
160
|
-
@click="jump(1)"
|
|
161
|
-
></a>
|
|
111
|
+
}">
|
|
112
|
+
<div class="magnify-toolbar"
|
|
113
|
+
:style="{ 'margin-left': displayArealeft + 'px' }">
|
|
114
|
+
<a href="javascript:void(0)"
|
|
115
|
+
class="magnify-btn el-icon-back"
|
|
116
|
+
title="上一个"
|
|
117
|
+
@click="jump(-1)"></a><a href="javascript:void(0)"
|
|
118
|
+
class="magnify-btn el-icon-right"
|
|
119
|
+
title="下一个"
|
|
120
|
+
@click="jump(1)"></a>
|
|
162
121
|
<template v-if="itemFile.mediaTypeID == '2'">
|
|
163
|
-
<a
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
title="缩小"
|
|
191
|
-
@click="zoom(-0.2)"
|
|
192
|
-
>
|
|
193
|
-
</a> </template
|
|
194
|
-
><a
|
|
195
|
-
href="javascript:void(0)"
|
|
196
|
-
class="magnify-btn el-icon-download"
|
|
197
|
-
title="下载"
|
|
198
|
-
></a>
|
|
122
|
+
<a href="javascript:void(0)"
|
|
123
|
+
class="magnify-btn el-icon-refresh-left"
|
|
124
|
+
title="左旋转"
|
|
125
|
+
@click="rotateImg('L')"></a>
|
|
126
|
+
<a href="javascript:void(0)"
|
|
127
|
+
class="magnify-btn el-icon-refresh-right"
|
|
128
|
+
title="右旋转"
|
|
129
|
+
@click="rotateImg('R')"></a>
|
|
130
|
+
<a href="javascript:void(0)"
|
|
131
|
+
class="magnify-btn el-icon-zoom-in"
|
|
132
|
+
title="放大"
|
|
133
|
+
@click="zoom(0.2)"></a>
|
|
134
|
+
<a href="javascript:void(0)"
|
|
135
|
+
class="magnify-btn el-icon-refresh"
|
|
136
|
+
title="实际尺寸"
|
|
137
|
+
@click="actualSize()"></a>
|
|
138
|
+
<a href="javascript:void(0)"
|
|
139
|
+
class="magnify-btn el-icon-zoom-out"
|
|
140
|
+
title="缩小"
|
|
141
|
+
@click="zoom(-0.2)">
|
|
142
|
+
</a>
|
|
143
|
+
</template>
|
|
144
|
+
<a v-if="itemFile.rightDownload"
|
|
145
|
+
:href="resultObject.replace(/\/preview$/,'')" target="_blank"
|
|
146
|
+
class="magnify-btn el-icon-download"
|
|
147
|
+
title="下载"
|
|
148
|
+
:download="(itemFile.mediaLabelName || itemFile.fileName)"></a>
|
|
199
149
|
</div>
|
|
200
150
|
</div>
|
|
201
151
|
</template>
|
|
@@ -204,276 +154,283 @@
|
|
|
204
154
|
</el-container>
|
|
205
155
|
</div>
|
|
206
156
|
</template>
|
|
207
|
-
|
|
157
|
+
|
|
208
158
|
|
|
209
159
|
<script>
|
|
210
|
-
import dynamicElement from "../../mixins/dynamicElement";
|
|
211
|
-
import dynamicViewerImage from "./dynamicViewerImage.vue";
|
|
212
|
-
import dynamicViewerPDF from "./dynamicViewerPDF.vue";
|
|
213
|
-
//import dynamicViewerVR from "./dynamicViewerVR.vue";
|
|
214
|
-
export default {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
160
|
+
import dynamicElement from "../../mixins/dynamicElement";
|
|
161
|
+
import dynamicViewerImage from "./dynamicViewerImage.vue";
|
|
162
|
+
import dynamicViewerPDF from "./dynamicViewerPDF.vue";
|
|
163
|
+
//import dynamicViewerVR from "./dynamicViewerVR.vue";
|
|
164
|
+
export default {
|
|
165
|
+
name: "ct-viewerfile",
|
|
166
|
+
mixins: [dynamicElement],
|
|
167
|
+
components: {
|
|
168
|
+
"ct-viewerImage": dynamicViewerImage,
|
|
169
|
+
"ct-viewerPDF": dynamicViewerPDF,
|
|
170
|
+
// "ct-viewerVR": dynamicViewerVR,
|
|
171
|
+
},
|
|
172
|
+
props: {
|
|
173
|
+
MediaAlbum: Array,
|
|
174
|
+
groupIndex: Number,
|
|
175
|
+
index: Number,
|
|
176
|
+
},
|
|
177
|
+
data() {
|
|
178
|
+
return {
|
|
179
|
+
rotate: 0,
|
|
180
|
+
activeIndex: -1,
|
|
181
|
+
activeGroup: -1,
|
|
182
|
+
resultObject: "",
|
|
183
|
+
itemFile: {},
|
|
184
|
+
groupCountLen: 0,
|
|
185
|
+
activeitem: "",
|
|
186
|
+
openeds: [],
|
|
187
|
+
displayAreaWidth: 0,
|
|
188
|
+
displayAreabtm: 0,
|
|
189
|
+
displayArealeft: 0,
|
|
190
|
+
displayAreaHeight: 0,
|
|
191
|
+
};
|
|
192
|
+
},
|
|
193
|
+
created() {
|
|
194
|
+
var self = this;
|
|
195
|
+
this.groupCountLen = 0;
|
|
196
|
+
this.MediaAlbum.forEach((item, n) => {
|
|
197
|
+
self.openeds.push(n.toString());
|
|
198
|
+
item.medias.forEach((v) => {
|
|
199
|
+
this.groupCountLen++;
|
|
200
|
+
});
|
|
250
201
|
});
|
|
251
|
-
}
|
|
252
|
-
},
|
|
202
|
+
},
|
|
253
203
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
self.displayArealeft = self.DomLeft();
|
|
258
|
-
self.displayAreabtm = self.DomTop(self.$refs.displayArea.$el);
|
|
259
|
-
self.displayAreaHeight = self.$refs.displayArea.$el.offsetHeight;
|
|
260
|
-
window.onresize = () => {
|
|
261
|
-
self.displayAreaWidth = self.DomWidth();
|
|
204
|
+
mounted() {
|
|
205
|
+
var self = this;
|
|
206
|
+
self.displayAreaWidth = this.DomWidth();
|
|
262
207
|
self.displayArealeft = self.DomLeft();
|
|
263
208
|
self.displayAreabtm = self.DomTop(self.$refs.displayArea.$el);
|
|
264
209
|
self.displayAreaHeight = self.$refs.displayArea.$el.offsetHeight;
|
|
265
|
-
|
|
210
|
+
window.onresize = () => {
|
|
211
|
+
self.displayAreaWidth = self.DomWidth();
|
|
212
|
+
self.displayArealeft = self.DomLeft();
|
|
213
|
+
self.displayAreabtm = self.DomTop(self.$refs.displayArea.$el);
|
|
214
|
+
self.displayAreaHeight = self.$refs.displayArea.$el.offsetHeight;
|
|
215
|
+
};
|
|
266
216
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
},
|
|
277
|
-
methods: {
|
|
278
|
-
handleMouse(e) {
|
|
279
|
-
e.preventDefault();
|
|
217
|
+
if (
|
|
218
|
+
this.groupIndex != undefined &&
|
|
219
|
+
this.index != undefined &&
|
|
220
|
+
this.groupIndex > -1 &&
|
|
221
|
+
this.index > -1
|
|
222
|
+
) {
|
|
223
|
+
var item = this.MediaAlbum[this.groupIndex].medias[this.index];
|
|
224
|
+
this.handleClick(item, this.groupIndex, this.index);
|
|
225
|
+
}
|
|
280
226
|
},
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
arrLength -
|
|
287
|
-
|
|
288
|
-
|
|
227
|
+
methods: {
|
|
228
|
+
handleMouse(e) {
|
|
229
|
+
e.preventDefault();
|
|
230
|
+
},
|
|
231
|
+
DomWidth() {
|
|
232
|
+
let arrLength = window.innerWidth - this.$refs.viewerfile.offsetWidth;
|
|
233
|
+
arrLength = arrLength > 0 ? arrLength : 0;
|
|
234
|
+
var Width =
|
|
235
|
+
window.innerWidth -
|
|
236
|
+
arrLength -
|
|
237
|
+
this.$refs.displayArea.$el.offsetLeft -
|
|
238
|
+
40;
|
|
289
239
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
240
|
+
return Width;
|
|
241
|
+
},
|
|
242
|
+
DomLeft() {
|
|
243
|
+
let arrLength = window.innerWidth - this.$refs.viewerfile.offsetWidth;
|
|
244
|
+
arrLength = arrLength > 0 ? arrLength : 0;
|
|
245
|
+
var Width =
|
|
246
|
+
window.innerWidth -
|
|
247
|
+
arrLength -
|
|
248
|
+
this.$refs.displayArea.$el.offsetLeft -
|
|
249
|
+
40;
|
|
300
250
|
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
251
|
+
return Width / 2 - 524 + this.$refs.displayArea.$el.offsetLeft - 40;
|
|
252
|
+
},
|
|
253
|
+
DomTop() {
|
|
254
|
+
const height = window.innerHeight; //可视区窗口高度
|
|
255
|
+
const curDomHeight = this.$refs.viewerfile.offsetHeight;
|
|
256
|
+
// const curDomHeight = dom.getBoundingClientRect().height
|
|
257
|
+
const curDomY = this.$refs.viewerfile.getBoundingClientRect().y;
|
|
258
|
+
let curDomBottom = height - curDomHeight - curDomY;
|
|
259
|
+
curDomBottom = curDomBottom > 0 ? curDomBottom : 0;
|
|
260
|
+
return curDomBottom;
|
|
261
|
+
},
|
|
262
|
+
FileExtension(item) {
|
|
263
|
+
return item.savedFileName.replace(/.+\./, "").toLowerCase();
|
|
264
|
+
},
|
|
265
|
+
offsetLeft(elements) {
|
|
266
|
+
var left = elements.offsetLeft;
|
|
267
|
+
var parent = elements.offsetParent;
|
|
268
|
+
while (parent != null) {
|
|
269
|
+
left += parent.offsetLeft;
|
|
270
|
+
parent = parent.offsetParent;
|
|
271
|
+
}
|
|
322
272
|
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
273
|
+
return left;
|
|
274
|
+
},
|
|
275
|
+
handleClick(item, groupIndex, index) {
|
|
276
|
+
if (index == this.activeIndex && groupIndex == this.activeGroup) return;
|
|
277
|
+
this.activeIndex = index;
|
|
278
|
+
this.activeGroup = groupIndex;
|
|
279
|
+
this.itemFile = item;
|
|
330
280
|
|
|
331
|
-
|
|
281
|
+
this.activeitem = groupIndex + "-" + index;
|
|
332
282
|
|
|
333
|
-
|
|
283
|
+
this.resultObject = this.itemFile.mediaUrl;
|
|
334
284
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
} else {
|
|
349
|
-
if (this.MediaAlbum[this.activeGroup].medias[this.activeIndex + n]) {
|
|
350
|
-
index = this.activeIndex + n;
|
|
285
|
+
this.$forceUpdate();
|
|
286
|
+
},
|
|
287
|
+
jump(n) {
|
|
288
|
+
var item = {};
|
|
289
|
+
var groupIndex = this.activeGroup;
|
|
290
|
+
var index = -1;
|
|
291
|
+
if (n > 0) {
|
|
292
|
+
if (
|
|
293
|
+
this.activeGroup * 1 + this.activeIndex + 1 + n >
|
|
294
|
+
this.groupCountLen
|
|
295
|
+
) {
|
|
296
|
+
groupIndex = 0;
|
|
297
|
+
index = 0;
|
|
351
298
|
} else {
|
|
352
|
-
if (
|
|
353
|
-
this.
|
|
354
|
-
this.MediaAlbum[this.activeGroup + n].medias[0]
|
|
355
|
-
) {
|
|
356
|
-
index = 0;
|
|
357
|
-
groupIndex = this.activeGroup + n;
|
|
299
|
+
if (this.MediaAlbum[this.activeGroup].medias[this.activeIndex + n]) {
|
|
300
|
+
index = this.activeIndex + n;
|
|
358
301
|
} else {
|
|
359
|
-
|
|
360
|
-
|
|
302
|
+
if (
|
|
303
|
+
this.MediaAlbum[this.activeGroup + n] &&
|
|
304
|
+
this.MediaAlbum[this.activeGroup + n].medias[0]
|
|
305
|
+
) {
|
|
306
|
+
index = 0;
|
|
307
|
+
groupIndex = this.activeGroup + n;
|
|
308
|
+
} else {
|
|
309
|
+
groupIndex = 0;
|
|
310
|
+
index = 0;
|
|
311
|
+
}
|
|
361
312
|
}
|
|
362
313
|
}
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
index = this.MediaAlbum[groupIndex].medias.length - 1;
|
|
368
|
-
} else {
|
|
369
|
-
if (this.MediaAlbum[this.activeGroup].medias[this.activeIndex + n]) {
|
|
370
|
-
index = this.activeIndex + n;
|
|
314
|
+
} else if (n < 0) {
|
|
315
|
+
if (this.activeGroup * 1 + this.activeIndex + n < 0) {
|
|
316
|
+
groupIndex = this.MediaAlbum.length - 1;
|
|
317
|
+
index = this.MediaAlbum[groupIndex].medias.length - 1;
|
|
371
318
|
} else {
|
|
372
|
-
if (
|
|
373
|
-
this.
|
|
374
|
-
this.MediaAlbum[this.activeGroup + n].medias.length - 1
|
|
375
|
-
]
|
|
376
|
-
) {
|
|
377
|
-
index = this.MediaAlbum[this.activeGroup + n].medias.length - 1;
|
|
378
|
-
groupIndex = this.activeGroup + n;
|
|
319
|
+
if (this.MediaAlbum[this.activeGroup].medias[this.activeIndex + n]) {
|
|
320
|
+
index = this.activeIndex + n;
|
|
379
321
|
} else {
|
|
380
|
-
|
|
381
|
-
|
|
322
|
+
if (
|
|
323
|
+
this.MediaAlbum[this.activeGroup + n].medias[
|
|
324
|
+
this.MediaAlbum[this.activeGroup + n].medias.length - 1
|
|
325
|
+
]
|
|
326
|
+
) {
|
|
327
|
+
index = this.MediaAlbum[this.activeGroup + n].medias.length - 1;
|
|
328
|
+
groupIndex = this.activeGroup + n;
|
|
329
|
+
} else {
|
|
330
|
+
groupIndex = this.MediaAlbum.length - 1;
|
|
331
|
+
index = this.MediaAlbum[groupIndex].medias.length - 1;
|
|
332
|
+
}
|
|
382
333
|
}
|
|
383
334
|
}
|
|
384
335
|
}
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
},
|
|
336
|
+
item = this.MediaAlbum[groupIndex].medias[index];
|
|
337
|
+
this.handleClick(item, groupIndex, index);
|
|
338
|
+
},
|
|
389
339
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
340
|
+
//旋转图片
|
|
341
|
+
rotateImg(type) {
|
|
342
|
+
var currentDeg = this.rotate || 0;
|
|
393
343
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
344
|
+
if (type == "L") {
|
|
345
|
+
currentDeg = currentDeg - 90;
|
|
346
|
+
} else if (type == "R") {
|
|
347
|
+
currentDeg = currentDeg + 90;
|
|
348
|
+
}
|
|
349
|
+
if (Math.abs(currentDeg) >= 360) {
|
|
350
|
+
currentDeg = currentDeg % 360;
|
|
351
|
+
}
|
|
352
|
+
this.rotate = currentDeg;
|
|
353
|
+
this.$forceUpdate();
|
|
354
|
+
},
|
|
405
355
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
356
|
+
actualSize() {
|
|
357
|
+
this.rotate = 0;
|
|
358
|
+
this.$refs.viewerImage.actualSize();
|
|
359
|
+
},
|
|
360
|
+
zoom(n) {
|
|
361
|
+
this.$refs.viewerImage.zoom(n);
|
|
362
|
+
}
|
|
412
363
|
},
|
|
413
|
-
}
|
|
414
|
-
};
|
|
364
|
+
};
|
|
415
365
|
</script>
|
|
416
366
|
|
|
417
367
|
<style>
|
|
418
|
-
body,
|
|
419
|
-
html {
|
|
420
|
-
|
|
421
|
-
}
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
368
|
+
body,
|
|
369
|
+
html {
|
|
370
|
+
height: 100%;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
#viewer-file .el-container {
|
|
374
|
+
margin-bottom: 40px;
|
|
375
|
+
height: 100%;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
.viewerContent {
|
|
379
|
+
cursor: move;
|
|
380
|
+
position: absolute !important;
|
|
381
|
+
top: 0;
|
|
382
|
+
bottom: 0;
|
|
383
|
+
left: 0;
|
|
384
|
+
right: 0;
|
|
385
|
+
margin: auto;
|
|
386
|
+
}
|
|
426
387
|
|
|
427
|
-
.
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
}
|
|
388
|
+
.magnify-footer {
|
|
389
|
+
position: fixed;
|
|
390
|
+
height: 50px;
|
|
391
|
+
bottom: 0px;
|
|
392
|
+
/* text-align: center; */
|
|
393
|
+
color: #fff;
|
|
394
|
+
z-index: 9;
|
|
395
|
+
}
|
|
436
396
|
|
|
437
|
-
.magnify-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
}
|
|
397
|
+
.magnify-toolbar {
|
|
398
|
+
display: inline-block;
|
|
399
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
400
|
+
-webkit-border-radius: 5px;
|
|
401
|
+
-moz-border-radius: 5px;
|
|
402
|
+
border-radius: 5px;
|
|
403
|
+
}
|
|
445
404
|
|
|
446
|
-
.magnify-toolbar {
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
.magnify-toolbar .magnify-btn
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
.viewerMenu {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
display: inline-block;
|
|
478
|
-
}
|
|
405
|
+
.magnify-toolbar .magnify-btn {
|
|
406
|
+
margin: 15px 20px;
|
|
407
|
+
color: #999;
|
|
408
|
+
font-size: 25px;
|
|
409
|
+
font-weight: 800;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.magnify-toolbar .magnify-btn:hover,
|
|
413
|
+
.magnify-btn-close:hover {
|
|
414
|
+
color: #fff;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
.viewerMenu {
|
|
418
|
+
border-right: solid 2px #e6e6e6 !important;
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
.viewerMenu .el-submenu__title,
|
|
422
|
+
.viewerMenu .el-menu-item {
|
|
423
|
+
height: 30px !important;
|
|
424
|
+
line-height: 30px !important;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.viewerMenu .el-menu-item-group__title {
|
|
428
|
+
line-height: 1px;
|
|
429
|
+
height: 1px;
|
|
430
|
+
display: none;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.viewerMenu .el-submenu__title .el-submenu__icon-arrow {
|
|
434
|
+
display: inline-block;
|
|
435
|
+
}
|
|
479
436
|
</style>
|