血透系统pad前端

TodayTab.vue 53KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379
  1. <template>
  2. <div v-loading="loading" id="today_panel">
  3. <div class="grid">
  4. <div class="list">
  5. <ul>
  6. <li @click="menuClick(1)">
  7. <img src="@/assets/record/2.png">
  8. <p>透析处方</p>
  9. </li>
  10. <li @click="menuClick(2)">
  11. <img src="@/assets/record/3.png">
  12. <p>接诊评估</p>
  13. </li>
  14. <li @click="menuClick(3)">
  15. <img src="@/assets/record/4.png">
  16. <p>透前评估</p>
  17. </li>
  18. <li style="position: relative;" @click="menuClick(4)">
  19. <img src="@/assets/record/5.png">
  20. <span class="redpoint" v-if="getUnReadNum()">{{getUnReadNum()}}
  21. </span>
  22. <p>临时医嘱</p>
  23. </li>
  24. <li @click="menuClick(5)">
  25. <img src="@/assets/record/6.png">
  26. <p>双人核对</p>
  27. </li>
  28. </ul>
  29. </div>
  30. <div class="list">
  31. <ul>
  32. <li @click="menuClick(0)">
  33. <img src="@/assets/record/1.png">
  34. <p>透析上机</p>
  35. </li>
  36. <li @click="menuClick(6)">
  37. <img src="@/assets/record/7.png">
  38. <p>透析监测</p>
  39. </li>
  40. <li @click="menuClick(7)">
  41. <img src="@/assets/record/8.png">
  42. <p>透析下机</p>
  43. </li>
  44. <li @click="menuClick(8)">
  45. <img src="@/assets/record/9.png">
  46. <p>透后评估</p>
  47. </li>
  48. <li @click="menuClick(9)">
  49. <img src="@/assets/record/10.png">
  50. <p>治疗小结</p>
  51. </li>
  52. </ul>
  53. </div>
  54. </div>
  55. <div class="blueBorder"></div>
  56. <details-info title="基本信息" :patient="patient"
  57. :device_number="getDeviceNumber()"
  58. :step_data="stepData"></details-info>
  59. <div class="blueBorder"></div>
  60. <dialysis-prescription id="prescription" :prescription="prescription" :solution="solution" title="透析处方"
  61. :device_number_map="device_map"></dialysis-prescription>
  62. <div class="blueBorder"></div>
  63. <accepts-assessment id="accepts_assessment" :record="receiver_treatment_access" title="接诊评估"></accepts-assessment>
  64. <div class="blueBorder"></div>
  65. <assessment-before id="assessment_before" :record="predialysis_evaluation" ref="assessment_before"
  66. title="透前评估"></assessment-before>
  67. <div class="blueBorder"></div>
  68. <stat-order id="stat_order" ref="stat_order" title="临时医嘱" :doctor_map="admin_user_map"
  69. :advice_groups="advice_groups"></stat-order>
  70. <div class="blueBorder"></div>
  71. <dialysis-computer id="dialysis_computer" ref="dialysis_computer" title="透析上机 " :record="dialysis_order"
  72. :admin_map="admin_user_map" :device_number_map="device_number_map"></dialysis-computer>
  73. <div class="blueBorder"></div>
  74. <double-check id="double_check" ref="double_check" title="双人核对 " :record="double_check"></double-check>
  75. <div class="blueBorder"></div>
  76. <dialysis-monitoring id="monitoring" ref="monitoring" title="透析监测"></dialysis-monitoring>
  77. <div class="blueBorder"></div>
  78. <dialysis-off id="dialysis_off" ref="dialysis_off" title="透析下机 " :record="dialysis_order"
  79. :admin_map="admin_user_map"></dialysis-off>
  80. <div class="blueBorder"></div>
  81. <assessment-after id="assessment_after" ref="assessment_after" title="透后评估"
  82. :record="assessment_after_dislysis"></assessment-after>
  83. <div class="blueBorder"></div>
  84. <treatment-of id="treatment_of" ref="treatment_of" title="治疗小结" :record="treatment_summary"></treatment-of>
  85. <!-- <div class="blueBorder"></div>
  86. <operation-staff title="操作人员 "></operation-staff> -->
  87. <!-- 弹框 -->
  88. <!-- <van-popup v-show="false" title="长期处方" :overlay="true" @click-overlay="popupDidHide(0)" :close-on-click-overlay="false">
  89. <long-dialog @longSolution="closeDialog(0)" @closeLongDialog="closeDialog(0)" :patient_prop="patient" :solution_prop="solution" :machines_prop="devices" ref="long_dialog" ></long-dialog>
  90. </van-popup> -->
  91. <van-popup title="透析处方" v-model="menuList[1].showPopup" :overlay="true" :close-on-click-overlay="false">
  92. <prescription-dialog :patient_prop="patient" :solution_prop="solution" :machines_prop="devices" :config="config"
  93. :prescription_prop="prescription" @finish="closePrescriptionDialog" :operators="operators"
  94. :types="goodTypes" :info="goodInfos" :status="status" :targetAdvices="longAdvices"
  95. :waitUploadAdvices="waitUploadAdvices" :is_open="is_open"
  96. @close="closePrescriptionDialog" @prescription="prescriptionFunc"
  97. :admin_users_prop="admin_users" @advice="adviceFunc"
  98. :predialysis="predialysis_evaluation"
  99. :last_predialysis="last_predialysis_evaluation"
  100. :record="assessment_after_dislysis"
  101. :last_record="last_assessment_after_dislysis"
  102. @longSolution="longSolutionFunc" ref="prescription_dialog"></prescription-dialog>
  103. </van-popup>
  104. <van-popup title="接诊评估" v-model="menuList[2].showPopup" :overlay="true" :close-on-click-overlay="false">
  105. <accepts-dialog :accepts="receiver_treatment_access" :patient_prop="patient" @finish="closeAcceptsAssessment"
  106. @close="closeAcceptsAssessment"></accepts-dialog>
  107. </van-popup>
  108. <van-popup title="透前评估" v-model="menuList[3].showPopup" :overlay="true" :close-on-click-overlay="false">
  109. <assessment-dialog :predialysis="predialysis_evaluation" :last_predialysis="last_predialysis_evaluation"
  110. :patient_prop="patient" @evaluation="update_evaluation" @close="closeAssessmentBefore"
  111. ref="assessment_dialog"></assessment-dialog>
  112. </van-popup>
  113. <van-popup title="临时医嘱" v-model="menuList[4].showPopup" :overlay="true" :close-on-click-overlay="false">
  114. <orders-dialog :patient_prop="patient" :advice_groups="advice_groups" :advice_list_prop="doctor_advices"
  115. :admin_users_prop="admin_users" :special_premission="special_premission"
  116. @orderDialog="closeStatOrder" ref="orders_dialog"></orders-dialog>
  117. </van-popup>
  118. <van-popup title="双人查对" v-model="menuList[5].showPopup" :overlay="true" :close-on-click-overlay="false">
  119. <double-dialog :patient_prop="patient" :record="double_check" :admin_users_prop="admin_users"
  120. @did_update="closeDoubleCheck" @close="closeDoubleCheck"></double-dialog>
  121. </van-popup>
  122. <van-popup title="透析上机" v-model="menuList[0].showPopup" :overlay="true" :close-on-click-overlay="false">
  123. <computer-dialog :schedule="schedual" :patient_prop="patient" :record="dialysis_order" :admins="admin_users"
  124. :device_numbers="device_numbers" :admin_map="admin_user_map"
  125. :special_premission="special_premission"
  126. :device_number_map="device_number_map" @did_start="closeDialysisComputer"
  127. @did_add_monitor="didAddMonitor" @close="closeDialysisComputerclose" ref="computer_dialog"></computer-dialog>
  128. </van-popup>
  129. <van-popup title="透析监测" v-model="menuList[6].showPopup" :overlay="true" :close-on-click-overlay="false">
  130. <monit-dialog :monitor_records="monitor_records" :last_monitor_record="last_monitor_record" :patient="patient"
  131. :order="dialysis_order"
  132. @did_add_monitor="didAddMonitor" @did_edit_monitor="didEditMonitor"
  133. @did_delete_monitor="didDelMonitor" @close="closeMonitoring"
  134. ref="monit_dialog"></monit-dialog>
  135. </van-popup>
  136. <van-popup title="透析下机" v-model="menuList[7].showPopup" :overlay="true" :close-on-click-overlay="false">
  137. <plane-dialog :patient_prop="patient" :record="dialysis_order" :last_monitor_record="last_monitor_record" :admins="admin_users" :admin_map="admin_user_map"
  138. :special_premission="special_premission"
  139. @did_off="closeDialysisOff" @close="closeDialysisOffclose" ref="plane_dialog"></plane-dialog>
  140. </van-popup>
  141. <van-popup title="透后评估" v-model="menuList[8].showPopup" :overlay="true" :close-on-click-overlay="false">
  142. <thoroug-dialog :patient_prop="patient" :record="assessment_after_dislysis"
  143. :last_record="last_assessment_after_dislysis" @did_update="closeAssessmentAfter"
  144. @close="closeAssessmentAfter" ref="thoroug_dialog"></thoroug-dialog>
  145. </van-popup>
  146. <van-popup title="治疗小结" v-model="menuList[9].showPopup" :overlay="true" :close-on-click-overlay="false">
  147. <treatment-dialog :patient_prop="patient" :record="treatment_summary" @did_update="closeTreatmentOf"
  148. @close="closeTreatmentOf" ref="treatment_dialog"></treatment-dialog>
  149. </van-popup>
  150. <!-- <div class="fixedNav" ref="fixed_nav" v-show="show_fixed_nav">
  151. <ul>
  152. <li @click="menuClick(1)">透析处方</li>
  153. <li @click="menuClick(2)">接诊评估</li>
  154. <li @click="menuClick(3)">透前评估</li>
  155. <li @click="menuClick(4)">临时医嘱</li>
  156. <li @click="menuClick(0)">透析上机</li>
  157. <li @click="menuClick(5)">双人核对</li>
  158. <li @click="menuClick(6)">透析监测</li>
  159. <li @click="menuClick(7)">透析下机</li>
  160. <li @click="menuClick(8)">透后评估</li>
  161. <li @click="menuClick(9)">治疗小结</li>
  162. </ul>
  163. </div> -->
  164. <el-button class="goTop" v-show="goTopShow" @click="goTop" type="primary" icon="el-icon-arrow-up" circle
  165. style="position:fixed;right:50px;bottom:50px;"></el-button>
  166. </div>
  167. </template>
  168. <script>
  169. import DetailsInfo from './detailsInfo'
  170. import DialysisPrescription from './dialysisPrescription'
  171. import PastData from './pastData'
  172. import AcceptsAssessment from './acceptsAssessment'
  173. import AssessmentBefore from './assessmentBefore'
  174. import StatOrder from './statOrder'
  175. import DialysisComputer from './dialysisComputer'
  176. import DoubleCheck from './doubleCheck'
  177. import DialysisMonitoring from './dialysisMonitoring'
  178. import DialysisOff from './dialysisOff'
  179. import AssessmentAfter from './assessmentAfter'
  180. import TreatmentOf from './treatmentOf'
  181. import OperationStaff from './operationStaff'
  182. import LongDialog from '../dialog/LongDialog'
  183. import PrescriptionDialog from '../dialog/PrescriptionDialog'
  184. import AssessmentDialog from '../dialog/AssessmentDialog'
  185. import ThorougDialog from '../dialog/ThorougDialog'
  186. import AcceptsDialog from '../dialog/AcceptsDialog'
  187. import PlaneDialog from '../dialog/PlaneDialog'
  188. import TreatmentDialog from '../dialog/TreatmentDialog'
  189. import DoubleDialog from '../dialog/DoubleDialog'
  190. import OrdersDialog from '../dialog/OrdersDialog'
  191. import MonitDialog from '../dialog/MonitDialog'
  192. import ComputerDialog from '../dialog/ComputerDialog'
  193. import {CreateGroupAdvice, dialysisGlobalConfig, getDialysisRecord} from '@/api/dialysis'
  194. import {GetRemindLongAdvice} from '@/api/advice'
  195. import {parseTime} from '@/utils'
  196. export default {
  197. name: 'TodayTab',
  198. components: {
  199. DetailsInfo,
  200. DialysisPrescription,
  201. PastData,
  202. AcceptsAssessment,
  203. AssessmentBefore,
  204. StatOrder,
  205. DialysisComputer,
  206. DoubleCheck,
  207. DialysisMonitoring,
  208. DialysisOff,
  209. AssessmentAfter,
  210. TreatmentOf,
  211. OperationStaff,
  212. LongDialog,
  213. PrescriptionDialog,
  214. AssessmentDialog,
  215. ThorougDialog,
  216. AcceptsDialog,
  217. PlaneDialog,
  218. TreatmentDialog,
  219. DoubleDialog,
  220. OrdersDialog,
  221. MonitDialog,
  222. ComputerDialog
  223. },
  224. data () {
  225. return {
  226. loading: true,
  227. // show_fixed_nav: false,
  228. patient_id: 0,
  229. date: 0,
  230. menuList: [
  231. {value: '2', label: ' 透析处方', showPopup: false},
  232. {value: '3', label: ' 接诊评估', showPopup: false},
  233. {value: '4', label: ' 透前评估', showPopup: false},
  234. {value: '5', label: ' 临时医嘱', showPopup: false},
  235. {value: '6', label: ' 透析上机', showPopup: false},
  236. {value: '1', label: ' 双人核对', showPopup: false},
  237. {value: '7', label: ' 透析监测', showPopup: false},
  238. {value: '8', label: ' 透析下机', showPopup: false},
  239. {value: '9', label: ' 透后评估', showPopup: false},
  240. {value: '10', label: ' 治疗小结', showPopup: false}
  241. ],
  242. isPullData: 1,
  243. config: {},//库存自动扣减
  244. operators: [], //操作人
  245. patient: {}, // 患者信息
  246. schedual: {}, // 患者排班信息
  247. prescription: {}, // 透析处方
  248. solution: {}, // 透析方案
  249. receiver_treatment_access: {}, // 接诊评估
  250. predialysis_evaluation: {}, // 透前评估
  251. last_predialysis_evaluation: {}, // 上次透前评估
  252. doctor_advices: [], // 临时医嘱
  253. advice_groups: [], // 对 doctor_advices 进行分组后的组列表,元素为 { group_no, start_time, advices:[advice object] }
  254. double_check: {}, // 双人核对
  255. assessment_after_dislysis: {}, // 透后评估
  256. last_assessment_after_dislysis: {}, // 上次透后评估
  257. treatment_summary: {}, // 治疗小结
  258. monitor_records: [], // 透析监测
  259. special_premission: [],
  260. last_monitor_record: {
  261. id: 0,
  262. operate_time: new Date().getTime(),
  263. sodium_concentration: '',
  264. dialysate_temperature: ''
  265. }, // 上一次透析的监测记录
  266. dialysis_order: {}, // 透析记录
  267. admin_users: [], //系统用户列表
  268. devices: [], //设备
  269. device_numbers: [], // 床位号
  270. admin_user_map: {}, // {user_id: admin_user object}
  271. device_map: {}, // {device_id: device}
  272. device_number_map: {}, // {device_number_id: device_number}
  273. scrollTop: '',
  274. goTopShow: false,
  275. goodTypes: [],
  276. goodInfos: [],
  277. longAdvices: [],
  278. waitUploadAdvices: [],
  279. is_open: 0,
  280. targetAdvices: [],
  281. status: '',
  282. }
  283. },
  284. computed: {
  285. stepData: function () {
  286. var steps = [
  287. {title: '透析处方', name: 'prescription', value: 0},
  288. {title: '接诊评估', name: 'accepts_assessment', value: 0},
  289. {title: '透前评估', name: 'assessment_before', value: 0},
  290. {title: '临时医嘱', name: 'stat_order', value: 0},
  291. {title: '双人核对', name: 'double_check', value: 0},
  292. {title: '透析上机', name: 'dialysis_computer', value: 0},
  293. {title: '透析监测', name: 'dialysis_monitoring', value: 0},
  294. {title: '透析下机', name: 'dialysis_off', value: 0},
  295. {title: '透后评估', name: 'assessment_after', value: 0},
  296. {title: '治疗小结', name: 'treatment_of', value: 0}
  297. ]
  298. if (!isNaN(this.prescription.id) && this.prescription.id > 0 && this.prescription.prescription_doctor> 0) {
  299. steps[0].value = 1
  300. }
  301. if (
  302. !isNaN(this.receiver_treatment_access.id) &&
  303. this.receiver_treatment_access.id > 0
  304. ) {
  305. steps[1].value = 1
  306. }
  307. if ( typeof this.predialysis_evaluation.id != 'undefined' && !isNaN(this.predialysis_evaluation.id) && this.predialysis_evaluation.id > 0 && this.predialysis_evaluation.creater > 0) {
  308. steps[2].value = 1
  309. }
  310. if (this.advice_groups.length > 0) {
  311. steps[3].value = 1
  312. }
  313. if (!isNaN(this.dialysis_order.id) && this.dialysis_order.id > 0) {
  314. steps[5].value = 1
  315. if (this.dialysis_order.stage == 2) {
  316. steps[7].value = 1
  317. }
  318. }
  319. if (
  320. !isNaN(this.double_check.creater) &&
  321. this.double_check.creater > 0 &&
  322. !isNaN(this.double_check.modifier) &&
  323. this.double_check.modifier > 0
  324. ) {
  325. steps[4].value = 1
  326. }
  327. if (this.monitor_records.length > 0) {
  328. steps[6].value = 1
  329. }
  330. if (
  331. !isNaN(this.assessment_after_dislysis.id) &&
  332. this.assessment_after_dislysis.id > 0
  333. ) {
  334. steps[8].value = 1
  335. }
  336. if (!isNaN(this.treatment_summary.id) && this.treatment_summary.id > 0) {
  337. steps[9].value = 1
  338. }
  339. return steps
  340. }
  341. },
  342. created () {
  343. var patient_id = this.$route.query.patient_id
  344. var date = this.$route.query.date
  345. this.patient_id = patient_id
  346. this.date = date
  347. this.requestDialysisRecord()
  348. this.requestLongAdvice()
  349. },
  350. mounted () {
  351. window.addEventListener('scroll', this.handleScroll)
  352. },
  353. watch: {
  354. doctor_advices: function () {
  355. this.$refs.stat_order.setAdvices(this.doctor_advices)
  356. },
  357. monitor_records: function () {
  358. this.$refs.monitoring.setRecords(this.monitor_records)
  359. },
  360. $route: 'requestDialysisRecord'
  361. },
  362. methods: {
  363. // handleScroll: function() {
  364. // var scrollTop =
  365. // window.pageYOffset ||
  366. // document.documentElement.scrollTop ||
  367. // document.body.scrollTop;
  368. // this.show_fixed_nav = scrollTop > 160;
  369. // },
  370. didAddMonitor (monitor) {
  371. this.monitor_records.push(monitor)
  372. this.monitor_records.sort((a, b) => b.operate_time - a.operate_time)
  373. // for (let index = 0; index < this.monitor_records.length; index++) {
  374. // const record = this.monitor_records[index];
  375. // if (record.operate_time <= monitor.operate_time) {
  376. // this.monitor_records.splice(index, 0, monitor)
  377. // break
  378. // }
  379. // }
  380. this.monitor_records.reverse()
  381. this.last_monitor_record = monitor
  382. this.$refs.plane_dialog.set_last_monitor_record(monitor)
  383. },
  384. didEditMonitor (monitor) {
  385. var mrl = this.monitor_records.length
  386. var monitor_index = -1
  387. for (let index = 0; index < mrl; index++) {
  388. if (this.monitor_records[index].id == monitor.id) {
  389. monitor_index = index
  390. break
  391. }
  392. }
  393. console.log(monitor)
  394. console.log(this.monitor_records[monitor_index])
  395. this.monitor_records[monitor_index].arterial_pressure =
  396. monitor.arterial_pressure
  397. this.monitor_records[monitor_index].blood_flow_volume =
  398. monitor.blood_flow_volume
  399. this.monitor_records[monitor_index].breathing_rate =
  400. monitor.breathing_rate
  401. this.monitor_records[monitor_index].dialysate_temperature =
  402. monitor.dialysate_temperature
  403. this.monitor_records[monitor_index].temperature =
  404. monitor.temperature
  405. this.monitor_records[monitor_index].diastolic_bp = monitor.diastolic_bp
  406. this.monitor_records[monitor_index].displacement_quantity =
  407. monitor.displacement_quantity
  408. this.monitor_records[monitor_index].dispose = monitor.dispose
  409. this.monitor_records[monitor_index].ktv = monitor.ktv
  410. this.monitor_records[monitor_index].monitor_date = monitor.monitor_date
  411. this.monitor_records[monitor_index].monitoring_nurse =
  412. monitor.monitoring_nurse
  413. this.monitor_records[monitor_index].operate_time = monitor.operate_time
  414. this.monitor_records[monitor_index].pulse_frequency =
  415. monitor.pulse_frequency
  416. this.monitor_records[monitor_index].replacement_rate =
  417. monitor.replacement_rate
  418. this.monitor_records[monitor_index].result = monitor.result
  419. this.monitor_records[monitor_index].sodium_concentration =
  420. monitor.sodium_concentration
  421. this.monitor_records[monitor_index].symptom = monitor.symptom
  422. this.monitor_records[monitor_index].systolic_bp = monitor.systolic_bp
  423. this.monitor_records[monitor_index].transmembrane_pressure =
  424. monitor.transmembrane_pressure
  425. this.monitor_records[monitor_index].ultrafiltration_rate =
  426. monitor.ultrafiltration_rate
  427. this.monitor_records[monitor_index].ultrafiltration_volume =
  428. monitor.ultrafiltration_volume
  429. this.monitor_records[monitor_index].venous_pressure =
  430. monitor.venous_pressure
  431. this.monitor_records[monitor_index].diastolic_blood_pressure =
  432. monitor.diastolic_blood_pressure
  433. this.monitor_records[monitor_index].systolic_blood_pressure =
  434. monitor.systolic_blood_pressure
  435. this.monitor_records[monitor_index].conductivity =
  436. monitor.conductivity
  437. this.monitor_records[monitor_index].displacement_flow_quantity =
  438. monitor.displacement_flow_quantity
  439. this.monitor_records.sort((a, b) => a.operate_time - b.operate_time)
  440. // if (monitor_index >= 0) {
  441. // var record = this.monitor_records[monitor_index]
  442. //
  443. // this.monitor_records.splice(monitor_index, 1)
  444. // if(this.monitor_records.length == 0){
  445. // this.monitor_records.splice(0, 0, monitor)
  446. // }else {
  447. //
  448. // for (let index = 0; index < this.monitor_records.length; index++) {
  449. // const temp = this.monitor_records[index];
  450. // if (temp.operate_time <= monitor.operate_time) {
  451. // this.monitor_records.splice(index, 0, monitor)
  452. // break
  453. // }
  454. // }
  455. // }
  456. // }
  457. },
  458. didDelMonitor (record_id) {
  459. var mrl = this.monitor_records.length
  460. for (let index = 0; index < mrl; index++) {
  461. if (this.monitor_records[index].id == record_id) {
  462. this.monitor_records.splice(index, 1)
  463. break
  464. }
  465. }
  466. },
  467. menuClick: function (popupIndex) {
  468. this.index = popupIndex
  469. if (popupIndex >= 0) {
  470. this.menuList[popupIndex].showPopup = true
  471. }
  472. if (
  473. popupIndex == 1 &&
  474. typeof this.$refs.prescription_dialog != 'undefined'
  475. ) {
  476. this.$refs.prescription_dialog.open()
  477. } else if (
  478. popupIndex == 3 &&
  479. typeof this.$refs.assessment_dialog != 'undefined'
  480. ) {
  481. this.$refs.assessment_dialog.open()
  482. } else if (
  483. popupIndex == 4 &&
  484. typeof this.$refs.orders_dialog != 'undefined'
  485. ) {
  486. // this.$refs.orders_dialog.open();
  487. } else if (
  488. popupIndex == 0 &&
  489. typeof this.$refs.computer_dialog != 'undefined'
  490. ) {
  491. this.$refs.computer_dialog.open()
  492. } else if (
  493. popupIndex == 6 &&
  494. typeof this.$refs.monit_dialog != 'undefined'
  495. ) {
  496. this.$refs.monit_dialog.open()
  497. } else if (
  498. popupIndex == 7 &&
  499. typeof this.$refs.plane_dialog != 'undefined'
  500. ) {
  501. this.$refs.plane_dialog.open()
  502. } else if (
  503. popupIndex == 8 &&
  504. typeof this.$refs.thoroug_dialog != 'undefined'
  505. ) {
  506. this.$refs.thoroug_dialog.open()
  507. } else if (
  508. popupIndex == 9 &&
  509. typeof this.$refs.treatment_dialog != 'undefined'
  510. ) {
  511. this.$refs.treatment_dialog.open()
  512. }
  513. },
  514. popupDidHide: function (popupIndex) {
  515. this.index = -1
  516. },
  517. closeDialog (index) {
  518. this.index = -1
  519. this.menuList[index].showPopup = false
  520. },
  521. refresh () {
  522. var dateStr = parseTime(this.$route.query.date, '{y}-{m}-{d}')
  523. var params = {
  524. patient_id: this.$route.query.patient_id,
  525. date: dateStr
  526. }
  527. getDialysisRecord(params).then(rs => {
  528. var resp = rs.data
  529. console.log(resp)
  530. if (resp.state == 1) {
  531. var patient = resp.data.patient // 患者信息
  532. var schedual = resp.data.schedual // 患者排班信息
  533. var prescription = resp.data.prescription // 透析处方
  534. var solution = resp.data.solution // 透析方案
  535. var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
  536. var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
  537. var doctor_advices = resp.data.doctor_advices // 临时医嘱
  538. for (let i = 0; i < doctor_advices.length; i++) {
  539. doctor_advices[i]['is_selected'] = 0
  540. }
  541. console.log(doctor_advices)
  542. var double_check = resp.data.double_check // 双人核对
  543. var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
  544. var treatment_summary = resp.data.treatment_summary // 治疗小结
  545. var monitor_records = resp.data.monitor_records // 透析监测
  546. var dialysis_order = resp.data.dialysis_order // 透析记录
  547. var operators = resp.data.operators // 操作人
  548. var last_predialysis_evaluation =
  549. resp.data.last_predialysis_evaluation // 上一次透前评估
  550. var last_assessment_after_dislysis =
  551. resp.data.last_assessment_after_dislysis // 上一次透前评估
  552. var last_monitor_record = resp.data.last_monitor_record
  553. this.patient = patient
  554. this.schedual = schedual == null ? {} : schedual
  555. this.prescription = prescription == null ? {id: ''} : prescription
  556. this.solution = solution == null ? {id: ''} : solution
  557. this.receiver_treatment_access =
  558. receiver_treatment_access == null
  559. ? {id: ''}
  560. : receiver_treatment_access
  561. this.predialysis_evaluation =
  562. predialysis_evaluation == null ? {} : predialysis_evaluation
  563. this.last_predialysis_evaluation =
  564. last_predialysis_evaluation == null
  565. ? {}
  566. : last_predialysis_evaluation
  567. this.doctor_advices = doctor_advices == null ? [] : doctor_advices
  568. if (this.doctor_advices.length > 0) {
  569. var group = this.newAdviceGroupObject()
  570. var initGroupBlock = function (group, advice) {
  571. group.group_no = advice.groupno
  572. // group.start_time = advice.start_time
  573. // group.advice_doctor = advice.advice_doctor
  574. // group.exec_staff = advice.execution_staff
  575. // group.exec_time = advice.execution_time
  576. // group.checker = advice.checker
  577. }
  578. for (let index = 0; index < this.doctor_advices.length; index++) {
  579. const advice = this.doctor_advices[index]
  580. if (advice.groupno == 0) {
  581. // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
  582. if (advice.parent_id > 0) {
  583. if (this.advice_groups.length > 0) {
  584. var parent_group = this.advice_groups[
  585. this.advice_groups.length - 1
  586. ]
  587. if (parent_group.advices.length > 0) {
  588. if (parent_group.advices[0].id == advice.parent_id) {
  589. parent_group.advices.push(advice)
  590. }
  591. }
  592. }
  593. continue
  594. } else {
  595. if (group.group_no > 0) {
  596. this.advice_groups.push(group)
  597. group = this.newAdviceGroupObject()
  598. }
  599. initGroupBlock(group, advice)
  600. group.advices.push(advice)
  601. this.advice_groups.push(group)
  602. group = this.newAdviceGroupObject()
  603. continue
  604. }
  605. }
  606. if (group.group_no > 0 && group.group_no != advice.groupno) {
  607. this.advice_groups.push(group)
  608. group = this.newAdviceGroupObject()
  609. }
  610. if (group.group_no == 0) {
  611. initGroupBlock(group, advice)
  612. }
  613. if (group.group_no == advice.groupno) {
  614. group.advices.push(advice)
  615. }
  616. }
  617. if (group.group_no > 0) {
  618. // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
  619. this.advice_groups.push(group)
  620. }
  621. // console.log(this.advice_groups)
  622. }
  623. this.double_check = double_check == null ? {id: ''} : double_check
  624. this.assessment_after_dislysis = assessment_after_dislysis == null ? {id: ''} : assessment_after_dislysis
  625. this.last_assessment_after_dislysis =
  626. last_assessment_after_dislysis == null
  627. ? {id: ''}
  628. : last_assessment_after_dislysis
  629. this.treatment_summary =
  630. treatment_summary == null ? {id: ''} : treatment_summary
  631. this.monitor_records = monitor_records == null ? [] : monitor_records
  632. this.last_monitor_record =
  633. last_monitor_record == null
  634. ? this.last_monitor_record
  635. : last_monitor_record
  636. this.dialysis_order =
  637. dialysis_order == null ? {id: ''} : dialysis_order
  638. this.operators = operators
  639. this.$refs.stat_order.setAdvices(this.doctor_advices)
  640. this.$refs.monitoring.setRecords(this.monitor_records)
  641. this.title = patient.name
  642. dialysisGlobalConfig().then(rs => {
  643. var res = rs.data
  644. if (res.state == 1) {
  645. // console.log(res)
  646. // this.$refs.detail_menu.setGlobalConfig(res.data)
  647. this.admin_users = res.data.admin_users
  648. this.devices = res.data.devices
  649. this.device_numbers = res.data.device_numbers
  650. var device_map = {}
  651. for (let index = 0; index < this.devices.length; index++) {
  652. const device = this.devices[index]
  653. device_map[device.id] = device
  654. }
  655. this.device_map = device_map
  656. var admin_map = {}
  657. for (let index = 0; index < this.admin_users.length; index++) {
  658. const admin = this.admin_users[index]
  659. admin_map[admin.id] = admin
  660. }
  661. this.admin_user_map = admin_map
  662. var device_number_map = {}
  663. for (let index = 0; index < this.device_numbers.length; index++) {
  664. const device_number = this.device_numbers[index]
  665. device_number_map[device_number.id] = device_number
  666. }
  667. this.device_number_map = device_number_map
  668. }
  669. this.loading = false
  670. })
  671. } else {
  672. this.$toast({
  673. message: resp.msg
  674. })
  675. this.loading = false
  676. }
  677. })
  678. },
  679. requestDialysisRecord () {
  680. var dateStr = parseTime(this.date, '{y}-{m}-{d}')
  681. var params = {
  682. patient_id: this.patient_id,
  683. date: dateStr
  684. }
  685. this.advice_groups = []
  686. getDialysisRecord(params).then(rs => {
  687. var resp = rs.data
  688. console.log(resp)
  689. if (resp.state == 1) {
  690. var patient = resp.data.patient // 患者信息
  691. var schedual = resp.data.schedual // 患者排班信息
  692. var prescription = resp.data.prescription // 透析处方
  693. var solution = resp.data.solution // 透析方案
  694. var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
  695. var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
  696. var doctor_advices = resp.data.doctor_advices // 临时医嘱
  697. if(prescription == null || prescription.creater == 0){
  698. this.isPullData = 1
  699. }else{
  700. this.isPullData = 2
  701. }
  702. this.goodInfos = resp.data.goodInfos
  703. for (let i = 0; i < doctor_advices.length; i++) {
  704. doctor_advices[i]['is_selected'] = 0
  705. }
  706. console.log(doctor_advices)
  707. var double_check = resp.data.double_check // 双人核对
  708. var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
  709. var treatment_summary = resp.data.treatment_summary // 治疗小结
  710. var monitor_records = resp.data.monitor_records // 透析监测
  711. var dialysis_order = resp.data.dialysis_order // 透析记录
  712. var operators = resp.data.operators // 操作人
  713. var special_premission = resp.data.special_premission // 特殊权限
  714. var config = resp.data.config // 库存自动扣减配置
  715. var types = resp.data.types // 所有系统库存商品类型
  716. var last_predialysis_evaluation =
  717. resp.data.last_predialysis_evaluation // 上一次透前评估
  718. var last_assessment_after_dislysis =
  719. resp.data.last_assessment_after_dislysis // 上一次透前评估
  720. var last_monitor_record = resp.data.last_monitor_record
  721. this.patient = patient
  722. this.schedual = schedual == null ? {} : schedual
  723. this.prescription = prescription == null ? {id: ''} : prescription
  724. this.solution = solution == null ? {id: ''} : solution
  725. this.receiver_treatment_access =
  726. receiver_treatment_access == null
  727. ? {id: ''}
  728. : receiver_treatment_access
  729. this.predialysis_evaluation =
  730. predialysis_evaluation == null ? {} : predialysis_evaluation
  731. this.last_predialysis_evaluation =
  732. last_predialysis_evaluation == null
  733. ? {}
  734. : last_predialysis_evaluation
  735. this.doctor_advices = doctor_advices == null ? [] : doctor_advices
  736. this.special_premission = special_premission
  737. this.config = config
  738. this.goodTypes = types
  739. if (this.doctor_advices.length > 0) {
  740. var group = this.newAdviceGroupObject()
  741. var initGroupBlock = function (group, advice) {
  742. group.group_no = advice.groupno
  743. // group.start_time = advice.start_time
  744. // group.advice_doctor = advice.advice_doctor
  745. // group.exec_staff = advice.execution_staff
  746. // group.exec_time = advice.execution_time
  747. // group.checker = advice.checker
  748. }
  749. for (let index = 0; index < this.doctor_advices.length; index++) {
  750. const advice = this.doctor_advices[index]
  751. if (advice.groupno == 0) {
  752. // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
  753. if (advice.parent_id > 0) {
  754. if (this.advice_groups.length > 0) {
  755. var parent_group = this.advice_groups[
  756. this.advice_groups.length - 1
  757. ]
  758. if (parent_group.advices.length > 0) {
  759. if (parent_group.advices[0].id == advice.parent_id) {
  760. parent_group.advices.push(advice)
  761. }
  762. }
  763. }
  764. continue
  765. } else {
  766. if (group.group_no > 0) {
  767. this.advice_groups.push(group)
  768. group = this.newAdviceGroupObject()
  769. }
  770. initGroupBlock(group, advice)
  771. group.advices.push(advice)
  772. this.advice_groups.push(group)
  773. group = this.newAdviceGroupObject()
  774. continue
  775. }
  776. }
  777. if (group.group_no > 0 && group.group_no != advice.groupno) {
  778. this.advice_groups.push(group)
  779. group = this.newAdviceGroupObject()
  780. }
  781. if (group.group_no == 0) {
  782. initGroupBlock(group, advice)
  783. }
  784. if (group.group_no == advice.groupno) {
  785. group.advices.push(advice)
  786. }
  787. }
  788. if (group.group_no > 0) {
  789. // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
  790. this.advice_groups.push(group)
  791. }
  792. // console.log(this.advice_groups)
  793. }
  794. this.double_check = double_check == null ? {id: ''} : double_check
  795. this.assessment_after_dislysis =
  796. assessment_after_dislysis == null
  797. ? {id: ''}
  798. : assessment_after_dislysis
  799. this.last_assessment_after_dislysis =
  800. last_assessment_after_dislysis == null
  801. ? {id: ''}
  802. : last_assessment_after_dislysis
  803. this.treatment_summary =
  804. treatment_summary == null ? {id: ''} : treatment_summary
  805. this.monitor_records = monitor_records == null ? [] : monitor_records
  806. this.last_monitor_record =
  807. last_monitor_record == null
  808. ? this.last_monitor_record
  809. : last_monitor_record
  810. this.dialysis_order =
  811. dialysis_order == null ? {id: ''} : dialysis_order
  812. this.operators = operators
  813. this.$refs.stat_order.setAdvices(this.doctor_advices)
  814. this.$refs.monitoring.setRecords(this.monitor_records)
  815. this.title = patient.name
  816. dialysisGlobalConfig().then(rs => {
  817. var res = rs.data
  818. if (res.state == 1) {
  819. // console.log(res)
  820. // this.$refs.detail_menu.setGlobalConfig(res.data)
  821. this.admin_users = res.data.admin_users
  822. this.devices = res.data.devices
  823. this.device_numbers = res.data.device_numbers
  824. var device_map = {}
  825. for (let index = 0; index < this.devices.length; index++) {
  826. const device = this.devices[index]
  827. device_map[device.id] = device
  828. }
  829. this.device_map = device_map
  830. var admin_map = {}
  831. for (let index = 0; index < this.admin_users.length; index++) {
  832. const admin = this.admin_users[index]
  833. admin_map[admin.id] = admin
  834. }
  835. this.admin_user_map = admin_map
  836. var device_number_map = {}
  837. for (let index = 0; index < this.device_numbers.length; index++) {
  838. const device_number = this.device_numbers[index]
  839. device_number_map[device_number.id] = device_number
  840. }
  841. this.device_number_map = device_number_map
  842. }
  843. this.loading = false
  844. })
  845. } else {
  846. this.$toast({
  847. message: resp.msg
  848. })
  849. this.loading = false
  850. }
  851. })
  852. },
  853. requestLongAdvice () {
  854. var dateStr = parseTime(this.date, '{y}-{m}-{d}')
  855. var params = {
  856. id: this.patient_id,
  857. }
  858. GetRemindLongAdvice(params).then(rs => {
  859. var resp = rs.data
  860. if (resp.state == 1) {
  861. var status = parseInt(resp.data.status)
  862. this.status = status
  863. switch (status) {
  864. case 2:
  865. var totalAdvice = resp.data.advices
  866. var longAdvicesTwo = resp.data.advices_two
  867. var waitUploadAdvices = []
  868. for (let i = 0; i < totalAdvice.length; i++) {
  869. totalAdvice[i]['isCheck'] = 1
  870. }
  871. for (let i = 0; i < totalAdvice.length; i++) {
  872. for (let a = 0; a < longAdvicesTwo.length; a++) {
  873. if (totalAdvice[i].template_id == longAdvicesTwo[a].template_id) {
  874. totalAdvice[i]['isCheck'] = 0
  875. }
  876. }
  877. }
  878. for (let i = 0; i < totalAdvice.length; i++) {
  879. if( totalAdvice[i].isCheck == 1){
  880. waitUploadAdvices.push(totalAdvice[i])
  881. }
  882. }
  883. this.is_open = resp.data.is_open_remind
  884. this.longAdvices = totalAdvice
  885. this.waitUploadAdvices = waitUploadAdvices
  886. console.log(this.longAdvices)
  887. console.log(this.waitUploadAdvices)
  888. break
  889. }
  890. } else {
  891. }
  892. })
  893. }, getNowFormatDate () {
  894. var date = new Date()
  895. var seperator1 = '-'
  896. var year = date.getFullYear()
  897. var month = date.getMonth() + 1
  898. var strDate = date.getDate()
  899. if (month >= 1 && month <= 9) {
  900. month = '0' + month
  901. }
  902. if (strDate >= 0 && strDate <= 9) {
  903. strDate = '0' + strDate
  904. }
  905. var currentdate = year + seperator1 + month + seperator1 + strDate
  906. return currentdate
  907. },
  908. newAdviceGroupObject: function () {
  909. return Object.assign(
  910. {},
  911. {
  912. group_no: 0,
  913. // advice_doctor: 0,
  914. // start_time: 0,
  915. advices: []
  916. // exec_staff: 0,
  917. // exec_time: 0,
  918. // checker: 0,
  919. }
  920. )
  921. }
  922. , adviceFunc: function () {
  923. },
  924. prescriptionFunc: function (val,advices) {
  925. this.prescription = val
  926. this.requestDialysisRecord()
  927. // if (advices.length > 0){
  928. //
  929. // // if (advices.length > 0) {
  930. // // var group = this.newAdviceGroupObject()
  931. // // var initGroupBlock = function (group, advice) {
  932. // // group.group_no = advice.groupno
  933. // // // group.start_time = advice.start_time
  934. // // // group.advice_doctor = advice.advice_doctor
  935. // // // group.exec_staff = advice.execution_staff
  936. // // // group.exec_time = advice.execution_time
  937. // // // group.checker = advice.checker
  938. // // }
  939. // // for (let index = 0; index < advices.length; index++) {
  940. // // const advice = advices[index]
  941. // // if (advice.groupno == 0) {
  942. // // // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
  943. // // if (advice.parent_id > 0) {
  944. // // if (this.advice_groups.length > 0) {
  945. // // var parent_group = this.advice_groups[
  946. // // this.advice_groups.length - 1
  947. // // ]
  948. // // if (parent_group.advices.length > 0) {
  949. // // if (parent_group.advices[0].id == advice.parent_id) {
  950. // // parent_group.advices.push(advice)
  951. // // }
  952. // // }
  953. // // }
  954. // // continue
  955. // // } else {
  956. // // if (group.group_no > 0) {
  957. // // this.advice_groups.push(group)
  958. // // group = this.newAdviceGroupObject()
  959. // // }
  960. // //
  961. // // initGroupBlock(group, advice)
  962. // // group.advices.push(advice)
  963. // // this.advice_groups.push(group)
  964. // // group = this.newAdviceGroupObject()
  965. // // continue
  966. // // }
  967. // // }
  968. // //
  969. // // if (group.group_no > 0 && group.group_no != advice.groupno) {
  970. // // this.advice_groups.push(group)
  971. // // group = this.newAdviceGroupObject()
  972. // // }
  973. // // if (group.group_no == 0) {
  974. // // initGroupBlock(group, advice)
  975. // // }
  976. // // if (group.group_no == advice.groupno) {
  977. // // group.advices.push(advice)
  978. // // }
  979. // // }
  980. // // if (group.group_no > 0) {
  981. // // // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
  982. // // this.advice_groups.push(group)
  983. // // }
  984. // //
  985. // // }
  986. //
  987. //
  988. // }
  989. }
  990. ,
  991. longSolutionFunc: function (val) {
  992. this.solution = val
  993. this.requestDialysisRecord()
  994. // if (advices.length > 0){
  995. //
  996. // if (advices.length > 0) {
  997. // var group = this.newAdviceGroupObject()
  998. // var initGroupBlock = function (group, advice) {
  999. // group.group_no = advice.groupno
  1000. // // group.start_time = advice.start_time
  1001. // // group.advice_doctor = advice.advice_doctor
  1002. // // group.exec_staff = advice.execution_staff
  1003. // // group.exec_time = advice.execution_time
  1004. // // group.checker = advice.checker
  1005. // }
  1006. // for (let index = 0; index < advices.length; index++) {
  1007. // const advice = advices[index]
  1008. // if (advice.groupno == 0) {
  1009. // // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
  1010. // if (advice.parent_id > 0) {
  1011. // if (this.advice_groups.length > 0) {
  1012. // var parent_group = this.advice_groups[
  1013. // this.advice_groups.length - 1
  1014. // ]
  1015. // if (parent_group.advices.length > 0) {
  1016. // if (parent_group.advices[0].id == advice.parent_id) {
  1017. // parent_group.advices.push(advice)
  1018. // }
  1019. // }
  1020. // }
  1021. // continue
  1022. // } else {
  1023. // if (group.group_no > 0) {
  1024. // this.advice_groups.push(group)
  1025. // group = this.newAdviceGroupObject()
  1026. // }
  1027. //
  1028. // initGroupBlock(group, advice)
  1029. // group.advices.push(advice)
  1030. // this.advice_groups.push(group)
  1031. // group = this.newAdviceGroupObject()
  1032. // continue
  1033. // }
  1034. // }
  1035. //
  1036. // if (group.group_no > 0 && group.group_no != advice.groupno) {
  1037. // this.advice_groups.push(group)
  1038. // group = this.newAdviceGroupObject()
  1039. // }
  1040. // if (group.group_no == 0) {
  1041. // initGroupBlock(group, advice)
  1042. // }
  1043. // if (group.group_no == advice.groupno) {
  1044. // group.advices.push(advice)
  1045. // }
  1046. // }
  1047. // if (group.group_no > 0) {
  1048. // // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
  1049. // this.advice_groups.push(group)
  1050. // }
  1051. //
  1052. // }
  1053. //
  1054. //
  1055. // }
  1056. }
  1057. ,
  1058. closePrescriptionDialog: function () {
  1059. this.closeDialog(1)
  1060. // this.scrollToView('prescription')
  1061. }
  1062. ,
  1063. closeAcceptsAssessment: function () {
  1064. this.closeDialog(2)
  1065. // this.scrollToView('accepts_assessment')
  1066. }
  1067. ,
  1068. closeAssessmentBefore: function () {
  1069. this.closeDialog(3)
  1070. // this.scrollToView('assessment_before')
  1071. }
  1072. ,
  1073. update_evaluation: function (evaluation) {
  1074. this.predialysis_evaluation = evaluation
  1075. this.closeAssessmentBefore()
  1076. }
  1077. ,
  1078. closeStatOrder: function () {
  1079. this.closeDialog(4)
  1080. // this.scrollToView('stat_order')
  1081. }
  1082. ,
  1083. closeDialysisComputer: function (dialysis_order) {
  1084. this.closeDialog(0)
  1085. this.dialysis_order = dialysis_order
  1086. // this.scrollToView('dialysis_computer')
  1087. },
  1088. closeDialysisComputerclose: function (dialysis_order) {
  1089. this.closeDialog(0)
  1090. // this.dialysis_order = dialysis_order
  1091. // this.scrollToView('dialysis_computer')
  1092. }
  1093. ,
  1094. closeDoubleCheck: function () {
  1095. this.closeDialog(5)
  1096. // this.scrollToView('double_check')
  1097. }
  1098. ,
  1099. closeMonitoring: function () {
  1100. this.closeDialog(6)
  1101. // this.scrollToView('monitoring')
  1102. }
  1103. ,
  1104. closeDialysisOff: function (assessment_after_dislysis) {debugger
  1105. this.closeDialog(7)
  1106. if (assessment_after_dislysis != undefined) {
  1107. this.assessment_after_dislysis = assessment_after_dislysis
  1108. }
  1109. },
  1110. closeDialysisOffclose: function () {
  1111. this.closeDialog(7)
  1112. // this.scrollToView('dialysis_off')
  1113. }
  1114. ,
  1115. closeAssessmentAfter: function (assessment_after_dislysis) {
  1116. this.closeDialog(8)
  1117. // this.scrollToView('assessment_after')
  1118. if (assessment_after_dislysis != undefined) {
  1119. this.assessment_after_dislysis = assessment_after_dislysis
  1120. }
  1121. }
  1122. ,
  1123. closeTreatmentOf: function () {
  1124. this.closeDialog(9)
  1125. // this.scrollToView('treatment_of')
  1126. }
  1127. ,
  1128. scrollToView: function (id) {
  1129. document.body.scrollTop =
  1130. document.querySelector('#' + id).offsetTop - 100
  1131. document.documentElement.scrollTop =
  1132. document.querySelector('#' + id).offsetTop - 100
  1133. }
  1134. ,
  1135. handleScroll () {
  1136. this.scrollTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop
  1137. if (this.scrollTop > 50) {
  1138. this.goTopShow = true
  1139. } else {
  1140. this.goTopShow = false
  1141. }
  1142. }
  1143. ,
  1144. goTop () {
  1145. let timer = null,
  1146. _that = this
  1147. cancelAnimationFrame(timer)
  1148. timer = requestAnimationFrame(function fn () {
  1149. if (_that.scrollTop > 0) {
  1150. _that.scrollTop -= 50
  1151. document.body.scrollTop = document.documentElement.scrollTop =
  1152. _that.scrollTop
  1153. timer = requestAnimationFrame(fn)
  1154. } else {
  1155. cancelAnimationFrame(timer)
  1156. _that.goTopShow = false
  1157. }
  1158. })
  1159. }
  1160. ,
  1161. destroyed () {
  1162. window.removeEventListener('scroll', this.handleScroll)
  1163. }
  1164. ,
  1165. getUnReadNum () {
  1166. let doctorAdvice = []
  1167. for (let y = 0; y < this.doctor_advices.length; y++) {
  1168. if (this.doctor_advices[y].execution_state == 2) {
  1169. doctorAdvice.push(this.doctor_advices[y])
  1170. }
  1171. }
  1172. const sorted = this.groupBy(doctorAdvice, function (item) {
  1173. return [item.groupno]
  1174. })
  1175. return sorted.length
  1176. }
  1177. ,
  1178. groupBy (array, f) {
  1179. const groups = {}
  1180. array.forEach(function (o) {
  1181. const group = JSON.stringify(f(o))
  1182. groups[group] = groups[group] || []
  1183. groups[group].push(o)
  1184. })
  1185. return Object.keys(groups).map(function (group) {
  1186. return groups[group]
  1187. })
  1188. }
  1189. ,
  1190. getDeviceNumber () {
  1191. if (this.dialysis_order.id && this.dialysis_order.DeviceNumber && this.dialysis_order.DeviceNumber.number.length > 0) {
  1192. return this.dialysis_order.DeviceNumber.number
  1193. } else {
  1194. if (this.schedual.device_number == null) {
  1195. return ''
  1196. } else {
  1197. return this.schedual.device_number.number
  1198. }
  1199. }
  1200. }
  1201. ,
  1202. dateDiff (firstDate, secondDate) {
  1203. var firstDate = new Date(firstDate)
  1204. var secondDate = new Date(secondDate)
  1205. var diff = Math.abs(firstDate.getTime() - secondDate.getTime())
  1206. var result = parseInt(diff / (1000 * 60 * 60 * 24))
  1207. return result
  1208. }
  1209. }
  1210. }
  1211. </script>
  1212. <style style="stylesheet/scss" lang="scss" scoped>
  1213. .today_panel {
  1214. height: calc(100% - 63px);
  1215. }
  1216. .mainContent {
  1217. position: relative;
  1218. .grid {
  1219. padding: 0.1rem 0 0.25rem 0;
  1220. margin: 0.2rem 0 0 0;
  1221. background: #fff;
  1222. .list {
  1223. ul {
  1224. @include display-flex;
  1225. @include align-items-center;
  1226. @include text-align;
  1227. @include justify-content-around;
  1228. li {
  1229. font-size: 0.24rem;
  1230. color: #5d6b7a;
  1231. margin-top: 0.35rem;
  1232. p {
  1233. line-height: 0.6rem;
  1234. color: #34495e;
  1235. font-size: 0.3rem;
  1236. }
  1237. img {
  1238. width: 1rem;
  1239. height: 1rem;
  1240. }
  1241. }
  1242. }
  1243. }
  1244. }
  1245. }
  1246. .el-button.is-circle{
  1247. padding: 18px!important;
  1248. .el-icon-arrow-up{
  1249. font-size: 20px!important;
  1250. }
  1251. }
  1252. .redpoint{
  1253. display:inline-block;
  1254. height:20px;
  1255. width:20px;
  1256. line-height:18px;
  1257. text-align:center;
  1258. font-size:0.8em;
  1259. border-radius:20px;
  1260. color:#fff;
  1261. background:#F56C6C;
  1262. position: absolute;
  1263. border: 1px solid #fff;
  1264. top: -8px;
  1265. right: -8px;
  1266. }
  1267. </style>