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

tableData.vue 105KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475
  1. <template>
  2. <div id="table_data">
  3. <div class="cell clearfix" v-if="weekTime == 'thisWeek' || weekTime == 'nextWeek' || weekTime == 'nextTwoWeek' ">
  4. <div class="select_list">
  5. <span>日期:</span>
  6. <el-select
  7. v-model="week_type"
  8. placeholder="请选择"
  9. multiple
  10. @change="changeWeekDay"
  11. >
  12. <el-option
  13. v-for="(item,index) in weeks"
  14. :key="index"
  15. :label="item"
  16. :value="item"
  17. >
  18. </el-option>
  19. </el-select>
  20. <span>分区:</span>
  21. <el-select
  22. v-model="partition_id"
  23. multiple
  24. placeholder="请选择"
  25. @change="changePartiton"
  26. >
  27. <el-option
  28. v-for="item in this.zones"
  29. :key="item.id"
  30. :label="item.name"
  31. :value="item.id"
  32. >
  33. </el-option>
  34. </el-select>
  35. </div>
  36. <el-input
  37. size="small"
  38. style="width: 200px;margin-left: 20px"
  39. class="filter-item"
  40. v-model.trim="keywords"
  41. placeholder="病人名称/透析号"
  42. @keyup.enter.native='search'
  43. />
  44. <el-button
  45. size="small"
  46. class="filter-item"
  47. type="primary"
  48. icon="el-icon-search"
  49. @click="search"
  50. >搜索</el-button>
  51. <div class="switch">
  52. <el-switch
  53. v-model="value1"
  54. :active-value=true
  55. active-text="显示灌流器"
  56. @change="switchThis(value1)">
  57. </el-switch>
  58. </div>
  59. <div class="switch">
  60. <el-switch
  61. v-model="modename_value"
  62. :active-value=true
  63. active-text="显示透析模式"
  64. @change="switchMode(modename_value)">
  65. </el-switch>
  66. </div>
  67. </div>
  68. <!-- <el-dialog :visible.sync="searchTableVisible" width="80%" class="eldialog">
  69. <div style="position: relative;">
  70. <el-table
  71. :data="schedulePatients"
  72. :header-cell-style="{
  73. backgroundColor: 'rgb(245, 247, 250)',
  74. color: '#606266'
  75. }"
  76. :row-style="{ color: '#303133' }"
  77. style="width: 100%"
  78. border
  79. >
  80. <el-table-column label="姓名" width="120">
  81. <template slot-scope="scope">
  82. {{ scope.row.patient }}
  83. </template>
  84. </el-table-column>
  85. <el-table-column label="透析日期" width="200">
  86. <template slot-scope="scope">
  87. {{ getDialysisDate(scope.row) }}
  88. </template>
  89. </el-table-column>
  90. <el-table-column label="分区">
  91. <template slot-scope="scope">
  92. {{ scope.row.zone.name }}
  93. </template>
  94. </el-table-column>
  95. <el-table-column label="班次" width="80">
  96. <template slot-scope="scope">
  97. {{ getSchedulesType(scope.row.schedule_type,scope.row) }}
  98. </template>
  99. </el-table-column>
  100. <el-table-column label="机号" width="80">
  101. <template slot-scope="scope">
  102. {{ scope.row.number.number }}
  103. </template>
  104. </el-table-column>
  105. <el-table-column label="透析模式" width="100">
  106. <template slot-scope="scope">
  107. {{ scope.row.mode.name }}
  108. </template>
  109. </el-table-column>
  110. <el-table-column label="操作" align="center" width="300">
  111. <template slot-scope="scope">
  112. <span v-if="now_time <=scope.row.schedule_date">
  113. <el-button
  114. size="mini"
  115. type="primary"
  116. @click="CancelSchedule(scope.row.id)"
  117. >
  118. 取消排班
  119. </el-button>
  120. <el-button
  121. size="mini"
  122. type="primary"
  123. @click="changeMachineNumber(scope.$index, scope.row)"
  124. >
  125. 调整机号
  126. </el-button>
  127. <el-button
  128. size="mini"
  129. type="primary"
  130. @click="changeMode(scope.$index, scope.row)"
  131. >
  132. 调整模式
  133. </el-button>
  134. </span>
  135. </template>
  136. </el-table-column>
  137. </el-table>
  138. </div>
  139. </el-dialog> -->
  140. <el-dialog
  141. title="提示"
  142. :visible.sync="searchTableVisible"
  143. width="80%"
  144. class="eldialog">
  145. <div style="position: relative;">
  146. <el-table
  147. :data="schedulePatients"
  148. :header-cell-style="{
  149. backgroundColor: 'rgb(245, 247, 250)',
  150. color: '#606266'
  151. }"
  152. :row-style="{ color: '#303133' }"
  153. style="width: 100%"
  154. border
  155. >
  156. <el-table-column label="姓名" width="120">
  157. <template slot-scope="scope">
  158. {{ scope.row.patient }}
  159. </template>
  160. </el-table-column>
  161. <el-table-column label="透析日期" width="200">
  162. <template slot-scope="scope">
  163. {{ getDialysisDate(scope.row) }}
  164. </template>
  165. </el-table-column>
  166. <el-table-column label="分区">
  167. <template slot-scope="scope">
  168. {{ scope.row.zone.name }}
  169. </template>
  170. </el-table-column>
  171. <el-table-column label="班次" width="80">
  172. <template slot-scope="scope">
  173. {{ getSchedulesType(scope.row.schedule_type,scope.row) }}
  174. </template>
  175. </el-table-column>
  176. <el-table-column label="机号" width="80">
  177. <template slot-scope="scope">
  178. {{ scope.row.number.number }}
  179. </template>
  180. </el-table-column>
  181. <el-table-column label="透析模式" width="100">
  182. <template slot-scope="scope">
  183. {{ scope.row.mode.name }}
  184. </template>
  185. </el-table-column>
  186. <el-table-column label="操作" align="center" width="300">
  187. <template slot-scope="scope">
  188. <span v-if="now_time <=scope.row.schedule_date">
  189. <el-button
  190. size="mini"
  191. type="primary"
  192. @click="CancelSchedule(scope.row.id)"
  193. >
  194. 取消排班
  195. </el-button>
  196. <el-button
  197. size="mini"
  198. type="primary"
  199. @click="changeMachineNumber(scope.$index, scope.row)"
  200. >
  201. 调整机号
  202. </el-button>
  203. <el-button
  204. size="mini"
  205. type="primary"
  206. @click="changeMode(scope.$index, scope.row)"
  207. >
  208. 调整模式
  209. </el-button>
  210. </span>
  211. </template>
  212. </el-table-column>
  213. </el-table>
  214. </div>
  215. </el-dialog>
  216. <div class="center-tab">
  217. <el-table
  218. :row-style="{ color: '#303133' }"
  219. :header-cell-style="{
  220. backgroundColor: 'rgb(245, 247, 250)',
  221. color: '#606266',
  222. border: '1px solid aqua',
  223. }"
  224. :fit="true"
  225. :data="scheduleZone"
  226. :span-method="objectSpanMethod"
  227. @cell-click="clickThis"
  228. @cell-mouse-enter="hoverMouse"
  229. :summary-method="getSummaries"
  230. show-summary
  231. :cell-class-name="cellClass"
  232. :cell-style ='cellstyle'
  233. sum-text="总数"
  234. :height="tableContainHeight"
  235. ref="table"
  236. style="table-layout: fixed;"
  237. >
  238. <!-- -->
  239. <el-table-column
  240. prop="area"
  241. label="分区"
  242. width="50"
  243. align="center"
  244. fixed
  245. style="border-bottom: 1px solid aqua;"
  246. >
  247. </el-table-column>
  248. <el-table-column
  249. prop="cut"
  250. label="机号"
  251. align="center"
  252. min-width="40"
  253. fixed
  254. style="border-bottom: 1px solid aqua;"
  255. ></el-table-column>
  256. <el-table-column
  257. :label="' 周一(' + weekTitle[0] + ')'"
  258. v-if="isShowOne"
  259. align="center"
  260. >
  261. <!-- :width="flexColumnWidth('Mon_M',scheduleZone)" -->
  262. <el-table-column prop="Mon_M" label="上" min-width="40" align="center" v-if="isShowShangWu" >
  263. <schedule-item
  264. slot-scope="scope"
  265. :schedule-detail="scope.row.Mon_M"
  266. :config="config"
  267. :schedulFlag="value1"
  268. :schedulMode="modename_value"
  269. ></schedule-item>
  270. </el-table-column>
  271. <el-table-column prop="Mon_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  272. <schedule-item
  273. slot-scope="scope"
  274. :schedule-detail="scope.row.Mon_A"
  275. :config="config"
  276. :schedulFlag="value1"
  277. :schedulMode="modename_value"
  278. ></schedule-item>
  279. </el-table-column>
  280. <el-table-column prop="Mon_N" label="晚" min-width="40" align="center" v-if="isShowWanShang" >
  281. <schedule-item
  282. slot-scope="scope"
  283. :schedule-detail="scope.row.Mon_N"
  284. :config="config"
  285. :schedulFlag="value1"
  286. :schedulMode="modename_value"
  287. ></schedule-item>
  288. </el-table-column>
  289. </el-table-column>
  290. <el-table-column
  291. :label="'周二 (' + weekTitle[1] + ')'"
  292. min-width="120"
  293. v-if="isShowTwo"
  294. align="center"
  295. :fit="true"
  296. >
  297. <el-table-column prop="Tue_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  298. <schedule-item
  299. slot-scope="scope"
  300. :schedule-detail="scope.row.Tue_M"
  301. :config="config"
  302. :schedulFlag="value1"
  303. :schedulMode="modename_value"
  304. ></schedule-item>
  305. </el-table-column>
  306. <el-table-column prop="Tue_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  307. <schedule-item
  308. slot-scope="scope"
  309. :schedule-detail="scope.row.Tue_A"
  310. :config="config"
  311. :schedulFlag="value1"
  312. :schedulMode="modename_value"
  313. ></schedule-item>
  314. </el-table-column>
  315. <el-table-column prop="Tue_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  316. <schedule-item
  317. slot-scope="scope"
  318. :schedule-detail="scope.row.Tue_N"
  319. :config="config"
  320. :schedulFlag="value1"
  321. :schedulMode="modename_value"
  322. ></schedule-item>
  323. </el-table-column>
  324. </el-table-column>
  325. <el-table-column
  326. :label="'周三 (' + weekTitle[2] + ')'"
  327. v-if="isShowThree"
  328. align="center"
  329. >
  330. <el-table-column prop="Wed_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  331. <schedule-item
  332. slot-scope="scope"
  333. :schedule-detail="scope.row.Wed_M"
  334. :config="config"
  335. :schedulFlag="value1"
  336. :schedulMode="modename_value"
  337. ></schedule-item>
  338. </el-table-column>
  339. <el-table-column prop="Wed_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  340. <schedule-item
  341. slot-scope="scope"
  342. :schedule-detail="scope.row.Wed_A"
  343. :config="config"
  344. :schedulFlag="value1"
  345. :schedulMode="modename_value"
  346. ></schedule-item>
  347. </el-table-column>
  348. <el-table-column prop="Wed_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  349. <schedule-item
  350. slot-scope="scope"
  351. :config="config"
  352. :schedulFlag="value1"
  353. :schedule-detail="scope.row.Wed_N"
  354. :schedulMode="modename_value"
  355. ></schedule-item>
  356. </el-table-column>
  357. </el-table-column>
  358. <el-table-column
  359. :label="'周四 (' + weekTitle[3] + ')'"
  360. align="center"
  361. v-if="isShowFour"
  362. >
  363. <el-table-column prop="Thurs_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  364. <schedule-item
  365. slot-scope="scope"
  366. :config="config"
  367. :schedule-detail="scope.row.Thurs_M"
  368. :schedulFlag="value1"
  369. :schedulMode="modename_value"
  370. ></schedule-item>
  371. </el-table-column>
  372. <el-table-column prop="Thurs_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  373. <schedule-item
  374. slot-scope="scope"
  375. :schedule-detail="scope.row.Thurs_A"
  376. :config="config"
  377. :schedulFlag="value1"
  378. :schedulMode="modename_value"
  379. ></schedule-item>
  380. </el-table-column>
  381. <el-table-column prop="Thurs_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  382. <schedule-item
  383. slot-scope="scope"
  384. :schedule-detail="scope.row.Thurs_N"
  385. :config="config"
  386. :schedulFlag="value1"
  387. :schedulMode="modename_value"
  388. ></schedule-item>
  389. </el-table-column>
  390. </el-table-column>
  391. <el-table-column
  392. :label="'周五 (' + weekTitle[4] + ')'"
  393. align="center"
  394. v-if="isShowFive"
  395. >
  396. <el-table-column prop="Fri_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  397. <schedule-item
  398. slot-scope="scope"
  399. :schedule-detail="scope.row.Fri_M"
  400. :config="config"
  401. :schedulFlag="value1"
  402. :schedulMode="modename_value"
  403. ></schedule-item>
  404. </el-table-column>
  405. <el-table-column prop="Fri_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  406. <schedule-item
  407. slot-scope="scope"
  408. :schedule-detail="scope.row.Fri_A"
  409. :config="config"
  410. :schedulFlag="value1"
  411. :schedulMode="modename_value"
  412. ></schedule-item>
  413. </el-table-column>
  414. <el-table-column prop="Fri_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  415. <schedule-item
  416. slot-scope="scope"
  417. :schedule-detail="scope.row.Fri_N"
  418. :config="config"
  419. :schedulFlag="value1"
  420. :schedulMode="modename_value"
  421. ></schedule-item>
  422. </el-table-column>
  423. </el-table-column>
  424. <el-table-column
  425. :label="'周六 (' + weekTitle[5] + ')'"
  426. align="center"
  427. v-if="isShowSix"
  428. >
  429. <el-table-column prop="Sat_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  430. <schedule-item
  431. slot-scope="scope"
  432. :schedule-detail="scope.row.Sat_M"
  433. :config="config"
  434. :schedulFlag="value1"
  435. :schedulMode="modename_value"
  436. ></schedule-item>
  437. </el-table-column>
  438. <el-table-column prop="Sat_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  439. <schedule-item
  440. slot-scope="scope"
  441. :schedule-detail="scope.row.Sat_A"
  442. :config="config"
  443. :schedulFlag="value1"
  444. :schedulMode="modename_value"
  445. ></schedule-item>
  446. </el-table-column>
  447. <el-table-column prop="Sat_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  448. <schedule-item
  449. slot-scope="scope"
  450. :schedule-detail="scope.row.Sat_N"
  451. :config="config"
  452. :schedulFlag="value1"
  453. :schedulMode="modename_value"
  454. ></schedule-item>
  455. </el-table-column>
  456. </el-table-column>
  457. <el-table-column
  458. :label="'周日 (' + weekTitle[6] + ')'"
  459. align="center"
  460. v-if="isShowSeven"
  461. >
  462. <el-table-column prop="Sun_M" label="上" min-width="40" align="center" v-if="isShowShangWu">
  463. <schedule-item
  464. slot-scope="scope"
  465. :schedule-detail="scope.row.Sun_M"
  466. :config="config"
  467. :schedulFlag="value1"
  468. :schedulMode="modename_value"
  469. ></schedule-item>
  470. </el-table-column>
  471. <el-table-column prop="Sun_A" label="下" min-width="40" align="center" v-if="isShowXiaWu">
  472. <schedule-item
  473. slot-scope="scope"
  474. :schedule-detail="scope.row.Sun_A"
  475. :config="config"
  476. :schedulFlag="value1"
  477. :schedulMode="modename_value"
  478. ></schedule-item>
  479. </el-table-column>
  480. <el-table-column prop="Sun_N" label="晚" min-width="40" align="center" v-if="isShowWanShang">
  481. <schedule-item
  482. slot-scope="scope"
  483. :schedule-detail="scope.row.Sun_N"
  484. :config="config"
  485. :schedulFlag="value1"
  486. :schedulMode="modename_value"
  487. >
  488. <!-- -->
  489. </schedule-item>
  490. </el-table-column>
  491. </el-table-column>
  492. </el-table>
  493. </div>
  494. <!-- 调整模式 -->
  495. <el-dialog
  496. title="调整模式"
  497. :visible.sync="msDialogVisible"
  498. width="500px"
  499. v-loading="changing_mode"
  500. :modal-append-to-body='false'
  501. :close-on-click-modal="false"
  502. >
  503. <div>
  504. <el-form
  505. :model="changeSchedule"
  506. ref="changeSchedule"
  507. :rules="changeRules"
  508. >
  509. <el-form-item label="" prop="mode_id">
  510. <el-select
  511. v-model="changeSchedule.mode_id"
  512. placeholder="请选择"
  513. style="width: 100%"
  514. >
  515. <el-option
  516. :disabled="item.id == currentData.mode_id"
  517. v-for="item in modeOptions"
  518. :key="item.id"
  519. :label="item.name"
  520. :value="item.id"
  521. >
  522. </el-option>
  523. </el-select>
  524. </el-form-item>
  525. </el-form>
  526. </div>
  527. <span slot="footer" class="dialog-footer">
  528. <el-button @click="msDialogVisible = false">取 消</el-button>
  529. <el-button
  530. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  531. type="primary"
  532. @click="submitMode('changeSchedule')"
  533. >保 存</el-button
  534. >
  535. </span>
  536. </el-dialog>
  537. <!--调整机号 -->
  538. <el-dialog
  539. title="调整机号"
  540. :visible.sync="jhDialogVisible"
  541. width="500px"
  542. v-loading="changing_bed"
  543. :modal-append-to-body='false'
  544. :close-on-click-modal="false"
  545. >
  546. <div>
  547. <el-form
  548. :model="changeSchedule"
  549. ref="changeSchedule"
  550. :rules="changeRules"
  551. label-width="90px"
  552. >
  553. <el-form-item label="排班日期: ">
  554. <el-input v-model="currentData.schedule_date" disabled></el-input>
  555. </el-form-item>
  556. <el-form-item label="班次: " prop="schedule_type">
  557. <el-select
  558. v-model="changeSchedule.schedule_type"
  559. placeholder="请选择"
  560. style="width: 100%"
  561. @change="changeScheduleType"
  562. >
  563. <el-option
  564. v-for="item in scheduleType"
  565. :key="item.id"
  566. :label="item.name"
  567. :value="item.id"
  568. >
  569. </el-option>
  570. </el-select>
  571. </el-form-item>
  572. <el-form-item label="分区: " prop="partition_id">
  573. <el-select
  574. v-model="changeSchedule.partition_id"
  575. placeholder="请选择"
  576. style="width: 100%"
  577. @change="changePartition"
  578. >
  579. <el-option
  580. v-for="(item, index) in zones"
  581. :key="index"
  582. :label="item.name"
  583. :value="item.id"
  584. >
  585. </el-option>
  586. </el-select>
  587. </el-form-item>
  588. <el-form-item label="透析机: " prop="bed_id">
  589. <el-select
  590. v-model="changeSchedule.bed_id"
  591. placeholder="请选择"
  592. style="width: 100%"
  593. >
  594. <!-- @change="changeScheduledialyzer" -->
  595. <el-option
  596. v-for="item in current_devices"
  597. :key="item.id"
  598. :label="item.number"
  599. :value="item.id"
  600. >
  601. </el-option>
  602. </el-select>
  603. </el-form-item>
  604. </el-form>
  605. </div>
  606. <span slot="footer" class="dialog-footer">
  607. <el-button @click="jhDialogVisible = false">取 消</el-button>
  608. <el-button
  609. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  610. type="primary"
  611. @click="submitTiaoZJH('changeSchedule')"
  612. >保 存</el-button>
  613. <!-- -->
  614. </span>
  615. </el-dialog>
  616. <!-- <el-dialog
  617. title="排班"
  618. :visible.sync="dialogTableVisible"
  619. width="1000px;"
  620. :v-model="dialog"
  621. v-loading="creating_schedule"
  622. >
  623. <div>
  624. <div class="cell clearfix">
  625. <label class="title"><span class="name">当前排班</span> : </label>
  626. <div class="time ">
  627. <ul class="">
  628. <span class="current"
  629. >日期 : {{ currentData.schedule_date }} &nbsp;&nbsp; 班次 :
  630. {{ currentData.type_name }} &nbsp;&nbsp; 病房 :
  631. {{ currentData.zone_name }} &nbsp;&nbsp; 透析机 :
  632. {{ currentData.bed_name }}
  633. </span>
  634. </ul>
  635. </div>
  636. </div>
  637. <div class="cell clearfix">
  638. <label class="title"><span class="name">患者搜索</span> : </label>
  639. <div class="time ">
  640. <ul class="">
  641. <el-input
  642. size="medium"
  643. v-model="searchKey"
  644. placeholder="请输入搜索的内容"
  645. style="width:260px"
  646. @keyup.enter.native='SubmitSearch'
  647. ></el-input>
  648. <el-button
  649. type="primary"
  650. icon="el-icon-search"
  651. @click="SubmitSearch"
  652. >搜索</el-button
  653. >
  654. </ul>
  655. </div>
  656. </div>
  657. <div class="cell clearfix">
  658. <label class="title"><span class="name">排班</span> : </label>
  659. <div class="time ">
  660. <ul class="">
  661. <li
  662. v-for="item in schedulArr"
  663. @click="changeSearchSchedule(item.value)"
  664. :key="item.value"
  665. :class="patientQuery.schedule == item.value ? 'active' : ''"
  666. >
  667. {{ item.label }}
  668. </li>
  669. </ul>
  670. </div>
  671. </div>-->
  672. <!-- <div class="cell clearfix">
  673. <label class="title"><span class="name">标签</span> : </label>
  674. <div class="time ">
  675. <ul class="">
  676. <li v-for="item in tagArr" :key="item.value" >{{item.label}}</li>
  677. </ul>
  678. </div>
  679. </div> -->
  680. </div>
  681. </template>
  682. <script>
  683. import { uParseTime } from "@/utils/tools";
  684. import print from 'print-js'
  685. const moment = require('moment')
  686. import {
  687. CancelSchedule,
  688. ChangeSchedule,
  689. CreateSchedule,
  690. getSchedulePatients,
  691. getSchedulesOne,
  692. getSearchResult,
  693. getUrgentScheduleInitData,
  694. getWeekPanelsOne,
  695. getAllZones,
  696. } from "@/api/schedule";
  697. import {
  698. getSmartDevices
  699. } from "@/api/schedule_template/sch_template";
  700. import ScheduleItem from "./ScheduleItem";
  701. const weekOptions = ['周一','周二','周三','周四','周五','周六','周日'];
  702. let rowNumber = 0;
  703. export default {
  704. name: "tableData",
  705. props: {
  706. is_edit:{
  707. type: Boolean,
  708. default: false,
  709. },
  710. weekTime: {
  711. type: String,
  712. default: "thisWeek"
  713. },
  714. // 机号数
  715. scheduleZoneRowProp: {
  716. type: Array,
  717. dafault: []
  718. },
  719. // scheduleZoneProp: {
  720. // type: Array,
  721. // dafault: []
  722. // },
  723. // 分区
  724. partitionsProp: {
  725. type: Object,
  726. dafault: {}
  727. },
  728. config: {
  729. type: Object,
  730. dafault: {}
  731. },
  732. },
  733. data() {
  734. return {
  735. tableContainHeight:null,
  736. value1:false,
  737. modename_value:true,
  738. weeks:weekOptions,
  739. searchKey: "",
  740. tiaoZhengType: 1,
  741. modeOptions: null,
  742. keywords: "",
  743. schedulePatients: [],
  744. searchTableVisible: false,
  745. // dialog: {
  746. // tag: ""
  747. // },
  748. patients: [],
  749. toDay: "",
  750. schedulArr: [
  751. { value: 0, label: "不限" },
  752. { value: 2, label: "未排班" },
  753. { value: 1, label: "已排班" }
  754. ],
  755. tagArr: [
  756. { value: 1, label: "不限" },
  757. { value: 2, label: "透析记录" },
  758. { value: 3, label: "传染病" }
  759. ],
  760. diseasesArr: [{ value: 0, label: "不限" }],
  761. scheduleType: [
  762. { id: 1, name: "上午" },
  763. { id: 2, name: "下午" },
  764. { id: 3, name: "晚上" }
  765. ],
  766. // dialogTableVisible: false,
  767. tzDialogVisible: false,
  768. msDialogVisible: false,
  769. jhDialogVisible: false,
  770. // scheduleZone: this.scheduleZoneProp,
  771. scheduleZoneRow: -1,
  772. partitions: [],
  773. subzone:[],
  774. jihaos: [],
  775. weekTitle: ["", "", "", "", "", "", ""],
  776. weekList: ["", "", "", "", "", "", ""],
  777. weekDays: ["", "", "", "", "", "", ""],
  778. currentData: {
  779. id: 0,
  780. schedule_date: "",
  781. schedule_type: 0,
  782. bed_id: 0,
  783. partition_id: 0,
  784. patient_id: 0,
  785. schedule_week: 0,
  786. mode_id: 0,
  787. type_name: "",
  788. bed_name: "",
  789. partition_type: 0,
  790. contagions: [],
  791. patient: ""
  792. },
  793. changeSchedule: {
  794. mode_id: "",
  795. schedule_type: "",
  796. partition_id: "",
  797. bed_id: "",
  798. schedule_week: "",
  799. partition_type: ""
  800. },
  801. patientQuery: {
  802. keywords: "",
  803. schedule: 0,
  804. contagion: 0
  805. },
  806. tiaozhengclass: "tiaozhengclass",
  807. // 调整机号表单验证
  808. changeRules: {
  809. mode_id: [{ required: true, message: "请选择模式", trigger: "blur" }],
  810. schedule_type: [
  811. { required: true, message: "请选择班次", trigger: "blur" }
  812. ],
  813. partition_id: [
  814. { required: true, message: "请选择分区", trigger: "blur" }
  815. ],
  816. bed_id: [{ required: true, message: "请选择透析机", trigger: "blur" }]
  817. },
  818. weekday: 0,
  819. creating_schedule: false,
  820. changing_mode: false,
  821. changing_bed: false,
  822. tableHeight: document.documentElement.clientHeight,
  823. origin_schedules: [],
  824. origin_device_numbers: [],
  825. zone_device_map: {},
  826. device_id: 0,
  827. zone_name: "",
  828. current_devices: [],
  829. zone_names: [],
  830. zone_device_options: [],
  831. options:[
  832. {id:1,name:"上午"},
  833. {id:2,name:"下午"},
  834. {id:3,name:"晚上"},
  835. ],
  836. partition_id:0,
  837. schedule_type:[],
  838. week_type:[],
  839. zones:[],
  840. theType:"",
  841. scheduleZone:[],
  842. source_scheduleZone:[],
  843. theWeek: {
  844. historyWeek:0,
  845. lastWeek: 0,
  846. thisWeek: 0,
  847. nextWeek: 0,
  848. nextTwoWeek: 0
  849. },
  850. zoneIdList:[],
  851. strArr:"",
  852. patient_id_hover:0,
  853. now_time:"",
  854. isShowOne:true,
  855. isShowTwo:true,
  856. isShowThree:true,
  857. isShowFour:true,
  858. isShowFive:true,
  859. isShowSix:true,
  860. isShowSeven:true,
  861. isShowShangWu:true,
  862. isShowXiaWu:true,
  863. isShowWanShang:true,
  864. schedulesGroup:[]
  865. };
  866. },
  867. watch: {
  868. schedule_type:function (){
  869. this.isShowShangWu = false
  870. this.isShowXiaWu = false
  871. this.isShowWanShang = false
  872. if(this.schedule_type.length > 0) {
  873. for (let i = 0; i < this.schedule_type.length; i++) {
  874. if (this.schedule_type[i] == 1) {
  875. this.isShowShangWu = true
  876. } else if (this.schedule_type[i] == 2) {
  877. this.isShowXiaWu = true
  878. } else if (this.schedule_type[i] == 3) {
  879. this.isShowWanShang = true
  880. }
  881. }
  882. }else{
  883. this.isShowShangWu = true
  884. this.isShowXiaWu = true
  885. this.isShowWanShang = true
  886. }
  887. },
  888. week_type:function () {
  889. // console.log(this.week_type)
  890. // console.log(this.schedule_type)
  891. // console.log(this.scheduleZone)
  892. this.isShowOne = false
  893. this.isShowTwo = false
  894. this.isShowThree = false
  895. this.isShowFour = false
  896. this.isShowFive = false
  897. this.isShowSix = false
  898. this.isShowSeven = false
  899. if(this.week_type.length > 0) {
  900. for (let i = 0; i < this.week_type.length; i++) {
  901. if (this.week_type[i] == "周一") {
  902. this.isShowOne = true
  903. } else if (this.week_type[i] == "周二") {
  904. this.isShowTwo = true
  905. } else if (this.week_type[i] == "周三") {
  906. this.isShowThree = true
  907. } else if (this.week_type[i] == "周四") {
  908. this.isShowFour = true
  909. } else if (this.week_type[i] == "周五") {
  910. this.isShowFive = true
  911. } else if (this.week_type[i] == "周六") {
  912. this.isShowSix = true
  913. } else if (this.week_type[i] == "周日") {
  914. this.isShowSeven = true
  915. }
  916. }
  917. }else{
  918. this.isShowOne = true
  919. this.isShowTwo = true
  920. this.isShowThree = true
  921. this.isShowFour = true
  922. this.isShowFive = true
  923. this.isShowSix = true
  924. this.isShowSeven = true
  925. }
  926. },
  927. weekTime: function() {
  928. //
  929. if(this.weekTime != 'historyWeek'){
  930. console.log('12343455',this.weekTime);
  931. var theType = this.weekType(this.weekTime);
  932. this.theType = theType
  933. this.getSchedules();
  934. }
  935. },
  936. scheduleZoneRow: function() {
  937. var theType = this.weekType(this.weekTime);
  938. this.theType = theType
  939. this.getSchedules();
  940. },
  941. tableHeight(val) {
  942. if (!this.timer) {
  943. this.tableHeight = val;
  944. this.timer = true;
  945. const that = this;
  946. setTimeout(function() {
  947. that.timer = false;
  948. }, 400);
  949. }
  950. }
  951. },
  952. created() {
  953. // sessionStorage.setItem('value1',!this.value1);
  954. sessionStorage.removeItem('value1')
  955. var date = new Date()
  956. this.time = date
  957. var year = date.getFullYear()
  958. var month = date.getMonth() + 1
  959. if (month < 10) {
  960. month = "0" + month
  961. }
  962. var day = date.getDate()
  963. if (day < 10) {
  964. day = "0" + day
  965. }
  966. var nowDate = year + "-" + month + "-" + day
  967. var date = new Date(nowDate + " 00:00:00")
  968. this.now_time = date.getTime()/1000
  969. this.getAllZones()
  970. this.changeScheduleType(1)
  971. rowNumber = 0;
  972. this.modeOptions = this.$store.getters.treatment_mode;
  973. this.partitions = this.partitionsProp;
  974. var contagions = this.$store.getters.contagions;
  975. if (contagions.length > 0) {
  976. var that = this;
  977. contagions.forEach(function(citem) {
  978. if (citem.type == 2) {
  979. that.diseasesArr.push({ value: citem.id, label: citem.name });
  980. }
  981. });
  982. }
  983. this.scheduleZoneRow = this.scheduleZoneRowProp;
  984. this.weekday = new Date().getDay();
  985. if (this.weekday == 0) {
  986. this.weekday = 7;
  987. }
  988. },
  989. methods: {
  990. switchThis(flag){
  991. if(this.value1==false){
  992. sessionStorage.removeItem('value1')
  993. }else{
  994. sessionStorage.setItem('value1',this.value1)
  995. }
  996. console.log('this.value1',this.value1);
  997. console.log('flag',flag);
  998. },
  999. switchMode(flag){
  1000. console.log(flag);
  1001. },
  1002. getData(){
  1003. return this.scheduleZone
  1004. },
  1005. compare(p){ //这是比较函数
  1006. return function(m,n){
  1007. var a = m[p];
  1008. var b = n[p];
  1009. return a - b; //升序
  1010. }
  1011. },
  1012. // 表格所有数据
  1013. getWeekPanels() {
  1014. console.log("触发232332323232")
  1015. this.scheduleZone=[]
  1016. var partionStr = this.partition_id
  1017. var arr = this.zoneIdList.join(',')
  1018. var str = ""
  1019. if(partionStr == 0){
  1020. str = arr
  1021. }
  1022. if(partionStr != 0){
  1023. str = partionStr.join(',')
  1024. }
  1025. getWeekPanelsOne(1,str).then(response => {
  1026. if (response.data.state == 0) {
  1027. return false
  1028. }
  1029. // console.log("触发232332323232",response.data.data)
  1030. var partitions = response.data.data.partitions
  1031. this.subzone = response.data.data.partitions
  1032. // this.subzone.push(response.data.data.partitions)
  1033. console.log("partitions",partitions)
  1034. this.theWeek.thisWeek = response.data.data.theWeek
  1035. // this.theWeek.historyWeek=this.theWeek.thisWeek - 2
  1036. this.theWeek.lastWeek = this.theWeek.thisWeek - 1
  1037. this.theWeek.nextWeek = this.theWeek.thisWeek + 1
  1038. this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
  1039. var that = this
  1040. if (partitions.length > 0) {
  1041. partitions.forEach(function(partition) {
  1042. if (partition.jihaos.length == 0) {
  1043. return false
  1044. }
  1045. that.scheduleZoneRow.push(partition.jihaos.length)
  1046. that.partitions[partition.id] = partition
  1047. partition.jihaos.forEach(function(jihao) {
  1048. var thisPa = {
  1049. area: partition.name,
  1050. zone_id: partition.id,
  1051. zone_type: partition.type,
  1052. cut: jihao.number,
  1053. jihao_id: jihao.id,
  1054. sort:jihao.sort,
  1055. Mon_M: {
  1056. schedule_id: 0,
  1057. mode_id: 0,
  1058. mode_name: '',
  1059. patient_id: 0,
  1060. patient: '',
  1061. dialysis_machine_name:'',
  1062. schedule_date:"",
  1063. Count:0,
  1064. },
  1065. Mon_A: {
  1066. schedule_id: 0,
  1067. mode_id: 0,
  1068. mode_name: '',
  1069. patient_id: 0,
  1070. patient: '',
  1071. dialysis_machine_name:'',
  1072. schedule_date:"",
  1073. Count:0,
  1074. },
  1075. Mon_N: {
  1076. schedule_id: 0,
  1077. mode_id: 0,
  1078. mode_name: '',
  1079. patient_id: 0,
  1080. patient: '',
  1081. dialysis_machine_name:'',
  1082. schedule_date:"",
  1083. Count:0,
  1084. },
  1085. Tue_M: {
  1086. schedule_id: 0,
  1087. mode_id: 0,
  1088. mode_name: '',
  1089. patient_id: 0,
  1090. patient: '',
  1091. dialysis_machine_name:'',
  1092. schedule_date:"",
  1093. Count:0,
  1094. },
  1095. Tue_A: {
  1096. schedule_id: 0,
  1097. mode_id: 0,
  1098. mode_name: '',
  1099. patient_id: 0,
  1100. patient: '',
  1101. dialysis_machine_name:'',
  1102. schedule_date:"",
  1103. Count:0,
  1104. },
  1105. Tue_N: {
  1106. schedule_id: 0,
  1107. mode_id: 0,
  1108. mode_name: '',
  1109. patient_id: 0,
  1110. patient: '',
  1111. dialysis_machine_name:'',
  1112. schedule_date:"",
  1113. Count:0,
  1114. },
  1115. Wed_M: {
  1116. schedule_id: 0,
  1117. mode_id: 0,
  1118. mode_name: '',
  1119. patient_id: 0,
  1120. patient: '',
  1121. dialysis_machine_name:'',
  1122. schedule_date:"",
  1123. Count:0,
  1124. },
  1125. Wed_A: {
  1126. schedule_id: 0,
  1127. mode_id: 0,
  1128. mode_name: '',
  1129. patient_id: 0,
  1130. patient: '',
  1131. dialysis_machine_name:'',
  1132. schedule_date:"",
  1133. Count:0,
  1134. },
  1135. Wed_N: {
  1136. schedule_id: 0,
  1137. mode_id: 0,
  1138. mode_name: '',
  1139. patient_id: 0,
  1140. patient: '',
  1141. dialysis_machine_name:'',
  1142. schedule_date:"",
  1143. Count:0,
  1144. },
  1145. Thurs_M: {
  1146. schedule_id: 0,
  1147. mode_id: 0,
  1148. mode_name: '',
  1149. patient_id: 0,
  1150. patient: '',
  1151. dialysis_machine_name:'',
  1152. schedule_date:"",
  1153. Count:0,
  1154. },
  1155. Thurs_A: {
  1156. schedule_id: 0,
  1157. mode_id: 0,
  1158. mode_name: '',
  1159. patient_id: 0,
  1160. patient: '',
  1161. dialysis_machine_name:'',
  1162. schedule_date:"",
  1163. Count:0,
  1164. },
  1165. Thurs_N: {
  1166. schedule_id: 0,
  1167. mode_id: 0,
  1168. mode_name: '',
  1169. patient_id: 0,
  1170. patient: '',
  1171. dialysis_machine_name:'',
  1172. schedule_date:"",
  1173. Count:0,
  1174. },
  1175. Fri_M: {
  1176. schedule_id: 0,
  1177. mode_id: 0,
  1178. mode_name: '',
  1179. patient_id: 0,
  1180. patient: '',
  1181. dialysis_machine_name:'',
  1182. schedule_date:"",
  1183. Count:0,
  1184. },
  1185. Fri_A: {
  1186. schedule_id: 0,
  1187. mode_id: 0,
  1188. mode_name: '',
  1189. patient_id: 0,
  1190. patient: '',
  1191. dialysis_machine_name:'',
  1192. schedule_date:"",
  1193. Count:0,
  1194. },
  1195. Fri_N: {
  1196. schedule_id: 0,
  1197. mode_id: 0,
  1198. mode_name: '',
  1199. patient_id: 0,
  1200. patient: '',
  1201. dialysis_machine_name:'',
  1202. schedule_date:"",
  1203. Count:0,
  1204. },
  1205. Sat_M: {
  1206. schedule_id: 0,
  1207. mode_id: 0,
  1208. mode_name: '',
  1209. patient_id: 0,
  1210. patient: '',
  1211. dialysis_machine_name:'',
  1212. schedule_date:"",
  1213. Count:0,
  1214. },
  1215. Sat_A: {
  1216. schedule_id: 0,
  1217. mode_id: 0,
  1218. mode_name: '',
  1219. patient_id: 0,
  1220. patient: '',
  1221. dialysis_machine_name:'',
  1222. schedule_date:"",
  1223. Count:0,
  1224. },
  1225. Sat_N: {
  1226. schedule_id: 0,
  1227. mode_id: 0,
  1228. mode_name: '',
  1229. patient_id: 0,
  1230. patient: '',
  1231. dialysis_machine_name:'',
  1232. schedule_date:"",
  1233. Count:0,
  1234. },
  1235. Sun_A: {
  1236. schedule_id: 0,
  1237. mode_id: 0,
  1238. mode_name: '',
  1239. patient_id: 0,
  1240. patient: '',
  1241. dialysis_machine_name:'',
  1242. schedule_date:"",
  1243. Count:0,
  1244. },
  1245. Sun_N: {
  1246. schedule_id: 0,
  1247. mode_id: 0,
  1248. mode_name: '',
  1249. patient_id: 0,
  1250. patient: '',
  1251. dialysis_machine_name:'',
  1252. schedule_date:"",
  1253. Count:0,
  1254. },
  1255. Sun_M: {
  1256. schedule_id: 0,
  1257. mode_id: 0,
  1258. mode_name: '',
  1259. patient_id: 0,
  1260. patient: '',
  1261. dialysis_machine_name:'',
  1262. schedule_date:"",
  1263. Count:0,
  1264. },
  1265. total: 0
  1266. }
  1267. that.scheduleZone.push(thisPa)
  1268. })
  1269. })
  1270. }
  1271. this.scheduleZone.sort(this.compare('sort'))
  1272. this.source_scheduleZone = this.scheduleZone
  1273. console.log("34455555566666",this.scheduleZone)
  1274. })
  1275. },
  1276. // 单元格样式的回调
  1277. cellClass({ row, column, rowIndex, columnIndex }) {
  1278. if(columnIndex==1&&row.zone_type!=1){
  1279. return "table-row-new-class schedule-table-row Infectious_disease";
  1280. }
  1281. // 机号蓝线
  1282. if(columnIndex==1 ){
  1283. return 'border_bott '
  1284. }
  1285. if(columnIndex==0){
  1286. return 'border_left'
  1287. }
  1288. if (columnIndex == 0 || columnIndex == 1 || columnIndex == 23) {
  1289. return "";
  1290. } else {
  1291. if (this.weekTime == "lastWeek") {
  1292. if(column.label == '晚' ){
  1293. return 'evening_border schedule-table-cell-disable'
  1294. }
  1295. if(row[column.property].patient_id > 0 && row[column.property].patient_id == this.patient_id_hover ){
  1296. return 'hover-td schedule-table-cell-disable'
  1297. }else {
  1298. return 'schedule-table-cell-disable'
  1299. }
  1300. // return "schedule-table-cell-disable";
  1301. } else if (this.weekTime == "thisWeek") {
  1302. var weekday = Math.floor((columnIndex - 2) / 3 + 1);
  1303. // 判断日期
  1304. if (weekday < this.weekday) {
  1305. // console.log('这是row',row);
  1306. if(row[column.property].patient_id > 0 && row[column.property].patient_id == this.patient_id_hover ){
  1307. return 'hover-td schedule-table-cell-disable'
  1308. }
  1309. if(column.label == '晚'){
  1310. return 'evening_border schedule-table-cell-disable'
  1311. }
  1312. return "schedule-table-cell-disable";
  1313. }else{
  1314. // 分日期
  1315. if(column.label == '晚' ){
  1316. return 'evening_border'
  1317. }
  1318. if(row[column.property].patient_id > 0 && row[column.property].patient_id == this.patient_id_hover){
  1319. return 'hover-td '
  1320. }else {
  1321. return ''
  1322. }
  1323. }
  1324. } else {
  1325. if(column.label == '晚' ){
  1326. return 'evening_border'
  1327. }
  1328. }
  1329. }
  1330. return "";
  1331. },
  1332. cellstyle({ row, column, rowIndex, columnIndex }){
  1333. // 分区蓝线
  1334. for(let i=0;i<this.subzone.length;i++){
  1335. const subslice=this.subzone[i].jihaos.slice(-1)
  1336. console.log('这是row',subslice);
  1337. if(row.zone_id==subslice[0].zone_id && row.jihao_id == subslice[0].id ){
  1338. // console.log('33333333333');
  1339. return 'border-top: 1px solid aqua;'
  1340. }
  1341. }
  1342. },
  1343. changeSearchContagion(id) {
  1344. this.patientQuery.contagion = id;
  1345. this.getSchedulePatients();
  1346. },
  1347. // 合计
  1348. getSummaries(param) {
  1349. const { columns, data } = param;
  1350. const sums = [];
  1351. columns.forEach((column, index) => {
  1352. if (index === 0 ) {
  1353. sums[index] = "总数";
  1354. return;
  1355. }
  1356. if (index === 1 ) {
  1357. sums[index] = data.length;
  1358. return;
  1359. }
  1360. const values = data.map(item => item[column.property]);
  1361. sums[index] = values.reduce((prev, curr) => {
  1362. if (typeof curr["mode_id"] === "undefined") {
  1363. return prev;
  1364. }
  1365. const value = Number(curr["mode_id"]);
  1366. if (!isNaN(value) && value > 0) {
  1367. return prev + 1;
  1368. } else {
  1369. return prev;
  1370. }
  1371. }, 0);
  1372. sums[index];
  1373. });
  1374. this.$nextTick(() => {
  1375. this.$refs.table.doLayout();
  1376. });
  1377. //表格某列全部数据
  1378. var Mon_M = []
  1379. var Mon_A = []
  1380. var Mon_N = []
  1381. var Tue_M =[]
  1382. var Tue_A = []
  1383. var Tue_N = []
  1384. var Wed_M = []
  1385. var Wed_A = []
  1386. var Wed_N = []
  1387. var Thurs_M = []
  1388. var Thurs_A = []
  1389. var Thurs_N = []
  1390. var Fri_M = []
  1391. var Fri_A = []
  1392. var Fri_N = []
  1393. var Sat_M = []
  1394. var Sat_A = []
  1395. var Sat_N = []
  1396. var Sun_M = []
  1397. var Sun_A = []
  1398. var Sun_N = []
  1399. // 操作后数据
  1400. var Mon_M_One= []
  1401. var Mon_A_One = []
  1402. var Mon_N_One = []
  1403. var Tue_M_One =[]
  1404. var Tue_A_One = []
  1405. var Tue_N_One = []
  1406. var Wed_M_One = []
  1407. var Wed_A_One = []
  1408. var Wed_N_One = []
  1409. var Thurs_M_One = []
  1410. var Thurs_A_One = []
  1411. var Thurs_N_One = []
  1412. var Fri_M_One = []
  1413. var Fri_A_One = []
  1414. var Fri_N_One = []
  1415. var Sat_M_One = []
  1416. var Sat_A_One = []
  1417. var Sat_N_One = []
  1418. var Sun_M_One = []
  1419. var Sun_A_One = []
  1420. var Sun_N_One= []
  1421. for(let j in data){
  1422. if(data[j].hasOwnProperty ('Mon_A') == true){
  1423. Mon_A.push(data[j].Mon_A.mode_name)
  1424. Mon_A=Mon_A.filter(item=> item && item.trim())//去掉空字符串
  1425. var countNum =Mon_A.reduce((obj,name)=>{
  1426. if(name in obj){
  1427. obj[name]++
  1428. }else{
  1429. obj[name]=1
  1430. }
  1431. return obj
  1432. },{})
  1433. }
  1434. }
  1435. for(let x in countNum){
  1436. Mon_A_One.push(x + ':' + countNum[x]+"\n")
  1437. }
  1438. var result = [];
  1439. for (var i = 0,len = Mon_A_One.length; i < len; i+=29) {
  1440. var strObjcet = Mon_A_One.slice(i, i+29);
  1441. var str = strObjcet.toString();
  1442. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1443. result.push(str);
  1444. }
  1445. sums[3]="总人数:"+ sums[3] +"\n"+result
  1446. for(let j in data){
  1447. if(data[j].hasOwnProperty ('Mon_M') == true){
  1448. Mon_M.push(data[j].Mon_M.mode_name)
  1449. Mon_M=Mon_M.filter(item=> item && item.trim())
  1450. var countNum =Mon_M.reduce((obj,name)=>{
  1451. if(name in obj){
  1452. obj[name]++
  1453. }else{
  1454. obj[name]=1
  1455. }
  1456. return obj
  1457. },{})
  1458. }
  1459. }
  1460. for(let x in countNum){
  1461. // console.log(x);
  1462. Mon_M_One.push(x + ':' + countNum[x]+"\n")
  1463. }
  1464. var result = [];
  1465. for (var i = 0,len = Mon_M_One.length; i < len; i+=29) {
  1466. var strObjcet = Mon_M_One.slice(i, i+29);
  1467. var str = strObjcet.toString();
  1468. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1469. result.push(str);
  1470. }
  1471. sums[2]="总人数:"+ sums[2] +"\n"+result
  1472. for(let j in data){
  1473. if(data[j].hasOwnProperty ('Mon_N') == true){
  1474. Mon_N.push(data[j].Mon_N.mode_name)
  1475. Mon_N=Mon_N.filter(item=> item && item.trim())
  1476. var countNum =Mon_N.reduce((obj,name)=>{
  1477. if(name in obj){
  1478. obj[name]++
  1479. }else{
  1480. obj[name]=1
  1481. }
  1482. return obj
  1483. },{})
  1484. }
  1485. }
  1486. for(let x in countNum){
  1487. Mon_N_One.push(x + ':' + countNum[x]+"\n")
  1488. }
  1489. var result = [];
  1490. for (var i = 0,len = Mon_N_One.length; i < len; i+=29) {
  1491. var strObjcet = Mon_N_One.slice(i, i+29);
  1492. var str = strObjcet.toString();
  1493. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1494. result.push(str);
  1495. }
  1496. sums[4]="总人数:"+ sums[4] +"\n"+result
  1497. // 星期二
  1498. for(let j in data){
  1499. if(data[j].hasOwnProperty ('Tue_M') == true){
  1500. Tue_M.push(data[j].Tue_M.mode_name)
  1501. Tue_M=Tue_M.filter(item=> item && item.trim())
  1502. var countNum =Tue_M.reduce((obj,name)=>{
  1503. if(name in obj){
  1504. obj[name]++
  1505. }else{
  1506. obj[name]=1
  1507. }
  1508. return obj
  1509. },{})
  1510. }
  1511. }
  1512. for(let x in countNum){
  1513. Tue_M_One.push(x + ':' + countNum[x]+"\n")
  1514. }
  1515. var result = [];
  1516. for (var i = 0,len = Tue_M_One.length; i < len; i+=29) {
  1517. var strObjcet = Tue_M_One.slice(i, i+29);
  1518. var str = strObjcet.toString();
  1519. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1520. result.push(str);
  1521. }
  1522. sums[5]="总人数:"+ sums[5] +"\n"+result
  1523. // var newTue_A
  1524. for(let j in data){
  1525. if(data[j].hasOwnProperty ('Tue_A') == true){
  1526. Tue_A.push(data[j].Tue_A.mode_name)
  1527. Tue_A=Tue_A.filter(item=> item && item.trim())
  1528. var countNum =Tue_A.reduce((obj,name)=>{
  1529. if(name in obj){
  1530. obj[name]++
  1531. }else{
  1532. obj[name]=1
  1533. }
  1534. return obj
  1535. },{})
  1536. }
  1537. }
  1538. for(let x in countNum){
  1539. Tue_A_One.push(x + ':' + countNum[x]+"\n")
  1540. }
  1541. var result = [];
  1542. for (var i = 0,len = Tue_A_One.length; i < len; i+=29) {
  1543. var strObjcet = Tue_A_One.slice(i, i+29);
  1544. var str = strObjcet.toString();
  1545. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1546. result.push(str);
  1547. }
  1548. sums[6]="总人数:"+ sums[6] +"\n"+result
  1549. for(let j in data){
  1550. if(data[j].hasOwnProperty ('Tue_N') == true){
  1551. Tue_N.push(data[j].Tue_N.mode_name)
  1552. Tue_N=Tue_N.filter(item=> item && item.trim())
  1553. var countNum =Tue_N.reduce((obj,name)=>{
  1554. if(name in obj){
  1555. obj[name]++
  1556. }else{
  1557. obj[name]=1
  1558. }
  1559. return obj
  1560. },{})
  1561. }
  1562. }
  1563. for(let x in countNum){
  1564. Tue_N_One.push(x + ':' + countNum[x]+"\n")
  1565. }
  1566. var result = [];
  1567. for (var i = 0,len = Tue_N_One.length; i < len; i+=29) {
  1568. var strObjcet = Tue_N_One.slice(i, i+29);
  1569. var str = strObjcet.toString();
  1570. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1571. result.push(str);
  1572. }
  1573. sums[7]="总人数:"+ sums[7] +"\n"+result
  1574. // 星期三
  1575. for(let j in data){
  1576. if(data[j].hasOwnProperty ('Wed_M') == true){
  1577. Wed_M.push(data[j].Wed_M.mode_name)
  1578. Wed_M=Wed_M.filter(item=> item && item.trim())
  1579. var countNum =Wed_M.reduce((obj,name)=>{
  1580. if(name in obj){
  1581. obj[name]++
  1582. }else{
  1583. obj[name]=1
  1584. }
  1585. return obj
  1586. },{})
  1587. }
  1588. }
  1589. for(let x in countNum){
  1590. Wed_M_One.push(x + ':' + countNum[x]+"\n")
  1591. }
  1592. var result = [];
  1593. for (var i = 0,len = Wed_M_One.length; i < len; i+=29) {
  1594. var strObjcet = Wed_M_One.slice(i, i+29);
  1595. var str = strObjcet.toString();
  1596. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1597. result.push(str);
  1598. }
  1599. sums[8]="总人数:"+ sums[8] +"\n"+result
  1600. for(let j in data){
  1601. if(data[j].hasOwnProperty ('Wed_A') == true){
  1602. Wed_A.push(data[j].Wed_A.mode_name)
  1603. Wed_A=Wed_A.filter(item=> item && item.trim())
  1604. var countNum =Wed_A.reduce((obj,name)=>{
  1605. if(name in obj){
  1606. obj[name]++
  1607. }else{
  1608. obj[name]=1
  1609. }
  1610. return obj
  1611. },{})
  1612. }
  1613. }
  1614. for(let x in countNum){
  1615. Wed_A_One.push(x + ':' + countNum[x]+"\n")
  1616. }
  1617. var result = [];
  1618. for (var i = 0,len = Wed_A_One.length; i < len; i+=29) {
  1619. var strObjcet = Wed_A_One.slice(i, i+29);
  1620. var str = strObjcet.toString();
  1621. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1622. result.push(str);
  1623. }
  1624. sums[9]="总人数:"+ sums[9] +"\n"+result
  1625. for(let j in data){
  1626. if(data[j].hasOwnProperty ('Wed_N') == true){
  1627. Wed_N.push(data[j].Wed_N.mode_name)
  1628. Wed_N=Wed_N.filter(item=> item && item.trim())
  1629. var countNum =Wed_N.reduce((obj,name)=>{
  1630. if(name in obj){
  1631. obj[name]++
  1632. }else{
  1633. obj[name]=1
  1634. }
  1635. return obj
  1636. },{})
  1637. }
  1638. }
  1639. for(let x in countNum){
  1640. Wed_N_One.push(x + ':' + countNum[x]+"\n")
  1641. }
  1642. var result = [];
  1643. for (var i = 0,len = Wed_N_One.length; i < len; i+=29) {
  1644. var strObjcet = Wed_N_One.slice(i, i+29);
  1645. var str = strObjcet.toString();
  1646. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1647. result.push(str);
  1648. }
  1649. sums[10]="总人数:"+ sums[10] +"\n"+result
  1650. // 星期四
  1651. for(let j in data){
  1652. if(data[j].hasOwnProperty ('Thurs_M') == true){
  1653. Thurs_M.push(data[j].Thurs_M.mode_name)
  1654. Thurs_M=Thurs_M.filter(item=> item && item.trim())
  1655. var countNum =Thurs_M.reduce((obj,name)=>{
  1656. if(name in obj){
  1657. obj[name]++
  1658. }else{
  1659. obj[name]=1
  1660. }
  1661. return obj
  1662. },{})
  1663. }
  1664. }
  1665. for(let x in countNum){
  1666. Thurs_M_One.push(x + ':' + countNum[x]+"\n")
  1667. }
  1668. var result = [];
  1669. for (var i = 0,len = Thurs_M_One.length; i < len; i+=29) {
  1670. var strObjcet = Thurs_M_One.slice(i, i+29);
  1671. var str = strObjcet.toString();
  1672. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1673. result.push(str);
  1674. }
  1675. sums[11]="总人数:"+ sums[11] +"\n"+result
  1676. for(let j in data){
  1677. if(data[j].hasOwnProperty ('Thurs_A') == true){
  1678. Thurs_A.push(data[j].Thurs_A.mode_name)
  1679. Thurs_A=Thurs_A.filter(item=> item && item.trim())
  1680. var countNum =Thurs_A.reduce((obj,name)=>{
  1681. if(name in obj){
  1682. obj[name]++
  1683. }else{
  1684. obj[name]=1
  1685. }
  1686. return obj
  1687. },{})
  1688. }
  1689. }
  1690. for(let x in countNum){
  1691. Thurs_A_One.push(x + ':' + countNum[x]+"\n")
  1692. }
  1693. var result = [];
  1694. for (var i = 0,len = Thurs_A_One.length; i < len; i+=29) {
  1695. var strObjcet = Thurs_A_One.slice(i, i+29);
  1696. var str = strObjcet.toString();
  1697. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1698. result.push(str);
  1699. }
  1700. sums[12]="总人数:"+ sums[12] +"\n"+result
  1701. for(let j in data){
  1702. if(data[j].hasOwnProperty ('Thurs_N') == true){
  1703. Thurs_N.push(data[j].Thurs_N.mode_name)
  1704. Thurs_N=Thurs_N.filter(item=> item && item.trim())
  1705. var countNum =Thurs_N.reduce((obj,name)=>{
  1706. if(name in obj){
  1707. obj[name]++
  1708. }else{
  1709. obj[name]=1
  1710. }
  1711. return obj
  1712. },{})
  1713. }
  1714. }
  1715. for(let x in countNum){
  1716. Thurs_N_One.push(x + ':' + countNum[x]+"\n")
  1717. }
  1718. var result = [];
  1719. for (var i = 0,len = Thurs_N_One.length; i < len; i+=29) {
  1720. var strObjcet = Thurs_N_One.slice(i, i+29);
  1721. var str = strObjcet.toString();
  1722. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1723. result.push(str);
  1724. }
  1725. sums[13]="总人数:"+ sums[13] +"\n"+result
  1726. // 星期五
  1727. for(let j in data){
  1728. if(data[j].hasOwnProperty ('Fri_M') == true){
  1729. Fri_M.push(data[j].Fri_M.mode_name)
  1730. Fri_M=Fri_M.filter(item=> item && item.trim())
  1731. var countNum =Fri_M.reduce((obj,name)=>{
  1732. if(name in obj){
  1733. obj[name]++
  1734. }else{
  1735. obj[name]=1
  1736. }
  1737. return obj
  1738. },{})
  1739. }
  1740. }
  1741. for(let x in countNum){
  1742. Fri_M_One.push(x + ':' + countNum[x]+"\n")
  1743. }
  1744. var result = [];
  1745. for (var i = 0,len = Fri_M_One.length; i < len; i+=29) {
  1746. var strObjcet = Fri_M_One.slice(i, i+29);
  1747. var str = strObjcet.toString();
  1748. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1749. result.push(str);
  1750. }
  1751. sums[14]="总人数:"+ sums[14] +"\n"+result
  1752. for(let j in data){
  1753. if(data[j].hasOwnProperty ('Fri_A') == true){
  1754. Fri_A.push(data[j].Fri_A.mode_name)
  1755. Fri_A=Fri_A.filter(item=> item && item.trim())
  1756. var countNum =Fri_A.reduce((obj,name)=>{
  1757. if(name in obj){
  1758. obj[name]++
  1759. }else{
  1760. obj[name]=1
  1761. }
  1762. return obj
  1763. },{})
  1764. }
  1765. }
  1766. for(let x in countNum){
  1767. Fri_A_One.push(x + ':' + countNum[x]+"\n")
  1768. }
  1769. var result = [];
  1770. for (var i = 0,len = Fri_A_One.length; i < len; i+=29) {
  1771. var strObjcet = Fri_A_One.slice(i, i+29);
  1772. var str = strObjcet.toString();
  1773. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1774. result.push(str);
  1775. }
  1776. sums[15]="总人数:"+ sums[15] +"\n"+result
  1777. for(let j in data){
  1778. if(data[j].hasOwnProperty ('Fri_N') == true){
  1779. Fri_N.push(data[j].Fri_N.mode_name)
  1780. Fri_N=Fri_N.filter(item=> item && item.trim())
  1781. var countNum =Fri_N.reduce((obj,name)=>{
  1782. if(name in obj){
  1783. obj[name]++
  1784. }else{
  1785. obj[name]=1
  1786. }
  1787. return obj
  1788. },{})
  1789. }
  1790. }
  1791. for(let x in countNum){
  1792. Fri_N_One.push(x + ':' + countNum[x]+"\n")
  1793. }
  1794. var result = [];
  1795. for (var i = 0,len = Fri_N_One.length; i < len; i+=29) {
  1796. var strObjcet = Fri_N_One.slice(i, i+29);
  1797. var str = strObjcet.toString();
  1798. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1799. result.push(str);
  1800. }
  1801. sums[16]="总人数:"+ sums[16] +"\n"+result
  1802. // 星期六
  1803. for(let j in data){
  1804. if(data[j].hasOwnProperty ('Sat_M') == true){
  1805. Sat_M.push(data[j].Sat_M.mode_name)
  1806. Sat_M=Sat_M.filter(item=> item && item.trim())
  1807. var countNum =Sat_M.reduce((obj,name)=>{
  1808. if(name in obj){
  1809. obj[name]++
  1810. }else{
  1811. obj[name]=1
  1812. }
  1813. return obj
  1814. },{})
  1815. }
  1816. }
  1817. for(let x in countNum){
  1818. Sat_M_One.push(x + ':' + countNum[x]+"\n")
  1819. }
  1820. var result = [];
  1821. for (var i = 0,len = Sat_M_One.length; i < len; i+=29) {
  1822. var strObjcet = Sat_M_One.slice(i, i+29);
  1823. var str = strObjcet.toString();
  1824. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1825. result.push(str);
  1826. }
  1827. sums[17]="总人数:"+ sums[17] +"\n"+result
  1828. for(let j in data){
  1829. if(data[j].hasOwnProperty ('Sat_A') == true){
  1830. Sat_A.push(data[j].Sat_A.mode_name)
  1831. Sat_A=Sat_A.filter(item=> item && item.trim())
  1832. var countNum =Sat_A.reduce((obj,name)=>{
  1833. if(name in obj){
  1834. obj[name]++
  1835. }else{
  1836. obj[name]=1
  1837. }
  1838. return obj
  1839. },{})
  1840. }
  1841. }
  1842. for(let x in countNum){
  1843. Sat_A_One.push(x + ':' + countNum[x]+"\n")
  1844. }
  1845. var result = [];
  1846. for (var i = 0,len = Sat_A_One.length; i < len; i+=29) {
  1847. var strObjcet = Sat_A_One.slice(i, i+29);
  1848. var str = strObjcet.toString();
  1849. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1850. result.push(str);
  1851. }
  1852. sums[18]="总人数:"+ sums[18] +"\n"+result
  1853. for(let j in data){
  1854. if(data[j].hasOwnProperty ('Sat_N') == true){
  1855. Sat_N.push(data[j].Sat_N.mode_name)
  1856. Sat_N=Sat_N.filter(item=> item && item.trim())
  1857. var countNum =Sat_N.reduce((obj,name)=>{
  1858. if(name in obj){
  1859. obj[name]++
  1860. }else{
  1861. obj[name]=1
  1862. }
  1863. return obj
  1864. },{})
  1865. }
  1866. }
  1867. for(let x in countNum){
  1868. Sat_N_One.push(x + ':' + countNum[x]+"\n")
  1869. }
  1870. var result = [];
  1871. for (var i = 0,len = Sat_N_One.length; i < len; i+=29) {
  1872. var strObjcet = Sat_N_One.slice(i, i+29);
  1873. var str = strObjcet.toString();
  1874. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1875. result.push(str);
  1876. }
  1877. sums[19]="总人数:"+ sums[19] +"\n"+result
  1878. // 星期天
  1879. for(let j in data){
  1880. if(data[j].hasOwnProperty ('Sun_M') == true){
  1881. Sun_M.push(data[j].Sun_M.mode_name)
  1882. Sun_M=Sun_M.filter(item=> item && item.trim())
  1883. var countNum =Sun_M.reduce((obj,name)=>{
  1884. if(name in obj){
  1885. obj[name]++
  1886. }else{
  1887. obj[name]=1
  1888. }
  1889. return obj
  1890. },{})
  1891. }
  1892. }
  1893. for(let x in countNum){
  1894. Sun_M_One.push(x + ':' + countNum[x]+"\n")
  1895. }
  1896. var result = [];
  1897. for (var i = 0,len = Sun_M_One.length; i < len; i+=29) {
  1898. var strObjcet = Sun_M_One.slice(i, i+29);
  1899. var str = strObjcet.toString();
  1900. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1901. result.push(str);
  1902. }
  1903. sums[20]="总人数:"+ sums[20] +"\n"+result
  1904. for(let j in data){
  1905. if(data[j].hasOwnProperty ('Sun_A') == true){
  1906. Sun_A.push(data[j].Sun_A.mode_name)
  1907. Sun_A=Sun_A.filter(item=> item && item.trim())
  1908. var countNum =Sun_A.reduce((obj,name)=>{
  1909. if(name in obj){
  1910. obj[name]++
  1911. }else{
  1912. obj[name]=1
  1913. }
  1914. return obj
  1915. },{})
  1916. }
  1917. }
  1918. for(let x in countNum){
  1919. Sun_A_One.push(x + ':' + countNum[x]+"\n")
  1920. }
  1921. var result = [];
  1922. for (var i = 0,len = Sun_A_One.length; i < len; i+=29) {
  1923. var strObjcet = Sun_A_One.slice(i, i+29);
  1924. var str = strObjcet.toString();
  1925. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1926. result.push(str);
  1927. }
  1928. sums[21]="总人数:"+ sums[21] +"\n"+result
  1929. for(let j in data){
  1930. if(data[j].hasOwnProperty ('Sun_N') == true){
  1931. Sun_N.push(data[j].Sun_N.mode_name)
  1932. Sun_N=Sun_N.filter(item=> item && item.trim())
  1933. var countNum =Sun_N.reduce((obj,name)=>{
  1934. if(name in obj){
  1935. obj[name]++
  1936. }else{
  1937. obj[name]=1
  1938. }
  1939. return obj
  1940. },{})
  1941. }
  1942. }
  1943. for(let x in countNum){
  1944. Sun_N_One.push(x + ':' + countNum[x]+"\n")
  1945. }
  1946. var result = [];
  1947. for (var i = 0,len = Sun_N_One.length; i < len; i+=29) {
  1948. var strObjcet = Sun_N_One.slice(i, i+29);
  1949. var str = strObjcet.toString();
  1950. str = str.replace(/,/g, " "); //将所有的逗号 替换成空格
  1951. result.push(str);
  1952. }
  1953. sums[22]="总人数:"+ sums[22] +"\n"+result
  1954. return sums;
  1955. },
  1956. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  1957. var that = this;
  1958. var rowNum = 0;
  1959. rowNumber = 0;
  1960. var rutrnData = {};
  1961. if (columnIndex === 0) {
  1962. var rowLen = this.scheduleZoneRow.length;
  1963. if (rowLen > 0) {
  1964. for (let index = 0; index < rowLen; index++) {
  1965. rowNum = this.scheduleZoneRow[index];
  1966. rowNumber += rowNum;
  1967. var f = rowNumber - rowNum;
  1968. if (f == rowIndex) {
  1969. rutrnData = {
  1970. rowspan: rowNum,
  1971. colspan: 1
  1972. };
  1973. break;
  1974. } else if (rowIndex < rowNumber) {
  1975. rutrnData = {
  1976. rowspan: 0,
  1977. colspan: 0
  1978. };
  1979. break;
  1980. }
  1981. }
  1982. return rutrnData;
  1983. }
  1984. }
  1985. },
  1986. handleCurrentChange(row) {
  1987. if (typeof row === "undefined" || row == null) {
  1988. this.currentData.patient_id = 0;
  1989. this.currentData.contagions = [];
  1990. } else {
  1991. this.currentData.patient_id = row.id;
  1992. this.currentData.contagions = row.contagions;
  1993. }
  1994. },
  1995. closePatientPanel(row) {
  1996. this.dialogTableVisible = false;
  1997. this.$refs.singleTable.setCurrentRow(row);
  1998. this.currentData.patient_id = 0;
  1999. },
  2000. // 渲染内容
  2001. getSchedules() {
  2002. var partionStr = this.partition_id
  2003. var arr = this.zoneIdList.join(',')
  2004. var str = ""
  2005. if (partionStr == 0) {
  2006. str = arr
  2007. }
  2008. if (partionStr != 0) {
  2009. str = partionStr.join(',')
  2010. }
  2011. const params = {
  2012. weekTime: this.theType,
  2013. patitionid: str,
  2014. schedule_type: this.schedule_type,
  2015. }
  2016. getSchedulesOne(params).then(response => {
  2017. if (response.data.state == 1) {
  2018. this.weekTitle = response.data.data.weekTitle;
  2019. this.weekDays = response.data.data.days;
  2020. this.toDay = response.data.data.today;
  2021. var theSchedules = response.data.data.schdules;
  2022. var schedulesGroup = response.data.data.schedulesGroup
  2023. this.schedulesGroup = schedulesGroup
  2024. var that = this;
  2025. this.scheduleZone.forEach(function (zone, index) {
  2026. that.scheduleZone[index].Mon_M = {
  2027. mode_id: 0,
  2028. mode_name: "",
  2029. patient_id: 0,
  2030. patient: "",
  2031. dialysis_machine_name: "",
  2032. schedule_date: "",
  2033. Count: 0,
  2034. };
  2035. that.scheduleZone[index].Mon_A = {
  2036. mode_id: 0,
  2037. mode_name: "",
  2038. patient_id: 0,
  2039. patient: "",
  2040. dialysis_machine_name: "",
  2041. schedule_date: "",
  2042. Count: 0,
  2043. };
  2044. that.scheduleZone[index].Mon_N = {
  2045. mode_id: 0,
  2046. mode_name: "",
  2047. patient_id: 0,
  2048. patient: "",
  2049. dialysis_machine_name: "",
  2050. schedule_date: "",
  2051. Count: 0,
  2052. };
  2053. that.scheduleZone[index].Tue_M = {
  2054. mode_id: 0,
  2055. mode_name: "",
  2056. patient_id: 0,
  2057. patient: "",
  2058. dialysis_machine_name: "",
  2059. schedule_date: "",
  2060. Count: 0,
  2061. };
  2062. that.scheduleZone[index].Tue_A = {
  2063. mode_id: 0,
  2064. mode_name: "",
  2065. patient_id: 0,
  2066. patient: "",
  2067. dialysis_machine_name: "",
  2068. schedule_date: "",
  2069. Count: 0,
  2070. };
  2071. that.scheduleZone[index].Tue_N = {
  2072. mode_id: 0,
  2073. mode_name: "",
  2074. patient_id: 0,
  2075. patient: "",
  2076. dialysis_machine_name: "",
  2077. schedule_date: "",
  2078. Count: 0,
  2079. };
  2080. that.scheduleZone[index].Wed_M = {
  2081. mode_id: 0,
  2082. mode_name: "",
  2083. patient_id: 0,
  2084. patient: "",
  2085. dialysis_machine_name: "",
  2086. schedule_date: "",
  2087. Count: 0,
  2088. };
  2089. that.scheduleZone[index].Wed_A = {
  2090. mode_id: 0,
  2091. mode_name: "",
  2092. patient_id: 0,
  2093. patient: "",
  2094. dialysis_machine_name: "",
  2095. schedule_date: "",
  2096. Count: 0,
  2097. };
  2098. that.scheduleZone[index].Wed_N = {
  2099. mode_id: 0,
  2100. mode_name: "",
  2101. patient_id: 0,
  2102. patient: "",
  2103. dialysis_machine_name: "",
  2104. schedule_date: "",
  2105. Count: 0,
  2106. };
  2107. that.scheduleZone[index].Thurs_M = {
  2108. mode_id: 0,
  2109. mode_name: "",
  2110. patient_id: 0,
  2111. patient: "",
  2112. dialysis_machine_name: "",
  2113. schedule_date: "",
  2114. Count: 0,
  2115. };
  2116. that.scheduleZone[index].Thurs_A = {
  2117. mode_id: 0,
  2118. mode_name: "",
  2119. patient_id: 0,
  2120. patient: "",
  2121. dialysis_machine_name: "",
  2122. schedule_date: "",
  2123. Count: 0,
  2124. };
  2125. that.scheduleZone[index].Thurs_N = {
  2126. mode_id: 0,
  2127. mode_name: "",
  2128. patient_id: 0,
  2129. patient: "",
  2130. dialysis_machine_name: "",
  2131. schedule_date: "",
  2132. Count: 0,
  2133. };
  2134. that.scheduleZone[index].Fri_M = {
  2135. mode_id: 0,
  2136. mode_name: "",
  2137. patient_id: 0,
  2138. patient: "",
  2139. dialysis_machine_name: "",
  2140. schedule_date: "",
  2141. Count: 0,
  2142. };
  2143. that.scheduleZone[index].Fri_A = {
  2144. mode_id: 0,
  2145. mode_name: "",
  2146. patient_id: 0,
  2147. patient: "",
  2148. dialysis_machine_name: "",
  2149. schedule_date: "",
  2150. Count: 0,
  2151. };
  2152. that.scheduleZone[index].Fri_N = {
  2153. mode_id: 0,
  2154. mode_name: "",
  2155. patient_id: 0,
  2156. patient: "",
  2157. dialysis_machine_name: "",
  2158. schedule_date: "",
  2159. Count: 0,
  2160. };
  2161. that.scheduleZone[index].Sat_M = {
  2162. mode_id: 0,
  2163. mode_name: "",
  2164. patient_id: 0,
  2165. patient: "",
  2166. dialysis_machine_name: "",
  2167. schedule_date: "",
  2168. Count: 0,
  2169. };
  2170. that.scheduleZone[index].Sat_A = {
  2171. mode_id: 0,
  2172. mode_name: "",
  2173. patient_id: 0,
  2174. patient: "",
  2175. dialysis_machine_name: "",
  2176. schedule_date: "",
  2177. Count: 0,
  2178. };
  2179. that.scheduleZone[index].Sat_N = {
  2180. mode_id: 0,
  2181. mode_name: "",
  2182. patient_id: 0,
  2183. patient: "",
  2184. dialysis_machine_name: "",
  2185. schedule_date: "",
  2186. Count: 0,
  2187. };
  2188. that.scheduleZone[index].Sun_A = {
  2189. mode_id: 0,
  2190. mode_name: "",
  2191. patient_id: 0,
  2192. patient: "",
  2193. dialysis_machine_name: "",
  2194. schedule_date: "",
  2195. Count: 0,
  2196. };
  2197. that.scheduleZone[index].Sun_N = {
  2198. mode_id: 0,
  2199. mode_name: "",
  2200. patient_id: 0,
  2201. patient: "",
  2202. dialysis_machine_name: "",
  2203. schedule_date: "",
  2204. Count: 0,
  2205. };
  2206. that.scheduleZone[index].Sun_M = {
  2207. mode_id: 0,
  2208. mode_name: "",
  2209. patient_id: 0,
  2210. patient: "",
  2211. dialysis_machine_name: "",
  2212. schedule_date: "",
  2213. Count: 0,
  2214. };
  2215. that.scheduleZone[index].total = 0;
  2216. if (response.data.data.schdules.length > 0) {
  2217. theSchedules.forEach(function (schedule, sindex) {
  2218. if (zone.jihao_id == schedule.bed_id) {
  2219. var weekPath = that.weekPath(
  2220. schedule.schedule_week,
  2221. schedule.schedule_type
  2222. );
  2223. if (weekPath.length == 2) {
  2224. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2225. that.scheduleZone[index][weekPathKey] = {
  2226. schedule_id: schedule.id,
  2227. mode_id: schedule.mode_id,
  2228. patient_id: schedule.patient_id,
  2229. patient: schedule.patient,
  2230. dialysis_machine_name: schedule.dialysis_machine_name,
  2231. patient_contagions: schedule.patient_contagions,
  2232. schedule_date: schedule.schedule_date,
  2233. mode_name: typeof that.modeOptions[schedule.mode_id] === "undefined" ? "" : that.modeOptions[schedule.mode_id].name
  2234. };
  2235. that.scheduleZone[index].total += 1;
  2236. }
  2237. }
  2238. });
  2239. }
  2240. });
  2241. this.source_scheduleZone = this.scheduleZone
  2242. } else {
  2243. this.$message.error("网络错误");
  2244. return false;
  2245. }
  2246. });
  2247. },
  2248. getSchedulePatients() {
  2249. getSchedulePatients(this.patientQuery).then(response => {
  2250. if (response.data.state == 1) {
  2251. this.patients = response.data.data.patients;
  2252. }
  2253. });
  2254. },
  2255. // 搜索弹窗操作取消排班
  2256. CancelSchedule(id) {
  2257. this.$confirm("确定要取消当前排班?", "提示", {
  2258. confirmButtonText: "确定",
  2259. cancelButtonText: "取消",
  2260. type: "warning"
  2261. })
  2262. .then(() => {
  2263. CancelSchedule(id).then(response => {
  2264. if (response.data.state == 0) {
  2265. this.$message.error(response.data.msg);
  2266. } else {
  2267. this.$message({
  2268. type: "success",
  2269. message: "排班已取消!"
  2270. });
  2271. var that = this;
  2272. var schedule = response.data.data.schedule;
  2273. this.scheduleZone.forEach(function (zone, index) {
  2274. if (
  2275. zone.zone_id == schedule.partition_id &&
  2276. zone.jihao_id == schedule.bed_id
  2277. ) {
  2278. var weekPath = that.weekPath(
  2279. schedule.schedule_week,
  2280. schedule.schedule_type
  2281. );
  2282. if (weekPath.length == 2) {
  2283. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2284. that.scheduleZone[index][weekPathKey] = {
  2285. schedule_id: 0,
  2286. mode_id: 0,
  2287. patient_id: 0,
  2288. patient: "",
  2289. mode_name: "",
  2290. dialysis_machine_name: '',
  2291. };
  2292. that.scheduleZone[index].total -= 1;
  2293. }
  2294. }
  2295. });
  2296. this.tzDialogVisible = false;
  2297. this.searchTableVisible = false;
  2298. }
  2299. });
  2300. })
  2301. .catch(() => { });
  2302. },
  2303. // 搜索修改机号成功
  2304. changeScheduleActon(formName) {
  2305. this.changing_bed = true;
  2306. ChangeSchedule(this.currentData.id, this.changeSchedule)
  2307. .then(response => {
  2308. if (response.data.state == 0) {
  2309. this.$message.error(response.data.msg);
  2310. } else {
  2311. this.$message({
  2312. type: "success",
  2313. message: "修改成功!"
  2314. });
  2315. // var that = this;
  2316. this.getSchedules()
  2317. // var schedule = response.data.data.schedule;
  2318. // this.scheduleZone.forEach(function (zone, index) {
  2319. // if (
  2320. // zone.zone_id == schedule.partition_id &&
  2321. // zone.jihao_id == schedule.bed_id
  2322. // ) {
  2323. // var weekPath = that.weekPath(
  2324. // schedule.schedule_week,
  2325. // schedule.schedule_type
  2326. // );
  2327. // if (weekPath.length == 2) {
  2328. // var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2329. // that.scheduleZone[index][weekPathKey] = {
  2330. // schedule_id: schedule.id,
  2331. // mode_id: schedule.mode_id,
  2332. // patient_id: schedule.patient_id,
  2333. // patient: that.currentData.patient,
  2334. //
  2335. //
  2336. // dialysis_machine_name: schedule.dialysis_machine_name,
  2337. //
  2338. // patient_contagions: that.currentData.contagions,
  2339. // mode_name:
  2340. // typeof that.modeOptions[schedule.mode_id] === "undefined"
  2341. // ? ""
  2342. // : that.modeOptions[schedule.mode_id].name
  2343. // };
  2344. //
  2345. // that.scheduleZone[index].total += 1;
  2346. // }
  2347. // }
  2348. // if (
  2349. // zone.zone_id == that.currentData.partition_id &&
  2350. // zone.jihao_id == that.currentData.bed_id
  2351. // ) {
  2352. // var weekPath = that.weekPath(
  2353. // that.currentData.schedule_week,
  2354. // that.currentData.schedule_type
  2355. // );
  2356. // if (weekPath.length == 2) {
  2357. // var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2358. // that.scheduleZone[index][weekPathKey] = {
  2359. // schedule_id: 0,
  2360. // mode_id: 0,
  2361. // patient_id: 0,
  2362. // patient: "",
  2363. // mode_name: "",
  2364. // dialysis_machine_name: "",
  2365. // patient_contagions: []
  2366. // };
  2367. //
  2368. // that.scheduleZone[index].total -= 1;
  2369. // }
  2370. // }
  2371. // });
  2372. this.$refs[formName].resetFields();
  2373. this.jhDialogVisible = false;
  2374. }
  2375. this.changing_bed = false;
  2376. })
  2377. .catch(err => {
  2378. this.$message.error(err);
  2379. this.changing_bed = false;
  2380. });
  2381. },
  2382. CreateSchedule(id, data) {
  2383. this.creating_schedule = true;
  2384. CreateSchedule(id, data)
  2385. .then(response => {
  2386. if (response.data.state == 0) {
  2387. this.$message.error(response.data.msg);
  2388. } else {
  2389. this.$message({
  2390. type: "success",
  2391. message: "排班成功!"
  2392. });
  2393. var that = this;
  2394. var schedule = response.data.data.schedule;
  2395. this.scheduleZone.forEach(function (zone, index) {
  2396. if (
  2397. zone.zone_id == schedule.partition_id &&
  2398. zone.jihao_id == schedule.bed_id
  2399. ) {
  2400. var weekPath = that.weekPath(
  2401. schedule.schedule_week,
  2402. schedule.schedule_type
  2403. );
  2404. if (weekPath.length == 2) {
  2405. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2406. that.scheduleZone[index][weekPathKey] = {
  2407. schedule_id: schedule.id,
  2408. mode_id: schedule.mode_id,
  2409. patient_id: schedule.patient_id,
  2410. patient: schedule.patient,
  2411. dialysis_machine_name: schedule.dialysis_machine_name,
  2412. patient_contagions: that.currentData.contagions,
  2413. mode_name:
  2414. typeof that.modeOptions[schedule.mode_id] === "undefined"
  2415. ? ""
  2416. : that.modeOptions[schedule.mode_id].name
  2417. };
  2418. that.scheduleZone[index].total += 1;
  2419. }
  2420. }
  2421. });
  2422. this.closePatientPanel();
  2423. }
  2424. this.creating_schedule = false;
  2425. })
  2426. .catch(err => {
  2427. this.$message.error(err);
  2428. this.creating_schedule = false;
  2429. });
  2430. },
  2431. hoverMouse(row, column, cell, event) {
  2432. // console.log('sdf12344565');
  2433. if (row[column.property].schedule_id > 0) {
  2434. let patient_id = row[column.property].patient_id
  2435. this.patient_id_hover = patient_id
  2436. } else {
  2437. this.patient_id_hover = -1
  2438. }
  2439. },
  2440. clickThis(row, column, cell, event) {
  2441. if (!this.is_edit) {
  2442. this.$message.error("当前页面不可编辑");
  2443. return
  2444. }
  2445. // debugger
  2446. var week = this.weekDay(column.property);
  2447. if (week[0] == -1 || week[1] == -1) {
  2448. return false;
  2449. }
  2450. if (this.toDay > this.weekDays[week[0] - 1]) {
  2451. return false;
  2452. }
  2453. this.currentData.schedule_date = this.weekDays[week[0] - 1];
  2454. this.currentData.schedule_type = week[1];
  2455. this.currentData.bed_id = row.jihao_id;
  2456. this.currentData.partition_id = row.zone_id;
  2457. this.currentData.schedule_week = week[0];
  2458. this.currentData.type_name = this.dayType(week[1]);
  2459. this.currentData.zone_name = row.area;
  2460. this.currentData.bed_name = row.cut;
  2461. this.currentData.partition_type = row.zone_type;
  2462. if (row[column.property].schedule_id > 0) {
  2463. this.currentData.mode_id = row[column.property].mode_id;
  2464. this.currentData.id = row[column.property].schedule_id;
  2465. this.currentData.patient_id = row[column.property].patient_id;
  2466. this.currentData.patient = row[column.property].patient;
  2467. this.currentData.contagions = row[column.property].patient_contagions;
  2468. this.tiaoZhengType = 1;
  2469. this.tzDialogVisible = true;
  2470. } else {
  2471. this.currentData.mode_id = 1;
  2472. this.currentData.id = 0;
  2473. this.currentData.patient_id = 0;
  2474. this.currentData.patient = "";
  2475. this.currentData.contagions = [];
  2476. this.getSchedulePatients();
  2477. this.dialogTableVisible = true;
  2478. }
  2479. },
  2480. // 调整机号的确认按钮
  2481. submitTiaoZJH(formName) {
  2482. this.$refs[formName].validate(valid => {
  2483. if (valid) {
  2484. var weekPath = this.weekPath(
  2485. this.changeSchedule.schedule_week,
  2486. this.changeSchedule.schedule_type
  2487. );
  2488. if (weekPath.length != 2) {
  2489. this.$message.error("数据异常");
  2490. return false;
  2491. }
  2492. for (let i = 0; i < this.origin_device_numbers.length; i++) {
  2493. if (this.origin_device_numbers[i].id == this.device_id) {
  2494. this.changeSchedule.partition_id = this.origin_device_numbers[
  2495. i
  2496. ].zone_id;
  2497. }
  2498. }
  2499. this.changeSchedule.change_action = "change_device";
  2500. this.changeScheduleActon(formName);
  2501. // this.changeSchedule.spartition_type = this.scheduleZone[index].zone_type
  2502. var weekPathKey = weekPath[0] + '_' + weekPath[1]
  2503. for (var index in this.scheduleZone) {
  2504. if (this.scheduleZone[index].jihao_id == this.changeSchedule.bed_id) {
  2505. if (this.scheduleZone[index][weekPathKey].mode_id > 0) {
  2506. this.$message.error('选中的区域已经存在排班,不能再排班!')
  2507. return false
  2508. }
  2509. break
  2510. }
  2511. }
  2512. }
  2513. })
  2514. // this.$refs.changeSchedule.resetFields()
  2515. },
  2516. // 搜索弹窗操作调整模式确认按钮
  2517. submitMode(formName) {
  2518. this.changing_mode = true;
  2519. this.changeSchedule.change_action = "change_mode";
  2520. ChangeSchedule(this.currentData.id, this.changeSchedule)
  2521. .then(response => {
  2522. if (response.data.state == 0) {
  2523. this.$message.error(response.data.msg);
  2524. } else {
  2525. this.$message({
  2526. type: "success",
  2527. message: "修改成功!"
  2528. });
  2529. var that = this;
  2530. var schedule = response.data.data.schedule;
  2531. this.scheduleZone.forEach(function (zone, index) {
  2532. if (
  2533. zone.zone_id == schedule.partition_id &&
  2534. zone.jihao_id == schedule.bed_id
  2535. ) {
  2536. var weekPath = that.weekPath(
  2537. schedule.schedule_week,
  2538. schedule.schedule_type
  2539. );
  2540. if (weekPath.length == 2) {
  2541. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2542. that.scheduleZone[index][weekPathKey].mode_id =
  2543. schedule.mode_id;
  2544. that.scheduleZone[index][weekPathKey].mode_name =
  2545. typeof that.modeOptions[schedule.mode_id] === "undefined"
  2546. ? ""
  2547. : that.modeOptions[schedule.mode_id].name;
  2548. }
  2549. }
  2550. });
  2551. this.msDialogVisible = false;
  2552. }
  2553. this.changing_mode = false;
  2554. })
  2555. .catch(err => {
  2556. this.$message.error(err);
  2557. this.changing_mode = false;
  2558. });
  2559. },
  2560. submitTiaoZMS(formName) {
  2561. this.$refs[formName].validate(valid => {
  2562. if (valid) {
  2563. this.changing_mode = true;
  2564. this.changeSchedule.change_action = "change_mode";
  2565. ChangeSchedule(this.currentData.id, this.changeSchedule)
  2566. .then(response => {
  2567. if (response.data.state == 0) {
  2568. this.$message.error(response.data.msg);
  2569. } else {
  2570. this.$message({
  2571. type: "success",
  2572. message: "修改成功!"
  2573. });
  2574. var that = this;
  2575. var schedule = response.data.data.schedule;
  2576. this.scheduleZone.forEach(function (zone, index) {
  2577. if (
  2578. zone.zone_id == schedule.partition_id &&
  2579. zone.jihao_id == schedule.bed_id
  2580. ) {
  2581. var weekPath = that.weekPath(
  2582. schedule.schedule_week,
  2583. schedule.schedule_type
  2584. );
  2585. if (weekPath.length == 2) {
  2586. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  2587. that.scheduleZone[index][weekPathKey].mode_id =
  2588. schedule.mode_id;
  2589. that.scheduleZone[index][weekPathKey].mode_name =
  2590. typeof that.modeOptions[schedule.mode_id] ===
  2591. "undefined"
  2592. ? ""
  2593. : that.modeOptions[schedule.mode_id].name;
  2594. }
  2595. }
  2596. });
  2597. this.$refs[formName].resetFields();
  2598. this.msDialogVisible = false;
  2599. }
  2600. this.changing_mode = false;
  2601. })
  2602. .catch(err => {
  2603. this.$message.error(err);
  2604. this.changing_mode = false;
  2605. });
  2606. }
  2607. });
  2608. },
  2609. // 调整机号/选择分区
  2610. changePartition(value) {
  2611. let params = {
  2612. zone_id: value,
  2613. sch_type: this.currentData.schedule_type,
  2614. schedule_date: this.currentData.schedule_date,
  2615. patient_id: this.currentData.patient_id,
  2616. };
  2617. //进行网络请求,获取空排班机位
  2618. getSmartDevices(params).then((response) => {
  2619. console.log('getSmartDevices',response.data.data);
  2620. if (response.data.state == 0) {
  2621. return false;
  2622. } else {
  2623. var devices = response.data.data.devices;
  2624. this.current_devices = [];
  2625. this.current_devices = devices;
  2626. this.zone_names = devices;
  2627. this.device_id = devices[0].id
  2628. this.changeSchedule.bed_id = devices[0].id
  2629. }
  2630. });
  2631. },
  2632. // 调整机号/选择班次
  2633. changeScheduleType(schedule_type) {
  2634. this.currentData.schedule_type = schedule_type
  2635. let params = {
  2636. zone_id: this.currentData.partition_id,
  2637. sch_type: schedule_type,
  2638. schedule_date: this.currentData.schedule_date,
  2639. patient_id: this.currentData.patient_id,
  2640. };
  2641. //进行网络请求,获取空排班机位
  2642. getSmartDevices(params).then((response) => {
  2643. if (response.data.state == 0) {
  2644. return false;
  2645. } else {
  2646. var devices = response.data.data.devices;
  2647. this.current_devices = [];
  2648. this.current_devices = devices;
  2649. this.changeSchedule.bed_id = ""
  2650. this.changeSchedule.partition_id = this.currentData.partition_id
  2651. }
  2652. });
  2653. },
  2654. submitTiaoX() {
  2655. if (this.tiaoZhengType == 1) {
  2656. this.$confirm('确定要取消当前排班?', '提示', {
  2657. confirmButtonText: '确定',
  2658. cancelButtonText: '取消',
  2659. type: 'warning'
  2660. }).then(() => {
  2661. this.CancelSchedule(this.currentData.id);
  2662. }).catch(() => { });
  2663. }
  2664. switch (this.tiaoZhengType) {
  2665. case 1:
  2666. this.CancelSchedule(this.currentData.id);
  2667. break;
  2668. case 2:
  2669. this.changeSchedule = {
  2670. mode_id: this.currentData.mode_id,
  2671. schedule_type: this.currentData.schedule_type,
  2672. partition_id: this.currentData.partition_id,
  2673. bed_id: this.currentData.bed_id,
  2674. schedule_week: this.currentData.schedule_week,
  2675. partition_type: ""
  2676. };
  2677. if (
  2678. typeof this.partitions[this.currentData.partition_id].jihaos !==
  2679. "undefined"
  2680. ) {
  2681. this.jihaos = this.partitions[this.currentData.partition_id].jihaos;
  2682. } else {
  2683. this.jihaos = [];
  2684. }
  2685. const params = {
  2686. type: this.currentData.schedule_type,
  2687. date: this.currentData.schedule_date
  2688. };
  2689. getUrgentScheduleInitData(params)
  2690. .then(response => {
  2691. if (response.data.state == 0) {
  2692. this.$message.error(response.data.msg);
  2693. } else {
  2694. if (response.data.state == 1) {
  2695. this.origin_schedules = response.data.data.schedules;
  2696. this.origin_device_numbers =
  2697. response.data.data.device_numbers;
  2698. var zone_device_map = {};
  2699. for (
  2700. let index = 0;
  2701. index < this.origin_device_numbers.length;
  2702. index++
  2703. ) {
  2704. const device_number = this.origin_device_numbers[index];
  2705. if (
  2706. zone_device_map[device_number.zone_name] == null ||
  2707. zone_device_map[device_number.zone_name] == undefined
  2708. ) {
  2709. zone_device_map[device_number.zone_name] = [];
  2710. }
  2711. zone_device_map[device_number.zone_name].push(
  2712. device_number
  2713. );
  2714. }
  2715. this.zone_device_map = zone_device_map;
  2716. this.zone_names = Object.keys(this.zone_device_map);
  2717. if (this.zone_names.length > 0) {
  2718. this.zone_name = this.zone_names[0];
  2719. this.current_devices = this.zone_device_map[this.zone_name];
  2720. this.device_id = this.current_devices[0].id;
  2721. }
  2722. this.zone_device_options = [
  2723. { values: this.zone_names },
  2724. { values: this.current_devices }
  2725. ];
  2726. //
  2727. // for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
  2728. // for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
  2729. // if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
  2730. // this.origin_device_numbers.splice(y, 1)
  2731. // }
  2732. // }
  2733. // }
  2734. // // debugger
  2735. // var zone_device_map = {}
  2736. // for (let index = 0; index < this.origin_device_numbers.length; index++) {
  2737. // const device_number = this.origin_device_numbers[index]
  2738. // if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
  2739. // zone_device_map[device_number.zone.name] = []
  2740. // }
  2741. // zone_device_map[device_number.zone.name].push(device_number)
  2742. // }
  2743. // this.zone_device_map = zone_device_map
  2744. //
  2745. // this.zone_names = Object.keys(this.zone_device_map)
  2746. // if (this.zone_names.length > 0) {
  2747. // this.zone_name = this.zone_names[0]
  2748. // this.current_devices = this.zone_device_map[this.zone_name]
  2749. // this.device_id = this.current_devices[0].id
  2750. // }
  2751. //
  2752. // this.zone_device_options = [
  2753. // { values: this.zone_names },
  2754. // // { values: this.getDeviceNumberNames(this.current_devices) },
  2755. // { values: this.current_devices }
  2756. // ]
  2757. } else {
  2758. }
  2759. }
  2760. })
  2761. .catch(err => {
  2762. this.$message.error(err);
  2763. });
  2764. this.tzDialogVisible = false;
  2765. this.jhDialogVisible = true;
  2766. break;
  2767. case 3:
  2768. this.changeSchedule = {
  2769. mode_id: "",
  2770. schedule_type: "",
  2771. partition_id: "",
  2772. bed_id: "",
  2773. schedule_week: "",
  2774. partition_type: ""
  2775. };
  2776. this.tzDialogVisible = false;
  2777. this.msDialogVisible = true;
  2778. break;
  2779. default:
  2780. break;
  2781. }
  2782. },
  2783. setSchedule() {
  2784. var that = this;
  2785. var submitFlag = true;
  2786. if (this.currentData.patient_id <= 0) {
  2787. this.$message.error("请先选择患者");
  2788. return false;
  2789. }
  2790. if (
  2791. this.currentData.schedule_date.length == 0 ||
  2792. this.currentData.schedule_type < 1 ||
  2793. this.currentData.schedule_type > 3 ||
  2794. this.currentData.bed_id < 1 ||
  2795. this.currentData.partition_id < 1 ||
  2796. this.currentData.schedule_week < 1 ||
  2797. this.currentData.schedule_week > 7
  2798. ) {
  2799. this.$message.error("请先选择排班时间或机号");
  2800. return false;
  2801. }
  2802. // 可能
  2803. // 患者有传染病,与选择的机器类型(传染病)不匹配
  2804. // 患者没有传染病,但机器是某个传染病的专用透析器
  2805. // 机器的透析模式与患者不匹配
  2806. if (this.currentData.contagions.length > 0) {
  2807. var cflag = false;
  2808. this.currentData.contagions.forEach(function (contagion) {
  2809. if (contagion.disease_id == that.currentData.partition_type) {
  2810. cflag = true;
  2811. }
  2812. });
  2813. if (!cflag) {
  2814. this.$confirm(
  2815. "此患者有传染病,与此透析机不匹配,确定在此排班吗?",
  2816. "提示",
  2817. {
  2818. confirmButtonText: "确 定",
  2819. cancelButtonText: "取 消",
  2820. type: "warning"
  2821. }
  2822. )
  2823. .then(() => {
  2824. this.CreateSchedule(
  2825. this.currentData.patient_id,
  2826. this.currentData
  2827. );
  2828. })
  2829. .catch(() => { });
  2830. } else {
  2831. this.CreateSchedule(this.currentData.patient_id, this.currentData);
  2832. }
  2833. } else if (that.currentData.partition_type > 1) {
  2834. this.$confirm(
  2835. "此患者没有传染病,与此透析机不匹配,确定在此排班吗?",
  2836. "提示",
  2837. {
  2838. confirmButtonText: "确 定",
  2839. cancelButtonText: "取 消",
  2840. type: "warning"
  2841. }
  2842. )
  2843. .then(() => {
  2844. this.CreateSchedule(this.currentData.patient_id, this.currentData);
  2845. })
  2846. .catch(() => { });
  2847. } else {
  2848. this.CreateSchedule(this.currentData.patient_id, this.currentData);
  2849. }
  2850. },
  2851. weekType(weekTime) {
  2852. var theType = 2;
  2853. switch (weekTime) {
  2854. // case "historyWeek":
  2855. // theType = 0;
  2856. // break;
  2857. case "lastWeek":
  2858. theType = 1;
  2859. break;
  2860. case "thisWeek":
  2861. theType = 2;
  2862. break;
  2863. case "nextWeek":
  2864. theType = 3;
  2865. break;
  2866. case "nextTwoWeek":
  2867. theType = 4;
  2868. break;
  2869. default:
  2870. theType = 2;
  2871. break;
  2872. }
  2873. return theType;
  2874. },
  2875. dayType(theType) {
  2876. var jType = "";
  2877. switch (theType) {
  2878. case 1:
  2879. jType = "上午";
  2880. break;
  2881. case 2:
  2882. jType = "下午";
  2883. break;
  2884. case 3:
  2885. jType = "晚上";
  2886. break;
  2887. default:
  2888. break;
  2889. }
  2890. return jType;
  2891. },
  2892. weekPath(week, schedule_type) {
  2893. var weekArr = {
  2894. 1: "Mon",
  2895. 2: "Tue",
  2896. 3: "Wed",
  2897. 4: "Thurs",
  2898. 5: "Fri",
  2899. 6: "Sat",
  2900. 7: "Sun"
  2901. };
  2902. var typeArr = { 1: "M", 2: "A", 3: "N" };
  2903. if (
  2904. typeof weekArr[week] === "undefined" ||
  2905. typeof typeArr[schedule_type] === "undefined"
  2906. ) {
  2907. return [];
  2908. }
  2909. return [weekArr[week], typeArr[schedule_type]];
  2910. },
  2911. weekDay(prop) {
  2912. var week = prop.split("_");
  2913. if (week.length != 2) {
  2914. return [-1, -1];
  2915. }
  2916. var w = -1;
  2917. var n = -1;
  2918. switch (week[0]) {
  2919. case "Mon":
  2920. w = 1;
  2921. break;
  2922. case "Tue":
  2923. w = 2;
  2924. break;
  2925. case "Wed":
  2926. w = 3;
  2927. break;
  2928. case "Thurs":
  2929. w = 4;
  2930. break;
  2931. case "Fri":
  2932. w = 5;
  2933. break;
  2934. case "Sat":
  2935. w = 6;
  2936. break;
  2937. case "Sun":
  2938. w = 7;
  2939. break;
  2940. default:
  2941. w = -1;
  2942. break;
  2943. }
  2944. switch (week[1]) {
  2945. case "M":
  2946. n = 1;
  2947. break;
  2948. case "A":
  2949. n = 2;
  2950. break;
  2951. case "N":
  2952. n = 3;
  2953. break;
  2954. default:
  2955. n = -1;
  2956. break;
  2957. }
  2958. if (w == -1 || n == -1) {
  2959. return [-1, -1];
  2960. }
  2961. return [w, n];
  2962. },
  2963. // 搜索
  2964. search: function () {
  2965. let week_type = 0
  2966. var weeklist = moment().format('E');//计算今天是这周第几天
  2967. var first_monday = moment().subtract(weeklist - 1, 'days').format('YYYY-MM-DD');//周一日期
  2968. var end_monday = moment().add(7 - weeklist, 'days').format('YYYY-MM-DD')
  2969. if (this.weekTime == 'thisWeek') {
  2970. week_type = 1
  2971. } else if (this.weekTime == 'nextWeek') {
  2972. week_type = 2
  2973. } else if (this.weekTime == 'nextTwoWeek') {
  2974. week_type = 3
  2975. }
  2976. const params = {
  2977. keywords: this.keywords,
  2978. week_type: week_type,
  2979. start_sch: first_monday,
  2980. end_sch: end_monday,
  2981. };
  2982. // console.log("params",params)
  2983. getSearchResult(params).then(response => {
  2984. if (response.data.state == 1) {
  2985. this.schedulePatients = response.data.data.schdules;
  2986. this.searchTableVisible = true;
  2987. }
  2988. });
  2989. },
  2990. // 搜索弹窗调整机号按钮
  2991. changeMachineNumber: function (index, row) {
  2992. this.currentData.schedule_type = row.schedule_type;
  2993. this.currentData.bed_id = row.bed_id;
  2994. this.currentData.partition_id = row.partition_id;
  2995. this.currentData.schedule_week = row.schedule_week;
  2996. switch (row.schedule_type) {
  2997. case 1:
  2998. this.currentData.type_name = "上午";
  2999. break;
  3000. case 2:
  3001. this.currentData.type_name = "下午";
  3002. break;
  3003. case 3:
  3004. this.currentData.type_name = "晚上";
  3005. break;
  3006. }
  3007. this.currentData.zone_name = row.zone.name;
  3008. this.currentData.bed_name = row.number.number;
  3009. this.currentData.partition_type = row.zone.type;
  3010. this.currentData.mode_id = row.mode_id;
  3011. this.currentData.patient_id = row.patient_id;
  3012. this.currentData.patient = row.patient;
  3013. this.currentData.contagions = row.patient_contagions;
  3014. this.currentData.id = row.id;
  3015. this.currentData.schedule_date = uParseTime(
  3016. row.schedule_date,
  3017. "{y}-{m}-{d}"
  3018. );
  3019. this.zone_name = row.partition_id;
  3020. this.device_id = row.bed_id;
  3021. // this.current_devices = this.partitions[row.partition_id].jihaos
  3022. let params = {
  3023. zone_id: row.partition_id,
  3024. sch_type: row.schedule_type,
  3025. schedule_date: this.currentData.schedule_date,
  3026. patient_id: this.currentData.patient_id,
  3027. };
  3028. //进行网络请求,获取空排班机位
  3029. getSmartDevices(params).then((response) => {
  3030. if (response.data.state == 0) {
  3031. return false;
  3032. } else {
  3033. var devices = response.data.data.devices;
  3034. this.current_devices = [];
  3035. this.current_devices = devices;
  3036. this.device_id = devices[0].id
  3037. }
  3038. });
  3039. this.changeSchedule = {
  3040. mode_id: row.mode_id,
  3041. schedule_type: row.schedule_type,
  3042. partition_id: row.partition_id,
  3043. bed_id: row.bed_id,
  3044. schedule_week: row.schedule_week,
  3045. partition_type: ""
  3046. };
  3047. if (typeof this.partitions[row.partition_id].jihaos !== "undefined") {
  3048. this.jihaos = this.partitions[row.partition_id].jihaos;
  3049. } else {
  3050. this.jihaos = [];
  3051. }
  3052. this.searchTableVisible = false;
  3053. this.jhDialogVisible = true;
  3054. },
  3055. getDialysisDate: function (row) {
  3056. let week = "";
  3057. switch (row.schedule_week) {
  3058. case 7:
  3059. week = "周日";
  3060. break;
  3061. case 1:
  3062. week = "周一";
  3063. break;
  3064. case 2:
  3065. week = "周二";
  3066. break;
  3067. case 3:
  3068. week = "周三";
  3069. break;
  3070. case 4:
  3071. week = "周四";
  3072. break;
  3073. case 5:
  3074. week = "周五";
  3075. break;
  3076. case 6:
  3077. week = "周六";
  3078. break;
  3079. }
  3080. return week + "(" + uParseTime(row.schedule_date, "{y}-{m}-{d}") + ")";
  3081. },
  3082. getSchedulesType: function (type, row) {
  3083. let type_name = "";
  3084. switch (type) {
  3085. case 1:
  3086. type_name = "上午";
  3087. break;
  3088. case 2:
  3089. type_name = "下午";
  3090. break;
  3091. case 3:
  3092. type_name = "晚上";
  3093. break;
  3094. }
  3095. return type_name;
  3096. },
  3097. // 搜索弹窗调整模式按钮
  3098. changeMode: function (index, row) {
  3099. this.changeSchedule = {
  3100. mode_id: "",
  3101. schedule_type: "",
  3102. partition_id: "",
  3103. bed_id: "",
  3104. schedule_week: "",
  3105. partition_type: ""
  3106. };
  3107. this.currentData.id = row.id;
  3108. this.searchTableVisible = false;
  3109. this.msDialogVisible = true;
  3110. },
  3111. // 分区
  3112. getAllZones() {
  3113. getAllZones().then(response => {
  3114. console.log('getAllZones',response.data.data);
  3115. if (response.data.state == 1) {
  3116. var zones = response.data.data.zones
  3117. for (let i = 0; i < zones.length; i++) {
  3118. this.zoneIdList.push(zones[i].id)
  3119. }
  3120. this.zones.push(...zones)
  3121. var strArr = this.zoneIdList.join(",")
  3122. this.strArr = strArr
  3123. this.getWeekPanels()
  3124. }
  3125. })
  3126. },
  3127. changePartiton(val) {
  3128. this.$emit('event1', val)
  3129. this.partition_id = val
  3130. this.getWeekPanels()
  3131. this.getSchedules()
  3132. },
  3133. changeSchedule_type(val) {
  3134. this.$emit('event2', val)
  3135. this.schedule_type = val
  3136. this.getSchedules()
  3137. },
  3138. changeWeekDay(val) {
  3139. this.$emit('event3', val)
  3140. }
  3141. },
  3142. components: {
  3143. ScheduleItem
  3144. },
  3145. mounted() {
  3146. this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 120;
  3147. // var theType = this.weekType(this.weekTime);
  3148. // this.getSchedules(theType);
  3149. const that = this;
  3150. window.onresize = () => {
  3151. return (() => {
  3152. window.fullHeight = document.documentElement.clientHeight;
  3153. if (window.fullHeight < 200) {
  3154. that.tableHeight = 200;
  3155. } else {
  3156. that.tableHeight = window.fullHeight - 160;
  3157. }
  3158. })();
  3159. };
  3160. },
  3161. computed: {
  3162. // 计算属性,为最后一项数据添加边框样式
  3163. lastItemStyle() {
  3164. return {
  3165. border: '1px solid red', // 边框样式
  3166. };
  3167. },
  3168. },
  3169. };
  3170. </script>
  3171. <style rel="stylesheet/css" lang="scss">
  3172. *{
  3173. -webkit-touch-callout:none; /*系统默认菜单被禁用*/
  3174. -webkit-user-select:none; /*webkit浏览器*/
  3175. -khtml-user-select:none; /*早期浏览器*/
  3176. -moz-user-select:none;/*火狐*/
  3177. -ms-user-select:none; /*IE10*/
  3178. user-select:none;
  3179. }
  3180. input{
  3181. -webkit-user-select:auto; /*webkit浏览器*/
  3182. }
  3183. textarea{
  3184. -webkit-user-select:auto; /*webkit浏览器*/
  3185. }
  3186. .tiaozhengclass {
  3187. display: block;
  3188. margin: 0 auto;
  3189. }
  3190. .center-tab{
  3191. .el-table .cell{
  3192. padding: 0px 0px !important;
  3193. white-space: pre-wrap;
  3194. }
  3195. }
  3196. .el-table--medium td, .el-table--medium th {
  3197. padding: 5px 0 !important;
  3198. }
  3199. .schedule-table-row {
  3200. background: #fff !important;
  3201. }
  3202. .schedule-table-row:hover {
  3203. background: #fff !important;
  3204. }
  3205. .schedule-table-row td:hover {
  3206. background: rgb(88, 162, 236) !important;
  3207. }
  3208. .el-table {
  3209. font-size: 12px !important;
  3210. }
  3211. .schedule-table-row td .cell {
  3212. font-size: 10px;
  3213. white-space:normal !important;
  3214. // normal
  3215. }
  3216. .schedule-table-cell-disable {
  3217. background-color: rgb(248, 241, 241) !important;
  3218. }
  3219. #table_data {
  3220. min-height: calc(100vh - 350px);
  3221. .switch{
  3222. margin-left: 10px;
  3223. }
  3224. }
  3225. #table_data ::-webkit-scrollbar {
  3226. height: 15px;
  3227. }
  3228. .el-table td,
  3229. .el-table th.is-leaf,
  3230. .el-table--border,
  3231. .el-table--group {
  3232. border-color: #d0d3da;
  3233. }
  3234. .el-table--border::after,
  3235. .el-table--group::after,
  3236. .el-table::before {
  3237. background-color: #d0d3da;
  3238. }
  3239. .el-table--border th {
  3240. border-color: #d0d3da;
  3241. }
  3242. .el-table--border td {
  3243. border-color: #d0d3da;
  3244. }
  3245. .el-table td {
  3246. border-color: #d0d3da;
  3247. }
  3248. #table_data {
  3249. .el-table__body tr.current-row > td {
  3250. background-color: #ecf5ff !important;
  3251. color: #3a8ee6;
  3252. }
  3253. .el-table__body tr > td:hover {
  3254. background-color: #409eff !important;
  3255. color: #fff;
  3256. }
  3257. .el-table__body tr .hover-td {
  3258. background-color: #409eff !important;
  3259. color: #fff;
  3260. }
  3261. .Infectious_disease{
  3262. background-color: red !important;
  3263. color: white;
  3264. border-left: 1px solid aqua;
  3265. border-right: 1px solid aqua;
  3266. }
  3267. .border_bott{
  3268. border-left: 1px solid aqua;
  3269. border-right: 1px solid aqua;
  3270. }
  3271. .border_left{
  3272. border-left: 1px solid aqua;
  3273. }
  3274. .evening_border{
  3275. border-right: 1px solid aqua;
  3276. }
  3277. }
  3278. .backPurple{
  3279. color: #f32424 !important;
  3280. }
  3281. .eldialog{
  3282. .el-dialog__headerbtn {
  3283. // position: absolute;
  3284. // top: 20px;
  3285. // right: 20px;
  3286. // padding: 0;
  3287. // background: 0 0;
  3288. // border: none;
  3289. // outline: 0;
  3290. // cursor: pointer;
  3291. // font-size: 16px;
  3292. z-index: 3 !important;
  3293. }
  3294. }
  3295. // .el-table td .cell{
  3296. // padding: 0px 0px !important;
  3297. // }
  3298. </style>