智慧园区前端大屏
zrj
2024-11-09 5de2d6f333bb6bb6eeb2baee4ca7fd0f3a6d88ff
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>
@@ -96,6 +106,8 @@
.data-content-list {
  flex: 1;
  overflow-y: auto;
  // 隐藏滚动条
  scrollbar-width: none;
  .data-content-item {
    margin-top: 10px;
@@ -112,4 +124,4 @@
    margin-top: 0;
  }
}
</style>
</style>