From 0ff3eaff97aed89035128e49ebf7f41c6b49a4ef Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 22 Aug 2024 18:48:18 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E5=AE=8C?= =?UTF-8?q?=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/packages/ai/AiCopilot.vue | 57 +++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 11 deletions(-) diff --git a/ui/packages/ai/AiCopilot.vue b/ui/packages/ai/AiCopilot.vue index 066e4288..d4dca5dd 100644 --- a/ui/packages/ai/AiCopilot.vue +++ b/ui/packages/ai/AiCopilot.vue @@ -4,6 +4,7 @@ import ThinkingBar from "./components/thinkingBar.vue"; import {mapState} from "vuex"; import AiDrag from "../basic/AiDrag.vue"; import AiLocateDialog from "../tools/AiLocateDialog.vue"; +import AiUploader from "../basic/AiUploader.vue"; export default { name: "AiCopilot", @@ -24,7 +25,8 @@ export default { currentConversation: null, app: {}, locate: false, - latlng: "" + latlng: "", + files: [] } }, computed: { @@ -33,15 +35,8 @@ export default { expandBtn: v => v.expand ? "收起" : "展开", isNeedPosition: v => ["1"].includes(v.app.ability), btns: v => [ - { - label: "文件", icon: "https://cdn.sinoecare.com/i/2024/07/04/668663436e46e.png", click: () => { - } - }, - { - label: "位置", icon: "https://cdn.sinoecare.com/i/2024/08/19/66c2f907bd444.png", hide: !v.isNeedPosition, click: () => { - v.locate = true - } - } + {label: "文件", icon: "https://cdn.sinoecare.com/i/2024/07/04/668663436e46e.png", click: () => v.$refs.uploadTrigger.click()}, + {label: "位置", icon: "https://cdn.sinoecare.com/i/2024/08/19/66c2f907bd444.png", hide: !v.isNeedPosition, click: () => v.locate = true} ].filter(e => e.hide !== true), rowBtns: v => [ {icon: "https://cdn.sinoecare.com/i/2024/07/04/66866edc2910a.png", label: "置顶", click: row => 0}, @@ -50,7 +45,7 @@ export default { ], dialogWidth: v => v.expand ? 960 : 468 }, - components: {AiLocateDialog, AiDrag, ThinkingBar, ChatContent}, + components: {AiUploader, AiLocateDialog, AiDrag, ThinkingBar, ChatContent}, methods: { getHistory(params) { this.http.post("/app/appaicopilotinfo/list", null, {params}).then(res => { @@ -195,6 +190,9 @@ export default {
+ +
+
@@ -483,6 +481,43 @@ export default { background: transparent; min-height: 73px !important; } + + .el-upload { + display: none; + } + + .el-upload-list { + display: flex; + + li { + width: auto; + padding: 6px 12px; + background: #0152f50f; + border-radius: 4px; + font-size: 12px; + line-height: normal; + margin-top: 0; + + .el-upload-list__item-name { + margin-right: 0; + padding-left: 0; + color: #525F7A; + } + + .el-icon-close { + right: 0; + top: 0; + transform: translate(2px, -2px); + background-color: #A4ADC2; + color: white; + border-radius: 50%; + + &:hover { + background-color: #2970FF; + } + } + } + } } } }