index.vue 54KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567
  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: 45%;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
  27. <el-input size="small" style="width:24%;" v-model.trim="search_input" class="filter-item"/>
  28. <el-button size="small" class="filter-item" type="primary" style="margin-right:20px;" @click="searchAction">搜索</el-button>
  29. </div>
  30. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  31. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="margin-right:10px;" @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="margin-right:20px;" @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;display:flex;">
  49. <el-select v-model="scheduleStateVal" placeholder="班次" style="margin-right:10px;" @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="margin-right:20px;" @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: 45%;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
  104. <el-input size="small" style="width:24%;" v-model.trim="search_input" class="filter-item"/>
  105. <el-button size="small" class="filter-item" style="margin-right:20px;" type="primary" @click="searchAction">搜索</el-button>
  106. </div>
  107. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  108. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="margin-right:10px;" @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="margin-right:20px;" @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;display:flex;">
  126. <el-select v-model="scheduleStateVal" placeholder="班次" style="margin-right:10px;" @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="margin-right:20px;" @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.getScheduleDetail();
  614. this.getLongAdvice();
  615. this.selected_date = this.$route.query.date * 1000
  616. var schedule_type_selected = this.$store.getters.schedule_type_selected
  617. var zone_selected = this.$store.getters.zone_selected
  618. var patient_state_selected = this.$store.getters.patient_state_selected
  619. var treat_state_selected = this.$store.getters.treat_state_selected
  620. var selected_date = this.$store.getters.selected_date
  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. if(selected_date.selected_date){
  634. this.selected_date = selected_date.selected_date
  635. }
  636. this.getInitData();
  637. },
  638. mounted(){
  639. const timer = setInterval(() =>{
  640. // this.getInitData();
  641. this.requestDialysisSchedules()
  642. }, 1000 * 60);
  643. // 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
  644. this.$once('hook:beforeDestroy', () => {
  645. clearInterval(timer);
  646. })
  647. },
  648. computed: {
  649. steps: function() {
  650. var steps = [
  651. { title: '透析处方', finish: false },
  652. { title: '接诊评估', finish: false },
  653. { title: '透前评估', finish: false },
  654. { title: '临时医嘱', finish: false },
  655. { title: '双人核对', finish: false },
  656. { title: '透析上机', finish: false },
  657. { title: '透析监测', finish: false },
  658. { title: '透析下机', finish: false },
  659. { title: '透后评估', finish: false },
  660. { title: '治疗小结', finish: false }
  661. ]
  662. steps[0].finish = this.prescription.id && this.prescription.creater > 0
  663. steps[1].finish = this.receiver_treatment_access.id > 0
  664. steps[2].finish =
  665. this.predialysis_evaluation.id > 0 &&
  666. this.predialysis_evaluation.creater > 0
  667. steps[3].finish = this.doctor_advices.length > 0
  668. steps[5].finish = this.dialysis_order.id > 0
  669. steps[7].finish =
  670. this.dialysis_order.id > 0 && this.dialysis_order.stage == 2
  671. steps[4].finish =
  672. this.double_check.id > 0 &&
  673. this.double_check.creater > 0 &&
  674. this.double_check.modifier > 0
  675. steps[6].finish = this.monitor_records.length > 0
  676. steps[8].finish =
  677. this.assessment_after_dislysis.id > 0 &&
  678. this.assessment_after_dislysis.creater > 0
  679. steps[9].finish = this.treatment_summary.id > 0
  680. return steps
  681. },
  682. filtedSchedules: function() {
  683. var search_keyword = this.search_keyword
  684. if (search_keyword.length > 0) {
  685. var schedules = []
  686. for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  687. const scheduleInfo = this.zone_schedules[o_i]
  688. var originSchedules = scheduleInfo.schedules
  689. if (originSchedules.length == 0) {
  690. continue
  691. }
  692. var filtedSchedules = []
  693. for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  694. const schedule = originSchedules[s_i]
  695. if (schedule.patient.name.indexOf(search_keyword) != -1) {
  696. filtedSchedules.push(schedule)
  697. // break
  698. }
  699. }
  700. if (filtedSchedules.length > 0) {
  701. schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  702. }
  703. }
  704. return schedules
  705. }
  706. // var zone_selected = this.zoneVal
  707. // var timetype_selected = this.scheduleStateVal
  708. // if ((zone_selected == 0 && timetype_selected == 0) || this.zone_options.length <= 1) {
  709. // var schedules = []
  710. // for (let index = 0; index < this.zone_schedules.length; index++) {
  711. // const scheduleInfo = this.zone_schedules[index]
  712. // if (scheduleInfo.schedules.length != 0) {
  713. // schedules.push(scheduleInfo)
  714. // }
  715. // }
  716. // return schedules
  717. // }
  718. // var schedules = []
  719. // for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  720. // const scheduleInfo = this.zone_schedules[o_i]
  721. // if (zone_selected == scheduleInfo.zone_id && timetype_selected == 0) {
  722. // if (scheduleInfo.schedules.length == 0) {
  723. // return []
  724. // } else {
  725. // return [scheduleInfo]
  726. // }
  727. // }
  728. // var originSchedules = scheduleInfo.schedules
  729. // if (originSchedules.length == 0) {
  730. // continue
  731. // }
  732. // var filtedSchedules = []
  733. // for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  734. // const schedule = originSchedules[s_i]
  735. // if (zone_selected != 0) {
  736. // if (zone_selected == schedule.device_number.zone.id) {
  737. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  738. // filtedSchedules.push(schedule)
  739. // }
  740. // }
  741. // } else {
  742. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  743. // filtedSchedules.push(schedule)
  744. // }
  745. // }
  746. // }
  747. // if (filtedSchedules.length > 0) {
  748. // schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  749. // }
  750. // }
  751. // return schedules
  752. }
  753. },
  754. methods: {
  755. adviceFunc() {
  756. this.getScheduleDetail()
  757. },
  758. getLongAdvice() {
  759. const params = {
  760. patient_id: this.patient_id
  761. }
  762. getLongAdvice(params).then(rs => {
  763. var resp = rs.data
  764. if (resp.state == 1) {
  765. var status = parseInt(resp.data.status)
  766. switch (status) {
  767. case 2:
  768. var totalAdvice = resp.data.advices
  769. var longAdvicesTwo = resp.data.advices_two
  770. var waitUploadAdvices = []
  771. for (let i = 0; i < totalAdvice.length; i++) {
  772. totalAdvice[i]['isCheck'] = 1
  773. }
  774. for (let i = 0; i < totalAdvice.length; i++) {
  775. for (let a = 0; a < longAdvicesTwo.length; a++) {
  776. if (
  777. totalAdvice[i].template_id ==
  778. longAdvicesTwo[a].template_id &&
  779. totalAdvice[i].frequency_type ==
  780. longAdvicesTwo[a].frequency_type
  781. ) {
  782. totalAdvice[i]['isCheck'] = 0
  783. }
  784. }
  785. }
  786. for (let i = 0; i < totalAdvice.length; i++) {
  787. if (totalAdvice[i].isCheck == 1) {
  788. waitUploadAdvices.push(totalAdvice[i])
  789. }
  790. }
  791. this.is_open = resp.data.is_open_remind
  792. this.longAdvices = totalAdvice
  793. this.waitUploadAdvices = waitUploadAdvices
  794. break
  795. }
  796. } else {
  797. this.$message.error(resp.msg)
  798. }
  799. })
  800. },
  801. assessmentAfterDislysisFunc: function(val) {
  802. for (var index in val) {
  803. this.$set(this.assessment_after_dislysis, index, val[index])
  804. }
  805. },
  806. didDelMonitor(record_id) {
  807. var mrl = this.monitor_records.length
  808. for (let index = 0; index < mrl; index++) {
  809. if (this.monitor_records[index].id == record_id) {
  810. this.monitor_records.splice(index, 1)
  811. break
  812. }
  813. }
  814. },
  815. getScheduleDetail: function() {
  816. this.loading = true
  817. var dateStr = parseTime(this.date, '{y}-{m}-{d}')
  818. this.doctor_advices = []
  819. getDialysisScheduleDetail(this.patient_id, dateStr).then(rs => {
  820. var resp = rs.data
  821. if (resp.state == 1) {
  822. var patient = resp.data.patient // 患者信息
  823. var schedual = resp.data.schedual // 患者排班信息
  824. var prescription = resp.data.prescription // 透析处方
  825. if (prescription != null) {
  826. if (prescription.body_fluid == -2) {
  827. prescription.body_fluid = 0
  828. }
  829. }
  830. console.log('透析处方', prescription)
  831. var solution = resp.data.solution // 透析方案
  832. var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
  833. console.log('receiver_treatment_access', receiver_treatment_access)
  834. var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
  835. console.log('透前评估', predialysis_evaluation)
  836. if (predialysis_evaluation != null) {
  837. if (predialysis_evaluation.blood_access_part_id == -2) {
  838. predialysis_evaluation.blood_access_part_id = 0
  839. }
  840. }
  841. var doctor_advices = resp.data.doctor_advices // 临时医嘱
  842. // console.log("力气-------", doctor_advices);
  843. var double_check = resp.data.double_check // 双人核对
  844. var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
  845. // console.log("透后品谷数", assessment_after_dislysis);
  846. var treatment_summary = resp.data.treatment_summary // 治疗小结
  847. var monitor_records = resp.data.monitor_records // 透析监测
  848. var dialysis_order = resp.data.dialysis_order // 透析记录
  849. var niprocart_info = resp.data.niprocart_info
  850. var jms_info = resp.data.jms_info
  851. var fistula_needle_set_info = resp.data.fistula_needle_set_info
  852. var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info
  853. var hemoperfusion_info = resp.data.hemoperfusion_info
  854. var dialyser_sterilised_info = resp.data.dialyser_sterilised_info
  855. var filtryzer_info = resp.data.filtryzer_info
  856. var dialyzers_info = resp.data.dialyzers_info
  857. var injector_info = resp.data.injector_info
  858. var bloodlines_info = resp.data.bloodlines_info
  859. var tubingHemodialysis_info = resp.data.tubingHemodialysis_info
  860. var safe_package_info = resp.data.safe_package_info
  861. var aliquid_info = resp.data.aliquid_info
  862. var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation
  863. console.log('上次透前评估', lastPredialysisEvaluation)
  864. if (lastPredialysisEvaluation != null) {
  865. if (lastPredialysisEvaluation.blood_access_part_id == -2) {
  866. lastPredialysisEvaluation.blood_access_part_id = 0
  867. }
  868. }
  869. var lastMonitorRecord = resp.data.lastMonitorRecord
  870. var lastAssessmentAfterDislysis =
  871. resp.data.lastAssessmentAfterDislysis
  872. var lastDialysisPrescribe = resp.data.lastDialysisPrescribe
  873. var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
  874. var system_prescribe = resp.data.system_prescribe
  875. this.$refs.nav.setLastRecord(
  876. lastPredialysisEvaluation,
  877. lastMonitorRecord,
  878. lastAssessmentAfterDislysis,
  879. lastDialysisPrescribe,
  880. lastDryWeightDislysis,
  881. schedual,
  882. system_prescribe
  883. )
  884. var headNurses = resp.data.headNurse
  885. var config = resp.data.config
  886. this.lastPredialysisEvaluation = lastPredialysisEvaluation
  887. this.lastMonitorRecord = lastMonitorRecord
  888. this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis
  889. this.lastDialysisPrescribe = lastDialysisPrescribe
  890. this.lastDryWeightDislysis = lastDryWeightDislysis
  891. this.headNurses = headNurses
  892. this.system_prescribe = system_prescribe
  893. this.niprocart_info = niprocart_info
  894. this.jms_info = jms_info
  895. this.fistula_needle_set_info = fistula_needle_set_info
  896. this.fistula_needle_set_16_info = fistula_needle_set_16_info
  897. this.hemoperfusion_info = hemoperfusion_info
  898. this.dialyser_sterilised_info = dialyser_sterilised_info
  899. this.filtryzer_info = filtryzer_info
  900. this.dialyzers_info = dialyzers_info
  901. this.injector_info = injector_info
  902. this.bloodlines_info = bloodlines_info
  903. this.tubingHemodialysis_info = tubingHemodialysis_info
  904. this.safe_package_info = safe_package_info
  905. this.aliquid_info = aliquid_info
  906. this.config = config
  907. this.patient = patient
  908. this.schedual = schedual == null ? { id: 0 } : schedual
  909. this.prescription = prescription == null ? { id: 0 } : prescription
  910. this.solution = solution == null ? { id: 0 } : solution
  911. this.receiver_treatment_access =
  912. receiver_treatment_access == null
  913. ? { id: 0 }
  914. : receiver_treatment_access
  915. this.predialysis_evaluation =
  916. predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation
  917. this.doctor_advices = doctor_advices == null ? [] : doctor_advices
  918. this.double_check = double_check == null ? { id: 0 } : double_check
  919. this.assessment_after_dislysis =
  920. assessment_after_dislysis == null
  921. ? { id: 0 }
  922. : assessment_after_dislysis
  923. this.treatment_summary =
  924. treatment_summary == null ? { id: 0 } : treatment_summary
  925. this.monitor_records = monitor_records == null ? [] : monitor_records
  926. this.dialysis_order =
  927. dialysis_order == null ? { id: 0 } : dialysis_order
  928. // this.$refs.stat_order.setAdvices(this.doctor_advices)
  929. // this.$refs.monitoring.setRecords(this.monitor_records)
  930. this.admin_users = resp.data.doctors
  931. this.devices = resp.data.devices
  932. this.device_numbers = resp.data.device_numbers
  933. var device_map = {}
  934. for (let index = 0; index < this.devices.length; index++) {
  935. const device = this.devices[index]
  936. device_map[device.id] = device
  937. }
  938. this.device_map = device_map
  939. var admin_map = {}
  940. for (let index = 0; index < this.admin_users.length; index++) {
  941. const admin = this.admin_users[index]
  942. admin_map[admin.id] = admin
  943. }
  944. this.admin_user_map = admin_map
  945. var device_number_map = {}
  946. for (let index = 0; index < this.device_numbers.length; index++) {
  947. const device_number = this.device_numbers[index]
  948. device_number_map[device_number.id] = device_number
  949. }
  950. this.device_number_map = device_number_map
  951. } else {
  952. this.$message.error(resp.msg)
  953. }
  954. if (this.lastDialysisPrescribe != null) {
  955. delete this.lastDialysisPrescribe.target_ultrafiltration
  956. }
  957. if (this.solution != null) {
  958. delete this.solution.target_ultrafiltration
  959. }
  960. this.loading = false
  961. })
  962. },
  963. printOrder() {
  964. var xtdate = parseTime(this.date, '{y}-{m}-{d}')
  965. this.$router.push(
  966. '/dialysis/print?xtdate=' + xtdate + '&xtno=' + this.patient.dialysis_no
  967. )
  968. },
  969. //日期
  970. handleScheduleDateChange: function(index) {
  971. this.treatStateVal = 0
  972. this.patientStateVal = 0
  973. this.zoneVal = 0
  974. this.scheduleStateVal = 0
  975. this.search_keyword = this.search_input = ''
  976. // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
  977. // zone: this.zone_selected,
  978. // schedule_type: this.schedule_type_selected,
  979. // schedule_date: this.selected_date,
  980. // })
  981. this.selected_date = index
  982. this.$store.dispatch('SetSelectedDate', { selected_date: index })
  983. this.requestDialysisSchedules()
  984. },
  985. //初始化数据
  986. getInitData: function() {
  987. getDialysisRecordInitData().then(rs => {
  988. var resp = rs.data
  989. if (resp.state == 1) {
  990. var zones = resp.data.zones
  991. var schedules = resp.data.schedules
  992. var zone_options = [{ id: 0, text: '全部' }]
  993. for (let z_i = 0; z_i < zones.length; z_i++) {
  994. const zone = zones[z_i]
  995. zone_options.push({ id: zone.id, text: zone.name })
  996. }
  997. this.zone_options = zone_options
  998. // this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  999. this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
  1000. this.requestDialysisSchedules()
  1001. this.getData()
  1002. } else {
  1003. this.$message.error(resp.msg)
  1004. }
  1005. })
  1006. },
  1007. // 班次
  1008. handletimeType: function(index) {
  1009. this.scheduleStateVal = index
  1010. this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
  1011. this.search_keyword = this.search_input = ''
  1012. this.getData()
  1013. },
  1014. //分区
  1015. handleZoneChange: function(index) {
  1016. this.zoneVal = index
  1017. this.$store.dispatch('SetZoneSelected', { zone_selected: index })
  1018. this.search_keyword = this.search_input = ''
  1019. this.getData()
  1020. },
  1021. //患者状态
  1022. handleStateChange: function(index) {
  1023. this.patientStateVal = index
  1024. this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
  1025. this.search_keyword = this.search_input = ''
  1026. this.getData()
  1027. },
  1028. handleTreatChange: function(index) {
  1029. this.treatStateVal = index
  1030. this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
  1031. this.search_keyword = this.search_input = ''
  1032. this.getData()
  1033. },
  1034. processedDialysisSchedules: function(schedules, zone_options) {
  1035. var zoneMap = {}
  1036. var scheduleMap = {}
  1037. for (let z_i = 0; z_i < zone_options.length; z_i++) {
  1038. const zone = zone_options[z_i]
  1039. if (zone.id == 0) {
  1040. continue
  1041. }
  1042. scheduleMap[zone.id] = []
  1043. }
  1044. for (let index = 0; index < schedules.length; index++) {
  1045. const schedule = schedules[index]
  1046. scheduleMap[schedule.device_number.zone.id].push(schedule)
  1047. }
  1048. var zone_schedules = []
  1049. for (let index = 0; index < zone_options.length; index++) {
  1050. const zone = zone_options[index]
  1051. if (zone.id == 0) {
  1052. continue
  1053. }
  1054. var schedules = scheduleMap[zone.id]
  1055. zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
  1056. }
  1057. return zone_schedules
  1058. },
  1059. searchAction: function() {
  1060. this.search_keyword = this.search_input
  1061. this.scheduleStateVal = 0
  1062. this.zoneVal = 0
  1063. this.treatStateVal = 0
  1064. this.patientStateVal = 0
  1065. if(this.search_input != ''){
  1066. let arr = []
  1067. this.filtedSchedules.map(item => {
  1068. arr.push(...item.schedules)
  1069. })
  1070. if(this.activeName == "first"){
  1071. this.tableData = arr
  1072. }else if(this.activeName == "second"){
  1073. this.tableData1 = arr
  1074. }
  1075. }else{
  1076. this.getData()
  1077. }
  1078. },
  1079. requestDialysisSchedules: function() {
  1080. var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
  1081. getDialysisSchedules(ymd).then(rs => {
  1082. var resp = rs.data
  1083. if (resp.state == 1) {
  1084. var schedules = resp.data.schedules
  1085. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  1086. let patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  1087. if(this.activeName == "first"){
  1088. for (let i = 0; i < patientArr.length; i++) {
  1089. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1090. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
  1091. // 删除元素后改变i的值
  1092. patientArr[i].schedules.splice(j--, 1);
  1093. }
  1094. }
  1095. }
  1096. }else if(this.activeName == "second"){
  1097. for (let i = 0; i < patientArr.length; i++) {
  1098. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1099. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
  1100. // 删除元素后改变i的值
  1101. patientArr[i].schedules.splice(j--, 1);
  1102. }
  1103. }
  1104. }
  1105. }
  1106. let newArr = []
  1107. patientArr.map(item => {
  1108. newArr.push(...item.schedules)
  1109. })
  1110. this.tableData = newArr
  1111. // console.log(66666666666,this.tableData)
  1112. } else {
  1113. this.$message.error(resp.msg)
  1114. }
  1115. })
  1116. },
  1117. changePatient(schedual){
  1118. console.log(schedual)
  1119. this.patient_id = schedual.patient_id;
  1120. this.date = schedual.schedule_date;
  1121. // this.getScheduleDetail();
  1122. // this.getLongAdvice();
  1123. var patient_id = schedual.patient_id;
  1124. var date = schedual.schedule_date;
  1125. this.$router.push({
  1126. path: "/dialysis/details",
  1127. query: {
  1128. patient_id: patient_id,
  1129. date: date,
  1130. patient_name: schedual.patient.name
  1131. }
  1132. });
  1133. },
  1134. handleClick(){
  1135. this.getData()
  1136. },
  1137. getData(){
  1138. let patientArr = []
  1139. patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  1140. if(this.activeName == "first"){
  1141. for (let i = 0; i < patientArr.length; i++) {
  1142. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1143. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
  1144. // 删除元素后改变i的值
  1145. console.log("候诊区",patientArr[i].schedules[j])
  1146. patientArr[i].schedules.splice(j--, 1);
  1147. }
  1148. }
  1149. }
  1150. let arr1 = []
  1151. if(this.patientStateVal == 0){
  1152. arr1 = patientArr
  1153. }else if(this.patientStateVal == 1){
  1154. let arr = []
  1155. arr = patientArr
  1156. for (let i = 0; i <arr.length; i++) {
  1157. for (let j = 0; j < arr[i].schedules.length; j++) {
  1158. 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 == ''))) {
  1159. // 删除元素后改变i的值
  1160. arr[i].schedules.splice(j--, 1);
  1161. }
  1162. }
  1163. }
  1164. console.log("执行1",arr)
  1165. arr1 = arr
  1166. }else if(this.patientStateVal == 2){
  1167. let arr = []
  1168. arr = patientArr
  1169. for (let i = 0; i < arr.length; i++) {
  1170. for (let j = 0; j < arr[i].schedules.length; j++) {
  1171. 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))) {
  1172. // 删除元素后改变i的值
  1173. arr[i].schedules.splice(j--, 1);
  1174. }
  1175. }
  1176. }
  1177. console.log("执行2",arr)
  1178. arr1 = arr
  1179. }
  1180. let arr2 = []
  1181. if(this.treatStateVal == 0){
  1182. arr2 = JSON.parse(JSON.stringify(arr1))
  1183. }else if(this.treatStateVal == 1){
  1184. let arr = []
  1185. arr = JSON.parse(JSON.stringify(arr1))
  1186. for (let i = 0; i < arr.length; i++) {
  1187. for (let j = 0; j < arr[i].schedules.length; j++) {
  1188. 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)) {
  1189. // 删除元素后改变i的值
  1190. arr[i].schedules.splice(j--, 1);
  1191. }
  1192. }
  1193. }
  1194. arr2 = arr
  1195. }
  1196. let arr3 = []
  1197. if(this.scheduleStateVal == 0){
  1198. arr3 = JSON.parse(JSON.stringify(arr2))
  1199. }else{
  1200. let arr = []
  1201. arr = JSON.parse(JSON.stringify(arr2))
  1202. for (let i = 0; i < arr.length; i++) {
  1203. for (let j = 0; j < arr[i].schedules.length; j++) {
  1204. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  1205. // 删除元素后改变i的值
  1206. arr[i].schedules.splice(j--, 1);
  1207. }
  1208. }
  1209. }
  1210. arr3 = arr
  1211. }
  1212. let arr4 = []
  1213. if(this.zoneVal == 0){
  1214. arr4 = JSON.parse(JSON.stringify(arr3))
  1215. }else{
  1216. let arr = []
  1217. arr = JSON.parse(JSON.stringify(arr3))
  1218. for (let i = 0; i < arr.length; i++) {
  1219. if (this.zoneVal != arr[i].zone_id) {
  1220. // 删除元素后改变i的值
  1221. arr.splice(i--, 1);
  1222. }
  1223. }
  1224. arr4 = arr
  1225. }
  1226. let newArr = []
  1227. arr4.map(item => {
  1228. newArr.push(...item.schedules)
  1229. })
  1230. this.tableData = newArr
  1231. let name = this.$route.query.patient_name
  1232. this.tableData.map((item,index) => {
  1233. if(name == item.patient.name){
  1234. if(item.assessment_before_dislysis != null){
  1235. this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
  1236. }
  1237. setTimeout(()=>{
  1238. this.$refs.tab.setCurrentRow(this.tableData[index]);
  1239. },10)
  1240. }
  1241. })
  1242. }else if(this.activeName == "second"){
  1243. for (let i = 0; i < patientArr.length; i++) {
  1244. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1245. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
  1246. // 删除元素后改变i的值
  1247. console.log("透析区",patientArr[i].schedules[j])
  1248. patientArr[i].schedules.splice(j--, 1);
  1249. }
  1250. }
  1251. }
  1252. let arr1 = []
  1253. console.log('patientArr',patientArr)
  1254. // let patientArr =
  1255. if(this.patientStateVal == 0){
  1256. arr1 = patientArr
  1257. }else if(this.patientStateVal == 3){
  1258. let arr = []
  1259. arr = patientArr
  1260. for (let i = 0; i <arr.length; i++) {
  1261. for (let j = 0; j < arr[i].schedules.length; j++) {
  1262. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1)) {
  1263. // 删除元素后改变i的值
  1264. arr[i].schedules.splice(j--, 1);
  1265. }
  1266. }
  1267. }
  1268. console.log("执行1",arr)
  1269. arr1 = arr
  1270. }else if(this.patientStateVal == 4){
  1271. let arr = []
  1272. arr = patientArr
  1273. for (let i = 0; i < arr.length; i++) {
  1274. for (let j = 0; j < arr[i].schedules.length; j++) {
  1275. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2)) {
  1276. // 删除元素后改变i的值
  1277. arr[i].schedules.splice(j--, 1);
  1278. }
  1279. }
  1280. }
  1281. console.log("执行2",arr)
  1282. arr1 = arr
  1283. }
  1284. let arr2 = []
  1285. if(this.treatStateVal == 0){
  1286. arr2 = JSON.parse(JSON.stringify(arr1))
  1287. }else if(this.treatStateVal == 2){
  1288. let arr = []
  1289. arr = JSON.parse(JSON.stringify(arr1))
  1290. for (let i = 0; i < arr.length; i++) {
  1291. for (let j = 0; j < arr[i].schedules.length; j++) {
  1292. if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
  1293. // 删除元素后改变i的值
  1294. arr[i].schedules.splice(j--, 1);
  1295. }
  1296. }
  1297. }
  1298. arr2 = arr
  1299. }
  1300. let arr3 = []
  1301. if(this.scheduleStateVal == 0){
  1302. arr3 = JSON.parse(JSON.stringify(arr2))
  1303. }else{
  1304. let arr = []
  1305. arr = JSON.parse(JSON.stringify(arr2))
  1306. for (let i = 0; i < arr.length; i++) {
  1307. for (let j = 0; j < arr[i].schedules.length; j++) {
  1308. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  1309. // 删除元素后改变i的值
  1310. arr[i].schedules.splice(j--, 1);
  1311. }
  1312. }
  1313. }
  1314. arr3 = arr
  1315. }
  1316. let arr4 = []
  1317. if(this.zoneVal == 0){
  1318. arr4 = JSON.parse(JSON.stringify(arr3))
  1319. }else{
  1320. let arr = []
  1321. arr = JSON.parse(JSON.stringify(arr3))
  1322. for (let i = 0; i < arr.length; i++) {
  1323. if (this.zoneVal != arr[i].zone_id) {
  1324. // 删除元素后改变i的值
  1325. arr.splice(i--, 1);
  1326. }
  1327. }
  1328. arr4 = arr
  1329. }
  1330. let newArr = []
  1331. arr4.map(item => {
  1332. newArr.push(...item.schedules)
  1333. })
  1334. this.tableData1 = newArr
  1335. let name = this.$route.query.patient_name
  1336. this.tableData1.map((item,index) => {
  1337. if(name == item.patient.name){
  1338. if(item.assessment_before_dislysis != null){
  1339. this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
  1340. }
  1341. setTimeout(()=>{
  1342. this.$refs.tab1.setCurrentRow(this.tableData1[index]);
  1343. },10)
  1344. }
  1345. })
  1346. }
  1347. }
  1348. },
  1349. }
  1350. </script>
  1351. <style style="stylesheet/scss" lang="scss" scoped>
  1352. .details-bg {
  1353. background: #fff;
  1354. margin: 0 15px;
  1355. }
  1356. .printForm {
  1357. .title {
  1358. font-size: 30px;
  1359. font-weight: 500;
  1360. text-align: center;
  1361. line-height: 60px;
  1362. }
  1363. .info {
  1364. ul {
  1365. display: -webkit-box;
  1366. display: -moz-box;
  1367. display: -ms-flexbox;
  1368. display: -webkit-flex;
  1369. display: flex;
  1370. align-items: center;
  1371. -moz-box-sizing: border-box;
  1372. -webkit-box-sizing: border-box;
  1373. -o-box-sizing: border-box;
  1374. -ms-box-sizing: border-box;
  1375. box-sizing: border-box;
  1376. -webkit-justify-content: space-around;
  1377. -moz-justify-content: space-around;
  1378. -ms-justify-content: space-around;
  1379. -o-justify-content: space-around;
  1380. justify-content: space-around;
  1381. li {
  1382. display: flex;
  1383. box-sizing: border-box;
  1384. justify-content: space-around;
  1385. .name {
  1386. }
  1387. .InputBox {
  1388. padding: 0;
  1389. border: none;
  1390. border-bottom: 1px #e5e5e5 solid;
  1391. width: 60px;
  1392. outline: none;
  1393. }
  1394. }
  1395. }
  1396. }
  1397. .printTable {
  1398. tr {
  1399. padding: 2px;
  1400. th {
  1401. padding: 6px 4px;
  1402. }
  1403. td {
  1404. padding: 6px 4px;
  1405. }
  1406. }
  1407. }
  1408. }
  1409. .loadingBox{
  1410. display: flex;
  1411. .patientBox{
  1412. background: #fff;
  1413. }
  1414. .tip1{
  1415. background: #4fc7cb;
  1416. border-radius: 5px;
  1417. text-align: center;
  1418. font-size: 12px;
  1419. display: inline-block;
  1420. width: 60px;
  1421. color: #fff;
  1422. }
  1423. .tip2{
  1424. background: #ee8556;
  1425. border-radius: 5px;
  1426. text-align: center;
  1427. font-size: 12px;
  1428. display: inline-block;
  1429. width: 60px;
  1430. color: #fff;
  1431. }
  1432. .tip3{
  1433. background: #409eff;
  1434. border-radius: 5px;
  1435. text-align: center;
  1436. font-size: 12px;
  1437. display: inline-block;
  1438. width: 60px;
  1439. color: #fff;
  1440. }
  1441. .tip4{
  1442. background: #a8b3ba;
  1443. border-radius: 5px;
  1444. text-align: center;
  1445. font-size: 12px;
  1446. display: inline-block;
  1447. width: 60px;
  1448. color: #fff;
  1449. }
  1450. .tip5{
  1451. background: #7bce91;
  1452. border-radius: 5px;
  1453. text-align: center;
  1454. font-size: 12px;
  1455. display: inline-block;
  1456. width: 60px;
  1457. color: #fff;
  1458. }
  1459. }
  1460. </style>
  1461. <style lang="scss">
  1462. .loadingBox{
  1463. .el-loading-spinner{
  1464. top:10%;
  1465. }
  1466. .el-button--small, .el-button--small.is-round{
  1467. padding:9px 10px;
  1468. }
  1469. .el-date-editor{
  1470. .el-input__inner{
  1471. padding-right:0px;
  1472. }
  1473. }
  1474. .el-table td, .el-table th{
  1475. text-align: center;
  1476. }
  1477. .el-table .cell{
  1478. padding: 0;
  1479. }
  1480. }
  1481. </style>