血透系统pad前端

PrintIndex.vue 13KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548
  1. <template>
  2. <div class="mainBox" v-loading="loading" element-loading-text="加载中" element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.8)" style="width: 100%;height: 100%">
  3. <side-bar :active_index="0" v-if="isShow == true"></side-bar>
  4. <div class="mainContent">
  5. <div class="navigation" v-if="isShow == true">
  6. <div class="goBack">
  7. <span class="back" @click="backAction()"><span class="iconfont">&#xe720;</span>返回</span>
  8. </div>
  9. <!--<div class="print" style="float: right">-->
  10. <!--&lt;!&ndash;<el-button size="mini" type="primary" icon="el-icon-printer" @click="printThisPage">打印</el-button>&ndash;&gt;-->
  11. <!--</div>-->
  12. </div>
  13. <DialysisPrintOrderOne style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==1"> </DialysisPrintOrderOne>
  14. <DialysisPrintOrderTwo style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==2||org_template_info.template_id ==0"></DialysisPrintOrderTwo>
  15. <DialysisPrintOrderFive style="margin-top:60px;" v-bind:childResponse="childResponse" v-if="org_template_info.template_id ==5"></DialysisPrintOrderFive>
  16. </div>
  17. </div>
  18. </template>
  19. <script>
  20. import { getPrintDialysisRecord } from "@/api/dialysis";
  21. import { getDataConfig } from "@/utils/data";
  22. import SideBar from "@/pages/layout/SideBar";
  23. import { jsGetAge, uParseTime } from "@/utils/tools";
  24. import { fetchAllAdminUsers } from "@/api/doctor";
  25. import LabelBox from "./printItem/LabelBox";
  26. import DialysisPrintOrderOne from './template/DialysisPrintOrderOne';
  27. import DialysisPrintOrderTwo from './template/DialysisPrintOrderTwo';
  28. import DialysisPrintOrderFive from './template/DialysisPrintOrderFive';
  29. export default {
  30. name: "PrintIndex",
  31. components: {
  32. DialysisPrintOrderOne,
  33. DialysisPrintOrderTwo,
  34. DialysisPrintOrderFive,
  35. LabelBox,
  36. SideBar
  37. },
  38. data() {
  39. return {
  40. isShowImg: true,
  41. isShow: true,
  42. operators: [],
  43. dialysisOrder: {
  44. DeviceNumber: []
  45. },
  46. org_template_info: {},
  47. childResponse: {},
  48. operatorMaps: {},
  49. complications: [
  50. "低血压",
  51. "高血压",
  52. "心律失常",
  53. "头晕",
  54. "头痛",
  55. "呕吐",
  56. "抽搐",
  57. "出血",
  58. "心衰",
  59. "腹痛"
  60. ],
  61. jilurow: 10,
  62. loading: true,
  63. orgname: "",
  64. patientInfo_gender_1: false,
  65. patientInfo_gender_2: false,
  66. patientInfo_source_2: false,
  67. patientInfo_source_1: false,
  68. modeOptions: {},
  69. replacementWays: [],
  70. perfusionApparatus: [],
  71. anticoagulantsConfit: {},
  72. bloodAccessParOpera: {},
  73. dialysateFormulationOptions: {},
  74. queryParams: {
  75. xtdate: "",
  76. xtno: ""
  77. },
  78. patientInfo: {
  79. birth: "",
  80. age: "",
  81. DialysisSchedule: {
  82. device_number: { number: "" },
  83. device_zone: { name: "" }
  84. },
  85. gender: 0
  86. },
  87. predialysis: {
  88. internal_fistula: "",
  89. internal_fistula_skin: "",
  90. catheter: "",
  91. blood_access_part_opera_name: ""
  92. },
  93. afterdialysis: {
  94. complications_index: ""
  95. },
  96. prescription: {
  97. dialysate_formulation_name: "",
  98. device: {}
  99. },
  100. advices: [],
  101. users: [],
  102. monitors: [],
  103. summary: {},
  104. adminUser: [],
  105. receiverTreatmentAccess: {},
  106. AlPanel: {
  107. id: 0,
  108. name: "",
  109. type: 1,
  110. shouji: 2,
  111. weichi: 2,
  112. zongliang: 2,
  113. gaimingcheng: -1,
  114. gaijiliang: -1,
  115. shouji_unit: "mg",
  116. weichi_unit: "mg/h",
  117. zongliang_unit: "mg",
  118. gaimingcheng_unit: "",
  119. gaijiliang_unit: ""
  120. }
  121. };
  122. },
  123. methods: {
  124. getUser() {
  125. fetchAllAdminUsers().then(response => {
  126. if (response.data.state == 1) {
  127. this.adminUser = response.data.data.users;
  128. console.log(this.adminUser);
  129. this.loading = false;
  130. } else {
  131. this.loading = false;
  132. this.$message.error("请求数据失败");
  133. return false;
  134. }
  135. });
  136. },
  137. getTime(value, temp) {
  138. if (value != undefined) {
  139. return uParseTime(value, temp);
  140. }
  141. return "";
  142. },
  143. // printThisPage() {
  144. // var xtdate = this.$route.query.xtdate;
  145. // this.$router.push(
  146. // "/Prints?xtdate=" + xtdate + "&xtno=" + this.$route.query.xtno
  147. // );
  148. // },
  149. backAction() {
  150. this.$router.back(-1);
  151. },
  152. getXuserName(id) {
  153. if (id <= 0) {
  154. return "";
  155. }
  156. var name = "";
  157. if (this.users == null || typeof this.users.length == "undefined") {
  158. return name;
  159. }
  160. var leng = this.users.length;
  161. if (leng == 0) {
  162. return name;
  163. }
  164. for (let index = 0; index < leng; index++) {
  165. if (this.users[index].id == id) {
  166. name = this.users[index].name;
  167. break;
  168. }
  169. }
  170. return name;
  171. },
  172. setAdminUserES(id) {
  173. console.log(id);
  174. if (id == 0) {
  175. return "";
  176. }
  177. if (id == undefined) {
  178. return "";
  179. }
  180. if (id in this.operatorMaps) {
  181. return this.operatorMaps[id].url;
  182. }
  183. return "";
  184. },
  185. modeName(mode_id) {
  186. return typeof this.modeOptions[mode_id] != "undefined" &&
  187. typeof this.modeOptions[mode_id].name != "undefined"
  188. ? this.modeOptions[mode_id].name
  189. : "";
  190. },
  191. getDialysisRecord() {
  192. this.loading = true
  193. getPrintDialysisRecord(this.queryParams).then(response => {
  194. this.loading = false
  195. if (response.data.state == 1) {
  196. this.childResponse = response
  197. this.org_template_info = response.data.data.org_template_info
  198. } else {
  199. this.$message.error("请求数据失败");
  200. return false;
  201. }
  202. console.log(this.advices);
  203. });
  204. },
  205. bloodAccessParOperaName(id) {
  206. if (id in this.bloodAccessParOpera) {
  207. return this.bloodAccessParOpera[id].name;
  208. }
  209. return "";
  210. },
  211. dialysateFormulationName(id) {
  212. if (id in this.dialysateFormulationOptions) {
  213. return this.dialysateFormulationOptions[id].name;
  214. }
  215. return "";
  216. },
  217. getNumber() {
  218. if (this.dialysisOrder != null) {
  219. return (
  220. this.patientInfo.DialysisSchedule.device_zone.name +
  221. this.dialysisOrder.DeviceNumber.number
  222. );
  223. } else {
  224. return this.patientInfo.DialysisSchedule.device_zone.name;
  225. }
  226. },
  227. getAdminUser(id) {
  228. console.log(id);
  229. if (id == 0) {
  230. return "";
  231. }
  232. if (id == undefined) {
  233. return "";
  234. }
  235. for (let i = 0; i < this.adminUser.length; i++) {
  236. if (this.adminUser[i].id == id) {
  237. return this.adminUser[i].name;
  238. }
  239. }
  240. },
  241. printlog(val) {
  242. console.log(typeof val + "Second");
  243. }
  244. },
  245. watch: {
  246. "patientInfo.gender": function() {
  247. if (this.patientInfo.gender == 1) {
  248. this.patientInfo_gender_1 = true;
  249. this.patientInfo_gender_2 = false;
  250. } else if (this.patientInfo.gender == 2) {
  251. this.patientInfo_gender_2 = true;
  252. this.patientInfo_gender_1 = false;
  253. } else {
  254. this.patientInfo_gender_2 = false;
  255. this.patientInfo_gender_1 = false;
  256. }
  257. },
  258. "patientInfo.source": function() {
  259. if (this.patientInfo.source == 1) {
  260. this.patientInfo_source_1 = true;
  261. this.patientInfo_source_2 = false;
  262. } else if (this.patientInfo.source == 2) {
  263. this.patientInfo_source_2 = true;
  264. this.patientInfo_source_1 = false;
  265. } else {
  266. this.patientInfo_source_2 = false;
  267. this.patientInfo_source_1 = false;
  268. }
  269. }
  270. },
  271. created() {
  272. var xtuser = this.$store.getters.user;
  273. this.orgname = xtuser.org.org_name;
  274. // this.orgname = "遂溪方济医院";
  275. this.modeOptions = this.$store.getters.treatment_mode;
  276. this.replacementWays = this.$store.getters.replacement_ways;
  277. this.perfusionApparatus = this.$store.getters.perfusion_apparatus;
  278. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit;
  279. // this.bloodAccessParOpera = getDataConfig('hemodialysis', 'vascular_access_desc')
  280. var bloodAccessParOpera = getDataConfig(
  281. "hemodialysis",
  282. "vascular_access_desc"
  283. );
  284. for (var key in bloodAccessParOpera) {
  285. this.bloodAccessParOpera[bloodAccessParOpera[key].id] =
  286. bloodAccessParOpera[key];
  287. }
  288. var dialysateFormulationOptions = getDataConfig(
  289. "hemodialysis",
  290. "dialysate_formulation"
  291. );
  292. for (var key in dialysateFormulationOptions) {
  293. this.dialysateFormulationOptions[dialysateFormulationOptions[key].id] =
  294. dialysateFormulationOptions[key];
  295. }
  296. const xtdate = this.$route.query && this.$route.query.xtdate;
  297. const xtno = this.$route.query && this.$route.query.xtno;
  298. if (
  299. typeof xtdate == "string" &&
  300. xtdate.length > 0 &&
  301. typeof xtno == "string" &&
  302. xtno.length > 0
  303. ) {
  304. this.queryParams.xtdate = xtdate;
  305. this.queryParams.xtno = xtno;
  306. this.getDialysisRecord();
  307. } else {
  308. this.$message.error("参数不齐");
  309. return false;
  310. }
  311. // this.getUser();
  312. }
  313. };
  314. </script>
  315. <style style="stylesheet/scss" lang="scss" scoped>
  316. .dialysis-print-order {
  317. width: 960px;
  318. margin: 0 auto;
  319. .order-yy-name {
  320. margin:10px auto 0 auto;
  321. text-align: center;
  322. font-size: 20px;
  323. }
  324. .order-title {
  325. margin: auto;
  326. font-weight: 600;
  327. text-align: center;
  328. font-size: 22px;
  329. padding: 10px 20px 20px 20px;
  330. }
  331. .table-box {
  332. width: 100%;
  333. line-height: 15px;
  334. font-size: 14px;
  335. .under-line {
  336. border-bottom: 1px solid #999;
  337. width: 95%;
  338. text-align: center;
  339. margin-left: 2px;
  340. }
  341. }
  342. .print-table {
  343. width: 100%;
  344. text-align: center;
  345. border-collapse: collapse;
  346. line-height: 25px;
  347. font-size: 14px;
  348. .title-box {
  349. text-align: center;
  350. font-size: 16px;
  351. }
  352. }
  353. .print-table-no {
  354. width: 100%;
  355. text-align: center;
  356. border-collapse: collapse;
  357. font-size: 14px;
  358. }
  359. }
  360. .dialysis-print-order .radio-lebel-box {
  361. font-weight: 400;
  362. cursor: pointer;
  363. }
  364. .dialysis-print-order .radio-no {
  365. opacity: 0;
  366. outline: none;
  367. position: absolute;
  368. margin: 0;
  369. width: 0;
  370. height: 0;
  371. z-index: -1;
  372. }
  373. .dialysis-print-order .radio-inner {
  374. white-space: nowrap;
  375. cursor: pointer;
  376. outline: none;
  377. display: inline-block;
  378. line-height: 1;
  379. position: relative;
  380. vertical-align: middle;
  381. }
  382. .dialysis-print-order .radio-fang {
  383. display: inline-block;
  384. position: relative;
  385. border: 1px solid #000;
  386. box-sizing: border-box;
  387. width: 14px;
  388. height: 14px;
  389. background-color: #fff;
  390. z-index: 1;
  391. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  392. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  393. }
  394. .dialysis-print-order .is-checked-radio::after {
  395. content: "√";
  396. font-size: 15px;
  397. }
  398. .es-img {
  399. height: 25px;
  400. }
  401. html,
  402. body {
  403. height: 100%;
  404. }
  405. .mainBox {
  406. height: 100%;
  407. font-size: 0.3rem;
  408. .sideColumn {
  409. float: left;
  410. width: 1.58rem;
  411. background: #f5f8fb;
  412. height: 100%;
  413. border-right: 1px #c1c1c1 solid;
  414. position: fixed;
  415. .column {
  416. // height: 100%;
  417. // background: #f5f8fb;
  418. .head {
  419. @include display-flex;
  420. @include align-items-center;
  421. @include flex-direction;
  422. @include text-align;
  423. @include justify-content-center;
  424. margin: 0.5rem 0 0.5rem 0;
  425. img {
  426. width: 100%;
  427. height: 100%;
  428. border-radius: 0.5rem;
  429. width: 0.7rem;
  430. height: 0.7rem;
  431. }
  432. }
  433. .sidebar {
  434. @include display-flex;
  435. @include align-items-center;
  436. @include flex-direction;
  437. @include text-align;
  438. padding: 0;
  439. li {
  440. // font-size:0.23rem;
  441. padding: 0 0 0.8rem 0;
  442. a {
  443. color: #a8b3ba;
  444. display: inline-block;
  445. padding: 0;
  446. margin: 0;
  447. p {
  448. font-size: 0.24rem;
  449. margin-top: 0.2rem;
  450. }
  451. .iconfont {
  452. font-size: 0.5rem;
  453. display: inline-block;
  454. }
  455. }
  456. &.active {
  457. a {
  458. color: #409eff;
  459. }
  460. }
  461. }
  462. }
  463. }
  464. }
  465. }
  466. .navigation {
  467. @include display-flex;
  468. @include align-items-center;
  469. @include text-align;
  470. @include box-sizing;
  471. @include justify-content-between;
  472. padding: 0.3rem 0.36rem;
  473. border-bottom: 1px #e5e5e5 solid;
  474. position: fixed;
  475. top: 0;
  476. left: 1.58rem;
  477. right: 0;
  478. z-index: 100;
  479. background: #fff;
  480. .goBack {
  481. // color: #6e7a87;
  482. cursor: pointer;
  483. @include display-flex;
  484. @include align-items-center;
  485. @include text-align;
  486. .back {
  487. color: $main-color;
  488. margin-right: 0.87rem;
  489. .iconfont {
  490. color: $main-color;
  491. }
  492. }
  493. .name {
  494. .iconfont {
  495. margin-left: 0.1rem;
  496. }
  497. }
  498. }
  499. .nav {
  500. ul {
  501. li {
  502. float: left;
  503. font-size: 0.3rem;
  504. margin: 0 0.2rem;
  505. height: 0.5rem;
  506. line-height: 0.5rem;
  507. width: 1rem;
  508. cursor: pointer;
  509. &.active {
  510. background: $main-color;
  511. color: #fff;
  512. border-radius: 30px;
  513. }
  514. }
  515. }
  516. }
  517. .time {
  518. cursor: pointer;
  519. .iconfont {
  520. margin-left: 0.1rem;
  521. }
  522. }
  523. }
  524. .mainContent {
  525. margin: 0 0 0 1.58rem;
  526. }
  527. </style>