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

print.vue 12KB

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