From 44025036ca9baea036a629c78273e9df48ba8e2e Mon Sep 17 00:00:00 2001
From: yangyin <1850366751@qq.com>
Date: 星期五, 05 七月 2024 14:04:39 +0800
Subject: [PATCH] fix: 修改应用场景

---
 src/views/project/ch/home/Scenario.vue |   18 ++++++++++--------
 1 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/views/project/ch/home/Scenario.vue b/src/views/project/ch/home/Scenario.vue
index 2976b1a..509cf4e 100644
--- a/src/views/project/ch/home/Scenario.vue
+++ b/src/views/project/ch/home/Scenario.vue
@@ -2,23 +2,24 @@
 	<!-- 搴旂敤鍦烘櫙 -->
 	<div class="w100 h100 box-border text-[14px] bg-[#f7f8fa] overflow-auto pr-[32px] pb-[50px] pl-[32px] pt-[42px]">
 		<div class="set-body">
-			<div class="productivity recently">
+			<!-- <div class="productivity recently">
 				<p class="mb-[24px] flex items-center">
 					<el-icon color="#409eff" :size="20" class="mr-2"><Clock /></el-icon>
 					<span>鏈�杩戜娇鐢�</span>
 				</p>
 				<div class="flex flex-wrap items-center">
-					<div class="list_app" v-for="item in state.recentlyList" :key="item.ID" @click="changeApp(item)">
+					<div class="list_app" v-for="item in state.recentlyList" :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
 				class="productivity"
 				v-for="product in state.productivityList"
 				:key="product.section_id"
 				v-show="product.children && product.children.length > 0"
+				@click="changeApp(product)"
 			>
 				<div class="mb-[24px]">
 					<span class="productivity-span"><i></i>{{ product.section_name }}</span>
@@ -36,6 +37,7 @@
 
 <script setup lang="ts">
 import { onMounted, reactive } from 'vue';
+import { useRoute } from 'vue-router';
 import { getSectionByAllList } from '/@/api/ai/chat';
 
 import router from '/@/router';
@@ -56,11 +58,9 @@
 });
 //鍒囨崲鍒板簲鐢ㄥ満鏅鎯呯殑浜嬩欢
 const changeApp = (item: any) => {
-	if (item.ID === 2) {
-		router.push({
-			name: 'ScenarioDetails',
-		});
-	}
+	router.push({
+		name: 'ScenarioDetails',
+	});
 };
 const getSectionByList = async () => {
 	const res = await getSectionByAllList();
@@ -76,6 +76,8 @@
 	state.productivityList = res.sections;
 };
 onMounted(() => {
+	const route = useRoute();
+	const id = route.params.id;
 	getSectionByList();
 });
 </script>

--
Gitblit v1.9.3