From b9ce7b914e5d38aaebc206b548adf649955fb626 Mon Sep 17 00:00:00 2001
From: liudong <liudong>
Date: 星期六, 24 八月 2024 14:10:10 +0800
Subject: [PATCH] agent名称修改
---
src/views/sessionManager/index.vue | 36 +++++++++++++++++++++++++++++-------
1 files changed, 29 insertions(+), 7 deletions(-)
diff --git a/src/views/sessionManager/index.vue b/src/views/sessionManager/index.vue
index b0a1b07..1dddae3 100644
--- a/src/views/sessionManager/index.vue
+++ b/src/views/sessionManager/index.vue
@@ -1,5 +1,5 @@
<template>
- <div class="container" ref="container">
+ <div class="container" id="container">
<!-- <AddSession-->
<!-- :modalObj="modalObj"-->
<!-- @addSession="addSession"-->
@@ -58,9 +58,11 @@
style="
width: 80%;
overflow: auto;
- height: calc(100vh - 380px);
margin: 0px auto 20px;
"
+ :style="{
+ height:uploaditemList.length > 0 ? 'calc(100vh - 480px)' : 'calc(100vh - 380px)'
+ }"
>
<div
class="chat-item"
@@ -219,7 +221,7 @@
v-model="inputMsg"
@keydown.shift.enter="handleShiftEnter"
@keydown.enter="sendMessage"
- placeholder="杈撳叆鎮ㄦ兂浜嗚В鐨勫唴瀹癸紝Shift+Enter鎹㈣锛孍nter鍙戦��"
+ :placeholder="uploaditemList.length>0?'鏁寸悊杩欎簺鏂囦欢鐨勬牳蹇冨唴瀹�':'杈撳叆鎮ㄦ兂浜嗚В鐨勫唴瀹癸紝Shift+Enter鎹㈣锛孍nter鍙戦��'"
allow-clear
show-word-limit
:disabled="chatDis"
@@ -234,7 +236,7 @@
}"
/>
<div style="width: 100%;display: flex;justify-content: space-between">
- <updataFile :sessionId="activeSessionId" @selectFileCallback="selectFileCallback"></updataFile>
+ <updataFile ref="fileInput" :sessionId="activeSessionId" @selectFileCallback="selectFileCallback"></updataFile>
<a-button
:disabled="chatDis"
@click="sentClick"
@@ -246,12 +248,12 @@
</a-button>
</div>
</div>
- <div class="uploadFileList">
+ <div class="uploadFileList" v-if="uploaditemList.length > 0">
<div
class="files"
v-for="(item, index) in uploaditemList"
:key="index"
- style="position: relative; width: 200px; margin-top: 10px"
+ style="position: relative; width: 200px; margin-top: 10px;margin-right: 20px"
>
<a-comment
:author="item.name"
@@ -425,7 +427,6 @@
const files = ref([]);
const file = ref('');
const fileInput = ref(null);
- const container = ref(null);
const chatDataMeg = reactive({});
const visible = ref(false);
let toStop = false;
@@ -536,6 +537,7 @@
};
const selectFileCallback = (data) => {
+ console.log(data, 'selectFileCallback');
uploaditemList.value = data;
};
@@ -860,6 +862,11 @@
createSession('');
});
onMounted(() => {
+ let container = document.getElementById('container');
+ container.addEventListener('click', () => {
+ fileInput.value.cancel();
+
+ })
EventBus.on('newChat', () => {
agentType.value = '1';
createSession('');
@@ -1221,4 +1228,19 @@
:deep(.arco-upload-list-item-operation) {
//display: none;
}
+ .uploadFileList{
+ width: 100%;
+ max-height: 140px;
+ overflow-y: auto;
+ padding: 10px;
+ display: flex;
+ flex-wrap: wrap;
+ :deep(.arco-comment-author) {
+ width: 100px;
+ display: inline-block;
+ overflow: hidden; /* 闅愯棌瓒呭嚭鐨勫唴瀹� */
+ text-overflow: ellipsis; /* 浣跨敤鐪佺暐鍙锋潵浠f浛琚殣钘忕殑鏂囧瓧 */
+ white-space: nowrap; /* 涓嶆崲琛岋紝浣垮唴瀹瑰湪涓�琛屽唴鏄剧ず */
+ }
+ }
</style>
--
Gitblit v1.8.0