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

remind_print.vue 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338
  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="td_1_width">姓名</td>
  28. <td :width="td_1_width">分区</td>
  29. <td :width="td_1_width">班次</td>
  30. <td :width="td_1_width">机号</td>
  31. <td :width="td_1_width">透析模式</td>
  32. <td :width="td_2_width">透析器</td>
  33. <td :width="td_2_width">抗凝剂</td>
  34. <td :width="td_2_width">低分子肝素</td>
  35. <td :width="td_4_width">长期医嘱</td> -->
  36. <td width="100">姓名</td>
  37. <td width="70">分区</td>
  38. <td width="70">班次</td>
  39. <td width="70">机号</td>
  40. <td width="120">透析模式</td>
  41. <td width="100">透析器</td>
  42. <td width="120">抗凝剂</td>
  43. <td width="100">总量</td>
  44. <td width="300">长期医嘱</td>
  45. </tr>
  46. </thead>
  47. <tbody>
  48. <tr v-for="(main_collection, index) in scheduleData" :key="index">
  49. <td :width="td_1_width">{{ main_collection.patient}}</td>
  50. <td :width="td_1_width">{{ main_collection.zone.name }}</td>
  51. <td :width="td_1_width">
  52. {{getSchedulesType(main_collection.schedule_type)}}
  53. </td>
  54. <td :width="td_1_width">
  55. {{main_collection.number.number}}
  56. </td>
  57. <td :width="td_1_width">
  58. {{modeOptions[main_collection.mode_id].name}}
  59. </td>
  60. <td :width="td_1_width">
  61. {{main_collection.prescription.dialyzer_perfusion_apparatus}}
  62. </td>
  63. <td :width="td_1_width">
  64. {{ main_collection.prescription.anticoagulant ? anticoagulants_confit[main_collection.prescription.anticoagulant].name : ''}}
  65. </td>
  66. <td :width="td_1_width">
  67. <span v-if="main_collection.prescription.anticoagulant == 1">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
  68. <span v-if="main_collection.prescription.anticoagulant == 2">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
  69. <span v-if="main_collection.prescription.anticoagulant == 3">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'iu':''}}</span>
  70. <span v-if="main_collection.prescription.anticoagulant == 4">{{main_collection.prescription.anticoagulant_zongliang?main_collection.prescription.anticoagulant_zongliang+'mg':''}}</span>
  71. </td>
  72. <td :width="td_4_width" >
  73. <span style="white-space: pre">{{getAdvice(main_collection.doctor_advice)}}</span>
  74. </td>
  75. </tr>
  76. </tbody>
  77. </table>
  78. </div>
  79. </div>
  80. </div>
  81. </div>
  82. </div>
  83. </template>
  84. <script>
  85. import { getScheduleWeekDay } from '@/api/schedule'
  86. import { parseTime } from '@/utils'
  87. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  88. import print from 'print-js'
  89. export default {
  90. name: 'SchedulePrint',
  91. data() {
  92. return {
  93. crumbs: [
  94. { path: false, name: '排班提醒' },
  95. { path: false, name: '排班提醒打印' }
  96. ],
  97. scheduleData:[],
  98. week_type: 0,
  99. day:'',
  100. td_1_width: '10%',
  101. td_2_width: '10%',
  102. td_3_width: '25%',
  103. td_4_width: '45%',
  104. modeOptions: null,
  105. anticoagulants_confit:null,
  106. currentDate:''
  107. }
  108. },
  109. components: {
  110. BreadCrumb
  111. },
  112. created() {
  113. this.currentDate = this.getCurrentDate()
  114. this.modeOptions = this.$store.getters.treatment_mode
  115. this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
  116. this.week_type = this.$route.query.week_type
  117. getScheduleWeekDay({week_type: this.week_type}).then(rs => {
  118. var resp = rs.data
  119. console.log(resp)
  120. if (resp.state == 1) {
  121. this.scheduleData = resp.data.schdules
  122. } else {
  123. this.$message.error(resp.msg)
  124. }
  125. }).catch(err => {
  126. this.$message.error(err)
  127. })
  128. },
  129. methods: {
  130. getAdvice:function(doctor_advice) {
  131. if (doctor_advice != null) {
  132. let name = ""
  133. for (let i = 0; i< doctor_advice.length; i++) {
  134. let prescribing_number = ''
  135. let single_dose = ''
  136. let drug_spec = ''
  137. if (doctor_advice[i].prescribing_number > 0) {
  138. prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
  139. }
  140. if (doctor_advice[i].single_dose > 0) {
  141. single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
  142. }
  143. if (doctor_advice[i].drug_spec > 0) {
  144. drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
  145. }
  146. 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"
  147. if (doctor_advice[i].child.length > 0) {
  148. for (let a = 0; a < doctor_advice[i].child.length; a++) {
  149. if (doctor_advice[i].child[a].prescribing_number > 0) {
  150. doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
  151. } else {
  152. doctor_advice[i].child[a]['presc'] = ''
  153. }
  154. if (doctor_advice[i].child[a].single_dose > 0) {
  155. doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
  156. } else {
  157. doctor_advice[i].child[a]['single'] = ''
  158. }
  159. name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
  160. + doctor_advice[i].child[a].advice_desc
  161. + doctor_advice[i].child[a].drug_spec_unit
  162. + doctor_advice[i].child[a].presc
  163. + doctor_advice[i].child[a].single + "\n"
  164. }
  165. }
  166. }
  167. return name
  168. }
  169. },
  170. printAction: function() {
  171. 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; } }'
  172. printJS({
  173. printable: 'print_content',
  174. type: 'html',
  175. documentTitle: ' ',
  176. style: style,
  177. scanStyles: false
  178. })
  179. }, getSchedulesType: function(type) {
  180. let type_name = ''
  181. switch (type) {
  182. case 1:
  183. type_name = '上午'
  184. break
  185. case 2:
  186. type_name = '下午'
  187. break
  188. case 3:
  189. type_name = '晚上'
  190. break
  191. }
  192. return type_name
  193. },
  194. getCurrentDate: function () {
  195. console.log(this.$route.query.week_type)
  196. var myDate = new Date();
  197. var year = myDate.getFullYear(); //年
  198. var month = myDate.getMonth() + 1; //月
  199. var day = myDate.getDate(); //日
  200. var newday = myDate.getDay();
  201. var days = parseInt(this.$route.query.week_type);
  202. var dayNum = parseInt(this.$route.query.week_type);
  203. switch(days) {
  204. case 1:
  205. days = '星期一';
  206. break;
  207. case 2:
  208. days = '星期二';
  209. break;
  210. case 3:
  211. days = '星期三';
  212. break;
  213. case 4:
  214. days = '星期四';
  215. break;
  216. case 5:
  217. days = '星期五';
  218. break;
  219. case 6:
  220. days = '星期六';
  221. break;
  222. case 7:
  223. days = '星期日';
  224. break;
  225. }
  226. if(newday > dayNum){
  227. let lastDay = day - (newday - dayNum)
  228. console.log("lastDay1",lastDay)
  229. var str = year + "年" + month + "月" + lastDay + "日 " + days;
  230. return str;
  231. }else if(newday < dayNum){
  232. let lastDay = day + (dayNum - newday)
  233. console.log("lastDay2",lastDay)
  234. var str = year + "年" + month + "月" + lastDay + "日 " + days;
  235. return str;
  236. }else{
  237. var str = year + "年" + month + "月" + day + "日 " + days;
  238. return str;
  239. }
  240. }
  241. }
  242. }
  243. </script>
  244. <style rel="stylesheet/scss" lang="scss" scoped>
  245. .print_main_content {
  246. background-color: white;
  247. max-width: 1500px;
  248. margin: 0 auto;
  249. padding: 0 0 20px 0;
  250. .order_title_panl {
  251. text-align: center;
  252. .main_title {
  253. font-size: 18px;
  254. line-height: 40px;
  255. font-weight: 500;
  256. }
  257. }
  258. .table_panel {
  259. .table {
  260. width: 100%;
  261. border: 1px solid;
  262. border-collapse: collapse;
  263. padding: 2px;
  264. thead {
  265. tr {
  266. td {
  267. border: 1px solid;
  268. text-align: center;
  269. font-size: 20px;
  270. padding: 15px 5px;
  271. }
  272. }
  273. }
  274. tbody {
  275. tr {
  276. td {
  277. border: 1px solid;
  278. text-align: center;
  279. font-size: 18px;
  280. padding: 10px 5px;
  281. .proj {
  282. padding: 5px 0;
  283. text-align: left;
  284. .proj_title {
  285. font-size: 16px;
  286. font-weight: 500;
  287. line-height: 25px;
  288. }
  289. .proj_item {
  290. font-size: 15px;
  291. line-height: 20px;
  292. .zone_name {
  293. font-weight: 500;
  294. }
  295. }
  296. }
  297. }
  298. }
  299. }
  300. }
  301. }
  302. }
  303. </style>