Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
0e0d0f69
Commit
0e0d0f69
authored
Jul 31, 2025
by
王炽
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
图标优化
parent
e90f06f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
shengzhangTestResult.vue
pages/shengzhangTestResult/shengzhangTestResult.vue
+15
-10
No files found.
pages/shengzhangTestResult/shengzhangTestResult.vue
View file @
0e0d0f69
...
@@ -219,7 +219,7 @@
...
@@ -219,7 +219,7 @@
<text
class=
"graph-title-text"
>
{{
getYAxisLabel
()
}}
</text>
<text
class=
"graph-title-text"
>
{{
getYAxisLabel
()
}}
</text>
</view>
</view>
<view
class=
"graph-container"
>
<view
class=
"graph-container"
>
<canvas
class=
"curve-canvas"
canvas-id=
"growthCurve"
:style=
"
{ width: 630 + 'rpx', height: '100%' }"
@touchstart="onTouchStart" @touchmove="onTouchMove" @touchend="onTouchEnd">
</canvas>
<canvas
class=
"curve-canvas"
canvas-id=
"growthCurve"
@
touchstart=
"onTouchStart"
@
touchmove=
"onTouchMove"
@
touchend=
"onTouchEnd"
></canvas>
</view>
</view>
<view
class=
"graph-title-x"
>
<view
class=
"graph-title-x"
>
<text
class=
"graph-title-text"
>
月龄
</text>
<text
class=
"graph-title-text"
>
月龄
</text>
...
@@ -727,12 +727,13 @@ onMounted(async () => {
...
@@ -727,12 +727,13 @@ onMounted(async () => {
await
shengzhangStore
.
getGrowthCurveData
(
babyDataHead
);
await
shengzhangStore
.
getGrowthCurveData
(
babyDataHead
);
//默认展示身高
// //默认展示身高--用户数据
curveData
.
value
=
curveDataConvert
(
shengzhangStore
.
getGrowthCurveDataInfoHeight
.
userDataPoints
,
'height'
);
// curveData.value = curveDataConvert(shengzhangStore.getGrowthCurveDataInfoHeight.userDataPoints,'height');
// 初始化绘制曲线
// debugger;
setTimeout
(()
=>
{
// // 初始化绘制曲线
drawGrowthCurve
()
// setTimeout(() => {
},
100
)
// drawGrowthCurve()
// }, 100)
}
else
{
}
else
{
...
@@ -740,6 +741,10 @@ onMounted(async () => {
...
@@ -740,6 +741,10 @@ onMounted(async () => {
shengzhangInfo
=
{...
shengzhangStore
.
shengzhangInfo
};
shengzhangInfo
=
{...
shengzhangStore
.
shengzhangInfo
};
}
}
//默认展示身高--用户数据
curveData
.
value
=
curveDataConvert
(
shengzhangStore
.
getGrowthCurveDataInfoHeight
.
userDataPoints
,
'height'
);
shareText
.
value
=
shengzhangInfo
?.
content
?.
shareText
;
shareText
.
value
=
shengzhangInfo
?.
content
?.
shareText
;
console
.
log
(
'shareText.value='
,
shareText
.
value
);
console
.
log
(
'shareText.value='
,
shareText
.
value
);
//分析结果处理
//分析结果处理
...
@@ -1161,7 +1166,7 @@ const onTouchMove = (e) => {
...
@@ -1161,7 +1166,7 @@ const onTouchMove = (e) => {
// drawGrowthCurve() // 重新绘制图表
// drawGrowthCurve() // 重新绘制图表
// }
// }
const
maxOffset
=
Math
.
max
(
0
,
totalWidth
.
value
-
canvasWidth
.
value
-
2
0
)
const
maxOffset
=
Math
.
max
(
0
,
totalWidth
.
value
-
canvasWidth
.
value
+
1
0
)
if
(
newOffset
<=
0
)
{
if
(
newOffset
<=
0
)
{
scrollOffset
.
value
=
0
;
scrollOffset
.
value
=
0
;
}
else
if
(
newOffset
>=
maxOffset
)
{
}
else
if
(
newOffset
>=
maxOffset
)
{
...
@@ -1812,13 +1817,13 @@ const onTouchEnd = () => {
...
@@ -1812,13 +1817,13 @@ const onTouchEnd = () => {
.graph-container {
.graph-container {
position: relative;
position: relative;
height: 400rpx;
height: 400rpx;
width: 6
3
0rpx;
width: 6
6
0rpx;
background-color: #fff;
background-color: #fff;
border-radius: 10rpx;
border-radius: 10rpx;
overflow: hidden; // 添加遮罩效果,超出部分不展示
overflow: hidden; // 添加遮罩效果,超出部分不展示
.curve-canvas {
.curve-canvas {
width:
100%
;
width:
660rpx
;
height: 100%;
height: 100%;
display: block;
display: block;
}
}
...
...
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