zip文件预览默认图像
parent
a15e908e76
commit
8e5e2a0714
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
|
@ -50,7 +50,7 @@
|
||||||
:ref="`img${i}`"
|
:ref="`img${i}`"
|
||||||
:key="item.Id"
|
:key="item.Id"
|
||||||
crossorigin="anonymous"
|
crossorigin="anonymous"
|
||||||
:src="`${OSSclientConfig.basePath}${item.Path}`"
|
:src="item.FileType&&item.FileType.indexOf('zip')>=0?zipImg:`${OSSclientConfig.basePath}${item.Path}`"
|
||||||
:style="imgStyle"
|
:style="imgStyle"
|
||||||
style="max-width:100%;max-height: 100%;"
|
style="max-width:100%;max-height: 100%;"
|
||||||
@load="handleImgLoad"
|
@load="handleImgLoad"
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { on, off } from 'element-ui/src/utils/dom'
|
import { on, off } from 'element-ui/src/utils/dom'
|
||||||
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util'
|
import { rafThrottle, isFirefox } from 'element-ui/src/utils/util';
|
||||||
|
|
||||||
const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel'
|
const mousewheelEventName = isFirefox() ? 'DOMMouseScroll' : 'mousewheel'
|
||||||
|
|
||||||
|
@ -102,6 +102,10 @@ export default {
|
||||||
initialIndex: {
|
initialIndex: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: 0
|
default: 0
|
||||||
|
},
|
||||||
|
zipImg:{
|
||||||
|
required:true,
|
||||||
|
default:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -117,7 +121,7 @@ export default {
|
||||||
offsetX: 0,
|
offsetX: 0,
|
||||||
offsetY: 0,
|
offsetY: 0,
|
||||||
enableTransition: false
|
enableTransition: false
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
:study-code="previewImage.studyCode"
|
:study-code="previewImage.studyCode"
|
||||||
:body-part="previewImage.bodyPart"
|
:body-part="previewImage.bodyPart"
|
||||||
:modality="previewImage.modality"
|
:modality="previewImage.modality"
|
||||||
|
:zip-img='zipImg'
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="thumbnail-wrapper" style="z-index:999;background-color:#fff;">
|
<div class="thumbnail-wrapper" style="z-index:999;background-color:#fff;">
|
||||||
|
@ -42,7 +43,7 @@
|
||||||
}"
|
}"
|
||||||
@click="selected(index)"
|
@click="selected(index)"
|
||||||
>
|
>
|
||||||
<img :title="item.FileName" crossorigin="anonymous" :src="`${OSSclientConfig.basePath + item.Path}`">
|
<img :title="item.FileName" crossorigin="anonymous" :src="item.FileType&&item.FileType.indexOf('zip')>=0?zipImg:`${OSSclientConfig.basePath}${item.Path}`">
|
||||||
<p v-if="item.FileName" class="item-date">
|
<p v-if="item.FileName" class="item-date">
|
||||||
{{ `${index+1}` }}
|
{{ `${index+1}` }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -62,7 +63,8 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import ImageViewer from './image-viewer'
|
import ImageViewer from './image-viewer';
|
||||||
|
import zipImg from "@/assets/zip.png";
|
||||||
export default {
|
export default {
|
||||||
name: 'Preview',
|
name: 'Preview',
|
||||||
components: {
|
components: {
|
||||||
|
@ -104,7 +106,8 @@ export default {
|
||||||
previewVisible: true,
|
previewVisible: true,
|
||||||
translateX: 0,
|
translateX: 0,
|
||||||
pageSize: 0, // 一页展示的图片数
|
pageSize: 0, // 一页展示的图片数
|
||||||
urlList: []
|
urlList: [],
|
||||||
|
zipImg
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
Loading…
Reference in New Issue