Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
JINRUN-DP
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
xinzhedeai
JINRUN-DP
Commits
edf3e55d
Commit
edf3e55d
authored
Dec 22, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
左侧设备背景图
parent
704c0637
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
index-dp.ts
src/api/index-dp.ts
+2
-2
LeftDeviceStatus.vue
src/components/MineMonitor/LeftDeviceStatus.vue
+22
-1
No files found.
src/api/index-dp.ts
View file @
edf3e55d
...
@@ -51,9 +51,9 @@ export const getCarLogList = async (): Promise<any> => await axios.get('home/car
...
@@ -51,9 +51,9 @@ export const getCarLogList = async (): Promise<any> => await axios.get('home/car
// 修改报警状态
// 修改报警状态
export
const
setAlarmStatusApi
=
async
(
command
:
string
):
Promise
<
any
>
=>
await
axios
.
p
ut
(
`/home/sound/
${
command
}
`
,
data
);
export
const
setAlarmStatusApi
=
async
(
command
:
string
):
Promise
<
any
>
=>
await
axios
.
p
ost
(
`/home/sound/
${
command
}
`
);
// 获取报警状态
// 获取报警状态
export
const
getAlarmStatusApi
=
async
():
Promise
<
any
>
=>
await
axios
.
get
(
'
/home/
sound
/status
'
);
export
const
getAlarmStatusApi
=
async
():
Promise
<
any
>
=>
await
axios
.
get
(
'
/home/
alarm
/status
'
);
// export const getOnlineAlarmList = async (): Promise<any> => await axios.get('/home/online/alarm/list');
// export const getOnlineAlarmList = async (): Promise<any> => await axios.get('/home/online/alarm/list');
// export const getOnlineAlarmList = async (): Promise<any> => await axios.get('/home/online/alarm/list');
// export const getOnlineAlarmList = async (): Promise<any> => await axios.get('/home/online/alarm/list');
...
...
src/components/MineMonitor/LeftDeviceStatus.vue
View file @
edf3e55d
...
@@ -54,7 +54,28 @@ const fetchDeviceStatus = async () => {
...
@@ -54,7 +54,28 @@ const fetchDeviceStatus = async () => {
try
{
try
{
const
response
=
await
getDeviceStatusInfo
();
const
response
=
await
getDeviceStatusInfo
();
if
(
response
.
data
.
code
==
200
)
{
if
(
response
.
data
.
code
==
200
)
{
deviceStatusList
.
value
=
response
.
data
.
data
;
// 处理数据,添加color属性
const
processedList
=
response
.
data
.
data
.
map
((
item
:
any
)
=>
{
let
color
=
''
;
switch
(
item
.
name
)
{
case
'
在线监测
'
:
color
=
'
cyan
'
;
break
;
case
'
视频监测
'
:
color
=
'
yellow
'
;
break
;
case
'
人员定位
'
:
color
=
'
blue
'
;
break
;
case
'
车辆定位
'
:
color
=
'
green
'
;
break
;
default
:
color
=
''
;
// 默认空值,可根据实际需求设置默认颜色
}
return
{
...
item
,
color
};
});
deviceStatusList
.
value
=
processedList
;
}
else
{
}
else
{
message
.
error
(
response
.
data
.
msg
);
message
.
error
(
response
.
data
.
msg
);
}
}
...
...
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