From b0bc928022a8d5d2df389199c2a59a798aa8624c Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Sat, 09 Nov 2024 15:52:59 +0800
Subject: [PATCH] 优化

---
 src/views/survey/components/box/fireSource.vue            |   79 ++++++----
 src/views/supplies/components/box/dataContent.vue         |  216 ++++++++++++++++++------------
 src/views/companyInfo/components/centerContainer.vue      |   37 +++-
 src/views/layout/index.vue                                |    9 +
 src/views/survey/components/box/fireTrend.vue             |    7 
 src/views/companyInfo/components/box/fireSource.vue       |   18 ++
 src/views/companyInfo/components/mainMenu.vue             |    6 
 src/views/layout/components/mainMenu.vue                  |    2 
 src/views/layout/components/scomponents/layersControl.vue |    4 
 9 files changed, 234 insertions(+), 144 deletions(-)

diff --git a/src/views/companyInfo/components/box/fireSource.vue b/src/views/companyInfo/components/box/fireSource.vue
index 2b0feed..b17f2f2 100644
--- a/src/views/companyInfo/components/box/fireSource.vue
+++ b/src/views/companyInfo/components/box/fireSource.vue
@@ -46,6 +46,12 @@
     name: 'personInCha',
     title: '负责人',
     content: '',
+  },
+  {
+    id: 6,
+    name: 'personInChaPhone',
+    title: '联系电话',
+    content: '',
   }
 ])
 
@@ -67,7 +73,7 @@
 
     <div class="content-firmIntro">
       <!-- <div>{{ data.companyInfo.firmIntro }}</div> -->
-      {{ data.companyInfo.firmIntro }}
+      <span> {{ data.companyInfo.firmIntro }}</span>
     </div>
 
     <div class="company-info">
@@ -105,14 +111,18 @@
   scrollbar-width: none;
 }
 
+.content-firmIntro span {
+  line-height: 25px;
+  letter-spacing: 1px;
+}
+
 .company-info {
   margin-top: 10px;
   border-top: #dfdcdc 2px solid;
-  // background-color: pink;
 }
 
 .company-info-item {
-  margin-top: 20px;
+  margin-top: 13px;
 }
 
 .company-info-title {
@@ -120,7 +130,7 @@
 }
 
 .company-info-content {
-  font-size: 14px;
+  font-size: 13px;
 
 }
 
diff --git a/src/views/companyInfo/components/centerContainer.vue b/src/views/companyInfo/components/centerContainer.vue
index 2f98ca5..b889c1d 100644
--- a/src/views/companyInfo/components/centerContainer.vue
+++ b/src/views/companyInfo/components/centerContainer.vue
@@ -9,6 +9,9 @@
  * Copyright (c) 2024 by shuishen, All Rights Reserved. 
 -->
 <script setup>
+import { getAssetsFile } from 'utils/utils'
+const loginOutBg = getAssetsFile('back.png', '/images')
+
 import { useRouter, useRoute } from 'vue-router'
 let router = useRouter()
 import { useRouterStore } from 'store/router'
@@ -39,13 +42,17 @@
 
 <template>
   <div class="title">{{ data.companyInfo.name }}</div>
-  <div class="menu-box">
+  <!-- <div class="menu-box">
     <div :class="{ on: buttonIndex == 1 }" class="sub-menu" @click="handleClick(1)"> 基本信息 </div>
     <div :class="{ on: buttonIndex == 2 }" class="sub-menu" @click="handleClick(2)"> 应急物质 </div>
     <div :class="{ on: buttonIndex == 3 }" class="sub-menu" @click="handleClick(3)"> 救援队伍 </div>
-  </div>
+  </div> -->
   <div class="back-hoem">
-    <div class="center-info cursor-p" @click="goHome()">返回首页 </div>
+    <!-- <div class="center-info cursor-p" @click="goHome()">返回</div> -->
+    <div class="center-info cursor-p" @click="goHome()">
+      <img :src="loginOutBg" class="img" />
+      <span>返回</span>
+    </div>
   </div>
 </template>
 
