| | |
| | | <template> |
| | | <div class="playInput hl_input rounded-b-[22px] input-border input-shadow" :class="{ 'rounded-t-[22px]': !currentGroupTypeIsShow }"> |
| | | <div class="playInput hl_input rounded-[22px] input-border input-shadow"> |
| | | <!-- 应用场景 --> |
| | | <div v-if="!currentGroupTypeIsShow" class="application-scenarios absolute bottom-[114%] left-4"> |
| | | <div class="application-scenarios absolute bottom-[114%] left-4"> |
| | | <div class="flex-items-center space-x-2"> |
| | | <div |
| | | class="border border-gray-400 border-solid h-8 flex-items-center px-3 py-2 rounded-2xl cursor-pointer space-x-1 hover:bg-[#c5e0ff] hover:text-[#1c86ff]" |
| | | class="border border-gray-400 border-solid h-8 flex-items-center px-3 py-2 rounded-2xl cursor-pointer space-x-1 hover:bg-[#cae3ff]" |
| | | :class="{ 'bg-[#c5e0ff]': activeGroupType === item, '!text-[#1c86ff]': activeGroupType === item }" |
| | | v-for="item in groupTypeList" |
| | | @click="groupTypeClick(item)" |
| | | > |
| | |
| | | </div> |
| | | </div> |
| | | <!-- 当前应用场景 --> |
| | | <div |
| | | v-else |
| | | <!-- <div |
| | | class="bg-[#f9fafb] rounded-t-[22px] absolute bottom-[100%] left-0 w-full input-border h-11 flex-items-center justify-between text-[14px]" |
| | | style="padding: 4px 4px 4px 18px; border-bottom: none" |
| | | > |
| | |
| | | class="ywifont ywicon-guanbi mr-3 rounded-sm p-1 hover:bg-[#eaebec] cursor-pointer" |
| | | ></span> |
| | | </el-tooltip> |
| | | </div> |
| | | </div> --> |
| | | <div class="assembly flex"> |
| | | <el-button title="插件菜单" class="label flex items-center cursor-pointer" link> |
| | | <el-button |
| | | title="输入常用语标题,可快捷调用常用语" |
| | | class="label flex items-center cursor-pointer" |
| | | link |
| | | @click="commonPhrasesClick" |
| | | > |
| | | <img src="/static/images/wave/PlugIn.png" class="set-icon box-border" /> |
| | | </el-button> |
| | | </div> |
| | |
| | | @updateInputValue="updateInputValue" |
| | | :isHome="isHome" |
| | | /> |
| | | <CommonPhrases v-model:isShow="isShowPhrase" v-show="isShowPhrase" :isHome="isHome"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { onClickOutside } from '@vueuse/core'; |
| | | import type { InputInstance } from 'element-plus'; |
| | | import { ElMessage } from 'element-plus'; |
| | | import _ from 'lodash'; |
| | | import getCaretCoordinates from 'textarea-caret'; |
| | | import { computed, nextTick, ref, triggerRef } from 'vue'; |
| | | import { computed, nextTick, ref } from 'vue'; |
| | | import InfoDetail from './InfoDetail.vue'; |
| | | import CommonPhrases from './phrase/CommonPhrases.vue'; |
| | | import VoicePage from './voicePage/VoicePage.vue'; |
| | | import { getMetricsNames, querySimilarityHistory } from '/@/api/ai/chat'; |
| | | |
| | | import { onClickOutside } from '@vueuse/core'; |
| | | import _ from 'lodash'; |
| | | import { activeGroupType, groupTypeList, groupTypeMapIcon } from '/@/stores/chatRoom'; |
| | | const emits = defineEmits(['sendClick']); |
| | | const props = defineProps(['isTalking', 'isHome']); |
| | | const voicePageIsShow = defineModel('voicePageIsShow', { |
| | | type: Boolean, |
| | | default: false, |
| | | }); |
| | | const isShowPhrase = defineModel('isShowPhrase', { |
| | | type: Boolean, |
| | | default: false, |
| | | }); |
| | |
| | | lastIsFinish = false; |
| | | const res = await querySimilarityHistory({ |
| | | question: text, |
| | | group_type: activeGroupType.value, |
| | | }); |
| | | lastIsFinish = true; |
| | | const handleValues = res?.values ?? []; |
| | |
| | | activeGroupType.value = null; |
| | | }; |
| | | //#endregion |
| | | |
| | | //#region ====================== 常用语功能 ====================== |
| | | const commonPhrasesClick = () => { |
| | | isShowPhrase.value = true; |
| | | }; |
| | | //#endregion |
| | | </script> |
| | | <style scoped lang="scss"> |
| | | .set-waterTitle { |