提交 68f1e0ea 作者: 方治民

feat: 修改降水模块为演示预览,新增气温模块

上级 5e3c846a
......@@ -18,6 +18,11 @@
// const getColor = (type: string) => colors[type]
function goRoute(nav: UniApp.NavigateToOptions) {
if (!nav) {
Message.alert('模块开发中,敬请期待!', '')
return
}
uni.navigateTo(nav)
}
......
......@@ -66,11 +66,31 @@
"enableReachBottom": false
}
},
// 降水实况
// 降水监测
{
"path": "pages/business/monitor/rain/index",
"style": {
"navigationBarTitleText": "降水监测",
"navigationBarTitleText": "降水监测(演示)",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#1890FF",
"app-plus": {
"titleNView": {
"buttons": [
{
"type": "share",
"color": "white",
"width": "50px"
}
]
}
}
}
},
// 气温监测
{
"path": "pages/business/monitor/tem/index",
"style": {
"navigationBarTitleText": "气温监测",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#1890FF",
"app-plus": {
......
<!-- 页面组件 -->
<!-- TODO -->
<!-- FIXED: 该组件仅用于演示目的,实际模块功能具体实现建议重新启用一个新页面来完成 -->
<script setup lang="ts">
import { defaultLegendConfig } from './config'
import { useShare } from '@/hooks/page/useShare'
......
// 页面通用配置信息或一些抽象方法
// 单色块图例配置
// export const defaultLegendConfig = {
// expand: false,
// title: '单位: mm',
// option: {
// blockStyle: {
// border: '1px solid #ccc',
// },
// items: [
// {
// color: '#FFFFFF',
// label: '0-0.1',
// },
// {
// color: '#A3F48A',
// label: '0.1-9.0',
// },
// {
// color: '#35AB02',
// label: '10-24.9',
// },
// {
// color: '#61B9F9',
// label: '25-49.9',
// },
// {
// color: '#0403FF',
// label: '50-99.9',
// },
// {
// color: '#FA02FA',
// label: '100-249.9',
// },
// {
// color: '#810042',
// label: '>=250',
// },
// ],
// },
// }
// 多色块图例配置
// export const defaultLegendConfig = {
// expand: true,
// title: '单位: mm',
// option: {
// blockStyle: {
// border: '1px solid #ccc',
// },
// items: [
// [
// {
// color: '#FFFFFF',
// label: '0-0.1',
// },
// {
// color: '#A3F48A',
// label: '0.1-9.0',
// },
// {
// color: '#35AB02',
// label: '10-24.9',
// },
// {
// color: '#61B9F9',
// label: '25-49.9',
// },
// {
// color: '#0403FF',
// label: '50-99.9',
// },
// {
// color: '#FA02FA',
// label: '100-249.9',
// },
// {
// color: '#810042',
// label: '>=250',
// },
// ],
// [
// {
// color: '#FFFFFF',
// label: '0-0.1',
// },
// {
// color: '#A3F48A',
// label: '0.1-9.0',
// },
// {
// color: '#35AB02',
// label: '10-24.9',
// },
// {
// color: '#61B9F9',
// label: '25-49.9',
// },
// {
// color: '#0403FF',
// label: '50-99.9',
// },
// {
// color: '#FA02FA',
// label: '100-249.9',
// },
// {
// color: '#810042',
// label: '>=250',
// },
// ],
// ],
// },
// }
// 单边图标图例
// export const defaultLegendConfig = {
// expand: true,
// title: '',
// option: {
// items: [
// {
// icon: '/static/icons/legend/ice-snow/snow.cover.png',
// label: '积雪',
// },
// {
// icon: '/static/icons/legend/ice-snow/wire.icing.png',
// label: '电线积冰',
// },
// {
// icon: '/static/icons/legend/ice-snow/glaze.png',
// label: '雨淞',
// },
// {
// icon: '/static/icons/legend/ice-snow/sleet.png',
// label: '雨夹雪',
// },
// {
// icon: '/static/icons/legend/ice-snow/snow.png',
// label: '雪',
// },
// ],
// },
// }
// 单边多图标图例
export const defaultLegendConfig = {
expand: true,
title: '',
option: {
labelStyle: {
width: '85rpx',
},
items: [
{
label: '闪电',
items: [
{
icon: '/static/icons/legend/strong-convection/lightning.png',
},
],
},
{
label: '冰雹\n(mm)',
items: [
{
icon: '/static/icons/legend/strong-convection/hail.0-5.png',
label: '0-5',
},
{
icon: '/static/icons/legend/strong-convection/hail.5-10.png',
label: '5-10',
},
{
icon: '/static/icons/legend/strong-convection/hail.10-20.png',
label: '10-20',
},
{
icon: '/static/icons/legend/strong-convection/hail.+20.png',
label: '>=20',
},
],
},
{
label: '大风\n(m/s)',
items: [
{
icon: '/static/icons/legend/strong-convection/wind.17-25.png',
label: '17-25',
},
{
icon: '/static/icons/legend/strong-convection/wind.25-30.png',
label: '25-30',
},
{
icon: '/static/icons/legend/strong-convection/wind.+30.png',
label: '>=30',
},
],
},
{
label: '强降水\n(mm)',
items: [
{
icon: '/static/icons/legend/strong-convection/rain.20-30.png',
label: '20-30',
},
{
icon: '/static/icons/legend/strong-convection/rain.30-50.png',
label: '30-50',
},
{
icon: '/static/icons/legend/strong-convection/rain.50-80.png',
label: '50-80',
},
{
icon: '/static/icons/legend/strong-convection/rain.+80.png',
label: '>=80',
},
],
},
],
},
}
......@@ -17,6 +17,9 @@ export const liveModules: navItemType[] = [
{
label: '气温监测',
value: 'tem-m',
navigate: {
url: '/pages/business/monitor/tem/index',
},
},
{
label: '大风监测',
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论