index.vue 54KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <div class="print" style="float:left;">
  6. <el-button
  7. size="small"
  8. type="primary"
  9. @click="printOrder"
  10. icon="el-icon-printer"
  11. >打印</el-button
  12. >
  13. </div>
  14. </div>
  15. <div
  16. class="loadingBox"
  17. v-loading="loading"
  18. element-loading-text="拼命加载中"
  19. element-loading-spinner="el-icon-loading"
  20. element-loading-background="rgba(0, 0, 0, 0.8)"
  21. >
  22. <div class="patientBox" style="width:25%;padding-left:10px;">
  23. <el-tabs v-model="activeName" @tab-click="handleClick">
  24. <el-tab-pane label="候诊区" name="first">
  25. <div class="cell clearfix" style="margin-bottom:10px;">
  26. <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 130px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
  27. <el-input size="small" style="width:80px;" v-model.trim="search_input" class="filter-item"/>
  28. <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
  29. </div>
  30. <div class="cell clearfix" style="margin-bottom:10px;">
  31. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="width:130px;" @change="handleStateChange">
  32. <el-option
  33. v-for="item in patient_state"
  34. :key="item.value"
  35. :label="item.label"
  36. :value="item.value">
  37. </el-option>
  38. </el-select>
  39. <el-select v-model="treatStateVal" placeholder="全部治疗状态" style="width:130px;" @change="handleTreatChange">
  40. <el-option
  41. v-for="item in treat_state"
  42. :key="item.value"
  43. :label="item.label"
  44. :value="item.value">
  45. </el-option>
  46. </el-select>
  47. </div>
  48. <div class="cell clearfix" style="margin-bottom:10px;">
  49. <el-select v-model="scheduleStateVal" placeholder="班次" style="width:130px;" @change="handletimeType">
  50. <el-option
  51. v-for="item in schedule_options"
  52. :key="item.value"
  53. :label="item.label"
  54. :value="item.value">
  55. </el-option>
  56. </el-select>
  57. <el-select v-model="zoneVal" placeholder="分区" style="width:130px;" @change="handleZoneChange">
  58. <el-option
  59. v-for="item in zone_options"
  60. :key="item.id"
  61. :label="item.text"
  62. :value="item.id">
  63. </el-option>
  64. </el-select>
  65. </div>
  66. <div style="padding-right:20px;">
  67. <el-table
  68. ref="tab"
  69. @row-click="changePatient"
  70. highlight-current-row
  71. :data="tableData"
  72. height="500"
  73. border
  74. style="width: 100%">
  75. <el-table-column
  76. prop="date"
  77. label="患者"
  78. >
  79. <template slot-scope="scope">
  80. {{ scope.row.patient.name }}
  81. </template>
  82. </el-table-column>
  83. <el-table-column
  84. prop="name"
  85. label="状态"
  86. >
  87. <template slot-scope="scope">
  88. <div style="display:flex;align-items:center;justify-content:space-around;">
  89. <span class="tip1" v-if="scope.row.prescription == null || scope.row.prescription.creater == 0">
  90. 待开处方
  91. </span>
  92. <span class="tip2" v-if="scope.row.assessment_before_dislysis == null || scope.row.assessment_before_dislysis.weight_before == ''">
  93. 待称重
  94. </span>
  95. </div>
  96. </template>
  97. </el-table-column>
  98. </el-table>
  99. </div>
  100. </el-tab-pane>
  101. <el-tab-pane label="透析区" name="second">
  102. <div class="cell clearfix" style="margin-bottom:10px;">
  103. <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 130px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
  104. <el-input size="small" style="width:80px;" v-model.trim="search_input" class="filter-item"/>
  105. <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
  106. </div>
  107. <div class="cell clearfix" style="margin-bottom:10px;">
  108. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="width:130px;" @change="handleStateChange">
  109. <el-option
  110. v-for="item in patient_state"
  111. :key="item.value"
  112. :label="item.label"
  113. :value="item.value">
  114. </el-option>
  115. </el-select>
  116. <el-select v-model="treatStateVal" placeholder="全部治疗状态" style="width:130px;" @change="handleTreatChange">
  117. <el-option
  118. v-for="item in treat_state"
  119. :key="item.value"
  120. :label="item.label"
  121. :value="item.value">
  122. </el-option>
  123. </el-select>
  124. </div>
  125. <div class="cell clearfix" style="margin-bottom:10px;">
  126. <el-select v-model="scheduleStateVal" placeholder="班次" style="width:130px;" @change="handletimeType">
  127. <el-option
  128. v-for="item in schedule_options"
  129. :key="item.value"
  130. :label="item.label"
  131. :value="item.value">
  132. </el-option>
  133. </el-select>
  134. <el-select v-model="zoneVal" placeholder="分区" style="width:130px;" @change="handleZoneChange">
  135. <el-option
  136. v-for="item in zone_options"
  137. :key="item.id"
  138. :label="item.text"
  139. :value="item.id">
  140. </el-option>
  141. </el-select>
  142. </div>
  143. <div style="padding-right:20px;">
  144. <el-table
  145. ref="tab1"
  146. @row-click="changePatient"
  147. highlight-current-row
  148. :data="tableData1"
  149. height="500"
  150. border
  151. style="width: 100%">
  152. <el-table-column
  153. prop="date"
  154. label="患者"
  155. >
  156. <template slot-scope="scope">
  157. {{ scope.row.patient.name }}
  158. </template>
  159. </el-table-column>
  160. <el-table-column
  161. prop="name"
  162. label="状态"
  163. >
  164. <template slot-scope="scope">
  165. <div style="display:flex;align-items:center;justify-content:space-around;">
  166. <span class="tip3" v-if="scope.row.dialysis_order ? scope.row.dialysis_order.stage == 1 : false">
  167. 已上机
  168. </span>
  169. <span class="tip4" v-if="scope.row.dialysis_order ? scope.row.dialysis_order.stage == 2 : false">
  170. 已下机
  171. </span>
  172. <span class="tip5" v-if="scope.row.treatment_summary == null || scope.row.treatment_summary.dialysis_summary == ''">
  173. 待开小结
  174. </span>
  175. </div>
  176. </template>
  177. </el-table-column>
  178. </el-table>
  179. </div>
  180. </el-tab-pane>
  181. </el-tabs>
  182. </div>
  183. <div style="width:75%">
  184. <div style="margin-left:60px;color:#34495e">
  185. <span>{{ patient.name }}({{ patient.dialysis_no }})</span>
  186. <span v-if="newTime">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
  187. <span v-if="newTime">签到时间:{{ newTime }}</span>
  188. </div>
  189. <nav-igation
  190. ref="nav"
  191. title="弹窗导航"
  192. @advice="adviceFunc"
  193. :patient="patient"
  194. :schedual="schedual"
  195. :prescription="prescription"
  196. :solution="solution"
  197. :receiver_treatment_access="receiver_treatment_access"
  198. :predialysis_evaluation="predialysis_evaluation"
  199. :doctor_advices="doctor_advices"
  200. :double_check="double_check"
  201. :assessment_after_dislysis="assessment_after_dislysis"
  202. :treatment_summary="treatment_summary"
  203. :monitor_records="monitor_records"
  204. :dialysis_order="dialysis_order"
  205. :admin_users="admin_users"
  206. :devices="devices"
  207. :device_numbers="device_numbers"
  208. :admin_user_map="admin_user_map"
  209. :device_map="device_map"
  210. :device_number_map="device_number_map"
  211. :niprocart_info="niprocart_info"
  212. :jms_info="jms_info"
  213. :fistula_needle_set_info="fistula_needle_set_info"
  214. :fistula_needle_set_16_info="fistula_needle_set_16_info"
  215. :hemoperfusion_info="hemoperfusion_info"
  216. :dialyser_sterilised_info="dialyser_sterilised_info"
  217. :filtryzer_info="filtryzer_info"
  218. :dialyzers_info="dialyzers_info"
  219. :injector_info="injector_info"
  220. :bloodlines_info="bloodlines_info"
  221. :tubingHemodialysis_info="tubingHemodialysis_info"
  222. :safe_package_info="safe_package_info"
  223. :aliquid_info="aliquid_info"
  224. :config="config"
  225. :longAdvices="longAdvices"
  226. :waitUploadAdvices="waitUploadAdvices"
  227. :is_open="is_open"
  228. :last_predialysis_evaluation="lastPredialysisEvaluation"
  229. :last_monitor_record="lastMonitorRecord"
  230. :last_assessment_after_dislysis="lastAssessmentAfterDislysis"
  231. :last_dialysis_prescribe="lastDialysisPrescribe"
  232. :last_dryWeight_dislysis="lastDryWeightDislysis"
  233. :special_premission="headNurses"
  234. @assessmentAfterDislysis="assessmentAfterDislysisFunc"
  235. :system_prescribe="system_prescribe"
  236. >
  237. </nav-igation>
  238. <basic-infor
  239. :patient="patient"
  240. :device_number="schedual.id == 0 ? '' : schedual.device_number.number"
  241. :steps="steps"
  242. title="基本信息"
  243. ></basic-infor>
  244. <dialysis-prescription
  245. :prescription="prescription"
  246. :solution="solution"
  247. :device_map="device_map"
  248. title="透析处方"
  249. ></dialysis-prescription>
  250. <!-- <past-data class="往期数据"></past-data> -->
  251. <div style="height: 20px;background-color: #f6f8f9"></div>
  252. <accepts-assessment
  253. :record="receiver_treatment_access"
  254. title="接诊评估"
  255. ></accepts-assessment>
  256. <assessment-before
  257. :record="predialysis_evaluation"
  258. ref="assessment_before"
  259. title="透前评估"
  260. ></assessment-before>
  261. <stat-order
  262. ref="stat_order"
  263. :advices="doctor_advices"
  264. :doctor_map="admin_user_map"
  265. title="临时医嘱"
  266. ></stat-order>
  267. <double-check
  268. ref="double_check"
  269. :record="double_check"
  270. :admin_map="admin_user_map"
  271. title="双人核对 "
  272. ></double-check>
  273. <dialysis-computer
  274. ref="dialysis_computer"
  275. :record="dialysis_order"
  276. :admin_map="admin_user_map"
  277. :device_number_map="device_number_map"
  278. title="透析上机 "
  279. ></dialysis-computer>
  280. <dialysis-monitoring
  281. ref="monitoring"
  282. :monitores="monitor_records"
  283. title="透析监测"
  284. ></dialysis-monitoring>
  285. <el-dialog
  286. title="长期医嘱单"
  287. :visible.sync="dialogFormVisible"
  288. width="960px"
  289. >
  290. <div class="printForm">
  291. <h1 class="title">长期医嘱单</h1>
  292. <div class="info">
  293. <ul>
  294. <li>
  295. <span class="name">姓名:</span>
  296. <input type="text" class="InputBox" />
  297. </li>
  298. <li>
  299. <span class="name">性别:</span>
  300. <input type="text" class="InputBox" />
  301. </li>
  302. <li>
  303. <span class="name">年龄:</span>
  304. <input type="text" class="InputBox" />
  305. </li>
  306. <li>
  307. <span class="name">科别:</span>
  308. <input type="text" class="InputBox" />
  309. </li>
  310. <li>
  311. <span class="name">床号:</span>
  312. <input type="text" class="InputBox" />
  313. </li>
  314. <li>
  315. <span class="name">住院号:</span>
  316. <input type="text" class="InputBox" />
  317. </li>
  318. </ul>
  319. </div>
  320. <table
  321. border="1"
  322. style="border:1px #999 solid;margin-top:20px;"
  323. bordercolorlight="#fff"
  324. bordercolordark="#fff"
  325. width="100%"
  326. cellpadding="0"
  327. cellspacing="0"
  328. class="printTable"
  329. >
  330. <tbody>
  331. <tr align="center">
  332. <th style="width:20%;" colspan="2" align="center">起始</th>
  333. <th style="width:20%;" rowspan="2" align="center">医嘱</th>
  334. <th style="width:8%;" rowspan="2" align="center">医师签名</th>
  335. <th style="width:6%;" rowspan="2" align="center">执行护士签名</th>
  336. <th style="width:42%;" colspan="4" align="center">停止</th>
  337. </tr>
  338. <tr align="center">
  339. <th align="center">日期</th>
  340. <th align="center">时间</th>
  341. <th style="width:10%;" align="center">日期</th>
  342. <th style="width:10%;" align="center">时间</th>
  343. <th style="width:10%;" align="center">医师签名</th>
  344. <th style="width:6%;" align="center">执行护士签名</th>
  345. </tr>
  346. <tr align="center">
  347. <td>2018-90-09</td>
  348. <td>2018-90-09</td>
  349. <td>地方开发发地方开发发方发发发大渡岗</td>
  350. <td>张三</td>
  351. <td>张三</td>
  352. <td>张三</td>
  353. <td>张三</td>
  354. <td>张三</td>
  355. <td>张三</td>
  356. </tr>
  357. <tr align="center">
  358. <td>2018-90-09</td>
  359. <td>2018-90-09</td>
  360. <td>地方开发发地方开发发方发发发大渡岗</td>
  361. <td>张三</td>
  362. <td>张三</td>
  363. <td>张三</td>
  364. <td>张三</td>
  365. <td>张三</td>
  366. <td>张三</td>
  367. </tr>
  368. </tbody>
  369. </table>
  370. </div>
  371. </el-dialog>
  372. <el-dialog title="临时医嘱单" :visible.sync="orders" width="960px">
  373. <div class="printForm">
  374. <h1 class="title">临时医嘱单</h1>
  375. <div class="info">
  376. <ul>
  377. <li>
  378. <span class="name">姓名:</span>
  379. <input type="text" class="InputBox" />
  380. </li>
  381. <li>
  382. <span class="name">性别:</span>
  383. <input type="text" class="InputBox" />
  384. </li>
  385. <li>
  386. <span class="name">年龄:</span>
  387. <input type="text" class="InputBox" />
  388. </li>
  389. <li>
  390. <span class="name">科:</span>
  391. <input type="text" class="InputBox" />
  392. </li>
  393. <li>
  394. <span class="name">区:</span>
  395. <input type="text" class="InputBox" />
  396. </li>
  397. <li>
  398. <span class="name">房:</span>
  399. <input type="text" class="InputBox" />
  400. </li>
  401. <li>
  402. <span class="name">床:</span>
  403. <input type="text" class="InputBox" />
  404. </li>
  405. <li>
  406. <span class="name">住院号:</span>
  407. <input type="text" class="InputBox" />
  408. </li>
  409. </ul>
  410. </div>
  411. <table
  412. border="1"
  413. style="border:1px #999 solid;margin-top:20px;"
  414. bordercolorlight="#fff"
  415. bordercolordark="#fff"
  416. width="100%"
  417. cellpadding="0"
  418. cellspacing="0"
  419. class="printTable"
  420. >
  421. <tbody>
  422. <tr align="center">
  423. <th style="width:10%;" align="center">日期</th>
  424. <th style="width:10%;" align="center">时间</th>
  425. <th style="width:10%;" align="center">医生签名</th>
  426. <th style="width:40%;" align="center">医嘱内容</th>
  427. <th style="width:10%;" align="center">执行时间</th>
  428. <th style="width:10%;" align="center">护士签名</th>
  429. <th style="width:10%;" align="center">金额</th>
  430. </tr>
  431. <tr align="center">
  432. <td>2018-90-09</td>
  433. <td>2018-90-09</td>
  434. <td>张三</td>
  435. <td>张三</td>
  436. <td>张三</td>
  437. <td>张三</td>
  438. <td>888</td>
  439. </tr>
  440. <tr align="center">
  441. <td>2018-90-09</td>
  442. <td>2018-90-09</td>
  443. <td>张三</td>
  444. <td>张三</td>
  445. <td>2018-90-09</td>
  446. <td>张三</td>
  447. <td>888</td>
  448. </tr>
  449. </tbody>
  450. </table>
  451. </div>
  452. </el-dialog>
  453. <dialysis-off
  454. ref="dialysis_off"
  455. :record="dialysis_order"
  456. :admin_map="admin_user_map"
  457. title="透析下机 "
  458. ></dialysis-off>
  459. <assessment-after
  460. ref="assessment_after"
  461. :record="assessment_after_dislysis"
  462. title="透后评估"
  463. ></assessment-after>
  464. <treatment-of
  465. ref="treatment_of"
  466. :record="treatment_summary"
  467. title="治疗小结"
  468. ></treatment-of>
  469. </div>
  470. </div>
  471. </div>
  472. </template>
  473. <script>
  474. import NavIgation from './NavIgation'
  475. import BasicInfor from './BasicInfor'
  476. import DialysisPrescription from './DialysisPrescription'
  477. import PastData from './pastData'
  478. import AcceptsAssessment from './acceptsAssessment'
  479. import AssessmentBefore from './assessmentBefore'
  480. import StatOrder from './statOrder'
  481. import DialysisComputer from './dialysisComputer'
  482. import DoubleCheck from './doubleCheck'
  483. import DialysisMonitoring from './dialysisMonitoring'
  484. import DialysisOff from './dialysisOff'
  485. import AssessmentAfter from './assessmentAfter'
  486. import TreatmentOf from './treatmentOf'
  487. import OperationStaff from './operationStaff'
  488. import {
  489. getDialysisScheduleDetail,
  490. getLongAdvice,
  491. getDialysisRecordInitData,
  492. getDialysisSchedules
  493. } from '@/api/dialysis_record'
  494. import { parseTime } from '@/utils'
  495. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  496. export default {
  497. name: 'index',
  498. components: {
  499. NavIgation,
  500. BasicInfor,
  501. DialysisPrescription,
  502. PastData,
  503. AcceptsAssessment,
  504. AssessmentBefore,
  505. StatOrder,
  506. DialysisComputer,
  507. DoubleCheck,
  508. DialysisMonitoring,
  509. DialysisOff,
  510. AssessmentAfter,
  511. TreatmentOf,
  512. OperationStaff,
  513. BreadCrumb
  514. },
  515. data() {
  516. return {
  517. crumbs: [
  518. { path: false, name: '透析管理' },
  519. { path: false, name: '透析记录' },
  520. { path: false, name: '透析单' }
  521. ],
  522. dialogFormVisible: false,
  523. orders: false,
  524. loading: false,
  525. patient_id: 0,
  526. date: 0,
  527. longAdvices: [],
  528. waitUploadAdvices: [],
  529. is_open: 0,
  530. targetAdvices: [],
  531. patient: { id: 0 }, // 患者信息
  532. schedual: { id: 0 }, // 患者排班信息
  533. prescription: { id: 0 }, // 透析处方
  534. solution: { id: 0 }, // 透析方案
  535. system_prescribe: { id: 0 },
  536. receiver_treatment_access: { id: 0 }, // 接诊评估
  537. predialysis_evaluation: { id: 0 }, // 透前评估
  538. doctor_advices: [], // 临时医嘱
  539. double_check: { id: 0 }, // 双人核对
  540. assessment_after_dislysis: { id: 0 }, // 透后评估
  541. treatment_summary: { id: 0 }, // 治疗小结
  542. monitor_records: [], // 透析监测
  543. dialysis_order: { id: 0 }, // 透析记录
  544. admin_users: [], // 系统用户列表
  545. devices: [], // 设备
  546. device_numbers: [], // 床位号
  547. admin_user_map: {}, // {user_id: admin_user object}
  548. device_map: {}, // {device_id: device}
  549. device_number_map: {}, // {device_number_id: device_number}
  550. niprocart_info: [],
  551. jms_info: [],
  552. fistula_needle_set_info: [],
  553. fistula_needle_set_16_info: [],
  554. hemoperfusion_info: [],
  555. dialyser_sterilised_info: [],
  556. filtryzer_info: [],
  557. dialyzers_info: [],
  558. injector_info: [],
  559. bloodlines_info: [],
  560. tubingHemodialysis_info: [],
  561. safe_package_info: [],
  562. aliquid_info: [],
  563. config: {},
  564. lastPredialysisEvaluation: { id: 0 },
  565. lastMonitorRecord: { id: 0 },
  566. lastAssessmentAfterDislysis: { id: 0 },
  567. lastDryWeightDislysis: { id: 0 },
  568. headNurses: [],
  569. lastDialysisPrescribe: { id: 0 },
  570. //
  571. activeName:'first',
  572. selected_date: new Date(),
  573. // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
  574. search_keyword: '', // 确定用于搜索的关键字
  575. search_input: '', // 输入中的关键字
  576. patient_state:[
  577. {value: 0,label: '全部'},
  578. {value: 1,label: '已签到'},
  579. {value: 2,label: '未签到'},
  580. {value: 3,label: '已上机'},
  581. {value: 4,label: '已下机'},
  582. ],
  583. patientStateVal: 0,
  584. treat_state:[
  585. {value: 0,label: '全部'},
  586. {value: 1,label: '待开处方'},
  587. {value: 2,label: '待开小结'},
  588. ],
  589. treatStateVal: 0,
  590. schedule_options:[
  591. {value: 0,label: '全部'},
  592. {value: 1,label: '上午'},
  593. {value: 2,label: '下午'},
  594. {value: 3,label: '晚上'},
  595. ],
  596. scheduleStateVal: 0,
  597. zone_options:[
  598. { id: 0, text: '全部' }
  599. ],
  600. zoneVal:0,
  601. tableData: [],
  602. tableData1:[],
  603. arr:[],
  604. newName:'',
  605. newTime:''
  606. }
  607. },
  608. created() {
  609. var patient_id = this.$route.query.patient_id;
  610. var date = this.$route.query.date;
  611. this.patient_id = patient_id;
  612. this.date = date;
  613. this.getInitData();
  614. this.getScheduleDetail();
  615. this.getLongAdvice();
  616. this.selected_date = this.$route.query.date * 1000
  617. var schedule_type_selected = this.$store.getters.schedule_type_selected
  618. var zone_selected = this.$store.getters.zone_selected
  619. var patient_state_selected = this.$store.getters.patient_state_selected
  620. var treat_state_selected = this.$store.getters.treat_state_selected
  621. if (schedule_type_selected) {
  622. this.scheduleStateVal = schedule_type_selected.schedule_type_selected
  623. }
  624. if (zone_selected) {
  625. this.zoneVal = zone_selected.zone_selected
  626. }
  627. if (patient_state_selected) {
  628. this.patientStateVal = patient_state_selected.patient_state_selected
  629. }
  630. if (treat_state_selected) {
  631. this.treatStateVal = treat_state_selected.treat_state_selected
  632. }
  633. },
  634. mounted(){
  635. const timer = setInterval(() =>{
  636. this.getInitData();
  637. }, 1000 * 60);
  638. // 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
  639. this.$once('hook:beforeDestroy', () => {
  640. clearInterval(timer);
  641. })
  642. },
  643. computed: {
  644. steps: function() {
  645. var steps = [
  646. { title: '透析处方', finish: false },
  647. { title: '接诊评估', finish: false },
  648. { title: '透前评估', finish: false },
  649. { title: '临时医嘱', finish: false },
  650. { title: '双人核对', finish: false },
  651. { title: '透析上机', finish: false },
  652. { title: '透析监测', finish: false },
  653. { title: '透析下机', finish: false },
  654. { title: '透后评估', finish: false },
  655. { title: '治疗小结', finish: false }
  656. ]
  657. steps[0].finish = this.prescription.id && this.prescription.creater > 0
  658. steps[1].finish = this.receiver_treatment_access.id > 0
  659. steps[2].finish =
  660. this.predialysis_evaluation.id > 0 &&
  661. this.predialysis_evaluation.creater > 0
  662. steps[3].finish = this.doctor_advices.length > 0
  663. steps[5].finish = this.dialysis_order.id > 0
  664. steps[7].finish =
  665. this.dialysis_order.id > 0 && this.dialysis_order.stage == 2
  666. steps[4].finish =
  667. this.double_check.id > 0 &&
  668. this.double_check.creater > 0 &&
  669. this.double_check.modifier > 0
  670. steps[6].finish = this.monitor_records.length > 0
  671. steps[8].finish =
  672. this.assessment_after_dislysis.id > 0 &&
  673. this.assessment_after_dislysis.creater > 0
  674. steps[9].finish = this.treatment_summary.id > 0
  675. return steps
  676. },
  677. filtedSchedules: function() {
  678. var search_keyword = this.search_keyword
  679. if (search_keyword.length > 0) {
  680. var schedules = []
  681. for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  682. const scheduleInfo = this.zone_schedules[o_i]
  683. var originSchedules = scheduleInfo.schedules
  684. if (originSchedules.length == 0) {
  685. continue
  686. }
  687. var filtedSchedules = []
  688. for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  689. const schedule = originSchedules[s_i]
  690. if (schedule.patient.name.indexOf(search_keyword) != -1) {
  691. filtedSchedules.push(schedule)
  692. // break
  693. }
  694. }
  695. if (filtedSchedules.length > 0) {
  696. schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  697. }
  698. }
  699. return schedules
  700. }
  701. // var zone_selected = this.zoneVal
  702. // var timetype_selected = this.scheduleStateVal
  703. // if ((zone_selected == 0 && timetype_selected == 0) || this.zone_options.length <= 1) {
  704. // var schedules = []
  705. // for (let index = 0; index < this.zone_schedules.length; index++) {
  706. // const scheduleInfo = this.zone_schedules[index]
  707. // if (scheduleInfo.schedules.length != 0) {
  708. // schedules.push(scheduleInfo)
  709. // }
  710. // }
  711. // return schedules
  712. // }
  713. // var schedules = []
  714. // for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  715. // const scheduleInfo = this.zone_schedules[o_i]
  716. // if (zone_selected == scheduleInfo.zone_id && timetype_selected == 0) {
  717. // if (scheduleInfo.schedules.length == 0) {
  718. // return []
  719. // } else {
  720. // return [scheduleInfo]
  721. // }
  722. // }
  723. // var originSchedules = scheduleInfo.schedules
  724. // if (originSchedules.length == 0) {
  725. // continue
  726. // }
  727. // var filtedSchedules = []
  728. // for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  729. // const schedule = originSchedules[s_i]
  730. // if (zone_selected != 0) {
  731. // if (zone_selected == schedule.device_number.zone.id) {
  732. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  733. // filtedSchedules.push(schedule)
  734. // }
  735. // }
  736. // } else {
  737. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  738. // filtedSchedules.push(schedule)
  739. // }
  740. // }
  741. // }
  742. // if (filtedSchedules.length > 0) {
  743. // schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  744. // }
  745. // }
  746. // return schedules
  747. }
  748. },
  749. methods: {
  750. adviceFunc() {
  751. this.getScheduleDetail()
  752. },
  753. getLongAdvice() {
  754. const params = {
  755. patient_id: this.patient_id
  756. }
  757. getLongAdvice(params).then(rs => {
  758. var resp = rs.data
  759. if (resp.state == 1) {
  760. var status = parseInt(resp.data.status)
  761. switch (status) {
  762. case 2:
  763. var totalAdvice = resp.data.advices
  764. var longAdvicesTwo = resp.data.advices_two
  765. var waitUploadAdvices = []
  766. for (let i = 0; i < totalAdvice.length; i++) {
  767. totalAdvice[i]['isCheck'] = 1
  768. }
  769. for (let i = 0; i < totalAdvice.length; i++) {
  770. for (let a = 0; a < longAdvicesTwo.length; a++) {
  771. if (
  772. totalAdvice[i].template_id ==
  773. longAdvicesTwo[a].template_id &&
  774. totalAdvice[i].frequency_type ==
  775. longAdvicesTwo[a].frequency_type
  776. ) {
  777. totalAdvice[i]['isCheck'] = 0
  778. }
  779. }
  780. }
  781. for (let i = 0; i < totalAdvice.length; i++) {
  782. if (totalAdvice[i].isCheck == 1) {
  783. waitUploadAdvices.push(totalAdvice[i])
  784. }
  785. }
  786. this.is_open = resp.data.is_open_remind
  787. this.longAdvices = totalAdvice
  788. this.waitUploadAdvices = waitUploadAdvices
  789. break
  790. }
  791. } else {
  792. this.$message.error(resp.msg)
  793. }
  794. })
  795. },
  796. assessmentAfterDislysisFunc: function(val) {
  797. for (var index in val) {
  798. this.$set(this.assessment_after_dislysis, index, val[index])
  799. }
  800. },
  801. didDelMonitor(record_id) {
  802. var mrl = this.monitor_records.length
  803. for (let index = 0; index < mrl; index++) {
  804. if (this.monitor_records[index].id == record_id) {
  805. this.monitor_records.splice(index, 1)
  806. break
  807. }
  808. }
  809. },
  810. getScheduleDetail: function() {
  811. this.loading = true
  812. var dateStr = parseTime(this.date, '{y}-{m}-{d}')
  813. this.doctor_advices = []
  814. getDialysisScheduleDetail(this.patient_id, dateStr).then(rs => {
  815. var resp = rs.data
  816. if (resp.state == 1) {
  817. var patient = resp.data.patient // 患者信息
  818. var schedual = resp.data.schedual // 患者排班信息
  819. var prescription = resp.data.prescription // 透析处方
  820. if (prescription != null) {
  821. if (prescription.body_fluid == -2) {
  822. prescription.body_fluid = 0
  823. }
  824. }
  825. console.log('透析处方', prescription)
  826. var solution = resp.data.solution // 透析方案
  827. var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
  828. console.log('receiver_treatment_access', receiver_treatment_access)
  829. var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
  830. console.log('透前评估', predialysis_evaluation)
  831. if (predialysis_evaluation != null) {
  832. if (predialysis_evaluation.blood_access_part_id == -2) {
  833. predialysis_evaluation.blood_access_part_id = 0
  834. }
  835. }
  836. var doctor_advices = resp.data.doctor_advices // 临时医嘱
  837. // console.log("力气-------", doctor_advices);
  838. var double_check = resp.data.double_check // 双人核对
  839. var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
  840. // console.log("透后品谷数", assessment_after_dislysis);
  841. var treatment_summary = resp.data.treatment_summary // 治疗小结
  842. var monitor_records = resp.data.monitor_records // 透析监测
  843. var dialysis_order = resp.data.dialysis_order // 透析记录
  844. var niprocart_info = resp.data.niprocart_info
  845. var jms_info = resp.data.jms_info
  846. var fistula_needle_set_info = resp.data.fistula_needle_set_info
  847. var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info
  848. var hemoperfusion_info = resp.data.hemoperfusion_info
  849. var dialyser_sterilised_info = resp.data.dialyser_sterilised_info
  850. var filtryzer_info = resp.data.filtryzer_info
  851. var dialyzers_info = resp.data.dialyzers_info
  852. var injector_info = resp.data.injector_info
  853. var bloodlines_info = resp.data.bloodlines_info
  854. var tubingHemodialysis_info = resp.data.tubingHemodialysis_info
  855. var safe_package_info = resp.data.safe_package_info
  856. var aliquid_info = resp.data.aliquid_info
  857. var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation
  858. console.log('上次透前评估', lastPredialysisEvaluation)
  859. if (lastPredialysisEvaluation != null) {
  860. if (lastPredialysisEvaluation.blood_access_part_id == -2) {
  861. lastPredialysisEvaluation.blood_access_part_id = 0
  862. }
  863. }
  864. var lastMonitorRecord = resp.data.lastMonitorRecord
  865. var lastAssessmentAfterDislysis =
  866. resp.data.lastAssessmentAfterDislysis
  867. var lastDialysisPrescribe = resp.data.lastDialysisPrescribe
  868. var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
  869. var system_prescribe = resp.data.system_prescribe
  870. this.$refs.nav.setLastRecord(
  871. lastPredialysisEvaluation,
  872. lastMonitorRecord,
  873. lastAssessmentAfterDislysis,
  874. lastDialysisPrescribe,
  875. lastDryWeightDislysis,
  876. schedual,
  877. system_prescribe
  878. )
  879. var headNurses = resp.data.headNurse
  880. var config = resp.data.config
  881. this.lastPredialysisEvaluation = lastPredialysisEvaluation
  882. this.lastMonitorRecord = lastMonitorRecord
  883. this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis
  884. this.lastDialysisPrescribe = lastDialysisPrescribe
  885. this.lastDryWeightDislysis = lastDryWeightDislysis
  886. this.headNurses = headNurses
  887. this.system_prescribe = system_prescribe
  888. this.niprocart_info = niprocart_info
  889. this.jms_info = jms_info
  890. this.fistula_needle_set_info = fistula_needle_set_info
  891. this.fistula_needle_set_16_info = fistula_needle_set_16_info
  892. this.hemoperfusion_info = hemoperfusion_info
  893. this.dialyser_sterilised_info = dialyser_sterilised_info
  894. this.filtryzer_info = filtryzer_info
  895. this.dialyzers_info = dialyzers_info
  896. this.injector_info = injector_info
  897. this.bloodlines_info = bloodlines_info
  898. this.tubingHemodialysis_info = tubingHemodialysis_info
  899. this.safe_package_info = safe_package_info
  900. this.aliquid_info = aliquid_info
  901. this.config = config
  902. this.patient = patient
  903. this.schedual = schedual == null ? { id: 0 } : schedual
  904. this.prescription = prescription == null ? { id: 0 } : prescription
  905. this.solution = solution == null ? { id: 0 } : solution
  906. this.receiver_treatment_access =
  907. receiver_treatment_access == null
  908. ? { id: 0 }
  909. : receiver_treatment_access
  910. this.predialysis_evaluation =
  911. predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation
  912. this.doctor_advices = doctor_advices == null ? [] : doctor_advices
  913. this.double_check = double_check == null ? { id: 0 } : double_check
  914. this.assessment_after_dislysis =
  915. assessment_after_dislysis == null
  916. ? { id: 0 }
  917. : assessment_after_dislysis
  918. this.treatment_summary =
  919. treatment_summary == null ? { id: 0 } : treatment_summary
  920. this.monitor_records = monitor_records == null ? [] : monitor_records
  921. this.dialysis_order =
  922. dialysis_order == null ? { id: 0 } : dialysis_order
  923. // this.$refs.stat_order.setAdvices(this.doctor_advices)
  924. // this.$refs.monitoring.setRecords(this.monitor_records)
  925. this.admin_users = resp.data.doctors
  926. this.devices = resp.data.devices
  927. this.device_numbers = resp.data.device_numbers
  928. var device_map = {}
  929. for (let index = 0; index < this.devices.length; index++) {
  930. const device = this.devices[index]
  931. device_map[device.id] = device
  932. }
  933. this.device_map = device_map
  934. var admin_map = {}
  935. for (let index = 0; index < this.admin_users.length; index++) {
  936. const admin = this.admin_users[index]
  937. admin_map[admin.id] = admin
  938. }
  939. this.admin_user_map = admin_map
  940. var device_number_map = {}
  941. for (let index = 0; index < this.device_numbers.length; index++) {
  942. const device_number = this.device_numbers[index]
  943. device_number_map[device_number.id] = device_number
  944. }
  945. this.device_number_map = device_number_map
  946. } else {
  947. this.$message.error(resp.msg)
  948. }
  949. if (this.lastDialysisPrescribe != null) {
  950. delete this.lastDialysisPrescribe.target_ultrafiltration
  951. }
  952. if (this.solution != null) {
  953. delete this.solution.target_ultrafiltration
  954. }
  955. this.loading = false
  956. })
  957. },
  958. printOrder() {
  959. var xtdate = parseTime(this.date, '{y}-{m}-{d}')
  960. this.$router.push(
  961. '/dialysis/print?xtdate=' + xtdate + '&xtno=' + this.patient.dialysis_no
  962. )
  963. },
  964. //日期
  965. handleScheduleDateChange: function() {
  966. this.treatStateVal = 0
  967. this.patientStateVal = 0
  968. this.zoneVal = 0
  969. this.scheduleStateVal = 0
  970. this.search_keyword = this.search_input = ''
  971. // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
  972. // zone: this.zone_selected,
  973. // schedule_type: this.schedule_type_selected,
  974. // schedule_date: this.selected_date,
  975. // })
  976. this.requestDialysisSchedules()
  977. },
  978. //初始化数据
  979. getInitData: function() {
  980. getDialysisRecordInitData().then(rs => {
  981. var resp = rs.data
  982. if (resp.state == 1) {
  983. var zones = resp.data.zones
  984. var schedules = resp.data.schedules
  985. var zone_options = [{ id: 0, text: '全部' }]
  986. for (let z_i = 0; z_i < zones.length; z_i++) {
  987. const zone = zones[z_i]
  988. zone_options.push({ id: zone.id, text: zone.name })
  989. }
  990. this.zone_options = zone_options
  991. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  992. this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
  993. this.getData()
  994. } else {
  995. this.$message.error(resp.msg)
  996. }
  997. })
  998. },
  999. // 班次
  1000. handletimeType: function(index) {
  1001. this.scheduleStateVal = index
  1002. this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
  1003. this.search_keyword = this.search_input = ''
  1004. this.getData()
  1005. },
  1006. //分区
  1007. handleZoneChange: function(index) {
  1008. this.zoneVal = index
  1009. this.$store.dispatch('SetZoneSelected', { zone_selected: index })
  1010. this.search_keyword = this.search_input = ''
  1011. this.getData()
  1012. },
  1013. //患者状态
  1014. handleStateChange: function(index) {
  1015. this.patientStateVal = index
  1016. this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
  1017. this.search_keyword = this.search_input = ''
  1018. this.getData()
  1019. },
  1020. handleTreatChange: function(index) {
  1021. this.treatStateVal = index
  1022. this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
  1023. this.search_keyword = this.search_input = ''
  1024. this.getData()
  1025. },
  1026. processedDialysisSchedules: function(schedules, zone_options) {
  1027. var zoneMap = {}
  1028. var scheduleMap = {}
  1029. for (let z_i = 0; z_i < zone_options.length; z_i++) {
  1030. const zone = zone_options[z_i]
  1031. if (zone.id == 0) {
  1032. continue
  1033. }
  1034. scheduleMap[zone.id] = []
  1035. }
  1036. for (let index = 0; index < schedules.length; index++) {
  1037. const schedule = schedules[index]
  1038. scheduleMap[schedule.device_number.zone.id].push(schedule)
  1039. }
  1040. var zone_schedules = []
  1041. for (let index = 0; index < zone_options.length; index++) {
  1042. const zone = zone_options[index]
  1043. if (zone.id == 0) {
  1044. continue
  1045. }
  1046. var schedules = scheduleMap[zone.id]
  1047. zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
  1048. }
  1049. return zone_schedules
  1050. },
  1051. searchAction: function() {
  1052. this.search_keyword = this.search_input
  1053. this.scheduleStateVal = 0
  1054. this.zoneVal = 0
  1055. this.treatStateVal = 0
  1056. this.patientStateVal = 0
  1057. if(this.search_input != ''){
  1058. let arr = []
  1059. this.filtedSchedules.map(item => {
  1060. arr.push(...item.schedules)
  1061. })
  1062. if(this.activeName == "first"){
  1063. this.tableData = arr
  1064. }else if(this.activeName == "second"){
  1065. this.tableData1 = arr
  1066. }
  1067. }else{
  1068. this.getData()
  1069. }
  1070. },
  1071. requestDialysisSchedules: function() {
  1072. var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
  1073. getDialysisSchedules(ymd).then(rs => {
  1074. var resp = rs.data
  1075. if (resp.state == 1) {
  1076. var schedules = resp.data.schedules
  1077. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  1078. let patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  1079. if(this.activeName == "first"){
  1080. for (let i = 0; i < patientArr.length; i++) {
  1081. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1082. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
  1083. // 删除元素后改变i的值
  1084. patientArr[i].schedules.splice(j--, 1);
  1085. }
  1086. }
  1087. }
  1088. }else if(this.activeName == "second"){
  1089. for (let i = 0; i < patientArr.length; i++) {
  1090. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1091. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
  1092. // 删除元素后改变i的值
  1093. patientArr[i].schedules.splice(j--, 1);
  1094. }
  1095. }
  1096. }
  1097. }
  1098. let newArr = []
  1099. patientArr.map(item => {
  1100. newArr.push(...item.schedules)
  1101. })
  1102. this.tableData = newArr
  1103. // console.log(66666666666,this.tableData)
  1104. } else {
  1105. this.$message.error(resp.msg)
  1106. }
  1107. })
  1108. },
  1109. changePatient(schedual){
  1110. console.log(schedual)
  1111. this.patient_id = schedual.patient_id;
  1112. this.date = schedual.schedule_date;
  1113. // this.getScheduleDetail();
  1114. // this.getLongAdvice();
  1115. var patient_id = schedual.patient_id;
  1116. var date = schedual.schedule_date;
  1117. this.$router.push({
  1118. path: "/dialysis/details",
  1119. query: {
  1120. patient_id: patient_id,
  1121. date: date,
  1122. patient_name: schedual.patient.name
  1123. }
  1124. });
  1125. },
  1126. handleClick(){
  1127. this.getData()
  1128. },
  1129. getData(){
  1130. let patientArr = []
  1131. patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  1132. if(this.activeName == "first"){
  1133. for (let i = 0; i < patientArr.length; i++) {
  1134. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1135. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
  1136. // 删除元素后改变i的值
  1137. console.log("候诊区",patientArr[i].schedules[j])
  1138. patientArr[i].schedules.splice(j--, 1);
  1139. }
  1140. }
  1141. }
  1142. let arr1 = []
  1143. if(this.patientStateVal == 0){
  1144. arr1 = patientArr
  1145. }else if(this.patientStateVal == 1){
  1146. let arr = []
  1147. arr = patientArr
  1148. for (let i = 0; i <arr.length; i++) {
  1149. for (let j = 0; j < arr[i].schedules.length; j++) {
  1150. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis == null || arr[i].schedules[j].assessment_before_dislysis.weight_before == '' || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure == '' || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure == '')) {
  1151. // 删除元素后改变i的值
  1152. arr[i].schedules.splice(j--, 1);
  1153. }
  1154. }
  1155. }
  1156. console.log("执行1",arr)
  1157. arr1 = arr
  1158. }else if(this.patientStateVal == 2){
  1159. let arr = []
  1160. arr = patientArr
  1161. for (let i = 0; i < arr.length; i++) {
  1162. for (let j = 0; j < arr[i].schedules.length; j++) {
  1163. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis != null && (arr[i].schedules[j].assessment_before_dislysis.weight_before != 0 || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure != 0 || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure != 0))) {
  1164. // 删除元素后改变i的值
  1165. arr[i].schedules.splice(j--, 1);
  1166. }
  1167. }
  1168. }
  1169. console.log("执行2",arr)
  1170. arr1 = arr
  1171. }
  1172. let arr2 = []
  1173. if(this.treatStateVal == 0){
  1174. arr2 = JSON.parse(JSON.stringify(arr1))
  1175. }else if(this.treatStateVal == 1){
  1176. let arr = []
  1177. arr = JSON.parse(JSON.stringify(arr1))
  1178. for (let i = 0; i < arr.length; i++) {
  1179. for (let j = 0; j < arr[i].schedules.length; j++) {
  1180. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].prescription != null || arr[i].schedules[j].prescription != null ? arr[i].schedules[j].prescription.creater != 0 : false)) {
  1181. // 删除元素后改变i的值
  1182. arr[i].schedules.splice(j--, 1);
  1183. }
  1184. }
  1185. }
  1186. arr2 = arr
  1187. }
  1188. let arr3 = []
  1189. if(this.scheduleStateVal == 0){
  1190. arr3 = JSON.parse(JSON.stringify(arr2))
  1191. }else{
  1192. let arr = []
  1193. arr = JSON.parse(JSON.stringify(arr2))
  1194. for (let i = 0; i < arr.length; i++) {
  1195. for (let j = 0; j < arr[i].schedules.length; j++) {
  1196. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  1197. // 删除元素后改变i的值
  1198. arr[i].schedules.splice(j--, 1);
  1199. }
  1200. }
  1201. }
  1202. arr3 = arr
  1203. }
  1204. let arr4 = []
  1205. if(this.zoneVal == 0){
  1206. arr4 = JSON.parse(JSON.stringify(arr3))
  1207. }else{
  1208. let arr = []
  1209. arr = JSON.parse(JSON.stringify(arr3))
  1210. for (let i = 0; i < arr.length; i++) {
  1211. if (this.zoneVal != arr[i].zone_id) {
  1212. // 删除元素后改变i的值
  1213. arr.splice(i--, 1);
  1214. }
  1215. }
  1216. arr4 = arr
  1217. }
  1218. let newArr = []
  1219. arr4.map(item => {
  1220. newArr.push(...item.schedules)
  1221. })
  1222. this.tableData = newArr
  1223. let name = this.$route.query.patient_name
  1224. this.tableData.map((item,index) => {
  1225. if(name == item.patient.name){
  1226. if(item.assessment_before_dislysis != null){
  1227. this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
  1228. }
  1229. setTimeout(()=>{
  1230. this.$refs.tab.setCurrentRow(this.tableData[index]);
  1231. },10)
  1232. }
  1233. })
  1234. }else if(this.activeName == "second"){
  1235. for (let i = 0; i < patientArr.length; i++) {
  1236. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1237. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
  1238. // 删除元素后改变i的值
  1239. console.log("透析区",patientArr[i].schedules[j])
  1240. patientArr[i].schedules.splice(j--, 1);
  1241. }
  1242. }
  1243. }
  1244. let arr1 = []
  1245. console.log('patientArr',patientArr)
  1246. // let patientArr =
  1247. if(this.patientStateVal == 0){
  1248. arr1 = patientArr
  1249. }else if(this.patientStateVal == 3){
  1250. let arr = []
  1251. arr = patientArr
  1252. for (let i = 0; i <arr.length; i++) {
  1253. for (let j = 0; j < arr[i].schedules.length; j++) {
  1254. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1)) {
  1255. // 删除元素后改变i的值
  1256. arr[i].schedules.splice(j--, 1);
  1257. }
  1258. }
  1259. }
  1260. console.log("执行1",arr)
  1261. arr1 = arr
  1262. }else if(this.patientStateVal == 4){
  1263. let arr = []
  1264. arr = patientArr
  1265. for (let i = 0; i < arr.length; i++) {
  1266. for (let j = 0; j < arr[i].schedules.length; j++) {
  1267. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2)) {
  1268. // 删除元素后改变i的值
  1269. arr[i].schedules.splice(j--, 1);
  1270. }
  1271. }
  1272. }
  1273. console.log("执行2",arr)
  1274. arr1 = arr
  1275. }
  1276. let arr2 = []
  1277. if(this.treatStateVal == 0){
  1278. arr2 = JSON.parse(JSON.stringify(arr1))
  1279. }else if(this.treatStateVal == 2){
  1280. let arr = []
  1281. arr = JSON.parse(JSON.stringify(arr1))
  1282. for (let i = 0; i < arr.length; i++) {
  1283. for (let j = 0; j < arr[i].schedules.length; j++) {
  1284. if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
  1285. // 删除元素后改变i的值
  1286. arr[i].schedules.splice(j--, 1);
  1287. }
  1288. }
  1289. }
  1290. arr2 = arr
  1291. }
  1292. let arr3 = []
  1293. if(this.scheduleStateVal == 0){
  1294. arr3 = JSON.parse(JSON.stringify(arr2))
  1295. }else{
  1296. let arr = []
  1297. arr = JSON.parse(JSON.stringify(arr2))
  1298. for (let i = 0; i < arr.length; i++) {
  1299. for (let j = 0; j < arr[i].schedules.length; j++) {
  1300. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  1301. // 删除元素后改变i的值
  1302. arr[i].schedules.splice(j--, 1);
  1303. }
  1304. }
  1305. }
  1306. arr3 = arr
  1307. }
  1308. let arr4 = []
  1309. if(this.zoneVal == 0){
  1310. arr4 = JSON.parse(JSON.stringify(arr3))
  1311. }else{
  1312. let arr = []
  1313. arr = JSON.parse(JSON.stringify(arr3))
  1314. for (let i = 0; i < arr.length; i++) {
  1315. if (this.zoneVal != arr[i].zone_id) {
  1316. // 删除元素后改变i的值
  1317. arr.splice(i--, 1);
  1318. }
  1319. }
  1320. arr4 = arr
  1321. }
  1322. let newArr = []
  1323. arr4.map(item => {
  1324. newArr.push(...item.schedules)
  1325. })
  1326. this.tableData1 = newArr
  1327. let name = this.$route.query.patient_name
  1328. this.tableData1.map((item,index) => {
  1329. if(name == item.patient.name){
  1330. if(item.assessment_before_dislysis != null){
  1331. this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
  1332. }
  1333. setTimeout(()=>{
  1334. this.$refs.tab1.setCurrentRow(this.tableData1[index]);
  1335. },10)
  1336. }
  1337. })
  1338. }
  1339. }
  1340. },
  1341. }
  1342. </script>
  1343. <style style="stylesheet/scss" lang="scss" scoped>
  1344. .details-bg {
  1345. background: #fff;
  1346. margin: 0 15px;
  1347. }
  1348. .printForm {
  1349. .title {
  1350. font-size: 30px;
  1351. font-weight: 500;
  1352. text-align: center;
  1353. line-height: 60px;
  1354. }
  1355. .info {
  1356. ul {
  1357. display: -webkit-box;
  1358. display: -moz-box;
  1359. display: -ms-flexbox;
  1360. display: -webkit-flex;
  1361. display: flex;
  1362. align-items: center;
  1363. -moz-box-sizing: border-box;
  1364. -webkit-box-sizing: border-box;
  1365. -o-box-sizing: border-box;
  1366. -ms-box-sizing: border-box;
  1367. box-sizing: border-box;
  1368. -webkit-justify-content: space-around;
  1369. -moz-justify-content: space-around;
  1370. -ms-justify-content: space-around;
  1371. -o-justify-content: space-around;
  1372. justify-content: space-around;
  1373. li {
  1374. display: flex;
  1375. box-sizing: border-box;
  1376. justify-content: space-around;
  1377. .name {
  1378. }
  1379. .InputBox {
  1380. padding: 0;
  1381. border: none;
  1382. border-bottom: 1px #e5e5e5 solid;
  1383. width: 60px;
  1384. outline: none;
  1385. }
  1386. }
  1387. }
  1388. }
  1389. .printTable {
  1390. tr {
  1391. padding: 2px;
  1392. th {
  1393. padding: 6px 4px;
  1394. }
  1395. td {
  1396. padding: 6px 4px;
  1397. }
  1398. }
  1399. }
  1400. }
  1401. .loadingBox{
  1402. display: flex;
  1403. .patientBox{
  1404. background: #fff;
  1405. }
  1406. .tip1{
  1407. background: #4fc7cb;
  1408. border-radius: 5px;
  1409. text-align: center;
  1410. font-size: 12px;
  1411. display: inline-block;
  1412. width: 60px;
  1413. color: #fff;
  1414. }
  1415. .tip2{
  1416. background: #ee8556;
  1417. border-radius: 5px;
  1418. text-align: center;
  1419. font-size: 12px;
  1420. display: inline-block;
  1421. width: 60px;
  1422. color: #fff;
  1423. }
  1424. .tip3{
  1425. background: #409eff;
  1426. border-radius: 5px;
  1427. text-align: center;
  1428. font-size: 12px;
  1429. display: inline-block;
  1430. width: 60px;
  1431. color: #fff;
  1432. }
  1433. .tip4{
  1434. background: #a8b3ba;
  1435. border-radius: 5px;
  1436. text-align: center;
  1437. font-size: 12px;
  1438. display: inline-block;
  1439. width: 60px;
  1440. color: #fff;
  1441. }
  1442. .tip5{
  1443. background: #7bce91;
  1444. border-radius: 5px;
  1445. text-align: center;
  1446. font-size: 12px;
  1447. display: inline-block;
  1448. width: 60px;
  1449. color: #fff;
  1450. }
  1451. }
  1452. </style>
  1453. <style lang="scss">
  1454. .loadingBox{
  1455. .el-loading-spinner{
  1456. top:10%;
  1457. }
  1458. .el-button--small, .el-button--small.is-round{
  1459. padding:9px 10px;
  1460. }
  1461. .el-date-editor{
  1462. .el-input__inner{
  1463. padding-right:0px;
  1464. }
  1465. }
  1466. .el-table td, .el-table th{
  1467. text-align: center;
  1468. }
  1469. .el-table .cell{
  1470. padding: 0;
  1471. }
  1472. }
  1473. </style>