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

print.vue 13KB

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