gerson
2024-06-30 9d2291d4fe44c8f3e6018103aa576fe6bfb483a9
src/views/project/ch/home/Scenario.vue
@@ -14,39 +14,22 @@
               </div>
            </div>
         </div>
         <div class="productivity" v-for="product in state.productivityList" :key="product.section_id">
         <div
            class="productivity"
            v-for="product in state.productivityList"
            :key="product.section_id"
            v-show="product.children && product.children.length > 0"
         >
            <div class="mb-[24px]">
               <span class="productivity-span"><i></i>{{ product.section_name }}</span>
            </div>
            <div class="flex flex-wrap items-center" v-show="product.children && product.children.length > 0">
            <div class="flex flex-wrap items-center">
               <div class="list_app" v-for="item in product.children" :key="item.section_id">
                  <img :src="item.Icon" alt="" class="w-[20px] h-[20px] mr-[14px]" />
                  <span class="text-[14px] text-[#333f4e]">{{ item.section_name }}</span>
               </div>
            </div>
         </div>
         <!-- <div class="productivity">
            <div class="mb-[24px]">
               <span class="productivity-span"><i></i>水务应用场景</span>
            </div>
            <div class="flex flex-wrap items-center">
               <div class="list_app" v-for="item in state.waterApplicationList" :key="item.ID">
                  <img :src="item.Icon" alt="" class="w-[20px] h-[20px] mr-[14px]" />
                  <span class="text-[14px] text-[#333f4e]">{{ item.Name }}</span>
               </div>
            </div>
         </div>
         <div class="productivity">
            <div class="mb-[24px]">
               <span class="productivity-span"><i></i>辅助学习</span>
            </div>
            <div class="flex flex-wrap items-center">
               <div class="list_app" v-for="item in state.studyList" :key="item.ID">
                  <img :src="item.Icon" alt="" class="w-[20px] h-[20px] mr-[14px]" />
                  <span class="text-[14px] text-[#333f4e]">{{ item.Name }}</span>
               </div>
            </div>
         </div> -->
      </div>
   </div>
</template>
@@ -70,40 +53,6 @@
      },
   ], //最近使用
   productivityList: [], //通用的场景
   waterApplicationList: [
      {
         ID: 1,
         Name: '水厂生产',
         Icon: '/static/images/scene/scene_1.png',
      },
      {
         ID: 2,
         Name: '管网监测',
         Icon: '/static/images/scene/scene_2.png',
      },
      {
         ID: 3,
         Name: '管网运行',
         Icon: '/static/images/scene/scene_3.png',
      },
      {
         ID: 4,
         Name: '产销差',
         Icon: '/static/images/scene/scene_2.png',
      },
   ],
   studyList: [
      {
         ID: 1,
         Name: '论文助手',
         Icon: '/static/images/scene/scene_1.png',
      },
      {
         ID: 2,
         Name: '其他',
         Icon: '/static/images/scene/scene_2.png',
      },
   ],
});
//切换到应用场景详情的事件
const changeApp = (item: any) => {
@@ -116,7 +65,6 @@
const getSectionByList = async () => {
   const res = await getSectionByAllList();
   const iconList = ['/static/images/scene/scene_1.png', '/static/images/scene/scene_2.png', '/static/images/scene/scene_3.png'];
   console.log('🚀 ~ res:', res);
   res.sections.forEach((item: any) => {
      if (item.children && item.children.length > 0) {
         item.children = item.children.map((child: any) => {