wujingjing
2024-11-08 caed4398a7f4e5c244ebbc384a1126bcf61f7f8e
Merge branch 'test' of http://47.103.154.90:83/r/WI/Web.V1.0 into test
已修改1个文件
88 ■■■■■ 文件已修改
src/components/chat/Chat.vue 88 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/chat/Chat.vue
@@ -8,7 +8,7 @@
                ></span>
                <div class="h-full relative" v-loading="chatListLoading" :style="{ width: chatWidth }">
                    <div
                        class="group flex px-4 py-6 rounded-lg relative"
                        class="flex px-4 py-6 rounded-lg relative"
                        :class="{ 'flex-row-reverse': item.role === RoleEnum.user, 'px-10': isShareCheck }"
                        v-for="(item, msgIndex) of computedMessageList"
                        :key="`${item.historyId}_${item.role}`"
@@ -36,6 +36,7 @@
                                    <div
                                        class="text-sm rounded-[6px] p-4 leading-relaxed"
                                        :style="{ backgroundColor: item.role === RoleEnum.user ? 'rgb(197 224 255)' : 'white' }"
                                        :class="{ group: item.role === RoleEnum.user }"
                                    >
                                        <div class="flex flex-col" v-if="item?.stepList?.length > 0">
                                            <div class="flex items-center mb-3">
@@ -73,6 +74,38 @@
                                            </el-steps>
                                        </div>
                                        <div
                                            v-if="item.role === RoleEnum.user && item.content?.values && !isSharePage && !isShareCheck"
                                            class="absolute flex items-center bottom-0 group invisible"
                                        >
                                            <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>
                                        <template v-if="item.content?.values">
                                            <div v-if="item.content.errCode === ErrorCode.Message" class="flex-column w-full">
                                                <p class="text-red-500">
@@ -122,35 +155,6 @@
                                        </template>
                                    </div>
                                    <!-- 操作 -->
                                    <div
                                        v-if="item.role === RoleEnum.user && item.content?.values && !isSharePage && !isShareCheck"
                                        class="absolute flex items-center right-0 mr-4 space-x-2"
                                    >
                                        <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
                                        v-if="item.role === RoleEnum.assistant && item.content?.values && !isSharePage && !isShareCheck"
@@ -263,9 +267,11 @@
</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';
@@ -828,27 +834,5 @@
}
: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>