zydx-plus 1.35.524 → 1.35.526

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.35.524",
3
+ "version": "1.35.526",
4
4
  "description": "Vue.js",
5
5
  "main": "src/index.js",
6
6
  "files": [
@@ -1,94 +1,82 @@
1
1
  <template>
2
2
  <teleport to="body">
3
- <div class="chat-content"
4
- :style="{
5
- top: `${y !== '' ? `${y}px` : '50%'}`,
6
- left: `${x !== '' ? `${x}px` : '50%'}`,
7
- marginTop: `${y === ''? '-80px' : '0'}`,
8
- marginLeft: `${x === ''? '-300px' : '0'}`,
9
- }">
10
- <div class="chat-header theme-background">
11
- <span class="chat-header-title"
12
- @mousedown.stop="chatMousedown"
13
- @mouseup.stop="chatMouseup">
14
- AI助手
15
- </span>
16
- <i class="iconfont zydx-guanbi" @click.stop="aiClose"></i>
17
- </div>
18
- <div class="chat-input">
19
- <div class="chat-text">
20
- <textarea :disabled="disabled" @keydown="handleKeydown" @input="autoResize" v-model="userText" placeholder="问AI试试..."></textarea>
21
- </div>
22
- <div class="chat-operate">
23
- <div class="chat-send">
24
- <div @click="clearTextarea">
25
- <i class= "theme-text iconfont zydx-a-qingchuAizhushou"></i>
26
- <span class="theme-text">清空</span>
27
- </div>
28
- <div class="line"></div>
29
- <div @click="speak">
30
- <i :class="{'speak': microphone, 'theme-text': true}" class="iconfont zydx-a-yuyinshuruAi"></i>
31
- <span class="theme-text">语音输入</span>
32
- </div>
33
- <div class="line"></div>
34
- <div @click="send">
35
- <i class="theme-text iconfont zydx-a-sousuoAizhushou" :class="{'disabled': disabled}"></i>
36
- <button :disabled="disabled" :class="{'disabled': disabled, 'theme-text': true}">搜索</button>
3
+ <drag-popup ref="dragPopup" v-if='isShow' @close="aiClose" title="AI助手" :width="960" :height="400" :minWidth="300" :minHeight="400">
4
+ <template v-slot:content>
5
+ <div class="chat-input">
6
+ <div class="chat-text">
7
+ <textarea :disabled="disabled" @keydown="handleKeydown" @input="autoResize" v-model="userText" placeholder="问AI试试..."></textarea>
8
+ </div>
9
+ <div class="chat-operate">
10
+ <div class="chat-send">
11
+ <div :class="{'disabled': disabled}" @click="clearTextarea">
12
+ <i class= "theme-text iconfont zydx-a-qingchuAizhushou"></i>
13
+ <span class="theme-text">清空</span>
14
+ </div>
15
+ <div class="line"></div>
16
+ <div :class="{'disabled': disabled}" @click="speak">
17
+ <i :class="{'speak': microphone, 'theme-text': true}" class="iconfont zydx-a-yuyinshuruAi"></i>
18
+ <span class="theme-text">语音输入</span>
19
+ </div>
20
+ <div class="line"></div>
21
+ <div @click="send">
22
+ <i class="theme-text iconfont zydx-a-sousuoAizhushou" :class="{'disabled': disabled}"></i>
23
+ <button :disabled="disabled" :class="{'disabled': disabled, 'theme-text': true}">搜索</button>
24
+ </div>
37
25
  </div>
38
26
  </div>
39
27
  </div>
40
- </div>
41
- <div class="chat-in" v-if="currentMessage" ref="content">
42
- <div class="AI-tips-line">
43
- <div class="tips">
44
- <span>AI回答</span>
45
- <span>(以下内容为AI生成,请注意辨别信息真伪)</span>
46
- </div>
47
- <div class="operate">
48
- <div @click="send" :class="{'disabled': disabled}">
49
- <i class="theme-text iconfont zydx-a-zhongzhiAi"></i>
50
- <span class="theme-text">重新生成</span>
28
+ <div class="chat-in" ref="content">
29
+ <div class="AI-tips-line">
30
+ <div class="tips">
31
+ <span>AI回答</span>
32
+ <span>(以下内容为AI生成,请注意辨别信息真伪)</span>
51
33
  </div>
52
- <div class="line"></div>
53
- <div @click="copy">
54
- <i class="theme-text iconfont zydx-a-fuzhiAI"></i>
55
- <span class="theme-text">复制</span>
34
+ <div class="operate" v-if="currentMessage">
35
+ <div @click="send" :class="{'disabled': disabled}">
36
+ <i class="theme-text iconfont zydx-a-zhongzhiAi"></i>
37
+ <span class="theme-text">重新生成</span>
38
+ </div>
39
+ <div class="line"></div>
40
+ <div @click="copy">
41
+ <i class="theme-text iconfont zydx-a-fuzhiAI"></i>
42
+ <span class="theme-text">复制</span>
43
+ </div>
56
44
  </div>
