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

treatPrint.vue 12KB

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