ai-assistant-pro 0.0.10 → 0.0.12
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/components/demo/api/index.js +6 -1
- package/components/demo/src/chat.vue +56 -8
- package/components/demo/src/hot-search.vue +4 -3
- package/components/demo/src/main.vue +10 -1
- package/dist/ai-assistant-pro.common.js +76 -35
- package/dist/ai-assistant-pro.common.js.map +1 -1
- package/dist/ai-assistant-pro.css +1 -1
- package/dist/ai-assistant-pro.umd.js +76 -35
- package/dist/ai-assistant-pro.umd.js.map +1 -1
- package/dist/ai-assistant-pro.umd.min.js +2 -2
- package/dist/ai-assistant-pro.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
import request from '../utils/request'
|
|
2
2
|
import { fetchEventSource } from '@microsoft/fetch-event-source';
|
|
3
3
|
import constants from '../utils/constants';
|
|
4
|
+
import cache from '../plugins/cache';
|
|
4
5
|
|
|
5
6
|
const baseURL = sessionStorage.getItem('AI-INTELLIGENT-TOOLS_BASE_URL') || constants.publicPath;
|
|
6
7
|
let prefix = sessionStorage.getItem('AI-INTELLIGENT-TOOLS_PRE_FIX') || constants.publicPrefix;
|
|
7
8
|
// 0.0.8 版本接口升级
|
|
8
9
|
prefix += '/plugin/v2';
|
|
9
|
-
|
|
10
|
+
|
|
11
|
+
export const pdfUrlBase = 'https://testagent.icve.com.cn';
|
|
12
|
+
// export const pdfUrlBase = 'http://agent.icve.com.cn';
|
|
13
|
+
export const pdfUrl = pdfUrlBase + '/ossurl';
|
|
10
14
|
export const ssoAuth = (token) => {
|
|
11
15
|
return request({
|
|
12
16
|
url: prefix + '/sso/assistant',
|
|
13
17
|
method: 'get',
|
|
14
18
|
params: {
|
|
15
19
|
token: token,
|
|
20
|
+
businessSource: 3
|
|
16
21
|
},
|
|
17
22
|
});
|
|
18
23
|
}
|
|
@@ -16,9 +16,27 @@
|
|
|
16
16
|
<div class="link-content">
|
|
17
17
|
<template v-for="item in list.links" >
|
|
18
18
|
<div class="links" v-if="!item.title.startsWith(chatMajorId)">
|
|
19
|
-
<
|
|
20
|
-
<span
|
|
21
|
-
|
|
19
|
+
<span>{{ `《${item.title}》` }} 共
|
|
20
|
+
<span style="font-weight: bold">
|
|
21
|
+
{{ item.fileDTOS.length }}
|
|
22
|
+
</span>
|
|
23
|
+
处引用
|
|
24
|
+
</span>
|
|
25
|
+
</div>
|
|
26
|
+
<div
|
|
27
|
+
v-for="(pdf, index) in item.fileDTOS"
|
|
28
|
+
class="link-part-container"
|
|
29
|
+
:key="index"
|
|
30
|
+
>
|
|
31
|
+
<span class="link-list-part">
|
|
32
|
+
{{ pdf.matchContent }}
|
|
33
|
+
</span>
|
|
34
|
+
<span
|
|
35
|
+
class="link-list-button"
|
|
36
|
+
@click="seeDetail(pdf, item.documentUrl)"
|
|
37
|
+
>
|
|
38
|
+
点击查看
|
|
39
|
+
</span>
|
|
22
40
|
</div>
|
|
23
41
|
</template>
|
|
24
42
|
</div>
|
|
@@ -64,7 +82,7 @@
|
|
|
64
82
|
<script>
|
|
65
83
|
import { errorList, cacheMessageList } from '../utils/config';
|
|
66
84
|
import ChatTools from './chat-tools.vue';
|
|
67
|
-
import { sendMessageEventSource, getAutoQuestioning } from "../api";
|
|
85
|
+
import { sendMessageEventSource, getAutoQuestioning, pdfUrl, pdfUrlBase } from "../api";
|
|
68
86
|
import { marked } from 'marked';
|
|
69
87
|
const controller = new AbortController();
|
|
70
88
|
const signal = controller.signal;
|
|
@@ -95,6 +113,10 @@ export default {
|
|
|
95
113
|
type: String,
|
|
96
114
|
default: undefined,
|
|
97
115
|
},
|
|
116
|
+
showMoreQA: {
|
|
117
|
+
type: Boolean,
|
|
118
|
+
default: false,
|
|
119
|
+
},
|
|
98
120
|
messageData: {
|
|
99
121
|
type: Array,
|
|
100
122
|
default: cacheMessageList
|
|
@@ -199,7 +221,9 @@ export default {
|
|
|
199
221
|
content: current.message || '正在思考中。',
|
|
200
222
|
});
|
|
201
223
|
}
|
|
202
|
-
this.
|
|
224
|
+
if (this.showMoreQA) {
|
|
225
|
+
this.makeAutoQuestioning(cacheMessage);
|
|
226
|
+
}
|
|
203
227
|
},
|
|
204
228
|
makeMessageLine(res, list) {
|
|
205
229
|
const { content, status, chatId, msgId, parentMsgId, reference, commonKey, connectUrl } = JSON.parse(res.data);
|
|
@@ -251,6 +275,7 @@ export default {
|
|
|
251
275
|
content: { followUps },
|
|
252
276
|
},
|
|
253
277
|
} = autoRes;
|
|
278
|
+
this.messageData[this.messageData.length - 1].followUps = [];
|
|
254
279
|
this.messageData[this.messageData.length - 1].followUps =
|
|
255
280
|
followUps.length > 3 ? followUps.splice(0, 3) : followUps;
|
|
256
281
|
},
|
|
@@ -269,7 +294,12 @@ export default {
|
|
|
269
294
|
list.connectUrl = [];
|
|
270
295
|
this.postMessage(list);
|
|
271
296
|
this.$emit('on-reanser');
|
|
272
|
-
}
|
|
297
|
+
},
|
|
298
|
+
seeDetail(pdfInfo, url){
|
|
299
|
+
const { pageIndex } = pdfInfo;
|
|
300
|
+
const baseUrl = `${pdfUrlBase}/#/pdf-view?documentUrl=${pdfUrl}${encodeURIComponent(url)}&pageIndex=${pageIndex}`;
|
|
301
|
+
window.open(baseUrl, '_blank');
|
|
302
|
+
},
|
|
273
303
|
},
|
|
274
304
|
}
|
|
275
305
|
</script>
|
|
@@ -339,7 +369,8 @@ export default {
|
|
|
339
369
|
}
|
|
340
370
|
|
|
341
371
|
.robot-message {
|
|
342
|
-
width: 100%;
|
|
372
|
+
//width: 100%;
|
|
373
|
+
width: calc(100% - 120px);
|
|
343
374
|
background-color: rgba(241, 243, 245, 1);
|
|
344
375
|
border-radius: 12px;
|
|
345
376
|
border-top-left-radius: 0;
|
|
@@ -377,7 +408,7 @@ export default {
|
|
|
377
408
|
|
|
378
409
|
.links {
|
|
379
410
|
position: relative;
|
|
380
|
-
height: 22px;
|
|
411
|
+
min-height: 22px;
|
|
381
412
|
line-height: 22px;
|
|
382
413
|
margin: 8px 0;
|
|
383
414
|
margin-left: 10px;
|
|
@@ -420,4 +451,21 @@ export default {
|
|
|
420
451
|
background-color: rgba(96, 96, 224, 0.24);
|
|
421
452
|
}
|
|
422
453
|
}
|
|
454
|
+
.link-part-container {
|
|
455
|
+
display: flex;
|
|
456
|
+
padding: 5px;
|
|
457
|
+
.link-list-part {
|
|
458
|
+
width: calc(100% - 64px);
|
|
459
|
+
font-size: 13px;
|
|
460
|
+
overflow: hidden; /* 隐藏超出的内容 */
|
|
461
|
+
white-space: nowrap; /* 不换行 */
|
|
462
|
+
text-overflow: ellipsis; /* 超出部分用省略号表示 */
|
|
463
|
+
}
|
|
464
|
+
.link-list-button {
|
|
465
|
+
font-size: 13px;
|
|
466
|
+
width: 64px;
|
|
467
|
+
color: #1677ff;
|
|
468
|
+
cursor: pointer;
|
|
469
|
+
}
|
|
470
|
+
}
|
|
423
471
|
</style>
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
</div>
|
|
7
7
|
<div class="robot-message">
|
|
8
8
|
<template v-if="prologue">
|
|
9
|
-
{{prologue}}
|
|
9
|
+
<p>{{prologue}}</p>
|
|
10
10
|
</template>
|
|
11
11
|
<template v-else>
|
|
12
|
-
<p>Hi
|
|
13
|
-
<p
|
|
12
|
+
<p>Hi,我是你的专属学习助手</p>
|
|
13
|
+
<p>欢迎随时向我提问。</p>
|
|
14
14
|
</template>
|
|
15
15
|
<div class="hot-list" v-for="(list, index) in aiMessage" :key="index" @click="selectModule(list)">
|
|
16
16
|
{{ list }}
|
|
@@ -63,6 +63,7 @@ export default {
|
|
|
63
63
|
this.aiMessage = JSON.parse(guideExample);
|
|
64
64
|
}
|
|
65
65
|
this.prologue = prologue;
|
|
66
|
+
this.$emit('init-info', wordRes);
|
|
66
67
|
}
|
|
67
68
|
}
|
|
68
69
|
</script>
|
|
@@ -12,7 +12,10 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
<template v-if="courseFlag">
|
|
14
14
|
<div class="ai-main-content">
|
|
15
|
-
<hot-search v-if="!chatShow"
|
|
15
|
+
<hot-search v-if="!chatShow"
|
|
16
|
+
:resId="resId"
|
|
17
|
+
@select-module="selectModule"
|
|
18
|
+
@init-info="initInfo"></hot-search>
|
|
16
19
|
<chat v-if="chatShow"
|
|
17
20
|
ref="chatRef"
|
|
18
21
|
:resId="resId"
|
|
@@ -21,6 +24,7 @@
|
|
|
21
24
|
:key-word="aiMessageKeyWord"
|
|
22
25
|
:message-data="messageList"
|
|
23
26
|
:chat-major-id="chatMajorId"
|
|
27
|
+
:show-more-q-a="showMoreQA"
|
|
24
28
|
@on-reanser="reanserMethod"
|
|
25
29
|
@on-message-finish="messageFinish"
|
|
26
30
|
/>
|
|
@@ -100,6 +104,7 @@ export default {
|
|
|
100
104
|
chatId: undefined, // 对话id
|
|
101
105
|
stop: false,
|
|
102
106
|
chatMajorId: '',
|
|
107
|
+
showMoreQA: false,
|
|
103
108
|
}
|
|
104
109
|
},
|
|
105
110
|
mounted() {
|
|
@@ -227,6 +232,10 @@ export default {
|
|
|
227
232
|
messageFinish(chatId) {
|
|
228
233
|
this.stop = false;
|
|
229
234
|
this.chatId = chatId;
|
|
235
|
+
},
|
|
236
|
+
initInfo(info) {
|
|
237
|
+
const { ifProbe } = info;
|
|
238
|
+
this.showMoreQA = !!ifProbe;
|
|
230
239
|
}
|
|
231
240
|
}
|
|
232
241
|
}
|
|
@@ -6531,7 +6531,7 @@ if (typeof window !== 'undefined') {
|
|
|
6531
6531
|
// Indicate to webpack that this file can be concatenated
|
|
6532
6532
|
/* harmony default export */ var setPublicPath = (null);
|
|
6533
6533
|
|
|
6534
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=template&id=
|
|
6534
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=template&id=57497dd9&scoped=true
|
|
6535
6535
|
var render = function render() {
|
|
6536
6536
|
var _vm = this,
|
|
6537
6537
|
_c = _vm._self._c;
|
|
@@ -6571,7 +6571,8 @@ var render = function render() {
|
|
|
6571
6571
|
"resId": _vm.resId
|
|
6572
6572
|
},
|
|
6573
6573
|
on: {
|
|
6574
|
-
"select-module": _vm.selectModule
|
|
6574
|
+
"select-module": _vm.selectModule,
|
|
6575
|
+
"init-info": _vm.initInfo
|
|
6575
6576
|
}
|
|
6576
6577
|
}) : _vm._e(), _vm.chatShow ? _c('chat', {
|
|
6577
6578
|
ref: "chatRef",
|
|
@@ -6581,7 +6582,8 @@ var render = function render() {
|
|
|
6581
6582
|
"chatId": _vm.chatId,
|
|
6582
6583
|
"key-word": _vm.aiMessageKeyWord,
|
|
6583
6584
|
"message-data": _vm.messageList,
|
|
6584
|
-
"chat-major-id": _vm.chatMajorId
|
|
6585
|
+
"chat-major-id": _vm.chatMajorId,
|
|
6586
|
+
"show-more-q-a": _vm.showMoreQA
|
|
6585
6587
|
},
|
|
6586
6588
|
on: {
|
|
6587
6589
|
"on-reanser": _vm.reanserMethod,
|
|
@@ -6642,17 +6644,17 @@ var render = function render() {
|
|
|
6642
6644
|
};
|
|
6643
6645
|
var staticRenderFns = [];
|
|
6644
6646
|
|
|
6645
|
-
;// ./components/demo/src/main.vue?vue&type=template&id=
|
|
6647
|
+
;// ./components/demo/src/main.vue?vue&type=template&id=57497dd9&scoped=true
|
|
6646
6648
|
|
|
6647
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/hot-search.vue?vue&type=template&id=
|
|
6648
|
-
var
|
|
6649
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/hot-search.vue?vue&type=template&id=b701a940&scoped=true
|
|
6650
|
+
var hot_searchvue_type_template_id_b701a940_scoped_true_render = function render() {
|
|
6649
6651
|
var _vm = this,
|
|
6650
6652
|
_c = _vm._self._c;
|
|
6651
6653
|
return _c('div', {
|
|
6652
6654
|
staticClass: "hot-search-contain"
|
|
6653
6655
|
}, [_vm._m(0), _c('div', {
|
|
6654
6656
|
staticClass: "robot-message"
|
|
6655
|
-
}, [_vm.prologue ? [_vm._v(
|
|
6657
|
+
}, [_vm.prologue ? [_c('p', [_vm._v(_vm._s(_vm.prologue))])] : [_c('p', [_vm._v("Hi,我是你的专属学习助手")]), _c('p', [_vm._v("欢迎随时向我提问。")])], _vm._l(_vm.aiMessage, function (list, index) {
|
|
6656
6658
|
return _c('div', {
|
|
6657
6659
|
key: index,
|
|
6658
6660
|
staticClass: "hot-list",
|
|
@@ -6666,7 +6668,7 @@ var hot_searchvue_type_template_id_abf2ffc4_scoped_true_render = function render
|
|
|
6666
6668
|
})]);
|
|
6667
6669
|
})], 2)]);
|
|
6668
6670
|
};
|
|
6669
|
-
var
|
|
6671
|
+
var hot_searchvue_type_template_id_b701a940_scoped_true_staticRenderFns = [function () {
|
|
6670
6672
|
var _vm = this,
|
|
6671
6673
|
_c = _vm._self._c;
|
|
6672
6674
|
return _c('div', {
|
|
@@ -6676,7 +6678,7 @@ var hot_searchvue_type_template_id_abf2ffc4_scoped_true_staticRenderFns = [funct
|
|
|
6676
6678
|
})]);
|
|
6677
6679
|
}];
|
|
6678
6680
|
|
|
6679
|
-
;// ./components/demo/src/hot-search.vue?vue&type=template&id=
|
|
6681
|
+
;// ./components/demo/src/hot-search.vue?vue&type=template&id=b701a940&scoped=true
|
|
6680
6682
|
|
|
6681
6683
|
;// ./node_modules/axios/lib/helpers/bind.js
|
|
6682
6684
|
|
|
@@ -10852,17 +10854,21 @@ function defaultOnOpen(response) {
|
|
|
10852
10854
|
|
|
10853
10855
|
|
|
10854
10856
|
|
|
10857
|
+
|
|
10855
10858
|
const baseURL = sessionStorage.getItem('AI-INTELLIGENT-TOOLS_BASE_URL') || constants.publicPath;
|
|
10856
10859
|
let prefix = sessionStorage.getItem('AI-INTELLIGENT-TOOLS_PRE_FIX') || constants.publicPrefix;
|
|
10857
10860
|
// 0.0.8 版本接口升级
|
|
10858
10861
|
prefix += '/plugin/v2';
|
|
10859
|
-
|
|
10862
|
+
const pdfUrlBase = 'https://testagent.icve.com.cn';
|
|
10863
|
+
// export const pdfUrlBase = 'http://agent.icve.com.cn';
|
|
10864
|
+
const pdfUrl = pdfUrlBase + '/ossurl';
|
|
10860
10865
|
const ssoAuth = token => {
|
|
10861
10866
|
return utils_request({
|
|
10862
10867
|
url: prefix + '/sso/assistant',
|
|
10863
10868
|
method: 'get',
|
|
10864
10869
|
params: {
|
|
10865
|
-
token: token
|
|
10870
|
+
token: token,
|
|
10871
|
+
businessSource: 3
|
|
10866
10872
|
}
|
|
10867
10873
|
});
|
|
10868
10874
|
};
|
|
@@ -11016,14 +11022,15 @@ async function sendMessageEventSource(params, signal, onmessage) {
|
|
|
11016
11022
|
this.aiMessage = JSON.parse(guideExample);
|
|
11017
11023
|
}
|
|
11018
11024
|
this.prologue = prologue;
|
|
11025
|
+
this.$emit('init-info', wordRes);
|
|
11019
11026
|
}
|
|
11020
11027
|
});
|
|
11021
11028
|
;// ./components/demo/src/hot-search.vue?vue&type=script&lang=js
|
|
11022
11029
|
/* harmony default export */ var src_hot_searchvue_type_script_lang_js = (hot_searchvue_type_script_lang_js);
|
|
11023
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/hot-search.vue?vue&type=style&index=0&id=
|
|
11030
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/hot-search.vue?vue&type=style&index=0&id=b701a940&prod&lang=scss&scoped=true
|
|
11024
11031
|
// extracted by mini-css-extract-plugin
|
|
11025
11032
|
|
|
11026
|
-
;// ./components/demo/src/hot-search.vue?vue&type=style&index=0&id=
|
|
11033
|
+
;// ./components/demo/src/hot-search.vue?vue&type=style&index=0&id=b701a940&prod&lang=scss&scoped=true
|
|
11027
11034
|
|
|
11028
11035
|
;// ./node_modules/@vue/vue-loader-v15/lib/runtime/componentNormalizer.js
|
|
11029
11036
|
/* globals __VUE_SSR_CONTEXT__ */
|
|
@@ -11134,18 +11141,18 @@ function normalizeComponent(
|
|
|
11134
11141
|
|
|
11135
11142
|
var component = normalizeComponent(
|
|
11136
11143
|
src_hot_searchvue_type_script_lang_js,
|
|
11137
|
-
|
|
11138
|
-
|
|
11144
|
+
hot_searchvue_type_template_id_b701a940_scoped_true_render,
|
|
11145
|
+
hot_searchvue_type_template_id_b701a940_scoped_true_staticRenderFns,
|
|
11139
11146
|
false,
|
|
11140
11147
|
null,
|
|
11141
|
-
"
|
|
11148
|
+
"b701a940",
|
|
11142
11149
|
null
|
|
11143
11150
|
|
|
11144
11151
|
)
|
|
11145
11152
|
|
|
11146
11153
|
/* harmony default export */ var hot_search = (component.exports);
|
|
11147
|
-
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=template&id=
|
|
11148
|
-
var
|
|
11154
|
+
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=template&id=ff8a5fbc&scoped=true
|
|
11155
|
+
var chatvue_type_template_id_ff8a5fbc_scoped_true_render = function render() {
|
|
11149
11156
|
var _vm = this,
|
|
11150
11157
|
_c = _vm._self._c;
|
|
11151
11158
|
return _c('div', {
|
|
@@ -11182,12 +11189,25 @@ var chatvue_type_template_id_322788ca_scoped_true_render = function render() {
|
|
|
11182
11189
|
}, [_vm._l(list.links, function (item) {
|
|
11183
11190
|
return [!item.title.startsWith(_vm.chatMajorId) ? _c('div', {
|
|
11184
11191
|
staticClass: "links"
|
|
11185
|
-
}, [_c('
|
|
11186
|
-
|
|
11187
|
-
"
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11192
|
+
}, [_c('span', [_vm._v(_vm._s(`《${item.title}》`) + " 共 "), _c('span', {
|
|
11193
|
+
staticStyle: {
|
|
11194
|
+
"font-weight": "bold"
|
|
11195
|
+
}
|
|
11196
|
+
}, [_vm._v(" " + _vm._s(item.fileDTOS.length) + " ")]), _vm._v(" 处引用 ")])]) : _vm._e(), _vm._l(item.fileDTOS, function (pdf, index) {
|
|
11197
|
+
return _c('div', {
|
|
11198
|
+
key: index,
|
|
11199
|
+
staticClass: "link-part-container"
|
|
11200
|
+
}, [_c('span', {
|
|
11201
|
+
staticClass: "link-list-part"
|
|
11202
|
+
}, [_vm._v(" " + _vm._s(pdf.matchContent) + " ")]), _c('span', {
|
|
11203
|
+
staticClass: "link-list-button",
|
|
11204
|
+
on: {
|
|
11205
|
+
"click": function ($event) {
|
|
11206
|
+
return _vm.seeDetail(pdf, item.documentUrl);
|
|
11207
|
+
}
|
|
11208
|
+
}
|
|
11209
|
+
}, [_vm._v(" 点击查看 ")])]);
|
|
11210
|
+
})];
|
|
11191
11211
|
})], 2)]) : _vm._e()]) : _vm._e(), list.type === 'robot' && list.connectUrl.length > 0 ? _c('div', {
|
|
11192
11212
|
staticClass: "link"
|
|
11193
11213
|
}, [_c('div', {
|
|
@@ -11235,7 +11255,7 @@ var chatvue_type_template_id_322788ca_scoped_true_render = function render() {
|
|
|
11235
11255
|
}) : _vm._e()], 1)]);
|
|
11236
11256
|
}), 0);
|
|
11237
11257
|
};
|
|
11238
|
-
var
|
|
11258
|
+
var chatvue_type_template_id_ff8a5fbc_scoped_true_staticRenderFns = [];
|
|
11239
11259
|
|
|
11240
11260
|
;// ./components/demo/utils/config.js
|
|
11241
11261
|
|
|
@@ -13941,6 +13961,10 @@ const signal = controller.signal;
|
|
|
13941
13961
|
type: String,
|
|
13942
13962
|
default: undefined
|
|
13943
13963
|
},
|
|
13964
|
+
showMoreQA: {
|
|
13965
|
+
type: Boolean,
|
|
13966
|
+
default: false
|
|
13967
|
+
},
|
|
13944
13968
|
messageData: {
|
|
13945
13969
|
type: Array,
|
|
13946
13970
|
default: cacheMessageList
|
|
@@ -14044,7 +14068,9 @@ const signal = controller.signal;
|
|
|
14044
14068
|
content: current.message || '正在思考中。'
|
|
14045
14069
|
});
|
|
14046
14070
|
}
|
|
14047
|
-
this.
|
|
14071
|
+
if (this.showMoreQA) {
|
|
14072
|
+
this.makeAutoQuestioning(cacheMessage);
|
|
14073
|
+
}
|
|
14048
14074
|
},
|
|
14049
14075
|
makeMessageLine(res, list) {
|
|
14050
14076
|
const {
|
|
@@ -14107,6 +14133,7 @@ const signal = controller.signal;
|
|
|
14107
14133
|
}
|
|
14108
14134
|
}
|
|
14109
14135
|
} = autoRes;
|
|
14136
|
+
this.messageData[this.messageData.length - 1].followUps = [];
|
|
14110
14137
|
this.messageData[this.messageData.length - 1].followUps = followUps.length > 3 ? followUps.splice(0, 3) : followUps;
|
|
14111
14138
|
},
|
|
14112
14139
|
onStopChat(list) {
|
|
@@ -14124,15 +14151,22 @@ const signal = controller.signal;
|
|
|
14124
14151
|
list.connectUrl = [];
|
|
14125
14152
|
this.postMessage(list);
|
|
14126
14153
|
this.$emit('on-reanser');
|
|
14154
|
+
},
|
|
14155
|
+
seeDetail(pdfInfo, url) {
|
|
14156
|
+
const {
|
|
14157
|
+
pageIndex
|
|
14158
|
+
} = pdfInfo;
|
|
14159
|
+
const baseUrl = `${pdfUrlBase}/#/pdf-view?documentUrl=${pdfUrl}${encodeURIComponent(url)}&pageIndex=${pageIndex}`;
|
|
14160
|
+
window.open(baseUrl, '_blank');
|
|
14127
14161
|
}
|
|
14128
14162
|
}
|
|
14129
14163
|
});
|
|
14130
14164
|
;// ./components/demo/src/chat.vue?vue&type=script&lang=js
|
|
14131
14165
|
/* harmony default export */ var src_chatvue_type_script_lang_js = (chatvue_type_script_lang_js);
|
|
14132
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=style&index=0&id=
|
|
14166
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/chat.vue?vue&type=style&index=0&id=ff8a5fbc&prod&lang=scss&scoped=true
|
|
14133
14167
|
// extracted by mini-css-extract-plugin
|
|
14134
14168
|
|
|
14135
|
-
;// ./components/demo/src/chat.vue?vue&type=style&index=0&id=
|
|
14169
|
+
;// ./components/demo/src/chat.vue?vue&type=style&index=0&id=ff8a5fbc&prod&lang=scss&scoped=true
|
|
14136
14170
|
|
|
14137
14171
|
;// ./components/demo/src/chat.vue
|
|
14138
14172
|
|
|
@@ -14145,11 +14179,11 @@ const signal = controller.signal;
|
|
|
14145
14179
|
|
|
14146
14180
|
var chat_component = normalizeComponent(
|
|
14147
14181
|
src_chatvue_type_script_lang_js,
|
|
14148
|
-
|
|
14149
|
-
|
|
14182
|
+
chatvue_type_template_id_ff8a5fbc_scoped_true_render,
|
|
14183
|
+
chatvue_type_template_id_ff8a5fbc_scoped_true_staticRenderFns,
|
|
14150
14184
|
false,
|
|
14151
14185
|
null,
|
|
14152
|
-
"
|
|
14186
|
+
"ff8a5fbc",
|
|
14153
14187
|
null
|
|
14154
14188
|
|
|
14155
14189
|
)
|
|
@@ -14343,7 +14377,8 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
14343
14377
|
chatId: undefined,
|
|
14344
14378
|
// 对话id
|
|
14345
14379
|
stop: false,
|
|
14346
|
-
chatMajorId: ''
|
|
14380
|
+
chatMajorId: '',
|
|
14381
|
+
showMoreQA: false
|
|
14347
14382
|
};
|
|
14348
14383
|
},
|
|
14349
14384
|
mounted() {
|
|
@@ -14473,15 +14508,21 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
14473
14508
|
messageFinish(chatId) {
|
|
14474
14509
|
this.stop = false;
|
|
14475
14510
|
this.chatId = chatId;
|
|
14511
|
+
},
|
|
14512
|
+
initInfo(info) {
|
|
14513
|
+
const {
|
|
14514
|
+
ifProbe
|
|
14515
|
+
} = info;
|
|
14516
|
+
this.showMoreQA = !!ifProbe;
|
|
14476
14517
|
}
|
|
14477
14518
|
}
|
|
14478
14519
|
});
|
|
14479
14520
|
;// ./components/demo/src/main.vue?vue&type=script&lang=js
|
|
14480
14521
|
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
14481
|
-
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
14522
|
+
;// ./node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-22.use[0]!./node_modules/css-loader/dist/cjs.js??clonedRuleSet-22.use[1]!./node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-22.use[2]!./node_modules/sass-loader/dist/cjs.js??clonedRuleSet-22.use[3]!./node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./components/demo/src/main.vue?vue&type=style&index=0&id=57497dd9&prod&lang=scss&scoped=true
|
|
14482
14523
|
// extracted by mini-css-extract-plugin
|
|
14483
14524
|
|
|
14484
|
-
;// ./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
14525
|
+
;// ./components/demo/src/main.vue?vue&type=style&index=0&id=57497dd9&prod&lang=scss&scoped=true
|
|
14485
14526
|
|
|
14486
14527
|
;// ./components/demo/src/main.vue
|
|
14487
14528
|
|
|
@@ -14498,7 +14539,7 @@ var main_component = normalizeComponent(
|
|
|
14498
14539
|
staticRenderFns,
|
|
14499
14540
|
false,
|
|
14500
14541
|
null,
|
|
14501
|
-
"
|
|
14542
|
+
"57497dd9",
|
|
14502
14543
|
null
|
|
14503
14544
|
|
|
14504
14545
|
)
|