|
|
@@ -102,6 +102,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import api from '@/api/index.js'
|
|
|
+
|
|
|
export default {
|
|
|
name: 'info',
|
|
|
props: {
|
|
|
@@ -204,14 +206,19 @@ export default {
|
|
|
* 以图片形式查看文件
|
|
|
*/
|
|
|
libraryDetail() {
|
|
|
- this.$api.project
|
|
|
- .articleDetailByFile(this.form.fileFolder.fileId)
|
|
|
- .then(res => {
|
|
|
- if (res.code === 200) {
|
|
|
- this.preList = res.data.imgs.map(e => e.filePath)
|
|
|
- this.showImage = true
|
|
|
- }
|
|
|
- })
|
|
|
+ if (api.offices.includes(this.form.fileFolder.suffix)) {
|
|
|
+ this.$api.project
|
|
|
+ .articleDetailByFile(this.form.fileFolder.fileId)
|
|
|
+ .then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.preList = res.data.imgs.map(e => e.filePath)
|
|
|
+ this.showImage = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.preList = [this.form.fileFolder.url]
|
|
|
+ this.showImage = true
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|