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

bloodPresssWatch.vue 35KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <template v-if="this.template_id == 1">
  6. <el-button
  7. size="small"
  8. icon="el-icon-printer"
  9. :disabled="selecting_schs.length == 0"
  10. @click="batchPrintAction"
  11. type="primary"
  12. >打印</el-button
  13. >
  14. </template>
  15. <template v-if="this.template_id == 2 || this.template_id == 0 || this.template_id == 33">
  16. <div>
  17. <el-button
  18. :loading="loading"
  19. size="small"
  20. icon="el-icon-printer"
  21. @click="batchPrintAction"
  22. type="primary"
  23. >打印全部</el-button
  24. >
  25. <el-button
  26. :loading="loading"
  27. size="small"
  28. icon="el-icon-printer"
  29. @click="batchPrintActionOne"
  30. type="primary"
  31. style=""
  32. >打印记录单</el-button
  33. >
  34. <el-button
  35. :loading="loading"
  36. size="small"
  37. icon="el-icon-printer"
  38. @click="batchPrintActionTwo"
  39. type="primary"
  40. >打印医嘱单</el-button
  41. >
  42. </div>
  43. </template>
  44. <template v-if="this.template_id == 3">
  45. <el-button
  46. size="small"
  47. icon="el-icon-printer"
  48. :disabled="selecting_schs.length == 0"
  49. @click="batchPrintAction"
  50. type="primary"
  51. >打印</el-button
  52. >
  53. </template>
  54. <template v-if="this.template_id == 4">
  55. <el-button
  56. size="small"
  57. icon="el-icon-printer"
  58. :disabled="selecting_schs.length == 0"
  59. @click="batchPrintAction"
  60. type="primary"
  61. >打印</el-button
  62. >
  63. </template>
  64. <template v-if="this.template_id == 5">
  65. <div>
  66. <el-button
  67. :loading="loading"
  68. size="small"
  69. icon="el-icon-printer"
  70. @click="batchPrintAction"
  71. type="primary"
  72. >打印全部</el-button
  73. >
  74. <el-button
  75. :loading="loading"
  76. size="small"
  77. icon="el-icon-printer"
  78. @click="batchPrintActionOne"
  79. type="primary"
  80. style=""
  81. >打印记录单</el-button
  82. >
  83. <el-button
  84. :loading="loading"
  85. size="small"
  86. icon="el-icon-printer"
  87. @click="batchPrintActionTwo"
  88. type="primary"
  89. >打印医嘱单</el-button
  90. >
  91. </div>
  92. </template>
  93. <template v-if="this.template_id == 6 || this.template_id == 48 || this.template_id == 0">
  94. <el-button
  95. size="small"
  96. icon="el-icon-printer"
  97. :disabled="selecting_schs.length == 0"
  98. @click="batchPrintAction"
  99. type="primary"
  100. >打印</el-button
  101. >
  102. </template>
  103. <template v-if="this.template_id == 7">
  104. <el-button
  105. size="small"
  106. icon="el-icon-printer"
  107. :disabled="selecting_schs.length == 0"
  108. @click="batchPrintAction"
  109. type="primary"
  110. >批量打印</el-button
  111. >
  112. </template>
  113. <template v-if="this.template_id == 8">
  114. <el-button
  115. size="small"
  116. icon="el-icon-printer"
  117. :disabled="selecting_schs.length == 0"
  118. @click="batchPrintAction"
  119. type="primary"
  120. >批量打印</el-button
  121. >
  122. </template>
  123. <template v-if="this.template_id == 9">
  124. <el-button
  125. size="small"
  126. icon="el-icon-printer"
  127. :disabled="selecting_schs.length == 0"
  128. @click="batchPrintAction"
  129. type="primary"
  130. >批量打印</el-button
  131. >
  132. </template>
  133. <template v-if="this.template_id == 12">
  134. <el-button
  135. size="small"
  136. icon="el-icon-printer"
  137. :disabled="selecting_schs.length == 0"
  138. @click="batchPrintAction"
  139. type="primary"
  140. >批量打印</el-button
  141. >
  142. </template>
  143. <template v-if="this.template_id == 13">
  144. <el-button
  145. size="small"
  146. icon="el-icon-printer"
  147. :disabled="selecting_schs.length == 0"
  148. @click="batchPrintAction"
  149. type="primary"
  150. >批量打印</el-button
  151. >
  152. </template>
  153. <template v-if="this.template_id == 15">
  154. <el-button
  155. size="small"
  156. icon="el-icon-printer"
  157. :disabled="selecting_schs.length == 0"
  158. @click="batchPrintAction"
  159. type="primary"
  160. >批量打印</el-button
  161. >
  162. </template>
  163. <template v-if="this.template_id == 17">
  164. <el-button
  165. size="small"
  166. icon="el-icon-printer"
  167. :disabled="selecting_schs.length == 0"
  168. @click="batchPrintAction"
  169. type="primary"
  170. >批量打印</el-button
  171. >
  172. </template>
  173. <template v-if="this.template_id == 20">
  174. <el-button
  175. size="small"
  176. icon="el-icon-printer"
  177. :disabled="selecting_schs.length == 0"
  178. @click="batchPrintAction"
  179. type="primary"
  180. >批量打印</el-button
  181. >
  182. </template>
  183. <template v-if="this.template_id == 22">
  184. <div>
  185. <el-button
  186. :loading="loading"
  187. size="small"
  188. icon="el-icon-printer"
  189. @click="batchPrintAction"
  190. type="primary"
  191. >打印全部</el-button
  192. >
  193. <el-button
  194. :loading="loading"
  195. size="small"
  196. icon="el-icon-printer"
  197. @click="batchPrintActionOne"
  198. type="primary"
  199. style=""
  200. >打印记录单</el-button
  201. >
  202. <el-button
  203. :loading="loading"
  204. size="small"
  205. icon="el-icon-printer"
  206. @click="batchPrintActionTwo"
  207. type="primary"
  208. >打印医嘱单</el-button
  209. >
  210. </div>
  211. </template>
  212. <template v-if="this.template_id == 25">
  213. <el-button
  214. size="small"
  215. icon="el-icon-printer"
  216. :disabled="selecting_schs.length == 0"
  217. @click="batchPrintAction"
  218. type="primary"
  219. >批量打印</el-button
  220. >
  221. </template>
  222. <template v-if="this.template_id == 28">
  223. <el-button
  224. size="small"
  225. icon="el-icon-printer"
  226. :disabled="selecting_schs.length == 0"
  227. @click="batchPrintAction"
  228. type="primary"
  229. >批量打印</el-button
  230. >
  231. </template>
  232. <template v-if="this.template_id == 30">
  233. <el-button
  234. size="small"
  235. icon="el-icon-printer"
  236. :disabled="selecting_schs.length == 0"
  237. @click="batchPrintAction"
  238. type="primary"
  239. >批量打印</el-button
  240. >
  241. </template>
  242. <template v-if="this.template_id == 32">
  243. <el-button
  244. size="small"
  245. icon="el-icon-printer"
  246. :disabled="selecting_schs.length == 0"
  247. @click="batchPrintAction"
  248. type="primary"
  249. >批量打印</el-button
  250. >
  251. </template>
  252. <template v-if="this.template_id == 37">
  253. <el-button
  254. size="small"
  255. icon="el-icon-printer"
  256. :disabled="selecting_schs.length == 0"
  257. @click="batchPrintAction"
  258. type="primary"
  259. >批量打印</el-button
  260. >
  261. </template>
  262. <template v-if="this.template_id == 38">
  263. <el-button
  264. size="small"
  265. icon="el-icon-printer"
  266. :disabled="selecting_schs.length == 0"
  267. @click="batchPrintAction"
  268. type="primary"
  269. >批量打印</el-button
  270. >
  271. </template>
  272. <template v-if="this.template_id == 39">
  273. <el-button
  274. size="small"
  275. icon="el-icon-printer"
  276. :disabled="selecting_schs.length == 0"
  277. @click="batchPrintAction"
  278. type="primary"
  279. >批量打印</el-button
  280. >
  281. </template>
  282. <template v-if="this.template_id == 40">
  283. <el-button
  284. size="small"
  285. icon="el-icon-printer"
  286. :disabled="selecting_schs.length == 0"
  287. @click="batchPrintAction"
  288. type="primary"
  289. >批量打印</el-button
  290. >
  291. </template>
  292. <template v-if="this.template_id == 41">
  293. <el-button
  294. size="small"
  295. icon="el-icon-printer"
  296. :disabled="selecting_schs.length == 0"
  297. @click="batchPrintAction"
  298. type="primary"
  299. >批量打印</el-button
  300. >
  301. </template>
  302. <template v-if="this.template_id == 43">
  303. <el-button
  304. size="small"
  305. icon="el-icon-printer"
  306. :disabled="selecting_schs.length == 0"
  307. @click="batchPrintAction"
  308. type="primary"
  309. >批量打印</el-button
  310. >
  311. </template>
  312. <template v-if="this.template_id == 47">
  313. <el-button
  314. size="small"
  315. icon="el-icon-printer"
  316. :disabled="selecting_schs.length == 0"
  317. @click="batchPrintAction"
  318. type="primary"
  319. >批量打印</el-button
  320. >
  321. </template>
  322. </div>
  323. <div class="app-container">
  324. <!-- <div class="filter-container">
  325. <el-input style="width: 400px;" v-model="searchKey" class="filter-item"/>
  326. <el-button class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
  327. </div>-->
  328. <div class="cell clearfix">
  329. <label class="title">
  330. <span class="name">{{
  331. search_mode == 1 ? "日期查询" : "病人查询"
  332. }}</span>
  333. :
  334. </label>
  335. <el-date-picker
  336. v-show="search_mode == 1"
  337. v-model="time"
  338. prefix-icon="el-icon-date"
  339. @change="changeTime"
  340. :editable="false"
  341. style="width: 250px;"
  342. type="date"
  343. placeholder="选择日期时间"
  344. align="right"
  345. :picker-options="pickerOptions1"
  346. format="yyyy-MM-dd"
  347. value-format="timestamp"
  348. ></el-date-picker>
  349. <el-input
  350. v-show="search_mode == 2"
  351. v-model="patient_search_keyword"
  352. style="width: 250px;"
  353. placeholder="病人名字、透析号"
  354. @keyup.enter.native='searchPatientAction'
  355. >
  356. <el-button
  357. slot="append"
  358. style="background-color: #409EFF; color: white; border-radius: 0;"
  359. icon="el-icon-search"
  360. @click="searchPatientAction"
  361. ></el-button>
  362. </el-input>
  363. <el-button type="primary" @click="changeSearchMode">{{
  364. search_mode == 1 ? "改为病人查询" : "改为日期查询"
  365. }}</el-button>
  366. </div>
  367. <div class="cell clearfix" v-show="search_mode == 2">
  368. <label class="title">
  369. <span class="name">日期查询</span>:
  370. </label>
  371. <el-date-picker
  372. v-model="listQuery.start_time"
  373. prefix-icon="el-icon-date"
  374. @change="changeStartTime"
  375. style="width: 250px;"
  376. type="date"
  377. placeholder="选择日期时间"
  378. align="right"
  379. :picker-options="pickerOptions1"
  380. format="yyyy-MM-dd"
  381. value-format="timestamp"
  382. ></el-date-picker>
  383. -
  384. <el-date-picker
  385. v-model="listQuery.end_time"
  386. prefix-icon="el-icon-date"
  387. @change="changeEndTime"
  388. style="width: 250px;"
  389. type="date"
  390. placeholder="选择日期时间"
  391. align="right"
  392. :picker-options="pickerOptions1"
  393. format="yyyy-MM-dd"
  394. value-format="timestamp"
  395. ></el-date-picker>
  396. </div>
  397. <div class="cell clearfix">
  398. <label class="title"> <span class="name">排班班次</span> : </label>
  399. <div class="time">
  400. <ul class>
  401. <li
  402. :class="item.value == schedulType ? 'active' : ''"
  403. @click="selectSchedulType(item.value)"
  404. v-for="item in schedulArr"
  405. :key="item.value"
  406. >
  407. {{ item.label }}
  408. </li>
  409. </ul>
  410. </div>
  411. </div>
  412. <div class="cell clearfix">
  413. <label class="title"> <span class="name">分区</span> : </label>
  414. <div class="time">
  415. <ul class>
  416. <li
  417. :class="item.id == partitionType ? 'active' : ''"
  418. @click="selectPartitionType(item.id)"
  419. v-for="item in partitionArr"
  420. :key="item.id"
  421. >
  422. {{ item.name }}
  423. </li>
  424. </ul>
  425. </div>
  426. </div>
  427. <el-table
  428. :row-style="{ color: '#303133' }"
  429. :header-cell-style="{
  430. backgroundColor: 'rgb(245, 247, 250)',
  431. color: '#606266'
  432. }"
  433. :data="SchedualPatientsTableData"
  434. style="width: 100%"
  435. v-loading="loading"
  436. @current-change="clickCurrent"
  437. @selection-change="handleSelectionChange"
  438. >
  439. <el-table-column
  440. type="selection"
  441. width="45"
  442. align="center"
  443. ></el-table-column>
  444. <el-table-column
  445. prop="number"
  446. label="机号"
  447. align="center"
  448. ></el-table-column>
  449. <el-table-column
  450. label="排班日期"
  451. prop="sch_time"
  452. align="center"
  453. width="120"
  454. ></el-table-column>
  455. <el-table-column
  456. prop="start_time"
  457. label="上机时间"
  458. align="center"
  459. width="80"
  460. ></el-table-column>
  461. <el-table-column
  462. prop="dialysis_no"
  463. label="透析号"
  464. align="center"
  465. ></el-table-column>
  466. <el-table-column prop="name" label="姓名" align="center">
  467. <template slot-scope="scope">
  468. <span style="color: #579ef8;width:100%;display:block;">{{ scope.row.name }}</span>
  469. </template>
  470. </el-table-column>
  471. <el-table-column
  472. prop="mode_name"
  473. label="透析模式"
  474. align="center"
  475. width="100"
  476. ></el-table-column>
  477. <el-table-column
  478. prop="target_ultrafiltration"
  479. label="目标超滤量"
  480. align="center"
  481. width="100"
  482. ></el-table-column>
  483. <el-table-column
  484. prop="dialysis_before_weight"
  485. label="透前称重(kg)"
  486. align="center"
  487. width="120"
  488. ></el-table-column>
  489. <el-table-column
  490. prop="dialysis_after_weight"
  491. label="透后称重(kg)"
  492. align="center"
  493. width="120"
  494. ></el-table-column>
  495. <el-table-column label="透中血压(mmHg)" align="center">
  496. <el-table-column
  497. v-for="(item, index) in labelArr"
  498. :key="index"
  499. :label="item"
  500. align="center"
  501. >
  502. <!-- 数据的遍历 scope.row就代表数据的每一个对象-->
  503. <template slot-scope="scope">
  504. <span v-if="getValue(scope.row.bp[index])>=90 && getValue(scope.row.bp[index])<=140">{{getValue(scope.row.bp[index])}}</span>
  505. <span v-if="getValue(scope.row.bp[index])<90 || getValue(scope.row.bp[index]) >140" style="color:red">{{getValue(scope.row.bp[index])}}</span>
  506. <span v-if="getValueOne(scope.row.bp[index])>0">/</span>
  507. <span v-if="getValueOne(scope.row.bp[index])>=60 && getValueOne(scope.row.bp[index])<=90">{{getValueOne(scope.row.bp[index])}}</span>
  508. <span v-if="getValueOne(scope.row.bp[index]) <60 || getValueOne(scope.row.bp[index])>90" style="color:red">{{getValueOne(scope.row.bp[index])}}</span>
  509. </template>
  510. </el-table-column>
  511. </el-table-column>
  512. </el-table>
  513. <el-pagination
  514. align="right"
  515. @size-change="handleSizeChange"
  516. @current-change="handleCurrentChange"
  517. :page-sizes="[20, 40, 60, 80,100]"
  518. :page-size="10"
  519. background
  520. style="margin-top:20px;"
  521. layout="total, sizes, prev, pager, next, jumper"
  522. :total="total"
  523. ></el-pagination>
  524. </div>
  525. </div>
  526. </template>
  527. <script>
  528. import { getSchedualPatient, GetAllZone } from "@/api/dialysis";
  529. import { parseTime } from "@/utils";
  530. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  531. import { getPrintTemplate } from "@/api/data";
  532. export default {
  533. name: "Patient",
  534. data() {
  535. return {
  536. crumbs: [
  537. { path: false, name: "透析管理" },
  538. { path: false, name: "透析监测" }
  539. ],
  540. loading: false,
  541. time: "",
  542. search_mode: 1, // 搜索模式 1.日期搜索 2.病人搜索
  543. patient_search_keyword: "",
  544. SchedualPatientsTableData: [],
  545. active: true,
  546. schedulType: 0,
  547. schedulArr: [
  548. { value: 0, label: "全部" },
  549. { value: 1, label: "上午" },
  550. { value: 2, label: "下午" },
  551. { value: 3, label: "晚上" }
  552. ],
  553. template_id: 0,
  554. partitionType: 0,
  555. labelArr: ["第1次", "第2次", "第3次", "第4次", "第5次", "第6次", "第7次"],
  556. pickerOptions1: {
  557. shortcuts: [
  558. {
  559. text: "今天",
  560. onClick(picker) {
  561. var date = new Date();
  562. var year = date.getFullYear();
  563. var month = date.getMonth() + 1;
  564. var day = date.getDate();
  565. if (month < 10) {
  566. month = "0" + month;
  567. }
  568. if (day < 10) {
  569. day = "0" + day;
  570. }
  571. var nowDate = year + "-" + month + "-" + day;
  572. var date1 = new Date(nowDate + " 00:00:00");
  573. picker.$emit("pick", date1.getTime());
  574. }
  575. },
  576. {
  577. text: "昨天",
  578. onClick(picker) {
  579. var d = new Date();
  580. d.setTime(d.getTime() - 3600 * 1000 * 24);
  581. var date = d;
  582. var year = date.getFullYear();
  583. var month = date.getMonth() + 1;
  584. var day = date.getDate();
  585. if (month < 10) {
  586. month = "0" + month;
  587. }
  588. if (day < 10) {
  589. day = "0" + day;
  590. }
  591. var nowDate = year + "-" + month + "-" + day;
  592. var date1 = new Date(nowDate + " 00:00:00");
  593. picker.$emit("pick", date1.getTime());
  594. }
  595. },
  596. {
  597. text: "一周前",
  598. onClick(picker) {
  599. var d = new Date();
  600. d.setTime(d.getTime() - 3600 * 1000 * 24 * 7);
  601. var date = d;
  602. var year = date.getFullYear();
  603. var month = date.getMonth() + 1;
  604. var day = date.getDate();
  605. if (month < 10) {
  606. month = "0" + month;
  607. }
  608. if (day < 10) {
  609. day = "0" + day;
  610. }
  611. var nowDate = year + "-" + month + "-" + day;
  612. var date1 = new Date(nowDate + " 00:00:00");
  613. picker.$emit("pick", date1.getTime());
  614. }
  615. },
  616. {
  617. text: "清空",
  618. onClick(picker) {
  619. picker.$emit("pick");
  620. }
  621. }
  622. ]
  623. },
  624. total: 0,
  625. listQuery: {
  626. page: 1,
  627. limit: 20,
  628. schedul_type: 0,
  629. partition_type: 0,
  630. schedul_time: "",
  631. keywords: "",
  632. start_time:"",
  633. end_time:"",
  634. },
  635. selecting_schs: [],
  636. partitionArr: [],
  637. };
  638. },
  639. created() {
  640. var search_mode = this.$store.getters.search_mode
  641. var search_value = this.$store.getters.search_value
  642. console.log('search_mode',search_mode)
  643. if(search_mode == 2){
  644. this.search_mode = search_mode
  645. if(search_value != ''){
  646. this.patient_search_keyword = search_value
  647. this.listQuery.keywords = search_value
  648. this.getSchedualPatientList();
  649. var date = new Date();
  650. this.time = date;
  651. var year = date.getFullYear();
  652. var month = date.getMonth() + 1;
  653. var day = date.getDate();
  654. if (month < 10) {
  655. month = "0" + month;
  656. }
  657. if (day < 10) {
  658. day = "0" + day;
  659. }
  660. var nowDate = year + "-" + month + "-" + day;
  661. var date = new Date(nowDate + " 00:00:00");
  662. this.listQuery.schedul_time = date.getTime();
  663. this.getAllZone();
  664. this.getTemplateInfo();
  665. }
  666. }else {
  667. var date = new Date();
  668. this.time = date;
  669. var year = date.getFullYear();
  670. var month = date.getMonth() + 1;
  671. var day = date.getDate();
  672. if (month < 10) {
  673. month = "0" + month;
  674. }
  675. if (day < 10) {
  676. day = "0" + day;
  677. }
  678. var nowDate = year + "-" + month + "-" + day;
  679. var date = new Date(nowDate + " 00:00:00");
  680. this.listQuery.schedul_time = date.getTime();
  681. this.getAllZone();
  682. this.getSchedualPatientList();
  683. this.getTemplateInfo();
  684. }
  685. // this.template_id = this.$store.getters.xt_user.template_info.template_id;
  686. },
  687. methods: {
  688. getTemplateInfo() {
  689. getPrintTemplate().then(response => {
  690. if (response.data.state == 0) {
  691. this.$message.error(response.data.msg);
  692. return false;
  693. } else {
  694. var template = response.data.data.template;
  695. this.template_id = template.template_id;
  696. }
  697. });
  698. },
  699. clickCurrent(val) {
  700. console.log(val);
  701. this.$router.push({
  702. path: "/dialysis/details",
  703. query: { patient_id: val.patient_id, date: val.sch_time_int,mode_id:val.mode_id }
  704. });
  705. },
  706. handleSelectionChange(val) {
  707. this.selecting_schs = val;
  708. },
  709. selectSchedulType(scheduleType) {
  710. // alert(scheduleType);/
  711. this.schedulType = scheduleType;
  712. this.listQuery.schedul_type = scheduleType;
  713. this.getSchedualPatientList();
  714. },
  715. selectPartitionType(partitionType) {
  716. this.partitionType = partitionType;
  717. this.listQuery.partition_type = partitionType;
  718. this.getSchedualPatientList();
  719. },
  720. changeTime() {
  721. this.listQuery.schedul_time = this.time;
  722. this.getSchedualPatientList();
  723. },
  724. changeStartTime(){
  725. this.getSchedualPatientList()
  726. },
  727. changeEndTime(){
  728. this.getSchedualPatientList()
  729. },
  730. getAllZone: function() {
  731. GetAllZone().then(response => {
  732. if (response.data.state == 0) {
  733. this.$message.error(response.data.msg);
  734. return false;
  735. } else {
  736. this.partitionArr = response.data.data.zone;
  737. this.partitionArr.unshift({ id: 0, name: "全部" });
  738. }
  739. });
  740. },
  741. getSchedualPatientList: function() {
  742. this.loading = true;
  743. if (this.search_mode == 1) {
  744. this.listQuery.keywords = "";
  745. } else {
  746. this.listQuery.schedul_time = "";
  747. }
  748. console.log("params332322332323232",this.listQuery)
  749. this.SchedualPatientsTableData = [];
  750. getSchedualPatient(this.listQuery).then(response => {
  751. if (response.data.state == 0) {
  752. this.loading = false;
  753. this.$message.error(response.data.msg);
  754. return false;
  755. } else {
  756. this.loading = false;
  757. this.total = response.data.data.total;
  758. // console.log(response.data.data)
  759. for (let i = 0; i < response.data.data.schedule.length; i++) {
  760. if (response.data.data.schedule[i].patient&&response.data.data.schedule[i].patient.id > 0) {
  761. const SchedualPatientsTable = {
  762. bp: []
  763. };
  764. if(response.data.data.schedule[i].dialysis_order!=null){
  765. SchedualPatientsTable["start_time"] = response.data.data.schedule[i].dialysis_order.start_time ? parseTime(response.data.data.schedule[i].dialysis_order.start_time,"{h}:{i}") : '';
  766. }
  767. SchedualPatientsTable["sch_id"] = response.data.data.schedule[i].id;
  768. SchedualPatientsTable["sch_time_int"] = response.data.data.schedule[i].schedule_date;
  769. SchedualPatientsTable["sch_time"] = parseTime(response.data.data.schedule[i].schedule_date,"{y}-{m}-{d}");
  770. SchedualPatientsTable["mode_id"] = response.data.data.schedule[i].mode_id
  771. if(response.data.data.schedule[i].patient!=null){
  772. SchedualPatientsTable["dialysis_no"] = response.data.data.schedule[i].patient.dialysis_no;
  773. SchedualPatientsTable["name"] = response.data.data.schedule[i].patient.name;
  774. SchedualPatientsTable["gender"] = response.data.data.schedule[i].patient.gender;
  775. SchedualPatientsTable["source"] = response.data.data.schedule[i].patient.source;
  776. SchedualPatientsTable["patient_id"] = response.data.data.schedule[i].patient_id;
  777. }
  778. SchedualPatientsTable["number"] = response.data.data.schedule[i].device_number.number;
  779. if(response.data.data.schedule[i].treatment_mode!=null){
  780. SchedualPatientsTable["mode_name"] = response.data.data.schedule[i].treatment_mode.name;
  781. }
  782. if(response.data.data.schedule[i].prescription!=null){
  783. SchedualPatientsTable["target_ultrafiltration"] = response.data.data.schedule[i].prescription.target_ultrafiltration;
  784. }
  785. if (response.data.data.schedule[i].assessment_before_dislysis != null) {
  786. SchedualPatientsTable["dialysis_before_weight"] =response.data.data.schedule[i].assessment_before_dislysis.weight_before;
  787. }
  788. if (response.data.data.schedule[i].assessment_after_dislysis !=null) {
  789. SchedualPatientsTable["dialysis_after_weight"] =response.data.data.schedule[i].assessment_after_dislysis.weight_after;
  790. }
  791. SchedualPatientsTable.bp = [];
  792. if(response.data.data.schedule[i].monitoring_record && response.data.data.schedule[i].monitoring_record.length > 0){
  793. for (let a = 0;a < response.data.data.schedule[i].monitoring_record.length;a++) {
  794. const bp = {};
  795. bp["value"] =response.data.data.schedule[i].monitoring_record[a].systolic_blood_pressure.toString()+"/" +response.data.data.schedule[i].monitoring_record[a].diastolic_blood_pressure.toString();
  796. SchedualPatientsTable.bp.push(bp);
  797. }
  798. }
  799. this.SchedualPatientsTableData.push(SchedualPatientsTable);
  800. }
  801. }
  802. }
  803. });
  804. },
  805. getValue: function(val) {
  806. if (val != undefined) {
  807. var str = val.value.split("/")
  808. return str[0];
  809. } else {
  810. return "";
  811. }
  812. },
  813. getValueOne: function(val) {
  814. if (val != undefined) {
  815. var str = val.value.split("/")
  816. return str[1];
  817. } else {
  818. return "";
  819. }
  820. },
  821. handleCurrentChange(val) {
  822. this.listQuery.page = val;
  823. this.getSchedualPatientList();
  824. },
  825. changeSearchMode: function() {
  826. if (this.search_mode == 1) {
  827. this.search_mode = 2;
  828. } else {
  829. this.search_mode = 1;
  830. var date = new Date();
  831. this.time = date;
  832. var year = date.getFullYear();
  833. var month = date.getMonth() + 1;
  834. var day = date.getDate();
  835. if (month < 10) {
  836. month = "0" + month;
  837. }
  838. if (day < 10) {
  839. day = "0" + day;
  840. }
  841. var nowDate = year + "-" + month + "-" + day;
  842. var date = new Date(nowDate + " 00:00:00");
  843. this.listQuery.schedul_time = date.getTime();
  844. this.getAllZone();
  845. this.getSchedualPatientList();
  846. this.getTemplateInfo();
  847. }
  848. this.$store.dispatch('SetSearchMode', this.search_mode)
  849. },
  850. searchPatientAction: function() {
  851. this.listQuery.keywords = this.patient_search_keyword;
  852. this.$store.dispatch('SetSearchValue', this.patient_search_keyword)
  853. console.log(this.patient_search_keyword);
  854. if (this.patient_search_keyword.length == 0) {
  855. return;
  856. }
  857. this.getSchedualPatientList();
  858. },
  859. handleSizeChange(val) {
  860. this.listQuery.limit = val;
  861. this.getSchedualPatientList();
  862. },
  863. batchPrintAction: function() {
  864. if (this.selecting_schs.length === 0) {
  865. this.$message.error("请至少选择一条需要打印的内容");
  866. return false;
  867. }
  868. // 模板ID为6
  869. var sch_ids = [];
  870. for (let index = 0; index < this.selecting_schs.length; index++) {
  871. sch_ids.push(this.selecting_schs[index].sch_id);
  872. }
  873. console.log("sch_ids",sch_ids)
  874. this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
  875. if (this.template_id == 2 || this.template_id == 0) {
  876. this.$router.push({ path: "/dialysis/print/batch/other" });
  877. } else if (this.template_id == 1) {
  878. this.$router.push({ path: "/dialysis/print/batch" });
  879. } else if (this.template_id == 3) {
  880. this.$router.push({ path: "/dialysis/print/batch/three" });
  881. } else if (this.template_id == 4) {
  882. this.$router.push({ path: "/dialysis/print/batch/four" });
  883. } else if (this.template_id == 5) {
  884. this.$router.push({ path: "/dialysis/print/batch/five" });
  885. } else if (this.template_id == 6) {
  886. this.$router.push({ path: "/dialysis/print/batch/six" });
  887. } else if (this.template_id == 7) {
  888. this.$router.push({ path: "/dialysis/print/batch/seven" });
  889. } else if (this.template_id == 8) {
  890. this.$router.push({ path: "/dialysis/print/batch/eight" });
  891. } else if (this.template_id == 9) {
  892. this.$router.push({ path: "/dialysis/print/batch/nine" });
  893. } else if (this.template_id == 12) {
  894. this.$router.push({ path: "/dialysis/print/batch/twelve" });
  895. } else if (this.template_id == 13) {
  896. this.$router.push({ path: "/dialysis/print/batch/thirteen" });
  897. } else if (this.template_id == 15) {
  898. this.$router.push({ path: "/dialysis/print/batch/fifteen" });
  899. } else if (this.template_id == 17) {
  900. this.$router.push({ path: "/dialysis/print/batch/seventeen" });
  901. } else if (this.template_id == 20) {
  902. this.$router.push({ path: "/dialysis/print/batch/twenty" });
  903. } else if (this.template_id == 22) {
  904. this.$router.push({ path: "/dialysis/print/batch/twentyTwo" });
  905. } else if (this.template_id == 25) {
  906. this.$router.push({ path: "/dialysis/print/batch/twentyFive" });
  907. }else if(this.template_id == 28){
  908. this.$router.push({path:"/dialysis/print/batch/twentyEight"})
  909. } else if (this.template_id == 30) {
  910. this.$router.push({ path: "/dialysis/print/batch/thirty" });
  911. } else if (this.template_id == 32) {
  912. this.$router.push({ path: "/dialysis/print/batch/thirtyTwo" });
  913. } else if (this.template_id == 33) {
  914. this.$router.push({ path: "/dialysis/print/batch/thirtyThree" });
  915. } else if (this.template_id == 37) {
  916. this.$router.push({ path: "/dialysis/print/batch/thirtySeven" });
  917. } else if (this.template_id == 38) {
  918. this.$router.push({ path: "/dialysis/print/batch/thirtyEight" });
  919. } else if (this.template_id == 39) {
  920. this.$router.push({ path: "/dialysis/print/batch/thirtyNine" });
  921. } else if (this.template_id == 40) {
  922. this.$router.push({ path: "/dialysis/print/batch/forty" });
  923. } else if (this.template_id == 41) {
  924. this.$router.push({ path: "/dialysis/print/batch/fortyOne" });
  925. } else if (this.template_id == 43) {
  926. this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
  927. } else if (this.template_id == 47) {
  928. this.$router.push({ path: "/dialysis/print/batch/fortyThree" });
  929. } else if (this.template_id == 48) {
  930. this.$router.push({ path: "/dialysis/print/batch/six" });
  931. }
  932. },
  933. batchPrintActionOne: function() {
  934. if (this.selecting_schs.length === 0) {
  935. this.$message.error("请至少选择一条需要打印的内容");
  936. return false;
  937. }
  938. var sch_ids = [];
  939. for (let index = 0; index < this.selecting_schs.length; index++) {
  940. sch_ids.push(this.selecting_schs[index].sch_id);
  941. }
  942. this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
  943. if (this.template_id == 2 || this.template_id == 0) {
  944. this.$router.push({ path: "/dialysis/print/batch/otherone" });
  945. } else if (this.template_id == 1) {
  946. this.$router.push({ path: "/dialysis/print/batch" });
  947. } else if (this.template_id == 5) {
  948. this.$router.push({ path: "/dialysis/print/batch/fiveone" });
  949. } else if (this.template_id == 22) {
  950. this.$router.push({ path: "/dialysis/print/batch/twentyTwo_one" });
  951. } else if(this.template_id == 33){
  952. this.$router.push({ path: "/dialysis/print/batch/thirtyThree_one" });
  953. }
  954. },
  955. batchPrintActionTwo: function() {
  956. if (this.selecting_schs.length === 0) {
  957. this.$message.error("请至少选择一条需要打印的内容");
  958. return false;
  959. }
  960. var sch_ids = [];
  961. for (let index = 0; index < this.selecting_schs.length; index++) {
  962. sch_ids.push(this.selecting_schs[index].sch_id);
  963. }
  964. this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
  965. if (this.template_id == 2 || this.template_id == 0) {
  966. this.$router.push({ path: "/dialysis/print/batch/othertwo" });
  967. } else if (this.template_id == 1) {
  968. this.$router.push({ path: "/dialysis/print/batch" });
  969. } else if (this.template_id == 5) {
  970. this.$router.push({ path: "/dialysis/print/batch/fivetwo" });
  971. } else if (this.template_id == 22) {
  972. this.$router.push({ path: "/dialysis/print/batch/twentyTwo_two" });
  973. } else if (this.template_id == 33) {
  974. this.$router.push({ path: "/dialysis/print/batch/thirtyThree_two" });
  975. }
  976. }
  977. },
  978. components: {
  979. BreadCrumb
  980. }
  981. };
  982. </script>
  983. <style rel="stylesheet/scss" lang="scss" scoped>
  984. .app-container {
  985. // margin: 20px;
  986. font-size: 15px;
  987. .filter-container {
  988. padding-bottom: 5px;
  989. }
  990. .cqd-dataTitle {
  991. color: #303133;
  992. font-size: 14px;
  993. border-bottom: 2px #e4e7ed solid;
  994. height: 36px;
  995. line-height: 36px;
  996. margin: 0 0 25px 0;
  997. position: relative;
  998. }
  999. .cqd-dataTitle::before {
  1000. position: absolute;
  1001. left: 0;
  1002. bottom: -2px;
  1003. content: "";
  1004. width: 42px;
  1005. height: 2px;
  1006. background: #409eff;
  1007. }
  1008. .search-component {
  1009. width: 500px;
  1010. .searchBox {
  1011. width: 300px;
  1012. height: 36px;
  1013. line-height: 36px;
  1014. padding-left: 15px;
  1015. border: 1px #dcdfe6 solid;
  1016. border-right: none;
  1017. outline: none;
  1018. float: left;
  1019. border-radius: 6px 0 0 6px;
  1020. font-size: 14px;
  1021. color: #333;
  1022. background: #fff;
  1023. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  1024. }
  1025. .searchBtn {
  1026. background-color: #409eff;
  1027. color: #fff;
  1028. font-size: 15px;
  1029. text-align: center;
  1030. height: 36px;
  1031. line-height: 36px;
  1032. float: left;
  1033. outline: none;
  1034. width: 70px;
  1035. border: none;
  1036. border-radius: 0 6px 6px 0;
  1037. font-family: "Microsoft Yahei";
  1038. cursor: pointer;
  1039. }
  1040. }
  1041. .amount {
  1042. font-weight: normal;
  1043. padding: 10px 0 0 0;
  1044. color: #606266;
  1045. font-size: 14px;
  1046. span {
  1047. color: #ef2525;
  1048. font-family: "Arial";
  1049. padding: 0 2px;
  1050. }
  1051. }
  1052. }
  1053. .el-table td,
  1054. .el-table th.is-leaf,
  1055. .el-table--border,
  1056. .el-table--group {
  1057. border-color: #d0d3da;
  1058. }
  1059. .el-table--border::after,
  1060. .el-table--group::after,
  1061. .el-table::before {
  1062. background-color: #d0d3da;
  1063. }
  1064. .el-checkbox__inner::after {
  1065. height: 10px;
  1066. left: 7px;
  1067. }
  1068. .el-checkbox__inner {
  1069. width: 20px;
  1070. height: 20px;
  1071. }
  1072. </style>