Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b7d6c946
authored
Feb 27, 2025
by
alwayssuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: home 1
parent
4dfc8c1b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
14 deletions
+25
-14
src/views/iot/home/index.vue
+25
-14
No files found.
src/views/iot/home/index.vue
View file @
b7d6c946
...
...
@@ -6,12 +6,15 @@
<el-col
:span=
"6"
>
<el-card
class=
"stat-card"
shadow=
"never"
>
<div
class=
"flex flex-col"
>
<span
class=
"text-gray-500 text-base mb-1"
>
品类数量
</span>
<div
class=
"flex justify-between items-center mb-1"
>
<span
class=
"text-gray-500 text-base font-medium"
>
品类数量
</span>
<Icon
icon=
"ep:menu"
class=
"text-2xl text-blue-400"
/>
</div>
<span
class=
"text-3xl font-bold text-gray-700"
>
{{
statsData
.
categoryTotal
}}
</span>
<el-divider
class=
"my-2"
/>
<div
class=
"flex items-center text-gray-400 text-sm"
>
<div
class=
"flex
justify-between
items-center text-gray-400 text-sm"
>
<span>
今日新增
</span>
<span
class=
"
ml-1
text-green-500"
>
↑ 0
</span>
<span
class=
"text-green-500"
>
↑ 0
</span>
</div>
</div>
</el-card>
...
...
@@ -19,12 +22,15 @@
<el-col
:span=
"6"
>
<el-card
class=
"stat-card"
shadow=
"never"
>
<div
class=
"flex flex-col"
>
<span
class=
"text-gray-500 text-base mb-1"
>
产品数量
</span>
<div
class=
"flex justify-between items-center mb-1"
>
<span
class=
"text-gray-500 text-base font-medium"
>
产品数量
</span>
<Icon
icon=
"ep:box"
class=
"text-2xl text-orange-400"
/>
</div>
<span
class=
"text-3xl font-bold text-gray-700"
>
{{
statsData
.
productTotal
}}
</span>
<el-divider
class=
"my-2"
/>
<div
class=
"flex items-center text-gray-400 text-sm"
>
<div
class=
"flex
justify-between
items-center text-gray-400 text-sm"
>
<span>
今日新增
</span>
<span
class=
"
ml-1
text-green-500"
>
↑ 0
</span>
<span
class=
"text-green-500"
>
↑ 0
</span>
</div>
</div>
</el-card>
...
...
@@ -32,12 +38,15 @@
<el-col
:span=
"6"
>
<el-card
class=
"stat-card"
shadow=
"never"
>
<div
class=
"flex flex-col"
>
<span
class=
"text-gray-500 text-base mb-1"
>
设备数量
</span>
<div
class=
"flex justify-between items-center mb-1"
>
<span
class=
"text-gray-500 text-base font-medium"
>
设备数量
</span>
<Icon
icon=
"ep:cpu"
class=
"text-2xl text-purple-400"
/>
</div>
<span
class=
"text-3xl font-bold text-gray-700"
>
{{
statsData
.
deviceTotal
}}
</span>
<el-divider
class=
"my-2"
/>
<div
class=
"flex items-center text-gray-400 text-sm"
>
<div
class=
"flex
justify-between
items-center text-gray-400 text-sm"
>
<span>
今日新增
</span>
<span
class=
"
ml-1
text-green-500"
>
↑ 0
</span>
<span
class=
"text-green-500"
>
↑ 0
</span>
</div>
</div>
</el-card>
...
...
@@ -45,12 +54,15 @@
<el-col
:span=
"6"
>
<el-card
class=
"stat-card"
shadow=
"never"
>
<div
class=
"flex flex-col"
>
<span
class=
"text-gray-500 text-base mb-1"
>
物模型消息
</span>
<div
class=
"flex justify-between items-center mb-1"
>
<span
class=
"text-gray-500 text-base font-medium"
>
物模型消息
</span>
<Icon
icon=
"ep:message"
class=
"text-2xl text-teal-400"
/>
</div>
<span
class=
"text-3xl font-bold text-gray-700"
>
{{
statsData
.
reportTotal
}}
</span>
<el-divider
class=
"my-2"
/>
<div
class=
"flex items-center text-gray-400 text-sm"
>
<div
class=
"flex
justify-between
items-center text-gray-400 text-sm"
>
<span>
今日新增
</span>
<span
class=
"
ml-1
text-green-500"
>
↑ 0
</span>
<span
class=
"text-green-500"
>
↑ 0
</span>
</div>
</div>
</el-card>
...
...
@@ -125,6 +137,7 @@ import { LabelLayout, UniversalTransition } from 'echarts/features'
import
{
CanvasRenderer
}
from
'echarts/renderers'
import
{
ProductCategoryApi
}
from
'@/api/iot/statistics'
import
{
formatDate
}
from
'@/utils/formatTime'
import
{
Icon
}
from
'@/components/Icon'
/** IoT 首页 */
defineOptions
({
name
:
'IotHome'
})
...
...
@@ -165,8 +178,6 @@ const statsData = ref({
const
getStats
=
async
()
=>
{
const
res
=
await
ProductCategoryApi
.
getIotMainStats
()
statsData
.
value
=
res
console
.
log
(
res
)
console
.
log
(
statsData
.
value
)
initCharts
()
}
...
...
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