ai-error-assistant-pro 0.0.10 → 0.0.11

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.
@@ -7,6 +7,10 @@ let prefix = sessionStorage.getItem('AI-INTELLIGENT-TOOLS_PRE_FIX') || constants
7
7
 
8
8
  // 0.0.7 版本接口升级
9
9
  prefix += '/plugin/v2';
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, businessSource) => {
11
15
  return request({
12
16
  url: prefix + '/sso/assistant',
@@ -17,9 +17,27 @@
17
17
  <div class="link-content">
18
18
  <template v-for="item in list.links">
19
19
  <div class="links" v-if="!item.title.startsWith(chatMajorId)">
20
- <a :href="'https://ai-yuliao.hep.com.cn'+item.documentUrl" target="_blank">
21
- <span>{{ item.title }}</span>
22
- </a>
20
+ <span>{{ `《${item.title}》` }} 共
21
+ <span style="font-weight: bold">
22
+ {{ item.fileDTOS.length }}
23
+ </span>
24
+ 处引用
25
+ </span>
26
+ </div>
27
+ <div
28
+ v-for="(pdf, index) in item.fileDTOS"
29
+ class="link-part-container"
30
+ :key="index"
31
+ >
32
+ <span class="link-list-part">
33
+ {{ pdf.matchContent }}
34
+ </span>
35
+ <span
36
+ class="link-list-button"
37
+ @click="seeDetail(pdf, item.documentUrl)"
38
+ >
39
+ 点击查看
40
+ </span>
23
41
  </div>
24
42
  </template>
25
43
  </div>
@@ -65,7 +83,7 @@ import { errorList } from '../utils/config';
65
83
  import ChatTools from './chat-tools.vue';
66
84
  import ErrorChat from './error-chat.vue';
67
85
  import { marked } from 'marked';
68
- import { chartClear, sendMessageEventSource, getAutoQuestioning } from "../api";
86
+ import { chartClear, sendMessageEventSource, getAutoQuestioning, pdfUrl, pdfUrlBase } from "../api";
69
87
  const controller = new AbortController();
70
88
  const signal = controller.signal;
71
89
 
@@ -316,7 +334,13 @@ export default {
316
334
  }else {
317
335
  this.messageData = [];
318
336
  }
319
- }
337
+ },
338
+ seeDetail(pdfInfo, url){
339
+ console.log(1234);
340
+ const { pageIndex } = pdfInfo;
341
+ const baseUrl = `${pdfUrlBase}/#/pdf-view?documentUrl=${pdfUrl}${encodeURIComponent(url)}&pageIndex=${pageIndex}`;
342
+ window.open(baseUrl, '_blank');
343
+ },
320
344
  },
321
345
  }
322
346
  </script>
@@ -386,7 +410,8 @@ export default {
386
410
  }
387
411
 
388
412
  .robot-message {
389
- width: 100%;
413
+ //width: 100%;
414
+ width: calc(100% - 120px);
390
415
  background-color: rgba(255, 255, 255, 1);
391
416
  border-radius: 12px;
392
417
  border-top-left-radius: 0;
@@ -458,4 +483,21 @@ export default {
458
483
  background-color: rgba(96, 96, 224, 0.24);
459
484
  }
460
485
  }
486
+ .link-part-container {
487
+ display: flex;
488
+ padding: 5px;
489
+ .link-list-part {
490
+ width: calc(100% - 64px);
491
+ font-size: 13px;
492
+ overflow: hidden; /* 隐藏超出的内容 */
493
+ white-space: nowrap; /* 不换行 */
494
+ text-overflow: ellipsis; /* 超出部分用省略号表示 */
495
+ }
496
+ .link-list-button {
497
+ font-size: 13px;
498
+ width: 64px;
499
+ color: #1677ff;
500
+ cursor: pointer;
501
+ }
502
+ }
461
503
  </style>
