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

dialysisGoodPrint.vue 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs"></bread-crumb>
  5. <el-row style="float:right;">
  6. <el-col :span="24">
  7. <el-button size="small" icon="el-icon-printer" type="primary" @click="printAction">打印</el-button>
  8. </el-col>
  9. </el-row>
  10. </div>
  11. <div class="app-container" style="background-color: white;">
  12. <div id="print_content">
  13. <div class="print_main_content">
  14. <div class="order_title_panl">
  15. <span class="main_title"> &nbsp;
  16. 透析耗材
  17. </span>
  18. <span style="float:right;">打印日期: &nbsp;
  19. {{$route.query.schedule_date}}
  20. </span>
  21. </div>
  22. <div class="table_panel">
  23. <table class="table" v-if="his_config.is_open != 1">
  24. <thead>
  25. <tr>
  26. <td width="50">序号</td>
  27. <td width="100">透析机号</td>
  28. <td width="100">姓名</td>
  29. <td width="100">透析号</td>
  30. <td width="200" v-for="(item,index) in rowList" :key="index">
  31. {{item.filed_name_cn}}
  32. </td>
  33. </tr>
  34. </thead>
  35. <tbody>
  36. <tr v-for="(item,i) in tableData" :key="i">
  37. <td>{{i+1}}</td>
  38. <td> {{item.device_number.zone.name}} {{item.device_number.number}}</td>
  39. <td>{{item.patient.name}}</td>
  40. <td>{{item.patient.dialysis_no}}</td>
  41. <td v-for="(it,index) in rowList" :key="index">
  42. {{getName(item.rowList[index].filed_name_cn,item.dialysis_solution)}}
  43. </td>
  44. </tr>
  45. </tbody>
  46. </table>
  47. <table class="table" v-if="his_config.is_open == 1">
  48. <thead>
  49. <tr>
  50. <td width="50">序号</td>
  51. <td width="100">透析机号</td>
  52. <td width="100">姓名</td>
  53. <td width="100">透析机号</td>
  54. <td width="200" v-for="(item,index) in typeList" :key="index">
  55. {{item.type_name}}
  56. </td>
  57. </tr>
  58. </thead>
  59. <tbody>
  60. <tr v-for="(item,i) in tableData" :key="i">
  61. <td>{{i+1}}</td>
  62. <td> {{item.device_number.zone.name}} {{item.device_number.number}}</td>
  63. <td>{{item.patient.name}}</td>
  64. <td>{{item.patient.dialysis_no}}</td>
  65. <td v-for="(it,index) in typeList" :key="index">
  66. {{getStr(item.typeList[index].id,item.projectList,item.patient_id)}}
  67. </td>
  68. </tr>
  69. </tbody>
  70. </table>
  71. </div>
  72. </div>
  73. </div>
  74. </div>
  75. </div>
  76. </template>
  77. <script>
  78. import { GetAllZone,getPatientDialysisSolutionGroupList,getDialysisGoodTotalCount,saveHisDialysis,getHisDialysisGoodCount } from '@/api/dialysis'
  79. import { parseTime } from '@/utils'
  80. import { uParseTime } from '@/utils/tools'
  81. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  82. import print from 'print-js'
  83. import { getDataConfig } from '@/utils/data'
  84. export default {
  85. name: 'SchedulePrint',
  86. data() {
  87. return {
  88. crumbs: [
  89. { path: false, name: '排班管理' },
  90. { path: false, name: '排班打印' }
  91. ],
  92. td_1_width: '8%',
  93. td_2_width: '8%',
  94. td_3_width: '64%',
  95. td_4_width: '20%',
  96. month: 1,
  97. begin_day: 1,
  98. total:[],
  99. list:[],
  100. schedule_date:"",
  101. schedule_type:0,
  102. partition_type:0,
  103. keywords:"",
  104. loading:false,
  105. tableData:[],
  106. numberList:[],
  107. partitionArr:[],
  108. his_config:{},
  109. typeList:[],
  110. rowList:[],
  111. dialysate_formulation:[],
  112. body_fluid_option:[],
  113. displace_liqui_part_option:[],
  114. blood_access_option:[],
  115. hemodialysisPipelinesOptions:[],
  116. }
  117. },
  118. components: {
  119. BreadCrumb
  120. },
  121. created() {
  122. this.dialysate_formulation = getDataConfig(
  123. 'hemodialysis',
  124. 'dialysate_formulation'
  125. )
  126. this.body_fluid_option = this.$store.getters.body_fluid
  127. this.displace_liqui_part_option = this.$store.getters.displace_liqui
  128. this.blood_access_option = this.$store.getters.blood_access
  129. this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
  130. this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
  131. var filedList = this.$store.getters.xt_user.fileds
  132. for (let i = 0; i < filedList.length; i++) {
  133. if ( filedList[i].module == 1 && filedList[i].is_show == 1 && (filedList[i].filed_name_cn == '透析器/灌流器' || filedList[i].filed_name_cn == '透析器' || filedList[i].filed_name_cn == '灌流器' || filedList[i].filed_name_cn == '钾' || filedList[i].filed_name_cn == '钠' || filedList[i].filed_name_cn == '钙' || filedList[i].filed_name_cn == '葡萄糖' || filedList[i].filed_name_cn == '穿刺针' || filedList[i].filed_name_cn == '滤过器')) {
  134. this.rowList.push(filedList[i])
  135. }
  136. }
  137. this.getlist()
  138. },
  139. methods: {
  140. getlist(){
  141. var params = {
  142. keywords:this.$route.query.keywords,
  143. limit:this.$route.query.limit,
  144. page:this.$route.query.page,
  145. partition_id:this.$route.query.partition_id,
  146. schedule_date:this.$route.query.schedule_date,
  147. schedule_type:this.$route.query.schedule_type,
  148. ids:this.$route.query.ids,
  149. }
  150. getPatientDialysisSolutionGroupList(params).then(response=>{
  151. if(response.data.state == 1){
  152. var list = response.data.data.list
  153. var total = response.data.data.total
  154. this.total = total
  155. var goodType = response.data.data.goodType
  156. var config = response.data.data.config
  157. this.his_config = config
  158. if(config.is_open !=1){
  159. if(list!=null){
  160. for(let i=0;i<list.length;i++){
  161. list[i].rowList = []
  162. list[i].rowList = this.rowList
  163. }
  164. }
  165. this.tableData= []
  166. this.tableData = list
  167. }
  168. if(config.is_open == 1){
  169. if(list!=null){
  170. this.typeList= []
  171. for(let i=0;i<goodType.length;i++){
  172. if(goodType[i].is_open == 1){
  173. this.typeList.push(goodType[i])
  174. }
  175. }
  176. for(let i=0;i<list.length;i++){
  177. list[i].projectList = []
  178. list[i].typeList = []
  179. list[i].typeList = this.typeList
  180. }
  181. for(let i=0;i<list.length;i++){
  182. if(list[i].his_prescription_template.his_prescription_info!=null && list[i].his_prescription_template.his_prescription_info.length >0){
  183. for(let j=0;j<list[i].his_prescription_template.his_prescription_info.length;j++){
  184. for(let z=0;z<list[i].his_prescription_template.his_prescription_info[j].project.length;z++){
  185. list[i].projectList.push(list[i].his_prescription_template.his_prescription_info[j].project[z])
  186. }
  187. }
  188. }
  189. }
  190. console.log("list列表",list)
  191. this.tableData = []
  192. this.tableData = list
  193. }
  194. }
  195. }
  196. })
  197. },
  198. getTimeOne(val) {
  199. if(val == ""){
  200. return ""
  201. }else {
  202. return uParseTime(val, '{y}-{m}-{d}')
  203. }
  204. },
  205. printAction: function() {
  206. const style = '@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } }'
  207. printJS({
  208. printable: 'print_content',
  209. type: 'html',
  210. documentTitle: ' ',
  211. style: style,
  212. scanStyles: false
  213. })
  214. },
  215. getStr(good_type_id,arrNew,patient_id){
  216. var arr= []
  217. var str = ""
  218. if(arrNew!=null && arrNew.length > 0){
  219. for(let i=0;i<arrNew.length;i++){
  220. arrNew[i].good_type_id = 0
  221. arrNew[i].good_type_id = arrNew[i].good_info.good_type_id
  222. arrNew[i].good_id = 0
  223. arrNew[i].good_id = arrNew[i].good_info.id
  224. if(arrNew[i].patient_id == patient_id && arrNew[i].good_info.good_type_id == good_type_id){
  225. arr.push(arrNew[i])
  226. }
  227. }
  228. }
  229. let dataInfo = {}
  230. if(arr!=null && arr.length > 0){
  231. arr.forEach((item, index) => {
  232. let { good_id } = item
  233. if (!dataInfo[good_id]) {
  234. dataInfo[good_id] = {
  235. good_id:item.good_id,
  236. child: [],
  237. count:0,
  238. specification_name:item.good_info.specification_name
  239. }
  240. }
  241. })
  242. let newArr = Object.values(dataInfo)
  243. console.log("newArr",newArr)
  244. for(let i=0;i<arr.length;i++){
  245. for(let j=0;j<newArr.length;j++){
  246. if( arr[i].good_info.id == newArr[j].good_id){
  247. newArr[j].child.push(arr[i])
  248. }
  249. }
  250. }
  251. if(newArr!=null && newArr.length > 0){
  252. for(let j=0;j<newArr.length;j++){
  253. for(let z=0;z<newArr[j].child.length;z++){
  254. newArr[j].count += parseInt(newArr[j].child[z].count)
  255. }
  256. }
  257. for(let j=0;j<newArr.length;j++){
  258. str += newArr[j].specification_name + "*" + newArr[j].count + " "
  259. }
  260. }
  261. }
  262. return str
  263. },
  264. getName(filed_name_cn,val){
  265. if(filed_name_cn == "透析模式"){
  266. return this.getModeName(val.mode_id)
  267. }
  268. if(filed_name_cn == "血流量"){
  269. if(val.blood_flow_volume > 0){
  270. return val.blood_flow_volume
  271. }else{
  272. return ""
  273. }
  274. }
  275. if(filed_name_cn == "目标超滤量"){
  276. return val.target_ultrafiltration?val.target_ultrafiltration:""
  277. }
  278. if(filed_name_cn == "透析液配方"){
  279. return this.getDialysateFormulation(val.dialysate_formulation)
  280. }
  281. if(filed_name_cn == "抗凝剂"){
  282. return this.getAnticoagulant(val.anticoagulant)
  283. }
  284. if(filed_name_cn == "首剂"){
  285. return val.anticoagulant_shouji?val.anticoagulant_shouji:""
  286. }
  287. if(filed_name_cn == "维持"){
  288. return val.anticoagulant_weichi?val.anticoagulant_weichi:""
  289. }
  290. if(filed_name_cn == "总量"){
  291. return val.anticoagulant_zongliang?val.anticoagulant_zongliang:""
  292. }
  293. if(filed_name_cn == "置换量"){
  294. return val.replacement_total?val.replacement_total:""
  295. }
  296. if(filed_name_cn == "钾"){
  297. return val.kalium?val.kalium:""
  298. }
  299. if(filed_name_cn == "钠"){
  300. return val.sodium?val.sodium:""
  301. }
  302. if(filed_name_cn == "钙"){
  303. return val.calcium?val.calcium:""
  304. }
  305. if(filed_name_cn == "碳酸氢盐"){
  306. return val.bicarbonate?val.bicarbonate:""
  307. }
  308. if(filed_name_cn == "透析液流量"){
  309. return val.dialysate_flow?val.dialysate_flow:""
  310. }
  311. if(filed_name_cn == "透析液温度"){
  312. return val.dialysate_temperature?val.dialysate_temperature:""
  313. }
  314. if(filed_name_cn == "电导度"){
  315. return val.conductivity?val.conductivity:""
  316. }
  317. if(filed_name_cn == "透析器/灌流器"){
  318. return val.dialyzer_perfusion_apparatus?val.dialyzer_perfusion_apparatus:""
  319. }
  320. if(filed_name_cn == "钙名称"){
  321. return val.anticoagulant_gaimingcheng?val.anticoagulant_gaimingcheng:""
  322. }
  323. if(filed_name_cn == "钙剂量"){
  324. return val.anticoagulant_gaijiliang?val.anticoagulant_gaijiliang:""
  325. }
  326. if(filed_name_cn == "体液过多症状"){
  327. return this.getBodyFluid(val.body_fluid)
  328. }
  329. if(filed_name_cn == "透析前使用特殊药物"){
  330. return val.special_medicine?val.special_medicine:""
  331. }
  332. if(filed_name_cn == "透析前使用其他特殊药物"){
  333. return val.special_medicine_other?val.special_medicine_other:""
  334. }
  335. if(filed_name_cn == "置换液"){
  336. return this.getDisplace(val.displace_liqui_part)
  337. }
  338. if(filed_name_cn == "血管通路"){
  339. return this.getBloodAccess(val.blood_access)
  340. }
  341. if(filed_name_cn == "体液过多其他症状"){
  342. return val.body_fluid_other?val.body_fluid_other:""
  343. }
  344. if(filed_name_cn == "透析时长"){
  345. return val.dialysis_duration_hour + "小时" + val.dialysis_duration_minute + "分钟"
  346. }
  347. if(filed_name_cn == "置换液总量"){
  348. return val.displace_liqui_value?val.displace_liqui_value:""
  349. }
  350. if(filed_name_cn == "透析器"){
  351. return val.dialysis_dialyszers
  352. }
  353. if(filed_name_cn == "注射器"){
  354. return ""
  355. }
  356. if(filed_name_cn == "抗凝提前停止"){
  357. return ""
  358. }
  359. if(filed_name_cn == "肝素钠"){
  360. return ""
  361. }
  362. if(filed_name_cn == "鱼精蛋白"){
  363. return ""
  364. }
  365. if(filed_name_cn == "下机前推住鱼精蛋白"){
  366. return ""
  367. }
  368. if(filed_name_cn == "无肝素钠备注"){
  369. return ""
  370. }
  371. if(filed_name_cn == "灌流器"){
  372. return val.dialysis_irrigation
  373. }
  374. if(filed_name_cn == "抗凝剂商品名称"){
  375. return ""
  376. }
  377. if(filed_name_cn == "置换速度"){
  378. return ""
  379. }
  380. if(filed_name_cn == "病情"){
  381. return ""
  382. }
  383. if(filed_name_cn == "葡萄糖"){
  384. return val.amylaceum?val.amylaceum:""
  385. }
  386. if(filed_name_cn == "单超时长"){
  387. return ""
  388. }
  389. if(filed_name_cn == "单超脱水"){
  390. return ""
  391. }
  392. if(filed_name_cn == "置换流量"){
  393. return ""
  394. }
  395. if(filed_name_cn == "血浆分离器"){
  396. return val.plasma_separator?val.plasma_separator:""
  397. }
  398. if(filed_name_cn == "透析管路"){
  399. return this.getHemodialysisPipelines(val.hemodialysis_pipelines)
  400. }
  401. if(filed_name_cn == "透析管路支数"){
  402. return ""
  403. }
  404. if(filed_name_cn == "穿刺针"){
  405. return val.puncture_needle?val.puncture_needle:""
  406. }
  407. if(filed_name_cn == "促红素"){
  408. return val.epo_count?val.epo_count:""
  409. }
  410. if(filed_name_cn == "促红素支数"){
  411. return val.epo_count?val.epo_count:""
  412. }
  413. if(filed_name_cn == "最大超滤率"){
  414. return val.max_ultrafiltration_rate?val.max_ultrafiltration_rate:""
  415. }
  416. if(filed_name_cn == "滤过器"){
  417. return val.dialysis_strainer?val.dialysis_strainer:""
  418. }
  419. },
  420. getModeName(id){
  421. var name = ""
  422. if(id == 1){
  423. name = "HD"
  424. }
  425. if(id == 2){
  426. name = "HDF"
  427. }
  428. if(id == 3){
  429. name = "HD+HP"
  430. }
  431. if(id == 4){
  432. name = "HP"
  433. }
  434. if(id == 5){
  435. name = "HF"
  436. }
  437. if(id == 6){
  438. name = "SCUF"
  439. }
  440. if(id == 7){
  441. name = "IUF"
  442. }
  443. if(id == 8){
  444. name = "HFHD"
  445. }
  446. if(id == 9){
  447. name = "HFHD+HP"
  448. }
  449. if(id == 10){
  450. name = "PHF"
  451. }
  452. if(id == 11){
  453. name = "HFR"
  454. }
  455. if(id == 12){
  456. name = "HDF+HP"
  457. }
  458. if(id == 13){
  459. name = "CRRT"
  460. }
  461. if(id == 14){
  462. name = "腹水回输"
  463. }
  464. if(id == 19){
  465. name = "IUF+HD"
  466. }
  467. if(id == 20){
  468. name = "UF"
  469. }
  470. if(id == 21){
  471. name = "HD+"
  472. }
  473. if(id == 22){
  474. name = "血浆胆红素吸附+HDF"
  475. }
  476. if(id == 23){
  477. name = "血浆胆红素吸附"
  478. }
  479. if(id == 24){
  480. name = "I-HDF"
  481. }
  482. if(id == 25){
  483. name = "HD高通"
  484. }
  485. if(id == 26){
  486. name = "CVVH"
  487. }
  488. if(id == 27){
  489. name = "CVVHD"
  490. }
  491. if(id == 28){
  492. name = "CVVHDF"
  493. }
  494. if(id == 29){
  495. name = "PE"
  496. }
  497. if(id == 30){
  498. name = "血浆胆红素吸附+HP"
  499. }
  500. if(id == 31){
  501. name = "HPD"
  502. }
  503. if(id == 32){
  504. name = "HDP"
  505. }
  506. return name
  507. },
  508. getDialysateFormulation(id){
  509. var name = ""
  510. for(let i=0;i<this.dialysate_formulation.length;i++){
  511. if(id == this.dialysate_formulation[i].id){
  512. name = this.dialysate_formulation[i].name
  513. }
  514. }
  515. return name
  516. },
  517. getAnticoagulant(id){
  518. var name = ""
  519. if(id == 1){
  520. name = "无肝素"
  521. }
  522. if(id == 2){
  523. name = "普通肝素"
  524. }
  525. if(id == 3){
  526. name = "低分子肝素"
  527. }
  528. if(id == 4){
  529. name = "阿加曲班"
  530. }
  531. if(id == 5){
  532. name ="枸橼酸钠"
  533. }
  534. if(id == 6){
  535. name = "低分子肝素钙"
  536. }
  537. if(id == 7){
  538. name = "低分子肝素钠"
  539. }
  540. if(id ==8){
  541. name = "依诺肝素"
  542. }
  543. if(id ==9){
  544. name = "达肝素"
  545. }
  546. if(id ==10){
  547. name = "体外抗凝"
  548. }
  549. if(id ==11){
  550. name = "那曲肝素"
  551. }
  552. if(id ==12){
  553. name = "无抗凝剂"
  554. }
  555. if(id ==13){
  556. name = "那曲肝素钙"
  557. }
  558. return name
  559. },
  560. getBodyFluid(id){
  561. var name = ""
  562. for(let i=0;i<this.body_fluid_option.length;i++){
  563. if(id == this.body_fluid_option[i].id){
  564. name = this.body_fluid_option[i].name
  565. }
  566. }
  567. return name
  568. },
  569. getDisplace(id){
  570. var name = ""
  571. for(let i=0;i<this.displace_liqui_part_option.length;i++){
  572. if(id == this.displace_liqui_part_option[i].id){
  573. name = this.displace_liqui_part_option[i].name
  574. }
  575. }
  576. return name
  577. },
  578. getBloodAccess(id){
  579. var name = ""
  580. for(let i=0;i<this.blood_access_option.length;i++){
  581. if(id == this.blood_access_option[i].id){
  582. name = this.blood_access_option[i].name
  583. }
  584. }
  585. return name
  586. },
  587. getHemodialysisPipelines(id){
  588. var name = ""
  589. for(let i=0;i<this.hemodialysisPipelinesOptions.length;i++){
  590. if(id == this.hemodialysisPipelinesOptions[i].id){
  591. name = this.hemodialysisPipelinesOptions[i].name
  592. }
  593. }
  594. return name
  595. },
  596. }
  597. }
  598. </script>
  599. <style rel="stylesheet/scss" lang="scss" scoped>
  600. .print_main_content {
  601. background-color: white;
  602. width: 960px;
  603. margin: 0 auto;
  604. padding: 0 0 20px 0;
  605. .order_title_panl {
  606. text-align: center;
  607. .main_title {
  608. font-size: 18px;
  609. line-height: 40px;
  610. font-weight: 500;
  611. }
  612. }
  613. .table_panel {
  614. .table {
  615. width: 100%;
  616. border: 1px solid;
  617. border-collapse: collapse;
  618. padding: 2px;
  619. thead {
  620. tr {
  621. td {
  622. border: 1px solid;
  623. text-align: center;
  624. font-size: 20px;
  625. padding: 15px 5px;
  626. }
  627. }
  628. }
  629. tbody {
  630. tr {
  631. td {
  632. border: 1px solid;
  633. text-align: center;
  634. font-size: 18px;
  635. padding: 10px 5px;
  636. .proj {
  637. padding: 5px 0;
  638. text-align: left;
  639. .proj_title {
  640. font-size: 16px;
  641. font-weight: 500;
  642. line-height: 25px;
  643. }
  644. .proj_item {
  645. font-size: 15px;
  646. line-height: 20px;
  647. .zone_name {
  648. font-weight: 500;
  649. }
  650. }
  651. }
  652. }
  653. }
  654. }
  655. }
  656. }
  657. }
  658. </style>