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

treatPrint.vue 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377
  1. <template>
  2. <div>
  3. <template>
  4. <el-button
  5. style="position:fixed;right:25px;z-index:999"
  6. :loading="loading"
  7. size="small"
  8. icon="el-icon-printer"
  9. @click="printThisPage"
  10. type="primary"
  11. >打印</el-button
  12. >
  13. </template>
  14. <div class='dialysisPage' style="padding-top:40px;">
  15. <printOne v-if="org_id != 4" v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printOne>
  16. <printTwo v-else v-bind:childResponse="childResponse" :advicePrint="advicePrint" :ids="ids" :patient="patient" :hisPatient="hisPatient" :patient_id="patient_id" :record_date="record_date" :prescription_id="prescription_id"></printTwo>
  17. </div>
  18. </div>
  19. </template>
  20. <script>
  21. import { parseTime } from "@/utils";
  22. import { getDialysisRecord } from "@/api/dialysis";
  23. import { getDataConfig } from "@/utils/data";
  24. import { jsGetAge, uParseTime } from "@/utils/tools";
  25. import BreadCrumb from "@/xt_pages/components/bread-crumb";
  26. import print from "print-js";
  27. import printOne from "./treatTemplate/printOne"
  28. import printTwo from "./treatTemplate/printTwo"
  29. import { getAllDoctorList,getAllHisPatientList,getPrescriptionPrint } from "@/api/project/project"
  30. export default {
  31. name: "dialysisPrintOrder",
  32. components: {
  33. BreadCrumb,
  34. printOne,
  35. printTwo
  36. },
  37. props:{
  38. paramsObj:Object
  39. },
  40. data() {
  41. return {
  42. crumbs: [
  43. { path: false, name: '门诊医生站' },
  44. { path: false, name: '打印' }
  45. ],
  46. record_date:"",
  47. patientTableData:[],
  48. advicePrint:[],
  49. hisPatient:{},
  50. patient:{},
  51. search_input:"",
  52. loading:false,
  53. patient_id:0,
  54. prescription_id:0,
  55. ids:''
  56. };
  57. },
  58. methods:{
  59. printThisPage() {
  60. var ptime = Math.round(new Date().getTime() / 1000);
  61. this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
  62. if(this.org_id == 4){
  63. const style =
  64. '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.printTitle{font-size: 22px;text-align: center;font-weight: bold;margin-bottom: 10px;}.infoTitle{display: flex;margin-top:10px;}.infoTitle div{width: 200px;}.infoMain{display: flex;flex-wrap: wrap;margin-top:10px;}.infoMain div{width: 50%;line-height: 24px;}.prescriptionBox{min-height:350px;}.Rp{font-size: 18px;font-weight: bold;}.drugsBox{padding-left: 40px;margin-bottom: 10px;}.drugsBox div{line-height: 20px;}.drugsOne{line-height: 24px;}.drugsOne span{margin-right: 20px;}.doctorBox{display: flex;justify-content: space-between;padding:0 10px;line-height: 24px;border-bottom: 2px solid #000;}.actionBar{display: flex;justify-content: space-between; line-height: 24px;padding:0 10px;}.actionBar p{width:150px;}.under_line{display: inline-block;border-bottom: 1px solid #000;flex: 1;}}';
  65. printJS({
  66. printable: "prescriptionPrint",
  67. type: "html",
  68. style: style,
  69. scanStyles: false
  70. });
  71. }else{
  72. const style =
  73. '@media print {#prescription-print{font-size:14px;}.prescription-print:last-child {page-break-after: auto;}.prescription-print{font-size: 14px;}.printTitle{font-size: 18px;text-align: center;font-weight: bold;}.infoTitle{display: flex;border-bottom: 2px solid #000;margin-top:5px;padding:0 10px;}.infoTitle div{width: 300px;margin-bottom:5px;}.infoMain{display: flex;flex-wrap: wrap;border-bottom: 2px solid #000;padding:0 10px;}.infoMain div{width: 50%;}.prescriptionBox{padding:0 10px;min-height:380px;}.Rp{font-size: 22px;font-weight: bold;line-height:1px;}.drugsBox{padding-left: 40px;margin-bottom: 10px;margin-bottom: 10px;}.drugsBox p{line-height: 1px;padding-bottom:10px !important;} .drugsOne{line-height: 1px;margin-bottom:10px !important;} .drugsOne span{margin-right: 20px;} .doctorBox{display: flex; justify-content: space-between; padding:0 10px; border-bottom: 2px solid #000;} .actionBar{display: flex; justify-content: space-between; padding:0 10px;margin:5px 0;} .actionBar div{width:150px;}}';
  74. printJS({
  75. printable: "prescriptionPrint",
  76. type: "html",
  77. style: style,
  78. scanStyles: false
  79. });
  80. }
  81. // if (this.org_template_info.template_id == 1) {
  82. // printJS({
  83. // printable: "dialysis-print-box",
  84. // type: "html",
  85. // style: style,
  86. // scanStyles: false
  87. // });
  88. // }
  89. },
  90. getAllDoctorList(){
  91. getAllDoctorList().then(response=>{
  92. if(response.data.state == 1){
  93. var doctor = response.data.data.doctor
  94. this.doctorList = doctor
  95. }
  96. })
  97. },
  98. getAllHisPatientList(){
  99. const params = {
  100. record_date:this.record_date
  101. }
  102. getAllHisPatientList(params).then(response=>{
  103. if(response.data.state == 1){
  104. this.patientTableData = response.data.data.list
  105. this.patientTableDataTwo = response.data.data.list
  106. console.log('222', this.patientTableData)
  107. let cal_one = 0
  108. let cal_two = 0
  109. for (let i = 0; i < response.data.data.list.length; i++) {
  110. if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
  111. cal_one = cal_one + 1
  112. }
  113. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  114. cal_two = cal_two + 1
  115. }
  116. }
  117. // this.$refs.tab.setCurrentRow(this.patientTableData[0])
  118. // console.log(this.patientTableData[0])
  119. // this.choosePatient(this.patientTableData[0])
  120. this.cal_one = cal_one
  121. this.cal_two = cal_two
  122. }
  123. })
  124. },
  125. changePatient(row){
  126. console.log("row",row)
  127. this.patient_id = row.patient_id
  128. this.record_date = this.record_date
  129. this.prescription_id = this.prescription_id
  130. // var params = {
  131. // patient_id:row.patient_id,
  132. // record_date:this.record_date,
  133. // prescription_id:this.prescription_id,
  134. // }
  135. // getPrescriptionPrint(params).then(response=>{
  136. // if(response.data.state == 1){
  137. // var advicePrint = response.data.data.advicePrint
  138. // console.log("adviceprint",advicePrint)
  139. // this.advicePrint = advicePrint
  140. // // var hisPatient = response.data.data.hisPatient
  141. // // console.log("hispatient",hisPatient)
  142. // // this.hisPatient = hisPatient
  143. // var patient = response.data.data.patient
  144. // console.log("patient",patient)
  145. // this.patient = patient
  146. // var doctorPorject = response.data.data.doctorPorject
  147. // console.log("doctorporject",doctorPorject)
  148. // }
  149. // })
  150. },
  151. searchAction(){
  152. }
  153. },
  154. created() {
  155. this.org_id = this.$store.getters.xt_user.org_id
  156. this.getAllDoctorList()
  157. var record_date = this.paramsObj.record
  158. this.record_date = record_date
  159. console.log("record_date",record_date)
  160. this.prescription_id = this.paramsObj.prescription_id
  161. this.patient_id = this.paramsObj.patient_id
  162. this.ids = this.paramsObj.ids
  163. this.getAllHisPatientList(record_date)
  164. },
  165. watch:{
  166. paramsObj:{//深度监听,可监听到对象、数组的变化
  167. handler(val, oldVal){
  168. this.paramsObj = val
  169. this.patient_id = this.paramsObj.patient_id
  170. var record_date = this.paramsObj.record
  171. this.record_date = record_date
  172. var prescription_id = this.paramsObj.prescription_id
  173. this.prescription_id = prescription_id
  174. this.ids = this.paramsObj.ids
  175. },
  176. deep:true
  177. }
  178. }
  179. };
  180. </script>
  181. <style>
  182. .dialysis-print-order {
  183. width: 960px;
  184. margin: 0 auto;
  185. }
  186. .dialysis-print-order .order-yy-name {
  187. margin: auto;
  188. text-align: center;
  189. font-size: 20px;
  190. letter-spacing: 5px;
  191. }
  192. .dialysis-print-order .order-title {
  193. margin: auto;
  194. font-weight: 600;
  195. text-align: center;
  196. font-size: 22px;
  197. padding: 10px;
  198. }
  199. .dialysis-print-order .table-box {
  200. width: 100%;
  201. line-height: 23px;
  202. font-size: 14px;
  203. }
  204. .dialysis-print-order .print-table {
  205. width: 100%;
  206. text-align: center;
  207. border-collapse: collapse;
  208. line-height: 40px;
  209. font-size: 14px;
  210. border-color: #000;
  211. }
  212. .dialysis-print-order .print-table-no {
  213. width: 100%;
  214. text-align: center;
  215. border-collapse: collapse;
  216. font-size: 14px;
  217. }
  218. .dialysis-print-order .under-line {
  219. border-bottom: 1px solid #999;
  220. width: 95%;
  221. text-align: center;
  222. margin-left: 2px;
  223. }
  224. .dialysis-print-order .title-box {
  225. text-align: center;
  226. font-size: 16px;
  227. }
  228. .dialysis-print-order .radio-lebel-box {
  229. font-weight: 400;
  230. cursor: pointer;
  231. }
  232. .dialysis-print-order .radio-no {
  233. opacity: 0;
  234. outline: none;
  235. position: absolute;
  236. margin: 0;
  237. width: 0;
  238. height: 0;
  239. z-index: -1;
  240. }
  241. .dialysis-print-order .radio-inner {
  242. white-space: nowrap;
  243. cursor: pointer;
  244. outline: none;
  245. display: inline-block;
  246. line-height: 1;
  247. position: relative;
  248. vertical-align: middle;
  249. }
  250. .dialysis-print-order .radio-fang {
  251. display: inline-block;
  252. position: relative;
  253. border: 1px solid #000;
  254. box-sizing: border-box;
  255. width: 14px;
  256. height: 14px;
  257. background-color: #fff;
  258. z-index: 1;
  259. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  260. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  261. }
  262. .dialysis-print-order .is-checked-radio::after {
  263. content: "√";
  264. font-size: 15px;
  265. }
  266. .dialysis-print-order .print-table-no tr td {
  267. padding: 8px 5px;
  268. line-height: 25px;
  269. }
  270. .dialysis-print-order .print-table tr td {
  271. padding: 1px 1px;
  272. /*line-height: 25px;*/
  273. }
  274. .es-img {
  275. height: 30px;
  276. }
  277. .advice-name {
  278. text-align: left;
  279. }
  280. .advice-children {
  281. display: flex;
  282. }
  283. .title-box-pro {
  284. border: 0 #fff;
  285. line-height: 25px;
  286. height: 25px;
  287. text-align: left;
  288. padding-left: 10px !important;
  289. }
  290. .title-box-pro-tr {
  291. border: 0 #fff;
  292. }
  293. .text-align-left {
  294. text-align: left !important;
  295. padding-left: 10px !important;
  296. font-size: 14px !important;
  297. line-height: 25px;
  298. }
  299. .print-table-tr-new td {
  300. line-height: 20px !important;
  301. }
  302. .border-top-solid {
  303. border: solid 1px #000;
  304. }
  305. .print-template-two tr {
  306. line-height: 30px;
  307. }
  308. .table-box1 {
  309. border: 1px solid #000;
  310. width: 100%;
  311. line-height: 30px;
  312. font-size: 14px;
  313. border-collapse: collapse;
  314. }
  315. .table-box1 tr {
  316. border-bottom: 1px solid #000;
  317. }
  318. </style>
  319. <style lang="scss">
  320. .newContainer{
  321. .dialysisPage::-webkit-scrollbar {
  322. height: 15px;
  323. }
  324. .el-date-editor{
  325. .el-input__inner{
  326. padding-right:0px;
  327. }
  328. }
  329. .el-table td, .el-table th{
  330. text-align: center;
  331. }
  332. }
  333. .newContainer::-webkit-scrollbar{
  334. height: 15px !important;
  335. }
  336. </style>