123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434 |
- <template>
- <div>
- <template>
- <el-button
- style="position: fixed; right: 25px; z-index: 999"
- size="small"
- icon="el-icon-printer"
- @click="printThisPage"
- type="primary"
- >打印</el-button
- >
- </template>
-
- <div class="dialysisPage" style="padding-top: 40px">
- <printOne
- v-if="
- org_id != 10217 &&
- org_id != 9675 &&
- org_id != 9671 &&
- org_id != 0 &&
- org_id != 10164 &&
- org_id == 10188 &&
- org_id != 10318
- "
- ref="printOne"
- v-bind:childResponse="childResponse"
- :patient="patient"
- :hispatient="hispatient"
- :history="history"
- :patientid="patientid"
- ></printOne>
- <printTwo
- v-if="
- org_id == 10217 ||
- org_id == 9675 ||
- org_id == 9671 ||
- org_id == 10164 ||
- org_id == 10188
- "
- ref="printTwo"
- v-bind:childResponse="childResponse"
- :patient="patient"
- :hispatient="hispatient"
- :history="history"
- :patientid="patientid"
- ></printTwo>
- <printThree
- v-if="org_id == 10318 || org_id == 0"
- ref="printThree"
- v-bind:childResponse="childResponse"
- :patient="patient"
- :hispatient="hispatient"
- :history="history"
- :patientid="patientid"
- >
- </printThree>
- </div>
- </div>
- </template>
-
- <script>
- import { parseTime } from "@/utils";
- import { getDataConfig } from "@/utils/data";
- import { jsGetAge, uParseTime } from "@/utils/tools";
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
- import print from "print-js";
- import { getSchedulePatientList } from "@/api/his/his";
- import { getPatientCaseHistory } from "@/api/project/project";
- import printOne from "./recordTemplate/printOne";
- import printTwo from "./recordTemplate/printTwo";
- import printThree from "./recordTemplate/printThree";
- export default {
- name: "dialysisPrintOrder",
- components: {
- BreadCrumb,
- printOne,
- printTwo,
- printThree,
- },
- props: {
- patientid: Number,
- },
- data() {
- return {
- crumbs: [
- { path: false, name: "透析管理" },
- { path: false, name: "打印单" },
- ],
- childResponse: {},
- patientTableData: [],
- search_input: "",
- patient: {},
- hispatient: {},
- educationOptions: [],
- history: {},
- keyword: "",
- org_id: 0,
- };
- },
-
- methods: {
- show(val, id) {
- this.org_id = id;
- if (id == 10217 || id == 9675 || id == 9671 ) {
- this.$refs.printTwo.show(val);
- } else if (id == 10318|| id == 0) {
- this.$refs.printThree.show(val);
- } else {
- this.$refs.printOne.show(val);
- }
- },
- getAdminUser(id) {
- if (id == 0) {
- return "";
- }
- if (id == undefined) {
- return "";
- }
- for (let i = 0; i < this.adminUser.length; i++) {
- if (this.adminUser[i].id == id) {
- return this.adminUser[i].name;
- }
- }
- },
- getTime(value, temp) {
- if (value == 0) {
- return "";
- }
- if (value != undefined) {
- return uParseTime(value, temp);
- }
- return "";
- },
- printThisPage() {
- var ptime = Math.round(new Date().getTime() / 1000);
- this.print_time = uParseTime(ptime, "{y}-{m}-{d} {h}:{i}");
-
- const style =
- "@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;padding:0 10px;}.infoTitle div{width: 200px;}.otherInfo{display: flex;margin-top:20px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;}.recordTitle div{width: 200px;}}";
- const style1 =
- "@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;} .infoTitle div{width: 200px;} .infoTitle .address_slot{width: 400px;} .infoTitle .name_slot{width: 250px;}.otherInfo{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;justify-content: center;flex-direction: column;margin-top:10px;line-height: 24px;padding:0 10px;border-top: 1px solid;}.recordTitle div{width: 100%;text-align: center;} .recordTitle .recordContent{width: 100%;height: fit-content;min-height: 150px;text-align: left;} .endInfo{display: flex;flex-direction: column;justify-content: end;margin-top: 10px;line-height: 24px;} .endInfo div{width: 300px;} .record_Title{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;} .record_Title div{width: 200px;}}";
- const style2 =
- "@media print {.printTitle{font-size: 22px;text-align: center;font-weight: bold;padding-bottom: 10px;border-bottom: 1px solid;}.infoTitle{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;} .infoTitle div{width: 200px;} .infoTitle .address_slot{width: 400px;} .infoTitle .name_slot {width: 300px;display: flex;}.name_slot span {display: inline-block;min-width: 70px;border-bottom: 1px solid;} .infoTitle .name_slot_2 {width: 250px;display: flex;} .name_slot_2 .name_slot_1{ display: inline-block;min-width: 70px;border-bottom: 1px solid;} .infoTitle .full_slot {width: 100%;}.infoTitle .full_slot .id_card{border: 1px solid;display: inline-block;width: 18px;height: 18px;text-align: center;margin-right: 6px;} .address_slot_1 span {display: inline-block;min-width: 60px;border-bottom: 1px solid;} .otherInfo{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;}.otherInfo span{display:inline-block;}.recordTitle{display: flex;justify-content: center;flex-direction: column;margin-top:10px;line-height: 24px;padding:0 10px;border-top: 1px solid;}.recordTitle div{width: 100%;text-align: center;} .recordTitle .recordContent{width: 100%;height: fit-content;min-height: 150px;text-align: left;} .endInfo{display: flex;flex-direction: column;justify-content: end;margin-top: 10px;line-height: 24px;} .endInfo div{width: 300px;} .record_Title{display: flex;margin-top:10px;line-height: 24px;padding:0 10px;border-bottom: 2px solid #000;} .record_Title div{width: 200px;}}";
-
- if (this.org_id != 10217 && this.org_id != 0 && this.org_id != 9675 && this.org_id != 10318) {
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style,
- scanStyles: false,
- });
- } else if (
- this.org_id == 10217 ||
- this.org_id == 9675
- ) {
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style1,
- scanStyles: false,
- });
- }else if(this.org_id == 10318||this.org_id == 0 )
- {
- printJS({
- printable: "prescription-print",
- type: "html",
- style: style2,
- scanStyles: false,
- });
- }
- },
-
- //患者列表
- getPatientList() {
- let params = {
- record_date: this.$route.query.record,
- };
-
- getSchedulePatientList(params).then((response) => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.patientTableData = [];
- console.log("list0000000", response.data.data.list);
- // for (let i = 0; i < response.data.data.list.length; i++) {
- // if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
- // this.patientTableData.push(response.data.data.list[i])
- // }
- // }
- this.patientTableData = response.data.data.list;
- }
- });
- },
-
- changePatient(val) {
- const params = {
- patient_id: val.patient_id,
- };
- console.log("params", params);
- getPatientCaseHistory(params).then((response) => {
- if (response.data.state == 1) {
- var patient = response.data.data.patient;
- console.log("patinet", patient);
- this.patient = patient;
- var history = response.data.data.history;
- console.log("history", history);
- this.history = history;
- var hispatient = response.data.data.hispatient;
- console.log("hispatient", hispatient);
- this.hispatient = hispatient;
- }
- });
- },
- searchAction() {
- this.getPatientList();
- },
- },
- created() {
- // this.getPatientList()
- // this.org_id = this.$store.getters.xt_user.org.id;
- // console.log("=====", this.org_id);
- // this.$refs.printOne.show(this.patientid);
- // this.$refs.printTwo.show(this.patientid);
- },
- // computed:{
- // filtedSchedules: function() {
- // var search_keyword = this.search_keyword
- // if (search_keyword.length > 0) {
- // var schedules = []
- // for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
- // const scheduleInfo = this.zone_schedules[o_i]
- // var originSchedules = scheduleInfo.schedules
- // if (originSchedules.length == 0) {
- // continue
- // }
- // var filtedSchedules = []
- // for (let s_i = 0; s_i < originSchedules.length; s_i++) {
- // const schedule = originSchedules[s_i]
- // if (schedule.patient.name.indexOf(search_keyword) != -1) {
- // filtedSchedules.push(schedule)
- // // break
- // }
- // }
- // if (filtedSchedules.length > 0) {
- // schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
- // }
- // }
- // return schedules
- // }
- // }
- // },
- };
- </script>
-
- <style>
- .dialysis-print-order {
- width: 960px;
- margin: 0 auto;
- }
-
- .dialysis-print-order .order-yy-name {
- margin: auto;
- text-align: center;
- font-size: 20px;
- letter-spacing: 5px;
- }
-
- .dialysis-print-order .order-title {
- margin: auto;
- font-weight: 600;
- text-align: center;
- font-size: 22px;
- padding: 10px;
- }
-
- .dialysis-print-order .table-box {
- width: 100%;
- line-height: 23px;
- font-size: 14px;
- }
-
- .dialysis-print-order .print-table {
- width: 100%;
- text-align: center;
- border-collapse: collapse;
- line-height: 40px;
- font-size: 14px;
- border-color: #000;
- }
-
- .dialysis-print-order .print-table-no {
- width: 100%;
- text-align: center;
- border-collapse: collapse;
- font-size: 14px;
- }
-
- .dialysis-print-order .under-line {
- border-bottom: 1px solid #999;
- width: 95%;
- text-align: center;
- margin-left: 2px;
- }
-
- .dialysis-print-order .title-box {
- text-align: center;
- font-size: 16px;
- }
-
- .dialysis-print-order .radio-lebel-box {
- font-weight: 400;
- cursor: pointer;
- }
-
- .dialysis-print-order .radio-no {
- opacity: 0;
- outline: none;
- position: absolute;
- margin: 0;
- width: 0;
- height: 0;
- z-index: -1;
- }
-
- .dialysis-print-order .radio-inner {
- white-space: nowrap;
- cursor: pointer;
- outline: none;
- display: inline-block;
- line-height: 1;
- position: relative;
- vertical-align: middle;
- }
-
- .dialysis-print-order .radio-fang {
- display: inline-block;
- position: relative;
- border: 1px solid #000;
- box-sizing: border-box;
- width: 14px;
- height: 14px;
- background-color: #fff;
- z-index: 1;
- transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
- background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
- }
-
- .dialysis-print-order .is-checked-radio::after {
- content: "√";
- font-size: 15px;
- }
-
- .dialysis-print-order .print-table-no tr td {
- padding: 8px 5px;
- line-height: 25px;
- }
-
- .dialysis-print-order .print-table tr td {
- padding: 1px 1px;
- /*line-height: 25px;*/
- }
-
- .es-img {
- height: 30px;
- }
-
- .advice-name {
- text-align: left;
- }
-
- .advice-children {
- display: flex;
- }
-
- .title-box-pro {
- border: 0 #fff;
- line-height: 25px;
- height: 25px;
- text-align: left;
- padding-left: 10px !important;
- }
- .title-box-pro-tr {
- border: 0 #fff;
- }
- .text-align-left {
- text-align: left !important;
- padding-left: 10px !important;
- font-size: 14px !important;
- line-height: 25px;
- }
- .print-table-tr-new td {
- line-height: 20px !important;
- }
- .border-top-solid {
- border: solid 1px #000;
- }
- .print-template-two tr {
- line-height: 30px;
- }
-
- .table-box1 {
- border: 1px solid #000;
- width: 100%;
- line-height: 30px;
- font-size: 14px;
- border-collapse: collapse;
- }
- .table-box1 tr {
- border-bottom: 1px solid #000;
- }
- </style>
-
- <style lang="scss">
- .newContainer {
- .dialysisPage::-webkit-scrollbar {
- height: 15px;
- }
-
- .el-date-editor {
- .el-input__inner {
- padding-right: 0px;
- }
- }
- .el-table td,
- .el-table th {
- text-align: center;
- }
- }
- .newContainer::-webkit-scrollbar {
- height: 15px !important;
- }
- </style>
|