dialysisPrintOrder.vue 79KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733
  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. if (this.org_template_info.template_id == 1) {
  620. printJS({
  621. printable: "dialysis-print-box",
  622. type: "html",
  623. style: style,
  624. scanStyles: false
  625. });
  626. } else if (
  627. this.org_template_info.template_id == 2 ||
  628. this.org_template_info.template_id == 0
  629. ) {
  630. printJS({
  631. printable: "dialysis-print-box-1",
  632. type: "html",
  633. style: style2,
  634. scanStyles: false
  635. });
  636. } else if (this.org_template_info.template_id == 3) {
  637. printJS({
  638. printable: "dialysis-print-box",
  639. type: "html",
  640. style: style,
  641. scanStyles: false
  642. });
  643. } else if (this.org_template_info.template_id == 4) {
  644. printJS({
  645. printable: "dialysis-print-box",
  646. type: "html",
  647. style: style,
  648. scanStyles: false
  649. });
  650. } else if (this.org_template_info.template_id == 5) {
  651. printJS({
  652. printable: "dialysis-print-box-1",
  653. type: "html",
  654. style: style2,
  655. scanStyles: false
  656. });
  657. } else if (
  658. this.org_template_info.template_id == 6 ||
  659. this.org_template_info.template_id == 10 ||
  660. this.org_template_info.template_id == 11
  661. ) {
  662. printJS({
  663. printable: "dialysis-print-box-1",
  664. type: "html",
  665. style: style2,
  666. scanStyles: false
  667. });
  668. } else if (this.org_template_info.template_id == 7) {
  669. printJS({
  670. printable: "dialysis-print-box",
  671. type: "html",
  672. style: style,
  673. scanStyles: false
  674. });
  675. } else if (this.org_template_info.template_id == 8) {
  676. printJS({
  677. printable: "dialysis-print-box",
  678. type: "html",
  679. style: style,
  680. scanStyles: false
  681. });
  682. } else if (this.org_template_info.template_id == 9) {
  683. printJS({
  684. printable: "dialysis-print-box",
  685. type: "html",
  686. style: style5,
  687. scanStyles: false
  688. });
  689. } else if (this.org_template_info.template_id == 12) {
  690. printJS({
  691. printable: "dialysis-print-box",
  692. type: "html",
  693. style: style,
  694. scanStyles: false
  695. });
  696. } else if (this.org_template_info.template_id == 13) {
  697. printJS({
  698. printable: "dialysis-print-box-1",
  699. type: "html",
  700. style: style3,
  701. scanStyles: false
  702. });
  703. } else if (this.org_template_info.template_id == 14){
  704. printJS({
  705. printable: "dialysis-print-box",
  706. type: "html",
  707. style: style,
  708. scanStyles: false
  709. });
  710. } else if (this.org_template_info.template_id == 15){
  711. printJS({
  712. printable: "dialysis-print-box",
  713. type: "html",
  714. style: style,
  715. scanStyles: false
  716. });
  717. } else if (this.org_template_info.template_id == 16){
  718. printJS({
  719. printable: "dialysis-print-box",
  720. type: "html",
  721. style: style,
  722. scanStyles: false
  723. });
  724. } else if (this.org_template_info.template_id == 17) {
  725. printJS({
  726. printable: "dialysis-print-box",
  727. type: "html",
  728. style: style,
  729. scanStyles: false
  730. });
  731. } else if (this.org_template_info.template_id == 18) {
  732. printJS({
  733. printable: "dialysis-print-box",
  734. type: "html",
  735. style: style,
  736. scanStyles: false
  737. });
  738. }
  739. },
  740. printThisOnePage() {
  741. var ptime = Math.round(new Date().getTime() / 1000);
  742. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  743. const style =
  744. '@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;}';
  745. const style2 =
  746. '@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;}';
  747. if (this.org_template_info.template_id == 1) {
  748. printJS({
  749. printable: "dialysis-print-box",
  750. type: "html",
  751. style: style,
  752. scanStyles: false
  753. });
  754. } else if (
  755. this.org_template_info.template_id == 2 ||
  756. this.org_template_info.template_id == 0 ||
  757. this.org_template_info.template_id == 5
  758. ) {
  759. printJS({
  760. printable: "dialysis-print-box-1-1",
  761. type: "html",
  762. style: style2,
  763. scanStyles: false
  764. });
  765. } else if(this.org_template_info.template_id == 14){
  766. printJS({
  767. printable: "new-dialysis-1",
  768. type: "html",
  769. style: style,
  770. scanStyles: false
  771. });
  772. }
  773. },
  774. printThisTwoPage() {
  775. var ptime = Math.round(new Date().getTime() / 1000);
  776. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  777. const style =
  778. '@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;}';
  779. const style2 =
  780. '@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;}';
  781. if (this.org_template_info.template_id == 1) {
  782. printJS({
  783. printable: "dialysis-print-box",
  784. type: "html",
  785. style: style,
  786. scanStyles: false
  787. });
  788. } else if (
  789. this.org_template_info.template_id == 2 ||
  790. this.org_template_info.template_id == 0 ||
  791. this.org_template_info.template_id == 5
  792. ) {
  793. printJS({
  794. printable: "dialysis-print-box-1-2",
  795. type: "html",
  796. style: style2,
  797. scanStyles: false
  798. });
  799. }else if(this.org_template_info.template_id == 14){
  800. printJS({
  801. printable: "new-dialysis-2",
  802. type: "html",
  803. style: style,
  804. scanStyles: false
  805. });
  806. }
  807. },
  808. getNumber() {
  809. if (this.dialysisOrder != null) {
  810. return (
  811. this.patientInfo.DialysisSchedule.device_zone.name +
  812. this.dialysisOrder.DeviceNumber.number
  813. );
  814. } else {
  815. return (
  816. this.patientInfo.DialysisSchedule.device_zone.name +
  817. this.patientInfo.DialysisSchedule.device_number.number
  818. );
  819. }
  820. },
  821. getXuserName(id) {
  822. if (id <= 0) {
  823. return "";
  824. }
  825. var name = "";
  826. if (this.users == null || typeof this.users.length === "undefined") {
  827. return name;
  828. }
  829. var leng = this.users.length;
  830. if (leng == 0) {
  831. return name;
  832. }
  833. for (let index = 0; index < leng; index++) {
  834. if (this.users[index].id == id) {
  835. name = this.users[index].name;
  836. break;
  837. }
  838. }
  839. return name;
  840. },
  841. setAdminUserES(id) {
  842. console.log(id);
  843. if (id == 0) {
  844. return "";
  845. }
  846. if (id in this.operatorMaps) {
  847. return this.operatorMaps[id].url;
  848. } else {
  849. return "";
  850. }
  851. },
  852. modeName(mode_id) {
  853. return typeof this.modeOptions[mode_id] !== "undefined" &&
  854. typeof this.modeOptions[mode_id].name !== "undefined"
  855. ? this.modeOptions[mode_id].name
  856. : "";
  857. },
  858. getDialysisRecord() {
  859. this.loading = true;
  860. getDialysisRecord(this.queryParams).then(response => {
  861. if (response.data.state == 1) {
  862. this.childResponse = response;
  863. this.org_template_info = response.data.data.org_template_info;
  864. this.loading = false;
  865. // this.adminUser = response.data.data.users
  866. // this.users = response.data.data.users
  867. // this.patientInfo = response.data.data.patientInfo
  868. // this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
  869. // // this.patientInfo.age = jsGetAge(this.patientInfo.birth, '-')
  870. // if (response.data.data.patientInfo.first_dialysis_date != 0) {
  871. // this.patientInfo.first_dialysis_date = uParseTime(response.data.data.patientInfo.first_dialysis_date, '{y}-{m}-{d}')
  872. // } else {
  873. // this.patientInfo.first_dialysis_date = ''
  874. // }
  875. // this.check = response.data.data.check
  876. // this.predialysis = response.data.data.PredialysisEvaluation
  877. // this.predialysis.blood_access_part_opera_name = this.bloodAccessParOperaName(this.predialysis.blood_access_part_opera_id)
  878. // this.afterdialysis = response.data.data.AssessmentAfterDislysis
  879. // this.operators = response.data.data.operators
  880. // this.dialysisOrder = response.data.data.dialysisOrder === null ? null : response.data.data.dialysisOrder
  881. // if (this.operators.length > 0) {
  882. // var operatorsLen = this.operators.length
  883. // for (var index = 0; index < operatorsLen; index++) {
  884. // this.$set(this.operatorMaps, this.operators[index].creator, this.operators[index])
  885. // }
  886. // }
  887. // this.afterdialysis.txqnx = -1
  888. // if (this.afterdialysis.cruor.indexOf('0度') > -1) {
  889. // this.afterdialysis.txqnx = 0
  890. // }
  891. // if (this.afterdialysis.cruor.indexOf('Ⅰ度') > -1) {
  892. // this.afterdialysis.txqnx = 1
  893. // }
  894. // if (this.afterdialysis.cruor.indexOf('Ⅱ度') > -1) {
  895. // this.afterdialysis.txqnx = 2
  896. // }
  897. // if (this.afterdialysis.cruor.indexOf('Ⅲ度') > -1) {
  898. // this.afterdialysis.txqnx = 3
  899. // }
  900. // this.afterdialysis.complications = this.afterdialysis.complication.split(',')
  901. // this.afterdialysis.complications_other = []
  902. // this.afterdialysis.complications_index = []
  903. // var acllen = this.afterdialysis.complications.length
  904. // for (let index = 0; index < acllen; index++) {
  905. // if (this.complications.indexOf(this.afterdialysis.complications[index]) >= 0) {
  906. // this.afterdialysis.complications_index.push(this.afterdialysis.complications[index])
  907. // } else if (this.complications.indexOf(this.afterdialysis.complications[index]) < 0 && this.afterdialysis.complications_other.indexOf(this.afterdialysis.complications[index]) < 0) {
  908. // this.afterdialysis.complications_other.push(this.afterdialysis.complications[index])
  909. // }
  910. // }
  911. // this.afterdialysis.complications_other = this.afterdialysis.complications_other.join(',')
  912. // this.prescription = response.data.data.dialysisPrescription
  913. // this.receiverTreatmentAccess = response.data.data.receiverTreatmentAccess
  914. // this.prescription.mode = this.modeName(this.prescription.mode_id)
  915. // var rwLen = this.replacementWays.length
  916. // this.prescription.replacement = ''
  917. // for (let index = 0; index < rwLen; index++) {
  918. // if (this.replacementWays[index].id == this.prescription.replacement_way) {
  919. // this.prescription.replacement = this.replacementWays[index].name
  920. // break
  921. // }
  922. // }
  923. // this.prescription.dialysate_formulation_name = this.dialysateFormulationName(this.prescription.dialysate_formulation)
  924. // var paLen = this.perfusionApparatus.length
  925. // this.prescription.perfusion_apparatus_name = ''
  926. // for (let index = 0; index < paLen; index++) {
  927. // if (this.perfusionApparatus[index].id == this.prescription.perfusion_apparatus) {
  928. // this.prescription.perfusion_apparatus_name = this.perfusionApparatus[index].name
  929. // break
  930. // }
  931. // }
  932. // var acLen = this.anticoagulantsConfit.length
  933. // var thisALID = this.prescription.anticoagulant
  934. // this.prescription.anticoagulant_name = ''
  935. // if (typeof (this.anticoagulantsConfit[thisALID]) !== 'undefined' && this.anticoagulantsConfit[thisALID] != null) {
  936. // this.prescription.anticoagulant_name = this.anticoagulantsConfit[thisALID].name
  937. // this.AlPanel = this.anticoagulantsConfit[thisALID]
  938. // }
  939. // this.advices = response.data.data.advices
  940. // this.monitors = response.data.data.monitors
  941. // this.summary = response.data.data.summary
  942. // this.org_template_info = response.data.data.org_template_info
  943. // if (this.monitors.length < 8) {
  944. // var nl = 8 - this.monitors.length
  945. // for (let index = 0; index < nl; index++) {
  946. // this.monitors.push([])
  947. // }
  948. // }
  949. // this.jilurow = this.monitors.length + 1
  950. // this.advice_jilurow = this.advices.length + 1
  951. // var childMap = {}
  952. // for (const index in this.advices) {
  953. // if (this.advices[index].parent_id == 0) {
  954. // continue
  955. // }
  956. // if (!(this.advices[index].parent_id in childMap)) {
  957. // childMap[this.advices[index].parent_id] = []
  958. // }
  959. // childMap[this.advices[index].parent_id].push(this.advices[index])
  960. // }
  961. // var advices = []
  962. // for (const index in this.advices) {
  963. // if (this.advices[index].parent_id > 0) {
  964. // continue
  965. // }
  966. // var item = this.advices[index]
  967. // if (item.id in childMap) {
  968. // item.children = childMap[item.id]
  969. // } else {
  970. // item.children = []
  971. // }
  972. // advices.push(item)
  973. // }
  974. // var leftAdvice = []
  975. // var rightAdvice = []
  976. // var adlen = advices.length
  977. // var halfLen = adlen % 2 == 0 ? adlen / 2 : (adlen + 1) / 2
  978. // for (var i = 0; i < halfLen; i++) {
  979. // leftAdvice.push(advices[i])
  980. // rightAdvice.push(advices[i + halfLen])
  981. // }
  982. // if (halfLen < 5) {
  983. // var nl = 5 - leftAdvice.length
  984. // for (let index = 0; index < nl; index++) {
  985. // leftAdvice.push([])
  986. // }
  987. // var nl = 5 - rightAdvice.length
  988. // for (let index = 0; index < nl; index++) {
  989. // rightAdvice.push([])
  990. // }
  991. // }
  992. // this.advices = []
  993. // for (var i = 0; i < halfLen; i++) {
  994. // var item = []
  995. // item.push(leftAdvice[i])
  996. // item.push(rightAdvice[i])
  997. // this.advices.push(item)
  998. // }
  999. // this.loading = false
  1000. // this.doctor_advices = response.data.data.advices == null ? [] : response.data.data.advices
  1001. // for (let index = 0; index < this.doctor_advices.length; index++) {
  1002. // this.doctor_advices[index]['isShow'] = 2
  1003. // }
  1004. // if (this.doctor_advices.length > 0) {
  1005. // var group = this.newAdviceGroupObject()
  1006. // var initGroupBlock = function(group, advice) {
  1007. // group.group_no = advice.groupno
  1008. // }
  1009. // for (let index = this.doctor_advices.length - 1; index >= 0; index--) {
  1010. // var new_advice_index = 0
  1011. // if ('children' in this.doctor_advices[index] && this.doctor_advices[index].children.length > 0) {
  1012. // new_advice_index = index + this.doctor_advices[index].children.length + 1
  1013. // var doctor_advice = {
  1014. // delivery_way: this.doctor_advices[index].delivery_way,
  1015. // execution_frequency: this.doctor_advices[index].execution_frequency,
  1016. // groupno: this.doctor_advices[index].groupno,
  1017. // id: this.doctor_advices[index].id,
  1018. // parent_id: this.doctor_advices[index].parent_id,
  1019. // children: this.doctor_advices[index].children,
  1020. // remark: this.doctor_advices[index].remark,
  1021. // execution_staff: this.doctor_advices[index].execution_staff,
  1022. // checker: this.doctor_advices[index].checker,
  1023. // advice_doctor: this.doctor_advices[index].advice_doctor,
  1024. // }
  1025. // doctor_advice['isShow'] = 1
  1026. // this.doctor_advices.splice(new_advice_index, 0, doctor_advice)
  1027. // // this.doctor_advices.push(doctor_advice)
  1028. // }
  1029. // }
  1030. // for (let index = 0; index < this.doctor_advices.length; index++) {
  1031. // const advice = this.doctor_advices[index]
  1032. // if (advice.groupno == 0) {
  1033. // // 老版本的医嘱没有分组的概念,所以这一个 if 是解决这个问题的,将每个无分组的医嘱各自归为一组
  1034. // if (advice.parent_id > 0) {
  1035. // if (this.advice_groups.length > 0) {
  1036. // var parent_group = this.advice_groups[
  1037. // this.advice_groups.length - 1
  1038. // ]
  1039. // if (parent_group.advices.length > 0) {
  1040. // if (parent_group.advices[0].id == advice.parent_id) {
  1041. // parent_group.advices.push(advice)
  1042. // }
  1043. // }
  1044. // }
  1045. // continue
  1046. // } else {
  1047. // if (group.group_no > 0) {
  1048. // this.advice_groups.push(group)
  1049. // group = this.newAdviceGroupObject()
  1050. // }
  1051. // initGroupBlock(group, advice)
  1052. // group.advices.push(advice)
  1053. // this.advice_groups.push(group)
  1054. // group = this.newAdviceGroupObject()
  1055. // continue
  1056. // }
  1057. // }
  1058. // if (group.group_no > 0 && group.group_no != advice.groupno) {
  1059. // this.advice_groups.push(group)
  1060. // group = this.newAdviceGroupObject()
  1061. // }
  1062. // if (group.group_no == 0) {
  1063. // initGroupBlock(group, advice)
  1064. // }
  1065. // if (group.group_no == advice.groupno) {
  1066. // group.advices.push(advice)
  1067. // }
  1068. // }
  1069. // if (group.group_no > 0) {
  1070. // // 上述的算法会导致最后一组没有加到advice_groups,这里要手动加上
  1071. // this.advice_groups.push(group)
  1072. // }
  1073. // }
  1074. // console.log(this.advice_groups)
  1075. } else {
  1076. this.loading = false;
  1077. this.$message.error("请求数据失败");
  1078. return false;
  1079. }
  1080. });
  1081. },
  1082. bloodAccessParOperaName(id) {
  1083. if (id in this.bloodAccessParOpera) {
  1084. return this.bloodAccessParOpera[id].name;
  1085. }
  1086. return "";
  1087. },
  1088. dialysateFormulationName(id) {
  1089. if (id in this.dialysateFormulationOptions) {
  1090. return this.dialysateFormulationOptions[id].name;
  1091. }
  1092. return "";
  1093. },
  1094. getAge: function(val) {
  1095. if (
  1096. this.org_template_info.template_id == 2 ||
  1097. this.org_template_info.template_id == 0
  1098. ) {
  1099. if (val.age == 0) {
  1100. return jsGetAge(val.birth, "-");
  1101. } else {
  1102. return val.age;
  1103. }
  1104. } else {
  1105. return jsGetAge(val.birth, "-");
  1106. }
  1107. },
  1108. newAdviceGroupObject: function() {
  1109. return Object.assign(
  1110. {},
  1111. {
  1112. group_no: 0,
  1113. // advice_doctor: 0,
  1114. // start_time: 0,
  1115. advices: []
  1116. // exec_staff: 0,
  1117. // exec_time: 0,
  1118. // checker: 0,
  1119. }
  1120. );
  1121. },
  1122. //日期
  1123. handleScheduleDateChange: function() {
  1124. this.treatStateVal = 0
  1125. this.patientStateVal = 0
  1126. this.zoneVal = 0
  1127. this.scheduleStateVal = 0
  1128. this.search_keyword = this.search_input = ''
  1129. // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
  1130. // zone: this.zone_selected,
  1131. // schedule_type: this.schedule_type_selected,
  1132. // schedule_date: this.selected_date,
  1133. // })
  1134. this.requestDialysisSchedules()
  1135. },
  1136. //初始化数据
  1137. getInitData: function() {
  1138. getDialysisRecordInitData().then(rs => {
  1139. var resp = rs.data
  1140. if (resp.state == 1) {
  1141. var zones = resp.data.zones
  1142. var schedules = resp.data.schedules
  1143. var zone_options = [{ id: 0, text: '全部' }]
  1144. for (let z_i = 0; z_i < zones.length; z_i++) {
  1145. const zone = zones[z_i]
  1146. zone_options.push({ id: zone.id, text: zone.name })
  1147. }
  1148. this.zone_options = zone_options
  1149. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  1150. this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
  1151. this.getData()
  1152. } else {
  1153. this.$message.error(resp.msg)
  1154. }
  1155. })
  1156. },
  1157. // 班次
  1158. handletimeType: function(index) {
  1159. this.scheduleStateVal = index
  1160. // this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
  1161. this.search_keyword = this.search_input = ''
  1162. this.getData()
  1163. },
  1164. //分区
  1165. handleZoneChange: function(index) {
  1166. this.zoneVal = index
  1167. // this.$store.dispatch('SetZoneSelected', { zone_selected: index })
  1168. this.search_keyword = this.search_input = ''
  1169. this.getData()
  1170. },
  1171. //患者状态
  1172. handleStateChange: function(index) {
  1173. this.patientStateVal = index
  1174. // this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
  1175. this.search_keyword = this.search_input = ''
  1176. this.getData()
  1177. },
  1178. handleTreatChange: function(index) {
  1179. this.treatStateVal = index
  1180. // this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
  1181. this.search_keyword = this.search_input = ''
  1182. this.getData()
  1183. },
  1184. processedDialysisSchedules: function(schedules, zone_options) {
  1185. var zoneMap = {}
  1186. var scheduleMap = {}
  1187. for (let z_i = 0; z_i < zone_options.length; z_i++) {
  1188. const zone = zone_options[z_i]
  1189. if (zone.id == 0) {
  1190. continue
  1191. }
  1192. scheduleMap[zone.id] = []
  1193. }
  1194. for (let index = 0; index < schedules.length; index++) {
  1195. const schedule = schedules[index]
  1196. scheduleMap[schedule.device_number.zone.id].push(schedule)
  1197. }
  1198. var zone_schedules = []
  1199. for (let index = 0; index < zone_options.length; index++) {
  1200. const zone = zone_options[index]
  1201. if (zone.id == 0) {
  1202. continue
  1203. }
  1204. var schedules = scheduleMap[zone.id]
  1205. zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
  1206. }
  1207. return zone_schedules
  1208. },
  1209. searchAction: function() {
  1210. this.search_keyword = this.search_input
  1211. this.scheduleStateVal = 0
  1212. this.zoneVal = 0
  1213. this.treatStateVal = 0
  1214. this.patientStateVal = 0
  1215. if(this.search_input != ''){
  1216. let arr = []
  1217. this.filtedSchedules.map(item => {
  1218. arr.push(...item.schedules)
  1219. })
  1220. this.tableData = arr
  1221. }else{
  1222. this.getData()
  1223. }
  1224. },
  1225. requestDialysisSchedules: function() {
  1226. var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
  1227. getDialysisSchedules(ymd).then(rs => {
  1228. var resp = rs.data
  1229. if (resp.state == 1) {
  1230. var schedules = resp.data.schedules
  1231. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  1232. let newArr = []
  1233. this.zone_schedules.map(item => {
  1234. newArr.push(...item.schedules)
  1235. })
  1236. this.tableData = newArr
  1237. } else {
  1238. this.$message.error(resp.msg)
  1239. }
  1240. })
  1241. },
  1242. changePatient(schedual){
  1243. console.log(schedual)
  1244. var xtdate = parseTime(schedual.schedule_date, '{y}-{m}-{d}')
  1245. this.$router.push(
  1246. '/dialysis/print?xtdate=' + xtdate + '&xtno=' + schedual.patient.dialysis_no
  1247. )
  1248. // this.patient_id = schedual.patient_id;
  1249. // this.date = schedual.schedule_date;
  1250. // // this.getScheduleDetail();
  1251. // // this.getLongAdvice();
  1252. // var patient_id = schedual.patient_id;
  1253. // var date = schedual.schedule_date;
  1254. // this.$router.push({
  1255. // path: "/dialysis/details",
  1256. // query: {
  1257. // patient_id: patient_id,
  1258. // date: date,
  1259. // patient_name: schedual.patient.name
  1260. // }
  1261. // });
  1262. },
  1263. getData(){
  1264. let patientArr = []
  1265. patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  1266. console.log('patientArr',patientArr)
  1267. let arr1 = []
  1268. if(this.patientStateVal == 0){
  1269. arr1 = patientArr
  1270. console.log(arr1)
  1271. }else if(this.patientStateVal == 1){
  1272. let arr = []
  1273. arr = patientArr
  1274. for (let i = 0; i <arr.length; i++) {
  1275. for (let j = 0; j < arr[i].schedules.length; j++) {
  1276. 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 == ''))) {
  1277. // 删除元素后改变i的值
  1278. arr[i].schedules.splice(j--, 1);
  1279. }
  1280. }
  1281. }
  1282. console.log("执行1",arr)
  1283. arr1 = arr
  1284. }else if(this.patientStateVal == 2){
  1285. let arr = []
  1286. arr = patientArr
  1287. for (let i = 0; i < arr.length; i++) {
  1288. for (let j = 0; j < arr[i].schedules.length; j++) {
  1289. 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))) {
  1290. // 删除元素后改变i的值
  1291. console.log('几次')
  1292. arr[i].schedules.splice(j--, 1);
  1293. }
  1294. }
  1295. }
  1296. console.log("执行2",arr)
  1297. arr1 = arr
  1298. }else if(this.patientStateVal == 3){
  1299. let arr = []
  1300. arr = patientArr
  1301. for (let i = 0; i <arr.length; i++) {
  1302. for (let j = 0; j < arr[i].schedules.length; j++) {
  1303. 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))) {
  1304. // 删除元素后改变i的值
  1305. arr[i].schedules.splice(j--, 1);
  1306. }
  1307. }
  1308. }
  1309. console.log("执行1",arr)
  1310. arr1 = arr
  1311. }else if(this.patientStateVal == 4){
  1312. let arr = []
  1313. arr = patientArr
  1314. for (let i = 0; i < arr.length; i++) {
  1315. for (let j = 0; j < arr[i].schedules.length; j++) {
  1316. 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))) {
  1317. // 删除元素后改变i的值
  1318. arr[i].schedules.splice(j--, 1);
  1319. }
  1320. }
  1321. }
  1322. console.log("执行2",arr)
  1323. arr1 = arr
  1324. }
  1325. let arr2 = []
  1326. if(this.treatStateVal == 0){
  1327. arr2 = JSON.parse(JSON.stringify(arr1))
  1328. }else if(this.treatStateVal == 1){
  1329. let arr = []
  1330. arr = JSON.parse(JSON.stringify(arr1))
  1331. for (let i = 0; i < arr.length; i++) {
  1332. for (let j = 0; j < arr[i].schedules.length; j++) {
  1333. 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)) {
  1334. // 删除元素后改变i的值
  1335. arr[i].schedules.splice(j--, 1);
  1336. }
  1337. }
  1338. }
  1339. arr2 = arr
  1340. }else if(this.treatStateVal == 2){
  1341. let arr = []
  1342. arr = JSON.parse(JSON.stringify(arr1))
  1343. for (let i = 0; i < arr.length; i++) {
  1344. for (let j = 0; j < arr[i].schedules.length; j++) {
  1345. if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
  1346. // 删除元素后改变i的值
  1347. arr[i].schedules.splice(j--, 1);
  1348. }
  1349. }
  1350. }
  1351. arr2 = arr
  1352. }
  1353. let arr3 = []
  1354. if(this.scheduleStateVal == 0){
  1355. arr3 = JSON.parse(JSON.stringify(arr2))
  1356. }else{
  1357. let arr = []
  1358. arr = JSON.parse(JSON.stringify(arr2))
  1359. for (let i = 0; i < arr.length; i++) {
  1360. for (let j = 0; j < arr[i].schedules.length; j++) {
  1361. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  1362. // 删除元素后改变i的值
  1363. arr[i].schedules.splice(j--, 1);
  1364. }
  1365. }
  1366. }
  1367. arr3 = arr
  1368. console.log("上午",arr)
  1369. }
  1370. let arr4 = []
  1371. if(this.zoneVal == 0){
  1372. arr4 = JSON.parse(JSON.stringify(arr3))
  1373. }else{
  1374. let arr = []
  1375. arr = JSON.parse(JSON.stringify(arr3))
  1376. for (let i = 0; i < arr.length; i++) {
  1377. if (this.zoneVal != arr[i].zone_id) {
  1378. // 删除元素后改变i的值
  1379. arr.splice(i--, 1);
  1380. }
  1381. }
  1382. arr4 = arr
  1383. }
  1384. let newArr = []
  1385. arr4.map(item => {
  1386. newArr.push(...item.schedules)
  1387. })
  1388. this.tableData = newArr
  1389. console.log('table',this.tableData)
  1390. },
  1391. },
  1392. watch: {
  1393. "patientInfo.gender": function() {
  1394. if (this.patientInfo.gender == 1) {
  1395. this.patientInfo_gender_1 = true;
  1396. this.patientInfo_gender_2 = false;
  1397. } else if (this.patientInfo.gender == 2) {
  1398. this.patientInfo_gender_2 = true;
  1399. this.patientInfo_gender_1 = false;
  1400. } else {
  1401. this.patientInfo_gender_2 = false;
  1402. this.patientInfo_gender_1 = false;
  1403. }
  1404. },
  1405. "patientInfo.source": function() {
  1406. if (this.patientInfo.source == 1) {
  1407. this.patientInfo_source_1 = true;
  1408. this.patientInfo_source_2 = false;
  1409. } else if (this.patientInfo.source == 2) {
  1410. this.patientInfo_source_2 = true;
  1411. this.patientInfo_source_1 = false;
  1412. } else {
  1413. this.patientInfo_source_2 = false;
  1414. this.patientInfo_source_1 = false;
  1415. }
  1416. }
  1417. },
  1418. created() {
  1419. this.getInitData();
  1420. var xtuser = this.$store.getters.xt_user;
  1421. this.orgname = xtuser.org.org_name;
  1422. // this.orgname = "遂溪方济医院";
  1423. this.modeOptions = this.$store.getters.treatment_mode;
  1424. this.replacementWays = this.$store.getters.replacement_ways;
  1425. this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
  1426. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
  1427. // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
  1428. var bloodAccessParOpera = getDataConfig(
  1429. "hemodialysis",
  1430. "vascular_access_desc"
  1431. );
  1432. for (var key in bloodAccessParOpera) {
  1433. this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
  1434. bloodAccessParOpera[key];
  1435. }
  1436. var dialysateFormulationOptions = getDataConfig(
  1437. "hemodialysis",
  1438. "dialysate_formulation"
  1439. );
  1440. for (var key in dialysateFormulationOptions) {
  1441. this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
  1442. dialysateFormulationOptions[key];
  1443. }
  1444. const xtdate = this.$route.query && this.$route.query.xtdate;
  1445. const xtno = this.$route.query && this.$route.query.xtno;
  1446. if (
  1447. typeof xtdate === "string" &&
  1448. xtdate.length > 0 &&
  1449. typeof xtno === "string" &&
  1450. xtno.length > 0
  1451. ) {
  1452. this.queryParams.xtdate = xtdate;
  1453. this.queryParams.xtno = xtno;
  1454. this.getDialysisRecord();
  1455. } else {
  1456. this.$message.error("参数不齐");
  1457. return false;
  1458. }
  1459. },
  1460. computed:{
  1461. filtedSchedules: function() {
  1462. var search_keyword = this.search_keyword
  1463. if (search_keyword.length > 0) {
  1464. var schedules = []
  1465. for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  1466. const scheduleInfo = this.zone_schedules[o_i]
  1467. var originSchedules = scheduleInfo.schedules
  1468. if (originSchedules.length == 0) {
  1469. continue
  1470. }
  1471. var filtedSchedules = []
  1472. for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  1473. const schedule = originSchedules[s_i]
  1474. if (schedule.patient.name.indexOf(search_keyword) != -1) {
  1475. filtedSchedules.push(schedule)
  1476. // break
  1477. }
  1478. }
  1479. if (filtedSchedules.length > 0) {
  1480. schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  1481. }
  1482. }
  1483. return schedules
  1484. }
  1485. }
  1486. },
  1487. };
  1488. </script>
  1489. <style>
  1490. .dialysis-print-order {
  1491. width: 960px;
  1492. margin: 0 auto;
  1493. }
  1494. .dialysis-print-order .order-yy-name {
  1495. margin: auto;
  1496. text-align: center;
  1497. font-size: 20px;
  1498. letter-spacing: 5px;
  1499. }
  1500. .dialysis-print-order .order-title {
  1501. margin: auto;
  1502. font-weight: 600;
  1503. text-align: center;
  1504. font-size: 22px;
  1505. padding: 10px;
  1506. }
  1507. .dialysis-print-order .table-box {
  1508. width: 100%;
  1509. line-height: 23px;
  1510. font-size: 14px;
  1511. }
  1512. .dialysis-print-order .print-table {
  1513. width: 100%;
  1514. text-align: center;
  1515. border-collapse: collapse;
  1516. line-height: 40px;
  1517. font-size: 14px;
  1518. }
  1519. .dialysis-print-order .print-table-no {
  1520. width: 100%;
  1521. text-align: center;
  1522. border-collapse: collapse;
  1523. font-size: 14px;
  1524. }
  1525. .dialysis-print-order .under-line {
  1526. border-bottom: 1px solid #999;
  1527. width: 95%;
  1528. text-align: center;
  1529. margin-left: 2px;
  1530. }
  1531. .dialysis-print-order .title-box {
  1532. text-align: center;
  1533. font-size: 16px;
  1534. }
  1535. .dialysis-print-order .radio-lebel-box {
  1536. font-weight: 400;
  1537. cursor: pointer;
  1538. }
  1539. .dialysis-print-order .radio-no {
  1540. opacity: 0;
  1541. outline: none;
  1542. position: absolute;
  1543. margin: 0;
  1544. width: 0;
  1545. height: 0;
  1546. z-index: -1;
  1547. }
  1548. .dialysis-print-order .radio-inner {
  1549. white-space: nowrap;
  1550. cursor: pointer;
  1551. outline: none;
  1552. display: inline-block;
  1553. line-height: 1;
  1554. position: relative;
  1555. vertical-align: middle;
  1556. }
  1557. .dialysis-print-order .radio-fang {
  1558. display: inline-block;
  1559. position: relative;
  1560. border: 1px solid #000;
  1561. box-sizing: border-box;
  1562. width: 14px;
  1563. height: 14px;
  1564. background-color: #fff;
  1565. z-index: 1;
  1566. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  1567. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  1568. }
  1569. .dialysis-print-order .is-checked-radio::after {
  1570. content: "√";
  1571. font-size: 15px;
  1572. }
  1573. .dialysis-print-order .print-table-no tr td {
  1574. padding: 8px 5px;
  1575. line-height: 25px;
  1576. }
  1577. .dialysis-print-order .print-table tr td {
  1578. padding: 1px 1px;
  1579. /*line-height: 25px;*/
  1580. }
  1581. .es-img {
  1582. height: 30px;
  1583. }
  1584. .advice-name {
  1585. text-align: left;
  1586. }
  1587. .advice-children {
  1588. display: flex;
  1589. }
  1590. .title-box-pro {
  1591. border: 0 #fff;
  1592. line-height: 25px;
  1593. height: 25px;
  1594. text-align: left;
  1595. padding-left: 10px !important;
  1596. }
  1597. .title-box-pro-tr {
  1598. border: 0 #fff;
  1599. }
  1600. .text-align-left {
  1601. text-align: left !important;
  1602. padding-left: 10px !important;
  1603. font-size: 14px !important;
  1604. line-height: 25px;
  1605. }
  1606. .print-table-tr-new td {
  1607. line-height: 20px !important;
  1608. }
  1609. .border-top-solid {
  1610. border: solid 1px #000;
  1611. }
  1612. .print-template-two tr {
  1613. line-height: 30px;
  1614. }
  1615. .table-box1 {
  1616. border: 1px solid #000;
  1617. width: 100%;
  1618. line-height: 30px;
  1619. font-size: 14px;
  1620. border-collapse: collapse;
  1621. }
  1622. .table-box1 tr {
  1623. border-bottom: 1px solid #000;
  1624. }
  1625. </style>
  1626. <style lang="scss">
  1627. .newContainer{
  1628. .dialysisPage::-webkit-scrollbar {
  1629. height: 15px;
  1630. }
  1631. .el-date-editor{
  1632. .el-input__inner{
  1633. padding-right:0px;
  1634. }
  1635. }
  1636. .el-table td, .el-table th{
  1637. text-align: center;
  1638. }
  1639. }
  1640. .newContainer::-webkit-scrollbar{
  1641. height: 15px !important;
  1642. }
  1643. </style>