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
301b1793
Commit
301b1793
authored
May 23, 2025
by
liuyangyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
布袋周期页面联调
parent
8bfae5f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
87 additions
and
76 deletions
+87
-76
chart.js
src/utils/chart.js
+3
-4
collectorList.vue
src/views/collectorList/collectorList.vue
+81
-70
chart-line.vue
src/views/collectorList/components/chart-line.vue
+3
-2
No files found.
src/utils/chart.js
View file @
301b1793
...
...
@@ -69,10 +69,9 @@ export const getDustLineOption = (xData = [], seriesData = []) => ({
containLabel
:
true
,
},
legend
:
{
data
:
[
"
健康度指数(%)
"
],
data
:
[
"
周期(天数)
"
],
bottom
:
"0%"
,
icon
:
"circle"
,
itemWidth
:
10
,
itemWidth
:
20
,
itemHeight
:
10
,
itemGap
:
10
,
},
...
...
@@ -105,7 +104,7 @@ export const getDustLineOption = (xData = [], seriesData = []) => ({
},
series
:
[
{
name
:
""
,
name
:
"
周期(天数)
"
,
type
:
"line"
,
color
:
"#399DFA"
,
data
:
seriesData
,
...
...
src/views/collectorList/collectorList.vue
View file @
301b1793
...
...
@@ -5,7 +5,7 @@
<el-form
:inline=
"true"
:model=
"formInline"
class=
"demo-form-inline"
>
<el-form-item
label=
"仓室"
>
<el-input
v-model=
"formInline.
deviceName
"
v-model=
"formInline.
compart
"
placeholder=
"请输入仓室名称"
style=
"width: 180px"
clearable
...
...
@@ -13,7 +13,7 @@
</el-form-item>
<el-form-item
label=
"除尘器名称"
>
<el-input
v-model=
"formInline.d
evice
Name"
v-model=
"formInline.d
uster
Name"
placeholder=
"请输入除尘器名称"
style=
"width: 180px"
clearable
...
...
@@ -30,7 +30,7 @@
/>
</el-form-item>
<el-form-item>
<el-button
type=
"default"
class=
"default-btn"
@
click=
"on
Submi
t"
<el-button
type=
"default"
class=
"default-btn"
@
click=
"on
Res
t"
>
重置
</el-button
>
<el-button
type=
"primary"
class=
"search-btn"
@
click=
"onSubmit"
...
...
@@ -50,7 +50,7 @@
<common-table
:data=
"tableData.list"
:columns=
"tableColumns"
:default-page-size=
"
1
0"
:default-page-size=
"
2
0"
@
pagination-change=
"handlePaginationChange"
:pagination-texts=
"
{
total: '共',
...
...
@@ -63,9 +63,9 @@
<template
#
index=
"
{ $index }">
{{
getIndex
(
$index
)
}}
</
template
>
<
template
#
d
evice
Name=
"{ row }"
>
<span
class=
"health-score"
@
dblclick=
"openDialog(row.d
evice
Name)"
>
{{
row
.
d
evice
Name
<
template
#
d
uster
Name=
"{ row }"
>
<span
class=
"health-score"
@
dblclick=
"openDialog(row.d
uster
Name)"
>
{{
row
.
d
uster
Name
}}
</span>
</
template
>
<!-- <template #operation="{ row }">
...
...
@@ -95,8 +95,8 @@
<el-option
v-for=
"i in dustList.list"
:key=
"i"
:label=
"`${i.d
evice
Name}`"
:value=
"i.d
evice
No"
:label=
"`${i.d
uster
Name}`"
:value=
"i.d
uster
No"
/>
</el-select>
</div>
...
...
@@ -119,15 +119,16 @@
import
{
ref
,
onMounted
,
onBeforeUnmount
,
computed
,
reactive
}
from
"vue"
;
import
CommonTable
from
"@/components/commonTable/index.vue"
;
import
chartLine
from
"./components/chart-line.vue"
;
import
{
getDataFun
,
postDataJSON
}
from
"@/request/method.js"
;
const
formInline
=
ref
({
compart
:
""
,
dusterName
:
""
,
date
:
""
,
date
:
[
""
,
""
]
,
});
const
currentPage
=
ref
(
1
);
const
pageSize
=
ref
(
1
0
);
const
pageSize
=
ref
(
2
0
);
const
dustLineisShow
=
ref
(
false
);
const
tableColumns
=
ref
([
...
...
@@ -137,7 +138,7 @@ const tableColumns = ref([
width
:
"5%"
,
},
{
prop
:
"d
evice
Name"
,
prop
:
"d
uster
Name"
,
label
:
"除尘器名称"
,
width
:
"8%"
,
},
...
...
@@ -147,37 +148,32 @@ const tableColumns = ref([
width
:
"8%"
,
},
{
prop
:
"
posi
tion"
,
prop
:
"
bagLoca
tion"
,
label
:
"布袋位置(排/列)"
,
width
:
"8%"
,
},
{
prop
:
"
changeDateRemind
"
,
prop
:
"
bagChangeNextTime
"
,
label
:
"布袋更换提醒时间"
,
width
:
"8%"
,
},
{
prop
:
"
changeDat
e"
,
prop
:
"
bagChangeTim
e"
,
label
:
"更换时间"
,
width
:
"8%"
,
},
{
prop
:
"
changePeo
"
,
prop
:
"
bagChangeAuthor
"
,
label
:
"更换人"
,
width
:
"8%"
,
},
{
prop
:
"
ownerdevice
Name"
,
prop
:
"
duster
Name"
,
label
:
"所属除尘器"
,
width
:
"8%"
,
},
{
prop
:
"lastAlarmTime"
,
label
:
"布袋更换提醒时间"
,
width
:
"10%"
,
},
{
prop
:
"changeRound"
,
prop
:
"bagChangePeriod"
,
label
:
"更换周期(与上次更换比)"
,
width
:
"6%"
,
},
...
...
@@ -199,31 +195,36 @@ const tableData = reactive({
],
});
const
getAllDustList
=
()
=>
{
const
url
=
"/bag/cycle/getReplaceListPage"
;
console
.
log
(
formInline
.
value
.
date
);
const
params
=
{
compart
:
formInline
.
value
.
compart
,
dusterName
:
formInline
.
value
.
dusterName
,
startTime
:
formInline
.
value
.
date
[
0
]
||
""
,
endTime
:
formInline
.
value
.
date
[
1
]
||
""
,
pageNo
:
currentPage
.
value
,
pageSize
:
pageSize
.
value
,
};
return
getDataFun
(
url
,
params
).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
)
{
tableData
.
list
=
res
.
data
.
records
;
}
else
{
return
[];
}
});
};
const
selectDustNo
=
ref
(
""
);
const
dustList
=
reactive
({
list
:
[],
});
const
getHealthScoreColor
=
(
score
)
=>
{
const
value
=
parseInt
(
score
);
if
(
value
>=
90
)
return
"#67C23A"
;
if
(
value
>=
70
)
return
"#E6A23C"
;
return
"#F56C6C"
;
};
const
getIndex
=
(
index
)
=>
{
return
(
currentPage
.
value
-
1
)
*
pageSize
.
value
+
index
+
1
;
};
const
handleView
=
(
row
)
=>
{
console
.
log
(
"查看详情"
,
row
);
};
const
handleEdit
=
(
row
)
=>
{
console
.
log
(
"编辑"
,
row
);
};
const
handlePaginationChange
=
(
pagination
)
=>
{
currentPage
.
value
=
pagination
.
currentPage
;
pageSize
.
value
=
pagination
.
pageSize
;
...
...
@@ -231,7 +232,18 @@ const handlePaginationChange = (pagination) => {
};
const
onSubmit
=
()
=>
{
console
.
log
(
"submit!"
,
formInline
.
value
);
getAllDustList
();
};
const
onRest
=
()
=>
{
formInline
.
value
=
{
compart
:
""
,
dusterName
:
""
,
date
:
[
""
,
""
],
};
currentPage
.
value
=
1
;
pageSize
.
value
=
20
;
getAllDustList
();
};
const
dustLineInfo
=
reactive
({
list
:
[{}]
});
...
...
@@ -242,49 +254,48 @@ const openDialog = (deviceName) => {
};
const
getDustList
=
()
=>
{
return
[
{
deviceName
:
"1#除尘器"
,
deviceNo
:
"11111"
,
},
{
deviceName
:
"2#除尘器"
,
deviceNo
:
"22222"
,
},
{
deviceName
:
"3#除尘器"
,
deviceNo
:
"333333"
,
},
];
const
url
=
"/bag/cycle/getDusterList"
;
return
getDataFun
(
url
,
""
).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
)
{
return
res
.
data
;
}
else
{
return
[];
}
});
};
const
getDustListInfo
=
()
=>
{
return
[
{
time
:
"1"
,
value
:
"20"
},
{
time
:
"2"
,
value
:
"30"
},
{
time
:
"4"
,
value
:
"40"
},
{
time
:
"8"
,
value
:
"45"
},
{
time
:
"10"
,
value
:
"15"
},
{
time
:
"周期"
,
value
:
"20"
},
];
const
getDustInfo
=
()
=>
{
const
url
=
"/bag/cycle/getReplaceAnalysis"
;
const
params
=
{
dusterNo
:
selectDustNo
.
value
,
};
return
getDataFun
(
url
,
params
).
then
((
res
)
=>
{
if
(
res
&&
res
.
data
)
{
return
res
.
data
;
}
else
{
return
[];
}
});
};
const
changeDust
=
(
device
Name
)
=>
{
dustList
.
list
=
getDustList
();
if
(
d
evice
Name
)
{
const
changeDust
=
async
(
duster
Name
)
=>
{
dustList
.
list
=
await
getDustList
();
if
(
d
uster
Name
)
{
dustList
.
list
.
forEach
((
i
)
=>
{
if
(
i
.
d
eviceName
==
device
Name
)
{
selectDustNo
.
value
=
i
.
d
evice
No
;
if
(
i
.
d
usterName
==
duster
Name
)
{
selectDustNo
.
value
=
i
.
d
uster
No
;
}
});
}
else
{
selectDustNo
.
value
=
dustList
.
list
[
0
].
d
evice
No
||
""
;
selectDustNo
.
value
=
dustList
.
list
[
0
].
d
uster
No
||
""
;
}
let
list
=
getDustLi
stInfo
();
let
list
=
await
getDu
stInfo
();
dustLineInfo
.
list
=
list
;
};
onMounted
(
async
()
=>
{});
onMounted
(
async
()
=>
{
getAllDustList
();
});
onBeforeUnmount
(()
=>
{});
</
script
>
...
...
src/views/collectorList/components/chart-line.vue
View file @
301b1793
...
...
@@ -25,8 +25,8 @@ const initChart = () => {
let
seriesData
=
[];
if
(
props
.
dustLineInfo
)
{
props
.
dustLineInfo
.
forEach
((
i
)
=>
{
xData
.
push
(
i
.
t
ime
);
seriesData
.
push
(
i
.
value
);
xData
.
push
(
i
.
replaceT
ime
);
seriesData
.
push
(
i
.
period
);
});
}
chartInstance
=
echarts
.
init
(
chartDustRef
.
value
);
...
...
@@ -62,6 +62,7 @@ onBeforeUnmount(() => {
<
style
lang=
"scss"
scoped
>
.chart-line
{
margin-top
:
20px
;
canvas
{
width
:
100%
;
height
:
100%
;
...
...
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