diff --git a/src/components/ShowFile/ShowFile.vue b/src/components/ShowFile/ShowFile.vue
index b0d7aff..8deb776 100644
--- a/src/components/ShowFile/ShowFile.vue
+++ b/src/components/ShowFile/ShowFile.vue
@@ -551,7 +551,7 @@
'\r\n' +
'路径:' +
item.path +
- '\r\n' + formatExif(item.exif)
+ extendedInfo(item)
"
:style="{paddingTop: 100/gridColumnNum + '%'}"
>
@@ -815,7 +815,7 @@ import { mapGetters, mapState } from 'vuex'
import { formatSize, formatTime } from '@/utils/number'
import { getElementToPageLeft } from '@/utils/dom'
import { suffix } from '@/utils/file-type'
-import { formatExif } from '@/utils/image'
+import { formatExif,formatVideo } from '@/utils/media'
import api from '@/api/file-api'
import BreadcrumbFilePath from '@/components/Breadcrumb/BreadcrumbFilePath'
import IconFile from '@/components/Icon/IconFile'
@@ -2204,8 +2204,11 @@ export default {
formatSize(size) {
return formatSize(size)
},
- formatExif(exifInfo) {
- return formatExif(exifInfo)
+ extendedInfo(file) {
+ if (!file.exif && !file.video) {
+ return
+ }
+ return "\r\n" + formatExif(file.exif) + formatVideo(file.video)
},
upload() {
// 打开文件选择框
diff --git a/src/components/preview/FileDetails.vue b/src/components/preview/FileDetails.vue
index 15b428a..e21ec56 100644
--- a/src/components/preview/FileDetails.vue
+++ b/src/components/preview/FileDetails.vue
@@ -56,9 +56,12 @@
{{ rowContextData.updateDate }}
-
+
{{ formatExif(rowContextData.exif) }}
+
+ {{ formatVideo(rowContextData.video) }}
+
@@ -68,7 +71,7 @@
import { formatSize } from '@/utils/number'
import IconFile from '@/components/Icon/IconFile'
import {mapState} from "vuex";
-import {formatExif} from "@/utils/image";
+import {formatExif,formatVideo} from "@/utils/media";
import settingApi from "@/api/setting-api";
export default {
@@ -127,6 +130,9 @@ export default {
formatExif(exifInfo) {
return formatExif(exifInfo)
},
+ formatVideo(videoInfo) {
+ return formatVideo(videoInfo)
+ },
getIsSync() {
settingApi.isSync({username: this.$store.state.user.name}).then((res) => {
this.updateSyncStatus(res.data)
diff --git a/src/utils/image.js b/src/utils/image.js
deleted file mode 100644
index fbf31fe..0000000
--- a/src/utils/image.js
+++ /dev/null
@@ -1,55 +0,0 @@
-export function formatExif(exifInfo) {
- if (!exifInfo) {
- return ''
- }
- let exifStr = ''
- if (exifInfo['dateTimeOriginal']) {
- exifStr += `\r\n内容创作时间: ${exifInfo['dateTimeOriginal']}\r\n`
- }
- if (exifInfo['resolution']) {
- exifStr += `分辨率: ${exifInfo['resolution']}\r\n`
- }
- if (exifInfo['make']) {
- exifStr += `设备制造商: ${exifInfo['make']}\r\n`
- }
- if (exifInfo['model']) {
- exifStr += `设备型号: ${exifInfo['model']}\r\n`
- }
- if (exifInfo['aperture']) {
- exifStr += `光圈值: ${exifInfo['aperture']}\r\n`
- }
- if (exifInfo['exposureTime']) {
- exifStr += `曝光时间: ${exifInfo['exposureTime']}\r\n`
- }
- if (exifInfo['focalLength']) {
- exifStr += `焦距: ${exifInfo['focalLength']} 毫米\r\n`
- }
- if (exifInfo['isoEquivalent']) {
- exifStr += `ISO感光度: ${exifInfo['isoEquivalent']}\r\n`
- }
- if (exifInfo['flash']) {
- exifStr += `闪光灯: ${exifInfo['flash']}\r\n`
- }
- if (exifInfo['fNumber']) {
- exifStr += `光圈数: ${exifInfo['fNumber']}\r\n`
- }
- if (exifInfo['exposureProgram']) {
- exifStr += `曝光程序: ${exifInfo['exposureProgram']}\r\n`
- }
- if (exifInfo['meteringMode']) {
- exifStr += `测光模式: ${exifInfo['meteringMode']}\r\n`
- }
- if (exifInfo['whiteBalanceMode']) {
- exifStr += `白平衡: ${exifInfo['whiteBalanceMode']}\r\n`
- }
- if (exifInfo['software']) {
- exifStr += `内容创作者: ${exifInfo['software']}\r\n`
- }
- if (exifInfo['longitude']) {
- exifStr += `经度: ${exifInfo['longitude']}\r\n`
- }
- if (exifInfo['latitude']) {
- exifStr += `纬度: ${exifInfo['latitude']}\r\n`
- }
- return exifStr
-}
diff --git a/src/utils/media.js b/src/utils/media.js
new file mode 100644
index 0000000..d30bd62
--- /dev/null
+++ b/src/utils/media.js
@@ -0,0 +1,75 @@
+export function formatExif(exifInfo) {
+ if (!exifInfo) {
+ return ''
+ }
+ let exifStr = ''
+ if (exifInfo['dateTimeOriginal']) {
+ exifStr += `内容创作时间: ${exifInfo['dateTimeOriginal']}`
+ }
+ if (exifInfo['resolution']) {
+ exifStr += `\r\n分辨率: ${exifInfo['resolution']}`
+ }
+ if (exifInfo['make']) {
+ exifStr += `\r\n设备制造商: ${exifInfo['make']}`
+ }
+ if (exifInfo['model']) {
+ exifStr += `\r\n设备型号: ${exifInfo['model']}`
+ }
+ if (exifInfo['aperture']) {
+ exifStr += `\r\n光圈值: ${exifInfo['aperture']}`
+ }
+ if (exifInfo['exposureTime']) {
+ exifStr += `\r\n曝光时间: ${exifInfo['exposureTime']}`
+ }
+ if (exifInfo['focalLength']) {
+ exifStr += `\r\n焦距: ${exifInfo['focalLength']} 毫米`
+ }
+ if (exifInfo['isoEquivalent']) {
+ exifStr += `\r\nISO感光度: ${exifInfo['isoEquivalent']}`
+ }
+ if (exifInfo['flash']) {
+ exifStr += `\r\n闪光灯: ${exifInfo['flash']}`
+ }
+ if (exifInfo['fNumber']) {
+ exifStr += `\r\n光圈数: ${exifInfo['fNumber']}`
+ }
+ if (exifInfo['exposureProgram']) {
+ exifStr += `\r\n曝光程序: ${exifInfo['exposureProgram']}`
+ }
+ if (exifInfo['meteringMode']) {
+ exifStr += `\r\n测光模式: ${exifInfo['meteringMode']}`
+ }
+ if (exifInfo['whiteBalanceMode']) {
+ exifStr += `\r\n白平衡: ${exifInfo['whiteBalanceMode']}`
+ }
+ if (exifInfo['software']) {
+ exifStr += `内容创作者: ${exifInfo['software']}`
+ }
+ if (exifInfo['longitude']) {
+ exifStr += `\r\n经度: ${exifInfo['longitude']}`
+ }
+ if (exifInfo['latitude']) {
+ exifStr += `\r\n纬度: ${exifInfo['latitude']}`
+ }
+ return exifStr
+}
+
+export function formatVideo(videoInfo) {
+ if (!videoInfo) {
+ return ''
+ }
+ let videoStr = ''
+ if (videoInfo['height'] && videoInfo['width']) {
+ videoStr += `尺寸: ${videoInfo['width']} x ${videoInfo['height']}`
+ }
+ if (videoInfo['bitrate']) {
+ videoStr += `\r\n码率: ${videoInfo['bitrate']}`
+ }
+ if (videoInfo['format']) {
+ videoStr += `\r\n格式: ${videoInfo['format']}`
+ }
+ if (videoInfo['duration']) {
+ videoStr += `\r\n时长: ${videoInfo['duration']}`
+ }
+ return videoStr
+}
diff --git a/src/views/setting/cloudManager.vue b/src/views/setting/cloudManager.vue
index f1cacf0..03ce11e 100644
--- a/src/views/setting/cloudManager.vue
+++ b/src/views/setting/cloudManager.vue
@@ -224,7 +224,6 @@ export default {
}
getTaskProgress().then(res => {
this.taskProgressDataList = res.data
- this.taskProgressChange(this.taskProgressDataList.length)
})
},
computed: {