Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
DC-TOM
Project
Project
Details
Activity
Releases
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
刘照晖
DC-TOM
Commits
d49271c4
Commit
d49271c4
authored
May 23, 2025
by
Cai Wei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(*): 首页及除尘器总览连调
parent
d5aaddd8
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
454 additions
and
438 deletions
+454
-438
dashboard.js
src/request/api/dashboard.js
+7
-0
dustOverview.js
src/request/api/dustOverview.js
+75
-3
map-svg.vue
src/views/dashboard/components/map-svg.vue
+62
-38
index.vue
src/views/dashboard/index.vue
+12
-47
addDustCollectorDialog.vue
src/views/dustOverview/components/addDustCollectorDialog.vue
+163
-87
index.vue
src/views/dustOverview/index.vue
+135
-263
No files found.
src/request/api/dashboard.js
View file @
d49271c4
...
...
@@ -19,3 +19,10 @@ export function getExceptionMonitor() {
method
:
"get"
,
});
}
export
function
getDusterAlarm
()
{
return
request
({
url
:
"/api/home/duster/alarm"
,
method
:
"get"
,
});
}
src/request/api/dustOverview.js
View file @
d49271c4
...
...
@@ -7,15 +7,87 @@ export function getDusterLeakNum() {
}
export
function
getHealthPercent
()
{
return
request
({
url
:
"/getHealthPercent"
,
method
:
"get"
,
});
}
export
function
getCloseLoopNum
()
{
return
request
({
url
:
"/getCloseLoopNum"
,
method
:
"get"
,
});
}
export
function
getProductionLine
()
{
return
request
({
url
:
"/transaction/getProductionLine"
,
method
:
"get"
,
});
}
export
function
getDusterList
(
params
)
{
return
request
({
url
:
"/getDusterList"
,
method
:
"get"
,
params
,
});
}
export
function
getVisDusterList
(
params
)
{
return
request
({
url
:
"/
getHealthPercen
t"
,
url
:
"/
queryVisDusterLis
t"
,
method
:
"get"
,
params
,
});
}
export
function
postAddDuster
(
params
)
{
return
request
({
url
:
"/addDuster"
,
method
:
"post"
,
data
:
params
,
});
}
export
function
postUpdateDuster
(
params
)
{
return
request
({
url
:
"/updateDuster"
,
method
:
"post"
,
data
:
params
,
});
}
export
function
getCompartAllocation
(
params
)
{
return
request
({
url
:
"/queryCompartAllocation"
,
method
:
"get"
,
params
,
});
}
export
function
postAddCompartAllocation
(
params
)
{
return
request
({
url
:
"/addCompartAllocation"
,
method
:
"post"
,
data
:
params
,
});
}
export
function
postAddValveInfo
(
params
)
{
return
request
({
url
:
"/addValveInfo"
,
method
:
"post"
,
data
:
params
,
});
}
export
function
get
CloseLoopNum
(
)
{
export
function
get
ValveAllocation
(
params
)
{
return
request
({
url
:
"/
getCloseLoopNum
"
,
url
:
"/
queryValveAllocation
"
,
method
:
"get"
,
params
,
});
}
\ No newline at end of file
src/views/dashboard/components/map-svg.vue
View file @
d49271c4
...
...
@@ -59,48 +59,65 @@
</
template
>
<
script
setup
>
import
{
onMounted
,
onBeforeUnmount
,
ref
}
from
"vue"
;
import
{
onMounted
,
onBeforeUnmount
,
ref
,
watch
}
from
"vue"
;
import
*
as
echarts
from
"echarts"
;
import
{
getLineOption
}
from
"@/utils/chart"
;
// 定义坐标点位数据
const
spots
=
ref
([
{
id
:
1
,
no
:
"wp001"
,
x
:
41
,
y
:
22
,
name
:
"4#除尘器"
,
status
:
0
,
description
:
[
"无异常"
],
},
{
id
:
2
,
no
:
"wp001"
,
x
:
45
,
y
:
70
,
name
:
"站点B"
,
status
:
0
,
description
:
[
"运行正常"
],
},
{
id
:
3
,
no
:
"wp001"
,
x
:
77
,
y
:
36
,
name
:
"3#除尘器"
,
status
:
1
,
description
:
[
"三仓室存在轻微泄漏"
,
"三仓室存在轻微泄漏"
,
"三仓室存在轻微泄漏"
],
const
props
=
defineProps
({
mapList
:
{
type
:
Array
,
default
:
()
=>
[],
},
{
id
:
4
,
no
:
"wp001"
,
x
:
50
,
y
:
65
,
name
:
"2#除尘器"
,
status
:
1
,
description
:
[
"除尘器脉冲阀故障或者提升阀故障"
],
});
watch
(
()
=>
props
.
mapList
,
()
=>
{
initMap
();
},
{
deep
:
true
}
);
// 定义坐标点位数据
const
spots
=
ref
([
// {
// id:1,
// no: "wp001",
// x: 41,
// y: 22,
// name: "4#除尘器",
// status: 0,
// description: ["无异常"],
// },
// {
// id:2,
// no: "wp001",
// x: 45,
// y: 70,
// name: "站点B",
// status: 0,
// description: ["运行正常"],
// },
// {
// id:3,
// no: "wp001",
// x: 77,
// y: 36,
// name: "3#除尘器",
// status: 1,
// description: ["三仓室存在轻微泄漏", "三仓室存在轻微泄漏", "三仓室存在轻微泄漏"],
// },
// {
// id:4,
// no: "wp001",
// x: 50,
// y: 65,
// name: "2#除尘器",
// status: 1,
// description: ["除尘器脉冲阀故障或者提升阀故障"],
// },
]);
const
activeSpot
=
ref
(
null
);
...
...
@@ -160,7 +177,14 @@ const getStatusText = (status) => {
return
statusMap
[
status
]
||
status
;
};
onMounted
(()
=>
{});
const
initMap
=
()
=>
{
console
.
log
(
props
.
mapList
,
'props.mapList'
)
spots
.
value
=
props
.
mapList
||
[];
}
onMounted
(()
=>
{
initMap
();
});
onBeforeUnmount
(()
=>
{
clearTimer
();
...
...
src/views/dashboard/index.vue
View file @
d49271c4
...
...
@@ -28,14 +28,14 @@
</div>
<div
class=
"map-box"
>
<map-svg></map-svg>
<map-svg
:mapList=
"mapList"
></map-svg>
</div>
</div>
</
template
>
<
script
setup
>
import
{
ref
,
onMounted
,
onBeforeUnmount
,
computed
,
nextTick
}
from
"vue"
;
import
{
getHealthOverview
,
getHealthStatistic
,
getExceptionMonitor
}
from
"@/request/api/dashboard"
;
import
{
getHealthOverview
,
getHealthStatistic
,
getExceptionMonitor
,
getDusterAlarm
}
from
"@/request/api/dashboard"
;
import
{
useRoute
,
useRouter
}
from
"vue-router"
;
import
msgItem
from
"./components/msg-item.vue"
;
import
chartLine
from
"./components/chart-line.vue"
;
...
...
@@ -58,6 +58,7 @@ const router = useRouter();
const
msgList
=
ref
([
]);
const
mapList
=
ref
([]);
const
customColorMethod
=
(
percentage
)
=>
{
if
(
percentage
<
60
)
{
...
...
@@ -76,69 +77,33 @@ const healthOverview = () => {
pulseValve
.
value
=
Number
(
res
.
data
.
pulseValve
.
split
(
'%'
)[
0
])
poppetValve
.
value
=
Number
(
res
.
data
.
poppetValve
.
split
(
'%'
)[
0
])
})
// const res = {
// "data": {
// "average": "20%",
// "bag": "10%",
// "pulseValve": "20%",
// "poppetValve": "30%"
// },
// msg: "访问成功",
// success: true,
// code: 1
// }
}
const
healthStatistic
=
()
=>
{
getHealthStatistic
().
then
(
res
=>
{
chartData
.
value
=
res
.
data
;
})
// const res = {
// "data": [
// {
// "date": "2025-05-01",
// "healthDegree": "75"
// },
// {
// "date": "2025-05-02",
// "healthDegree": "68"
// }
// ],
// "msg": "访问成功",
// "success": true,
// code: 1,
// };
};
const
exceptionMonitor
=
()
=>
{
getExceptionMonitor
().
then
(
res
=>
{
msgList
.
value
=
res
.
data
;
})
// const res = {
// "data": [
// {
// "date": "2025-05-01 10:00",
// "dusterName": "3#除尘器",
// "message": "三仓室存在轻重泄露"
// },
// {
// "date": "2025-05-01 10:00",
// "dusterName": "3#除尘器",
// "message": "三仓室存在轻重泄露"
// }
// ],
// msg: "访问成功",
// success: true,
// code: 1
// }
// msgList.value = res.data;
}
const
handleDusterAlarm
=
()
=>
{
getDusterAlarm
().
then
(
res
=>
{
mapList
.
value
=
res
.
data
;
})
}
onMounted
(
async
()
=>
{
healthOverview
();
healthStatistic
();
exceptionMonitor
();
handleDusterAlarm
();
});
onBeforeUnmount
(()
=>
{
});
...
...
src/views/dustOverview/components/addDustCollectorDialog.vue
View file @
d49271c4
This diff is collapsed.
Click to expand it.
src/views/dustOverview/index.vue
View file @
d49271c4
This diff is collapsed.
Click to expand it.
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