dialysisPrintOrder.vue 81KB

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