@@ -102,20 +109,26 @@
   right: 30px;
 
   .center-info {
-    width: 120px;
-    height: 40px;
-    line-height: 40px;
-    border: none;
-    border-radius: 20px;
+    display: flex;
+    align-items: center;
+    justify-content: center;
     color: #fff;
-    background-color: transparent;
-    font-size: 20px;
-    text-align: center;
-    background-image: url(/images/mode-tab.png);
+    font-size: 13px;
+  }
+
+  .center-info span {
+    margin-right: 10px;
+  }
+
+  .img {
+    width: 36px;
+    height: 36px;
+    // margin-right: 5px;
   }
 
   .center-info:hover {
     background-color: #3c5e8f;
+    border-radius: 20px;
   }
 }
 </style>
diff --git a/src/views/companyInfo/components/mainMenu.vue b/src/views/companyInfo/components/mainMenu.vue
index bedd421..dc89375 100644
--- a/src/views/companyInfo/components/mainMenu.vue
+++ b/src/views/companyInfo/components/mainMenu.vue
@@ -18,11 +18,11 @@
 const menuList = ref(
   [
     {
-      menuName: '雨水管网',
-      path: '/layout/ys'
+      menuName: '企业信息',
+      path: '/layout/sub/companyInfo'
     },
     {
-      menuName: '污水管网',
+      menuName: '应急空间',
       path: '/layout/ws'
     },
     {
diff --git a/src/views/layout/components/mainMenu.vue b/src/views/layout/components/mainMenu.vue
index 238d496..e903cdc 100644
--- a/src/views/layout/components/mainMenu.vue
+++ b/src/views/layout/components/mainMenu.vue
@@ -24,7 +24,7 @@
       path: '/layout/survey'
     },
     {
-      menuName: '固定风险源',
+      menuName: '风险源',
       path: '/layout/rs'
     },
     {
diff --git a/src/views/layout/components/scomponents/layersControl.vue b/src/views/layout/components/scomponents/layersControl.vue
index 240b3ab..b446d06 100644
--- a/src/views/layout/components/scomponents/layersControl.vue
+++ b/src/views/layout/components/scomponents/layersControl.vue
@@ -419,9 +419,7 @@
 }
 
 onMounted(() => {
-  handleCheckChange(data.filter(i => i.id == '1'), {
-    checkedKeys: ['1']
-  })
+
 })
 
 onUnmounted(() => {
diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue
index 7d877b2..a8ff915 100644
--- a/src/views/layout/index.vue
+++ b/src/views/layout/index.vue
@@ -179,20 +179,27 @@
         height: 36px;
         color: #fff;
         display: flex;
-        flex-direction: column;
         align-items: center;
         justify-content: space-between;
+        padding: 0 10px;
         cursor: pointer;
 
         .img {
           width: 16px;
           height: 16px;
+          margin-right: 5px;
         }
 
         span {
           font-size: 13px;
         }
       }
+
+      .login-out:hover {
+        background-color: #3c5e8f;
+        border-radius: 20px;
+
+      }
     }
 
     .main-container {
diff --git a/src/views/supplies/components/box/dataContent.vue b/src/views/supplies/components/box/dataContent.vue
index 82582ec..e5b2fa1 100644
--- a/src/views/supplies/components/box/dataContent.vue
+++ b/src/views/supplies/components/box/dataContent.vue
@@ -8,9 +8,55 @@
  * 
  * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
 -->
+
+
+<template>
+  <public-content>
+    <template #content>
+      <div class="content_box">
+        <div class="list_box">
+          <ul>
+            <li v-for="( item, index ) in  tilteList " :key="index" :class="[currentIndex === index ? 'active' : '']"
+              @click="handleClick(item, index)">
+              {{ item.label }}
+            </li>
+          </ul>
+        </div>
+
+        <div class="page_box">
+          <div>
+            <el-table v-if="formInline.ownership == 1" :data="tableData" style="width: 100%"
+              :header-cell-style="headerCellStyle" :cell-style="tableCellStyle" v-loading="loading">
+
+              <el-table-column fixed prop="name" label="物资名称" />
+              <el-table-column fixed prop="personInCha" label="负责人" />
+              <el-table-column fixed prop="personInChaPhone" label="负责人电话" />
+              <el-table-column fixed prop="stoLoc" label="物资地址" />
+              <el-table-column prop="numUnit" label="数量" width="100" />
+            </el-table>
+
+            <el-table v-else :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle"
+              :cell-style="tableCellStyle" v-loading="loading">
+
+              <el-table-column fixed prop="firmName" label="企业名称" />
+              <el-table-column fixed prop="name" label="物资名称" />
+              <el-table-column fixed prop="personInCha" label="负责人" />
+              <el-table-column fixed prop="personInChaPhone" label="负责人电话" />
+              <el-table-column fixed prop="stoLoc" label="物资地址" />
+              <el-table-column prop="numUnit" label="数量" width="100" />
+            </el-table>
+          </div>
+        </div>
+
+      </div>
+    </template>
+  </public-content>
+</template>
+
 <script setup>
 import publicContent from "./publicContent.vue";
 import { getList } from "@/api/emergencySupplies/emergencySupplies";
+import { getPage } from '@/api/indParkInfo'
 import { reactive } from "vue";
 
 const loading = ref(false);
@@ -18,38 +64,78 @@
 const tableData = ref([]);
 const pages = {
   page: 1,
-  pageSize: 13,
+  pageSize: 1000,
   total: 0,
 };
 
+let currentIndex = ref(0)
+
+// 园区 企业
+const tilteList = ref([
+  { label: "吉水化工园区", value: "0", id: "1" }
+]);
+
 onMounted(() => {
-  getLists();
+  getLists(formInline);
+  getCompanyPages()
 });
+
+// 搜索条件
+const formInline = reactive({
+  firmId: '',
+  ownership: 1,
+});
+function getCompanyPages(param = {}) {
+  param.current = pages.page;
+  param.size = pages.pageSize;
+  getPage(param).then(res => {
+    let companyList = res.data.data.records
+    companyList.forEach(item => {
+      tilteList.value.push({
+        label: item.name,
+        value: item.id,
+        id: item.id
+      })
+    })
+  }).catch(err => {
+  })
+}
+
+function handleClick(item, index) {
+  currentIndex.value = index
+  pages.page = 1
+  pages.pageSize = 1000
+  pages.total = 0
+  if (item.id == 1) {
+    formInline.firmId = ''
+    formInline.ownership = 1
+  } else {
+    formInline.firmId = item.id
+    formInline.ownership = 2
+  }
+  getLists(formInline);
+}
 // 表格样式
 const tableCellStyle = ({ row, column }) => {
   return { background: "#152851", color: "#fff" };
 };
 // 表格表头样式
-const headerCellStyle = ({}) => {
+const headerCellStyle = ({ }) => {
   return {
     background: "#152851",
     color: "#fff",
   };
 };
-// 搜索条件
-const formInline = reactive({
-  name: "",
-  ownership:''
-});
+
 
 // 提交查询
-const onSubmit = () => {
-  pages.page = 1
-  pages.pageSize=13
-  pages.total= 0
-  console.log("submit!");
-  getLists(formInline);
-};
+// const onSubmit = () => {
+//   pages.page = 1
+//   pages.pageSize = 13
+//   pages.total = 0
+//   console.log("submit!");
+//   getLists(formInline);
+// };
 
 // 分页树改变
 const handleSizeChange = (val) => {
@@ -62,12 +148,12 @@
   getLists(formInline);
 }
 // 重置条件
-const clearBtn = ()=>{
+const clearBtn = () => {
   formInline.name = ''
   formInline.ownership = ''
   pages.page = 1
-  pages.pageSize=13
-  pages.total= 0
+  pages.pageSize = 1000
+  pages.total = 0
   getLists(formInline);
 }
 
@@ -80,7 +166,7 @@
     .then((res) => {
       const data = res.data.data;
       data.records.forEach((element) => {
-        if (element.ownership==1) {
+        if (element.ownership == -1) {
           element.ownership = "园区";
         } else {
           element.ownership = "企业";
@@ -97,77 +183,35 @@
 }
 </script>
 
-<template>
-  <public-content>
-    <template #content>
-      <div>
-        <el-form :inline="true" :model="formInline" class="demo-form-inline">
-          <el-form-item label="名称">
-            <el-input
-              v-model="formInline.name"
-              placeholder="请输入名称"
-              clearable
-              style="width: 120px"
-            />
-          </el-form-item>
-          <el-form-item label="归属">
-            <el-select
-              v-model="formInline.ownership"
-              placeholder="请选择"
-              clearable
-              style="width: 120px"
-            >
-              <el-option label="园区" value="1" />
-              <el-option label="企业" value="2" />
-            </el-select>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" @click="onSubmit">查询</el-button>
-            <el-button type="" @click="clearBtn">重置</el-button>
-          </el-form-item>
-        </el-form>
-        <el-table
-          :data="tableData"
-          style="width: 100%"
-          :header-cell-style="headerCellStyle"
-          :cell-style="tableCellStyle"
-          v-loading="loading"
-        >
-          <el-table-column fixed prop="name" label="名称" />
-          <el-table-column prop="numUnit" label="数量" width="100" />
-          <!-- <el-table-column prop="firmName" label="单位名称" /> -->
-          <el-table-column prop="ownership" label="归属" width="100" />
-        </el-table>
-        <div class="el-page">
-          <el-pagination
-            background
-            layout="prev, pager, next"
-            :page-size="pages.pageSize"
-            :total="pages.total"
-             @size-change="handleSizeChange"
-            @current-change="handleCurrentChange"
-          />
-        </div>
-      </div>
-    </template>
-  </public-content>
-</template>
 
 <style lang="scss" scoped>
-.el-form-item__label {
-  color: #fff !important;
+.content_box {
+  color: #fff;
+  overflow: hidden;
 }
 
-/* 当表格没有数据时,修改表格的背景颜色 */
-.el-table--empty .el-table__body {
-  background-color: #19284e !important; /* 你想要的背景颜色 */
-}
-
-.el-page {
-  margin-top: 10px;
-  width: 100%;
+.list_box {
   display: flex;
-  align-items: center;
-  // margin-bottom:10px;
+}
+
+
+
+.list_box ul li {
+  display: inline-block;
+  padding: 10px;
+  font-size: 15px;
+  text-align: center;
+  // background: url(/images/mode-tab-ac.png) no-repeat center / 100% 100%;
+}
+
+.page_box .el-table {
+  width: 100%;
+  height: 670px;
+}
+
+.active {
+  background-color: #fff;
+  color: #000;
+  border-radius: 10px;
 }
 </style>
diff --git a/src/views/survey/components/box/fireSource.vue b/src/views/survey/components/box/fireSource.vue
index e3225ee..58e9e9e 100644
--- a/src/views/survey/components/box/fireSource.vue
+++ b/src/views/survey/components/box/fireSource.vue
@@ -33,20 +33,20 @@
     img: getAssetsFile('yq-jy.png', '/bgicon')
 
   },
-  {
-    id: 3,
-    name: 'riskFirmNum',
-    title: '风险企业数量',
-    content: '1000',
-    img: getAssetsFile('yq-fx.png', '/bgicon')
-  },
-  {
-    id: 4,
-    name: 'proTarNum',
-    title: '保护目标数量',
-    content: '1000',
-    img: getAssetsFile('yq-bh.png', '/bgicon')
-  },
+  // {
+  //   id: 3,
+  //   name: 'riskFirmNum',
+  //   title: '风险企业数量',
+  //   content: '1000',
+  //   img: getAssetsFile('yq-fx.png', '/bgicon')
+  // },
+  // {
+  //   id: 4,
+  //   name: 'proTarNum',
+  //   title: '保护目标数量',
+  //   content: '1000',
+  //   img: getAssetsFile('yq-bh.png', '/bgicon')
+  // },
   {
     id: 5,
     name: 'spaceNum',
@@ -70,7 +70,7 @@
 
 })
 // 获取详情
-function getData () {
+function getData() {
   getDetail().then(res => {
     state.parkInfo = res.data.data
     parkInfoList.forEach(item => {
@@ -91,8 +91,16 @@
     <div class="box-content">
       <div>
         <div class="box-content-img">
-          <img :src="state.parkInfo.imageUrls" alt="">
-          {{ state.parkInfo.remark }}
+          <!-- <img :src="state.parkInfo.imageUrls" alt=""> -->
+          <el-image style="width: 100px; height: 100px" :src="state.parkInfo.imageUrls" :zoom-rate="1.2" :max-scale="7"
+            :min-scale="0.2" :preview-src-list="[state.parkInfo.imageUrls]" :initial-index="4" fit="cover">
+            <template #error>
+              <div class="image-slot">
+                <el-icon><icon-picture /></el-icon>
+              </div>
+            </template>
+          </el-image>
+          <span>{{ state.parkInfo.remark }}</span>
         </div>
       </div>
     </div>
@@ -100,15 +108,14 @@
     <div class="container">
       <div class="box-content-sj" v-for="item in parkInfoList" :key="item.id">
         <img :src="item.img" alt="">
-
         <div class="r">
           <div class="box-content-text-title">
             {{ item.content }}
+            <text v-if="item.unit">({{ item.unit }})</text>
           </div>
 
           <div class="box-content-text-content">
             {{ item.title }}
-            <text v-if="item.unit">({{ item.unit }})</text>
           </div>
         </div>
       </div>
@@ -138,18 +145,22 @@
   overflow-y: auto;
 }
 
-.box-content-img img {
-  float: left;
-  margin: 5px;
-  /* 宽度可以根据实际情况调整 */
-  width: 120px;
-  height: 120px;
+.box-content-img span {
+  // 行距
+  line-height: 25px;
+  // 字体间隙
+  letter-spacing: 1px;
 }
 
-.box-content-title img {
-  width: 80px;
-  height: 80px;
+.box-content-img .el-image {
+  float: left;
+  margin: 5px;
+  margin-right: 15px;
+  /* 宽度可以根据实际情况调整 */
+  width: 130px;
+  height: 130px;
 }
+
 
 .box-content-text {
   padding-left: 5px;
@@ -170,7 +181,7 @@
 
 .box-content-sj {
   /* 每个盒子占据大约31%的宽度,留出一些空间用于间距 */
-  min-width: 30%;
+  min-width: 40%;
   /* 最小宽度,防止在非常小的屏幕上变得太窄 */
   box-sizing: border-box;
   // border: 1px solid #ccc;
@@ -186,7 +197,7 @@
   }
 
   .r {
-    margin-left: 6px;
+    margin-left: 1px;
     flex: 1;
     display: flex;
     flex-direction: column;
@@ -195,7 +206,7 @@
     .box-content-text-title,
     .box-content-text-content {
       margin-top: 5px;
-      font-size: 10px;
+      font-size: 13px;
       text-align: center;
     }
 
@@ -203,6 +214,12 @@
       font-size: 16px;
       font-weight: bold;
     }
+
+    .box-content-text-title text {
+      margin-top: 5px;
+      font-size: 10px;
+      text-align: center;
+    }
   }
 }
 </style>
\ No newline at end of file
diff --git a/src/views/survey/components/box/fireTrend.vue b/src/views/survey/components/box/fireTrend.vue
index ba17b48..8d0a29d 100644
--- a/src/views/survey/components/box/fireTrend.vue
+++ b/src/views/survey/components/box/fireTrend.vue
@@ -27,9 +27,9 @@
 function getPages() {
   getPage().then(res => {
     parkQy.value = res.data.data.records
-    console.log(res)
+    // console.log(res)
   }).catch(err => {
-    console.log(err)
+    // console.log(err)
   })
 }
 
@@ -56,7 +56,7 @@
       <div class="search-container">
         <el-input v-model="searchQuery" placeholder="请输入企业名称" size="mini">
         </el-input>
-        <el-button :color="'#007bff'" @click="search" size="mini">搜索</el-button>
+        <el-button :color="'#0088ff'" @click="search" size="mini">搜索</el-button>
       </div>
     </div>
 
@@ -72,6 +72,7 @@
 <style lang="scss" scoped>
 .box-content {
   color: #fff;
+  // color: #0066ff;
   padding: 0 10px;
 }
 

--
Gitblit v1.9.3