askbot-dragon 1.3.98 → 1.4.1

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.98",
3
+ "version": "1.4.1",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -217,9 +217,9 @@ export default {
217
217
  this.$refs.previewPdf.drawer = true;
218
218
  }
219
219
  this.$refs.previewPdf.fileType = type
220
- this.$refs.previewPdf.tagIds = item.tagIds
220
+ // this.$refs.previewPdf.tagIds = item.tagIds
221
221
  this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false
222
- // this.$refs.previewPdf.tagIds = ["6463435ae607ba08d55fd46b"]
222
+ this.$refs.previewPdf.tagIds = ["64591b7d8bb8ab1b91c65f24"]
223
223
 
224
224
  if(item.tagIds && item.tagIds.length != 0) {
225
225
  this.$refs.previewPdf.loading = false
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div :style="{ width: boxWidth + 'px' }" class="answer-voice">
3
- <audio :id="'audioTagCom_' + msg.content.extInfos[0].avCurrentTime" :src="msg.content.url"></audio>
3
+ <audio :id="'audioTagCom_' + newMsg.content.extInfos[0].newAvCurrentTime" :src="newMsg.content.url"></audio>
4
4
  <div class="audiocon">
5
5
  <!-- 按钮 -->
6
6
  <div class="leftBtn">
@@ -27,6 +27,7 @@
27
27
  </div>
28
28
  </template>
29
29
  <script>
30
+ import { v4 as uuidv4 } from "uuid";
30
31
  let load = require('audio-loader')
31
32
  export default {
32
33
  name: "answer_voice",
@@ -47,14 +48,18 @@ export default {
47
48
  watch: {
48
49
  },
49
50
  computed: {
50
-
51
+ newMsg(){
52
+ let oldMsg = JSON.parse(JSON.stringify(this.msg));
53
+ oldMsg.content.extInfos[0].newnewAvCurrentTime = uuidv4();
54
+ return oldMsg;
55
+ }
51
56
  },
52
57
  mounted() {
53
58
  console.log(120);
54
59
  this.$nextTick(() => {
55
60
  setTimeout(() => {
56
- console.log(this._$(`#audioTagCom_${this.msg.content.extInfos[0].avCurrentTime}`)[0]);
57
- this.activeAudio = this._$(`#audioTagCom_${this.msg.content.extInfos[0].avCurrentTime}`)[0];
61
+ console.log(this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`)[0]);
62
+ this.activeAudio = this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`)[0];
58
63
  this.time = "00:00";
59
64
  load(this.msg.content.url).then(res =>{
60
65
  this.otherTime = this.transTime(res.duration);
@@ -67,7 +72,7 @@ export default {
67
72
  this.boxWidth = 160 + res.duration;
68
73
  }
69
74
  })
70
- this._$(`#audioTagCom_${this.msg.content.extInfos[0].avCurrentTime}`).on("loadedmetadata", (e) => {
75
+ this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("loadedmetadata", (e) => {
71
76
  console.log(e.currentTarget);
72
77
  this.time = "00:00";
73
78
  console.log(e.currentTarget.duration);
@@ -91,15 +96,15 @@ export default {
91
96
  false
92
97
  );
93
98
 
94
- this._$(`#audioTagCom_${this.msg.content.extInfos[0].avCurrentTime}`).on("timeupdate", () => {
99
+ this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("timeupdate", () => {
95
100
  this.updateProgress();
96
101
  });
97
102
 
98
- this._$(`#audioTagCom_${this.msg.content.extInfos[0].avCurrentTime}`).on("timeupdate", () => {
103
+ this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("timeupdate", () => {
99
104
  this.updateProgress();
100
105
  });
101
106
 
102
- this._$(`#audioTagCom_${this.msg.content.extInfos[0].avCurrentTime}`).on("ended", () => {
107
+ this._$(`#audioTagCom_${this.newMsg.content.extInfos[0].newAvCurrentTime}`).on("ended", () => {
103
108
  this.audioEnded();
104
109
  });
105
110
  }, 500);
@@ -108,8 +113,8 @@ export default {
108
113
  },
109
114
  methods: {
110
115
  stopAudioPlay(refId){
111
- console.log("stop ", refId, this.msg.content.extInfos[0].avCurrentTime);
112
- if (refId != this.msg.content.extInfos[0].avCurrentTime) {
116
+ console.log("stop ", refId, this.newMsg.content.extInfos[0].newAvCurrentTime);
117
+ if (refId != this.msg.content.extInfos[0].newAvCurrentTime) {
113
118
  this.activeAudio.pause();
114
119
  this.isPlay = false;
115
120
  }
@@ -118,7 +123,7 @@ export default {
118
123
  if (this.activeAudio.paused) {
119
124
  this.activeAudio.play();
120
125
  this.isPlay = true;
121
- this.$emit("stopOtherAudio", this.msg.content.extInfos[0].avCurrentTime);
126
+ this.$emit("stopOtherAudio", this.newMsg.content.extInfos[0].newAvCurrentTime);
122
127
  } else {
123
128
  this.activeAudio.pause();
124
129
  this.isPlay = false;
@@ -42,8 +42,8 @@
42
42
  <feed-back :feedBack="feedBack"></feed-back>
43
43
  <voice-compontent></voice-compontent> -->
44
44
  <!-- <ai-guide :aiGuide="ActionAiGuideObj"></ai-guide> -->
45
- <!-- <answer-voice @stopOtherAudio="stopOtherAudio" ref="audioTagCell" :msg="answerVoiceObj"></answer-voice>
46
- <answer-voice @stopOtherAudio="stopOtherAudio" ref="audioTagCell" :msg="answerVoiceObj1"></answer-voice> -->
45
+ <answer-voice @stopOtherAudio="stopOtherAudio" ref="audioTagCell" :msg="answerVoiceObj"></answer-voice>
46
+ <!-- <answer-voice @stopOtherAudio="stopOtherAudio" ref="audioTagCell" :msg="answerVoiceObj1"></answer-voice> -->
47
47
 
48
48
  <!-- <FileType :urls="urls" :color="black"></FileType>-->
49
49
  <!-- <FileType :urls="urls" :color="black"></FileType>
@@ -80,7 +80,7 @@ import FeedBack from "@/components/feedBack";*/
80
80
  /*import ActionAlert from "@/components/message/ActionAlertIframe";*/
81
81
  // 智能引导组件
82
82
  // import AiGuide from "@/components/AiGuide";
83
- // import AnswerVoice from "@/components/AnswerVoice";
83
+ import AnswerVoice from "@/components/AnswerVoice";
84
84
  // import FileType from "@/components/FileType";
85
85
  // import ChatContent from "./chatContent";
86
86
  // import FeedBack from '@/components/feedBack'
@@ -105,7 +105,7 @@ export default {
105
105
  // FeedBack,
106
106
  // VoiceCompontent,
107
107
  // AiGuide,
108
- // AnswerVoice,
108
+ AnswerVoice,
109
109
  // FormTemplate,
110
110
  // FormTemplate,
111
111
  // FileType,
@@ -287,7 +287,8 @@ export default {
287
287
  }
288
288
  if (this.fisrtLoad) {
289
289
  setTimeout(() => {
290
- if (this.$refs.pdfView.clientHeight - (this.pageSize.height + this.PAGE_INTVERVAL) > (this.pageSize.height + this.PAGE_INTVERVAL)) {
290
+ // (this.pageSize.height + this.PAGE_INTVERVAL)
291
+ if (this.$refs.pdfView.clientHeight - (this.pageSize.height + this.PAGE_INTVERVAL) > 0 ) {
291
292
  let loadNum = Math.ceil(this.$refs.pdfView.clientHeight / (this.pageSize.height + this.PAGE_INTVERVAL))
292
293
  for (let n = 0; n < loadNum; n++) {
293
294
  this.loadPdfData(pageNo + n)
@@ -451,7 +452,7 @@ export default {
451
452
  next () {
452
453
  this.currentPage++
453
454
  if (this.currentPage >= this.tagIds.length) {
454
- this.currentPage = 0
455
+ this.currentPage = this.tagIds.length - 1
455
456
  }
456
457
  if(this.preViewType == 'pdf') {
457
458
  this.scrollToUplaodePage(this.currentPage)
@@ -697,6 +698,7 @@ export default {
697
698
  this.contentView = document.createElement('div')
698
699
  this.contentView.style.transformOrigin = '0px 0px 0px'
699
700
  this.$http.get('/knowledge-api/knowledge/knowledge-part-location-info/list?ids=' + value.join(',')).then(res =>{
701
+ res.data = {"data":[{"id":"64591b7d8bb8ab1b91c65f24","knowledgeId":"64591a9c8da27649473f3b4b","mainId":"fb348d095c0b4fd7bbd37826563dac7d","page":3,"total":18,"pageHeight":540.0,"pageWidth":960.00946,"publicPageFileUrl":"https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/fb348d095c0b4fd7bbd37826563dac7d/2023/05/08/11/55/18/64591b638bb8ab1b91c65eed/3.pdf","extractInfo":{"location":[280.488,161.32,398.71573,61.99298],"content":"黄花城水长城旅游区位于北京市怀柔区九渡河镇境内,距北京市区65公里,是以奇而著称,融山川、碧水、古长城为一体的旅游休闲胜地。而这里的“三绝景”更是引人入","lines":[{"content":"黄花城水长城旅游区位于北京市怀柔区九渡河镇境内,距","location":[280.488,161.32,398.71573,15.9869995]},{"content":"北京市区65公里,是以奇而著称,融山川、碧水、古长","location":[283.691,184.30899,392.3055,15.9869995]},{"content":"城为一体的旅游休闲胜地。而这里的“三绝景”更是引人入","location":[282.699,207.32599,394.3033,15.9869995]}],"tagId":null}}],"code":"0","msg":null,"traceId":null}
700
702
  if (res.data.code == 0) {
701
703
  // tagIds 会按照gpt识别的生成有序的数组,前端直接按照下标的顺序取就可以了
702
704
  // 缓存拿到的所有数据
@@ -783,6 +785,18 @@ export default {
783
785
  width: 100%;
784
786
  height: 100%;
785
787
  }
788
+ a:link {
789
+ color: none;
790
+ }
791
+ a:visited {
792
+ color: none;
793
+ }
794
+ a:hover {
795
+ color: none;
796
+ }
797
+ a:active {
798
+ color: none;
799
+ }
786
800
  .btn_footer {
787
801
  width: 100%;
788
802
  height: 60px;