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

scheduleTablePrintOne.vue 42KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978
  1. <template>
  2. <div>
  3. <el-button type="primary" @click="printAction">打印</el-button>
  4. <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
  5. <tr>
  6. <td rowspan="2">分区</td>
  7. <td rowspan="2">机号</td>
  8. <td colspan="3">周一({{ weekTitle[0] }})</td>
  9. <td colspan="3">周二({{ weekTitle[1] }})</td>
  10. <td colspan="3">周三({{ weekTitle[2] }})</td>
  11. <td colspan="3">周四({{ weekTitle[3] }})</td>
  12. <td colspan="3">周五({{ weekTitle[4] }})</td>
  13. <td colspan="3">周六({{ weekTitle[5] }})</td>
  14. <td colspan="3">周日({{ weekTitle[6] }})</td>
  15. <td>总数</td>
  16. </tr>
  17. <tr>
  18. <td>上午</td>
  19. <td>下午</td>
  20. <td>晚上</td>
  21. <td>上午</td>
  22. <td>下午</td>
  23. <td>晚上</td>
  24. <td>上午</td>
  25. <td>下午</td>
  26. <td>晚上</td>
  27. <td>上午</td>
  28. <td>下午</td>
  29. <td>晚上</td>
  30. <td>上午</td>
  31. <td>下午</td>
  32. <td>晚上</td>
  33. <td>上午</td>
  34. <td>下午</td>
  35. <td>晚上</td>
  36. <td>上午</td>
  37. <td>下午</td>
  38. <td>晚上</td>
  39. </tr>
  40. <tr v-for="(item,index) in scheduleZone" :key="index">
  41. <td style="min-width:50px;">{{ item.area }}</td>
  42. <td style="min-width:50px;">{{ item.cut }}</td>
  43. <td style="min-width:50px;">
  44. <span v-if="item.Mon_M.patient_id">
  45. <div>{{ item.Mon_M.patient }} </div>
  46. <div v-if="item.Mon_M.mode_name != 'HD'">
  47. {{ item.Mon_M.mode_name }}
  48. </div>
  49. </span>
  50. </td>
  51. <td style="min-width:50px;">
  52. <span v-if="item.Mon_A.patient_id">
  53. <div>{{ item.Mon_A.patient }} </div>
  54. <div v-if="item.Mon_A.mode_name != 'HD'">{{ item.Mon_A.mode_name }}</div>
  55. </span>
  56. </td>
  57. <td style="min-width:50px;">
  58. <span v-if="item.Mon_N.patient_id">
  59. <div>{{ item.Mon_N.patient }}</div>
  60. <div v-if="item.Mon_N.mode_name != 'HD'">{{ item.Mon_N.mode_name }}</div>
  61. </span>
  62. </td>
  63. <td style="min-width:50px;">
  64. <span v-if="item.Tue_M.patient_id">
  65. <div>{{ item.Tue_M.patient }}</div>
  66. <div v-if="item.Tue_M.mode_name != 'HD'">{{ item.Tue_M.mode_name }}</div>
  67. </span>
  68. </td>
  69. <td style="min-width:50px;">
  70. <span v-if="item.Tue_A.patient_id">
  71. <div>{{ item.Tue_A.patient }}</div>
  72. <div v-if="item.Tue_A.mode_name != 'HD'">{{ item.Tue_A.mode_name }}</div>
  73. </span>
  74. </td>
  75. <td style="min-width:50px;">
  76. <span v-if="item.Tue_N.patient_id">
  77. <div>{{ item.Tue_N.patient }}</div>
  78. <div v-if="item.Tue_N.mode_name != 'HD'">{{ item.Tue_N.mode_name }}</div>
  79. </span>
  80. </td>
  81. <td style="min-width:50px;">
  82. <span v-if="item.Wed_M.patient_id">
  83. <div>{{ item.Wed_M.patient }}</div>
  84. <div v-if="item.Wed_M.mode_name != 'HD'">{{ item.Wed_M.mode_name }}</div>
  85. </span>
  86. </td>
  87. <td style="min-width:50px;">
  88. <span v-if="item.Wed_A.patient_id">
  89. <div>{{ item.Wed_A.patient }}</div>
  90. <div v-if="item.Wed_A.mode_name != 'HD'">{{ item.Wed_A.mode_name }}</div>
  91. </span>
  92. </td>
  93. <td style="min-width:50px;">
  94. <span v-if="item.Wed_N.patient_id">
  95. <div>{{ item.Wed_N.patient }}</div>
  96. <div v-if="item.Wed_N.mode_name != 'HD'">{{ item.Wed_N.mode_name }}</div>
  97. </span>
  98. </td>
  99. <td style="min-width:50px;">
  100. <span v-if="item.Thurs_M.patient_id">
  101. <div>{{ item.Thurs_M.patient }}</div>
  102. <div v-if="item.Thurs_M.mode_name != 'HD'">{{ item.Thurs_M.mode_name }}</div>
  103. </span>
  104. </td>
  105. <td style="min-width:50px;">
  106. <span v-if="item.Thurs_A.patient_id">
  107. <div>{{ item.Thurs_A.patient }}</div>
  108. <div v-if="item.Thurs_A.mode_name != 'HD'">{{ item.Thurs_A.mode_name }}</div>
  109. </span>
  110. </td>
  111. <td style="min-width:50px;">
  112. <span v-if="item.Thurs_N.patient_id">
  113. <div>{{ item.Thurs_N.patient }}</div>
  114. <div v-if="item.Thurs_N.mode_name != 'HD'">{{ item.Thurs_N.mode_name }}</div>
  115. </span>
  116. </td>
  117. <td style="min-width:50px;">
  118. <span v-if="item.Fri_M.patient_id">
  119. <div>{{ item.Fri_M.patient }}</div>
  120. <div v-if="item.Fri_M.mode_name != 'HD'">{{ item.Fri_M.mode_name }}</div>
  121. </span>
  122. </td>
  123. <td style="min-width:50px;">
  124. <span v-if="item.Fri_A.patient_id">
  125. <div>{{ item.Fri_A.patient }}</div>
  126. <div v-if="item.Fri_A.mode_name != 'HD'">{{ item.Fri_A.mode_name }}</div>
  127. </span>
  128. </td>
  129. <td style="min-width:50px;">
  130. <span v-if="item.Fri_N.patient_id">
  131. <div>{{ item.Fri_N.patient }}</div>
  132. <div v-if="item.Sat_M.mode_name != 'HD'">{{ item.Sat_M.mode_name }}</div>
  133. </span>
  134. </td>
  135. <td style="min-width:50px;">
  136. <span v-if="item.Sat_M.patient_id">
  137. <div>{{ item.Sat_M.patient }}</div>
  138. <div v-if="item.Sat_M.mode_name != 'HD'">{{ item.Sat_M.mode_name }}</div>
  139. </span>
  140. </td>
  141. <td style="min-width:50px;">
  142. <span v-if="item.Sat_A.patient_id">
  143. <div>{{ item.Sat_A.patient }}</div>
  144. <div v-if="item.Sat_A.mode_name != 'HD'">{{ item.Sat_A.mode_name }}</div>
  145. </span>
  146. </td>
  147. <td style="min-width:50px;">
  148. <span v-if="item.Sat_N.patient_id">
  149. <div>{{ item.Sat_N.patient }}</div>
  150. <div v-if="item.Sat_N.mode_name != 'HD'">{{ item.Sat_N.mode_name }}</div>
  151. </span>
  152. </td>
  153. <td style="min-width:50px;">
  154. <span v-if="item.Sun_M.patient_id">
  155. <div>{{ item.Sun_M.patient }}</div>
  156. <div v-if="item.Sun_M.mode_name != 'HD'">{{ item.Sun_M.mode_name }} </div>
  157. <div>{{getDialyzer(item.Sun_M.patient_id,item.Sun_M.mode_name)}}</div>
  158. </span>
  159. </td>
  160. <td style="min-width:50px;">
  161. <span v-if="item.Sun_A.patient_id">
  162. <div>{{ item.Sun_A.patient }}</div>
  163. <div v-if="item.Sun_A.mode_name != 'HD'">{{ item.Sun_A.mode_name }} </div>
  164. <div>{{getDialyzer(item.Sun_A.patient_id, item.Sun_A.mode_name)}}</div>
  165. </span>
  166. </td>
  167. <td style="min-width:50px;">
  168. <span v-if="item.Sun_N.patient_id">
  169. <div>{{ item.Sun_N.patient }}</div>
  170. <div v-if="item.Sun_N.mode_name != 'HD'">{{ item.Sun_N.mode_name }} </div>
  171. <div>{{getDialyzer(item.Sun_N.patient_id,item.Sun_N.mode_name)}}</div>
  172. </span>
  173. </td>
  174. <td>{{item.total}}</td>
  175. </tr>
  176. </table>
  177. </div>
  178. </template>
  179. <script>
  180. import {getSchedulesOne,getWeekPanelsOne,getPatientSheduleCount,getAllZones,getSolutionSchedule} from "@/api/schedule";
  181. import print from 'print-js'
  182. export default {
  183. props:{
  184. scheduleZoneProp: {
  185. type: Array,
  186. dafault: []
  187. },
  188. },
  189. data(){
  190. return{
  191. schedule_type:'',
  192. partition_id:'',
  193. theType:2,
  194. scheduleZone:[],
  195. weekTitle:[],
  196. scheduleZoneRow: [],
  197. partitions: {},
  198. theWeek: {
  199. lastWeek: 0,
  200. thisWeek: 0,
  201. nextWeek: 0,
  202. nextTwoWeek: 0
  203. },
  204. scheduleCountList:[],
  205. total:0,
  206. zones:[],
  207. zoneIdList:[],
  208. strArr:"",
  209. solutionList:[]
  210. }
  211. },
  212. created(){
  213. this.getAllZones()
  214. this.modeOptions = this.$store.getters.treatment_mode;
  215. this.partition_id = this.$route.query.partition_id
  216. this.getSolutionSchedule()
  217. },
  218. methods:{
  219. getAllZones(){
  220. getAllZones().then(response=>{
  221. if(response.data.state == 1){
  222. var zones = response.data.data.zones
  223. for(let i=0;i<zones.length;i++){
  224. this.zoneIdList.push(zones[i].id)
  225. }
  226. this.zones.push(...zones)
  227. var strArr = this.zoneIdList.join(",")
  228. this.strArr = strArr
  229. this.getWeekPanels()
  230. //统计患者排班数量
  231. this.getPatientSheduleCount()
  232. }
  233. })
  234. },
  235. getWeekPanels() {
  236. this.scheduleZone = []
  237. var partionStr = this.partition_id
  238. var arr = this.zoneIdList.join(',')
  239. var str = ""
  240. if(partionStr == 0){
  241. str = arr
  242. }
  243. if(partionStr != 0){
  244. str = partionStr
  245. }
  246. getWeekPanelsOne(1,str).then(response => {
  247. if (response.data.state == 0) {
  248. return false
  249. }
  250. var partitions = response.data.data.partitions
  251. console.log("分区",partitions)
  252. this.theWeek.thisWeek = response.data.data.theWeek
  253. this.theWeek.lastWeek = this.theWeek.thisWeek - 1
  254. this.theWeek.nextWeek = this.theWeek.thisWeek + 1
  255. this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
  256. var that = this
  257. if (partitions.length > 0) {
  258. partitions.forEach(function(partition) {
  259. if (partition.jihaos.length == 0) {
  260. return false
  261. }
  262. that.scheduleZoneRow.push(partition.jihaos.length)
  263. that.partitions[partition.id] = partition
  264. partition.jihaos.forEach(function(jihao) {
  265. var thisPa = {
  266. area: partition.name,
  267. zone_id: partition.id,
  268. zone_type: partition.type,
  269. cut: jihao.number,
  270. jihao_id: jihao.id,
  271. Mon_M: {
  272. schedule_id: 0,
  273. mode_id: 0,
  274. mode_name: '',
  275. patient_id: 0,
  276. patient: ''
  277. },
  278. Mon_A: {
  279. schedule_id: 0,
  280. mode_id: 0,
  281. mode_name: '',
  282. patient_id: 0,
  283. patient: ''
  284. },
  285. Mon_N: {
  286. schedule_id: 0,
  287. mode_id: 0,
  288. mode_name: '',
  289. patient_id: 0,
  290. patient: ''
  291. },
  292. Tue_M: {
  293. schedule_id: 0,
  294. mode_id: 0,
  295. mode_name: '',
  296. patient_id: 0,
  297. patient: ''
  298. },
  299. Tue_A: {
  300. schedule_id: 0,
  301. mode_id: 0,
  302. mode_name: '',
  303. patient_id: 0,
  304. patient: ''
  305. },
  306. Tue_N: {
  307. schedule_id: 0,
  308. mode_id: 0,
  309. mode_name: '',
  310. patient_id: 0,
  311. patient: ''
  312. },
  313. Wed_M: {
  314. schedule_id: 0,
  315. mode_id: 0,
  316. mode_name: '',
  317. patient_id: 0,
  318. patient: ''
  319. },
  320. Wed_A: {
  321. schedule_id: 0,
  322. mode_id: 0,
  323. mode_name: '',
  324. patient_id: 0,
  325. patient: ''
  326. },
  327. Wed_N: {
  328. schedule_id: 0,
  329. mode_id: 0,
  330. mode_name: '',
  331. patient_id: 0,
  332. patient: ''
  333. },
  334. Thurs_M: {
  335. schedule_id: 0,
  336. mode_id: 0,
  337. mode_name: '',
  338. patient_id: 0,
  339. patient: ''
  340. },
  341. Thurs_A: {
  342. schedule_id: 0,
  343. mode_id: 0,
  344. mode_name: '',
  345. patient_id: 0,
  346. patient: ''
  347. },
  348. Thurs_N: {
  349. schedule_id: 0,
  350. mode_id: 0,
  351. mode_name: '',
  352. patient_id: 0,
  353. patient: ''
  354. },
  355. Fri_M: {
  356. schedule_id: 0,
  357. mode_id: 0,
  358. mode_name: '',
  359. patient_id: 0,
  360. patient: ''
  361. },
  362. Fri_A: {
  363. schedule_id: 0,
  364. mode_id: 0,
  365. mode_name: '',
  366. patient_id: 0,
  367. patient: ''
  368. },
  369. Fri_N: {
  370. schedule_id: 0,
  371. mode_id: 0,
  372. mode_name: '',
  373. patient_id: 0,
  374. patient: ''
  375. },
  376. Sat_M: {
  377. schedule_id: 0,
  378. mode_id: 0,
  379. mode_name: '',
  380. patient_id: 0,
  381. patient: ''
  382. },
  383. Sat_A: {
  384. schedule_id: 0,
  385. mode_id: 0,
  386. mode_name: '',
  387. patient_id: 0,
  388. patient: ''
  389. },
  390. Sat_N: {
  391. schedule_id: 0,
  392. mode_id: 0,
  393. mode_name: '',
  394. patient_id: 0,
  395. patient: ''
  396. },
  397. Sun_A: {
  398. schedule_id: 0,
  399. mode_id: 0,
  400. mode_name: '',
  401. patient_id: 0,
  402. patient: ''
  403. },
  404. Sun_N: {
  405. schedule_id: 0,
  406. mode_id: 0,
  407. mode_name: '',
  408. patient_id: 0,
  409. patient: ''
  410. },
  411. Sun_M: {
  412. schedule_id: 0,
  413. mode_id: 0,
  414. mode_name: '',
  415. patient_id: 0,
  416. patient: ''
  417. },
  418. total: 0
  419. }
  420. that.scheduleZone.push(thisPa)
  421. })
  422. })
  423. }
  424. this.getSchedules()
  425. })
  426. },
  427. getSchedules() {
  428. var theType = 2;
  429. if(this.$route.query.weekTime == "lastWeek"){
  430. theType = 1
  431. }
  432. if(this.$route.query.weekTime == "thisWeek"){
  433. theType = 2
  434. }
  435. if(this.$route.query.weekTime == "nextWeek"){
  436. theType = 3
  437. }
  438. if(this.$route.query.weekTime == "nextTwoWeek"){
  439. theType = 4
  440. }
  441. var partionStr = this.partition_id
  442. var arr = this.zoneIdList.join(',')
  443. var str = ""
  444. if(partionStr == 0){
  445. str = arr
  446. }
  447. if(partionStr != 0){
  448. str = partionStr
  449. }
  450. const params = {
  451. weekTime:theType,
  452. patitionid:str,
  453. schedule_type:this.schedule_type,
  454. }
  455. getSchedulesOne(params).then(response => {
  456. if (response.data.state == 1) {
  457. this.weekTitle = response.data.data.weekTitle;
  458. this.weekDays = response.data.data.days;
  459. this.toDay = response.data.data.today;
  460. var theSchedules = response.data.data.schdules;
  461. var that = this;
  462. that.scheduleZone.forEach(function(zone, index) {
  463. that.scheduleZone[index].Mon_M = {
  464. mode_id: 0,
  465. mode_name: "",
  466. patient_id: 0,
  467. patient: ""
  468. };
  469. that.scheduleZone[index].Mon_A = {
  470. mode_id: 0,
  471. mode_name: "",
  472. patient_id: 0,
  473. patient: ""
  474. };
  475. that.scheduleZone[index].Mon_N = {
  476. mode_id: 0,
  477. mode_name: "",
  478. patient_id: 0,
  479. patient: ""
  480. };
  481. that.scheduleZone[index].Tue_M = {
  482. mode_id: 0,
  483. mode_name: "",
  484. patient_id: 0,
  485. patient: ""
  486. };
  487. that.scheduleZone[index].Tue_A = {
  488. mode_id: 0,
  489. mode_name: "",
  490. patient_id: 0,
  491. patient: ""
  492. };
  493. that.scheduleZone[index].Tue_N = {
  494. mode_id: 0,
  495. mode_name: "",
  496. patient_id: 0,
  497. patient: ""
  498. };
  499. that.scheduleZone[index].Wed_M = {
  500. mode_id: 0,
  501. mode_name: "",
  502. patient_id: 0,
  503. patient: ""
  504. };
  505. that.scheduleZone[index].Wed_A = {
  506. mode_id: 0,
  507. mode_name: "",
  508. patient_id: 0,
  509. patient: ""
  510. };
  511. that.scheduleZone[index].Wed_N = {
  512. mode_id: 0,
  513. mode_name: "",
  514. patient_id: 0,
  515. patient: ""
  516. };
  517. that.scheduleZone[index].Thurs_M = {
  518. mode_id: 0,
  519. mode_name: "",
  520. patient_id: 0,
  521. patient: ""
  522. };
  523. that.scheduleZone[index].Thurs_A = {
  524. mode_id: 0,
  525. mode_name: "",
  526. patient_id: 0,
  527. patient: ""
  528. };
  529. that.scheduleZone[index].Thurs_N = {
  530. mode_id: 0,
  531. mode_name: "",
  532. patient_id: 0,
  533. patient: ""
  534. };
  535. that.scheduleZone[index].Fri_M = {
  536. mode_id: 0,
  537. mode_name: "",
  538. patient_id: 0,
  539. patient: ""
  540. };
  541. that.scheduleZone[index].Fri_A = {
  542. mode_id: 0,
  543. mode_name: "",
  544. patient_id: 0,
  545. patient: ""
  546. };
  547. that.scheduleZone[index].Fri_N = {
  548. mode_id: 0,
  549. mode_name: "",
  550. patient_id: 0,
  551. patient: ""
  552. };
  553. that.scheduleZone[index].Sat_M = {
  554. mode_id: 0,
  555. mode_name: "",
  556. patient_id: 0,
  557. patient: ""
  558. };
  559. that.scheduleZone[index].Sat_A = {
  560. mode_id: 0,
  561. mode_name: "",
  562. patient_id: 0,
  563. patient: ""
  564. };
  565. that.scheduleZone[index].Sat_N = {
  566. mode_id: 0,
  567. mode_name: "",
  568. patient_id: 0,
  569. patient: ""
  570. };
  571. that.scheduleZone[index].Sun_A = {
  572. mode_id: 0,
  573. mode_name: "",
  574. patient_id: 0,
  575. patient: ""
  576. };
  577. that.scheduleZone[index].Sun_N = {
  578. mode_id: 0,
  579. mode_name: "",
  580. patient_id: 0,
  581. patient: ""
  582. };
  583. that.scheduleZone[index].Sun_M = {
  584. mode_id: 0,
  585. mode_name: "",
  586. patient_id: 0,
  587. patient: ""
  588. };
  589. that.scheduleZone[index].total = 0;
  590. if (response.data.data.schdules.length > 0) {
  591. theSchedules.forEach(function(schedule, sindex) {
  592. if (zone.jihao_id == schedule.bed_id) {
  593. // if(zone.zone_id == schedule.partition_id && zone.jihao_id == schedule.bed_id) {
  594. var weekPath = that.weekPath(
  595. schedule.schedule_week,
  596. schedule.schedule_type
  597. );
  598. if (weekPath.length == 2) {
  599. // console.log(schedule);
  600. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  601. that.scheduleZone[index][weekPathKey] = {
  602. schedule_id: schedule.id,
  603. mode_id: schedule.mode_id,
  604. patient_id: schedule.patient_id,
  605. patient: schedule.patient,
  606. patient_contagions: schedule.patient_contagions,
  607. mode_name:
  608. typeof that.modeOptions[schedule.mode_id] ===
  609. "undefined"
  610. ? ""
  611. : that.modeOptions[schedule.mode_id].name
  612. };
  613. that.scheduleZone[index].total += 1;
  614. }
  615. }
  616. });
  617. }
  618. });
  619. var newArr= [{"area":"总数","cut":0,"Fri_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_A":{mode_id:0,mode_name:"",patient:"",patient_id:"1"},"Mon_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"jihao_id":"","total":"","zone_id":"","zone_type":""}]
  620. for(let i=0;i<newArr.length;i++){
  621. for(let j=0;j<this.scheduleCountList.length;j++){
  622. newArr[i].cut = this.total
  623. //礼拜一上午
  624. if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 1){
  625. newArr[i].Mon_M.patient = this.scheduleCountList[j].Count
  626. }
  627. //礼拜一下午
  628. if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 2){
  629. newArr[i].Mon_A.patient = this.scheduleCountList[j].Count
  630. }
  631. //礼拜一晚上
  632. if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 3){
  633. newArr[i].Mon_N.patient = this.scheduleCountList[j].Count
  634. }
  635. //礼拜二上午
  636. if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 1){
  637. newArr[i].Tue_M.patient = this.scheduleCountList[j].Count
  638. }
  639. //礼拜二下午
  640. if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 2){
  641. newArr[i].Tue_A.patient = this.scheduleCountList[j].Count
  642. }
  643. //礼拜二晚上
  644. if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 3){
  645. newArr[i].Tue_N.patient = this.scheduleCountList[j].Count
  646. }
  647. //礼拜三上午
  648. if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
  649. newArr[i].Wed_M.patient = this.scheduleCountList[j].Count
  650. }
  651. //礼拜三下午
  652. if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
  653. newArr[i].Wed_A.patient = this.scheduleCountList[j].Count
  654. }
  655. //礼拜三晚上
  656. if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 3){
  657. newArr[i].Wed_N.patient = this.scheduleCountList[j].Count
  658. }
  659. //礼拜四上午
  660. if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 1){
  661. newArr[i].Thurs_M.patient = this.scheduleCountList[j].Count
  662. }
  663. //礼拜四下午
  664. if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 2){
  665. newArr[i].Thurs_A.patient = this.scheduleCountList[j].Count
  666. }
  667. //礼拜四晚上
  668. if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 3){
  669. newArr[i].Thurs_N.patient = this.scheduleCountList[j].Count
  670. }
  671. //礼拜五上午
  672. if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 1){
  673. newArr[i].Fri_M.patient = this.scheduleCountList[j].Count
  674. }
  675. //礼拜五下午
  676. if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 2){
  677. newArr[i].Fri_A.patient = this.scheduleCountList[j].Count
  678. }
  679. //礼拜五晚上
  680. if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 3){
  681. newArr[i].Fri_N.patient = this.scheduleCountList[j].Count
  682. }
  683. //礼拜六上午
  684. if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 1){
  685. newArr[i].Sat_M.patient = this.scheduleCountList[j].Count
  686. }
  687. //礼拜六下午
  688. if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 2){
  689. newArr[i].Sat_A.patient = this.scheduleCountList[j].Count
  690. }
  691. //礼拜六晚上
  692. if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 3){
  693. newArr[i].Sat_N.patient = this.scheduleCountList[j].Count
  694. }
  695. //礼拜日上午
  696. if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 1){
  697. newArr[i].Sun_M.patient = this.scheduleCountList[j].Count
  698. }
  699. //礼拜日下午
  700. if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 2){
  701. newArr[i].Sun_A.patient = this.scheduleCountList[j].Count
  702. }
  703. //礼拜日晚上
  704. if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 3){
  705. newArr[i].Sun_N.patient = this.scheduleCountList[j].Count
  706. }
  707. }
  708. }
  709. console.log("newArr222222222",newArr)
  710. that.scheduleZone.push(...newArr)
  711. console.log('总数据77777777777',that.scheduleZone)
  712. } else {
  713. this.$message.error("网络错误");
  714. return false;
  715. }
  716. });
  717. },
  718. weekPath(week, schedule_type) {
  719. var weekArr = {
  720. 1: "Mon",
  721. 2: "Tue",
  722. 3: "Wed",
  723. 4: "Thurs",
  724. 5: "Fri",
  725. 6: "Sat",
  726. 7: "Sun"
  727. };
  728. var typeArr = { 1: "M", 2: "A", 3: "N" };
  729. if (
  730. typeof weekArr[week] === "undefined" ||
  731. typeof typeArr[schedule_type] === "undefined"
  732. ) {
  733. return [];
  734. }
  735. return [weekArr[week], typeArr[schedule_type]];
  736. },
  737. printAction: function() {
  738. const style = '@media print {#scheduleTable{font-size:16px;} .scheduleTable tr td{text-align: center;padding: 5px;}}'
  739. printJS({
  740. printable: 'scheduleTable',
  741. type: 'html',
  742. documentTitle: ' ',
  743. style: style,
  744. scanStyles: false
  745. })
  746. },
  747. getPatientSheduleCount(){
  748. var theType = 2;
  749. if(this.$route.query.weekTime == "lastWeek"){
  750. theType = 1
  751. }
  752. if(this.$route.query.weekTime == "thisWeek"){
  753. theType = 2
  754. }
  755. if(this.$route.query.weekTime == "nextWeek"){
  756. theType = 3
  757. }
  758. if(this.$route.query.weekTime == "nextTwoWeek"){
  759. theType = 4
  760. }
  761. var partionStr = this.partition_id
  762. console.log("partionStr",partionStr)
  763. var arr = this.zoneIdList.join(',')
  764. var str = ""
  765. if(partionStr == 0){
  766. str = arr
  767. }
  768. if(partionStr != 0){
  769. str = partionStr
  770. }
  771. var params = {
  772. weekTime:theType,
  773. partition_id:str,
  774. }
  775. getPatientSheduleCount(params).then(response=>{
  776. if(response.data.state == 1){
  777. var list = response.data.data.list
  778. console.log("list22222",list)
  779. this.scheduleCountList = list
  780. var total = response.data.data.total
  781. console.log("totalw222",total)
  782. this.total = total
  783. }
  784. })
  785. },
  786. getSolutionSchedule(){
  787. getSolutionSchedule().then(response=>{
  788. if(response.data.state ==1){
  789. var solution = response.data.data.solution
  790. console.log("solution",solution)
  791. for(let i=0;i<solution.length;i++){
  792. if(solution[i].mode_id == 1){
  793. solution[i].mode_name = "HD"
  794. }
  795. if(solution[i].mode_id == 2){
  796. solution[i].mode_name = "HDF"
  797. }
  798. if(solution[i].mode_id == 3){
  799. solution[i].mode_name = "HD+HP"
  800. }
  801. if(solution[i].mode_id == 4){
  802. solution[i].mode_name = "HP"
  803. }
  804. if(solution[i].mode_id == 5){
  805. solution[i].mode_name = "HF"
  806. }
  807. if(solution[i].mode_id == 6){
  808. solution[i].mode_name = "SCUF"
  809. }
  810. if(solution[i].mode_id == 7){
  811. solution[i].mode_name = "IUF"
  812. }
  813. if(solution[i].mode_id == 8){
  814. solution[i].mode_name = "HFHD"
  815. }
  816. if(solution[i].mode_id == 9){
  817. solution[i].mode_name = "HFHD+HP"
  818. }
  819. if(solution[i].mode_id == 10){
  820. solution[i].mode_name = "PHF"
  821. }
  822. if(solution[i].mode_id == 11){
  823. solution[i].mode_name = "HFR"
  824. }
  825. if(solution[i].mode_id == 12){
  826. solution[i].mode_name = "HDF+HP"
  827. }
  828. if(solution[i].mode_id == 13){
  829. solution[i].mode_name = "CRRT"
  830. }
  831. if(solution[i].mode_id == 14){
  832. solution[i].mode_name = "腹水回输"
  833. }
  834. if(solution[i].mode_id == 19){
  835. solution[i].mode_name = "IUF+HD"
  836. }
  837. if(solution[i].mode_id == 20){
  838. solution[i].mode_name = "UF"
  839. }
  840. if(solution[i].mode_id == 21){
  841. solution[i].mode_name = "HD+"
  842. }
  843. if(solution[i].mode_id == 18){
  844. solution[i].mode_name = "SCUF"
  845. }
  846. if(solution[i].mode_id == 19){
  847. solution[i].mode_name = "SCUF"
  848. }
  849. if(solution[i].mode_id == 20){
  850. solution[i].mode_name = "SCUF"
  851. }
  852. if(solution[i].mode_id == 21){
  853. solution[i].mode_name = "HD+"
  854. }
  855. if(solution[i].mode_id == 22){
  856. solution[i].mode_name = "血浆胆红素吸附+HDF"
  857. }
  858. if(solution[i].mode_id == 23){
  859. solution[i].mode_name = "血浆胆红素吸附"
  860. }
  861. if(solution[i].mode_id == 24){
  862. solution[i].mode_name = "I-HDF"
  863. }
  864. if(solution[i].mode_id == 25){
  865. solution[i].mode_name = "HD高通"
  866. }
  867. if(solution[i].mode_id == 26){
  868. solution[i].mode_name = "CVVH"
  869. }
  870. if(solution[i].mode_id == 27){
  871. solution[i].mode_name = "CVVH"
  872. }
  873. if(solution[i].mode_id == 28){
  874. solution[i].mode_name = "CVVHDF"
  875. }
  876. if(solution[i].mode_id == 29){
  877. solution[i].mode_name = "PE"
  878. }
  879. }
  880. this.solutionList = solution
  881. }
  882. })
  883. },
  884. getDialyzer(patient_id,mode){
  885. var diazers = ""
  886. for(let i=0;i<this.solutionList.length;i++){
  887. if(patient_id == this.solutionList[i].patient_id && mode == this.solutionList[i].mode_name){
  888. if(this.solutionList[i].dialyzer_perfusion_apparatus!=""){
  889. diazers = this.solutionList[i].dialyzer_perfusion_apparatus
  890. }else{
  891. diazers = this.solutionList[i].dialysis_dialyszers
  892. if(this.solutionList[i].dialysis_dialyszers == ""){
  893. diazers = this.solutionList[i].dialysis_irrigation
  894. }
  895. }
  896. }
  897. }
  898. return diazers
  899. }
  900. }
  901. }
  902. </script>
  903. <style lang="scss">
  904. td{
  905. text-align: center;
  906. padding: 5px;
  907. }
  908. </style>