当前位置: 首页 > news >正文

国内的优秀网站做网站需要什么系统

国内的优秀网站,做网站需要什么系统,seo关键词查询工具,淄博城乡建设局网站文章目录 后端 doc 转 docxdcox - preview安装导入使用注意 最近菜鸟刚搞完签字#xff0c;结果需求就加了#xff0c;如果合同有附件#xff08;.doc.docx#xff09;#xff0c;签名就是签到附件里面#xff0c;没有附件才是签到那个html里面#xff01; 这里附件签名… 文章目录 后端 doc 转 docxdcox - preview安装导入使用注意 最近菜鸟刚搞完签字结果需求就加了如果合同有附件.doc.docx签名就是签到附件里面没有附件才是签到那个html里面 这里附件签名过后就不能像html那样可以修改原html了毕竟这个要写入word文档实现不了所以我们公司退而求其次只需要记录附件和签字的对应关系以及何时签字就行 实现难点在于前端只能展示docx后端也不好把 doc、docx 转换为html 只能说 doc 是什么天杀的格式 后端 doc 转 docx 但是好在后端可以将 doc 转成 docx菜鸟是前端不知道后端咋搞的只要了点代码过来各位可以参考一下 public void docToDocx(String batchId, HttpServletResponse response) throws IOException { // FileEntity data adminFileService.queryOne(batchId).getData(); // String path data.getPath();response.setContentType(application/vnd.openxmlformats-officedocument.wordprocessingml.document);response.setHeader(Content-Disposition, attachment; filename\converted.docx\);ServletOutputStream outputStream response.getOutputStream();File inputWord new File(E:\\03 项目沟通文档\\1820994860746969088-(7.31第二次修改)农大三代建库测序技术委托合同.doc);try (ByteArrayOutputStream byteArrayOutputStream new ByteArrayOutputStream();InputStream docxInputStream new FileInputStream(inputWord)) {IConverter converter LocalConverter.builder().build();boolean flag false;flag converter.convert(docxInputStream).as(DocumentType.DOC).to(byteArrayOutputStream).as(DocumentType.DOCX).execute();if (flag) {converter.shutDown();}byteArrayOutputStream.writeTo(outputStream);System.out.println(转换成功);} catch (Exception e) {e.printStackTrace();} }后端下载的插件名称 dependencygroupIdcom.documents4j/groupIdartifactIddocuments4j-local/artifactIdversion1.0.3/version /dependency dependencygroupIdcom.documents4j/groupIdartifactIddocuments4j-transformer-msoffice-word/artifactIdversion1.0.3/version /dependency好了后端菜鸟就不多废话了接下来是重头戏前端代码 dcox - preview 都转化成了 docx 了那我前端展示也是分分钟的事情需要使用插件dcox - preview 安装 npm i docx-preview --save导入 import { renderAsync } from docx-preview;使用 js getPrintApi(route.query.batchId).then(async (res) {await nextTick();let reportContainer document.getElementById(reportContainer);renderAsync(res,reportContainer, // HTMLElement 渲染文档内容的元素,null // HTMLElement, 用于呈现文档样式、数字、字体的元素。如果为 null则将使用 reportContainer。).then((res) {console.log(res----, res);let bigBox document.querySelector(.bigBox);let contractBox document.getElementById(reportContainer);let st window.getComputedStyle(contractBox, null);var tr st.getPropertyValue(transform);if (tr none) {isScale.value false;bigBox.style.height auto;const height bigBox.offsetHeight;bigBoxHeight.value height;} else {isScale.value true;bigBox.style.height auto;const height bigBox.offsetHeight * 0.5;bigBoxmargin.value (window.innerWidth - 700 * 0.5) / 2;bigBoxHeight.value height;}}).catch((err) {console.log(err);// eslint-disable-next-lineElMessage({message: 网络问题请刷新界面,type: error,});});}).catch((err) {console.log(err);});template templatediv classbigBox :style{ height: bigBoxHeight px }div idreportContainer :style{ marginLeft: isScale ? bigBoxmargin px : auto }/div/divdiv classbtnBoxel-button typeprimary clickshowSign前往签字/el-button/div!-- 签字弹窗 --sign v-ifsignshow :dialogVisiblesignshow closeEventhideSign/sign /template注意 1、这里的请求一定要加上 responseType: “arraybuffer”, 2、这里 bigBoxHeight 、bigBoxmargin 可以见我上一篇文章前端实现签字效果合同展示
http://www.hkea.cn/news/14295700/

相关文章:

  • 互联网做网站排明虚拟机wordpress插件
  • 域客士单页网站地方网站做相亲赢利点在哪里
  • 做网站现在用什么软件锦州网站建设预订
  • 重庆南岸网站建设天津公司网站建设
  • 网后台的网站怎么做装修公司招聘网站
  • 做龙之向导网站有用吗成品播放器
  • 网站图片什么格式wordpress 修改主题
  • 做app网站的软件有哪些内容网站推广常用方法有哪些
  • 四川高速建设公司网站电影资源分享网站怎么做的
  • 建网站算法学做网站应该看那些书
  • 个人记账网站开发时长网页设计实践报告
  • 有人知道网站怎么做吗中国建设银行的网站用户名是什么意思
  • 建一个app和网站那个比较好中国能源建设集团有限公司董事长
  • 简述商务网站建设做明星简介网站侵权吗
  • 全景网站制作青岛 生物类网站建设
  • 网页设计视频网站建设乌海网站开发
  • 网站seo百度百科网站如何绑定虚拟主机
  • 塘厦建设网站注册深圳公司新规定
  • 保安做网站河南专业网站建设创新中心
  • o2o电商网站建设地下城钓鱼网站如何做
  • 外贸网站后台国外著名购物网站排名
  • 房地产公司网站建设报价方案网站建设 实施计划书
  • 网站建设外包服务网站安全检测可以检测哪些内容风险信息
  • 藁城外贸网站建设长沙简单的网站建设公司
  • 设计商标的网站网站后台html5模板
  • 获取网站访客qq号码大专计算机专业主要学什么
  • 首页网站怎么做的国产成年做视频网站
  • 邯郸手机网站开发价格ie的常用网站
  • 网站建设公司华网天下买赠两年学院宣传网站制作
  • 站长工具网站推广网站速度对seo的影响