detail.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. <template>
  2. <view class="hdetail" :style="'padding-top:'+nvaHeight+'px;'">
  3. <view class="navbox">
  4. <uni-nav-bar color="#ffffff" title="健康档案" :background-color="backgroundColor" :border="false" statusBar='true' fixed="true" @clickLeft="getBackFn">
  5. </uni-nav-bar>
  6. <!-- 家人 -->
  7. <view class="headbox flexc" :style="'backgroundColor:'+backgroundColor">
  8. <view class="htop" :class="tabval==idx?'act':''" v-for="(ite,idx) in list" :key="idx" @click="getTabFn(idx)">
  9. <view class="img"><image :src="heada" class="imaga"></image></view>
  10. <view class="tit">{{ite.tit}}</view>
  11. </view>
  12. <view class="htop" @click="getAddFn">
  13. <view class="img add"><image :src="addimg"></image></view>
  14. <view class="tit">添加</view>
  15. </view>
  16. </view>
  17. </view>
  18. <!-- 主体 -->
  19. <view class="wymain" >
  20. <view class="headbox flexc" style="opacity: 0;">
  21. <view class="htop">
  22. <view class="img"><image :src="heada" class="imaga"></image></view>
  23. <view class="tit">户主</view>
  24. </view>
  25. </view>
  26. <view class="hmain">
  27. <view class="hmtop mb20">
  28. <image :src="heada" class="head"></image>
  29. <view class="hmtopa flex1">
  30. <view class="flex mb14">
  31. <view class="tit">袁玥</view>
  32. <view class="btn btna">本人</view>
  33. <view class="btn btnb">党员</view>
  34. <view class="btn btnc">五保户</view>
  35. </view>
  36. <view class="hmtopb flexc mb10">
  37. <image :src="car" class="limg"></image>
  38. <view >
  39. <view class="hmtit">身份证号</view>
  40. <view class="hmtxt flexc">
  41. <view class="hmtxts">{{lookfalg?cartit:carpass}}</view>
  42. <image :src="eye" v-if="lookfalg" @click="lookfalg=false"></image>
  43. <image :src="neye" v-else @click="lookfalg=true"></image>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="hmtopb flexc ">
  48. <image :src="adr" class="limg"></image>
  49. <view >
  50. <view class="hmtit">家庭住址</view>
  51. <view class="hmtxt">幸福小区1号楼3单元1101</view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="code" @click="getCodeFn">
  56. <image :src="headb"></image>
  57. <view>点击放大二维码</view>
  58. </view>
  59. </view>
  60. <view class="hline mb18 flexc">
  61. <view class="tit">MORE</view>
  62. <view class="line"></view>
  63. </view>
  64. <view class="detail mb24">
  65. <view class="detop mb14">
  66. <image :src="icon"></image>
  67. <view class="flexcj detit">基础信息<view class="detxt">更新时间:2024-10-24</view></view>
  68. </view>
  69. <view class="dlists">
  70. <view class="lists">
  71. <view class="ltit">性别</view><view class="ltxt">女</view>
  72. </view>
  73. <view class="lists">
  74. <view class="ltit">年龄</view><view class="ltxt">38岁</view>
  75. </view>
  76. <view class="lists">
  77. <view class="ltit">血型</view><view class="ltxt">B型</view>
  78. </view>
  79. <view class="lists">
  80. <view class="ltit">血压</view><view class="ltxt">65/120mmHg</view>
  81. </view>
  82. <block v-if="zhanList[0].zhanflag">
  83. <view class="lists">
  84. <view class="ltit">身高</view><view class="ltxt">165cm</view>
  85. </view>
  86. <view class="lists">
  87. <view class="ltit">体重</view><view class="ltxt">67kg</view>
  88. </view>
  89. <view class="lists">
  90. <view class="ltit">腰围</view><view class="ltxt">85cm</view>
  91. </view>
  92. <view class="lists">
  93. <view class="ltit">体质指数</view><view class="ltxt">142kg/m2</view>
  94. </view>
  95. <view class="lists">
  96. <view class="ltit">脉搏</view><view class="ltxt">90bpm</view>
  97. </view>
  98. <view class="lists">
  99. <view class="ltit">体温</view><view class="ltxt">36.4℃</view>
  100. </view>
  101. <view class="lists">
  102. <view class="ltit">呼吸频率</view><view class="ltxt">50次/分钟</view>
  103. </view>
  104. </block>
  105. </view>
  106. <view class="upbox" @click="getZhanFn(0)">
  107. <view>{{zhanList[0].zhanflag?'折叠':'展开'}}</view>
  108. <image :src="upimg" :class="zhanList[0].zhanflag?'':'zhe'"></image>
  109. </view>
  110. </view>
  111. <view class="detail mb24">
  112. <view class="detop mb14">
  113. <image :src="icon"></image>
  114. <view class="flexcj detit">健康病史<view class="detxt">更新时间:2024-10-24</view></view>
  115. </view>
  116. <view class="dlists">
  117. <view class="lists w100">
  118. <view class="ltit">基础疾病</view><view class="ltxt">慢性支气管炎</view>
  119. </view>
  120. <view class="lists w100">
  121. <view class="ltit">病史</view><view class="ltxt">高血压、高血糖、甲状腺结节 拷贝</view>
  122. </view>
  123. <block v-if="zhanList[1].zhanflag">
  124. <view class="lists">
  125. <view class="ltit">近视/远视</view><view class="ltxt">近视</view>
  126. </view>
  127. <view class="lists">
  128. <view class="ltit">近视/远视度数</view><view class="ltxt">左:375 右:400</view>
  129. </view>
  130. </block>
  131. </view>
  132. <view class="upbox" @click="getZhanFn(1)">
  133. <view>{{zhanList[1].zhanflag?'折叠':'展开'}}</view>
  134. <image :src="upimg" :class="zhanList[1].zhanflag?'':'zhe'"></image>
  135. </view>
  136. </view>
  137. <view class="detail">
  138. <view class="detop mb14">
  139. <image :src="icon"></image>
  140. <view class="flexcj detit">兴趣爱好<view class="detxt">更新时间:2024-10-24</view></view>
  141. </view>
  142. <view class="dlists">
  143. <view class="lists w100">
  144. <view class="ltit">兴趣爱好</view>
  145. <view class="ltxt">喜欢运动,经常参加马拉松比赛</view>
  146. <view class="ltxt">平时也好书法,参加书法展</view>
  147. </view>
  148. </view>
  149. </view>
  150. <view class="dbtns flexcj mt55">
  151. <view class="btna">删除档案</view>
  152. <view class="btnb">修改档案</view>
  153. </view>
  154. </view>
  155. </view>
  156. <loading></loading>
  157. <pop-up :type="type" @getClose='getClose'></pop-up>
  158. </view>
  159. </template>
  160. <script>
  161. import popUp from "@/health/components/popup/popup.vue"
  162. export default {
  163. components:{popUp},
  164. data(){
  165. return{
  166. nvaHeight:44,
  167. // activeColor:'#A7CDF9',
  168. // nactiveColor:'#DADADA',
  169. backgroundColor: "transparent",
  170. heada:require("@/health/static/health/heada.png"),
  171. headb:require("@/health/static/health/headb.png"),
  172. headc:require("@/health/static/health/headc.png"),
  173. headd:require("@/health/static/health/headd.png"),
  174. heade:require("@/health/static/health/heade.png"),
  175. headf:require("@/health/static/health/headf.png"),
  176. adr:require("@/health/static/health/adr.png"),
  177. car:require("@/health/static/health/car.png"),
  178. icon:require("@/health/static/health/icon.png"),
  179. addimg:require("@/health/static/health/add.png"),
  180. eye:require("@/static/images/home/eye.png"),
  181. neye:require("@/static/images/neye.png"),
  182. upimg:require("@/static/images/up.png"),
  183. lookfalg:false,
  184. tabval:0,
  185. cartit:'378554199010206016',
  186. carpass:'3********6',
  187. list:[{tit:'户主'},{tit:'丈夫'},{tit:'儿子'},{tit:'女儿'},{tit:'婆婆'},{tit:'公公'},],
  188. datainfo:{
  189. },
  190. zhanList:[{zhanflag:true},{zhanflag:true},{zhanflag:true},{zhanflag:true}],
  191. }
  192. },
  193. watch:{
  194. lookfalg(val){
  195. if(val){
  196. }
  197. }
  198. },
  199. onPageScroll(e) {
  200. var scrollTop = Number(e.scrollTop);
  201. if (scrollTop > 0) {
  202. this.backgroundColor = '#48CC9A'
  203. } else {
  204. this.backgroundColor = 'transparent'
  205. }
  206. },
  207. onLoad: function() {
  208. uni.getSystemInfo({
  209. success: (e) => {
  210. this.nvaHeight = Number(e.statusBarHeight)+44;
  211. }
  212. })
  213. },
  214. methods:{
  215. getClose(){
  216. this.type="";
  217. },
  218. getCodeFn(){
  219. this.type='code'
  220. },
  221. getZhanFn(idx){
  222. this.zhanList[idx].zhanflag=!this.zhanList[idx].zhanflag
  223. },
  224. getBackFn(){
  225. uni.navigateBack({
  226. delta:1
  227. })
  228. },
  229. getCode(code){
  230. var idCard='123456789'
  231. const firstPart = idCard.slice(0, 1);
  232. // 生成中间8位的星号
  233. const middlePart = '*'.repeat(idCard.length-2);
  234. // 获取后4位
  235. const lastPart = idCard.slice(idCard.length-1);
  236. var s= firstPart + middlePart + lastPart;
  237. console.log(s)
  238. // return firstPart + middlePart + lastPart;
  239. },
  240. getTabFn(val){
  241. this.tabval=val;
  242. },
  243. getDataFn(){
  244. var params={
  245. pageSize:this.pageSize,
  246. pageNum: this.pageNum,
  247. }
  248. params.noticeType=this.tabidx
  249. getNoticeList(params).then(res=>{
  250. if(res.code==200){
  251. }else{
  252. this.$toast(res.msg)
  253. }
  254. })
  255. },
  256. }
  257. }
  258. </script>
  259. <style>
  260. page{background:#F4F6F8;}
  261. </style>
  262. <style lang="scss" scoped>
  263. .w100{width: 100%;}
  264. .hdetail{
  265. background: linear-gradient(180deg, #45CB99 0%, rgba(238,227,197,0) 100%) no-repeat;background-size: 100% 782rpx;min-height: 100vh;box-sizing: border-box;
  266. }
  267. .headbox{padding: 14rpx 20rpx 20rpx;overflow: auto;
  268. .htop{display: flex;flex-direction: column;align-items: center;margin: 0 16rpx;
  269. .img{width: 88rpx;height: 88rpx;border-radius: 50%;border: 8rpx solid #D4F6E5;margin-bottom: 16rpx;display: flex;align-items: center;justify-content: center;box-sizing: border-box;
  270. &.add{border: none;
  271. image{width: 86rpx;height: 86rpx;}
  272. }
  273. image{border-radius: 50%;}
  274. .imaga{width: 70rpx;height: 74rpx;}
  275. .imagb{width: 70rpx;height: 72rpx;}
  276. .imagc{width: 70rpx;height: 76rpx;}
  277. .imagd{width: 70rpx;height: 70rpx;}
  278. .image{width: 70rpx;height: 74rpx;}
  279. }
  280. .tit{font-weight: 500;font-size: 22rpx;color: #3FA47D;}
  281. &.act{
  282. .tit{font-weight: bold;color: #FFFFFF;}
  283. }
  284. }
  285. }
  286. .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4; }
  287. .wymain{z-index: 2;position: relative;padding: 0 24rpx 24rpx;}
  288. .hmain{background: #FFFFFF;border-radius: 20rpx;padding: 32rpx 24rpx 44rpx;
  289. .hmtop{display: flex;
  290. .head{width: 60rpx;height: 60rpx;border-radius: 8rpx;flex: 0 0 auto;margin-right: 28rpx;}
  291. .hmtopa{
  292. .tit{font-weight: bold;font-size: 32rpx;
  293. color: #272727;}
  294. .btn{font-weight: bold;font-size: 22rpx;min-width: 64rpx;height: 30rpx;padding: 0 10rpx;box-sizing: border-box;margin-left: 14rpx;border-radius: 16rpx;display: flex;align-items: center;justify-content: center;margin-top: 6rpx;color: #FFFFFF;
  295. &.btna{border: 2rpx solid #2589FF;color: #2589FF;}
  296. &.btnb{background:#FF6969;}
  297. &.btnc{background:#F6C576;}
  298. }
  299. }
  300. .hmtopb{
  301. image{flex: 0 0 auto;}
  302. .limg{width: 46rpx;height: 46rpx;margin-right: 22rpx;}
  303. .hmtit{font-size: 26rpx;color: #AAAAAA;font-weight: 500;margin-bottom: 4rpx;}
  304. .hmtxt{font-size: 26rpx;color: #272727;font-weight: 500;
  305. .hmtxts{min-width: 270rpx;}
  306. image{width: 26rpx;height: 18rpx;margin-left: 16rpx;
  307. // image{width: 100%;height: 100%;}
  308. }
  309. }
  310. }
  311. .code{flex:0 0 auto;
  312. view{font-weight: 500;font-size: 20rpx;color: #AAAAAA;}
  313. image{width: 132rpx;height: 132rpx;margin-bottom: 10rpx;}
  314. }
  315. }
  316. .hline{
  317. .tit{font-weight: bold;font-size: 20rpx;color: #48CB9B;font-style: italic;margin-right: 22rpx;flex: 0 0 auto;}
  318. .line{flex: 1;border-bottom: 2rpx solid #E6E6E6;}
  319. }
  320. .detail{
  321. .detop{position: relative;
  322. image{width: 30rpx;height: 30rpx;position: absolute;left: 0;top: 7rpx;z-index: 0;}
  323. .detit{font-size: 16px;color: #272727;font-weight: bold;line-height: 44rpx;padding-left: 10rpx;position: relative;z-index: 2;}
  324. .detxt{font-weight: 500;font-size: 22rpx;color: #666666;line-height: 36rpx;}
  325. }
  326. }
  327. .dlists{display: flex;align-items: center;flex-wrap: wrap;
  328. .lists{line-height: 36rpx;padding: 12rpx 0 12rpx 12rpx;min-width: 23%;box-sizing: border-box;
  329. .ltit{font-weight: 500;font-size: 26rpx;color: #AAAAAA;margin-bottom: 4rpx;}
  330. .ltxt{font-weight: 500;font-size: 26rpx;color: #272727;}
  331. }
  332. }
  333. }
  334. .upbox{display: flex;align-items: center;justify-content: center;margin-top: 8rpx;padding: 10rpx 0;
  335. image{width: 24rpx;height: 20rpx;transition: all 0.3s;margin-left: 14rpx;
  336. &.zhe{transform: rotate(-180deg);}
  337. }
  338. view{font-weight: 500;font-size: 22rpx;color: #AAAAAA;}
  339. }
  340. .dbtns{
  341. view{width: 314rpx;box-sizing: border-box;display: flex;align-items: center;justify-content: center;font-weight: bold;font-size: 26rpx;height: 88rpx;border-radius: 10px;
  342. &.btna{border: 1px solid #FF6969;background: #FFEEEE;color: #FF6969;}
  343. &.btnb{background: #46CB99;color: #FFFFFF;}
  344. }
  345. }
  346. </style>