feat: 模拟数据
This commit is contained in:
parent
ab5c727300
commit
f1c1d5ecb0
@ -6,6 +6,117 @@ import { ScrollView } from "@tarojs/components"
|
||||
import { request } from "../../config/axios"
|
||||
//获取设备
|
||||
const getdevice=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: {
|
||||
list: data.baseId === '1769896303962251264' ? [] : data.baseId === '1769896538700668928' ? [
|
||||
{
|
||||
baseId: null,
|
||||
categoryId: "15",
|
||||
categoryName: "气象监测",
|
||||
createTime: null,
|
||||
deviceId: null,
|
||||
finishCheckNum: 0,
|
||||
inspectionState: null,
|
||||
massif: null,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
sumNum: 2,
|
||||
unFinishCheckNum: 2,
|
||||
},
|
||||
{
|
||||
baseId: null,
|
||||
categoryId: "16",
|
||||
categoryName: "土壤监测",
|
||||
createTime: null,
|
||||
deviceId: null,
|
||||
finishCheckNum: 0,
|
||||
inspectionState: null,
|
||||
massif: null,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
sumNum: 2,
|
||||
unFinishCheckNum: 2,
|
||||
},
|
||||
{
|
||||
baseId: null,
|
||||
categoryId: "17",
|
||||
categoryName: "虫情监测",
|
||||
createTime: null,
|
||||
deviceId: null,
|
||||
finishCheckNum: 0,
|
||||
inspectionState: null,
|
||||
massif: null,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
sumNum: 1,
|
||||
unFinishCheckNum: 1,
|
||||
},
|
||||
{
|
||||
baseId: null,
|
||||
categoryId: "18",
|
||||
categoryName: "环境检测",
|
||||
createTime: null,
|
||||
deviceId: null,
|
||||
finishCheckNum: 0,
|
||||
inspectionState: null,
|
||||
massif: null,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
sumNum: 2,
|
||||
unFinishCheckNum: 2,
|
||||
},
|
||||
{
|
||||
baseId: null,
|
||||
categoryId: "20",
|
||||
categoryName: "生长监控",
|
||||
createTime: null,
|
||||
deviceId: null,
|
||||
finishCheckNum: 0,
|
||||
inspectionState: null,
|
||||
massif: null,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
sumNum: 1,
|
||||
unFinishCheckNum: 1,
|
||||
},
|
||||
{
|
||||
baseId: null,
|
||||
categoryId: "21",
|
||||
categoryName: "监控设备",
|
||||
createTime: null,
|
||||
deviceId: null,
|
||||
finishCheckNum: 0,
|
||||
inspectionState: null,
|
||||
massif: null,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
sumNum: 8,
|
||||
unFinishCheckNum: 8,
|
||||
},
|
||||
{
|
||||
baseId: null,
|
||||
categoryId: "45",
|
||||
categoryName: "产线设备",
|
||||
createTime: null,
|
||||
deviceId: null,
|
||||
finishCheckNum: 0,
|
||||
inspectionState: null,
|
||||
massif: null,
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
sumNum: 1,
|
||||
unFinishCheckNum: 1,
|
||||
}
|
||||
] : [],
|
||||
total: data.baseId === '1769896303962251264' ? 0 : data.baseId === '1769896538700668928' ? 7 : 0
|
||||
}
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/check-logs/getCountPageByBaseId',
|
||||
method:'GET',
|
||||
@ -33,6 +144,59 @@ const EquipMent = () => {
|
||||
},
|
||||
])
|
||||
const getDeviceInfoCard = (data) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
address: "重庆市武隆县",
|
||||
altitude: "1332",
|
||||
area: "1000",
|
||||
categoryName: "番茄基地",
|
||||
code: "1769896303962251264",
|
||||
contact: "杨天华",
|
||||
createTime: 1710811137000,
|
||||
deptId: null,
|
||||
id: "1769896303962251264",
|
||||
img: null,
|
||||
latitude: "29.347006",
|
||||
longitude: "107.791205",
|
||||
name: "双河镇基地1",
|
||||
quantity: null,
|
||||
remark: null,
|
||||
tel: "19823894365",
|
||||
type: "1777234844568432640",
|
||||
userId: null,
|
||||
},
|
||||
{
|
||||
address: "重庆市武隆县",
|
||||
altitude: "1308",
|
||||
area: "500",
|
||||
categoryName: "番茄基地",
|
||||
code: "1769896538700668928",
|
||||
contact: "董阳云",
|
||||
createTime: 1710811193000,
|
||||
deptId: null,
|
||||
id: "1769896538700668928",
|
||||
img: null,
|
||||
latitude: "29.355026",
|
||||
longitude: "107.795811",
|
||||
name: "武隆基地1",
|
||||
quantity: null,
|
||||
remark: null,
|
||||
tel: "17754965262",
|
||||
type: "1777234844568432640",
|
||||
userId: null,
|
||||
}
|
||||
],
|
||||
total: 2
|
||||
}
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url: '/agriculture/park-info/page',
|
||||
method: 'GET',
|
||||
|
@ -20,6 +20,81 @@ import { globalData } from "../../config";
|
||||
import { request } from "../../config/axios";
|
||||
|
||||
const getDevice = (data) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721728",
|
||||
createTime: 1710830795000,
|
||||
deptId: 115,
|
||||
deviceCode: "1769978757536542720",
|
||||
deviceKind: "17",
|
||||
deviceMonitorType: "虫害数量,虫害种类,杀虫仓温度,烘干仓温度",
|
||||
deviceName: "智能虫情测报灯",
|
||||
deviceStatus: "offline",
|
||||
deviceType: "14,17",
|
||||
id: "1769978757536542720",
|
||||
imgId: "http://117.73.12.97:9000/inspur/67300bc094230654f1eddc667ffcfe123fed98c4494f5e5b3fd3d759a5d33779.jpg",
|
||||
latitude: "29.352796",
|
||||
location: null,
|
||||
longitude: "107.789363",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
userId: 137,
|
||||
},
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721728",
|
||||
createTime: 1710831206000,
|
||||
deptId: 115,
|
||||
deviceCode: "1769980482158735360",
|
||||
deviceKind: "15",
|
||||
deviceMonitorType: "风速,光照,大气温度,大气湿度,降水量,气压",
|
||||
deviceName: "七合一气象站2",
|
||||
deviceStatus: "online",
|
||||
deviceType: "14,15",
|
||||
id: "1769980482158735360",
|
||||
imgId: "http://117.73.12.97:9000/inspur/5aaa3fcff768b6a21f6a09088fc3ad73bbc588ce5c844e609fedaef9037068db.jpg",
|
||||
latitude: "29.353122",
|
||||
location: null,
|
||||
longitude: "107.797195",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
},
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721729",
|
||||
createTime: 1710902719000,
|
||||
deptId: 115,
|
||||
deviceCode: "1770280426614771712",
|
||||
deviceKind: "16",
|
||||
deviceMonitorType: "土壤温度,土壤湿度,PH值,EC值,土壤深度",
|
||||
deviceName: "土壤墒情监测仪2",
|
||||
deviceStatus: "online",
|
||||
deviceType: "14,16",
|
||||
id: "1770280426614771712",
|
||||
imgId: "http://117.73.12.97:9000/inspur/cc6f692080a91480054ae897febc141d4b2d8d96f0bc15c5a93d881ac8535e9c.jpg",
|
||||
latitude: "29.350629",
|
||||
location: null,
|
||||
longitude: "107.791775",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
userId: 137,
|
||||
}
|
||||
]
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url: '/app/soil-insect/getDevice',
|
||||
method: 'GET',
|
||||
|
@ -10,6 +10,93 @@ import { request } from "../../config/axios"
|
||||
import { ScrollView } from "@tarojs/components"
|
||||
|
||||
const getDeviceList = (data) => {
|
||||
if (data.parkId === '1769896303962251264' || data.parkId === '1769896538700668928') return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: data.parkId === '1769896303962251264' ? [] : data.parkId === '1769896538700668928' ? [
|
||||
{
|
||||
categoryCode: "sensor_meteorology",
|
||||
categoryName: "气象监测",
|
||||
deviceKind: "15",
|
||||
deviceType: "14,15",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/732549b4945653904b0f3330179ddd35d78981429644109a4f5bdd5fc40f34ad.jpg",
|
||||
offline: "0",
|
||||
online: "2",
|
||||
total: "2",
|
||||
},
|
||||
{
|
||||
categoryCode: "sensor_soil",
|
||||
categoryName: "土壤监测",
|
||||
deviceKind: "16",
|
||||
deviceType: "14,16",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/87a5dddb5b69b5bdd3fdee93e7034ad5ab2ac126d48cf8ed052f39cbc9f1fabc.jpg",
|
||||
offline: "0",
|
||||
online: "2",
|
||||
total: "2",
|
||||
},
|
||||
{
|
||||
categoryCode: "sensor_insect",
|
||||
categoryName: "虫情监测",
|
||||
deviceKind: "17",
|
||||
deviceType: "14,17",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/0523a5fc2f32c7e9af21366ea47705df0903f944fe447cd30253f5d1f89a14a5.jpg",
|
||||
offline: "1",
|
||||
online: "0",
|
||||
total: "1",
|
||||
},
|
||||
{
|
||||
categoryCode: "sensor_env",
|
||||
categoryName: "环境检测",
|
||||
deviceKind: "18",
|
||||
deviceType: "14,18",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/8ef13479a938f5e718a73b91a99d96b1fb0ec63ac786b3bc646befd5d83ea961.jpg",
|
||||
offline: "0",
|
||||
online: "2",
|
||||
total: "2",
|
||||
},
|
||||
{
|
||||
categoryCode: "surveillance_grow",
|
||||
categoryName: "生长监控",
|
||||
deviceKind: "20",
|
||||
deviceType: "19,20",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/2867b2271602ccce35e2a09b060e8d48dbe225b728b28d1d6d0ad468dd1bb6ce.jpg",
|
||||
offline: "0",
|
||||
online: "1",
|
||||
total: "1",
|
||||
},
|
||||
{
|
||||
categoryCode: "surveillance_other",
|
||||
categoryName: "监控设备",
|
||||
deviceKind: "21",
|
||||
deviceType: "19,21",
|
||||
fault: "1",
|
||||
imgId: "http://117.73.12.97:9000/inspur/818e9d1f9d97e8f2064e3e22cdf8eb0e8cbeeceb82c62e664e3b5affba838476.jpg",
|
||||
offline: "1",
|
||||
online: "6",
|
||||
total: "8",
|
||||
},
|
||||
{
|
||||
categoryCode: "prod_line_device",
|
||||
categoryName: "产线设备",
|
||||
deviceKind: "45",
|
||||
deviceType: "22,45",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/0b7b743ebe66dc62ed9046107a6727e9ab014986e4c7265a90f58cee11951c19.png",
|
||||
offline: "0",
|
||||
online: "1",
|
||||
total: "1",
|
||||
}
|
||||
] : []
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url: '/agriculture/big-screen/deviceInfoByPark',
|
||||
method: 'GET',
|
||||
@ -29,6 +116,106 @@ const UrlMap = {
|
||||
}
|
||||
|
||||
const getDeviceInfoCard = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: {
|
||||
category: [
|
||||
{
|
||||
categoryCode: "sensor_meteorology",
|
||||
categoryName: "气象监测",
|
||||
deviceKind: "15",
|
||||
deviceType: "14,15",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/732549b4945653904b0f3330179ddd35d78981429644109a4f5bdd5fc40f34ad.jpg",
|
||||
offline: "0",
|
||||
online: "2",
|
||||
total: "2",
|
||||
},
|
||||
{
|
||||
categoryCode: "sensor_soil",
|
||||
categoryName: "土壤监测",
|
||||
deviceKind: "16",
|
||||
deviceType: "14,16",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/87a5dddb5b69b5bdd3fdee93e7034ad5ab2ac126d48cf8ed052f39cbc9f1fabc.jpg",
|
||||
offline: "0",
|
||||
online: "2",
|
||||
total: "2",
|
||||
},
|
||||
{
|
||||
categoryCode: "sensor_insect",
|
||||
categoryName: "虫情监测",
|
||||
deviceKind: "17",
|
||||
deviceType: "14,17",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/0523a5fc2f32c7e9af21366ea47705df0903f944fe447cd30253f5d1f89a14a5.jpg",
|
||||
offline: "1",
|
||||
online: "0",
|
||||
total: "1",
|
||||
},
|
||||
{
|
||||
categoryCode: "sensor_env",
|
||||
categoryName: "环境检测",
|
||||
deviceKind: "18",
|
||||
deviceType: "14,18",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/8ef13479a938f5e718a73b91a99d96b1fb0ec63ac786b3bc646befd5d83ea961.jpg",
|
||||
offline: "0",
|
||||
online: "2",
|
||||
total: "2",
|
||||
},
|
||||
{
|
||||
categoryCode: "surveillance_grow",
|
||||
categoryName: "生长监控",
|
||||
deviceKind: "20",
|
||||
deviceType: "19,20",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/2867b2271602ccce35e2a09b060e8d48dbe225b728b28d1d6d0ad468dd1bb6ce.jpg",
|
||||
offline: "0",
|
||||
online: "1",
|
||||
total: "1",
|
||||
},
|
||||
{
|
||||
categoryCode: "surveillance_other",
|
||||
categoryName: "监控设备",
|
||||
deviceKind: "21",
|
||||
deviceType: "19,21",
|
||||
fault: "1",
|
||||
imgId: "http://117.73.12.97:9000/inspur/818e9d1f9d97e8f2064e3e22cdf8eb0e8cbeeceb82c62e664e3b5affba838476.jpg",
|
||||
offline: "1",
|
||||
online: "6",
|
||||
total: "8",
|
||||
},
|
||||
{
|
||||
categoryCode: "prod_line_device",
|
||||
categoryName: "产线设备",
|
||||
deviceKind: "45",
|
||||
deviceType: "22,45",
|
||||
fault: "0",
|
||||
imgId: "http://117.73.12.97:9000/inspur/0b7b743ebe66dc62ed9046107a6727e9ab014986e4c7265a90f58cee11951c19.png",
|
||||
offline: "0",
|
||||
online: "1",
|
||||
total: "1",
|
||||
}
|
||||
],
|
||||
deviceTotal: {
|
||||
categoryCode: null,
|
||||
categoryName: "设备总数",
|
||||
deviceKind: null,
|
||||
deviceType: null,
|
||||
fault: "1",
|
||||
imgId: null,
|
||||
offline: "2",
|
||||
online: "14",
|
||||
total: "17",
|
||||
}
|
||||
}
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url: '/agriculture/big-screen/deviceInfoCard',
|
||||
method: 'GET'
|
||||
@ -36,6 +223,24 @@ const getDeviceInfoCard = () => {
|
||||
}
|
||||
|
||||
const getBaseInfo = (data) => {
|
||||
if (data.parentId == 0) return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
id: "1769896303962251264",
|
||||
name: "双河镇基地1"
|
||||
},
|
||||
{
|
||||
id: "1769896538700668928",
|
||||
name: "武隆基地1"
|
||||
}
|
||||
]
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url: '/agriculture/big-screen/getParkBaseInfo',
|
||||
method: 'GET',
|
||||
|
@ -8,6 +8,37 @@ import { request } from "../../config/axios/index"
|
||||
const MsgCenter = () => {
|
||||
const [selectedMenuId, setSelectedMenuId] = useState('all')
|
||||
const getList = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
id: 3,
|
||||
warnInfo: "温度监测异常",
|
||||
warnTime: 1710965135000,
|
||||
warnTitle: "环境温度预警",
|
||||
warnType: "环境温度",
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
warnInfo: "监测到当前虫害数量已超出阈值",
|
||||
warnTime: 1710932460000,
|
||||
warnTitle: "虫害情况预警",
|
||||
warnType: "虫害情况",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
warnInfo: "浅层土壤湿度过低",
|
||||
warnTime: 1710921600000,
|
||||
warnTitle: "土壤湿度(20cm)预警",
|
||||
warnType: "土壤湿度(20cm)",
|
||||
}
|
||||
]
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url: '/agriculture/warning-record-big-screen/warningRecordInfo',
|
||||
method: 'GET',
|
||||
|
@ -1,47 +1,86 @@
|
||||
import { View, Image,Picker } from "@tarojs/components"
|
||||
import { View, Image, Picker } from "@tarojs/components"
|
||||
import { useEffect, useState } from "react"
|
||||
import Taro from "@tarojs/taro"
|
||||
import PageWrapper from "../../components/customized/pageWrapper"
|
||||
import { request } from "../../config/axios"
|
||||
//获取巡检设备
|
||||
const getCheckDeviceBySomet=(data)=>{
|
||||
const getCheckDeviceBySomet = (data) => {
|
||||
if (data.deviceStatus == 15) return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: {
|
||||
list: data.base == '1769896538700668928' ? [
|
||||
{
|
||||
base: "1769896538700668928",
|
||||
categoryId: "16",
|
||||
createTime: null,
|
||||
deviceStatus: "online",
|
||||
equName: "土壤墒情监测仪2",
|
||||
equNum: "1770280426614771712",
|
||||
inspectionState: null,
|
||||
inspectionTime: null,
|
||||
massif: "1769908355099721729",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
{
|
||||
base: "1769896538700668928",
|
||||
categoryId: "16",
|
||||
createTime: null,
|
||||
deviceStatus: "online",
|
||||
equName: "土壤墒情监测仪1",
|
||||
equNum: "1770334483555512320",
|
||||
inspectionState: null,
|
||||
inspectionTime: null,
|
||||
massif: "1769908355099721728",
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
}
|
||||
] : [],
|
||||
total: 0
|
||||
}
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/check-logs/getCheckDeviceBySome',
|
||||
method:'GET',
|
||||
url: '/agriculture/check-logs/getCheckDeviceBySome',
|
||||
method: 'GET',
|
||||
data
|
||||
})
|
||||
}
|
||||
const EquipMent = () => {
|
||||
const baseId = Taro.getCurrentInstance().router?.params.id || 0; // 基地id
|
||||
console.log('基地',baseId);
|
||||
console.log('基地', baseId);
|
||||
|
||||
const categoryId2 = Taro.getCurrentInstance().router?.params.categoryId || 0; // 基地id
|
||||
const date2=Taro.getCurrentInstance().router?.params.time
|
||||
const name=Taro.getCurrentInstance().router?.params.name
|
||||
console.log(date2,'shijian');
|
||||
const categoryId2 = Taro.getCurrentInstance().router?.params.categoryId || 0; // 基地id
|
||||
const date2 = Taro.getCurrentInstance().router?.params.time
|
||||
const name = Taro.getCurrentInstance().router?.params.name
|
||||
console.log(date2, 'shijian');
|
||||
|
||||
const [selectedMenuId, setSelectedMenuId] = useState('all')
|
||||
const topMenus = [
|
||||
{
|
||||
id: '1',
|
||||
title: '已巡检'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
title: '未巡检'
|
||||
}
|
||||
{
|
||||
id: '1',
|
||||
title: '已巡检'
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
title: '未巡检'
|
||||
}
|
||||
]
|
||||
|
||||
const [dataList,setDataList] = useState([
|
||||
{
|
||||
id: '1',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
},
|
||||
const [dataList, setDataList] = useState([
|
||||
{
|
||||
id: '1',
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
},
|
||||
{
|
||||
id: '3',
|
||||
},
|
||||
])
|
||||
//获取数据
|
||||
|
||||
@ -49,31 +88,31 @@ const EquipMent = () => {
|
||||
getList('0')
|
||||
})
|
||||
|
||||
let a=new Date().getFullYear()
|
||||
let b=(new Date().getMonth()+1).toString().length>=2?new Date().getMonth()+1:0+(new Date().getMonth()+1).toString()
|
||||
let c=(new Date().getDate()).toString().length>=2?new Date().getDate():0+(new Date().getDate()).toString()
|
||||
const [date, setDate] = useState(date2||a+'-'+b+'-'+c)
|
||||
function fn(data){
|
||||
let a2=data.substring(0,4)
|
||||
let b2 =data.substring(5,7)
|
||||
let c2= data.substring(8)
|
||||
let a = new Date().getFullYear()
|
||||
let b = (new Date().getMonth() + 1).toString().length >= 2 ? new Date().getMonth() + 1 : 0 + (new Date().getMonth() + 1).toString()
|
||||
let c = (new Date().getDate()).toString().length >= 2 ? new Date().getDate() : 0 + (new Date().getDate()).toString()
|
||||
const [date, setDate] = useState(date2 || a + '-' + b + '-' + c)
|
||||
function fn(data) {
|
||||
let a2 = data.substring(0, 4)
|
||||
let b2 = data.substring(5, 7)
|
||||
let c2 = data.substring(8)
|
||||
return `${a2}-${b2}-${c2}`
|
||||
}
|
||||
const getList=(id)=>{
|
||||
}
|
||||
const getList = (id) => {
|
||||
console.log('ID', id);
|
||||
|
||||
getCheckDeviceBySomet({pageNo:1,pageSize:10,base:baseId,createTime:fn(date),deviceStatus:categoryId2,inspectionState:id }).then(res=>{
|
||||
console.log(res,'huoqushuju');
|
||||
getCheckDeviceBySomet({ pageNo: 1, pageSize: 10, base: baseId, createTime: fn(date), deviceStatus: categoryId2, inspectionState: id }).then(res => {
|
||||
console.log(res, 'huoqushuju');
|
||||
setDataList(res.data.list)
|
||||
})
|
||||
}
|
||||
const tabCli=(id)=>{
|
||||
const tabCli = (id) => {
|
||||
setSelectedMenuId(id)
|
||||
console.log(id,'tab id');
|
||||
console.log(id, 'tab id');
|
||||
|
||||
if(id=='1'){
|
||||
if (id == '1') {
|
||||
getList('1')
|
||||
}else{
|
||||
} else {
|
||||
getList('0')
|
||||
}
|
||||
}
|
||||
@ -82,67 +121,67 @@ const EquipMent = () => {
|
||||
setDate(value)
|
||||
}
|
||||
return (
|
||||
<PageWrapper title={name} style={{position:'relative'}}>
|
||||
<View className="p-1 h-full">
|
||||
<View className="h-full flex flex-col">
|
||||
<View className="flex px-2 py-1">
|
||||
{
|
||||
topMenus.map(item => {
|
||||
return (
|
||||
<View
|
||||
className={`p-1 px-3 ${selectedMenuId === item.id ? 'border-b-4 border-lime-800' : ''}`}
|
||||
key={item.id}
|
||||
style={{ color: 'white' }}
|
||||
onClick={() => tabCli(item.id)}
|
||||
>{ item.title }</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
</View>
|
||||
<PageWrapper title={name} style={{ position: 'relative' }}>
|
||||
<View className="p-1 h-full">
|
||||
<View className="h-full flex flex-col">
|
||||
<View className="flex px-2 py-1">
|
||||
{
|
||||
topMenus.map(item => {
|
||||
return (
|
||||
<View
|
||||
className={`p-1 px-3 ${selectedMenuId === item.id ? 'border-b-4 border-lime-800' : ''}`}
|
||||
key={item.id}
|
||||
style={{ color: 'white' }}
|
||||
onClick={() => tabCli(item.id)}
|
||||
>{item.title}</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
</View>
|
||||
|
||||
<View className="grid grid-cols-2 gap-2 p-2 rounded-sm">
|
||||
{
|
||||
dataList.map(item => {
|
||||
return (
|
||||
<View
|
||||
className='py-2 pt-0 rounded-md shadow-xl bg-white relative'
|
||||
>
|
||||
<Image src={'https://picx.zhimg.com/70/v2-76efadc2e5b562f6f727521aedbb31ef_1440w.image?source=172ae18b&biz_tag=Post'} className="w-full h-[6rem] rounded-md"></Image>
|
||||
<View className="text-lg px-4 text-bold">{item.equName}</View>
|
||||
<View className="text-sm px-4" style={{ color: '#00000090' }}>上次巡检 { new Date().toLocaleDateString(item.inspectionTime)}</View>
|
||||
<View className="w-full px-4 flex justify-between items-start py-2 space-x-1">
|
||||
<View
|
||||
className="rounded-xl w-20 bg-green-500 text-center py-1"
|
||||
style={{ color: 'white' }}
|
||||
onClick={() => {
|
||||
Taro.navigateTo({ url: '/inspectionManager/inspectionLog/index?id=' + item.equNum})
|
||||
}}
|
||||
>巡检日志</View>
|
||||
<View
|
||||
className="rounded-xl w-20 bg-green-500 text-center py-1"
|
||||
style={{ color: 'white',display:item.inspectionState=='1'?'none':'', }}
|
||||
onClick={() => {
|
||||
Taro.navigateTo({ url: `/inspectionManager/inspectionContent/index?time=${date2}&device=${item.equName}&deviceCode=${item.equNum}&base=${item.base}&massif=${item.massif}`})
|
||||
}}
|
||||
>去巡检</View>
|
||||
</View>
|
||||
<View
|
||||
className="absolute left-0 top-0 text-white p-1 text-sm px-2"
|
||||
style={{ backgroundColor: '#0FC87C', color: 'white', borderRadius: '.3rem 0 .3rem 0' }}
|
||||
>
|
||||
{ item.inspectionState=='1'?'在线':'离线'}
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
</View>
|
||||
<View className="grid grid-cols-2 gap-2 p-2 rounded-sm">
|
||||
{
|
||||
dataList.map(item => {
|
||||
return (
|
||||
<View
|
||||
className='py-2 pt-0 rounded-md shadow-xl bg-white relative'
|
||||
>
|
||||
<Image src={'https://picx.zhimg.com/70/v2-76efadc2e5b562f6f727521aedbb31ef_1440w.image?source=172ae18b&biz_tag=Post'} className="w-full h-[6rem] rounded-md"></Image>
|
||||
<View className="text-lg px-4 text-bold">{item.equName}</View>
|
||||
<View className="text-sm px-4" style={{ color: '#00000090' }}>上次巡检 {item.inspectionTime ? new Date().toLocaleDateString(item.inspectionTime) : ''}</View>
|
||||
<View className="w-full px-4 flex justify-between items-start py-2 space-x-1">
|
||||
<View
|
||||
className="rounded-xl w-20 bg-green-500 text-center py-1"
|
||||
style={{ color: 'white' }}
|
||||
onClick={() => {
|
||||
Taro.navigateTo({ url: '/inspectionManager/inspectionLog/index?id=' + item.equNum })
|
||||
}}
|
||||
>巡检日志</View>
|
||||
<View
|
||||
className="rounded-xl w-20 bg-green-500 text-center py-1"
|
||||
style={{ color: 'white', display: item.inspectionState == '1' ? 'none' : '', }}
|
||||
onClick={() => {
|
||||
Taro.navigateTo({ url: `/inspectionManager/inspectionContent/index?time=${date2}&device=${item.equName}&deviceCode=${item.equNum}&base=${item.base}&massif=${item.massif}` })
|
||||
}}
|
||||
>去巡检</View>
|
||||
</View>
|
||||
<View
|
||||
className="absolute left-0 top-0 text-white p-1 text-sm px-2"
|
||||
style={{ backgroundColor: '#0FC87C', color: 'white', borderRadius: '.3rem 0 .3rem 0' }}
|
||||
>
|
||||
{item.inspectionState == '1' ? '在线' : '离线'}
|
||||
</View>
|
||||
</View>
|
||||
)
|
||||
})
|
||||
}
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
<Picker mode="date" value={date} onChange={handleDateChange} style={{ position:"absolute",right:'20px',top:'50px',color:'#c1c1c1',padding:'5px' }}>
|
||||
<View className="picker">
|
||||
当前选择:{date}
|
||||
</View>
|
||||
<Picker mode="date" value={date} onChange={handleDateChange} style={{ position: "absolute", right: '20px', top: '50px', color: '#c1c1c1', padding: '5px' }}>
|
||||
<View className="picker">
|
||||
当前选择:{date}
|
||||
</View>
|
||||
</Picker>
|
||||
</PageWrapper>
|
||||
|
||||
|
@ -14,6 +14,53 @@ const FormItem = ({ children, label = '' }) => {
|
||||
|
||||
//获取巡检人
|
||||
const page=()=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: {
|
||||
list: [
|
||||
{
|
||||
avatar: "",
|
||||
createTime: 1710756441000,
|
||||
deptId: 115,
|
||||
deptName: "武隆区",
|
||||
email: "",
|
||||
id: 137,
|
||||
loginDate: 1712730597000,
|
||||
loginIp: "127.0.0.1",
|
||||
mobile: "17899990001",
|
||||
nickname: "武隆区用户",
|
||||
postIds: [5],
|
||||
remark: "",
|
||||
sex: 1,
|
||||
status: 0,
|
||||
username: "wulong",
|
||||
},
|
||||
{
|
||||
avatar: "",
|
||||
createTime: 1710755399000,
|
||||
deptId: 116,
|
||||
deptName: "双河镇",
|
||||
email: "2222222@inspur.com",
|
||||
id: 136,
|
||||
loginDate: 1710841970000,
|
||||
loginIp: "60.208.111.197",
|
||||
mobile: "17899999999",
|
||||
nickname: "双河镇用户",
|
||||
postIds: [],
|
||||
remark: "",
|
||||
sex: 1,
|
||||
status: 0,
|
||||
username: "wlsh",
|
||||
}
|
||||
],
|
||||
total: 2
|
||||
}
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/system/user/page?pageNo=1&pageSize=10',
|
||||
method:'GET',
|
||||
@ -21,6 +68,15 @@ const page=()=>{
|
||||
}
|
||||
//添加巡检
|
||||
const getCreateCheck=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: "1777949628220403712"
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/check-logs/createCheck',
|
||||
method:'POST',
|
||||
|
@ -7,6 +7,35 @@ import Taro from "@tarojs/taro"
|
||||
|
||||
//获取数据
|
||||
const getPageByCondition=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: {
|
||||
list: data.equNum == '1770280426614771712' ? [
|
||||
{
|
||||
base: "武隆基地1",
|
||||
content: "ssss",
|
||||
createTime: 1712731199000,
|
||||
equName: "土壤墒情监测仪2",
|
||||
equNum: "1770280426614771712",
|
||||
id: "1777949628220403712",
|
||||
inspectionImage: "http://tmp/9iL2IWY39QPYef0adf8d7935c8a037946ab23c1a7411.png",
|
||||
inspectionNum: "1777949628220403712",
|
||||
inspectionResults: "正常",
|
||||
inspectionState: "1",
|
||||
inspectionTime: 0,
|
||||
inspector: null,
|
||||
inspectorId: 137,
|
||||
massif: "2号大棚",
|
||||
}
|
||||
] : [],
|
||||
total: data.equNum == '1770280426614771712' ? 1 : 0
|
||||
}
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/check-logs/pageByCondition',
|
||||
method:'GET',
|
||||
|
@ -41,6 +41,81 @@ const EnvMonitor = () => {
|
||||
console.log(baseId,'id');
|
||||
//获取设备
|
||||
const getEquipment=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721728",
|
||||
createTime: 1710830795000,
|
||||
deptId: 115,
|
||||
deviceCode: "1769978757536542720",
|
||||
deviceKind: "17",
|
||||
deviceMonitorType: "虫害数量,虫害种类,杀虫仓温度,烘干仓温度",
|
||||
deviceName: "智能虫情测报灯",
|
||||
deviceStatus: "offline",
|
||||
deviceType: "14,17",
|
||||
id: "1769978757536542720",
|
||||
imgId: "http://117.73.12.97:9000/inspur/67300bc094230654f1eddc667ffcfe123fed98c4494f5e5b3fd3d759a5d33779.jpg",
|
||||
latitude: "29.352796",
|
||||
location: null,
|
||||
longitude: "107.789363",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
userId: 137,
|
||||
},
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721728",
|
||||
createTime: 1710831206000,
|
||||
deptId: 115,
|
||||
deviceCode: "1769980482158735360",
|
||||
deviceKind: "15",
|
||||
deviceMonitorType: "风速,光照,大气温度,大气湿度,降水量,气压",
|
||||
deviceName: "七合一气象站2",
|
||||
deviceStatus: "online",
|
||||
deviceType: "14,15",
|
||||
id: "1769980482158735360",
|
||||
imgId: "http://117.73.12.97:9000/inspur/5aaa3fcff768b6a21f6a09088fc3ad73bbc588ce5c844e609fedaef9037068db.jpg",
|
||||
latitude: "29.353122",
|
||||
location: null,
|
||||
longitude: "107.797195",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
},
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721729",
|
||||
createTime: 1710902719000,
|
||||
deptId: 115,
|
||||
deviceCode: "1770280426614771712",
|
||||
deviceKind: "16",
|
||||
deviceMonitorType: "土壤温度,土壤湿度,PH值,EC值,土壤深度",
|
||||
deviceName: "土壤墒情监测仪2",
|
||||
deviceStatus: "online",
|
||||
deviceType: "14,16",
|
||||
id: "1770280426614771712",
|
||||
imgId: "http://117.73.12.97:9000/inspur/cc6f692080a91480054ae897febc141d4b2d8d96f0bc15c5a93d881ac8535e9c.jpg",
|
||||
latitude: "29.350629",
|
||||
location: null,
|
||||
longitude: "107.791775",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
userId: 137,
|
||||
}
|
||||
]
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/app/getDevice',
|
||||
method:'GET',
|
||||
|
@ -4,6 +4,96 @@ import { useEffect, useState } from "react";
|
||||
import { request } from "../../config/axios";
|
||||
import BasicStatus from "../../components/iot/basicStatus";
|
||||
const getMonitorDevices = (data) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
deviceCode: "1771095112159555584",
|
||||
deviceName: "视频监控摄像头2",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/7fa93c0eb70da8fe9e2bb2fcc91972fd70f9de33495e6fa84eb2586042459943.png",
|
||||
latitude: "29.355112",
|
||||
location: "1号棚入口",
|
||||
longitude: "107.797531",
|
||||
url: "http://117.73.12.97:9000/xcszny/3acd08b07f577a5b3ab773cc253427c7.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773262400744796160",
|
||||
deviceName: "视频监控摄像头3",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/fb9d48a0a6b1c2074aeb6a3dea44ab13bb809d9d74f7244aaab184203465f4e7.png",
|
||||
latitude: "29.355502",
|
||||
location: "1号棚中间",
|
||||
longitude: "107.798095",
|
||||
url: "http://117.73.12.97:9000/inspur/3acd08b07f577a5b3ab773cc253427c7.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773263270362423296",
|
||||
deviceName: "视频监控摄像头4",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/2d58e966c28cbd60821870df436cf3a9c4385b336275fd4cc348a8379b016fb9.png",
|
||||
latitude: "29.355793",
|
||||
location: "1号棚东北角",
|
||||
longitude: "107.798552",
|
||||
url: "http://117.73.12.97:9000/inspur/888c41b294adbaf0b95ebd88a3c721b2.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773263985864548352",
|
||||
deviceName: "视频监控摄像头5",
|
||||
deviceStatus: "fault",
|
||||
imgId: "http://117.73.12.97:9000/inspur/bc2e68651539be2b35a6c04599a04ad845080865fbfefa906c87b42f375269d8.png",
|
||||
latitude: "29.354304",
|
||||
location: "1号棚西南",
|
||||
longitude: "107.798096",
|
||||
url: "http://117.73.12.97:9000/inspur/888c41b294adbaf0b95ebd88a3c721b2.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773264341453447168",
|
||||
deviceName: "视频监控摄像头6",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/0b15382310765c396f1b5b5cd61bed8f8b01575b2f651e9e51ed57652bb96281.png",
|
||||
latitude: "29.354313",
|
||||
location: "1号棚北出口",
|
||||
longitude: "107.797588",
|
||||
url: "http://117.73.12.97:9000/inspur/888c41b294adbaf0b95ebd88a3c721b2.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773267386539122688",
|
||||
deviceName: "视频监控摄像头7",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/267ea95d57237bb74a02c1a88ac0e0060a38b49be33f4faf5393901aca965f5c.png",
|
||||
latitude: "29.354646",
|
||||
location: "1号棚外围01",
|
||||
longitude: "107.798056",
|
||||
url: "http://117.73.12.97:9000/inspur/1711955602297.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773267615820750848",
|
||||
deviceName: "视频监控摄像头8",
|
||||
deviceStatus: "offline",
|
||||
imgId: "http://117.73.12.97:9000/inspur/83a232031c06ee9295aafbe1d75bc6fc7d7d475dba085e7efa4c0077fb89ee65.png",
|
||||
latitude: "29.354714",
|
||||
location: "1号棚外围02",
|
||||
longitude: "107.798298",
|
||||
url: "http://117.73.12.97:9000/inspur/1711955602297.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773268127257403392",
|
||||
deviceName: "视频监控摄像头9",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/9e0e2919681e861ccfc4d7858ea2eb003ec19c01ad939d96aa96c3482b2ee74d.png",
|
||||
latitude: "29.355370",
|
||||
location: "1号棚外围03",
|
||||
longitude: "107.797569",
|
||||
url: "http://117.73.12.97:9000/inspur/1711955602297.mp4",
|
||||
}
|
||||
]
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url: '/agriculture/big-screen/monitorDeviceByPark',
|
||||
method: 'GET',
|
||||
|
@ -41,6 +41,81 @@ const EnvMonitor = () => {
|
||||
console.log(baseId,'id');
|
||||
//获取设备
|
||||
const getEquipment=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721728",
|
||||
createTime: 1710830795000,
|
||||
deptId: 115,
|
||||
deviceCode: "1769978757536542720",
|
||||
deviceKind: "17",
|
||||
deviceMonitorType: "虫害数量,虫害种类,杀虫仓温度,烘干仓温度",
|
||||
deviceName: "智能虫情测报灯",
|
||||
deviceStatus: "offline",
|
||||
deviceType: "14,17",
|
||||
id: "1769978757536542720",
|
||||
imgId: "http://117.73.12.97:9000/inspur/67300bc094230654f1eddc667ffcfe123fed98c4494f5e5b3fd3d759a5d33779.jpg",
|
||||
latitude: "29.352796",
|
||||
location: null,
|
||||
longitude: "107.789363",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
userId: 137,
|
||||
},
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721728",
|
||||
createTime: 1710831206000,
|
||||
deptId: 115,
|
||||
deviceCode: "1769980482158735360",
|
||||
deviceKind: "15",
|
||||
deviceMonitorType: "风速,光照,大气温度,大气湿度,降水量,气压",
|
||||
deviceName: "七合一气象站2",
|
||||
deviceStatus: "online",
|
||||
deviceType: "14,15",
|
||||
id: "1769980482158735360",
|
||||
imgId: "http://117.73.12.97:9000/inspur/5aaa3fcff768b6a21f6a09088fc3ad73bbc588ce5c844e609fedaef9037068db.jpg",
|
||||
latitude: "29.353122",
|
||||
location: null,
|
||||
longitude: "107.797195",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
},
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721729",
|
||||
createTime: 1710902719000,
|
||||
deptId: 115,
|
||||
deviceCode: "1770280426614771712",
|
||||
deviceKind: "16",
|
||||
deviceMonitorType: "土壤温度,土壤湿度,PH值,EC值,土壤深度",
|
||||
deviceName: "土壤墒情监测仪2",
|
||||
deviceStatus: "online",
|
||||
deviceType: "14,16",
|
||||
id: "1770280426614771712",
|
||||
imgId: "http://117.73.12.97:9000/inspur/cc6f692080a91480054ae897febc141d4b2d8d96f0bc15c5a93d881ac8535e9c.jpg",
|
||||
latitude: "29.350629",
|
||||
location: null,
|
||||
longitude: "107.791775",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
userId: 137,
|
||||
}
|
||||
]
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/app/getDevice',
|
||||
method:'GET',
|
||||
@ -74,6 +149,24 @@ const EnvMonitor = () => {
|
||||
const [contObj, setContObj] = useState({})
|
||||
//实时数据接口
|
||||
const getList=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: {
|
||||
airPressure: null,
|
||||
co2Density: null,
|
||||
humidity: null,
|
||||
lighting: null,
|
||||
rainfall: null,
|
||||
reportDate: null,
|
||||
temperature: null,
|
||||
windSpeed: null,
|
||||
}
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/big-screen/getDeviceNewData',
|
||||
method:'GET',
|
||||
@ -92,6 +185,126 @@ const EnvMonitor = () => {
|
||||
let [yAxisData,setyAxisData]=useState([])
|
||||
const [chartList, setChartList] = useState([])
|
||||
const getChart=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "20",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "18",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "16",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "14",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "12",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "10",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "08",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "06",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "04",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "02",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "00",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
}
|
||||
]
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/big-screen/getDeviceDataView',
|
||||
method:'GET',
|
||||
|
@ -60,6 +60,81 @@ const SoilMoisture = () => {
|
||||
let [time,setTime]=useState([])
|
||||
let [yAxisData,setyAxisData]=useState([])
|
||||
const getEquipment=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721728",
|
||||
createTime: 1710830795000,
|
||||
deptId: 115,
|
||||
deviceCode: "1769978757536542720",
|
||||
deviceKind: "17",
|
||||
deviceMonitorType: "虫害数量,虫害种类,杀虫仓温度,烘干仓温度",
|
||||
deviceName: "智能虫情测报灯",
|
||||
deviceStatus: "offline",
|
||||
deviceType: "14,17",
|
||||
id: "1769978757536542720",
|
||||
imgId: "http://117.73.12.97:9000/inspur/67300bc094230654f1eddc667ffcfe123fed98c4494f5e5b3fd3d759a5d33779.jpg",
|
||||
latitude: "29.352796",
|
||||
location: null,
|
||||
longitude: "107.789363",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
userId: 137,
|
||||
},
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721728",
|
||||
createTime: 1710831206000,
|
||||
deptId: 115,
|
||||
deviceCode: "1769980482158735360",
|
||||
deviceKind: "15",
|
||||
deviceMonitorType: "风速,光照,大气温度,大气湿度,降水量,气压",
|
||||
deviceName: "七合一气象站2",
|
||||
deviceStatus: "online",
|
||||
deviceType: "14,15",
|
||||
id: "1769980482158735360",
|
||||
imgId: "http://117.73.12.97:9000/inspur/5aaa3fcff768b6a21f6a09088fc3ad73bbc588ce5c844e609fedaef9037068db.jpg",
|
||||
latitude: "29.353122",
|
||||
location: null,
|
||||
longitude: "107.797195",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
},
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721729",
|
||||
createTime: 1710902719000,
|
||||
deptId: 115,
|
||||
deviceCode: "1770280426614771712",
|
||||
deviceKind: "16",
|
||||
deviceMonitorType: "土壤温度,土壤湿度,PH值,EC值,土壤深度",
|
||||
deviceName: "土壤墒情监测仪2",
|
||||
deviceStatus: "online",
|
||||
deviceType: "14,16",
|
||||
id: "1770280426614771712",
|
||||
imgId: "http://117.73.12.97:9000/inspur/cc6f692080a91480054ae897febc141d4b2d8d96f0bc15c5a93d881ac8535e9c.jpg",
|
||||
latitude: "29.350629",
|
||||
location: null,
|
||||
longitude: "107.791775",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
userId: 137,
|
||||
}
|
||||
]
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/app/getDevice',
|
||||
method:'GET',
|
||||
@ -79,6 +154,96 @@ const SoilMoisture = () => {
|
||||
},[])
|
||||
//获取实时数据
|
||||
const getData=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
deviceCode: "1771095112159555584",
|
||||
deviceName: "视频监控摄像头2",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/7fa93c0eb70da8fe9e2bb2fcc91972fd70f9de33495e6fa84eb2586042459943.png",
|
||||
latitude: "29.355112",
|
||||
location: "1号棚入口",
|
||||
longitude: "107.797531",
|
||||
url: "http://117.73.12.97:9000/xcszny/3acd08b07f577a5b3ab773cc253427c7.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773262400744796160",
|
||||
deviceName: "视频监控摄像头3",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/fb9d48a0a6b1c2074aeb6a3dea44ab13bb809d9d74f7244aaab184203465f4e7.png",
|
||||
latitude: "29.355502",
|
||||
location: "1号棚中间",
|
||||
longitude: "107.798095",
|
||||
url: "http://117.73.12.97:9000/inspur/3acd08b07f577a5b3ab773cc253427c7.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773263270362423296",
|
||||
deviceName: "视频监控摄像头4",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/2d58e966c28cbd60821870df436cf3a9c4385b336275fd4cc348a8379b016fb9.png",
|
||||
latitude: "29.355793",
|
||||
location: "1号棚东北角",
|
||||
longitude: "107.798552",
|
||||
url: "http://117.73.12.97:9000/inspur/888c41b294adbaf0b95ebd88a3c721b2.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773263985864548352",
|
||||
deviceName: "视频监控摄像头5",
|
||||
deviceStatus: "fault",
|
||||
imgId: "http://117.73.12.97:9000/inspur/bc2e68651539be2b35a6c04599a04ad845080865fbfefa906c87b42f375269d8.png",
|
||||
latitude: "29.354304",
|
||||
location: "1号棚西南",
|
||||
longitude: "107.798096",
|
||||
url: "http://117.73.12.97:9000/inspur/888c41b294adbaf0b95ebd88a3c721b2.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773264341453447168",
|
||||
deviceName: "视频监控摄像头6",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/0b15382310765c396f1b5b5cd61bed8f8b01575b2f651e9e51ed57652bb96281.png",
|
||||
latitude: "29.354313",
|
||||
location: "1号棚北出口",
|
||||
longitude: "107.797588",
|
||||
url: "http://117.73.12.97:9000/inspur/888c41b294adbaf0b95ebd88a3c721b2.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773267386539122688",
|
||||
deviceName: "视频监控摄像头7",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/267ea95d57237bb74a02c1a88ac0e0060a38b49be33f4faf5393901aca965f5c.png",
|
||||
latitude: "29.354646",
|
||||
location: "1号棚外围01",
|
||||
longitude: "107.798056",
|
||||
url: "http://117.73.12.97:9000/inspur/1711955602297.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773267615820750848",
|
||||
deviceName: "视频监控摄像头8",
|
||||
deviceStatus: "offline",
|
||||
imgId: "http://117.73.12.97:9000/inspur/83a232031c06ee9295aafbe1d75bc6fc7d7d475dba085e7efa4c0077fb89ee65.png",
|
||||
latitude: "29.354714",
|
||||
location: "1号棚外围02",
|
||||
longitude: "107.798298",
|
||||
url: "http://117.73.12.97:9000/inspur/1711955602297.mp4",
|
||||
},
|
||||
{
|
||||
deviceCode: "1773268127257403392",
|
||||
deviceName: "视频监控摄像头9",
|
||||
deviceStatus: "online",
|
||||
imgId: "http://117.73.12.97:9000/inspur/9e0e2919681e861ccfc4d7858ea2eb003ec19c01ad939d96aa96c3482b2ee74d.png",
|
||||
latitude: "29.355370",
|
||||
location: "1号棚外围03",
|
||||
longitude: "107.797569",
|
||||
url: "http://117.73.12.97:9000/inspur/1711955602297.mp4",
|
||||
}
|
||||
]
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/app/getSoilDataById',
|
||||
method:'GET',
|
||||
|
@ -41,6 +41,81 @@ const WeatherStation = () => {
|
||||
let [deviceOj,setDeviceObj]=useState({})
|
||||
//获取设备
|
||||
const getEquipment=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721728",
|
||||
createTime: 1710830795000,
|
||||
deptId: 115,
|
||||
deviceCode: "1769978757536542720",
|
||||
deviceKind: "17",
|
||||
deviceMonitorType: "虫害数量,虫害种类,杀虫仓温度,烘干仓温度",
|
||||
deviceName: "智能虫情测报灯",
|
||||
deviceStatus: "offline",
|
||||
deviceType: "14,17",
|
||||
id: "1769978757536542720",
|
||||
imgId: "http://117.73.12.97:9000/inspur/67300bc094230654f1eddc667ffcfe123fed98c4494f5e5b3fd3d759a5d33779.jpg",
|
||||
latitude: "29.352796",
|
||||
location: null,
|
||||
longitude: "107.789363",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
userId: 137,
|
||||
},
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721728",
|
||||
createTime: 1710831206000,
|
||||
deptId: 115,
|
||||
deviceCode: "1769980482158735360",
|
||||
deviceKind: "15",
|
||||
deviceMonitorType: "风速,光照,大气温度,大气湿度,降水量,气压",
|
||||
deviceName: "七合一气象站2",
|
||||
deviceStatus: "online",
|
||||
deviceType: "14,15",
|
||||
id: "1769980482158735360",
|
||||
imgId: "http://117.73.12.97:9000/inspur/5aaa3fcff768b6a21f6a09088fc3ad73bbc588ce5c844e609fedaef9037068db.jpg",
|
||||
latitude: "29.353122",
|
||||
location: null,
|
||||
longitude: "107.797195",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
},
|
||||
{
|
||||
belongPark: "1769896538700668928",
|
||||
belongPlot: "1769908355099721729",
|
||||
createTime: 1710902719000,
|
||||
deptId: 115,
|
||||
deviceCode: "1770280426614771712",
|
||||
deviceKind: "16",
|
||||
deviceMonitorType: "土壤温度,土壤湿度,PH值,EC值,土壤深度",
|
||||
deviceName: "土壤墒情监测仪2",
|
||||
deviceStatus: "online",
|
||||
deviceType: "14,16",
|
||||
id: "1770280426614771712",
|
||||
imgId: "http://117.73.12.97:9000/inspur/cc6f692080a91480054ae897febc141d4b2d8d96f0bc15c5a93d881ac8535e9c.jpg",
|
||||
latitude: "29.350629",
|
||||
location: null,
|
||||
longitude: "107.791775",
|
||||
parkDetailName: null,
|
||||
parkName: null,
|
||||
remark: "暂无",
|
||||
url: null,
|
||||
userId: 137,
|
||||
}
|
||||
]
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/app/getDevice',
|
||||
method:'GET',
|
||||
@ -76,6 +151,24 @@ const WeatherStation = () => {
|
||||
//实时数据接口
|
||||
|
||||
const getList=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: {
|
||||
airPressure: null,
|
||||
co2Density: null,
|
||||
humidity: null,
|
||||
lighting: null,
|
||||
rainfall: null,
|
||||
reportDate: null,
|
||||
temperature: null,
|
||||
windSpeed: null,
|
||||
}
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/big-screen/getDeviceNewData',
|
||||
method:'GET',
|
||||
@ -87,6 +180,126 @@ const WeatherStation = () => {
|
||||
let [yAxisData,setyAxisData]=useState([])
|
||||
const [chartList, setChartList] = useState([])
|
||||
const getChart=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: [
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "20",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "18",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "16",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "14",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "12",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "10",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "08",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "06",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "04",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "02",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
},
|
||||
{
|
||||
airPressure: "15.03",
|
||||
co2Density: "0.1",
|
||||
humidity: "5.33",
|
||||
lighting: "4683.33",
|
||||
rainfall: "0.1",
|
||||
reportDate: "00",
|
||||
temperature: "4.05",
|
||||
windSpeed: "0.15",
|
||||
}
|
||||
]
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url:'/agriculture/big-screen/getDeviceDataView',
|
||||
method:'GET',
|
||||
|
@ -12,6 +12,75 @@ const MsgDetail = () => {
|
||||
let id:any=router.params.id
|
||||
|
||||
const getList=(data)=>{
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: data.id == '3' ? {
|
||||
createTime: 1711009896000,
|
||||
currentValue: "10",
|
||||
dealInfo: null,
|
||||
dealPerson: null,
|
||||
dealPersonId: null,
|
||||
dealTime: null,
|
||||
deviceCode: "1769980482158735360",
|
||||
deviceType: null,
|
||||
id: 3,
|
||||
imgId: null,
|
||||
parkCode: "1769896538700668928",
|
||||
plotCode: "1769908355099721728",
|
||||
threshold: "12",
|
||||
warnInfo: "温度监测异常",
|
||||
warnStatus: "0",
|
||||
warnTime: 1710965135000,
|
||||
warnTitle: "环境温度预警",
|
||||
warnType: "环境温度",
|
||||
warnUnit: "℃",
|
||||
} : data.id == '2' ? {
|
||||
createTime: 1711009385000,
|
||||
currentValue: "53",
|
||||
dealInfo: null,
|
||||
dealPerson: null,
|
||||
dealPersonId: null,
|
||||
dealTime: null,
|
||||
deviceCode: "1770334483555512320",
|
||||
deviceType: null,
|
||||
id: 2,
|
||||
imgId: null,
|
||||
parkCode: "1769896538700668928",
|
||||
plotCode: "1769908355099721728",
|
||||
threshold: "60",
|
||||
warnInfo: "浅层土壤湿度过低",
|
||||
warnStatus: "0",
|
||||
warnTime: 1710921600000,
|
||||
warnTitle: "土壤湿度(20cm)预警",
|
||||
warnType: "土壤湿度(20cm)",
|
||||
warnUnit: "%",
|
||||
} : data.id == '4' ? {
|
||||
createTime: 1711010667000,
|
||||
currentValue: "34",
|
||||
dealInfo: null,
|
||||
dealPerson: null,
|
||||
dealPersonId: null,
|
||||
dealTime: null,
|
||||
deviceCode: "1769978757536542720",
|
||||
deviceType: null,
|
||||
id: 4,
|
||||
imgId: null,
|
||||
parkCode: "1769896538700668928",
|
||||
plotCode: "1769908355099721729",
|
||||
threshold: "30",
|
||||
warnInfo: "监测到当前虫害数量已超出阈值",
|
||||
warnStatus: "0",
|
||||
warnTime: 1710932460000,
|
||||
warnTitle: "虫害情况预警",
|
||||
warnType: "虫害情况",
|
||||
warnUnit: "只/㎡",
|
||||
} : {}
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
return request({
|
||||
url: '/agriculture/warning-record-big-screen/getRecordInfo',
|
||||
method: 'GET',
|
||||
|
@ -6,20 +6,20 @@ import { useEffect, useState } from "react"
|
||||
import { request } from "../../config/axios"
|
||||
|
||||
const login = (data, tenantId = '1') => {
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: {
|
||||
accessToken: "e41e9440229c4849b8ed1a9e574a3175",
|
||||
expiresTime: 1712722539858,
|
||||
refreshToken: "d80ccfe3a03942a2a197535de7d6cd93",
|
||||
userId: 137,
|
||||
}
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
// return new Promise((resolve, reject) => {
|
||||
// Taro.showLoading({ title: '加载中...' })
|
||||
// setTimeout(() => {
|
||||
// resolve({
|
||||
// data: {
|
||||
// accessToken: "e41e9440229c4849b8ed1a9e574a3175",
|
||||
// expiresTime: 1712722539858,
|
||||
// refreshToken: "d80ccfe3a03942a2a197535de7d6cd93",
|
||||
// userId: 137,
|
||||
// }
|
||||
// })
|
||||
// Taro.hideLoading()
|
||||
// }, 300)
|
||||
// })
|
||||
return request({
|
||||
url: '/system/auth/login',
|
||||
method: 'POST',
|
||||
@ -30,15 +30,15 @@ const login = (data, tenantId = '1') => {
|
||||
}
|
||||
|
||||
const getTenantId = (data) => {
|
||||
return new Promise((resolve, reject) => {
|
||||
Taro.showLoading({ title: '加载中...' })
|
||||
setTimeout(() => {
|
||||
resolve({
|
||||
data: '158'
|
||||
})
|
||||
Taro.hideLoading()
|
||||
}, 300)
|
||||
})
|
||||
// return new Promise((resolve, reject) => {
|
||||
// Taro.showLoading({ title: '加载中...' })
|
||||
// setTimeout(() => {
|
||||
// resolve({
|
||||
// data: '158'
|
||||
// })
|
||||
// Taro.hideLoading()
|
||||
// }, 300)
|
||||
// })
|
||||
return request({
|
||||
url: '/system/tenant/get-id-by-name',
|
||||
method: 'GET',
|
||||
|
Loading…
Reference in New Issue
Block a user