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
15385b49
Commit
15385b49
authored
Jul 22, 2025
by
weishengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口字段对接
parent
84c72061
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
903 additions
and
938 deletions
+903
-938
obstetric.js
api/obstetric.js
+54
-0
addPostnatal.vue
pages/addPostnatal/addPostnatal.vue
+88
-76
myReportCard.vue
pages/myReportCard/myReportCard.vue
+145
-208
postnatalCheckUp.vue
pages/postnatalCheckUp/postnatalCheckUp.vue
+172
-493
productionCalendar.vue
pages/productionCalendar/productionCalendar.vue
+89
-105
productionDetails.vue
pages/productionDetails/productionDetails.vue
+355
-56
icon26.png
static/chanjianTool/icon26.png
+0
-0
No files found.
api/obstetric.js
0 → 100644
View file @
15385b49
// 产检提醒模块相关接口
import
requestModule
from
'./request.js'
;
const
{
api
}
=
requestModule
;
/**
* 获取产检信息
* @returns
*/
export
const
getInfo
=
(
data
)
=>
api
.
get
(
'/maternity_checkup/home'
,
data
);
/**
* 产看产检详情
* @returns
*/
export
const
getDetail
=
(
data
)
=>
api
.
get
(
'/maternityCheckup/detail'
,
data
);
/**
* 删除报告单
* @returns
*/
export
const
getDelete
=
(
data
)
=>
api
.
get
(
'/maternityCheckup/delete'
,
data
);
/**
* 产检项目列表
* @returns
*/
export
const
getExaminationItems
=
(
data
)
=>
api
.
get
(
'/maternityCheckup/examinationItems'
,
data
);
/**
* 修改产检记录
* @returns
*/
export
const
getUpdate
=
(
data
)
=>
api
.
post
(
'/maternityCheckup/update'
,
data
);
/**
*
* /**
* 新增产检记录
* @returns
*/
export
const
getAdd
=
(
data
)
=>
api
.
post
(
'/maternityCheckup/add'
,
data
);
/**
* 我的报告单列表
* @returns
*/
export
const
getReportList
=
()
=>
api
.
get
(
'/maternityCheckup/reportList'
);
\ No newline at end of file
pages/addPostnatal/addPostnatal.vue
View file @
15385b49
...
...
@@ -26,9 +26,9 @@
<!-- 添加的产品项目 -->
<view
class=
"project-list"
v-if=
"listData.length > 0"
>
<view
class=
"list-item"
v-for=
"(
{
n
ame, id}, index) in listData" :key="index">
<view
class=
"list-item"
v-for=
"(
{
itemN
ame, id}, index) in listData" :key="index">
<view
class=
"item-name"
>
{{
n
ame
}}
{{
itemN
ame
}}
</view>
<image
@
click=
"onDetele(id)"
class=
"item-img"
src=
"/static/chanjianTool/delete.png"
></image>
</view>
...
...
@@ -51,12 +51,12 @@
<view
class=
"upload-image"
@
click=
"onUpload"
>
<image
src=
"/static/chanjianTool/icon11.png"
></image>
</view>
<view
class=
"img-list-item"
v-for=
"(
{url, id}
, index) in bgdImgList" :key="index">
<view
class=
"img-list-item"
v-for=
"(
item
, index) in bgdImgList"
:key=
"index"
>
<view
class=
"item-image"
>
<image
class=
"img1"
:src=
"
url
"
mode=
"widthFix"
></image>
<image
class=
"img1"
:src=
"
item
"
mode=
"widthFix"
></image>
</view>
<image
@
click=
"onImageDel(i
d
)"
class=
"img"
src=
"/static/chanjianTool/icon14.png"
></image>
<image
@
click=
"onImageDel(i
tem
)"
class=
"img"
src=
"/static/chanjianTool/icon14.png"
></image>
</view>
</view>
</view>
...
...
@@ -81,16 +81,16 @@
<!-- 项目列表 -->
<scroll-view
scroll-y
@
touchmove
.
stop
.
prevent=
""
class=
"airport-list"
>
<view
v-for=
"group in
list"
:key=
"group.letter
"
class=
"letter-group"
>
<view
class=
"letter-title"
>
{{
group
.
letter
}}
</view>
<view
v-for=
"group in
examinationList"
:key=
"group.groupName
"
class=
"letter-group"
>
<view
class=
"letter-title"
>
{{
group
.
groupName
}}
</view>
<view
class=
"box"
>
<view
v-for=
"item in group.
data
"
:key=
"item.id"
class=
"airport-item"
>
<view
v-for=
"item in group.
list
"
:key=
"item.id"
class=
"airport-item"
>
<view
class=
"airport-item-radio"
@
click=
"toggleSelect(item)"
>
<image
class=
"image-1"
v-if=
"isSelected(item.id)"
src=
"/static/chanjianTool/icon17.png"
mode=
""
></image>
<image
class=
"image-2"
v-else
src=
"/static/chanjianTool/icon18.png"
></image>
{{
item
.
n
ame
}}
{{
item
.
itemN
ame
}}
</view>
<view
class=
"airport-item-image"
@
click=
"onView(item)"
>
<view
class=
"airport-item-image"
@
click
.
stop
=
"onView(item)"
>
<image
src=
"/static/chanjianTool/icon16.png"
></image>
</view>
...
...
@@ -105,16 +105,16 @@
</view>
</uni-popup>
<!-- 项目介绍 -->
<uni-popup
ref=
"popupText"
type=
"bottom"
:mask-click=
"
fals
e"
background-color=
"#FFFFFF"
border-radius=
"32rpx 32rpx 0 0"
>
<uni-popup
ref=
"popupText"
type=
"bottom"
:mask-click=
"
tru
e"
background-color=
"#FFFFFF"
border-radius=
"32rpx 32rpx 0 0"
>
<view
class=
"container2"
>
<view
class=
"text-t"
>
<view
class=
"t-1"
>
{{
popupTextObj
.
n
ame
}}
{{
popupTextObj
.
itemN
ame
}}
</view>
<image
@
click=
"onPopupClose2"
src=
"/static/chanjianTool/icon15.png"
mode=
""
></image>
</view>
<view
class=
"text-c"
>
{{
popupTextObj
.
text
}}
{{
popupTextObj
.
introduction
}}
</view>
</view>
</uni-popup>
...
...
@@ -135,6 +135,10 @@
import
{
uploadImage
}
from
"../../api/common.js"
;
import
{
getAdd
,
getExaminationItems
}
from
'../../api/obstetric.js'
;
// 导入日期选择器组件
import
DatePicker
from
'@/components/DatePicker.vue'
...
...
@@ -156,34 +160,10 @@
// 存储查看项目介绍内容
const
popupTextObj
=
ref
({})
// 模拟项目列表
const
list
=
ref
([{
"letter"
:
"A"
,
"data"
:
[{
id
:
'A001'
,
name
:
"阿克苏机场"
,
text
:
'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
},
{
id
:
'A002'
,
name
:
"阿拉山口机场"
,
text
:
'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
}
]
},
{
"letter"
:
"B"
,
"data"
:
[{
id
:
'B001'
,
name
:
"保山机场"
,
text
:
'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
},
{
id
:
'B002'
,
name
:
"包头机场"
,
text
:
'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
}
]
}]);
const
examinationList
=
ref
([])
// 已选项目(存储ID和name)
const
selectedAirports
=
ref
([]);
...
...
@@ -191,27 +171,8 @@
const
listData
=
ref
([]);
// 报告单图片
const
bgdImgList
=
ref
([{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
}
])
const
bgdImgList
=
ref
([])
// 查看项目介绍
const
onView
=
(
item
)
=>
{
console
.
log
(
item
)
...
...
@@ -267,7 +228,7 @@
if
(
index
===
-
1
)
{
selectedAirports
.
value
.
push
({
id
:
airport
.
id
,
name
:
airport
.
n
ame
itemName
:
airport
.
itemN
ame
});
}
else
{
selectedAirports
.
value
.
splice
(
index
,
1
);
...
...
@@ -300,9 +261,9 @@
})
}
// 删除上传图片
const
onImageDel
=
(
id
)
=>
{
const
onImageDel
=
(
e
)
=>
{
bgdImgList
.
value
.
filter
((
item
,
index
)
=>
{
if
(
item
.
id
===
id
)
{
if
(
item
===
e
)
{
bgdImgList
.
value
.
splice
(
index
,
1
)
}
})
...
...
@@ -328,10 +289,7 @@
hideLoading
();
if
(
uploadRes
.
success
)
{
console
.
log
(
uploadRes
)
bgdImgList
.
value
.
push
({
url
:
uploadRes
.
data
.
url
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
})
bgdImgList
.
value
.
push
(
uploadRes
.
data
.
url
)
}
else
{
uni
.
showToast
({
title
:
uploadRes
.
message
,
...
...
@@ -351,14 +309,15 @@
})
return
}
const
ids
=
listData
.
value
.
map
(
item
=>
item
.
id
).
join
(
','
);
const
param
=
{
tim
e
:
time
.
value
,
list
:
listData
.
value
,
bgdImgList
:
bgdImgList
.
value
checkupDat
e
:
time
.
value
,
checkupItems
:
ids
,
reportImages
:
bgdImgList
.
value
}
console
.
log
(
param
,
'参数'
)
showLoading
();
// const {success, data} = await
updateBabyInfo
(data);
// const {success, data} = await
getAdd
(data);
const
{
success
,
data
,
message
}
=
{
success
:
true
,
message
:
''
,
...
...
@@ -387,6 +346,48 @@
})
}
// 获取产检项目列表
const
getList
=
async
()
=>
{
// const {success, data, message} = await getExaminationItems()
const
{
success
,
message
,
data
}
=
{
success
:
true
,
message
:
''
,
data
:
{
items
:[
{
"groupName"
:
"A"
,
"list"
:
[{
id
:
'A001'
,
itemName
:
"阿克苏机场"
,
introduction
:
'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
},
{
id
:
'A002'
,
itemName
:
"阿拉山口机场阿拉山口机场阿拉山口机场"
,
introduction
:
'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
}
]
},
{
"groupName"
:
"B"
,
"list"
:
[{
id
:
'B001'
,
itemName
:
"保山机场"
,
introduction
:
'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
},
{
id
:
'B002'
,
itemName
:
"包头机场"
,
introduction
:
'NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1NT可以帮助判断胎宝宝是否患有唐氏综合征等染色体异常,或存在畸形的风险,有助于早期发现胎儿异常风险问题。 NT检查通常在孕 1'
}
]
}
]
}
}
if
(
success
){
examinationList
.
value
=
data
.
items
}
}
onLoad
((
options
)
=>
{
console
.
log
(
options
)
if
(
Object
.
keys
(
options
??
{}).
length
){
...
...
@@ -400,6 +401,7 @@
title
:
'新增产检'
});
}
getList
()
})
</
script
>
...
...
@@ -628,7 +630,7 @@
width: 100%;
overflow: hidden;
border-radius: 16rpx;
padding: 0 36rpx;
padding: 0
0 0
36rpx;
box-sizing: border-box;
background: #fff;
}
...
...
@@ -647,6 +649,10 @@
border:none;
}
.airport-item-image{
width: 72rpx;
text-align: center;
height: 115rpx;
line-height: 115rpx;
image{
width: 11rpx;
height: 21rpx;
...
...
@@ -654,8 +660,13 @@
}
}
.airport-item-radio{
flex: 1;
display: flex;
align-items: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
image{
margin-right: 8rpx;
margin-top: 5rpx;
...
...
@@ -734,15 +745,16 @@
flex-direction: column;
.text-t{
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
position: relative;
.t-1{
flex: 1;
font-size: 34rpx;
font-weight: 700;
}
image{
position: absolute;
top: 10.5rpx;
right: 0rpx;
width: 28rpx;
height: 29rpx;
}
...
...
pages/myReportCard/myReportCard.vue
View file @
15385b49
...
...
@@ -10,7 +10,7 @@
<view
class=
"item-time"
>
<view
class=
"item-time-l"
>
<image
src=
"/static/chanjianTool/icon19.png"
></image>
{{
item
.
tim
e
}}
{{
item
.
checkupDat
e
}}
</view>
<view
class=
"item-time-r"
@
click=
"onDelete(item.id)"
>
...
...
@@ -22,17 +22,18 @@
</view>
<view
class=
"item-content"
>
<view
class=
"content-1"
>
第
{{
item
.
num
}}
次产检:孕
{{
item
.
week
}}
周
第
{{
item
.
checkupTimes
}}
次产检:孕
{{
item
.
pregnancyCycle
}}
周
</view>
<view
class=
"content-2"
>
重点:
{{
getProject
(
item
.
project
)
}}
重点:
{{
getProject
(
item
.
items
)
}}
</view>
<view
class=
"content-3"
>
<template
v-for=
"(items, i) in item.imageList.slice(0, 3)"
:key=
"index"
>
<view
class=
"content-3-v"
:class=
"
{ 'has-more': i === 2
&&
item.imageList.length > 3 }">
<image
@
click=
"onPreviewImage(items.url)"
:src=
"items.url"
mode=
"widthFix"
></image>
<view
@
click=
"onMoreImage(item.imageList)"
class=
"more-count"
v-if=
"i === 2 && item.imageList.length > 3"
>
+
{{
item
.
imageList
.
length
-
3
}}
<template
v-for=
"(e, i) in item.reportImages.slice(0, 3)"
:key=
"i"
>
<view
class=
"content-3-v"
:class=
"
{ 'has-more': i === 2
&&
item.reportImages.length > 3 }">
<image
@
click=
"onPreviewImage(e)"
:src=
"e"
mode=
"widthFix"
></image>
<view
@
click=
"onMoreImage(item.reportImages)"
class=
"more-count"
v-if=
"i === 2 && item.reportImages.length > 3"
>
+
{{
item
.
reportImages
.
length
-
3
}}
</view>
</view>
</
template
>
...
...
@@ -41,19 +42,20 @@
</view>
</view>
</view>
<!-- 查看更多图片 -->
<!-- 查看更多图片 -->
<view
class=
"more-popup"
v-if=
"showMore"
>
<view
class=
"more-popup-list"
>
<view
class=
"title"
>
我的报告单
</view>
<view
class=
"more-image"
>
<view
v-for=
"(item, index) in imageListData"
:key=
"index"
class=
"more-image-1"
@
click=
"onPreviewImage(item.url)"
>
<image
:src=
"item.url"
></image>
</view>
<view
v-for=
"(item, index) in imageListData"
:key=
"index"
class=
"more-image-1"
@
click=
"onPreviewImage(item)"
>
<image
:src=
"item"
></image>
</view>
</view>
</view>
<view
class=
"close-btn-bottom"
@
tap=
"
closeVideo
"
>
<view
class=
"close-btn-bottom"
@
tap=
"
onClose
"
>
<image
src=
"/static/chanjianTool/icon21.png"
></image>
</view>
</view>
...
...
@@ -71,188 +73,29 @@
import
{
throttleTap
}
from
'@/utils/index.js'
;
import
{
getReportList
,
getDelete
}
from
'../../api/obstetric.js'
;
import
md
from
'../../md'
;
// 控制查看更多图片
const
showMore
=
ref
(
false
)
// 存储查看的图片数组
const
imageListData
=
ref
([])
// 报告单数据
const
listData
=
ref
([{
isAdd
:
0
,
// 1 是 0 否
id
:
1
,
time
:
'2025-07-09'
,
num
:
'一'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'1'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
],
imageList
:
[{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
}
]
},
{
isAdd
:
0
,
// 1 是 0 否
id
:
1
,
time
:
'2025-07-09'
,
num
:
'一'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'1'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
],
imageList
:
[{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
}
]
},
{
isAdd
:
0
,
// 1 是 0 否
id
:
1
,
time
:
'2025-07-09'
,
num
:
'一'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'1'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
],
imageList
:
[{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
}
]
},
{
isAdd
:
0
,
// 1 是 0 否
id
:
1
,
time
:
'2025-07-09'
,
num
:
'一'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'1'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
],
imageList
:
[{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
}
]
}
])
const
listData
=
ref
([])
// 查看更多图片
const
onMoreImage
=
(
item
)
=>
{
console
.
log
(
item
)
showMore
.
value
=
true
imageListData
.
value
=
item
}
const
closeVideo
=
()
=>
{
// 关闭
const
onClose
=
()
=>
{
showMore
.
value
=
false
;
}
// 图片预览
...
...
@@ -265,16 +108,101 @@
}
// 拼接检查项目名称
const
getProject
=
(
projects
)
=>
{
return
projects
.
map
(
project
=>
project
.
n
ame
).
join
(
'、'
);
return
projects
.
map
(
project
=>
project
.
itemN
ame
).
join
(
'、'
);
}
// 删除事件
const
onDelete
=
throttleTap
((
id
)
=>
{
console
.
log
(
id
)
uni
.
showModal
({
// title: '提示',
content
:
'确认删除吗?'
,
success
:
function
(
res
)
{
if
(
res
.
confirm
)
{
getDeleteFn
(
id
)
}
else
if
(
res
.
cancel
)
{
console
.
log
(
'用户点击取消'
);
}
}
});
// getDeleteFn(id)
})
// 返回上一页面
const
backHandler
=
()
=>
{
uni
.
navigateBack
();
}
// 删除报告单
const
getDeleteFn
=
async
(
id
)
=>
{
// const { code, message, data, success } = await getDelete({id})
const
{
code
,
message
,
data
,
success
}
=
{
code
:
200
,
message
:
'成功'
,
success
:
true
,
data
:
{}
}
if
(
success
)
{
uni
.
showToast
({
title
:
'删除成功'
,
icon
:
'none'
})
// 我的报告单
getReportListFn
()
}
else
{
uni
.
showToast
({
title
:
message
,
icon
:
'none'
})
}
}
// 获取报告单
const
getReportListFn
=
async
()
=>
{
// const { code, message, data, success } = await getReportList()
const
{
code
,
message
,
data
,
success
}
=
{
code
:
200
,
message
:
'成功'
,
success
:
true
,
data
:
[{
id
:
1
,
checkupDate
:
'2025-07-09'
,
checkupTimes
:
'一'
,
// 产检次数
pregnancyCycle
:
'5-6'
,
// 周数
// 产检项目
items
:
[{
itemName
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
itemName
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
],
reportImages
:
[
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
]
}
]
}
if
(
success
)
{
listData
.
value
=
data
}
else
{
uni
.
showToast
({
title
:
message
,
icon
:
'none'
})
}
}
onLoad
(()
=>
{
// 我的报告单
getReportListFn
()
})
</
script
>
<
style
lang=
"less"
scoped
>
...
...
@@ -289,18 +217,21 @@
// width: 750rpx;
top: 190rpx;
left: 31rpx;
.con-box{
.con-box {
width: 682rpx;
height: calc(100vh - 220rpx);
overflow-y: auto;
}
.list-item {
width: 682rpx;
border-radius: 24rpx;
background: #ffffff;
padding: 35rpx 34rpx 45rpx 34rpx;
box-sizing: border-box;
margin-bottom: 30rpx;
margin-bottom: 30rpx;
.item-time {
display: flex;
justify-content: space-between;
...
...
@@ -409,6 +340,7 @@
margin-top: -46rpx;
margin-left: 0rpx;
}
.more-popup {
position: fixed;
left: 0;
...
...
@@ -421,49 +353,53 @@
align-items: center;
justify-content: center;
z-index: 9999;
.more-popup-list{
.more-popup-list {
width: 661rpx;
height: 881rpx;
background: #ffffff;
border-radius: 52rpx;
padding: 50rpx 58rpx;
box-sizing: border-box;
.title{
.title
{
text-align: center;
font-size: 36rpx;
color: #b27c1e;
margin-bottom: 45rpx;
}
.more-image{
.more-image {
width: 100%;
height: 695rpx;
overflow: auto;
display: flex;
flex-wrap: wrap;
align-content: flex-start;
align-content: flex-start;
}
.more-image-1 {
width: 169rpx;
height: 169rpx;
border-radius: 10rpx;
overflow: hidden;
margin-right: 12rpx;
margin-bottom: 30rpx;
width: 169rpx;
height: 169rpx;
border-radius: 10rpx;
overflow: hidden;
margin-right: 12rpx;
margin-bottom: 30rpx;
flex-shrink: 0;
image {
width: 100%;
height: 100%;
/* 新增:确保图片填充模式与父容器一致 */
object-fit: cover;
/* 可选:加载时避免闪烁 */
display: block;
}
image {
width: 100%;
height: 100%;
/* 新增:确保图片填充模式与父容器一致 */
object-fit: cover;
/* 可选:加载时避免闪烁 */
display: block;
}
}
}
}
.close-btn-bottom {
margin: 40rpx auto 0 auto;
width: 70rpx;
...
...
@@ -473,7 +409,8 @@
display: flex;
align-items: center;
justify-content: center;
image{
image {
width: 70rpx;
height: 70rpx;
}
...
...
pages/postnatalCheckUp/postnatalCheckUp.vue
View file @
15385b49
...
...
@@ -9,20 +9,21 @@
<view
class=
"postnatal-con"
>
<!-- 轮播图 -->
<swiper
class=
"banner-swiper"
:autoplay=
"true"
:circular=
"true"
>
<swiper-item
v-for=
"(item, index) in bannerList"
:key=
"index"
>
<image
class=
"banner-img"
:src=
"`$
{item.img}`" mode="aspectFill" @click="handleBannerClick(item, index)" />
<swiper-item
v-for=
"(item, index) in homeInfo.bannerList"
:key=
"index"
>
<image
class=
"banner-img"
:src=
"`$
{item.imageUrl}`" mode="aspectFill"
@click="handleBannerClick(item, index)" />
</swiper-item>
</swiper>
<!-- 孕期信息 -->
<view
class=
"postnatal-con-info"
>
<view
class=
"info-l"
>
孕
八
周
孕
{{
homeInfo
.
gestationalWeeks
}}
周
</view>
<view
class=
"info-c"
>
<image
class=
"info-img"
src=
"/static/chanjianTool/line.png"
></image>
</view>
<view
class=
"info-r"
>
预产期:
2025-10-01
预产期:
{{
homeInfo
.
dueDate
}}
</view>
</view>
<!-- 按钮 -->
...
...
@@ -37,21 +38,20 @@
</view>
<!-- 产检记录 -->
<view
class=
"postnatal-con-record"
>
<view
class=
"record-item"
v-for=
"(
{id, time, num, week, status, project, isAdd}, index) in recordList"
@click="onDetails(id)"
:key="index"
>
<image
class=
"add-image"
v-if=
"isAdd ===1 "
src=
"/static/chanjianTool/bs.png"
></image>
<view
class=
"record-item"
v-for=
"(
{id, checkupDate, index, pregnancyWeek, status, examinationItems, type}, i) in homeInfo.checkupList"
@click="onDetails(id)" :key="i">
<image
class=
"add-image"
v-if=
"type === 1 "
src=
"/static/chanjianTool/bs.png"
></image>
<view
class=
"item-t"
>
<view
class=
"item-t-l"
>
第
{{
num
}}
次产检
第
{{
index
}}
次产检
</view>
<view
class=
"item-t-r"
>
<view
class=
""
>
产检时间:
{{
time
?
tim
e
:
'---'
}}
产检时间:
{{
checkupDate
?
checkupDat
e
:
'---'
}}
</view>
<image
@
click=
"onEdit(id, time)"
class=
"edit-img"
src=
"/static/chanjianTool/edit.png"
></image>
<image
@
click
.
stop=
"onEdit(id, checkupDate)"
class=
"edit-img"
src=
"/static/chanjianTool/edit.png"
>
</image>
</view>
</view>
<view
class=
"item-line"
>
...
...
@@ -59,14 +59,14 @@
</view>
<view
class=
"item-c"
>
<view
class=
"item-c-l"
>
孕期
{{
w
eek
}}
周
孕期
{{
pregnancyW
eek
}}
周
</view>
<view
class=
""
>
<image
class=
"record-img"
:src=
"getSrcUrl(status)"
></image>
</view>
</view>
<view
class=
"item-b"
>
重点:
{{
getProject
(
project
)
}}
重点:
{{
getProject
(
examinationItems
)
}}
</view>
</view>
</view>
...
...
@@ -75,79 +75,9 @@
<view
class=
"postnatal-add"
@
click=
"onAdd"
>
<image
src=
"/static/chanjianTool/add.png"
></image>
</view>
<!-- 选择提醒弹窗 -->
<view>
<!-- 底部弹窗遮罩层 -->
<view
v-if=
"showPicker"
class=
"picker-layer-mask"
@
click=
"close"
></view>
<!-- 弹窗内容区 -->
<view
v-if=
"showPicker"
class=
"picker-layer-popup"
>
<view
class=
"picker-layer-panel"
>
<!-- 可自定义头部 -->
<view
class=
"picker-layer-header"
>
<text
class=
"picker-layer-cancel"
@
click=
"close"
>
取消
</text>
<text
class=
"picker-layer-confirm"
@
click=
"handleConfirm"
>
确定
</text>
</view>
<view
class=
"picker-layer-view-mask-top"
></view>
<view
class=
"picker-layer-view-mask-bottom"
></view>
<!-- picker-view 选择器核心 -->
<picker-view
class=
"picker-layer-view"
mask-style=
"background: rgb(246, 248, 250); z-index: 0;"
indicator-style=
"border-radius: 10px; height: 50px; background:#ffffff; z-index:0"
:value=
"pickerValue"
@
change=
"handleChange"
:immediate-change=
"true"
>
<picker-view-column>
<view
class=
"picker-layer-item"
v-for=
"(item, index) in options"
:key=
"index"
>
{{
item
}}
</view>
</picker-view-column>
</picker-view>
</view>
</view>
</view>
<!-- 修改时间 -->
<view
>
<!-- 底部弹窗遮罩层 -->
<view
v-if=
"visible"
class=
"picker-layer-mask"
@
click=
"close1"
></view>
<!-- 弹窗内容区 -->
<view
v-if=
"visible"
class=
"picker-layer-popup"
>
<view
class=
"picker-layer-panel"
>
<!-- 可自定义头部 -->
<view
class=
"picker-layer-header"
>
<text
class=
"picker-layer-cancel"
@
click=
"close1"
>
取消
</text>
<text
class=
"picker-layer-confirm"
@
click=
"handleConfirm1"
>
确定
</text>
</view>
<view
class=
"picker-layer-view-mask-top"
></view>
<view
class=
"picker-layer-view-mask-bottom"
></view>
<!-- picker-view 选择器核心 -->
<picker-view
class=
"picker-layer-view"
mask-style=
"background: rgb(246, 248, 250); z-index: 0;"
indicator-style=
"border-radius: 10px; height: 50px; background:#ffffff; z-index:0"
:value=
"timeValue"
:immediate-change=
"true"
@
change=
"bindChange"
>
<picker-view-column>
<view
class=
"picker-layer-item"
v-for=
"(item,index) in years"
:key=
"index"
>
{{
item
}}
年
</view>
</picker-view-column>
<picker-view-column>
<view
class=
"picker-layer-item"
v-for=
"(item,index) in months"
:key=
"index"
>
{{
item
}}
月
</view>
</picker-view-column>
<picker-view-column>
<view
class=
"picker-layer-item"
v-for=
"(item,index) in days"
:key=
"index"
>
{{
item
}}
日
</view>
</picker-view-column>
</picker-view>
</view>
</view>
</view>
<!-- 使用封装后的日期选择器组件 -->
<DatePicker
v-model:visible=
"visible"
:default-date=
"time"
@
confirm=
"handleDateConfirm"
/>
</view>
</view>
</
template
>
...
...
@@ -167,181 +97,58 @@
throttleTap
}
from
'@/utils/index.js'
;
import
md
from
'../../md'
;
import
{
getInfo
,
getUpdate
}
from
'../../api/obstetric.js'
;
// 导入日期选择器组件
import
DatePicker
from
'@/components/DatePicker.vue'
const
{
proxy
}
=
getCurrentInstance
();
const
$baseUrl
=
proxy
.
$baseUrl
;
const
back_btn
=
ref
(
''
)
// 提醒选择器相关状态
const
showPicker
=
ref
(
false
)
const
options
=
[
'当天'
,
'前一天'
,
'前三天'
]
// 提醒时间选项
const
pickerValue
=
ref
([
0
])
// 当前选中的索引
const
selectedValue
=
ref
(
''
)
// 选中的值
// 时间弹窗控制
const
visible
=
ref
(
false
)
// 时间
const
time
=
ref
(
''
)
// 保存要修改的id
const
editId
=
ref
(
null
)
// 日期选择器相关状态
const
visible
=
ref
(
false
)
// 是否显示日期选择器
const
date
=
new
Date
()
const
timeValue
=
ref
([])
// 日期选择器当前值
// 年份数据 (2010-当前年份+2)
const
years
=
ref
([])
const
currentYear
=
date
.
getFullYear
()
for
(
let
i
=
2010
;
i
<=
currentYear
+
2
;
i
++
)
{
years
.
value
.
push
(
i
)
}
// 月份数据
const
months
=
ref
([])
for
(
let
i
=
1
;
i
<=
12
;
i
++
)
{
months
.
value
.
push
(
i
)
}
// 日期数据 (动态生成)
const
days
=
ref
([])
// 当前选中的年月日
const
selectedYear
=
ref
(
currentYear
)
const
selectedMonth
=
ref
(
date
.
getMonth
()
+
1
)
const
selectedDay
=
ref
(
date
.
getDate
())
// 获取某年某月的天数
function
getDaysInMonth
(
year
,
month
)
{
return
new
Date
(
year
,
month
,
0
).
getDate
()
}
// 更新日期数据
const
updateDays
=
()
=>
{
const
daysInMonth
=
getDaysInMonth
(
selectedYear
.
value
,
selectedMonth
.
value
)
days
.
value
=
[]
for
(
let
i
=
1
;
i
<=
daysInMonth
;
i
++
)
{
days
.
value
.
push
(
i
)
}
// 确保选中的日期不超过当月最大天数
if
(
selectedDay
.
value
>
days
.
value
.
length
)
{
selectedDay
.
value
=
days
.
value
.
length
}
// 更新选择器的索引值
updateValueIndices
()
}
// 更新选择器的索引值
const
updateValueIndices
=
()
=>
{
const
yearIndex
=
years
.
value
.
indexOf
(
selectedYear
.
value
)
const
monthIndex
=
months
.
value
.
indexOf
(
selectedMonth
.
value
)
const
dayIndex
=
days
.
value
.
indexOf
(
selectedDay
.
value
)
if
(
yearIndex
!==
-
1
&&
monthIndex
!==
-
1
&&
dayIndex
!==
-
1
)
{
timeValue
.
value
=
[
yearIndex
,
monthIndex
,
dayIndex
]
}
}
// 初始化日期数据
updateDays
()
// 首页信息
const
homeInfo
=
ref
({})
// 按钮列表
const
btnList
=
ref
([{
name
:
'提醒'
,
imageSrc
:
'/static/chanjianTool/icon1.png'
,
type
:
1
},
{
name
:
'报告单'
,
imageSrc
:
'/static/chanjianTool/icon2.png'
,
type
:
2
type
:
1
},
{
name
:
'日历'
,
imageSrc
:
'/static/chanjianTool/icon3.png'
,
type
:
3
}
])
// 轮播数据
const
bannerList
=
ref
([{
img
:
'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl0.png'
,
url
:
`https://www.baidu.com`
},
{
img
:
'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl1.png'
,
url
:
`https://www.baidu.com`
},
{
img
:
'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl2.png'
,
url
:
`https://www.baidu.com`
},
]);
// 产检记录
const
recordList
=
ref
([{
isAdd
:
0
,
// 1 是 0 否
id
:
1
,
time
:
''
,
num
:
'一'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'1'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
]
},
{
isAdd
:
0
,
// 1 是 0 否
id
:
2
,
time
:
'2025-05-11'
,
num
:
'二'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'2'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
]
},
{
isAdd
:
1
,
// 1 是 0 否
id
:
3
,
time
:
'2025-05-11'
,
num
:
'三'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'3'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
]
type
:
2
}
])
// 跳转产检详情页面
const
onDetails
=
(
id
)
=>
{
const
onDetails
=
(
id
)
=>
{
uni
.
navigateTo
({
url
:
`/pages/productionDetails/productionDetails?id=
${
id
}
`
})
url
:
`/pages/productionDetails/productionDetails?id=
${
id
}
`
})
}
// 拼接检查项目名称
const
getProject
=
(
projects
)
=>
{
return
projects
.
map
(
project
=>
project
.
n
ame
).
join
(
'、'
);
return
projects
.
map
(
project
=>
project
.
itemN
ame
).
join
(
'、'
);
}
// 根据状态返回图片
const
getSrcUrl
=
(
status
)
=>
{
const
imageMap
=
{
'
1
'
:
'/static/chanjianTool/icon4.png'
,
'
2
'
:
'/static/chanjianTool/icon5.png'
,
'
3
'
:
'/static/chanjianTool/icon6.png'
,
'
pending
'
:
'/static/chanjianTool/icon4.png'
,
'
expired
'
:
'/static/chanjianTool/icon5.png'
,
'
completed
'
:
'/static/chanjianTool/icon6.png'
,
};
return
imageMap
[
status
];
...
...
@@ -360,6 +167,11 @@
// 点击轮播图事件
const
handleBannerClick
=
(
item
,
index
)
=>
{
console
.
log
(
item
)
// 跳转
jump
({
type
:
item
.
jumpType
,
url
:
item
.
jumpUrl
})
// let buttonName = '';
// switch(index){
// case 0:
...
...
@@ -372,13 +184,6 @@
// buttonName = '第三张焦点图';
// break;
// }
// 跳转
jump
({
type
:
JumpType
.
H5
,
url
:
item
.
url
})
// md.sensorLogTake({
// xcxClick: "产品提醒页-首屏页面点击",
// pageName: "产品提醒页-首屏",
...
...
@@ -386,138 +191,136 @@
// });
}
// 新增体检
const
onAdd
=
()
=>
{
const
onAdd
=
()
=>
{
uni
.
navigateTo
({
url
:
'/pages/addPostnatal/addPostnatal'
url
:
'/pages/addPostnatal/addPostnatal'
})
}
// 按钮点击
const
onBtn
=
(
type
)
=>
{
console
.
log
(
type
)
// type 1 提醒 2 报告单 3 日历
showPicker
.
value
// type 1 报告单 2 日历
switch
(
type
)
{
case
1
:
showPicker
.
value
=
true
uni
.
navigateTo
({
url
:
'/pages/myReportCard/myReportCard'
})
break
;
case
2
:
uni
.
navigateTo
({
url
:
'/pages/myReportCard/myReportCard'
})
break
;
case
3
:
case
2
:
uni
.
navigateTo
({
url
:
'/pages/productionCalendar/productionCalendar'
url
:
'/pages/productionCalendar/productionCalendar'
})
break
;
default
:
break
;
}
}
// 提醒关闭
const
close
=
()
=>
{
showPicker
.
value
=
false
;
}
// 选择器变化事件
const
handleChange
=
(
e
)
=>
{
pickerValue
.
value
=
e
.
detail
.
value
;
}
// 确认选择
const
handleConfirm
=
()
=>
{
close
();
selectedValue
.
value
=
options
[
pickerValue
.
value
[
0
]];
// 订阅提醒
// uni.requestSubscribeMessage({
// tmplIds: [''],
// success (res) {
// console.log(res)
// }
// })
}
// 编辑时间
const
onEdit
=
(
id
,
time
)
=>
{
console
.
log
(
id
,
t
ime
)
editId
.
value
=
id
const
onEdit
=
(
id
,
newTime
)
=>
{
console
.
log
(
id
,
newT
ime
)
time
.
value
=
newTime
visible
.
value
=
true
// 如果有时间,解析时间并设置选中值
if
(
time
)
{
const
dateParts
=
time
.
split
(
'-'
)
const
year
=
parseInt
(
dateParts
[
0
])
const
month
=
parseInt
(
dateParts
[
1
])
const
day
=
parseInt
(
dateParts
[
2
])
// 更新选中值
selectedYear
.
value
=
year
selectedMonth
.
value
=
month
selectedDay
.
value
=
day
// 更新 timeValue 的索引
const
yearIndex
=
years
.
value
.
indexOf
(
year
)
const
monthIndex
=
months
.
value
.
indexOf
(
month
)
const
dayIndex
=
days
.
value
.
indexOf
(
day
)
// 这里直接修改 timeValue.value 会触发 watch
timeValue
.
value
=
[
yearIndex
,
monthIndex
,
dayIndex
]
}
else
{
// 如果没有时间,设置为当前日期
const
today
=
new
Date
()
const
yearIndex
=
years
.
value
.
indexOf
(
today
.
getFullYear
())
const
monthIndex
=
months
.
value
.
indexOf
(
today
.
getMonth
()
+
1
)
const
dayIndex
=
days
.
value
.
indexOf
(
today
.
getDate
())
timeValue
.
value
=
[
yearIndex
,
monthIndex
,
dayIndex
]
}
}
const
setDate
=
(
indices
)
=>
{
if
(
!
indices
||
indices
.
length
!==
3
)
return
const
year
=
years
.
value
[
indices
[
0
]]
const
month
=
months
.
value
[
indices
[
1
]]
const
day
=
days
.
value
[
indices
[
2
]]
selectedYear
.
value
=
year
selectedMonth
.
value
=
month
selectedDay
.
value
=
day
}
// 时间选择变化时间
const
bindChange
=
(
e
)
=>
{
console
.
log
(
e
)
const
values
=
e
.
detail
.
value
timeValue
.
value
=
values
selectedYear
.
value
=
years
.
value
[
values
[
0
]]
selectedMonth
.
value
=
months
.
value
[
values
[
1
]]
selectedDay
.
value
=
days
.
value
[
values
[
2
]]
editId
.
value
=
id
}
// 时间提醒关闭
const
close1
=
()
=>
{
visible
.
value
=
false
;
// 选择日期回调确认
const
handleDateConfirm
=
(
date
)
=>
{
console
.
log
(
'选择的日期是:'
,
date
);
time
.
value
=
date
;
console
.
log
(
editId
.
value
,
time
.
value
)
onEditTime
()
}
// 修改产检时间
const
onEditTime
=
async
()
=>
{
// const { code, success, message } = await getUpdate({id: editId.value,checkupDate: time.value})
const
{
code
,
success
,
message
}
=
{
code
:
200
,
success
:
true
,
message
:
'成功'
,
}
if
(
success
)
{
uni
.
showToast
({
title
:
'修改成功'
,
icon
:
'none'
})
// 重新获取信息
getInfoFn
()
}
else
{
uni
.
showToast
({
title
:
message
,
icon
:
'none'
})
}
}
// 时间确认选择
const
handleConfirm1
=
()
=>
{
close1
();
const
formattedDate
=
`
${
selectedYear
.
value
}
-
${
String
(
selectedMonth
.
value
).
padStart
(
2
,
'0'
)}
-
${
String
(
selectedDay
.
value
).
padStart
(
2
,
'0'
)}
`
;
const
recordToUpdate
=
recordList
.
value
.
find
(
item
=>
item
.
id
===
editId
.
value
);
recordToUpdate
.
time
=
formattedDate
;
recordList
.
value
=
[...
recordList
.
value
];
// 获取信息接口
const
getInfoFn
=
async
()
=>
{
console
.
log
(
'获取信息'
)
// 获取信息
// const {code,success, message, data } = await getInfo()
const
{
code
,
success
,
message
,
data
}
=
{
code
:
200
,
success
:
true
,
message
:
'成功'
,
data
:
{
gestationalWeeks
:
'8'
,
// 几周
dueDate
:
'2025-10-20'
,
// 预产期
// 轮播数据
bannerList
:
[{
imageUrl
:
'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl0.png'
,
jumpUrl
:
`https://www.baidu.com`
},
{
imageUrl
:
'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl1.png'
,
jumpUrl
:
`https://www.baidu.com`
},
{
imageUrl
:
'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl2.png'
,
jumpUrl
:
`https://www.baidu.com`
}
],
// 产检记录
checkupList
:
[{
type
:
0
,
// 1 是 0 否
id
:
1
,
checkupDate
:
'2025-8-22'
,
index
:
'一'
,
// 产检次数
pregnancyWeek
:
'5-6'
,
// 周数
status
:
'pending'
,
//待产检、已过期、已产检,
// 产检项目
examinationItems
:
[{
itemName
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
itemName
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
]
}]
}
}
if
(
success
)
{
homeInfo
.
value
=
data
}
else
{
uni
.
showToast
({
title
:
message
,
icon
:
"none"
,
});
}
}
// 监听年份和月份变化,更新日期数据
watch
([
selectedYear
,
selectedMonth
],
()
=>
{
updateDays
()
})
// 监听选择器值变化,更新选中日期
watch
(()
=>
timeValue
.
value
,
(
newVal
)
=>
{
setDate
(
newVal
)
})
onLoad
(()
=>
{
// 获取信息
getInfoFn
()
})
</
script
>
<
style
lang=
"less"
scoped
>
@import "@/common.less";
.postnatal {
// position: absolute;
width: 100%;
...
...
@@ -552,34 +355,35 @@
}
&-btn {
margin-top:
30
rpx;
margin-top:
55
rpx;
display: flex;
justify-content: space-between;
margin-bottom:
1
0rpx;
margin-bottom:
3
0rpx;
.btn-item {
display: flex;
align-items: center;
justify-content: center;
width:
212
rpx;
height:
8
5rpx;
//
justify-content: center;
width:
334
rpx;
height:
11
5rpx;
background: #ffffff;
border-radius: 16rpx;
font-size:
28
rpx;
font-size:
34
rpx;
.image1 {
width: 44rpx;
height: 44rpx;
width: 58rpx;
height: 58rpx;
margin-left: 80rpx;
}
.btn-item-text {
margin-left:
6
rpx;
margin-right:
34
rpx;
margin-left:
12
rpx;
margin-right:
52
rpx;
}
.image2 {
width:
9
rpx;
height:
17
rpx;
width:
12
rpx;
height:
23
rpx;
}
}
}
...
...
@@ -591,18 +395,20 @@
.record-item {
width: 687rpx;
background-color: #fff;
margin-
top
: 30rpx;
margin-
bottom
: 30rpx;
border-radius: 24rpx;
box-sizing: border-box;
padding: 40rpx 32rpx;
position: relative;
.add-image{
position: relative;
.add-image {
position: absolute;
left: 0;
top: 0;
width: 111rpx;
height: 30rpx;
}
.item-t,
.item-c {
display: flex;
...
...
@@ -709,131 +515,4 @@
margin-top: -46rpx;
margin-left: 0rpx;
}
.picker-layer-mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3999;
}
/* 遮罩层样式 */
.picker-layer-popup {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 4000;
display: flex;
flex-direction: column;
align-items: center;
animation: picker-layer-up 0.3s;
}
@keyframes picker-layer-up {
from {
transform: translateY(100%);
}
to {
transform: translateY(0);
}
}
/* 弹窗容器样式 */
.picker-layer-panel {
width: 100vw;
height: 50vh;
background: #f6f8fa;
border-top-left-radius: 24rpx;
border-top-right-radius: 24rpx;
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
}
.picker-layer-header {
display: flex;
justify-content: space-between;
align-items: center;
height: 140rpx;
box-sizing: border-box;
background: #f6f8fa;
padding: 0 32rpx;
.picker-layer-cancel {
color: #6f6d67;
font-size: 28rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
.picker-layer-confirm {
color: #ffffff;
font-size: 28rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
background: #d3a358;
display: flex;
align-items: center;
justify-content: center;
}
.picker-layer-title {
color: #222;
font-size: 32rpx;
font-weight: bold;
}
}
.picker-layer-view {
flex: 1;
width: 100%;
height: 100%;
}
.picker-layer-item {
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 32rpx;
color: #1d1e25;
}
.picker-layer-view-mask-top {
position: absolute;
top: 140rpx;
left: 0;
width: 100%;
height: calc(50% - 100rpx);
z-index: 1;
background: linear-gradient(to bottom,
rgb(246, 248, 250) 0%,
rgba(255, 255, 255, 0.5) 100%);
pointer-events: none;
}
.picker-layer-view-mask-bottom {
position: absolute;
bottom: 0rpx;
left: 0;
width: 100%;
height: calc(50% - 100rpx);
z-index: 1;
background: linear-gradient(to top,
rgb(246, 248, 250) 0%,
rgba(255, 255, 255, 0.5) 100%);
pointer-events: none;
}
</
style
>
\ No newline at end of file
pages/productionCalendar/productionCalendar.vue
View file @
15385b49
...
...
@@ -12,7 +12,7 @@
{{
info
.
name
}}
</view>
<view
class=
"info-r-b"
>
怀孕
{{
info
.
week
}}
周
怀孕
{{
info
.
gestationalWeeks
}}
周
</view>
</view>
</view>
...
...
@@ -24,23 +24,23 @@
11111
</view>
<view
class=
"con-list"
>
<view
class=
"con-list-item"
v-for=
"(item, index) in info.
listData
"
>
<view
class=
"con-list-item"
v-for=
"(item, index) in info.
checkupList"
:key=
"index"
@
click=
"onDetails(item.id)
"
>
<view
class=
"item-time"
>
<view
class=
""
>
第
{{
item
.
num
}}
次产检
第
{{
item
.
index
}}
次产检
</view>
<view
class=
""
>
产检时间:
{{
item
.
tim
e
}}
产检时间:
{{
item
.
checkupDat
e
}}
</view>
</view>
<view
class=
"item-line"
>
</view>
<view
class=
"item-week"
>
孕期
{{
item
.
w
eek
}}
周
孕期
{{
item
.
pregnancyW
eek
}}
周
</view>
<view
class=
"item-proect"
>
重点:
{{
getProject
(
item
.
project
)
}}
重点:
{{
getProject
(
item
.
examinationItems
)
}}
</view>
</view>
</view>
...
...
@@ -60,106 +60,17 @@
onLoad
}
from
'@dcloudio/uni-app'
import
{
throttleTap
throttleTap
,
dateFormatter
}
from
'@/utils/index.js'
;
import
{
getInfo
}
from
'../../api/obstetric.js'
;
// 获取当前时间
const
time
=
ref
(
dateFormatter
(
new
Date
(),
'yyyy-MM-dd'
));
// 用户信息
const
info
=
ref
({
name
:
'好宝宝的妈妈'
,
head
:
'https://course.feihe.com/momclub-picture/homepage/children/children_1.png'
,
week
:
'8'
,
listData
:[
{
isAdd
:
0
,
// 1 是 0 否
id
:
2
,
time
:
'2025-05-11'
,
num
:
'二'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'2'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
]
},
{
isAdd
:
0
,
// 1 是 0 否
id
:
2
,
time
:
'2025-05-11'
,
num
:
'二'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'2'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
]
},
{
isAdd
:
0
,
// 1 是 0 否
id
:
2
,
time
:
'2025-05-11'
,
num
:
'二'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'2'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
]
},
{
isAdd
:
0
,
// 1 是 0 否
id
:
2
,
time
:
'2025-05-11'
,
num
:
'二'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'2'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
]
},
{
isAdd
:
0
,
// 1 是 0 否
id
:
2
,
time
:
'2025-05-11'
,
num
:
'二'
,
// 产检次数
week
:
'5-6'
,
// 周数
status
:
'2'
,
//待产检、已过期、已产检,
// 产检项目
project
:
[{
name
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
name
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
]
}
]
})
const
info
=
ref
({})
// 返回
const
backHandler
=
()
=>
{
...
...
@@ -173,8 +84,81 @@
}
// 拼接检查项目名称
const
getProject
=
(
projects
)
=>
{
return
projects
.
map
(
project
=>
project
.
n
ame
).
join
(
'、'
);
return
projects
.
map
(
project
=>
project
.
itemN
ame
).
join
(
'、'
);
}
// 跳转产检详情页面
const
onDetails
=
(
id
)
=>
{
uni
.
navigateTo
({
url
:
`/pages/productionDetails/productionDetails?id=
${
id
}
`
})
}
// 获取信息接口
const
getInfoFn
=
async
(
date
)
=>
{
console
.
log
(
'获取信息'
,
date
)
// 获取信息
// const {code,success, message, data } = await getInfo({queryDate:date})
const
{
code
,
success
,
message
,
data
}
=
{
code
:
200
,
success
:
true
,
message
:
'成功'
,
data
:
{
gestationalWeeks
:
'8'
,
// 几周
dueDate
:
'2025-10-20'
,
// 预产期
// 轮播数据
bannerList
:
[{
imageUrl
:
'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl0.png'
,
jumpUrl
:
`https://www.baidu.com`
},
{
imageUrl
:
'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl1.png'
,
jumpUrl
:
`https://www.baidu.com`
},
{
imageUrl
:
'https://course.feihe.com/momclub-picture/contentLibrary/1003/banner-cl2.png'
,
jumpUrl
:
`https://www.baidu.com`
}
],
// 产检记录
checkupList
:
[{
type
:
0
,
// 1 是 0 否
id
:
1
,
checkupDate
:
'2025-8-22'
,
index
:
'一'
,
// 产检次数
pregnancyWeek
:
'5-6'
,
// 周数
status
:
'待产检'
,
//待产检、已过期、已产检,
// 产检项目
examinationItems
:
[{
itemName
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
itemName
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
]
}]
}
}
if
(
success
)
{
info
.
value
=
data
}
else
{
uni
.
showToast
({
title
:
message
,
icon
:
"none"
,
});
}
}
onLoad
(()
=>
{
// 获取信息
getInfoFn
(
time
.
value
)
})
</
script
>
<
style
lang=
"less"
scoped
>
.production-calendar {
...
...
pages/productionDetails/productionDetails.vue
View file @
15385b49
...
...
@@ -14,17 +14,23 @@
<scroll-view
class=
"content-scroll"
scroll-y
:scroll-top=
"scrollTop"
@
scroll=
"handleScroll"
scroll-with-animation
>
<view
class=
"production-details-container"
>
<view
class=
"container-1 pad"
>
第
一
次检查
第
{{
infoData
.
index
}}
次检查
</view>
<view
class=
"container-2 pad"
>
<view
class=
"container-2-l"
>
孕期
5-6
周
孕期
{{
infoData
.
pregnancyWeek
}}
周
</view>
<view
class=
"container-2-r"
@
click=
"onComplete"
>
<image
v-if=
"!isCompleted"
src=
"/static/chanjianTool/icon24.png"
></image>
<image
v-else
src=
"/static/chanjianTool/icon25.png"
></image>
完成检查
<view
class=
"container-2-r"
>
<view
class=
"r-complete"
@
click=
"onComplete"
>
<image
v-if=
"!isCompleted"
src=
"/static/chanjianTool/icon24.png"
></image>
<image
v-else
src=
"/static/chanjianTool/icon25.png"
></image>
完成检查
</view>
<view
class=
"r-remind"
@
click=
"onRemind"
>
<image
src=
"/static/chanjianTool/icon26.png"
></image>
</view>
</view>
</view>
<view
class=
"container-line pad"
>
</view>
...
...
@@ -33,12 +39,12 @@
产检时间
</view>
<view
class=
"container-3-r"
@
click=
"onChangeTime"
>
{{
time
?
tim
e
:
'选择时间'
}}
{{
infoData
.
checkupDate
?
infoData
.
checkupDat
e
:
'选择时间'
}}
<image
src=
"/static/chanjianTool/edit.png"
></image>
</view>
</view>
<view
class=
"container-4 pad"
>
建议时间:
2025-07-05至2025-08-15
建议时间:
{{
infoData
.
suggestionCheckupDate
}}
</view>
<!-- 产检须知 -->
<view
class=
"project-box"
id=
"section-0"
>
...
...
@@ -125,15 +131,48 @@
<view
class=
"upload-image"
@
click=
"onUpload"
>
<image
src=
"/static/chanjianTool/icon11.png"
></image>
</view>
<view
class=
"img-list-item"
v-for=
"(
{url, id}
, index) in bgdImgList" :key="index">
<view
class=
"img-list-item"
v-for=
"(
item
, index) in bgdImgList"
:key=
"index"
>
<view
class=
"item-image"
>
<image
class=
"img1"
:src=
"
url
"
mode=
"widthFix"
></image>
<image
class=
"img1"
:src=
"
item
"
mode=
"widthFix"
></image>
</view>
<image
@
click=
"onImageDel(i
d
)"
class=
"img"
src=
"/static/chanjianTool/icon14.png"
></image>
<image
@
click=
"onImageDel(i
tem
)"
class=
"img"
src=
"/static/chanjianTool/icon14.png"
></image>
</view>
</view>
</view>
<!-- 选择提醒弹窗 -->
<view>
<!-- 底部弹窗遮罩层 -->
<view
v-if=
"showPicker"
class=
"picker-layer-mask"
@
click=
"close"
></view>
<!-- 弹窗内容区 -->
<view
v-if=
"showPicker"
class=
"picker-layer-popup"
>
<view
class=
"picker-layer-panel"
>
<!-- 可自定义头部 -->
<view
class=
"picker-layer-header"
>
<text
class=
"picker-layer-cancel"
@
click=
"close"
>
取消
</text>
<text
class=
"picker-layer-confirm"
@
click=
"handleConfirm"
>
确定
</text>
</view>
<view
class=
"picker-layer-view-mask-top"
></view>
<view
class=
"picker-layer-view-mask-bottom"
></view>
<!-- picker-view 选择器核心 -->
<picker-view
class=
"picker-layer-view"
mask-style=
"background: rgb(246, 248, 250); z-index: 0;"
indicator-style=
"border-radius: 10px; height: 50px; background:#ffffff; z-index:0"
:value=
"pickerValue"
@
change=
"handleChange"
:immediate-change=
"true"
>
<picker-view-column>
<view
class=
"picker-layer-item"
v-for=
"(item, index) in options"
:key=
"index"
>
{{
item
}}
</view>
</picker-view-column>
</picker-view>
</view>
</view>
</view>
</view>
</scroll-view>
<!-- 产检选择时间 -->
...
...
@@ -153,7 +192,21 @@
import
{
throttleTap
}
from
'@/utils/index.js'
;
// 时间组件
import
DatePicker
from
'@/components/DatePicker.vue'
import
{
getDetail
,
getUpdate
}
from
'../../api/obstetric.js'
;
// 提醒选择器相关状态
const
showPicker
=
ref
(
false
)
const
options
=
[
'当天'
,
'前一天'
,
'前三天'
]
// 提醒时间选项
const
pickerValue
=
ref
([
0
])
// 当前选中的索引
const
selectedValue
=
ref
(
''
)
// 选中的值
const
tabInfo
=
[{
"line1"
:
"产检须知"
,
},
...
...
@@ -164,28 +217,16 @@
"line1"
:
"本次报告单"
,
}
]
// 本次报告单
const
bgdImgList
=
ref
([{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
},
{
url
:
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
id
:
Date
.
now
()
+
Math
.
floor
(
Math
.
random
()
*
1000
)
}
])
// 存储id
const
editId
=
ref
(
''
)
// 详情
const
infoData
=
ref
({})
// 临时储存报告单
const
bgdImgList
=
ref
([])
const
time
=
ref
(
'2025-07-21'
)
const
onModify
=
()
=>
{
...
...
@@ -200,23 +241,7 @@
// 日期选择器
const
visible
=
ref
(
false
)
// 修改时间
const
onChangeTime
=
throttleTap
(()
=>
{
visible
.
value
=
true
})
// 选择时间
const
handleDateConfirm
=
(
date
)
=>
{
visible
.
value
=
false
time
.
value
=
date
}
// 完成检查
const
onComplete
=
()
=>
{
// 切换状态
isCompleted
.
value
=
!
isCompleted
.
value
console
.
log
(
isCompleted
.
value
)
}
// 滚动相关状态
const
scrollTop
=
ref
(
0
)
const
isFixedTabs
=
ref
(
false
)
...
...
@@ -302,7 +327,7 @@ const scrollToSection = (index) => {
// 删除上传图片
const
onImageDel
=
(
id
)
=>
{
bgdImgList
.
value
.
filter
((
item
,
index
)
=>
{
if
(
item
.
id
===
id
)
{
if
(
item
===
id
)
{
bgdImgList
.
value
.
splice
(
index
,
1
)
}
})
...
...
@@ -341,15 +366,146 @@ const scrollToSection = (index) => {
},
});
})
// 查看更多
const
onSeeBtn
=
()
=>
{
uni
.
navigateTo
({
url
:
'/pages/myReportCard/myReportCard'
})
}
// 打开提醒弹窗
const
onRemind
=
()
=>
{
showPicker
.
value
=
true
;
}
// 提醒关闭
const
close
=
()
=>
{
showPicker
.
value
=
false
;
}
// 选择提醒事件
const
handleChange
=
(
e
)
=>
{
pickerValue
.
value
=
e
.
detail
.
value
;
}
// 确认选择
const
handleConfirm
=
()
=>
{
close
();
selectedValue
.
value
=
options
[
pickerValue
.
value
[
0
]];
// 订阅提醒
// uni.requestSubscribeMessage({
// tmplIds: [''],
// success (res) {
// console.log(res)
// }
// })
}
// 完成检查
const
onComplete
=
()
=>
{
// 切换状态
isCompleted
.
value
=
!
isCompleted
.
value
console
.
log
(
isCompleted
.
value
)
}
// 修改时间
const
onChangeTime
=
throttleTap
(()
=>
{
visible
.
value
=
true
})
// 选择时间
const
handleDateConfirm
=
(
date
)
=>
{
visible
.
value
=
false
time
.
value
=
date
onEditTime
()
}
// 修改产检时间
const
onEditTime
=
async
()
=>
{
// const { code, success, message } = await getUpdate({id: editId.value,checkupDate: time.value})
const
{
code
,
success
,
message
}
=
{
code
:
200
,
success
:
true
,
message
:
'成功'
,
}
if
(
success
)
{
uni
.
showToast
({
title
:
'修改成功'
,
icon
:
'none'
})
// 重新获取信息
getDetailFn
(
editId
.
value
)
}
else
{
uni
.
showToast
({
title
:
message
,
icon
:
'none'
})
}
}
// 获取详情接口
const
getDetailFn
=
async
(
id
)
=>
{
console
.
log
(
'获取信息'
,
id
)
// 获取信息
// const {code,success, message, data } = await getDetail({id})
const
{
code
,
success
,
message
,
data
}
=
{
code
:
200
,
success
:
true
,
message
:
'成功'
,
data
:
{
// 产检记录
checkupList
:
{
type
:
0
,
// 1 是 0 否
id
:
1
,
checkupDate
:
'2025-8-22'
,
index
:
'一'
,
// 产检次数
pregnancyWeek
:
'5-6'
,
// 周数,
content
:
''
,
// 产检须知
suggestionCheckupDate
:
'2025-08-09至2025-09-16'
,
// 建议时间
wxTemplateId
:
''
,
// 订阅模版id
status
:
'pending'
,
// 待产检 - pending,已过期 - expired, 已产检 - completed
// 产检项目
examinationItems
:
[{
itemName
:
'测量胎儿颈部透明层厚度(NT)'
,
id
:
1
},
{
itemName
:
'无创产前基因检测(NIPT)(非必查)'
,
id
:
2
}
],
// 报告单
reportImages
:[
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
,
'https://momclub-picture-1253290912.cos.ap-beijing.myqcloud.com/xmh-mini-program/user/image/2025/07/17/xmh-mini-program_1752739702325_167279.jpeg'
]
}
}
}
if
(
success
)
{
const
{
checkupList
}
=
data
infoData
.
value
=
checkupList
bgdImgList
.
value
=
checkupList
.
reportImages
}
else
{
uni
.
showToast
({
title
:
message
,
icon
:
"none"
,
});
}
}
// 获取传过来的参数
onLoad
((
options
)
=>
{
console
.
log
(
options
)
editId
.
value
=
options
.
id
getDetailFn
(
options
.
id
)
})
</
script
>
...
...
@@ -458,13 +614,26 @@ const scrollToSection = (index) => {
color: #a68dbb;
display: flex;
align-items: center;
image {
width: 21rpx;
height: 22rpx;
margin-right: 7rpx;
.r-complete{
display: flex;
align-items: center;
image {
width: 21rpx;
height: 22rpx;
margin-right: 7rpx;
}
}
.r-remind{
width: 121rpx;
height: 35rpx;
margin-left: 22rpx;
image{
width: 100%;
height: 100%;
}
}
}
}
.container-line {
...
...
@@ -488,11 +657,13 @@ const scrollToSection = (index) => {
.container-3-r {
display: flex;
align-items: center;
font-size: 28rpx;
line-height: 26rpx;
image {
width: 21rpx;
height: 21rpx;
margin-left: 15rpx;
margin-top: 1rpx;
}
}
}
...
...
@@ -610,5 +781,133 @@ const scrollToSection = (index) => {
}
}
}
/* 遮罩层样式 */
.picker-layer-mask {
position: fixed;
left: 0;
right: 0;
top: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 3999;
}
.picker-layer-popup {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 4000;
display: flex;
flex-direction: column;
align-items: center;
animation: picker-layer-up 0.3s;
}
@keyframes picker-layer-up {
from {
transform: translateY(100%);
}
to {
transform: translateY(0);
}
}
/* 弹窗容器样式 */
.picker-layer-panel {
width: 100vw;
height: 50vh;
background: #f6f8fa;
border-top-left-radius: 24rpx;
border-top-right-radius: 24rpx;
overflow: hidden;
display: flex;
flex-direction: column;
position: relative;
}
.picker-layer-header {
display: flex;
justify-content: space-between;
align-items: center;
height: 140rpx;
box-sizing: border-box;
background: #f6f8fa;
padding: 0 32rpx;
.picker-layer-cancel {
color: #6f6d67;
font-size: 28rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
background: #ffffff;
display: flex;
align-items: center;
justify-content: center;
}
.picker-layer-confirm {
color: #ffffff;
font-size: 28rpx;
width: 136rpx;
height: 74rpx;
border-radius: 20rpx;
background: #d3a358;
display: flex;
align-items: center;
justify-content: center;
}
.picker-layer-title {
color: #222;
font-size: 32rpx;
font-weight: bold;
}
}
.picker-layer-view {
flex: 1;
width: 100%;
height: 100%;
}
.picker-layer-item {
height: 100rpx;
line-height: 100rpx;
text-align: center;
font-size: 32rpx;
color: #1d1e25;
}
.picker-layer-view-mask-top {
position: absolute;
top: 140rpx;
left: 0;
width: 100%;
height: calc(50% - 100rpx);
z-index: 1;
background: linear-gradient(to bottom,
rgb(246, 248, 250) 0%,
rgba(255, 255, 255, 0.5) 100%);
pointer-events: none;
}
.picker-layer-view-mask-bottom {
position: absolute;
bottom: 0rpx;
left: 0;
width: 100%;
height: calc(50% - 100rpx);
z-index: 1;
background: linear-gradient(to top,
rgb(246, 248, 250) 0%,
rgba(255, 255, 255, 0.5) 100%);
pointer-events: none;
}
}
</
style
>
\ No newline at end of file
static/chanjianTool/icon26.png
0 → 100644
View file @
15385b49
2.87 KB
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