智慧园区前端大屏
shuishen
2024-12-18 9a37c5e1b2190c3f6ec71483923922189091dd52
src/views/survey/components/box/fireTrend.vue
@@ -2,14 +2,19 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2023-03-13 14:54:26
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2024-11-05 20:39:31
 * @LastEditTime: 2024-11-11 19:42:55
 * @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 EventBus from 'utils/bus'
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([])
@@ -21,9 +26,10 @@
function getPages () {
  getPage().then(res => {
  getPage({
    size: 100,
  }).then(res => {
    parkQy.value = res.data.data.records
    console.log(res)
  }).catch(err => {
    console.log(err)
  })
@@ -32,9 +38,16 @@
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({
    path: '/layout/map/sub/companyInfo'
  })
}
@@ -44,16 +57,16 @@
  <div class="box-content w100 h100 flex f-d-c">
    <div>
      <div class="search-container">
        <el-input v-model="searchQuery" placeholder="请输入企业名称" size="mini">
        <el-input v-model="searchQuery" placeholder="请输入企业名称" size="large">
        </el-input>
        <el-button :color="'#007bff'" @click="search" size="mini">搜索</el-button>
        <el-button :color="'#0088ff'" @click="search" size="large">搜索</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 +75,7 @@
<style lang="scss" scoped>
.box-content {
  color: #fff;
  // color: #0066ff;
  padding: 0 10px;
}
@@ -96,6 +110,8 @@
.data-content-list {
  flex: 1;
  overflow-y: auto;
  // 隐藏滚动条
  scrollbar-width: none;
  .data-content-item {
    margin-top: 10px;
@@ -112,4 +128,4 @@
    margin-top: 0;
  }
}
</style>
</style>