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

bloodPresssWatch.vue 35KB

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