Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
qingdaoMuseumPlatform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
node_server
qingdaoMuseumPlatform
Commits
2eb4581a
Commit
2eb4581a
authored
Jul 17, 2026
by
PC-20251223ZVQQ\Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IAQ页面优化和环境监测时间范围变更
parent
a29676d4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
6 deletions
+19
-6
IAQ.html
public/IAQ.html
+8
-4
device.ts
src/biz/device.ts
+11
-2
No files found.
public/IAQ.html
View file @
2eb4581a
...
@@ -368,27 +368,31 @@
...
@@ -368,27 +368,31 @@
flex
:
1
;
flex
:
1
;
margin-top
:
6px
;
margin-top
:
6px
;
min-height
:
0
;
min-height
:
0
;
overflow
-y
:
auto
;
overflow
:
auto
;
}
}
.table-scroll
{
.table-scroll
{
overflow-x
:
auto
;
min-height
:
100%
;
min-height
:
100%
;
}
}
table
{
table
{
width
:
100%
;
width
:
100%
;
min-width
:
900px
;
min-width
:
900px
;
border-collapse
:
collapse
;
border-collapse
:
separate
;
border-spacing
:
0
;
font-size
:
12px
;
font-size
:
12px
;
}
}
thead
{
thead
{
background
:
rgba
(
var
(
--color-primary-rgb
),
0.06
);
background
:
rgba
(
var
(
--color-primary-rgb
),
0.06
);
}
}
th
{
th
{
position
:
sticky
;
top
:
0
;
z-index
:
2
;
padding
:
10px
8px
;
padding
:
10px
8px
;
text-align
:
center
;
text-align
:
center
;
font-weight
:
500
;
font-weight
:
500
;
color
:
var
(
--color-
primary-l
ight
);
color
:
var
(
--color-
text-br
ight
);
font-size
:
12px
;
font-size
:
12px
;
background
:
#101d12
;
border-bottom
:
1px
solid
rgba
(
var
(
--color-primary-rgb
),
0.15
);
border-bottom
:
1px
solid
rgba
(
var
(
--color-primary-rgb
),
0.15
);
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
...
...
src/biz/device.ts
View file @
2eb4581a
...
@@ -292,13 +292,22 @@ function getTodayStart(): string {
...
@@ -292,13 +292,22 @@ function getTodayStart(): string {
}
}
/**
/**
* 获取最近一小时起始的时间字符串
*/
function
getLastHourStart
():
string
{
const
now
=
new
Date
();
now
.
setHours
(
now
.
getHours
()
-
1
);
return
formatTime
(
now
);
}
/**
* 获取当天最近的 device_data 记录(按设备测量时间倒序,限量返回)
* 获取当天最近的 device_data 记录(按设备测量时间倒序,限量返回)
*/
*/
async
function
getTodayDeviceData
(
deviceId
:
string
,
limit
:
number
=
RECORD_LIMIT
):
Promise
<
any
[]
>
{
async
function
getTodayDeviceData
(
deviceId
:
string
,
limit
:
number
=
RECORD_LIMIT
):
Promise
<
any
[]
>
{
const
todayStart
=
getToday
Start
();
const
hourAgo
=
getLastHour
Start
();
const
params
:
any
=
{
const
params
:
any
=
{
device_id
:
deviceId
,
device_id
:
deviceId
,
device_time
:
{
"%gte%"
:
todayStart
},
device_time
:
{
"%gte%"
:
hourAgo
},
"%orderDesc%"
:
"device_time"
,
"%orderDesc%"
:
"device_time"
,
};
};
if
(
limit
)
params
[
"%limit%"
]
=
limit
;
if
(
limit
)
params
[
"%limit%"
]
=
limit
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment