智慧园区前端大屏
shuishen
2024-10-31 9fe73388fdea13fa87c0a4894019eb66887abaad
src/views/survey/components/box/dataContent.vue
@@ -10,16 +10,38 @@
-->
<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.value = res.data.data.records
        // console.log(res)
    }).catch(err => {
        console.log(err)
    })
}
</script>
<template>
    <!-- <public-content>
        <template #content> -->
    <div class="data-content">
        <div v-for="item in 5">
        <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>
@@ -36,11 +58,13 @@
.data-content-item {
    display: flex;
    margin: 2px 2px;
    margin: 2px 10px;
    padding: 5px 0;
    text-indent: 1em;
    background-color: #747bff;
    justify-content: space-between;
    // 超过高度自动显示滚动条
    overflow-y: auto;
    border-radius: 5px;
}
</style>