report.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243
  1. <template>
  2. <view class="mb-5">
  3. <view class="m-3" v-if="propData.patient">
  4. <view class="centerY mt-3">
  5. <view class="bule_line"></view>
  6. <text class="font-bold text-dark ml-2 fs-16 line-height1">基本信息</text>
  7. </view>
  8. <!-- 基本信息 -->
  9. <view class="card mb-2 fs-14 mt-3 p-3" style="color: #818181;">
  10. <view class="w-50 mb-2 d-inline-block">
  11. 姓名:
  12. <span class="font-bold text-dark fs-14">{{ propData.patient.username || '' }}</span>
  13. </view>
  14. <view class="w-50 mb-2 d-inline-block">性别:{{ propData.patient.sex == 1 ? '男' : '女' || '' }}</view>
  15. <view class="w-50 mb-2 d-inline-block">年龄:{{ $mf.getIDCardInfo(propData.patient.idCard).age || '' }}</view>
  16. <view class="w-50 mb-2 d-inline-block">
  17. 慢病类型:
  18. <span class="font-bold text-dark fs-14">{{ CHRONIC_DISEASE_TYPE[propData.patient.chronicDiseaseType - 1].label }}</span>
  19. </view>
  20. <view class="w-50 mb-2 d-inline-block" v-if="1">
  21. 糖尿病病龄:
  22. <span class="font-bold text-dark fs-14">
  23. {{ propData.patient.tnbIllTime ? ((new Date().getTime() - new Date(propData.patient.tnbIllTime).getTime()) / 31536000000).toFixed(0) : '' }}年
  24. </span>
  25. </view>
  26. <view class="w-50 mb-2 d-inline-block" v-if="1">
  27. 高血压病龄:
  28. <span class="font-bold text-dark fs-14">
  29. {{ propData.patient.gxyIllTime ? ((new Date().getTime() - new Date(propData.patient.gxyIllTime).getTime()) / 31536000000).toFixed(0) : '' }}年
  30. </span>
  31. </view>
  32. <view class="position-absolute d-flex position-relative" style="right: 20%;top:0 ;transform: rotate(31deg);z-index:1">
  33. <view
  34. v-show="propData.patient.healthIndex !== 0"
  35. class="centerd position-absolute "
  36. :style="{ width: '150rpx', height: '150rpx', borderRadius: '50%', opacity: 1, ...selectColor(propData.patient.healthIndex) }"
  37. >
  38. <view class="text-center">
  39. <view class="fs-12">健康指数</view>
  40. <view class="font-bold fs-20 ">{{ propData.patient.healthIndex ? 1000 - propData.patient.healthIndex || 0 : '未计算' }}</view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. <view class="">
  46. <view class="centerY mt-3 mb-2" v-if="propData.gljb.gxyVisit && propData.gljb.gxyVisit.id">
  47. <view class="bule_line"></view>
  48. <text class="font-bold text-dark ml-2 fs-16 line-height1">高血压管理等级</text>
  49. </view>
  50. <view class="centerY" v-if="propData.gljb.gxyVisit && propData.gljb.gxyVisit.id">
  51. <view class="fs-12 w-75 mr-2" style="line-height:1.5;border: 1px solid #1890ff;border-radius:4px;background:#fff;">
  52. <view class="text-center fs-12 font-bold " style="padding:16rpx 0;background-color:#1890ff;color:#fff">{{ propData.gljb.gxyVisit.gljb }}</view>
  53. <view class="fs-12" style="padding:8px;">
  54. <view v-if="propData.gljb.gxyVisit.gljb == '一级管理'" style="text-indent: 20px;">
  55. 没有其他危险因素的患者,至少三个月随访一次,检测病情控制情况以健康教育和非药物干预为主。
  56. </view>
  57. <view v-if="propData.gljb.gxyVisit.gljb == '二级管理'" style="text-indent: 20px;">
  58. 一级高血压伴有一到两个危险因素和二级高血压伴有两个一级,两个以下危险因素患者至少两个月随访一次,监测病情控制情况以健康教育和用药指导为重点,有针对性地指导和规范用药。
  59. </view>
  60. <view v-if="propData.gljb.gxyVisit.gljb == '三级管理'" style="text-indent: 20px;">
  61. 患者至少一个月随访一次,病情,控制情况,重点就是要加强规律治疗,注意药物疗效以及副作用,提出靶器官损害预警以及评价,有针对性地健康教育和行为干预,让患者地血压降到目标水平,一般情况下要严格地控制危险因素,而且要明确高血压患者有哪些危险因素。
  62. </view>
  63. </view>
  64. </view>
  65. <view class="w-25 ml-2 bg-white overflow" style="border-radius: 6rpx;">
  66. <view class="text-center fs-12 font-bold " style="padding:10rpx 0;background-color:#1890ff;color:#fff">预约信息</view>
  67. <view class="mt-2 px-2" style="color: #909399;">下次预约</view>
  68. <view class="mt-1 px-2">{{ propData.gljb.gxyVisit.xcyy }}</view>
  69. <view class="mt-2 px-2" style="color: #909399;">随访医生</view>
  70. <view class="mt-1 mb-2 px-2">{{ propData.gljb.gxyVisit.sfys }}</view>
  71. </view>
  72. </view>
  73. <view class="centerY mt-3 mb-2" v-if="propData.gljb.tnbVisit && propData.gljb.tnbVisit.id">
  74. <view class="bule_line"></view>
  75. <text class="font-bold text-dark ml-2 fs-16 line-height1">血糖管理等级</text>
  76. </view>
  77. <view class="centerY" v-if="propData.gljb.tnbVisit && propData.gljb.tnbVisit.id">
  78. <view class="fs-12 w-75 mr-2" style="line-height:1.5;border: 1px solid #1890ff;border-radius:4px;background:#fff;">
  79. <view class="fs-12" style="line-height:1.5">
  80. <view class="text-center fs-12 font-bold mb-1 " style="padding:16rpx 0;background-color:#1890ff;color:#fff">{{ propData.gljb.tnbVisit.gljb }}</view>
  81. <view class="" style="padding:8px;">
  82. <view v-if="propData.gljb.tnbVisit.gljb == '常规管理'" style="text-indent: 20px;">
  83. 3个月随访一次,监测血糖控制情况,空腹血糖2周进行一次就检测,合理用药,强化非药物治疗,提高患者自我管理和自我检测水平。
  84. <span v-if="0 >= 5">眼底、糖足、肾病并发症筛查每年至少一次。</span>
  85. </view>
  86. <view v-if="propData.gljb.tnbVisit.gljb == '强化管理'" style="text-indent: 20px;">
  87. 每月随访一次,在常规管理基础上强化规范用药和并发症检查,突出空腹和餐后血糖监测,每周至少一次。眼底、糖足、肾病等并发症检查每年至少2次,加强健康教育和生活指导。
  88. </view>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="w-25 ml-2 bg-white overflow" style="border-radius: 6rpx;">
  93. <view class="text-center fs-12 font-bold " style="padding:10rpx 0;background-color:#1890ff;color:#fff">预约信息</view>
  94. <view class="mt-2 px-2" style="color: #909399;">下次预约</view>
  95. <view class="mt-1 px-2">{{ propData.gljb.tnbVisit.xcyy }}</view>
  96. <view class="mt-2 px-2" style="color: #909399;">随访医生</view>
  97. <view class="mt-1 mb-2 px-2">{{ propData.gljb.tnbVisit.sfys }}</view>
  98. </view>
  99. </view>
  100. </view>
  101. <!-- 身体特征 -->
  102. <view class="centerY mt-3" v-if="propData.physical && propData.physical.length > 0">
  103. <view class="bule_line"></view>
  104. <text class="font-bold text-dark ml-2 fs-16 line-height1">体征</text>
  105. </view>
  106. <view class="card mb-2 fs-14 mt-3 p-3" style="color: #818181;" v-if="propData.physical && propData.physical.length > 0">
  107. <view class=" p-3" style="background-color: #F5F9FF;border-radius: 16rpx;">
  108. <view id="echarts1" class="echarts"></view>
  109. <view id="echarts2" class="echarts"></view>
  110. </view>
  111. <view class="fs-10 d-flex mt-2" style="color: #909092;">
  112. <view class="space-nowrap">提示:</view>
  113. <view class="">
  114. <view class="">1、身体体质指数范围 偏瘦<= 18.4,正常 18.5 ~ 23.9,过重 24.0 ~ 27.9,肥胖>= 28.0</view>
  115. <view class="mt-1">2、血压心率 收缩压成人 65岁以上 90~149(mmHg)65岁以下 90~139(mmHg),舒张压 60~90(mmHg)</view>
  116. </view>
  117. </view>
  118. </view>
  119. <view class="centerY mt-3" v-if="propData.check && propData.check.length > 0">
  120. <view class="bule_line"></view>
  121. <text class="font-bold text-dark ml-2 fs-16 line-height1">实验检查</text>
  122. </view>
  123. <view class="card mb-2 fs-14 mt-3 p-3" style="color: #818181;" v-if="propData.check && propData.check.length > 0">
  124. <view class="mb-2">
  125. <span class="fs-14 font-bold text-dark mb-2">综合数据</span>
  126. <span class="text-gry fs-12">({{ propData.check[propData.check.length - 1].createTime }})</span>
  127. </view>
  128. <view class=" p-3" style="background-color: #F5F9FF;border-radius: 16rpx;">
  129. <view class="centerY">
  130. <view class="card-boxshow centerY px-2 py-1 w-50 fs-12" v-if="propData.check[propData.check.length - 1].bloodGlucose">
  131. <image class="w-25" src="@/static/img/other/xuet.png" mode="widthFix"></image>
  132. <view class="ml-2">
  133. <view class="text-dark">空腹血糖</view>
  134. <view class="text-dark">
  135. {{ propData.check[propData.check.length - 1].bloodGlucose || '未测量' }}
  136. <span v-if="propData.check[propData.check.length - 1].bloodGlucose" style="color:#A7A7A7 ">mmol/L</span>
  137. </view>
  138. </view>
  139. </view>
  140. <view class="card-boxshow centerY px-2 py-1 w-50 ml-3 fs-12" v-if="propData.check[propData.check.length - 1].chol">
  141. <image class="w-25" src="@/static/img/other/xy.png" mode="widthFix"></image>
  142. <view class="ml-2">
  143. <view class="text-dark">总胆固醇</view>
  144. <view class="text-dark">
  145. {{ propData.check[propData.check.length - 1].chol || '未测量' }}
  146. <span v-if="propData.check[propData.check.length - 1].chol" style="color:#A7A7A7 ">mmol/L</span>
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. <view class="mt-2 centerY">
  152. <view class="card-boxshow centerY px-2 py-1 w-50 fs-12" v-if="propData.check[propData.check.length - 1].ua">
  153. <image class="w-25" src="@/static/img/other/xtfw.png" mode="widthFix"></image>
  154. <view class="ml-2">
  155. <view class="text-dark">尿酸</view>
  156. <view class="text-dark">
  157. {{ propData.check[0].ua || '未测量' }}
  158. <span v-if="propData.check[0].ua" style="color:#A7A7A7 ">μmol/L</span>
  159. </view>
  160. </view>
  161. </view>
  162. <view class="card-boxshow centerY px-2 py-1 ml-3 w-50 fs-12" v-if="propData.check[0].spo2">
  163. <image class="w-25" src="@/static/img/other/xlfw.png" mode="widthFix"></image>
  164. <view class="ml-2">
  165. <view class="text-dark">血氧</view>
  166. <view class="text-dark">
  167. {{ propData.check[0].spo2 || '未测量' }}
  168. <span v-if="propData.check[0].spo2" style="color:#A7A7A7 ">mmHg</span>
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. </view>
  174. <view class="fs-14 font-bold text-dark mb-2">血/尿检查</view>
  175. <view class=" p-3" style="background-color: #F5F9FF;border-radius: 16rpx;">
  176. <view class="fs-14 font-bold text-dark mb-2" v-if="echarts3data.data1.length || echarts3data.data2.length || echarts3data.data3.length">尿液ACR分析</view>
  177. <view class="" v-if="echarts3data.data1.length || echarts3data.data2.length || echarts3data.data3.length"><view id="echarts3" class="echarts"></view></view>
  178. <view class="fs-14 font-bold text-dark my-2" v-if="echarts3data.data4.length || echarts3data.data5.length || echarts3data.data6.length">肾功能检测</view>
  179. <view class="mt-2 " v-if="echarts3data.data4.length || echarts3data.data5.length || echarts3data.data6.length"><view id="echarts4" class="echarts"></view></view>
  180. <!-- <view class="mt-2 centerY">
  181. <view class="card-boxshow centerY px-2 py-1 w-50 fs-12">
  182. <image class="w-25" src="@/static/other/xy.png" mode="widthFix"></image>
  183. <view class="ml-2">
  184. <view class="text-dark">
  185. 尿素氮
  186. </view>
  187. <view class="text-dark">
  188. 200.2 <span style="color:#A7A7A7 "> mmol/L</span>
  189. </view>
  190. </view>
  191. </view>
  192. <view class=" px-2 py-1 ml-3 w-50 fs-12">
  193. </view>
  194. </view>
  195. -->
  196. <view class="fs-14 font-bold text-dark my-2" v-if="echarts3data.data7.length || echarts3data.data8.length || echarts3data.data9.length">血脂检测</view>
  197. <view class="mt-2 centerY" v-if="echarts3data.data7.length || echarts3data.data8.length || echarts3data.data9.length"><view id="echarts5" class="echarts"></view></view>
  198. <view class="text-center mt-3 fs-10"></view>
  199. </view>
  200. </view>
  201. <!-- 眼底 -->
  202. <view class="centerY mt-3" v-if="propData.eye.eyeData && propData.eye.eyeData.id">
  203. <view class="bule_line"></view>
  204. <text class="font-bold text-dark ml-2 fs-16 line-height1">眼底检查</text>
  205. </view>
  206. <view class="card mb-2 fs-14 mt-3 p-3" style="color: #818181;" v-if="propData.eye.eyeData && propData.eye.eyeData.id">
  207. <view class="bg-white" style="border-radius: 16rpx;">
  208. <view class="centerY mb-2 text-gry">
  209. <text class="iconfont Clock fs-20"></text>
  210. <view class="">{{ propData.eye.eyeData.createTime }}</view>
  211. <view class="">
  212. <span :class="{ 'text-green': propData.eye.eyeData.isRead == 1 }">({{ propData.eye.eyeData.isRead == 0 ? '未阅片' : '已阅片' }})</span>
  213. </view>
  214. </view>
  215. <view class="">
  216. <view class="centerY">
  217. <view class="w-50 mx-1">
  218. <view class="centerY">
  219. <image class="w-15" src="@/static/img/other/zuo.png" mode="widthFix"></image>
  220. <view class="d-inline-block ml-1 fs-14 text-dark">左眼</view>
  221. </view>
  222. <view class="border mt-2" style="background: #F6F9FE;border-radius: 16rpx;padding: 14rpx;box-sizing: border-box;">
  223. <view class="picbox1" style="border: 1px dotted #E3E3E3;border-radius: 16rpx;box-sizing: border-box;">
  224. <view style="background: #F6F9FE;" class="picimg1">
  225. <image
  226. @click="
  227. pic(
  228. propData.eye.eyeData.leftImg || propData.eye.eyeData.localLeftImg
  229. ? img_host + (accessType == 1 ? propData.eye.eyeData.leftImg : propData.eye.eyeData.localLeftImg)
  230. : '@/static/img/other/you.png'
  231. )
  232. "
  233. class="w-100"
  234. style="height: 100%;"
  235. :src="
  236. propData.eye.eyeData.leftImg || propData.eye.eyeData.localLeftImg
  237. ? img_host + (accessType == 1 ? propData.eye.eyeData.leftImg : propData.eye.eyeData.localLeftImg)
  238. : '@/static/img/other/you.png'
  239. "
  240. mode="scaleToFill"
  241. ></image>
  242. </view>
  243. </view>
  244. </view>
  245. </view>
  246. <view class="w-50 mx-2">
  247. <view class="centerY">
  248. <image class="w-15" src="@/static/img/other/you.png" mode="widthFix"></image>
  249. <view class="d-inline-block ml-1 fs-14 text-dark">右眼</view>
  250. </view>
  251. <view class="border mt-2" style="background: #F6F9FE;border-radius: 16rpx;padding: 14rpx;box-sizing: border-box;">
  252. <view class="picbox1" style="border: 1px dotted #E3E3E3;border-radius: 16rpx;box-sizing: border-box;">
  253. <view style="background: #F6F9FE;" class="picimg1">
  254. <image
  255. @click="
  256. pic(
  257. propData.eye.eyeData.rightImg || propData.eye.eyeData.localRightImg
  258. ? img_host + (accessType == 1 ? propData.eye.eyeData.rightImg : propData.eye.eyeData.localRightImg)
  259. : '@/static/img/other/you.png'
  260. )
  261. "
  262. class="w-100"
  263. style="height: 100%;"
  264. :src="
  265. propData.eye.eyeData.rightImg || propData.eye.eyeData.localRightImg
  266. ? img_host + (accessType == 1 ? propData.eye.eyeData.rightImg : propData.eye.eyeData.localRightImg)
  267. : '@/static/img/other/you.png'
  268. "
  269. mode="scaleToFill"
  270. ></image>
  271. </view>
  272. </view>
  273. </view>
  274. </view>
  275. </view>
  276. <view class="mt-3 p-2" style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
  277. <view class="centerY">
  278. <image class="w-15" src="@/static/img/other/zjjy.png" mode="widthFix"></image>
  279. <view class="fs-14 font-bold ml-2 space-nowrap">检测医院</view>
  280. <view class=" ml-2 fs-12" style="color: #868687;">{{ hospital.hospitalName || '暂无医院信息' }}</view>
  281. </view>
  282. <view class="centerY mt-2">
  283. <image class="w-15" src="@/static/img/other/jcyy.png" mode="widthFix"></image>
  284. <view class="fs-14 font-bold ml-2 space-nowrap">专家建议</view>
  285. <view v-if="propData.eye.eyeData.isRead == 1" class="ml-2 fs-12" style="color: #868687;">
  286. <span>左眼:{{ propData.eye.eyeData.leftNote || (propData.eye.aiEyeData && propData.eye.aiEyeData.leftNote) || '无' }};</span>
  287. <span>右眼:{{ propData.eye.eyeData.rightNote || (propData.eye.aiEyeData && propData.eye.aiEyeData.rightNote) || '无' }}</span>
  288. </view>
  289. <view v-if="propData.eye.eyeData.isRead == 0" class="ml-2 fs-12" style="color: #868687;">暂未阅片</view>
  290. </view>
  291. </view>
  292. </view>
  293. <view class="text-center text-gry2 fs-10 mt-2">注:本报告内容只针对眼底照片可见范围</view>
  294. </view>
  295. </view>
  296. <!-- 用药 -->
  297. <view class="centerY mt-3" v-if="propData.medicinal && propData.medicinal.length > 0">
  298. <view class="bule_line"></view>
  299. <text class="font-bold text-dark ml-2 fs-16 line-height1">用药情况</text>
  300. <span class="text-gry">(最近随访用药)</span>
  301. </view>
  302. <view class="card mb-2 fs-14 mt-3 p-3" style="color: #818181;" v-if="propData.medicinal && propData.medicinal.length > 0">
  303. <view class="">
  304. <view class="mtable-title centerY bg-primary text-white fs-12">
  305. <view class="text-left" style="width: 23%;">药名</view>
  306. <view class=" text-center" style="width: 15%;">剂量</view>
  307. <view class="w-10 text-center">用法</view>
  308. <view class="text-center" style="width: 17%;">用药频次</view>
  309. <view class="text-center" style="width: 17%;">不良反应</view>
  310. <view class=" text-center" style="width: 17%;">用药类型</view>
  311. </view>
  312. <view v-if="propData.medicinal && propData.medicinal.length == 0"><Empty title="此次随访没有用药" /></view>
  313. <view
  314. v-if="propData.medicinal && propData.medicinal.length > 0"
  315. class="mtable-body-item centerY fs-12"
  316. v-for="(item2, index2) in propData.medicinal"
  317. style="color: #868687;"
  318. >
  319. <uni-tooltip :content="item2.name" style="color: #818181;width: 23%;">
  320. <view class="text-left text-view2">{{ item2.name }}</view>
  321. </uni-tooltip>
  322. <view class=" text-center" style="width: 15%;">{{ item2.unit + item2.medicinalUnit }}</view>
  323. <view class="w-10 text-center">{{ item2.medicinalUse || '未知' }}</view>
  324. <view class="text-center" style="width: 17%;">{{ item2.medicinalInterval || '未知' }}</view>
  325. <view class="text-center" style="width: 17%;">{{ item2.untowardReaction || '无' }}</view>
  326. <view class="text-center" style="width: 17%;">{{ item2.type == 'Tnb' ? '糖尿病' : item2.type == 'Gxy' ? '高血压' : '未知类型' }}</view>
  327. </view>
  328. </view>
  329. </view>
  330. </view>
  331. </view>
  332. </template>
  333. <script>
  334. import Empty from '@/component/empty/empty.vue';
  335. import { config } from '@/static/js/defult_value.js';
  336. const healthIndex = {
  337. error: 600,
  338. warning: 750,
  339. success: 1000
  340. };
  341. import { CHRONIC_DISEASE_TYPE } from '@/static/js/defult_value.js';
  342. export default {
  343. components: {
  344. Empty
  345. },
  346. name: 'Report',
  347. props: {
  348. propData: {
  349. type: Object,
  350. default() {
  351. return {
  352. patient: {},
  353. check: {},
  354. checkResult: {},
  355. eye: { eyeData: {} },
  356. medicinal: [],
  357. physical: {},
  358. yearCheck: []
  359. };
  360. }
  361. }
  362. },
  363. data() {
  364. return {
  365. CHRONIC_DISEASE_TYPE,
  366. config,
  367. echarts1data: {},
  368. echarts3data: {},
  369. accessType: 1,
  370. img_host: '',
  371. hospital: {}
  372. };
  373. },
  374. watch: {
  375. propData: {
  376. handler(val) {
  377. this.settingData();
  378. this.getifoss();
  379. }
  380. }
  381. },
  382. created() {
  383. this.find_hospital();
  384. },
  385. methods: {
  386. async find_hospital() {
  387. let idCard = uni.getStorageSync('idCard');
  388. let { data, code } = await this.$api.find_hospital({
  389. idCard
  390. });
  391. if (code == 0) {
  392. this.hospital = data;
  393. uni.stopPullDownRefresh();
  394. } else {
  395. uni.hideLoading();
  396. uni.stopPullDownRefresh();
  397. }
  398. },
  399. async pic(url) {
  400. uni.previewImage({
  401. urls: [url],
  402. longPressActions: {
  403. itemList: ['发送给朋友', '保存图片', '收藏'],
  404. success: function(data) {
  405. console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
  406. },
  407. fail: function(err) {
  408. console.log(err.errMsg);
  409. }
  410. }
  411. });
  412. },
  413. async getifoss() {
  414. let idCard = uni.getStorageSync('idCard');
  415. let { data, code, count } = await this.$api.ifoss({
  416. idCard
  417. });
  418. if (code == 0) {
  419. this.accessType = data;
  420. let configData = getApp().globalData.configData;
  421. data == 1 ? (this.img_host = configData.img_prod_host) : (this.img_host = configData.img_local_host);
  422. uni.hideLoading();
  423. uni.stopPullDownRefresh();
  424. } else {
  425. this.status = 'more';
  426. uni.hideLoading();
  427. uni.stopPullDownRefresh();
  428. }
  429. },
  430. settingData() {
  431. let check = this.propData.check;
  432. let physical = this.propData.physical;
  433. this.echarts1data = {
  434. time: [],
  435. data1: [],
  436. data2: [],
  437. data3: [],
  438. data4: [],
  439. data5: [],
  440. data6: [],
  441. data7: [],
  442. data8: [],
  443. data9: []
  444. };
  445. this.echarts3data = {
  446. time: [],
  447. data1: [],
  448. data2: [],
  449. data3: [],
  450. data4: [],
  451. data5: [],
  452. data6: [],
  453. data7: [],
  454. data8: [],
  455. data9: []
  456. };
  457. if (check && check.length) {
  458. check.reverse().map((item, index) => {
  459. this.echarts3data.time.push(item.createTime);
  460. this.echarts3data['data1'].push(item.urine1);
  461. this.echarts3data['data2'].push(item.urine2);
  462. this.echarts3data['data3'].push(item.urine3);
  463. this.echarts3data['data4'].push(item.kidney1);
  464. this.echarts3data['data5'].push(item.kidney2);
  465. this.echarts3data['data6'].push(item.kidney3);
  466. this.echarts3data['data7'].push(item.bloodFat1);
  467. this.echarts3data['data8'].push(item.bloodFat3);
  468. this.echarts3data['data9'].push(item.bloodFat4);
  469. });
  470. if (this.echarts3data.data1.length || this.echarts3data.data2.length || this.echarts3data.data3.length) {
  471. this.getdom('echarts3', () => {
  472. this.chartOption3(this.echarts3data, 'echarts3');
  473. });
  474. }
  475. if (this.echarts3data.data4.length || this.echarts3data.data5.length || this.echarts3data.data6.length) {
  476. this.getdom('echarts4', () => {
  477. this.chartOption4(this.echarts3data, 'echarts4');
  478. });
  479. }
  480. if (this.echarts3data.data7.length || this.echarts3data.data8.length || this.echarts3data.data9.length) {
  481. this.getdom('echarts5', () => {
  482. this.chartOption5(this.echarts3data, 'echarts5');
  483. });
  484. }
  485. }
  486. if (physical && physical.length) {
  487. physical.reverse().map(item => {
  488. this.echarts1data['data1'].push(item.height);
  489. this.echarts1data['data2'].push(item.weight);
  490. this.echarts1data['data3'].push(item.bmi);
  491. this.echarts1data['data4'].push(item.shrink);
  492. this.echarts1data['data5'].push(item.diastole);
  493. this.echarts1data['data6'].push(item.pulse);
  494. this.echarts1data['time'].push(item.createTime);
  495. });
  496. if (this.echarts1data.data1.length || this.echarts1data.data2.length || this.echarts1data.data3.length) {
  497. this.getdom('echarts1', () => {
  498. this.chartOption1(this.echarts1data, 'echarts1');
  499. });
  500. if (this.echarts1data.data4.length || this.echarts1data.data5.length || this.echarts1data.data6.length) {
  501. this.getdom('echarts2', () => {
  502. this.chartOption2(this.echarts1data, 'echarts2');
  503. });
  504. }
  505. }
  506. }
  507. },
  508. getdom(dom, cb) {
  509. let timer = setInterval(() => {
  510. if (document.getElementById(dom)) {
  511. clearInterval(timer);
  512. cb && cb();
  513. }
  514. }, 300);
  515. },
  516. selectColor(val) {
  517. // console.log(this.information.info)
  518. val = healthIndex.success - val;
  519. return {
  520. color:
  521. val > healthIndex.warning && val <= healthIndex.success
  522. ? '#13ce66'
  523. : val > healthIndex.error && val < healthIndex.warning
  524. ? '#ffba00'
  525. : val <= healthIndex.error
  526. ? '#ff4d4f'
  527. : '',
  528. border:
  529. val > healthIndex.warning && val <= healthIndex.success
  530. ? '4rpx solid #13ce66'
  531. : val > healthIndex.error && val < healthIndex.warning
  532. ? '4rpx solid #ffba00'
  533. : val <= healthIndex.error
  534. ? '4rpx solid #ff4d4f'
  535. : '',
  536. backgroundColor:
  537. val > healthIndex.warning && val <= healthIndex.success
  538. ? 'rgba(19, 206, 102, .1)'
  539. : val > healthIndex.error && val < healthIndex.warning
  540. ? 'rgba(255, 186,0, .1)'
  541. : val <= healthIndex.error
  542. ? 'rgba(255, 77, 79, .1)'
  543. : ''
  544. };
  545. }
  546. }
  547. };
  548. </script>
  549. <script module="echarts" lang="renderjs">
  550. import * as echarts from 'echarts';
  551. export default {
  552. mounted() {
  553. console.log(echarts)
  554. // this.initChart('echarts1', this.option)
  555. // this.initChart('echarts2', this.option2)
  556. },
  557. methods: {
  558. initChart(dom, option) {
  559. let chart = echarts.init(document.getElementById(dom))
  560. chart.setOption(option)
  561. },
  562. // updateEcharts(newValue, oldValue, ownerInstance, instance) {
  563. // // 监听 service 层数据变更
  564. // myChart.setOption(newValue)
  565. // },
  566. onClick(event, ownerInstance) {
  567. // 调用 service 层的方法
  568. },
  569. check({type,value,age,sex}) {
  570. let msg = this.propData.patient
  571. let arr = this.config
  572. if (type == 'shrink' && age) {
  573. if (msg.age > 65) {
  574. if (value > arr['shrinktop'][1]) {
  575. return true
  576. }
  577. if (value < arr['shrinktop'][0]) {
  578. return true
  579. }
  580. } else {
  581. if (value > arr['shrinklow'][1]) {
  582. return true
  583. }
  584. if (value < arr['shrinklow'][0]) {
  585. return true
  586. }
  587. }
  588. }
  589. if (sex) {
  590. if (msg.sex == 1) {
  591. if (value > arr[type][0][1]) {
  592. return true
  593. }
  594. if (value < arr[type][0][0]) {
  595. return true
  596. }
  597. } else {
  598. if (value > arr[type][1][1]) {
  599. return true
  600. }
  601. if (value < arr[type][1][0]) {
  602. return true
  603. }
  604. }
  605. }
  606. if (value > arr[type][1]) {
  607. return true
  608. }
  609. if (value < arr[type][0]) {
  610. return true
  611. }
  612. return false
  613. },
  614. chartOption4({
  615. time,
  616. data4,
  617. data5,
  618. data6
  619. }) {
  620. let arr = []
  621. time = time.map((res) => this.$mf.timeTrans({
  622. time: res,
  623. format: 'M.D'
  624. }))
  625. time.map((item, index) => {
  626. if (this.check({
  627. type: 'kidney1',
  628. value: data4[index],
  629. sex: true
  630. })) {
  631. arr.push({
  632. value: [item, data4[index]],
  633. symbolSize: 10
  634. })
  635. }
  636. if (this.check({
  637. type: 'kidney2',
  638. value: data5[index],
  639. sex: true
  640. })) {
  641. arr.push({
  642. value: [item, data5[index]],
  643. symbolSize: 10
  644. })
  645. }
  646. if (this.check({
  647. type: 'kidney3',
  648. value: data6[index],
  649. sex: true
  650. })) {
  651. arr.push({
  652. value: [item, data6[index]],
  653. symbolSize: 10
  654. })
  655. }
  656. })
  657. var option = (option = {
  658. legend: {
  659. data: ['血尿酸(mol/L)', '血肌酐(mol/L)', '尿素氮(mmol/L)'],
  660. },
  661. // tooltip: {
  662. // trigger: 'axis',
  663. // axisPointer: {
  664. // type: 'cross',
  665. // label: {
  666. // backgroundColor: '#6a7985',
  667. // },
  668. // },
  669. // },
  670. grid: {
  671. top: '30%',
  672. left: '3%',
  673. right: '5%',
  674. bottom: '3%',
  675. containLabel: true,
  676. },
  677. xAxis: [{
  678. type: 'category',
  679. axisPointer: {
  680. type: 'shadow',
  681. },
  682. data: time,
  683. }, ],
  684. yAxis: [{
  685. type: 'value',
  686. }, ],
  687. series: [{
  688. name: '血尿酸(mol/L)',
  689. label: {
  690. show: true,
  691. formatter: '{@score}',
  692. position: 'top'
  693. },
  694. smooth: true,
  695. type: 'line',
  696. data: data4,
  697. },
  698. {
  699. name: '血肌酐(mol/L)',
  700. label: {
  701. show: true,
  702. formatter: '{@score}',
  703. position: 'top'
  704. },
  705. smooth: true,
  706. type: 'line',
  707. data: data5,
  708. },
  709. {
  710. name: '尿素氮(mmol/L)',
  711. label: {
  712. show: true,
  713. formatter: '{@score}',
  714. position: 'top'
  715. },
  716. smooth: true,
  717. type: 'line',
  718. data: data6,
  719. },
  720. {
  721. type: 'effectScatter',
  722. coordinateSystem: 'cartesian2d',
  723. data: arr,
  724. showEffectOn: 'render',
  725. // zlevel:1,
  726. rippleEffect: {
  727. // 波纹的绘制方式,可选'stroke'和'fill'
  728. brushType: 'fill',
  729. },
  730. hoverAnimation: false,
  731. },
  732. ],
  733. })
  734. this.initChart('echarts4', option)
  735. },
  736. chartOption5({
  737. time,
  738. data7,
  739. data8,
  740. data9
  741. }) {
  742. let arr = []
  743. time = time.map((res) => this.$mf.timeTrans({
  744. time: res,
  745. format: 'M.D'
  746. }))
  747. time.map((item, index) => {
  748. if (this.check({
  749. type: 'bloodFat1',
  750. value: data7[index]
  751. })) {
  752. arr.push({
  753. value: [item, data7[index]],
  754. symbolSize: 10
  755. })
  756. }
  757. if (this.check({
  758. type: 'bloodFat3',
  759. value: data8[index]
  760. })) {
  761. arr.push({
  762. value: [item, data8[index]],
  763. symbolSize: 10
  764. })
  765. }
  766. if (this.check({
  767. type: 'bloodFat4',
  768. value: data9[index]
  769. })) {
  770. arr.push({
  771. value: [item, data9[index]],
  772. symbolSize: 10
  773. })
  774. }
  775. })
  776. var option = (option = {
  777. legend: {
  778. data: ['甘油三酯(mmol/L)', '低密度脂蛋白(mmol/L)', '高密度脂蛋白(mmol/L)'],
  779. },
  780. // tooltip: {
  781. // trigger: 'axis',
  782. // axisPointer: {
  783. // type: 'cross',
  784. // label: {
  785. // backgroundColor: '#6a7985',
  786. // },
  787. // },
  788. // },
  789. grid: {
  790. top: '30%',
  791. left: '3%',
  792. right: '5%',
  793. bottom: '3%',
  794. containLabel: true,
  795. },
  796. xAxis: [{
  797. type: 'category',
  798. axisPointer: {
  799. type: 'shadow',
  800. },
  801. data: time,
  802. }, ],
  803. yAxis: [{
  804. type: 'value',
  805. }, ],
  806. series: [{
  807. name: '甘油三酯(mmol/L)',
  808. label: {
  809. show: true,
  810. formatter: '{@score}',
  811. position: 'top'
  812. },
  813. smooth: true,
  814. type: 'line',
  815. data: data7,
  816. },
  817. {
  818. name: '低密度脂蛋白(mmol/L)',
  819. label: {
  820. show: true,
  821. formatter: '{@score}',
  822. position: 'top'
  823. },
  824. smooth: true,
  825. type: 'line',
  826. data: data8,
  827. },
  828. {
  829. name: '高密度脂蛋白(mmol/L)',
  830. label: {
  831. show: true,
  832. formatter: '{@score}',
  833. position: 'top'
  834. },
  835. smooth: true,
  836. type: 'line',
  837. data: data9,
  838. },
  839. {
  840. type: 'effectScatter',
  841. coordinateSystem: 'cartesian2d',
  842. data: arr,
  843. showEffectOn: 'render',
  844. // zlevel:1,
  845. rippleEffect: {
  846. // 波纹的绘制方式,可选'stroke'和'fill'
  847. brushType: 'fill',
  848. },
  849. hoverAnimation: false,
  850. },
  851. ],
  852. })
  853. this.initChart('echarts5', option)
  854. },
  855. chartOption3({
  856. time,
  857. data1,
  858. data2,
  859. data3
  860. }) {
  861. // console.log({ time, data1, data2, data3 })
  862. time = time.map((res) => this.$mf.timeTrans({
  863. time: res,
  864. format: 'M.D'
  865. }))
  866. var option = (option = {
  867. legend: {
  868. data: ['肌酐(mg/dL)', '微量白蛋白(mg/L)', '尿微/肌酐(mg/g)'],
  869. },
  870. tooltip: {
  871. trigger: 'axis',
  872. axisPointer: {
  873. type: 'cross',
  874. label: {
  875. backgroundColor: '#6a7985',
  876. },
  877. },
  878. },
  879. grid: {
  880. top: '30%',
  881. left: '3%',
  882. right: '5%',
  883. bottom: '3%',
  884. containLabel: true,
  885. },
  886. xAxis: [{
  887. type: 'category',
  888. axisPointer: {
  889. type: 'shadow',
  890. },
  891. data: time,
  892. }, ],
  893. yAxis: [{
  894. type: 'value',
  895. }, ],
  896. series: [{
  897. name: '肌酐(mg/dL)',
  898. label: {
  899. show: true,
  900. formatter: '{@score}',
  901. position: 'top'
  902. },
  903. smooth: true,
  904. type: 'bar',
  905. data: data1,
  906. },
  907. {
  908. name: '微量白蛋白(mg/L)',
  909. label: {
  910. show: true,
  911. formatter: '{@score}',
  912. position: 'top'
  913. },
  914. smooth: true,
  915. type: 'bar',
  916. data: data2,
  917. },
  918. {
  919. name: '尿微/肌酐(mg/g)',
  920. label: {
  921. show: true,
  922. formatter: '{@score}',
  923. position: 'top'
  924. },
  925. smooth: true,
  926. type: 'bar',
  927. data: data3,
  928. },
  929. ],
  930. })
  931. this.initChart('echarts3', option)
  932. },
  933. chartOption1({
  934. time,
  935. data1,
  936. data2,
  937. data3
  938. }) {
  939. let arr = []
  940. time = time.map((res) => this.$mf.timeTrans({
  941. time: res,
  942. format: 'M.D'
  943. }))
  944. time.map((item, index) => {
  945. if (this.check({
  946. type: 'bmi',
  947. value: data3[index]
  948. })) {
  949. arr.push({
  950. value: [item, data3[index]],
  951. symbolSize: 10
  952. })
  953. }
  954. })
  955. var option = (option = {
  956. legend: {
  957. data: ['身高', '体重', 'BMI'],
  958. },
  959. // tooltip: {
  960. // trigger: 'axis',
  961. // axisPointer: {
  962. // type: 'cross',
  963. // label: {
  964. // backgroundColor: '#6a7985',
  965. // },
  966. // },
  967. // },
  968. grid: {
  969. top: '20%',
  970. left: '3%',
  971. right: '5%',
  972. bottom: '3%',
  973. containLabel: true,
  974. },
  975. xAxis: [{
  976. type: 'category',
  977. data: time,
  978. axisPointer: {
  979. type: 'shadow',
  980. },
  981. }, ],
  982. yAxis: [{
  983. type: 'value',
  984. }, ],
  985. series: [{
  986. name: 'BMI',
  987. label: {
  988. show: true,
  989. formatter: '{@score}',
  990. position: 'top',
  991. },
  992. smooth: true,
  993. type: 'line',
  994. data: data3,
  995. itemStyle: {
  996. color: '#9c5045'
  997. },
  998. },
  999. {
  1000. name: '体重',
  1001. label: {
  1002. show: true,
  1003. formatter: '{@score}',
  1004. position: 'top',
  1005. },
  1006. smooth: true,
  1007. type: 'line',
  1008. barWidth: '60%',
  1009. data: data2,
  1010. itemStyle: {
  1011. color: '#e74a2d'
  1012. },
  1013. },
  1014. {
  1015. name: '身高',
  1016. label: {
  1017. show: true,
  1018. formatter: '{@score}',
  1019. position: 'top'
  1020. },
  1021. type: 'line',
  1022. data: data1,
  1023. smooth: true,
  1024. barWidth: '60%',
  1025. itemStyle: {
  1026. color: '#89b87b'
  1027. },
  1028. },
  1029. {
  1030. type: 'effectScatter',
  1031. coordinateSystem: 'cartesian2d',
  1032. data: arr,
  1033. showEffectOn: 'render',
  1034. // zlevel:1,
  1035. rippleEffect: {
  1036. // 波纹的绘制方式,可选'stroke'和'fill'
  1037. brushType: 'fill',
  1038. },
  1039. hoverAnimation: false,
  1040. },
  1041. ],
  1042. })
  1043. this.initChart('echarts1', option)
  1044. },
  1045. chartOption2({
  1046. time,
  1047. data4,
  1048. data5,
  1049. data6
  1050. }) {
  1051. // console.log(time, data4, data5, data6)
  1052. let arr = []
  1053. time = time.map((res) => this.$mf.timeTrans({
  1054. time: res,
  1055. format: 'M.D'
  1056. }))
  1057. time.map((item, index) => {
  1058. if (this.check({
  1059. type: 'shrink',
  1060. value: data4[index],
  1061. age: true
  1062. })) {
  1063. arr.push({
  1064. value: [item, data4[index]],
  1065. symbolSize: 10
  1066. })
  1067. }
  1068. if (this.check({
  1069. type: 'diastole',
  1070. value: data5[index]
  1071. })) {
  1072. arr.push({
  1073. value: [item, data5[index]],
  1074. symbolSize: 10
  1075. })
  1076. }
  1077. if (this.check({
  1078. type: 'pulse',
  1079. value: data6[index]
  1080. })) {
  1081. arr.push({
  1082. value: [item, data6[index]],
  1083. symbolSize: 10
  1084. })
  1085. }
  1086. })
  1087. var option = (option = {
  1088. legend: {
  1089. data: ['收缩压', '舒张压', '心率'],
  1090. },
  1091. // tooltip: {
  1092. // trigger: 'axis',
  1093. // axisPointer: {
  1094. // type: 'cross',
  1095. // label: {
  1096. // backgroundColor: '#6a7985',
  1097. // },
  1098. // },
  1099. // },
  1100. grid: {
  1101. top: '20%',
  1102. left: '3%',
  1103. right: '5%',
  1104. bottom: '3%',
  1105. containLabel: true,
  1106. },
  1107. xAxis: [{
  1108. type: 'category',
  1109. axisPointer: {
  1110. type: 'shadow',
  1111. },
  1112. data: time,
  1113. }, ],
  1114. yAxis: [{
  1115. type: 'value',
  1116. }, ],
  1117. series: [{
  1118. name: '收缩压',
  1119. label: {
  1120. show: true,
  1121. formatter: '{@score}',
  1122. position: 'top'
  1123. },
  1124. smooth: true,
  1125. type: 'line',
  1126. data: data4,
  1127. itemStyle: {
  1128. color: '#8e3e1f'
  1129. },
  1130. },
  1131. {
  1132. name: '舒张压',
  1133. label: {
  1134. show: true,
  1135. formatter: '{@score}',
  1136. position: 'top',
  1137. },
  1138. smooth: true,
  1139. type: 'line',
  1140. data: data5,
  1141. itemStyle: {
  1142. color: '#3c3645'
  1143. },
  1144. },
  1145. {
  1146. name: '心率',
  1147. label: {
  1148. show: true,
  1149. formatter: '{@score}',
  1150. position: 'bottom',
  1151. },
  1152. smooth: true,
  1153. type: 'line',
  1154. data: data6,
  1155. itemStyle: {
  1156. color: '#33a3dc'
  1157. },
  1158. },
  1159. {
  1160. type: 'effectScatter',
  1161. coordinateSystem: 'cartesian2d',
  1162. data: arr,
  1163. showEffectOn: 'render',
  1164. // zlevel:1,
  1165. rippleEffect: {
  1166. // 波纹的绘制方式,可选'stroke'和'fill'
  1167. brushType: 'fill',
  1168. },
  1169. hoverAnimation: false,
  1170. },
  1171. ],
  1172. })
  1173. this.initChart('echarts2', option)
  1174. },
  1175. }
  1176. }
  1177. </script>
  1178. <style lang="scss">
  1179. .card {
  1180. background: #ffffff;
  1181. border-radius: 16rpx;
  1182. }
  1183. .card-boxshow {
  1184. box-shadow: 0px 2px 5px 1px rgba(215, 232, 255, 0.5);
  1185. border-radius: 16rpx;
  1186. background: #ffffff;
  1187. }
  1188. .mtable {
  1189. &-title {
  1190. border-radius: 50rpx;
  1191. padding: 20rpx 0 20rpx 20rpx;
  1192. box-shadow: 0px 2px 7px 1px rgba(45, 142, 255, 0.5);
  1193. }
  1194. &-body {
  1195. &-item {
  1196. margin-top: 20rpx;
  1197. border-radius: 50rpx;
  1198. padding: 14rpx 0 14rpx 20rpx;
  1199. background-color: #f6f9fe;
  1200. color: #868687;
  1201. }
  1202. }
  1203. }
  1204. .picbox1 {
  1205. width: 100% !important;
  1206. height: 0;
  1207. padding-bottom: 70%;
  1208. margin: 0;
  1209. position: relative;
  1210. overflow: hidden;
  1211. }
  1212. .picbox1 .picimg1 {
  1213. width: 100%;
  1214. height: 100%;
  1215. position: absolute;
  1216. }
  1217. .echarts {
  1218. width: 100%;
  1219. height: 400rpx;
  1220. }
  1221. </style>