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

Patientshift.vue 50KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570
  1. <template>
  2. <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs="crumbs" style="flex:1;"></bread-crumb>
  5. <!-- <div style="display: inline-block;position: relative;right: -30%;"> -->
  6. <el-button type="primary" @click="quan_ping">全屏</el-button>
  7. <!-- </div> -->
  8. </div>
  9. <div class="app-container" style="background-color: white">
  10. <div id="print_content">
  11. <div style="margin: 20px 0;">
  12. <div class="content_top">日期:
  13. <el-date-picker
  14. @change="date_picker"
  15. v-model="date"
  16. type="date"
  17. placeholder="选择日期">
  18. </el-date-picker>
  19. </div>
  20. <div class="content_top">排班班次:
  21. <el-select v-model="classes" placeholder="请选择" @change="banci_select">
  22. <el-option
  23. v-for="item in schedulArr"
  24. :key="item.value"
  25. :label="item.label"
  26. :value="item.value">
  27. </el-option>
  28. </el-select>
  29. </div>
  30. <div class="content_top">病区选择:
  31. <el-select v-model="bingqu" placeholder="请选择" @change="bingqu_select">
  32. <el-option
  33. v-for="item in partitionArr"
  34. :key="item.value"
  35. :label="item.name"
  36. :value="item.id">
  37. </el-option>
  38. </el-select>
  39. </div>
  40. <div class="content_top">隐藏备注:
  41. <el-switch
  42. v-model="hidder"
  43. active-color="#13ce66"
  44. inactive-color="#ff4949"
  45. active-text="ON"
  46. inactive-text="OFF">
  47. </el-switch>
  48. </div>
  49. <!-- <div style="display: inline-block;position: relative;right: -30%;">
  50. <el-button type="primary" @click="quan_ping">全屏</el-button>
  51. </div> -->
  52. </div>
  53. <div class="table_panel" v-for="(item, index) in tableData" :key="index">
  54. <table class="table">
  55. <thead>
  56. <tr>
  57. <td :width="td_1_width">分区</td>
  58. <td :width="td_3_width">病人姓名</td>
  59. </tr>
  60. </thead>
  61. <tbody>
  62. <tr v-for="(ite,index) in item.zones" :key="index">
  63. <td style="text-align: center;">{{ getZoneName(ite.partition_id) }}</td>
  64. <td>
  65. <div v-for="(it,index) in numberlist" style="display: inline-block;position: relative;" >
  66. <div v-if="ite.partition_id==it.zone_id" class="huanzhekuais" :style="{'height':!hidder ? '110px': '30px','line-height':hidder ? '30px':''}" @dblclick="db_click($event,it)" @drop="drop($event,item,it.number)" @dragstart="curInfoDragStart($event,item)" draggable="true" @dragover="allowDrop">
  67. <div class="huanzhekuai">
  68. <div v-for="(item2) in item.list" draggable="true" >
  69. <template >
  70. <div v-if="it.id==item2.bed_id" style="display: inline-block;">
  71. <div>
  72. <span>{{nameSplit(item2.name) }}({{ getmode(item2.mode_id) }})</span><br>
  73. <span v-if="!hidder" >
  74. <span style="font-size: 14px;margin-bottom: 5px;">{{item2.order.DeviceNumber.zone.name}}-{{item2.order.DeviceNumber.number}}</span><br>
  75. <span style="font-size: 14px;margin-bottom: 5px;">{{getBloodAccess(item2.order.blood_access_id)}}</span><br>
  76. <span style="font-size: 13px;;margin-bottom: 5px;">{{item2.order.schedule_remark}}</span>
  77. </span>
  78. </div>
  79. </div>
  80. </template>
  81. </div>
  82. </div>
  83. </div>
  84. <div v-if="ite.partition_id==it.zone_id" style="display: inline-block;width: 125px;text-align: center;">
  85. {{ it.number }}
  86. </div>
  87. </div>
  88. </td>
  89. </tr>
  90. </tbody>
  91. </table>
  92. </div>
  93. <!-- 双击弹窗 -->
  94. <el-dialog
  95. title="提示"
  96. :visible.sync="centerDialogVisible"
  97. width="30%"
  98. center>
  99. <div>
  100. <div style="display: flex;">
  101. <div style="width:150px;margin-right: 10px;">
  102. <div style="margin: 10px 0;">分区
  103. <el-select v-model="fenqu_dialog" placeholder="请选择" @change="dialogfenqu">
  104. <el-option
  105. v-for="item in partitionArr"
  106. :key="item.value"
  107. :label="item.name"
  108. :value="item.id">
  109. </el-option>
  110. </el-select>
  111. </div>
  112. <div>床位
  113. <el-select v-model="chuangwei" placeholder="请选择" @change="dialogchuangwei">
  114. <el-option
  115. v-for="item in subzone"
  116. :key="item.value"
  117. :label="item.number"
  118. :value="item.id">
  119. </el-option>
  120. </el-select>
  121. </div>
  122. </div>
  123. <div style="width:350px">
  124. <div style="display: flex;">
  125. <div>
  126. <div style="margin: 10px 30px 10px 10px;background: rgb(74 211 235 / 51%);height: 110px;width: 125px;text-align: center;">
  127. <span >{{ huanzhe.name}}({{getmode(huanzhe.mode_id)}})</span><br>
  128. <span style="font-size: 14px;margin-bottom: 5px;">
  129. {{ huanzhe.zeng_fenqu }}-{{ huanzhe.zeng_chuang }}
  130. </span><br>
  131. <span style="font-size: 14px;margin-bottom: 5px;">{{getBloodAccess(huanzhe.boolen_id)}}</span><br>
  132. <span style="font-size: 13px;margin-bottom: 5px;">{{huanzhe.schedule_remark}}</span>
  133. </div>
  134. <div style="margin-left: 10px;">{{getZoneName(xian_fenqu.zone_id)}}-{{xian_fenqu.number}}</div>
  135. </div>
  136. <div>
  137. <div style="margin: 10px 30px 10px 10px;background: rgb(74 197 235);height: 110px;width: 125px;text-align: center;">
  138. <span >{{genghuan.name}}</span><span v-if="genghuan.mode_id !=''">({{genghuan.mode_id}})</span><br>
  139. <span style="font-size: 14px;margin-bottom: 5px;">
  140. {{ genghuan.genghuan_fenqu }}-{{ genghuan.genghuan_chuang }}
  141. <!-- A1区-6号床 -->
  142. </span><br>
  143. <span style="font-size: 14px;margin-bottom: 5px;"></span>{{getBloodAccess(genghuan.g_boolen_id)}}<br>
  144. <span style="font-size: 13px;margin-bottom: 5px;">{{genghuan.genghuan_remark}}</span>
  145. </div>
  146. <div style="margin-left: 10px;">{{getZoneName(g_xian_fenqu.zone_id)}}-{{g_xian_fenqu.number}}</div>
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. </div>
  152. <span slot="footer" class="dialog-footer">
  153. <el-button @click="centerDialogVisible = false">取 消</el-button>
  154. <el-button type="primary" @click="verify_dialog">确 定</el-button>
  155. </span>
  156. </el-dialog>
  157. <!-- 排班替换/交换提示弹窗 -->
  158. <el-dialog
  159. title="提示"
  160. :visible.sync="tipDialogVisible"
  161. width="300px"
  162. :modal-append-to-body='false'
  163. :close-on-click-modal="false"
  164. >
  165. <div>
  166. 所选位置已有排班,请选择操作
  167. </div>
  168. <span slot="footer" class="dialog-footer">
  169. <el-button
  170. type="danger"
  171. @click="tipDialogVisibleTwo = true"
  172. >替换</el-button>
  173. <el-button
  174. type="primary"
  175. @click="tipDialogVisibleThree = true"
  176. >交换</el-button>
  177. <el-button @click="tipDialogVisible = false">取 消</el-button>
  178. </span>
  179. </el-dialog>
  180. <!-- 排班替换 -->
  181. <el-dialog
  182. title="提示"
  183. :visible.sync="tipDialogVisibleTwo"
  184. width="300px"
  185. class="replace"
  186. :modal-append-to-body='false'
  187. :close-on-click-modal="false"
  188. >
  189. <div>
  190. 是否将此位置排班替换
  191. </div>
  192. <span slot="footer" class="dialog-footer">
  193. <el-button
  194. type="primary"
  195. @click="coverSch()"
  196. >确定</el-button>
  197. <el-button @click="tipDialogVisibleTwo = false">取 消</el-button>
  198. </span>
  199. </el-dialog>
  200. <!-- 将此位置排班互换 -->
  201. <el-dialog
  202. title="提示"
  203. :visible.sync="tipDialogVisibleThree"
  204. width="300px"
  205. class="exchange"
  206. :modal-append-to-body='false'
  207. :close-on-click-modal="false"
  208. >
  209. <div>
  210. 是否将此位置排班互换
  211. </div>
  212. <span slot="footer" class="dialog-footer">
  213. <el-button
  214. type="primary"
  215. @click="changeSchTwo()"
  216. >确定</el-button>
  217. <el-button @click="tipDialogVisibleThree = false">取 消</el-button>
  218. </span>
  219. </el-dialog>
  220. </div>
  221. </div>
  222. <!-- 全屏 -->
  223. <div id="patient_quan" style="width: 100%;background: #fff;" v-if="quanping==true">
  224. <div class="position">
  225. <bread-crumb :crumbs="crumbs" style="flex:1;"></bread-crumb>
  226. <!-- <div style="display: inline-block;position: relative;right: -30%;"> -->
  227. <el-button type="primary" @click="quan_ping">取消全屏</el-button>
  228. <!-- </div> -->
  229. </div>
  230. <div style="margin: 20px 0;">
  231. <div class="content_top">日期:
  232. <el-date-picker
  233. @change="date_picker"
  234. v-model="date"
  235. type="date"
  236. placeholder="选择日期">
  237. </el-date-picker>
  238. </div>
  239. <div class="content_top">排班班次:
  240. <el-select v-model="classes" placeholder="请选择" @change="banci_select">
  241. <el-option
  242. v-for="item in schedulArr"
  243. :key="item.value"
  244. :label="item.label"
  245. :value="item.value">
  246. </el-option>
  247. </el-select>
  248. </div>
  249. <div class="content_top">病区选择:
  250. <el-select v-model="bingqu" placeholder="请选择" @change="bingqu_select">
  251. <el-option
  252. v-for="item in partitionArr"
  253. :key="item.value"
  254. :label="item.name"
  255. :value="item.id">
  256. </el-option>
  257. </el-select>
  258. </div>
  259. <div class="content_top">隐藏备注:
  260. <el-switch
  261. v-model="hidder"
  262. active-color="#13ce66"
  263. inactive-color="#ff4949"
  264. active-text="ON"
  265. inactive-text="OFF">
  266. </el-switch>
  267. </div>
  268. </div>
  269. <div class="table_panel" v-for="(item, index) in tableData" :key="index">
  270. <table class="table">
  271. <thead>
  272. <tr>
  273. <td :width="td_1_width">分区</td>
  274. <td :width="td_3_width">病人姓名</td>
  275. </tr>
  276. </thead>
  277. <tbody>
  278. <tr v-for="(ite,index) in item.zones" :key="index">
  279. <td style="text-align: center;">{{ getZoneName(ite.partition_id) }}</td>
  280. <td>
  281. <div v-for="(it,index) in numberlist" style="display: inline-block;position: relative;" >
  282. <div v-if="ite.partition_id==it.zone_id" class="huanzhekuais" :style="{'height':!hidder ? '110px': '30px','line-height':hidder ? '30px':''}" @dblclick="db_click($event,it)" @drop="drop($event,item,it.number)" @dragstart="curInfoDragStart($event,item)" draggable="true" @dragover="allowDrop">
  283. <div class="huanzhekuai">
  284. <div v-for="(item2) in item.list" draggable="true" >
  285. <template >
  286. <div v-if="it.id==item2.bed_id" style="display: inline-block;">
  287. <div>
  288. <span>{{nameSplit(item2.name) }}({{ getmode(item2.mode_id) }})</span><br>
  289. <span v-if="!hidder" >
  290. <span style="font-size: 14px;margin-bottom: 5px;">{{item2.order.DeviceNumber.zone.name}}-{{item2.order.DeviceNumber.number}}</span><br>
  291. <span style="font-size: 14px;margin-bottom: 5px;">{{getBloodAccess(item2.order.blood_access_id)}}</span><br>
  292. <span style="font-size: 13px;;margin-bottom: 5px;">{{item2.order.schedule_remark}}</span>
  293. </span>
  294. </div>
  295. </div>
  296. </template>
  297. </div>
  298. </div>
  299. </div>
  300. <div v-if="ite.partition_id==it.zone_id" style="display: inline-block;width: 125px;text-align: center;">
  301. {{ it.number }}
  302. </div>
  303. </div>
  304. </td>
  305. </tr>
  306. </tbody>
  307. </table>
  308. </div>
  309. </div>
  310. </div>
  311. </template>
  312. <script>
  313. import { GetAllZone, getSchedualPrintList } from '@/api/dialysis'
  314. import { parseTime } from '@/utils'
  315. import { uParseTime } from '@/utils/tools'
  316. import { getDataConfig } from '@/utils/data'
  317. import {CreateScheduleTwo} from '@/api/schedule'
  318. import {CoverSch,ExchangeSch,} from "@/api/schedule_template/sch_template";
  319. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  320. import print from 'print-js'
  321. const moment = require('moment')
  322. // import {getAllZones} from "@/api/schedule"
  323. export default {
  324. name: 'SchedulePrint',
  325. data() {
  326. return {
  327. crumbs: [
  328. { path: false, name: '排班管理' },
  329. { path: false, name: '患者调班' }
  330. ],
  331. tipDialogVisible:false,
  332. tipDialogVisibleTwo:false,
  333. tipDialogVisibleThree:false,
  334. hidder: false,
  335. quanping:false,
  336. td_1_width: '8%',
  337. td_3_width: '90%',
  338. date:'',
  339. classes:1,
  340. bingqu:0,
  341. fenqu_dialog:0,
  342. chuangwei:519,
  343. options:[],
  344. centerDialogVisible:false,
  345. cur_drag_info:{
  346. id:'',
  347. name:'',
  348. quhao:'',
  349. chaung:'',
  350. patient_id:'',
  351. },
  352. currentData:{
  353. currentData_id:'',
  354. currentData_name:'',
  355. currentData_quhao:'',
  356. currentData_chaung:'',
  357. patient_id:'',
  358. bed_id:'',
  359. mode_id:'',
  360. partition_id:'',
  361. schedule_date:'',
  362. schedule_type:'',
  363. schedule_week: '',
  364. },
  365. // 交换空白时数据
  366. schedule:{
  367. schedule_date:'',
  368. schedule_type:'',
  369. bed_id:'',
  370. partition_id:'',
  371. schedule_week:'',
  372. mode_id:'',
  373. bed_name:'',
  374. contagions:'',
  375. id:0,
  376. partition_type:'',
  377. patient:'',
  378. patient_id:'',
  379. type_name:'',
  380. zone_name:''
  381. },
  382. schedulArr: [
  383. { value: 1, label: "上午" },
  384. { value: 2, label: "下午" },
  385. { value: 3, label: "晚上" }
  386. ],
  387. zones:[],
  388. schedules: [
  389. {
  390. day: 1,
  391. weekday: '星期一',
  392. all: {
  393. am: {
  394. /* zone_name: [ schedule, ... ] */
  395. },
  396. pm: {
  397. /* zone_name: [ schedule, ... ] */
  398. },
  399. evening: {
  400. /* zone_name: [ schedule, ... ] */
  401. }
  402. },
  403. hdf: [
  404. /* schedule, ... */
  405. ],
  406. hd_hp: [
  407. /* schedule, ... */
  408. ],
  409. new_hdf: {
  410. am: {
  411. /* zone_name: [ schedule, ... ] */
  412. },
  413. pm: {
  414. /* zone_name: [ schedule, ... ] */
  415. },
  416. evening: {
  417. /* zone_name: [ schedule, ... ] */
  418. }
  419. },
  420. new_hd_hp: {
  421. am: {
  422. /* zone_name: [ schedule, ... ] */
  423. },
  424. pm: {
  425. /* zone_name: [ schedule, ... ] */
  426. },
  427. evening: {
  428. /* zone_name: [ schedule, ... ] */
  429. }
  430. }
  431. },
  432. {
  433. day: 2,
  434. weekday: '星期二',
  435. all: {
  436. am: {
  437. /* zone_name: [ schedule, ... ] */
  438. },
  439. pm: {
  440. /* zone_name: [ schedule, ... ] */
  441. },
  442. evening: {
  443. /* zone_name: [ schedule, ... ] */
  444. }
  445. },
  446. hdf: [
  447. /* schedule, ... */
  448. ],
  449. hd_hp: [
  450. /* schedule, ... */
  451. ],
  452. new_hdf: {
  453. am: {
  454. /* zone_name: [ schedule, ... ] */
  455. },
  456. pm: {
  457. /* zone_name: [ schedule, ... ] */
  458. },
  459. evening: {
  460. /* zone_name: [ schedule, ... ] */
  461. }
  462. },
  463. new_hd_hp: {
  464. am: {
  465. /* zone_name: [ schedule, ... ] */
  466. },
  467. pm: {
  468. /* zone_name: [ schedule, ... ] */
  469. },
  470. evening: {
  471. /* zone_name: [ schedule, ... ] */
  472. }
  473. }
  474. },
  475. {
  476. day: 3,
  477. weekday: '星期三',
  478. all: {
  479. am: {
  480. /* zone_name: [ schedule, ... ] */
  481. },
  482. pm: {
  483. /* zone_name: [ schedule, ... ] */
  484. },
  485. evening: {
  486. /* zone_name: [ schedule, ... ] */
  487. }
  488. },
  489. hdf: [
  490. /* schedule, ... */
  491. ],
  492. hd_hp: [
  493. /* schedule, ... */
  494. ],
  495. new_hdf: {
  496. am: {
  497. /* zone_name: [ schedule, ... ] */
  498. },
  499. pm: {
  500. /* zone_name: [ schedule, ... ] */
  501. },
  502. evening: {
  503. /* zone_name: [ schedule, ... ] */
  504. }
  505. },
  506. new_hd_hp: {
  507. am: {
  508. /* zone_name: [ schedule, ... ] */
  509. },
  510. pm: {
  511. /* zone_name: [ schedule, ... ] */
  512. },
  513. evening: {
  514. /* zone_name: [ schedule, ... ] */
  515. }
  516. }
  517. },
  518. {
  519. day: 4,
  520. weekday: '星期四',
  521. all: {
  522. am: {
  523. /* zone_name: [ schedule, ... ] */
  524. },
  525. pm: {
  526. /* zone_name: [ schedule, ... ] */
  527. },
  528. evening: {
  529. /* zone_name: [ schedule, ... ] */
  530. }
  531. },
  532. hdf: [
  533. /* schedule, ... */
  534. ],
  535. hd_hp: [
  536. /* schedule, ... */
  537. ],
  538. new_hdf: {
  539. am: {
  540. /* zone_name: [ schedule, ... ] */
  541. },
  542. pm: {
  543. /* zone_name: [ schedule, ... ] */
  544. },
  545. evening: {
  546. /* zone_name: [ schedule, ... ] */
  547. }
  548. },
  549. new_hd_hp: {
  550. am: {
  551. /* zone_name: [ schedule, ... ] */
  552. },
  553. pm: {
  554. /* zone_name: [ schedule, ... ] */
  555. },
  556. evening: {
  557. /* zone_name: [ schedule, ... ] */
  558. }
  559. }
  560. },
  561. {
  562. day: 5,
  563. weekday: '星期五',
  564. all: {
  565. am: {
  566. /* zone_name: [ schedule, ... ] */
  567. },
  568. pm: {
  569. /* zone_name: [ schedule, ... ] */
  570. },
  571. evening: {
  572. /* zone_name: [ schedule, ... ] */
  573. }
  574. },
  575. hdf: [
  576. /* schedule, ... */
  577. ],
  578. hd_hp: [
  579. /* schedule, ... */
  580. ],
  581. new_hdf: {
  582. am: {
  583. /* zone_name: [ schedule, ... ] */
  584. },
  585. pm: {
  586. /* zone_name: [ schedule, ... ] */
  587. },
  588. evening: {
  589. /* zone_name: [ schedule, ... ] */
  590. }
  591. },
  592. new_hd_hp: {
  593. am: {
  594. /* zone_name: [ schedule, ... ] */
  595. },
  596. pm: {
  597. /* zone_name: [ schedule, ... ] */
  598. },
  599. evening: {
  600. /* zone_name: [ schedule, ... ] */
  601. }
  602. }
  603. },
  604. {
  605. day: 6,
  606. weekday: '星期六',
  607. all: {
  608. am: {
  609. /* zone_name: [ schedule, ... ] */
  610. },
  611. pm: {
  612. /* zone_name: [ schedule, ... ] */
  613. },
  614. evening: {
  615. /* zone_name: [ schedule, ... ] */
  616. }
  617. },
  618. hdf: [
  619. /* schedule, ... */
  620. ],
  621. hd_hp: [
  622. /* schedule, ... */
  623. ],
  624. new_hdf: {
  625. am: {
  626. /* zone_name: [ schedule, ... ] */
  627. },
  628. pm: {
  629. /* zone_name: [ schedule, ... ] */
  630. },
  631. evening: {
  632. /* zone_name: [ schedule, ... ] */
  633. }
  634. },
  635. new_hd_hp: {
  636. am: {
  637. /* zone_name: [ schedule, ... ] */
  638. },
  639. pm: {
  640. /* zone_name: [ schedule, ... ] */
  641. },
  642. evening: {
  643. /* zone_name: [ schedule, ... ] */
  644. }
  645. }
  646. },
  647. {
  648. day: 7,
  649. weekday: '星期日',
  650. all: {
  651. am: {
  652. /* zone_name: [ schedule, ... ] */
  653. },
  654. pm: {
  655. /* zone_name: [ schedule, ... ] */
  656. },
  657. evening: {
  658. /* zone_name: [ schedule, ... ] */
  659. }
  660. },
  661. hdf: [
  662. /* schedule, ... */
  663. ],
  664. hd_hp: [
  665. /* schedule, ... */
  666. ],
  667. new_hdf: {
  668. am: {
  669. /* zone_name: [ schedule, ... ] */
  670. },
  671. pm: {
  672. /* zone_name: [ schedule, ... ] */
  673. },
  674. evening: {
  675. /* zone_name: [ schedule, ... ] */
  676. }
  677. },
  678. new_hd_hp: {
  679. am: {
  680. /* zone_name: [ schedule, ... ] */
  681. },
  682. pm: {
  683. /* zone_name: [ schedule, ... ] */
  684. },
  685. evening: {
  686. /* zone_name: [ schedule, ... ] */
  687. }
  688. }
  689. }
  690. ],
  691. total: [],
  692. list: [],
  693. loading: false,
  694. tableData: [],
  695. numberlist: [],
  696. partitionArr: [],
  697. listname:[],
  698. mode:[{id:1,name:'HD'},{id:2,name:'HDF'},{id:3,name:'HD+HP'},{id:4,name:'HP'},{id:5,name:'HF'},{id:6,name:'SCUF'},{id:7,name:'IUF'},{id:8,name:'HFHD'},
  699. {id:9,name:'HFHD+HP'},{id:10,name:'PHF'},{id:11,name:'HFR'},{id:12,name:'HDF+HP'},{id:13,name:'CRRT'},{id:14,name:'腹水回输'},{id:15,name:'IUF+HD'},{id:16,name:'UF'},
  700. {id:17,name:'HD+'},{id:18,name:'血浆胆红素吸附+HDF'},{id:19,name:'血浆胆红素吸附'},{id:20,name:'I-HDF'},{id:21,name:'HD高通'},{id:22,name:'CVVH'},{id:23,name:'CVVHD'},
  701. {id:24,name:'CVVHDF'},{id:25,name:'PE'},{id:26,name:'血浆胆红素吸附+HP'},{id:27,name:'HPD'},{id:28,name:'HDP'}],
  702. subzone:[],
  703. huanzhe:{
  704. id:null,
  705. name:'',
  706. mode_id:'',
  707. zeng_fenqu:'',
  708. zeng_chuang:'',
  709. boolen_id:'',
  710. schedule_remark:'',
  711. patient_id:'',
  712. partition_id:'',
  713. schedule_week: '',
  714. },
  715. xian_fenqu:'',
  716. g_xian_fenqu:'',
  717. genghuan:{
  718. id:null,
  719. name:'',
  720. mode_id:'',
  721. genghuan_fenqu:'',
  722. genghuan_chuang:'',
  723. g_boolen_id:'',
  724. genghuan_remark:'',
  725. patient_id:'',
  726. },
  727. }
  728. },
  729. components: {
  730. BreadCrumb
  731. },
  732. created() {
  733. this.date= moment(new Date()).format("YYYY-MM-DD");
  734. console.log('dsafas',this.date);
  735. this.getAllZones()
  736. this.getlist()
  737. },
  738. mounted(){
  739. // console.log('8888',this.huanzhe.order.DeviceNumber.zone.name);
  740. },
  741. methods:{
  742. quan_ping(){
  743. if(this.quanping==false){
  744. // console.log('ttttt');
  745. return this.quanping=true
  746. }else{
  747. // console.log('fffff');
  748. return this.quanping=false
  749. }
  750. },
  751. drop(e,val,value){
  752. this.allowDrop(e)
  753. var bedid = ''
  754. var bedname=''
  755. var zonename=''
  756. var zoneid=''
  757. console.log('kkkkk',e.target.innerText);
  758. const inntext= e.target.innerText.split('(')[0]
  759. console.log('vvvv',inntext,val.list[0].new_name);
  760. for(let i=0;i<val.list.length;i++){
  761. if(inntext == val.list[i].new_name){
  762. console.log('6666',val,value);
  763. console.log('7777',this.numberlist);
  764. this.tipDialogVisible=true
  765. this.currentData={
  766. currentData_id:val.list[i].id,
  767. currentData_name:val.list[i].name,
  768. currentData_quhao:val.list[i].order.DeviceNumber.zone.name,
  769. currentData_chaung:val.list[i].order.DeviceNumber.number,
  770. patient_id:val.list[i].patient_id
  771. }
  772. }
  773. }
  774. for(let x=0;x<this.numberlist.length;x++){
  775. if(value==this.numberlist[x].number){
  776. bedid = this.numberlist[x].id
  777. bedname=this.numberlist[x].number
  778. zoneid =this.numberlist[x].zone_id
  779. }
  780. }
  781. for(let y=0;y<this.partitionArr.length;y++){
  782. if(zoneid == this.partitionArr[y].id){
  783. zonename = this.partitionArr[y].name
  784. }
  785. }
  786. if(e.target.innerText == ''){
  787. console.log('3333',e.target.innerText);
  788. this.schedule={
  789. schedule_date:this.date,
  790. schedule_type:this.classes,
  791. bed_id:bedid,
  792. partition_id:zoneid,
  793. schedule_week:this.cur_drag_info.schedule_week,
  794. mode_id:this.cur_drag_info.mode_id,
  795. bed_name:bedname,
  796. contagions:'',
  797. id:0,
  798. partition_type:'',
  799. patient:this.cur_drag_info.name,
  800. patient_id:this.cur_drag_info.patient_id,
  801. type_name:'',
  802. zone_name:zonename
  803. }
  804. this.currentData={
  805. currentData_id:0,
  806. currentData_name:this.cur_drag_info.name,
  807. currentData_quhao:this.cur_drag_info.quhao,
  808. currentData_chaung:this.cur_drag_info.chaung,
  809. patient_id:this.cur_drag_info.patient_id,
  810. }
  811. console.log('8888',this.currentData.currentData_id);
  812. this.setScheduleTwo(this.cur_drag_info.id)
  813. // var params={
  814. // patient_id:this.currentData.patient_id,
  815. // id_two:this.currentData.currentData_id
  816. // }
  817. // CreateScheduleTwo(this.currentData.patient_id,this.currentData.currentData_id).then((response)=>{
  818. // if (response.data.state == 0) {
  819. // this.$message.error(response.data.msg);
  820. // } else {
  821. // var schedule = response.data.data.schedule;
  822. // this.getlist()
  823. // }
  824. // })
  825. // this.CreateScheduleTwo(this.currentData.patient_id,this.currentData,this.currentData.currentData_id)
  826. }
  827. // for(let i=0;i<this.numberlist.length;i++){
  828. // for(let j=0;j<val.list.length;j++){
  829. // if(this.numberlist[i].id==val.list[y].bed_id){
  830. // }
  831. // }
  832. // }
  833. // this.currentData={
  834. // currentData_id:val.id,
  835. // currentData_name:val.name,
  836. // currentData_quhao:val.order.DeviceNumber.zone.name,
  837. // currentData_chaung:val.order.DeviceNumber.number,
  838. // },
  839. // this.currentData={
  840. // currentData_id:this.cur_drag_info.id,
  841. // currentData_name:this.cur_drag_info.name,
  842. // currentData_quhao:this.cur_drag_info.quhao,
  843. // currentData_chaung:this.cur_drag_info.chaung,
  844. // },
  845. },
  846. allowDrop(e) {
  847. e.preventDefault();
  848. },
  849. // 替换
  850. coverSch(){
  851. this.tipDialogVisible=false
  852. let params={
  853. id_one:this.cur_drag_info.id,
  854. id_two:this.currentData.currentData_id
  855. }
  856. CoverSch(params).then((response) => {
  857. if (response.data.state == 0) {
  858. this.$message.error(response.data.msg);
  859. this.tipDialogVisibleTwo = false
  860. } else {
  861. console.log('888888888888',response.data);
  862. this.$message.success("替换成功");
  863. this.tipDialogVisible = false
  864. this.tipDialogVisibleTwo = false
  865. this.getlist();
  866. }
  867. });
  868. },
  869. // 交换
  870. changeSchTwo(){
  871. this.tipDialogVisible=false
  872. let params={
  873. id_one:this.cur_drag_info.id,
  874. id_two:this.currentData.currentData_id
  875. }
  876. ExchangeSch(params).then((response) => {
  877. if (response.data.state == 0) {
  878. this.$message.error(response.data.msg);
  879. this.tipDialogVisibleThree = false
  880. } else {
  881. console.log('22222222',response.data);
  882. this.$message.success("交换成功");
  883. this.tipDialogVisible = false
  884. this.tipDialogVisibleThree = false
  885. this.getlist();
  886. }
  887. });
  888. },
  889. // 交换空白
  890. setScheduleTwo(id_two){
  891. this.CreateScheduleTwo(this.currentData.patient_id, this.schedule,id_two);
  892. },
  893. // 双击弹窗交换空白
  894. setSchedulethree(id_two){
  895. this.CreateScheduleTwo(this.huanzhe.patient_id, this.schedule,id_two);
  896. },
  897. async CreateScheduleTwo(id, data,id_two) {
  898. let response =await CreateScheduleTwo(id, data,id_two)
  899. if (response.data.state == 0) {
  900. this.$message.error(response.data.msg);
  901. } else {
  902. var schedule = response.data.data.schedule;
  903. this.getlist()
  904. }
  905. },
  906. // 需要拖动的
  907. curInfoDragStart(e,val){
  908. const inntext2= e.target.innerText.split('(')[0]
  909. for(let i=0;i<val.list.length;i++){
  910. if(inntext2 == val.list[i].new_name){
  911. this.cur_drag_info={
  912. id:val.list[i].id,
  913. name:val.list[i].name,
  914. quhao:val.list[i].order.DeviceNumber.zone.name,
  915. chaung:val.list[i].order.DeviceNumber.number,
  916. patient_id:val.list[i].patient_id,
  917. bed_id:val.list[i].bed_id,
  918. mode_id:val.list[i].mode_id,
  919. partition_id:val.list[i].partition_id,
  920. schedule_date:this.date,
  921. schedule_type:this.classes,
  922. schedule_week: val.list[i].schedule_week,
  923. }
  924. }
  925. }
  926. console.log('bbbb',e.target.innerText);
  927. console.log('4444',val);
  928. console.log('5555',this.cur_drag_info);
  929. },
  930. // 选中日期
  931. date_picker(e){
  932. var time=moment(e).format("YYYY-MM-DD");
  933. console.log('sfddas',time);
  934. this.date=time
  935. this.getlist()
  936. },
  937. // 选择班次
  938. banci_select(e){
  939. console.log(e);
  940. for(let i=0;i<this.schedulArr.length;i++){
  941. if(e==this.schedulArr[i].value){
  942. this.classes = e
  943. }
  944. this.getlist()
  945. }
  946. },
  947. // 选择分区
  948. bingqu_select(e){
  949. console.log('1234546',e);
  950. for (let i = 0; i < this.partitionArr.length; i++) {
  951. if(e==this.partitionArr[i].id){
  952. this.bingqu=e
  953. }
  954. }
  955. this.getlist()
  956. },
  957. // 分区
  958. getAllZones() {
  959. GetAllZone().then(response => {
  960. if (response.data.state == 0) {
  961. this.$message.error(response.data.msg);
  962. return false;
  963. } else {
  964. this.partitionArr = response.data.data.zone;
  965. this.partitionArr.unshift({ id: 0, name: "全部" });
  966. console.log('asfasdfsadfa',response.data.data);
  967. }
  968. });
  969. },
  970. getlist() {
  971. var params = {
  972. schedule_date: this.date,
  973. schedule_type: this.classes,
  974. partition_type: this.bingqu,
  975. keywords: '',
  976. page: 1,
  977. limit: 5000
  978. }
  979. this.loading = true
  980. this.tableData = []
  981. console.log('111111111',params);
  982. getSchedualPrintList(params).then((response) => {
  983. if (response.data.state == 1) {
  984. this.loading = false
  985. console.log('111111',response.data.data);
  986. var list = response.data.data.list
  987. this.list = list
  988. var listOne = response.data.data.listOne
  989. this.zones =listOne
  990. var numberlist=response.data.data.numberList
  991. this.numberlist= numberlist
  992. this.subzone = numberlist
  993. for(let i=0;i<list.length;i++){
  994. const new_name = 'new_name'
  995. list[i][new_name]=this.nameSplit(list[i].name)
  996. }
  997. console.log('9999',list);
  998. if (list != null && list.length > 0) {
  999. const dataInfo = {}
  1000. list.forEach((item, index) => {
  1001. const { schedule_type } = item
  1002. if (!dataInfo[schedule_type]) {
  1003. dataInfo[schedule_type] = {
  1004. schedule_type: item.schedule_type,
  1005. schedule_date: item.schedule_date,
  1006. zones: [],
  1007. list:[],
  1008. }
  1009. }
  1010. })
  1011. const arr = Object.values(dataInfo)
  1012. // console.log('arr222', arr)
  1013. if (arr != null && arr.length > 0) {
  1014. for (let i = 0; i < arr.length; i++) {
  1015. for (let j = 0; j < listOne.length; j++) {
  1016. if (arr[i].schedule_type == listOne[j].schedule_type) {
  1017. arr[i].zones.push(listOne[j])
  1018. }
  1019. }
  1020. for(let x=0;x<list.length;x++){
  1021. arr[i].list.push(list[x])
  1022. }
  1023. }
  1024. }
  1025. // console.log('排班数据------------------', arr)
  1026. this.tableData = arr
  1027. console.log('22222222',this.tableData);
  1028. }
  1029. this.numberList = response.data.data.numberList
  1030. // console.log('list2332233232wo', list)
  1031. // console.log('numberList', this.numberList)
  1032. }
  1033. })
  1034. },
  1035. getTimeOne(val) {
  1036. if (val == '') {
  1037. return ''
  1038. } else {
  1039. return uParseTime(val, '{y}-{m}-{d}')
  1040. }
  1041. },
  1042. // getPatientName(schedule_type, partition_id) {
  1043. // var str = ''
  1044. // var arr = []
  1045. // if (this.list != null && this.list.length > 0) {
  1046. // for (let i = 0; i < this.list.length; i++) {
  1047. // if (this.list[i].schedule_type == schedule_type && this.list[i].partition_id == partition_id) {
  1048. // arr.push(this.list[i])
  1049. // }
  1050. // }
  1051. // }
  1052. // if (arr.length > 0) {
  1053. // for (let i = 0; i < arr.length; i++) {
  1054. // arr[i].name = this.nameSplit(arr[i].name)
  1055. // console.log('666666',arr[i].name);
  1056. // if (this.hiddenFlag) {
  1057. // str+= arr[i].name + '&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp '
  1058. // } else {
  1059. // str+=arr[i].name
  1060. // }
  1061. // }
  1062. // }
  1063. // // console.log(str, 'strstrstr')
  1064. // return str
  1065. // },
  1066. // 透析模式
  1067. getmode(id){
  1068. for(let i=0;i<this.mode.length;i++){
  1069. if(id=this.mode[i].id){
  1070. return this.mode[i].name
  1071. }
  1072. }
  1073. },
  1074. // 切割患者姓名
  1075. nameSplit(val) {
  1076. var reg = /[\u4e00-\u9fa5]/g
  1077. let name = val
  1078. name = name.substr(-4)
  1079. var names = name.match(reg)
  1080. name = names.join('')
  1081. if (name.includes('区')) {
  1082. name = name.replace('区', '')
  1083. }
  1084. if (name.includes('号')) {
  1085. name = name.replace('号', '')
  1086. }
  1087. return name
  1088. },
  1089. // 分区
  1090. getZoneName(id) {
  1091. var name = ''
  1092. for (let i = 0; i < this.partitionArr.length; i++) {
  1093. if (id == this.partitionArr[i].id) {
  1094. name = this.partitionArr[i].name
  1095. }
  1096. }
  1097. return name
  1098. },
  1099. // 血管通路
  1100. getBloodAccess(id) {
  1101. var name = ''
  1102. var list = getDataConfig(
  1103. 'hemodialysis',
  1104. 'vascular_access_desc'
  1105. )
  1106. for (let i = 0; i < list.length; i++) {
  1107. if (id == list[i].id) {
  1108. name = list[i].name
  1109. }
  1110. }
  1111. return name
  1112. },
  1113. // 双击打开弹窗
  1114. db_click(e,val){
  1115. if(e.target.innerText !=''){
  1116. this.centerDialogVisible=true
  1117. this.xian_fenqu=val
  1118. console.log('qqqqq',this.chuangwei,'val',val);
  1119. for(let i=0;i<this.list.length;i++){
  1120. // 双击弹窗的右侧第一个数据
  1121. if(val.id==this.list[i].bed_id){
  1122. console.log('zzzzz',this.list[i]);
  1123. this.huanzhe.id=this.list[i].id
  1124. this.huanzhe.name=this.list[i].name
  1125. this.huanzhe.mode_id=this.list[i].mode_id
  1126. this.huanzhe.zeng_fenqu=this.list[i].order.DeviceNumber.zone.name
  1127. this.huanzhe.zeng_chuang = this.list[i].order.DeviceNumber.number
  1128. this.huanzhe.boolen_id = this.list[i].order.blood_access_id
  1129. this.huanzhe.schedule_remark = this.list[i].order.schedule_remark
  1130. this.huanzhe.patient_id = this.list[i].patient_id
  1131. this.huanzhe.partition_id = this.list[i].partition_id
  1132. this.huanzhe.schedule_week= this.list[i].schedule_week
  1133. // return this.huanzhe
  1134. // console.log('55555',this.huanzhe);
  1135. }
  1136. // 双击弹窗的右侧第二个默认数据
  1137. if(this.chuangwei==this.list[i].bed_id){
  1138. console.log('xxxxx',this.chuangwei);
  1139. this.genghuan.id = this.list[i].id
  1140. this.genghuan.name=this.list[i].name
  1141. this.genghuan.mode_id=this.list[i].mode_id
  1142. this.genghuan.genghuan_fenqu=this.list[i].order.DeviceNumber.zone.name
  1143. this.genghuan.genghuan_chuang = this.list[i].order.DeviceNumber.number
  1144. this.genghuan.g_boolen_id = this.list[i].order.blood_access_id
  1145. this.genghuan.genghuan_remark = this.list[i].order.schedule_remark
  1146. this.genghuan.patient_id = this.list[i].patient_id
  1147. // console.log('99999',this.genghuan);
  1148. // console.log('000000',this.list[i].bed_id);
  1149. // return this.genghuan
  1150. }
  1151. // // 第二的床位
  1152. // for(let y=0;y<this.numberlist.length;y++){
  1153. // if(this.chuangwei==this.numberlist[y].id){
  1154. // this.g_xian_fenqu=this.numberlist[y]
  1155. // }
  1156. }
  1157. // 第二的床位
  1158. for(let y=0;y<this.numberlist.length;y++){
  1159. if(this.chuangwei==this.numberlist[y].id){
  1160. this.g_xian_fenqu=this.numberlist[y]
  1161. }
  1162. }
  1163. return this.genghuan
  1164. }else{
  1165. this.centerDialogVisible=false
  1166. }
  1167. // console.log('双击弹窗',this.zeng_fenqu);
  1168. // console.log('双击弹窗33',e);
  1169. // console.log('双击弹窗333',value);
  1170. },
  1171. // 双击弹窗分区
  1172. dialogfenqu(e){
  1173. for (let i = 0; i < this.partitionArr.length; i++) {
  1174. if(e==this.partitionArr[i].id){
  1175. this.fenqu_dialog=e
  1176. }
  1177. }
  1178. var params = {
  1179. schedule_date: this.date,
  1180. schedule_type: this.classes,
  1181. partition_type: this.fenqu_dialog,
  1182. keywords: '',
  1183. page: 1,
  1184. limit: 5000
  1185. }
  1186. getSchedualPrintList(params).then((response)=>{
  1187. if (response.data.state == 1) {
  1188. var list = response.data.data.list
  1189. this.list = list
  1190. var listOne = response.data.data.listOne
  1191. this.zones =listOne
  1192. var numberlist=response.data.data.numberList
  1193. console.log('00000',this.list);
  1194. this.subzone=[]
  1195. for(let i=0;i<numberlist.length;i++){
  1196. if(this.fenqu_dialog==0){
  1197. this.subzone = numberlist
  1198. this.chuangwei = numberlist[0].id//默认被交换的床位
  1199. this.g_xian_fenqu = numberlist[0]//被交换的分区床位对象
  1200. }
  1201. if(this.fenqu_dialog==numberlist[i].zone_id){
  1202. const obj={id:null,number:'',zone_id:null}
  1203. obj.id=numberlist[i].id
  1204. obj.number=numberlist[i].number
  1205. obj.zone_id=numberlist[i].zone_id
  1206. this.subzone.push(obj)
  1207. this.chuangwei = this.subzone[0].id
  1208. this.g_xian_fenqu=this.subzone[0]
  1209. }
  1210. }
  1211. console.log('22222',this.g_xian_fenqu);
  1212. // 默认的患者
  1213. for(let i=0;i<this.list.length;i++){
  1214. if(this.chuangwei==this.list[i].bed_id){
  1215. this.genghuan.name=this.list[i].name
  1216. this.genghuan.mode_id=this.list[i].mode_id
  1217. this.genghuan.genghuan_fenqu=this.list[i].order.DeviceNumber.zone.name
  1218. this.genghuan.genghuan_chuang = this.list[i].order.DeviceNumber.number
  1219. this.genghuan.g_boolen_id =this.list[i].order.blood_access_id
  1220. this.genghuan.genghuan_remark = this.list[i].order.schedule_remark
  1221. console.log('99999',this.genghuan);
  1222. console.log('000000',this.list[i].bed_id);
  1223. return this.genghuan
  1224. }else{
  1225. console.log('eeeeee');
  1226. this.genghuan.name=''
  1227. this.genghuan.mode_id=''
  1228. this.genghuan.genghuan_fenqu=''
  1229. this.genghuan.genghuan_chuang = ''
  1230. this.genghuan.g_boolen_id = ''
  1231. this.genghuan.genghuan_remark =''
  1232. // return this.genghuan
  1233. // console.log('qqqqqq',this.list[i].bed_id);
  1234. }
  1235. }
  1236. // this.numberlist= numberlist
  1237. }
  1238. })
  1239. // console.log('77777',this.chuangwei);
  1240. // for(let i=0;i<list.length;i++){
  1241. // if(this.chuangwei==list[i].bed_id){
  1242. // this.genghuan.name=list[i].name
  1243. // this.genghuan.mode_id=list[i].mode_id
  1244. // this.genghuan.genghuan_fenqu=list[i].order.DeviceNumber.zone.name
  1245. // this.genghuan.genghuan_chuang = list[i].order.DeviceNumber.number
  1246. // this.genghuan.g_boolen_id =list[i].order.blood_access_id
  1247. // this.genghuan.genghuan_remark = list[i].order.schedule_remark
  1248. // console.log('99999',this.genghuan);
  1249. // console.log('000000',list[i].bed_id);
  1250. // return this.genghuan
  1251. // }else{
  1252. // console.log('eeeeee');
  1253. // this.genghuan.name=''
  1254. // this.genghuan.mode_id=''
  1255. // this.genghuan.genghuan_fenqu=''
  1256. // this.genghuan.genghuan_chuang = ''
  1257. // this.genghuan.g_boolen_id = ''
  1258. // this.genghuan.genghuan_remark =''
  1259. // // return this.genghuan
  1260. // // console.log('qqqqqq',this.list[i].bed_id);
  1261. // }
  1262. // }
  1263. },
  1264. // 双击弹窗床位
  1265. dialogchuangwei(e){
  1266. console.log('333333',e);
  1267. for (let i = 0; i < this.subzone.length; i++) {
  1268. if(e==this.subzone[i].id){
  1269. this.chuangwei=e
  1270. }
  1271. }
  1272. for(let i=0;i<this.list.length;i++){
  1273. if(this.chuangwei==this.list[i].bed_id){
  1274. this.genghuan.id = this.list[i].id
  1275. this.genghuan.name=this.list[i].name
  1276. this.genghuan.mode_id=this.list[i].mode_id
  1277. this.genghuan.genghuan_fenqu=this.list[i].order.DeviceNumber.zone.name
  1278. this.genghuan.genghuan_chuang = this.list[i].order.DeviceNumber.number
  1279. this.genghuan.g_boolen_id = this.list[i].order.blood_access_id
  1280. this.genghuan.genghuan_remark = this.list[i].order.schedule_remark
  1281. for(let y=0;y<this.subzone.length;y++){
  1282. if(this.chuangwei==this.subzone[y].id){
  1283. this.g_xian_fenqu=this.subzone[y]
  1284. console.log('cccc',this.g_xian_fenqu);
  1285. }
  1286. }
  1287. console.log('99999',this.genghuan);
  1288. console.log('000000',this.list[i].bed_id);
  1289. return this.genghuan
  1290. }
  1291. if(this.chuangwei!=this.list[i].bed_id){
  1292. console.log('eeeeee');
  1293. this.genghuan.id = null
  1294. this.genghuan.name=''
  1295. this.genghuan.mode_id=''
  1296. this.genghuan.genghuan_fenqu=''
  1297. this.genghuan.genghuan_chuang = ''
  1298. this.genghuan.g_boolen_id = ''
  1299. this.genghuan.genghuan_remark =''
  1300. // return this.genghuan
  1301. // console.log('qqqqqq',this.list[i].bed_id);
  1302. }
  1303. }
  1304. // 更换的床位置
  1305. for(let y=0;y<this.subzone.length;y++){
  1306. if(this.chuangwei==this.subzone[y].id){
  1307. this.g_xian_fenqu=this.subzone[y]
  1308. console.log('cccc',this.g_xian_fenqu);
  1309. }
  1310. }
  1311. },
  1312. // 双击弹窗确定
  1313. verify_dialog(){
  1314. this.centerDialogVisible=false
  1315. console.log('mmmmm',this.genghuan.id);
  1316. if(this.genghuan.id != ''){
  1317. for(let i=0;i<this.list.length;i++){
  1318. if(this.chuangwei==this.list[i].bed_id){
  1319. console.log('hhhhh',this.chuangwei);
  1320. let params={
  1321. id_one:this.huanzhe.id,
  1322. id_two:this.genghuan.id
  1323. }
  1324. ExchangeSch(params).then((response) => {
  1325. if (response.data.state == 0) {
  1326. this.$message.error(response.data.msg);
  1327. this.tipDialogVisibleThree = false
  1328. } else {
  1329. console.log('22222222',response.data);
  1330. this.$message.success("交换成功");
  1331. this.tipDialogVisible = false
  1332. this.tipDialogVisibleThree = false
  1333. this.getlist();
  1334. }
  1335. });
  1336. return this.genghuan
  1337. }
  1338. // // else{
  1339. // // var zonename=''
  1340. // // var bedname=''
  1341. // // var zoneid=''
  1342. // // console.log('6666',this.chuangwei);
  1343. // // for(let y=0;y<this.subzone.length;y++){
  1344. // // if(this.chuangwei == this.subzone[y].id){
  1345. // // bedname=this.subzone[y].number
  1346. // // zoneid=this.subzone[y].zone_id
  1347. // // console.log('aaaa',this.chuangwei,this.subzone[y].id,this.subzone[y].number);
  1348. // // this.schedule={
  1349. // // schedule_date:this.date,
  1350. // // schedule_type:this.classes,
  1351. // // bed_id:this.chuangwei,
  1352. // // partition_id:zoneid,
  1353. // // schedule_week:this.huanzhe.schedule_week,
  1354. // // mode_id:this.huanzhe.mode_id,
  1355. // // bed_name:bedname,
  1356. // // contagions:'',
  1357. // // id:0,
  1358. // // partition_type:'',
  1359. // // patient:this.huanzhe.name,
  1360. // // patient_id:this.huanzhe.patient_id,
  1361. // // type_name:'',
  1362. // // zone_name:zonename
  1363. // // }
  1364. // // this.setSchedulethree(this.huanzhe.id)
  1365. // // return ''
  1366. // // }
  1367. // // }
  1368. // // }
  1369. }
  1370. }
  1371. // else if(this.genghuan.id == 'null'){
  1372. var zonename=''
  1373. var bedname=''
  1374. var zoneid=''
  1375. console.log('6666',this.chuangwei);
  1376. for(let y=0;y<this.subzone.length;y++){
  1377. if(this.chuangwei == this.subzone[y].id){
  1378. bedname=this.subzone[y].number
  1379. zoneid=this.subzone[y].zone_id
  1380. console.log('aaaa',this.chuangwei,this.subzone[y].id,this.subzone[y].number);
  1381. this.schedule={
  1382. schedule_date:this.date,
  1383. schedule_type:this.classes,
  1384. bed_id:this.chuangwei,
  1385. partition_id:zoneid,
  1386. schedule_week:this.huanzhe.schedule_week,
  1387. mode_id:this.huanzhe.mode_id,
  1388. bed_name:bedname,
  1389. contagions:'',
  1390. id:0,
  1391. partition_type:'',
  1392. patient:this.huanzhe.name,
  1393. patient_id:this.huanzhe.patient_id,
  1394. type_name:'',
  1395. zone_name:zonename
  1396. }
  1397. this.setSchedulethree(this.huanzhe.id)
  1398. return ''
  1399. }
  1400. }
  1401. // }
  1402. }
  1403. }
  1404. }
  1405. </script>
  1406. <style rel="stylesheet/scss" lang="scss" scoped>
  1407. #print_content {
  1408. background-color: white;
  1409. padding: 0 0 20px 0;
  1410. .content_top{
  1411. display: inline-block;
  1412. }
  1413. .order_title_panl {
  1414. text-align: center;
  1415. .main_title {
  1416. font-size: 18px;
  1417. line-height: 40px;
  1418. font-weight: 500;
  1419. }
  1420. }
  1421. .table_panel {
  1422. .table {
  1423. width: 100%;
  1424. border: 1px solid;
  1425. border-collapse: collapse;
  1426. padding: 2px;
  1427. thead {
  1428. tr {
  1429. td {
  1430. border: 1px solid;
  1431. text-align: center;
  1432. font-size: 20px;
  1433. padding: 15px 5px;
  1434. }
  1435. }
  1436. }
  1437. tbody {
  1438. tr {
  1439. td {
  1440. border: 1px solid;
  1441. // text-align: center;
  1442. font-size: 18px;
  1443. padding: 5px 5px;
  1444. .huanzhekuai{
  1445. width: 125px;
  1446. display: inline-block;
  1447. text-align: center;
  1448. // margin:0 10px;
  1449. }
  1450. .huanzhekuais{
  1451. width: 125px;
  1452. // display: inline-block;
  1453. text-align: center;
  1454. margin:0 10px;
  1455. // line-height: 110px;
  1456. background: #30b8e394;
  1457. }
  1458. }
  1459. }
  1460. }
  1461. }
  1462. }
  1463. }
  1464. </style>
  1465. <style lang="scss" scoped>
  1466. #patient_quan{
  1467. position: fixed;
  1468. top: 0;
  1469. right: 0;
  1470. bottom: 0;
  1471. left: 0;
  1472. overflow: auto;
  1473. margin: 0;
  1474. background: #fff;
  1475. padding: 20px;
  1476. height: 100%;
  1477. z-index: 2000;
  1478. .content_top{
  1479. display: inline-block;
  1480. }
  1481. .table_panel {
  1482. .table {
  1483. width: 100%;
  1484. border: 1px solid;
  1485. border-collapse: collapse;
  1486. padding: 2px;
  1487. thead {
  1488. tr {
  1489. td {
  1490. border: 1px solid;
  1491. text-align: center;
  1492. font-size: 20px;
  1493. padding: 15px 5px;
  1494. }
  1495. }
  1496. }
  1497. tbody {
  1498. tr {
  1499. td {
  1500. border: 1px solid;
  1501. // text-align: center;
  1502. font-size: 18px;
  1503. padding: 5px 5px;
  1504. .huanzhekuai{
  1505. width: 125px;
  1506. display: inline-block;
  1507. text-align: center;
  1508. // margin:0 10px;
  1509. }
  1510. .huanzhekuais{
  1511. width: 125px;
  1512. // display: inline-block;
  1513. text-align: center;
  1514. margin:0 10px;
  1515. // line-height: 110px;
  1516. background: #30b8e394;
  1517. }
  1518. }
  1519. }
  1520. }
  1521. }
  1522. }
  1523. }
  1524. </style>