zydx-plus 1.33.392 → 1.33.394

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zydx-plus",
3
- "version": "1.33.392",
3
+ "version": "1.33.394",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -2174,7 +2174,20 @@ let buttonNames = {
2174
2174
  }
2175
2175
  },
2176
2176
  resource_lesson_guidance: { // 就业指导-指导意见配置项
2177
- actionName: '指导意见'
2177
+ actionName: '指导意见',
2178
+ buttonList: {
2179
+ 0: {
2180
+ headLevel: {
2181
+ default: "guideIndex",
2182
+ guideIndex: '指导意见',
2183
+ resourceText: '文本资源',
2184
+ resourceVideo: '视频资源',
2185
+ resourceAudio: '音频资源',
2186
+ resourcePPT: 'PPT资源',
2187
+ resourceSoftware: '软件资源'
2188
+ }
2189
+ }
2190
+ }
2178
2191
  },
2179
2192
  resource_scene:{
2180
2193
  actionName: '情景资源',
@@ -482,19 +482,61 @@
482
482
  isShowVirtualScore: false
483
483
  },
484
484
  action_scene: {
485
- actionName: '情景学习',
486
- endTimeBtn1: '任务截止',
487
- endTimeBtn2: '任务时长',
488
- laterScoreBtn: '迟交扣分',
489
- isShowFinishState: true,
490
- isShowEndTime: true,
491
- isShowLaterScore: true,
492
- isShowReviewObj: true,
493
- isShowReviewDemand: true,
494
- isShowScreenLimit: false,
495
- isShowFunDisable: false,
496
- isShowVirtualScore: false
497
- },
485
+ actionName: '情景学习',
486
+ endTimeBtn1: '任务截止',
487
+ endTimeBtn2: '任务时长',
488
+ laterScoreBtn: '迟交扣分',
489
+ isShowFinishState: true,
490
+ isShowEndTime: true,
491
+ isShowLaterScore: true,
492
+ isShowReviewObj: true,
493
+ isShowReviewDemand: true,
494
+ isShowScreenLimit: false,
495
+ isShowFunDisable: false,
496
+ isShowVirtualScore: false
497
+ },
498
+ action_lesson_dissertation1: {
499
+ actionName: '开题报告',
500
+ endTimeBtn1: '任务截止',
501
+ endTimeBtn2: '任务时长',
502
+ laterScoreBtn: '迟交扣分',
503
+ isShowFinishState: true,
504
+ isShowEndTime: true,
505
+ isShowLaterScore: true,
506
+ isShowReviewObj: true,
507
+ isShowReviewDemand: true,
508
+ isShowScreenLimit: false,
509
+ isShowFunDisable: false,
510
+ isShowVirtualScore: false
511
+ },
512
+ action_lesson_biographical: {
513
+ actionName: '求职简历',
514
+ endTimeBtn1: '任务截止',
515
+ endTimeBtn2: '任务时长',
516
+ laterScoreBtn: '迟交扣分',
517
+ isShowFinishState: true,
518
+ isShowEndTime: true,
519
+ isShowLaterScore: true,
520
+ isShowReviewObj: true,
521
+ isShowReviewDemand: true,
522
+ isShowScreenLimit: false,
523
+ isShowFunDisable: false,
524
+ isShowVirtualScore: false
525
+ },
526
+ action_lesson_facew: {
527
+ actionName: '面试指导',
528
+ endTimeBtn1: '任务截止',
529
+ endTimeBtn2: '任务时长',
530
+ laterScoreBtn: '迟交扣分',
531
+ isShowFinishState: true,
532
+ isShowEndTime: true,
533
+ isShowLaterScore: true,
534
+ isShowReviewObj: true,
535
+ isShowReviewDemand: true,
536
+ isShowScreenLimit: false,
537
+ isShowFunDisable: false,
538
+ isShowVirtualScore: false
539
+ },
498
540
  },
