|
@@ -2,45 +2,57 @@
|
|
|
<div class="container">
|
|
|
<div class="box1">
|
|
|
<van-search
|
|
|
- v-model="keyword"
|
|
|
- placeholder="请输入位置信息"
|
|
|
- class="common-search"
|
|
|
- :left-icon="searchImg"
|
|
|
- show-action
|
|
|
- @search="onSearchKeyword"
|
|
|
+ v-model="keyword"
|
|
|
+ placeholder="请输入位置信息"
|
|
|
+ class="common-search"
|
|
|
+ :left-icon="searchImg"
|
|
|
+ show-action
|
|
|
+ @search="onSearchKeyword"
|
|
|
>
|
|
|
<template #action>
|
|
|
<div class="search-btn" @click="onSearchKeyword">搜索</div>
|
|
|
</template>
|
|
|
</van-search>
|
|
|
</div>
|
|
|
- <Map ref="mapRef" class="map" active-map="satellite" :point-type="pointType" :event-details="eventDetails" />
|
|
|
+ <Map
|
|
|
+ ref="mapRef"
|
|
|
+ class="map"
|
|
|
+ active-map="satellite"
|
|
|
+ :event-details="eventDetails"
|
|
|
+ @onLoadCompleted="initData"
|
|
|
+ />
|
|
|
<div class="box2">
|
|
|
<div class="title-box">
|
|
|
<div class="title"><i class="icon-speaker" />详情信息</div>
|
|
|
</div>
|
|
|
- <van-text-ellipsis class="text-box" :content="detailsData.text" rows="2" expand-text="展开" collapse-text="收起" />
|
|
|
+ <van-text-ellipsis
|
|
|
+ class="text-box"
|
|
|
+ :content="detailsData.text"
|
|
|
+ rows="2"
|
|
|
+ expand-text="展开"
|
|
|
+ collapse-text="收起"
|
|
|
+ />
|
|
|
</div>
|
|
|
<div class="card-box2">
|
|
|
<div
|
|
|
- v-for="(item, index) in menu1"
|
|
|
- :key="index"
|
|
|
- :class="item.checked ? 'card-item checked' : 'card-item'"
|
|
|
- @click="handleClick(item)"
|
|
|
+ v-for="(item, index) in menu1"
|
|
|
+ :key="index"
|
|
|
+ :class="item.checked ? 'card-item checked' : 'card-item'"
|
|
|
+ @click="handleClick(item)"
|
|
|
>
|
|
|
<i
|
|
|
- class="icon"
|
|
|
- :style="{ backgroundImage: 'url(' + item.icon + ')' }"
|
|
|
+ class="icon"
|
|
|
+ :style="{ backgroundImage: 'url(' + item.icon + ')' }"
|
|
|
/>
|
|
|
<div class="text1">{{ item.name }}</div>
|
|
|
<div>{{ item.num }}</div>
|
|
|
</div>
|
|
|
<div class="card-item" @click="showMenu = !showMenu">
|
|
|
<i
|
|
|
- class="icon"
|
|
|
- :style="{
|
|
|
- backgroundImage: 'url(' + getImageUrl1('icon5') + ')'
|
|
|
- }"
|
|
|
+ class="icon"
|
|
|
+ :style="{
|
|
|
+ backgroundImage: 'url(' + getImageUrl('icon9.png') + ')'
|
|
|
+ }"
|
|
|
/>
|
|
|
<div class="text1" style="color: #2c81ff">
|
|
|
{{ showMenu ? "收起" : "展开" }}
|
|
@@ -49,95 +61,242 @@
|
|
|
</div>
|
|
|
<div v-show="showMenu" class="card-box2">
|
|
|
<div
|
|
|
- v-for="(item, index) in menu2"
|
|
|
- :key="index"
|
|
|
- :class="item.checked ? 'card-item checked' : 'card-item'"
|
|
|
- @click="handleClick(item)"
|
|
|
+ v-for="(item, index) in menu2"
|
|
|
+ :key="index"
|
|
|
+ :class="item.checked ? 'card-item checked' : 'card-item'"
|
|
|
+ @click="handleClick(item)"
|
|
|
>
|
|
|
<i
|
|
|
- class="icon"
|
|
|
- :style="{ backgroundImage: 'url(' + item.icon + ')' }"
|
|
|
+ class="icon"
|
|
|
+ :style="{ backgroundImage: 'url(' + item.icon + ')' }"
|
|
|
/>
|
|
|
<div class="text1">{{ item.name }}</div>
|
|
|
<div>{{ item.num }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-table :data="detailsData.dataList" table-layout="auto" header-cell-class-name="common-table-header" :row-class-name="getTableRowClass">
|
|
|
+ <el-table
|
|
|
+ :data="detailsData.dataList"
|
|
|
+ table-layout="auto"
|
|
|
+ header-cell-class-name="common-table-header"
|
|
|
+ :row-class-name="getTableRowClass"
|
|
|
+ >
|
|
|
<el-table-column label="站点" prop="data1" align="center" />
|
|
|
<el-table-column label="政区" prop="data2" align="center" />
|
|
|
<el-table-column label="时间" prop="data3" align="center" />
|
|
|
<el-table-column label="库水位(m)" prop="data4" align="center" />
|
|
|
- <el-table-column label="超汛限水位(m)" prop="data5" align="center" sortable />
|
|
|
+ <el-table-column
|
|
|
+ label="超汛限水位(m)"
|
|
|
+ prop="data5"
|
|
|
+ align="center"
|
|
|
+ sortable
|
|
|
+ />
|
|
|
</el-table>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup name="reservoirMonitor">
|
|
|
import searchImg from "@/assets/images/search.png";
|
|
|
-import {onMounted, reactive, ref} from "vue";
|
|
|
-import {ElTable, ElTableColumn} from "element-plus";
|
|
|
-
|
|
|
-const getImageUrl1 = name => {
|
|
|
+import { onMounted, reactive, ref } from "vue";
|
|
|
+import { ElTable, ElTableColumn } from "element-plus";
|
|
|
+let mapRef = ref();
|
|
|
+const getImageUrl = name => {
|
|
|
return new URL(
|
|
|
- `../../assets/images/disasterRiskMonitor/geologicalDisaster/${name}.png`,
|
|
|
- import.meta.url
|
|
|
+ `../../assets/images/disasterRiskMonitor/reservoirMonitor/${name}`,
|
|
|
+ import.meta.url
|
|
|
).href;
|
|
|
};
|
|
|
-const getImageUrl2 = name => {
|
|
|
- return new URL(
|
|
|
- `../../assets/images/disasterRiskMonitor/reservoirMonitor/${name}.png`,
|
|
|
- import.meta.url
|
|
|
- ).href;
|
|
|
-};
|
|
|
-let pointType = ref([]);
|
|
|
let eventDetails = ref({});
|
|
|
-let keyword = ref('');
|
|
|
+let keyword = ref("");
|
|
|
let menu1 = ref([
|
|
|
- { name: '大型', num: 0, icon: getImageUrl1('icon1'), checked: true },
|
|
|
- { name: '中型', num: 0, icon: getImageUrl1('icon2'), checked: true },
|
|
|
- { name: '小I型', num: 0, icon: getImageUrl1('icon3'), checked: true },
|
|
|
- { name: '小II型', num: 0, icon: getImageUrl1('icon4'), checked: false },
|
|
|
+ { name: "大型", num: 2, icon: getImageUrl("icon5.png"), checked: true },
|
|
|
+ { name: "中型", num: 1, icon: getImageUrl("icon6.png"), checked: true },
|
|
|
+ { name: "小I型", num: 2, icon: getImageUrl("icon7.png"), checked: true },
|
|
|
+ { name: "小II型", num: 1, icon: getImageUrl("icon8.png"), checked: false }
|
|
|
]);
|
|
|
let showMenu = ref(true);
|
|
|
let menu2 = ref([
|
|
|
- { name: '超汛限', num: 0, icon: getImageUrl2('icon1'), checked: false },
|
|
|
- { name: '低旱警', num: 0, icon: getImageUrl2('icon2'), checked: false },
|
|
|
- { name: '病险', num: 0, icon: getImageUrl2('icon3'), checked: false },
|
|
|
- { name: '在建', num: 0, icon: getImageUrl2('icon4'), checked: false }
|
|
|
+ { name: "超汛限", num: 1, icon: getImageUrl("icon1.png"), checked: false },
|
|
|
+ { name: "低旱警", num: 1, icon: getImageUrl("icon2.png"), checked: false },
|
|
|
+ { name: "病险", num: 1, icon: getImageUrl("icon3.png"), checked: false },
|
|
|
+ { name: "在建", num: 1, icon: getImageUrl("icon4.png"), checked: false }
|
|
|
]);
|
|
|
+let iconList = reactive({
|
|
|
+ "1": {
|
|
|
+ image: getImageUrl("icon5.png"),
|
|
|
+ size: [20, 20]
|
|
|
+ },
|
|
|
+ "2": {
|
|
|
+ image: getImageUrl("icon6.png"),
|
|
|
+ size: [20, 20]
|
|
|
+ },
|
|
|
+ "3": {
|
|
|
+ image: getImageUrl("icon7.png"),
|
|
|
+ size: [20, 20]
|
|
|
+ },
|
|
|
+ "4": {
|
|
|
+ image: getImageUrl("icon8.png"),
|
|
|
+ size: [20, 20]
|
|
|
+ },
|
|
|
+ "5": {
|
|
|
+ image: getImageUrl("icon1.png"),
|
|
|
+ size: [20, 20]
|
|
|
+ },
|
|
|
+ "6": {
|
|
|
+ image: getImageUrl("icon2.png"),
|
|
|
+ size: [20, 20]
|
|
|
+ },
|
|
|
+ "7": {
|
|
|
+ image: getImageUrl("icon3.png"),
|
|
|
+ size: [20, 20]
|
|
|
+ },
|
|
|
+ "8": {
|
|
|
+ image: getImageUrl("icon4.png"),
|
|
|
+ size: [20, 20]
|
|
|
+ }
|
|
|
+});
|
|
|
const detailsData = ref({
|
|
|
- text: '',
|
|
|
+ text: "",
|
|
|
dataList: []
|
|
|
});
|
|
|
|
|
|
-const onSearchKeyword = (val) => {
|
|
|
+const onSearchKeyword = val => {
|
|
|
keyword.value = val;
|
|
|
initData();
|
|
|
-}
|
|
|
+};
|
|
|
|
|
|
const onSearchCancel = () => {
|
|
|
- keyword.value = '';
|
|
|
+ keyword.value = "";
|
|
|
initData();
|
|
|
-}
|
|
|
+};
|
|
|
const handleClick = item => {
|
|
|
item.checked = !item.checked;
|
|
|
};
|
|
|
const initData = () => {
|
|
|
+ const dom = mapRef.value;
|
|
|
detailsData.value = {
|
|
|
- text: '就诞生了附件两款发动机了解案件来看世界分手机否结束骄傲就开了房间离开家可怜见立刻就杀了对方吉林省大家逻辑了及时了解多方了解逻辑范德萨发给收到发给对方独放个',
|
|
|
+ text: "2024年10月30日 20:45,大洲水库当前水位稳定,低于警戒水位,但近期连续降雨导致入库流量较大。水库管理处已调整出库流量,确保水库运行安全。",
|
|
|
dataList: [
|
|
|
- { data1: '高州(四)', data2: '鉴江', data3: '10日10:00', data4: 27.82, data5: -2.68 },
|
|
|
- { data1: '化州(城)', data2: '鉴江', data3: '10日10:00', data4: 26.82, data5: -2.71 },
|
|
|
+ {
|
|
|
+ data1: "高州水库",
|
|
|
+ data2: "高州市",
|
|
|
+ data3: "2024-10-27 20:20",
|
|
|
+ data4: 35.65,
|
|
|
+ data5: 0.15,
|
|
|
+ longitude: "111.01975",
|
|
|
+ latitude: "22.145935",
|
|
|
+ dataType: "1"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ data1: "石骨水库",
|
|
|
+ data2: "信宜市",
|
|
|
+ data3: "2024-10-27 20:20",
|
|
|
+ data4: 34.78,
|
|
|
+ data5: -0.22,
|
|
|
+ longitude: "110.774757",
|
|
|
+ latitude: "21.7847",
|
|
|
+ dataType: "2"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ data1: "大王江水库",
|
|
|
+ data2: "电白区",
|
|
|
+ data3: "2024-10-27 20:20",
|
|
|
+ data4: 36.45,
|
|
|
+ data5: 0.45,
|
|
|
+ longitude: "111.057813",
|
|
|
+ latitude: "21.782634",
|
|
|
+ dataType: "3"
|
|
|
+ },
|
|
|
+ // 中型水库
|
|
|
+ {
|
|
|
+ data1: "金塘水库",
|
|
|
+ data2: "电白区",
|
|
|
+ data3: "2024-10-27 20:20",
|
|
|
+ data4: 28.56,
|
|
|
+ data5: -0.16,
|
|
|
+ longitude: "110.897439",
|
|
|
+ latitude: "21.725355",
|
|
|
+ dataType: "4"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ data1: "马踏水库",
|
|
|
+ data2: "电白区",
|
|
|
+ data3: "2024-10-27 20:20",
|
|
|
+ data4: 27.34,
|
|
|
+ data5: -0.66,
|
|
|
+ longitude: "111.064368",
|
|
|
+ latitude: "21.83379",
|
|
|
+ dataType: "5"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ data1: "石鼓水库",
|
|
|
+ data2: "高州市",
|
|
|
+ data3: "2024-10-27 20:20",
|
|
|
+ data4: 30.23,
|
|
|
+ data5: -0.77,
|
|
|
+ longitude: "110.774757",
|
|
|
+ latitude: "21.7847",
|
|
|
+ dataType: "6"
|
|
|
+ },
|
|
|
+ // 小I型水库
|
|
|
+ {
|
|
|
+ data1: "南塘水库",
|
|
|
+ data2: "高州市",
|
|
|
+ data3: "2024-10-27 20:20",
|
|
|
+ data4: 25.89,
|
|
|
+ data5: -0.91,
|
|
|
+ longitude: "110.849982",
|
|
|
+ latitude: "21.773137",
|
|
|
+ dataType: "7"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ data1: "公馆水库",
|
|
|
+ data2: "茂南区",
|
|
|
+ data3: "2024-10-27 20:20",
|
|
|
+ data4: 24.56,
|
|
|
+ data5: -1.04,
|
|
|
+ longitude: "110.842436",
|
|
|
+ latitude: "21.680666",
|
|
|
+ dataType: "8"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ data1: "袂花江水库",
|
|
|
+ data2: "电白区",
|
|
|
+ data3: "2024-10-27 20:20",
|
|
|
+ data4: 23.45,
|
|
|
+ data5: -1.15,
|
|
|
+ longitude: "110.934642",
|
|
|
+ latitude: "21.600557",
|
|
|
+ dataType: "1"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ data1: "羊角水库",
|
|
|
+ data2: "电白区",
|
|
|
+ data3: "2024-10-27 20:20",
|
|
|
+ data4: 22.87,
|
|
|
+ data5: -1.27,
|
|
|
+ longitude: "111.313499",
|
|
|
+ latitude: "21.697254",
|
|
|
+ dataType: "3"
|
|
|
+ }
|
|
|
]
|
|
|
- }
|
|
|
-}
|
|
|
+ };
|
|
|
+ detailsData.value.dataList.forEach(item => {
|
|
|
+ const icon =
|
|
|
+ item.dataType && !!iconList[item.dataType].image
|
|
|
+ ? iconList[item.dataType].image
|
|
|
+ : "";
|
|
|
+ item.icon = icon;
|
|
|
+ item.image = icon;
|
|
|
+ item.imageHover = icon;
|
|
|
+ item.size = iconList[item.dataType].size;
|
|
|
+ item.lnglat = [item.longitude, item.latitude];
|
|
|
+ });
|
|
|
+ dom.addMarker(detailsData.value.dataList);
|
|
|
+};
|
|
|
// table样式
|
|
|
const getTableRowClass = ({ rowIndex }) => {
|
|
|
return rowIndex % 2 === 0 ? "" : "common-table-tr";
|
|
|
};
|
|
|
-onMounted(() => {
|
|
|
- initData();
|
|
|
-})
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -152,9 +311,10 @@ onMounted(() => {
|
|
|
position: relative;
|
|
|
width: 344px;
|
|
|
min-height: 114px;
|
|
|
- background: url('@/assets/images/disasterRiskMonitor/riverMonitor/box1.png') no-repeat;
|
|
|
+ background: url("@/assets/images/disasterRiskMonitor/riverMonitor/box1.png")
|
|
|
+ no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
- box-shadow:0 2px 4px 0 rgba(228, 240, 255, 1);
|
|
|
+ box-shadow: 0 2px 4px 0 rgba(228, 240, 255, 1);
|
|
|
padding: 35px 0 0 0;
|
|
|
.title-box {
|
|
|
position: absolute;
|
|
@@ -163,25 +323,26 @@ onMounted(() => {
|
|
|
height: 30px;
|
|
|
background-color: #ffffff; /* 背景颜色 */
|
|
|
transform: skewX(-20deg); /* 斜切变形 */
|
|
|
- box-shadow:0 2px 4px 0 rgba(250, 217, 97, 0.18);
|
|
|
+ box-shadow: 0 2px 4px 0 rgba(250, 217, 97, 0.18);
|
|
|
padding: 0 10px;
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
border-radius: 2px;
|
|
|
&::after {
|
|
|
- content: '';
|
|
|
+ content: "";
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
right: -6px;
|
|
|
transform: skewX(20deg);
|
|
|
width: 11px;
|
|
|
height: 27px;
|
|
|
- background: url('@/assets/images/disasterRiskMonitor/riverMonitor/thickness.png') no-repeat;
|
|
|
+ background: url("@/assets/images/disasterRiskMonitor/riverMonitor/thickness.png")
|
|
|
+ no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
}
|
|
|
.title {
|
|
|
font-size: 14px;
|
|
|
- color: #FFAF00;
|
|
|
+ color: #ffaf00;
|
|
|
transform: skewX(20deg);
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
@@ -189,7 +350,8 @@ onMounted(() => {
|
|
|
display: inline-block;
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
- background: url('@/assets/images/disasterRiskMonitor/riverMonitor/speaker.png') no-repeat;
|
|
|
+ background: url("@/assets/images/disasterRiskMonitor/riverMonitor/speaker.png")
|
|
|
+ no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
margin-right: 5px;
|
|
|
}
|
|
@@ -244,7 +406,7 @@ onMounted(() => {
|
|
|
width: 10px;
|
|
|
height: 11px;
|
|
|
background: url("@/assets/images/disasterRiskMonitor/geologicalDisaster/checked.png")
|
|
|
- no-repeat;
|
|
|
+ no-repeat;
|
|
|
background-size: 100% 100%;
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
@@ -333,26 +495,35 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
.text {
|
|
|
- color: #2C81FF;
|
|
|
+ color: #2c81ff;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
.icon1 {
|
|
|
- background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon1.png') no-repeat;
|
|
|
+ background: url("@/assets/images/disasterRiskMonitor/riverMonitor/icon1.png")
|
|
|
+ no-repeat;
|
|
|
}
|
|
|
.icon2 {
|
|
|
- background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon2.png') no-repeat;
|
|
|
+ background: url("@/assets/images/disasterRiskMonitor/riverMonitor/icon2.png")
|
|
|
+ no-repeat;
|
|
|
}
|
|
|
.icon3 {
|
|
|
- background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon3.png') no-repeat;
|
|
|
+ background: url("@/assets/images/disasterRiskMonitor/riverMonitor/icon3.png")
|
|
|
+ no-repeat;
|
|
|
}
|
|
|
.icon4 {
|
|
|
- background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon4.png') no-repeat;
|
|
|
+ background: url("@/assets/images/disasterRiskMonitor/riverMonitor/icon4.png")
|
|
|
+ no-repeat;
|
|
|
}
|
|
|
.icon5 {
|
|
|
- background: url('@/assets/images/disasterRiskMonitor/riverMonitor/icon5.png') no-repeat;
|
|
|
+ background: url("@/assets/images/disasterRiskMonitor/riverMonitor/icon5.png")
|
|
|
+ no-repeat;
|
|
|
}
|
|
|
-.icon1, .icon2, .icon3, .icon4, .icon5 {
|
|
|
+.icon1,
|
|
|
+.icon2,
|
|
|
+.icon3,
|
|
|
+.icon4,
|
|
|
+.icon5 {
|
|
|
width: 32px;
|
|
|
height: 33px;
|
|
|
background-size: 100% 100%;
|