Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

index.vue 60KB

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