From 856df58ee56f3c6163bdc938b4fb7c5085ede6b5 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 11 Nov 2024 18:35:09 +0800
Subject: [PATCH] Merge branch 'main' of http://139.196.74.78:10010/r/zhyq/bigScreen
---
src/views/survey/components/box/fireSource.vue | 1
src/views/rt/components/box/dataContent.vue | 158 ++++++++++++++-----
src/views/supplies/components/box/dataContent.vue | 34 ++-
package.json | 1
src/views/companyInfo/components/box/fireTrend.vue | 41 ++--
src/views/layout/index.vue | 5
src/api/indParkInfo.js | 10 +
src/views/companyInfo/components/box/fireSource.vue | 145 +++++++++++++----
src/views/companyInfo/index.vue | 4
src/views/companyInfo/components/mainMenu.vue | 32 +++
src/views/layout/components/scomponents/layersControl.vue | 12
11 files changed, 322 insertions(+), 121 deletions(-)
diff --git a/package.json b/package.json
index aa7ac9d..6e63d3c 100644
--- a/package.json
+++ b/package.json
@@ -33,6 +33,7 @@
"vue-router": "^4.4.5"
},
"devDependencies": {
+ "@dvgis/types": "^1.2.0",
"@vitejs/plugin-basic-ssl": "^1.1.0",
"@vitejs/plugin-vue": "^5.1.4",
"sass": "^1.80.4",
diff --git a/src/api/indParkInfo.js b/src/api/indParkInfo.js
index 38a5bc8..7360792 100644
--- a/src/api/indParkInfo.js
+++ b/src/api/indParkInfo.js
@@ -12,6 +12,16 @@
+export const getfirmInfoDetail = (params) => {
+ const url = `/yw/firmInfo/getDetail`;
+ return request({
+ url,
+ method: 'get',
+ params,
+ });
+};
+
+
export const getPage = (params) => {
const url = `/yw/firmInfo/page`;
return request({
diff --git a/src/views/companyInfo/components/box/fireSource.vue b/src/views/companyInfo/components/box/fireSource.vue
index b17f2f2..8f5e43b 100644
--- a/src/views/companyInfo/components/box/fireSource.vue
+++ b/src/views/companyInfo/components/box/fireSource.vue
@@ -8,9 +8,64 @@
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
+
+<template>
+ <div class="data-content w100 h100">
+
+ <div class="clearfix">
+ <div class="content-firmIntro">
+ <el-image :src="data.companyInfo.imageUrls" :zoom-rate="1.2" :max-scale="7" :min-scale="0.2"
+ :preview-src-list="[data.companyInfo.imageUrls]" :initial-index="4" fit="cover">
+ <template #error>
+ <div class="image-slot">
+ <el-icon><icon-picture /></el-icon>
+ </div>
+ </template>
+ </el-image>
+ <span> {{ data.companyInfo.firmIntro }} </span>
+ </div>
+ </div>
+
+ <div class="company-info">
+ <div class="company-info-item" v-for="item in companyInfoList" :key="item.id">
+ <el-row>
+ <el-col :span="8">
+ <div class="company-info-title">{{ item.title }}</div>
+ </el-col>
+ <el-col :span="16">
+ <div class="company-info-content">{{ item.content }}</div>
+ </el-col>
+ </el-row>
+ </div>
+ </div>
+
+ <div class="company-info">
+ <div class="" style="text-align: center;margin-top: 10px;">救援队伍</div>
+ <div class="company-info-item" v-for="item in rescueTeamList" :key="item.id">
+ <el-row>
+ <el-col :span="8">
+ <div class="company-info-title">{{ item.title }}</div>
+ </el-col>
+ <el-col :span="16">
+ <div class="company-info-content">{{ item.content }}</div>
+ </el-col>
+ </el-row>
+ </div>
+ </div>
+
+ <!-- <div class="company-info-image">
+ <div class="" style="text-align: center;margin-top: 10px;">企业图片</div>
+ </div> -->
+
+
+ </div>
+</template>
+
<script setup>
import publicContent from './publicContent.vue'
import { getAssetsFile } from 'utils/utils'
+import { getfirmInfoDetail } from '@/api/indParkInfo'
+
let data = reactive({
companyInfo: {}
})
@@ -55,48 +110,46 @@
}
])
+let rescueTeamList = ref([
+ {
+ id: 5,
+ name: 'rescuePerName',
+ title: '姓名',
+ content: '',
+ },
+ {
+ id: 6,
+ name: 'rescuePerPhone',
+ title: '联系电话',
+ content: '',
+ }
+])
+
onMounted(() => {
data.companyInfo = JSON.parse(localStorage.getItem('companyInfo'))
- console.log(data.companyInfo)
- companyInfoList.value.forEach(item => {
- data.companyInfo[item.name] && (item.content = data.companyInfo[item.name])
-
- })
+ getDetail()
})
+
+function getDetail() {
+ getfirmInfoDetail({
+ id: data.companyInfo.id
+ }).then(res => {
+ data.companyInfo = res.data.data
+ companyInfoList.value.forEach(item => {
+ data.companyInfo[item.name] && (item.content = data.companyInfo[item.name])
+ })
+ rescueTeamList.value.forEach(item => {
+ data.companyInfo[item.name] && (item.content = data.companyInfo[item.name])
+ })
+ }).catch(err => {
+ })
+}
</script>
-<template>
- <div class="data-content w100 h100">
- <div class="content-firmIntro">
- <!-- <div>{{ data.companyInfo.firmIntro }}</div> -->
- <span> {{ data.companyInfo.firmIntro }}</span>
- </div>
-
- <div class="company-info">
- <div class="company-info-item" v-for="item in companyInfoList" :key="item.id">
- <el-row>
- <el-col :span="8">
- <div class="company-info-title">{{ item.title }}</div>
- </el-col>
- <el-col :span="16">
- <div class="company-info-content">{{ item.content }}</div>
- </el-col>
- </el-row>
- </div>
- </div>
-
- <div class="company-info-image">
- <img :src="data.companyInfo.image_urls" alt="">
- <!-- {{ "图片" }} -->
- </div>
-
-
- </div>
-</template>
<style lang="scss" scoped>
.data-content {
@@ -104,11 +157,25 @@
color: #fff;
}
+.clearfix::after {
+ content: '';
+ display: block;
+ clear: both;
+}
+
.content-firmIntro {
height: 300px;
overflow-x: hidden;
// 隐藏滚动条
scrollbar-width: none;
+}
+
+.content-firmIntro .el-image {
+ float: left;
+ margin-right: 10px;
+ margin-top: 5px;
+ width: 90px;
+ height: 90px;
}
.content-firmIntro span {
@@ -134,11 +201,13 @@
}
-.company-info-image {
- margin-top: 20px;
- width: 100%;
- height: 200px;
- // background-color: pink;
+.company-info-jydw {
+ margin-top: 10px;
+ border-top: #dfdcdc 2px solid;
+}
+
+.company-info-jydw div {
text-align: center;
+ margin-top: 10px;
}
</style>
\ No newline at end of file
diff --git a/src/views/companyInfo/components/box/fireTrend.vue b/src/views/companyInfo/components/box/fireTrend.vue
index 0c4f447..6834d19 100644
--- a/src/views/companyInfo/components/box/fireTrend.vue
+++ b/src/views/companyInfo/components/box/fireTrend.vue
@@ -18,7 +18,7 @@
const tableData = ref([])
const pages = {
page: 1,
- pageSize: 13,
+ pageSize: 1000,
total: 0,
}
@@ -50,7 +50,7 @@
// 提交查询
const onSubmit = () => {
pages.page = 1
- pages.pageSize = 13
+ pages.pageSize = 1000
pages.total = 0
console.log("submit!")
getLists(formInline)
@@ -71,13 +71,13 @@
formInline.name = ''
formInline.ownership = ''
pages.page = 1
- pages.pageSize = 13
+ pages.pageSize = 1000
pages.total = 0
getLists(formInline)
}
// 查询分页数据
-function getLists (param = {}) {
+function getLists(param = {}) {
param.current = pages.page
param.size = pages.pageSize
param.firmId = data.companyInfo.id
@@ -109,28 +109,24 @@
<el-form-item label="" class="form-item-input">
<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 class="search-btn">
<el-button type="primary" @click="onSubmit">查询</el-button>
<el-button type="primary" @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" element-loading-background="rgba(122, 122, 122, 0.1)">
- <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="personInCha" label="负责人" width="100" />
- </el-table>
- <div class="el-page">
+ <div class="table-box">
+ <el-table :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle" :cell-style="tableCellStyle"
+ v-loading="loading" element-loading-background="rgba(122, 122, 122, 0.1)">
+ <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="personInCha" label="负责人" width="100" />
+ </el-table>
+ </div>
+ <!-- <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> -->
</div>
</template>
@@ -147,6 +143,13 @@
}
}
+.search-box .table-box {
+ height: 700px;
+ overflow: scroll;
+ // 隐藏滚动条
+ scrollbar-width: none;
+}
+
/* 当表格没有数据时,修改表格的背景颜色 */
.el-table--empty .el-table__body {
background-color: rgba(135, 158, 199, 0.3) !important;
diff --git a/src/views/companyInfo/components/mainMenu.vue b/src/views/companyInfo/components/mainMenu.vue
index fb0d955..5bc5f9c 100644
--- a/src/views/companyInfo/components/mainMenu.vue
+++ b/src/views/companyInfo/components/mainMenu.vue
@@ -1,6 +1,6 @@
<template>
<div class="page-mode">
- <div @mouseenter="item.childrenFlag = true" :class="{ active: currentUrl.indexOf(item.path) != -1 }"
+ <div @mouseenter="item.childrenFlag = true" :class="{ active: buttonIndex == item.value }"
@mouseleave="item.childrenFlag = false" @click="goToPath(item)" v-for="(item, index) in menuList" :key="index">
{{ item.menuName }}
</div>
@@ -19,20 +19,44 @@
[
{
menuName: '企业信息',
- path: '/layout/sub/companyInfo'
+ path: '/layout/sub/companyInfo',
+ value: 1,
+ },
+ {
+ menuName: '应急物质',
+ path: '/layout/sub/',
+ value: 2,
},
{
menuName: '应急空间',
- path: '/layout/ws'
+ path: '/layout/ws',
+ value: 3,
},
{
menuName: '三道防线',
- path: '/layout/sj'
+ path: '/layout/sj',
+ value: 4,
}
]
)
+let { buttonIndex } = defineProps({
+ buttonIndex: Number
+})
+
+// 父级方法
+const emit = defineEmits(['childEvent'])
const goToPath = (params) => {
+ if (params.value == 1) {
+ emit('childEvent', params.value)
+ return
+
+ } else if (params.value == 2) {
+ emit('childEvent', params.value)
+ return
+ }
+ emit('childEvent', params.value)
+
if (params.children && params.children.length > 0) return
if (params.path) {
diff --git a/src/views/companyInfo/index.vue b/src/views/companyInfo/index.vue
index 0c9cc94..0b6cbdd 100644
--- a/src/views/companyInfo/index.vue
+++ b/src/views/companyInfo/index.vue
@@ -63,10 +63,10 @@
<centerContainer :button-index="buttonIndex" @childEvent="handleChildEvent"></centerContainer>
</div>
- <div class="main-container">
+ <div class="main-container" v-if="buttonIndex <= 2">
<right-container :button-index="buttonIndex"></right-container>
</div>
- <main-menu-vue></main-menu-vue>
+ <main-menu-vue :button-index="buttonIndex" @childEvent="handleChildEvent"></main-menu-vue>
</div>
</template>
diff --git a/src/views/layout/components/scomponents/layersControl.vue b/src/views/layout/components/scomponents/layersControl.vue
index 819b9ec..3063512 100644
--- a/src/views/layout/components/scomponents/layersControl.vue
+++ b/src/views/layout/components/scomponents/layersControl.vue
@@ -232,7 +232,7 @@
layerName: 'gsgw',
source: gsgw,
color: DC.Color.BLUE,
- height: 1,
+ height: 5,
},
{
id: '6-2',
@@ -242,7 +242,7 @@
layerName: 'wsgw',
source: wsgw,
color: DC.Color.BLACK,
- height: 2,
+ height: 10,
},
{
id: '6-3',
@@ -252,7 +252,7 @@
layerName: 'rqgw',
source: rqgw,
color: DC.Color.RED,
- height: 3,
+ height: 15,
},
{
id: '6-4',
@@ -262,7 +262,7 @@
layerName: 'ysgw',
source: ysgw,
color: DC.Color.CYAN,
- height: 4,
+ height: 20,
},
]
@@ -403,7 +403,7 @@
addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
window.$viewer.addLayer(addTileLayers[item.layerName])
- function computeCircle (radius) {
+ function computeCircle(radius) {
var positions = []
for (var i = 0; i < 1080; i++) {
var radians = DC.Math.toRadians(i)
@@ -417,7 +417,7 @@
item.source.features.forEach(i => {
let polylineVolume = new DC.PolylineVolume(
- i.geometry.coordinates.map(d => [d[0], d[1], 0.0].join(',')).join(';'),
+ i.geometry.coordinates.map(d => [d[0], d[1], item.height].join(',')).join(';'),
computeCircle(0.3)
)
diff --git a/src/views/layout/index.vue b/src/views/layout/index.vue
index 394db77..1187348 100644
--- a/src/views/layout/index.vue
+++ b/src/views/layout/index.vue
@@ -45,6 +45,11 @@
const showContent = ref(false)
const showSubLayout = ref(false)
const showSinglePage = ref(false)
+
+// onMounted(() => {
+// store.setLoadSub(false)
+// }),
+
// 监听createB的变化
watch(
[
diff --git a/src/views/rt/components/box/dataContent.vue b/src/views/rt/components/box/dataContent.vue
index 1dfeb7c..c42cebe 100644
--- a/src/views/rt/components/box/dataContent.vue
+++ b/src/views/rt/components/box/dataContent.vue
@@ -11,20 +11,59 @@
<script setup>
import publicContent from "./publicContent.vue";
import { getList } from "@/api/rescueTeam/rescueTeam";
+import { getPage } from '@/api/indParkInfo'
import { reactive } from "vue";
const loading = ref(false);
const tableData = ref([]);
+
+let currentIndex = ref(0)
+// 园区 企业
+const tilteList = ref([
+ { label: "吉水化工园区", value: "0", id: "1" },
+ { label: "吉水化工园区企业", value: "0", id: "2" }
+
+]);
const pages = {
page: 1,
- pageSize: 13,
+ pageSize: 100,
total: 0,
};
onMounted(() => {
- getLists();
+ getLists(formInline);
+ // getCompanyPages();
});
+
+// 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.type = 1
+ } else {
+ formInline.type = 2
+ }
+ getLists(formInline);
+}
// 表格样式
const tableCellStyle = ({ row, column }) => {
return { background: "#152851", color: "#fff" };
@@ -39,7 +78,7 @@
// 搜索条件
const formInline = reactive({
perInCha: "",
- type: ''
+ type: '1'
});
// 提交查询
@@ -79,16 +118,16 @@
getList(param)
.then((res) => {
const data = res.data.data;
- data.records.forEach((element) => {
- if (element.type == 1) {
- element.ownership = "园区";
- } else {
- element.ownership = "企业";
- }
- });
+ // data.records.forEach((element) => {
+ // if (element.type == 1) {
+ // element.ownership = "园区";
+ // } else {
+ // element.ownership = "企业";
+ // }
+ // });
tableData.value = data.records;
- pages.total = data.total;
- loading.value = false;
+ // pages.total = data.total;
+ // loading.value = false;
})
.catch((err) => {
loading.value = false;
@@ -100,8 +139,8 @@
<template>
<public-content>
<template #content>
- <div>
- <el-form :inline="true" :model="formInline" class="demo-form-inline">
+ <div class="content_box">
+ <!-- <el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="姓名">
<el-input v-model="formInline.perInCha" placeholder="请输入姓名" clearable style="width: 120px" />
</el-form-item>
@@ -115,44 +154,81 @@
<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="perInCha" label="责任人姓名" />
- <el-table-column prop="perInChaPho" label="联系电话" />
- <!-- <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" />
+ </el-form> -->
+
+ <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">
+
+ <el-table v-if="formInline.type == 1" :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle"
+ :cell-style="tableCellStyle">
+ <el-table-column prop="teamName" label="救援队伍组名称" />
+ <el-table-column prop="teamJob" label="救援队伍组职务" />
+ <el-table-column prop="perInCha" label="责任人姓名" />
+ <el-table-column prop="job" label="园区职务" />
+ <el-table-column prop="perInChaPho" label="联系电话" />
+ </el-table>
+
+ <el-table v-else :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle"
+ :cell-style="tableCellStyle">
+ <el-table-column prop="firmName" label="企业名称" />
+ <el-table-column prop="perInCha" label="责任人姓名" />
+ <el-table-column prop="perInChaPho" label="联系电话" />
+ </el-table>
+
+ </div>
+
</div>
</template>
</public-content>
</template>
<style lang="scss" scoped>
-::v-deep .el-table__body-wrapper {
- background-color: #152851;
+.content_box {
+ color: #fff;
}
-.el-form-item__label {
- color: #fff !important;
+.list_box {
+ overflow-x: auto;
+ white-space: nowrap;
+ // scrollbar-width: thin;
+ scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
-/* 当表格没有数据时,修改表格的背景颜色 */
-.el-table--empty .el-table__body {
- background-color: rgba(135, 158, 199, 0.3) !important;
- /* 你想要的背景颜色 */
-}
-
-.el-page {
- margin-top: 10px;
- width: 100%;
+.list_box ul {
display: flex;
- align-items: center;
- justify-content: center;
- // margin-bottom:10px;
+ /* 使用 Flexbox 布局 */
+ padding: 0;
+ margin: 0;
+ list-style: none;
+}
+
+.list_box li {
+ padding: 10px;
+ margin-right: 10px;
+ cursor: pointer;
+}
+
+.list_box li.active {
+ background-color: rgba(117, 116, 116, 0.3);
+ color: white;
+}
+
+.page_box {
+ // overflow: scroll;
+}
+
+
+.page_box .el-table {
+ width: 100%;
+ height: 700px;
+ background-color: rgba(117, 116, 116, 0.3);
}
</style>
diff --git a/src/views/supplies/components/box/dataContent.vue b/src/views/supplies/components/box/dataContent.vue
index e5b2fa1..5ac17b0 100644
--- a/src/views/supplies/components/box/dataContent.vue
+++ b/src/views/supplies/components/box/dataContent.vue
@@ -26,7 +26,7 @@
<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">
+ :header-cell-style="headerCellStyle" :cell-style="tableCellStyle">
<el-table-column fixed prop="name" label="物资名称" />
<el-table-column fixed prop="personInCha" label="负责人" />
@@ -36,7 +36,7 @@
</el-table>
<el-table v-else :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle"
- :cell-style="tableCellStyle" v-loading="loading">
+ :cell-style="tableCellStyle">
<el-table-column fixed prop="firmName" label="企业名称" />
<el-table-column fixed prop="name" label="物资名称" />
@@ -187,26 +187,38 @@
<style lang="scss" scoped>
.content_box {
color: #fff;
- overflow: hidden;
}
.list_box {
- display: flex;
+ overflow-x: auto;
+ white-space: nowrap;
+ // scrollbar-width: thin;
+ scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
+.list_box ul {
+ display: flex;
+ /* 使用 Flexbox 布局 */
+ padding: 0;
+ margin: 0;
+ list-style: none;
+}
-
-.list_box ul li {
- display: inline-block;
+.list_box li {
padding: 10px;
- font-size: 15px;
- text-align: center;
- // background: url(/images/mode-tab-ac.png) no-repeat center / 100% 100%;
+ margin-right: 10px;
+ cursor: pointer;
+}
+
+.list_box li.active {
+ background-color: rgba(117, 116, 116, 0.3);
+ color: white;
}
.page_box .el-table {
width: 100%;
- height: 670px;
+ height: 700px;
+ background-color: rgba(117, 116, 116, 0.3);
}
.active {
diff --git a/src/views/survey/components/box/fireSource.vue b/src/views/survey/components/box/fireSource.vue
index 2acebd0..6926730 100644
--- a/src/views/survey/components/box/fireSource.vue
+++ b/src/views/survey/components/box/fireSource.vue
@@ -138,6 +138,7 @@
}
.box-content-img {
+
height: 380px;
line-height: 28px;
// 隐藏滚动条
--
Gitblit v1.9.3