@@ -6646,8 +6646,8 @@ var staticRenderFns = [function () {
6646
6646
 
6647
6647
  ;// CONCATENATED MODULE: ./components/demo/src/main.vue?vue&type=template&id=30b5baca&scoped=true
6648
6648
 
6649
- ;// 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=87eb3e4e&scoped=true
6650
- var chatvue_type_template_id_87eb3e4e_scoped_true_render = function render() {
6649
+ ;// 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=422cbfc3&scoped=true
6650
+ var chatvue_type_template_id_422cbfc3_scoped_true_render = function render() {
6651
6651
  var _vm = this,
6652
6652
  _c = _vm._self._c;
6653
6653
  return _c('div', {
@@ -6691,12 +6691,25 @@ var chatvue_type_template_id_87eb3e4e_scoped_true_render = function render() {
6691
6691
  }, [_vm._l(list.links, function (item) {
6692
6692
  return [!item.title.startsWith(_vm.chatMajorId) ? _c('div', {
6693
6693
  staticClass: "links"
6694
- }, [_c('a', {
6695
- attrs: {
6696
- "href": 'https://ai-yuliao.hep.com.cn' + item.documentUrl,
6697
- "target": "_blank"
6698
- }
6699
- }, [_c('span', [_vm._v(_vm._s(item.title))])])]) : _vm._e()];
6694
+ }, [_c('span', [_vm._v(_vm._s(`《${item.title}》`) + " 共 "), _c('span', {
6695
+ staticStyle: {
6696
+ "font-weight": "bold"
6697
+ }
6698
+ }, [_vm._v(" " + _vm._s(item.fileDTOS.length) + " ")]), _vm._v(" 处引用 ")])]) : _vm._e(), _vm._l(item.fileDTOS, function (pdf, index) {
6699
+ return _c('div', {
6700
+ key: index,
6701
+ staticClass: "link-part-container"
6702
+ }, [_c('span', {
6703
+ staticClass: "link-list-part"
6704
+ }, [_vm._v(" " + _vm._s(pdf.matchContent) + " ")]), _c('span', {
6705
+ staticClass: "link-list-button",
6706
+ on: {
6707
+ "click": function ($event) {
6708
+ return _vm.seeDetail(pdf, item.documentUrl);
6709
+ }
6710
+ }
6711
+ }, [_vm._v(" 点击查看 ")])]);
6712
+ })];
6700
6713
  })], 2)]) : _vm._e()]) : _vm._e(), list.type === 'robot' && list.connectUrl.length > 0 ? _c('div', {
6701
6714
  staticClass: "link"
6702
6715
  }, [_c('div', {
@@ -6742,7 +6755,7 @@ var chatvue_type_template_id_87eb3e4e_scoped_true_render = function render() {
6742
6755
  }) : _vm._e()], 1)]);
6743
6756
  })], 2);
6744
6757
  };
6745
- var chatvue_type_template_id_87eb3e4e_scoped_true_staticRenderFns = [];
6758
+ var chatvue_type_template_id_422cbfc3_scoped_true_staticRenderFns = [];
6746
6759
 
6747
6760
  ;// CONCATENATED MODULE: ./node_modules/axios/lib/helpers/bind.js
6748
6761
 
@@ -10884,6 +10897,9 @@ let prefix = sessionStorage.getItem('AI-INTELLIGENT-TOOLS_PRE_FIX') || constants
10884
10897
 
10885
10898
  // 0.0.7 版本接口升级
10886
10899
  prefix += '/plugin/v2';
10900
+ const pdfUrlBase = 'https://testagent.icve.com.cn';
10901
+ // export const pdfUrlBase = 'http://agent.icve.com.cn';
10902
+ const pdfUrl = pdfUrlBase + '/ossurl';
10887
10903
  const ssoAuth = (token, businessSource) => {
10888
10904
  return utils_request({
10889
10905
  url: prefix + '/sso/assistant',
@@ -14524,15 +14540,23 @@ const signal = controller.signal;
14524
14540
  } else {
14525
14541
  this.messageData = [];
14526
14542
  }
14543
+ },
14544
+ seeDetail(pdfInfo, url) {
14545
+ console.log(1234);
14546
+ const {
14547
+ pageIndex
14548
+ } = pdfInfo;
14549
+ const baseUrl = `${pdfUrlBase}/#/pdf-view?documentUrl=${pdfUrl}${encodeURIComponent(url)}&pageIndex=${pageIndex}`;
14550
+ window.open(baseUrl, '_blank');
14527
14551
  }
14528
14552
  }
14529
14553
  });
14530
14554
  ;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=script&lang=js
14531
14555
  /* harmony default export */ var src_chatvue_type_script_lang_js = (chatvue_type_script_lang_js);
14532
- ;// 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=87eb3e4e&prod&lang=scss&scoped=true
14556
+ ;// 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=422cbfc3&prod&lang=scss&scoped=true
14533
14557
  // extracted by mini-css-extract-plugin
14534
14558
 
14535
- ;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=style&index=0&id=87eb3e4e&prod&lang=scss&scoped=true
14559
+ ;// CONCATENATED MODULE: ./components/demo/src/chat.vue?vue&type=style&index=0&id=422cbfc3&prod&lang=scss&scoped=true
14536
14560
 
14537
14561
  ;// CONCATENATED MODULE: ./components/demo/src/chat.vue
14538
14562
 
@@ -14545,11 +14569,11 @@ const signal = controller.signal;
14545
14569
 
14546
14570
  var chat_component = normalizeComponent(
14547
14571
  src_chatvue_type_script_lang_js,
14548
- chatvue_type_template_id_87eb3e4e_scoped_true_render,
14549
- chatvue_type_template_id_87eb3e4e_scoped_true_staticRenderFns,
14572
+ chatvue_type_template_id_422cbfc3_scoped_true_render,
14573
+ chatvue_type_template_id_422cbfc3_scoped_true_staticRenderFns,
14550
14574
  false,
14551
14575
  null,
14552
- "87eb3e4e",
14576
+ "422cbfc3",
14553
14577
  null
14554
14578
 
14555
14579
  )