remind_print_setting_one.vue 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808
  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="table_panel" v-loding="loading" element-loading-text="拼命加载中">
  21. <div v-for="(main_collection,index) in scheduleData" :key="index" :class="(org_id == 9671 || org_id == 10340) && parseInt((index+1)%8) == 0 ? 'page-break-after':''">
  22. <div class="signPrint" style="font-size:16px;">
  23. <div style="font-size:24px;font-weight: 400;">姓名:
  24. <span v-if="type ==1 && printObj.name == 1">{{main_collection.patient.name}} </span>
  25. <span v-if="type ==2 && printObj.name == 1">{{main_collection.patient}} </span>
  26. <span v-if="type ==1 && printObj.name == 1">({{ main_collection.patient.dialysis_no }},
  27. <span> {{getGender(main_collection.patient.gender)}},</span>
  28. {{getNewAge(main_collection.patient.id_card_no) }}岁)</span>
  29. <span v-if="type ==2 && printObj.name == 1">({{ main_collection.dialysis_no }},
  30. <span>{{getGender(main_collection.gender) }},</span>
  31. {{getNewAge(main_collection.id_card_no) }}岁)</span>
  32. </div>
  33. <div class="printCell">
  34. 透析模式:
  35. <span>{{getModeId(main_collection.mode_id)}}</span>
  36. </div>
  37. <div class="printCell">
  38. <span>抗凝剂:{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
  39. </div>
  40. <div class="printCell">
  41. 首剂:<span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_shouji}} mg</span>
  42. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  43. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  44. </span>
  45. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  46. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  47. </span>
  48. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  49. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  50. </span>
  51. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  52. {{main_collection.dialysissolution.anticoagulant_shouji}} mg
  53. </span>
  54. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  55. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  56. </span>
  57. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  58. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  59. </span>
  60. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  61. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  62. </span>
  63. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  64. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  65. </span>
  66. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  67. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  68. </span>
  69. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  70. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  71. </span>
  72. </div>
  73. <div class="printCell">
  74. 维持:{{main_collection.dialysissolution.anticoagulant_weichi}}
  75. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  76. mg/h
  77. </span>
  78. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  79. mg/h
  80. </span>
  81. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  82. iu/h
  83. </span>
  84. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  85. mg/h
  86. </span>
  87. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  88. mg/h
  89. </span>
  90. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  91. iu/h
  92. </span>
  93. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  94. iu/h
  95. </span>
  96. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  97. iu/h
  98. </span>
  99. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  100. iu/h
  101. </span>
  102. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  103. iu/h
  104. </span>
  105. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  106. iu/h
  107. </span>
  108. </div>
  109. <div class="printCell">
  110. 总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}
  111. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  112. mg
  113. </span>
  114. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  115. mg
  116. </span>
  117. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  118. iu
  119. </span>
  120. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  121. mg
  122. </span>
  123. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  124. mg
  125. </span>
  126. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  127. iu
  128. </span>
  129. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  130. iu
  131. </span>
  132. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  133. iu
  134. </span>
  135. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  136. iu
  137. </span>
  138. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  139. iu
  140. </span>
  141. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  142. iu
  143. </span>
  144. </div>
  145. <div class="printCell" v-if="org_id==9671 || org_id==9675 || org_id==10340">
  146. <span>上次脱水量:{{ main_collection.prescription.target_ultrafiltration }}ml</span>
  147. </div>
  148. <div class="printCell" v-if="org_id==9671 || org_id==9675 || org_id==10340">
  149. <span>上次透析时长:{{ main_collection.lastafterweight.actual_treatment_hour }}小时{{ main_collection.lastafterweight.actual_treatment_minute }}分钟</span>
  150. </div>
  151. <div class="printCell">身份证:
  152. <span v-if="type ==1">{{main_collection.patient.id_card_no}} </span>
  153. <span v-if="type ==2">{{main_collection.id_card_no}} </span>
  154. </div>
  155. <div class="printCell">电话号码:
  156. <span v-if="type ==1">{{main_collection.patient.phone}} </span>
  157. <span v-if="type ==2">{{main_collection.phone}} </span>
  158. </div>
  159. <div class="printCell">
  160. 透析器:
  161. <span v-if="type ==1">{{main_collection.dialysis_order.dialysis_dialyszers}} </span>
  162. <span v-if="type ==2">{{main_collection.dialysis_order.dialysis_dialyszers}} </span>
  163. </div>
  164. <div class="printCell">
  165. 灌流器:
  166. <span v-if="type ==1">{{main_collection.dialysis_order.dialysis_irrigation}} </span>
  167. <span v-if="type ==2">{{main_collection.dialysis_order.dialysis_irrigation}} </span>
  168. </div>
  169. <div class="printCell">
  170. 血管通路:
  171. <span v-if="type ==1">{{getBloodAccess(main_collection.dialysis_order.blood_access_id)}} </span>
  172. <span v-if="type ==2">{{getBloodAccess(main_collection.dialysis_order.blood_access_id)}} </span>
  173. </div>
  174. <div class="printCell">
  175. <span>
  176. 分区/床号
  177. <span style="width:auto;">{{main_collection.zone.name}}/</span>
  178. {{ main_collection.number.number }}
  179. <!-- <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
  180. <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
  181. <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span> -->
  182. </span>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. </template>
  192. <script>
  193. import { getScheduleList, getPrintList, getNextScheduleWeekDayOne } from '@/api/schedule'
  194. import { parseTime } from '@/utils'
  195. import { uParseTime } from '@/utils/tools'
  196. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  197. import { getDataConfig } from '@/utils/data'
  198. import print from 'print-js'
  199. const moment = require('moment')
  200. export default {
  201. name: 'SchedulePrint',
  202. data() {
  203. return {
  204. crumbs: [
  205. { path: false, name: '排班提醒' },
  206. { path: false, name: '排班提醒打印' }
  207. ],
  208. scheduleData: [],
  209. week_type: 0,
  210. day: '',
  211. td_1_width: '10%',
  212. td_2_width: '10%',
  213. td_3_width: '25%',
  214. td_4_width: '45%',
  215. modeOptions: null,
  216. anticoagulants_confit: null,
  217. currentDate: '',
  218. start_time: moment().week(moment().week() + 1).startOf('week').unix(),
  219. end_time: moment().week(moment().week() + 1).endOf('week').unix(),
  220. org_id: 0,
  221. now_time: 0,
  222. zone: '',
  223. pre_status: 0,
  224. printObj: {},
  225. type: 1,
  226. printDate: '',
  227. loading:false,
  228. }
  229. },
  230. components: {
  231. BreadCrumb
  232. },
  233. created() {
  234. this.type = this.$route.query.type
  235. this.getPrintList()
  236. this.org_id = this.$store.getters.xt_user.org.id
  237. console.log('机构ID', this.org_id)
  238. this.currentDate = this.getCurrentDate()
  239. this.printDate = moment().format('YYYY-MM-DD HH:mm:ss')
  240. this.modeOptions = this.$store.getters.treatment_mode
  241. this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
  242. this.week_type = this.$route.query.week_type
  243. this.week_time = this.$route.query.week_time
  244. this.zone = this.$route.query.zone
  245. this.pre_status = this.$route.query.prestatus
  246. if (parseInt(this.$route.query.type) == 1) {
  247. const params = {
  248. week_type: this.week_type,
  249. week_time: this.week_time,
  250. zone: this.zone
  251. }
  252. this.loading = true
  253. getScheduleList(params).then(response => {
  254. if (response.data.state == 1) {
  255. var list = response.data.data.list
  256. this.loading = false
  257. for (let i = 0; i < list.length; i++) {
  258. list[i].sort = list[i].number.sort
  259. }
  260. var arr = list.sort(this.compare('sort'))
  261. this.scheduleData = arr
  262. const a = response.data.data.day
  263. console.log('a', a)
  264. var myDate = new Date(a)
  265. var year = myDate.getFullYear() // 年
  266. var month = myDate.getMonth() + 1 // 月
  267. var day = myDate.getDate() // 日
  268. var days = myDate.getDay()
  269. switch (days) {
  270. case 1:
  271. days = '星期一'
  272. break
  273. case 2:
  274. days = '星期二'
  275. break
  276. case 3:
  277. days = '星期三'
  278. break
  279. case 4:
  280. days = '星期四'
  281. break
  282. case 5:
  283. days = '星期五'
  284. break
  285. case 6:
  286. days = '星期六'
  287. break
  288. case 0:
  289. days = '星期日'
  290. break
  291. }
  292. var str = year + '年' + month + '月' + day + '日 ' + days
  293. this.currentDate = str
  294. }
  295. })
  296. var now_time = parseInt(this.week_type) * 86400 + this.start_time
  297. console.log('now', now_time)
  298. this.now_time = now_time
  299. }
  300. if (parseInt(this.$route.query.type) == 2) {
  301. this.getNextScheduleWeekDay()
  302. }
  303. },
  304. methods: {
  305. getAdvice: function(doctor_advice) {
  306. if (doctor_advice != null) {
  307. let name = ''
  308. for (let i = 0; i < doctor_advice.length; i++) {
  309. let prescribing_number = ''
  310. let single_dose = ''
  311. let drug_spec = ''
  312. if (doctor_advice[i].prescribing_number > 0) {
  313. prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
  314. }
  315. if (doctor_advice[i].single_dose > 0) {
  316. single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
  317. }
  318. if (doctor_advice[i].drug_spec > 0) {
  319. drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
  320. }
  321. 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'
  322. if (doctor_advice[i].child.length > 0) {
  323. for (let a = 0; a < doctor_advice[i].child.length; a++) {
  324. if (doctor_advice[i].child[a].prescribing_number > 0) {
  325. doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
  326. } else {
  327. doctor_advice[i].child[a]['presc'] = ''
  328. }
  329. if (doctor_advice[i].child[a].single_dose > 0) {
  330. doctor_advice[i].child[a]['single'] = ' ' + ' 单次用量 ' + ' ' + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
  331. } else {
  332. doctor_advice[i].child[a]['single'] = ''
  333. }
  334. name = name + '▲' + doctor_advice[i].child[a].advice_name + '' +
  335. doctor_advice[i].child[a].advice_desc +
  336. doctor_advice[i].child[a].drug_spec_unit +
  337. doctor_advice[i].child[a].presc +
  338. doctor_advice[i].child[a].single + '\n'
  339. }
  340. }
  341. }
  342. return name
  343. }
  344. },
  345. printAction: function() {
  346. const style = '@media print {.signPrint{margin-left:30px;} .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; } .printCell span{display: inline-block;width: 220px;} @page {margin-top:10px;}}'
  347. const style1 = '@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; } .printCell span{display: inline-block;width: 220px;} @page {margin-top:10px;}}'
  348. const style2 = '@media print { .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .page-break-after{page-break-after:always;}.signPrint{width:40%;float: left;margin-left: 5%; -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset; margin-bottom: 20px;padding: 20px 10px;} .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; } .printCell span{display: inline-block;width: 220px;} @page {margin-top:10px;}}'
  349. if (this.org_id == 9671 || this.org_id == 10340) {
  350. printJS({
  351. printable: 'print_content',
  352. type: 'html',
  353. documentTitle: ' ',
  354. style: style2,
  355. scanStyles: false
  356. })
  357. } else if (this.org_id == 10188 || this.org_id == 10217) {
  358. printJS({
  359. printable: 'print_content',
  360. type: 'html',
  361. documentTitle: ' ',
  362. style: style1,
  363. scanStyles: false
  364. })
  365. } else {
  366. printJS({
  367. printable: 'print_content',
  368. type: 'html',
  369. documentTitle: ' ',
  370. style: style,
  371. scanStyles: false
  372. })
  373. }
  374. }, getSchedulesType: function(type) {
  375. let type_name = ''
  376. switch (type) {
  377. case 1:
  378. type_name = '上午'
  379. break
  380. case 2:
  381. type_name = '下午'
  382. break
  383. case 3:
  384. type_name = '晚上'
  385. break
  386. }
  387. return type_name
  388. },
  389. getCurrentDate: function() {
  390. console.log(this.$route.query.week_type)
  391. var myDate = new Date()
  392. var year = myDate.getFullYear() // 年
  393. var month = myDate.getMonth() + 1 // 月
  394. var day = myDate.getDate() + 7 // 日
  395. var newday = myDate.getDay()
  396. var days = parseInt(this.$route.query.week_type)
  397. var dayNum = parseInt(this.$route.query.week_type)
  398. switch (days) {
  399. case 1:
  400. days = '星期一'
  401. break
  402. case 2:
  403. days = '星期二'
  404. break
  405. case 3:
  406. days = '星期三'
  407. break
  408. case 4:
  409. days = '星期四'
  410. break
  411. case 5:
  412. days = '星期五'
  413. break
  414. case 6:
  415. days = '星期六'
  416. break
  417. case 7:
  418. days = '星期日'
  419. break
  420. }
  421. if (newday > dayNum) {
  422. const lastDay = day - (newday - dayNum)
  423. console.log('lastDay1', lastDay)
  424. var str = year + '年' + month + '月' + lastDay + '日 ' + days
  425. return str
  426. } else if (newday < dayNum) {
  427. const lastDay = day + (dayNum - newday)
  428. console.log('lastDay2', lastDay)
  429. var str = year + '年' + month + '月' + lastDay + '日 ' + days
  430. return str
  431. } else {
  432. var str = year + '年' + month + '月' + day + '日 ' + days
  433. return str
  434. }
  435. },
  436. compare(property) {
  437. return function(a, b) {
  438. var value1 = a[property]
  439. var value2 = b[property]
  440. return value1 - value2
  441. }
  442. },
  443. getTime(val) {
  444. if (val == '') {
  445. return ''
  446. } else {
  447. return uParseTime(val, '{y}-{m}-{d}')
  448. }
  449. },
  450. getPrintList() {
  451. getPrintList().then(response => {
  452. if (response.data.state == 1) {
  453. var list = response.data.data.list
  454. console.log('打印设置', list)
  455. this.printObj = list
  456. }
  457. })
  458. },
  459. getNextScheduleWeekDay() {
  460. const start = moment().weekday(1).format('YYYY-MM-DD') // 本周一
  461. const end = moment().weekday(7).format('YYYY-MM-DD')
  462. var zone = this.zone
  463. // var newArr = []
  464. // for(let i=0;i<this.zoneList.length;i++){
  465. // newArr.push(this.zoneList[i].id)
  466. // }
  467. // var arr = newArr.join(",")
  468. // var str = ""
  469. // if(this.zone == 0){
  470. // str = arr
  471. // }
  472. // if(zone != 0){
  473. // str = zone.join(",")
  474. // }
  475. var now_time = parseInt(this.week_type) * 86400 + this.start_time
  476. const weekOfDay = parseInt(moment().format('E'))
  477. const next_monday = moment().add((7 - weekOfDay) + 1, 'days').format('YYYY-MM-DD')
  478. console.log('卡 is h2323233232', this.toStamp(next_monday))
  479. const next_sunday = moment().add((7 - weekOfDay) + 7, 'days').format('YYYY-MM-DD')
  480. console.log('下周日', this.toStamp(next_sunday))
  481. const params = {
  482. start_time: this.toStamp(next_monday),
  483. end_time: this.toStamp(next_sunday),
  484. week_type: this.week_type,
  485. week_time: this.week_time,
  486. zone: this.zone,
  487. record_date: this.getTime(now_time)
  488. }
  489. // const params = {
  490. // start_time:1609603200,
  491. // end_time:1610208000,
  492. // week_type:this.week_type,
  493. // week_time:this.week_time,
  494. // }
  495. console.log('params', params)
  496. getNextScheduleWeekDayOne(params).then(response => {
  497. this.scheduleData = []
  498. if (response.data.state == 1) {
  499. var scheduleData = response.data.data.schedule
  500. for (let i = 0; i < scheduleData.length; i++) {
  501. scheduleData[i].sort = scheduleData[i].number.sort
  502. }
  503. var arr = scheduleData.sort(this.compare('sort'))
  504. console.log('元旦快乐', arr)
  505. this.scheduleData = arr
  506. // var newList = []
  507. // for(let i=0;i<scheduleData.length;i++){
  508. // if(scheduleData.prescription.id > 0){
  509. // newList.push(scheduleData[i])
  510. // }
  511. // }
  512. // var arr = newList.sort(this.compare('sort'))
  513. // console.log("元旦快乐",arr)
  514. // this.scheduleData = arr
  515. } else {
  516. this.$message.error('网络错误')
  517. return false
  518. }
  519. })
  520. },
  521. getAnticoagulant(name) {
  522. if (name == 0) {
  523. name = ''
  524. }
  525. if (name == 1) {
  526. name = '无肝素'
  527. }
  528. if (name == 2) {
  529. name = '普通肝素'
  530. }
  531. if (name == 3) {
  532. name = '低分子肝素'
  533. }
  534. if (name == 4) {
  535. name = '阿加曲班'
  536. }
  537. if (name == 5) {
  538. name = '枸橼酸钠'
  539. }
  540. if (name == 6) {
  541. name = '低分子肝素钙'
  542. }
  543. if (name == 7) {
  544. name = '低分子肝素钠'
  545. }
  546. return name
  547. },
  548. getAnticoagulantZonliang(arr, mode_id) {
  549. var name = 0
  550. if (arr.length > 0) {
  551. for (let i = 0; i < arr.length; i++) {
  552. if (mode_id == arr[i].mode_id) {
  553. name = arr[i].anticoagulant_zongliang
  554. }
  555. }
  556. }
  557. return name
  558. },
  559. getNewAge(UUserCard) {
  560. if (UUserCard != null && UUserCard != '') {
  561. // 获取年龄
  562. var myDate = new Date()
  563. var month = myDate.getMonth() + 1
  564. var day = myDate.getDate()
  565. var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
  566. if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
  567. age++
  568. }
  569. return age
  570. }
  571. },
  572. getGender(gender) {
  573. var name = ''
  574. if (gender == 1) {
  575. name = '男'
  576. }
  577. if (gender == 2) {
  578. name = '女'
  579. }
  580. return name
  581. },
  582. getModeId(id) {
  583. var name = ''
  584. if (id == 1) {
  585. name = 'HD'
  586. }
  587. if (id == 2) {
  588. name = 'HDF'
  589. }
  590. if (id == 3) {
  591. name = 'HD+HP'
  592. }
  593. if (id == 4) {
  594. name = 'HP'
  595. }
  596. if (id == 5) {
  597. name = 'HF'
  598. }
  599. if (id == 6) {
  600. name = 'SCUF'
  601. }
  602. if (id == 7) {
  603. name = 'IUF'
  604. }
  605. if (id == 8) {
  606. name = 'HFHD'
  607. }
  608. if (id == 9) {
  609. name = 'HFHD+HP'
  610. }
  611. if (id == 10) {
  612. name = 'PHF'
  613. }
  614. if (id == 11) {
  615. name = 'HFR'
  616. }
  617. if (id == 12) {
  618. name = 'HDF+HP'
  619. }
  620. if (id == 13) {
  621. name = 'CRRT'
  622. }
  623. if (id == 14) {
  624. name = '腹水回输'
  625. }
  626. if (id == 19) {
  627. name = 'IUF+HD'
  628. }
  629. if (id == 20) {
  630. name = 'UF'
  631. }
  632. if (id == 21) {
  633. name = 'HD+'
  634. }
  635. if (id == 22) {
  636. name = '血浆胆红素吸附+HDF'
  637. }
  638. if (id == 23) {
  639. name = '血浆胆红素吸附'
  640. }
  641. if (id == 24) {
  642. name = 'I-HDF'
  643. }
  644. if (id == 25) {
  645. name = 'HD高通'
  646. }
  647. if (id == 26) {
  648. name = 'CVVH'
  649. }
  650. if (id == 27) {
  651. name = 'CVVHD'
  652. }
  653. if (id == 28) {
  654. name = 'CVVHDF'
  655. }
  656. if (id == 29) {
  657. name = 'PE'
  658. }
  659. if (id == 30) {
  660. name = '血浆胆红素吸附+HP'
  661. }
  662. if (id == 31) {
  663. name = 'HPD'
  664. }
  665. if (id == 32) {
  666. name = 'HDP'
  667. }
  668. return name
  669. },
  670. getBloodAccess(id) {
  671. var name = ''
  672. var list = getDataConfig(
  673. 'hemodialysis',
  674. 'vascular_access_desc'
  675. )
  676. for (let i = 0; i < list.length; i++) {
  677. if (id == list[i].id) {
  678. name = list[i].name
  679. }
  680. }
  681. return name
  682. },
  683. toStamp(date) {
  684. const myDate = new Date(date).getTime() / 1000 - 28800
  685. // const stmapEg = Date.parse(myDate) / 1000
  686. return myDate
  687. }
  688. }
  689. }
  690. </script>
  691. <style rel="stylesheet/scss" lang="scss" scoped>
  692. .page-break-after{
  693. page-break-after:always;
  694. }
  695. .print_main_content {
  696. background-color: white;
  697. max-width: 1500px;
  698. margin: 0 auto;
  699. padding: 0 0 20px 0;
  700. .order_title_panl {
  701. text-align: center;
  702. .main_title {
  703. font-size: 18px;
  704. line-height: 40px;
  705. font-weight: 500;
  706. }
  707. }
  708. .table_panel {
  709. .table {
  710. width: 100%;
  711. border: 1px solid;
  712. border-collapse: collapse;
  713. padding: 2px;
  714. thead {
  715. tr {
  716. td {
  717. border: 1px solid;
  718. text-align: center;
  719. font-size: 20px;
  720. padding: 15px 5px;
  721. }
  722. }
  723. }
  724. tbody {
  725. tr {
  726. td {
  727. border: 1px solid;
  728. text-align: center;
  729. font-size: 18px;
  730. padding: 10px 5px;
  731. .proj {
  732. padding: 5px 0;
  733. text-align: left;
  734. .proj_title {
  735. font-size: 16px;
  736. font-weight: 500;
  737. line-height: 25px;
  738. }
  739. .proj_item {
  740. font-size: 15px;
  741. line-height: 20px;
  742. .zone_name {
  743. font-weight: 500;
  744. }
  745. }
  746. }
  747. }
  748. }
  749. }
  750. }
  751. }
  752. }
  753. .signPrint{
  754. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  755. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  756. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  757. margin-bottom: 20px;
  758. padding: 20px 10px;
  759. }
  760. .printCell{
  761. span{
  762. display: inline-block;
  763. width: 220px;
  764. }
  765. }
  766. </style>