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

print.vue 12KB

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