From 9fe73388fdea13fa87c0a4894019eb66887abaad Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Thu, 31 Oct 2024 18:32:35 +0800
Subject: [PATCH] Merge branch 'main' of http://139.196.74.78:10010/r/zhyq/bigScreen
---
src/views/survey/components/box/fireTrend.vue | 58 +++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 47 insertions(+), 11 deletions(-)
diff --git a/src/views/survey/components/box/fireTrend.vue b/src/views/survey/components/box/fireTrend.vue
index fa4d5b3..13d2e60 100644
--- a/src/views/survey/components/box/fireTrend.vue
+++ b/src/views/survey/components/box/fireTrend.vue
@@ -10,6 +10,37 @@
-->
<script setup>
import publicContent from './publicContent.vue'
+import { ref, reactive } from 'vue'
+
+import { getPage } from '../../../../api/indParkInfo'
+
+let parkQy = ref([])
+
+let searchQuery = ref('')
+
+onMounted(() => {
+ getPages()
+})
+
+
+function getPages() {
+ getPage().then(res => {
+ parkQy.value = res.data.data.records
+ console.log(res)
+ }).catch(err => {
+ console.log(err)
+ })
+}
+
+function search() {
+ getPage({ name: searchQuery.value }).then(res => {
+ parkQy.value = res.data.data.records
+ console.log(res)
+ }).catch(err => {
+ console.log(err)
+ })
+}
+
</script>
<template>
@@ -19,19 +50,15 @@
<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" @click="search">搜索</button>
</div>
</div>
- <div>
- <div v-for="item in 5">
- <div class="data-content-item">
- <div> 测试企业111111</div>
- <el-button size="small" type="primary">进入企业</el-button>
- </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">进入园区</el-button>
</div>
</div>
</div>
@@ -49,6 +76,14 @@
align-items: center;
justify-content: center;
margin: 10px 0px;
+}
+
+.data-content-list {
+ height: 50%;
+ overflow: scroll;
+ // 隐藏滚动条
+ scrollbar-width: none;
+ text-indent: 1em;
}
.search-input {
@@ -76,11 +111,12 @@
.data-content-item {
display: flex;
- margin: 2px 2px;
+ margin: 2px 10px;
padding: 5px 0;
background-color: #747bff;
justify-content: space-between;
// 超过高度自动显示滚动条
overflow-y: auto;
+ border-radius: 5px;
}
</style>
\ No newline at end of file
--
Gitblit v1.9.3