| | |
| | | "resolved": "https://registry.npmjs.org/@wangeditor/video-module/-/video-module-1.1.4.tgz", |
| | | "integrity": "sha512-ZdodDPqKQrgx3IwWu4ZiQmXI8EXZ3hm2/fM6E3t5dB8tCaIGWQZhmqd6P5knfkRAd3z2+YRSRbxOGfoRSp/rLg==" |
| | | }, |
| | | "@xmldom/xmldom": { |
| | | "version": "0.8.10", |
| | | "resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz", |
| | | "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==" |
| | | }, |
| | | "JSV": { |
| | | "version": "4.0.2", |
| | | "resolved": "https://registry.npmjs.org/JSV/-/JSV-4.0.2.tgz", |
| | |
| | | "version": "1.0.10", |
| | | "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", |
| | | "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", |
| | | "dev": true, |
| | | "requires": { |
| | | "sprintf-js": "~1.0.2" |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | "dingbat-to-unicode": { |
| | | "version": "1.0.1", |
| | | "resolved": "https://registry.npmmirror.com/dingbat-to-unicode/-/dingbat-to-unicode-1.0.1.tgz", |
| | | "integrity": "sha512-98l0sW87ZT58pU4i61wa2OHwxbiYSbuxsCBozaVnYX2iCnr3bLM3fIes1/ej7h1YdOKuKt/MLs706TVnALA65w==" |
| | | }, |
| | | "dir-glob": { |
| | | "version": "2.2.2", |
| | | "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-2.2.2.tgz", |
| | |
| | | "requires": { |
| | | "contra": "1.9.4", |
| | | "crossvent": "1.5.5" |
| | | } |
| | | }, |
| | | "duck": { |
| | | "version": "0.1.12", |
| | | "resolved": "https://registry.npmmirror.com/duck/-/duck-0.1.12.tgz", |
| | | "integrity": "sha512-wkctla1O6VfP89gQ+J/yDesM0S7B7XLXjKGzXxMDVFg7uEn706niAtyYovKbyq1oT9YwDcly721/iUWoc8MVRg==", |
| | | "requires": { |
| | | "underscore": "^1.13.1" |
| | | }, |
| | | "dependencies": { |
| | | "underscore": { |
| | | "version": "1.13.6", |
| | | "resolved": "https://registry.npmmirror.com/underscore/-/underscore-1.13.6.tgz", |
| | | "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" |
| | | } |
| | | } |
| | | }, |
| | | "duplexer": { |
| | |
| | | "js-tokens": "^3.0.0 || ^4.0.0" |
| | | } |
| | | }, |
| | | "lop": { |
| | | "version": "0.4.1", |
| | | "resolved": "https://registry.npmmirror.com/lop/-/lop-0.4.1.tgz", |
| | | "integrity": "sha512-9xyho9why2A2tzm5aIcMWKvzqKsnxrf9B5I+8O30olh6lQU8PH978LqZoI4++37RBgS1Em5i54v1TFs/3wnmXQ==", |
| | | "requires": { |
| | | "duck": "^0.1.12", |
| | | "option": "~0.2.1", |
| | | "underscore": "^1.13.1" |
| | | }, |
| | | "dependencies": { |
| | | "underscore": { |
| | | "version": "1.13.6", |
| | | "resolved": "https://registry.npmmirror.com/underscore/-/underscore-1.13.6.tgz", |
| | | "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" |
| | | } |
| | | } |
| | | }, |
| | | "loud-rejection": { |
| | | "version": "1.6.0", |
| | | "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", |
| | |
| | | "dev": true, |
| | | "requires": { |
| | | "pify": "^3.0.0" |
| | | } |
| | | }, |
| | | "mammoth": { |
| | | "version": "1.7.1", |
| | | "resolved": "https://registry.npmmirror.com/mammoth/-/mammoth-1.7.1.tgz", |
| | | "integrity": "sha512-ckxfvNH5sUaJh+SbYbxpvB7urZTGS02jA91rFCNiL928CgE9FXXMyXxcJBY0n+CpmKE/eWh7qaV0+v+Dbwun3Q==", |
| | | "requires": { |
| | | "@xmldom/xmldom": "^0.8.6", |
| | | "argparse": "~1.0.3", |
| | | "base64-js": "^1.5.1", |
| | | "bluebird": "~3.4.0", |
| | | "dingbat-to-unicode": "^1.0.1", |
| | | "jszip": "^3.7.1", |
| | | "lop": "^0.4.1", |
| | | "path-is-absolute": "^1.0.0", |
| | | "underscore": "^1.13.1", |
| | | "xmlbuilder": "^10.0.0" |
| | | }, |
| | | "dependencies": { |
| | | "bluebird": { |
| | | "version": "3.4.7", |
| | | "resolved": "https://registry.npmmirror.com/bluebird/-/bluebird-3.4.7.tgz", |
| | | "integrity": "sha512-iD3898SR7sWVRHbiQv+sHUtHnMvC1o3nW5rAcqnq3uOn07DSAppZYUkIGslDz6gXC7HfunPe7YVBgoEJASPcHA==" |
| | | }, |
| | | "jszip": { |
| | | "version": "3.10.1", |
| | | "resolved": "https://registry.npmmirror.com/jszip/-/jszip-3.10.1.tgz", |
| | | "integrity": "sha512-xXDvecyTpGLrqFrvkrUSoxxfJI5AH7U8zxxtVclpsUtMCq4JQ290LY8AW5c7Ggnr/Y/oK+bQMbqK2qmtk3pN4g==", |
| | | "requires": { |
| | | "lie": "~3.3.0", |
| | | "pako": "~1.0.2", |
| | | "readable-stream": "~2.3.6", |
| | | "setimmediate": "^1.0.5" |
| | | } |
| | | }, |
| | | "underscore": { |
| | | "version": "1.13.6", |
| | | "resolved": "https://registry.npmmirror.com/underscore/-/underscore-1.13.6.tgz", |
| | | "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==" |
| | | } |
| | | } |
| | | }, |
| | | "map-cache": { |
| | |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "option": { |
| | | "version": "0.2.4", |
| | | "resolved": "https://registry.npmmirror.com/option/-/option-0.2.4.tgz", |
| | | "integrity": "sha512-pkEqbDyl8ou5cpq+VsnQbe/WlEy5qS7xPzMS1U55OCG9KPvwFD46zDbxQIj3egJSFc3D+XhYOPUzz49zQAVy7A==" |
| | | }, |
| | | "ora": { |
| | | "version": "1.4.0", |
| | |
| | | "sprintf-js": { |
| | | "version": "1.0.3", |
| | | "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", |
| | | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", |
| | | "dev": true |
| | | "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" |
| | | }, |
| | | "ssf": { |
| | | "version": "0.10.3", |
| | |
| | | } |
| | | } |
| | | }, |
| | | "xmlbuilder": { |
| | | "version": "10.1.1", |
| | | "resolved": "https://registry.npmmirror.com/xmlbuilder/-/xmlbuilder-10.1.1.tgz", |
| | | "integrity": "sha512-OyzrcFLL/nb6fMGHbiRDuPup9ljBycsdCypwuyg5AAHvyWzGfChJpCXMG88AGTIMFhGZ9RccFN1e6lhg3hkwKg==" |
| | | }, |
| | | "xmlchars": { |
| | | "version": "2.2.0", |
| | | "resolved": "https://registry.npmmirror.com/xmlchars/-/xmlchars-2.2.0.tgz", |
| | |
| | | "layui": "^2.6.8", |
| | | "luckyexcel": "^1.0.1", |
| | | "luckysheet": "^2.1.13", |
| | | "mammoth": "^1.7.1", |
| | | "muse-ui": "^3.0.2", |
| | | "node-emoji": "^1.11.0", |
| | | "popper.js": "^1.16.1", |
| | |
| | | <template> |
| | | <div class="tinymce-box"> |
| | | <div class="tinymce-box" style="height: 100%"> |
| | | <editor |
| | | v-model="myValue" |
| | | :init="init" |
| | |
| | | }, |
| | | plugins: { |
| | | type: [String, Array], |
| | | default: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template code codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern emoticons autosave bdmap indent2em autoresize formatpainter axupimgs' |
| | | default: 'print preview searchreplace autolink directionality visualblocks visualchars fullscreen image link media template code codesample table charmap hr pagebreak nonbreaking anchor insertdatetime advlist lists wordcount imagetools textpattern help emoticons autosave bdmap indent2em autoresize formatpainter axupimgs', |
| | | }, |
| | | toolbar: { |
| | | type: [String, Array], |
| | |
| | | language: 'zh_CN', |
| | | skin_url: `/static/tinymce/skins/ui/oxide`, |
| | | convert_urls: false, |
| | | fullscreen_native: false, |
| | | height: 500, |
| | | // content_cssï¼ä¸ºç¼è¾åºæå®cssæä»¶ï¼,å ä¸å°±ä¸æ¾ç¤ºåæ°ç»è®¡äº |
| | | content_css: `/static/tinymce/skins/content/default/content.css`, |
| | |
| | | } |
| | | |
| | | </script> |
| | | <style scoped> |
| | | |
| | | <style> |
| | | div.tox.tox-tinymce.tox-tinymce--toolbar-sticky-off{ |
| | | height: 100% !important; |
| | | } |
| | | </style> |
| | |
| | | .el-form-item { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .full-screen{ |
| | | position: absolute; |
| | | right: 52px; |
| | | top: 22px; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | |
| | | :key="upIndex" @handleWeave="handleWeave"/> |
| | | </div> |
| | | </div> |
| | | <el-dialog title="å¨çº¿ç¼å¶" :visible.sync="claimVisible" width="80%" :modal-append-to-body="false"> |
| | | <Word style="height:70vh" v-if="claimVisible" ref="Word"/> |
| | | <el-dialog title="å¨çº¿ç¼å¶" :visible.sync="claimVisible" width="25cm" :modal-append-to-body="false" :fullscreen="fullscreen"> |
| | | <div class="full-screen"> |
| | | <i class="el-icon-full-screen" style="cursor: pointer;font-size: 18px" @click="fullscreen=true;" v-if="!fullscreen"></i> |
| | | <img src="../../../static/img/no-full.svg" alt="" v-else style="cursor: pointer;" @click="fullscreen=false;" > |
| | | </div> |
| | | <Word :style="fullscreen?'height:83vh':'height:70vh'" v-if="claimVisible" ref="Word" :value="value"/> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="claimVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmClaim">ç¡® å®</el-button> |
| | |
| | | <script> |
| | | import ValueTable from '../tool/value-table.vue' |
| | | import Word from '../tool/word.vue' |
| | | // import convertFileToHtml from '../../util/file'; |
| | | export default { |
| | | components: { |
| | | ValueTable, |
| | |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | statusList:[], |
| | | claimVisible:false |
| | | claimVisible:false, |
| | | fullscreen:false, |
| | | value:'' |
| | | } |
| | | }, |
| | | watch:{ |
| | | claimVisible(val){ |
| | | this.fullscreen = false; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.getPower() |
| | | }, |
| | | methods: { |
| | | // ...convertFileToHtml(), |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | |
| | | |
| | | //æ¬å° |
| | | Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80"; |
| | | const javaApi = 'http://192.168.0.10:8001';//æ |
| | | const javaApi = 'http://192.168.0.161:8001';//æ |
| | | // const javaApi = 'http://114.132.189.42:9006';//æµè¯æ |
| | | //èäºæå¡å¨ |
| | | // Vue.prototype.LOCATIONVUE = "http://syxt.shxiao2.cn"; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import * as pdfjsLib from 'pdfjs-dist'; |
| | | import { convertToHtml } from 'mammoth'; |
| | | |
| | | export default { |
| | | methods: { |
| | | convertFileToHtml(file) { |
| | | const fileType = file.type.split('/')[1]; |
| | | const fileExtension = fileType === 'pdf' ? '.pdf' : '.docx'; |
| | | |
| | | // å°æä»¶è½¬æ¢ä¸ºBlob对象 |
| | | const fileReader = new FileReader(); |
| | | fileReader.onload = async (event) => { |
| | | const arrayBuffer = event.target.result; |
| | | const byteArray = new Uint8Array(arrayBuffer); |
| | | const blob = new Blob([byteArray], { type: fileType + fileExtension }); |
| | | |
| | | if (fileType === 'pdf') { |
| | | // 使ç¨pdfjsLibå°PDF转æ¢ä¸ºHTML |
| | | const pdfData = await pdfjsLib.getDocument(blob).promise; |
| | | const pageNumber = 1; |
| | | const scale = 1; |
| | | const viewport = pageNumber * scale; |
| | | const canvas = document.createElement('canvas'); |
| | | const context = canvas.getContext('2d'); |
| | | canvas.width = pdfData.internal.pageSize.getWidth() * scale; |
| | | canvas.height = pdfData.internal.pageSize.getHeight() * scale; |
| | | const renderContext = { |
| | | canvasContext: context, |
| | | viewport: viewport, |
| | | }; |
| | | const renderTask = pdfData.getPage(pageNumber).render(renderContext); |
| | | await renderTask.promise; |
| | | const base64Image = canvas.toDataURL('image/png'); |
| | | |
| | | // å°base64Image转æ¢ä¸ºHTML |
| | | const htmlContent = `<img src="${base64Image}" />`; |
| | | return htmlContent; |
| | | } else if (fileType === 'docx') { |
| | | // 使ç¨mammothå°Word转æ¢ä¸ºHTML |
| | | const htmlContent = await convertToHtml(blob, { format: 'html' }); |
| | | return htmlContent; |
| | | } |
| | | }; |
| | | fileReader.readAsArrayBuffer(blob); |
| | | }, |
| | | }, |
| | | }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <?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="1712111454775" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5950" width="18" height="18" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M354.133333 682.666667H256v-42.666667h170.666667v170.666667H384v-98.133334L243.2 853.333333l-29.866667-29.866666L354.133333 682.666667z m358.4 0l140.8 140.8-29.866666 29.866666-140.8-140.8V810.666667h-42.666667v-170.666667h170.666667v42.666667h-98.133334zM354.133333 384L213.333333 243.2l29.866667-29.866667L384 354.133333V256h42.666667v170.666667H256V384h98.133333z m358.4 0H810.666667v42.666667h-170.666667V256h42.666667v98.133333L823.466667 213.333333l29.866666 29.866667L712.533333 384z" fill="#606266" p-id="5951"></path></svg> |