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

print.vue 13KB

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