|
|
@@ -1,4 +1,38 @@
|
|
|
<template>
|
|
|
+ <div class="water-page gis-page">
|
|
|
+ <div class="page-heading">
|
|
|
+ <div class="page-title">
|
|
|
+ <span class="page-title-icon"><el-icon><MapLocation/></el-icon></span>
|
|
|
+ <div><h2>监测设备 GIS 一张图</h2><span class="muted">设备点位分布与状态查询</span></div>
|
|
|
+ </div>
|
|
|
+ <div class="heading-actions">
|
|
|
+ <el-button :icon="Refresh" :loading="loading" @click="loadData">刷新</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <el-card shadow="never" class="water-panel filter-card">
|
|
|
+ <template #header>
|
|
|
+ <div class="card-title">
|
|
|
+ <span class="card-heading"><el-icon><Search/></el-icon><span>设备筛选</span></span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <el-form :inline="true" class="filter-form">
|
|
|
+ <el-form-item label="关键字">
|
|
|
+ <el-input v-model="searchKeyword" class="keyword-input" clearable placeholder="设备编号 / 名称 / 位置"
|
|
|
+ :prefix-icon="Search" @keyup.enter="loadData"/>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="设备类型">
|
|
|
+ <el-select v-model="selectedTypeId" class="status-select" clearable placeholder="全部设备类型">
|
|
|
+ <el-option v-for="item in typeOptions" :key="item.value" :label="item.label" :value="item.value"/>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" @click="loadData">查询</el-button>
|
|
|
+ <el-button @click="resetFilters">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+
|
|
|
<el-card shadow="never" class="water-panel map-card">
|
|
|
<WaterGisPageShell
|
|
|
embedded
|
|
|
@@ -190,11 +224,12 @@
|
|
|
</template>
|
|
|
</WaterGisPageShell>
|
|
|
</el-card>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
import { computed, nextTick, onMounted, ref } from 'vue'
|
|
|
-import { Aim, CircleCheck, CircleClose, Odometer, Refresh, Search, Warning } from '@element-plus/icons-vue'
|
|
|
+import { Aim, CircleCheck, CircleClose, MapLocation, Odometer, Refresh, Search, Warning } from '@element-plus/icons-vue'
|
|
|
import GisMapCanvas from '@/components/GisMapCanvas.vue'
|
|
|
import WaterGisPageShell from '@/components/WaterGisPageShell.vue'
|
|
|
import { getMonitoringPointColor, getMonitoringPointIcon, getMonitoringPointLabel, getMonitoringPointStatus, getMonitoringPointTagType } from '@/utils/gisMapColors'
|
|
|
@@ -331,6 +366,13 @@ async function loadData() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+function resetFilters() {
|
|
|
+ searchKeyword.value = ''
|
|
|
+ selectedTypeId.value = ''
|
|
|
+ statusFilters.value = ['normal', 'alarm', 'warning', 'workOrder', 'offline']
|
|
|
+ loadData()
|
|
|
+}
|
|
|
+
|
|
|
function fitBounds() {
|
|
|
gisMapRef.value?.fitBounds()
|
|
|
}
|
|
|
@@ -361,12 +403,6 @@ onMounted(loadData)
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.map-card {
|
|
|
- min-height: 560px;
|
|
|
- border: 1px solid #e1ebf3;
|
|
|
- border-radius: 8px;
|
|
|
- box-shadow: 0 5px 16px rgba(28, 75, 110, .05);
|
|
|
-}
|
|
|
.header-actions {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
@@ -518,3 +554,7 @@ onMounted(loadData)
|
|
|
}
|
|
|
}
|
|
|
</style>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+@use './waterGisPageTheme.scss';
|
|
|
+</style>
|