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/fireContent.vue |   54 ++++++-
 src/views/survey/components/box/dataContent.vue |   32 ++++
 src/views/survey/components/box/fireSource.vue  |  164 ++++++++++++++++++++---
 package.json                                    |    1 
 src/views/survey/components/box/fireTrend.vue   |   58 ++++++-
 src/api/indParkInfo.js                          |   22 +++
 src/views/survey/components/leftContainer.vue   |    4 
 src/views/survey/components/box/unitContent.vue |   50 ++++++-
 src/views/survey/components/rightContainer.vue  |    4 
 src/App.vue                                     |    7 +
 10 files changed, 341 insertions(+), 55 deletions(-)

diff --git a/package.json b/package.json
index 8728974..f8a9aa1 100644
--- a/package.json
+++ b/package.json
@@ -20,6 +20,7 @@
     "crypto-js": "^4.1.1",
     "element-plus": "^2.8.6",
     "element-tree-line": "^0.2.1",
+    "echarts": "^5.5.1",
     "js-base64": "^3.7.4",
     "js-md5": "^0.7.3",
     "nprogress": "^0.2.0",
diff --git a/src/App.vue b/src/App.vue
index 68dc6d1..c2afb56 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -9,6 +9,13 @@
  * Copyright (c) 2024 by shuishen, All Rights Reserved. 
 -->
 <script setup>
+
+import { provide } from 'vue'
+
+import * as echarts from 'echarts'
+
+provide("echarts", echarts)
+
 </script>
 
 <template>
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..bed1169 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.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>
\ No newline at end of file
diff --git a/src/views/survey/components/box/fireContent.vue b/src/views/survey/components/box/fireContent.vue
index 7152a88..8cdcd67 100644
--- a/src/views/survey/components/box/fireContent.vue
+++ b/src/views/survey/components/box/fireContent.vue
@@ -9,17 +9,57 @@
  * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 -->
 <script setup>
-import publicContent from './publicContent.vue'
+// import publicContent from './publicContent.vue'
+
+
+import { inject, reactive } from 'vue'
+
+let $echarts = inject('echarts')
+
+console.log("111111111111111111", $echarts)
+
+onMounted(() => {
+    let myEcharts = $echarts.init(document.getElementById('fire-content-echarts'))
+    myEcharts.setOption({
+        xAxis: {
+            data: ['A', 'B', 'C', 'D', 'E']
+        },
+        yAxis: {},
+        series: [
+            {
+                type: 'bar',
+                data: [10, 22, 28, 43, 49],
+                barWidth: '60%'
+            }
+        ]
+    })
+})
 </script>
 
 <template>
-    <public-content>
-        <template #content>
-            <div>
+    <!-- <public-content>
+        <template #content> -->
+    <div class="fireContent-box">
+
+        <div>
+            <div class="fire-content-echarts" id="fire-content-echarts">
+
 
             </div>
-        </template>
-    </public-content>
+
+        </div>
+
+    </div>
+    <!-- </template>
+    </public-content> -->
 </template>
 
-<style lang="scss" scoped></style>
\ No newline at end of file
+<style lang="scss" scoped>
+.fireContent-box {
+    color: #fff;
+}
+
+.fire-content-echarts {
+    height: 4.5rem
+}
+</style>
\ No newline at end of file
diff --git a/src/views/survey/components/box/fireSource.vue b/src/views/survey/components/box/fireSource.vue
index fc313a4..c61bd38 100644
--- a/src/views/survey/components/box/fireSource.vue
+++ b/src/views/survey/components/box/fireSource.vue
@@ -9,7 +9,35 @@
  * 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'
+
+let state = reactive({
+    parkInfo: {}
+})
+
+
+
+// 初始化
+onMounted(() => {
+    getData()
+
+})
+// 获取详情
+function getData() {
+    getDetail().then(res => {
+        state.parkInfo = res.data.data
+        // console.log("************************", parkInfo)
+    }).catch(err => {
+        console.log(err)
+    })
+}
+
+
+
 </script>
 
 <template>
@@ -17,32 +45,121 @@
         <template #content> -->
     <div class="box-content-box">
         <div class="box-content">
-
             <div>
                 <div class="box-content-img">
-                    <img src="../../../../../public/images/YX.png" alt="">
+                    <img :src="state.parkInfo.imageUrls" alt="">
                 </div>
             </div>
-            <div>
+            <div class="box-content-text-remark">
                 <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公顷,其四至范围为:东至金滩镇白鹭村-双元村,西至金滩镇古塘村-前进村,南至赣粤高速连接线,北至金滩镇前进村。江西吉水工业园区化工集中区位于江西吉水工业园区城西工业园Ⅱ内
