templateSummaryPrint.vue 18KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577
  1. <template>
  2. <div>
  3. <div style="float:right">
  4. <el-button type="primary" size="small" @click="printThisPage">打印</el-button>
  5. </div>
  6. <div id="dialysis-print-box">
  7. <div class="dialysis-print-order">
  8. <div class="order-yy-name"></div>
  9. <div class="order-title">{{ orgname }}血液透析患者诊疗阶段小结</div>
  10. <div style="padding-bottom:20px;border-bottom:1px solid #000;margin-top:40px;" v-if="org_id !=10013 &&org_id !=10014">
  11. <span>姓名:{{patientList.patient.name}}</span>
  12. <span style="margin-left:20px;">年龄:{{getNewAge(patientList.patient.id_card_no)}}</span>
  13. <span style="margin-left:20px;">性别:
  14. <span v-if="patientList.patient.gender == 1">男</span>
  15. <span v-if="patientList.patient.gender == 2">女</span>
  16. </span>
  17. <span style="margin-left:20px;">诊断:{{patientList.patient.diagnose}}</span>
  18. </div>
  19. <div style="padding:20px 0;border-bottom:1px solid #000;font-weight:bold;" v-if="org_id !=10013 &&org_id !=10014">
  20. <span>阶段评估时间:{{getTime(patientList.record_time)}}</span>
  21. </div>
  22. <!-- <div style="padding:20px 0;border-bottom:1px solid #000;">
  23. <span style="font-weight:bold;">阶段小结概要:</span>
  24. <div style="margin-top:20px;">
  25. <div style="display:flex;justify-content: space-between;">
  26. <span>干体重(kg):{{patientList.dry_weight}}</span>
  27. <span>共透析:{{patientList.dialysis_count}}次</span>
  28. <span>HD:{{patientList.hd_count}}次</span>
  29. <span>HDF:{{patientList.hdf_count}}次</span>
  30. <span>HP:{{patientList.hp_count}}次</span>
  31. <span>其他:{{patientList.other_count}}次</span>
  32. </div>
  33. <div style="display:flex;justify-content: space-between;margin-top:10px;">
  34. <span>透析器:{{patientList.dialzer_apparatus}}</span>
  35. <span>灌流器:{{patientList.perfusion_apparatus}}</span>
  36. <span>抗凝剂:{{getAnticoagulant(patientList.anticoagulant)}}</span>
  37. <span>透析液(钾:{{patientList.kalium}} 钙:{{patientList.autunite}} Na:{{patientList.natrium}} ):</span>
  38. <span>每次透析(小时):{{patientList.hour}}时{{patientList.minute}} <span v-if="patientList.minute!=''">分</span></span>
  39. </div>
  40. <div style="display:flex;justify-content: space-between;margin-top:10px;">
  41. <span>透前体重(kg):{{patientList.befor_weight}}</span>
  42. <span>透后体重(kg):{{patientList.after_weight}}</span>
  43. <span>透前血压(mmHg):{{patientList.befor_pressure}}</span>
  44. <span>透后血压(mmHg):{{patientList.after_pressure}}</span>
  45. </div>
  46. </div>
  47. </div> -->
  48. <div style="padding:20px 0;border-bottom:1px solid #000;min-height:200px;" v-if="org_id !=10013 &&org_id !=10014">
  49. <span style="font-weight:bold;">阶段小结总结:</span>
  50. <!-- {{patientList.template_summary_content}} -->
  51. <div style="line-height:24px; word-break: break-all;word-wrap: break-word"
  52. v-html="patientList.template_summary_content"></div>
  53. </div>
  54. <div style="padding:20px 0;border-bottom:1px solid #000;min-height:250px;" v-if="org_id!=0&&org_id!=10635">
  55. <span style="font-weight:bold;">阶段小结化验结果:</span>
  56. <div class="borderBox">
  57. <div v-for="item in patientList.template_inspection_content">
  58. <p>{{ item.project_name }} 检查日期:{{getTime(item.arr[0].inspect_date)}}</p>
  59. <div style="display:flex;flex-wrap: wrap;">
  60. <div v-for="it in item.arr" style="width:33%;margin-bottom:10px;">
  61. {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>:
  62. {{it.inspect_value}}
  63. <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
  64. </span>
  65. <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
  66. </span>
  67. </div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <!-- <div style="padding:20px 0;border-bottom:1px solid #000;min-height:200px;">
  73. <span style="font-weight:bold;">阶段小结个性化方案:</span>
  74. <div v-html="patientList.template_plan_content"></div>
  75. </div> -->
  76. <div style="margin-top:10px;">
  77. <span>记录医生:{{getPatientList(patientList.admin_user_id)}}</span>
  78. <span style="margin-left:20px;">记录时间:{{getTime(patientList.record_time)}}</span>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </template>
  84. <script>
  85. import { getDataConfig } from '@/utils/data'
  86. import { jsGetAge, uParseTime } from '@/utils/tools'
  87. import LabelBox from '../dialysis/printItem/LabelBox'
  88. import CheckBox from '../dialysis/batch_print/option_check_box'
  89. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  90. import {getTemplateSummaryPrintDetail} from "@/api/patient"
  91. export default {
  92. name: 'dialysisPrintOrderOne',
  93. components: {
  94. LabelBox,
  95. BreadCrumb,
  96. CheckBox
  97. },
  98. data() {
  99. return {
  100. crumbs: [
  101. { path: false, name: '透析管理' },
  102. { path: false, name: '打印单' }
  103. ],
  104. operators: [],
  105. adminUser: [],
  106. check: {},
  107. dialysisOrder: {
  108. DeviceNumber: []
  109. },
  110. posture_arr: [],
  111. operatorMaps: {},
  112. complications: [
  113. '低血压',
  114. '高血压',
  115. '心律失常',
  116. '头晕',
  117. '头痛',
  118. '呕吐',
  119. '抽搐',
  120. '出血',
  121. '心衰',
  122. '腹痛',
  123. '无'
  124. ],
  125. consciousness_arr: [],
  126. jilurow: 0,
  127. advice_jilurow: 0,
  128. loading: false,
  129. orgname: '',
  130. patientInfo_gender_1: false,
  131. patientInfo_gender_2: false,
  132. patientInfo_source_2: false,
  133. patientInfo_source_1: false,
  134. modeOptions: {},
  135. replacementWays: [],
  136. perfusionApparatus: [],
  137. anticoagulantsConfit: {},
  138. bloodAccessParOpera: {},
  139. dialysateFormulationOptions: {},
  140. queryParams: {
  141. xtdate: '',
  142. xtno: ''
  143. },
  144. patientInfo: {
  145. birth: '',
  146. age: '',
  147. DialysisSchedule: {
  148. device_number: { number: '' },
  149. device_zone: { name: '' }
  150. },
  151. gender: 0
  152. },
  153. predialysis: {
  154. score: '',
  155. internal_fistula: '',
  156. internal_fistula_skin: '',
  157. catheter: '',
  158. blood_access_part_opera_name: ''
  159. },
  160. afterdialysis: {
  161. complications_index: ''
  162. },
  163. prescription: {
  164. dialysate_formulation_name: '',
  165. device: {}
  166. },
  167. advices: [],
  168. users: [],
  169. monitors: [],
  170. summary: {},
  171. receiverTreatmentAccess: {},
  172. org_template_info: {},
  173. doctor_advices: [],
  174. advice_groups: [],
  175. schedule: [],
  176. AlPanel: {
  177. id: 0,
  178. name: '',
  179. type: 1,
  180. shouji: 2,
  181. weichi: 2,
  182. zongliang: 2,
  183. gaimingcheng: -1,
  184. gaijiliang: -1,
  185. shouji_unit: 'mg',
  186. weichi_unit: 'mg/h',
  187. zongliang_unit: 'mg',
  188. gaimingcheng_unit: '',
  189. gaijiliang_unit: ''
  190. },
  191. list: 5,
  192. replacement_total: '',
  193. actual_treatment_hour: '',
  194. actual_treatment_minute: '',
  195. anticoagulant: '',
  196. anticoagulant_shouji: '',
  197. anticoagulant_zongliang: '',
  198. prescription_dewatering: '',
  199. blood_flow_volume: '',
  200. dialysate_flow: '',
  201. bed: '',
  202. dialyzer_perfusion_apparatus: '',
  203. dialysate_formulation: '',
  204. blood_access: '',
  205. doctor: '',
  206. nurse: '',
  207. doctorAdvice: [],
  208. total: '',
  209. weight_before: '',
  210. dry_weight: '',
  211. weight_after: '',
  212. weightloss_after: '',
  213. actual_ultrafiltration: '',
  214. temperature: '',
  215. systolic_blood_pressure: '',
  216. diastolic_blood_pressure: '',
  217. mission: '',
  218. dialysis_summary: '',
  219. orderForm: {
  220. start_nurse: '',
  221. url: ''
  222. },
  223. doctorForm: {
  224. doctor: '',
  225. url: ''
  226. },
  227. finshForm: {
  228. finish_nurse: '',
  229. url: ''
  230. },
  231. tableAdvice: [],
  232. monitor: [],
  233. displace_liqui: '',
  234. kalium: '',
  235. sodium: '',
  236. calcium: '',
  237. weight_gain: '',
  238. afterWeightLast: '',
  239. anticoagulant_weichi: '',
  240. target_ultrafiltration: '',
  241. blood_access_internal_fistula: '',
  242. venous_catheterization: '',
  243. blood_access_part_opera_id: '',
  244. dryWeight_add: '',
  245. weight: '',
  246. vascularId: 0,
  247. PunctureNurse: {
  248. user_name: '',
  249. url: ''
  250. },
  251. arr: [],
  252. arrtwo: [],
  253. bloodAccess: [],
  254. vascularAccess: [],
  255. nursing_record: '',
  256. special_record: '',
  257. newTableAdvice: [],
  258. patientList:{},
  259. doctorList:[],
  260. anticoagulantList:[],
  261. org_id:0,
  262. }
  263. },
  264. methods: {
  265. getDatge(value) {
  266. var times = Date.parse(value) / 1000
  267. var timestr = uParseTime(times, '{y}年{m}月{d}日')
  268. return timestr
  269. },
  270. getTime(value, temp) {
  271. if (value == 0) {
  272. return ''
  273. }
  274. if (value != undefined) {
  275. return uParseTime(value, temp)
  276. }
  277. return ''
  278. },
  279. getTimes(time) {
  280. if (time === '') {
  281. return ''
  282. }
  283. return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
  284. },
  285. printThisPage() {
  286. var ptime = Math.round(new Date().getTime() / 1000)
  287. this.print_time = uParseTime(ptime, '{y}-{m}-{d} {h}:{i}')
  288. const style ='@media print {.dialysis-print-order{width:960px;margin:0 auto;letter-spacing:5px} .dialysis-print-order p{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 20px 20px 20px}.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:25px;font-size:14px}.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;border:1px solid #666}.dialysis-print-order .radio-lebel-box{font-weight:400;cursor:pointer}.dialysis-print-order .radio-no{opacity:0;outline:0;position:absolute;margin:0;width:0;height:0;z-index:-1}.dialysis-print-order .radio-inner{white-space:nowrap;cursor:pointer;outline:0;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 .25s cubic-bezier(.71,-.46,.29,1.46),background-color .25s cubic-bezier(.71,-.46,.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; }.es-img{height: 20px; }.advice-name{text-align: left;}.advice-children{display:flex;} .dialysis-print-order .print-table tr td{padding: 0px 0px;} .print-template-two tr {line-height: 30px;} .title-box-pro{border: 0 #fff;line-height: 40px;height: 40px;text-align: left;padding-left: 10px !important;} .text-align-left{text-align: left !important;padding-left:10px !important;font-size: 14px !important;line-height: 25px;font-weight: bold;margin: 10px 0;}'
  289. printJS({
  290. printable: 'dialysis-print-box',
  291. type: 'html',
  292. style: style,
  293. scanStyles: false
  294. })
  295. },
  296. getAge: function(val) {
  297. if (val.birthday != 0) {
  298. return jsGetAge(val.birth, '-')
  299. } else {
  300. return ''
  301. }
  302. },
  303. getTemplateSummaryPrintDetail(id){
  304. var params ={
  305. id:id,
  306. }
  307. getTemplateSummaryPrintDetail(params).then(response=>{
  308. if(response.data.state == 1){
  309. var list = response.data.data.list
  310. console.log("listw23222323",list)
  311. // let arr = JSON.parse(list.template_inspection_content)
  312. // list.template_inspection_content = arr
  313. var inspectlist = response.data.data.inspectlist
  314. let arr = this.unique(inspectlist,'project_name')
  315. list.template_inspection_content = arr
  316. this.patientList = list
  317. var doctorList = response.data.data.doctorList
  318. console.log("doctorlsit",doctorList)
  319. this.doctorList = doctorList
  320. }
  321. })
  322. },
  323. getNewAge(UUserCard) {
  324. if (UUserCard != null && UUserCard != '') {
  325. // 获取年龄
  326. var myDate = new Date()
  327. var month = myDate.getMonth() + 1
  328. var day = myDate.getDate()
  329. var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
  330. if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
  331. age++
  332. }
  333. return age
  334. }
  335. },
  336. getTime(val) {
  337. if(val < 0){
  338. return ""
  339. }
  340. if(val == ""){
  341. return ""
  342. }else {
  343. return uParseTime(val, '{y}-{m}-{d}')
  344. }
  345. },
  346. getPatientList(id){
  347. var name = ""
  348. for(let i=0;i<this.doctorList.length;i++){
  349. if(id == this.doctorList[i].admin_user_id){
  350. name = this.doctorList[i].user_name
  351. }
  352. }
  353. return name
  354. },
  355. unique(data, key) {
  356. let lastData = [];
  357. data.forEach(item => {
  358. let status = lastData.some(project_name => project_name[key] == item[key]);
  359. console.log('status',status)
  360. if (!status) {
  361. // item.value0 = item.value;
  362. let obj = {
  363. project_name:'',
  364. arr:[]
  365. }
  366. obj.project_name = item.project_name
  367. obj.arr.push(item);
  368. lastData.push(obj);
  369. console.log('item',item)
  370. } else {
  371. lastData.forEach((project_name, index) => {
  372. if (project_name[key] === item[key]) {
  373. console.log('item222',item)
  374. project_name.arr.push(item);
  375. }
  376. });
  377. }
  378. });
  379. return lastData;
  380. },
  381. getAnticoagulant(id){
  382. var name = ""
  383. for(let i=0;i<this.anticoagulantList.length;i++){
  384. if(id == this.anticoagulantList[i].id){
  385. name = this.anticoagulantList[i].name
  386. }
  387. }
  388. return name
  389. }
  390. },
  391. created() {
  392. this.org_id = this.$store.getters.xt_user.org.id
  393. var anticoagulantsConfitOne = this.$store.getters.anticoagulants_confit
  394. const arrFour = []
  395. Object.keys(anticoagulantsConfitOne).map((item, index) => {
  396. if (index != 2) {
  397. arrFour.push(anticoagulantsConfitOne[item])
  398. }
  399. })
  400. this.anticoagulantList = arrFour
  401. console.log("抗凝剂",this.anticoagulantList)
  402. var xtuser = this.$store.getters.xt_user
  403. this.orgname = xtuser.org.org_name
  404. var id = this.$route.query.id
  405. this.getTemplateSummaryPrintDetail(id)
  406. }
  407. }
  408. </script>
  409. <style>
  410. .borderBox p{
  411. font-weight: bold;
  412. margin: 10px 0;
  413. }
  414. .dialysis-print-order {
  415. width: 960px;
  416. margin: 0 auto;
  417. }
  418. .dialysis-print-order .order-yy-name {
  419. margin: auto;
  420. text-align: center;
  421. font-size: 20px;
  422. letter-spacing: 5px;
  423. }
  424. .dialysis-print-order .order-title {
  425. margin: auto;
  426. font-weight: 600;
  427. text-align: center;
  428. font-size: 22px;
  429. padding: 10px 20px 20px 20px;
  430. }
  431. .dialysis-print-order .table-box {
  432. width: 100%;
  433. line-height: 23px;
  434. font-size: 14px;
  435. }
  436. .dialysis-print-order .print-table {
  437. width: 100%;
  438. text-align: center;
  439. border-collapse: collapse;
  440. line-height: 40px;
  441. font-size: 14px;
  442. }
  443. .dialysis-print-order .print-table-no {
  444. width: 100%;
  445. text-align: center;
  446. border-collapse: collapse;
  447. font-size: 14px;
  448. }
  449. .dialysis-print-order .under-line {
  450. border-bottom: 1px solid #999;
  451. width: 95%;
  452. text-align: center;
  453. margin-left: 2px;
  454. }
  455. .dialysis-print-order .title-box {
  456. text-align: center;
  457. font-size: 16px;
  458. }
  459. .dialysis-print-order .radio-lebel-box {
  460. font-weight: 400;
  461. cursor: pointer;
  462. }
  463. .dialysis-print-order .radio-no {
  464. opacity: 0;
  465. outline: none;
  466. position: absolute;
  467. margin: 0;
  468. width: 0;
  469. height: 0;
  470. z-index: -1;
  471. }
  472. .dialysis-print-order .radio-inner {
  473. white-space: nowrap;
  474. cursor: pointer;
  475. outline: none;
  476. display: inline-block;
  477. line-height: 1;
  478. position: relative;
  479. vertical-align: middle;
  480. }
  481. .dialysis-print-order .radio-fang {
  482. display: inline-block;
  483. position: relative;
  484. border: 1px solid #000;
  485. box-sizing: border-box;
  486. width: 14px;
  487. height: 14px;
  488. background-color: #fff;
  489. z-index: 1;
  490. transition: border-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46),
  491. background-color 0.25s cubic-bezier(0.71, -0.46, 0.29, 1.46);
  492. }
  493. .dialysis-print-order .is-checked-radio::after {
  494. content: "√";
  495. font-size: 15px;
  496. }
  497. .dialysis-print-order .print-table-no tr td {
  498. padding: 8px 5px;
  499. line-height: 25px;
  500. }
  501. .dialysis-print-order .print-table tr td {
  502. padding: 1px 1px;
  503. /*line-height: 25px;*/
  504. }
  505. .es-img {
  506. height: 25px;
  507. }
  508. .advice-name {
  509. text-align: left;
  510. }
  511. .advice-children {
  512. display: flex;
  513. }
  514. .title-box-pro {
  515. border: 0 #fff;
  516. line-height: 25px;
  517. height: 25px;
  518. text-align: left;
  519. padding-left: 10px !important;
  520. }
  521. .title-box-pro-tr {
  522. border: 0 #fff;
  523. }
  524. .text-align-left {
  525. text-align: left !important;
  526. padding-left: 10px !important;
  527. font-size: 14px !important;
  528. line-height: 25px;
  529. }
  530. .print-table-tr-new td {
  531. line-height: 20px !important;
  532. }
  533. .border-top-solid {
  534. border: solid 1px #000;
  535. }
  536. .print-template-two tr {
  537. line-height: 30px;
  538. }
  539. .parent {
  540. text-align: left;
  541. padding-left: 20px !important;
  542. }
  543. </style>