Compare commits
2 Commits
b385cffb26
...
c9093605d0
Author | SHA1 | Date | |
---|---|---|---|
c9093605d0 | |||
8586bd4dce |
@ -1,24 +1,39 @@
|
||||
export default defineAppConfig({
|
||||
lazyCodeLoading: 'requiredComponents',
|
||||
pages: [
|
||||
// 首页y以及首页tab页内容
|
||||
'pages/index/index', // 首页
|
||||
'pages/login/index', // 登录页
|
||||
|
||||
// 被其他页面引用的组件不要写在这里
|
||||
// 'pages/iot/index', // 物联网
|
||||
// 'pages/msgCenter/index', // 消息中心
|
||||
// 'pages/equipment/index', // 巡检设备
|
||||
|
||||
// 跳转页面
|
||||
'pages/weatherStation/index', // 气象站
|
||||
'pages/inspection/index', // 气象站(巡检)
|
||||
'pages/inspectionContent/index', // 气象站(巡检内容表单)
|
||||
'pages/inspectionLog/index', // 气象站(巡检日志)
|
||||
'pages/msgDetail/index', // 消息详情
|
||||
'pages/soilMoisture/index', // 土壤墒情
|
||||
'pages/envMonitor/index', // 棚内环境监测
|
||||
'pages/deviceMonitor/index', // 设备监控
|
||||
'pages/bugMonitor/index', // 虫情监测
|
||||
],
|
||||
subPackages: [
|
||||
{
|
||||
root: 'iotManager/',
|
||||
pages: [
|
||||
'deviceMonitor/index', // 设备监控
|
||||
'envMonitor/index', // 棚内环境监测
|
||||
'soilMoisture/index', // 土壤墒情
|
||||
'weatherStation/index', // 气象站
|
||||
'bugMonitor/index', // 虫情监测
|
||||
],
|
||||
},
|
||||
{
|
||||
root: 'msgManager/',
|
||||
pages: [
|
||||
'msgDetail/index', // 消息详情
|
||||
]
|
||||
},
|
||||
{
|
||||
root: 'inspectionManager/',
|
||||
pages: [
|
||||
'inspection/index', // 气象站(巡检)
|
||||
'inspectionContent/index', // 气象站(巡检内容表单)
|
||||
'inspectionLog/index', // 气象站(巡检日志)
|
||||
]
|
||||
},
|
||||
{
|
||||
root: 'basePage/',
|
||||
pages: [
|
||||
'index/index', // 首页
|
||||
]
|
||||
}
|
||||
],
|
||||
window: {
|
||||
backgroundTextStyle: 'light',
|
||||
|
@ -2,7 +2,3 @@
|
||||
@import 'tailwindcss/components';
|
||||
@import "tailwindcss/utilities";
|
||||
|
||||
@font-face {
|
||||
font-family: 'ArtFont';
|
||||
src: url(./assets/font/biaoti.ttf);
|
||||
}
|
@ -1,6 +1,6 @@
|
||||
import { PropsWithChildren } from 'react'
|
||||
import { useLaunch } from '@tarojs/taro'
|
||||
import './app.scss'
|
||||
import './app.css'
|
||||
import { globalData } from './config'
|
||||
import Taro from '@tarojs/taro'
|
||||
|
||||
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 5.6 KiB |
@ -77,7 +77,7 @@ const EquipMent = () => {
|
||||
className="rounded-xl w-20 bg-green-500 text-center py-1"
|
||||
style={{ color: 'white' }}
|
||||
onClick={() => {
|
||||
Taro.navigateTo({ url: '/pages/inspection/index?id=' + item.id})
|
||||
Taro.navigateTo({ url: '/inspectionManager/inspection/index?id=' + item.id})
|
||||
}}
|
||||
>去巡检</View>
|
||||
</View>
|
3
src/basePage/index/index.config.ts
Normal file
@ -0,0 +1,3 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '首页'
|
||||
})
|
@ -1,10 +1,14 @@
|
||||
import { Image, View } from "@tarojs/components";
|
||||
import "./index.scss";
|
||||
import { useState } from "react";
|
||||
import Taro from "@tarojs/taro";
|
||||
|
||||
import Iot from "../iot";
|
||||
import basicBg from '../../assets/images/bg.png'
|
||||
import MsgCenter from "../msgCenter";
|
||||
import EquipMent from "../equipment";
|
||||
|
||||
import HeaderNation from "../../components/customized/navigation";
|
||||
|
||||
import basicBg from '../../assets/images/bg.png'
|
||||
import tab1Icon from '../../assets/images/tab/tab1.png'
|
||||
import tab1Icon_selected from '../../assets/images/tab/tab1_selected.png'
|
||||
import tab2Icon from '../../assets/images/tab/tab2.png'
|
||||
@ -12,8 +16,6 @@ import tab2Icon_selected from '../../assets/images/tab/tab2_selected.png'
|
||||
import tab3Icon from '../../assets/images/tab/tab3.png'
|
||||
import tab3Icon_selected from '../../assets/images/tab/tab3_selected.png'
|
||||
|
||||
import Taro from "@tarojs/taro";
|
||||
import HeaderNation from "../../components/customized/navigation";
|
||||
import { globalData } from "../../config";
|
||||
|
||||
const Index = () => {
|
||||
@ -57,10 +59,8 @@ const Index = () => {
|
||||
]
|
||||
|
||||
return (
|
||||
<View
|
||||
className="h-[100vh] flex flex-col-reverse relative bg-slate-50"
|
||||
style={{ 'backgroundImage': `url(${basicBg})`, 'backgroundSize': '100% auto', 'backgroundRepeat': 'no-repeat' }}
|
||||
>
|
||||
<View className="h-[100vh] flex flex-col-reverse relative bg-slate-50">
|
||||
<Image src={basicBg} className="absolute z-0 top-0 w-full"></Image>
|
||||
<View className="flex justify-evenly align-top relative z-100 bg-white" style={{ height: globalData.navigatorHeight + 'px' }}>
|
||||
{
|
||||
bottomMenuList.map(item => {
|
@ -36,7 +36,7 @@ const Iot = () => {
|
||||
online: 3,
|
||||
offline: 0,
|
||||
error: 0,
|
||||
url: '/pages/weatherStation/index?id=1'
|
||||
url: '/iotManager/weatherStation/index?id=1'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
@ -45,7 +45,7 @@ const Iot = () => {
|
||||
online: 3,
|
||||
offline: 1,
|
||||
error: 0,
|
||||
url: '/pages/soilMoisture/index?id=1'
|
||||
url: '/iotManager/soilMoisture/index?id=1'
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
@ -54,7 +54,7 @@ const Iot = () => {
|
||||
online: 3,
|
||||
offline: 0,
|
||||
error: 0,
|
||||
url: '/pages/envMonitor/index?id=1'
|
||||
url: '/iotManager/envMonitor/index?id=1'
|
||||
},
|
||||
{
|
||||
id: '4',
|
||||
@ -63,7 +63,7 @@ const Iot = () => {
|
||||
online: 3,
|
||||
offline: 0,
|
||||
error: 0,
|
||||
url: '/pages/deviceMonitor/index?id=1'
|
||||
url: '/iotManager/deviceMonitor/index?id=1'
|
||||
},
|
||||
{
|
||||
id: '5',
|
||||
@ -72,43 +72,7 @@ const Iot = () => {
|
||||
online: 3,
|
||||
offline: 0,
|
||||
error: 0,
|
||||
url: '/pages/envMonitor/index?id=1'
|
||||
},
|
||||
{
|
||||
id: '6',
|
||||
title: '气象站',
|
||||
value: 3,
|
||||
online: 3,
|
||||
offline: 0,
|
||||
error: 0,
|
||||
url: '/pages/envMonitor/index?id=1'
|
||||
},
|
||||
{
|
||||
id: '7',
|
||||
title: '气象站',
|
||||
value: 3,
|
||||
online: 3,
|
||||
offline: 0,
|
||||
error: 0,
|
||||
url: '/pages/envMonitor/index?id=1'
|
||||
},
|
||||
{
|
||||
id: '8',
|
||||
title: '气象站',
|
||||
value: 3,
|
||||
online: 3,
|
||||
offline: 0,
|
||||
error: 0,
|
||||
url: '/pages/envMonitor/index?id=1'
|
||||
},
|
||||
{
|
||||
id: '9',
|
||||
title: '气象站',
|
||||
value: 3,
|
||||
online: 3,
|
||||
offline: 0,
|
||||
error: 0,
|
||||
url: '/pages/envMonitor/index?id=1'
|
||||
url: '/iotManager/envMonitor/index?id=1'
|
||||
},
|
||||
]
|
||||
return (
|
Before Width: | Height: | Size: 1013 B After Width: | Height: | Size: 1013 B |
Before Width: | Height: | Size: 728 B After Width: | Height: | Size: 728 B |
49
src/basePage/msgCenter/index.css
Normal file
@ -0,0 +1,49 @@
|
||||
.cont{
|
||||
padding: 10px 15px;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 15px;
|
||||
justify-content: space-between;
|
||||
|
||||
}
|
||||
.main{
|
||||
margin: auto;
|
||||
display: flex;
|
||||
width: 93%;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.right{
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
padding: 15px 10px;
|
||||
|
||||
}
|
||||
|
||||
.top-left{
|
||||
font-weight: 700;
|
||||
}
|
||||
.top-right{
|
||||
font-size: 30px;
|
||||
color: #c1c1c1;
|
||||
}
|
||||
|
||||
.right-top{
|
||||
display: flex;
|
||||
margin-bottom: 15px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
}
|
||||
.warn{
|
||||
color:#f7cc73;
|
||||
font-size:30px;
|
||||
}
|
||||
.rang{
|
||||
color:red;
|
||||
font-size:30px;
|
||||
}
|
@ -2,7 +2,7 @@ import { View,Image } from "@tarojs/components"
|
||||
import { useState } from "react"
|
||||
import warn from './assets/warn.png'
|
||||
import rang from './assets/rang.png'
|
||||
import './index.scss'
|
||||
import './index.css'
|
||||
import Taro from "@tarojs/taro"
|
||||
import TabWrapper from "../../components/customized/tabWrapper"
|
||||
const MsgCenter = () => {
|
||||
@ -119,7 +119,7 @@ const MsgCenter = () => {
|
||||
{
|
||||
contList.map((item,index)=>{
|
||||
return (
|
||||
<View className='rounded-md shadow-xl cont' key={index} onClick={() => { Taro.navigateTo({ url: '/pages/msgDetail/index' }) }}>
|
||||
<View className='rounded-md shadow-xl cont' key={index} onClick={() => { Taro.navigateTo({ url: '/msgManager/msgDetail/index' }) }}>
|
||||
<Image src={item.id=='1'|| item.id=='2'?rang:warn} className='w-11 h-11' style={{marginTop:'-10px'}}></Image>
|
||||
<View className='right'>
|
||||
<View className='right-top'>
|
@ -1,4 +1,4 @@
|
||||
import { View } from "@tarojs/components"
|
||||
import { View, Image } from "@tarojs/components"
|
||||
import { globalData } from "../../../config"
|
||||
import basicBg from '../../../assets/images/bg.png'
|
||||
import HeaderNation from "../navigation"
|
||||
@ -6,15 +6,10 @@ import HeaderNation from "../navigation"
|
||||
const PageWrapper = ({ children, title = '' }) => {
|
||||
return (
|
||||
<View
|
||||
className="flex flex-col-reverse h-[100vh] bg-slate-50"
|
||||
style={{
|
||||
'backgroundImage': `url(${basicBg})`,
|
||||
'backgroundSize': '100% auto',
|
||||
'backgroundRepeat': 'no-repeat',
|
||||
}}
|
||||
className="flex flex-col-reverse h-[100vh] bg-slate-50 relative"
|
||||
>
|
||||
<View
|
||||
className="flex flex-col"
|
||||
className="flex flex-col relative z-50"
|
||||
style={{
|
||||
'height': (globalData.mainContainerHeight + globalData.appHeaderHeight) + 'px',
|
||||
}}
|
||||
@ -24,6 +19,7 @@ const PageWrapper = ({ children, title = '' }) => {
|
||||
{ children }
|
||||
</View>
|
||||
</View>
|
||||
<Image src={basicBg} className="absolute z-0 top-0 w-full"></Image>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { View } from "@tarojs/components"
|
||||
import './index.scss'
|
||||
// import './index.css'
|
||||
|
||||
/**
|
||||
* options 为菜单列表 selected为选中值 callback为函数回调
|
||||
|
@ -60,14 +60,14 @@ const EquipMent = () => {
|
||||
className="rounded-xl w-20 bg-green-500 text-center py-1"
|
||||
style={{ color: 'white' }}
|
||||
onClick={() => {
|
||||
Taro.navigateTo({ url: '/pages/weatherStation/index?id=' + item.id})
|
||||
Taro.navigateTo({ url: '/iotManager/weatherStation/index?id=' + item.id})
|
||||
}}
|
||||
>巡检日志</View>
|
||||
<View
|
||||
className="rounded-xl w-20 bg-green-500 text-center py-1"
|
||||
style={{ color: 'white' }}
|
||||
onClick={() => {
|
||||
Taro.navigateTo({ url: '/pages/weatherStation/index?id=' + item.id})
|
||||
Taro.navigateTo({ url: '/iotManager/weatherStation/index?id=' + item.id})
|
||||
}}
|
||||
>去巡检</View>
|
||||
</View>
|
@ -2,8 +2,6 @@ import { Image, View } from "@tarojs/components"
|
||||
import Taro from "@tarojs/taro";
|
||||
import { useState, useRef } from "react";
|
||||
import img from '../../assets/images/img.png'
|
||||
import basicBg from '../../assets/images/bg.png'
|
||||
import HeaderNation from "../../components/customized/navigation";
|
||||
import { icon1, icon2, icon3, icon4 } from "../../assets/images/icons/data";
|
||||
import Echarts, { EChartOption, EchartsHandle } from 'taro-react-echarts'
|
||||
import echarts from '../../assets/js/echarts'
|
Before Width: | Height: | Size: 101 KiB After Width: | Height: | Size: 101 KiB |
Before Width: | Height: | Size: 1013 B After Width: | Height: | Size: 1013 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@ -2,7 +2,7 @@ import { View,Image } from "@tarojs/components"
|
||||
import rang from './assets/rang.png'
|
||||
import yxImg from './assets/yxImg.png'
|
||||
import image from './assets/image.png'
|
||||
import "./index.scss"
|
||||
import "./index.css"
|
||||
import PageWrapper from "../../components/customized/pageWrapper"
|
||||
|
||||
const MsgDetail = () => {
|
@ -1,3 +0,0 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '首页'
|
||||
})
|
@ -1,4 +0,0 @@
|
||||
.test {
|
||||
@apply flex items-center justify-center h-[300px] w-[300px] rounded-[40px] bg-[#123456] bg-opacity-[0.54];
|
||||
@apply text-[#ffffff] after:content-['@apply_classes'] #{!important};
|
||||
}
|
@ -16,7 +16,7 @@ const Login = () => {
|
||||
setTimeout(() => {
|
||||
Taro.setStorageSync('token', 'testToken')
|
||||
Taro.hideLoading()
|
||||
Taro.redirectTo({ url: '/pages/index/index' })
|
||||
Taro.redirectTo({ url: '/basePage/index/index' })
|
||||
}, 2000)
|
||||
}
|
||||
|
||||
|
@ -1,43 +0,0 @@
|
||||
.cont{
|
||||
padding: 10px 15px;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 15px;
|
||||
justify-content: space-between;
|
||||
.right{
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
padding: 15px 10px;
|
||||
.right-top{
|
||||
display: flex;
|
||||
margin-bottom: 15px;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.top-left{
|
||||
font-weight: 700;
|
||||
}
|
||||
.top-right{
|
||||
font-size: 30px;
|
||||
color: #c1c1c1;
|
||||
}
|
||||
}
|
||||
.warn{
|
||||
color:#f7cc73;
|
||||
font-size:30px;
|
||||
}
|
||||
.rang{
|
||||
color:red;
|
||||
font-size:30px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.main{
|
||||
margin: auto;
|
||||
display: flex;
|
||||
width: 93%;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
export default definePageConfig({
|
||||
navigationBarTitleText: '设置'
|
||||
})
|
@ -1,21 +0,0 @@
|
||||
import { View } from "@tarojs/components";
|
||||
import "./index.scss";
|
||||
|
||||
const Index = () => {
|
||||
return (
|
||||
<>
|
||||
<View className="w-full p-2">
|
||||
<View className="w-full text-center border p-2 rounded-md bg-red-300">Setting</View>
|
||||
<View className="mt-2 border p-2 rounded-md">SSSWSS</View>
|
||||
<View className="grid grid-cols-2 grid-rows-2 gap-2 py-2">
|
||||
<View className="border bg-slate-300 h-20 p-2 rounded-md"></View>
|
||||
<View className="border bg-slate-300 h-20 p-2 rounded-md"></View>
|
||||
<View className="border bg-slate-300 h-20 p-2 rounded-md"></View>
|
||||
<View className="border bg-slate-300 h-20 p-2 rounded-md"></View>
|
||||
</View>
|
||||
</View>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Index;
|