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

treatPrint.vue 11KB

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