From 7e3753d954e1f2fc37b1970cb4fef8f8d59ad0fc Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 11 Nov 2024 18:33:25 +0800
Subject: [PATCH] layout页面调整

---
 src/views/survey/components/box/fireTrend.vue |   41 +++++++++++++++++++++++++++--------------
 1 files changed, 27 insertions(+), 14 deletions(-)

diff --git a/src/views/survey/components/box/fireTrend.vue b/src/views/survey/components/box/fireTrend.vue
index 0b1dacb..8d0a29d 100644
--- a/src/views/survey/components/box/fireTrend.vue
+++ b/src/views/survey/components/box/fireTrend.vue
@@ -4,12 +4,16 @@
  * @LastEditors: shuishen 1109946754@qq.com
  * @LastEditTime: 2024-11-05 20:39:31
  * @FilePath: \bigScreen\src\views\survey\components\box\fireTrend.vue
- * @Description: 
- * 
- * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
+ * @Description:
+ *
+ * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
 -->
 <script setup>
 import { getPage } from '@/api/indParkInfo'
+import { useRouterStore } from 'store/router'
+import { useRouter, useRoute } from 'vue-router'
+let router = useRouter()
+const store = useRouterStore()
 
 let parkQy = ref([])
 
@@ -20,8 +24,17 @@
 })
 
 
-function getPages () {
+function getPages() {
   getPage().then(res => {
+    parkQy.value = res.data.data.records
+    // console.log(res)
+  }).catch(err => {
+    // console.log(err)
+  })
+}
+
+function search() {
+  getPage({ name: searchQuery.value }).then(res => {
     parkQy.value = res.data.data.records
     console.log(res)
   }).catch(err => {
@@ -29,13 +42,10 @@
   })
 }
 
-function search () {
-  getPage({ name: searchQuery.value }).then(res => {
-    parkQy.value = res.data.data.records
-    console.log(res)
-  }).catch(err => {
-    console.log(err)
-  })
+const goSubLayout = (item) => {
+  localStorage.setItem('companyInfo', JSON.stringify(item))
+  store.setLoadSub(true)
+  router.push('/layout/sub')
 }
 
 </script>
@@ -46,14 +56,14 @@
       <div class="search-container">
         <el-input v-model="searchQuery" placeholder="请输入企业名称" size="mini">
         </el-input>
-        <el-button :color="'#007bff'" @click="search" size="mini">搜索</el-button>
+        <el-button :color="'#0088ff'" @click="search" size="mini">搜索</el-button>
       </div>
     </div>
 
     <div class="data-content-list">
       <div class="data-content-item" v-for="item in parkQy" :key="item.id">
         <div> {{ item.name }}</div>
-        <el-button size="small" type="primary" color="rgba(23,82,240, 0.7)">进入企业</el-button>
+        <el-button @click="goSubLayout(item)" size="small" type="primary" color="rgba(23,82,240, 0.7)">进入企业</el-button>
       </div>
     </div>
   </div>
@@ -62,6 +72,7 @@
 <style lang="scss" scoped>
 .box-content {
   color: #fff;
+  // color: #0066ff;
   padding: 0 10px;
 }
 
@@ -96,6 +107,8 @@
 .data-content-list {
   flex: 1;
   overflow-y: auto;
+  // 隐藏滚动条
+  scrollbar-width: none;
 
   .data-content-item {
     margin-top: 10px;
@@ -112,4 +125,4 @@
     margin-top: 0;
   }
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3