detail.vue 11 KB

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