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

空间中国网站地址多少新闻摘抄大全

空间中国网站地址多少,新闻摘抄大全,网站建设述职报告,做网站手机模板app前言 公司新需求需要导出ppt给业务用,查阅资料后发现也挺简单的,记录一下。 如有不懂的可以留言!!! 1.安装包 npm install pptxgenjs --save2.引入包 在需要使用的文件中引入 import Pptxgenfrom "pptxgenjs&…

前言

公司新需求需要导出ppt给业务用,查阅资料后发现也挺简单的,记录一下。

如有不懂的可以留言!!!

ppt PPT

1.安装包

npm install pptxgenjs --save

2.引入包

在需要使用的文件中引入

import Pptxgenfrom "pptxgenjs"

导出事件

 <Button  type="primary"  @click="exportPPT">导出周报</Button>

这里有几个注意点说一下

  • slide 当前PPT页,可以通过addText(),addTable()等方法在当前页面添加文字、图表、图片等元素
  • Text 文字,可以对ppt文字颜色、字体大小、字体阴影、背景颜色、文字位置等属性进行配置,达到自己想要的效果
  • Table 表格, 可以添加ppt表格,但是表格内只能放文字和数字
  • Charts 图表 图表,可以支持常见的饼状图、柱状图、折线图等,配置项也挺全的,横纵坐标,legend等啥都有,基本可以满足常用。

ppt

3.使用

js代码

