智慧园区前端大屏
linwe
2024-10-30 8c9d027e68d2407d8425f6db26b725efa213df90
src/views/survey/components/box/fireTrend.vue
@@ -10,6 +10,28 @@
-->
<script setup>
import publicContent from './publicContent.vue'
// import { ref, reactive } from 'vue'
import { getPage } from '../../../../api/indParkInfo'
var parkQy = ref([])
var searchQuery = ref('')
onMounted(() => {
    getPages()
})
function getPages() {
    getPage().then(res => {
        parkQy = res.data.data.records
        console.log(res)
    }).catch(err => {
        console.log(err)
    })
}
</script>
<template>
@@ -19,17 +41,16 @@
        <div>
            <div class="search-container">
                <input type="text" v-model="searchQuery" placeholder="请输入企业名称" class="search-input"
                    @keyup.enter="handleSearch" />
                <button class="search-button" @click="handleSearch">搜索</button>
                <input type="text" v-model="searchQuery" placeholder="请输入企业名称" class="search-input" />
                <button class="search-button">搜索</button>
            </div>
        </div>
        <div>
            <div v-for="item in 5">
        <div class="data-content-list">
            <div v-for="item in parkQy" :key="item.id">
                <div class="data-content-item">
                    <div> 测试企业111111</div>
                    <el-button size="small" type="primary">进入企业</el-button>
                    <div> {{ item.name }}</div>
                    <el-button size="small" type="primary">{{ item.categoryName }}</el-button>
                </div>
            </div>
@@ -51,6 +72,10 @@
    margin: 10px 0px;
}
.data-content-list {
    height: auto;
}
.search-input {
    width: 79%;
    /* 可以根据需要调整宽度 */