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

remind_print_setting.vue 22KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  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">
  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">首剂:{{main_collection.dialysissolution.anticoagulant_shouji}}</div>
  40. <div v-if="org_id == 10188">维持:{{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">干体重:{{main_collection.assessmentbefor.dry_weight}}</div>
  78. <div v-if="org_id == 10188">透前体重:{{main_collection.assessmentbefor.weight_before}}</div>
  79. <div v-if="org_id == 10188">体重增加:{{(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 }}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. console.log("本周信息",list)
  185. for(let i=0;i<list.length;i++){
  186. list[i].sort = list[i].number.sort
  187. }
  188. var arr = list.sort(this.compare('sort'))
  189. console.log("Arr222222",arr)
  190. this.scheduleData = arr
  191. let a = response.data.data.day
  192. console.log("a",a)
  193. var myDate = new Date(a);
  194. var year = myDate.getFullYear(); //年
  195. var month = myDate.getMonth() + 1; //月
  196. var day = myDate.getDate(); //日
  197. var days = myDate.getDay();
  198. switch(days) {
  199. case 1:
  200. days = '星期一';
  201. break;
  202. case 2:
  203. days = '星期二';
  204. break;
  205. case 3:
  206. days = '星期三';
  207. break;
  208. case 4:
  209. days = '星期四';
  210. break;
  211. case 5:
  212. days = '星期五';
  213. break;
  214. case 6:
  215. days = '星期六';
  216. break;
  217. case 0:
  218. days = '星期日';
  219. break;
  220. }
  221. var str = year + "年" + month + "月" + day + "日 " + days;
  222. this.currentDate = str
  223. }
  224. })
  225. var now_time = parseInt(this.week_type) * 86400 + this.start_time
  226. console.log("now",now_time)
  227. this.now_time = now_time
  228. }
  229. if(parseInt(this.$route.query.type) == 2){
  230. this.getNextScheduleWeekDay()
  231. }
  232. },
  233. methods: {
  234. getAdvice:function(doctor_advice) {
  235. if (doctor_advice != null) {
  236. let name = ""
  237. for (let i = 0; i< doctor_advice.length; i++) {
  238. let prescribing_number = ''
  239. let single_dose = ''
  240. let drug_spec = ''
  241. if (doctor_advice[i].prescribing_number > 0) {
  242. prescribing_number = doctor_advice[i].prescribing_number + doctor_advice[i].prescribing_number_unit
  243. }
  244. if (doctor_advice[i].single_dose > 0) {
  245. single_dose = ' 单次用量 ' + doctor_advice[i].single_dose + doctor_advice[i].single_dose_unit
  246. }
  247. if (doctor_advice[i].drug_spec > 0) {
  248. drug_spec = doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
  249. }
  250. 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"
  251. if (doctor_advice[i].child.length > 0) {
  252. for (let a = 0; a < doctor_advice[i].child.length; a++) {
  253. if (doctor_advice[i].child[a].prescribing_number > 0) {
  254. doctor_advice[i].child[a]['presc'] = doctor_advice[i].child[a].prescribing_number + doctor_advice[i].child[a].prescribing_number_unit
  255. } else {
  256. doctor_advice[i].child[a]['presc'] = ''
  257. }
  258. if (doctor_advice[i].child[a].single_dose > 0) {
  259. doctor_advice[i].child[a]['single'] = " " + ' 单次用量 ' + " " + doctor_advice[i].child[a].single_dose + doctor_advice[i].child[a].single_dose_unit
  260. } else {
  261. doctor_advice[i].child[a]['single'] = ''
  262. }
  263. name = name + "▲" + doctor_advice[i].child[a].advice_name + ""
  264. + doctor_advice[i].child[a].advice_desc
  265. + doctor_advice[i].child[a].drug_spec_unit
  266. + doctor_advice[i].child[a].presc
  267. + doctor_advice[i].child[a].single + "\n"
  268. }
  269. }
  270. }
  271. return name
  272. }
  273. },
  274. printAction: function() {
  275. 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;}}'
  276. 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;}}'
  277. if(this.org_id == 10188){
  278. printJS({
  279. printable: 'print_content',
  280. type: 'html',
  281. documentTitle: ' ',
  282. style: style1,
  283. scanStyles: false
  284. })
  285. }else{
  286. printJS({
  287. printable: 'print_content',
  288. type: 'html',
  289. documentTitle: ' ',
  290. style: style,
  291. scanStyles: false
  292. })
  293. }
  294. }, getSchedulesType: function(type) {
  295. let type_name = ''
  296. switch (type) {
  297. case 1:
  298. type_name = '上午'
  299. break
  300. case 2:
  301. type_name = '下午'
  302. break
  303. case 3:
  304. type_name = '晚上'
  305. break
  306. }
  307. return type_name
  308. },
  309. getCurrentDate: function () {
  310. console.log(this.$route.query.week_type)
  311. var myDate = new Date();
  312. var year = myDate.getFullYear(); //年
  313. var month = myDate.getMonth() + 1; //月
  314. var day = myDate.getDate() + 7; //日
  315. var newday = myDate.getDay();
  316. var days = parseInt(this.$route.query.week_type);
  317. var dayNum = parseInt(this.$route.query.week_type);
  318. switch(days) {
  319. case 1:
  320. days = '星期一';
  321. break;
  322. case 2:
  323. days = '星期二';
  324. break;
  325. case 3:
  326. days = '星期三';
  327. break;
  328. case 4:
  329. days = '星期四';
  330. break;
  331. case 5:
  332. days = '星期五';
  333. break;
  334. case 6:
  335. days = '星期六';
  336. break;
  337. case 7:
  338. days = '星期日';
  339. break;
  340. }
  341. if(newday > dayNum){
  342. let lastDay = day - (newday - dayNum)
  343. console.log("lastDay1",lastDay)
  344. var str = year + "年" + month + "月" + lastDay + "日 " + days;
  345. return str;
  346. }else if(newday < dayNum){
  347. let lastDay = day + (dayNum - newday)
  348. console.log("lastDay2",lastDay)
  349. var str = year + "年" + month + "月" + lastDay + "日 " + days;
  350. return str;
  351. }else{
  352. var str = year + "年" + month + "月" + day + "日 " + days;
  353. return str;
  354. }
  355. },
  356. compare(property) {
  357. return function (a, b) {
  358. var value1 = a[property];
  359. var value2 = b[property];
  360. return value1 - value2;
  361. }
  362. },
  363. getTime(val) {
  364. if(val == ""){
  365. return ""
  366. }else {
  367. return uParseTime(val, '{y}-{m}-{d}')
  368. }
  369. },
  370. getPrintList(){
  371. getPrintList().then(response=>{
  372. if(response.data.state == 1){
  373. var list = response.data.data.list
  374. console.log("打印设置",list)
  375. this.printObj = list
  376. }
  377. })
  378. },
  379. getNextScheduleWeekDay() {
  380. const start = moment().weekday(1).format('YYYY-MM-DD'); //本周一
  381. const end = moment().weekday(7).format('YYYY-MM-DD')
  382. var zone = this.zone
  383. // var newArr = []
  384. // for(let i=0;i<this.zoneList.length;i++){
  385. // newArr.push(this.zoneList[i].id)
  386. // }
  387. // var arr = newArr.join(",")
  388. // var str = ""
  389. // if(this.zone == 0){
  390. // str = arr
  391. // }
  392. // if(zone != 0){
  393. // str = zone.join(",")
  394. // }
  395. const params = {
  396. start_time:moment().week(moment().week() + 1).startOf('week').unix(),
  397. end_time:moment().week(moment().week() + 1).endOf('week').unix(),
  398. week_type:this.week_type,
  399. week_time:this.week_time,
  400. zone:this.zone,
  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>