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

print.vue 12KB

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