499
541
  showExamJoinCalenderTime:{
500
542
  1: false,
@@ -26,7 +26,77 @@ export function butJson(editor, data) {
26
26
  switchingFormat: {
27
27
  name: '切换版式',
28
28
  key: 'switchingFormat',
29
- menuKeys: []
29
+ menuKeys: [
30
+ {
31
+ name: '自由排版',
32
+ key: 'freeTypesetting',
33
+ menuKeys: [],
34
+ html: ''
35
+ },
36
+ {
37
+ name: '公文版式',
38
+ key: 'officialDocumentFormat',
39
+ menuKeys: [],
40
+ html: `<p style="text-align: center"><span style="font-size: 48px; color: rgb(225, 60, 57)">请在此输入红头名称</span></p>
41
+ <p data-signid="red" style="text-align: center"><span style="font-size: 16px; color: rgb(0, 0, 0)">请在此输入文件号xxx[xxx]xxxx号</span></p>
42
+ <p contenteditable="false" class="solid"></p>
43
+ <p data-signid="subject" style="text-align: center;margin: 80px 0 60px"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);line-height: 1;">请在此处输入标题</span></strong></p>
44
+ <p data-signid="lookUp"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入抬头:</span></strong></p>
45
+ <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
46
+ <p data-signid="title-1" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
47
+ <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
48
+ <p data-signid="title-2" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
49
+ <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
50
+ <p data-signid="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p>
51
+ <p data-signid="date" style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
52
+ },
53
+ {
54
+ name: '新闻版式',
55
+ key: 'newsFormat',
56
+ menuKeys: [],
57
+ html: `<p data-signid="subject" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);">请在此处输入标题</span></strong></p>
58
+ <p data-signid="author" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0);">请在此处输入作者/来源</span></p>
59
+ <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
60
+ <p data-signid="title-1" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
61
+ <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
62
+ <p data-signid="title-2" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
63
+ <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
64
+ <p data-signid="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p>
65
+ <p data-signid="date" style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
66
+ },
67
+ {
68
+ name: '论文版式',
69
+ key: 'paperFormat',
70
+ menuKeys: [],
71
+ html: `<p data-signid="subject" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);">请在此处输入题目</span></strong></p>
72
+ <p data-signid="author" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0);">请在此处输入作者</span></p>
73
+ <p data-signid="abstract" class="abstract"><strong><span style="font-size: 14px; font-family: SimSun; color: rgb(0, 0, 0)">摘要:</span></strong> <span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0)">请在此处输入摘要文本...</span></p>
74
+ <p data-signid="keyword" class="keyword"><strong><span contenteditable="false" style="font-size: 14px; font-family: SimSun; color: rgb(0, 0, 0)">关键词:</span></strong> <span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0)"> 请在此处输入关键字...</span></p>
75
+ <p></p>
76
+ <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
77
+ <p data-signid="title-1" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
78
+ <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
79
+ <p data-signid="title-2" class="title indent"><strong><span style="font-size: 16px; font-family: SimH ei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
80
+ <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本(复用格式建议直接复制粘贴段落)</span></p>
81
+ <p data-signid="splitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p>
82
+ <p></p>
83
+ <p data-signid="annotation" contenteditable="false" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);">注释</span></strong></p>
84
+ <p contenteditable="false" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px;font-weight: 700; color: rgba(0, 0, 0, 0.5);">(请在文中标识要注释的内容,此处将生成注释的序号而后需要作者填写注释内容)</span></p>
85
+ <p data-signid="a-l" class="text" contenteditable="false"><span style="font-size: 12px; font-family: FangSong;text-indent: 2em;">① 注释:是指解释字句的文字,也指用文字解释字句,可以是文字符号图片等多种形式。(当前文本只是示例展示,不会出现在保存的文本中。)</span></p>
86
+ <p data-signid="annotationSplitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p>
87
+ <p></p>
88
+ <p contenteditable="false" data-signId="reference" style="text-align: center;margin-bottom: 30px;"><span font-family: SimHei; style="font-weight: 700;font-size: 24px;">参考文献</span></p>
89
+ <p contenteditable="false" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px;font-weight: 700; color: rgba(0, 0, 0, 0.5);">(请在文中标识要注释的内容,此处将生成注释的序号而后需要作者填写注释内容)</span></p>
90
+ <p data-signid="r-l" class="text" contenteditable="false"><span style="font-size: 12px; font-family: FangSong;text-indent: 2em;"> [1] 孙品一.高校学报编辑工作现代化特征[C].中国高等学校自然科学学报研究会.科技编辑学论文集(2).北京:北京师范大学出版社,1998:10-22. (当前文本只是示例展示,不会出现在保存的文本中。)</span></p>
91
+ <p data-signid="r-l" class="text" contenteditable="false"><span style="font-size: 12px; font-family: FangSong;text-indent: 2em;"> [2] 张和生.地质力学系统理论[D].太原:太原理工大学,1998. (当前文本只是示例展示,不会出现在保存的文本中。)</span></p>
92
+ <p data-signid="referenceSplitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p>
93
+ <p></p>
94
+ <p data-signid="ack" style="text-align: center"><strong><span style="font-size: 16px; color: rgb(0, 0, 0)">致谢</span></strong></p>
95
+ <p><span style="font-size: 14px; font-family: KaiTi; color: rgb(0, 0, 0)">致谢内容...</span></p>
96
+ <p data-signid="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p>
97
+ <p data-signid="date" style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
98
+ }
99
+ ]
30
100
  },
31
101
  shortcut: {
32
102
  name: '快捷排版',
@@ -150,13 +220,13 @@ export function butJson(editor, data) {
150
220
  name: '二级标题',
151
221
  key: 'secondaryHeading',
152
222
  menuKeys: [],
153
- html: `<p data-signid="title-2" class="title indent"><strong><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>`
223
+ html: `<p data-signid="title-2" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>`
154
224
  },
155
225
  paragraphBody: {
156
226
  name: '正文文本',
157
227
  key: 'paragraphBody',
158
228
  menuKeys: [],
159
- html: `<p class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>`
229
+ html: `<p data-signid="text" class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>`
160
230
  },
161
231
  ackMenu: {
162
232
  name: '致&nbsp;&nbsp;&nbsp;谢',
@@ -202,8 +272,8 @@ export function butJson(editor, data) {
202
272
  html: {
203
273
  blackCenter4: `<p data-signId="title-1" class="title ${randomId()}" style="text-align: center;"><span style="font-weight: 700;color: rgb(0, 0, 0);font-size: 16px;font-family: SimHei">${menusData(data, 'titleMenu').text}</span></p>`,
204
274
  blackLeft4: `<p data-signId="title-2" class="title ${randomId()}" style="text-align: left;"><span style="font-weight: 700;color: rgb(0, 0, 0);font-size: 16px;font-family: SimHei">${menusData(data, 'titleMenu').text}</span></p>`,
205
- blackCenter5: `<p data-signId="title-3" class="title ${randomId()}" style="text-align: center;"><span style="font-weight: 700;color: rgb(0, 0, 0);font-size: 14px;font-family: SimHei">${menusData(data, 'titleMenu').text}</span></p>`,
206
- blackLeft5: `<p data-signId="title-4" class="title ${randomId()}" style="text-align: left;"><span style="font-weight: 700;color: rgb(0, 0, 0);font-size: 14px;font-family: SimHei">${menusData(data, 'titleMenu').text}</span></p>`,
275
+ blackCenter5: `<p data-signId="title-3" class="title ${randomId()}" style="text-align: center;"><span style="font-weight: 700;color: rgb(0, 0, 0);font-size: 16px;font-family: SimHei">${menusData(data, 'titleMenu').text}</span></p>`,
276
+ blackLeft5: `<p data-signId="title-4" class="title ${randomId()}" style="text-align: left;"><span style="font-weight: 700;color: rgb(0, 0, 0);font-size: 16px;font-family: SimHei">${menusData(data, 'titleMenu').text}</span></p>`,
207
277
  }
208
278
  },
209
279
  textMenu: {
@@ -83,41 +83,6 @@
83
83
  </div>
84
84
  </div>
85
85
 
86
- <!--图片的浮动菜单-->
87
- <div class="bubble-menu-img">
88
- <template v-if="editor">
89
- <div class="line">
90
- <div class="label">图片缩放:</div>
91
- <div class="percent">
92
- <div class="symbol">%</div>
93
- <input type="number" v-model="imgSizeVal" @input="changePercent" onfocus="this.select()" placeholder="10-100">
94
- </div>
95
- </div>
96
- <div class="line">
97
- <div class="label">图片位置:</div>
98
- <div class="alignmentMode">
99
- <div @click="changeAlign('left')">
100
- <div class="imgBgc" :class="{imgBgcAction: editor.isActive({ textAlign: 'left' })}">
101
- <img :src="alignmentModeLeft">
102
- </div>
103
- </div>
104
- <div class="segmentation"></div>
105
- <div @click="changeAlign('center')">
106
- <div class="imgBgc" :class="{imgBgcAction: editor.isActive({ textAlign: 'center' })}">
107
- <img :src="alignmentModeCenter">
108
- </div>
109
- </div>
110
- <div class="segmentation"></div>
111
- <div @click="changeAlign('right')">
112
- <div class="imgBgc" :class="{imgBgcAction: editor.isActive({ textAlign: 'right' })}">
113
- <img :src="alignmentModeRight">
114
- </div>
115
- </div>
116
- </div>
117
- </div>
118
- </template>
119
- </div>
120
-
121
86
  <div v-if="!readOnly && toolbar.length > 0" class="complete">
122
87
  <button v-if="butShow" class="but" @click="confirm">完成</button>
123
88
  </div>
@@ -648,10 +613,7 @@ import MarginNarrow from "../src/margin-narrow.vue";
648
613
  import MarginStandard from "../src/margin-standard.vue";
649
614
  import MarginWide from "../src/margin-wide.vue";
650
615
  import isSelect from "../src/isSelect.vue";
651
- import {CustomImage} from "./image-size";
652
- import alignmentModeCenter from './image/center.png'
653
- import alignmentModeLeft from './image/left.png'
654
- import alignmentModeRight from './image/right.png'
616
+ import {block} from "html-to-text/lib/formatter";
655
617
 
656
618
  const img = require('./image/annotation.png')
657
619
  export default {
@@ -843,26 +805,66 @@ export default {
843
805
  name: '公文版式',
844
806
  key: 'officialDocumentFormat',
845
807
  menuKeys: [],
846
- html: `<p style="text-align: center"><span style="font-size: 48px; color: rgb(225, 60, 57)">请在此输入红头名称</span></p><p data-signid="red" style="text-align: center"><span style="font-size: 16px; color: rgb(0, 0, 0)">请在此输入文件号xxx[xxx]xxxx号</span></p><p contenteditable="false" class="solid"></p><p data-signid="subject" style="text-align: center;margin: 80px 0 60px"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);line-height: 1;">请在此处输入标题</span></strong></p><p data-signid="lookUp"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入抬头:</span></strong></p><p class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p><p data-signid="title-1" class="title drrvcvmj indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p><p class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p><p data-signid="title-2" class="title xxhnhuja indent"><strong><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p><p class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p><p data-signid="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p><p style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
808
+ html: `<p style="text-align: center"><span style="font-size: 48px; color: rgb(225, 60, 57)">请在此输入红头名称</span></p>
809
+ <p data-signid="red" style="text-align: center"><span style="font-size: 16px; color: rgb(0, 0, 0)">请在此输入文件号xxx[xxx]xxxx号</span></p>
810
+ <p contenteditable="false" class="solid"></p>
811
+ <p data-signid="subject" style="text-align: center;margin: 80px 0 60px"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);line-height: 1;">请在此处输入标题</span></strong></p>
812
+ <p data-signid="lookUp"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入抬头:</span></strong></p>
813
+ <p class="indent"><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
814
+ <p data-signid="title-1" class="title indent"><strong><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
815
+ <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
816
+ <p data-signid="title-2" class="title indent"><strong><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
817
+ <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
818
+ <p data-signid="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p>
819
+ <p style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
847
820
  },
848
821
  {
849
822
  name: '新闻版式',
850
823
  key: 'newsFormat',
851
824
  menuKeys: [],
852
- html: `<p data-signid="subject" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);">请在此处输入标题</span></strong></p><p data-signid="author" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0);">请在此处输入作者/来源</span></p><p class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p><p data-signid="title-1" class="title drrvcvmj indent"><strong><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p><p class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p><p data-signid="title-2" class="title xxhnhuja indent"><strong><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p><p class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p><p data-signid="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p><p style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
825
+ html: `<p data-signid="subject" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);">请在此处输入标题</span></strong></p>
826
+ <p data-signid="author" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0);">请在此处输入作者/来源</span></p>
827
+ <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
828
+ <p data-signid="title-1" class="title indent"><strong><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
829
+ <p class="indent "><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
830
+ <p data-signid="title-2" class="title indent"><strong><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
831
+ <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
832
+ <p data-signid="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p>
833
+ <p style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
853
834
  },
854
835
  {
855
836
  name: '论文版式',
856
837
  key: 'paperFormat',
857
838
  menuKeys: [],
858
- html: `<p data-signid="subject" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);">请在此处输入题目</span></strong></p><p data-signid="author" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0);">请在此处输入作者</span></p><p data-signid="abstract" class="abstract abstract"><strong><span style="font-size: 14px; font-family: SimSun; color: rgb(0, 0, 0)">摘要:</span></strong> <span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0)">请在此处输入摘要文本...</span></p><p data-signid="keyword" class="keyword keyword"><strong><span contenteditable="false" style="font-size: 14px; font-family: SimSun; color: rgb(0, 0, 0)">关键词:</span></strong> <span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0)"> 请在此处输入关键字...</span></p><p></p><p class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p><p data-signid="title-1" class="title drrvcvmj indent"><strong><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p><p class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p><p data-signid="title-2" class="title xxhnhuja indent"><strong><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p><p class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本(复用格式建议直接复制粘贴段落)</span></p><p data-signid="splitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p><p></p><p data-signid="annotation" contenteditable="false" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);">注释</span></strong></p><p data-signid="author" contenteditable="false" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px;font-weight: 700; color: rgba(0, 0, 0, 0.5);">(请在文中标识要注释的内容,此处将生成注释的序号而后需要作者填写注释内容)</span></p><p data-signid="a-l" class="text" contenteditable="false"><span style="font-size: 12px; font-family: FangSong;text-indent: 2em;">① 注释:是指解释字句的文字,也指用文字解释字句,可以是文字符号图片等多种形式。(当前文本只是示例展示,不会出现在保存的文本中。)</span></p><p data-signid="annotationSplitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p><p></p><p contenteditable="false" data-signId="reference" style="text-align: center;margin-bottom: 30px;"><span font-family: SimHei; style="font-weight: 700;font-size: 24px;">参考文献</span></p><p data-signid="author" contenteditable="false" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px;font-weight: 700; color: rgba(0, 0, 0, 0.5);">(请在文中标识要注释的内容,此处将生成注释的序号而后需要作者填写注释内容)</span></p><p data-signid="r-l" class="text" contenteditable="false"><span style="font-size: 12px; font-family: FangSong;text-indent: 2em;"> [1] 孙品一.高校学报编辑工作现代化特征[C].中国高等学校自然科学学报研究会.科技编辑学论文集(2).北京:北京师范大学出版社,1998:10-22. (当前文本只是示例展示,不会出现在保存的文本中。)</span></p><p data-signid="r-l" class="text" contenteditable="false"><span style="font-size: 12px; font-family: FangSong;text-indent: 2em;"> [2] 张和生.地质力学系统理论[D].太原:太原理工大学,1998. (当前文本只是示例展示,不会出现在保存的文本中。)</span></p><p data-signid="referenceSplitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p><p></p><p data-signid="ack" style="text-align: center"><strong><span style="font-size: 16px; color: rgb(0, 0, 0)">致谢</span></strong></p><p><span style="font-size: 14px; font-family: KaiTi; color: rgb(0, 0, 0)">致谢内容...</span></p><p data-signid="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p><p style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
839
+ html: `<p data-signid="subject" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);">请在此处输入题目</span></strong></p>
840
+ <p data-signid="author" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0);">请在此处输入作者</span></p>
841
+ <p data-signid="abstract" class="abstract"><strong><span style="font-size: 14px; font-family: SimSun; color: rgb(0, 0, 0)">摘要:</span></strong> <span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0)">请在此处输入摘要文本...</span></p>
842
+ <p data-signid="keyword" class="keyword"><strong><span contenteditable="false" style="font-size: 14px; font-family: SimSun; color: rgb(0, 0, 0)">关键词:</span></strong> <span style="font-size: 14px; font-family: FangSong; color: rgb(0, 0, 0)"> 请在此处输入关键字...</span></p>
843
+ <p></p>
844
+ <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
845
+ <p data-signid="title-1" class="title indent"><strong><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">一、请在此处输入一级标题</span></strong></p>
846
+ <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
847
+ <p data-signid="title-2" class="title indent"><strong><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">(一)请在此处输入二级标题</span></strong></p>
848
+ <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本(复用格式建议直接复制粘贴段落)</span></p>
849
+ <p data-signid="splitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p>
850
+ <p></p>
851
+ <p data-signid="annotation" contenteditable="false" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: rgb(0, 0, 0);">注释</span></strong></p>
852
+ <p data-signid="author" contenteditable="false" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px;font-weight: 700; color: rgba(0, 0, 0, 0.5);">(请在文中标识要注释的内容,此处将生成注释的序号而后需要作者填写注释内容)</span></p>
853
+ <p data-signid="a-l" class="text" contenteditable="false"><span style="font-size: 12px; font-family: FangSong;text-indent: 2em;">① 注释:是指解释字句的文字,也指用文字解释字句,可以是文字符号图片等多种形式。(当前文本只是示例展示,不会出现在保存的文本中。)</span></p>
854
+ <p data-signid="annotationSplitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p>
855
+ <p></p>
856
+ <p contenteditable="false" data-signId="reference" style="text-align: center;margin-bottom: 30px;"><span font-family: SimHei; style="font-weight: 700;font-size: 24px;">参考文献</span></p>
857
+ <p data-signid="author" contenteditable="false" class="author" style="text-align: center;padding-bottom: 30px;"><span style="font-size: 14px;font-weight: 700; color: rgba(0, 0, 0, 0.5);">(请在文中标识要注释的内容,此处将生成注释的序号而后需要作者填写注释内容)</span></p>
858
+ <p data-signid="r-l" class="text" contenteditable="false"><span style="font-size: 12px; font-family: FangSong;text-indent: 2em;"> [1] 孙品一.高校学报编辑工作现代化特征[C].中国高等学校自然科学学报研究会.科技编辑学论文集(2).北京:北京师范大学出版社,1998:10-22. (当前文本只是示例展示,不会出现在保存的文本中。)</span></p>
859
+ <p data-signid="r-l" class="text" contenteditable="false"><span style="font-size: 12px; font-family: FangSong;text-indent: 2em;"> [2] 张和生.地质力学系统理论[D].太原:太原理工大学,1998. (当前文本只是示例展示,不会出现在保存的文本中。)</span></p>
860
+ <p data-signid="referenceSplitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p>
861
+ <p></p>
862
+ <p data-signid="ack" style="text-align: center"><strong><span style="font-size: 16px; color: rgb(0, 0, 0)">致谢</span></strong></p>
863
+ <p><span style="font-size: 14px; font-family: KaiTi; color: rgb(0, 0, 0)">致谢内容...</span></p>
864
+ <p data-signid="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p>
865
+ <p style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
859
866
  }
860
- ],
861
- imgSizeVal: '',
862
- imgSizeLock: true,
863
- alignmentModeLeft: alignmentModeLeft,
864
- alignmentModeCenter: alignmentModeCenter,
865
- alignmentModeRight: alignmentModeRight,
867
+ ]
866
868
  }
867
869
  },
868
870
  props: {
@@ -1102,7 +1104,6 @@ export default {
1102
1104
  titleId, // 标题id
1103
1105
  lineHeightId,//行高
1104
1106
  dataUrl,
1105
- CustomImage,// 自定义图片大小
1106
1107
  Superscript.configure({
1107
1108
  HTMLAttributes: {
1108
1109
  class: 'annotation',
@@ -1150,19 +1151,6 @@ export default {
1150
1151
  }
1151
1152
  },
1152
1153
  }),
1153
- BubbleMenu.configure({
1154
- pluginKey: 'bubbleMenuImg',
1155
- element: document.querySelector('.bubble-menu-img'),
1156
- tippyOptions: { duration: 100 },
1157
- shouldShow: ({editor, view, state, oldState, from, to}) => {
1158
- if(editor.isActive('image')) {
1159
- this.imgSizeVal = parseInt(this.editor.getAttributes('image').width)
1160
- } else {
1161
- this.imgSizeVal = ''
1162
- }
1163
- return editor.isActive('image')
1164
- },
1165
- }),
1166
1154
  Link.configure({
1167
1155
  openOnClick: false,
1168
1156
  HTMLAttributes: {
@@ -1329,26 +1317,6 @@ export default {
1329
1317
  },
1330
1318
  emits: ['confirm', 'enclosure', 'enlDownload', 'enlSee'],
1331
1319
  methods: {
1332
- changeAlign(tag) {
1333
- // 图片对齐方式
1334
- this.editor.chain().setTextAlign(tag).run()
1335
- },
1336
- changePercent(e) {
1337
- // 改变图片百分比
1338
- if(parseInt(e.target.value) > 100) {
1339
- this.imgSizeVal = 100
1340
- this.editor.chain().setImageWidth('100%').focus().run()
1341
- } else if(parseInt(e.target.value) < 10) {
1342
- } else {
1343
- if(this.imgSizeLock) {
1344
- this.imgSizeLock = false
1345
- setTimeout(() => {
1346
- this.editor.chain().setImageWidth(e.target.value + '%').focus().run()
1347
- this.imgSizeLock = true
1348
- }, 500)
1349
- }
1350
- }
1351
- },
1352
1320
  selectMargin(selectItem) {
1353
1321
  this.pageMarginSvg.forEach(item => {
1354
1322
  item.isSelect = item.title === selectItem.title;
@@ -1372,53 +1340,117 @@ export default {
1372
1340
  },
1373
1341
  //修改模板类型
1374
1342
  async changeTemplateType() {
1375
- await Message(
1376
- {type: 'text', promptContent: '切换版式后,已编辑的内容将被清空且无法保存,是否确认切换版式?'}).then(() => {
1377
- // 自由排版
1378
- if (this.templateType === 'freeTypesetting') {
1379
- const html = this.switchingFormat.filter(item => item.key === this.templateType)[0].html
1380
- this.editor.chain().setContent(html).run()
1381
- this.toolbar = [
1382
- 'switchingFormat', 'signMenu', 'pageMargin', 'paragraph',
1383
- 'outlineMenu', 'alignmentMode', 'titleMenu',
1384
- 'textMenu', 'color', 'interposition']
1385
- this.organizeButton()
1343
+ const oldFormatWriteNewFormat = (oldJson)=>{
1344
+ let newJson = this.editor.getJSON()
1345
+ if(oldJson.content.length===1&&!oldJson.content[0].content){
1346
+ return
1386
1347
  }
1387
- // 公文版式
1388
- if (this.templateType === 'officialDocumentFormat') {
1389
- const html = this.switchingFormat.filter(item => item.key === this.templateType)[0].html
1390
- this.editor.chain().setContent(html).run()
1391
- this.toolbar = [
1392
- 'switchingFormat', 'signMenu', 'pageMargin','redMenu', 'firstLevelHeading',
1393
- 'secondaryHeading', 'paragraphBody', 'paragraphMenu', 'alignmentMode',
1394
- 'titleMenu', 'color', 'interposition']
1395
- this.organizeButton()
1348
+ let oldContent = []
1349
+ let signIdArrObj={
1350
+ officialDocumentFormat: ['text','paragraph','date','subject'],
1351
+ newsFormat: ['text','paragraph','date','subject','author'],
1352
+ paperFormat: ['text','paragraph','date','subject','author']
1396
1353
  }
1397
- // 新闻版式
1398
- if (this.templateType === 'newsFormat') {
1399
- const html = this.switchingFormat.filter(item => item.key === this.templateType)[0].html
1400
- this.editor.chain().setContent(html).run()
1401
- this.toolbar = [
1402
- 'switchingFormat', 'signMenu', 'pageMargin', 'firstLevelHeading',
1403
- 'secondaryHeading', 'paragraphBody', 'paragraphMenu', 'alignmentMode',
1404
- 'titleMenu', 'color', 'interposition']
1405
- this.organizeButton()
1354
+ let signIdArr=signIdArrObj[this.templateType]
1355
+ let newSignIdIndex = -1
1356
+ let remainIndex = 0
1357
+ for (let i = 0; i <oldJson.content.length ; i++) {
1358
+ let item = oldJson.content[i]
1359
+ if(signIdArr.indexOf(item.attrs.signId)!==-1||(!!item.attrs.signId&&item.attrs.signId.indexOf('title')!==-1)){
1360
+ item.reserve = true
1361
+ for (let j = 0; j < newJson.content.length; j++) {
1362
+ let newItem = newJson.content[j]
1363
+ if(newItem.attrs.signId&&item.attrs.signId&&item.attrs.signId===newItem.attrs.signId&&newSignIdIndex<j){
1364
+ newJson.content[j]=JSON.parse(JSON.stringify(item))
1365
+ delete newJson.content[j].reserve
1366
+ item.reserve = false
1367
+ if(newJson.content[j].attrs.signId==='subject'&&this.templateType === 'officialDocumentFormat'){
1368
+ newJson.content[j].attrs.margin= '80px 0 60px'
1369
+ }else {
1370
+ newJson.content[j].attrs.margin= null
1371
+ }
1372
+ newSignIdIndex=j
1373
+ break
1374
+ }else {
1375
+ let arr = ['paragraph','date']
1376
+ if(newSignIdIndex>=0&&arr.indexOf(newJson.content[newSignIdIndex].attrs.signId)===-1){
1377
+ // 内容有意义但无法替换如新样板,位置起点留存
1378
+ remainIndex=newSignIdIndex
1379
+ }
1380
+ }
1381
+ }
1382
+ }
1406
1383
  }
1407
- // 论文版式
1408
- if (this.templateType === 'paperFormat') {
1409
- const html = this.switchingFormat.filter(item => item.key === this.templateType)[0].html
1410
- this.editor.chain().setContent(html).run()
1411
- this.toolbar = [
1412
- 'switchingFormat', 'signMenu', 'pageMargin', 'firstLevelHeading',
1413
- 'secondaryHeading', 'paragraphBody', 'ackMenu', 'paragraphMenu', 'alignmentMode',
1414
- 'titleMenu', 'color', 'interposition']
1415
- this.organizeButton()
1384
+ oldContent = oldJson.content.filter(item=>item.reserve)
1385
+ oldContent.forEach((item,index)=>{
1386
+ delete item.reserve
1387
+ newJson.content.splice(remainIndex+index+1,0,item)
1388
+ })
1389
+ this.editor.chain().setContent(newJson).run()
1390
+ }
1391
+ const htmlFormat = butJson(this.editor, this.menusText)['switchingFormat'].menuKeys
1392
+ let oldJson = this.editor.getJSON()
1393
+ // 自由排版
1394
+ if (this.templateType === 'freeTypesetting') {
1395
+ const html = htmlFormat.filter(item => item.key === this.templateType)[0].html
1396
+ this.editor.chain().setContent(html).run()
1397
+ this.toolbar = [
1398
+ 'switchingFormat', 'signMenu', 'pageMargin', 'paragraph',
1399
+ 'outlineMenu', 'alignmentMode', 'titleMenu',
1400
+ 'textMenu', 'color', 'interposition']
1401
+ this.organizeButton()
1402
+ this.interpositionData = []
1403
+ if(oldJson.content.length===1&&!oldJson.content[0].content){
1404
+ return
1416
1405
  }
1417
- this.isShowSwitchingFormat = false
1406
+ let oldContent = []
1407
+ let signIdArr=['text','paragraph','date','subject','author']
1408
+ oldJson.content.forEach((item)=>{
1409
+ if(signIdArr.indexOf(item.attrs.signId)!==-1||(!!item.attrs.signId&&item.attrs.signId.indexOf('title')!==-1)){
1410
+ if(item.attrs.signId==='subject'){
1411
+ item.attrs.margin= null
1412
+ }
1413
+ oldContent.push(item)
1414
+ }
1415
+ })
1416
+ this.editor.chain().setContent({type:'doc',content:oldContent}).run()
1417
+ }
1418
+ // 公文版式
1419
+ if (this.templateType === 'officialDocumentFormat') {
1420
+ const html = htmlFormat.filter(item => item.key === this.templateType)[0].html
1421
+ this.editor.chain().setContent(html).run()
1422
+ this.toolbar = [
1423
+ 'switchingFormat', 'signMenu', 'pageMargin','redMenu', 'firstLevelHeading',
1424
+ 'secondaryHeading', 'paragraphBody', 'paragraphMenu', 'alignmentMode',
1425
+ 'titleMenu', 'color', 'interposition']
1426
+ this.organizeButton()
1418
1427
  this.interpositionData = []
1419
- }).catch((err) => {
1420
- console.log('取消', err)
1421
- })
1428
+ oldFormatWriteNewFormat(oldJson)
1429
+ }
1430
+ // 新闻版式
1431
+ if (this.templateType === 'newsFormat') {
1432
+ const html = htmlFormat.filter(item => item.key === this.templateType)[0].html
1433
+ this.editor.chain().setContent(html).run()
1434
+ this.toolbar = [
1435
+ 'switchingFormat', 'signMenu', 'pageMargin', 'firstLevelHeading',
1436
+ 'secondaryHeading', 'paragraphBody', 'paragraphMenu', 'alignmentMode',
1437
+ 'titleMenu', 'color', 'interposition']
1438
+ this.organizeButton()
1439
+ this.interpositionData = []
1440
+ oldFormatWriteNewFormat(oldJson)
1441
+ }
1442
+ // 论文版式
1443
+ if (this.templateType === 'paperFormat') {
1444
+ const html = htmlFormat.filter(item => item.key === this.templateType)[0].html
1445
+ this.editor.chain().setContent(html).run()
1446
+ this.toolbar = [
1447
+ 'switchingFormat', 'signMenu', 'pageMargin', 'firstLevelHeading',
1448
+ 'secondaryHeading', 'paragraphBody', 'ackMenu', 'paragraphMenu', 'alignmentMode',
1449
+ 'titleMenu', 'color', 'interposition']
1450
+ this.organizeButton()
1451
+ this.interpositionData = []
1452
+ oldFormatWriteNewFormat(oldJson)
1453
+ }
1422
1454
  },
1423
1455
  // 修改边距
1424
1456
  changeMargin() {
@@ -2053,7 +2085,7 @@ export default {
2053
2085
  html = ''
2054
2086
  }
2055
2087
  }
2056
- if (data[i].dataset?.signid === 'splitLine') {
2088
+ if (data[i].dataset?.signid === 'splitLine' || data[i].dataset?.signid === 'annotationSplitLine' || data[i].dataset?.signid === 'referenceSplitLine') {
2057
2089
  this.htmlArr.push(html)
2058
2090
  pHeight = 0
2059
2091
  html = ''
@@ -2116,7 +2148,7 @@ export default {
2116
2148
  pHeight = end.size
2117
2149
  } else {
2118
2150
  pHeight += text
2119
- if (data[i].dataset?.signid !== 'splitLine' && data[i].dataset?.signid !== 'referenceSplitLine') html += data[i].outerHTML
2151
+ if (data[i].dataset?.signid !== 'splitLine' && data[i].dataset?.signid !== 'annotationSplitLine' && data[i].dataset?.signid !== 'referenceSplitLine') html += data[i].outerHTML
2120
2152
  }
2121
2153
  if (i === data.length - 1) {
2122
2154
  this.htmlArr.push(html)
@@ -2731,7 +2763,23 @@ export default {
2731
2763
  async butTap(data, key, childKey) {
2732
2764
  // 切换版式
2733
2765
  if (data.key === 'switchingFormat') {
2734
- this.isShowSwitchingFormat = true
2766
+ this.templateType = key.key
2767
+ if(this.templateType === 'freeTypesetting'){
2768
+
2769
+ await this.changeTemplateType()
2770
+ }
2771
+ if(this.templateType === 'officialDocumentFormat'){
2772
+
2773
+ await this.changeTemplateType()
2774
+ }
2775
+ if(this.templateType === 'newsFormat'){
2776
+
2777
+ await this.changeTemplateType()
2778
+ }
2779
+ if(this.templateType === 'paperFormat'){
2780
+
2781
+ await this.changeTemplateType()
2782
+ }
2735
2783
  }
2736
2784
  // 快捷排版
2737
2785
  if (data.key === 'shortcut') {
@@ -3815,12 +3863,17 @@ export default {
3815
3863
  },
3816
3864
 
3817
3865
  async addAnnotationMenu() {
3818
- this.interpositionData.forEach((item,index)=>{
3866
+ let index = 0
3867
+ const json = this.editor.getJSON()
3868
+ let jsonData = json.content.filter(item => !(/a-/.test(item.attrs.signId)))
3869
+ this.editor?.commands.setContent(jsonData)
3870
+ this.interpositionData.forEach((item)=>{
3819
3871
  if(item.type!=='taggingMenu') return
3872
+ index+=1
3820
3873
  const t = this.signIdData('annotation')
3821
3874
  const b = this.signIdData('annotationSplitLine') // 判断是否有分页线
3822
3875
  const html = `<p contenteditable="false" data-signId="annotation" style="text-align: center;margin-bottom: 30px;"><span style="font-weight: 700;font-size: 16px;">注释:</span></p>`
3823
- const html2 = `<p contenteditable="false" class="text" data-signId="r-${index+1}"><span style="font-family: FangSong;font-size: 12px;line-height25px"><span class="annotation-num">${index+1}</span> ${item.exegesis}: ${item.text}</span></p>`
3876
+ const html2 = `<p contenteditable="false" class="text" data-signId="a-${index}"><span style="font-family: FangSong;font-size: 12px;line-height25px"><span class="annotation-num">${index}</span> ${item.exegesis}: ${item.text}</span></p>`
3824
3877
  const last = this.editor.state.selection.$anchor.path[0].content.size
3825
3878
  if (t === -1) this.editor.chain().focus().insertContentAt(last, html).run()
3826
3879
  let last1 = this.editor.state.selection.$anchor.path[0].content.size
@@ -3833,6 +3886,9 @@ export default {
3833
3886
  },
3834
3887
 
3835
3888
  async addReferenceMenu(data) {
3889
+ const json = this.editor.getJSON()
3890
+ let jsonData = json.content.filter(item => !(/r-l/.test(item.attrs.signId)))
3891
+ this.editor?.commands.setContent(jsonData)
3836
3892
  const t = await this.signIdData('reference')
3837
3893
  const b = await this.signIdData('referenceSplitLine') // 判断是否有分页线
3838
3894
  const html = `<p contenteditable="false" data-signId="reference" style="text-align: center;margin-bottom: 30px;"><span style="font-weight: 700;font-size: 16px;">参考文献:</span></p>`
@@ -3849,7 +3905,7 @@ export default {
3849
3905
  // 删除举例说明
3850
3906
  delGiveExample(){
3851
3907
  const json = this.editor.getJSON()
3852
- let jsonData = json.content.filter(item => !(/r-/.test(item.attrs.signId)) && !(/a-/.test(item.attrs.signId)))
3908
+ let jsonData = json.content.filter(item => !(/r-l/.test(item.attrs.signId)) && !(/a-/.test(item.attrs.signId)))
3853
3909
  this.editor?.commands.setContent(jsonData)
3854
3910
  this.addAnnotationMenu()
3855
3911
  },
@@ -3950,7 +4006,9 @@ export default {
3950
4006
  background-color: #fff;
3951
4007
  box-sizing: border-box;
3952
4008
  position: relative;
3953
- border-bottom: 10px solid #e5e5e5;
4009
+ //border-bottom: 10px solid #e5e5e5;
4010
+ margin-bottom: 10px;
4011
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
3954
4012
  }
3955
4013
 
3956
4014
  .read-only-page:last-child {
@@ -3982,7 +4040,7 @@ export default {
3982
4040
  }
3983
4041
 
3984
4042
  :deep(.title) {
3985
- padding: 10px 0 2px 0;
4043
+ //padding: 10px 0 2px 0;
3986
4044
  }
3987
4045
 
3988
4046
  .read-only-a {
@@ -4686,7 +4744,8 @@ li {
4686
4744
  flex-direction: row;
4687
4745
  justify-content: space-between;
4688
4746
  padding: 0 90px;
4689
- margin-top: 10px
4747
+ margin-top: 10px;
4748
+ box-sizing: border-box;
4690
4749
  }
4691
4750
 
4692
4751
  .page-margin-select-item {
@@ -4755,67 +4814,4 @@ li {
4755
4814
  border:1px solid #000;
4756
4815
  border-radius: 50%;
4757
4816
  }
4758
- .bubble-menu-img {
4759
- position: relative;
4760
- padding: 15px;
4761
- background-color: #fff;
4762
- border-radius: 5px;
4763
- box-shadow: 0 1px 6px #d2d2d2;
4764
- }
4765
- .line {
4766
- display: flex;
4767
- align-items: center;
4768
- padding-bottom: 10px;
4769
- }
4770
- .line:last-child {
4771
- padding-bottom: 0
4772
- }
4773
- .percent {
4774
- position: relative;
4775
- }
4776
- .percent input{
4777
- border-radius: 4px;
4778
- width: 68px;
4779
- }
4780
- .percent input::-webkit-outer-spin-button,
4781
- .percent input::-webkit-inner-spin-button {
4782
- -webkit-appearance: none !important;
4783
- }
4784
- .percent input[type='number']{
4785
- -moz-appearance: textfield;
4786
- box-shadow: none;
4787
- border: 1px solid #8c939d;
4788
- padding: 5px 15px 5px 5px;
4789
- }
4790
- .symbol {
4791
- position: absolute;
4792
- right: 5px;
4793
- top: 5px
4794
- }
4795
-
4796
- .alignmentMode {
4797
- display: flex;
4798
- justify-content: center;
4799
- align-items: center;
4800
- }
4801
- .segmentation {
4802
- height: 13px;
4803
- width: 1px;
4804
- margin: 0 5px;
4805
- background-color: #565656;
4806
- }
4807
- .imgBgc {
4808
- border-radius: 3px;
4809
- width: 20px;
4810
- height: 20px;
4811
- background-color: #CCCCCC;
4812
- }
4813
- .imgBgcAction {
4814
- background-color: #2A82E4;
4815
- }
4816
- .imgBgc > img {
4817
- padding: 1px;
4818
- width: 100%;
4819
- height: 100%;
4820
- }
4821
4817
  </style>
@@ -1174,7 +1174,7 @@ export default {
1174
1174
  that.ctx = canvas.getContext('2d');
1175
1175
  let ctx2 = canvas2.getContext('2d');
1176
1176
  that.boxWidth = that.$refs.wrap.offsetWidth
1177
- that.scales = that.boxWidth/(that.boxWidth-(that.boxWidth*0.115*2))
1177
+ that.scales=(that.boxWidth/846)*(that.boxWidth/(that.boxWidth-(that.boxWidth*0.115*2)))
1178
1178
  let viewport = page.getViewport({scale: that.scales})
1179
1179
  const sc = viewport.width / viewport.height
1180
1180
  const wid = that.$refs.wrap.offsetWidth - 10
package/src/index.js CHANGED
@@ -83,7 +83,7 @@ function install(app) {
83
83
  }
84
84
 
85
85
  export default {
86
- version: '1.33.392',
86
+ version: '1.33.394',
87
87
  install,
88
88
  Calendar,
89
89
  Message,