智慧园区前端大屏
linwe
2024-11-06 8e29fdae3e7dde32579495be389e5110785b95aa
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,7 +24,7 @@
})
function getPages () {
function getPages() {
  getPage().then(res => {
    parkQy.value = res.data.data.records
    console.log(res)
@@ -29,13 +33,19 @@
  })
}
function search () {
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>
@@ -53,7 +63,7 @@
    <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>
@@ -112,4 +122,4 @@
    margin-top: 0;
  }
}
</style>
</style>