|
@@ -0,0 +1,289 @@
|
|
|
+<template>
|
|
|
+ <div class="dialog-container">
|
|
|
+ <div class="close-btn" @click="handleClose"></div>
|
|
|
+ <div class="gradient-text title">降雨量排行榜</div>
|
|
|
+ <div class="table">
|
|
|
+ <div class="table-header">
|
|
|
+ <div class="td">序号</div>
|
|
|
+ <div class="td td-cursor">
|
|
|
+ <span>县区</span>
|
|
|
+ <i class="down-icon" />
|
|
|
+ </div>
|
|
|
+ <div class="td td-cursor">
|
|
|
+ <span>街镇</span>
|
|
|
+ <i class="down-icon" />
|
|
|
+ </div>
|
|
|
+ <div class="td">站址</div>
|
|
|
+ <div class="td td-cursor">
|
|
|
+ <span>雨量(mm)</span>
|
|
|
+ <i :class="queryParams.sort === 'desc' ? 'desc-icon' : 'asc-icon'" @click="handleSort" />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-for="(item, index) in rangeData" :key="index" class="tr">
|
|
|
+ <div class="td">
|
|
|
+ <div :class="getRankClass(item.rn)">{{ item.rn }}</div>
|
|
|
+ </div>
|
|
|
+ <div class="td">{{ item.area }}</div>
|
|
|
+ <div class="td">{{ item.township }}</div>
|
|
|
+ <div class="td btn3">
|
|
|
+ <div class="chart-icon"></div>
|
|
|
+ {{ item.address }}
|
|
|
+ </div>
|
|
|
+ <div class="gradient-text2 td">{{ item.rainfall }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="footer">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ :hide-on-single-page="true"
|
|
|
+ layout="total, prev, pager, next"
|
|
|
+ :total="total"
|
|
|
+ :page-size="queryParams.size"
|
|
|
+ :current-page="queryParams.current"
|
|
|
+ @current-change="handleChangePage"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script lang="ts" setup name="NearbyVideos">
|
|
|
+import { getRainfallRange } from '@/api/globalMap/rainMonitor';
|
|
|
+
|
|
|
+interface Props {
|
|
|
+ modelValue: boolean;
|
|
|
+ location: string | number[];
|
|
|
+}
|
|
|
+const props = withDefaults(defineProps<Props>(), {});
|
|
|
+const emits = defineEmits(['update:modelValue']);
|
|
|
+const rangeData = ref([]);
|
|
|
+const queryParams = reactive({
|
|
|
+ current: 1,
|
|
|
+ size: 10,
|
|
|
+ sort: 'desc'
|
|
|
+});
|
|
|
+const total = ref(0);
|
|
|
+const getRankClass = (rank) => {
|
|
|
+ let res = 'rank-other';
|
|
|
+ if (rank === 1) {
|
|
|
+ res = 'rank1';
|
|
|
+ } else if (rank === 2) {
|
|
|
+ res = 'rank2';
|
|
|
+ } else if (rank === 3) {
|
|
|
+ res = 'rank3';
|
|
|
+ }
|
|
|
+ return res;
|
|
|
+};
|
|
|
+const handleGetRainfallRange = () => {
|
|
|
+ getRainfallRange(queryParams).then((res) => {
|
|
|
+ rangeData.value = res.rows;
|
|
|
+ });
|
|
|
+};
|
|
|
+const handleSort = () => {
|
|
|
+ if (queryParams.sort === 'desc') {
|
|
|
+ queryParams.sort = 'asc';
|
|
|
+ } else {
|
|
|
+ queryParams.sort = 'desc';
|
|
|
+ }
|
|
|
+ handleGetRainfallRange();
|
|
|
+};
|
|
|
+function handleChangePage(newNum) {
|
|
|
+ queryParams.current = newNum;
|
|
|
+ initData();
|
|
|
+}
|
|
|
+const initData = () => {
|
|
|
+ getRainfallRange(queryParams).then((res) => {
|
|
|
+ total.value = res.total;
|
|
|
+ rangeData.value = res.rows;
|
|
|
+ });
|
|
|
+};
|
|
|
+const handleClose = () => {
|
|
|
+ emits('update:modelValue', false);
|
|
|
+};
|
|
|
+onMounted(() => {
|
|
|
+ initData();
|
|
|
+});
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.dialog-container {
|
|
|
+ position: fixed;
|
|
|
+ top: 50%;
|
|
|
+ left: 50%;
|
|
|
+ transform: translate(-50%, -50%);
|
|
|
+ z-index: 9;
|
|
|
+ width: 2001px;
|
|
|
+ height: 1562px;
|
|
|
+ background: url('@/assets/images/map/rightMenu/rainMonitor/dialog2.png') no-repeat;
|
|
|
+ padding: 170px 30px 20px 40px;
|
|
|
+ font-size: 36px;
|
|
|
+ color: #ffffff;
|
|
|
+}
|
|
|
+.title {
|
|
|
+ font-size: 84px;
|
|
|
+ position: absolute;
|
|
|
+ top: 25px;
|
|
|
+ left: 70px;
|
|
|
+}
|
|
|
+.close-btn {
|
|
|
+ position: absolute;
|
|
|
+ top: 0px;
|
|
|
+ right: 0px;
|
|
|
+ width: 75px;
|
|
|
+ height: 70px;
|
|
|
+ background: url('@/assets/images/map/rightMenu/close.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ cursor: pointer;
|
|
|
+}
|
|
|
+.table {
|
|
|
+ margin-left: 28px;
|
|
|
+ .table-header {
|
|
|
+ width: 1864px;
|
|
|
+ height: 96px;
|
|
|
+ background: url('@/assets/images/map/rightMenu/rainMonitor/header.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ .td-cursor {
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .tr {
|
|
|
+ width: 1864px;
|
|
|
+ height: 96px;
|
|
|
+ background: url('@/assets/images/map/rightMenu/rainMonitor/tr.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ margin-top: 10px;
|
|
|
+ .btn3 {
|
|
|
+ cursor: pointer;
|
|
|
+ color: #00d0ee;
|
|
|
+ display: flex;
|
|
|
+ .chart-icon {
|
|
|
+ width: 52px;
|
|
|
+ height: 51px;
|
|
|
+ background: url('@/assets/images/map/rightMenu/rainMonitor/icon5.png') no-repeat;
|
|
|
+ margin-right: 5px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .gradient-text2 {
|
|
|
+ color: transparent !important;
|
|
|
+ }
|
|
|
+ .td {
|
|
|
+ font-size: 38px;
|
|
|
+ color: #edfaff;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ white-space: nowrap;
|
|
|
+ overflow: hidden;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ &:nth-child(1) {
|
|
|
+ width: 140px;
|
|
|
+ }
|
|
|
+ &:nth-child(2) {
|
|
|
+ width: 176px;
|
|
|
+ }
|
|
|
+ &:nth-child(3) {
|
|
|
+ width: 280px;
|
|
|
+ }
|
|
|
+ &:nth-child(4) {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ &:nth-child(5) {
|
|
|
+ width: 230px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .down-icon {
|
|
|
+ display: inline-block;
|
|
|
+ width: 33px;
|
|
|
+ height: 15px;
|
|
|
+ background: url('@/assets/images/map/rightMenu/rainMonitor/down.png') no-repeat;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
+ .asc-icon {
|
|
|
+ display: inline-block;
|
|
|
+ width: 33px;
|
|
|
+ height: 33px;
|
|
|
+ background: url('@/assets/images/map/rightMenu/rainMonitor/asc.png') no-repeat;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
+ .desc-icon {
|
|
|
+ display: inline-block;
|
|
|
+ width: 33px;
|
|
|
+ height: 33px;
|
|
|
+ background: url('@/assets/images/map/rightMenu/rainMonitor/desc.png') no-repeat;
|
|
|
+ cursor: pointer;
|
|
|
+ margin-left: 8px;
|
|
|
+ }
|
|
|
+ .rank1,
|
|
|
+ .rank2,
|
|
|
+ .rank3,
|
|
|
+ .rank-other {
|
|
|
+ width: 50px;
|
|
|
+ height: 48px;
|
|
|
+ color: #ecfaff;
|
|
|
+ font-family: BEBAS-1;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+ .rank1 {
|
|
|
+ height: 47px;
|
|
|
+ background: url('@/assets/images/map/rightMenu/rainMonitor/first.png') no-repeat;
|
|
|
+ }
|
|
|
+ .rank2 {
|
|
|
+ background: url('@/assets/images/map/rightMenu/rainMonitor/second.png') no-repeat;
|
|
|
+ }
|
|
|
+ .rank3 {
|
|
|
+ background: url('@/assets/images/map/rightMenu/rainMonitor/third.png') no-repeat;
|
|
|
+ }
|
|
|
+ .rank-other {
|
|
|
+ background: url('@/assets/images/map/rightMenu/rainMonitor/other.png') no-repeat;
|
|
|
+ }
|
|
|
+}
|
|
|
+.footer {
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ margin-top: 30px;
|
|
|
+ padding-right: 40px;
|
|
|
+ :deep(.el-pagination__total) {
|
|
|
+ color: #a7ccdf;
|
|
|
+ font-size: 32px;
|
|
|
+ }
|
|
|
+
|
|
|
+ :deep(.el-pagination) {
|
|
|
+ .btn-next,
|
|
|
+ .btn-prev {
|
|
|
+ background-color: transparent;
|
|
|
+ border: none;
|
|
|
+ .el-icon {
|
|
|
+ font-size: 22px;
|
|
|
+ color: #a7ccdf;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-pager li {
|
|
|
+ width: 64px;
|
|
|
+ height: 64px;
|
|
|
+ line-height: 64px;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 32px;
|
|
|
+ color: #a7ccdf;
|
|
|
+ background-color: #0e3064;
|
|
|
+ border: 1px solid #0c57a7;
|
|
|
+ margin: 0 6px;
|
|
|
+ &:hover {
|
|
|
+ background-color: #038dff;
|
|
|
+ border: 1px solid #038dff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .el-pager li.is-active {
|
|
|
+ background-color: #038dff;
|
|
|
+ border: 1px solid #038dff;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|