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

recordPrint.vue 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434
  1. <template>
  2. <div>
  3. <template>
  4. <el-button
  5. style="position: fixed; right: 25px; z-index: 999"
  6. size="small"
  7. icon="el-icon-printer"
  8. @click="printThisPage"
  9. type="primary"
  10. >打印</el-button
  11. >
  12. </template>
  13. <div class="dialysisPage" style="padding-top: 40px">
  14. <printOne
  15. v-if="
  16. org_id != 10217 &&
  17. org_id != 9675 &&
  18. org_id != 9671 &&
  19. org_id != 0 &&
  20. org_id != 10164 &&
  21. org_id == 10188 &&
  22. org_id != 10318
  23. "
  24. ref="printOne"
  25. v-bind:childResponse="childResponse"
  26. :patient="patient"
  27. :hispatient="hispatient"
  28. :history="history"
  29. :patientid="patientid"
  30. ></printOne>
  31. <printTwo
  32. v-if="
  33. org_id == 10217 ||
  34. org_id == 9675 ||
  35. org_id == 9671 ||
  36. org_id == 10164 ||
  37. org_id == 10188
  38. "
  39. ref="printTwo"
  40. v-bind:childResponse="childResponse"
  41. :patient="patient"
  42. :hispatient="hispatient"
  43. :history="history"
  44. :patientid="patientid"
  45. ></printTwo>
  46. <printThree
  47. v-if="org_id == 10318 || org_id == 0"
  48. ref="printThree"
  49. v-bind:childResponse="childResponse"
  50. :patient="patient"
  51. :hispatient="hispatient"
  52. :history="history"
  53. :patientid="patientid"
  54. >
  55. </printThree>
  56. </div>
  57. </div>
  58. </template>
  59. <script>
  60. import { parseTime } from "@/utils";
  61. import { getDataConfig } from "@/utils/data";
  62. import { jsGetAge, uParseTime } from "@/utils/tools";
  63. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  64. import print from "print-js";
  65. import { getSchedulePatientList } from "@/api/his/his";
  66. import { getPatientCaseHistory } from "@/api/project/project";
  67. import printOne from "./recordTemplate/printOne";
  68. import printTwo from "./recordTemplate/printTwo";
  69. import printThree from "./recordTemplate/printThree";
  70. export default {
  71. name: "dialysisPrintOrder",
  72. components: {
  73. BreadCrumb,
  74. printOne,
  75. printTwo,
  76. printThree,
  77. },
  78. props: {
  79. patientid: Number,
  80. },
  81. data() {
  82. return {
  83. crumbs: [
  84. { path: false, name: "透析管理" },
  85. { path: false, name: "打印单" },
  86. ],
  87. childResponse: {},
  88. patientTableData: [],
  89. search_input: "",
  90. patient: {},
  91. hispatient: {},
  92. educationOptions: [],
  93. history: {},
  94. keyword: "",
  95. org_id: 0,
  96. };
  97. },
  98. methods: {
  99. show(val, id) {
  100. this.org_id = id;
  101. if (id == 10217 || id == 9675 || id == 9671 ) {
  102. this.$refs.printTwo.show(val);
  103. } else if (id == 10318|| id == 0) {
  104. this.$refs.printThree.show(val);
  105. } else {
  106. this.$refs.printOne.show(val);
  107. }
  108. },
  109. getAdminUser(id) {
  110. if (id == 0) {
  111. return "";
  112. }
  113. if (id == undefined) {
  114. return "";
  115. }
  116. for (let i = 0; i < this.adminUser.length; i++) {
  117. if (this.adminUser[i].id == id) {
  118. return this.adminUser[i].name;
  119. }
  120. }
  121. },
  122. getTime(value, temp) {
  123. if (value == 0) {
  124. return "";
  125. }
  126. if (value != undefined) {
  127. return uParseTime(value, temp);
  128. }
  129. return "";
  130. },
  131. printThisPage() {
  132. var ptime = Math.round(new Date().getTime() / 1000);
  133. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  134. const style =
  135. "@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;padding:0 10px;}.infoTitle div{width: 200px;}.otherInfo{display: flex;margin-top:20px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle div{width: 200px;}}";
  136. const style1 =
  137. "@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;} .infoTitle div{width: 200px;} .infoTitle .address_slot{width: 400px;} .infoTitle .name_slot{width: 250px;}.otherInfo{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;justify-content: center;flex-direction: column;margin-top:10px;line-height: 24px;padding:0 10px;border-top: 1px solid;}.recordTitle div{width: 100%;text-align: center;} .recordTitle .recordContent{width: 100%;height: fit-content;min-height: 150px;text-align: left;} .endInfo{display: flex;flex-direction: column;justify-content: end;margin-top: 10px;line-height: 24px;} .endInfo div{width: 300px;} .record_Title{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;} .record_Title div{width: 200px;}}";
  138. const style2 =
  139. "@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;padding-bottom: 10px;border-bottom: 1px solid;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;} .infoTitle div{width: 200px;} .infoTitle .address_slot{width: 400px;} .infoTitle .name_slot {width: 300px;display: flex;}.name_slot span {display: inline-block;min-width: 70px;border-bottom: 1px solid;} .infoTitle .name_slot_2 {width: 250px;display: flex;} .name_slot_2 .name_slot_1{ display: inline-block;min-width: 70px;border-bottom: 1px solid;} .infoTitle .full_slot {width: 100%;}.infoTitle .full_slot .id_card{border: 1px solid;display: inline-block;width: 18px;height: 18px;text-align: center;margin-right: 6px;} .address_slot_1 span {display: inline-block;min-width: 60px;border-bottom: 1px solid;} .otherInfo{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;justify-content: center;flex-direction: column;margin-top:10px;line-height: 24px;padding:0 10px;border-top: 1px solid;}.recordTitle div{width: 100%;text-align: center;} .recordTitle .recordContent{width: 100%;height: fit-content;min-height: 150px;text-align: left;} .endInfo{display: flex;flex-direction: column;justify-content: end;margin-top: 10px;line-height: 24px;} .endInfo div{width: 300px;} .record_Title{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;} .record_Title div{width: 200px;}}";
  140. if (this.org_id != 10217 && this.org_id != 0 && this.org_id != 9675 && this.org_id != 10318) {
  141. printJS({
  142. printable: "prescription-print",
  143. type: "html",
  144. style: style,
  145. scanStyles: false,
  146. });
  147. } else if (
  148. this.org_id == 10217 ||
  149. this.org_id == 9675
  150. ) {
  151. printJS({
  152. printable: "prescription-print",
  153. type: "html",
  154. style: style1,
  155. scanStyles: false,
  156. });
  157. }else if(this.org_id == 10318||this.org_id == 0 )
  158. {
  159. printJS({
  160. printable: "prescription-print",
  161. type: "html",
  162. style: style2,
  163. scanStyles: false,
  164. });
  165. }
  166. },
  167. //患者列表
  168. getPatientList() {
  169. let params = {
  170. record_date: this.$route.query.record,
  171. };
  172. getSchedulePatientList(params).then((response) => {
  173. if (response.data.state == 0) {
  174. this.$message.error(response.data.msg);
  175. return false;
  176. } else {
  177. this.patientTableData = [];
  178. console.log("list0000000", response.data.data.list);
  179. // for (let i = 0; i < response.data.data.list.length; i++) {
  180. // if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  181. // this.patientTableData.push(response.data.data.list[i])
  182. // }
  183. // }
  184. this.patientTableData = response.data.data.list;
  185. }
  186. });
  187. },
  188. changePatient(val) {
  189. const params = {
  190. patient_id: val.patient_id,
  191. };
  192. console.log("params", params);
  193. getPatientCaseHistory(params).then((response) => {
  194. if (response.data.state == 1) {
  195. var patient = response.data.data.patient;
  196. console.log("patinet", patient);
  197. this.patient = patient;
  198. var history = response.data.data.history;
  199. console.log("history", history);
  200. this.history = history;
  201. var hispatient = response.data.data.hispatient;
  202. console.log("hispatient", hispatient);
  203. this.hispatient = hispatient;
  204. }
  205. });
  206. },
  207. searchAction() {
  208. this.getPatientList();
  209. },
  210. },
  211. created() {
  212. // this.getPatientList()
  213. // this.org_id = this.$store.getters.xt_user.org.id;
  214. // console.log("=====", this.org_id);
  215. // this.$refs.printOne.show(this.patientid);
  216. // this.$refs.printTwo.show(this.patientid);
  217. },
  218. // computed:{
  219. // filtedSchedules: function() {
  220. // var search_keyword = this.search_keyword
  221. // if (search_keyword.length > 0) {
  222. // var schedules = []
  223. // for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  224. // const scheduleInfo = this.zone_schedules[o_i]
  225. // var originSchedules = scheduleInfo.schedules
  226. // if (originSchedules.length == 0) {
  227. // continue
  228. // }
  229. // var filtedSchedules = []
  230. // for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  231. // const schedule = originSchedules[s_i]
  232. // if (schedule.patient.name.indexOf(search_keyword) != -1) {
  233. // filtedSchedules.push(schedule)
  234. // // break
  235. // }
  236. // }
  237. // if (filtedSchedules.length > 0) {
  238. // schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  239. // }
  240. // }
  241. // return schedules
  242. // }
  243. // }
  244. // },
  245. };
  246. </script>
  247. <style>
  248. .dialysis-print-order {
  249. width: 960px;
  250. margin: 0 auto;
  251. }
  252. .dialysis-print-order .order-yy-name {
  253. margin: auto;
  254. text-align: center;
  255. font-size: 20px;
  256. letter-spacing: 5px;
  257. }
  258. .dialysis-print-order .order-title {
  259. margin: auto;
  260. font-weight: 600;
  261. text-align: center;
  262. font-size: 22px;
  263. padding: 10px;
  264. }
  265. .dialysis-print-order .table-box {
  266. width: 100%;
  267. line-height: 23px;
  268. font-size: 14px;
  269. }
  270. .dialysis-print-order .print-table {
  271. width: 100%;
  272. text-align: center;
  273. border-collapse: collapse;
  274. line-height: 40px;
  275. font-size: 14px;
  276. border-color: #000;
  277. }
  278. .dialysis-print-order .print-table-no {
  279. width: 100%;
  280. text-align: center;
  281. border-collapse: collapse;
  282. font-size: 14px;
  283. }
  284. .dialysis-print-order .under-line {
  285. border-bottom: 1px solid #999;
  286. width: 95%;
  287. text-align: center;
  288. margin-left: 2px;
  289. }
  290. .dialysis-print-order .title-box {
  291. text-align: center;
  292. font-size: 16px;
  293. }
  294. .dialysis-print-order .radio-lebel-box {
  295. font-weight: 400;
  296. cursor: pointer;
  297. }
  298. .dialysis-print-order .radio-no {
  299. opacity: 0;
  300. outline: none;
  301. position: absolute;
  302. margin: 0;
  303. width: 0;
  304. height: 0;
  305. z-index: -1;
  306. }
  307. .dialysis-print-order .radio-inner {
  308. white-space: nowrap;
  309. cursor: pointer;
  310. outline: none;
  311. display: inline-block;
  312. line-height: 1;
  313. position: relative;
  314. vertical-align: middle;
  315. }
  316. .dialysis-print-order .radio-fang {
  317. display: inline-block;
  318. position: relative;
  319. border: 1px solid #000;
  320. box-sizing: border-box;
  321. width: 14px;
  322. height: 14px;
  323. background-color: #fff;
  324. z-index: 1;
  325. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  326. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  327. }
  328. .dialysis-print-order .is-checked-radio::after {
  329. content: "√";
  330. font-size: 15px;
  331. }
  332. .dialysis-print-order .print-table-no tr td {
  333. padding: 8px 5px;
  334. line-height: 25px;
  335. }
  336. .dialysis-print-order .print-table tr td {
  337. padding: 1px 1px;
  338. /*line-height: 25px;*/
  339. }
  340. .es-img {
  341. height: 30px;
  342. }
  343. .advice-name {
  344. text-align: left;
  345. }
  346. .advice-children {
  347. display: flex;
  348. }
  349. .title-box-pro {
  350. border: 0 #fff;
  351. line-height: 25px;
  352. height: 25px;
  353. text-align: left;
  354. padding-left: 10px !important;
  355. }
  356. .title-box-pro-tr {
  357. border: 0 #fff;
  358. }
  359. .text-align-left {
  360. text-align: left !important;
  361. padding-left: 10px !important;
  362. font-size: 14px !important;
  363. line-height: 25px;
  364. }
  365. .print-table-tr-new td {
  366. line-height: 20px !important;
  367. }
  368. .border-top-solid {
  369. border: solid 1px #000;
  370. }
  371. .print-template-two tr {
  372. line-height: 30px;
  373. }
  374. .table-box1 {
  375. border: 1px solid #000;
  376. width: 100%;
  377. line-height: 30px;
  378. font-size: 14px;
  379. border-collapse: collapse;
  380. }
  381. .table-box1 tr {
  382. border-bottom: 1px solid #000;
  383. }
  384. </style>
  385. <style lang="scss">
  386. .newContainer {
  387. .dialysisPage::-webkit-scrollbar {
  388. height: 15px;
  389. }
  390. .el-date-editor {
  391. .el-input__inner {
  392. padding-right: 0px;
  393. }
  394. }
  395. .el-table td,
  396. .el-table th {
  397. text-align: center;
  398. }
  399. }
  400. .newContainer::-webkit-scrollbar {
  401. height: 15px !important;
  402. }
  403. </style>