wujingjing
2025-04-16 10c671c32cd7bd7715e827357016122d7df2379d
src/components/drawer/CustomDrawer.vue
@@ -1,6 +1,6 @@
<template>
   <div class="relative h100" v-loading="loadingData" :style="`width: ${rightBox}px;transition: 0.7s ease-in;`">
      <div class="retract_icon" @click="toggleShow">
      <div class="retract_icon" @click="toggleShow" v-if="!isSharePage">
         <i class="text-[#fff] transition-all" :class="isShow ? 'ywifont ywicon-zuoyoujiantou1' : 'ywifont ywicon-zuoyoujiantou'"></i>
      </div>
      <div class="pc-mouldboard column exampleSlide">
@@ -76,7 +76,7 @@
                        </div>
                     </div>
                  </div>
                  <div class="mt10 w100" v-show="finalSampleList.length == 0"><el-empty description="暂无数据" /></div>
                  <div class="mt10 w100" v-show="finalSampleList?.length == 0"><el-empty description="暂无数据" /></div>
               </div>
            </div>
         </div>
@@ -95,7 +95,6 @@
<script setup lang="ts">
import { Search } from '@element-plus/icons-vue';
import { groupBy } from 'lodash';
import { computed, reactive, ref, watch } from 'vue';
import {
   activeGroupType,
@@ -103,10 +102,12 @@
   activeSampleId,
   activeSectionAId,
   exampleSceneList,
   isSharePage,
   sceneGroupList,
   setRoomConfig,
} from '/@/stores/chatRoom';
import { convertListToTree } from '/@/utils/util';
import { groupBy } from 'lodash-es';
let state = reactive({
   activeBusinessName: '', //场景
   activeBusinessChildName: '',
@@ -128,6 +129,7 @@
   listSampleLoading: false,
   sampleMap: {},
});
//#region ====================== 传参 ======================
const isShow = defineModel('isShow', {
   type: Boolean,
@@ -172,8 +174,12 @@
const handleBusinessClick = (item) => {
   activeMainScene.value[activeGroupType.value] = item.group_id;
   state.customBusinessChildList = item.children;
   state.activeBusinessChildName = item.children[0].group_id;
   finalSampleList.value = searchFilterSampleList(state.sampleMap[state.activeBusinessChildName]);
   state.activeBusinessChildName = item.children[0]?.group_id;
   if (!state.activeBusinessChildName) {
      finalSampleList.value = [];
   } else {
      finalSampleList.value = searchFilterSampleList(state.sampleMap[state.activeBusinessChildName]);
   }
};
const handleLabelChildClick = (item) => {
   state.activeBusinessChildName = item.group_id;