fix : 优化首页样式
This commit is contained in:
11
index.html
11
index.html
@@ -4,6 +4,17 @@
|
||||
<meta charset="UTF-8">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="stylesheet" href="/lib/css/pptxjs.css">
|
||||
<link rel="stylesheet" href="/lib/css/nv.d3.min.css"> <!-- for charts graphs -->
|
||||
<script type="text/javascript" src="/lib/js/jquery-1.11.3.min.js"></script>
|
||||
<script type="text/javascript" src="/lib/js/jszip.min.js"></script> <!-- v2.. , NOT v.3.. -->
|
||||
<script type="text/javascript" src="/lib/js/filereader.js"></script> <!--https://github.com/meshesha/filereader.js -->
|
||||
<script type="text/javascript" src="/lib/js/d3.min.js"></script> <!-- for charts graphs -->
|
||||
<script type="text/javascript" src="/lib/js/nv.d3.min.js"></script> <!-- for charts graphs -->
|
||||
<script type="text/javascript" src="/lib/js/dingbat.js"></script> <!--for bullets -->
|
||||
<script type="text/javascript" src="/lib/js/pptxjs.js"></script>
|
||||
<script type="text/javascript" src="/lib/js/divs2slides.js"></script> <!-- for slide show -->
|
||||
|
||||
<title>科研管理平台</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
28
src/components/filePreview/PptPreview.vue
Normal file
28
src/components/filePreview/PptPreview.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div id="pptx" ></div>
|
||||
</template>
|
||||
|
||||
<script setup >
|
||||
const props = defineProps({
|
||||
fileUrl: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
fullscreen: {
|
||||
type: Boolean,
|
||||
default:false
|
||||
}
|
||||
})
|
||||
// js部分 jquery已在index.html中引入 无需另外安装
|
||||
const handlePPtx = () => {
|
||||
$("#pptx").pptxToHtml({
|
||||
pptxFileUrl: props.fileUrl, //pptx文件地址
|
||||
slidesScale: "100%",
|
||||
});
|
||||
}
|
||||
handlePPtx()
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -6,6 +6,7 @@
|
||||
:append-to-body="false"
|
||||
:close-on-click-modal="true"
|
||||
>
|
||||
<ppt-preview :file-url="fileUrl" :fullscreen="fullscreen" v-if="fileType === 'ppt'||fileType === 'pptx'"/>
|
||||
<pdf-preview :file-url="fileUrl" :fullscreen="fullscreen" v-if="fileType === 'pdf'"/>
|
||||
<docx-preview :file-url="fileUrl" :fullscreen="fullscreen" v-if="fileType === 'docx'"/>
|
||||
<image-preview :fileUrl="fileUrl" :fullscreen="fullscreen" :fileName="fileName" v-if="checkImgType(fileType)"/>
|
||||
@@ -43,7 +44,7 @@ const checkImgType=(fileType)=>{
|
||||
return fileType == 'png' || fileType == 'jpg' || fileType == 'jpeg' || fileType == 'ico' || fileType == 'PNG' || fileType == 'JPG';
|
||||
}
|
||||
console.info("🚀 ~method:‘checkImgType(props.fileType) -----", checkImgType(props.fileType))
|
||||
if(props.fileType!=='pdf'&&props.fileType!=='docx'&&!checkImgType(props.fileType)){
|
||||
if(props.fileType!=='pdf'&&props.fileType!=='docx'&&props.fileType !== 'ppt'&&props.fileType !== 'pptx'&&!checkImgType(props.fileType)){
|
||||
showPreview.value=false
|
||||
ElNotification({
|
||||
title: '提示',
|
||||
|
||||
@@ -83,11 +83,11 @@ export default defineConfig({
|
||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||
// },
|
||||
'/api': {
|
||||
// // target: 'http://kyglweb.scgzjy.com:8080/',
|
||||
target: 'http://mosr.feashow.cn',
|
||||
target: 'http://kyglweb.scgzjy.com:8080/',
|
||||
// target: 'http://mosr.feashow.cn',
|
||||
changeOrigin: true,
|
||||
// target: 'http://clay.frp.feashow.cn',
|
||||
// target: 'http://frp.feashow.cn:31800/',
|
||||
// // target: 'http://frp.feashow.cn:31800/',
|
||||
// changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/api/, '')
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user