dialysisPrintOrder.vue 81KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <template v-if="org_template_info.template_id == 1">
  6. <el-button
  7. :loading="loading"
  8. size="small"
  9. icon="el-icon-printer"
  10. @click="printThisPage"
  11. type="primary"
  12. >打印</el-button
  13. >
  14. </template>
  15. <template
  16. v-if="
  17. org_template_info.template_id == 2 ||
  18. org_template_info.template_id == 0
  19. "
  20. >
  21. <div>
  22. <el-button
  23. :loading="loading"
  24. size="small"
  25. icon="el-icon-printer"
  26. @click="printThisPage"
  27. type="primary"
  28. >打印全部</el-button
  29. >
  30. <el-button
  31. :loading="loading"
  32. size="small"
  33. icon="el-icon-printer"
  34. @click="printThisOnePage"
  35. type="primary"
  36. >打印纪录单</el-button
  37. >
  38. <el-button
  39. :loading="loading"
  40. size="small"
  41. icon="el-icon-printer"
  42. @click="printThisTwoPage"
  43. type="primary"
  44. >打印医嘱单</el-button
  45. >
  46. </div>
  47. </template>
  48. <template v-if="org_template_info.template_id == 3">
  49. <el-button
  50. :loading="loading"
  51. size="small"
  52. icon="el-icon-printer"
  53. @click="printThisPage"
  54. type="primary"
  55. >打印</el-button
  56. >
  57. </template>
  58. <template v-if="org_template_info.template_id == 4">
  59. <el-button
  60. :loading="loading"
  61. size="small"
  62. icon="el-icon-printer"
  63. @click="printThisPage"
  64. type="primary"
  65. >打印</el-button
  66. >
  67. </template>
  68. <template v-if="org_template_info.template_id == 5">
  69. <div>
  70. <el-button
  71. :loading="loading"
  72. size="small"
  73. icon="el-icon-printer"
  74. @click="printThisPage"
  75. type="primary"
  76. >打印全部</el-button
  77. >
  78. <el-button
  79. :loading="loading"
  80. size="small"
  81. icon="el-icon-printer"
  82. @click="printThisOnePage"
  83. type="primary"
  84. >打印纪录单</el-button
  85. >
  86. <el-button
  87. :loading="loading"
  88. size="small"
  89. icon="el-icon-printer"
  90. @click="printThisTwoPage"
  91. type="primary"
  92. >打印医嘱单</el-button
  93. >
  94. </div>
  95. </template>
  96. <template
  97. v-if="
  98. org_template_info.template_id == 6 ||
  99. org_template_info.template_id == 10 ||
  100. org_template_info.template_id == 11
  101. "
  102. >
  103. <el-button
  104. :loading="loading"
  105. size="small"
  106. icon="el-icon-printer"
  107. @click="printThisPage"
  108. type="primary"
  109. >打印</el-button
  110. >
  111. </template>
  112. <template v-if="org_template_info.template_id == 7">
  113. <el-button
  114. :loading="loading"
  115. size="small"
  116. icon="el-icon-printer"
  117. @click="printThisPage"
  118. type="primary"
  119. >打印</el-button
  120. >
  121. </template>
  122. <template v-if="org_template_info.template_id == 8">
  123. <el-button
  124. :loading="loading"
  125. size="small"
  126. icon="el-icon-printer"
  127. @click="printThisPage"
  128. type="primary"
  129. >打印</el-button
  130. >
  131. </template>
  132. <template v-if="org_template_info.template_id == 9">
  133. <el-button
  134. :loading="loading"
  135. size="small"
  136. icon="el-icon-printer"
  137. @click="printThisPage"
  138. type="primary"
  139. >打印</el-button
  140. >
  141. </template>
  142. <template v-if="org_template_info.template_id == 12">
  143. <el-button
  144. :loading="loading"
  145. size="small"
  146. icon="el-icon-printer"
  147. @click="printThisPage"
  148. type="primary"
  149. >打印</el-button
  150. >
  151. </template>
  152. <template v-if="org_template_info.template_id == 13">
  153. <el-button
  154. :loading="loading"
  155. size="small"
  156. icon="el-icon-printer"
  157. @click="printThisPage"
  158. type="primary"
  159. >打印</el-button
  160. >
  161. </template>
  162. <template
  163. v-if="
  164. org_template_info.template_id == 14 ||
  165. org_template_info.template_id == 0
  166. "
  167. >
  168. <div>
  169. <el-button
  170. :loading="loading"
  171. size="small"
  172. icon="el-icon-printer"
  173. @click="printThisPage"
  174. type="primary"
  175. >打印全部</el-button
  176. >
  177. <el-button
  178. :loading="loading"
  179. size="small"
  180. icon="el-icon-printer"
  181. @click="printThisOnePage"
  182. type="primary"
  183. >打印纪录单</el-button
  184. >
  185. <el-button
  186. :loading="loading"
  187. size="small"
  188. icon="el-icon-printer"
  189. @click="printThisTwoPage"
  190. type="primary"
  191. >打印医嘱单</el-button
  192. >
  193. </div>
  194. </template>
  195. <template v-if="org_template_info.template_id == 15">
  196. <el-button
  197. :loading="loading"
  198. size="small"
  199. icon="el-icon-printer"
  200. @click="printThisPage"
  201. type="primary"
  202. >打印</el-button
  203. >
  204. </template>
  205. <template v-if="org_template_info.template_id == 16">
  206. <el-button
  207. :loading="loading"
  208. size="small"
  209. icon="el-icon-printer"
  210. @click="printThisPage"
  211. type="primary"
  212. >打印</el-button
  213. >
  214. </template>
  215. <template v-if="org_template_info.template_id == 17">
  216. <el-button
  217. :loading="loading"
  218. size="small"
  219. icon="el-icon-printer"
  220. @click="printThisPage"
  221. type="primary"
  222. >打印</el-button
  223. >
  224. </template>
  225. <template v-if="org_template_info.template_id == 18">
  226. <el-button
  227. :loading="loading"
  228. size="small"
  229. icon="el-icon-printer"
  230. @click="printThisPage"
  231. type="primary"
  232. >打印</el-button
  233. >
  234. </template>
  235. </div>
  236. <div class="app-container" style="min-height:0;">
  237. <!--<div class="order-print-btn"-->
  238. <!--v-loading="loading"-->
  239. <!--element-loading-text="加载中"-->
  240. <!--element-loading-spinner="el-icon-loading"-->
  241. <!--element-loading-background="rgba(0, 0, 0, 0.8)"-->
  242. <!--style="width: 100%;">-->
  243. <!--</div>-->
  244. <!--<dialysis-print-order-two :patientInfo="patientInfo" :receiverTreatmentAccess="receiverTreatmentAccess" :predialysis="predialysis"></dialysis-print-order-two>-->
  245. <el-container class="newContainer">
  246. <div style="width:270px;margin-right:20px;">
  247. <div class="cell clearfix" style="margin-bottom:10px;">
  248. <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 130px;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
  249. <el-input size="small" style="width:80px;" v-model.trim="search_input" class="filter-item"/>
  250. <el-button size="small" class="filter-item" type="primary" @click="searchAction">搜索</el-button>
  251. </div>
  252. <div class="cell clearfix" style="margin-bottom:10px;">
  253. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="width:130px;margin-right:10px;" @change="handleStateChange">
  254. <el-option
  255. v-for="item in patient_state"
  256. :key="item.value"
  257. :label="item.label"
  258. :value="item.value">
  259. </el-option>
  260. </el-select>
  261. <el-select v-model="treatStateVal" placeholder="全部治疗状态" style="width:130px;margin-right:10px;" @change="handleTreatChange">
  262. <el-option
  263. v-for="item in treat_state"
  264. :key="item.value"
  265. :label="item.label"
  266. :value="item.value">
  267. </el-option>
  268. </el-select>
  269. </div>
  270. <div class="cell clearfix" style="margin-bottom:10px;">
  271. <el-select v-model="scheduleStateVal" placeholder="班次" style="width:130px;margin-right:10px;" @change="handletimeType">
  272. <el-option
  273. v-for="item in schedule_options"
  274. :key="item.value"
  275. :label="item.label"
  276. :value="item.value">
  277. </el-option>
  278. </el-select>
  279. <el-select v-model="zoneVal" placeholder="分区" style="width:130px;margin-right:10px;" @change="handleZoneChange">
  280. <el-option
  281. v-for="item in zone_options"
  282. :key="item.id"
  283. :label="item.text"
  284. :value="item.id">
  285. </el-option>
  286. </el-select>
  287. </div>
  288. <div style="padding-right:20px;">
  289. <el-table
  290. ref="tab"
  291. @row-click="changePatient"
  292. highlight-current-row
  293. :data="tableData"
  294. height="480"
  295. border
  296. style="width: 100%">
  297. <el-table-column
  298. prop="date"
  299. label="患者"
  300. >
  301. <template slot-scope="scope">
  302. {{ scope.row.patient.name }}
  303. </template>
  304. </el-table-column>
  305. <el-table-column
  306. prop="name"
  307. label="透析号"
  308. >
  309. <template slot-scope="scope">
  310. {{ scope.row.patient.dialysis_no }}
  311. </template>
  312. </el-table-column>
  313. </el-table>
  314. </div>
  315. </div>
  316. <div class='dialysisPage' style="height: calc(100vh - 178px);overflow-x:auto;::-webkit-scrollbar:height:15px">
  317. <DialysisPrintOrderOne
  318. v-bind:childResponse="childResponse"
  319. v-if="org_template_info.template_id == 1"
  320. >
  321. </DialysisPrintOrderOne>
  322. <DialysisPrintOrderTwo
  323. v-bind:childResponse="childResponse"
  324. v-if="
  325. org_template_info.template_id == 2 ||
  326. org_template_info.template_id == 0
  327. "
  328. ></DialysisPrintOrderTwo>
  329. <DialysisPrintOrderThree
  330. v-bind:childResponse="childResponse"
  331. v-if="org_template_info.template_id == 3"
  332. >
  333. </DialysisPrintOrderThree>
  334. <DialysisPrintOrderFour
  335. v-bind:childResponse="childResponse"
  336. v-if="org_template_info.template_id == 4"
  337. >
  338. </DialysisPrintOrderFour>
  339. <DialysisPrintOrderFive
  340. v-bind:childResponse="childResponse"
  341. v-if="org_template_info.template_id == 5"
  342. >
  343. </DialysisPrintOrderFive>
  344. <DialysisPrintOrderSix
  345. v-bind:childResponse="childResponse"
  346. v-if="org_template_info.template_id == 6"
  347. >
  348. </DialysisPrintOrderSix>
  349. <DialysisPrintOrderSeven
  350. v-bind:childResponse="childResponse"
  351. v-if="org_template_info.template_id == 7"
  352. >
  353. </DialysisPrintOrderSeven>
  354. <DialysisPrintOrderEight
  355. v-bind:childResponse="childResponse"
  356. v-if="org_template_info.template_id == 8"
  357. >
  358. </DialysisPrintOrderEight>
  359. <!--<DialysisPrintOrderTen></DialysisPrintOrderTen>-->
  360. <DialysisPrintOrderTen
  361. v-bind:childResponse="childResponse"
  362. v-if="org_template_info.template_id == 10"
  363. ></DialysisPrintOrderTen>
  364. <DialysisPrintOrderNine
  365. v-bind:childResponse="childResponse"
  366. v-if="org_template_info.template_id == 9"
  367. ></DialysisPrintOrderNine>
  368. <DialysisPrintOrderEleven
  369. v-bind:childResponse="childResponse"
  370. v-if="org_template_info.template_id == 11"
  371. ></DialysisPrintOrderEleven>
  372. <DialysisPrintOrderTwelve
  373. v-bind:childResponse="childResponse"
  374. v-if="org_template_info.template_id == 12"
  375. ></DialysisPrintOrderTwelve>
  376. <DialysisPrintOrderThirteen
  377. v-bind:childResponse="childResponse"
  378. v-if="org_template_info.template_id == 13"
  379. ></DialysisPrintOrderThirteen>
  380. <DialysisPrintOrderFourteen
  381. v-bind:childResponse="childResponse"
  382. v-if="org_template_info.template_id == 14"
  383. ></DialysisPrintOrderFourteen>
  384. <DialysisPrintOrderFifteen
  385. v-bind:childResponse="childResponse"
  386. v-if="org_template_info.template_id == 15"
  387. ></DialysisPrintOrderFifteen>
  388. <DialysisPrintOrderSixteen
  389. v-bind:childResponse="childResponse"
  390. v-if="org_template_info.template_id == 16"
  391. ></DialysisPrintOrderSixteen>
  392. <DialysisPrintOrderSeventeen
  393. v-bind:childResponse="childResponse"
  394. v-if="org_template_info.template_id == 17"
  395. ></DialysisPrintOrderSeventeen>
  396. <DialysisPrintOrderEighteen
  397. v-bind:childResponse="childResponse"
  398. v-if="org_template_info.template_id == 18"
  399. ></DialysisPrintOrderEighteen>
  400. </div>
  401. </el-container>
  402. </div>
  403. </div>
  404. </template>
  405. <script>
  406. import {
  407. getDialysisRecordInitData,
  408. getDialysisSchedules
  409. } from "@/api/dialysis_record";
  410. import { parseTime } from "@/utils";
  411. import { getDialysisRecord } from "@/api/dialysis";
  412. import { getDataConfig } from "@/utils/data";
  413. import { jsGetAge, uParseTime } from "@/utils/tools";
  414. import LabelBox from "./printItem/LabelBox";
  415. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  416. import DialysisPrintOrderOne from "./template/dialysisPrintOrderOne";
  417. import DialysisPrintOrderTwo from "./template/dialysisPrintOrderTwo";
  418. import DialysisPrintOrderThree from "./template/dialysisPrintOrderThree";
  419. import DialysisPrintOrderFour from "./template/DialysisPrintOrderFour";
  420. import DialysisPrintOrderFive from "./template/DialysisPrintOrderFive";
  421. import DialysisPrintOrderSix from "./template/DialysisPrintOrderSix";
  422. import DialysisPrintOrderSeven from "./template/DialysisPrintOrderSeven";
  423. import DialysisPrintOrderEight from "./template/DialysisPrintOrderEight";
  424. import DialysisPrintOrderNine from "./template/DialysisPrintOrderNine";
  425. import print from "print-js";
  426. import DialysisPrintOrderTen from "./template/DialysisPrintOrderTen";
  427. import DialysisPrintOrderEleven from "./template/DialysisPrintOrderEleven";
  428. import DialysisPrintOrderTwelve from "./template/DialysisPrintOrderTwelve";
  429. import DialysisPrintOrderThirteen from "./template/DialysisPrintOrderThirteen";
  430. import DialysisPrintOrderFourteen from "./template/DialysisPrintOrderFourteen";
  431. import DialysisPrintOrderFifteen from "./template/DialysisPrintOrderFifteen";
  432. import DialysisPrintOrderSixteen from "./template/DialysisPrintOrderSixteen";
  433. import DialysisPrintOrderSeventeen from "./template/DialysisPrintOrderSeventeen";
  434. import DialysisPrintOrderEighteen from "./template/DialysisPrintOrderEighteen";
  435. export default {
  436. name: "dialysisPrintOrder",
  437. components: {
  438. DialysisPrintOrderEighteen,
  439. DialysisPrintOrderSeventeen,
  440. DialysisPrintOrderSixteen,
  441. DialysisPrintOrderFifteen,
  442. DialysisPrintOrderFourteen,
  443. DialysisPrintOrderThirteen,
  444. DialysisPrintOrderTwelve,
  445. DialysisPrintOrderEleven,
  446. DialysisPrintOrderTen,
  447. DialysisPrintOrderOne,
  448. DialysisPrintOrderTwo,
  449. DialysisPrintOrderThree,
  450. DialysisPrintOrderFour,
  451. DialysisPrintOrderFive,
  452. DialysisPrintOrderSix,
  453. DialysisPrintOrderSeven,
  454. DialysisPrintOrderEight,
  455. DialysisPrintOrderNine,
  456. LabelBox,
  457. BreadCrumb
  458. },
  459. data() {
  460. return {
  461. crumbs: [
  462. { path: false, name: "透析管理" },
  463. { path: false, name: "打印单" }
  464. ],
  465. childResponse: {},
  466. operators: [],
  467. adminUser: [],
  468. check: {},
  469. dialysisOrder: {
  470. DeviceNumber: []
  471. },
  472. operatorMaps: {},
  473. complications: [
  474. "低血压",
  475. "高血压",
  476. "心律失常",
  477. "头晕",
  478. "头痛",
  479. "呕吐",
  480. "抽搐",
  481. "出血",
  482. "心衰",
  483. "腹痛"
  484. ],
  485. jilurow: 0,
  486. advice_jilurow: 0,
  487. loading: false,
  488. orgname: "",
  489. patientInfo_gender_1: false,
  490. patientInfo_gender_2: false,
  491. patientInfo_source_2: false,
  492. patientInfo_source_1: false,
  493. modeOptions: {},
  494. replacementWays: [],
  495. perfusionApparatus: [],
  496. anticoagulantsConfit: {},
  497. bloodAccessParOpera: {},
  498. dialysateFormulationOptions: {},
  499. queryParams: {
  500. xtdate: "",
  501. xtno: ""
  502. },
  503. patientInfo: {
  504. birth: "",
  505. age: "",
  506. DialysisSchedule: {
  507. device_number: { number: "" },
  508. device_zone: { name: "" }
  509. },
  510. gender: 0
  511. },
  512. predialysis: {
  513. score: "",
  514. internal_fistula: "",
  515. internal_fistula_skin: "",
  516. catheter: "",
  517. blood_access_part_opera_name: ""
  518. },
  519. afterdialysis: {
  520. complications_index: ""
  521. },
  522. prescription: {
  523. dialysate_formulation_name: "",
  524. device: {}
  525. },
  526. advices: [],
  527. users: [],
  528. monitors: [],
  529. summary: {},
  530. receiverTreatmentAccess: {},
  531. org_template_info: {},
  532. doctor_advices: [],
  533. advice_groups: [],
  534. AlPanel: {
  535. id: 0,
  536. name: "",
  537. type: 1,
  538. shouji: 2,
  539. weichi: 2,
  540. zongliang: 2,
  541. gaimingcheng: -1,
  542. gaijiliang: -1,
  543. shouji_unit: "mg",
  544. weichi_unit: "mg/h",
  545. zongliang_unit: "mg",
  546. gaimingcheng_unit: "",
  547. gaijiliang_unit: ""
  548. },
  549. //
  550. tableData: [],
  551. selected_date: new Date(),
  552. // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
  553. search_keyword: '', // 确定用于搜索的关键字
  554. search_input: '', // 输入中的关键字
  555. patient_state:[
  556. {value: 0,label: '全部'},
  557. {value: 1,label: '已签到'},
  558. {value: 2,label: '未签到'},
  559. {value: 3,label: '已上机'},
  560. {value: 4,label: '已下机'},
  561. ],
  562. patientStateVal: 0,
  563. treat_state:[
  564. {value: 0,label: '全部'},
  565. {value: 1,label: '待开处方'},
  566. {value: 2,label: '待开小结'},
  567. ],
  568. treatStateVal: 0,
  569. schedule_options:[
  570. {value: 0,label: '全部'},
  571. {value: 1,label: '上午'},
  572. {value: 2,label: '下午'},
  573. {value: 3,label: '晚上'},
  574. ],
  575. scheduleStateVal: 0,
  576. zone_options:[
  577. { id: 0, text: '全部' }
  578. ],
  579. zoneVal:0,
  580. };
  581. },
  582. methods: {
  583. getAdminUser(id) {
  584. if (id == 0) {
  585. return "";
  586. }
  587. if (id == undefined) {
  588. return "";
  589. }
  590. for (let i = 0; i < this.adminUser.length; i++) {
  591. if (this.adminUser[i].id == id) {
  592. return this.adminUser[i].name;
  593. }
  594. }
  595. },
  596. getTime(value, temp) {
  597. if (value == 0) {
  598. return "";
  599. }
  600. if (value != undefined) {
  601. return uParseTime(value, temp);
  602. }
  603. return "";
  604. },
  605. printThisPage() {
  606. var ptime = Math.round(new Date().getTime() / 1000);
  607. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  608. const style =
  609. '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;} .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;} .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
  610. const style2 =
  611. '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1050px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}.table-box1 {border: 1px solid #000;width: 100%;line-height: 30px;font-size: 14px;border-collapse: collapse;}.table-box1 tr {border-bottom: 1px solid #000;}';
  612. const style3 =
  613. '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;} .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;} .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}.row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}';
  614. // const style3 =
  615. // '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 16px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 5px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 16px;padding: 5px 5px;line-height: 18px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:950px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top:1050px;left: 50%;}.print-yema5{position: absolute;top:1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
  616. //
  617. const style5 =
  618. '@media print {.dialysis-print-order {width: 960px; margin: 0 auto;}.dialysis-print-order .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.dialysis-print-order .order-title { margin: auto; font-weight: 600; text-align: center; font-size: 22px; padding: 10px 20px 0px 20px;}.dialysis-print-order .table-box { width: 100%; line-height: 18px; font-size: 14px;}.dialysis-print-order .print-table { width: 100%; text-align: center; border-collapse: collapse; line-height: 40px; font-size: 14px;}.dialysis-print-order .print-table-no { width: 100%; text-align: center; border-collapse: collapse; font-size: 14px;}.dialysis-print-order .under-line { border-bottom: 1px solid #999; width: 95%; text-align: center; margin-left: 2px;}.dialysis-print-order .title-box { text-align: center; font-size: 16px;}.dialysis-print-order .radio-lebel-box { font-weight: 400; cursor: pointer;}.dialysis-print-order .radio-no { opacity: 0; outline: none; position: absolute; margin: 0; width: 0; height: 0; z-index: -1;}.dialysis-print-order .radio-inner { white-space: nowrap; cursor: pointer; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle;}.dialysis-print-order .radio-fang { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 14px; background-color: #fff; z-index: 1; transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46), background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);}.dialysis-print-order .is-checked-radio::after { content: "√"; font-size: 15px;}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px;}.dialysis-print-order .print-table tr td { padding: 1px 1px; /*line-height: 25px;*/}.es-img { height: 25px;}.advice-name { text-align: left;}.advice-children { display: flex;}.title-box-pro { border: 0 #fff; line-height: 25px; height: 25px; text-align: left; padding-left: 10px !important;}.title-box-pro-tr { border: 0 #fff;}.text-align-left { text-align: left !important; padding-left: 10px !important; font-size: 14px !important; line-height: 25px;}.print-table-tr-new td {line-height: 20px !important;}.border-top-solid {border: solid 1px #000;}.print-template-two tr {line-height: 30px;}}';
  619. const style6 =
  620. '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:16px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:16px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:16px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;} .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;} .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
  621. if (this.org_template_info.template_id == 1) {
  622. printJS({
  623. printable: "dialysis-print-box",
  624. type: "html",
  625. style: style,
  626. scanStyles: false
  627. });
  628. } else if (
  629. this.org_template_info.template_id == 2 ||
  630. this.org_template_info.template_id == 0
  631. ) {
  632. printJS({
  633. printable: "dialysis-print-box-1",
  634. type: "html",
  635. style: style2,
  636. scanStyles: false
  637. });
  638. } else if (this.org_template_info.template_id == 3) {
  639. printJS({
  640. printable: "dialysis-print-box",
  641. type: "html",
  642. style: style,
  643. scanStyles: false
  644. });
  645. } else if (this.org_template_info.template_id == 4) {
  646. printJS({
  647. printable: "dialysis-print-box",
  648. type: "html",
  649. style: style,
  650. scanStyles: false
  651. });
  652. } else if (this.org_template_info.template_id == 5) {
  653. printJS({
  654. printable: "dialysis-print-box-1",
  655. type: "html",
  656. style: style2,
  657. scanStyles: false
  658. });
  659. } else if (
  660. this.org_template_info.template_id == 6 ||
  661. this.org_template_info.template_id == 10 ||
  662. this.org_template_info.template_id == 11
  663. ) {
  664. printJS({
  665. printable: "dialysis-print-box-1",
  666. type: "html",
  667. style: style2,
  668. scanStyles: false
  669. });
  670. } else if (this.org_template_info.template_id == 7) {
  671. printJS({
  672. printable: "dialysis-print-box",
  673. type: "html",
  674. style: style,
  675. scanStyles: false
  676. });
  677. } else if (this.org_template_info.template_id == 8) {
  678. printJS({
  679. printable: "dialysis-print-box",
  680. type: "html",
  681. style: style,
  682. scanStyles: false
  683. });
  684. } else if (this.org_template_info.template_id == 9) {
  685. printJS({
  686. printable: "dialysis-print-box",
  687. type: "html",
  688. style: style5,
  689. scanStyles: false
  690. });
  691. } else if (this.org_template_info.template_id == 12) {
  692. printJS({
  693. printable: "dialysis-print-box",
  694. type: "html",
  695. style: style,
  696. scanStyles: false
  697. });
  698. } else if (this.org_template_info.template_id == 13) {
  699. printJS({
  700. printable: "dialysis-print-box-1",
  701. type: "html",
  702. style: style3,
  703. scanStyles: false
  704. });
  705. } else if (this.org_template_info.template_id == 14){
  706. printJS({
  707. printable: "dialysis-print-box",
  708. type: "html",
  709. style: style,
  710. scanStyles: false
  711. });
  712. } else if (this.org_template_info.template_id == 15){
  713. printJS({
  714. printable: "dialysis-print-box",
  715. type: "html",
  716. style: style,
  717. scanStyles: false
  718. });
  719. } else if (this.org_template_info.template_id == 16){
  720. printJS({
  721. printable: "dialysis-print-box",
  722. type: "html",
  723. style: style,
  724. scanStyles: false
  725. });
  726. } else if (this.org_template_info.template_id == 17) {
  727. printJS({
  728. printable: "dialysis-print-box",
  729. type: "html",
  730. style: style6,
  731. scanStyles: false
  732. });
  733. } else if (this.org_template_info.template_id == 18) {
  734. printJS({
  735. printable: "dialysis-print-box",
  736. type: "html",
  737. style: style,
  738. scanStyles: false
  739. });
  740. }
  741. },
  742. printThisOnePage() {
  743. var ptime = Math.round(new Date().getTime() / 1000);
  744. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  745. const style =
  746. '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;} .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;} .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
  747. const style2 =
  748. '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:200px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
  749. if (this.org_template_info.template_id == 1) {
  750. printJS({
  751. printable: "dialysis-print-box",
  752. type: "html",
  753. style: style,
  754. scanStyles: false
  755. });
  756. } else if (
  757. this.org_template_info.template_id == 2 ||
  758. this.org_template_info.template_id == 0 ||
  759. this.org_template_info.template_id == 5
  760. ) {
  761. printJS({
  762. printable: "dialysis-print-box-1-1",
  763. type: "html",
  764. style: style2,
  765. scanStyles: false
  766. });
  767. } else if(this.org_template_info.template_id == 14){
  768. printJS({
  769. printable: "new-dialysis-1",
  770. type: "html",
  771. style: style,
  772. scanStyles: false
  773. });
  774. }
  775. },
  776. printThisTwoPage() {
  777. var ptime = Math.round(new Date().getTime() / 1000);
  778. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  779. const style =
  780. '@media print {.dialysis-print-order{width:960px;margin:0 auto}.dialysis-print-order .order-yy-name{margin:auto;text-align:center;font-size:20px;letter-spacing:5px}.dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px 20px 20px 20px}.dialysis-print-order .table-box{width:100%;line-height:23px;font-size:14px}.dialysis-print-order .print-table{width:100%;text-align:center;border-collapse:collapse;line-height:25px;font-size:14px}.dialysis-print-order .print-table-no{width:100%;text-align:center;border-collapse:collapse;font-size:14px}.dialysis-print-order .under-line{border-bottom:1px solid #999;width:95%;text-align:center;margin-left:2px}.dialysis-print-order .title-box{text-align:center;font-size:16px;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;display:inline-block;line-height:1;position:relative;vertical-align:middle}.dialysis-print-order .radio-fang{display:inline-block;position:relative;border:1px solid #000;box-sizing:border-box;width:14px;height:14px;background-color:#fff;z-index:1;transition:border-color .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.29,1.46)}.dialysis-print-order .is-checked-radio::after{content:"√";font-size:15px}}.dialysis-print-order .print-table-no tr td { padding: 8px 5px; line-height: 25px; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;} .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;} .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;}';
  781. const style2 =
  782. '@media print {.option_panel { margin: 0 5px 0 0; } .option_panel .check_box_panel { white-space: nowrap; outline: none; display: inline-block; line-height: 1; position: relative; vertical-align: middle; } .dialysis-print-order .order-title{margin:auto;font-weight:600;text-align:center;font-size:22px;padding:10px}.option_panel .check_box_panel .check_box { display: inline-block; position: relative; border: 1px solid #000; box-sizing: border-box; width: 14px; height: 12px; background-color: #fff; } .check_box_panel .did_checked::after { content: "√"; font-size: 15px; } .print_page_main_content {background-color: white;width: 960px;margin: 0 auto 50px;padding: 0 0 0 0; page-break-after: always;}.print_page_main_content .order-yy-name {margin: auto;text-align: center;font-size: 20px;letter-spacing: 5px;}.print_page_main_content .order_title {text-align: center;font-size: 23px; line-height: 50px;font-weight: 500;} .row {font-size: 14px;line-height: 20px;padding: 5px 0;}.inline_block { display: inline-block;}.under_line_two {display: inline-block;border-bottom: 1px solid #999;text-align: left;white-space: nowrap;width: 50%;}.under_line {display: inline-block;border-bottom: 1px solid #999;text-align: center;white-space: nowrap; width: 50%;}.flex {display: -webkit-box;display: -moz-box; display: -ms-flexbox; display: -webkit-flex;display: flex;align-items: center;-webkit-align-items: center;box-align: center;-moz-box-align: center;-webkit-box-align: center;text-align: center;-webkit-justify-content: space-between;justify-content: space-between;-moz-box-pack: space-between;-webkit--moz-box-pack: space-between;box-pack: space-between;}.print_page_main_content .proj_table {width: 100%;border: 1px solid;border-collapse: collapse;padding: 2px;}.print_page_main_content .proj_table tbody tr td {border: 1px solid;font-size: 16px;padding: 3px 8px;line-height: 30px;}.print_page_main_content .proj_table .inside_table {width: 100%;border: hidden; border-collapse: collapse;}.print_page_main_content .proj_table .inside_table tr td {border: 1px solid; text-align: center;font-size: 14px;padding: 6px 5px;line-height: 16px;}.print-table-no {width: 100%;text-align: center;border-collapse: collapse;font-size: 14px;}.es-img {height: 30px;}.advice-name {text-align: left !important;line-height: 16px !important;}.advice-children {display: flex;}}.margin-bottom-50{margin-bottom:50px;}.margin-bottom-300 {margin-bottom:450px;}.margin-bottom-600 {margin-bottom:600px;}.margin-bottom-900 {margin-bottom:900px;}.print-yema{ position: absolute;top: 920px;left: 50%;} .print-yema2{ position: absolute;top: 400px;left: 50%;}.print-yema3{position: absolute;top: 1230px;left: 50%;}.print-yema4{position: absolute;top: 1370px;left: 50%;}.check_box{width:15px !important;height:15px !important;}.did_checke::after {font-size: 8px;margin-left: 2px;margin-top: 12px !important;position: absolute;}';
  783. if (this.org_template_info.template_id == 1) {
  784. printJS({
  785. printable: "dialysis-print-box",
  786. type: "html",
  787. style: style,
  788. scanStyles: false
  789. });
  790. } else if (
  791. this.org_template_info.template_id == 2 ||
  792. this.org_template_info.template_id == 0 ||
  793. this.org_template_info.template_id == 5
  794. ) {
  795. printJS({
  796. printable: "dialysis-print-box-1-2",
  797. type: "html",
  798. style: style2,
  799. scanStyles: false
  800. });
  801. }else if(this.org_template_info.template_id == 14){
  802. printJS({
  803. printable: "new-dialysis-2",
  804. type: "html",
  805. style: style,
  806. scanStyles: false
  807. });
  808. }
  809. },
  810. getNumber() {
  811. if (this.dialysisOrder != null) {
  812. return (
  813. this.patientInfo.DialysisSchedule.device_zone.name +
  814. this.dialysisOrder.DeviceNumber.number
  815. );
  816. } else {
  817. return (
  818. this.patientInfo.DialysisSchedule.device_zone.name +
  819. this.patientInfo.DialysisSchedule.device_number.number
  820. );
  821. }
  822. },
  823. getXuserName(id) {
  824. if (id <= 0) {
  825. return "";
  826. }
  827. var name = "";
  828. if (this.users == null || typeof this.users.length === "undefined") {
  829. return name;
  830. }
  831. var leng = this.users.length;
  832. if (leng == 0) {
  833. return name;
  834. }
  835. for (let index = 0; index < leng; index++) {
  836. if (this.users[index].id == id) {
  837. name = this.users[index].name;
  838. break;
  839. }
  840. }
  841. return name;
  842. },
  843. setAdminUserES(id) {
  844. console.log(id);
  845. if (id == 0) {
  846. return "";
  847. }
  848. if (id in this.operatorMaps) {
  849. return this.operatorMaps[id].url;
  850. } else {
  851. return "";
  852. }
  853. },
  854. modeName(mode_id) {
  855. return typeof this.modeOptions[mode_id] !== "undefined" &&
  856. typeof this.modeOptions[mode_id].name !== "undefined"
  857. ? this.modeOptions[mode_id].name
  858. : "";
  859. },
  860. getDialysisRecord() {
  861. this.loading = true;
  862. getDialysisRecord(this.queryParams).then(response => {
  863. if (response.data.state == 1) {
  864. this.childResponse = response;
  865. this.org_template_info = response.data.data.org_template_info;
  866. this.loading = false;
  867. // this.adminUser = response.data.data.users
  868. // this.users = response.data.data.users
  869. // this.patientInfo = response.data.data.patientInfo
  870. // this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
  871. // // this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
  872. // if (response.data.data.patientInfo.first_dialysis_date != 0) {
  873. // this.patientInfo.first_dialysis_date = uParseTime(response.data.data.patientInfo.first_dialysis_date, '{y}-{m}-{d}')
  874. // } else {
  875. // this.patientInfo.first_dialysis_date = ''
  876. // }
  877. // this.check = response.data.data.check
  878. // this.predialysis = response.data.data.PredialysisEvaluation
  879. // this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(this.predialysis.blood_access_part_opera_id)
  880. // this.afterdialysis = response.data.data.AssessmentAfterDislysis
  881. // this.operators = response.data.data.operators
  882. // this.dialysisOrder = response.data.data.dialysisOrder === null ? null : response.data.data.dialysisOrder
  883. // if (this.operators.length > 0) {
  884. // var operatorsLen = this.operators.length
  885. // for (var index = 0; index < operatorsLen; index++) {
  886. // this.$set(this.operatorMaps, this.operators[index].creator, this.operators[index])
  887. // }
  888. // }
  889. // this.afterdialysis.txqnx = -1
  890. // if (this.afterdialysis.cruor.indexOf('0度') > -1) {
  891. // this.afterdialysis.txqnx = 0
  892. // }
  893. // if (this.afterdialysis.cruor.indexOf('Ⅰ度') > -1) {
  894. // this.afterdialysis.txqnx = 1
  895. // }
  896. // if (this.afterdialysis.cruor.indexOf('Ⅱ度') > -1) {
  897. // this.afterdialysis.txqnx = 2
  898. // }
  899. // if (this.afterdialysis.cruor.indexOf('Ⅲ度') > -1) {
  900. // this.afterdialysis.txqnx = 3
  901. // }
  902. // this.afterdialysis.complications = this.afterdialysis.complication.split(',')
  903. // this.afterdialysis.complications_other = []
  904. // this.afterdialysis.complications_index = []
  905. // var acllen = this.afterdialysis.complications.length
  906. // for (let index = 0; index < acllen; index++) {
  907. // if (this.complications.indexOf(this.afterdialysis.complications[index]) >= 0) {
  908. // this.afterdialysis.complications_index.push(this.afterdialysis.complications[index])
  909. // } else if (this.complications.indexOf(this.afterdialysis.complications[index]) < 0 && this.afterdialysis.complications_other.indexOf(this.afterdialysis.complications[index]) < 0) {
  910. // this.afterdialysis.complications_other.push(this.afterdialysis.complications[index])
  911. // }
  912. // }
  913. // this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(',')
  914. // this.prescription = response.data.data.dialysisPrescription
  915. // this.receiverTreatmentAccess = response.data.data.receiverTreatmentAccess
  916. // this.prescription.mode = this.modeName(this.prescription.mode_id)
  917. // var rwLen = this.replacementWays.length
  918. // this.prescription.replacement = ''
  919. // for (let index = 0; index < rwLen; index++) {
  920. // if (this.replacementWays[index].id == this.prescription.replacement_way) {
  921. // this.prescription.replacement = this.replacementWays[index].name
  922. // break
  923. // }
  924. // }
  925. // this.prescription.dialysate_formulation_name = this.dialysateFormulationName(this.prescription.dialysate_formulation)
  926. // var paLen = this.perfusionApparatus.length
  927. // this.prescription.perfusion_apparatus_name = ''
  928. // for (let index = 0; index < paLen; index++) {
  929. // if (this.perfusionApparatus[index].id == this.prescription.perfusion_apparatus) {
  930. // this.prescription.perfusion_apparatus_name = this.perfusionApparatus[index].name
  931. // break
  932. // }
  933. // }
  934. // var acLen = this.anticoagulantsConfit.length
  935. // var thisALID = this.prescription.anticoagulant
  936. // this.prescription.anticoagulant_name = ''
  937. // if (typeof (this.anticoagulantsConfit[thisALID]) !== 'undefined' && this.anticoagulantsConfit[thisALID] != null) {
  938. // this.prescription.anticoagulant_name = this.anticoagulantsConfit[thisALID].name
  939. // this.AlPanel = this.anticoagulantsConfit[thisALID]
  940. // }
  941. // this.advices = response.data.data.advices
  942. // this.monitors = response.data.data.monitors
  943. // this.summary = response.data.data.summary
  944. // this.org_template_info = response.data.data.org_template_info
  945. // if (this.monitors.length < 8) {
  946. // var nl = 8 - this.monitors.length
  947. // for (let index = 0; index < nl; index++) {
  948. // this.monitors.push([])
  949. // }
  950. // }
  951. // this.jilurow = this.monitors.length + 1
  952. // this.advice_jilurow = this.advices.length + 1
  953. // var childMap = {}
  954. // for (const index in this.advices) {
  955. // if (this.advices[index].parent_id == 0) {
  956. // continue
  957. // }
  958. // if (!(this.advices[index].parent_id in childMap)) {
  959. // childMap[this.advices[index].parent_id] = []
  960. // }
  961. // childMap[this.advices[index].parent_id].push(this.advices[index])
  962. // }
  963. // var advices = []
  964. // for (const index in this.advices) {
  965. // if (this.advices[index].parent_id > 0) {
  966. // continue
  967. // }
  968. // var item = this.advices[index]
  969. // if (item.id in childMap) {
  970. // item.children = childMap[item.id]
  971. // } else {
  972. // item.children = []
  973. // }
  974. // advices.push(item)
  975. // }
  976. // var leftAdvice = []
  977. // var rightAdvice = []
  978. // var adlen = advices.length
  979. // var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
  980. // for (var i = 0; i < halfLen; i++) {
  981. // leftAdvice.push(advices[i])
  982. // rightAdvice.push(advices[i + halfLen])
  983. // }
  984. // if (halfLen < 5) {
  985. // var nl = 5 - leftAdvice.length
  986. // for (let index = 0; index < nl; index++) {
  987. // leftAdvice.push([])
  988. // }
  989. // var nl = 5 - rightAdvice.length
  990. // for (let index = 0; index < nl; index++) {
  991. // rightAdvice.push([])
  992. // }
  993. // }
  994. // this.advices = []
  995. // for (var i = 0; i < halfLen; i++) {
  996. // var item = []
  997. // item.push(leftAdvice[i])
  998. // item.push(rightAdvice[i])
  999. // this.advices.push(item)
  1000. // }
  1001. // this.loading = false
  1002. // this.doctor_advices = response.data.data.advices == null ? [] : response.data.data.advices
  1003. // for (let index = 0; index < this.doctor_advices.length; index++) {
  1004. // this.doctor_advices[index]['isShow'] = 2
  1005. // }
  1006. // if (this.doctor_advices.length > 0) {
  1007. // var group = this.newAdviceGroupObject()
  1008. // var initGroupBlock = function(group, advice) {
  1009. // group.group_no = advice.groupno
  1010. // }
  1011. // for (let index = this.doctor_advices.length - 1; index >= 0; index--) {
  1012. // var new_advice_index = 0
  1013. // if ('children' in this.doctor_advices[index] && this.doctor_advices[index].children.length > 0) {
  1014. // new_advice_index = index + this.doctor_advices[index].children.length + 1
  1015. // var doctor_advice = {
  1016. // delivery_way: this.doctor_advices[index].delivery_way,
  1017. // execution_frequency: this.doctor_advices[index].execution_frequency,
  1018. // groupno: this.doctor_advices[index].groupno,
  1019. // id: this.doctor_advices[index].id,
  1020. // parent_id: this.doctor_advices[index].parent_id,
  1021. // children: this.doctor_advices[index].children,
  1022. // remark: this.doctor_advices[index].remark,
  1023. // execution_staff: this.doctor_advices[index].execution_staff,
  1024. // checker: this.doctor_advices[index].checker,
  1025. // advice_doctor: this.doctor_advices[index].advice_doctor,
  1026. // }
  1027. // doctor_advice['isShow'] = 1
  1028. // this.doctor_advices.splice(new_advice_index, 0, doctor_advice)
  1029. // // this.doctor_advices.push(doctor_advice)
  1030. // }
  1031. // }
  1032. // for (let index = 0; index < this.doctor_advices.length; index++) {
  1033. // const advice = this.doctor_advices[index]
  1034. // if (advice.groupno == 0) {
  1035. // // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
  1036. // if (advice.parent_id > 0) {
  1037. // if (this.advice_groups.length > 0) {
  1038. // var parent_group = this.advice_groups[
  1039. // this.advice_groups.length - 1
  1040. // ]
  1041. // if (parent_group.advices.length > 0) {
  1042. // if (parent_group.advices[0].id == advice.parent_id) {
  1043. // parent_group.advices.push(advice)
  1044. // }
  1045. // }
  1046. // }
  1047. // continue
  1048. // } else {
  1049. // if (group.group_no > 0) {
  1050. // this.advice_groups.push(group)
  1051. // group = this.newAdviceGroupObject()
  1052. // }
  1053. // initGroupBlock(group, advice)
  1054. // group.advices.push(advice)
  1055. // this.advice_groups.push(group)
  1056. // group = this.newAdviceGroupObject()
  1057. // continue
  1058. // }
  1059. // }
  1060. // if (group.group_no > 0 && group.group_no != advice.groupno) {
  1061. // this.advice_groups.push(group)
  1062. // group = this.newAdviceGroupObject()
  1063. // }
  1064. // if (group.group_no == 0) {
  1065. // initGroupBlock(group, advice)
  1066. // }
  1067. // if (group.group_no == advice.groupno) {
  1068. // group.advices.push(advice)
  1069. // }
  1070. // }
  1071. // if (group.group_no > 0) {
  1072. // // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
  1073. // this.advice_groups.push(group)
  1074. // }
  1075. // }
  1076. // console.log(this.advice_groups)
  1077. } else {
  1078. this.loading = false;
  1079. this.$message.error("请求数据失败");
  1080. return false;
  1081. }
  1082. });
  1083. },
  1084. bloodAccessParOperaName(id) {
  1085. if (id in this.bloodAccessParOpera) {
  1086. return this.bloodAccessParOpera[id].name;
  1087. }
  1088. return "";
  1089. },
  1090. dialysateFormulationName(id) {
  1091. if (id in this.dialysateFormulationOptions) {
  1092. return this.dialysateFormulationOptions[id].name;
  1093. }
  1094. return "";
  1095. },
  1096. getAge: function(val) {
  1097. if (
  1098. this.org_template_info.template_id == 2 ||
  1099. this.org_template_info.template_id == 0
  1100. ) {
  1101. if (val.age == 0) {
  1102. return jsGetAge(val.birth, "-");
  1103. } else {
  1104. return val.age;
  1105. }
  1106. } else {
  1107. return jsGetAge(val.birth, "-");
  1108. }
  1109. },
  1110. newAdviceGroupObject: function() {
  1111. return Object.assign(
  1112. {},
  1113. {
  1114. group_no: 0,
  1115. // advice_doctor: 0,
  1116. // start_time: 0,
  1117. advices: []
  1118. // exec_staff: 0,
  1119. // exec_time: 0,
  1120. // checker: 0,
  1121. }
  1122. );
  1123. },
  1124. //日期
  1125. handleScheduleDateChange: function() {
  1126. this.treatStateVal = 0
  1127. this.patientStateVal = 0
  1128. this.zoneVal = 0
  1129. this.scheduleStateVal = 0
  1130. this.search_keyword = this.search_input = ''
  1131. // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
  1132. // zone: this.zone_selected,
  1133. // schedule_type: this.schedule_type_selected,
  1134. // schedule_date: this.selected_date,
  1135. // })
  1136. this.requestDialysisSchedules()
  1137. },
  1138. //初始化数据
  1139. getInitData: function() {
  1140. getDialysisRecordInitData().then(rs => {
  1141. var resp = rs.data
  1142. if (resp.state == 1) {
  1143. var zones = resp.data.zones
  1144. var schedules = resp.data.schedules
  1145. var zone_options = [{ id: 0, text: '全部' }]
  1146. for (let z_i = 0; z_i < zones.length; z_i++) {
  1147. const zone = zones[z_i]
  1148. zone_options.push({ id: zone.id, text: zone.name })
  1149. }
  1150. this.zone_options = zone_options
  1151. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  1152. this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
  1153. this.getData()
  1154. } else {
  1155. this.$message.error(resp.msg)
  1156. }
  1157. })
  1158. },
  1159. // 班次
  1160. handletimeType: function(index) {
  1161. this.scheduleStateVal = index
  1162. // this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
  1163. this.search_keyword = this.search_input = ''
  1164. this.getData()
  1165. },
  1166. //分区
  1167. handleZoneChange: function(index) {
  1168. this.zoneVal = index
  1169. // this.$store.dispatch('SetZoneSelected', { zone_selected: index })
  1170. this.search_keyword = this.search_input = ''
  1171. this.getData()
  1172. },
  1173. //患者状态
  1174. handleStateChange: function(index) {
  1175. this.patientStateVal = index
  1176. // this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
  1177. this.search_keyword = this.search_input = ''
  1178. this.getData()
  1179. },
  1180. handleTreatChange: function(index) {
  1181. this.treatStateVal = index
  1182. // this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
  1183. this.search_keyword = this.search_input = ''
  1184. this.getData()
  1185. },
  1186. processedDialysisSchedules: function(schedules, zone_options) {
  1187. var zoneMap = {}
  1188. var scheduleMap = {}
  1189. for (let z_i = 0; z_i < zone_options.length; z_i++) {
  1190. const zone = zone_options[z_i]
  1191. if (zone.id == 0) {
  1192. continue
  1193. }
  1194. scheduleMap[zone.id] = []
  1195. }
  1196. for (let index = 0; index < schedules.length; index++) {
  1197. const schedule = schedules[index]
  1198. scheduleMap[schedule.device_number.zone.id].push(schedule)
  1199. }
  1200. var zone_schedules = []
  1201. for (let index = 0; index < zone_options.length; index++) {
  1202. const zone = zone_options[index]
  1203. if (zone.id == 0) {
  1204. continue
  1205. }
  1206. var schedules = scheduleMap[zone.id]
  1207. zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
  1208. }
  1209. return zone_schedules
  1210. },
  1211. searchAction: function() {
  1212. this.search_keyword = this.search_input
  1213. this.scheduleStateVal = 0
  1214. this.zoneVal = 0
  1215. this.treatStateVal = 0
  1216. this.patientStateVal = 0
  1217. if(this.search_input != ''){
  1218. let arr = []
  1219. this.filtedSchedules.map(item => {
  1220. arr.push(...item.schedules)
  1221. })
  1222. this.tableData = arr
  1223. }else{
  1224. this.getData()
  1225. }
  1226. },
  1227. requestDialysisSchedules: function() {
  1228. var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
  1229. getDialysisSchedules(ymd).then(rs => {
  1230. var resp = rs.data
  1231. if (resp.state == 1) {
  1232. var schedules = resp.data.schedules
  1233. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  1234. let newArr = []
  1235. this.zone_schedules.map(item => {
  1236. newArr.push(...item.schedules)
  1237. })
  1238. this.tableData = newArr
  1239. } else {
  1240. this.$message.error(resp.msg)
  1241. }
  1242. })
  1243. },
  1244. changePatient(schedual){
  1245. console.log(schedual)
  1246. var xtdate = parseTime(schedual.schedule_date, '{y}-{m}-{d}')
  1247. this.$router.push(
  1248. '/dialysis/print?xtdate=' + xtdate + '&xtno=' + schedual.patient.dialysis_no
  1249. )
  1250. // this.patient_id = schedual.patient_id;
  1251. // this.date = schedual.schedule_date;
  1252. // // this.getScheduleDetail();
  1253. // // this.getLongAdvice();
  1254. // var patient_id = schedual.patient_id;
  1255. // var date = schedual.schedule_date;
  1256. // this.$router.push({
  1257. // path: "/dialysis/details",
  1258. // query: {
  1259. // patient_id: patient_id,
  1260. // date: date,
  1261. // patient_name: schedual.patient.name
  1262. // }
  1263. // });
  1264. },
  1265. getData(){
  1266. let patientArr = []
  1267. patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  1268. console.log('patientArr',patientArr)
  1269. let arr1 = []
  1270. if(this.patientStateVal == 0){
  1271. arr1 = patientArr
  1272. console.log(arr1)
  1273. }else if(this.patientStateVal == 1){
  1274. let arr = []
  1275. arr = patientArr
  1276. for (let i = 0; i <arr.length; i++) {
  1277. for (let j = 0; j < arr[i].schedules.length; j++) {
  1278. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis == null || (arr[i].schedules[j].assessment_before_dislysis.weight_before == '' && arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure == '' && arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure == ''))) {
  1279. // 删除元素后改变i的值
  1280. arr[i].schedules.splice(j--, 1);
  1281. }
  1282. }
  1283. }
  1284. console.log("执行1",arr)
  1285. arr1 = arr
  1286. }else if(this.patientStateVal == 2){
  1287. let arr = []
  1288. arr = patientArr
  1289. for (let i = 0; i < arr.length; i++) {
  1290. for (let j = 0; j < arr[i].schedules.length; j++) {
  1291. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis != null && (arr[i].schedules[j].assessment_before_dislysis.weight_before != 0 || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure != 0 || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure != 0))) {
  1292. // 删除元素后改变i的值
  1293. console.log('几次')
  1294. arr[i].schedules.splice(j--, 1);
  1295. }
  1296. }
  1297. }
  1298. console.log("执行2",arr)
  1299. arr1 = arr
  1300. }else if(this.patientStateVal == 3){
  1301. let arr = []
  1302. arr = patientArr
  1303. for (let i = 0; i <arr.length; i++) {
  1304. for (let j = 0; j < arr[i].schedules.length; j++) {
  1305. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order == null || (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1))) {
  1306. // 删除元素后改变i的值
  1307. arr[i].schedules.splice(j--, 1);
  1308. }
  1309. }
  1310. }
  1311. console.log("执行1",arr)
  1312. arr1 = arr
  1313. }else if(this.patientStateVal == 4){
  1314. let arr = []
  1315. arr = patientArr
  1316. for (let i = 0; i < arr.length; i++) {
  1317. for (let j = 0; j < arr[i].schedules.length; j++) {
  1318. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order == null || (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2))) {
  1319. // 删除元素后改变i的值
  1320. arr[i].schedules.splice(j--, 1);
  1321. }
  1322. }
  1323. }
  1324. console.log("执行2",arr)
  1325. arr1 = arr
  1326. }
  1327. let arr2 = []
  1328. if(this.treatStateVal == 0){
  1329. arr2 = JSON.parse(JSON.stringify(arr1))
  1330. }else if(this.treatStateVal == 1){
  1331. let arr = []
  1332. arr = JSON.parse(JSON.stringify(arr1))
  1333. for (let i = 0; i < arr.length; i++) {
  1334. for (let j = 0; j < arr[i].schedules.length; j++) {
  1335. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].prescription != null || arr[i].schedules[j].prescription != null ? arr[i].schedules[j].prescription.creater != 0 : false)) {
  1336. // 删除元素后改变i的值
  1337. arr[i].schedules.splice(j--, 1);
  1338. }
  1339. }
  1340. }
  1341. arr2 = arr
  1342. }else if(this.treatStateVal == 2){
  1343. let arr = []
  1344. arr = JSON.parse(JSON.stringify(arr1))
  1345. for (let i = 0; i < arr.length; i++) {
  1346. for (let j = 0; j < arr[i].schedules.length; j++) {
  1347. if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
  1348. // 删除元素后改变i的值
  1349. arr[i].schedules.splice(j--, 1);
  1350. }
  1351. }
  1352. }
  1353. arr2 = arr
  1354. }
  1355. let arr3 = []
  1356. if(this.scheduleStateVal == 0){
  1357. arr3 = JSON.parse(JSON.stringify(arr2))
  1358. }else{
  1359. let arr = []
  1360. arr = JSON.parse(JSON.stringify(arr2))
  1361. for (let i = 0; i < arr.length; i++) {
  1362. for (let j = 0; j < arr[i].schedules.length; j++) {
  1363. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  1364. // 删除元素后改变i的值
  1365. arr[i].schedules.splice(j--, 1);
  1366. }
  1367. }
  1368. }
  1369. arr3 = arr
  1370. console.log("上午",arr)
  1371. }
  1372. let arr4 = []
  1373. if(this.zoneVal == 0){
  1374. arr4 = JSON.parse(JSON.stringify(arr3))
  1375. }else{
  1376. let arr = []
  1377. arr = JSON.parse(JSON.stringify(arr3))
  1378. for (let i = 0; i < arr.length; i++) {
  1379. if (this.zoneVal != arr[i].zone_id) {
  1380. // 删除元素后改变i的值
  1381. arr.splice(i--, 1);
  1382. }
  1383. }
  1384. arr4 = arr
  1385. }
  1386. let newArr = []
  1387. arr4.map(item => {
  1388. newArr.push(...item.schedules)
  1389. })
  1390. this.tableData = newArr
  1391. console.log('table',this.tableData)
  1392. },
  1393. },
  1394. watch: {
  1395. "patientInfo.gender": function() {
  1396. if (this.patientInfo.gender == 1) {
  1397. this.patientInfo_gender_1 = true;
  1398. this.patientInfo_gender_2 = false;
  1399. } else if (this.patientInfo.gender == 2) {
  1400. this.patientInfo_gender_2 = true;
  1401. this.patientInfo_gender_1 = false;
  1402. } else {
  1403. this.patientInfo_gender_2 = false;
  1404. this.patientInfo_gender_1 = false;
  1405. }
  1406. },
  1407. "patientInfo.source": function() {
  1408. if (this.patientInfo.source == 1) {
  1409. this.patientInfo_source_1 = true;
  1410. this.patientInfo_source_2 = false;
  1411. } else if (this.patientInfo.source == 2) {
  1412. this.patientInfo_source_2 = true;
  1413. this.patientInfo_source_1 = false;
  1414. } else {
  1415. this.patientInfo_source_2 = false;
  1416. this.patientInfo_source_1 = false;
  1417. }
  1418. }
  1419. },
  1420. created() {
  1421. this.getInitData();
  1422. var xtuser = this.$store.getters.xt_user;
  1423. this.orgname = xtuser.org.org_name;
  1424. // this.orgname = "遂溪方济医院";
  1425. this.modeOptions = this.$store.getters.treatment_mode;
  1426. this.replacementWays = this.$store.getters.replacement_ways;
  1427. this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
  1428. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
  1429. // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
  1430. var bloodAccessParOpera = getDataConfig(
  1431. "hemodialysis",
  1432. "vascular_access_desc"
  1433. );
  1434. for (var key in bloodAccessParOpera) {
  1435. this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
  1436. bloodAccessParOpera[key];
  1437. }
  1438. var dialysateFormulationOptions = getDataConfig(
  1439. "hemodialysis",
  1440. "dialysate_formulation"
  1441. );
  1442. for (var key in dialysateFormulationOptions) {
  1443. this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
  1444. dialysateFormulationOptions[key];
  1445. }
  1446. const xtdate = this.$route.query && this.$route.query.xtdate;
  1447. const xtno = this.$route.query && this.$route.query.xtno;
  1448. if (
  1449. typeof xtdate === "string" &&
  1450. xtdate.length > 0 &&
  1451. typeof xtno === "string" &&
  1452. xtno.length > 0
  1453. ) {
  1454. this.queryParams.xtdate = xtdate;
  1455. this.queryParams.xtno = xtno;
  1456. this.getDialysisRecord();
  1457. } else {
  1458. this.$message.error("参数不齐");
  1459. return false;
  1460. }
  1461. },
  1462. computed:{
  1463. filtedSchedules: function() {
  1464. var search_keyword = this.search_keyword
  1465. if (search_keyword.length > 0) {
  1466. var schedules = []
  1467. for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  1468. const scheduleInfo = this.zone_schedules[o_i]
  1469. var originSchedules = scheduleInfo.schedules
  1470. if (originSchedules.length == 0) {
  1471. continue
  1472. }
  1473. var filtedSchedules = []
  1474. for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  1475. const schedule = originSchedules[s_i]
  1476. if (schedule.patient.name.indexOf(search_keyword) != -1) {
  1477. filtedSchedules.push(schedule)
  1478. // break
  1479. }
  1480. }
  1481. if (filtedSchedules.length > 0) {
  1482. schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  1483. }
  1484. }
  1485. return schedules
  1486. }
  1487. }
  1488. },
  1489. };
  1490. </script>
  1491. <style>
  1492. .dialysis-print-order {
  1493. width: 960px;
  1494. margin: 0 auto;
  1495. }
  1496. .dialysis-print-order .order-yy-name {
  1497. margin: auto;
  1498. text-align: center;
  1499. font-size: 20px;
  1500. letter-spacing: 5px;
  1501. }
  1502. .dialysis-print-order .order-title {
  1503. margin: auto;
  1504. font-weight: 600;
  1505. text-align: center;
  1506. font-size: 22px;
  1507. padding: 10px;
  1508. }
  1509. .dialysis-print-order .table-box {
  1510. width: 100%;
  1511. line-height: 23px;
  1512. font-size: 14px;
  1513. }
  1514. .dialysis-print-order .print-table {
  1515. width: 100%;
  1516. text-align: center;
  1517. border-collapse: collapse;
  1518. line-height: 40px;
  1519. font-size: 14px;
  1520. }
  1521. .dialysis-print-order .print-table-no {
  1522. width: 100%;
  1523. text-align: center;
  1524. border-collapse: collapse;
  1525. font-size: 14px;
  1526. }
  1527. .dialysis-print-order .under-line {
  1528. border-bottom: 1px solid #999;
  1529. width: 95%;
  1530. text-align: center;
  1531. margin-left: 2px;
  1532. }
  1533. .dialysis-print-order .title-box {
  1534. text-align: center;
  1535. font-size: 16px;
  1536. }
  1537. .dialysis-print-order .radio-lebel-box {
  1538. font-weight: 400;
  1539. cursor: pointer;
  1540. }
  1541. .dialysis-print-order .radio-no {
  1542. opacity: 0;
  1543. outline: none;
  1544. position: absolute;
  1545. margin: 0;
  1546. width: 0;
  1547. height: 0;
  1548. z-index: -1;
  1549. }
  1550. .dialysis-print-order .radio-inner {
  1551. white-space: nowrap;
  1552. cursor: pointer;
  1553. outline: none;
  1554. display: inline-block;
  1555. line-height: 1;
  1556. position: relative;
  1557. vertical-align: middle;
  1558. }
  1559. .dialysis-print-order .radio-fang {
  1560. display: inline-block;
  1561. position: relative;
  1562. border: 1px solid #000;
  1563. box-sizing: border-box;
  1564. width: 14px;
  1565. height: 14px;
  1566. background-color: #fff;
  1567. z-index: 1;
  1568. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  1569. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  1570. }
  1571. .dialysis-print-order .is-checked-radio::after {
  1572. content: "√";
  1573. font-size: 15px;
  1574. }
  1575. .dialysis-print-order .print-table-no tr td {
  1576. padding: 8px 5px;
  1577. line-height: 25px;
  1578. }
  1579. .dialysis-print-order .print-table tr td {
  1580. padding: 1px 1px;
  1581. /*line-height: 25px;*/
  1582. }
  1583. .es-img {
  1584. height: 30px;
  1585. }
  1586. .advice-name {
  1587. text-align: left;
  1588. }
  1589. .advice-children {
  1590. display: flex;
  1591. }
  1592. .title-box-pro {
  1593. border: 0 #fff;
  1594. line-height: 25px;
  1595. height: 25px;
  1596. text-align: left;
  1597. padding-left: 10px !important;
  1598. }
  1599. .title-box-pro-tr {
  1600. border: 0 #fff;
  1601. }
  1602. .text-align-left {
  1603. text-align: left !important;
  1604. padding-left: 10px !important;
  1605. font-size: 14px !important;
  1606. line-height: 25px;
  1607. }
  1608. .print-table-tr-new td {
  1609. line-height: 20px !important;
  1610. }
  1611. .border-top-solid {
  1612. border: solid 1px #000;
  1613. }
  1614. .print-template-two tr {
  1615. line-height: 30px;
  1616. }
  1617. .table-box1 {
  1618. border: 1px solid #000;
  1619. width: 100%;
  1620. line-height: 30px;
  1621. font-size: 14px;
  1622. border-collapse: collapse;
  1623. }
  1624. .table-box1 tr {
  1625. border-bottom: 1px solid #000;
  1626. }
  1627. </style>
  1628. <style lang="scss">
  1629. .newContainer{
  1630. .dialysisPage::-webkit-scrollbar {
  1631. height: 15px;
  1632. }
  1633. .el-date-editor{
  1634. .el-input__inner{
  1635. padding-right:0px;
  1636. }
  1637. }
  1638. .el-table td, .el-table th{
  1639. text-align: center;
  1640. }
  1641. }
  1642. .newContainer::-webkit-scrollbar{
  1643. height: 15px !important;
  1644. }
  1645. </style>