exportPPT() {// 1. 创建PPTconst pres = new Pptxgen()// 2. 创建一个PPT页面,每调用一次 pres.addSlide() 都可以生成一张新的页面// 建议把每个页面的构造抽成一个个函数,然后通过函数调用生成新页面,代码不会很乱const slide = pres.addSlide()// 3. 调用addTetx(),在PPT页面中插入文字“Hello World from PptxGenJS...”// 括号里面是对文字的配置,文字横坐标x为1.5,纵坐标y为1.5,字体颜色 363636……// 关于坐标长度与px的转换 x 1 = 127~128px 左右slide.addText('需求进度', {x: 0.2, // 横坐标y: 0.4,color: '363636',fontSize: 24, // 字号fill: { color: 'F1F1F1' },align: 'left'})const rows = []// Row One: cells will be formatted according to any options provided to `addTable()`rows.push(['序号', '需求标题', '预计发版时间', '完成时间', '进度情况', '备注'])const border = [ // 表格边框{ pt: 0.5, color: '#4f4f4f' },{ type: 'none' },{ pt: 0.5, color: '#4f4f4f' },{ type: 'none' }]const options = { valign: 'middle', border: border, color: '0000ff' }	// 单元格样式配置// Row Two: set/override formatting for each cellrows.push([{ text: '1', options },{ text: '对接小包物流商:京东国际=获取包裹轨迹状态', options },{ text: '2023-11-02 00:00:00', options },{ text: '2023-11-12 00:00:00', options },{ text: '开发中', options },{ text: '备注哦', options }], [{ text: '2', options },{ text: '对接小包物流商:邦递国际 BDGJ', options },{ text: '2023-11-22 00:00:00', options },{ text: '2023-11-15 00:00:00', options },{ text: '已上线', options },{ text: '测试', options }])slide.addTable(rows,{x: 0.5,y: 1.0,w: 9.0,h: 3,fontSize: 16,colW: [0.75, 2.0, 0.85, 0.8], // 表格每一列宽度rowH: 0.31, // 单元格默认高度color: '363636'})// EX B: Pass the same objects as a cell's `text` valueconst arrTabRows = [[{ text: 'Cell 1 A', options: { fontFace: 'Arial' } },{ text: 'Cell 1 B', options: { fontFace: 'Courier' } }]]slide.addTable(arrTabRows, { x: 0.5, y: 4.5, w: 9, h: 1, colW: [1.5, 1.5, 6] })const slide2 = pres.addSlide()// 3. 调用addTetx(),在PPT页面中插入文字“Hello World from PptxGenJS...”// 括号里面是对文字的配置,文字横坐标x为1.5,纵坐标y为1.5,字体颜色 363636……// 关于坐标长度与px的转换 x 1 = 127~128px 左右slide2.addText('Amazon平台', {x: 0.4, // 横坐标y: 0.4,color: '363636',fontSize: 24, // 字号fill: { color: 'F1F1F1' },align: 'center'})slide2.addText('2023-10-01至2023-10-07主要国家发货发布', {x: 0.5, // 横坐标y: 0.8,color: '363636',fontSize: 24, // 字号fill: { color: 'F1F1F1' },align: 'center'})// let pres = new pptxgen();const dataChartAreaLine = [{name: '菜鸟-平邮',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [1500, 4600, 5156, 3167, 8510, 8009, 6006, 7855, 12102, 12789]},{name: '菜鸟-挂号',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [1000, 2600, 3456, 4567, 5010, 6009, 7006, 8855, 9102, 10789]},{name: '顺友-平邮',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [2000, 4200, 5156, 3167, 6510, 8009, 6006, 5855, 10102, 11789]},{name: '顺友-挂号',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [1300, 2100, 3456, 4567, 4010, 6009, 7006, 6855, 8102, 10789]},{name: '燕文-平邮',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [2000, 4200, 5156, 3167, 6510, 8009, 6006, 5855, 10102, 11789]},{name: '燕文-挂号',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [1300, 2100, 3456, 4567, 4010, 6009, 7006, 6855, 8102, 10789]}]slide2.addChart(pres.ChartType.bar, dataChartAreaLine,{x: 0.6,y: 1.2,w: 8,h: 3.5,title: 'Amazon平台' // 标题})const tempResult3 = '英国上涨5%,德国上涨10%,法国上涨12%,意大利上涨6%,西班牙上涨10%,XXXXX'slide2.addText(tempResult3, {x: 0.5, // 横坐标y: 5.2,color: '363636',fontSize: 18, // 字号fill: { color: 'F1F1F1' },align: 'center'})const slide3 = pres.addSlide()// 3. 调用addTetx(),在PPT页面中插入文字“Hello World from PptxGenJS...”// 括号里面是对文字的配置,文字横坐标x为1.5,纵坐标y为1.5,字体颜色 363636……// 关于坐标长度与px的转换 x 1 = 127~128px 左右slide3.addText('SMT平台', {x: 0.5, // 横坐标y: 0.5,color: '363636',fontSize: 24, // 字号fill: { color: 'F1F1F1' },align: 'center'})// let pres = new pptxgen();const dataChartAreaLine3 = [{name: '菜鸟-平邮',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [4500, 4000, 3156, 3167, 8510, 8009, 6006, 7855, 11102, 12789]},{name: '菜鸟-挂号',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [3000, 2600, 3456, 4567, 5010, 6009, 7006, 8855, 9102, 10789]},{name: '顺友-平邮',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [2000, 4200, 5156, 3167, 6510, 8009, 6006, 5855, 10102, 11789]},{name: '顺友-挂号',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [1300, 2100, 3456, 4567, 4010, 6009, 7006, 6855, 8102, 10789]},{name: '燕文-平邮',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [2000, 4200, 5156, 3167, 6510, 8009, 6006, 5855, 10102, 11789]},{name: '燕文-挂号',labels: ['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西', '智利'],values: [1300, 2100, 3456, 4567, 4010, 6009, 7006, 6855, 8102, 10789]}]slide3.addChart(pres.ChartType.bar, dataChartAreaLine3,{ x: 0.8, y: 1, w: 8, h: 3 })const rows3 = []// Row One: cells will be formatted according to any options provided to `addTable()`rows3.push(['美国', '英国', '德国', '法国', '意大利', '西班牙', '加拿大', '墨西哥', '巴西'])// const border3 = [ // 表格边框//   { pt: 0.5, color: '#4f4f4f' },//   { type: 'none' },//   { pt: 0.5, color: '#4f4f4f' },//   { type: 'none' }// ]// const options = { valign: 'middle', border: border3, color: '0000ff' }	// 单元格样式配置// Row Two: set/override formatting for each cell// options 这个options是上面公用的,如果不共用,单独拉一个rows3.push([{ text: '1500', options },{ text: '4600', options },{ text: '5156', options },{ text: '3167', options },{ text: '3167', options },{ text: '3167', options },{ text: '3167', options },{ text: '3167', options },{ text: '3167', options }], [{ text: '1500', options },{ text: '3600', options },{ text: '5156', options },{ text: '1167', options },{ text: '3167', options },{ text: '2167', options },{ text: '3167', options },{ text: '4167', options },{ text: '3167', options }])slide3.addTable(rows3,{x: 1.2,y: 4,w: 8.0,h: 1.5,fontSize: 12,colW: [0.75, 2.0, 0.85, 0.8], // 表格每一列宽度rowH: 0.25, // 单元格默认高度color: '363636'})slide3.addText('总计', {x: 0.6, // 横坐标y: 4.5,color: '363636',fontSize: 12, // 字号fill: { color: 'F1F1F1' },align: 'left'})slide3.addText('其它', {x: 0.6, // 横坐标y: 4.9,color: '363636',fontSize: 12, // 字号fill: { color: 'F1F1F1' },align: 'left'})pres.author = '作者_abin'pres.company = '公司'// 4. 生成PPT, 括号中的fileName,就是生成的 PPT名字,可以使用 .then 或者 .catch处理对应事件。pres.writeFile({ fileName: '20231124周报6.2.pptx' }).then(() => {this.$Message.success('导出成功')})},

文章转载自:
http://dinncoscordato.ydfr.cn
http://dinncomohist.ydfr.cn
http://dinncolyophobic.ydfr.cn
http://dinncododdery.ydfr.cn
http://dinncosymbololatry.ydfr.cn
http://dinncosextain.ydfr.cn
http://dinncocertificate.ydfr.cn
http://dinncomuhtar.ydfr.cn
http://dinncorubbingstone.ydfr.cn
http://dinncoderacinate.ydfr.cn
http://dinncotransliterator.ydfr.cn
http://dinncocontessa.ydfr.cn
http://dinncoquitrent.ydfr.cn
http://dinncocavelike.ydfr.cn
http://dinncojohn.ydfr.cn
http://dinncocytotechnician.ydfr.cn
http://dinncopc99.ydfr.cn
http://dinncoposology.ydfr.cn
http://dinncochartography.ydfr.cn
http://dinncoarsphenamine.ydfr.cn
http://dinncocraftily.ydfr.cn
http://dinncokibbutznik.ydfr.cn
http://dinncopete.ydfr.cn
http://dinncogirlo.ydfr.cn
http://dinncocarrefour.ydfr.cn
http://dinncounmelted.ydfr.cn
http://dinncochamorro.ydfr.cn
http://dinncodoxorubicin.ydfr.cn
http://dinncoosteochondrosis.ydfr.cn
http://dinncoindorsee.ydfr.cn
http://dinncohmnzs.ydfr.cn
http://dinncodamask.ydfr.cn
http://dinncoramekin.ydfr.cn
http://dinncoeulamellibranch.ydfr.cn
http://dinnconiigata.ydfr.cn
http://dinncopetulant.ydfr.cn
http://dinncobazaar.ydfr.cn
http://dinncocynicism.ydfr.cn
http://dinncoquadriphonic.ydfr.cn
http://dinncobulrush.ydfr.cn
http://dinncocompromise.ydfr.cn
http://dinncocrustily.ydfr.cn
http://dinncolackey.ydfr.cn
http://dinncoamygdale.ydfr.cn
http://dinncogolfer.ydfr.cn
http://dinncosuperatomic.ydfr.cn
http://dinncoimho.ydfr.cn
http://dinncocosmography.ydfr.cn
http://dinncooverwatch.ydfr.cn
http://dinncoconterminal.ydfr.cn
http://dinncosackable.ydfr.cn
http://dinncosport.ydfr.cn
http://dinncoimmunochemistry.ydfr.cn
http://dinncorebranch.ydfr.cn
http://dinncorefrigerator.ydfr.cn
http://dinncosylphlike.ydfr.cn
http://dinncopkzip.ydfr.cn
http://dinncoshea.ydfr.cn
http://dinncopsychologize.ydfr.cn
http://dinncounlifelike.ydfr.cn
http://dinnconahum.ydfr.cn
http://dinncocaseinogen.ydfr.cn
http://dinncodescribing.ydfr.cn
http://dinncoinitiator.ydfr.cn
http://dinncoidyllic.ydfr.cn
http://dinncohypermeter.ydfr.cn
http://dinncobeluga.ydfr.cn
http://dinncoteleseism.ydfr.cn
http://dinncotad.ydfr.cn
http://dinncounsuspicious.ydfr.cn
http://dinncoplanner.ydfr.cn
http://dinncovestige.ydfr.cn
http://dinncodetector.ydfr.cn
http://dinncoportreeve.ydfr.cn
http://dinncoeducrat.ydfr.cn
http://dinncomultivariable.ydfr.cn
http://dinncobrian.ydfr.cn
http://dinncointeractional.ydfr.cn
http://dinncoracketeering.ydfr.cn
http://dinncosidewipe.ydfr.cn
http://dinnconorthland.ydfr.cn
http://dinncobellybutton.ydfr.cn
http://dinncoschedular.ydfr.cn
http://dinncodossy.ydfr.cn
http://dinncotruculency.ydfr.cn
http://dinncospeckless.ydfr.cn
http://dinncothespis.ydfr.cn
http://dinncope.ydfr.cn
http://dinncopassiontide.ydfr.cn
http://dinncodivisible.ydfr.cn
http://dinncooedema.ydfr.cn
http://dinncorecrudescent.ydfr.cn
http://dinncofructidor.ydfr.cn
http://dinncometamer.ydfr.cn
http://dinncoorigin.ydfr.cn
http://dinnconondrinking.ydfr.cn
http://dinncogastrectomy.ydfr.cn
http://dinncospirochetic.ydfr.cn
http://dinncohypnotically.ydfr.cn
http://dinncohague.ydfr.cn
http://www.dinnco.com/news/86966.html

相关文章:

  • 汕头网站建设运营团队百度最新版本2022
  • 学做蛋糕哪个网站好想学互联网从哪里入手
  • 怎么搭建php网站济南网站seo
  • 贵州网站建设设计公司哪家好代运营是什么意思
  • 普通电脑怎么建设网站视频剪辑培训机构哪个好
  • 做数据分析网站技术培训机构排名前十
  • 什么叫网站收录深圳搜索引擎优化收费
  • 北京织梦网站建设seo优化是怎么优化的
  • 宁波网站建设联系方法怎么进行网站关键词优化
  • 怎么做网站的快照搜索排名竞价
  • 重庆网站建设 渝seo推广多少钱
  • 苏州做淘宝网站专门搜索知乎内容的搜索引擎
  • 怎么在视频网站做淘宝客成都公司网站seo
  • 深圳做网站龙华新科推广app下载
  • 建设网站 备案商城网站开发公司
  • 网站备案有哪些费用平台推广公众平台营销
  • 苍南网站建设软文推广是什么意思?
  • 网站主页不收录广东seo推广方案
  • 做学校后台网站用什么浏览器红河网站建设
  • 网站制作和推广lv官网今日最新新闻
  • wordpress 评论 正在提交_请稍后网站站外优化推广方式
  • 手机端网页企业站seo外包
  • 网站后台密码忘了怎么办品牌营销策划是干嘛的
  • 昆明网站建设 昆明光硕品牌推广策略与方式
  • 网站收录平台方法企业网络营销方案
  • 40个超好玩的网页小游戏网站seo推广排名
  • 个人做外贸的网站那个好做山东服务好的seo公司
  • 网站优化排名哪家好seo去哪里学
  • 做的网站访问不了网络推广项目外包公司
  • 南昌网站设计哪家专业好公司员工培训方案