zydx-plus 1.33.381 → 1.33.383
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 +1 -1
- package/src/components/editor/src/butJson.js +59 -16
- package/src/components/editor/src/editor.vue +277 -153
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -23,11 +23,10 @@ const num = {
|
|
|
23
23
|
|
|
24
24
|
export function butJson(editor, data) {
|
|
25
25
|
return {
|
|
26
|
-
switchingFormat:{
|
|
26
|
+
switchingFormat: {
|
|
27
27
|
name: '切换版式',
|
|
28
28
|
key: 'switchingFormat',
|
|
29
|
-
menuKeys:[
|
|
30
|
-
]
|
|
29
|
+
menuKeys: []
|
|
31
30
|
},
|
|
32
31
|
shortcut: {
|
|
33
32
|
name: '快捷排版',
|
|
@@ -57,7 +56,7 @@ export function butJson(editor, data) {
|
|
|
57
56
|
name: '抬 头',
|
|
58
57
|
key: 'lookUp',
|
|
59
58
|
menuKeys: [],
|
|
60
|
-
html: `<p data-signId="lookUp"><span style="color: rgb(0, 0, 0);font-size:
|
|
59
|
+
html: `<p data-signId="lookUp"><span style="color: rgb(0, 0, 0);font-size: 16px; font-family:SimHei;font-weight: 700;">请在此处输入抬头:</span><span> </span></p>`
|
|
61
60
|
},
|
|
62
61
|
{
|
|
63
62
|
name: '摘 要',
|
|
@@ -118,6 +117,62 @@ export function butJson(editor, data) {
|
|
|
118
117
|
{name: '间距设置', key: 'LineSpace'}
|
|
119
118
|
],
|
|
120
119
|
},
|
|
120
|
+
outlineMenu: {
|
|
121
|
+
name: '大纲级别',
|
|
122
|
+
key: 'outlineMenu',
|
|
123
|
+
menuKeys: [
|
|
124
|
+
{name: '一级标题', key: 'title-1'},
|
|
125
|
+
{name: '二级标题', key: 'title-2'},
|
|
126
|
+
{name: '三级标题', key: 'title-3'},
|
|
127
|
+
{name: '四级标题', key: 'title-4'},
|
|
128
|
+
{name: '正文文本', key: 'text'},
|
|
129
|
+
],
|
|
130
|
+
html: {}
|
|
131
|
+
},
|
|
132
|
+
signMenu: {
|
|
133
|
+
name: '标 志',
|
|
134
|
+
key: 'signMenu',
|
|
135
|
+
menuKeys: []
|
|
136
|
+
},
|
|
137
|
+
redMenu: {
|
|
138
|
+
name: '红 头',
|
|
139
|
+
key: 'redMenu',
|
|
140
|
+
menuKeys: [],
|
|
141
|
+
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>`
|
|
142
|
+
},
|
|
143
|
+
firstLevelHeading: {
|
|
144
|
+
name: '一级标题',
|
|
145
|
+
key: 'firstLevelHeading',
|
|
146
|
+
menuKeys: [],
|
|
147
|
+
html: `<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>`
|
|
148
|
+
},
|
|
149
|
+
secondaryHeading: {
|
|
150
|
+
name: '二级标题',
|
|
151
|
+
key: 'secondaryHeading',
|
|
152
|
+
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>`
|
|
154
|
+
},
|
|
155
|
+
paragraphBody: {
|
|
156
|
+
name: '正文文本',
|
|
157
|
+
key: 'paragraphBody',
|
|
158
|
+
menuKeys: [],
|
|
159
|
+
html: `<p class="indent indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>`
|
|
160
|
+
},
|
|
161
|
+
ackMenu: {
|
|
162
|
+
name: '致 谢',
|
|
163
|
+
key: 'ackMenu',
|
|
164
|
+
menuKeys: [],
|
|
165
|
+
html: [
|
|
166
|
+
`<p data-signId="ack" style="text-align: center;"><span style="color: rgb(0, 0, 0);font-size: 16px;font-weight: bold;">致谢</span></p>`,
|
|
167
|
+
`<p><span style="color: rgb(0, 0, 0);font-size: 14px;font-family: KaiTi;">致谢内容...</span></p>`
|
|
168
|
+
]
|
|
169
|
+
},
|
|
170
|
+
paragraphMenu: {
|
|
171
|
+
name: '落 款',
|
|
172
|
+
key: 'paragraphMenu',
|
|
173
|
+
menuKeys: [],
|
|
174
|
+
html: `<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>`
|
|
175
|
+
},
|
|
121
176
|
alignmentMode: {
|
|
122
177
|
name: '对齐方式',
|
|
123
178
|
key: 'alignmentMode',
|
|
@@ -174,18 +229,6 @@ export function butJson(editor, data) {
|
|
|
174
229
|
regular5: `<p class="text" style="text-align: left;"><span style="color: rgb(0, 0, 0);font-size: 14px;font-family: KaiTi">请输入正文</span></p>`,
|
|
175
230
|
}
|
|
176
231
|
},
|
|
177
|
-
outlineMenu: {
|
|
178
|
-
name: '大纲级别',
|
|
179
|
-
key: 'outlineMenu',
|
|
180
|
-
menuKeys: [
|
|
181
|
-
{name: '一级标题', key: 'title-1'},
|
|
182
|
-
{name: '二级标题', key: 'title-2'},
|
|
183
|
-
{name: '三级标题', key: 'title-3'},
|
|
184
|
-
{name: '四级标题', key: 'title-4'},
|
|
185
|
-
{name: '正文文本', key: 'text'},
|
|
186
|
-
],
|
|
187
|
-
html: {}
|
|
188
|
-
},
|
|
189
232
|
authorMenu: {
|
|
190
233
|
name: '作者',
|
|
191
234
|
key: 'authorMenu',
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
</div>
|
|
274
274
|
</div>
|
|
275
275
|
<div v-if="!readOnly" class="p-popup-but-box">
|
|
276
|
-
<div class="tip-btn" @click="nounExplainSubmit
|
|
276
|
+
<div class="tip-btn" @click="nounExplainSubmit" v-html="'完成'"></div>
|
|
277
277
|
</div>
|
|
278
278
|
</div>
|
|
279
279
|
</template>
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
<div class="page-line-select">
|
|
318
318
|
<div class="name">样 式</div>
|
|
319
319
|
:
|
|
320
|
-
<zydx-select v-model:value="lineType" :options="lineOptions"
|
|
320
|
+
<zydx-select v-model:value="lineType" :options="lineOptions"></zydx-select>
|
|
321
321
|
</div>
|
|
322
322
|
</div>
|
|
323
323
|
<div class="tip-btnBox">
|
|
@@ -339,7 +339,7 @@
|
|
|
339
339
|
<div class="page-line-select">
|
|
340
340
|
<div class="name">选择版式:</div>
|
|
341
341
|
:
|
|
342
|
-
<zydx-select v-model:value="templateType" :options="templateOptions"
|
|
342
|
+
<zydx-select v-model:value="templateType" :options="templateOptions"></zydx-select>
|
|
343
343
|
</div>
|
|
344
344
|
</div>
|
|
345
345
|
<div class="tip-btnBox">
|
|
@@ -383,7 +383,7 @@
|
|
|
383
383
|
|
|
384
384
|
<!-- 展示弹窗 -->
|
|
385
385
|
<div v-for="(item,index) in interpositionData" :key="index">
|
|
386
|
-
<zydx-drag-popup v-if="item.isShow" :enlargeShow="false" :minHeight="183"
|
|
386
|
+
<zydx-drag-popup v-if="item.isShow" :drag-text-show="false" :enlargeShow="false" :minHeight="183"
|
|
387
387
|
:minWidth="['importWorks', 'linkCourseware', 'importArticles', 'videoLink'].indexOf(item.type) === -1 ? 640 :905"
|
|
388
388
|
:minimize="false" :minimizeCir="false"
|
|
389
389
|
:title="titleDragPopup[item.type]?titleDragPopup[item.type]:'参考文献'"
|
|
@@ -570,7 +570,7 @@
|
|
|
570
570
|
</div>
|
|
571
571
|
</template>
|
|
572
572
|
|
|
573
|
-
<script>
|
|
573
|
+
<script lang="jsx">
|
|
574
574
|
import exportWord from 'js-export-word'
|
|
575
575
|
import mammoth from './mammoth.browser.min'
|
|
576
576
|
import {butJson} from './butJson'
|
|
@@ -751,10 +751,14 @@ export default {
|
|
|
751
751
|
audioData: [],
|
|
752
752
|
time: {},
|
|
753
753
|
hex: '',
|
|
754
|
-
toolbar:
|
|
755
|
-
'switchingFormat','
|
|
754
|
+
toolbar: [
|
|
755
|
+
'switchingFormat', 'signMenu', 'pageMargin', 'paragraph',
|
|
756
756
|
'outlineMenu', 'alignmentMode', 'titleMenu',
|
|
757
757
|
'textMenu', 'color', 'interposition'],
|
|
758
|
+
// toolbar: [
|
|
759
|
+
// 'switchingFormat', 'shortcut', 'pageMargin', 'paragraph',
|
|
760
|
+
// 'outlineMenu', 'alignmentMode', 'titleMenu',
|
|
761
|
+
// 'textMenu', 'color', 'interposition'],
|
|
758
762
|
bubbleData: {},
|
|
759
763
|
htmlJson: [],
|
|
760
764
|
showRetractionPopup: false,
|
|
@@ -773,10 +777,11 @@ export default {
|
|
|
773
777
|
{label: '---------------------------------------', value: 'dashed'},
|
|
774
778
|
{label: '════════════════════════', value: 'double'}],
|
|
775
779
|
templateOptions: [
|
|
780
|
+
{label: '自由排版', value: 'freeTypesetting'},
|
|
776
781
|
{label: '公文版式', value: 'officialDocumentFormat'},
|
|
777
782
|
{label: '新闻版式', value: 'newsFormat'},
|
|
778
783
|
{label: '论文版式', value: 'paperFormat'}],
|
|
779
|
-
lineType:'solid',
|
|
784
|
+
lineType: 'solid',
|
|
780
785
|
paragraph: {
|
|
781
786
|
left: 0,
|
|
782
787
|
right: 0,
|
|
@@ -790,25 +795,31 @@ export default {
|
|
|
790
795
|
isShowPageMargin: false,
|
|
791
796
|
isShowHorizontalLine: false,
|
|
792
797
|
isShowSwitchingFormat: false,
|
|
793
|
-
templateType:'
|
|
794
|
-
switchingFormat:[
|
|
798
|
+
templateType: 'freeTypesetting',
|
|
799
|
+
switchingFormat: [
|
|
800
|
+
{
|
|
801
|
+
name: '自由排版',
|
|
802
|
+
key: 'freeTypesetting',
|
|
803
|
+
menuKeys: [],
|
|
804
|
+
html: ''
|
|
805
|
+
},
|
|
795
806
|
{
|
|
796
807
|
name: '公文版式',
|
|
797
808
|
key: 'officialDocumentFormat',
|
|
798
809
|
menuKeys: [],
|
|
799
|
-
html
|
|
810
|
+
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>`
|
|
800
811
|
},
|
|
801
812
|
{
|
|
802
813
|
name: '新闻版式',
|
|
803
814
|
key: 'newsFormat',
|
|
804
815
|
menuKeys: [],
|
|
805
|
-
html
|
|
816
|
+
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>`
|
|
806
817
|
},
|
|
807
818
|
{
|
|
808
819
|
name: '论文版式',
|
|
809
820
|
key: 'paperFormat',
|
|
810
821
|
menuKeys: [],
|
|
811
|
-
html
|
|
822
|
+
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>`
|
|
812
823
|
}
|
|
813
824
|
]
|
|
814
825
|
}
|
|
@@ -953,12 +964,12 @@ export default {
|
|
|
953
964
|
this.editor?.commands.setContent(dataHtml)
|
|
954
965
|
if (this.readOnly) {
|
|
955
966
|
if (this.page) this.editableShow = true
|
|
956
|
-
setTimeout(() => {
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
}, 300)
|
|
967
|
+
// setTimeout(() => {
|
|
968
|
+
if (this.page) {
|
|
969
|
+
this.editableShow = false
|
|
970
|
+
this.readOnlyPage()
|
|
971
|
+
}
|
|
972
|
+
// }, 300)
|
|
962
973
|
}
|
|
963
974
|
setTimeout(() => {
|
|
964
975
|
this.init = true
|
|
@@ -1269,41 +1280,67 @@ export default {
|
|
|
1269
1280
|
})
|
|
1270
1281
|
},
|
|
1271
1282
|
//修改分割线类型
|
|
1272
|
-
changeLineType(){
|
|
1273
|
-
if(this.lineType==='solid'){
|
|
1274
|
-
let html = `${this.selection()===1?'<p></p>':''}<p contenteditable="false" class="solid"></p><p></p>`
|
|
1283
|
+
changeLineType() {
|
|
1284
|
+
if (this.lineType === 'solid') {
|
|
1285
|
+
let html = `${this.selection() === 1 ? '<p></p>' : ''}<p contenteditable="false" class="solid"></p><p></p>`
|
|
1275
1286
|
this.editor.chain().focus().insertContentAt(this.selection(), html).run()
|
|
1276
1287
|
}
|
|
1277
|
-
if(this.lineType==='dashed'){
|
|
1278
|
-
let html = `${this.selection()===1?'<p></p>':''}<p contenteditable="false" class="dashed"></p><p></p>`
|
|
1288
|
+
if (this.lineType === 'dashed') {
|
|
1289
|
+
let html = `${this.selection() === 1 ? '<p></p>' : ''}<p contenteditable="false" class="dashed"></p><p></p>`
|
|
1279
1290
|
this.editor.chain().focus().insertContentAt(this.selection(), html).run()
|
|
1280
1291
|
}
|
|
1281
|
-
if(this.lineType==='double'){
|
|
1282
|
-
let html = `${this.selection()===1?'<p></p>':''}<p contenteditable="false" class="double"></p><p></p>`
|
|
1292
|
+
if (this.lineType === 'double') {
|
|
1293
|
+
let html = `${this.selection() === 1 ? '<p></p>' : ''}<p contenteditable="false" class="double"></p><p></p>`
|
|
1283
1294
|
this.editor.chain().focus().insertContentAt(this.selection(), html).run()
|
|
1284
1295
|
}
|
|
1285
1296
|
this.isShowHorizontalLine = false
|
|
1286
1297
|
},
|
|
1287
1298
|
//修改模板类型
|
|
1288
|
-
async changeTemplateType(){
|
|
1299
|
+
async changeTemplateType() {
|
|
1289
1300
|
await Message(
|
|
1290
1301
|
{type: 'text', promptContent: '切换版式后,已编辑的内容将被清空且无法保存,是否确认切换版式?'}).then(() => {
|
|
1302
|
+
// 自由排版
|
|
1303
|
+
if (this.templateType === 'freeTypesetting') {
|
|
1304
|
+
const html = this.switchingFormat.filter(item => item.key === this.templateType)[0].html
|
|
1305
|
+
this.editor.chain().setContent(html).run()
|
|
1306
|
+
this.toolbar = [
|
|
1307
|
+
'switchingFormat', 'signMenu', 'pageMargin', 'paragraph',
|
|
1308
|
+
'outlineMenu', 'alignmentMode', 'titleMenu',
|
|
1309
|
+
'textMenu', 'color', 'interposition']
|
|
1310
|
+
this.organizeButton()
|
|
1311
|
+
}
|
|
1291
1312
|
// 公文版式
|
|
1292
1313
|
if (this.templateType === 'officialDocumentFormat') {
|
|
1293
1314
|
const html = this.switchingFormat.filter(item => item.key === this.templateType)[0].html
|
|
1294
1315
|
this.editor.chain().setContent(html).run()
|
|
1316
|
+
this.toolbar = [
|
|
1317
|
+
'switchingFormat', 'signMenu', 'pageMargin','redMenu', 'firstLevelHeading',
|
|
1318
|
+
'secondaryHeading', 'paragraphBody', 'paragraphMenu', 'alignmentMode',
|
|
1319
|
+
'titleMenu', 'color', 'interposition']
|
|
1320
|
+
this.organizeButton()
|
|
1295
1321
|
}
|
|
1296
1322
|
// 新闻版式
|
|
1297
1323
|
if (this.templateType === 'newsFormat') {
|
|
1298
1324
|
const html = this.switchingFormat.filter(item => item.key === this.templateType)[0].html
|
|
1299
1325
|
this.editor.chain().setContent(html).run()
|
|
1326
|
+
this.toolbar = [
|
|
1327
|
+
'switchingFormat', 'signMenu', 'pageMargin', 'firstLevelHeading',
|
|
1328
|
+
'secondaryHeading', 'paragraphBody', 'paragraphMenu', 'alignmentMode',
|
|
1329
|
+
'titleMenu', 'color', 'interposition']
|
|
1330
|
+
this.organizeButton()
|
|
1300
1331
|
}
|
|
1301
1332
|
// 论文版式
|
|
1302
1333
|
if (this.templateType === 'paperFormat') {
|
|
1303
1334
|
const html = this.switchingFormat.filter(item => item.key === this.templateType)[0].html
|
|
1304
1335
|
this.editor.chain().setContent(html).run()
|
|
1336
|
+
this.toolbar = [
|
|
1337
|
+
'switchingFormat', 'signMenu', 'pageMargin', 'firstLevelHeading',
|
|
1338
|
+
'secondaryHeading', 'paragraphBody', 'ackMenu', 'paragraphMenu', 'alignmentMode',
|
|
1339
|
+
'titleMenu', 'color', 'interposition']
|
|
1340
|
+
this.organizeButton()
|
|
1305
1341
|
}
|
|
1306
1342
|
this.isShowSwitchingFormat = false
|
|
1343
|
+
this.interpositionData = []
|
|
1307
1344
|
}).catch((err) => {
|
|
1308
1345
|
console.log('取消', err)
|
|
1309
1346
|
})
|
|
@@ -1918,104 +1955,106 @@ export default {
|
|
|
1918
1955
|
})
|
|
1919
1956
|
},
|
|
1920
1957
|
readOnlyPage() { // 只读分页
|
|
1921
|
-
this
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1958
|
+
this.$nextTick(() => {
|
|
1959
|
+
this.htmlArr = []
|
|
1960
|
+
const data = document.querySelectorAll('.editing-cont')[0].childNodes[0].childNodes
|
|
1961
|
+
this.wit = document.getElementsByClassName('editor-content')[0].offsetWidth + 20
|
|
1962
|
+
if (this.wit > 900) this.wit = 900
|
|
1963
|
+
let max = this.wit * 1.6 - 46
|
|
1964
|
+
let pHeight = 0
|
|
1965
|
+
let html = ''
|
|
1966
|
+
for (let i = 0; i < data.length; i++) {
|
|
1967
|
+
if (data[i].className === 'custom-link') { // 分割线
|
|
1968
|
+
pHeight += 21
|
|
1969
|
+
html += data[i].outerHTML
|
|
1970
|
+
continue
|
|
1971
|
+
}
|
|
1972
|
+
if (data[i].firstChild.localName === 'img') {
|
|
1973
|
+
const img = data[i].firstChild
|
|
1974
|
+
const imgHeight = img.offsetHeight
|
|
1975
|
+
if ((pHeight + imgHeight) > max) {
|
|
1976
|
+
this.htmlArr.push(html)
|
|
1977
|
+
pHeight = 0
|
|
1978
|
+
html = ''
|
|
1979
|
+
}
|
|
1980
|
+
}
|
|
1981
|
+
if (data[i].dataset?.signid === 'splitLine') {
|
|
1938
1982
|
this.htmlArr.push(html)
|
|
1939
1983
|
pHeight = 0
|
|
1940
1984
|
html = ''
|
|
1941
1985
|
}
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
html = ''
|
|
1947
|
-
}
|
|
1948
|
-
if (data[i].dataset?.signid === 'ack') {
|
|
1949
|
-
this.htmlArr.push(html)
|
|
1950
|
-
pHeight = 0
|
|
1951
|
-
html = ''
|
|
1952
|
-
}
|
|
1953
|
-
let text = data[i].offsetHeight
|
|
1954
|
-
if ((pHeight + text) > max) {
|
|
1955
|
-
const {start, end, size} = this.rows(data[i], max - pHeight)
|
|
1956
|
-
let child = data[i].childNodes[0]
|
|
1957
|
-
let childNodes = data[i].childNodes[0].childNodes[0]
|
|
1958
|
-
let fontSize = size
|
|
1959
|
-
let fontFamily = 'Microsoft Yahei'
|
|
1960
|
-
let childBColor = '#fff'
|
|
1961
|
-
let childColor = '#000'
|
|
1962
|
-
let textAlign = window.getComputedStyle(data[i], null).textAlign
|
|
1963
|
-
let color = '#000'
|
|
1964
|
-
let className = data[i].className
|
|
1965
|
-
let signid = data[i].dataset.signid
|
|
1966
|
-
let signidArr = signid ? signid.split('-') : []
|
|
1967
|
-
let label = 'span'
|
|
1968
|
-
if (child && child.nodeName !== '#text') {
|
|
1969
|
-
fontSize = window.getComputedStyle(child, null).fontSize
|
|
1970
|
-
fontFamily = window.getComputedStyle(child, null).fontFamily
|
|
1971
|
-
color = window.getComputedStyle(child, null).color
|
|
1972
|
-
}
|
|
1973
|
-
if (childNodes && childNodes.nodeName === 'MARK') {
|
|
1974
|
-
childBColor = window.getComputedStyle(childNodes, null).backgroundColor
|
|
1975
|
-
childColor = window.getComputedStyle(childNodes, null).color
|
|
1976
|
-
}
|
|
1977
|
-
if (signid && signidArr[0] === 'title') {
|
|
1978
|
-
label = 'strong'
|
|
1979
|
-
} else {
|
|
1980
|
-
label = 'span'
|
|
1986
|
+
if (data[i].dataset?.signid === 'ack') {
|
|
1987
|
+
this.htmlArr.push(html)
|
|
1988
|
+
pHeight = 0
|
|
1989
|
+
html = ''
|
|
1981
1990
|
}
|
|
1982
|
-
|
|
1991
|
+
let text = data[i].offsetHeight
|
|
1992
|
+
if ((pHeight + text) > max) {
|
|
1993
|
+
const {start, end, size} = this.rows(data[i], max - pHeight)
|
|
1994
|
+
let child = data[i].childNodes[0]
|
|
1995
|
+
let childNodes = data[i].childNodes[0].childNodes[0]
|
|
1996
|
+
let fontSize = size
|
|
1997
|
+
let fontFamily = 'Microsoft Yahei'
|
|
1998
|
+
let childBColor = '#fff'
|
|
1999
|
+
let childColor = '#000'
|
|
2000
|
+
let textAlign = window.getComputedStyle(data[i], null).textAlign
|
|
2001
|
+
let color = '#000'
|
|
2002
|
+
let className = data[i].className
|
|
2003
|
+
let signid = data[i].dataset.signid
|
|
2004
|
+
let signidArr = signid ? signid.split('-') : []
|
|
2005
|
+
let label = 'span'
|
|
2006
|
+
if (child && child.nodeName !== '#text') {
|
|
2007
|
+
fontSize = window.getComputedStyle(child, null).fontSize
|
|
2008
|
+
fontFamily = window.getComputedStyle(child, null).fontFamily
|
|
2009
|
+
color = window.getComputedStyle(child, null).color
|
|
2010
|
+
}
|
|
1983
2011
|
if (childNodes && childNodes.nodeName === 'MARK') {
|
|
1984
|
-
|
|
2012
|
+
childBColor = window.getComputedStyle(childNodes, null).backgroundColor
|
|
2013
|
+
childColor = window.getComputedStyle(childNodes, null).color
|
|
2014
|
+
}
|
|
2015
|
+
if (signid && signidArr[0] === 'title') {
|
|
2016
|
+
label = 'strong'
|
|
1985
2017
|
} else {
|
|
1986
|
-
|
|
2018
|
+
label = 'span'
|
|
1987
2019
|
}
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
2020
|
+
if (child && child.nodeName !== '#text') {
|
|
2021
|
+
if (childNodes && childNodes.nodeName === 'MARK') {
|
|
2022
|
+
html += `<p ${signid ? 'data-signid=' + signid : ''} style="text-align: ${textAlign}" class="${className}"><${label} style="font-size: ${fontSize}; font-family: ${fontFamily};color:${color}"><mark class="custom-class" data-color="${childBColor}" style="background-color: ${childBColor}; color: ${childColor};">${start.data}</mark></${label}></p>`
|
|
2023
|
+
} else {
|
|
2024
|
+
html += `<p ${signid ? 'data-signid=' + signid : ''} style="text-align: ${textAlign}" class="${className}"><${label} style="font-size: ${fontSize}; font-family: ${fontFamily};color:${color}">${start.data}</${label}></p>`
|
|
2025
|
+
}
|
|
2026
|
+
} else {
|
|
2027
|
+
html += `<p ${signid ? 'data-signid=' + signid : ''} style="text-align: ${textAlign}" class="${className}"><${label} style="font-size: ${size}px;">${start.data}</${label}></p>`
|
|
2028
|
+
}
|
|
2029
|
+
this.htmlArr.push(html)
|
|
2030
|
+
pHeight = 0
|
|
2031
|
+
html = ''
|
|
2032
|
+
if (child && child.nodeName !== '#text') {
|
|
2033
|
+
if (childNodes && childNodes.nodeName === 'MARK') {
|
|
2034
|
+
html += `<p ${signid ? 'data-signid=' + signid : ''} style="text-align: ${textAlign}"><${label} style="font-size: ${fontSize}; font-family: ${fontFamily};color:${color}"><mark class="custom-class" data-color="${childBColor}" style="background-color: ${childBColor}; color: ${childColor};">${end.data}</mark></${label}></p>`
|
|
2035
|
+
} else {
|
|
2036
|
+
html += `<p ${signid ? 'data-signid=' + signid : ''} style="text-align: ${textAlign}"><${label} style="font-size: ${fontSize}; font-family: ${fontFamily};color:${color}">${end.data}</${label}></p>`
|
|
2037
|
+
}
|
|
1997
2038
|
} else {
|
|
1998
|
-
html += `<p ${signid ? 'data-signid=' + signid : ''} style="text-align: ${textAlign}"><${label} style="font-size: ${
|
|
2039
|
+
html += `<p ${signid ? 'data-signid=' + signid : ''} style="text-align: ${textAlign}"><${label} style="font-size: ${size}px;">${end.data}</${label}></p>`
|
|
1999
2040
|
}
|
|
2041
|
+
pHeight = end.size
|
|
2000
2042
|
} else {
|
|
2001
|
-
|
|
2043
|
+
pHeight += text
|
|
2044
|
+
if (data[i].dataset?.signid !== 'splitLine' && data[i].dataset?.signid !== 'referenceSplitLine') html += data[i].outerHTML
|
|
2045
|
+
}
|
|
2046
|
+
if (i === data.length - 1) {
|
|
2047
|
+
this.htmlArr.push(html)
|
|
2048
|
+
pHeight = 0
|
|
2049
|
+
html = ''
|
|
2050
|
+
break
|
|
2002
2051
|
}
|
|
2003
|
-
pHeight = end.size
|
|
2004
|
-
} else {
|
|
2005
|
-
pHeight += text
|
|
2006
|
-
if(data[i].dataset?.signid !== 'splitLine'&&data[i].dataset?.signid !== 'referenceSplitLine')html += data[i].outerHTML
|
|
2007
|
-
}
|
|
2008
|
-
if (i === data.length - 1) {
|
|
2009
|
-
this.htmlArr.push(html)
|
|
2010
|
-
pHeight = 0
|
|
2011
|
-
html = ''
|
|
2012
|
-
break
|
|
2013
2052
|
}
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
|
|
2018
|
-
}
|
|
2053
|
+
// 绑定点击事件
|
|
2054
|
+
setTimeout(() => {
|
|
2055
|
+
this.documentClick()
|
|
2056
|
+
}, 500)
|
|
2057
|
+
})
|
|
2019
2058
|
},
|
|
2020
2059
|
documentClick() {
|
|
2021
2060
|
const p = document.getElementsByClassName('mu')
|
|
@@ -2187,6 +2226,7 @@ export default {
|
|
|
2187
2226
|
return width * fontSize / 10;
|
|
2188
2227
|
},
|
|
2189
2228
|
confirm() {
|
|
2229
|
+
this.delGiveExample()
|
|
2190
2230
|
let directoryJson = html2json(this.editor.getHTML()).child
|
|
2191
2231
|
let editorHtml = this.editor.getHTML()
|
|
2192
2232
|
let editorJson = this.editor.getJSON()
|
|
@@ -2210,6 +2250,7 @@ export default {
|
|
|
2210
2250
|
this.$emit('confirm', data)
|
|
2211
2251
|
},
|
|
2212
2252
|
getConfirm() {
|
|
2253
|
+
this.delGiveExample()
|
|
2213
2254
|
let directoryJson = html2json(this.editor.getHTML()).child
|
|
2214
2255
|
let editorHtml = this.editor.getHTML()
|
|
2215
2256
|
let editorJson = this.editor.getJSON()
|
|
@@ -2613,7 +2654,7 @@ export default {
|
|
|
2613
2654
|
},
|
|
2614
2655
|
|
|
2615
2656
|
async butTap(data, key, childKey) {
|
|
2616
|
-
//
|
|
2657
|
+
// 切换版式
|
|
2617
2658
|
if (data.key === 'switchingFormat') {
|
|
2618
2659
|
this.isShowSwitchingFormat = true
|
|
2619
2660
|
}
|
|
@@ -2745,8 +2786,8 @@ export default {
|
|
|
2745
2786
|
}
|
|
2746
2787
|
const num = this.upSort(this.editor, 'paragraph')
|
|
2747
2788
|
if (r === -1) {
|
|
2748
|
-
this.editor.chain().focus().insertContentAt(num.len-6, html[0]).run()
|
|
2749
|
-
this.editor.chain().focus().insertContentAt(num.len-2, html[1]).run()
|
|
2789
|
+
this.editor.chain().focus().insertContentAt(num.len - 6, html[0]).run()
|
|
2790
|
+
this.editor.chain().focus().insertContentAt(num.len - 2, html[1]).run()
|
|
2750
2791
|
}
|
|
2751
2792
|
return
|
|
2752
2793
|
}
|
|
@@ -2836,6 +2877,78 @@ export default {
|
|
|
2836
2877
|
}*/
|
|
2837
2878
|
}
|
|
2838
2879
|
|
|
2880
|
+
// 标志
|
|
2881
|
+
if (data.key === 'signMenu') this.signMenuShow = !this.signMenuShow
|
|
2882
|
+
// 红头文件
|
|
2883
|
+
if (data.key === 'redMenu') {
|
|
2884
|
+
const html = butJson(this.editor, this.menusText)[data.key].html
|
|
2885
|
+
// console.log('menusHtml',menusHtml)
|
|
2886
|
+
// const html = menusHtml.filter(item => item.key == key.key)[0].html
|
|
2887
|
+
const r = await this.signIdData('red')
|
|
2888
|
+
if (r === -1) {
|
|
2889
|
+
this.editor.chain().focus().insertContentAt(0, html).run()
|
|
2890
|
+
this.editor.commands.setHorizontalRule() // 添加分割线
|
|
2891
|
+
}
|
|
2892
|
+
}
|
|
2893
|
+
// 一级标题
|
|
2894
|
+
if (data.key === 'firstLevelHeading') {
|
|
2895
|
+
const html = butJson(this.editor, this.menusText)[data.key].html
|
|
2896
|
+
this.editor.chain().focus().insertContentAt(this.selection(), html).run()
|
|
2897
|
+
}
|
|
2898
|
+
// 二级标题
|
|
2899
|
+
if (data.key === 'secondaryHeading') {
|
|
2900
|
+
const html = butJson(this.editor, this.menusText)[data.key].html
|
|
2901
|
+
this.editor.chain().focus().insertContentAt(this.selection(), html).run()
|
|
2902
|
+
}
|
|
2903
|
+
// 正文
|
|
2904
|
+
if (data.key === 'paragraphBody') {
|
|
2905
|
+
const html = butJson(this.editor, this.menusText)[data.key].html
|
|
2906
|
+
this.editor.chain().focus().insertContentAt(this.selection(), html).run()
|
|
2907
|
+
}
|
|
2908
|
+
// 致谢
|
|
2909
|
+
if (data.key === 'ackMenu') {
|
|
2910
|
+
const html = butJson(this.editor, this.menusText)[data.key].html
|
|
2911
|
+
const last = this.editor.state.selection.$anchor.path[0].content.size
|
|
2912
|
+
const r = await this.signIdData('ack')//致谢
|
|
2913
|
+
const n = await this.signIdData('paragraph')//落款
|
|
2914
|
+
const b = await this.signIdData('enclosure')//附件
|
|
2915
|
+
if (b === -1) {
|
|
2916
|
+
if (n === -1) {
|
|
2917
|
+
if (r === -1) {
|
|
2918
|
+
this.editor.chain().focus().insertContentAt(last, html[0]).run()
|
|
2919
|
+
this.editor.chain().focus().insertContentAt(last + 3, html[1]).run()
|
|
2920
|
+
}
|
|
2921
|
+
return
|
|
2922
|
+
}
|
|
2923
|
+
const num = this.upSort(this.editor, 'paragraph')
|
|
2924
|
+
if (r === -1) {
|
|
2925
|
+
this.editor.chain().focus().insertContentAt(num.len - 10, html[0]).run()
|
|
2926
|
+
this.editor.chain().focus().insertContentAt(num.len - 6, html[1]).run()
|
|
2927
|
+
}
|
|
2928
|
+
return
|
|
2929
|
+
}
|
|
2930
|
+
const num = this.selectionPath('enclosure')
|
|
2931
|
+
if (r === -1) {
|
|
2932
|
+
this.editor.chain().focus().insertContentAt(num - 7, html[0]).run()
|
|
2933
|
+
const ackNum = this.selectionPath('ack')
|
|
2934
|
+
this.editor.chain().focus().insertContentAt(ackNum, html[1]).run()
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
// 添加落款
|
|
2938
|
+
if (data.key === 'paragraphMenu') {
|
|
2939
|
+
const html = butJson(this.editor, this.menusText)[data.key].html
|
|
2940
|
+
const last = this.editor.state.selection.$anchor.path[0].content.size
|
|
2941
|
+
const r = await this.signIdData('paragraph')//落款
|
|
2942
|
+
const n = await this.signIdData('enclosure')//附件
|
|
2943
|
+
if (n === -1) {
|
|
2944
|
+
if (r === -1) this.editor.chain().focus().insertContentAt(last, html).run()
|
|
2945
|
+
return
|
|
2946
|
+
}
|
|
2947
|
+
const num = this.selectionPath('enclosure')
|
|
2948
|
+
if (r === -1) this.editor.chain().focus().insertContentAt(num - 7, html).run()
|
|
2949
|
+
return
|
|
2950
|
+
}
|
|
2951
|
+
|
|
2839
2952
|
if (data.key === 'textMenu' && key === 0 || data.key === 'titleMenu' && key === 0) return
|
|
2840
2953
|
// 边距
|
|
2841
2954
|
if (data.key === 'pageMargin') {
|
|
@@ -2968,11 +3081,11 @@ export default {
|
|
|
2968
3081
|
}
|
|
2969
3082
|
// 添加注释
|
|
2970
3083
|
if (key.key === 'taggingMenu') {
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2974
|
-
|
|
2975
|
-
|
|
3084
|
+
this.tipTitle = window.getSelection().toString()
|
|
3085
|
+
if (this.tipTitle.length === 0) {
|
|
3086
|
+
await Message({type: 'text', promptContent: '请选中需要注释的文字'})
|
|
3087
|
+
return
|
|
3088
|
+
}
|
|
2976
3089
|
this.exegesisType = "add"
|
|
2977
3090
|
this.titlePopup = '注释'
|
|
2978
3091
|
this.isShowPopup = true
|
|
@@ -3626,15 +3739,22 @@ export default {
|
|
|
3626
3739
|
}
|
|
3627
3740
|
},
|
|
3628
3741
|
|
|
3629
|
-
async addAnnotationMenu(
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
|
|
3635
|
-
|
|
3636
|
-
|
|
3637
|
-
|
|
3742
|
+
async addAnnotationMenu() {
|
|
3743
|
+
this.interpositionData.forEach((item,index)=>{
|
|
3744
|
+
if(item.type!=='taggingMenu') return
|
|
3745
|
+
const t = this.signIdData('annotation')
|
|
3746
|
+
const b = this.signIdData('annotationSplitLine') // 判断是否有分页线
|
|
3747
|
+
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>`
|
|
3748
|
+
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>`
|
|
3749
|
+
const last = this.editor.state.selection.$anchor.path[0].content.size
|
|
3750
|
+
if (t === -1) this.editor.chain().focus().insertContentAt(last, html).run()
|
|
3751
|
+
let last1 = this.editor.state.selection.$anchor.path[0].content.size
|
|
3752
|
+
if (b === -1) {
|
|
3753
|
+
this.editor.chain().focus().insertContentAt(last1, html2).run()
|
|
3754
|
+
} else {
|
|
3755
|
+
this.editor.chain().focus().insertContentAt(this.selectionPath('annotationSplitLine') - 22, html2).run()
|
|
3756
|
+
}
|
|
3757
|
+
})
|
|
3638
3758
|
},
|
|
3639
3759
|
|
|
3640
3760
|
async addReferenceMenu(data) {
|
|
@@ -3643,16 +3763,20 @@ export default {
|
|
|
3643
3763
|
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>`
|
|
3644
3764
|
const html2 = `<p contenteditable="false" class="text" data-signId="r-${data.number}"><span style="font-family: FangSong;font-size: 12px;line-height25px">${data.text}</span></p>`
|
|
3645
3765
|
const last = this.editor.state.selection.$anchor.path[0].content.size
|
|
3646
|
-
|
|
3647
|
-
|
|
3766
|
+
if (t === -1) this.editor.chain().focus().insertContentAt(last, html).run()
|
|
3767
|
+
let last1 = this.editor.state.selection.$anchor.path[0].content.size
|
|
3648
3768
|
if (b === -1) {
|
|
3649
|
-
|
|
3769
|
+
this.editor.chain().focus().insertContentAt(last1, html2).run()
|
|
3650
3770
|
} else {
|
|
3651
|
-
|
|
3771
|
+
this.editor.chain().focus().insertContentAt(this.selectionPath('referenceSplitLine') - 22, html2).run()
|
|
3652
3772
|
}
|
|
3653
|
-
|
|
3654
|
-
|
|
3655
|
-
|
|
3773
|
+
},
|
|
3774
|
+
// 删除举例说明
|
|
3775
|
+
delGiveExample(){
|
|
3776
|
+
const json = this.editor.getJSON()
|
|
3777
|
+
let jsonData = json.content.filter(item => !(/r-/.test(item.attrs.signId)) && !(/a-/.test(item.attrs.signId)))
|
|
3778
|
+
this.editor?.commands.setContent(jsonData)
|
|
3779
|
+
this.addAnnotationMenu()
|
|
3656
3780
|
},
|
|
3657
3781
|
|
|
3658
3782
|
delReferenceMenu(data) {
|
|
@@ -3806,7 +3930,7 @@ label {
|
|
|
3806
3930
|
}
|
|
3807
3931
|
|
|
3808
3932
|
:deep(.custom-link) {
|
|
3809
|
-
color: #
|
|
3933
|
+
color: #000;
|
|
3810
3934
|
text-decoration: none;
|
|
3811
3935
|
}
|
|
3812
3936
|
|
|
@@ -3899,7 +4023,7 @@ label {
|
|
|
3899
4023
|
}
|
|
3900
4024
|
|
|
3901
4025
|
:deep(.custom-link) {
|
|
3902
|
-
margin: 10px 0;
|
|
4026
|
+
//margin: 10px 0;
|
|
3903
4027
|
}
|
|
3904
4028
|
|
|
3905
4029
|
:deep(.mu) {
|
|
@@ -4513,25 +4637,25 @@ li {
|
|
|
4513
4637
|
color: rgba(0, 0, 0, 1);
|
|
4514
4638
|
}
|
|
4515
4639
|
|
|
4516
|
-
:deep(.solid){
|
|
4640
|
+
:deep(.solid) {
|
|
4517
4641
|
height: 0;
|
|
4518
|
-
border-bottom:1px solid #000;
|
|
4642
|
+
border-bottom: 1px solid #000;
|
|
4519
4643
|
}
|
|
4520
4644
|
|
|
4521
|
-
:deep(.dashed){
|
|
4645
|
+
:deep(.dashed) {
|
|
4522
4646
|
height: 0;
|
|
4523
|
-
border-bottom:1px dashed #000;
|
|
4647
|
+
border-bottom: 1px dashed #000;
|
|
4524
4648
|
}
|
|
4525
4649
|
|
|
4526
|
-
:deep(.double){
|
|
4650
|
+
:deep(.double) {
|
|
4527
4651
|
height: 0;
|
|
4528
|
-
border-style:double;
|
|
4529
|
-
border-top:none;
|
|
4652
|
+
border-style: double;
|
|
4653
|
+
border-top: none;
|
|
4530
4654
|
border-left: none;
|
|
4531
4655
|
border-right: none;
|
|
4532
4656
|
}
|
|
4533
4657
|
|
|
4534
|
-
:deep(.paging-line){
|
|
4658
|
+
:deep(.paging-line) {
|
|
4535
4659
|
width: 100%;
|
|
4536
4660
|
font-size: 12px;
|
|
4537
4661
|
font-weight: 400;
|
|
@@ -4544,16 +4668,16 @@ li {
|
|
|
4544
4668
|
justify-content: space-around;
|
|
4545
4669
|
align-items: center;
|
|
4546
4670
|
}
|
|
4547
|
-
|
|
4548
|
-
|
|
4671
|
+
|
|
4672
|
+
:deep(.paging-line)::before, :deep(.paging-line)::after {
|
|
4673
|
+
content: '';
|
|
4549
4674
|
flex: 1;
|
|
4550
4675
|
height: 0px;
|
|
4551
4676
|
border-bottom: 1px dashed rgba(204, 204, 204, 1);
|
|
4552
4677
|
}
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4556
|
-
:
|
|
4557
|
-
//margin-left: 0.25rem;
|
|
4678
|
+
|
|
4679
|
+
:deep(.annotation-num) {
|
|
4680
|
+
border:1px solid #000;
|
|
4681
|
+
border-radius: 50%;
|
|
4558
4682
|
}
|
|
4559
4683
|
</style>
|