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

next_remind_print.vue 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  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
  8. size="small"
  9. icon="el-icon-printer"
  10. type="primary"
  11. @click="printAction"
  12. >打印</el-button
  13. >
  14. </el-col>
  15. </el-row>
  16. </div>
  17. <div class="app-container" style="background-color: white;">
  18. <div id="print_content">
  19. <div class="print_main_content">
  20. <div class="order_title_panl">
  21. <!-- <span class="main_title">{{day}}排班提醒({{ currentDate }})</span> -->
  22. <span class="main_title">{{day}}排班提醒({{ getTime(now_time) }})</span>
  23. </div>
  24. <div class="table_panel">
  25. <table class="table">
  26. <thead>
  27. <tr>
  28. <td width="100" v-if="printObj.week == 1">星期</td>
  29. <td width="100" v-if="printObj.name == 1">姓名</td>
  30. <td width="70" v-if="printObj.zone == 1">分区</td>
  31. <td width="70" v-if="printObj.classes == 1">班次</td>
  32. <td width="70" v-if="printObj.number == 1">机号</td>
  33. <td width="120" v-if="printObj.mode == 1">透析模式</td>
  34. <td width="100" v-if="printObj.dialyzers == 1 && printObj.perfusion_apparatus == 1">透析器/灌流器</td>
  35. <td width="120" v-if="printObj.anticoagulant==1">抗凝剂(商品名称)</td>
  36. <td width="100" v-if="printObj.anticoagulant_zongliang == 1">总量</td>
  37. <td width="300" v-if="printObj.doctor_advice == 1">长期医嘱</td>
  38. </tr>
  39. </thead>
  40. <tbody>
  41. <tr v-for="(main_collection, index) in scheduleData" :key="index">
  42. <td :width="td_1_width" v-if="printObj.week == 1">
  43. <span v-if="main_collection.schedule_week == 0">周日</span>
  44. <span v-if="main_collection.schedule_week == 1">周一</span>
  45. <span v-if="main_collection.schedule_week == 2">周二</span>
  46. <span v-if="main_collection.schedule_week == 3">周三</span>
  47. <span v-if="main_collection.schedule_week == 4">周四</span>
  48. <span v-if="main_collection.schedule_week == 5">周五</span>
  49. <span v-if="main_collection.schedule_week == 6">周六</span>
  50. </td>
  51. <td :width="td_1_width" v-if="printObj.name == 1">{{ main_collection.patient}}</td>
  52. <td :width="td_1_width" v-if="printObj.zone == 1">{{ main_collection.zone.name }}</td>
  53. <td :width="td_1_width" v-if="printObj.classes == 1">
  54. {{getSchedulesType(main_collection.schedule_type)}}
  55. </td>
  56. <td :width="td_1_width" v-if="printObj.number == 1">
  57. {{main_collection.number.number}}
  58. </td>
  59. <td :width="td_1_width" v-if="printObj.mode == 1">
  60. {{modeOptions[main_collection.mode_id].name}}
  61. </td>
  62. <td :width="td_1_width" v-if="printObj.dialyzers == 1 && printObj.perfusion_apparatus == 1">
  63. <span v-if="org_id!=9987">
  64. <span v-if="main_collection.prescription.dialyzer_perfusion_apparatus!=''">
  65. <span v-if="org_id!=10131">{{main_collection.prescription.dialyzer_perfusion_apparatus}}</span>
  66. <!-- <span v-if="org_id==10131">{{getDialysisDialyszerPerfusionOne(main_collection.prescription.patient_id)}}</span> -->
  67. <span v-if="org_id==10131 || org_id==9671 || org_id == 10215">{{main_collection.dialysissolution.dialyzer_perfusion_apparatus}}</span>
  68. </span>
  69. <span v-if="main_collection.prescription.dialyzer_perfusion_apparatus ==''&& main_collection.dialysissolution.length>0">{{getDialysisDialyszerPerfusion(main_collection.patient_id)}}</span>
  70. </span>
  71. {{main_collection.prescription.dialysis_dialyszers}}
  72. <span v-if="main_collection.prescription.dialysis_dialyszers!='' && main_collection.prescription.dialysis_irrigation!=''">/</span>
  73. <span v-if="main_collection.prescription.dialysis_irrigation!=''"> {{main_collection.prescription.dialysis_irrigation}}</span>
  74. </td>
  75. <td :width="td_1_width" v-if="printObj.anticoagulant==1">
  76. {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name : ''}}
  77. <span v-if="main_collection.prescription.antioxidant_commodity_name!=''">
  78. (<span>{{main_collection.prescription.antioxidant_commodity_name}}</span>)
  79. </span>
  80. </td>
  81. <td :width="td_1_width" v-if="printObj.anticoagulant_zongliang == 1">
  82. <span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'mg':''}}</span>
  83. <span v-if="main_collection.dialysissolution.anticoagulant == 2">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
  84. <span v-if="main_collection.dialysissolution.anticoagulant == 3">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
  85. <span v-if="main_collection.dialysissolution.anticoagulant == 4">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'mg':''}}</span>
  86. <span v-if="main_collection.dialysissolution.anticoagulant == 5">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'mg':''}}</span>
  87. <span v-if="main_collection.dialysissolution.anticoagulant == 6">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
  88. <span v-if="main_collection.dialysissolution.anticoagulant == 7">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
  89. <span v-if="main_collection.dialysissolution.anticoagulant == 8">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
  90. <span v-if="main_collection.dialysissolution.anticoagulant == 9">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
  91. <span v-if="main_collection.dialysissolution.anticoagulant == 10">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
  92. <span v-if="main_collection.dialysissolution.anticoagulant == 11">{{main_collection.dialysissolution.anticoagulant_zongliang?main_collection.dialysissolution.anticoagulant_zongliang+'iu':''}}</span>
  93. </td>
  94. <td :width="td_4_width" style="text-align:left" v-if="printObj.doctor_advice == 1">
  95. <span style="white-space: pre" v-if="main_collection.doctoradvice.length>0">{{getAdvice(main_collection.doctor_advice)}}</span>
  96. <span style="white-space: pre" v-if="main_collection.hisdoctoradviceinfo.length>0">{{getAdviceOne(main_collection.hisdoctoradviceinfo)}}</span>
  97. </td>
  98. </tr>
  99. </tbody>
  100. </table>
  101. </div>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </template>
  107. <script>
  108. import { getNextScheduleWeekDay,getPrintList } from '@/api/schedule'
  109. import { parseTime } from '@/utils'
  110. import { uParseTime } from '@/utils/tools'
  111. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  112. import print from 'print-js'
  113. const moment = require('moment')
  114. export default {
  115. name: 'SchedulePrint',
  116. data() {
  117. return {
  118. crumbs: [
  119. { path: false, name: '排班提醒' },
  120. { path: false, name: '排班提醒打印' }
  121. ],
  122. scheduleData:[],
  123. week_type: 0,
  124. day:'',
  125. td_1_width: '10%',
  126. td_2_width: '10%',
  127. td_3_width: '25%',
  128. td_4_width: '45%',
  129. modeOptions: null,
  130. anticoagulants_confit:null,
  131. currentDate:'',
  132. start_time:moment().week(moment().week() + 1).startOf('week').unix(),
  133. end_time:moment().week(moment().week() + 1).endOf('week').unix(),
  134. org_id:0,
  135. now_time:0,
  136. zone:"",
  137. pre_status:0,
  138. printObj:{}
  139. }
  140. },
  141. components: {
  142. BreadCrumb
  143. },
  144. created() {
  145. this.getPrintList()
  146. this.org_id = this.$store.getters.xt_user.org.id
  147. this.currentDate = this.getCurrentDate()
  148. this.modeOptions = this.$store.getters.treatment_mode
  149. this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
  150. this.week_type = this.$route.query.week_type
  151. this.week_time = this.$route.query.week_time
  152. this.zone = this.$route.query.zone
  153. this.pre_status = this.$route.query.prestatus
  154. const params = {
  155. week_type:this.week_type,
  156. week_time:this.week_time,
  157. start_time:this.start_time,
  158. end_time:this.end_time,
  159. zone:this.zone,
  160. }
  161. // const params = {
  162. // week_type:this.week_type,
  163. // week_time:this.week_time,
  164. // start_time:1609603200,
  165. // end_time:1610208000,
  166. // }
  167. // console.log("打印下周",params)
  168. // console.log("start",this.start_time)
  169. getNextScheduleWeekDay(params).then(rs => {
  170. var resp = rs.data
  171. console.log(resp)
  172. if (resp.state == 1) {
  173. var scheduleData = resp.data.schedule
  174. if(this.pre_status == 0){
  175. for(let i=0;i<scheduleData.length;i++){
  176. scheduleData[i].sort = scheduleData[i].number.sort
  177. }
  178. var arr = scheduleData.sort(this.compare('sort'))
  179. console.log("打印",arr)
  180. this.scheduleData = arr
  181. }
  182. if(this.pre_status == 1){
  183. var newList = []
  184. for(let i=0;i<scheduleData.length;i++){
  185. if(scheduleData.prescription.id > 0){
  186. newList.push(scheduleData[i])
  187. }
  188. }
  189. var arr = newList.sort(this.compare('sort'))
  190. console.log("打印",arr)
  191. this.scheduleData = arr
  192. }
  193. if(this.pre_status == 2){
  194. var newList = []
  195. for(let i=0;i<scheduleData.length;i++){
  196. if(scheduleData.prescription.id == 0){
  197. newList.push(scheduleData[i])
  198. }
  199. }
  200. var arr = newList.sort(this.compare('sort'))
  201. console.log("打印",arr)
  202. this.scheduleData = arr
  203. }
  204. } else {
  205. this.$message.error(resp.msg)
  206. }
  207. }).catch(err => {
  208. this.$message.error(err)
  209. })
  210. var now_time = parseInt(this.week_type) * 86400 + this.start_time
  211. console.log("now",now_time)
  212. this.now_time = now_time
  213. },
  214. methods: {
  215. getAdvice:function(doctor_advice) {
  216. if (doctor_advice != null) {
  217. let name = ""
  218. for (let i = 0; i< doctor_advice.length; i++) {
  219. let prescribing_number = ''
  220. let single_dose = ''
  221. let drug_spec = ''
  222. if (doctor_advice[i].prescribing_number > 0) {
  223. prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
  224. }
  225. if (doctor_advice[i].single_dose > 0) {
  226. single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
  227. }
  228. if (doctor_advice[i].drug_spec > 0) {
  229. drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
  230. }
  231. name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
  232. if (doctor_advice[i].child.length > 0) {
  233. for (let a = 0; a < doctor_advice[i].child.length; a++) {
  234. if (doctor_advice[i].child[a].prescribing_number > 0) {
  235. doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
  236. } else {
  237. doctor_advice[i].child[a]['presc'] = ''
  238. }
  239. if (doctor_advice[i].child[a].single_dose > 0) {
  240. doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
  241. } else {
  242. doctor_advice[i].child[a]['single'] = ''
  243. }
  244. name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
  245. + doctor_advice[i].child[a].advice_desc
  246. + doctor_advice[i].child[a].drug_spec_unit
  247. + doctor_advice[i].child[a].presc
  248. + doctor_advice[i].child[a].single + "\n"
  249. }
  250. }
  251. }
  252. return name
  253. }
  254. },
  255. getAdviceOne:function(doctor_advice) {
  256. if (doctor_advice != null) {
  257. let name = ""
  258. for (let i = 0; i< doctor_advice.length; i++) {
  259. let prescribing_number = ''
  260. let single_dose = ''
  261. let drug_spec = ''
  262. if (doctor_advice[i].prescribing_number > 0) {
  263. prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
  264. }
  265. if (doctor_advice[i].single_dose > 0) {
  266. single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
  267. }
  268. if (doctor_advice[i].drug_spec > 0) {
  269. drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
  270. }
  271. name = name + doctor_advice[i].advice_name + " " + drug_spec + " " + prescribing_number + " " + single_dose + " " + doctor_advice[i].delivery_way + " " + doctor_advice[i].execution_frequency + " " + doctor_advice[i].remark + "\n"
  272. }
  273. return name
  274. }
  275. },
  276. printAction: function() {
  277. 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; } }'
  278. printJS({
  279. printable: 'print_content',
  280. type: 'html',
  281. documentTitle: ' ',
  282. style: style,
  283. scanStyles: false
  284. })
  285. }, getSchedulesType: function(type) {
  286. let type_name = ''
  287. switch (type) {
  288. case 1:
  289. type_name = '上午'
  290. break
  291. case 2:
  292. type_name = '下午'
  293. break
  294. case 3:
  295. type_name = '晚上'
  296. break
  297. }
  298. return type_name
  299. },
  300. getCurrentDate: function () {
  301. console.log(this.$route.query.week_type)
  302. var myDate = new Date();
  303. var year = myDate.getFullYear(); //年
  304. var month = myDate.getMonth() + 1; //月
  305. var day = myDate.getDate() + 7; //日
  306. var newday = myDate.getDay();
  307. var days = parseInt(this.$route.query.week_type);
  308. var dayNum = parseInt(this.$route.query.week_type);
  309. switch(days) {
  310. case 1:
  311. days = '星期一';
  312. break;
  313. case 2:
  314. days = '星期二';
  315. break;
  316. case 3:
  317. days = '星期三';
  318. break;
  319. case 4:
  320. days = '星期四';
  321. break;
  322. case 5:
  323. days = '星期五';
  324. break;
  325. case 6:
  326. days = '星期六';
  327. break;
  328. case 7:
  329. days = '星期日';
  330. break;
  331. }
  332. if(newday > dayNum){
  333. let lastDay = day - (newday - dayNum)
  334. console.log("lastDay1",lastDay)
  335. var str = year + "年" + month + "月" + lastDay + "日 " + days;
  336. return str;
  337. }else if(newday < dayNum){
  338. let lastDay = day + (dayNum - newday)
  339. console.log("lastDay2",lastDay)
  340. var str = year + "年" + month + "月" + lastDay + "日 " + days;
  341. return str;
  342. }else{
  343. var str = year + "年" + month + "月" + day + "日 " + days;
  344. return str;
  345. }
  346. },
  347. compare(property) {
  348. return function (a, b) {
  349. var value1 = a[property];
  350. var value2 = b[property];
  351. return value1 - value2;
  352. }
  353. },
  354. getTime(val) {
  355. if(val == ""){
  356. return ""
  357. }else {
  358. return uParseTime(val, '{y}-{m}-{d}')
  359. }
  360. },
  361. getPrintList(){
  362. getPrintList().then(response=>{
  363. if(response.data.state == 1){
  364. var list = response.data.data.list
  365. console.log("list222222222",list)
  366. this.printObj = list
  367. }
  368. })
  369. },
  370. getDialysisDialyszerPerfusion(patient_id){
  371. var name = ""
  372. for(let i=0;i<this.scheduleData.length;i++){
  373. if(patient_id == this.scheduleData[i].patient_id){
  374. var arrLength = this.scheduleData[i].dialysissolution.length
  375. if(arrLength > 0){
  376. name = this.scheduleData[i].dialysissolution[arrLength - 1].dialysis_dialyszers
  377. }
  378. }
  379. }
  380. return name
  381. },
  382. getDialysisDialyszerPerfusionOne(patient_id){
  383. var name = ""
  384. for(let i=0;i<this.scheduleData.length;i++){
  385. if(patient_id == this.scheduleData[i].patient_id){
  386. var arrLength = this.scheduleData[i].dialysissolution.length
  387. if(arrLength > 0){
  388. name = this.scheduleData[i].dialysissolution[arrLength - 1].dialyzer_perfusion_apparatus
  389. }
  390. }
  391. }
  392. return name
  393. }
  394. }
  395. }
  396. </script>
  397. <style rel="stylesheet/scss" lang="scss" scoped>
  398. .print_main_content {
  399. background-color: white;
  400. max-width: 1500px;
  401. margin: 0 auto;
  402. padding: 0 0 20px 0;
  403. .order_title_panl {
  404. text-align: center;
  405. .main_title {
  406. font-size: 18px;
  407. line-height: 40px;
  408. font-weight: 500;
  409. }
  410. }
  411. .table_panel {
  412. .table {
  413. width: 100%;
  414. border: 1px solid;
  415. border-collapse: collapse;
  416. padding: 2px;
  417. thead {
  418. tr {
  419. td {
  420. border: 1px solid;
  421. text-align: center;
  422. font-size: 20px;
  423. padding: 15px 5px;
  424. }
  425. }
  426. }
  427. tbody {
  428. tr {
  429. td {
  430. border: 1px solid;
  431. text-align: center;
  432. font-size: 18px;
  433. padding: 10px 5px;
  434. .proj {
  435. padding: 5px 0;
  436. text-align: left;
  437. .proj_title {
  438. font-size: 16px;
  439. font-weight: 500;
  440. line-height: 25px;
  441. }
  442. .proj_item {
  443. font-size: 15px;
  444. line-height: 20px;
  445. .zone_name {
  446. font-weight: 500;
  447. }
  448. }
  449. }
  450. }
  451. }
  452. }
  453. }
  454. }
  455. }
  456. </style>