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

recordPrint.vue 10KB

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