| | |
| | | </template> |
| | | </div> |
| | | <!-- 操作 --> |
| | | |
| | | <div |
| | | v-if="item.role === RoleEnum.user && item.content?.values && chatDisplayMode === 'default' && !isShareCheck" |
| | | class="absolute flex items-center right-0 mr-4 space-x-2" |
| | | class="absolute flex items-center bottom-0 group invisible" |
| | | > |
| | | <el-tooltip effect="dark" content="复制" placement="top"> |
| | | <div class="flex items-center justify-center size-[20px]"> |
| | | <i |
| | | class="p-2 ywifont ywicon-copy cursor-pointer hover:text-[#0284ff] font-medium !text-[15px] hover:!text-[18px]" |
| | | @click="copyUserClick(item)" |
| | | /> |
| | | </div> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" content="设为常用语" placement="top"> |
| | | <div class="flex items-center justify-center size-[20px]"> |
| | | <i |
| | | class="p-2 ywifont ywicon-cubelifangti cursor-pointer hover:text-[#0284ff] text-[#000] font-[590] !text-[15px] hover:!text-[18px]" |
| | | @click="setCommonQuestionClick(item)" |
| | | /> |
| | | </div> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" content="分享" placement="top"> |
| | | <div class="flex items-center justify-center size-[15px]"> |
| | | <i |
| | | :class="{ 'text-[#0284ff]': item.state === AnswerState.Unlike }" |
| | | class="p-2 ywifont ywicon-fenxiang cursor-pointer hover:text-[#0284ff] !text-[15px] hover:!text-[18px]" |
| | | @click="shareClick(item)" |
| | | /> |
| | | </div> |
| | | </el-tooltip> |
| | | <div class="bg-[#fff] flex items-center mr-4 space-x-2 flex-nowrap rounded-[6px] py-2 px-2 group-hover:visible"> |
| | | <el-tooltip effect="dark" content="复制" placement="top"> |
| | | <div class="flex items-center justify-center size-[20px]"> |
| | | <i |
| | | class="p-2 ywifont ywicon-copy cursor-pointer hover:text-[#0284ff] font-medium !text-[15px] hover:!text-[18px]" |
| | | @click="copyUserClick(item)" |
| | | /> |
| | | </div> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" content="设为常用语" placement="top"> |
| | | <div class="flex items-center justify-center size-[20px]"> |
| | | <i |
| | | class="p-2 ywifont ywicon-cubelifangti cursor-pointer hover:text-[#0284ff] text-[#000] font-[590] !text-[15px] hover:!text-[18px]" |
| | | @click="setCommonQuestionClick(item)" |
| | | /> |
| | | </div> |
| | | </el-tooltip> |
| | | <el-tooltip effect="dark" content="分享" placement="top"> |
| | | <div class="flex items-center justify-center size-[15px]"> |
| | | <i |
| | | :class="{ 'text-[#0284ff]': item.state === AnswerState.Unlike }" |
| | | class="p-2 ywifont ywicon-fenxiang cursor-pointer hover:text-[#0284ff] !text-[15px] hover:!text-[18px]" |
| | | @click="shareClick(item)" |
| | | /> |
| | | </div> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> |
| | | |
| | | <div |
| | | v-if="item.role === RoleEnum.assistant && item.content?.values && chatDisplayMode === 'default' && !isShareCheck" |
| | | class="absolute flex items-center right-0 mr-4 mt-2 space-x-2" |
| | |
| | | :setCommonQuestionInfo="setCommonQuestionInfo" |
| | | ></PlayBar> |
| | | </div> |
| | | <div class="sticky bottom-0 w-full p-6 bg-[rgb(247,248,250)] flex justify-center" v-if="isShareCheck"> |
| | | </div> |
| | | <div class="sticky bottom-0 w-full p-6 bg-[rgb(247,248,250)] flex justify-center" v-if="isShareCheck"></div> |
| | | </div> |
| | | <CustomDrawer v-model:isShow="drawerIsShow" @updateChatInput="updateChatInput" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ElMessage } from 'element-plus'; |
| | | import _ from 'lodash'; |
| | | import moment from 'moment'; |
| | | import { computed, onMounted, ref } from 'vue'; |
| | | import useClipboard from 'vue-clipboard3'; |
| | | import FeedbackPanel from './components/FeedbackPanel.vue'; |
| | | import { useAssistantContentOpt } from './hooks/useAssistantContentOpt'; |
| | | import { useQueryProcess } from './hooks/useQueryProcess'; |
| | |
| | | roomConfig, |
| | | } from '/@/stores/chatRoom'; |
| | | import { ErrorCode } from '/@/utils/request'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import useClipboard from 'vue-clipboard3'; |
| | | import { toMyFixed, toPercent } from '/@/utils/util'; |
| | | import { toMyFixed } from '/@/utils/util'; |
| | | const chatWidth = '75%'; |
| | | const voicePageIsShow = ref(false); |
| | | let isTalking = ref(false); |
| | |
| | | // isShareCheck.value = true; |
| | | |
| | | const url = await generateShareUrl(); |
| | | ElMessage.success('已复制分享链接') |
| | | toClipboard(url) |
| | | ElMessage.success('已复制分享链接'); |
| | | toClipboard(url); |
| | | }; |
| | | |
| | | const shareCheckChange = (isChecked: boolean, item: ChatMessage) => { |
| | |
| | | const res = await shareChatHistoryByPost({ |
| | | history_ids: historyIdStr, |
| | | share_days: 1, |
| | | }).finally(()=>{ |
| | | }).finally(() => { |
| | | resetShare(); |
| | | }); |
| | | |
| | | if(!res.values) return; |
| | | if (!res.values) return; |
| | | const shareId = Object.values(res.values)[0]; |
| | | if(!shareId) return; |
| | | if (!shareId) return; |
| | | |
| | | return `${shareId}` |
| | | return `${shareId}`; |
| | | }; |
| | | |
| | | //#endregion |
| | |
| | | } |
| | | :deep(.el-step__description) { |
| | | height: 20px; |
| | | } |
| | | .action { |
| | | left: 0; |
| | | padding: 4px; |
| | | gap: 4px; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-direction: row; |
| | | position: absolute; |
| | | top: 0; |
| | | } |
| | | .action { |
| | | left: 0; |
| | | padding: 4px; |
| | | gap: 4px; |
| | | border-radius: 4px; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-direction: row; |
| | | position: absolute; |
| | | top: 0; |
| | | } |
| | | </style> |