From c7af18dccc54e29343c82cf34f7d145fa1abfbcd Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Tue, 26 Nov 2024 14:35:27 +0800
Subject: [PATCH] 应急空间页面样式
---
src/views/companyInfo/components/box/dataContent.vue | 68 ++++++++++++++++++----------------
1 files changed, 36 insertions(+), 32 deletions(-)
diff --git a/src/views/companyInfo/components/box/dataContent.vue b/src/views/companyInfo/components/box/dataContent.vue
index 7d22a27..96711aa 100644
--- a/src/views/companyInfo/components/box/dataContent.vue
+++ b/src/views/companyInfo/components/box/dataContent.vue
@@ -4,30 +4,37 @@
* @LastEditors: shuishen 1109946754@qq.com
* @LastEditTime: 2024-11-12 18:10:32
* @FilePath: \bigScreen\src\views\space\components\leftContainer.vue
- * @Description:
- *
- * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
+ * @Description:
+ *
+ * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved.
-->
<script setup>
-import { getList } from "@/api/space/space"
+import { getFacilityList } from "@/api/facility"
import { onUnmounted, reactive } from 'vue'
+const { VITE_APP_BASE } = import.meta.env
const resData = reactive({
data: [{
label: '防线一',
value: '1',
type: 1,
- remark: '防火提及配套设置、装置围堰、罐区围堰'
+ remark: '防火提及配套设置、装置围堰、罐区围堰',
+ showPanel: false,
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/wy.png'
}, {
label: '防线二',
value: '2',
- type: 1,
- remark: '雨污水排口一体化闸阀、车间收集池、雨污管阀'
+ type: 2,
+ remark: '雨污水排口一体化闸阀、车间收集池、雨污管阀',
+ showPanel: false,
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/ysf.png'
},
{
label: '防线三',
value: '3',
- type: 1,
- remark: '事故应急池、雨水收集池'
+ type: 3,
+ remark: '事故应急池、雨水收集池',
+ showPanel: false,
+ backgroundIcon: VITE_APP_BASE + 'img/mapicon/yjc.png'
}
]
})
@@ -35,38 +42,34 @@
let addTileLayers = {}
const handleCheckChange = (row) => {
let companyInfo = JSON.parse(localStorage.getItem('companyInfo'))
- console.log(row)
+ // console.log(row)
resData.data.forEach(item => {
if (row.value === item.value) {
if (!addTileLayers[item.label]) {
addTileLayers[item.label] = new DC.HtmlLayer(item.label)
window.$viewer.addLayer(addTileLayers[item.label])
- getList({
+ getFacilityList({
firmId: companyInfo.id,
size: 1000,
- type: item.type,
+ facLevel: item.type
}).then(res => {
- let data = res.data.data.records
+ let data = res.data.data
data.filter(i => i.lng && i.lng != '' && i.lat && i.lat != '').forEach(i => {
let iconEl = ''
if ('showPanel' in item && item.showPanel == false) {
if (item.backgroundIcon) {
iconEl = `
- <div class="map-name">${i[item.showParams] || i.name}</div>
- <div class="map-icon">
- <img src="${item.backgroundIcon}">
- </div>
- `
+ <div class="map-name">${i[item.showParams] || i.name}</div>
+ <div class="map-icon">
+ <img src="${item.backgroundIcon}">
+ </div>
+ `
}
} else {
- iconEl = `<div class="marsBlueGradientPnl">
- <div>${item.remark}</div> </div>`
+ iconEl = `<div class="marsBlueGradientPnl"> <div>${i.name}</div> </div>`
}
let divIcon = new DC.DivIcon(
- new DC.Position(i.lng, i.lat, 0),
- `<div class="public-map-popup">
- ${iconEl}
- </div>`
+ new DC.Position(i.lng, i.lat, 64), `<div class="public-map-popup ${'yjc-box'}"> ${iconEl} </div>`
)
divIcon.attrParams = i
@@ -106,14 +109,14 @@
onMounted(() => {
tabClick(resData.data[0])
-}),
+})
- onUnmounted(() => {
- let arr = Object.keys(addTileLayers)
- arr.forEach(i => {
- addTileLayers[i] && window.$viewer.removeLayer(addTileLayers[i])
- })
+onUnmounted(() => {
+ let arr = Object.keys(addTileLayers)
+ arr.forEach(i => {
+ addTileLayers[i] && window.$viewer.removeLayer(addTileLayers[i])
})
+})
</script>
<template>
@@ -152,9 +155,10 @@
&.on {
position: relative;
- color: #75b1ff;
+ // color: #75b1ff;
+ box-shadow: inset 0 0 100px #2a8ef1;
}
}
}
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3