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

print.vue 13KB

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