personal-manage.html 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>康复管理</title>
  6. <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />
  7. <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
  8. <link rel="stylesheet" type="text/css" href="../../../css/cross.ui.css" />
  9. <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
  10. <link rel="stylesheet" href="../../../plugins/toastr/toastr.min.css">
  11. <link rel="stylesheet" href="../../../plugins/element-ui/element-ui.css" />
  12. <link rel="stylesheet" href="../css/common.css" />
  13. <link rel="stylesheet" type="text/css" href="../../rehabilitation/css/rehabilitation_management.css" />
  14. <link rel="stylesheet" type="text/css" href="../css/new_recover.css" />
  15. <link rel="stylesheet" type="text/css" href="../css/personal-manage.css" />
  16. </head>
  17. <body class="m0">
  18. <div id="app" class="c-333" v-cloak>
  19. <div class="content ui-grid">
  20. <div class="ui-col-0 c-h100 w360 person_info c-border-r ui-grid ui-grid-vertical plr5">
  21. <h4 class="m0 pl15 lh40 c-border-b c-position-r"><em class="c-position-a set-blue-span"></em>个人基础信息</h4>
  22. <div class="bgc-f5f5fa mt10 ptb10 plr10">
  23. <div class="clearfix">
  24. <div class="fl w-100-66">
  25. <p class="m0 p0 mb10">
  26. <span class="c-999">姓名:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.patientName?recoverPatInfo.patientInfo.patientName:''}}
  27. <span class="c-999 ml20">性别:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.sex == 1 ? "男" : "女"}}
  28. <span class="c-999 ml20">年龄:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.age?recoverPatInfo.patientInfo.age:0}}岁
  29. </p>
  30. <p class="m0 p0 mb10">
  31. <span class="c-999">健康情况:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.healthyCondition?recoverPatInfo.patientInfo.healthyCondition:''}}
  32. </p>
  33. <p class="m0 p0 mb10">
  34. <span class="c-999">联系电话:</span><span class="c-12b7f5 cur-pit" v-if="isMobile" @click="changeStatu()">点击查看</span><span v-else>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.mobile?recoverPatInfo.patientInfo.mobile:''}}</span>
  35. </p>
  36. </div>
  37. <div class="fr set-photo">
  38. <img :src="setPatImg(recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.photo?recoverPatInfo.patientInfo.photo:'')" alt="居民头像" />
  39. </div>
  40. </div>
  41. <p class="m0 p0 mb10">
  42. <span class="c-999">签约社区:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.signHospitalName?recoverPatInfo.patientInfo.signHospitalName:''}}
  43. </p>
  44. <p class="m0 p0">
  45. <span class="c-999">康复机构:</span>{{recoverPatInfo.patientInfo&&recoverPatInfo.patientInfo.rehabilitationOrg&&recoverPatInfo.patientInfo.rehabilitationOrg!="null"?recoverPatInfo.patientInfo.rehabilitationOrg:''}}
  46. </p>
  47. </div>
  48. <h4 class="m0 pl15 lh40 c-border-b c-position-r"><em class="c-position-a set-blue-span"></em>服务医生</h4>
  49. <div class="pt10 pb10 ui-col-0" style="overflow: hidden; height: 190px;">
  50. <ul class="p0 m0 c-h100" style="overflow: auto;">
  51. <li class="clearfix plr20 ptb10 doc-li" v-for="(docInfo, index) in docList" :key="index">
  52. <div class="fl set-photo">
  53. <img :src="setPatImg(docInfo.photo, 1)" alt="医生头像" />
  54. </div>
  55. <div class="fl ml10 lh18">
  56. <p class="m0 p0 c-f16">{{docInfo.name}}</p>
  57. <p class="m0 p0 mt10 c-999">{{docInfo.levelName}}</p>
  58. </div>
  59. <!-- <div class="fr w100 ml40 lh18">
  60. <p class="m0 p0">完成项目:<span class="c-orange">{{docInfo.finishedItem}}</span></p>
  61. <p class="m0 p0 mt10">服务次数:<span class="c-orange">{{docInfo.serviceCount}}</span></p>
  62. </div> -->
  63. </li>
  64. </ul>
  65. </div>
  66. <h4 class="m0 pl15 lh40 c-border-b c-position-r"><em class="c-position-a set-blue-span"></em>康复建议</h4>
  67. <textarea placeholder="此处内容是康复建议" readonly class="m0 p10 c-333 mt10 bg-f5f5fa" style="outline: 0;height: 200px;border: 1px solid rgb(225, 225, 225); resize: none;">{{recentRecoverDetail?recentRecoverDetail.adviceContent:''}}</textarea>
  68. <!-- <ul class="m0 p0 ptb10 ui-col-1 c-border b-r-3 c-h100 mt10" style="overflow: auto;">
  69. <li class="pt5 plr10" v-for="(info, index) in diagnosisInformation" :key="index">
  70. <p class="c-999 ptb10 clearfix" style="line-height: 20px;">
  71. <span class="fl w-100-78">&emsp;{{info.dischargeDiagnosis}}</span>
  72. <span class="fr">{{info.dischargeTime}}</span>
  73. </p>
  74. <div class="bgc-f5f5fa plr5 ptb10" style="line-height: 20px;">
  75. &emsp;&emsp;{{info.advice}}
  76. </div>
  77. </li>
  78. <li class="c-t-center ptb10" v-if="!diagnosisInformation.length">无医嘱小结</li>
  79. </ul> -->
  80. <h4 class="m0 pl15 lh40 c-border-b c-position-r"><em class="c-position-a set-blue-span"></em>住院病历</h4>
  81. <div>
  82. <div v-for="(o, i) in medicalRecordsList" class="flex vc c-f14 c-border plr10 ptb5 link-control mt10" @click="viewMedicalDetail(o)">
  83. <span class="c-666 mr15">
  84. {{o&&o.admissionTime?formatter(o.admissionTime):''}}
  85. </span>
  86. <div class="flex1 c-12b7f5 ellipsis-1">
  87. {{o&&o.hospitalName?o.hospitalName:''}}
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. <div class="ui-col-1 c-h100 w-100-360 ui-grid">
  93. <div class="ui-col-1 c-h100 ui-grid ui-grid-vertical">
  94. <div class="m0 pl15 lh40 c-border-b c-position-r clearfix">
  95. <em class="c-position-a set-blue-span"></em>
  96. <span class="fl">康复计划</span>
  97. <span class="fl plr20 ml20 c-f12 bgc-12b7f5 c-fff cur-pit" @click="gotoNewplan()" v-if="doctorType == 1">新建计划</span>
  98. <span class="fr w80 c-333 c-f12 c-t-center">进行中:{{recoverPatInfo.planUnderway}}</span>
  99. <span class="fr w80 c-333 c-f12 c-t-center">已完成:{{recoverPatInfo.planFinish}}</span>
  100. </div>
  101. <div class="pb10" style="overflow: hidden; height: 230px;">
  102. <ul class="p0 plr5 m0 c-h100" style="overflow: auto;">
  103. <li class="plr5 ptb10 mt10 plan-li cur-pit c-border b-r-3 ui-grid link-control" :class="{'bd-12b7f5': planId==plan.id}" v-for="(plan, index) in planList" :key="index" @click="jumpPlan(plan)">
  104. <!-- <div class="ui-col-1">
  105. <p class="p0 m0 lh22 clearfix">
  106. <span class="fl">{{plan.planTypeName}}</span>
  107. <span class="fr c-999">{{plan.time}}</span>
  108. </p>
  109. <div class="ui-grid">
  110. <p class="ui-col-1 bgc-c1c1c1 lh22 b-r-11 c-position-r c-t-center">
  111. <span class="c-position-a bgc-orange lh22 b-r-11 c-t-center c-fff" :style="{width: setPercent(plan), left: 0}"></span>
  112. <span class="c-position-r w-100 c-t-center">{{setPercent(plan)}}</span>
  113. </p>
  114. <div class="ui-col-0 ml10 c-999 lh22">{{plan.allFinishCount}}/{{plan.allCount}}</div>
  115. </div>
  116. </div> -->
  117. <!-- <div class="ui-col-0 ml15 c-007cd9 lh40">{{plan.statusName}}</div> -->
  118. <div class="ui-col-1">
  119. <div class="ui-grid ui-grid-middle">
  120. <img :src="setPatImg(plan.photo)" class="mr10" style="width: 45px; height: 45px; border-radius: 100%;"/>
  121. <div class="ui-col-1">
  122. <p>{{plan.doctorName}}</p>
  123. <p class="mt5">{{plan.deptName}}/{{plan.hospitalName}}</p>
  124. </div>
  125. </div>
  126. </div>
  127. <div class="c-999 ui-grid ui-grid-middle">
  128. {{formatter(plan.createTime)}}
  129. </div>
  130. </li>
  131. <li class="ptb10 c-t-center" v-if="!planList || !planList.length">暂无相关计划</li>
  132. </ul>
  133. </div>
  134. <h4 class="m0 pl15 pr5 lh40 c-border-tb clearfix c-position-r"><em class="c-position-a set-blue-span"></em>康复相关记录<span class="fr w80 c-333 c-f12 c-t-center">已完成:{{finishData.planDetailFinish}}</span></h4>
  135. <div style="height:calc(100% - 271px);overflow: hidden; overflow-y: auto;">
  136. <server-items-detail ref="serverItemsDetail" v-if="showServerItemDetail" :patientname="recoverPatInfo.patientInfo.patientName" :patientcode="recoverPatInfo.patientInfo.patientCode" :planid="planId" :plandetailid="serverItemInfo.id" @onclose="showServerItemDetail=false"></server-items-detail>
  137. <div v-if="!showServerItemDetail" style="height:calc(100% - 100px);overflow: hidden; overflow-y: auto;" class="recover-list">
  138. <ul class="p0 m0 c-h100 c-999">
  139. <li class="clearfix plr10 cur-pit record-li" v-for="(plan, index) in planDetailList" :class="{'bgc-dff5fc c-12b7f5':plan.istaDay}" @click="lookProject(plan)">
  140. <div class="fl w80 ptb10 c-t-right">
  141. <p class="p0 m0 lh18">{{plan.executeTime}}</p>
  142. </div>
  143. <div class="fl set-dianxian plr20 ptb10 clerfix">
  144. <span class="fl set-taday mt8 c-t-center c-fff" v-if="plan.istaDay">今</span>
  145. <span class="fl mlr5 mt13 set-row bgc-e1e1e1" v-else></span>
  146. </div>
  147. <div class="fl ptb10 w-100-220">
  148. <div class="ui-grid ui-grid-middle" style="height: 36px;">
  149. <p class="p0 m0 lh18">{{plan.title}}</p>
  150. </div>
  151. </div>
  152. <div class="fr ptb10 w60 c-t-center">
  153. <p class="p0 m0 lh18">已完成</p>
  154. <p class="p0 m0 lh18">查看</p>
  155. </div>
  156. </li>
  157. <li class="plr20" v-if="isFinishMore">
  158. <div class="c-border lh40 b-r-3 c-t-center cur-pit" @click="addEventPage()">点击查看更早时间</div>
  159. </li>
  160. <li class="ptb10 c-t-center c-333" v-if="!planDetailList.length">暂无相关记录</li>
  161. </ul>
  162. </div>
  163. <!-- 服务项列表 -->
  164. <div v-if="!showServerItemDetail" class="plr10 pb10">
  165. <div v-for="(o, i) in limitlessItems" class="flex vc c-f14 c-border plr10 ptb5 mt10 link-control" @click="viewServerItemsDetail(o)">
  166. <div class="flex1 c-12b7f5 ellipsis-1">
  167. {{o.name}}
  168. </div>
  169. <div style="width: 250px;">
  170. <div class="flex lh28">
  171. <span>完成情况:</span>
  172. <div class="flex1" v-if="!o.frequency_code"><span class="c-FF0000">{{o.compeletTotal}}</span>次</div>
  173. <div class="flex1" v-else><span class="c-FF0000">{{o.compeletTotal}}/{{o.total}}</span></div>
  174. </div>
  175. <div v-if="o.code!='3'" class="flex lh28">
  176. <span>上次完成:</span>
  177. <div class="flex1">{{o.firstDate?o.firstDate:'--'}}</div>
  178. </div>
  179. <div v-if="o.frequency_code" class="flex lh28">
  180. <span>下次计划:</span>
  181. <div class="flex1">{{o.lastDate?o.lastDate:'--'}}</div>
  182. </div>
  183. <div v-if="o.code=='3'" class="flex lh28">
  184. <!-- o.type 1: 血糖 2: 血压 -->
  185. <span>最近体征:</span>
  186. <div v-if="!o.type || o.compeletTotal==0" class="">--</div>
  187. <div v-else-if="o.type==1">
  188. <span class="zhibiao_icon" :class="{'low':o.levelClazz1=='low', 'high':o.levelClazz1=='high'}">{{o.levelName}}血糖:{{o.value1}}</span>
  189. </div>
  190. <div v-else-if="o.type==2" class="flex vc">
  191. <span class="zhibiao_icon" :class="{'low':o.levelClazz1=='low', 'high':o.levelClazz1=='high'}">收缩压:{{o.value1}}</span>
  192. <span class="zhibiao_icon" :class="{'low':o.levelClazz2=='low', 'high':o.levelClazz2=='high'}">舒张压:{{o.value2}}</span>
  193. </div>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. </div>
  200. <div class="ui-col-0 w360 c-h100 c-border-l ui-grid ui-grid-vertical">
  201. <div class="plr5 ui-col-0">
  202. <h4 class="m0 pl15 pr5 lh40 c-border-b clearfix c-position-r"><em class="c-position-a set-blue-span"></em>体征记录</h4>
  203. <div class="h380">
  204. <div class="pt10 pb10 ui-grid ui-grid-middle c-t-center type">
  205. <div class="ui-col-0 over-hidden lh30 c-border b-r-5">
  206. <span class="c-inline-block w130 bgc-fff c-666 cur-pit" :class="{'active': recordType == 1}" @click="changeType(0,1)">血糖记录</span>
  207. <span class="c-inline-block w130 bgc-fff c-666 cur-pit" :class="{'active': recordType == 2}" @click="changeType(0,2)">血压记录</span>
  208. </div>
  209. </div>
  210. <div class="pt10 bgc-f5f5fa c-t-center">
  211. <div class="ui-grid ui-grid-middle lh22 type">
  212. <div class="ui-col-0 clearfix">
  213. <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 6}" @click="changeType(1,6)">7天</div>
  214. <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 29}" @click="changeType(1,29)">30天</div>
  215. <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 89}" @click="changeType(1,89)">90天</div>
  216. <div class="fl b-r-15 w60 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': rangeType == 182}" @click="changeType(1,182)">半年</div>
  217. </div>
  218. </div>
  219. <div class="ui-grid ui-grid-middle lh22 type c-border-t mtb10 pt10" v-if="recordType == 1">
  220. <div class="ui-col-0 clearfix">
  221. <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 1}" @click="changeType(2,1)">早餐前</div>
  222. <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 2}" @click="changeType(2,2)">早餐后</div>
  223. <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 3}" @click="changeType(2,3)">午餐前</div>
  224. <div class="fl b-r-15 w60 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 4}" @click="changeType(2,4)">午餐后</div>
  225. </div>
  226. </div>
  227. <div class="ui-grid ui-grid-middle type lh22" v-if="recordType == 1">
  228. <div class="ui-col-0 clearfix">
  229. <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 5}" @click="changeType(2,5)">晚餐前</div>
  230. <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 6}" @click="changeType(2,6)">晚餐后</div>
  231. <div class="fl b-r-15 w60 mr20 c-border b-c-12b7f5 c-12b7f5 cur-pit" :class="{'active': xtStatu == 7}" @click="changeType(2,7)">睡前</div>
  232. </div>
  233. </div>
  234. </div>
  235. <div class="ui-grid ui-grid-middle lh30 bgc-f5f5fa c-t-center" :class="{'pt10': recordType == 2}">
  236. <div class="ui-col-2" v-if="recordType == 2">收缩压</div>
  237. <div class="ui-col-2 c-12b7f5">正常:{{toNormal}}次</div>
  238. <div class="ui-col-2 c-ff3b30">偏高:{{toHigh}}次</div>
  239. <div class="ui-col-2 c-2dbe55">偏低:{{toLow}}次</div>
  240. </div>
  241. <div class="ui-grid ui-grid-middle pb10 lh30 bgc-f5f5fa c-t-center" v-if="recordType == 2">
  242. <div class="ui-col-2">舒张压</div>
  243. <div class="ui-col-2 c-12b7f5">正常:{{toNormal2}}次</div>
  244. <div class="ui-col-2 c-ff3b30">偏高:{{toHigh2}}次</div>
  245. <div class="ui-col-2 c-2dbe55">偏低:{{toLow2}}次</div>
  246. </div>
  247. <div style="height: 200px;">
  248. <my-chart :chart-data="chartData"></my-chart>
  249. </div>
  250. </div>
  251. </div>
  252. <div class="plr5 ui-col-1 ui-grid ui-grid-vertical">
  253. <h4 class="ui-col-0 m0 pl15 pr5 lh40 c-border-b clearfix c-position-r"><em class="c-position-a set-blue-span"></em>就诊记录</h4>
  254. <div class="ui-col-0 ui-grid ui-grid-middle lh30 c-border-b c-t-center clearfix">
  255. <div class="ui-col-2 w96 cur-pit" :class="{'active':eventType == 1}" @click="selectType(1)">门诊</div>
  256. <div class="ui-col-2 w96 cur-pit c-border-l" :class="{'active':eventType == 2}" @click="selectType(2)">住院</div>
  257. <div class="ui-col-2 w96 cur-pit c-border-l" :class="{'active':eventType == 3}" @click="selectType(3)">体检</div>
  258. </div>
  259. <ul class="ui-col-1 p0 m0" style="overflow: auto;">
  260. <li class="clearfix" v-for="(record, index) in seeRecord" :key="index">
  261. <div class="fl set-dianxian h73 plr10 pt20 clerfix">
  262. <span class="fl mlr5 set-row bgc-red" v-if="record.eventType == 2"></span>
  263. <span class="fl mlr5 set-row bgc-green" v-if="record.eventType == 3"></span>
  264. <span class="fl mlr5 set-row bgc-orange" v-if="record.eventType == 1"></span>
  265. </div>
  266. <div class="fl w-100-60 pt15">
  267. <div class=" c-border b-r-3">
  268. <p class="m0 p0 plr5 c-fff bgc-red lh22 clearfix" v-if="record.eventType == 2">住院<span class="fr">{{record.eventDate}}</span></p>
  269. <p class="m0 p0 plr5 c-fff bgc-green lh22 clearfix" v-if="record.eventType == 3">体检<span class="fr">{{record.eventDate}}</span></p>
  270. <p class="m0 p0 plr5 c-fff bgc-orange lh22 clearfix" v-if="record.eventType == 1">门诊<span class="fr">{{record.eventDate}}</span></p>
  271. <p class="m0 p0 plr5 pt5 lh22">{{record.dianosis}}</p>
  272. <p class="m0 p0 pr5 pb5 pl20 set-hospital">{{record.orgName}}</p>
  273. </div>
  274. </div>
  275. </li>
  276. <li class="c-t-center c-12b7f5" v-if="hasMoreRecord">查看更多</li>
  277. <li class="c-t-center ptb10" v-if="!seeRecord.length">无就诊记录</li>
  278. </ul>
  279. </div>
  280. </div>
  281. </div>
  282. </div>
  283. </div>
  284. </div>
  285. <script src="../../../js/vue.js" type="text/javascript" charset="utf-8"></script>
  286. <script src="../../../js/jquery-2.2.4.js"></script>
  287. <script src="../../../plugins/layer/layer.min.js"></script>
  288. <script src="../../../plugins/toastr/toastr.min.js"></script>
  289. <script type="text/javascript" src="../../../plugins/element-ui/element-ui.js"></script>
  290. <script src="../../../plugins/echarts/3.8.5/echarts.js" type="text/javascript"></script>
  291. <script src="../../../component/rehabilitation/my-echart.js"></script>
  292. <script src="../../../js/bootstrap.min.js"></script>
  293. <script src="../../../js/es6-promise.js" type="text/javascript" charset="utf-8"></script>
  294. <script src="../../../js/underscore.js" type="text/javascript" charset="utf-8"></script>
  295. <script src="../../../js/util.js" type="text/javascript" charset="utf-8"></script>
  296. <script src="../../../api/http-request.js" type="text/javascript"></script>
  297. <script type="text/javascript" src="../../../component/rehabilitation/server-items-detail.js"></script>
  298. <script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
  299. <script src="../../../api/recover_api.js" type="text/javascript"></script>
  300. <script type="text/javascript">
  301. var doctorType = (JSON.parse(window.localStorage.getItem('wlyyAgent'))||{}).doctorType
  302. var httpData=GetRequest()
  303. function showSuccessMessage(msg) {
  304. layer.msg(msg, {
  305. icon: 1
  306. })
  307. }
  308. function showErrorMessage(msg) {
  309. layer.msg(msg, {
  310. icon: 5
  311. })
  312. }
  313. function showWarningMessage(msg) {
  314. layer.msg(msg, {
  315. icon: 2
  316. })
  317. }
  318. function showInfoMessage(msg) {
  319. layer.msg(msg, {
  320. icon: 6
  321. })
  322. }
  323. var nowDate = new Date().format("yyyy/MM/dd")
  324. var xuetangDuring = ['', '早餐前', '早餐后', '午餐前', '午餐后', '晚餐前', '晚餐后', '睡前'];
  325. var normalLevel = [
  326. [],
  327. [7, 4],
  328. [11.1, 4],
  329. [7, 4],
  330. [11.1, 4],
  331. [7, 4],
  332. [11.1, 4],
  333. [7, 4]
  334. ];
  335. var docInfo = JSON.parse(window.localStorage.getItem("wlyyAgent"));
  336. recoverVue = new Vue({
  337. el: "#app",
  338. data: {
  339. doctorType: doctorType,
  340. isMobile: true,
  341. recoverPatInfo: {},
  342. finishData: {},
  343. diagnosisInformation: [],
  344. seeRecord: [],
  345. planDetailList: [],
  346. isFinishMore: false,
  347. page: 1,
  348. eventPage: 1,
  349. eventType: 1,
  350. hasMoreRecord: null,
  351. chartData: {},
  352. lastXT: '', // 最近一次血糖记录
  353. lastXY: '', // 最近一次血压记录
  354. recordType: 1, // 1血糖2血压
  355. rangeType: 6, // 日期
  356. xtStatu: 1, // 状态血糖
  357. toNormal: 0, // 正常
  358. toLow: 0, // 偏低
  359. toHigh: 0, // 偏高
  360. toNormal2: 0, // 正常
  361. toLow2: 0, // 偏低
  362. toHigh2: 0, // 偏高
  363. xtMax: 0, // 血糖最高
  364. xtMin: 0, // 血糖最低
  365. xyMax: [139, 89], // 血压最高
  366. xyMin: [90, 60], // 血压最低
  367. planList: [], // 计划列表
  368. recentRecoverDetail: undefined,
  369. medicalRecordsList: [], // 住院病历列表
  370. limitlessItems: [], // 不限频次服务项列表
  371. showServerItemDetail: false,
  372. serverItemInfo: undefined,
  373. docList: [],
  374. planId: httpData['planId'],
  375. islimit: false
  376. },
  377. mounted: function() {
  378. this.patientRehabilitationDetail()
  379. this.selectPlanByPatient()
  380. this.recentPlanDetailRecord()
  381. this.archivesEvent()
  382. // 获取最新的诊疗信息2条
  383. this.findDiagnosisInformationByPatient()
  384. // 获取体征记录
  385. this.getBodyRecoredLast()
  386. },
  387. methods: {
  388. // 获取服务医生列表
  389. selectPlanServerDoctor: function(id){
  390. var vm = this,
  391. params = {
  392. planId: id
  393. }
  394. rehaAPI.selectPlanServerDoctor(params).then(function(res){
  395. if(res.status==200){
  396. vm.docList = res.data
  397. }else{
  398. layer.msg(res.msg,{icon:5});
  399. }
  400. })
  401. },
  402. changeStatu: function() {
  403. this.isMobile = false
  404. },
  405. gotoNewplan: function() {
  406. location.href = "new_recover.html?patient=" + httpData.patientCode
  407. },
  408. jumpPlan: function(plan) {
  409. location.href = "../../rehabilitation/html/rehabilitation_management.html?planId=" + plan.id + "&patientCode=" + httpData.patientCode
  410. },
  411. lookProject: function(obj) {
  412. var vm = this
  413. // layer.open({
  414. // type: 2,
  415. // area: ['600px', '500px'],
  416. // shade: 0.5,
  417. // title: '服务项目内容',
  418. // closeBtn: 1,
  419. // shift: 5,
  420. // shadeClose: false, //点击遮罩关闭层
  421. // content: "project-detail.html?planId=" + obj.id
  422. // });
  423. top.layer.open({
  424. type: 2,
  425. area: ['800px', '650px'],
  426. shade: 0.5,
  427. title: '服务项目内容',
  428. fixed: true, //不固定
  429. maxmin: true,
  430. closeBtn:1,
  431. shift: 5,
  432. shadeClose: false, //点击遮罩关闭层
  433. content: '../../rehabilitation/html/guide_the_message.html?planid='+obj.id+'&pId='+vm.planList[0].planId+'&patient='+httpData.patientCode
  434. });
  435. },
  436. // 获取最新的诊疗消息
  437. findDiagnosisInformationByPatient: function() {
  438. var vm = this,
  439. loading = layer.load(0, {shade: false}),params = {
  440. patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c",
  441. page: 0,
  442. size: 2
  443. }
  444. recoverAPI.findDiagnosisInformationByPatient(params).then(function(res) {
  445. layer.close(loading)
  446. if(res.status == 200) {
  447. vm.diagnosisInformation = res.data.detailModelList
  448. } else {
  449. showErrorMessage(res.msg);
  450. }
  451. })
  452. },
  453. // 获取住院病历
  454. selectByMedicalCode: function(medicalRecordsCode){
  455. var vm = this;
  456. var params = {
  457. medical: medicalRecordsCode
  458. };
  459. rehaAPI.selectByMedicalCode(params).then(function(res){
  460. if(res.status==200){
  461. vm.medicalRecordsList = res.data
  462. }else {
  463. showErrorMessage(res.msg);
  464. }
  465. })
  466. },
  467. // 查看住院病历详情
  468. viewMedicalDetail: function(o){
  469. layer.open({
  470. type: 2,
  471. area: ['600px', '600px'],
  472. shade: 0.5,
  473. title: '住院病历详情',
  474. fixed: true, //不固定
  475. maxmin: true,
  476. closeBtn:1,
  477. shift: 5,
  478. shadeClose: false, //点击遮罩关闭层
  479. content: '../../rehabilitation/html/medical-records-detail.html?medicalRecordsCode='+ o.code,
  480. });
  481. },
  482. formatter: function(time){
  483. return new Date(time).format('yyyy-MM-dd')
  484. },
  485. // 获取康复计划信息
  486. patientRehabilitationDetail: function() {
  487. var vm = this,
  488. loadding = layer.load(0, {shade: false}),
  489. params = {
  490. patientCode: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c"
  491. }
  492. recoverAPI.patientRehabilitationDetail(params).then(function(res) {
  493. layer.close(loadding)
  494. if(res.status == 200) {
  495. vm.recoverPatInfo = res.data
  496. } else {
  497. showErrorMessage(res.msg);
  498. }
  499. })
  500. },
  501. // 所有康复计划列表
  502. selectPlanByPatient: function(){
  503. var vm = this,
  504. loadding = layer.load(0, {shade: false}),
  505. params = {
  506. patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c"
  507. }
  508. rehaAPI.selectPlanByPatient(params).then(function(res) {
  509. layer.close(loadding)
  510. if(res.status == 200) {
  511. if(res.data&&res.data.length>0){
  512. var list = res.data
  513. $.each(list, function(index, item){
  514. if(item.id == vm.planId){
  515. vm.recentRecoverDetail = item
  516. }
  517. })
  518. vm.planList = res.data
  519. vm.selectByMedicalCode(vm.recentRecoverDetail.medicalRecordsCode)
  520. vm.calendarPlanDetailItems(vm.recentRecoverDetail.id)
  521. vm.selectPlanServerDoctor(vm.recentRecoverDetail.id)
  522. }
  523. } else {
  524. showErrorMessage(res.msg);
  525. }
  526. })
  527. },
  528. viewServerItemsDetail: function(o){
  529. if(o.code=='2'){
  530. showInfoMessage('请从“消息-患者消息列表”中查看患者的康复咨询记录')
  531. return
  532. }
  533. if(o.code=='3'){
  534. return
  535. }
  536. this.serverItemInfo = o
  537. this.showServerItemDetail = true
  538. this.islimit = o.frequency_code?true:false
  539. },
  540. calendarPlanDetailItems: function(planId){
  541. var vm=this;
  542. var year = new Date().getFullYear()
  543. var params={
  544. executeStartTime: year+'-01-01'+' 00:00:00',//日历开始时间(格式:yyyy-MM-dd HH:mm:ss)
  545. executeEndTime: year+'-12-31'+' 23:59:59',//日历结束时间(格式:yyyy-MM-dd HH:mm:ss)
  546. planId: planId,//计划id
  547. searchTask: '',//快速查找任务:(1、我的任务,2、随访,3、复诊,4、健康教育)
  548. status: '',//任务状态(0未完成,1已完成,2已预约)
  549. }
  550. rehaAPI.calendarPlanDetailItems(params).then(function(res){
  551. if(res.status==200){
  552. var arr = []
  553. $.each(res.data, function(i, o){
  554. if(o.code=='3'&&o.type){
  555. if(o.type==2){
  556. o.levelClazz = vm.getLevelClazz(o.value1, 139, 90) || vm.getLevelClazz(o.value2, 89, 60)
  557. o.levelClazz1 = vm.getLevelClazz(o.value1, 139, 90)
  558. o.levelClazz2 = vm.getLevelClazz(o.value2, 89, 60)
  559. o.levelClazz3 = vm.getLevelClazz(o.value3, 100, 60)
  560. } else {
  561. var num = parseInt(o.value2)
  562. var max = normalLevel[num][0],
  563. min = normalLevel[num][1];
  564. o.levelClazz1 = vm.getLevelClazz(o.value1, max, min)
  565. o.levelName = xuetangDuring[o.value2]
  566. }
  567. }
  568. arr.push(o)
  569. })
  570. vm.limitlessItems = arr
  571. }
  572. })
  573. },
  574. getLevelClazz: function(value,max,min) {
  575. if(!value||(!max && !min)) {
  576. return '';
  577. }
  578. var value = parseFloat(value);
  579. if(value < min) {
  580. return 'low';
  581. } else if(value > max) {
  582. return 'high';
  583. } else {
  584. return ''
  585. }
  586. },
  587. // 获取已完成的康复服务项
  588. recentPlanDetailRecord: function() {
  589. var vm = this,
  590. loadding = layer.load(0, {shade: false}),
  591. params = {
  592. patientCode: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c",
  593. page: vm.eventPage,
  594. pageSize: 10
  595. }
  596. recoverAPI.recentPlanDetailRecord(params).then(function(res) {
  597. layer.close(loadding)
  598. if(res.status == 200) {
  599. vm.finishData = res.data
  600. vm.planDetailList = vm.planDetailList.concat(vm.finishData.planDetailList)
  601. vm.planDetailList = $.each(vm.planDetailList, function(index, o) {
  602. var executeTime = new Date(o.executeTime).format("yyyy/MM/dd")
  603. if(nowDate == executeTime) {
  604. o.istaDay = true
  605. }
  606. return o
  607. });
  608. if(vm.finishData.planDetailList.length >= 10) {
  609. vm.isFinishMore = true
  610. } else {
  611. vm.isFinishMore = false
  612. }
  613. } else {
  614. showErrorMessage(res.msg);
  615. }
  616. })
  617. },
  618. goConsulting: function(){
  619. showInfoMessage('请从“消息-患者消息列表”中查看患者的康复咨询记录')
  620. },
  621. selectType: function(type) {
  622. this.eventType = type
  623. this.seeRecord = []
  624. this.page = 1
  625. this.archivesEvent()
  626. },
  627. archivesEvent: function() {
  628. var vm = this,
  629. loadding = layer.load(0, {shade: false}),
  630. params = {
  631. patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c",
  632. type: vm.eventType,
  633. page: vm.page,
  634. pageSize: 20
  635. }
  636. recoverAPI.archivesEvent(params).then(function(res) {
  637. layer.close(loadding)
  638. if(res.status == 200) {
  639. this.hasMoreRecord = res.data.length == 20 ? true : false
  640. vm.seeRecord = vm.seeRecord.concat(res.data)
  641. } else {
  642. showErrorMessage(res.msg);
  643. }
  644. })
  645. },
  646. setPatImg: function(src, doc) {
  647. if(!src) {
  648. if(doc) {
  649. return "../../../images/d-default.png"
  650. } else {
  651. return "../../../images/p-female.png"
  652. }
  653. } else {
  654. var str = httpRequest.getImgUrl(src);
  655. return str
  656. }
  657. },
  658. addEventPage: function() {
  659. this.eventPage++;
  660. this.recentPlanDetailRecord()
  661. },
  662. addPage: function() {
  663. this.page++;
  664. this.archivesEvent()
  665. },
  666. setPercent: function(plan) {
  667. return Math.floor(plan.allFinishCount / plan.allCount * 100) + "%"
  668. },
  669. // 时间推算
  670. getDateFromCurrentDate: function() {
  671. var fromDate = this.recordType == 1 ? this.lastXT : this.lastXY,
  672. dayInterval = -this.rangeType;
  673. var curDate = new Date(Date.parse(fromDate.replace(/-/g, "/")));
  674. curDate.setDate(curDate.getDate() + dayInterval);
  675. var year = curDate.getFullYear();
  676. var month = (curDate.getMonth() + 1) < 10 ? "0" + (curDate.getMonth() + 1) : (curDate.getMonth() + 1);
  677. var day = curDate.getDate() < 10 ? "0" + curDate.getDate() : curDate.getDate();
  678. return year + "-" + month + "-" + day + " 00:00:00";
  679. },
  680. // 血糖最高值最低值
  681. getNormalLevel: function() {
  682. var arr = [
  683. [],
  684. [6.1, 3.9],
  685. [7.8, 4.4],
  686. [6.1, 3.9],
  687. [7.8, 4.4],
  688. [6.1, 3.9],
  689. [7.8, 4.4],
  690. [6.1, 3.9]
  691. ][this.xtStatu];
  692. this.xtMax = arr[0]
  693. this.xyMax = arr[1]
  694. },
  695. // 处理数据偏高、偏低、正常
  696. judgeDataDif: function(val, val2) {
  697. // 血糖判断
  698. if(this.recordType == 1) {
  699. if(val > this.xtMax) {
  700. ++this.toHigh;
  701. } else if(val < this.xtMin) {
  702. ++this.toLow;
  703. } else {
  704. ++this.toNormal;
  705. };
  706. } else {
  707. // 血压判断
  708. if(val > this.xyMax[0]) {
  709. ++this.toHigh;
  710. } else if(val < this.xyMin[0]) {
  711. ++this.toLow;
  712. } else {
  713. ++this.toNormal;
  714. }
  715. // 血压判断
  716. if(val2 > this.xyMax[1]) {
  717. ++this.toHigh2;
  718. } else if(val2 < this.xyMin[1]) {
  719. ++this.toLow2;
  720. } else {
  721. ++this.toNormal2;
  722. }
  723. }
  724. },
  725. // 体征记录
  726. changeType: function(judge, num) {
  727. if(judge) {
  728. if(judge == 1) {
  729. this.rangeType = num
  730. } else {
  731. this.xtStatu = num
  732. }
  733. } else {
  734. this.recordType = num
  735. }
  736. this.getHealthIndex()
  737. },
  738. // 获取上次体检
  739. getBodyRecoredLast: function() {
  740. var vm = this,
  741. loading = layer.load(0, {shade: false}),
  742. params = {
  743. patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c"
  744. }
  745. recoverAPI.getBodyRecoredLast(params).then(function(res) {
  746. layer.close(loading)
  747. if(res.status == 200){
  748. vm.lastXT = res.data.xt ? res.data.xt.recordDate : null;
  749. vm.lastXY = res.data.xy ? res.data.xy.recordDate : null;
  750. // 初始化执行
  751. vm.getHealthIndex();
  752. }else{
  753. showErrorMessage(res.msg)
  754. }
  755. })
  756. },
  757. // 获取体征数据
  758. getHealthIndex: function() {
  759. this.toNormal = 0;
  760. this.toHigh = 0;
  761. this.toLow = 0;
  762. if(this.recordType == 2) {
  763. this.toNormal = 0;
  764. this.toHigh = 0;
  765. this.toLow = 0;
  766. }
  767. var endDate = this.recordType == 1 ? this.lastXT : this.lastXY
  768. if(!endDate) {
  769. showErrorMessage("暂无体征数据");
  770. this.chartData = {
  771. opinion:[],
  772. opinionData:[],
  773. recordType: this.recordType,
  774. opinionData2: [],
  775. }
  776. return false;
  777. }
  778. if(this.recordType == 1) { this.getNormalLevel(); }
  779. var vm = this,
  780. loading = layer.load(0, {shade: false}),
  781. startDate = vm.getDateFromCurrentDate(),
  782. params = {
  783. patient: httpData.patientCode || "e040dd6814b648ceb3ba8d8a04f9f22c",
  784. type: vm.recordType,
  785. begin: startDate,
  786. end: endDate,
  787. gi_type: vm.recordType == 1 ? vm.xtStatu : 0
  788. }
  789. recoverAPI.getHealthIndex(params).then(function(res) {
  790. layer.close(loading)
  791. if(res.status == 200) {
  792. var arr1 = [], arr2 = [], arr3 = []
  793. for(var i = 0, len = res.list.length; i < len; i++) {
  794. vm.judgeDataDif(res.list[i].value1, res.list[i].value2)
  795. arr1.push(res.list[i].date)
  796. var obj = {value: res.list[i].value1, name: res.list[i].date},
  797. obj2 = {value: res.list[i].value2, name: res.list[i].date};
  798. arr2.push(obj)
  799. arr3.push(obj2)
  800. }
  801. vm.chartData = {
  802. opinion: arr1.length ? arr1 : [],
  803. opinionData: arr2.length ? arr2 : [],
  804. recordType: vm.recordType,
  805. opinionData2: vm.recordType == 2 ? arr3 : [],
  806. }
  807. } else {
  808. showErrorMessage(res.msg);
  809. }
  810. })
  811. }
  812. }
  813. })
  814. </script>
  815. </body>
  816. </html>