From 8c9d027e68d2407d8425f6db26b725efa213df90 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Wed, 30 Oct 2024 21:08:39 +0800
Subject: [PATCH] 首页

---
 src/views/survey/components/box/dataContent.vue |   28 ++++++++-
 src/views/survey/components/box/fireSource.vue  |   51 ++++++++++++++---
 src/views/survey/components/box/fireTrend.vue   |   39 ++++++++++--
 src/api/indParkInfo.js                          |   22 +++++++
 src/views/survey/components/rightContainer.vue  |    4 
 5 files changed, 123 insertions(+), 21 deletions(-)

diff --git a/src/api/indParkInfo.js b/src/api/indParkInfo.js
new file mode 100644
index 0000000..0e3375e
--- /dev/null
+++ b/src/api/indParkInfo.js
@@ -0,0 +1,22 @@
+import request from 'utils/http'
+
+export const getDetail = (params) => {
+    const url = `/yw/indParkInfo/getDetail`;
+    return request({
+        url,
+        method: 'get',
+        params,
+    });
+};
+
+
+
+
+export const getPage = (params) => {
+    const url = `/yw/firmInfo/page`;
+    return request({
+        url,
+        method: 'get',
+        params,
+    });
+};
\ No newline at end of file
diff --git a/src/views/survey/components/box/dataContent.vue b/src/views/survey/components/box/dataContent.vue
index be7833e..7e5cfcc 100644
--- a/src/views/survey/components/box/dataContent.vue
+++ b/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 = 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>
diff --git a/src/views/survey/components/box/fireSource.vue b/src/views/survey/components/box/fireSource.vue
index fc313a4..fe4a4e3 100644
--- a/src/views/survey/components/box/fireSource.vue
+++ b/src/views/survey/components/box/fireSource.vue
@@ -9,7 +9,34 @@
  * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 -->
 <script setup>
-import publicContent from './publicContent.vue'
+// import publicContent from './publicContent.vue'
+
+import { getDetail } from '../../../../api/indParkInfo'
+
+// import { ref, reactive } from 'vue'
+
+var parkInfo = reactive({})
+
+
+
+// 初始化
+onMounted(() => {
+    getData()
+
+})
+// 获取详情
+function getData() {
+    getDetail().then(res => {
+        parkInfo = res.data.data
+        console.log("************************", parkInfo)
+
+    }).catch(err => {
+        console.log(err)
+    })
+}
+
+
+
 </script>
 
 <template>
@@ -25,14 +52,15 @@
             </div>
             <div>
                 <div class="box-content-text">
-                    吉水县地处江西省中部,赣江中游。地处东经114°38′至115°36′、北纬25°52′至27°33′之间,横跨赣江两岸,东南与永丰县接壤,北与峡江县相连,西南与吉安市、吉安县交界。县城文峰镇,西南距吉安市23公里,北距省会南昌196公里,东至永丰县城57公里,西北至峡江县城75公里,京九铁路、105国道、赣江水道均从县城经过,建设中的赣粤高速公路从县城西部穿越,其挂线跨越赣江,从县城北部进入老城区。江西吉水工业园区城西工业园位于吉水县老城区西南约2km处,吉水县城新区西部,东临赣江,北靠金滩镇,西达赣粤高速公路挂线,赣江大桥联系新区东部与西部。吉水县工业园规划为“一区三园”,分别为城西工业园、黄桥工业园、八都工业园。工业园总面积达854.25公顷(12813.7亩),其中,八都工业园17.19公顷、城西工业园735.68公顷、黄桥工业园101.38公顷。城西工业园分两期:城西工业园Ⅰ规模为218.47公顷,其四至范围为:东至赣江,西至白水路,南至黄金大道,北至金滩镇金滩村。城西工业园Ⅱ规模为517.21公顷,其四至范围为:东至金滩镇白鹭村-双元村,西至金滩镇古塘村-前进村,南至赣粤高速连接线,北至金滩镇前进村。江西吉水工业园区化工集中区位于江西吉水工业园区城西工业园Ⅱ内
+                    {{ parkInfo.remark }}
                 </div>
             </div>
         </div>
 
         <div class="container">
             <div class="box-content-sj" v-for="(item, index) in 6" :key="index">
-                <img src="../../../../../public/images/YX.png" alt="">
+                <!-- public\images\雨量站@2x.png -->
+                <img src="../../../../../public/images/雨量站@2x.png" alt="">
                 <div>
                     <div class="box-content-ss">
                         <div>
@@ -53,28 +81,25 @@
 
         <div class="content-qy-info">
             <div class="box-content-title">
-                <img src="../../../../../public/images/YX.png" alt="">
+                <img src="../../../../../public/images/雨量站@2x.png" alt="">
                 <div class="box-content-title-text">
                     <span class="box-content-title-text-span">企业</span>
                 </div>
             </div>
 
             <div class="box-content-title">
-                <img src="../../../../../public/images/YX.png" alt="">
+                <img src="../../../../../public/images/雨量站@2x.png" alt="">
                 <div class="box-content-title-text">
                     <span class="box-content-title-text-span">分区</span>
                 </div>
             </div>
 
             <div class="box-content-title">
-                <img src="../../../../../public/images/YX.png" alt="">
+                <img src="../../../../../public/images/雨量站@2x.png" alt="">
                 <div class="box-content-title-text">
                     <span class="box-content-title-text-span">图层</span>
                 </div>
             </div>
-
-
-
 
         </div>
 
@@ -87,6 +112,7 @@
 <style lang="scss" scoped>
 .box-content-box {
     color: #fff;
+    font-size: 15px;
 }
 
 .box-content {
@@ -107,6 +133,11 @@
     width: 120px;
     /* 宽度可以根据实际情况调整 */
     height: 120px;
+}
+
+.box-content-title img {
+    width: 80px;
+    height: 80px;
 }
 
 .box-content-text {
@@ -149,6 +180,8 @@
 .box-content-text-title,
 .box-content-text-content {
     margin-top: 5px;
+    font-size: 12px;
+    text-align: center;
 }
 
 .box-content-text-title-span,
diff --git a/src/views/survey/components/box/fireTrend.vue b/src/views/survey/components/box/fireTrend.vue
index fa4d5b3..c141926 100644
--- a/src/views/survey/components/box/fireTrend.vue
+++ b/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%;
     /* 可以根据需要调整宽度 */
diff --git a/src/views/survey/components/rightContainer.vue b/src/views/survey/components/rightContainer.vue
index 53dad19..8e917dd 100644
--- a/src/views/survey/components/rightContainer.vue
+++ b/src/views/survey/components/rightContainer.vue
@@ -11,8 +11,8 @@
 <script setup>
 import fireSource from './box/fireSource.vue'
 import fireTrend from './box/fireTrend.vue'
-import occurStatistics from './box/occurStatistics.vue'
-import publicContent from './box/publicContent.vue'
+// import occurStatistics from './box/occurStatistics.vue'
+// import publicContent from './box/publicContent.vue'
 </script>
 
 <template>

--
Gitblit v1.9.3