ai-error-assistant-pro 0.0.12 → 0.0.14
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/src/chat.vue +39 -13
- package/components/demo/src/main.vue +4 -0
- package/components/demo/utils/config.js +7 -1
- package/dist/ai-error-assistant-pro.common.js +46 -20
- package/dist/ai-error-assistant-pro.common.js.map +1 -1
- package/dist/ai-error-assistant-pro.css +1 -1
- package/dist/ai-error-assistant-pro.umd.js +46 -20
- package/dist/ai-error-assistant-pro.umd.js.map +1 -1
- package/dist/ai-error-assistant-pro.umd.min.js +2 -2
- package/dist/ai-error-assistant-pro.umd.min.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
<div class="robot-image-div"></div>
|
|
9
9
|
<!-- <img alt="" src="../static/robot.png" style="width: 48px; height: 48px">-->
|
|
10
10
|
</div>
|
|
11
|
-
<div v-
|
|
11
|
+
<div v-if ="list.type === 'user' && avatarUrl" class="robot">
|
|
12
|
+
<img :src="avatarUrl" alt="" style="width: 48px; height: 48px; border-radius: 50%;">
|
|
13
|
+
</div>
|
|
14
|
+
<div v-if ="list.type === 'user' && avatarUrl===''" class="robot user">user</div>
|
|
12
15
|
<div :class="{'user-info': list.type === 'user'}" class="robot-message">
|
|
13
16
|
<div v-html="list.message"></div>
|
|
14
17
|
<div v-if="list.type === 'robot' && list.links.length > 0 && showFile" class="link">
|
|
@@ -16,29 +19,31 @@
|
|
|
16
19
|
<div class="link-title">参考文件</div>
|
|
17
20
|
<div class="link-content">
|
|
18
21
|
<template v-for="item in list.links">
|
|
19
|
-
<
|
|
22
|
+
<template v-if="!item.title.startsWith(chatMajorId)">
|
|
23
|
+
<div class="links" >
|
|
20
24
|
<span>{{ `《${item.title}》` }} 共
|
|
21
25
|
<span style="font-weight: bold">
|
|
22
26
|
{{ item.fileDTOS.length }}
|
|
23
27
|
</span>
|
|
24
28
|
处引用
|
|
25
29
|
</span>
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
</div>
|
|
31
|
+
<div
|
|
32
|
+
v-for="(pdf, index) in item.fileDTOS"
|
|
33
|
+
class="link-part-container"
|
|
34
|
+
:key="index"
|
|
35
|
+
>
|
|
32
36
|
<span class="link-list-part">
|
|
33
37
|
{{ pdf.matchContent }}
|
|
34
38
|
</span>
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
+
<span
|
|
40
|
+
class="link-list-button"
|
|
41
|
+
@click="seeDetail(pdf, item.documentUrl)"
|
|
42
|
+
>
|
|
39
43
|
点击查看
|
|
40
44
|
</span>
|
|
41
|
-
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
42
47
|
</template>
|
|
43
48
|
</div>
|
|
44
49
|
</div>
|
|
@@ -115,6 +120,10 @@ export default {
|
|
|
115
120
|
type: Boolean,
|
|
116
121
|
default: false,
|
|
117
122
|
},
|
|
123
|
+
avatarUrl: {
|
|
124
|
+
type: String,
|
|
125
|
+
default: '',
|
|
126
|
+
},
|
|
118
127
|
},
|
|
119
128
|
data() {
|
|
120
129
|
return {
|
|
@@ -424,6 +433,23 @@ export default {
|
|
|
424
433
|
line-height: 24px;
|
|
425
434
|
}
|
|
426
435
|
|
|
436
|
+
:deep {
|
|
437
|
+
.robot-message {
|
|
438
|
+
p {
|
|
439
|
+
margin: 0;
|
|
440
|
+
span {
|
|
441
|
+
color: #fff !important;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
pre {
|
|
445
|
+
code {
|
|
446
|
+
white-space: pre-wrap;
|
|
447
|
+
}
|
|
448
|
+
white-space: pre-wrap;
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
427
453
|
.user-info {
|
|
428
454
|
width: auto;
|
|
429
455
|
border-radius: 12px;
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
:xtId="xtId"
|
|
21
21
|
:show-more-q-a="showMoreQA"
|
|
22
22
|
:show-file="showFile"
|
|
23
|
+
:avatarUrl="avatarUrl"
|
|
23
24
|
:key-word="aiMessageKeyWord"
|
|
24
25
|
:analy-exercise="analyExercise"
|
|
25
26
|
@on-reanser="reanserMethod"
|
|
@@ -48,6 +49,7 @@ import Chat from './chat.vue';
|
|
|
48
49
|
import Cookies from "js-cookie";
|
|
49
50
|
import { getUserInfo } from '../utils/config';
|
|
50
51
|
import {checkCourseIdIsExist, queryCallWord} from '../api/index';
|
|
52
|
+
import cache from "../plugins/cache";
|
|
51
53
|
export default {
|
|
52
54
|
name: 'AiErrorAssistant',
|
|
53
55
|
components: {
|
|
@@ -92,6 +94,7 @@ export default {
|
|
|
92
94
|
message:'',
|
|
93
95
|
showMoreQA: false,
|
|
94
96
|
showFile: false,
|
|
97
|
+
avatarUrl: '',
|
|
95
98
|
}
|
|
96
99
|
},
|
|
97
100
|
async mounted() {
|
|
@@ -104,6 +107,7 @@ export default {
|
|
|
104
107
|
const { showMoreQA, isShowFile } = wordRes;
|
|
105
108
|
this.showMoreQA = showMoreQA;
|
|
106
109
|
this.showFile = !!isShowFile;
|
|
110
|
+
this.avatarUrl = cache.session.getJSON('USER_AVATAR_URL');
|
|
107
111
|
},
|
|
108
112
|
methods: {
|
|
109
113
|
closeMessage() {
|
|
@@ -87,6 +87,12 @@ export const cacheMessageList = [
|
|
|
87
87
|
// cache.session.setJSON('SRKJ_TOKEN_CACHE', userRes);
|
|
88
88
|
// }
|
|
89
89
|
export const getUserInfo = async (token, businessSource) => {
|
|
90
|
-
await ssoAuth(token, businessSource)
|
|
90
|
+
await ssoAuth(token, businessSource).then(async (ssoRes) => {
|
|
91
|
+
if (ssoRes?.avatarUrl){
|
|
92
|
+
cache.session.setJSON('USER_AVATAR_URL', ssoRes.avatarUrl);
|
|
93
|
+
}else{
|
|
94
|
+
cache.session.setJSON('USER_AVATAR_URL', '');
|
|
95
|
+
}
|
|
96
|
+
});
|
|
91
97
|
cache.session.setJSON('SRKJ_TOKEN_CACHE', token);
|
|
92
98
|
}
|
|
@@ -6546,7 +6546,7 @@ if (typeof window !== 'undefined') {
|
|
|
6546
6546
|
// Indicate to webpack that this file can be concatenated
|
|
6547
6547
|
/* harmony default export */ var setPublicPath = (null);
|
|
6548
6548
|
|
|
6549
|
-
;// CONCATENATED MODULE: ./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=
|
|
6549
|
+
;// CONCATENATED MODULE: ./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=6861902d&scoped=true
|
|
6550
6550
|
var render = function render() {
|
|
6551
6551
|
var _vm = this,
|
|
6552
6552
|
_c = _vm._self._c;
|
|
@@ -6576,6 +6576,7 @@ var render = function render() {
|
|
|
6576
6576
|
"xtId": _vm.xtId,
|
|
6577
6577
|
"show-more-q-a": _vm.showMoreQA,
|
|
6578
6578
|
"show-file": _vm.showFile,
|
|
6579
|
+
"avatarUrl": _vm.avatarUrl,
|
|
6579
6580
|
"key-word": _vm.aiMessageKeyWord,
|
|
6580
6581
|
"analy-exercise": _vm.analyExercise
|
|
6581
6582
|
},
|
|
@@ -6645,10 +6646,10 @@ var staticRenderFns = [function () {
|
|
|
6645
6646
|
}, [_vm._v("智能解析")])]);
|
|
6646
6647
|
}];
|
|
6647
6648
|
|
|
6648
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=
|
|
6649
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=6861902d&scoped=true
|
|
6649
6650
|
|
|
6650
|
-
;// CONCATENATED MODULE: ./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=
|
|
6651
|
-
var
|
|
6651
|
+
;// CONCATENATED MODULE: ./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=25a39a99&scoped=true
|
|
6652
|
+
var chatvue_type_template_id_25a39a99_scoped_true_render = function render() {
|
|
6652
6653
|
var _vm = this,
|
|
6653
6654
|
_c = _vm._self._c;
|
|
6654
6655
|
return _c('div', {
|
|
@@ -6672,9 +6673,21 @@ var chatvue_type_template_id_ea6e5e5a_scoped_true_render = function render() {
|
|
|
6672
6673
|
staticClass: "robot"
|
|
6673
6674
|
}, [_c('div', {
|
|
6674
6675
|
staticClass: "robot-image-div"
|
|
6675
|
-
})]) : _c('div', {
|
|
6676
|
+
})]) : _vm._e(), list.type === 'user' && _vm.avatarUrl ? _c('div', {
|
|
6677
|
+
staticClass: "robot"
|
|
6678
|
+
}, [_c('img', {
|
|
6679
|
+
staticStyle: {
|
|
6680
|
+
"width": "48px",
|
|
6681
|
+
"height": "48px",
|
|
6682
|
+
"border-radius": "50%"
|
|
6683
|
+
},
|
|
6684
|
+
attrs: {
|
|
6685
|
+
"src": _vm.avatarUrl,
|
|
6686
|
+
"alt": ""
|
|
6687
|
+
}
|
|
6688
|
+
})]) : _vm._e(), list.type === 'user' && _vm.avatarUrl === '' ? _c('div', {
|
|
6676
6689
|
staticClass: "robot user"
|
|
6677
|
-
}, [_vm._v("user")]), _c('div', {
|
|
6690
|
+
}, [_vm._v("user")]) : _vm._e(), _c('div', {
|
|
6678
6691
|
staticClass: "robot-message",
|
|
6679
6692
|
class: {
|
|
6680
6693
|
'user-info': list.type === 'user'
|
|
@@ -6690,13 +6703,13 @@ var chatvue_type_template_id_ea6e5e5a_scoped_true_render = function render() {
|
|
|
6690
6703
|
}, [_vm._v("参考文件")]), _c('div', {
|
|
6691
6704
|
staticClass: "link-content"
|
|
6692
6705
|
}, [_vm._l(list.links, function (item) {
|
|
6693
|
-
return [!item.title.startsWith(_vm.chatMajorId) ? _c('div', {
|
|
6706
|
+
return [!item.title.startsWith(_vm.chatMajorId) ? [_c('div', {
|
|
6694
6707
|
staticClass: "links"
|
|
6695
6708
|
}, [_c('span', [_vm._v(_vm._s(`《${item.title}》`) + " 共 "), _c('span', {
|
|
6696
6709
|
staticStyle: {
|
|
6697
6710
|
"font-weight": "bold"
|
|
6698
6711
|
}
|
|
6699
|
-
}, [_vm._v(" " + _vm._s(item.fileDTOS.length) + " ")]), _vm._v(" 处引用 ")])])
|
|
6712
|
+
}, [_vm._v(" " + _vm._s(item.fileDTOS.length) + " ")]), _vm._v(" 处引用 ")])]), _vm._l(item.fileDTOS, function (pdf, index) {
|
|
6700
6713
|
return _c('div', {
|
|
6701
6714
|
key: index,
|
|
6702
6715
|
staticClass: "link-part-container"
|
|
@@ -6710,7 +6723,7 @@ var chatvue_type_template_id_ea6e5e5a_scoped_true_render = function render() {
|
|
|
6710
6723
|
}
|
|
6711
6724
|
}
|
|
6712
6725
|
}, [_vm._v(" 点击查看 ")])]);
|
|
6713
|
-
})];
|
|
6726
|
+
})] : _vm._e()];
|
|
6714
6727
|
})], 2)]) : _vm._e()]) : _vm._e(), list.type === 'robot' && list.connectUrl.length > 0 ? _c('div', {
|
|
6715
6728
|
staticClass: "link"
|
|
6716
6729
|
}, [_c('div', {
|
|
@@ -6756,7 +6769,7 @@ var chatvue_type_template_id_ea6e5e5a_scoped_true_render = function render() {
|
|
|
6756
6769
|
}) : _vm._e()], 1)]);
|
|
6757
6770
|
})], 2);
|
|
6758
6771
|
};
|
|
6759
|
-
var
|
|
6772
|
+
var chatvue_type_template_id_25a39a99_scoped_true_staticRenderFns = [];
|
|
6760
6773
|
|
|
6761
6774
|
;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/bind.js
|
|
6762
6775
|
|
|
@@ -11078,7 +11091,13 @@ const cacheMessageList = [{
|
|
|
11078
11091
|
// cache.session.setJSON('SRKJ_TOKEN_CACHE', userRes);
|
|
11079
11092
|
// }
|
|
11080
11093
|
const getUserInfo = async (token, businessSource) => {
|
|
11081
|
-
await ssoAuth(token, businessSource)
|
|
11094
|
+
await ssoAuth(token, businessSource).then(async ssoRes => {
|
|
11095
|
+
if (ssoRes !== null && ssoRes !== void 0 && ssoRes.avatarUrl) {
|
|
11096
|
+
cache.session.setJSON('USER_AVATAR_URL', ssoRes.avatarUrl);
|
|
11097
|
+
} else {
|
|
11098
|
+
cache.session.setJSON('USER_AVATAR_URL', '');
|
|
11099
|
+
}
|
|
11100
|
+
});
|
|
11082
11101
|
cache.session.setJSON('SRKJ_TOKEN_CACHE', token);
|
|
11083
11102
|
};
|
|
11084
11103
|
;// CONCATENATED MODULE: ./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-tools.vue?vue&type=template&id=a40a67cc&scoped=true
|
|
@@ -14310,6 +14329,10 @@ const signal = controller.signal;
|
|
|
14310
14329
|
showFile: {
|
|
14311
14330
|
type: Boolean,
|
|
14312
14331
|
default: false
|
|
14332
|
+
},
|
|
14333
|
+
avatarUrl: {
|
|
14334
|
+
type: String,
|
|
14335
|
+
default: ''
|
|
14313
14336
|
}
|
|
14314
14337
|
},
|
|
14315
14338
|
data() {
|
|
@@ -14559,10 +14582,10 @@ const signal = controller.signal;
|
|
|
14559
14582
|
});
|
|
14560
14583
|
;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=script&lang=js
|
|
14561
14584
|
/* harmony default export */ var src_chatvue_type_script_lang_js = (chatvue_type_script_lang_js);
|
|
14562
|
-
;// CONCATENATED MODULE: ./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=
|
|
14585
|
+
;// CONCATENATED MODULE: ./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=25a39a99&prod&lang=scss&scoped=true
|
|
14563
14586
|
// extracted by mini-css-extract-plugin
|
|
14564
14587
|
|
|
14565
|
-
;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=style&index=0&id=
|
|
14588
|
+
;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=style&index=0&id=25a39a99&prod&lang=scss&scoped=true
|
|
14566
14589
|
|
|
14567
14590
|
;// CONCATENATED MODULE: ./components/demo/src/chat.vue
|
|
14568
14591
|
|
|
@@ -14575,11 +14598,11 @@ const signal = controller.signal;
|
|
|
14575
14598
|
|
|
14576
14599
|
var chat_component = normalizeComponent(
|
|
14577
14600
|
src_chatvue_type_script_lang_js,
|
|
14578
|
-
|
|
14579
|
-
|
|
14601
|
+
chatvue_type_template_id_25a39a99_scoped_true_render,
|
|
14602
|
+
chatvue_type_template_id_25a39a99_scoped_true_staticRenderFns,
|
|
14580
14603
|
false,
|
|
14581
14604
|
null,
|
|
14582
|
-
"
|
|
14605
|
+
"25a39a99",
|
|
14583
14606
|
null
|
|
14584
14607
|
|
|
14585
14608
|
)
|
|
@@ -14726,6 +14749,7 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
14726
14749
|
|
|
14727
14750
|
|
|
14728
14751
|
|
|
14752
|
+
|
|
14729
14753
|
/* harmony default export */ var mainvue_type_script_lang_js = ({
|
|
14730
14754
|
name: 'AiErrorAssistant',
|
|
14731
14755
|
components: {
|
|
@@ -14771,7 +14795,8 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
14771
14795
|
courseFlag: false,
|
|
14772
14796
|
message: '',
|
|
14773
14797
|
showMoreQA: false,
|
|
14774
|
-
showFile: false
|
|
14798
|
+
showFile: false,
|
|
14799
|
+
avatarUrl: ''
|
|
14775
14800
|
};
|
|
14776
14801
|
},
|
|
14777
14802
|
async mounted() {
|
|
@@ -14787,6 +14812,7 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
14787
14812
|
} = wordRes;
|
|
14788
14813
|
this.showMoreQA = showMoreQA;
|
|
14789
14814
|
this.showFile = !!isShowFile;
|
|
14815
|
+
this.avatarUrl = cache.session.getJSON('USER_AVATAR_URL');
|
|
14790
14816
|
},
|
|
14791
14817
|
methods: {
|
|
14792
14818
|
closeMessage() {
|
|
@@ -14839,10 +14865,10 @@ var api = init(defaultConverter, { path: '/' });
|
|
|
14839
14865
|
});
|
|
14840
14866
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=script&lang=js
|
|
14841
14867
|
/* harmony default export */ var src_mainvue_type_script_lang_js = (mainvue_type_script_lang_js);
|
|
14842
|
-
;// CONCATENATED MODULE: ./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=
|
|
14868
|
+
;// CONCATENATED MODULE: ./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=6861902d&prod&lang=scss&scoped=true
|
|
14843
14869
|
// extracted by mini-css-extract-plugin
|
|
14844
14870
|
|
|
14845
|
-
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=
|
|
14871
|
+
;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=style&index=0&id=6861902d&prod&lang=scss&scoped=true
|
|
14846
14872
|
|
|
14847
14873
|
;// CONCATENATED MODULE: ./components/demo/src/main.vue
|
|
14848
14874
|
|
|
@@ -14859,7 +14885,7 @@ var main_component = normalizeComponent(
|
|
|
14859
14885
|
staticRenderFns,
|
|
14860
14886
|
false,
|
|
14861
14887
|
null,
|
|
14862
|
-
"
|
|
14888
|
+
"6861902d",
|
|
14863
14889
|
null
|
|
14864
14890
|
|
|
14865
14891
|
)
|