From b67f46b4a768b4cd72d4e463c5dffefe977ddeb7 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Mon, 02 Dec 2024 22:04:27 +0800
Subject: [PATCH] 应急空间及全局图层去除废水处理站、污水池
---
src/views/companyInfo/components/box/fireTrend.vue | 77 ++++++++++++++------------------------
1 files changed, 28 insertions(+), 49 deletions(-)
diff --git a/src/views/companyInfo/components/box/fireTrend.vue b/src/views/companyInfo/components/box/fireTrend.vue
index ebf8e73..3f49081 100644
--- a/src/views/companyInfo/components/box/fireTrend.vue
+++ b/src/views/companyInfo/components/box/fireTrend.vue
@@ -2,8 +2,8 @@
* @Author: shuishen 1109946754@qq.com
* @Date: 2023-03-13 14:54:26
* @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2023-03-13 15:00:55
- * @FilePath: \forest-fire\src\views\statistics\components\box\dataContent.vue
+ * @LastEditTime: 2024-12-02 21:23:17
+ * @FilePath: \bigScreen\src\views\companyInfo\components\box\fireTrend.vue
* @Description:
*
* Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
@@ -17,7 +17,8 @@
let image = ref(VITE_APP_BASE + 'img/mapicon/yjwz.png')
-
+const TableContent = ref(null)
+const curTableHeight = ref(0)
const loading = ref(false)
const tableData = ref([])
@@ -32,20 +33,11 @@
})
onMounted(() => {
+ curTableHeight.value = TableContent.value.offsetHeight
data.companyInfo = JSON.parse(localStorage.getItem('companyInfo'))
getLists()
})
-// 表格样式
-const tableCellStyle = ({ row, column }) => {
- return { background: "#152851", color: "#fff" }
-}
-// 表格表头样式
-const headerCellStyle = ({ }) => {
- return {
- background: "#152851",
- color: "#fff",
- }
-}
+
// 搜索条件
const formInline = reactive({
name: "",
@@ -57,7 +49,6 @@
pages.page = 1
pages.pageSize = 1000
pages.total = 0
- console.log("submit!")
getLists(formInline)
}
@@ -84,7 +75,7 @@
let picList = ref([])
// 查询分页数据
-function getLists(param = {}) {
+function getLists (param = {}) {
param.current = pages.page
param.size = pages.pageSize
param.firmId = data.companyInfo.id
@@ -107,11 +98,10 @@
let addPupoLayers = {}
// 行点击
-function rowClick(row, column, event) {
+function rowClick (row, column, event) {
if (!row.lng || !row.lat) {
return
}
- // console.log('点击了', row, column, event)
// 销毁之前的
destroy()
if (!addTileLayers[row.name]) {
@@ -124,8 +114,8 @@
</div>
`
let divIcon = new DC.DivIcon(
- new DC.Position(row.lng, row.lat, 64),
- `<div class="public-map-popup ${'qyfb-box'}">
+ new DC.Position(row.lng, row.lat, row.ele || 64),
+ `<div class="public-map-popup qyfb-box yjwz-height-box ">
${iconEl}
</div>`
)
@@ -137,15 +127,13 @@
if (picList.value.length == 0) {
return
}
- console.log('点击了', picList.value.length)
addPupoLayers['企业应急物资'] = new DC.HtmlLayer('企业应急物资')
window.$viewer.addLayer(addPupoLayers['企业应急物资'])
let iconEl = `<div class="marsBlueGradientPnl">
- <div>${attrParams.firmName}</div>
<img src="${picList.value[0].link}" />
</div>`
let divIcon = new DC.DivIcon(
- new DC.Position(attrParams.lng, attrParams.lat, 64),
+ new DC.Position(attrParams.lng, attrParams.lat, attrParams.ele || 64),
`<div class="public-map-popup-two">
${iconEl}
</div>`
@@ -166,30 +154,36 @@
}
// 销毁
-function destroy() {
+function destroy () {
let arr = Object.keys(addTileLayers)
arr.forEach(i => {
- addTileLayers[i] && window.$viewer.removeLayer(addTileLayers[i])
+ addTileLayers[i] && window.$viewer && window.$viewer.removeLayer(addTileLayers[i])
+ addTileLayers[i] = null
+ delete addTileLayers[i]
})
addTileLayers = {}
}
// 销毁
-function destroyPupoLayers() {
+function destroyPupoLayers () {
let arr = Object.keys(addPupoLayers)
arr.filter(i => i != 'hgyq').forEach(i => {
- addPupoLayers[i] && window.$viewer.removeLayer(addPupoLayers[i])
+ addPupoLayers[i] && window.$viewer && window.$viewer.removeLayer(addPupoLayers[i])
+ addPupoLayers[i] = null
+ delete addPupoLayers[i]
})
addPupoLayers = {}
}
onUnmounted(() => {
- console.log('销毁***************************')
destroy()
+ destroyPupoLayers()
+ addTileLayers = null
+ addPupoLayers = null
})
import { Search, Refresh } from '@element-plus/icons-vue'
</script>
<template>
- <div class="search-box w100 h100">
+ <div class="search-box w100 h100 flex f-d-c">
<el-form :inline="true" :model="formInline" class="demo-form-inline">
<el-form-item label="" class="form-item-input">
<el-input v-model="formInline.name" placeholder="请输入名称" clearable style="width: 120px" />
@@ -199,11 +193,11 @@
<el-button class="reset-btn" :icon="Refresh" @click="clearBtn">重 置</el-button>
</el-form-item>
</el-form>
+
<!-- <global-search :options="options" @searchBtn="searchBtn" @resetBtn="resetBtn" ref="SeachBarCondition"></global-search> -->
- <div class="table-box">
- <el-table :data="tableData" @row-click="rowClick" empty-text="" style="width: 100%"
- :header-cell-style="headerCellStyle" :cell-style="tableCellStyle"
- element-loading-background="rgba(122, 122, 122, 0.1)">
+ <div class="table-box h0 flex-1" ref="TableContent">
+ <el-table empty-text="暂无数据" border :data="tableData" @row-click="rowClick" style="width: 100%"
+ element-loading-background="rgba(122, 122, 122, 0.1)" :height="curTableHeight">
<el-table-column prop="name" label="名称" width="240" />
<el-table-column prop="numUnit" label="数量" />
<el-table-column prop="personInCha" label="负责人" />
@@ -212,7 +206,7 @@
<el-button link type="primary" size="small" :disabled="scope.row.lng == ''"
@click="rowClick(scope.row)">定位</el-button>
</template>
- </el-table-column> -->
+</el-table-column> -->
</el-table>
</div>
</div>
@@ -223,25 +217,10 @@
color: #fff !important;
}
-.search-box {
- padding: 10px;
-
- ::v-deep .el-table__body-wrapper {
- background-color: #152851;
- }
-}
-
.reset-btn {
color: #D4E8F8;
background: #43779B;
border-color: #43779B;
-}
-
-.search-box .table-box {
- height: 700px;
- overflow: scroll;
- // 隐藏滚动条
- scrollbar-width: none;
}
/* 当表格没有数据时,修改表格的背景颜色 */
--
Gitblit v1.9.3