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

checkPrint.vue 9.0KB

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