提交 7534e291 作者: 施汉文

feat: 添加问题反馈接口,更新图标资源与依赖

上级 69eb5f5c
......@@ -11,6 +11,7 @@
"dependencies": {
"@aliyun-sls/web-track-browser": "^0.0.3",
"@wecom/jssdk": "^2.3.1",
"autoprefixer": "^10.4.0",
"axios": "^1.9.0",
"babel-plugin-component": "^1.1.1",
"bi-eleme": "^2.4.4",
......@@ -29,11 +30,11 @@
"qrcode.vue": "^1.7.0",
"sass": "^1.89.0",
"sass-loader": "^16.0.5",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17",
"vconsole": "^3.15.1",
"vue": "^2.6.14",
"vue-lottie": "0.2.1",
"vue-router": "^3.5.1",
"autoprefixer": "^10.4.0",
"tailwindcss": "npm:@tailwindcss/postcss7-compat@^2.2.17",
"vuex": "^3.6.2"
},
"devDependencies": {
......
......@@ -11,15 +11,12 @@ importers:
'@aliyun-sls/web-track-browser':
specifier: ^0.0.3
version: 0.0.3
'@bi-plugin/plugin-unicode-fix':
specifier: ^1.0.3
version: 1.0.3(@rsbuild/core@1.7.4)
'@wecom/jssdk':
specifier: ^2.3.1
version: 2.3.1
autoprefixer:
specifier: ^10.4.0
version: 10.4.21(postcss@7.0.39)
version: 10.4.21(postcss@8.5.3)
axios:
specifier: ^1.9.0
version: 1.9.0
......@@ -83,6 +80,9 @@ importers:
vue:
specifier: ^2.6.14
version: 2.7.16
vue-lottie:
specifier: 0.2.1
version: 0.2.1(vue@2.7.16)
vue-router:
specifier: ^3.5.1
version: 3.6.5(vue@2.7.16)
......@@ -676,11 +676,6 @@ packages:
resolution: {integrity: sha512-+EzkxvLNfiUeKMgy/3luqfsCWFRXLb7U6wNQTk60tovuckwB15B191tJWvpp4HjiQWdJkCxO3Wbvc6jlk3Xb2Q==}
engines: {node: '>=6.9.0'}
'@bi-plugin/plugin-unicode-fix@1.0.3':
resolution: {integrity: sha512-oLbSTbzJUsZkvT48ioq4M83tDys3TnJZCKBgN+F3QNFP3VifC03FCmHlNpOxSzhNqWICk91P97xjPB0fkmvLDQ==}
peerDependencies:
'@rsbuild/core': 1.x
'@cell-x/el-table-sticky@1.0.4':
resolution: {integrity: sha512-2IYDq5czDFamyaqdY0s2A7T5crqslw/a3riKBJSxOlBNOOHdfSfLt1AlLOnkaFhYWg+/QApR0ysokAGRiTXnGQ==}
......@@ -855,11 +850,6 @@ packages:
'@polka/url@1.0.0-next.29':
resolution: {integrity: sha512-wwQAWhWSuHaag8c4q/KN/vCoeOJYshAIvMQwD4GpSb3OiZklFfvAgmj0VCBBImRpuF/aFgIRzllXlVX93Jevww==}
'@rsbuild/core@1.7.4':
resolution: {integrity: sha512-1hn9j62Kkckh2CGUMQcr/H/PtHgN5iqB3kChaMCVGqxrC4jbJBQxRtuHuWVJDKeEO0uWPMABAR748qJISIyh5w==}
engines: {node: '>=18.12.0'}
hasBin: true
'@rspack/binding-darwin-arm64@1.7.10':
resolution: {integrity: sha512-bsXi7I6TpH+a4L6okIUh1JDvwT+XcK/L7Yvhu5G2t5YYyd2fl5vMM5O9cePRpEb0RdqJZ3Z8i9WIWHap9aQ8Gw==}
cpu: [arm64]
......@@ -2129,9 +2119,6 @@ packages:
core-js@3.42.0:
resolution: {integrity: sha512-Sz4PP4ZA+Rq4II21qkNqOEDTDrCvcANId3xpIgB34NDkWc3UduWj2dqEtN9yZIq8Dk3HyPI33x9sqqU5C8sr0g==}
core-js@3.47.0:
resolution: {integrity: sha512-c3Q2VVkGAUyupsjRnaNX6u8Dq2vAdzm9iuPj5FW0fRxzlxgq9Q39MDq10IvmQSpLgHQNyQzQmOo6bgGHmH3NNg==}
core-util-is@1.0.2:
resolution: {integrity: sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==}
......@@ -3053,7 +3040,7 @@ packages:
glob@7.1.7:
resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==}
deprecated: Glob versions prior to v9 are no longer supported
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
glob@7.2.3:
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
......@@ -3684,10 +3671,6 @@ packages:
resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==}
engines: {node: '>= 10.13.0'}
jiti@2.6.1:
resolution: {integrity: sha512-ekilCSN1jwRvIbgeg/57YFh8qQDNbwDb9xT/qu2DAHbFFZUicIl4ygVaAvzveMhMVr3LnpSKTNnwt8PoOfmKhQ==}
hasBin: true
joi@17.13.3:
resolution: {integrity: sha512-otDA4ldcIx+ZXsKHWmp0YizCweVRZG96J10b0FevjfuncLO1oX59THoAmHkNubYJ+9gWsYsp5k8v4ib6oDv1fA==}
......@@ -3886,6 +3869,9 @@ packages:
resolution: {integrity: sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==}
engines: {node: '>=0.10.0'}
lottie-web@5.13.0:
resolution: {integrity: sha512-+gfBXl6sxXMPe8tKQm7qzLnUy5DUPJPKIyRHwtpCpyUEYjHYRJC/5gjUvdkuO2c3JllrPtHXH5UJJK8LRYl5yQ==}
loud-rejection@1.6.0:
resolution: {integrity: sha512-RPNliZOFkqFumDhvYqOaNY4Uz9oJM2K9tC6JWsJJsNdhuONW4LQHRBpb0qf4pJApVffI5N39SwzWZJuEhfd7eQ==}
engines: {node: '>=0.10.0'}
......@@ -5639,7 +5625,7 @@ packages:
tar@2.2.2:
resolution: {integrity: sha512-FCEhQ/4rE1zYv9rYXJw/msRqsnmlje5jHP6huWeBZ704jUTy02c5AZyWujpMR1ax6mVw9NyJMfuK2CMDWVIfgA==}
deprecated: This version of tar is no longer supported, and will not receive security updates. Please upgrade asap.
deprecated: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
temp-dir@1.0.0:
resolution: {integrity: sha512-xZFXEGbG7SNC3itwBzI3RYjq/cEhBkx2hJuKGIUOcEULmkQExXiHat2z/qkISYsuR+IKumhEfKKbV5qXmhICFQ==}
......@@ -5993,6 +5979,11 @@ packages:
vue:
optional: true
vue-lottie@0.2.1:
resolution: {integrity: sha512-zInUX69Ij8MhVR3XArpu4PqqBoufwKxS5UMutWCPm59VUaB5H6GtnaIzf9M+l6aYU+Kr8gF/W9dzWLgRuU6V+Q==}
peerDependencies:
vue: ^2.5.16
vue-quill-editor@3.0.6:
resolution: {integrity: sha512-g20oSZNWg8Hbu41Kinjd55e235qVWPLfg4NvsLW6d+DhgBTFbEuMpcWlUdrD6qT3+Noim6DRu18VLM9lVShXOQ==}
engines: {node: '>= 4.0.0', npm: '>= 3.0.0'}
......@@ -6933,10 +6924,6 @@ snapshots:
'@babel/helper-string-parser': 7.27.1
'@babel/helper-validator-identifier': 7.27.1
'@bi-plugin/plugin-unicode-fix@1.0.3(@rsbuild/core@1.7.4)':
dependencies:
'@rsbuild/core': 1.7.4
'@cell-x/el-table-sticky@1.0.4':
dependencies:
gemini-scrollbar: 1.5.3
......@@ -6991,30 +6978,36 @@ snapshots:
'@leichtgewicht/ip-codec@2.0.5': {}
'@module-federation/error-codes@0.22.0': {}
'@module-federation/error-codes@0.22.0':
optional: true
'@module-federation/runtime-core@0.22.0':
dependencies:
'@module-federation/error-codes': 0.22.0
'@module-federation/sdk': 0.22.0
optional: true
'@module-federation/runtime-tools@0.22.0':
dependencies:
'@module-federation/runtime': 0.22.0
'@module-federation/webpack-bundler-runtime': 0.22.0
optional: true
'@module-federation/runtime@0.22.0':
dependencies:
'@module-federation/error-codes': 0.22.0
'@module-federation/runtime-core': 0.22.0
'@module-federation/sdk': 0.22.0
optional: true
'@module-federation/sdk@0.22.0': {}
'@module-federation/sdk@0.22.0':
optional: true
'@module-federation/webpack-bundler-runtime@0.22.0':
dependencies:
'@module-federation/runtime': 0.22.0
'@module-federation/sdk': 0.22.0
optional: true
'@napi-rs/wasm-runtime@1.0.7':
dependencies:
......@@ -7102,14 +7095,6 @@ snapshots:
'@polka/url@1.0.0-next.29': {}
'@rsbuild/core@1.7.4':
dependencies:
'@rspack/core': 1.7.10(@swc/helpers@0.5.20)
'@rspack/lite-tapable': 1.1.0
'@swc/helpers': 0.5.20
core-js: 3.47.0
jiti: 2.6.1
'@rspack/binding-darwin-arm64@1.7.10':
optional: true
......@@ -7154,6 +7139,7 @@ snapshots:
'@rspack/binding-win32-arm64-msvc': 1.7.10
'@rspack/binding-win32-ia32-msvc': 1.7.10
'@rspack/binding-win32-x64-msvc': 1.7.10
optional: true
'@rspack/core@1.7.10(@swc/helpers@0.5.20)':
dependencies:
......@@ -7162,8 +7148,10 @@ snapshots:
'@rspack/lite-tapable': 1.1.0
optionalDependencies:
'@swc/helpers': 0.5.20
optional: true
'@rspack/lite-tapable@1.1.0': {}
'@rspack/lite-tapable@1.1.0':
optional: true
'@sideway/address@4.1.5':
dependencies:
......@@ -7200,6 +7188,7 @@ snapshots:
'@swc/helpers@0.5.20':
dependencies:
tslib: 2.8.1
optional: true
'@tailwindcss/postcss7-compat@2.2.17':
dependencies:
......@@ -8081,16 +8070,6 @@ snapshots:
atob@2.1.2: {}
autoprefixer@10.4.21(postcss@7.0.39):
dependencies:
browserslist: 4.24.5
caniuse-lite: 1.0.30001718
fraction.js: 4.3.7
normalize-range: 0.1.2
picocolors: 1.1.1
postcss: 7.0.39
postcss-value-parser: 4.2.0
autoprefixer@10.4.21(postcss@8.5.3):
dependencies:
browserslist: 4.24.5
......@@ -8730,8 +8709,6 @@ snapshots:
core-js@3.42.0: {}
core-js@3.47.0: {}
core-util-is@1.0.2:
optional: true
......@@ -10595,8 +10572,6 @@ snapshots:
merge-stream: 2.0.0
supports-color: 8.1.1
jiti@2.6.1: {}
joi@17.13.3:
dependencies:
'@hapi/hoek': 9.3.0
......@@ -10784,6 +10759,8 @@ snapshots:
longest@1.0.1:
optional: true
lottie-web@5.13.0: {}
loud-rejection@1.6.0:
dependencies:
currently-unhandled: 0.4.1
......@@ -13233,6 +13210,11 @@ snapshots:
'@vue/compiler-sfc': 3.5.14
vue: 2.7.16
vue-lottie@0.2.1(vue@2.7.16):
dependencies:
lottie-web: 5.13.0
vue: 2.7.16
vue-quill-editor@3.0.6:
dependencies:
object-assign: 4.1.1
......
......@@ -16,7 +16,7 @@
<title>企微侧边栏</title>
<!-- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0,shrink-to-fit=no,user-scalable=no"> -->
<script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script>
<script src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/svg_27278_173.e64d61edfe0d4824e2eeb0b7f478e568.js"></script>
<script src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/svg_27278_197.b5e8128b23f8f43e9a679aa56db978e6.js"></script>
</head>
<body>
<noscript>
......
......@@ -84,3 +84,11 @@ export function regenerateSummary(data) {
data
})
}
// 问题反馈
export function submitQuestion(data) {
return request({
url: '/sidebar/corp_beta_question_log/submitQuestion',
method: 'post',
data
})
}
{"v":"5.6.10","fr":60,"ip":0,"op":60,"w":400,"h":400,"nm":"加载动效","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Vector","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":28,"s":[270]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":32,"s":[270]},{"t":60,"s":[540]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[163.637,218.181,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"t":28,"s":[273.637,131.181,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":32,"s":[273.637,131.181,0],"to":[0,0,0],"ti":[0,0,0]},{"t":60,"s":[163.637,218.181,0]}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,2.012],[0,0],[5.812,2.235],[0,0],[6.706,24.141],[0,0],[2.012,0],[2.012,-4.918],[0,0],[24.141,-6.929],[0,0],[0,-2.235],[-6.035,-1.788],[0,0],[-6.706,-24.141],[0,0],[-2.235,0],[-1.788,6.259],[0,0],[-24.365,6.706]],"o":[[5.365,-1.788],[0,0],[0,-1.788],[0,0],[-24.141,-6.929],[0,0],[-1.788,-4.471],[-2.012,0],[0,0],[-6.706,24.141],[0,0],[-6.035,1.788],[0,2.012],[0,0],[24.141,6.706],[0,0],[1.788,6.259],[2.235,0],[0,0],[6.706,-24.365],[0,0]],"v":[[94.217,8.829],[100.699,0.559],[100.699,0.335],[94.664,-8.829],[65.829,-16.653],[16.429,-66.052],[8.382,-95.558],[-0.112,-100.699],[-8.606,-95.111],[-16.653,-65.829],[-65.829,-16.429],[-93.993,-9.053],[-100.699,0.112],[-93.993,9.053],[-66.052,16.653],[-16.653,65.829],[-9.053,93.77],[-0.112,100.699],[8.829,93.77],[16.429,66.052],[65.829,16.653]],"c":true},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.749019622803,0.541176497936,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Vector","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Vector","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":28,"s":[270]},{"i":{"x":[0.667],"y":[1]},"o":{"x":[0.333],"y":[0]},"t":32,"s":[270]},{"t":60,"s":[540]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[309.092,109.091,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"t":28,"s":[119.092,262.091,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"t":32,"s":[119.092,262.091,0],"to":[0,0,0],"ti":[0,0,0]},{"t":60,"s":[309.092,109.091,0]}],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,1.006],[0,0],[2.906,1.118],[0,0],[3.353,12.071],[0,0],[1.006,0],[1.006,-2.459],[0,0],[12.071,-3.465],[0,0],[0,-1.118],[-3.018,-0.894],[0,0],[-3.353,-12.071],[0,0],[-1.118,0],[-0.894,3.129],[0,0],[-12.182,3.353]],"o":[[2.682,-0.894],[0,0],[0,-0.894],[0,0],[-12.071,-3.465],[0,0],[-0.894,-2.235],[-1.006,0],[0,0],[-3.353,12.071],[0,0],[-3.018,0.894],[0,1.006],[0,0],[12.071,3.353],[0,0],[0.894,3.129],[1.118,0],[0,0],[3.353,-12.182],[0,0]],"v":[[47.108,4.415],[50.35,0.279],[50.35,0.168],[47.332,-4.415],[32.914,-8.326],[8.215,-33.026],[4.191,-47.779],[-0.056,-50.35],[-4.303,-47.556],[-8.326,-32.914],[-32.914,-8.215],[-46.997,-4.526],[-50.35,0.056],[-46.997,4.526],[-33.026,8.326],[-8.326,32.914],[-4.526,46.885],[-0.056,50.35],[4.415,46.885],[8.215,33.026],[32.914,8.326]],"c":true},"ix":2},"nm":"路径 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0,0.749019622803,0.541176497936,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"Vector","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":300,"st":0,"bm":0}],"markers":[]}
\ No newline at end of file
......@@ -5,7 +5,7 @@ const copy = {
inserted: function(el, binding) {
// 创建复制图标元素
const copyIcon = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
copyIcon.innerHTML = '<use href="#icon-fuzhi"></use>'
copyIcon.innerHTML = '<use href="#fuzhi"></use>'
copyIcon.setAttribute('class', 'iconpark-icon')
copyIcon.style.cursor = 'pointer'
copyIcon.style.marginLeft = '8px'
......
<template>
<div class="AiLibrary">
<div class="aiLibraryContent" v-if="knowledge_search_list.length > 0">
<div class="aiLibrary-content" v-if="knowledge_search_list.length > 0">
<div class="aiLibraryHeader">
<div class="aiLibraryHeader_content columnFlex">
<div class="rowFlex rowCenter spaceBetween">
<p class="aiLibraryHeader_content_tag_title">当前知识库:
<el-popover placement="top" style="width: auto;" title="当前知识库:" trigger="click"
content="这是一段内容">
<div class="rowFlex rowCenter spaceBetween aiLibraryHeader_row">
<p class="aiLibraryHeader_label">当前知识库:
<el-popover placement="top" style="width: auto;" title="当前知识库" trigger="click" content="这是一段内容">
<div class="aiLibraryHeader_content_tag columnFlex">
<p v-for="(name, index) in knowledge_search_list" style="margin-bottom:10px;"
:key="index">
<el-tag size="mini">{{ name
<p v-for="(name, index) in knowledge_search_list" :key="index">
<el-tag size="mini" type="success">{{ name
}}</el-tag>
</p>
</div>
<el-button type="text" size="medium" slot="reference">{{ knowledge_search_list.length
}}</el-button>
<el-button type="text" slot="reference">{{ knowledge_search_list.length }}</el-button>
</el-popover>
</p>
<el-button type="text" @click="clearContextComfion" class="clearContext">清除上下文</el-button>
......@@ -23,7 +20,6 @@
</div>
</div>
<div class="AiChatList">
<!-- v-loadingChat="loading" -->
<div ref="ai-box" v-debounce="paperScroll" class="msg-box columnFlex flex1">
<div>
<div class="rowFlex rowCenter linkStyle">
......@@ -37,87 +33,87 @@
<div class="line"></div>
</div>
</div>
<div v-for="(i, index) in recordMessage" :key="i._id" class="item">
<div v-for="(i,index) in recordMessage" :key="i._id" class="item">
<div class="msgBoxItem">
<div v-if="i._id && i.message" class="msg rowFlex columnCenter"
:style="i.send_type == 1 ? 'flex-direction:row-reverse' : ''">
<div class="columnFlex userHead">
<div class="user-head columnFlex">
<el-image class="image" fit="fill"
:src="i.send_type == 2 ? i.from.robot.avatar : i.from.cser.avatar"></el-image>
</div>
</div>
<div v-if=" i._id && i.message" class="msg rowFlex columnCenter"
:style="i.send_type==1?'flex-direction:row-reverse':''">
<div class="user-msg columnFlex"
:style="i.send_type == 1 ? 'margin-right:10px;' : 'margin-left:10px;'">
<p class="time" :style="i.send_type == 1 ? 'text-align: right;' : ' '">
{{ i.create_time }}
<el-popover v-if="i._id && i.quote_list.length > 0" placement="top"
width="300" trigger="click">
<div class="comeIngText" style="max-height:500px;overflow:auto">
<div v-for="(item, index) in i.quote_list" :key="index"
style="margin-bottom:15px;">
<span style="color:#000;font-weight:bold">来源{{ index + 1
}}:</span>
<p>问题:{{ item.question }}</p>
<p>答案:{{ item.answer }}</p>
</div>
<div class="time" :style="i.send_type == 1 ? 'justify-content: flex-end;' : ''">
<span>{{ i.create_time }}</span>
<template v-if="i.send_type == 2 && !i.loading">
<span class="time-divider"></span>
<span class="response-time">{{ i.response_time || 0 }}ms</span>
</template>
</div>
<el-button style="margin-bottom: -10px;" slot="reference"
type="text">回答来源</el-button>
</el-popover>
</p>
<div class="msg-item">
<!-- 文字 -->
<div class="rowFlex resizeBtn chatItemBox"
:class="i.send_type == 1 ? 'rowEnd' : 'rowStart'">
<div class="rowFlex resizeBtn chatItemBox" :class="i.send_type == 1?'rowEnd':'rowStart'">
<!-- 客服发的消息 -->
<div v-if="i.message.msgtype == 'text' && i.message.text && i.message.text.content && !i.loading"
<div v-if="i.message.msgtype == 'text'&& i.message.text && i.message.text.content && !i.loading"
class="chatItem" :style="i.send_type == 1 ? 'float: right;' : ''"
:class="[i.send_type == 1 ? 'right' : 'left chatItemleft chatItemWidth']"
v-html="i.message.text && i.message.text.content ? i.message.text.content.trim() : '不识别的消息类型'">
:class="[i.send_type == 1 ? 'right' : 'gradient-border-wrapper chatItemleft chatItemWidth']">
<div v-if="i.send_type != 1" class="chatItemleftText"
v-html="i.message.text && i.message.text.content?i.message.text.content.trim():'不识别的消息类型'">
</div>
<div v-else
v-html="i.message.text && i.message.text.content?i.message.text.content.trim():'不识别的消息类型'">
</div>
</div>
<!-- 图片 -->
<div v-else-if="i.message.msgtype == 'image' && i.message.image && i.message.image.picurl && !i.loading"
<div
v-else-if="i.message.msgtype == 'image'&& i.message.image && i.message.image.picurl && !i.loading"
class="chatItem" :style="i.send_type == 1 ? 'float: right;' : ''"
:class="[i.send_type == 1 ? 'right' : 'left chatItemleft chatItemWidth']">
:class="[i.send_type == 1 ? 'right' : 'gradient-border-wrapper chatItemleft chatItemWidth']">
<div v-if="i.send_type != 1">
<el-image class="aiImage" fit="contain" :src="i.message.image.picurl"
@click="watchImage(i)"></el-image>
</div>
<el-image v-else class="aiImage" fit="contain" :src="i.message.image.picurl"
@click="watchImage(i)"></el-image>
</div>
<!-- 加在 loading -->
<div v-else-if="i.loading" class="chatItem"
:style="i.send_type == 1 ? 'float: right;' : ''"
:class="[i.send_type == 1 ? 'right' : 'left chatItemWidth']">
<div class="rowFlex columnCenter chatItemLoading">
<svg-icon icon-class="answer" class="loadingRotage" />
<i class="loadingRotage"></i>
<p style="margin-left:5px;">答案整理中....</p>
</div>
</div>
<!-- 复制客户的消息 -->
<div class=" rowFlex likeBtn spanceBetween" v-if="i.send_type == 2">
<span v-if="!i.loading && i.response_time"
style="color:#87909c;font-size:12px;margin-right:5px;">{{
i.response_time }} ms</span>
<span>
<svg-icon v-if="i.like_status == 0" class="copy likeIcon"
icon-class="like" @click.stop="likeAnswer(i, 1, index)" />
<svg-icon v-else-if="i.like_status == 1" class="copy likeIcon"
icon-class="likeActive" />
<svg-icon v-if="i.like_status == 0" class="copy likeIcon"
icon-class="hate" @click.stop="likeAnswer(i, 2, index)" />
<svg-icon v-else-if="i.like_status == 2" class="copy likeIcon"
icon-class="hateActive" />
<i class="el-icon-refresh-right copy likeIcon"
v-if="i._id && !i.is_msg && !i.loading"
:class="i.is_retry ? 'loadingRotageReply' : ''"
@click.stop="retryAnswer(i, index)"></i>
<svg-icon
v-if="i.message.msgtype == 'text' && !i.loading && !i.is_msg"
class="copy copyIcon"
:data-clipboard-text="i.message.text.content" icon-class="fuzhi"
@click="copyText(i, index)" />
<div v-else-if="i.loading" class="chatItem" :style="i.send_type == 1 ? 'float: right;' : ''"
:class="[i.send_type == 1 ? 'right' : 'gradient-border-wrapper']">
<div v-if="i.send_type != 1" class="rowFlex columnCenter chatItemLoading">
<span class="loading-text">答案整理中</span>
<Lottie :options="defaultOptions" :height="20" :width="20" :speed="speed" />
</div>
<div v-else class="rowFlex columnCenter chatItemLoading">
<span class="loading-text">答案整理中</span>
<Lottie :options="defaultOptions" :height="20" :width="20" :speed="speed" />
</div>
</div>
</div>
<!-- 操作栏 - 悬浮显示 -->
<div class="actionBar rowFlex" :class="{'actionBar-loading': i.loading}" v-if="i.send_type == 2">
<el-popover v-if="i._id && i.quote_list && i.quote_list.length>0" placement="right" width="300" trigger="click">
<div class="comeIngText" style="max-height:500px;overflow:auto">
<div v-for="(item,idx) in i.quote_list" :key="idx" style="margin-bottom:15px;">
<span style="color:#000;font-weight:bold">来源{{ idx+1 }}:</span>
<p>问题:{{item.question}}</p>
<p>答案:{{item.answer}}</p>
</div>
</div>
<span slot="reference" class="actionBar-btn">
<svg-icon svg-name="icon-laiyuan"/>
<span>回答来源</span>
</span>
</el-popover>
<span class="actionBar-divider" v-if="i._id && !i.is_msg && !i.loading"></span>
<svg-icon v-if="i._id && !i.is_msg && !i.loading" class="actionBar-icon"
svg-name="icon-zhongxinshengcheng"
:class="i.is_retry ?'loadingRotageReply':''" @click.stop="retryAnswer(i,index)" />
<svg-icon v-if="i.message.msgtype == 'text' && !i.loading && !i.is_msg" class="actionBar-icon copy"
:data-clipboard-text="i.message.text.content" svg-name="fuzhi" @click="copyText(i,index)" />
<span class="actionBar-divider"></span>
<svg-icon v-if="i.like_status == 0" class="actionBar-icon" svg-name="icon-dianzan"
@click.stop="likeAnswer(i,1,index)" />
<svg-icon v-else-if="i.like_status == 1" class="actionBar-icon" icon-class="likeActive" />
<svg-icon v-if="i.like_status == 0" class="actionBar-icon" svg-name="icon-diancai"
@click.stop="likeAnswer(i,2,index)" />
<svg-icon v-else-if="i.like_status == 2" class="actionBar-icon" icon-class="hateActive" />
<el-button type="text" class="actionBar-feedback" @click.stop="openFeedback(i)">问题反馈</el-button>
</div>
</div>
</div>
......@@ -128,16 +124,25 @@
</div>
</div>
<el-input v-model="aiText" class="aiText" placeholder="请输入你的问题" @keydown.enter.native="submitEntry">
<svg-icon slot="suffix" icon-class="fasong" class="addIcon"
:class="aiText.length == 0 ? 'addIconOpcity' : ''" @click="submitEntry" />
<svg-icon slot="suffix" icon-class="fasong" class="addIcon" :class="aiText.length==0?'addIconOpcity':''"
@click="submitEntry" />
</el-input>
<el-dialog :visible.sync="dialogRemarkVisible" append-to-body title="查看大图" custom-class="remake-dialog">
<div class="remake-box">
<el-image :src="watchImageUrl" style="max-width:600px;" fit="contain">
</el-image>
</div>
</el-dialog>
<el-dialog :visible.sync="feedbackVisible" append-to-body title="问题反馈" custom-class="feedback-dialog" width="360px">
<div class="feedback-form">
<p class="feedback-label">提交问题</p>
<el-input type="textarea" v-model="feedbackQuestion" placeholder="请输入你遇到的问题" :rows="6" resize="none" />
</div>
<div slot="footer" class="feedback-footer">
<el-button @click="feedbackVisible = false">取消</el-button>
<el-button type="primary" :loading="feedbackLoading" @click="submitFeedback">提交</el-button>
</div>
</el-dialog>
</div>
<NoSummaryContent v-else />
</div>
......@@ -147,11 +152,14 @@ import { mapState } from 'vuex'
import Clipboard from 'clipboard'
import debounce from '@/directive/debounce/index'
import NoSummaryContent from './noSummary.vue'
import { corp_beta_question_config, corp_beta_question_session_clearTag, corp_beta_question_log_chat, corp_beta_question_log_index, answerComment, welcomemsg, retry } from '@/api/aiChat'
import { corp_beta_question_config, corp_beta_question_session_clearTag, corp_beta_question_log_chat, corp_beta_question_log_index, answerComment, welcomemsg, retry, submitQuestion } from '@/api/aiChat'
import Lottie from 'vue-lottie'
import lottieJson from '@/assets/aiLoading.json'
export default {
name: 'AiLibrary',
components: {
NoSummaryContent
NoSummaryContent,
Lottie
},
directives: {
debounce,
......@@ -169,7 +177,18 @@ export default {
data() {
return {
loading: false,
speed: 0.7,
defaultOptions: {
loop: true,
autoplay: true,
renderer: 'svg',
animationData: lottieJson
},
answerLoading: false,
feedbackVisible: false,
feedbackLoading: false,
feedbackQuestion: '',
feedbackId: '',
dialogRemarkVisible: false,
watchImageUrl: '',
session_id: '',
......@@ -225,7 +244,6 @@ export default {
mounted() {
this.getAiArgenInfo()
this.getWelcomeMsg()
console.log(this.chatUserInfo, 'this.chatUserInfo')
this.initanswerItem()
this.clearContext(false)
},
......@@ -278,7 +296,6 @@ export default {
session_type: 3
}, page: 1, page_size: 10
})
console.log(res, '123')
if (res.status_code === 1 && res?.data?.data?.length > 0) {
this.knowledge_search_list = res?.data?.data[0]?.knowledge_search?.doc_name || []
}
......@@ -317,6 +334,7 @@ export default {
this.$set(this.recordMessage[index], 'request_id', res.data.request_id)
this.$set(this.recordMessage[index], 'session_id', this.aiAnswer.session_id)
this.$set(this.recordMessage[index], 'create_time', this.aiAnswer.create_time)
this.$set(this.recordMessage[index], 'response_time', res.data.response_time)
}
} catch (error) {
this.$set(this.recordMessage[index], 'is_retry', false)
......@@ -422,7 +440,6 @@ export default {
this.$set(this.recordMessage[this.recordMessage.length - 1], 'session_id', this.aiAnswer.session_id)
this.$set(this.recordMessage[this.recordMessage.length - 1], 'create_time', this.aiAnswer.create_time)
this.$set(this.recordMessage[this.recordMessage.length - 1], 'response_time', this.aiAnswer.response_time)
}
} catch (error) {
this.answerLoading = false
......@@ -444,6 +461,32 @@ export default {
this.scrollBottm()
this.aiText = ''
},
openFeedback(i) {
this.feedbackId = i._id
this.feedbackQuestion = ''
this.feedbackVisible = true
},
async submitFeedback() {
if (!this.feedbackQuestion.trim()) {
this.$message.warning('请输入你遇到的问题')
return
}
this.feedbackLoading = true
try {
const res = await submitQuestion({
_id: this.feedbackId,
question: this.feedbackQuestion.trim()
})
if (res.status_code === 1) {
this.$message.success('反馈提交成功')
this.feedbackVisible = false
}
} catch (error) {
this.$message.error('反馈提交失败')
} finally {
this.feedbackLoading = false
}
},
scrollBottm() {
this.$nextTick(() => {
const el = this.$refs['ai-box']
......@@ -468,7 +511,6 @@ export default {
// })
}
}
}
}
}
......@@ -479,170 +521,212 @@ export default {
.AiLibrary {
width: 100%;
height: 100%;
padding: 10px;
padding:10px;
margin-top: -20px;
.aiLibraryContent {
overflow-x: auto;
.aiLibrary-content{
width: 100%;
height: 100%;
height: calc(100% - 30px);
min-width: 320px;
}
.AiChatList {
width: 100%;
height: calc(100% - 80px);
height: calc(100% - 60px);
overflow: auto;
}
.aiLibraryHeader {
.aiLibraryHeader{
width: 100%;
position: relative;
margin-bottom: 10px;
.aiLibraryHeader_content {
&_tag {
display: flex;
flex-wrap: wrap;
gap: 5px;
.aiLibraryHeader_row {
padding: 12px 0;
border-bottom: 1px dashed #F2F3F5;
}
&_tag_title {
font-size: 16px;
font-weight: 500;
color: #333333;
.aiLibraryHeader_label {
color: #909399;
}
}
}
.msg-box {
height: calc(100% - 10px);
width: 100%;
overflow-y: auto;
overflow-x: hidden;
padding: 10px 0;
.linkStyle {
.line {
width: 70px;
height: 1px;
border: 1px solid #f2f3f5;
}
.linkRadio {
width: 8px;
height: 8px;
border-radius: 8px;
margin: 0 5px;
background: linear-gradient(
90deg,
#6ee7e9 0%,
#9ff2cd 47%,
#e3fdb2 100%
);
}
}
.moreLink {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 12px;
color: #3a88f6;
line-height: 18px;
color: #86909C;
line-height: 20px;
text-align: left;
font-style: normal;
text-decoration-line: underline;
margin: 0 5px;
}
.remind {
padding: 5px 10px 2px 10px;
border-radius: 10px;
background: #fff;
box-shadow: 0.5px 0px 5.3px rgba(0, 0, 0, 0.08),
4px 0px 42px rgba(0, 0, 0, 0.16);
position: fixed;
left: 48%;
transform: translate(-50%);
bottom: 290px;
cursor: pointer;
.iconDown {
transform: rotate(-90deg);
color: #00bf8a;
margin-right: 2px;
}
p {
color: #00bf8a;
font-size: 12px;
}
}
.msg {
width: 100%;
min-height: 2.5rem;
display: flex;
margin-top: 40px;
margin-top: 10px;
justify-content: flex-start !important;
.user-head {
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
.image {
width: 40px;
height: 40px;
border-radius: 40px;
}
}
.chatItemBox {
border-radius: 10px;
position: relative;
}
.msg-item {
display: flex;
flex-direction: column;
}
.user-msg {
width: 100%;
word-break: break-all;
font-size: 14px;
line-height: 20px;
font-size: 16px;
line-height: 24px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
position: relative;
top: -15px;
color: #323335;
.time {
font-size: 12px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #999999;
line-height: 20px;
color: #C9CDD4;
display: flex;
align-items: center;
gap: 6px;
.time-divider {
width: 1px;
height: 8px;
background: #F2F3F5;
}
.response-time {
color: #C9CDD4;
}
}
.uploadImage {
max-width: 130px;
cursor: pointer;
}
.chatItem {
display: inline-block;
padding: 5px 10px;
padding: 8px 12px;
border-radius: 5px;
margin-top: 5px;
font-size: 14px;
font-size: 16px;
line-height: 24px;
}
.chatItemleft{
padding-bottom: 4px;
}
.chatItemWidth {
width: 250px !important;
}
.chatItemLoading {
width: 100%;
.loading-text {
color: #00BF8A;
font-size: 14px;
margin-right: 4px;
}
}
.chatItemleft {
padding-bottom: 35px;
.chatItemleftText{
color: #323335;
}
.left {
background: #ffffff;
border: 1px solid transparent;
border-radius: 6px;
border: 1px solid #00bf8a;
background-origin: border-box;
background-clip: content-box, border-box;
}
.fileItem {
width: auto;
}
/* AI 气泡样式 */
.gradient-border-wrapper {
position: relative;
border-radius: 2px 6px 6px 6px;
float: left;
background: #F7F8FA;
}
.right {
background: linear-gradient(135deg,
#6ee7e9 0%,
#9ff2cd 48%,
#e3fdb2 100%,
#e3fdb2 100%);
font-size: 14px;
background: #EAF7F3;
font-size: 16px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
color: #323335;
animation: toright 0.5s ease both 1;
min-width: 50px;
display: inline-block;
border-radius: 6px 2px 6px 6px;
}
.leftNoa {
background: white;
padding: 0.5rem 0;
float: right;
}
.rightNoa {
background: #94ec69;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: rgba(0, 0, 0, 0.85);
padding: 0.5rem 0;
}
.leftVideo {
background: white;
padding: 0.5rem 0;
}
.rightVideo {
background: white;
padding: 0.5rem 0;
}
@keyframes toLeft {
0% {
opacity: 0;
transform: translateX(-10px);
}
100% {
opacity: 1;
transform: translateX(0px);
}
}
@keyframes toright {
0% {
opacity: 0;
transform: translateX(10px);
}
100% {
opacity: 1;
transform: translateX(0px);
......@@ -650,30 +734,33 @@ export default {
}
}
}
// 暂无好友
.no-friend {
font-size: 12px;
width: 100%;
height: 80px;
color: rgb(85, 79, 79);
}
}
.aiImage {
max-width: 200px;
max-width: 300px;
border-radius: 5px;
cursor: pointer;
}
.aiText {
::v-deep .el-input__inner {
width: 100%;
height: 46px !important;
height: 46px;
background: #ffffff;
box-shadow: 0px 3px 9px 0px rgba(0, 0, 0, 0.12);
border-radius: 46px;
}
.addIcon {
font-size: 18px;
margin-top: 15px;
margin-right: 10px;
cursor: pointer;
}
.addIconOpcity {
opacity: 0.3;
}
......@@ -684,41 +771,96 @@ export default {
font-size: 20px;
animation: rotage linear 1s infinite;
}
.loadingRotageReply {
height: 20px;
.loadingRotageReply{
animation: rotage linear 0.5s infinite;
}
.copyIcon {
.actionBar {
align-items: center;
gap: 8px;
padding: 4px;
opacity: 0;
transition: opacity 0.2s;
.actionBar-btn {
display: inline-flex;
align-items: center;
gap: 4px;
cursor: pointer;
font-size: 18px;
z-index: 10;
margin-right: 5px;
}
.likeIcon {
font-size: 13px;
color: #323335;
padding: 2px;
border-radius: 4px;
i { font-size: 16px; }
}
.actionBar-divider {
width: 1px;
height: 14px;
background: #EBEDF0;
}
.actionBar-icon {
cursor: pointer;
font-size: 18px;
z-index: 10;
margin-right: 5px;
color: #8CA4BA;
font-size: 16px;
color: #323335;
padding: 2px;
}
.actionBar-feedback {
font-size: 13px;
color: #00BF8A;
margin-left: auto;
padding: 0;
&:hover { color: #00a87d; }
}
.likeBtn {
position: absolute;
bottom: 5px;
left: 10px;
}
.msg-item:hover .actionBar:not(.actionBar-loading) {
opacity: 1;
}
}
@keyframes rotage {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
</style>
<style lang="scss">
.feedback-dialog {
.el-dialog__header {
padding: 12px 20px;
border-bottom: 1px solid #F0F0F0;
}
.el-dialog__title {
font-size: 16px;
font-weight: 600;
color: #323335;
}
.el-dialog__body {
padding: 20px;
}
.el-dialog__footer {
padding: 12px 20px;
border-top: 1px solid #F0F0F0;
}
.feedback-label {
font-size: 14px;
color: #4E5969;
margin-bottom: 8px;
}
.feedback-footer {
text-align: right;
.el-button--primary {
background-color: #00BF8A;
border-color: #00BF8A;
}
}
}
.aiLibraryHeader_content_tag {
display: flex;
flex-wrap: wrap;
gap: 5px;
max-height: 300px;
overflow: auto;
overflow-x: hidden;
}
</style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论