bloodPresssWatch.vue 31KB

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