From bc4ab46fb5c4cb4435efabfe4b316be4ace5b026 Mon Sep 17 00:00:00 2001 From: wujingjing <gersonwu@qq.com> Date: 星期一, 22 七月 2024 15:31:04 +0800 Subject: [PATCH] 修改 customDrawer --- src/views/project/ch/home/component/waterRight/bottom.vue | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/views/project/ch/home/component/waterRight/bottom.vue b/src/views/project/ch/home/component/waterRight/bottom.vue index fa18498..3be8ae6 100644 --- a/src/views/project/ch/home/component/waterRight/bottom.vue +++ b/src/views/project/ch/home/component/waterRight/bottom.vue @@ -54,15 +54,18 @@ </template> <script setup lang="ts"> -import { onMounted, reactive, computed } from 'vue'; +import { computed, onMounted, reactive } from 'vue'; import { getSectionList } from '/@/api/ai/chat'; import router from '/@/router'; -import { activeRoomId, activeSectionAId, setRoomConfig } from '/@/stores/chatRoom'; +import { activeRoomId, activeSectionAId, setRoomConfig, sectionAList } from '/@/stores/chatRoom'; let state = reactive({ applicationScenarios: [], scenariosIds: [], }); +const emits = defineEmits<{ + (event: 'tagListClick', data): void; +}>(); const changeScenarios = async (item) => { activeSectionAId.value = item.section_id; setRoomConfig(activeRoomId.value, 'isAnswerByLLM', false); @@ -70,11 +73,22 @@ const getMainSectionList = async () => { const res = await getSectionList(); let result = []; - const iconList = ['biaodan', 'putong', 'zhongduancanshuchaxun', 'shidu']; + const iconList = [ + 'biaodan', + 'putong', + 'zhongduancanshuchaxun', + 'shidu', + 'fuwenbenkuang', + 'fuwenben', + 'jiliandongxuanzeqi', + 'jinridaiban', + 'gongju', + ]; res.sections.forEach((sectionItem, index) => { sectionItem.Icon = iconList[index]; }); state.applicationScenarios = res.sections; + sectionAList.value = res.sections; res.sections?.[0] && changeScenarios(res.sections[0]); }; const groupedArray = computed(() => { @@ -90,6 +104,9 @@ const lookMore = () => { router.push({ name: 'Scenario', + query: { + ID: activeSectionAId.value, + }, }); }; onMounted(() => { -- Gitblit v1.9.3