+                    {{ state.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="">
+            <div class="box-content-sj">
+                <img src="../../../../../public/images/雨量站@2x.png" alt="">
                 <div>
                     <div class="box-content-ss">
                         <div>
                             <div class="box-content-text-title">
-                                <span class="box-content-text-title-span">2999</span>
+                                <span class="box-content-text-title-span">{{ state.parkInfo.plaArea }}</span>
                             </div>
                         </div>
                         <div>
                             <div class="box-content-text-content">
-                                <span class="box-content-text-content-span">企业园区</span>
+                                <span class="box-content-text-content-span">园区面积 (公顷)</span>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <div class="box-content-sj">
+                <img src="../../../../../public/images/雨量站@2x.png" alt="">
+                <div>
+                    <div class="box-content-ss">
+                        <div>
+                            <div class="box-content-text-title">
+                                <span class="box-content-text-title-span">{{ state.parkInfo.recNum }}</span>
+                            </div>
+                        </div>
+                        <div>
+                            <div class="box-content-text-content">
+                                <span class="box-content-text-content-span">救援人员数量</span>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <div class="box-content-sj">
+                <img src="../../../../../public/images/雨量站@2x.png" alt="">
+                <div>
+                    <div class="box-content-ss">
+                        <div>
+                            <div class="box-content-text-title">
+                                <span class="box-content-text-title-span">{{ state.parkInfo.riskFirmNum }}</span>
+                            </div>
+                        </div>
+                        <div>
+                            <div class="box-content-text-content">
+                                <span class="box-content-text-content-span">风险企业数量</span>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <div class="box-content-sj">
+                <img src="../../../../../public/images/雨量站@2x.png" alt="">
+                <div>
+                    <div class="box-content-ss">
+                        <div>
+                            <div class="box-content-text-title">
+                                <span class="box-content-text-title-span">{{ state.parkInfo.proTarNum }}</span>
+                            </div>
+                        </div>
+                        <div>
+                            <div class="box-content-text-content">
+                                <span class="box-content-text-content-span">保护目标数量</span>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <div class="box-content-sj">
+                <img src="../../../../../public/images/雨量站@2x.png" alt="">
+                <div>
+                    <div class="box-content-ss">
+                        <div>
+                            <div class="box-content-text-title">
+                                <span class="box-content-text-title-span">{{ state.parkInfo.spaceNum }}</span>
+                            </div>
+                        </div>
+                        <div>
+                            <div class="box-content-text-content">
+                                <span class="box-content-text-content-span">应急空间数量</span>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+            </div>
+
+            <div class="box-content-sj">
+                <img src="../../../../../public/images/雨量站@2x.png" alt="">
+                <div>
+                    <div class="box-content-ss">
+                        <div>
+                            <div class="box-content-text-title">
+                                <span class="box-content-text-title-span">{{ state.parkInfo.firmNum }}</span>
+                            </div>
+                        </div>
+                        <div>
+                            <div class="box-content-text-content">
+                                <span class="box-content-text-content-span">企业数量</span>
                             </div>
                         </div>
                     </div>
@@ -53,28 +170,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,13 +201,15 @@
 <style lang="scss" scoped>
 .box-content-box {
     color: #fff;
+    font-size: 15px;
 }
 
 .box-content {
     display: flex;
     justify-content: space-between;
-
 }
+
+.box-content-text-remark {}
 
 .content-qy-info {
     display: flex;
@@ -104,18 +220,22 @@
 
 .box-content-img img {
     margin: 5px;
-    width: 120px;
     /* 宽度可以根据实际情况调整 */
     height: 120px;
 }
 
+.box-content-title img {
+    width: 80px;
+    height: 80px;
+}
+
 .box-content-text {
     padding-left: 5px;
-    // width: 60%;
-    /* 宽度可以根据实际情况调整 */
     height: 130px;
-    /* 高度可以根据实际情况调整 */
-    overflow: hidden;
+    overflow: scroll;
+    // 隐藏滚动条
+    scrollbar-width: none;
+
 }
 
 .container {
@@ -149,6 +269,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..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
diff --git a/src/views/survey/components/box/unitContent.vue b/src/views/survey/components/box/unitContent.vue
index 7152a88..47fba66 100644
--- a/src/views/survey/components/box/unitContent.vue
+++ b/src/views/survey/components/box/unitContent.vue
@@ -9,17 +9,51 @@
  * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 -->
 <script setup>
-import publicContent from './publicContent.vue'
+// import publicContent from './publicContent.vue'
+
+import { inject } from 'vue'
+
+let $echarts = inject('echarts')
+
+console.log($echarts)
+
+onMounted(() => {
+    let myEcharts = $echarts.init(document.getElementById('unit-content-echarts'))
+    myEcharts.setOption({
+        xAxis: {
+            data: ['A', 'B', 'C', 'D', 'E']
+        },
+        yAxis: {},
+        series: [
+            {
+                type: 'bar',
+                data: [10, 22, 28, 43, 49],
+                barWidth: '60%'
+            }
+        ]
+    })
+})
+
 </script>
 
 <template>
-    <public-content>
-        <template #content>
-            <div>
+    <!-- <public-content>
+        <template #content> -->
+    <div class="unit-content">
+        <div class="unit-content-echarts" id="unit-content-echarts">
 
-            </div>
-        </template>
-    </public-content>
+        </div>
+    </div>
+    <!-- </template>
+    </public-content> -->
 </template>
 
-<style lang="scss" scoped></style>
\ No newline at end of file
+<style lang="scss" scoped>
+.unit-content {
+    color: #fff;
+}
+
+.unit-content-echarts {
+    height: 5rem;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/survey/components/leftContainer.vue b/src/views/survey/components/leftContainer.vue
index 56246b7..a3e7ef8 100644
--- a/src/views/survey/components/leftContainer.vue
+++ b/src/views/survey/components/leftContainer.vue
@@ -28,7 +28,7 @@
     <div class="unit box">
       <title-box>
         <template #titleName>
-          入住单位统计
+          应急物资统计
         </template>
       </title-box>
       <unit-content></unit-content>
@@ -37,7 +37,7 @@
     <div class="fire box">
       <title-box>
         <template #titleName>
-          实时火警事件
+          风险源统计
         </template>
       </title-box>
       <fire-content></fire-content>
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