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

tableWeeks.vue 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. <template>
  2. <div>
  3. <div class="cell clearfix" style="float: right">
  4. <el-button
  5. style="float: right"
  6. size="small"
  7. icon="el-icon-printer"
  8. @click="printAction()"
  9. type="primary"
  10. >打印
  11. </el-button>
  12. </div>
  13. <div class="cell clearfix">
  14. <label class="title"> <span class="name">时间</span> : </label>
  15. <div class="time">
  16. <ul class>
  17. <li
  18. :class="item.id == week_type ? 'active' : ''"
  19. @click="selectWeekType(item.id)"
  20. v-for="item in weekArr"
  21. :key="item.id"
  22. >
  23. {{ item.name }}
  24. </li>
  25. </ul>
  26. </div>
  27. <div class="title"><span class="name">班 次</span> :</div>
  28. <div class="time">
  29. <ul class>
  30. <li
  31. :class="item.id == week_time ? 'active' : ''"
  32. @click="selectWeekTime(item.id)"
  33. v-for="item in weekTimes"
  34. :key="item.id"
  35. >
  36. {{ item.name }}
  37. </li>
  38. </ul>
  39. </div>
  40. </div>
  41. <el-table
  42. :row-style="{ color: '#303133' }"
  43. :data="scheduleData"
  44. border
  45. :header-cell-style="{
  46. backgroundColor: 'rgb(245, 247, 250)',
  47. color: '#606266'
  48. }"
  49. style="width: 100%"
  50. >
  51. <el-table-column label="姓名" min-width="100" align="center">
  52. <template slot-scope="scope">
  53. {{ scope.row.patient }}
  54. </template>
  55. </el-table-column>
  56. <el-table-column label="分区" min-width="70" align="center">
  57. <template slot-scope="scope">
  58. {{ scope.row.zone.name }}
  59. </template>
  60. </el-table-column>
  61. <el-table-column label="班次" min-width="70" align="center">
  62. <template slot-scope="scope">
  63. {{ getSchedulesType(scope.row.schedule_type) }}
  64. </template>
  65. </el-table-column>
  66. <el-table-column label="机号" min-width="70" align="center">
  67. <template slot-scope="scope">
  68. {{ scope.row.number.number }}
  69. </template>
  70. </el-table-column>
  71. <el-table-column label="透析模式" min-width="100" align="center">
  72. <template slot-scope="scope">
  73. {{
  74. scope.row.mode_id && modeOptions[scope.row.mode_id]
  75. ? modeOptions[scope.row.mode_id].name
  76. : ""
  77. }}
  78. </template>
  79. </el-table-column>
  80. <el-table-column label="透析器" min-width="100" align="center">
  81. <template slot-scope="scope">
  82. {{ scope.row.prescription.dialyzer_perfusion_apparatus }}
  83. </template>
  84. </el-table-column>
  85. <el-table-column label="抗凝剂" min-width="100" align="center">
  86. <template slot-scope="scope">
  87. <span v-if="scope.row.prescription.anticoagulant === 1">无肝素</span>
  88. <span v-if="scope.row.prescription.anticoagulant === 2"
  89. >普通肝素</span
  90. >
  91. <span v-if="scope.row.prescription.anticoagulant === 3"
  92. >低分子肝素</span
  93. >
  94. <span v-if="scope.row.prescription.anticoagulant === 4"
  95. >阿加曲班</span
  96. >
  97. <span v-if="scope.row.prescription.anticoagulant === 5"
  98. >枸橼酸钠</span
  99. >
  100. <span v-if="scope.row.prescription.anticoagulant === 6"
  101. >低分子肝素钙</span
  102. >
  103. <span v-if="scope.row.prescription.anticoagulant === 7"
  104. >低分子肝素钠</span
  105. >
  106. </template>
  107. </el-table-column>
  108. <el-table-column label="总量" min-width="100" align="center">
  109. <template slot-scope="scope">
  110. <span v-if="scope.row.prescription.anticoagulant == 1">{{
  111. scope.row.prescription.anticoagulant_zongliang
  112. ? scope.row.prescription.anticoagulant_zongliang + "mg"
  113. : ""
  114. }}</span>
  115. <span v-if="scope.row.prescription.anticoagulant == 2">{{
  116. scope.row.prescription.anticoagulant_zongliang
  117. ? scope.row.prescription.anticoagulant_zongliang + "iu"
  118. : ""
  119. }}</span>
  120. <span v-if="scope.row.prescription.anticoagulant == 3">{{
  121. scope.row.prescription.anticoagulant_zongliang
  122. ? scope.row.prescription.anticoagulant_zongliang + "iu"
  123. : ""
  124. }}</span>
  125. <span v-if="scope.row.prescription.anticoagulant == 4">{{
  126. scope.row.prescription.anticoagulant_zongliang
  127. ? scope.row.prescription.anticoagulant_zongliang + "mg"
  128. : ""
  129. }}</span>
  130. <span v-if="scope.row.prescription.anticoagulant == 5">{{
  131. scope.row.prescription.anticoagulant_zongliang
  132. ? scope.row.prescription.anticoagulant_zongliang + "mg"
  133. : ""
  134. }}</span>
  135. <span v-if="scope.row.prescription.anticoagulant == 6">{{
  136. scope.row.prescription.anticoagulant_zongliang
  137. ? scope.row.prescription.anticoagulant_zongliang + "iu"
  138. : ""
  139. }}</span>
  140. <span v-if="scope.row.prescription.anticoagulant == 7">{{
  141. scope.row.prescription.anticoagulant_zongliang
  142. ? scope.row.prescription.anticoagulant_zongliang + "iu"
  143. : ""
  144. }}</span>
  145. </template>
  146. </el-table-column>
  147. <el-table-column label="长期医嘱" min-width="440" align="center">
  148. <template slot-scope="scope">
  149. <span style="white-space: pre">{{
  150. getAdvice(scope.row.doctor_advice)
  151. }}</span>
  152. </template>
  153. </el-table-column>
  154. </el-table>
  155. </div>
  156. </template>
  157. <script>
  158. import { getSchedules, getScheduleWeekDay } from "@/api/schedule";
  159. import WeekItem from "./WeekItem";
  160. export default {
  161. name: "tableWeeks",
  162. props: {
  163. weekTime: {
  164. type: String,
  165. default: "thisWeek"
  166. }
  167. },
  168. data() {
  169. return {
  170. weekArr: [
  171. { id: 1, name: "周一" },
  172. { id: 2, name: "周二" },
  173. { id: 3, name: "周三" },
  174. { id: 4, name: "周四" },
  175. { id: 5, name: "周五" },
  176. { id: 6, name: "周六" },
  177. { id: 7, name: "周日" }
  178. ],
  179. anticoagulants_confit: null,
  180. week_type: "1",
  181. week_time:0,
  182. weekTimes:[
  183. {id:0,name:"全部"},
  184. {id:1,name:"上午"},
  185. {id:2,name:"下午"},
  186. {id:3,name:"晚上"},
  187. ],
  188. weekTitle: ["", "", "", "", "", "", ""],
  189. weekData: {
  190. Monday: [],
  191. Tuesday: [],
  192. Wednesday: [],
  193. Thursday: [],
  194. Friday: [],
  195. Saturday: [],
  196. Sunday: []
  197. },
  198. scheduleData: [],
  199. modeOptions: null
  200. };
  201. },
  202. watch: {
  203. weekTime: function() {
  204. var theType = this.weekType(this.weekTime);
  205. this.getSchedules(theType);
  206. }
  207. },
  208. methods: {
  209. printAction() {
  210. this.$router.push({
  211. path: "/schedule/remind/print?week_type=" + this.week_type+"&week_time="+this.week_time
  212. });
  213. },
  214. getScheduleWeekDay() {
  215. const params = {
  216. week_type:this.week_type,
  217. week_time:this.week_time,
  218. }
  219. console.log("params------",params)
  220. getScheduleWeekDay(params).then(response => {
  221. this.scheduleData = [];
  222. if (response.data.state == 1) {
  223. this.scheduleData = response.data.data.schdules;
  224. console.log("排班-----", this.scheduleData);
  225. } else {
  226. this.$message.error("网络错误");
  227. return false;
  228. }
  229. });
  230. },
  231. // getSchedules(weekType) {
  232. // getSchedules(weekType).then(response => {
  233. // this.scheduleData = []
  234. // if (response.data.state == 1) {
  235. // this.weekTitle = response.data.data.weekTitle
  236. // var theSchedules = response.data.data.schdules
  237. // var that = this
  238. // theSchedules.forEach(function(schedule) {
  239. // schedule['mode_name'] = typeof (that.modeOptions[schedule.mode_id]) == 'undefined' ? '' : that.modeOptions[schedule.mode_id].name
  240. // var weekPath = that.weekPath(schedule.schedule_week)
  241. // if (weekPath.length > 0) {
  242. // that.weekData[weekPath].push(schedule)
  243. // }
  244. // })
  245. // var rowNum = 0
  246. // console.log(that.weekData)
  247. // for (var index in that.weekData) {
  248. // var thisLen = that.weekData[index].length
  249. // rowNum = rowNum >= thisLen ? rowNum : thisLen
  250. // }
  251. // console.log(rowNum)
  252. // for (let index = 0; index < rowNum; index++) {
  253. // var dataItem = {}
  254. // for (var weekIndex in that.weekData) {
  255. // var weekItem = that.weekData[weekIndex].shift()
  256. // console.log('weekItem', weekItem)
  257. // if (typeof (weekItem) != 'undefined') {
  258. // dataItem[weekIndex] = weekItem
  259. // }
  260. // }
  261. // that.scheduleData.push(dataItem)
  262. // }
  263. //
  264. // console.log(that.scheduleData)
  265. //
  266. // } else {
  267. // this.$message.error('网络错误')
  268. // return false
  269. // }
  270. // })
  271. // },
  272. weekType(weekTime) {
  273. var theType = 2;
  274. switch (weekTime) {
  275. case "lastWeek":
  276. theType = 1;
  277. break;
  278. case "thisWeek":
  279. theType = 2;
  280. break;
  281. case "nextWeek":
  282. theType = 3;
  283. break;
  284. case "nextTwoWeek":
  285. theType = 4;
  286. break;
  287. default:
  288. theType = 2;
  289. break;
  290. }
  291. return theType;
  292. },
  293. weekPath(week) {
  294. var weekArr = {
  295. 1: "Monday",
  296. 2: "Tuesday",
  297. 3: "Wednesday",
  298. 4: "Thursday",
  299. 5: "Friday",
  300. 6: "Saturday",
  301. 7: "Sunday"
  302. };
  303. if (typeof weekArr[week] == "undefined") {
  304. return "";
  305. }
  306. return weekArr[week];
  307. },
  308. selectWeekType(type) {
  309. this.week_type = type;
  310. // let params = {
  311. // week_type: this.week_type
  312. // };
  313. this.getScheduleWeekDay();
  314. },
  315. selectWeekTime(type){
  316. this.week_time = type
  317. this.getScheduleWeekDay()
  318. },
  319. getSchedulesType: function(type) {
  320. let type_name = "";
  321. switch (type) {
  322. case 1:
  323. type_name = "上午";
  324. break;
  325. case 2:
  326. type_name = "下午";
  327. break;
  328. case 3:
  329. type_name = "晚上";
  330. break;
  331. }
  332. return type_name;
  333. },
  334. getAdvice: function(doctor_advice) {
  335. if (doctor_advice != null) {
  336. let name = "";
  337. for (let i = 0; i < doctor_advice.length; i++) {
  338. let prescribing_number = "";
  339. let single_dose = "";
  340. let drug_spec = "";
  341. if (doctor_advice[i].prescribing_number > 0) {
  342. prescribing_number =
  343. doctor_advice[i].prescribing_number +
  344. doctor_advice[i].prescribing_number_unit;
  345. }
  346. if (doctor_advice[i].single_dose > 0) {
  347. single_dose =
  348. " 单次用量 " +
  349. doctor_advice[i].single_dose +
  350. doctor_advice[i].single_dose_unit;
  351. }
  352. if (doctor_advice[i].drug_spec > 0) {
  353. drug_spec =
  354. doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit;
  355. }
  356. name =
  357. name +
  358. doctor_advice[i].advice_name +
  359. " " +
  360. drug_spec +
  361. " " +
  362. prescribing_number +
  363. " " +
  364. single_dose +
  365. " " +
  366. doctor_advice[i].delivery_way +
  367. " " +
  368. doctor_advice[i].execution_frequency +
  369. " " +
  370. doctor_advice[i].remark +
  371. "\n";
  372. if (doctor_advice[i].child.length > 0) {
  373. for (let a = 0; a < doctor_advice[i].child.length; a++) {
  374. if (doctor_advice[i].child[a].prescribing_number > 0) {
  375. doctor_advice[i].child[a]["presc"] =
  376. doctor_advice[i].child[a].prescribing_number +
  377. doctor_advice[i].child[a].prescribing_number_unit;
  378. } else {
  379. doctor_advice[i].child[a]["presc"] = "";
  380. }
  381. if (doctor_advice[i].child[a].single_dose > 0) {
  382. doctor_advice[i].child[a]["single"] =
  383. " " +
  384. " 单次用量 " +
  385. " " +
  386. doctor_advice[i].child[a].single_dose +
  387. doctor_advice[i].child[a].single_dose_unit;
  388. } else {
  389. doctor_advice[i].child[a]["single"] = "";
  390. }
  391. name =
  392. name +
  393. "▲" +
  394. doctor_advice[i].child[a].advice_name +
  395. "" +
  396. doctor_advice[i].child[a].advice_desc +
  397. doctor_advice[i].child[a].drug_spec_unit +
  398. doctor_advice[i].child[a].presc +
  399. doctor_advice[i].child[a].single +
  400. "\n";
  401. }
  402. }
  403. }
  404. return name;
  405. }
  406. }
  407. },
  408. components: {
  409. WeekItem
  410. },
  411. created() {
  412. this.modeOptions = this.$store.getters.treatment_mode;
  413. this.anticoagulants_confit = this.$store.getters.anticoagulants_confit;
  414. console.log("抗凝机", this.anticoagulants_confit);
  415. this.week_type = new Date().getDay();
  416. if (this.week_type == 0) {
  417. this.week_type = 7;
  418. }
  419. // let params = {
  420. // week_type: this.week_type
  421. // };
  422. this.getScheduleWeekDay();
  423. }
  424. };
  425. </script>
  426. <style rel="stylesheet/css" lang="scss">
  427. .el-table td,
  428. .el-table th.is-leaf,
  429. .el-table--border,
  430. .el-table--group {
  431. border-color: #d0d3da;
  432. }
  433. .el-table--border::after,
  434. .el-table--group::after,
  435. .el-table::before {
  436. background-color: #d0d3da;
  437. }
  438. </style>