report.vue 37 KB

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