askbot-dragon 1.3.92 → 1.3.94

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": "askbot-dragon",
3
- "version": "1.3.92",
3
+ "version": "1.3.94",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -131,7 +131,7 @@ export default {
131
131
  }
132
132
  }
133
133
  },
134
- props: ['msg','isAskLightning'],
134
+ props: ['msg','isAskLightning', 'isMessageRecord'],
135
135
  beforeMounted() {
136
136
 
137
137
  },
@@ -218,6 +218,9 @@ export default {
218
218
  }
219
219
  this.$refs.previewPdf.fileType = type
220
220
  this.$refs.previewPdf.tagIds = item.tagIds
221
+ this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false
222
+ // this.$refs.previewPdf.tagIds = ["6463435ae607ba08d55fd46b"]
223
+
221
224
  if(item.tagIds && item.tagIds.length != 0) {
222
225
  this.$refs.previewPdf.loading = false
223
226
  return
@@ -234,7 +237,7 @@ export default {
234
237
  },
235
238
  fileType (url) {
236
239
  const fileType = url.substring(url.lastIndexOf('.'));
237
- if (fileType === '.mp4' || fileType === '.MP4') {
240
+ if (fileType === '.mp4' || fileType === '.MP4' || fileType === '.MOV' || fileType === '.MOVC' || fileType === '.mov' || fileType === '.movc' || fileType === '.mav' || fileType === '.MAV' || fileType == '.mp3' || fileType == '.MP3') {
238
241
  return 'VIDEO'
239
242
  } else if (fileType === '.html') {
240
243
  return 'HTML'
@@ -17,7 +17,7 @@
17
17
  :formList="formList2"
18
18
  @submitClick="submitClick"
19
19
  ></form-template> -->
20
- <answer-docknowledge :isAskLightning="2" :msg="answerDocknowledge"></answer-docknowledge>
20
+ <!-- <answer-docknowledge :isAskLightning="2" :msg="answerDocknowledge"></answer-docknowledge> -->
21
21
  <!-- <voice-component @closeVoice="closeVoice">
22
22
  <div slot="voiceTip">
23
23
  松开发送
@@ -48,9 +48,9 @@
48
48
  <!-- <FileType :urls="urls" :color="black"></FileType>-->
49
49
  <!-- <FileType :urls="urls" :color="black"></FileType>
50
50
  <chat-content :messageList="messageList"></chat-content> -->
51
- <!-- <div v-for="(item,index) in processAction" :key="index">
51
+ <div v-for="(item,index) in processAction" :key="index">
52
52
  <association-intention :msg="item" :msgType="item.type" :isOpen="isOpen"></association-intention>
53
- </div> -->
53
+ </div>
54
54
  </div>
55
55
  </template>
56
56
  <script>
@@ -63,7 +63,7 @@ import TextMessage from "@/components/message/TextMessage";*/
63
63
  // import AnswerRadio from './answerRadio'
64
64
  // import TicketMessage from './message/TicketMessage'
65
65
  /*import VoiceComponent from "./voiceComponent";*/
66
- // import AssociationIntention from './associationIntention'
66
+ import AssociationIntention from './associationIntention'
67
67
  // import ActionSatisfaction from './actionSatisfaction'
68
68
  // import MsgLoading from './msgLoading'
69
69
  // import LoadingProcess from './loadingProcess'
@@ -85,7 +85,7 @@ import FeedBack from "@/components/feedBack";*/
85
85
  // import ChatContent from "./chatContent";
86
86
  // import FeedBack from '@/components/feedBack'
87
87
  // 知识类型
88
- import AnswerDocknowledge from "./AnswerDocknowledge.vue";
88
+ // import AnswerDocknowledge from "./AnswerDocknowledge.vue";
89
89
  export default {
90
90
  name: 'ConversationContainer',
91
91
  components: {
@@ -95,7 +95,7 @@ export default {
95
95
  // LoadingProcess,
96
96
  // MsgLoading,
97
97
  // ActionSatisfaction,
98
- // AssociationIntention,
98
+ AssociationIntention,
99
99
  /* VoiceComponent,*/
100
100
  // TicketMessage,
101
101
  // AsserDeatils,
@@ -110,7 +110,7 @@ export default {
110
110
  // FormTemplate,
111
111
  // FileType,
112
112
  // ChatContent,
113
- AnswerDocknowledge,
113
+ // AnswerDocknowledge,
114
114
  },
115
115
  props: {
116
116
  messages: Array
@@ -24,7 +24,7 @@ const { TextLayerBuilder } = window['pdfjs-dist/web/pdf_viewer']
24
24
  // import { zoomElement } from '../assets/js/hammer'
25
25
  export default {
26
26
  name: 'pdfView',
27
- props:['tagIds'],
27
+ props:['tagIds','isMessageRecord'],
28
28
  data() {
29
29
  return {
30
30
  url: '',
@@ -80,7 +80,11 @@ export default {
80
80
  // 根据当前页面宽度设置缩放比例
81
81
  // this.scale = Math.round(this.$refs.pdfView.clientWidth / pdfResloute.pageWidth * 100) / 100
82
82
  // console.log(this.scale,'this.scale');
83
- this.scale = 1
83
+ if(this.isMessageRecord) {
84
+ this.scale = Math.round(this.$refs.pdfView.clientWidth / pdfResloute.pageWidth * 100) / 100
85
+ } else {
86
+ this.scale = 1
87
+ }
84
88
  // 从后端获取到当前分片后所有的pdf页码,初始化数组,数组下{} 对应每页pdf文件
85
89
  this.pdfUrl = pdfResloute.publicPageFileUrl.substring(0, pdfResloute.publicPageFileUrl.lastIndexOf('/') + 1)
86
90
  this.initPages(pdfResloute.total)
@@ -175,7 +179,7 @@ export default {
175
179
  }
176
180
  this.pageSize = pageSize
177
181
  // 创建内容绘制区,并设置大小
178
- if(this.$refs.pdfView.clientWidth / this.pageSize.width >= 1) {
182
+ if(this.$refs.pdfView.clientWidth / this.pageSize.width >= 1 || this.isMessageRecord) {
179
183
  this.contentView.style.width = `${pageSize.width }px`;
180
184
  this.contentView.style.height = `${(this.totalPageCount * (pageSize.height + this.PAGE_INTVERVAL)) + this.PAGE_INTVERVAL}px`;
181
185
  } else {
@@ -296,12 +300,15 @@ export default {
296
300
  this.fisrtLoad = false
297
301
  } else {
298
302
  this.$refs.pdfView.scrollTop = `${((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL) * this.transformSalce)}`
303
+ this.renderHighlights()
299
304
  }
300
305
  } else {
301
306
  if (this.$refs.pdfView.scrollTop == Math.floor((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL))) {
302
307
  this.fisrtLoad = false
303
308
  } else {
304
309
  this.$refs.pdfView.scrollTop = `${((pageNo - 1) * (this.pageSize.height + this.PAGE_INTVERVAL))}`
310
+ this.renderHighlights()
311
+
305
312
  }
306
313
  }
307
314
  // zoomElement(this.contentView)
@@ -487,12 +494,14 @@ export default {
487
494
  scrollToExcalTop(currentPage) {
488
495
  for (let index = 0; index < this.allTr.length; index++) {
489
496
  if(index == currentPage) {
490
- this.allTr[index].children.forEach(item =>{
497
+ Array.from(this.allTr[index].children).forEach(item =>{
491
498
  item.style.background = 'rgba(255, 136, 0, 0.6)'
492
499
  })
493
- this.$refs.pdfView.scrollTop = this.allTr[index].offsetTop
500
+ // this.$refs.pdfView.scrollTop = this.allTr[index].offsetTop
501
+ this.$refs.pdfView.scrollTop = this.allTr[index].getBoundingClientRect().top
502
+
494
503
  } else {
495
- this.allTr[index].children.forEach(item =>{
504
+ Array.from(this.allTr[index].children).forEach(item =>{
496
505
  item.style.background = 'rgba(54, 106, 255, 0.6)'
497
506
  })
498
507
  }
@@ -711,13 +720,14 @@ export default {
711
720
  }).then(res => {
712
721
  // 使用原声请求方式 axios会带有不需要的请求头
713
722
  let xhr = new XMLHttpRequest();
714
- xhr.open('GET', res.data, true);
723
+ xhr.open('GET', res.data || res.bodyText , true);
715
724
  // 定义请求完成的处理函数,请求前也可以增加加载框/禁用下载按钮逻辑
716
725
  xhr.onload = ({ currentTarget }) => {
717
726
  // 请求完成
718
727
  if (currentTarget.status === 200) { // 返回200
719
728
  this.contentView.innerHTML = currentTarget.response
720
729
  this.contentView.style.padding = '10px'
730
+ // this.contentView.style.position = 'relative'
721
731
  this.$refs.pdfView.style.backgroundColor = '#FFFFFF'
722
732
  this.$refs.pdfView.appendChild(this.contentView)
723
733
  let allTr = Array.from(this.$refs.pdfView.getElementsByTagName('tr'))
@@ -51,7 +51,7 @@
51
51
  </section>
52
52
  </div>
53
53
  <template v-if="tagIds && tagIds.length != 0 && drawer">
54
- <pdfPosition :tagIds="tagIds"></pdfPosition>
54
+ <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord"></pdfPosition>
55
55
  </template>
56
56
  <template v-else>
57
57
  <div v-if="fileType == 'VIDEO'" style="width: 100%;height:calc(100% - 60px)">
@@ -105,6 +105,10 @@ export default {
105
105
  officePreviewType:{
106
106
  type: String,
107
107
  default: ''
108
+ },
109
+ isMessageRecord:{
110
+ type: Boolean,
111
+ default:false,
108
112
  }
109
113
  },
110
114
  components:{
@@ -139,21 +143,23 @@ export default {
139
143
  },
140
144
  methods :{
141
145
  close() {
146
+ setTimeout(() =>{
142
147
  this.previewShowPopup = false;
143
- this.drawer = false;
148
+ this.fileType = ''
149
+ }, 300)
150
+ this.drawer = false;
144
151
  },
145
152
  loadIframe() {
146
- let iframe = document.getElementsByClassName('preview_iframe')[0]
147
- console.log(iframe,'iframeiframe');
148
- if(iframe) {
149
- // this.loading = true
150
- iframe.onload = () =>{
151
- console.log('1111111');
152
- this.loading = false
153
- }
154
- }
155
153
  if(this.fileType == 'VIDEO' || this.fileType == 'WECHAT' || (this.tagIds && this.tagIds.length != 0)) {
156
154
  this.loading = false
155
+ } else {
156
+ let time = setInterval(() =>{
157
+ let iframe = document.getElementsByClassName('preview_iframe')[0]
158
+ if(iframe) {
159
+ this.loading = false
160
+ clearInterval(time)
161
+ }
162
+ }, 500)
157
163
  }
158
164
  },
159
165
  getBolb() {
@@ -23,8 +23,10 @@
23
23
  )
24
24
  "
25
25
  >
26
- {{ option.text
27
- }}<i class="arsenal_icon arsenalangle-right-solid"></i>
26
+ <el-tooltip class="item" effect="dark" :content="option.text" placement="bottom-start">
27
+ <span class="options-item-text">{{ option.text}}</span>
28
+ </el-tooltip>
29
+ <i class="arsenal_icon arsenalangle-right-solid"></i>
28
30
  </p>
29
31
  </div>
30
32
  </div>
@@ -62,7 +64,6 @@ export default {
62
64
  padding-top: 4px;
63
65
  min-width: 120px;
64
66
  .options-item{
65
-
66
67
  height: 25px;
67
68
  line-height: 25px;
68
69
  background-color: #ffffff;
@@ -74,6 +75,16 @@ export default {
74
75
  i{
75
76
  padding-left: 10px;
76
77
  }
78
+ .options-item-text{
79
+ text-overflow: ellipsis;
80
+ display: -webkit-box; //使用了flex,需要加
81
+ overflow: hidden; //超出隐藏
82
+ word-break: break-all; //纯英文、数字、中文
83
+ text-overflow: ellipsis; //省略号
84
+ -webkit-box-orient: vertical; //垂直
85
+ -webkit-line-clamp: 1; //显示一行
86
+ white-space:pre-line; //
87
+ }
77
88
  }
78
89
  .recommend-item{
79
90
  padding: 8px 0;