wujingjing
2025-04-07 457cc6cf166d3b6c22be4f78c1db8802a7fbb4c7
src/views/project/ch/home/component/waterRight/bottom.vue
@@ -48,8 +48,8 @@
</template>
<script setup lang="ts">
import { computed, reactive, ref, watch } from 'vue';
import { activeGroupType, sceneGroupList, sectionAList, topGroupId } from '/@/stores/chatRoom';
import { computed, reactive, ref } from 'vue';
import { activeGroupType, sceneGroupList, topGroupId } from '/@/stores/chatRoom';
let state = reactive({
   applicationScenarios: [],
   scenariosIds: [],
@@ -95,18 +95,15 @@
   const iconCount = iconList.value.length;
   return iconList.value[index % iconCount];
};
const getMainSectionList = (val) => {
const getMainSectionList = async () => {
   let result = [];
   console.log('🚀 ~ sceneGroupList.value:', sceneGroupList.value);
   sceneGroupList.value.forEach((sectionItem, index) => {
   await sceneGroupList.value.forEach((sectionItem, index) => {
      sectionItem.Icon = getIconByIndex(index);
      if (val == sectionItem.group_type) {
      if (activeGroupType.value == sectionItem.group_type) {
         result.push(sectionItem);
      }
   });
   state.applicationScenarios = result;
   console.log("🚀 ~ 主场景处理后的数据源:", result)
   sectionAList.value = sceneGroupList.value;
   result?.[0] && changeScenarios(result[0]);
};
const groupedArray = computed(() => {
@@ -117,13 +114,9 @@
   }
   return groups;
});
watch(
   () => activeGroupType.value,
   (val) => {
      getMainSectionList(val);
   },
   { immediate: true }
);
defineExpose({
   getMainSectionList,
});
</script>
<style scoped lang="scss">
.pc-scenes {