血透系统pad前端

TodayTab.vue 53KB

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