config.js 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864
  1. /**
  2. * ppt 设置
  3. */
  4. //pageList数据结构
  5. const pageList = [{
  6. id: 1, //pageId
  7. title: '我是版式一', //pageTitle
  8. modelId: 4, //版式id
  9. key: 0, //用于重新渲染
  10. layers:[//page图层元素
  11. {//形状元素
  12. id:'xvSIDSN',//图层元素id
  13. type:'shape',//图层类型:shape line text
  14. shapeType:'Rect',//用于指定BaseShape
  15. left:0,top:0,//位置信息,单位px
  16. width:100,height:100,//大小信息,单位px
  17. fill:'#FF0000',//填充颜色,支持透明度
  18. opacity:1,//元素整体的透明度
  19. outline:{//边框信息:对应rect的stroke属性
  20. style:'solid',//实线solid虚线dashed
  21. width:1,//边框的宽度
  22. color:'#008000',//边框颜色,也支持透明度
  23. }
  24. },
  25. {//线条元素
  26. id:'AxsdUE',
  27. type:'line',
  28. left:0,top:0,width:100,height:100,
  29. start:[0,0],//线条起点位置,对应line的x1,y1
  30. end:[100,100],//线条的终点位置,对应line的x2,y2
  31. color:'#008000',//线条颜色
  32. points:['','arrow'],//线条的端点样式:([起点样式, 终点样式];'':无;'arrow':箭头
  33. style:'solid',//线条样式:实现虚线
  34. },
  35. ],
  36. elements: [{ //page元素
  37. type: 'chart', //元素类型:chart image text sheet
  38. position: 1, //元素所在位置
  39. chartId: '31161cf31e33bd262dca99e161308064', //动态图标对应的UniqueCode
  40. }, {
  41. type: 'image',
  42. position: 2,
  43. src: 'http://xxx.png', //图片对应的线上地址
  44. }, {
  45. type: 'text',
  46. position: 4,
  47. content: 'aaa', //纯文本信息
  48. richContent: '<p>aaa</p>' //富文本信息
  49. }, {
  50. type:'sheet',
  51. position:3,
  52. sheetId:'ajhskdakd',//表格id
  53. sheetHeight:'100px',//表格iframe所占的高度,转报告会用到 表格iframe加载完毕才会有
  54. }]
  55. }, ]
  56. //版式预览配置
  57. export const formatPre = [{
  58. modelId: 1, //版式id
  59. text: '一张图', //描述文字
  60. },
  61. {
  62. modelId: 2,
  63. text: '左图+文字'
  64. },
  65. {
  66. modelId: 3,
  67. text: '左2图+文字'
  68. }, {
  69. modelId: 4,
  70. text: '3图+文字'
  71. },{
  72. modelId:7,
  73. text:'两张图'
  74. },{
  75. modelId: 5,
  76. text: '四张图'
  77. }, {
  78. modelId: 6,
  79. text: '全文字'
  80. },{
  81. modelId:8,
  82. text:'上图+文字'
  83. },{
  84. modelId:9,
  85. text:'上2图+文字'
  86. },{
  87. modelId:10,
  88. text:'上6图+文字'
  89. },
  90. {
  91. modelId:11,
  92. text:'上4图+文字'
  93. },{
  94. modelId:12,
  95. text:'上6图'
  96. },{
  97. modelId:13,
  98. text:'xxx'
  99. }
  100. ]
  101. //版式id对应组件名
  102. export const modelMap = {
  103. 1: 'One',
  104. 2: 'Two',
  105. 3: 'Three',
  106. 4: 'Four',
  107. 5: 'Five',
  108. 6: 'Six',
  109. 7: 'Seven',
  110. 8: 'Eight',
  111. 9: 'Nine',
  112. 10:'Ten',
  113. 11:'Ele',
  114. 12:'Twelve',
  115. 13:'Thirteen'
  116. }
  117. //版式信息,用于判断图表/文字插入哪个位置
  118. export const modelInfo = {
  119. 1: {
  120. elNum: 1, //可容纳元素的个数
  121. elType: ['chart'], //可容纳元素的类型,index+1与positions对应
  122. positions: [1], //元素的位置索引
  123. elChartNum: 1,
  124. elTextNum: 0
  125. },
  126. 2: {
  127. elNum: 2,
  128. elType: ['chart', 'text'],
  129. positions: [1, 2],
  130. elChartNum: 1,
  131. elTextNum: 1,
  132. elTextPosition: 2
  133. },
  134. 3: {
  135. elNum: 3,
  136. elType: ['chart', 'chart', 'text'],
  137. positions: [1, 2, 3],
  138. elChartNum: 2,
  139. elTextNum: 1,
  140. elTextPosition: 3
  141. },
  142. 4: {
  143. elNum: 4,
  144. elType: ['chart', 'chart', 'chart', 'text'],
  145. positions: [1, 2, 3, 4],
  146. elChartNum: 3,
  147. elTextNum: 1,
  148. elTextPosition: 4
  149. },
  150. 5: {
  151. elNum: 4,
  152. elType: ['chart', 'chart', 'chart', 'chart'],
  153. positions: [1, 2, 3, 4],
  154. elChartNum: 4,
  155. elTextNum: 0
  156. },
  157. 6: {
  158. elNum: 1, //可容纳元素的个数
  159. elType: ['text'], //可容纳元素的类型,index+1与positions对应
  160. positions: [1], //元素的位置索引
  161. elChartNum: 0,
  162. elTextNum: 1,
  163. elTextPosition: 1
  164. },
  165. 7:{
  166. elNum:2,
  167. elType:['chart','chart'],
  168. positions:[1,2],
  169. elChartNum:2,
  170. elTextNum:0
  171. },
  172. 8:{
  173. elNum:2,
  174. elType:['chart','text'],
  175. positions:[1,2],
  176. elChartNum:1,
  177. elTextNum:1,
  178. elTextPosition: 2
  179. },
  180. 9:{
  181. elNum:3,
  182. elType:['chart','chart','text'],
  183. positions:[1,2,3],
  184. elChartNum:2,
  185. elTextNum:1,
  186. elTextPosition: 3
  187. },
  188. 12:{
  189. elNum:6,
  190. elType:['chart','chart','chart','chart','chart','chart'],
  191. positions:[1,2,3,4,5,6],
  192. elChartNum:6,
  193. elTextNum:0,
  194. /* elTextPosition: 7 */
  195. },
  196. 11:{
  197. elNum:5,
  198. elType:['chart','chart','chart','chart','text'],
  199. positions:[1,2,3,4,5],
  200. elChartNum:4,
  201. elTextNum:1,
  202. elTextPosition: 5
  203. },
  204. 10:{
  205. elNum:7,
  206. elType:['chart','chart','chart','chart','chart','chart','text'],
  207. positions:[1,2,3,4,5,6],
  208. elChartNum:6,
  209. elTextNum:1,
  210. elTextPosition: 7
  211. },
  212. 13:{
  213. elNum:2,
  214. elType:['chart','chart'],
  215. positions:[1,2],
  216. elChartNum:2,
  217. elTextNum:0
  218. }
  219. }
  220. //给标题预留的位置,单位%
  221. export const marginTop = 14
  222. const titleHeight = 7
  223. const restHeight = 100 - marginTop
  224. //版式位置宽高设置,x,y,width,height都是基于整张ppt的百分比
  225. //百分比的值来自./css/format.scss ->.chart-wrap,.editor-wrap
  226. //用于发布页生成PPT
  227. export const modelConfig = [{
  228. modelId: 1,
  229. elements: [{
  230. position: 1,
  231. width: 100*0.9, //单位%
  232. height: (restHeight)*0.9,
  233. x: (100-100*0.9)/2, //单位%,left
  234. /* y: ((restHeight)-(restHeight)*0.9)/2, //top */
  235. y:1.5
  236. }]
  237. }, {
  238. modelId: 2,
  239. elements: [{
  240. position: 1,
  241. width: 100*0.6,
  242. height:(restHeight)*0.8 ,
  243. x: 0,
  244. y: ((restHeight)-(restHeight)*0.8)/2
  245. }, {
  246. position: 2,
  247. width: 100*0.4,
  248. height: (restHeight)*0.8,
  249. x: 60,// or 60
  250. y: ((restHeight)-(restHeight)*0.8)/2
  251. }]
  252. },
  253. {
  254. modelId: 3,
  255. elements: [{
  256. position: 1,
  257. width: 100*0.5,
  258. height: (restHeight)*0.5*0.84,
  259. x: 0,
  260. y: ((restHeight)*0.5-(restHeight)*0.5*0.84)/2
  261. }, {
  262. position: 2,
  263. width: 100*0.5,
  264. height: (restHeight)*0.5*0.84,
  265. x: 0,
  266. //这个位置的图表布局是align-items: flex-start,所以紧接着上一个图表
  267. y: 50-7/* +((restHeight)*0.5-(restHeight)*0.5*0.84)/2 */,//or 50
  268. }, {
  269. position: 3,
  270. width: 100*0.5,
  271. height: (restHeight)*0.84,
  272. x: 50,
  273. y: ((restHeight)-(restHeight)*0.84)/2
  274. }]
  275. },
  276. {
  277. modelId: 4,
  278. elements: [{
  279. position: 1,
  280. width: 100*0.5,
  281. height: (restHeight)*0.5*0.84,
  282. x: 0,
  283. y: ((restHeight)*0.5-(restHeight)*0.5*0.84)/2
  284. }, {
  285. position: 2,
  286. width: 100*0.5,
  287. height: (restHeight)*0.5*0.84,
  288. x: 0,
  289. y: 50-7/* +((restHeight)*0.5-(restHeight)*0.5*0.84)/2 */,//or 50
  290. }, {
  291. position: 3,
  292. width: 100*0.5,
  293. height: (restHeight)*0.5*0.84,
  294. x: 50,//or 50
  295. y: ((restHeight)*0.5-(restHeight)*0.5*0.84)/2
  296. }, {
  297. position: 4,
  298. width: 100*0.5,
  299. height: (restHeight)*0.5*0.84,
  300. x: 50,
  301. y: 50-7/* +((restHeight)*0.5-(restHeight)*0.5*0.84)/2 */,//or 50
  302. }]
  303. },
  304. {
  305. modelId: 5,
  306. elements: [{
  307. position: 1,
  308. width: 100*0.5,
  309. height: (restHeight)*0.5*0.84,
  310. x: 0,
  311. y: ((restHeight)*0.5-(restHeight)*0.5*0.84)/2
  312. }, {
  313. position: 2,
  314. width: 100*0.5,
  315. height: (restHeight)*0.5*0.84,
  316. x: 0,
  317. y: 50-7/* +((restHeight)*0.5-(restHeight)*0.5*0.84)/2 */,//or 50
  318. }, {
  319. position: 3,
  320. width: 100*0.5,
  321. height: (restHeight)*0.5*0.84,
  322. x: 50,//or 50
  323. y: ((restHeight)*0.5-(restHeight)*0.5*0.84)/2
  324. }, {
  325. position: 4,
  326. width: 100*0.5,
  327. height: (restHeight)*0.5*0.84,
  328. x: 50,
  329. y: 50-7/* +((restHeight)*0.5-(restHeight)*0.5*0.84)/2 */,//or 50
  330. }]
  331. },
  332. {
  333. modelId: 6,
  334. elements: [{
  335. position: 1,
  336. width: 100*0.9,
  337. height: (100-marginTop)*0.9,
  338. x: (100-100*0.9)/2,
  339. y: ((100-marginTop)-(100-marginTop)*0.9)/2,
  340. }]
  341. },
  342. {
  343. modelId:7,
  344. elements:[{
  345. position:1,
  346. width:100*0.5,
  347. height:(restHeight)*0.8,
  348. x:0,
  349. y:((restHeight)-(restHeight)*0.8)/2
  350. },{
  351. position:2,
  352. width:100*0.5,
  353. height:(restHeight)*0.8,
  354. x:50,
  355. y:((restHeight)-(restHeight)*0.8)/2
  356. }]
  357. },
  358. {
  359. modelId:8,
  360. elements:[{
  361. position:1,
  362. width:100,
  363. height:(restHeight)*0.7*0.9,
  364. x:0,
  365. y:(restHeight*0.7-restHeight*0.7*0.9)/2
  366. },
  367. {
  368. position:2,
  369. width:100,
  370. height:(restHeight)*0.3*0.8,
  371. x:0,
  372. y:60
  373. }]
  374. },
  375. {
  376. modelId:9,
  377. elements:[{
  378. position:1,
  379. width:100*0.5,
  380. height:(restHeight)*0.7*0.9,
  381. x:0,
  382. y:(restHeight*0.7-restHeight*0.7*0.9)/2
  383. },
  384. {
  385. position:2,
  386. width:100*0.5,
  387. height:(restHeight)*0.7*0.9,
  388. x:50,
  389. y:(restHeight*0.7-restHeight*0.7*0.9)/2
  390. },
  391. {
  392. position:3,
  393. width:100*0.9,
  394. height:(restHeight)*0.3*0.8,
  395. x:0,
  396. y:60
  397. }
  398. ]
  399. },{
  400. modelId:12,
  401. elements:[{
  402. position:1,
  403. width:33,
  404. height:(restHeight)*0.48*0.9,
  405. x:0,
  406. y:(restHeight*0.48*0.1)/2
  407. },{
  408. position:2,
  409. width:33,
  410. height:(restHeight)*0.48*0.9,
  411. x:33,
  412. y:(restHeight*0.48*0.1)/2
  413. },
  414. {
  415. position:3,
  416. width:33,
  417. height:(restHeight)*0.48*0.9,
  418. x:33*2,
  419. y:(restHeight*0.48*0.1)/2
  420. },
  421. {
  422. position:4,
  423. width:33,
  424. height:(restHeight)*0.48*0.9,
  425. x:0,
  426. y:(restHeight)*0.48+(restHeight*0.48*0.1)/2
  427. },
  428. {
  429. position:5,
  430. width:33,
  431. height:(restHeight)*0.48*0.9,
  432. x:33,
  433. y:(restHeight)*0.48+(restHeight*0.48*0.1)/2
  434. },
  435. {
  436. position:6,
  437. width:33,
  438. height:(restHeight)*0.48*0.9,
  439. x:33*2,
  440. y:(restHeight)*0.48+(restHeight*0.48*0.1)/2
  441. }]
  442. },{
  443. modelId:11,
  444. elements:[{
  445. position:1,
  446. width:50,
  447. height:(restHeight)*0.40*0.9,
  448. x:0,
  449. y:(restHeight*0.4*0.1)/2
  450. },{
  451. position:2,
  452. width:50,
  453. height:(restHeight)*0.40*0.9,
  454. x:50,
  455. y:(restHeight*0.4*0.1)/2
  456. },{
  457. position:3,
  458. width:50,
  459. height:(restHeight)*0.40*0.9,
  460. x:0,
  461. y:38
  462. },{
  463. position:4,
  464. width:50,
  465. height:(restHeight)*0.40*0.9,
  466. x:50,
  467. y:38
  468. },{
  469. position:5,
  470. width:100*0.9,
  471. height:(restHeight)*0.18*0.8,
  472. x:0,
  473. y:74
  474. }]
  475. },{
  476. modelId:10,
  477. elements:[{
  478. position:1,
  479. width:33,
  480. height:(restHeight)*0.4*0.9,
  481. x:0,
  482. y:(restHeight*0.4*0.1)/2
  483. },{
  484. position:2,
  485. width:33,
  486. height:(restHeight)*0.4*0.9,
  487. x:33,
  488. y:(restHeight*0.4*0.1)/2
  489. },
  490. {
  491. position:3,
  492. width:33,
  493. height:(restHeight)*0.4*0.9,
  494. x:33*2,
  495. y:(restHeight*0.4*0.1)/2
  496. },
  497. {
  498. position:4,
  499. width:33,
  500. height:(restHeight)*0.4*0.9,
  501. x:0,
  502. y:38
  503. },
  504. {
  505. position:5,
  506. width:33,
  507. height:(restHeight)*0.4*0.9,
  508. x:33,
  509. y:38
  510. },
  511. {
  512. position:6,
  513. width:33,
  514. height:(restHeight)*0.4*0.9,
  515. x:33*2,
  516. y:38
  517. },
  518. {
  519. position:7,
  520. width:100,
  521. height:(restHeight)*0.18*0.8,
  522. x:0,
  523. y:74
  524. }]
  525. },{
  526. modelId:13,
  527. elements:[{
  528. position:1,
  529. width:100,
  530. height:(restHeight)*0.5*0.9,
  531. x:0,
  532. y:(restHeight*0.5-restHeight*0.5*0.9)/2
  533. },
  534. {
  535. position:2,
  536. width:100,
  537. height:(restHeight)*0.5*0.9,
  538. x:0,
  539. y:(restHeight)*0.5
  540. }]
  541. }
  542. ]
  543. //ppt母版
  544. export const pptSlideMaster = {
  545. title: "幻灯片母版",
  546. objects: [
  547. {
  548. /* placeholder: {
  549. options: {
  550. name: "slideTitle",
  551. type: "title",
  552. x: "10%",
  553. y: "5%",
  554. w: "68%",
  555. h: titleHeight + "%",
  556. color: "333333",
  557. align:'left',
  558. valign:'middle',
  559. fontSize:24*0.75,
  560. },
  561. }, */
  562. },
  563. {
  564. image: {
  565. x: 0,
  566. y: 0,
  567. w: 10,
  568. h: 7,
  569. path: "/static/pptnextimg.png", //会发送http请求,static or 线上地址
  570. },
  571. },
  572. ],
  573. slideNumber:{x:"95%",y:"94%",fontSize:12}
  574. }
  575. //ppt母版英文
  576. export const pptSlideMasterEn = {
  577. title: "幻灯片母版",
  578. objects: [
  579. {
  580. },
  581. {
  582. image: {
  583. x: 0,
  584. y: 0,
  585. w: 10,
  586. h: 7,
  587. path: "/static/ppt_en_bg.png",
  588. },
  589. },
  590. ],
  591. slideNumber:{x:"95%",y:"94%",fontSize:12}
  592. }
  593. //ppt宽高比
  594. export const pptLayout = { name: "myppt", width: 10, height: 7 }
  595. //ppt封面图
  596. export const pptCover = [
  597. require('@/assets/img/ppt_m/bg3.jpg'),
  598. require('@/assets/img/ppt_m/bg4.jpg'),
  599. require('@/assets/img/ppt_m/bg5.jpg'),
  600. ]
  601. //ppt封面图英文
  602. export const pptCoverEn = [
  603. require('@/assets/img/ppt_m/bg_en1.png'),
  604. require('@/assets/img/ppt_m/bg_en2.png'),
  605. require('@/assets/img/ppt_m/bg_en3.png'),
  606. ]
  607. //ppt-item的base宽高:默认比例是10:7,单位px;也是编辑页ppt-item的固定宽高
  608. export const pptBaseSize = {width:906,height:906*0.7}
  609. //ppt列表操作项
  610. export const toolList = [
  611. {
  612. label:'撤销',
  613. key:'cancel'
  614. },
  615. {
  616. label:'提交',
  617. key:'submit'
  618. },
  619. {
  620. label:'预览发布',
  621. key:'publish'
  622. },
  623. {
  624. label:'演示',
  625. key:'present'
  626. },
  627. {
  628. label:'下载',
  629. key:'download'
  630. },
  631. // {
  632. // label:'',
  633. // key:'transform'
  634. // },
  635. // {
  636. // label:'转英文PPT',
  637. // key:'transEn'
  638. // },
  639. {
  640. label:'编辑',
  641. key:'edit'
  642. },
  643. // {
  644. // label:'复制',
  645. // key:'copy'
  646. // },
  647. {
  648. label:'删除',
  649. key:'delete'
  650. }
  651. ]
  652. //图层元素预览信息
  653. export const layerElments = [
  654. {
  655. type:'line',
  656. name:"直线",
  657. path:'M 0 0 L 200 200 z',
  658. viewBox:[200,200]
  659. },
  660. {
  661. type:'line',
  662. name:"箭头",
  663. path:'M 0 0 L 200 200 z',
  664. viewBox:[200,200],
  665. points:['','arrow'],
  666. lineType:'arrow'
  667. },
  668. {
  669. type:'shape',
  670. name:'矩形',
  671. shapeType:'Rect',
  672. path:'M 0 0 L 200 0 L 200 200 L 0 200 Z',
  673. viewBox:[200,200]
  674. },{
  675. type:'text',
  676. name:'文本',
  677. path:'M 0 50 L 200 50 M 100 50 L 100 180 ',
  678. viewBox:[200,200]
  679. },
  680. {
  681. type:'shape',
  682. name:'圆形',
  683. shapeType:'Circle',
  684. path:'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',
  685. viewBox:[200,200]
  686. }
  687. ]
  688. //图层元素编辑配置
  689. export const layerEditOptions = {
  690. stokeSize:[1,2,3,4,5],//边框粗细
  691. stokeStyle:'solid',//边框样式:实线solid,虚线:dashed
  692. colorsOptions:['#333','#5B9BD5','#f00','#fff','#00f','#000','#00FFFF','#70DB93','#9F5F9F','#A67D3D','#5F9F9F'],
  693. strokeColor:'black',
  694. fillColor:'transparent'
  695. }
  696. //图层元素resize时,操作的按钮
  697. //8个方向:左上,左,左下;上,下,右上,右,右下
  698. export const layerElOperate = ['LEFT_TOP','TOP','RIGHT_TOP','LEFT','RIGHT','LEFT_BOTTOM','BOTTOM','RIGHT_BOTTOM']
  699. //图层元素预设值
  700. //矩形
  701. export const BaseRectShape = {
  702. id:'xvSIDSN',//图层元素id
  703. type:'shape',//图层类型
  704. shapeType:'Rect',//用于指定组件名
  705. left:0,top:0,//位置信息,单位px
  706. width:100,height:100,//大小信息,单位px
  707. percentageLeft:0,percentageTop:0,percentageWidth:0,percentageHeight:0,//百分比化的位置信息和大小信息
  708. realWidth:100,realHeight:100,//元素在dom内的真实宽高,单位px;在ppt-item宽不为pptBaseSize.width的时候与width,height不相等
  709. fill:'rgba(255, 255, 255, 0)',//填充颜色
  710. opacity:1,//元素整体的透明度
  711. path:'M 0 0 L 200 0 L 200 200 L 0 200 Z',//矩形的svg路径
  712. viewBox:[200,200],//视口,对应path,求比例用的
  713. outline:{//边框信息:对应rect的stroke属性
  714. style:'solid',//实线solid虚线dashed
  715. width:3,//边框的宽度
  716. color:'rgba(75, 75, 75, 1)',//边框颜色,也支持透明度
  717. }
  718. }
  719. //圆 除了path跟rect的不一样,其他都一样
  720. export const BaseCircleShape = {
  721. id:'abUOPic',
  722. type:'shape',
  723. shapeType:'Circle',
  724. left:0,top:0,
  725. width:100,height:100,
  726. percentageLeft:0,percentageTop:0,percentageWidth:0,percentageHeight:0,
  727. realWidth:100,realHeight:100,
  728. fill:'rgba(255, 255, 255, 0)',
  729. opacity:1,
  730. path:'M 100 0 A 50 50 0 1 1 100 200 A 50 50 0 1 1 100 0 Z',//圆形的svg路径
  731. viewBox:[200,200],
  732. outline:{
  733. style:'solid',
  734. width:3,
  735. color:'rgba(75, 75, 75, 1)'
  736. }
  737. }
  738. //直线
  739. export const BaseLineShape = {
  740. id:'AxsdUE',
  741. type:'line',
  742. left:0,top:0,width:100,height:100,
  743. start:[0,0],//线条起点位置,对应line的x1,y1
  744. end:[100,100],//线条的终点位置,对应line的x2,y2
  745. viewBox:[200,200],
  746. color:'rgba(75, 75, 75, 1)',//线条颜色
  747. points:['',''],//线条的端点样式:([起点样式, 终点样式];'':无;'arrow':箭头
  748. style:'solid',//线条样式:实现虚线
  749. strokeWidth:3,//线条的粗细
  750. fill:'transparent',//填充颜色:线条所占区域是一个矩形,一般是透明色
  751. }
  752. //文本框
  753. export const BaseTextShape = {
  754. id:'eRxFirB',
  755. type:'text',
  756. left:0,top:0,width:200,height:100,
  757. fontSize:12,
  758. content:'请输入内容',
  759. richContent:''
  760. }
  761. //默认情况下,版式内部位置对应的组件元素
  762. //用于版式渲染,版式内切换元素位置
  763. export const defaultPosition = {
  764. 1:{//modelId
  765. 1:{type:'chart'},//position
  766. },
  767. 2:{
  768. 1:{type:'chart'},
  769. 2:{type:'text'}
  770. },
  771. 3:{
  772. 1:{type:'chart'},
  773. 2:{type:'chart'},
  774. 3:{type:'text'}
  775. },
  776. 4:{
  777. 1:{type:'chart'},
  778. 2:{type:'chart'},
  779. 3:{type:'chart'},
  780. 4:{type:'text'}
  781. },
  782. 5:{
  783. 1:{type:'chart'},
  784. 2:{type:'chart'},
  785. 3:{type:'chart'},
  786. 4:{type:'chart'}
  787. },
  788. 6:{
  789. 1:{type:'text'},
  790. },
  791. 7:{
  792. 1:{type:'chart'},
  793. 2:{type:'chart'}
  794. },
  795. 8:{
  796. 1:{type:'chart'},
  797. 2:{type:'text'}
  798. },
  799. 9:{
  800. 1:{type:'chart'},
  801. 2:{type:'chart'},
  802. 3:{type:'text'}
  803. },
  804. 12:{
  805. 1:{type:'chart'},
  806. 2:{type:'chart'},
  807. 3:{type:'chart'},
  808. 4:{type:'chart'},
  809. 5:{type:'chart'},
  810. 6:{type:'chart'},
  811. },
  812. 11:{
  813. 1:{type:'chart'},
  814. 2:{type:'chart'},
  815. 3:{type:'chart'},
  816. 4:{type:'chart'},
  817. 5:{type:'text'},
  818. },
  819. 10:{
  820. 1:{type:'chart'},
  821. 2:{type:'chart'},
  822. 3:{type:'chart'},
  823. 4:{type:'chart'},
  824. 5:{type:'chart'},
  825. 6:{type:'chart'},
  826. 7:{type:'text'}
  827. },
  828. 13:{
  829. 1:{type:'chart'},
  830. 2:{type:'chart'}
  831. }
  832. }
  833. //画笔工具栏
  834. export const boardTool = [
  835. {
  836. iconName:'brush',
  837. hintName:'画笔',
  838. },
  839. {
  840. iconName:'palette',
  841. hintName:'颜色',
  842. },
  843. {
  844. iconName:'eraser',
  845. hintName:'橡皮',
  846. },
  847. {
  848. iconName:'broom',
  849. hintName:'擦除',
  850. }
  851. ]
  852. //画笔工具栏-颜色选择
  853. export const colorList = [
  854. '#FFFFFF',
  855. '#000000',
  856. '#FF0000',
  857. '#FDB863',
  858. '#FFF849',
  859. '#8CD67A',
  860. '#409EFF',
  861. '#9D42D6'
  862. ]