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

remind_print.vue 19KB

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