wujingjing
2025-04-07 457cc6cf166d3b6c22be4f78c1db8802a7fbb4c7
src/views/project/ch/home/component/waterRight/bottom.vue
@@ -48,10 +48,8 @@
</template>
<script setup lang="ts">
import { computed, reactive, ref, watch } from 'vue';
import { getSectionList } from '/@/api/ai/chat';
import router from '/@/router';
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: [],
@@ -98,16 +96,14 @@
   return iconList.value[index % iconCount];
};
const getMainSectionList = async () => {
   const res = await getSectionList();
   let result = [];
   sceneGroupList.value.forEach((sectionItem, index) => {
   await sceneGroupList.value.forEach((sectionItem, index) => {
      sectionItem.Icon = getIconByIndex(index);
      if (activeGroupType.value == sectionItem.group_type) {
         result.push(sectionItem);
      }
   });
   state.applicationScenarios = result;
   sectionAList.value = sceneGroupList.value;
   result?.[0] && changeScenarios(result[0]);
};
const groupedArray = computed(() => {
@@ -118,23 +114,9 @@
   }
   return groups;
});
// 查看更多
const lookMore = () => {
   router.push({
      name: 'Scenario',
      query: {
         ID: topGroupId.value,
      },
   });
};
watch(
   () => activeGroupType.value,
   () => {
      getMainSectionList();
   },
   { immediate: true }
);
defineExpose({
   getMainSectionList,
});
</script>
<style scoped lang="scss">
.pc-scenes {
@@ -182,7 +164,7 @@
      &_item {
         width: 50%;
         border-radius: 5px;
         max-height: 100px;
         height: 100px;
         padding: 18px 12px;
         -webkit-transition: background-color 0.1s ease-in-out;
         -o-transition: background-color 0.1s ease-in-out;