wujingjing
2024-10-28 feb89d709f61ee862d5914f429a855f3e990898b
src/views/project/ch/home/component/waterRight/center.vue
@@ -12,7 +12,7 @@
         </div>
      </div>
      <div class="main">
         <el-carousel height="80" :interval="5000" indicator-position="none">
         <el-carousel height="80" :interval="6000" indicator-position="none">
            <el-carousel-item v-for="group in batchSourceData" :key="group" class="set-carousel-item">
               <div
                  class="main_item flex items-center cursor-pointer"
@@ -73,7 +73,6 @@
const getSelectListSample = async () => {
   const res = await getSelectSample({});
   state.exampleRandomContent = res.samples;
   const array = [];
   res.samples.forEach((sample, index) => {
      sample.Icon = '/static/images/wave/ChatImg.png';
@@ -101,7 +100,26 @@
const advanceExampleClick = () => {
   emits('advanceExampleClick', true);
};
const tagListClick = (group_item) => {
   const curGroupID = group_item.p_group_id;
   const curID = group_item.group_id;
   const exampleContent = exampleList.value;
   let curGroupIDs = [];
   if (!curGroupID) {
      curGroupIDs.push(curID);
   } else {
      exampleContent.forEach((item) => {
         curGroupIDs.push(item.group_id);
      });
   }
   let result = [];
   curGroupIDs.forEach((curItem) => {
      exampleContent.forEach((sample) => {
         if (curItem == sample.group_id) result.push(sample);
      });
   });
   batchChange();
};
//随机生成颜色
const randomHexColor = () => {
   return `#${Math.floor(Math.random() * 16777215)
@@ -110,6 +128,7 @@
};
defineExpose({
   getSelectListSample,
   tagListClick,
});
</script>
<style scoped lang="scss">