57
45
  </div>
58
- </div>
59
- <div class="chat-in-cont" ref="contentLi">
60
- <!-- <div class="chat-in-li" :class="{'left': item.role === 'assistant', 'right': item.role === 'user'}" v-for="(item,index) in messages"> -->
61
- <!-- <template v-if="item.role === 'assistant'">
62
- <div class="ai-avatar" v-if="item.role === 'assistant'">
63
- <img src="./ai.png" alt="" />
46
+ <div class="chat-in-cont" ref="contentLi">
47
+ <!-- <div class="chat-in-li" :class="{'left': item.role === 'assistant', 'right': item.role === 'user'}" v-for="(item,index) in messages"> -->
48
+ <!-- <template v-if="item.role === 'assistant'">
49
+ <div class="ai-avatar" v-if="item.role === 'assistant'">
50
+ <img src="./ai.png" alt="" />
51
+ </div>
52
+ <div class="text-cont">{{ item.content }}</div>
53
+ </template> -->
54
+ <div class="chat-in-li left">
55
+ <div class="text-cont">{{currentMessage}}</div>
64
56
  </div>
65
- <div class="text-cont">{{ item.content }}</div>
66
- </template> -->
67
- <div class="chat-in-li left">
68
- <div class="text-cont">{{currentMessage}}</div>
69
57
  </div>
70
58
  </div>
71
- </div>
72
- <div class="microphone" v-if="microphone">
73
- <div class="microphone-cont mic-anim">
74
- <div class="microphone1">
75
- <div class="microphone2">
76
- <div class="microphone3" @click="stopRecording">
77
- <div>
78
- <svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 68" width="26" height="48">
79
- <path id="并集_轮廓_" data-name="并集 (轮廓)" fill="#ccc"
80
- d="M10,44a3,3,0,0,1-3-3V3a3,3,0,0,1,3-3H28a3,3,0,0,1,3,3V41a3,3,0,0,1-3,3Zm17-4V4H11V40ZM0,47V24a2,2,0,0,1,4,0V45a2,2,0,0,0,2,2H32a2,2,0,0,0,2-2V24a2,2,0,0,1,4,0V47a4,4,0,0,1-4,4H21v9c7.34.26,13,1.93,13,4,0,2.21-6.72,4-15,4S4,66.21,4,64c0-2,5.66-3.7,13-4V51H4A4,4,0,0,1,0,47ZM19,64h.79L19,64l-.79,0Z"/>
81
- <rect fill="#fff" x="11" y="4" width="16" height="36"/>
82
- <rect class="volume" :height="volume(vol)" width="12" :y="volume2(vol)" x="13" fill="#43cf7c"/>
83
- </svg>
59
+ <div class="microphone" v-if="microphone">
60
+ <div class="microphone-cont mic-anim">
61
+ <div class="microphone1">
62
+ <div class="microphone2">
63
+ <div class="microphone3" @click="stopRecording">
64
+ <div>
65
+ <svg id="图层_1" data-name="图层 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 38 68" width="26" height="48">
66
+ <path id="并集_轮廓_" data-name="并集 (轮廓)" fill="#ccc"
67
+ d="M10,44a3,3,0,0,1-3-3V3a3,3,0,0,1,3-3H28a3,3,0,0,1,3,3V41a3,3,0,0,1-3,3Zm17-4V4H11V40ZM0,47V24a2,2,0,0,1,4,0V45a2,2,0,0,0,2,2H32a2,2,0,0,0,2-2V24a2,2,0,0,1,4,0V47a4,4,0,0,1-4,4H21v9c7.34.26,13,1.93,13,4,0,2.21-6.72,4-15,4S4,66.21,4,64c0-2,5.66-3.7,13-4V51H4A4,4,0,0,1,0,47ZM19,64h.79L19,64l-.79,0Z"/>
68
+ <rect fill="#fff" x="11" y="4" width="16" height="36"/>
69
+ <rect class="volume" :height="volume(vol)" width="12" :y="volume2(vol)" x="13" fill="#43cf7c"/>
70
+ </svg>
71
+ </div>
72
+ <p>{{ voiceLoading? '语音转换中...': `正在说话:${countdown}s` }}</p>
84
73
  </div>
85
- <p>{{ voiceLoading? '语音转换中...': `正在说话:${countdown}s` }}</p>
86
74
  </div>
