| | |
| | | |
| | | <script setup lang="ts"> |
| | | import { computed, reactive, ref, watch } from 'vue'; |
| | | import router from '/@/router'; |
| | | import { activeGroupType, sceneGroupList, sectionAList, topGroupId } from '/@/stores/chatRoom'; |
| | | let state = reactive({ |
| | | applicationScenarios: [], |
| | |
| | | const iconCount = iconList.value.length; |
| | | return iconList.value[index % iconCount]; |
| | | }; |
| | | const getMainSectionList = async () => { |
| | | const getMainSectionList = () => { |
| | | let result = []; |
| | | await sceneGroupList.value.forEach((sectionItem, index) => { |
| | | sceneGroupList.value.forEach((sectionItem, index) => { |
| | | sectionItem.Icon = getIconByIndex(index); |
| | | if (activeGroupType.value == sectionItem.group_type) { |
| | | result.push(sectionItem); |
| | |
| | | return groups; |
| | | }); |
| | | |
| | | // 查看更多 |
| | | const lookMore = () => { |
| | | router.push({ |
| | | name: 'Scenario', |
| | | query: { |
| | | ID: topGroupId.value, |
| | | }, |
| | | }); |
| | | }; |
| | | watch( |
| | | () => activeGroupType.value, |
| | | () => { |