Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web
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
中汽测评-信息安全测评系统
web
Commits
578f34d8
Commit
578f34d8
authored
Mar 28, 2024
by
高滢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(首页): 任务情况统计
parent
b38c909d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
34 deletions
+56
-34
home.js
src/api/system/home.js
+8
-0
index.vue
src/views/index.vue
+48
-34
No files found.
src/api/system/home.js
View file @
578f34d8
...
@@ -28,3 +28,11 @@ export function selectAverageInspectionRate(){
...
@@ -28,3 +28,11 @@ export function selectAverageInspectionRate(){
method
:
'post'
method
:
'post'
})
})
}
}
export
function
selectTaskParticipationStatistics
(){
return
request
({
url
:
'/home/statistics/taskParticipation'
,
method
:
'post'
})
}
src/views/index.vue
View file @
578f34d8
...
@@ -269,29 +269,38 @@
...
@@ -269,29 +269,38 @@
<el-row>
<el-row>
<el-col
:span=
"24"
>
<el-col
:span=
"24"
>
<div
class=
"cardStyle"
style=
"height: 500px"
>
<div
class=
"cardStyle"
style=
"height: 500px"
>
<div
class=
"cardTitle"
>
参与任务情况
</div>
<el-carousel
height=
"460px"
:autoplay=
"false"
>
<div
<el-carousel-item
style=
"
v-for=
"(item, index) in taskCompletedGroup"
display: flex;
flex-wrap: wrap;
justify-content: space-between;
"
>
<div
v-for=
"(item, index) in taskCompleted"
:key=
"index"
:key=
"index"
style=
"width: calc(50% - 30px); margin-bottom: 30px"
>
>
<div
style=
"margin-bottom: 10px"
>
{{
item
.
name
}}
</div>
<div
class=
"cardTitle"
>
参与任务情况
</div>
<el-progress
<div
:percentage=
"item.value"
style=
"
color=
"#1A6FD7"
display: flex;
show-text=
"true"
flex-wrap: wrap;
:stroke-width=
"15"
justify-content: space-between;
:format=
"format"
"
></el-progress>
>
</div>
<div
</div>
v-for=
"(itemChiid, indexChild) in item"
:key=
"indexChild"
style=
"width: calc(50% - 30px); margin-bottom: 30px"
>
<div
style=
"margin-bottom: 10px"
>
{{
itemChiid
.
userName
}}
</div>
<el-progress
:percentage=
"itemChiid.taskNum"
color=
"#1A6FD7"
show-text=
"true"
:stroke-width=
"15"
:format=
"format"
></el-progress>
</div>
</div>
</el-carousel-item>
</el-carousel>
</div>
</div>
</el-col>
</el-col>
</el-row>
</el-row>
...
@@ -307,7 +316,8 @@ import UseCaseTest from './echartHome/useCaseTest.vue'
...
@@ -307,7 +316,8 @@ import UseCaseTest from './echartHome/useCaseTest.vue'
import
AverageTest
from
'./echartHome/averageTest.vue'
import
AverageTest
from
'./echartHome/averageTest.vue'
import
{
import
{
selectAverageInspectionRate
,
selectAverageInspectionRate
,
selectQuantityStatistics
selectQuantityStatistics
,
selectTaskParticipationStatistics
}
from
'../api/system/home'
}
from
'../api/system/home'
import
{
getDicts
}
from
'../api/system/dict/data'
import
{
getDicts
}
from
'../api/system/dict/data'
...
@@ -342,25 +352,29 @@ export default {
...
@@ -342,25 +352,29 @@ export default {
}
}
],
],
averageInspectionRate
:
[],
averageInspectionRate
:
[],
taskCompleted
:
[
taskCompleted
:
[],
{
name
:
'张晓刚'
,
value
:
90
},
taskCompletedGroup
:
[]
{
name
:
'王小虎'
,
value
:
90
},
{
name
:
'刘生'
,
value
:
90
},
{
name
:
'李丽'
,
value
:
90
},
{
name
:
'赵明明'
,
value
:
90
},
{
name
:
'张晓刚'
,
value
:
90
},
{
name
:
'王小虎'
,
value
:
90
},
{
name
:
'刘生'
,
value
:
90
},
{
name
:
'李丽'
,
value
:
90
},
{
name
:
'赵明明'
,
value
:
90
}
]
}
}
},
},
created
()
{
created
()
{
this
.
getQuantityStatistics
()
this
.
getQuantityStatistics
()
this
.
getAverageInspectionRate
()
this
.
getAverageInspectionRate
()
this
.
getTaskCompleted
()
},
},
methods
:
{
methods
:
{
getTaskCompleted
()
{
selectTaskParticipationStatistics
().
then
(
res
=>
{
this
.
taskCompleted
=
res
.
data
if
(
this
.
taskCompleted
.
length
>
0
)
{
var
chunkedArray
=
[]
const
groupSize
=
10
for
(
var
i
=
0
;
i
<
this
.
taskCompleted
.
length
;
i
+=
groupSize
)
{
chunkedArray
.
push
(
this
.
taskCompleted
.
slice
(
i
,
i
+
groupSize
))
}
this
.
taskCompletedGroup
=
chunkedArray
}
})
},
getAverageInspectionRate
()
{
getAverageInspectionRate
()
{
selectAverageInspectionRate
().
then
(
res
=>
{
selectAverageInspectionRate
().
then
(
res
=>
{
this
.
averageInspectionRate
=
res
.
data
this
.
averageInspectionRate
=
res
.
data
...
...
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