87
75
  </div>
88
76
  </div>
89
77
  </div>
90
- </div>
91
- </div>
78
+ </template>
79
+ </drag-popup>
92
80
  </teleport>
93
81
  </template>
94
82
 
@@ -96,8 +84,10 @@
96
84
  import Recorder from 'js-audio-recorder'
97
85
  import axios from 'axios'
98
86
  import Message from '../../../components/tipBox/index';
87
+ import dragPopup from '../../dragPopup/src/dragPopup.vue'
99
88
  export default {
100
89
  name: 'zydx-chat',
90
+ components: { dragPopup },
101
91
  data() {
102
92
  return {
103
93
  token: '',
@@ -116,7 +106,14 @@ export default {
116
106
  fileSize: 0,
117
107
  vol: 0,
118
108
  base64: '',
119
- voiceLoading: false
109
+ voiceLoading: false,
110
+ isSearched: false,
111
+ }
112
+ },
113
+ props: {
114
+ isShow: {
115
+ type: Boolean,
116
+ default: false
120
117
  }
121
118
  },
122
119
  beforeUnmount() {
@@ -173,6 +170,7 @@ export default {
173
170
  e.target.style.height = `${e.target.scrollHeight }px`
174
171
  },
175
172
  clearTextarea() {
173
+ if(this.disabled) return
176
174
  this.userText = ''
177
175
  },
178
176
  copy() {
@@ -292,10 +290,11 @@ export default {
292
290
  let text = _this.userText.replace(/[\r\n]/g, '').replace(/\s*/g, '')
293
291
  if(!text) return
294
292
  // _this.messages.push({
295
- // role: 'user',
296
- // content: text
297
- // })
298
- _this.disabled = true
293
+ // role: 'user',
294
+ // content: text
295
+ // })
296
+ _this.disabled = true
297
+ _this.isSearched = true
299
298
  // _this.messages.push({
300
299
  // role: 'assistant',
301
300
  // content: '努力思考中...'
@@ -364,7 +363,7 @@ export default {
364
363
  },
365
364
  // 关闭
366
365
  aiClose() {
367
- this.$emit('close')
366
+ this.$emit('update:isShow', false)
368
367
  }
369
368
  }
370
369
  }
@@ -410,6 +409,7 @@ export default {
410
409
  }
411
410
 
412
411
  .chat-in {
412
+ height: calc(65% - 10px);
413
413
  /* max-height: 500px;
414
414
  overflow-y: auto;
415
415
  transition: all 0.5s;
@@ -463,38 +463,48 @@ export default {
463
463
  height: 12px;
464
464
  }
465
465
  .chat-in-cont{
466
- max-height: 300px;
466
+ height: calc(100% - 30px);
467
+ box-sizing: border-box;
467
468
  overflow-y: auto;
468
469
  transition: all 0.5s;
469
470
  margin: 5px;
470
471
  border-radius: 5px;
471
472
  border: 1px solid #CCC;
472
473
  }
474
+ .chat-in-cont::-webkit-scrollbar{
475
+ width: 12px;
476
+ height: 100%;
477
+ border-radius: 0 5px 5px 0;
478
+ }
473
479
 
474
480
  .chat-input {
475
481
  margin: 5px;
476
482
  padding: 10px 10px 3px;
483
+ min-height: 121px;
484
+ height: 35%;
477
485
  border-radius: 5px;
478
486
  border: 1px solid #CCC;
479
487
  overflow: hidden;
480
- background: #fff
488
+ background: #fff;
489
+ box-sizing: border-box;
481
490
  }
482
491
 
483
492
  .chat-text {
484
493
  width: 100%;
485
494
  min-height: 82px;
495
+ height: calc(100% - 24px);
486
496
  background: #fff;
487
497
  box-sizing: border-box;
488
498
  }
489
499
 
490
500
  .chat-text textarea {
491
501
  width: 100%;
492
- height: auto;
502
+ height: 100% !important;
493
503
  font-family: Helvetica, sans-serif;
494
504
  border: none;
495
505
  outline: none;
496
506
  resize: none;
497
- overflow-y: hidden;
507
+ overflow-y: auto;
498
508
  font-size: 14px;
499
509
  }
500
510
  .chat-operate{
@@ -297,7 +297,8 @@ export default defineComponent({
297
297
  matrix,
298
298
  } = this;
299
299
  return (
300
- <div class="table_wrapper" style={[getHeight, getWidth]}>
300
+ // <div class="table_wrapper" style={[getHeight, getWidth]}>
301
+ <div class="table_wrapper" style={[getWidth]}>
301
302
  {draggable ? (
302
303
  <div class="table_root" aria-label="draggbale-table">
303
304
  <VueDraggableNext tag={"table"} border="0" cellpadding="0" cellspacing="0" animation={"200"} onEnd={onDragEnd}>
@@ -343,6 +344,7 @@ export default defineComponent({
343
344
  opacity: 1;
344
345
  overflow: scroll;
345
346
  border-top: 1px solid #cccccc;
347
+ border-left: 1px solid #cccccc;
346
348
  }
347
349
 
348
350
  .table_wrapper::-webkit-scrollbar {
@@ -354,7 +356,6 @@ export default defineComponent({
354
356
  table-layout: fixed;
355
357
  display: table;
356
358
  max-width: 100%;
357
- border-left: 1px solid #cccccc;
358
359
  margin: 0 auto;
359
360
  border-spacing: 0;
360
361
  }
@@ -37,11 +37,11 @@ export function butJson(editor, data) {
37
37
  name: '图书版式',
38
38
  key: 'bookLayout',
39
39
  menuKeys: [],
40
- html: `<p data-signid="title-1" class="title bookLayout1" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color:#000;line-height: 1;">请在此处输入一级标题</span></strong></p>
40
+ html: `<p data-signid="title-1" class="title bookLayout1" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color:#333333;line-height: 1;">请在此处输入一级标题</span></strong></p>
41
41
  <p data-signid="text" class="text"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
42
- <p data-signid="title-2" style="text-align: center;" class="title ${randomId()} bookLayout2"><strong><span style="font-size: 20px; font-family: SimHei; color:#000">一、请在此处输入一级标题</span></strong></p>
42
+ <p data-signid="title-2" style="text-align: center;" class="title ${randomId()} bookLayout2"><strong><span style="font-size: 20px; font-family: SimHei; color:#000">一、请在此处输入二级标题</span></strong></p>
43
43
  <p data-signid="text" class="text"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
44
- <p data-signid="title-3" class="title ${randomId()}"><strong><span style="font-size: 16px; font-family: SimHei; color:#000">(一)请在此处输入二级标题</span></strong></p>
44
+ <p data-signid="title-3" class="title ${randomId()}"><strong><span style="font-size: 16px; font-family: SimHei; color:#000">(一)请在此处输入三级标题</span></strong></p>
45
45
  <p data-signid="text" class="text"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>`
46
46
  },
47
47
  {
@@ -86,7 +86,7 @@ export function butJson(editor, data) {
86
86
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
87
87
  <p data-signid="title-1" style="text-align: center" class="title ${randomId()}"><strong><span style="font-size: 18px; font-family: SimHei; color: #333333">一、请在此处输入一级标题</span></strong></p>
88
88
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
89
- <p data-signid="title-2" class="title ${randomId()} indent"><strong><span style="font-size: 16px; font-family: SimH ei; color: #333333">(一)请在此处输入二级标题</span></strong></p>
89
+ <p data-signid="title-2" class="title ${randomId()} indent"><strong><span style="font-size: 16px; font-family: SimHei; color: #333333">(一)请在此处输入二级标题</span></strong></p>
90
90
  <p data-signid="text" class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本(复用格式建议直接复制粘贴段落)</span></p>
91
91
  <p data-signid="splitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p>
92
92
  <p data-signid="annotation" contenteditable="false" style="text-align: center;"><strong><span style="font-size: 24px; font-family: SimHei; color: #333333;">注释</span></strong></p>
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div ref="only" class="z-editor" :style="!readOnly?'border: 1px solid rgba(204, 204, 204, 1);':''">
2
+ <div ref="only" class="z-editor" :style="!readOnly&&showBorder?'border: 1px solid rgba(204, 204, 204, 1);':''">
3
3
  <div v-show="!readOnly" class="editor-header">
4
4
  <div v-for="(item,index) in butData" :key="index" class="editor-but">
5
5
  <div v-if="uploadTypeArr.indexOf(item.key) !== -1" class="editor-but-name">
@@ -72,7 +72,7 @@
72
72
  </div>
73
73
  </div>-->
74
74
  </div>
75
- <zydx-chat v-if="isShowAi" @close='isShowAi = false'></zydx-chat>
75
+ <zydx-chat :isShow='isShowAi' @update:isShow='(val) => isShowAi = val'></zydx-chat>
76
76
  <div :class="{'editor-content-show': !editableShow}" class="editor-content">
77
77
  <div class="editing">
78
78
  <div v-if="signMenuShow" class="editing-header">
@@ -404,8 +404,10 @@
404
404
  </div>
405
405
  <div class="tip-box" style="min-width:600px;max-height: 900px;">
406
406
  <div class="tip-title" v-html="`${item.fileName}`"></div>
407
- <div class="tip-boxContent" style="height: 700px;">
408
- <zydx-read :url="item.url" style="height: 100%"></zydx-read>
407
+ <div class="tip-boxContent" :style="{height: item.isPPT?'590px':'700px'}">
408
+ <iframe v-if="item.isPPT" :src="item.url" frameborder="no" height="590"
409
+ scrolling="no" width="100%"></iframe>
410
+ <zydx-read v-else :url="item.url" style="height: 100%"></zydx-read>
409
411
  </div>
410
412
  </div>
411
413
  <div style="display: flex;flex-direction: row;justify-content: flex-end;margin-top: 10px;">
@@ -783,10 +785,6 @@ export default {
783
785
  'switchingFormat', 'signMenu', 'pageMargin', 'paragraph',
784
786
  'outlineMenu', 'alignmentMode', 'titleMenu',
785
787
  'textMenu', 'color', 'interposition'],
786
- // toolbar: [
787
- // 'switchingFormat', 'shortcut', 'pageMargin', 'paragraph',
788
- // 'outlineMenu', 'alignmentMode', 'titleMenu',
789
- // 'textMenu', 'color', 'interposition'],
790
788
  bubbleData: {},
791
789
  htmlJson: [],
792
790
  showRetractionPopup: false,
@@ -825,77 +823,6 @@ export default {
825
823
  isShowAi: false,
826
824
  isShowSwitchingFormat: false,
827
825
  templateType: 'freeTypesetting',
828
- switchingFormat: [
829
- {
830
- name: '自由排版',
831
- key: 'freeTypesetting',
832
- menuKeys: [],
833
- html: ''
834
- },
835
- {
836
- name: '公文版式',
837
- key: 'officialDocumentFormat',
838
- menuKeys: [],
839
- html: `<p style="text-align: center"><span style="font-size: 48px; color: rgb(225, 60, 57)">请在此输入红头名称</span></p>
840
- <p data-signid="red" style="text-align: center"><span style="font-size: 16px; color: rgb(0, 0, 0)">请在此输入文件号xxx[xxx]xxxx号</span></p>
841
- <p contenteditable="false" class="solid"></p>
842
- <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>
843
- <p data-signid="lookUp"><strong><span style="font-size: 18px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入抬头:</span></strong></p>
844
- <p class="indent"><span style="font-size: 16px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
845
- <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>
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="paragraph" style="margin: 30px 0px 0px; text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入落款</span></strong></p>
850
- <p style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
851
- },
852
- {
853
- name: '新闻版式',
854
- key: 'newsFormat',
855
- menuKeys: [],
856
- 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>
857
- <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>
858
- <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
859
- <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>
860
- <p class="indent "><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
861
- <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>
862
- <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
863
- <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>
864
- <p style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
865
- },
866
- {
867
- name: '论文版式',
868
- key: 'paperFormat',
869
- menuKeys: [],
870
- 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>
871
- <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>
872
- <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>
873
- <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>
874
- <p></p>
875
- <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
876
- <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>
877
- <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本</span></p>
878
- <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>
879
- <p class="indent"><span style="font-size: 14px; font-family: SimHei; color: rgb(0, 0, 0)">请在此处输入正文文本(复用格式建议直接复制粘贴段落)</span></p>
880
- <p data-signid="splitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p>
881
- <p></p>
882
- <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>
883
- <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>
884
- <p data-signid="a-l" class="text" contenteditable="false"><span style="font-size: 12px; font-family: FangSong;text-indent: 2em;">① 注释:是指解释字句的文字,也指用文字解释字句,可以是文字符号图片等多种形式。(当前文本只是示例展示,不会出现在保存的文本中。)</span></p>
885
- <p data-signid="annotationSplitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p>
886
- <p></p>
887
- <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>
888
- <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>
889
- <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>
890
- <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>
891
- <p data-signid="referenceSplitLine" contenteditable="false" class="paging-line">分 页 线(保存文档时线下内容另起一页)</p>
892
- <p></p>
893
- <p data-signid="ack" style="text-align: center"><strong><span style="font-size: 16px; color: rgb(0, 0, 0)">致谢</span></strong></p>
894
- <p><span style="font-size: 14px; font-family: KaiTi; color: rgb(0, 0, 0)">致谢内容...</span></p>
895
- <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>
896
- <p style="text-align: right"><strong><span style="font-size: 14px; color: rgb(0, 0, 0)">请在此处输入日期</span></strong></p>`
897
- }
898
- ],
899
826
  menusText: [
900
827
  {
901
828
  key: 'signMenu',
@@ -917,6 +844,10 @@ export default {
917
844
  type: Boolean,
918
845
  default: false
919
846
  },
847
+ showBorder: {
848
+ type: Boolean,
849
+ default: false
850
+ },
920
851
  butShow: {
921
852
  type: Boolean,
922
853
  default: true
@@ -2685,33 +2616,57 @@ export default {
2685
2616
  const r = await this.signIdData('reference')
2686
2617
  const html = butJson(this.editor, this.menusText)[v].html
2687
2618
  // if (r === -1) {
2688
- const last = this.editor.state.selection.$anchor.path[0].content.size
2689
- const id = new Date().getTime()
2690
- let dataInfo = {
2619
+ const last = this.editor.state.selection.$anchor.path[0].content.size
2620
+ const id = new Date().getTime()
2621
+ if (t === -1) this.editor.chain().focus().insertContentAt(to, html).run()
2622
+ const num = this.upSort(this.editor, 'enclosure')
2623
+ const html2 = `<p contenteditable="false" data-signId="u-${id}" data-url="${url}" class="indent mu"><span>${num.num}. ${name}</span></p>`
2624
+ this.editor.chain().focus().insertContentAt(num.len, html2).run()
2625
+ const json = this.editor.getJSON()
2626
+ for (let i = 0; i < json.content.length; i++) {
2627
+ const item = json.content[i]
2628
+ if (item.attrs.signId === 'enclosure' && item.content[0].text === '附件列表:') {
2629
+ item.attrs.titleId = this.checkbox ? 'indent' : null
2630
+ }
2631
+ }
2632
+ this.editor.chain().setContent(<p></p>).run()
2633
+ this.editor.chain().setContent(json).run()
2634
+ this.isShowUpload = false
2635
+ const ext = file.name.split('.').pop().toLowerCase();
2636
+ let pptArr = ['pptx', 'ppt', 'pptm', 'potx', 'potm', 'pot', 'ppsx', 'ppsm', 'ppam', 'ppa', 'odp']
2637
+ let dataInfo = {}
2638
+ if (pptArr.includes(ext)) {
2639
+ let officeInfo = this.getOffice
2640
+ let annex = res.data.annex
2641
+ officeInfo.meta.wordPath = annex.showPath
2642
+ officeInfo.meta.filePath = annex.filePath
2643
+ officeInfo.meta.fileName = annex.fileName
2644
+ officeInfo.meta.useType = 'view'
2645
+ officeInfo.meta.height = '590'
2646
+ let officeRes = await this.getOfficePath(officeInfo)
2647
+ dataInfo = {
2691
2648
  isShow: false,
2692
2649
  edit: false,
2693
2650
  id: `${id}`,
2694
2651
  type: v,
2695
2652
  exegesis: this.tipTitle,
2696
2653
  fileName: name,
2697
- url: url
2654
+ isPPT:true,
2655
+ url: officeRes.data
2698
2656
  }
2699
- if (t === -1) this.editor.chain().focus().insertContentAt(to, html).run()
2700
- const num = this.upSort(this.editor, 'enclosure')
2701
- const html2 = `<p contenteditable="false" data-signId="u-${id}" data-url="${url}" class="indent mu"><span>${num.num}. ${name}</span></p>`
2702
- this.editor.chain().focus().insertContentAt(num.len, html2).run()
2703
- const json = this.editor.getJSON()
2704
- for (let i = 0; i < json.content.length; i++) {
2705
- const item = json.content[i]
2706
- if (item.attrs.signId === 'enclosure' && item.content[0].text === '附件列表:') {
2707
- item.attrs.titleId = this.checkbox ? 'indent' : null
2708
- }
2657
+ } else {
2658
+ dataInfo = {
2659
+ isShow: false,
2660
+ edit: false,
2661
+ id: `${id}`,
2662
+ type: v,
2663
+ exegesis: this.tipTitle,
2664
+ fileName: name,
2665
+ url: url
2709
2666
  }
2710
- this.editor.chain().setContent(<p></p>).run()
2711
- this.editor.chain().setContent(json).run()
2712
- this.isShowUpload = false
2713
- this.interpositionData.push(dataInfo)
2714
- this.documentClick()
2667
+ }
2668
+ this.interpositionData.push(dataInfo)
2669
+ this.documentClick()
2715
2670
  // return
2716
2671
  // }
2717
2672
  /*const num1 = this.upSort(this.editor, 'reference')
@@ -3447,16 +3402,27 @@ export default {
3447
3402
  newsFormat:{size:'14px',color:'#000000',margin:'0px',textAlign:'left',bold:true},
3448
3403
  }
3449
3404
  if (key.key === 'text') {
3405
+ this.tipTitle = window.getSelection().toString()
3406
+ if (this.tipTitle.length === 0) {
3407
+ await Message({type: 'text', promptContent: '请选中需要修改为正文的文字'})
3408
+ return
3409
+ }
3450
3410
  this.editor.commands.setNode('paragraph', {class: 'indent'})
3451
3411
  this.editor.commands.setTitleId(key.key)
3452
3412
  this.editor.commands.unsetSignId()
3453
3413
  this.editor.chain().unsetBold().setFontSize('14px').setColor('#000000').setTextAlign('left').focus().run()
3454
3414
  } else {
3415
+ this.tipTitle = window.getSelection().toString()
3416
+ if (this.tipTitle.length === 0) {
3417
+ await Message({type: 'text', promptContent: '请选中需要修改为标题的文字'})
3418
+ return
3419
+ }
3455
3420
  const t = key.key.split('-')[0]
3456
3421
  const level = key.key.split('-')[1]
3457
3422
  if (level === '1') {
3423
+ // this.editor.commands.setNode('paragraph', {class:''})
3424
+ // this.editor.commands.setTitleId(``)
3458
3425
  let obj1 = sizeObj1[this.templateType]
3459
- // this.editor.commands.setNode('paragraph', {class:{}})
3460
3426
  this.editor.commands.setTitleId(`${t} ${this.randomId()}`)
3461
3427
  this.editor.commands.setSignId(key.key)
3462
3428
  if(this.templateType==='bookLayout'){
@@ -3483,7 +3449,11 @@ export default {
3483
3449
  this.editor.commands.setNode('paragraph', {class: ''})
3484
3450
  let obj3 = sizeObj3[this.templateType]
3485
3451
  this.editor.commands.setSignId(key.key)
3486
- this.editor.commands.setTitleId(`${t} ${this.randomId()}`)
3452
+ if (this.templateType === 'bookLayout') {
3453
+ this.editor.commands.setTitleId(`${t} ${this.randomId()} bookLayout3`)
3454
+ } else {
3455
+ this.editor.commands.setTitleId(`${t} ${this.randomId()}`)
3456
+ }
3487
3457
  this.editor.chain().setBold().setFontSize(obj3.size).setColor(obj3.color).setTextAlign(obj3.textAlign).focus().run()
3488
3458
  }
3489
3459
  }
@@ -4413,8 +4383,8 @@ export default {
4413
4383
 
4414
4384
  :deep(.title) {
4415
4385
  /*padding: 10px 0 2px 0;*/
4416
- /*font-weight: 900;*/
4417
- color: #333333 !important;
4386
+ font-weight: 900;
4387
+ /*color: #333333 !important;*/
4418
4388
  }
4419
4389
 
4420
4390
  .read-only-a {
@@ -5220,8 +5190,32 @@ li {
5220
5190
  }
5221
5191
  :deep(.bookLayout1){
5222
5192
  margin-bottom: 40px;
5193
+ font-size: 24px !important;
5194
+ color: #333333 !important;
5195
+ font-weight: bold;
5196
+ font-family: SimHei;
5223
5197
  }
5224
5198
  :deep(.bookLayout2){
5225
5199
  margin-bottom: 20px;
5200
+ font-weight: bold;
5201
+ font-size: 20px !important;
5202
+ font-family: SimHei;
5203
+ }
5204
+ :deep(.bookLayout3){
5205
+ font-weight: bold;
5206
+ font-size: 16px !important;
5207
+ font-family: SimHei;
5208
+ }
5209
+ :deep(.title[data-signid="title-1"]){
5210
+ font-size: 18px;
5211
+ color: #000000;
5212
+ }
5213
+ :deep(.title[data-signid="title-2"]){
5214
+ font-size: 16px;
5215
+ color: #000000;
5216
+ }
5217
+ :deep(.title[data-signid="title-3"]){
5218
+ font-size: 14px;
5219
+ color: #000000;
5226
5220
  }
5227
5221
  </style>
@@ -22,7 +22,7 @@
22
22
  <button v-if='isShowAiTool' class="buts" @click="showAi">AI助手</button>
23
23
  </div>
24
24
  </div>
25
- <zydx-chat v-if="isShowAi" @close='isShowAi = false'></zydx-chat>
25
+ <zydx-chat :isShow='isShowAi' @update:isShow='(val) => isShowAi = val'></zydx-chat>
26
26
  <div class="ed-cont" :style="heightStyleCont">
27
27
  <div :style="{'border': (borderShow)? '1px solid #ccc': '0'}" v-if="editorShow">
28
28
  <editor-content @paste.native.capture.prevent="preventPaste" ref="editorRef" class="editor" :editor="editor"
@@ -18,7 +18,8 @@ const Modal = () => {
18
18
  instance = VNode
19
19
  }
20
20
  return {
21
- open: function () {
21
+ open: function (hasPrompt) {
22
+ VNode = createVNode(spinner, {hasPrompt})
22
23
  render(VNode, container)
23
24
  },
24
25
  close: () => destory()
@@ -13,6 +13,7 @@
13
13
  <div></div>
14
14
  <div></div>
15
15
  </div>
16
+ <div v-if="hasPrompt" class="prompt-text">文件上传中,请稍候...</div>
16
17
  </div>
17
18
  </div>
18
19
  </transition>
@@ -23,6 +24,12 @@
23
24
  import { defineComponent } from 'vue';
24
25
  export default defineComponent({
25
26
  name: 'zydx-spinner',
27
+ props: {
28
+ hasPrompt: {
29
+ type: Boolean,
30
+ default: false
31
+ }
32
+ },
26
33
  mounted() {
27
34
  document.querySelector('body').style.overflow = 'hidden'
28
35
  },
@@ -56,12 +63,14 @@ export default defineComponent({
56
63
  border: none;
57
64
  padding: 0;
58
65
  margin: 0;
66
+ pointer-events: none;
59
67
  }
60
68
 
61
69
  .spinner_wrapper {
62
70
  width: 100%;
63
71
  height: 100%;
64
72
  display: flex;
73
+ flex-direction: column;
65
74
  align-items: center;
66
75
  justify-content: center;
67
76
  }
@@ -170,4 +179,9 @@ export default defineComponent({
170
179
  transform: rotate(360deg);
171
180
  }
172
181
  }
182
+ .prompt-text {
183
+ color: rgba(166, 166, 166, 1);
184
+ font-size: 14px;
185
+ margin-top: 15px;
186
+ }
173
187
  </style>
@@ -88,7 +88,7 @@
88
88
  <div class="cal" v-if="item.type === 'calender'">
89
89
  <input type="text" :placeholder="item.placeholder" @focus="focus" :maxlength="item.maxlength"
90
90
  v-model="item.value" :disabled="item.disabled"/>
91
- <div class="empty" @click="emptyCal($event,item)">
91
+ <div class="dateEmpty" @click="emptyCal($event,item)">
92
92
  <svg t="1747276919145" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4844" width="15" height="15"><path d="M511.333 127.333c51.868 0 102.15 10.144 149.451 30.15 45.719 19.337 86.792 47.034 122.078 82.321 35.287 35.286 62.983 76.359 82.321 122.078 20.006 47.3 30.15 97.583 30.15 149.451s-10.144 102.15-30.15 149.451c-19.337 45.719-47.034 86.792-82.321 122.078-35.286 35.287-76.359 62.983-122.078 82.321-47.3 20.006-97.583 30.15-149.451 30.15s-102.15-10.144-149.451-30.15c-45.719-19.337-86.792-47.034-122.078-82.321-35.287-35.286-62.983-76.359-82.321-122.078-20.006-47.3-30.15-97.583-30.15-149.451s10.144-102.15 30.15-149.451c19.337-45.719 47.034-86.792 82.321-122.078 35.286-35.287 76.359-62.983 122.078-82.321 47.301-20.006 97.583-30.15 149.451-30.15m0-64c-247.424 0-448 200.576-448 448s200.576 448 448 448 448-200.576 448-448-200.576-448-448-448z" fill="#999999" p-id="4845"></path><path d="M557.254 512l147.373-147.373c12.497-12.497 12.497-32.758 0-45.255-12.496-12.497-32.758-12.497-45.254 0L512 466.746 364.627 319.373c-12.497-12.497-32.758-12.497-45.255 0s-12.497 32.758 0 45.255L466.746 512 319.373 659.373c-12.497 12.496-12.497 32.758 0 45.254C325.621 710.876 333.811 714 342 714s16.379-3.124 22.627-9.373L512 557.254l147.373 147.373C665.621 710.876 673.811 714 682 714s16.379-3.124 22.627-9.373c12.497-12.496 12.497-32.758 0-45.254L557.254 512z" fill="#999999" p-id="4846"></path></svg>
93
93
  </div>
94
94
  <Calendar v-if="tip" style="top: 35px;" @cancel="cancelCal" @confirm="confirm($event,item)"></Calendar>
@@ -372,7 +372,7 @@ export default {
372
372
  .cal{
373
373
  position: relative;
374
374
  }
375
- .empty{
375
+ .dateEmpty{
376
376
  position: absolute;
377
377
  top: 8px;
378
378
  right: 5px;
package/src/index.js CHANGED
@@ -89,7 +89,7 @@ function install(app) {
89
89
  }
90
90
 
91
91
  export default {
92
- version: '1.35.524',
92
+ version: '1.35.526',
93
93
  install,
94
94
  Calendar,
95
95
  Message,