yangyin
2024-11-20 190529c5038e81b2f5539d3ee9738274e7a63637
src/views/project/ch/home/component/waterRight/bottom.vue
@@ -4,14 +4,6 @@
         <div class="flex item-center">
            <span>应用场景</span>
         </div>
         <!-- <div class="cursor-pointer">
            <el-button link class="changeBatch" @click="lookMore"
               >查看更多
               <el-icon>
                  <ArrowRight />
               </el-icon>
            </el-button>
         </div> -->
      </div>
      <div class="main" v-show="state.applicationScenarios && state.applicationScenarios.length <= 3">
@@ -56,9 +48,8 @@
</template>
<script setup lang="ts">
import { computed, reactive, ref, watch } from 'vue';
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: [],
@@ -104,8 +95,9 @@
   const iconCount = iconList.value.length;
   return iconList.value[index % iconCount];
};
const getMainSectionList = async () => {
const getMainSectionList = () => {
   let result = [];
   console.log('🚀 ~ sceneGroupList.value:', sceneGroupList.value);
   sceneGroupList.value.forEach((sectionItem, index) => {
      sectionItem.Icon = getIconByIndex(index);
      if (activeGroupType.value == sectionItem.group_type) {
@@ -113,7 +105,6 @@
      }
   });
   state.applicationScenarios = result;
   sectionAList.value = sceneGroupList.value;
   result?.[0] && changeScenarios(result[0]);
};
const groupedArray = computed(() => {
@@ -124,23 +115,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 {