|
@@ -7,14 +7,14 @@
|
|
<div class="box-item">
|
|
<div class="box-item">
|
|
<div class="box-label">实况:</div>
|
|
<div class="box-label">实况:</div>
|
|
<div
|
|
<div
|
|
- v-for="(item, index) in option1"
|
|
|
|
- :key="index"
|
|
|
|
- :class="
|
|
|
|
- queryParams.value1 === '1' && queryParams.value2 === item.value
|
|
|
|
|
|
+ v-for="(item, index) in option1"
|
|
|
|
+ :key="index"
|
|
|
|
+ :class="
|
|
|
|
+ queryParams.history_time === item.value
|
|
? 'box-tag tag-active'
|
|
? 'box-tag tag-active'
|
|
: 'box-tag'
|
|
: 'box-tag'
|
|
"
|
|
"
|
|
- @click="handleClickMenu('1', item.value)"
|
|
|
|
|
|
+ @click="handleClickMenu('1', item.value)"
|
|
>
|
|
>
|
|
{{ item.text }}
|
|
{{ item.text }}
|
|
</div>
|
|
</div>
|
|
@@ -22,14 +22,14 @@
|
|
<div class="box-item">
|
|
<div class="box-item">
|
|
<div class="box-label">预警:</div>
|
|
<div class="box-label">预警:</div>
|
|
<div
|
|
<div
|
|
- v-for="(item, index) in option1"
|
|
|
|
- :key="index"
|
|
|
|
- :class="
|
|
|
|
- queryParams.value1 === '2' && queryParams.value2 === item.value
|
|
|
|
|
|
+ v-for="(item, index) in option1"
|
|
|
|
+ :key="index"
|
|
|
|
+ :class="
|
|
|
|
+ queryParams.future_time === item.value
|
|
? 'box-tag tag-active'
|
|
? 'box-tag tag-active'
|
|
: 'box-tag'
|
|
: 'box-tag'
|
|
"
|
|
"
|
|
- @click="handleClickMenu('2', item.value)"
|
|
|
|
|
|
+ @click="handleClickMenu('2', item.value)"
|
|
>
|
|
>
|
|
{{ item.text }}
|
|
{{ item.text }}
|
|
</div>
|
|
</div>
|
|
@@ -37,22 +37,23 @@
|
|
</div>
|
|
</div>
|
|
<div class="box1">
|
|
<div class="box1">
|
|
<van-search
|
|
<van-search
|
|
- v-model="keyword"
|
|
|
|
- placeholder="搜索"
|
|
|
|
- class="common-search"
|
|
|
|
- :left-icon="searchImg"
|
|
|
|
- show-action
|
|
|
|
- @search="onSearchKeyword"
|
|
|
|
|
|
+ v-model="queryParams.keyword"
|
|
|
|
+ placeholder="搜索"
|
|
|
|
+ class="common-search"
|
|
|
|
+ :left-icon="searchImg"
|
|
|
|
+ show-action
|
|
|
|
+ @search="onSearchKeyword"
|
|
>
|
|
>
|
|
<template #action>
|
|
<template #action>
|
|
<div class="search-btn" @click="onSearchKeyword">搜索</div>
|
|
<div class="search-btn" @click="onSearchKeyword">搜索</div>
|
|
</template>
|
|
</template>
|
|
</van-search>
|
|
</van-search>
|
|
<Select
|
|
<Select
|
|
- v-model="area"
|
|
|
|
- :columns="district_type"
|
|
|
|
- canSelectAll
|
|
|
|
- @confirm="onSelectConfirm"
|
|
|
|
|
|
+ v-model="queryParams.area_name"
|
|
|
|
+ :columns="district_type"
|
|
|
|
+ :customFieldName="{ text: 'label', value: 'label' }"
|
|
|
|
+ canSelectAll
|
|
|
|
+ @confirm="onSearchKeyword"
|
|
/>
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="card">
|
|
<div class="card">
|
|
@@ -66,21 +67,31 @@
|
|
>
|
|
>
|
|
<el-table-column
|
|
<el-table-column
|
|
label="位置"
|
|
label="位置"
|
|
- prop="name"
|
|
|
|
|
|
+ prop="address"
|
|
align="center"
|
|
align="center"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="雨量"
|
|
|
|
- prop="latitude"
|
|
|
|
|
|
+ label="雨量(mm)"
|
|
|
|
+ prop="rainfall"
|
|
align="center"
|
|
align="center"
|
|
width="80px"
|
|
width="80px"
|
|
/>
|
|
/>
|
|
<el-table-column
|
|
<el-table-column
|
|
- label="类型"
|
|
|
|
- prop="type"
|
|
|
|
- align="center"
|
|
|
|
- width="60px"
|
|
|
|
- />
|
|
|
|
|
|
+ label="类型"
|
|
|
|
+ prop="weather_warning_type"
|
|
|
|
+ align="center"
|
|
|
|
+ width="70px"
|
|
|
|
+ >
|
|
|
|
+ <template #default="scope">
|
|
|
|
+ <div style="display: flex; justify-content: center">
|
|
|
|
+ <img
|
|
|
|
+ :src="iconStatus(scope.row.weather_warninglevel)"
|
|
|
|
+ style="width: 40px"
|
|
|
|
+ alt=""
|
|
|
|
+ />
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column label="操作" align="center" width="50px">
|
|
<el-table-column label="操作" align="center" width="50px">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<div class="btn" @click="showDetails(scope.row)" style="color: #1d92ff">查看</div>
|
|
<div class="btn" @click="showDetails(scope.row)" style="color: #1d92ff">查看</div>
|
|
@@ -99,8 +110,14 @@ import closeImg from "@/assets/images/close.png";
|
|
import icon1 from "@/assets/images/disasterRiskMonitor/galeDisaster/icon1.png";
|
|
import icon1 from "@/assets/images/disasterRiskMonitor/galeDisaster/icon1.png";
|
|
import { ElTable, ElTableColumn } from "element-plus";
|
|
import { ElTable, ElTableColumn } from "element-plus";
|
|
import RainfallMonitoringView from "@/views/disasterRiskMonitor/rainfallMonitoringView.vue";
|
|
import RainfallMonitoringView from "@/views/disasterRiskMonitor/rainfallMonitoringView.vue";
|
|
-import { getPointInfo } from "@/api/disasterRiskMonitor/rainfall";
|
|
|
|
|
|
+import {getGeologicalDisaster, getPointInfo, getRainhouseSites} from "@/api/disasterRiskMonitor/rainfall";
|
|
import {useDict} from "@/utils/dict";
|
|
import {useDict} from "@/utils/dict";
|
|
|
|
+import {deepClone} from "@/utils";
|
|
|
|
+import rainWhite from "@/assets/images/map/warningInfo/ic_rainstorm_white.png";
|
|
|
|
+import rainBlue from "@/assets/images/map/warningInfo/ic_rainstorm_blue.png";
|
|
|
|
+import rainYellow from "@/assets/images/map/warningInfo/ic_rainstorm_yellow.png";
|
|
|
|
+import rainOrange from "@/assets/images/map/warningInfo/ic_rainstorm_orange.png";
|
|
|
|
+import rainRed from "@/assets/images/map/warningInfo/ic_rainstorm_red.png";
|
|
|
|
|
|
const { district_type } = toRefs<any>(useDict('district_type'));
|
|
const { district_type } = toRefs<any>(useDict('district_type'));
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
@@ -116,15 +133,24 @@ const option1 = reactive([
|
|
{ text: "24h", value: "24" }
|
|
{ text: "24h", value: "24" }
|
|
]);
|
|
]);
|
|
const queryParams = reactive({
|
|
const queryParams = reactive({
|
|
- value1: "1",
|
|
|
|
- value2: "24",
|
|
|
|
- type: "",
|
|
|
|
- level: "",
|
|
|
|
- area: ""
|
|
|
|
|
|
+ area_name: "",
|
|
|
|
+ history_time: "24",
|
|
|
|
+ future_time: "",
|
|
|
|
+ pageSize: "",
|
|
|
|
+ keyword: ""
|
|
});
|
|
});
|
|
const handleClickMenu = (value1, value2) => {
|
|
const handleClickMenu = (value1, value2) => {
|
|
- queryParams.value1 = value1;
|
|
|
|
- queryParams.value2 = value2;
|
|
|
|
|
|
+ if (value1 === "1") {
|
|
|
|
+ if (!!queryParams.future_time) {
|
|
|
|
+ queryParams.future_time = "";
|
|
|
|
+ }
|
|
|
|
+ queryParams.history_time = value2;
|
|
|
|
+ } else {
|
|
|
|
+ if (!!queryParams.history_time) {
|
|
|
|
+ queryParams.history_time = "";
|
|
|
|
+ }
|
|
|
|
+ queryParams.future_time = value2;
|
|
|
|
+ }
|
|
};
|
|
};
|
|
const getTableRowClass = ({ rowIndex }) => {
|
|
const getTableRowClass = ({ rowIndex }) => {
|
|
return rowIndex % 2 === 0 ? "" : "common-table-tr";
|
|
return rowIndex % 2 === 0 ? "" : "common-table-tr";
|
|
@@ -132,12 +158,27 @@ const getTableRowClass = ({ rowIndex }) => {
|
|
const showDetails = row => {
|
|
const showDetails = row => {
|
|
router.push({ name: "RainfallMonitoringView", query: { id: row.id } });
|
|
router.push({ name: "RainfallMonitoringView", query: { id: row.id } });
|
|
};
|
|
};
|
|
-const getData = () => {
|
|
|
|
- getPointInfo("17").then(res => {
|
|
|
|
- detailsData.value.dataList = res.data.list;
|
|
|
|
|
|
+const onSearchKeyword = () => {
|
|
|
|
+ let temp = deepClone(queryParams);
|
|
|
|
+ temp.area_name = temp.area_name[0];
|
|
|
|
+ getGeologicalDisaster(temp).then(res => {
|
|
|
|
+ detailsData.value.dataList = res.data;
|
|
});
|
|
});
|
|
};
|
|
};
|
|
-getData();
|
|
|
|
|
|
+onSearchKeyword();
|
|
|
|
+const iconStatus = level => {
|
|
|
|
+ if (level === "5") {
|
|
|
|
+ return rainWhite;
|
|
|
|
+ } else if (level === "4") {
|
|
|
|
+ return rainBlue;
|
|
|
|
+ } else if (level === "3") {
|
|
|
|
+ return rainYellow;
|
|
|
|
+ } else if (level === "2") {
|
|
|
|
+ return rainOrange;
|
|
|
|
+ } else {
|
|
|
|
+ return rainRed;
|
|
|
|
+ }
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@@ -456,4 +497,7 @@ getData();
|
|
text-align: center;
|
|
text-align: center;
|
|
margin-bottom: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
}
|
|
|
|
+:deep(.select-box) {
|
|
|
|
+ flex-shrink: 0;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|