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

checkPrint.vue 9.0KB

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