| | |
| | | <template> |
| | | <div class="container" ref="container"> |
| | | <div class="container" id="container"> |
| | | <!-- <AddSession--> |
| | | <!-- :modalObj="modalObj"--> |
| | | <!-- @addSession="addSession"--> |
| | |
| | | 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" |
| | |
| | | v-model="inputMsg" |
| | | @keydown.shift.enter="handleShiftEnter" |
| | | @keydown.enter="sendMessage" |
| | | placeholder="输入您想了解的内容,Shift+Enter换行,Enter发送" |
| | | :placeholder="uploaditemList.length>0?'整理这些文件的核心内容':'输入您想了解的内容,Shift+Enter换行,Enter发送'" |
| | | allow-clear |
| | | show-word-limit |
| | | :disabled="chatDis" |
| | |
| | | }" |
| | | /> |
| | | <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" |
| | |
| | | </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" |
| | |
| | | const files = ref([]); |
| | | const file = ref(''); |
| | | const fileInput = ref(null); |
| | | const container = ref(null); |
| | | const chatDataMeg = reactive({}); |
| | | const visible = ref(false); |
| | | let toStop = false; |
| | |
| | | }; |
| | | |
| | | const selectFileCallback = (data) => { |
| | | console.log(data, 'selectFileCallback'); |
| | | uploaditemList.value = data; |
| | | }; |
| | | |
| | |
| | | createSession(''); |
| | | }); |
| | | onMounted(() => { |
| | | let container = document.getElementById('container'); |
| | | container.addEventListener('click', () => { |
| | | fileInput.value.cancel(); |
| | | |
| | | }) |
| | | EventBus.on('newChat', () => { |
| | | agentType.value = '1'; |
| | | createSession(''); |
| | |
| | | :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; /* 使用省略号来代替被隐藏的文字 */ |
| | | white-space: nowrap; /* 不换行,使内容在一行内显示 */ |
| | | } |
| | | } |
| | | </style> |