Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
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
向伟
educationStu
Commits
23f75e16
Commit
23f75e16
authored
Sep 18, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
bc68eba6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
examScore.vue
src/pages/exam/examScore.vue
+10
-5
No files found.
src/pages/exam/examScore.vue
View file @
23f75e16
...
...
@@ -37,11 +37,12 @@
</van-circle> -->
<image
src=
"https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/Dashboard.png"
style=
"width:
360rpx; position: absolute; top: 10px; left: 11
px"
style=
"width:
180px; position: absolute; top: 20px; left: 20
px"
mode=
"widthFix"
class=
"canvasBg"
/>
<canvas
style=
"width:
400rpx; height: 400r
px"
style=
"width:
200px; height: 200
px"
canvas-id=
"firstCanvas"
id=
"firstCanvas"
></canvas>
...
...
@@ -109,6 +110,11 @@ export default {
if
(
res
)
{
if
(
res
.
Code
==
1
)
{
data
.
dataList
=
res
.
Data
;
that
.
initCanvas
(
res
.
Data
.
TotalScore
,
res
.
Data
.
StuComment
,
res
.
Data
.
ExamScore
);
}
}
},
...
...
@@ -130,11 +136,9 @@ export default {
},
initCanvas
(
score
,
comment
,
tatalScore
)
{
let
end
=
(
score
/
tatalScore
)
*
(
2.25
-
0.75
)
+
0.75
;
console
.
log
(
133
,
end
);
let
ctx
=
uni
.
createCanvasContext
(
"firstCanvas"
);
ctx
.
beginPath
();
console
.
log
(
130
,
ctx
);
ctx
.
arc
(
110
,
110
,
95
,
0.75
*
Math
.
PI
,
end
*
Math
.
PI
);
ctx
.
arc
(
110
,
110
,
86
,
0.75
*
Math
.
PI
,
end
*
Math
.
PI
);
ctx
.
lineWidth
=
7
;
ctx
.
lineCap
=
"round"
;
ctx
.
textAlign
=
"center"
;
...
...
@@ -149,6 +153,7 @@ export default {
ctx
.
draw
();
},
};
let
that
=
methods
;
return
{
...
toRefs
(
data
),
...
methods
,
...
...
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