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

remind_print_setting.vue 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  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">
  21. <div v-for="(main_collection,index) in scheduleData" :key="index" style="page-break-after: always;">
  22. <div class="signPrint" v-if="org_id != 10188 && org_id!=10217 && org_id!=10340">
  23. <div>
  24. <span v-if="printObj.zone == 1">分区/</span>
  25. <span v-if="printObj.number == 1">床位号:</span>
  26. <span v-if="printObj.zone == 1">{{main_collection.zone.name}}/</span>
  27. <span v-if="printObj.number == 1">{{main_collection.number.number}}</span>
  28. </div>
  29. <div>姓名:
  30. <span v-if="type ==1 && printObj.name == 1">{{main_collection.patient.name}} </span>
  31. <span v-if="type ==2 && printObj.name == 1">{{main_collection.patient}} </span>
  32. </div>
  33. <div v-if="printObj.anticoagulant == 1">抗凝剂:
  34. <span v-if="org_id == 10138 ">{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name + ' 5000iu/瓶' : ''}}</span>
  35. <span v-else >
  36. <span>{{getAnticoagulant(main_collection.dialysissolution.mode_id)}}</span>
  37. </span>
  38. </div>
  39. <div v-if="org_id == 10188 || org_id == 10217 || org_id == 10340">首剂:{{main_collection.dialysissolution.anticoagulant_shouji}}</div>
  40. <div v-if="org_id == 10188 || org_id == 10217 || org_id == 10340">维持:{{main_collection.dialysissolution.anticoagulant_weichi}}</div>
  41. <div v-if="printObj.anticoagulant_zongliang == 1">
  42. 用量:
  43. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  44. {{main_collection.dialysissolution.anticoagulant_zongliang}}mg
  45. </span>
  46. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  47. {{main_collection.dialysissolution.anticoagulant_zongliang}}mg
  48. </span>
  49. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  50. {{main_collection.dialysissolution.anticoagulant_zongliang}}iu
  51. </span>
  52. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  53. {{main_collection.dialysissolution.anticoagulant_zongliang}}mg
  54. </span>
  55. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  56. {{main_collection.dialysissolution.anticoagulant_zongliang}}mg
  57. </span>
  58. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  59. {{main_collection.dialysissolution.anticoagulant_zongliang}}iu
  60. </span>
  61. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  62. {{main_collection.dialysissolution.anticoagulant_zongliang}}iu
  63. </span>
  64. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  65. {{main_collection.dialysissolution.anticoagulant_zongliang}}iu
  66. </span>
  67. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  68. {{main_collection.dialysissolution.anticoagulant_zongliang}}iu
  69. </span>
  70. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  71. {{main_collection.dialysissolution.anticoagulant_zongliang}}iu
  72. </span>
  73. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  74. {{main_collection.dialysissolution.anticoagulant_zongliang}}iu
  75. </span>
  76. </div>
  77. <div v-if="org_id == 10188 || org_id == 10217 || org_id == 10340">干体重:{{main_collection.assessmentbefor.dry_weight}}</div>
  78. <div v-if="org_id == 10188 || org_id == 10217 || org_id == 10340">透前体重:{{main_collection.assessmentbefor.weight_before}}</div>
  79. <div v-if="org_id == 10188 || org_id == 10217 || org_id == 10340">体重增加:{{(main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.dry_weight).toFixed(2)}}</div>
  80. <div>用法:静脉注射</div>
  81. <div>打印时间:{{currentDate}}</div>
  82. </div>
  83. <div class="signPrint" style="font-size:16px;" v-else>
  84. <div style="margin-left:50px;">姓名:
  85. <span v-if="type ==1 && printObj.name == 1">{{main_collection.patient.name}} </span>
  86. <span v-if="type ==2 && printObj.name == 1">{{main_collection.patient}} </span>
  87. ({{ main_collection.patient.dialysis_no }},{{ main_collection.patient.age }}岁)
  88. </div>
  89. <div class="printCell">
  90. <span>
  91. 床号:{{ main_collection.number.number }}
  92. <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
  93. <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
  94. <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span>
  95. </span>
  96. <span>{{ printDate }}</span>
  97. </div>
  98. <div class="printCell">
  99. <span>干体重:{{main_collection.assessmentbefor.dry_weight}}Kg</span>
  100. <span>抗凝剂:{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
  101. </div>
  102. <div class="printCell">
  103. <span>净重值:{{ main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.additional_weight }}Kg</span>
  104. <span>首剂:{{main_collection.dialysissolution.anticoagulant_shouji}}</span>
  105. </div>
  106. <div class="printCell">
  107. <span>体重增加:{{ (main_collection.assessmentbefor.weight_before - main_collection.lastafterweight.weight_after).toFixed(2) }}Kg</span>
  108. <span>维持:{{main_collection.dialysissolution.anticoagulant_weichi}}</span>
  109. </div>
  110. <div class="printCell">
  111. <span>处方脱水量:{{ main_collection.prescription.target_ultrafiltration }}</span>
  112. <span>总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}</span>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. </template>
  122. <script>
  123. import { getScheduleList,getPrintList,getNextScheduleWeekDay } from '@/api/schedule'
  124. import { parseTime } from '@/utils'
  125. import { uParseTime } from '@/utils/tools'
  126. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  127. import print from 'print-js'
  128. const moment = require('moment')
  129. export default {
  130. name: 'SchedulePrint',
  131. data() {
  132. return {
  133. crumbs: [
  134. { path: false, name: '排班提醒' },
  135. { path: false, name: '排班提醒打印' }
  136. ],
  137. scheduleData:[],
  138. week_type: 0,
  139. day:'',
  140. td_1_width: '10%',
  141. td_2_width: '10%',
  142. td_3_width: '25%',
  143. td_4_width: '45%',
  144. modeOptions: null,
  145. anticoagulants_confit:null,
  146. currentDate:'',
  147. start_time:moment().week(moment().week() + 1).startOf('week').unix(),
  148. end_time:moment().week(moment().week() + 1).endOf('week').unix(),
  149. org_id:0,
  150. now_time:0,
  151. zone:"",
  152. pre_status:0,
  153. printObj:{},
  154. type:1,
  155. printDate:''
  156. }
  157. },
  158. components: {
  159. BreadCrumb
  160. },
  161. created() {
  162. this.type = this.$route.query.type
  163. this.getPrintList()
  164. this.org_id = this.$store.getters.xt_user.org.id
  165. console.log("机构ID",this.org_id)
  166. this.currentDate = this.getCurrentDate()
  167. this.printDate = moment().format("YYYY-MM-DD HH:mm:ss")
  168. this.modeOptions = this.$store.getters.treatment_mode
  169. this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
  170. this.week_type = this.$route.query.week_type
  171. this.week_time = this.$route.query.week_time
  172. this.zone = this.$route.query.zone
  173. this.pre_status = this.$route.query.prestatus
  174. if(parseInt(this.$route.query.type) == 1){
  175. const params = {
  176. week_type:this.week_type,
  177. week_time:this.week_time,
  178. zone:this.zone,
  179. }
  180. console.log("params",params)
  181. getScheduleList(params).then(response=>{
  182. if(response.data.state ==1){
  183. var list = response.data.data.list
  184. for(let i=0;i<list.length;i++){
  185. list[i].sort = list[i].number.sort
  186. }
  187. var arr = list.sort(this.compare('sort'))
  188. this.scheduleData = arr
  189. let a = response.data.data.day
  190. console.log("a",a)
  191. var myDate = new Date(a);
  192. var year = myDate.getFullYear(); //年
  193. var month = myDate.getMonth() + 1; //月
  194. var day = myDate.getDate(); //日
  195. var days = myDate.getDay();
  196. switch(days) {
  197. case 1:
  198. days = '星期一';
  199. break;
  200. case 2:
  201. days = '星期二';
  202. break;
  203. case 3:
  204. days = '星期三';
  205. break;
  206. case 4:
  207. days = '星期四';
  208. break;
  209. case 5:
  210. days = '星期五';
  211. break;
  212. case 6:
  213. days = '星期六';
  214. break;
  215. case 0:
  216. days = '星期日';
  217. break;
  218. }
  219. var str = year + "年" + month + "月" + day + "日 " + days;
  220. this.currentDate = str
  221. }
  222. })
  223. var now_time = parseInt(this.week_type) * 86400 + this.start_time
  224. console.log("now",now_time)
  225. this.now_time = now_time
  226. }
  227. if(parseInt(this.$route.query.type) == 2){
  228. this.getNextScheduleWeekDay()
  229. }
  230. },
  231. methods: {
  232. getAdvice:function(doctor_advice) {
  233. if (doctor_advice != null) {
  234. let name = ""
  235. for (let i = 0; i< doctor_advice.length; i++) {
  236. let prescribing_number = ''
  237. let single_dose = ''
  238. let drug_spec = ''
  239. if (doctor_advice[i].prescribing_number > 0) {
  240. prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
  241. }
  242. if (doctor_advice[i].single_dose > 0) {
  243. single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
  244. }
  245. if (doctor_advice[i].drug_spec > 0) {
  246. drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
  247. }
  248. 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"
  249. if (doctor_advice[i].child.length > 0) {
  250. for (let a = 0; a < doctor_advice[i].child.length; a++) {
  251. if (doctor_advice[i].child[a].prescribing_number > 0) {
  252. doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
  253. } else {
  254. doctor_advice[i].child[a]['presc'] = ''
  255. }
  256. if (doctor_advice[i].child[a].single_dose > 0) {
  257. doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
  258. } else {
  259. doctor_advice[i].child[a]['single'] = ''
  260. }
  261. name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
  262. + doctor_advice[i].child[a].advice_desc
  263. + doctor_advice[i].child[a].drug_spec_unit
  264. + doctor_advice[i].child[a].presc
  265. + doctor_advice[i].child[a].single + "\n"
  266. }
  267. }
  268. }
  269. return name
  270. }
  271. },
  272. printAction: function() {
  273. 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: 180px;} @page {margin-top:10px;}}'
  274. 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: 170px;} @page {margin-top:10px;}}'
  275. if(this.org_id == 10188 || this.org_id == 10217 || this.org_id == 10340){
  276. printJS({
  277. printable: 'print_content',
  278. type: 'html',
  279. documentTitle: ' ',
  280. style: style1,
  281. scanStyles: false
  282. })
  283. }else{
  284. printJS({
  285. printable: 'print_content',
  286. type: 'html',
  287. documentTitle: ' ',
  288. style: style,
  289. scanStyles: false
  290. })
  291. }
  292. }, getSchedulesType: function(type) {
  293. let type_name = ''
  294. switch (type) {
  295. case 1:
  296. type_name = '上午'
  297. break
  298. case 2:
  299. type_name = '下午'
  300. break
  301. case 3:
  302. type_name = '晚上'
  303. break
  304. }
  305. return type_name
  306. },
  307. getCurrentDate: function () {
  308. console.log(this.$route.query.week_type)
  309. var myDate = new Date();
  310. var year = myDate.getFullYear(); //年
  311. var month = myDate.getMonth() + 1; //月
  312. var day = myDate.getDate() + 7; //日
  313. var newday = myDate.getDay();
  314. var days = parseInt(this.$route.query.week_type);
  315. var dayNum = parseInt(this.$route.query.week_type);
  316. switch(days) {
  317. case 1:
  318. days = '星期一';
  319. break;
  320. case 2:
  321. days = '星期二';
  322. break;
  323. case 3:
  324. days = '星期三';
  325. break;
  326. case 4:
  327. days = '星期四';
  328. break;
  329. case 5:
  330. days = '星期五';
  331. break;
  332. case 6:
  333. days = '星期六';
  334. break;
  335. case 7:
  336. days = '星期日';
  337. break;
  338. }
  339. if(newday > dayNum){
  340. let lastDay = day - (newday - dayNum)
  341. console.log("lastDay1",lastDay)
  342. var str = year + "年" + month + "月" + lastDay + "日 " + days;
  343. return str;
  344. }else if(newday < dayNum){
  345. let lastDay = day + (dayNum - newday)
  346. console.log("lastDay2",lastDay)
  347. var str = year + "年" + month + "月" + lastDay + "日 " + days;
  348. return str;
  349. }else{
  350. var str = year + "年" + month + "月" + day + "日 " + days;
  351. return str;
  352. }
  353. },
  354. compare(property) {
  355. return function (a, b) {
  356. var value1 = a[property];
  357. var value2 = b[property];
  358. return value1 - value2;
  359. }
  360. },
  361. getTime(val) {
  362. if(val == ""){
  363. return ""
  364. }else {
  365. return uParseTime(val, '{y}-{m}-{d}')
  366. }
  367. },
  368. getPrintList(){
  369. getPrintList().then(response=>{
  370. if(response.data.state == 1){
  371. var list = response.data.data.list
  372. console.log("打印设置",list)
  373. this.printObj = list
  374. }
  375. })
  376. },
  377. getNextScheduleWeekDay() {
  378. const start = moment().weekday(1).format('YYYY-MM-DD'); //本周一
  379. const end = moment().weekday(7).format('YYYY-MM-DD')
  380. var zone = this.zone
  381. // var newArr = []
  382. // for(let i=0;i<this.zoneList.length;i++){
  383. // newArr.push(this.zoneList[i].id)
  384. // }
  385. // var arr = newArr.join(",")
  386. // var str = ""
  387. // if(this.zone == 0){
  388. // str = arr
  389. // }
  390. // if(zone != 0){
  391. // str = zone.join(",")
  392. // }
  393. var now_time = parseInt(this.week_type) * 86400 + this.start_time
  394. const params = {
  395. start_time:moment().week(moment().week() + 1).startOf('week').unix(),
  396. end_time:moment().week(moment().week() + 1).endOf('week').unix(),
  397. week_type:this.week_type,
  398. week_time:this.week_time,
  399. zone:this.zone,
  400. record_date:this.getTime(now_time)
  401. }
  402. // const params = {
  403. // start_time:1609603200,
  404. // end_time:1610208000,
  405. // week_type:this.week_type,
  406. // week_time:this.week_time,
  407. // }
  408. console.log("params",params)
  409. getNextScheduleWeekDay(params).then(response => {
  410. this.scheduleData = [];
  411. if (response.data.state == 1) {
  412. var scheduleData = response.data.data.schedule;
  413. for(let i=0;i<scheduleData.length;i++){
  414. scheduleData[i].sort = scheduleData[i].number.sort
  415. }
  416. var arr = scheduleData.sort(this.compare('sort'))
  417. console.log("元旦快乐",arr)
  418. this.scheduleData = arr
  419. // var newList = []
  420. // for(let i=0;i<scheduleData.length;i++){
  421. // if(scheduleData.prescription.id > 0){
  422. // newList.push(scheduleData[i])
  423. // }
  424. // }
  425. // var arr = newList.sort(this.compare('sort'))
  426. // console.log("元旦快乐",arr)
  427. // this.scheduleData = arr
  428. } else {
  429. this.$message.error("网络错误");
  430. return false;
  431. }
  432. });
  433. },
  434. getAnticoagulant(name){
  435. if(name == 0){
  436. name = ""
  437. }
  438. if(name == 1){
  439. name = "无肝素"
  440. }
  441. if(name == 2){
  442. name = "普通肝素"
  443. }
  444. if(name == 3){
  445. name ="低分子肝素"
  446. }
  447. if(name == 4){
  448. name = "阿加曲班"
  449. }
  450. if(name == 5){
  451. name = "枸橼酸钠"
  452. }
  453. if(name == 6){
  454. name = "低分子肝素钙"
  455. }
  456. if(name == 7){
  457. name = "低分子肝素钠"
  458. }
  459. return name
  460. },
  461. getAnticoagulantZonliang(arr,mode_id){
  462. var name = 0
  463. if(arr.length > 0){
  464. for(let i=0;i<arr.length;i++){
  465. if(mode_id == arr[i].mode_id){
  466. name = arr[i].anticoagulant_zongliang
  467. }
  468. }
  469. }
  470. return name
  471. }
  472. }
  473. }
  474. </script>
  475. <style rel="stylesheet/scss" lang="scss" scoped>
  476. .print_main_content {
  477. background-color: white;
  478. max-width: 1500px;
  479. margin: 0 auto;
  480. padding: 0 0 20px 0;
  481. .order_title_panl {
  482. text-align: center;
  483. .main_title {
  484. font-size: 18px;
  485. line-height: 40px;
  486. font-weight: 500;
  487. }
  488. }
  489. .table_panel {
  490. .table {
  491. width: 100%;
  492. border: 1px solid;
  493. border-collapse: collapse;
  494. padding: 2px;
  495. thead {
  496. tr {
  497. td {
  498. border: 1px solid;
  499. text-align: center;
  500. font-size: 20px;
  501. padding: 15px 5px;
  502. }
  503. }
  504. }
  505. tbody {
  506. tr {
  507. td {
  508. border: 1px solid;
  509. text-align: center;
  510. font-size: 18px;
  511. padding: 10px 5px;
  512. .proj {
  513. padding: 5px 0;
  514. text-align: left;
  515. .proj_title {
  516. font-size: 16px;
  517. font-weight: 500;
  518. line-height: 25px;
  519. }
  520. .proj_item {
  521. font-size: 15px;
  522. line-height: 20px;
  523. .zone_name {
  524. font-weight: 500;
  525. }
  526. }
  527. }
  528. }
  529. }
  530. }
  531. }
  532. }
  533. }
  534. .signPrint{
  535. -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 60px rgba(0, 0, 0, 0.06) inset;
  536. -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  537. box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
  538. margin-bottom: 20px;
  539. padding: 20px 10px;
  540. }
  541. .printCell{
  542. span{
  543. display: inline-block;
  544. width: 180px;
  545. }
  546. }
  547. </style>