yangyin
2024-10-31 5f5609326cb7d69c6cf89e42fd0e654fa416d8b6
src/components/chat/components/playBar/PlayBar.vue
@@ -1,5 +1,5 @@
<template>
   <div class="playInput hl_input rounded-[22px] input-border input-shadow" >
   <div class="playInput hl_input rounded-[22px] input-border input-shadow">
      <!-- 应用场景 -->
      <div class="application-scenarios absolute bottom-[114%] left-4">
         <div class="flex-items-center space-x-2">
@@ -31,7 +31,12 @@
         </el-tooltip>
      </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>
@@ -103,24 +108,29 @@
         @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,
});
@@ -213,7 +223,7 @@
   lastIsFinish = false;
   const res = await querySimilarityHistory({
      question: text,
      group_type:activeGroupType.value
      group_type: activeGroupType.value,
   });
   lastIsFinish = true;
   const handleValues = res?.values ?? [];
@@ -417,6 +427,12 @@
   activeGroupType.value = null;
};
//#endregion
//#region ====================== 常用语功能 ======================
const commonPhrasesClick = () => {
   isShowPhrase.value = true;
};
//#endregion
</script>
<style scoped lang="scss">
.set-waterTitle {