fix : 优化首页样式

This commit is contained in:
2024-10-09 19:54:27 +08:00
parent 00c346c7b1
commit 9d144af68a
4 changed files with 44 additions and 4 deletions

View File

@@ -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>

View 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>

View File

@@ -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: '提示',

View File

@@ -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/, '')
},