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

recordPrint.vue 9.8KB

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