提交 1d660b24 authored 作者: 龙菲's avatar 龙菲

优化pdf图标

上级 cd9e21b3
module.exports = {
presets: [
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
'@vue/cli-plugin-babel/preset'
['@vue/cli-plugin-babel/preset', {
useBuiltIns: 'entry',
polyfills: ['es6.promise', 'es6.symbol', 'es6.array.iterator', 'es6.object.assign']
}]
],
'env': {
'development': {
......
......@@ -40,6 +40,7 @@
"@riophae/vue-treeselect": "0.4.0",
"axios": "0.24.0",
"babel-plugin-transform-remove-strict-mode": "^0.0.2",
"babel-polyfill": "^6.26.0",
"canvas-nest.js": "^2.0.4",
"clipboard": "2.0.8",
"core-js": "3.25.3",
......
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1696656103141" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3392" xmlns:xlink="http://www.w3.org/1999/xlink" width="80" height="80"><path d="M640 456h-118.4V320a32 32 0 0 0-64 0v136H320a32 32 0 0 0 0 64h137.6V640a32 32 0 1 0 64 0v-120H640a32 32 0 1 0 0-64z" p-id="3393"></path><path d="M919.264 905.984l-138.912-138.912C851.808 692.32 896 591.328 896 480c0-229.376-186.624-416-416-416S64 250.624 64 480s186.624 416 416 416c95.008 0 182.432-32.384 252.544-86.208l141.44 141.44a31.904 31.904 0 0 0 45.248 0 32 32 0 0 0 0.032-45.248zM128 480C128 285.92 285.92 128 480 128s352 157.92 352 352-157.92 352-352 352S128 674.08 128 480z" p-id="3394"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1696656114946" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3689" xmlns:xlink="http://www.w3.org/1999/xlink" width="80" height="80"><path d="M711.2480467 529.92968775a35.02441372 35.02441372 0 0 1-10.54687474 24.34570279L360.82812483 887.07324244a35.15624992 35.15624992 0 0 1-49.21874958-50.22949219l315.39550739-308.84765615L310.46679722 187.99121077A35.15624992 35.15624992 0 1 1 361.97070287 140.09082006L701.84375 505.18847638c6.5039066 7.03124982 9.62402369 15.95214869 9.4042967 24.8291014z" p-id="3690"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1696656097637" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3097" xmlns:xlink="http://www.w3.org/1999/xlink" width="80" height="80"><path d="M721.594 118.177c12.379 12.379 12.379 32.283 0 44.661l-349.647 349.647 349.647 349.647c12.379 12.379 12.379 32.283 0 44.661-5.705 5.735-13.603 9.284-22.331 9.284-8.726 0-16.625-3.549-22.33-9.283l-371.979-371.979c-5.735-5.705-9.284-13.603-9.284-22.331 0-8.726 3.549-16.625 9.283-22.33l371.979-371.979c12.379-12.379 32.404-12.379 44.661 0z" p-id="3098"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1696656100623" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3244" xmlns:xlink="http://www.w3.org/1999/xlink" width="80" height="80"><path d="M919.264 905.984l-138.912-138.912C851.808 692.32 896 591.328 896 480c0-229.376-186.624-416-416-416S64 250.624 64 480s186.624 416 416 416c95.008 0 182.432-32.384 252.544-86.208l141.44 141.44a31.904 31.904 0 0 0 45.248 0 32 32 0 0 0 0.032-45.248zM128 480C128 285.92 285.92 128 480 128s352 157.92 352 352-157.92 352-352 352S128 674.08 128 480z" p-id="3245"></path><path d="M625.792 448H336a32 32 0 0 0 0 64h289.792a32 32 0 1 0 0-64z" p-id="3246"></path></svg>
\ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1696656107803" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3540" xmlns:xlink="http://www.w3.org/1999/xlink" width="80" height="80"><path d="M1464.3 279.7" p-id="3541"></path><path d="M512 960c-60.5 0-119.1-11.9-174.4-35.2-53.4-22.6-101.3-54.9-142.4-96s-73.4-89-96-142.4C75.9 631.1 64 572.5 64 512s11.9-119.1 35.2-174.4c22.6-53.4 54.9-101.3 96-142.4s89-73.4 142.4-96C392.9 75.9 451.5 64 512 64s119.1 11.9 174.4 35.2c53.4 22.6 101.3 54.9 142.4 96s73.4 89 96 142.4C948.1 392.9 960 451.5 960 512c0 19.1-15.5 34.6-34.6 34.6s-34.6-15.5-34.6-34.6c0-51.2-10-100.8-29.8-147.4-19.1-45.1-46.4-85.6-81.2-120.4C745 209.4 704.5 182 659.4 163c-46.7-19.7-96.3-29.8-147.4-29.8-51.2 0-100.8 10-147.4 29.8-45.1 19.1-85.6 46.4-120.4 81.2S182 319.5 163 364.6c-19.7 46.7-29.8 96.3-29.8 147.4 0 51.2 10 100.8 29.8 147.4 19.1 45.1 46.4 85.6 81.2 120.4C279 814.6 319.5 842 364.6 861c46.7 19.7 96.3 29.8 147.4 29.8 64.6 0 128.4-16.5 184.4-47.8 54.4-30.4 100.9-74.1 134.6-126.6 10.3-16.1 31.7-20.8 47.8-10.4 16.1 10.3 20.8 31.7 10.4 47.8-39.8 62-94.8 113.7-159.1 149.6-66.2 37-141.7 56.6-218.1 56.6z" p-id="3542"></path><path d="M924 552c-19.8 0-36-16.2-36-36V228c0-19.8 16.2-36 36-36s36 16.2 36 36v288c0 19.8-16.2 36-36 36zM275.4 575.5c9.5-2.5 19.1 2.9 22.3 12.2 3.5 10.2 9.9 17.7 19.1 22.6 7.1 3.9 15.1 5.8 24 5.8 16.6 0 30.8-6.9 42.5-20.8 11.7-13.8 20-32.7 24.9-75.1-7.7 12.2-17.3 20.8-28.7 25.8-11.4 5-23.7 7.4-36.8 7.4-26.7 0-47.7-8.3-63.3-24.9-15.5-16.6-23.3-37.9-23.3-64.1 0-25.1 7.7-47.1 23-66.2 15.3-19 37.9-28.6 67.8-28.6 40.3 0 68.1 18.1 83.4 54.4 8.5 19.9 12.7 44.9 12.7 74.9 0 33.8-5.1 63.8-15.3 89.9-16.9 43.5-45.5 65.2-85.8 65.2-27 0-47.6-7.1-61.6-21.2-10-10.1-16.4-22-19.3-35.8-2-9.6 4-19.1 13.5-21.6l0.9 0.1z m103-74.4c9.4-7.5 14.1-20.6 14.1-39.3 0-16.8-4.2-29.3-12.7-37.5S360.6 412 347.5 412c-14 0-25.2 4.7-33.4 14.1-8.2 9.4-12.4 22-12.4 37.7 0 14.9 3.6 26.7 10.9 35.5 7.2 8.8 18.8 13.1 34.6 13.1 11.4 0 21.8-3.8 31.2-11.3zM646.6 414.4c12.4 22.8 18.5 54 18.5 93.7 0 37.6-5.6 68.7-16.8 93.3-16.2 35.3-42.8 52.9-79.6 52.9-33.2 0-57.9-14.4-74.2-43.3-13.5-24.1-20.3-56.4-20.3-97 0-31.4 4.1-58.4 12.2-80.9 15.2-42 42.7-63 82.5-63 35.9 0 61.8 14.8 77.7 44.3z m-40.2 173.3c9.4-13.9 14-39.9 14-78 0-27.4-3.4-50-10.1-67.7-6.8-17.7-19.9-26.6-39.4-26.6-17.9 0-31 8.4-39.3 25.2-8.3 16.8-12.4 41.6-12.4 74.3 0 24.6 2.6 44.4 7.9 59.4 8.1 22.8 22 34.3 41.6 34.3 15.7 0 28.3-7 37.7-20.9zM803.3 387.2c11.2 11.3 16.8 25 16.8 41.2 0 16.7-5.8 30.7-17.5 41.8C791 481.4 777.4 487 762 487c-17.1 0-31.2-5.8-42.1-17.4-10.9-11.6-16.4-25.1-16.4-40.6 0-16.5 5.8-30.4 17.3-41.7 11.5-11.3 25.3-17 41.2-17 16.3 0 30.1 5.7 41.3 16.9zM739.5 451c6.2 6.2 13.7 9.3 22.5 9.3 8.4 0 15.8-3.1 22.1-9.3 6.3-6.2 9.4-13.7 9.4-22.6 0-8.5-3.1-15.9-9.3-22.1-6.2-6.2-13.6-9.3-22.2-9.3s-16.1 3.1-22.4 9.3c-6.3 6.2-9.4 13.7-9.4 22.6-0.1 8.4 3 15.8 9.3 22.1z" p-id="3543"></path></svg>
\ No newline at end of file
......@@ -2,20 +2,34 @@
<div class="main">
<div class="head">
<div class="zoom">
<button @click="() => zoomIn()">缩小</button>
<button @click="() => zoomOut()">放大</button>
<button @click="() => zoomIn()" title="缩小">
<img :src="reduceIcon" width="24" alt="" />
</button>
<button @click="() => zoomOut()" title="放大">
<img :src="enlargeIcon" width="24" alt="" />
</button>
</div>
<div class="pagnaition">
<button @click.stop="preventPage" :disabled="currValue === 1">
上一页
<button
@click.stop="preventPage"
:disabled="currValue === 1"
title="上一页"
>
<img :src="prevIcon" width="24" alt="" />
</button>
<input type="text" v-model="currValue" @change="numChange" />
/&nbsp;&nbsp;{{ allPage }}
<button @click.stop="nextPage" :disabled="currValue === allPage">
下一页
<button
@click.stop="nextPage"
:disabled="currValue === allPage"
title="下一页"
>
<img :src="nextIcon" width="24" alt="" />
</button>
<button @click="() => rotate()" title="旋转">
<img :src="rotateIcon" width="24" alt="" />
</button>
<button @click="() => rotate()">旋转</button>
<button @click="() => doublePage()">双页模式</button>
<!-- <button @click="() => doublePage()">双页模式</button> -->
</div>
</div>
<div class="content">
......@@ -50,6 +64,11 @@ import copyIcon from "./icon/copy.svg";
import noteIcon from "./icon/note.svg";
import highlightIcon from "./icon/hign.svg";
import strikeOutIcon from "./icon/se.svg";
import enlargeIcon from "./icon/enlarge.svg";
import reduceIcon from "./icon/reduce.svg";
import nextIcon from "./icon/next.svg";
import prevIcon from "./icon/prev.svg";
import rotateIcon from "./icon/rotate.svg";
import { showMagBox } from "./message/index";
import { textCopy } from "@/utils/index";
......@@ -93,6 +112,11 @@ export default {
contextMenuVisible: false,
currValue: 1,
allPage: 0,
enlargeIcon,
reduceIcon,
nextIcon,
prevIcon,
rotateIcon,
};
},
......@@ -325,13 +349,18 @@ export default {
display: flex;
justify-content: center;
}
.pagnaition{
display: flex;
align-items: center;
}
.pagnaition button,
.zoom button {
margin: 0 10px;
}
.pagnaition input {
width: 25px;
height: 25px;
width: 36px;
height: 36px;
margin-right: 5px;
}
.main {
......@@ -342,6 +371,15 @@ export default {
overflow: hidden;
}
button {
border: none;
padding: 8px 12px;
cursor: pointer;
background-color: transparent;
}
button:hover{
background-color: #eaeaea;
}
.pdfViewer {
background: #666;
box-sizing: border-box;
......
......@@ -83,7 +83,7 @@ import {
getMyShareFileList,
searchFile,
} from "@/api/qwFile";
import { fileTypeConstant, collectConstant } from "./constants";
import { fileTypeConstant, collectConstant } from "@/constants";
export default {
name: "FileList",
......
......@@ -212,7 +212,7 @@ import {
fileSuffixCodeModeMap,
markdownFileType,
} from "@/libs/qiwen/map.js";
import { fileTypeConstant, uploadModeConstant } from "../../constants";
import { fileTypeConstant, uploadModeConstant } from "@/constants";
import { cancelCollect } from "@/api/user/collect";
export default {
......@@ -606,7 +606,7 @@ export default {
this.$openDialog
.addFileByTemplate({
extendName,
isShowTemplateRatio
isShowTemplateRatio,
})
.then((res) => {
this.callback(res);
......
......@@ -261,7 +261,7 @@ import {
displayModeConstant,
fileTypeConstant,
uploadModeConstant,
} from "../constants";
} from "@/constants";
export default {
name: "OperationMenu",
props: {
......
......@@ -23,4 +23,11 @@ export const uploadModeConstant = {
export const collectConstant = {
COLLECTED: 0, //收藏
NOT_COLLECTED: 1,//未收藏
}
// WPS的文件类型
export const wpsFileTypes = {
WORD: 'w',
EXCEL: 's',
PPT: 'p'
}
\ No newline at end of file
......@@ -48,7 +48,7 @@
<el-table-column width="280px" label="名称" show-overflow-tooltip>
<template slot-scope="{ row }">
<el-link @click="handleClickName(row)">
<svg-icon icon-class="word"></svg-icon>
<svg-icon :icon-class="getIcon(row)"></svg-icon>
{{ row.name }}
</el-link>
</template>
......@@ -67,11 +67,12 @@
<el-table :data="readList.records">
<el-table-column width="280px" label="名称" show-overflow-tooltip>
<template slot-scope="{ row }">
<el-link class="name" @click="handleClickName(row)"
><svg-icon
<el-link class="name" @click="handleClickName(row)">
<svg-icon
style="margin-right: 4px"
:icon-class="getIcon(row)"
></svg-icon>
{{ row.name }}</el-link
>
</template>
......@@ -88,8 +89,8 @@
<script>
import { getNearRead, getNearCreation } from "@/api/home";
import { newfile, newfileTemplate } from "@/api/wps";
import { fileTypes } from "./constants";
import { openFile } from "@/utils/file";
export default {
data() {
return {
......@@ -106,23 +107,20 @@ export default {
loading: false,
};
},
computed: {
getIcon(row) {
return (row) => {
const { showType } = row;
if (["doc", "docx", "word"].includes(row.showType)) {
return "word";
} else if (["pdf"].includes(row.showType)) {
return "pdf-color";
}
};
},
},
mounted() {
this.loadNearRead();
this.loadNearCreation();
},
methods: {
getIcon(row) {
const { suffix } = row;
const extendName = suffix;
if (["doc", "docx", "word"].includes(extendName)) {
return "word";
} else if (["pdf"].includes(extendName)) {
return "pdf-color";
}
},
// 最近阅读
async loadNearRead() {
const { pageNo, pageSize } = this.readList;
......@@ -161,11 +159,10 @@ export default {
.addFileByTemplate({
extendName: "docx",
isShowTemplateRatio: true, //是否要显示选择模板
filePath: "/我的创作",
})
.then((res) => {
// if (res === "confirm") {
// this.$emit("getTableDataByType");
// }
// this.$router.push("/mine/myCreate");
});
},
// 点击表格某一行
......
......@@ -5,7 +5,7 @@
</template>
<script>
import FileList from "@/components/file/FileList.vue";
import { fileTypeConstant } from "@/components/file/constants";
import { fileTypeConstant } from "@/constants";
const { TEMPLATE_MANAGE } = fileTypeConstant;
export default {
components: {
......
......@@ -5,7 +5,7 @@
</template>
<script>
import FileList from "@/components/file/FileList.vue";
import { fileTypeConstant } from "@/components/file/constants";
import { fileTypeConstant } from "@/constants";
const { MY_COLLECT } = fileTypeConstant;
export default {
components: {
......
......@@ -5,7 +5,7 @@
</template>
<script>
import FileList from "@/components/file/FileList.vue";
import { fileTypeConstant } from "@/components/file/constants";
import { fileTypeConstant } from "@/constants";
const { MY_CREATE } = fileTypeConstant;
export default {
components: {
......
......@@ -140,7 +140,7 @@
import { getMyShareList, removeShare } from "@/api/user/share";
import { newfile } from "@/api/wps";
import { shareStatusConstant, shareTypeConstant } from "./constant";
import { fileTypeConstant } from "@/components/file/constants";
import { fileTypeConstant } from "@/constants";
import { mapGetters } from "vuex";
const { PUBLIC_SHARE } = shareTypeConstant;
const { MY_COLLECT } = fileTypeConstant;
......@@ -177,6 +177,7 @@ export default {
fileName: "", //文件名称
shareStatus: "", //分享状态
shareType: PUBLIC_SHARE, //查询分享给公共
isShare: 1, //1 已分享 0 未分享的
// shareTo: "", //分享给谁
},
// 分享状态常量
......@@ -251,7 +252,7 @@ export default {
console.log("点击收藏", row);
this.loading = true;
const { extendName, fileName } = row;
const filePath = '/我的收藏';
const filePath = "/我的收藏";
const WORD = ["docx", "doc"]; //暂时只考虑新建word的情况
let filetype = "w";
// const PDF = ["pdf", "doc"];
......
......@@ -35,8 +35,8 @@ module.exports = {
proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: {
target: `http://192.168.1.2:5236`,
// target: `http://192.168.1.5:5236`,
// target: `http://192.168.1.2:5236`,
target: `http://192.168.1.5:5236`,
// target: `http://222.85.214.245:9600`,
// target: `http://222.85.214.245:9558`,
// target: `http://172.24.100.246:9600`,
......@@ -74,6 +74,10 @@ module.exports = {
})
],
},
// 解决其他插件的es6语法向下兼容问题
transpileDependencies: [
'@pdftron/webviewer',
],
chainWebpack(config) {
config.plugins.delete('preload') // TODO: need test
config.plugins.delete('prefetch') // TODO: need test
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论