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

editTableData.vue 160KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132
  1. <template>
  2. <div id="table_data">
  3. <div class="table_contain">
  4. <div class="left_contain">
  5. <div
  6. class="cell clearfix"
  7. v-if="
  8. weekTime == 'thisWeek' ||
  9. weekTime == 'nextWeek' ||
  10. weekTime == 'nextTwoWeek'
  11. "
  12. >
  13. <el-input
  14. size="small"
  15. style="width: 200px"
  16. class="filter-item"
  17. v-model.trim="keywords"
  18. placeholder="病人名称/透析号"
  19. @keyup.enter.native="search"
  20. />
  21. <el-button
  22. size="small"
  23. class="filter-item"
  24. type="primary"
  25. icon="el-icon-search"
  26. @click="search"
  27. >搜索</el-button
  28. >
  29. </div>
  30. <div style="margin-bottom: 10px; display: flex">
  31. <h3 style="line-height: 45px">
  32. <span
  33. style="margin-right: 30px; font-size: 16px; white-space: nowrap"
  34. >当前选择</span
  35. >
  36. </h3>
  37. <div style="line-height: 30px">
  38. <div
  39. draggable="true"
  40. @dragstart="dragstartTwo($event)"
  41. @dragend="dragendTwo($event)"
  42. class="item"
  43. style="font-weight: bolder"
  44. >
  45. <span>{{ cur_info.patient_name }}</span>
  46. &nbsp;&nbsp;
  47. <span>{{ cur_info.mode_name }}</span>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="patient_mode">
  52. <el-table
  53. :row-style="{ color: '#303133' }"
  54. :header-cell-style="{
  55. backgroundColor: 'rgb(245, 247, 250)',
  56. color: '#606266',
  57. }"
  58. :data="patientList"
  59. height="550"
  60. border
  61. @row-click="patientClick"
  62. highlight-current-row
  63. ref="patient_table"
  64. style="width: 100%; margin-right: 14px"
  65. >
  66. <el-table-column
  67. prop="name"
  68. label="患者名称"
  69. width="104"
  70. align="center"
  71. >
  72. </el-table-column>
  73. </el-table>
  74. <el-table
  75. :row-style="{ color: '#303133' }"
  76. :header-cell-style="{
  77. backgroundColor: 'rgb(245, 247, 250)',
  78. color: '#606266',
  79. }"
  80. :data="modes"
  81. height="550"
  82. highlight-current-row
  83. ref="mode_table"
  84. @row-click="modeClick"
  85. border
  86. style="width: 100%"
  87. >
  88. <el-table-column
  89. prop="name"
  90. label="透析模式"
  91. width="104"
  92. align="center"
  93. ></el-table-column>
  94. </el-table>
  95. </div>
  96. </div>
  97. <div class="right_contain">
  98. <span>日期:</span>
  99. <el-select v-model="week_type" style="margin-bottom: 15px;" placeholder="请选择" multiple>
  100. <el-option
  101. v-for="(item, index) in week_zhongwens"
  102. :key="index"
  103. :label="item"
  104. :value="item"
  105. >
  106. </el-option>
  107. </el-select>
  108. <span>分区:</span>
  109. <el-select
  110. v-model="partition_id"
  111. multiple
  112. placeholder="请选择"
  113. @change="changePartiton"
  114. >
  115. <el-option
  116. v-for="item in this.zones"
  117. :key="item.id"
  118. :label="item.name"
  119. :value="item.id"
  120. >
  121. </el-option>
  122. </el-select>
  123. <!-- <div class="select_list">-->
  124. <!-- <span style="">班次:</span>-->
  125. <!-- <el-select-->
  126. <!-- v-model="schedule_type"-->
  127. <!-- placeholder="请选择"-->
  128. <!-- @change="changeSchedule_type"-->
  129. <!-- >-->
  130. <!-- <el-option-->
  131. <!-- v-for="item in options"-->
  132. <!-- :key="item.id"-->
  133. <!-- :label="item.name"-->
  134. <!-- :value="item.id"-->
  135. <!-- >-->
  136. <!-- </el-option>-->
  137. <!-- </el-select>-->
  138. <!-- <span>日期:</span>-->
  139. <!-- <el-select-->
  140. <!-- v-model="schedule_type"-->
  141. <!-- placeholder="请选择"-->
  142. <!-- @change="changeSchedule_type"-->
  143. <!-- >-->
  144. <!-- <el-option-->
  145. <!-- v-for="item in options"-->
  146. <!-- :key="item.id"-->
  147. <!-- :label="item.name"-->
  148. <!-- :value="item.id"-->
  149. <!-- >-->
  150. <!-- </el-option>-->
  151. <!-- </el-select>-->
  152. <!-- <span>分区:</span>-->
  153. <!-- <el-select-->
  154. <!-- v-model="partition_id"-->
  155. <!-- multiple-->
  156. <!-- placeholder="请选择"-->
  157. <!-- @change="changePartiton"-->
  158. <!-- >-->
  159. <!-- <el-option-->
  160. <!-- v-for="item in this.zones"-->
  161. <!-- :key="item.id"-->
  162. <!-- :label="item.name"-->
  163. <!-- :value="item.id"-->
  164. <!-- >-->
  165. <!-- </el-option>-->
  166. <!-- </el-select>-->
  167. <!-- <span>周次:</span>-->
  168. <!-- <el-select-->
  169. <!-- v-model="schedule_type"-->
  170. <!-- placeholder="请选择"-->
  171. <!-- @change="changeSchedule_type"-->
  172. <!-- >-->
  173. <!-- <el-option-->
  174. <!-- v-for="item in options"-->
  175. <!-- :key="item.id"-->
  176. <!-- :label="item.name"-->
  177. <!-- :value="item.id"-->
  178. <!-- >-->
  179. <!-- </el-option>-->
  180. <!-- </el-select>-->
  181. <!-- </div>-->
  182. <el-table
  183. :row-style="{ color: '#303133' }"
  184. :header-cell-style="{
  185. backgroundColor: 'rgb(245, 247, 250)',
  186. color: '#606266',
  187. }"
  188. :data="scheduleZone"
  189. :span-method="objectSpanMethod"
  190. @cell-click="clickThis"
  191. @cell-mouse-enter="hoverMouse"
  192. :summary-method="getSummaries"
  193. show-summary
  194. :row-class-name="tableRowClassName"
  195. :cell-class-name="cellClass"
  196. sum-text="总数"
  197. :height="tableContainHeight"
  198. ref="table"
  199. style="width: 100%; cursor: pointer"
  200. >
  201. <el-table-column
  202. prop="area"
  203. label="分区"
  204. width="60"
  205. align="center"
  206. fixed
  207. ></el-table-column>
  208. <el-table-column
  209. prop="cut"
  210. label="机号"
  211. width="60"
  212. align="center"
  213. fixed
  214. ></el-table-column>
  215. <el-table-column
  216. :label="'周一 (' + weekTitle[0] + ')'"
  217. width="335"
  218. v-if="isShowOne"
  219. align="center"
  220. >
  221. <el-table-column prop="Mon_M" label="上" width="110" align="center">
  222. <template slot-scope="scope">
  223. <div class="del_table_btn">
  224. <el-button
  225. type="danger"
  226. size="mini"
  227. icon="el-icon-close"
  228. circle
  229. @click.stop="deletePatientMode(scope.row.Mon_M)"
  230. ></el-button>
  231. </div>
  232. <div
  233. @drop="
  234. drop(
  235. $event,
  236. 'Mon_M',
  237. scope.row.index,
  238. scope.row.Mon_M,
  239. scope.row
  240. )
  241. "
  242. @dragover="allowDrop"
  243. @dragover.prevent
  244. >
  245. <schedule-item
  246. :schedule-detail="scope.row.Mon_M"
  247. :draggable="scope.row.Mon_M ? 'true' : 'false'"
  248. class="contitem"
  249. :style="{
  250. cursor: scope.row.Mon_M ? 'move' : 'default',
  251. }"
  252. @dragstart="
  253. drag(
  254. $event,
  255. 'Mon_M',
  256. scope.row.index,
  257. scope.row.Mon_M,
  258. scope.row
  259. )
  260. "
  261. >
  262. </schedule-item>
  263. </div>
  264. </template>
  265. </el-table-column>
  266. <el-table-column prop="Mon_A" label="下" width="110" align="center">
  267. <template slot-scope="scope">
  268. <div class="del_table_btn">
  269. <el-button
  270. type="danger"
  271. size="mini"
  272. icon="el-icon-close"
  273. circle
  274. @click.stop="deletePatientMode(scope.row.Mon_A)"
  275. ></el-button>
  276. </div>
  277. <div
  278. @drop="
  279. drop(
  280. $event,
  281. 'Mon_A',
  282. scope.row.index,
  283. scope.row.Mon_A,
  284. scope.row
  285. )
  286. "
  287. @dragover="allowDrop"
  288. >
  289. <schedule-item
  290. :schedule-detail="scope.row.Mon_A"
  291. :draggable="scope.row.Mon_A ? 'true' : 'false'"
  292. class="contitem"
  293. :style="{
  294. cursor: scope.row.Mon_A ? 'move' : 'default',
  295. }"
  296. @dragstart="
  297. drag(
  298. $event,
  299. 'Mon_A',
  300. scope.row.index,
  301. scope.row.Mon_A,
  302. scope.row
  303. )
  304. "
  305. ></schedule-item>
  306. </div>
  307. </template>
  308. </el-table-column>
  309. <el-table-column prop="Mon_N" label="晚" width="110" align="center">
  310. <template slot-scope="scope">
  311. <div class="del_table_btn">
  312. <el-button
  313. type="danger"
  314. size="mini"
  315. icon="el-icon-close"
  316. circle
  317. @click.stop="deletePatientMode(scope.row.Mon_N)"
  318. ></el-button>
  319. </div>
  320. <div
  321. @drop="
  322. drop(
  323. $event,
  324. 'Mon_N',
  325. scope.row.index,
  326. scope.row.Mon_N,
  327. scope.row
  328. )
  329. "
  330. @dragover="allowDrop"
  331. >
  332. <schedule-item
  333. :schedule-detail="scope.row.Mon_N"
  334. :draggable="scope.row.Mon_N ? 'true' : 'false'"
  335. class="contitem"
  336. :style="{
  337. cursor: scope.row.Mon_N ? 'move' : 'default',
  338. }"
  339. @dragstart="
  340. drag(
  341. $event,
  342. 'Mon_N',
  343. scope.row.index,
  344. scope.row.Mon_N,
  345. scope.row
  346. )
  347. "
  348. ></schedule-item>
  349. </div>
  350. </template>
  351. </el-table-column>
  352. </el-table-column>
  353. <el-table-column
  354. :label="'周二 (' + weekTitle[1] + ')'"
  355. width="335"
  356. v-if="isShowTwo"
  357. align="center"
  358. >
  359. <el-table-column prop="Tue_M" label="上" width="110" align="center">
  360. <template slot-scope="scope">
  361. <div class="del_table_btn">
  362. <el-button
  363. type="danger"
  364. size="mini"
  365. icon="el-icon-close"
  366. circle
  367. @click.stop="deletePatientMode(scope.row.Tue_M)"
  368. ></el-button>
  369. </div>
  370. <div
  371. @drop="
  372. drop(
  373. $event,
  374. 'Tue_M',
  375. scope.row.index,
  376. scope.row.Tue_M,
  377. scope.row
  378. )
  379. "
  380. @dragover="allowDrop"
  381. >
  382. <schedule-item
  383. :schedule-detail="scope.row.Tue_M"
  384. :draggable="scope.row.Tue_M ? 'true' : 'false'"
  385. class="contitem"
  386. :style="{
  387. cursor: scope.row.Tue_M ? 'move' : 'default',
  388. }"
  389. @dragstart="
  390. drag(
  391. $event,
  392. 'Tue_M',
  393. scope.row.index,
  394. scope.row.Tue_M,
  395. scope.row
  396. )
  397. "
  398. >
  399. </schedule-item>
  400. </div>
  401. </template>
  402. </el-table-column>
  403. <el-table-column prop="Tue_A" label="下" width="110" align="center">
  404. <template slot-scope="scope">
  405. <div class="del_table_btn">
  406. <el-button
  407. type="danger"
  408. size="mini"
  409. icon="el-icon-close"
  410. circle
  411. @click.stop="deletePatientMode(scope.row.Tue_A)"
  412. ></el-button>
  413. </div>
  414. <div
  415. @drop="
  416. drop(
  417. $event,
  418. 'Tue_A',
  419. scope.row.index,
  420. scope.row.Tue_A,
  421. scope.row
  422. )
  423. "
  424. @dragover="allowDrop"
  425. >
  426. <schedule-item
  427. :schedule-detail="scope.row.Tue_A"
  428. :draggable="scope.row.Tue_A ? 'true' : 'false'"
  429. class="contitem"
  430. :style="{
  431. cursor: scope.row.Tue_A ? 'move' : 'default',
  432. }"
  433. @dragstart="
  434. drag(
  435. $event,
  436. 'Tue_A',
  437. scope.row.index,
  438. scope.row.Tue_A,
  439. scope.row
  440. )
  441. "
  442. ></schedule-item>
  443. </div>
  444. </template>
  445. </el-table-column>
  446. <el-table-column prop="Tue_N" label="晚" width="110" align="center">
  447. <template slot-scope="scope">
  448. <div class="del_table_btn">
  449. <el-button
  450. type="danger"
  451. size="mini"
  452. icon="el-icon-close"
  453. circle
  454. @click.stop="deletePatientMode(scope.row.Tue_N)"
  455. ></el-button>
  456. </div>
  457. <div
  458. @drop="
  459. drop(
  460. $event,
  461. 'Tue_N',
  462. scope.row.index,
  463. scope.row.Tue_N,
  464. scope.row
  465. )
  466. "
  467. @dragover="allowDrop"
  468. >
  469. <schedule-item
  470. :schedule-detail="scope.row.Tue_N"
  471. :draggable="scope.row.Tue_N ? 'true' : 'false'"
  472. class="contitem"
  473. :style="{
  474. cursor: scope.row.Tue_N ? 'move' : 'default',
  475. }"
  476. @dragstart="
  477. drag(
  478. $event,
  479. 'Tue_N',
  480. scope.row.index,
  481. scope.row.Tue_N,
  482. scope.row
  483. )
  484. "
  485. ></schedule-item>
  486. </div>
  487. </template>
  488. </el-table-column>
  489. </el-table-column>
  490. <el-table-column
  491. :label="'周三 (' + weekTitle[2] + ')'"
  492. width="335"
  493. v-if="isShowThree"
  494. align="center"
  495. >
  496. <el-table-column prop="Wed_M" label="上" width="110" align="center">
  497. <template slot-scope="scope">
  498. <div class="del_table_btn">
  499. <el-button
  500. type="danger"
  501. size="mini"
  502. icon="el-icon-close"
  503. circle
  504. @click.stop="deletePatientMode(scope.row.Wed_M)"
  505. ></el-button>
  506. </div>
  507. <div
  508. @drop="
  509. drop(
  510. $event,
  511. 'Wed_M',
  512. scope.row.index,
  513. scope.row.Wed_M,
  514. scope.row
  515. )
  516. "
  517. @dragover="allowDrop"
  518. >
  519. <schedule-item
  520. :schedule-detail="scope.row.Wed_M"
  521. :draggable="scope.row.Wed_M ? 'true' : 'false'"
  522. class="contitem"
  523. :style="{
  524. cursor: scope.row.Wed_M ? 'move' : 'default',
  525. }"
  526. @dragstart="
  527. drag(
  528. $event,
  529. 'Wed_M',
  530. scope.row.index,
  531. scope.row.Wed_M,
  532. scope.row
  533. )
  534. "
  535. ></schedule-item>
  536. </div>
  537. </template>
  538. </el-table-column>
  539. <el-table-column prop="Wed_A" label="下" width="110" align="center">
  540. <template slot-scope="scope">
  541. <div class="del_table_btn">
  542. <el-button
  543. type="danger"
  544. size="mini"
  545. icon="el-icon-close"
  546. circle
  547. @click.stop="deletePatientMode(scope.row.Wed_A)"
  548. ></el-button>
  549. </div>
  550. <div
  551. @drop="
  552. drop(
  553. $event,
  554. 'Wed_A',
  555. scope.row.index,
  556. scope.row.Wed_A,
  557. scope.row
  558. )
  559. "
  560. @dragover="allowDrop"
  561. >
  562. <schedule-item
  563. :schedule-detail="scope.row.Wed_A"
  564. :draggable="scope.row.Wed_A ? 'true' : 'false'"
  565. class="contitem"
  566. :style="{
  567. cursor: scope.row.Wed_A ? 'move' : 'default',
  568. }"
  569. @dragstart="
  570. drag(
  571. $event,
  572. 'Wed_A',
  573. scope.row.index,
  574. scope.row.Wed_A,
  575. scope.row
  576. )
  577. "
  578. ></schedule-item>
  579. </div>
  580. </template>
  581. </el-table-column>
  582. <el-table-column prop="Wed_N" label="晚" width="110" align="center">
  583. <template slot-scope="scope">
  584. <div class="del_table_btn">
  585. <el-button
  586. type="danger"
  587. size="mini"
  588. icon="el-icon-close"
  589. circle
  590. @click.stop="deletePatientMode(scope.row.Wed_N)"
  591. ></el-button>
  592. </div>
  593. <div
  594. @drop="
  595. drop(
  596. $event,
  597. 'Wed_N',
  598. scope.row.index,
  599. scope.row.Wed_N,
  600. scope.row
  601. )
  602. "
  603. @dragover="allowDrop"
  604. >
  605. <schedule-item
  606. :schedule-detail="scope.row.Wed_N"
  607. :draggable="scope.row.Wed_N ? 'true' : 'false'"
  608. class="contitem"
  609. :style="{
  610. cursor: scope.row.Wed_N ? 'move' : 'default',
  611. }"
  612. @dragstart="
  613. drag(
  614. $event,
  615. 'Wed_N',
  616. scope.row.index,
  617. scope.row.Wed_N,
  618. scope.row
  619. )
  620. "
  621. ></schedule-item>
  622. </div>
  623. </template>
  624. </el-table-column>
  625. </el-table-column>
  626. <el-table-column
  627. :label="'周四 (' + weekTitle[3] + ')'"
  628. width="335"
  629. align="center"
  630. v-if="isShowFour"
  631. >
  632. <el-table-column
  633. prop="Thurs_M"
  634. label="上"
  635. width="110"
  636. align="center"
  637. >
  638. <template slot-scope="scope">
  639. <div class="del_table_btn">
  640. <el-button
  641. type="danger"
  642. size="mini"
  643. icon="el-icon-close"
  644. circle
  645. @click.stop="deletePatientMode(scope.row.Thurs_M)"
  646. ></el-button>
  647. </div>
  648. <div
  649. @drop="
  650. drop(
  651. $event,
  652. 'Thurs_M',
  653. scope.row.index,
  654. scope.row.Thurs_M,
  655. scope.row
  656. )
  657. "
  658. @dragover="allowDrop"
  659. >
  660. <schedule-item
  661. :schedule-detail="scope.row.Thurs_M"
  662. :draggable="scope.row.Thurs_M ? 'true' : 'false'"
  663. class="contitem"
  664. :style="{
  665. cursor: scope.row.Thurs_M ? 'move' : 'default',
  666. }"
  667. @dragstart="
  668. drag(
  669. $event,
  670. 'Thurs_M',
  671. scope.row.index,
  672. scope.row.Thurs_M
  673. )
  674. "
  675. ></schedule-item>
  676. </div>
  677. </template>
  678. </el-table-column>
  679. <el-table-column
  680. prop="Thurs_A"
  681. label="下"
  682. width="110"
  683. align="center"
  684. >
  685. <template slot-scope="scope">
  686. <div class="del_table_btn">
  687. <el-button
  688. type="danger"
  689. size="mini"
  690. icon="el-icon-close"
  691. circle
  692. @click.stop="deletePatientMode(scope.row.Thurs_A)"
  693. ></el-button>
  694. </div>
  695. <div
  696. @drop="
  697. drop(
  698. $event,
  699. 'Thurs_A',
  700. scope.row.index,
  701. scope.row.Thurs_A,
  702. scope.row
  703. )
  704. "
  705. @dragover="allowDrop"
  706. >
  707. <schedule-item
  708. :schedule-detail="scope.row.Thurs_A"
  709. :draggable="scope.row.Thurs_A ? 'true' : 'false'"
  710. class="contitem"
  711. :style="{
  712. cursor: scope.row.Thurs_A ? 'move' : 'default',
  713. }"
  714. @dragstart="
  715. drag(
  716. $event,
  717. 'Thurs_A',
  718. scope.row.index,
  719. scope.row.Thurs_A
  720. )
  721. "
  722. ></schedule-item>
  723. </div>
  724. </template>
  725. </el-table-column>
  726. <el-table-column
  727. prop="Thurs_N"
  728. label="晚"
  729. width="110"
  730. align="center"
  731. >
  732. <template slot-scope="scope">
  733. <div class="del_table_btn">
  734. <el-button
  735. type="danger"
  736. size="mini"
  737. icon="el-icon-close"
  738. circle
  739. @click.stop="deletePatientMode(scope.row.Thurs_N)"
  740. ></el-button>
  741. </div>
  742. <div
  743. @drop="
  744. drop(
  745. $event,
  746. 'Thurs_N',
  747. scope.row.index,
  748. scope.row.Thurs_N,
  749. scope.row
  750. )
  751. "
  752. @dragover="allowDrop"
  753. >
  754. <schedule-item
  755. :schedule-detail="scope.row.Thurs_N"
  756. :draggable="scope.row.Thurs_N ? 'true' : 'false'"
  757. class="contitem"
  758. :style="{
  759. cursor: scope.row.Thurs_N ? 'move' : 'default',
  760. }"
  761. @dragstart="
  762. drag(
  763. $event,
  764. 'Thurs_N',
  765. scope.row.index,
  766. scope.row.Thurs_N
  767. )
  768. "
  769. ></schedule-item>
  770. </div>
  771. </template>
  772. </el-table-column>
  773. </el-table-column>
  774. <el-table-column
  775. :label="'周五 (' + weekTitle[4] + ')'"
  776. width="335"
  777. align="center"
  778. v-if="isShowFive"
  779. >
  780. <el-table-column prop="Fri_M" label="上" width="110" align="center">
  781. <template slot-scope="scope">
  782. <div class="del_table_btn">
  783. <el-button
  784. type="danger"
  785. size="mini"
  786. icon="el-icon-close"
  787. circle
  788. @click.stop="deletePatientMode(scope.row.Fri_M)"
  789. ></el-button>
  790. </div>
  791. <div
  792. @drop="
  793. drop(
  794. $event,
  795. 'Fri_M',
  796. scope.row.index,
  797. scope.row.Fri_M,
  798. scope.row
  799. )
  800. "
  801. @dragover="allowDrop"
  802. >
  803. <schedule-item
  804. :schedule-detail="scope.row.Fri_M"
  805. :draggable="scope.row.Fri_M ? 'true' : 'false'"
  806. class="contitem"
  807. :style="{ cursor: scope.row.Fri_M ? 'move' : 'default' }"
  808. @dragstart="
  809. drag(
  810. $event,
  811. 'Fri_M',
  812. scope.row.index,
  813. scope.row.Fri_M,
  814. scope.row
  815. )
  816. "
  817. >
  818. </schedule-item>
  819. </div>
  820. </template>
  821. </el-table-column>
  822. <el-table-column prop="Fri_A" label="下" width="110" align="center">
  823. <template slot-scope="scope">
  824. <div class="del_table_btn">
  825. <el-button
  826. type="danger"
  827. size="mini"
  828. icon="el-icon-close"
  829. circle
  830. @click.stop="deletePatientMode(scope.row.Fri_A)"
  831. ></el-button>
  832. </div>
  833. <div
  834. @drop="
  835. drop(
  836. $event,
  837. 'Fri_A',
  838. scope.row.index,
  839. scope.row.Fri_A,
  840. scope.row
  841. )
  842. "
  843. @dragover="allowDrop"
  844. >
  845. <schedule-item
  846. :schedule-detail="scope.row.Fri_A"
  847. :draggable="scope.row.Fri_A ? 'true' : 'false'"
  848. class="contitem"
  849. :style="{ cursor: scope.row.Fri_A ? 'move' : 'default' }"
  850. @dragstart="
  851. drag(
  852. $event,
  853. 'Fri_A',
  854. scope.row.index,
  855. scope.row.Fri_A,
  856. scope.row
  857. )
  858. "
  859. >
  860. ></schedule-item
  861. >
  862. </div>
  863. </template>
  864. </el-table-column>
  865. <el-table-column prop="Fri_N" label="晚" width="110" align="center">
  866. <template slot-scope="scope">
  867. <div class="del_table_btn">
  868. <el-button
  869. type="danger"
  870. size="mini"
  871. icon="el-icon-close"
  872. circle
  873. @click.stop="deletePatientMode(scope.row.Fri_N)"
  874. ></el-button>
  875. </div>
  876. <div
  877. @drop="
  878. drop(
  879. $event,
  880. 'Fri_N',
  881. scope.row.index,
  882. scope.row.Fri_N,
  883. scope.row
  884. )
  885. "
  886. @dragover="allowDrop"
  887. >
  888. <schedule-item
  889. :schedule-detail="scope.row.Fri_N"
  890. :draggable="scope.row.Fri_N ? 'true' : 'false'"
  891. class="contitem"
  892. :style="{ cursor: scope.row.Fri_N ? 'move' : 'default' }"
  893. @dragstart="
  894. drag(
  895. $event,
  896. 'Fri_N',
  897. scope.row.index,
  898. scope.row.Fri_N,
  899. scope.row
  900. )
  901. "
  902. >
  903. ></schedule-item
  904. >
  905. </div>
  906. </template>
  907. </el-table-column>
  908. </el-table-column>
  909. <el-table-column
  910. :label="'周六 (' + weekTitle[5] + ')'"
  911. width="335"
  912. align="center"
  913. v-if="isShowSix"
  914. >
  915. <el-table-column prop="Sat_M" label="上" width="110" align="center">
  916. <template slot-scope="scope">
  917. <div class="del_table_btn">
  918. <el-button
  919. type="danger"
  920. size="mini"
  921. icon="el-icon-close"
  922. circle
  923. @click.stop="deletePatientMode(scope.row.Sat_M)"
  924. ></el-button>
  925. </div>
  926. <div
  927. @drop="
  928. drop(
  929. $event,
  930. 'Sat_M',
  931. scope.row.index,
  932. scope.row.Sat_M,
  933. scope.row
  934. )
  935. "
  936. @dragover="allowDrop"
  937. >
  938. <schedule-item
  939. :schedule-detail="scope.row.Sat_M"
  940. :draggable="scope.row.Sat_M ? 'true' : 'false'"
  941. class="contitem"
  942. :style="{ cursor: scope.row.Sat_M ? 'move' : 'default' }"
  943. @dragstart="
  944. drag(
  945. $event,
  946. 'Sat_M',
  947. scope.row.index,
  948. scope.row.Sat_M,
  949. scope.row
  950. )
  951. "
  952. >
  953. ></schedule-item
  954. >
  955. </div>
  956. </template>
  957. </el-table-column>
  958. <el-table-column prop="Sat_A" label="下" width="110" align="center">
  959. <template slot-scope="scope">
  960. <div class="del_table_btn">
  961. <el-button
  962. type="danger"
  963. size="mini"
  964. icon="el-icon-close"
  965. circle
  966. @click.stop="deletePatientMode(scope.row.Sat_A)"
  967. ></el-button>
  968. </div>
  969. <div
  970. @drop="
  971. drop(
  972. $event,
  973. 'Sat_A',
  974. scope.row.index,
  975. scope.row.Sat_A,
  976. scope.row
  977. )
  978. "
  979. @dragover="allowDrop"
  980. >
  981. <schedule-item
  982. :schedule-detail="scope.row.Sat_A"
  983. :draggable="scope.row.Sat_A ? 'true' : 'false'"
  984. class="contitem"
  985. :style="{ cursor: scope.row.Sat_A ? 'move' : 'default' }"
  986. @dragstart="
  987. drag(
  988. $event,
  989. 'Sat_A',
  990. scope.row.index,
  991. scope.row.Sat_A,
  992. scope.row
  993. )
  994. "
  995. >
  996. ></schedule-item
  997. >
  998. </div>
  999. </template>
  1000. </el-table-column>
  1001. <el-table-column prop="Sat_N" label="晚" width="110" align="center">
  1002. <template slot-scope="scope">
  1003. <div class="del_table_btn">
  1004. <el-button
  1005. type="danger"
  1006. size="mini"
  1007. icon="el-icon-close"
  1008. circle
  1009. @click.stop="deletePatientMode(scope.row.Sat_N)"
  1010. ></el-button>
  1011. </div>
  1012. <div
  1013. @drop="
  1014. drop(
  1015. $event,
  1016. 'Sat_N',
  1017. scope.row.index,
  1018. scope.row.Sat_N,
  1019. scope.row
  1020. )
  1021. "
  1022. @dragover="allowDrop"
  1023. >
  1024. <schedule-item
  1025. :schedule-detail="scope.row.Sat_N"
  1026. :draggable="scope.row.Sat_N ? 'true' : 'false'"
  1027. class="contitem"
  1028. :style="{ cursor: scope.row.Sat_N ? 'move' : 'default' }"
  1029. @dragstart="
  1030. drag(
  1031. $event,
  1032. 'Sat_N',
  1033. scope.row.index,
  1034. scope.row.Sat_N,
  1035. scope.row
  1036. )
  1037. "
  1038. >
  1039. ></schedule-item
  1040. >
  1041. </div>
  1042. </template>
  1043. </el-table-column>
  1044. </el-table-column>
  1045. <el-table-column
  1046. :label="'周日 (' + weekTitle[6] + ')'"
  1047. min-width="335"
  1048. align="center"
  1049. v-if="isShowSeven"
  1050. >
  1051. <el-table-column
  1052. prop="Sun_M"
  1053. label="上"
  1054. min-width="110"
  1055. align="center"
  1056. >
  1057. <template slot-scope="scope">
  1058. <div class="del_table_btn">
  1059. <el-button
  1060. type="danger"
  1061. size="mini"
  1062. icon="el-icon-close"
  1063. circle
  1064. @click.stop="deletePatientMode(scope.row.Sun_M)"
  1065. ></el-button>
  1066. </div>
  1067. <div
  1068. @drop="
  1069. drop(
  1070. $event,
  1071. 'Sun_M',
  1072. scope.row.index,
  1073. scope.row.Sun_M,
  1074. scope.row
  1075. )
  1076. "
  1077. @dragover="allowDrop"
  1078. >
  1079. <schedule-item
  1080. :schedule-detail="scope.row.Sun_M"
  1081. :draggable="scope.row.Sun_M ? 'true' : 'false'"
  1082. class="contitem"
  1083. :style="{ cursor: scope.row.Sun_M ? 'move' : 'default' }"
  1084. @dragstart="
  1085. drag(
  1086. $event,
  1087. 'Sun_M',
  1088. scope.row.index,
  1089. scope.row.Sun_M,
  1090. scope.row
  1091. )
  1092. "
  1093. >
  1094. ></schedule-item
  1095. >
  1096. </div>
  1097. </template>
  1098. </el-table-column>
  1099. <el-table-column
  1100. prop="Sun_A"
  1101. label="下"
  1102. min-width="110"
  1103. align="center"
  1104. >
  1105. <template slot-scope="scope">
  1106. <div class="del_table_btn">
  1107. <el-button
  1108. type="danger"
  1109. size="mini"
  1110. icon="el-icon-close"
  1111. circle
  1112. @click.stop="deletePatientMode(scope.row.Sun_A)"
  1113. ></el-button>
  1114. </div>
  1115. <div
  1116. @drop="
  1117. drop(
  1118. $event,
  1119. 'Sun_A',
  1120. scope.row.index,
  1121. scope.row.Sun_A,
  1122. scope.row
  1123. )
  1124. "
  1125. @dragover="allowDrop"
  1126. >
  1127. <schedule-item
  1128. :schedule-detail="scope.row.Sun_A"
  1129. :draggable="scope.row.Sun_A ? 'true' : 'false'"
  1130. class="contitem"
  1131. :style="{ cursor: scope.row.Sun_A ? 'move' : 'default' }"
  1132. @dragstart="
  1133. drag(
  1134. $event,
  1135. 'Sun_A',
  1136. scope.row.index,
  1137. scope.row.Sun_A,
  1138. scope.row
  1139. )
  1140. "
  1141. >
  1142. ></schedule-item
  1143. >
  1144. </div>
  1145. </template>
  1146. </el-table-column>
  1147. <el-table-column
  1148. prop="Sun_N"
  1149. label="晚"
  1150. min-width="110"
  1151. align="center"
  1152. >
  1153. <template slot-scope="scope">
  1154. <div class="del_table_btn">
  1155. <el-button
  1156. type="danger"
  1157. size="mini"
  1158. icon="el-icon-close"
  1159. circle
  1160. @click.stop="deletePatientMode(scope.row.Sun_N)"
  1161. ></el-button>
  1162. </div>
  1163. <div
  1164. @drop="
  1165. drop(
  1166. $event,
  1167. 'Sun_N',
  1168. scope.row.index,
  1169. scope.row.Sun_N,
  1170. scope.row
  1171. )
  1172. "
  1173. @dragover="allowDrop"
  1174. >
  1175. <schedule-item
  1176. :schedule-detail="scope.row.Sun_N"
  1177. :draggable="scope.row.Sun_N ? 'true' : 'false'"
  1178. class="contitem"
  1179. :style="{ cursor: scope.row.Sun_N ? 'move' : 'default' }"
  1180. @dragstart="
  1181. drag(
  1182. $event,
  1183. 'Sun_N',
  1184. scope.row.index,
  1185. scope.row.Sun_N,
  1186. scope.row
  1187. )
  1188. "
  1189. >
  1190. ></schedule-item
  1191. >
  1192. </div>
  1193. </template>
  1194. </el-table-column>
  1195. </el-table-column>
  1196. <!-- <el-table-column-->
  1197. <!-- prop="total"-->
  1198. <!-- label="总数"-->
  1199. <!-- width="60"-->
  1200. <!-- align="center"-->
  1201. <!-- fixed="right"-->
  1202. <!-- ></el-table-column>-->
  1203. </el-table>
  1204. </div>
  1205. </div>
  1206. <el-dialog :visible.sync="searchTableVisible" width="80%">
  1207. <el-table
  1208. :data="schedulePatients"
  1209. :header-cell-style="{
  1210. backgroundColor: 'rgb(245, 247, 250)',
  1211. color: '#606266',
  1212. }"
  1213. :row-style="{ color: '#303133' }"
  1214. style="width: 100%"
  1215. border
  1216. >
  1217. <el-table-column label="姓名" width="120">
  1218. <template slot-scope="scope">
  1219. {{ scope.row.patient }}
  1220. </template>
  1221. </el-table-column>
  1222. <el-table-column label="透析日期" width="200">
  1223. <template slot-scope="scope">
  1224. {{ getDialysisDate(scope.row) }}
  1225. </template>
  1226. </el-table-column>
  1227. <el-table-column label="分区">
  1228. <template slot-scope="scope">
  1229. {{ scope.row.zone.name }}
  1230. </template>
  1231. </el-table-column>
  1232. <el-table-column label="班次" width="80">
  1233. <template slot-scope="scope">
  1234. {{ getSchedulesType(scope.row.schedule_type) }}
  1235. </template>
  1236. </el-table-column>
  1237. <el-table-column label="机号" width="80">
  1238. <template slot-scope="scope">
  1239. {{ scope.row.number.number }}
  1240. </template>
  1241. </el-table-column>
  1242. <el-table-column label="透析模式" width="100">
  1243. <template slot-scope="scope">
  1244. {{ scope.row.mode.name }}
  1245. </template>
  1246. </el-table-column>
  1247. <el-table-column label="操作" align="center" width="300">
  1248. <template slot-scope="scope">
  1249. <span v-if="now_time > scope.row.schedule_date">
  1250. <el-button size="mini" type="primary" :disable="true">
  1251. 取消排班
  1252. </el-button>
  1253. <el-button size="mini" type="primary" :disable="true">
  1254. 调整机号
  1255. </el-button>
  1256. <el-button size="mini" type="primary" :disable="true">
  1257. 调整模式
  1258. </el-button>
  1259. </span>
  1260. </template>
  1261. <template slot-scope="scope">
  1262. <span v-if="now_time <= scope.row.schedule_date">
  1263. <el-button
  1264. size="mini"
  1265. type="primary"
  1266. @click="CancelSchedule(scope.row.id)"
  1267. >
  1268. 取消排班
  1269. </el-button>
  1270. <el-button
  1271. size="mini"
  1272. type="primary"
  1273. @click="changeMachineNumber(scope.$index, scope.row)"
  1274. >
  1275. 调整机号
  1276. </el-button>
  1277. <el-button
  1278. size="mini"
  1279. type="primary"
  1280. @click="changeMode(scope.$index, scope.row)"
  1281. >
  1282. 调整模式
  1283. </el-button>
  1284. </span>
  1285. </template>
  1286. </el-table-column>
  1287. </el-table>
  1288. </el-dialog>
  1289. <el-dialog
  1290. title="排班"
  1291. :visible.sync="dialogTableVisible"
  1292. width="1000px;"
  1293. :v-model="dialog"
  1294. v-loading="creating_schedule"
  1295. >
  1296. <div>
  1297. <div class="cell clearfix">
  1298. <label class="title"><span class="name">当前排班</span> : </label>
  1299. <div class="time">
  1300. <ul class="">
  1301. <span class="current"
  1302. >日期 : {{ currentData.schedule_date }} &nbsp;&nbsp; 班次 :
  1303. {{ currentData.type_name }} &nbsp;&nbsp; 病房 :
  1304. {{ currentData.zone_name }} &nbsp;&nbsp; 透析机 :
  1305. {{ currentData.bed_name }}
  1306. </span>
  1307. </ul>
  1308. </div>
  1309. </div>
  1310. <div class="cell clearfix">
  1311. <label class="title"><span class="name">患者搜索</span> : </label>
  1312. <div class="time">
  1313. <ul class="">
  1314. <el-input
  1315. size="medium"
  1316. v-model="searchKey"
  1317. placeholder="请输入搜索的内容"
  1318. style="width: 260px"
  1319. @keyup.enter.native="SubmitSearch"
  1320. ></el-input>
  1321. <el-button
  1322. type="primary"
  1323. icon="el-icon-search"
  1324. @click="SubmitSearch"
  1325. >搜索</el-button
  1326. >
  1327. </ul>
  1328. </div>
  1329. </div>
  1330. <div class="cell clearfix">
  1331. <label class="title"><span class="name">排班</span> : </label>
  1332. <div class="time">
  1333. <ul class="">
  1334. <li
  1335. v-for="item in schedulArr"
  1336. @click="changeSearchSchedule(item.value)"
  1337. :key="item.value"
  1338. :class="patientQuery.schedule == item.value ? 'active' : ''"
  1339. >
  1340. {{ item.label }}
  1341. </li>
  1342. </ul>
  1343. </div>
  1344. </div>
  1345. <!-- <div class="cell clearfix">
  1346. <label class="title"><span class="name">标签</span> : </label>
  1347. <div class="time ">
  1348. <ul class="">
  1349. <li v-for="item in tagArr" :key="item.value" >{{item.label}}</li>
  1350. </ul>
  1351. </div>
  1352. </div> -->
  1353. <div class="cell clearfix">
  1354. <label class="title"><span class="name">传染病</span> : </label>
  1355. <div class="time">
  1356. <ul class="">
  1357. <li
  1358. v-for="item in diseasesArr"
  1359. @click="changeSearchContagion(item.value)"
  1360. :key="item.value"
  1361. :class="patientQuery.contagion == item.value ? 'active' : ''"
  1362. >
  1363. {{ item.label }}
  1364. </li>
  1365. </ul>
  1366. </div>
  1367. </div>
  1368. </div>
  1369. <el-table
  1370. ref="singleTable"
  1371. :data="patients"
  1372. border
  1373. highlight-current-row
  1374. @current-change="handleCurrentChange"
  1375. :header-cell-style="{ backgroundColor: 'rgb(236, 245, 255)' }"
  1376. >
  1377. <el-table-column
  1378. type="index"
  1379. label="序号"
  1380. width="89"
  1381. align="center"
  1382. ></el-table-column>
  1383. <el-table-column
  1384. property="dialysis_no"
  1385. label="透析号"
  1386. min-width="110"
  1387. align="center"
  1388. ></el-table-column>
  1389. <el-table-column
  1390. property="name"
  1391. label="姓名"
  1392. min-width="110"
  1393. align="center"
  1394. ></el-table-column>
  1395. <el-table-column
  1396. property="schedules"
  1397. label="双周已排"
  1398. min-width="80"
  1399. align="center"
  1400. >
  1401. <template slot-scope="scope">
  1402. <span>{{ scope.row.schedules.length }}次</span>
  1403. </template>
  1404. </el-table-column>
  1405. <el-table-column
  1406. property="solutions"
  1407. label="治疗频率"
  1408. min-width="200"
  1409. align="center"
  1410. >
  1411. <template slot-scope="scope">
  1412. <span v-for="solution in scope.row.solutions" :key="solution.id"
  1413. >{{ solution.name }}({{ solution.period }}{{ solution.times }})
  1414. </span>
  1415. </template>
  1416. </el-table-column>
  1417. <el-table-column
  1418. property="sch_remark"
  1419. label="备注"
  1420. min-width="200"
  1421. align="center"
  1422. >
  1423. </el-table-column>
  1424. </el-table>
  1425. <div slot="footer" class="dialog-footer">
  1426. <el-button @click="closePatientPanel()">取 消</el-button>
  1427. <el-button
  1428. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  1429. type="primary"
  1430. @click="setSchedule"
  1431. >保 存
  1432. </el-button>
  1433. </div>
  1434. </el-dialog>
  1435. <el-dialog
  1436. title="调整排班"
  1437. :visible.sync="tzDialogVisible"
  1438. width="500px"
  1439. class="mode_change"
  1440. >
  1441. <div style="width: 100%; margin: 0 auto; text-align: center">
  1442. <!-- <el-radio-group v-model="tiaoZhengType" :class="tiaozhengclass">
  1443. <el-radio :label="1">取消排班</el-radio>
  1444. <el-radio :label="2">调整机号</el-radio>
  1445. <el-radio :label="3">调整模式</el-radio>
  1446. </el-radio-group> -->
  1447. <span>调整模式:</span>
  1448. <el-select v-model="value" placeholder="请选择">
  1449. <el-option
  1450. v-for="item in mode_select"
  1451. :key="item.value"
  1452. :label="item.label"
  1453. :value="item.value"
  1454. >
  1455. </el-option>
  1456. </el-select>
  1457. </div>
  1458. <span slot="footer" class="dialog-footer" style="text-align: center">
  1459. <el-button
  1460. @click="
  1461. tzDialogVisible = false;
  1462. tiaoZhengType = 1;
  1463. "
  1464. >取 消</el-button
  1465. >
  1466. <el-button
  1467. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  1468. type="primary"
  1469. @click="submitTiaoX"
  1470. >
  1471. <span v-if="tiaoZhengType == 1">保存</span>
  1472. <span v-if="tiaoZhengType == 2">下一步</span>
  1473. <span v-if="tiaoZhengType == 3">下一步</span>
  1474. </el-button>
  1475. </span>
  1476. </el-dialog>
  1477. <el-dialog
  1478. title="调整模式"
  1479. :visible.sync="msDialogVisible"
  1480. width="500px"
  1481. v-loading="changing_mode"
  1482. >
  1483. <div>
  1484. <el-form
  1485. :model="changeSchedule"
  1486. ref="changeSchedule"
  1487. :rules="changeRules"
  1488. >
  1489. <el-form-item label="" prop="mode_id">
  1490. <el-select
  1491. v-model="changeSchedule.mode_id"
  1492. placeholder="请选择"
  1493. style="width: 100%"
  1494. >
  1495. <el-option
  1496. :disabled="item.id == currentData.mode_id"
  1497. v-for="item in modeOptions"
  1498. :key="item.id"
  1499. :label="item.name"
  1500. :value="item.id"
  1501. >
  1502. </el-option>
  1503. </el-select>
  1504. </el-form-item>
  1505. </el-form>
  1506. </div>
  1507. <span slot="footer" class="dialog-footer">
  1508. <el-button @click="msDialogVisible = false">取 消</el-button>
  1509. <el-button
  1510. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  1511. type="primary"
  1512. @click="submitMode('changeSchedule')"
  1513. >保 存</el-button
  1514. >
  1515. </span>
  1516. </el-dialog>
  1517. <el-dialog
  1518. title="调整机号"
  1519. :visible.sync="jhDialogVisible"
  1520. width="500px"
  1521. v-loading="changing_bed"
  1522. >
  1523. <div>
  1524. <el-form
  1525. :model="changeSchedule"
  1526. ref="changeSchedule"
  1527. :rules="changeRules"
  1528. label-width="90px"
  1529. >
  1530. <el-form-item label="排班日期: ">
  1531. <el-input v-model="currentData.schedule_date" disabled></el-input>
  1532. </el-form-item>
  1533. <el-form-item label="班次: " prop="schedule_type">
  1534. <el-select
  1535. v-model="changeSchedule.schedule_type"
  1536. placeholder="请选择"
  1537. style="width: 100%"
  1538. @change="changeScheduleType"
  1539. >
  1540. <el-option
  1541. v-for="item in scheduleType"
  1542. :key="item.id"
  1543. :label="item.name"
  1544. :value="item.id"
  1545. >
  1546. </el-option>
  1547. </el-select>
  1548. </el-form-item>
  1549. <el-form-item label="病房: " prop="partition_id">
  1550. <el-select
  1551. v-model="zone_name"
  1552. placeholder="请选择"
  1553. style="width: 100%"
  1554. @change="changePartition"
  1555. >
  1556. <el-option
  1557. v-for="(item, index) in zone_names"
  1558. :key="index"
  1559. :label="item"
  1560. :value="item"
  1561. >
  1562. </el-option>
  1563. </el-select>
  1564. </el-form-item>
  1565. <el-form-item label="透析机: " prop="bed_id">
  1566. <el-select
  1567. v-model="device_id"
  1568. placeholder="请选择"
  1569. style="width: 100%"
  1570. >
  1571. <el-option
  1572. v-for="item in current_devices"
  1573. :key="item.id"
  1574. :label="item.number"
  1575. :value="item.id"
  1576. >
  1577. </el-option>
  1578. </el-select>
  1579. </el-form-item>
  1580. </el-form>
  1581. </div>
  1582. <span slot="footer" class="dialog-footer">
  1583. <el-button @click="jhDialogVisible = false">取 消</el-button>
  1584. <el-button
  1585. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  1586. type="primary"
  1587. @click="submitTiaoZJH('changeSchedule')"
  1588. >保 存</el-button
  1589. >
  1590. </span>
  1591. </el-dialog>
  1592. <el-dialog
  1593. class="samrt_arrage"
  1594. :title="`智能排班 (姓名:${
  1595. this.cur_smart_patient_name ? this.cur_smart_patient_name : ''
  1596. } 透析号:${
  1597. this.cur_smart_patient_no ? this.cur_smart_patient_no : ''
  1598. })`"
  1599. width="900px"
  1600. :visible.sync="smartVisible"
  1601. >
  1602. <el-autocomplete
  1603. class="checkSearch"
  1604. popper-class="my-autocomplete"
  1605. v-model.trim="smart_keyword"
  1606. :fetch-suggestions="querySearchAsync"
  1607. placeholder="病人透析号/姓名"
  1608. @select="handleSelect"
  1609. >
  1610. <i class="el-icon-search el-input__icon" slot="suffix"></i>
  1611. <template slot-scope="{ item }">
  1612. <div class="name">{{ item.name }}</div>
  1613. </template>
  1614. </el-autocomplete>
  1615. <el-tabs v-model="editableTabsValue" type="card" @tab-click="handleClick">
  1616. <el-tab-pane
  1617. :key="item.name"
  1618. v-for="(item, index) in editableTabs"
  1619. :label="item.title"
  1620. :name="item.name"
  1621. >
  1622. <el-table v-loading="dataloading" border :data="item.tableWeekArrage" style="width: 100%">
  1623. <!-- 自定义表结构 -->
  1624. <el-table-column
  1625. label="星期"
  1626. prop="week"
  1627. align="center"
  1628. width="100"
  1629. >
  1630. </el-table-column>
  1631. <el-table-column align="left">
  1632. <template slot="header" slot-scope="scope">
  1633. <el-checkbox-group
  1634. v-model="item.checkedWeek"
  1635. @change="select_week"
  1636. >
  1637. <el-checkbox
  1638. v-for="(i, index) in weeks"
  1639. :label="i"
  1640. :key="index"
  1641. :value="i"
  1642. :disabled="!i.is_edit"
  1643. >
  1644. {{ i.name }}
  1645. </el-checkbox>
  1646. </el-checkbox-group>
  1647. </template>
  1648. <template slot-scope="scope">
  1649. <div>
  1650. <span>模式:</span>
  1651. <el-select
  1652. v-model="scope.row.mode_id"
  1653. placeholder="请选择"
  1654. size="mini"
  1655. :disabled="!scope.row.is_edit"
  1656. class="select_list_arrage"
  1657. >
  1658. <el-option
  1659. v-for="(item, index) in modes"
  1660. :key="index"
  1661. :label="item.name"
  1662. :value="item.id"
  1663. >
  1664. </el-option>
  1665. </el-select>
  1666. <span>班次:</span
  1667. ><el-select
  1668. v-model="scope.row.sch_type"
  1669. placeholder="请选择"
  1670. :disabled="!scope.row.is_edit"
  1671. @change="changeSch(scope.row)"
  1672. size="mini"
  1673. class="select_list_arrage"
  1674. >
  1675. <el-option
  1676. v-for="(item, index) in teem_sel"
  1677. :key="index"
  1678. :label="item.name"
  1679. :value="item.id"
  1680. >
  1681. </el-option>
  1682. </el-select>
  1683. <span>分区:</span
  1684. ><el-select
  1685. v-model="scope.row.zone_id"
  1686. placeholder="请选择"
  1687. :disabled="!scope.row.is_edit"
  1688. @change="changeArea(scope.row)"
  1689. size="mini"
  1690. class="select_list_arrage"
  1691. >
  1692. <el-option
  1693. v-for="(item, index) in partitionsProp"
  1694. :key="index"
  1695. :label="item.name"
  1696. :value="item.id"
  1697. >
  1698. </el-option>
  1699. </el-select>
  1700. <span>机号:</span
  1701. ><el-select
  1702. v-model="scope.row.jihao_id"
  1703. placeholder="请选择"
  1704. :disabled="!scope.row.is_edit"
  1705. size="mini"
  1706. @click.native="blurclick(scope.row)"
  1707. class="select_list_arrage"
  1708. >
  1709. <el-option
  1710. v-for="(item, index) in scope.row.jihaos"
  1711. :key="index"
  1712. :label="item.number"
  1713. :value="item.id"
  1714. >
  1715. </el-option>
  1716. </el-select>
  1717. </div>
  1718. </template>
  1719. </el-table-column>
  1720. </el-table>
  1721. <!-- <el-table-->
  1722. <!-- border-->
  1723. <!-- :show-header="false"-->
  1724. <!-- :data="item.week_info"-->
  1725. <!-- style="width: 100%"-->
  1726. <!-- >-->
  1727. <!-- <el-table-column align="left">-->
  1728. <!-- <template slot-scope="scope">-->
  1729. <!-- <span style="width:150px">{{scope.row.week_name}}</span>-->
  1730. <!-- <span>模式:</span>-->
  1731. <!-- <el-select-->
  1732. <!-- v-model="scope.row.mode_id"-->
  1733. <!-- placeholder="请选择"-->
  1734. <!-- size="mini"-->
  1735. <!-- class="select_list_arrage"-->
  1736. <!-- >-->
  1737. <!-- <el-option-->
  1738. <!-- v-for="item in modes"-->
  1739. <!-- :key="item"-->
  1740. <!-- :label="item.name"-->
  1741. <!-- :value="item.id"-->
  1742. <!-- >-->
  1743. <!-- </el-option>-->
  1744. <!-- </el-select>-->
  1745. <!-- <span>班次:</span-->
  1746. <!-- ><el-select-->
  1747. <!-- v-model="scope.row.sch_type"-->
  1748. <!-- placeholder="请选择"-->
  1749. <!-- size="mini"-->
  1750. <!-- class="select_list_arrage"-->
  1751. <!-- >-->
  1752. <!-- <el-option-->
  1753. <!-- v-for="item in teem_sel"-->
  1754. <!-- :key="item"-->
  1755. <!-- :label="item.name"-->
  1756. <!-- :value="item.id"-->
  1757. <!-- >-->
  1758. <!-- </el-option>-->
  1759. <!-- </el-select>-->
  1760. <!-- <span>分区:</span-->
  1761. <!-- ><el-select-->
  1762. <!-- v-model="scope.row.zone_id"-->
  1763. <!-- placeholder="请选择"-->
  1764. <!-- size="mini"-->
  1765. <!-- class="select_list_arrage"-->
  1766. <!-- >-->
  1767. <!-- <el-option-->
  1768. <!-- v-for="item in zones"-->
  1769. <!-- :key="item"-->
  1770. <!-- :label="item.name"-->
  1771. <!-- :value="item.id"-->
  1772. <!-- >-->
  1773. <!-- </el-option>-->
  1774. <!-- </el-select>-->
  1775. <!-- <span>机号:</span>-->
  1776. <!-- <el-select-->
  1777. <!-- v-model="scope.row.jihao_id"-->
  1778. <!-- placeholder="请选择"-->
  1779. <!-- size="mini"-->
  1780. <!-- class="select_list_arrage"-->
  1781. <!-- >-->
  1782. <!-- <el-option-->
  1783. <!-- v-for="item in smart_jihaos"-->
  1784. <!-- :key="item"-->
  1785. <!-- :label="item.name"-->
  1786. <!-- :value="item.id"-->
  1787. <!-- >-->
  1788. <!-- </el-option>-->
  1789. <!-- </el-select>-->
  1790. <!-- </template>-->
  1791. <!-- </el-table-column>-->
  1792. <!-- </el-table>-->
  1793. </el-tab-pane>
  1794. </el-tabs>
  1795. <span slot="footer" class="dialog-footer">
  1796. <el-button @click="cancel">取 消</el-button>
  1797. <el-button type="primary" v-loading="saveloading" @click="batchSetSch"
  1798. >保 存</el-button
  1799. >
  1800. </span>
  1801. </el-dialog>
  1802. </div>
  1803. </template>
  1804. <script>
  1805. import { uParseTime } from "@/utils/tools";
  1806. import print from "print-js";
  1807. import draggable from "vuedraggable";
  1808. const moment = require("moment");
  1809. import {
  1810. PostSearchSmartSchPatient,
  1811. getSmartDevices,
  1812. getSmartSchByPatient
  1813. } from "@/api/schedule_template/sch_template";
  1814. import {
  1815. CancelSchedule,
  1816. ChangeSchedule,
  1817. CreateSchedule,
  1818. getSchedulePatients,
  1819. getSchedulesOne,
  1820. getSearchResult,
  1821. getUrgentScheduleInitData,
  1822. getWeekPanelsOne,
  1823. getAllZones,
  1824. } from "@/api/schedule";
  1825. import ScheduleItem from "./ScheduleItem";
  1826. import {
  1827. getPatientSmartSch,
  1828. BatchSmartSch,
  1829. } from "@/api/schedule_template/sch_template";
  1830. const weekOptions = [
  1831. {
  1832. name: "周一",
  1833. week_type: 1,
  1834. is_edit: true,
  1835. },
  1836. {
  1837. name: "周二",
  1838. week_type: 2,
  1839. is_edit: true,
  1840. },
  1841. {
  1842. name: "周三",
  1843. week_type: 3,
  1844. is_edit: true,
  1845. },
  1846. {
  1847. name: "周四",
  1848. week_type: 4,
  1849. is_edit: true,
  1850. },
  1851. {
  1852. name: "周五",
  1853. week_type: 5,
  1854. is_edit: true,
  1855. },
  1856. {
  1857. name: "周六",
  1858. week_type: 6,
  1859. is_edit: true,
  1860. },
  1861. {
  1862. name: "周日",
  1863. week_type: 7,
  1864. is_edit: true,
  1865. },
  1866. ];
  1867. let rowNumber = 0;
  1868. export default {
  1869. name: "editTableData",
  1870. props: {
  1871. weekTime: {
  1872. type: String,
  1873. default: "thisWeek",
  1874. },
  1875. scheduleZoneRowProp: {
  1876. type: Array,
  1877. dafault: [],
  1878. },
  1879. // scheduleZoneProp: {
  1880. // type: Array,
  1881. // dafault: []
  1882. // },
  1883. partitionsProp: {
  1884. type: Object,
  1885. dafault: {},
  1886. },
  1887. },
  1888. data() {
  1889. return {
  1890. dataloading:false,
  1891. current_patient_data:[],
  1892. week_zhongwens: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"],
  1893. week_type: "",
  1894. saveloading: false,
  1895. zones: [],
  1896. weeks: weekOptions,
  1897. smart_keyword: "",
  1898. cur_smart_patient_id: 0,
  1899. cur_smart_patient_name: "",
  1900. cur_smart_patient_no: "",
  1901. all_zones: [],
  1902. editableTabs: [
  1903. {
  1904. checkedWeek: [],
  1905. title: "本周",
  1906. name: "1",
  1907. tableWeekArrage: [],
  1908. weeks:[],
  1909. },
  1910. {
  1911. checkedWeek: [],
  1912. title: "下周",
  1913. name: "2",
  1914. tableWeekArrage: [],
  1915. weeks:[],
  1916. },
  1917. {
  1918. checkedWeek: [],
  1919. title: "下下周",
  1920. name: "3",
  1921. tableWeekArrage: [],
  1922. weeks:[],
  1923. },
  1924. ],
  1925. mode_sel: ["HDF"],
  1926. teem_sel: [
  1927. { name: "上午", id: 1 },
  1928. { name: "下午", id: 2 },
  1929. { name: "晚上", id: 3 },
  1930. ],
  1931. region_sel: ["A区"],
  1932. equip_sel: ["1号"],
  1933. checkedWeek: [], //默认选中那些星期,如不需要可去掉
  1934. week: weekOptions,
  1935. editableTabsValue: "1",
  1936. smartVisible: false,
  1937. cur_info: {
  1938. patient_name: "",
  1939. patient_id: 0,
  1940. mode_name: "",
  1941. mode_id: 0,
  1942. },
  1943. modes: [],
  1944. patientList: [],
  1945. all_patients: [],
  1946. mode_select: [
  1947. {
  1948. value: "1",
  1949. label: "模式一",
  1950. },
  1951. {
  1952. value: "选2",
  1953. label: "模式二",
  1954. },
  1955. {
  1956. value: "3",
  1957. label: "模式三",
  1958. },
  1959. ],
  1960. value: "",
  1961. patient_pre: [],
  1962. // tableContainHeight:400,
  1963. // tableHeight:'window.innerHeight - 0',
  1964. // rowClass: "table-row-new-class schedule-table-row",
  1965. patient_data: [
  1966. {
  1967. name: "王小虎",
  1968. },
  1969. {
  1970. name: "王小虎",
  1971. },
  1972. {
  1973. name: "王小虎",
  1974. },
  1975. {
  1976. name: "王小虎",
  1977. },
  1978. {
  1979. name: "王小虎",
  1980. },
  1981. {
  1982. name: "王小虎",
  1983. },
  1984. {
  1985. name: "王小虎",
  1986. },
  1987. {
  1988. name: "王小虎",
  1989. },
  1990. {
  1991. name: "王小虎",
  1992. },
  1993. {
  1994. name: "王小虎",
  1995. },
  1996. {
  1997. name: "王小虎",
  1998. },
  1999. {
  2000. name: "王小虎",
  2001. },
  2002. {
  2003. name: "王小虎",
  2004. },
  2005. ],
  2006. searchKey: "",
  2007. tiaoZhengType: 1,
  2008. modeOptions: null,
  2009. keywords: "",
  2010. schedulePatients: [],
  2011. searchTableVisible: false,
  2012. dialog: {
  2013. tag: "",
  2014. },
  2015. patients: [],
  2016. toDay: "",
  2017. schedulArr: [
  2018. { value: 0, label: "不限" },
  2019. { value: 2, label: "未排班" },
  2020. { value: 1, label: "已排班" },
  2021. ],
  2022. tagArr: [
  2023. { value: 1, label: "不限" },
  2024. { value: 2, label: "透析记录" },
  2025. { value: 3, label: "传染病" },
  2026. ],
  2027. diseasesArr: [{ value: 0, label: "不限" }],
  2028. scheduleType: [
  2029. { id: 1, name: "上午" },
  2030. { id: 2, name: "下午" },
  2031. { id: 3, name: "晚上" },
  2032. ],
  2033. dialogTableVisible: false,
  2034. tzDialogVisible: false,
  2035. msDialogVisible: false,
  2036. jhDialogVisible: false,
  2037. // scheduleZone: this.scheduleZoneProp,
  2038. scheduleZoneRow: -1,
  2039. partitions: [],
  2040. partitions_two: [],
  2041. jihaos_two: [],
  2042. jihaos: [],
  2043. weekTitle: ["", "", "", "", "", "", ""],
  2044. isShowOne: true,
  2045. isShowTwo: true,
  2046. isShowThree: true,
  2047. isShowFour: true,
  2048. isShowFive: true,
  2049. isShowSix: true,
  2050. isShowSeven: true,
  2051. weekList: ["", "", "", "", "", "", ""],
  2052. weekDays: ["", "", "", "", "", "", ""],
  2053. currentData: {
  2054. id: 0,
  2055. schedule_date: "",
  2056. schedule_type: 0,
  2057. bed_id: 0,
  2058. partition_id: 0,
  2059. patient_id: 0,
  2060. schedule_week: 0,
  2061. mode_id: 0,
  2062. type_name: "",
  2063. bed_name: "",
  2064. partition_type: 0,
  2065. contagions: [],
  2066. patient: "",
  2067. },
  2068. changeSchedule: {
  2069. mode_id: "",
  2070. schedule_type: "",
  2071. partition_id: "",
  2072. bed_id: "",
  2073. schedule_week: "",
  2074. partition_type: "",
  2075. },
  2076. patientQuery: {
  2077. keywords: "",
  2078. schedule: 0,
  2079. contagion: 0,
  2080. },
  2081. tiaozhengclass: "tiaozhengclass",
  2082. changeRules: {
  2083. mode_id: [{ required: true, message: "请选择模式", trigger: "blur" }],
  2084. schedule_type: [
  2085. { required: true, message: "请选择班次", trigger: "blur" },
  2086. ],
  2087. partition_id: [
  2088. { required: true, message: "请选择病房", trigger: "blur" },
  2089. ],
  2090. bed_id: [{ required: true, message: "请选择透析机", trigger: "blur" }],
  2091. },
  2092. weekday: 0,
  2093. creating_schedule: false,
  2094. changing_mode: false,
  2095. changing_bed: false,
  2096. current_all_sch: [],
  2097. tableHeight: document.documentElement.clientHeight,
  2098. patient_selc: {},
  2099. origin_schedules: [],
  2100. origin_device_numbers: [],
  2101. zone_device_map: {},
  2102. device_id: 0,
  2103. zone_name: "",
  2104. current_devices: [],
  2105. zone_names: [],
  2106. zone_device_options: [],
  2107. options: [
  2108. { id: 0, name: "全部" },
  2109. { id: 1, name: "上午" },
  2110. { id: 2, name: "下午" },
  2111. { id: 3, name: "晚上" },
  2112. ],
  2113. partition_id: 0,
  2114. schedule_type: "",
  2115. smart_jihaos: [
  2116. {
  2117. name: "1号机",
  2118. id: "1",
  2119. },
  2120. {
  2121. name: "2号机",
  2122. id: "2",
  2123. },
  2124. ],
  2125. theType: "",
  2126. scheduleZone: [],
  2127. days: [],
  2128. theWeek: {
  2129. lastWeek: 0,
  2130. thisWeek: 0,
  2131. nextWeek: 0,
  2132. nextTwoWeek: 0,
  2133. },
  2134. zoneIdList: [],
  2135. strArr: "",
  2136. patient_id_hover: 0,
  2137. now_time: "",
  2138. activeItem: {
  2139. day: null,
  2140. index: null,
  2141. name: null,
  2142. },
  2143. cellflag: 0,
  2144. };
  2145. },
  2146. watch: {
  2147. week_type: function () {
  2148. this.isShowOne = false;
  2149. this.isShowTwo = false;
  2150. this.isShowThree = false;
  2151. this.isShowFour = false;
  2152. this.isShowFive = false;
  2153. this.isShowSix = false;
  2154. this.isShowSeven = false;
  2155. if (this.week_type.length > 0) {
  2156. for (let i = 0; i < this.week_type.length; i++) {
  2157. if (this.week_type[i] == "周一") {
  2158. this.isShowOne = true;
  2159. } else if (this.week_type[i] == "周二") {
  2160. this.isShowTwo = true;
  2161. } else if (this.week_type[i] == "周三") {
  2162. this.isShowThree = true;
  2163. } else if (this.week_type[i] == "周四") {
  2164. this.isShowFour = true;
  2165. } else if (this.week_type[i] == "周五") {
  2166. this.isShowFive = true;
  2167. } else if (this.week_type[i] == "周六") {
  2168. this.isShowSix = true;
  2169. } else if (this.week_type[i] == "周日") {
  2170. this.isShowSeven = true;
  2171. }
  2172. }
  2173. } else {
  2174. this.isShowOne = true;
  2175. this.isShowTwo = true;
  2176. this.isShowThree = true;
  2177. this.isShowFour = true;
  2178. this.isShowFive = true;
  2179. this.isShowSix = true;
  2180. this.isShowSeven = true;
  2181. }
  2182. },
  2183. weekTime: function () {
  2184. var theType = this.weekType(this.weekTime);
  2185. // console.log("999999999",theType)
  2186. this.theType = theType;
  2187. this.getSchedules();
  2188. },
  2189. scheduleZoneRow: function () {
  2190. var theType = this.weekType(this.weekTime);
  2191. this.theType = theType;
  2192. this.getSchedules();
  2193. },
  2194. tableHeight(val) {
  2195. if (!this.timer) {
  2196. this.tableHeight = val;
  2197. this.timer = true;
  2198. const that = this;
  2199. setTimeout(function () {
  2200. that.timer = false;
  2201. }, 400);
  2202. }
  2203. },
  2204. },
  2205. methods: {
  2206. changeSch(row) {
  2207. console.log(row);
  2208. let params = {
  2209. zone_id: row.zone_id,
  2210. sch_type: row.sch_type,
  2211. schedule_date: row.schedule_date,
  2212. patient_id: this.cur_smart_patient_id,
  2213. };
  2214. //进行网络请求,获取空排班机位
  2215. getSmartDevices(params).then((response) => {
  2216. if (response.data.state == 0) {
  2217. return false;
  2218. } else {
  2219. var devices = response.data.data.devices;
  2220. row.ihaos = [];
  2221. row.jihaos = devices;
  2222. if (devices && devices.length > 0) {
  2223. row.jihao_id = devices[0].id;
  2224. } else {
  2225. row.jihao_id = "";
  2226. }
  2227. }
  2228. });
  2229. },
  2230. blurclick(row) {
  2231. console.log(row);
  2232. let params = {
  2233. zone_id: row.zone_id,
  2234. sch_type: row.sch_type,
  2235. schedule_date: row.schedule_date,
  2236. patient_id: this.cur_smart_patient_id,
  2237. };
  2238. //进行网络请求,获取空排班机位
  2239. getSmartDevices(params).then((response) => {
  2240. if (response.data.state == 0) {
  2241. return false;
  2242. } else {
  2243. var devices = response.data.data.devices;
  2244. row.jihaos = [];
  2245. row.jihaos = devices;
  2246. }
  2247. });
  2248. // console.log("~~~~~~")
  2249. },
  2250. changeArea(row) {
  2251. console.log(row);
  2252. let params = {
  2253. zone_id: row.zone_id,
  2254. sch_type: row.sch_type,
  2255. schedule_date: row.schedule_date,
  2256. patient_id: this.cur_smart_patient_id,
  2257. };
  2258. //进行网络请求,获取空排班机位
  2259. getSmartDevices(params).then((response) => {
  2260. if (response.data.state == 0) {
  2261. return false;
  2262. } else {
  2263. var devices = response.data.data.devices;
  2264. row.jihaos = [];
  2265. row.jihaos = devices;
  2266. if (devices && devices.length > 0) {
  2267. row.jihao_id = devices[0].id;
  2268. } else {
  2269. row.jihao_id = "";
  2270. }
  2271. }
  2272. });
  2273. },
  2274. handleClick() {
  2275. if (this.editableTabsValue == "1") {
  2276. for (let i = 0; i < this.weeks.length; i++) {
  2277. var tempDate = new Date();
  2278. var day = tempDate.getDay();
  2279. if (day == 0) {
  2280. day = 7;
  2281. }
  2282. if (this.weeks[i].week_type >= day) {
  2283. this.weeks[i].is_edit = true;
  2284. } else {
  2285. this.weeks[i].is_edit = false;
  2286. }
  2287. }
  2288. } else {
  2289. for (let i = 0; i < this.weeks.length; i++) {
  2290. this.weeks[i].is_edit = true;
  2291. }
  2292. }
  2293. },
  2294. getWeekByzhongwen(week_str) {
  2295. switch (week_str) {
  2296. case "周一":
  2297. return 1;
  2298. break;
  2299. case "周二":
  2300. return 2;
  2301. break;
  2302. case "周三":
  2303. return 3;
  2304. break;
  2305. case "周四":
  2306. return 4;
  2307. break;
  2308. case "周五":
  2309. return 5;
  2310. break;
  2311. case "周六":
  2312. return 6;
  2313. break;
  2314. case "周日":
  2315. return 7;
  2316. break;
  2317. }
  2318. },
  2319. cancel() {
  2320. this.smartVisible = false;
  2321. this.smart_keyword = "";
  2322. },
  2323. batchSetSch() {
  2324. var saveOrEditTempData = [];
  2325. var delTempData = [];
  2326. var day = new Date().getDay();
  2327. if (day == 0) {
  2328. day = 7;
  2329. }
  2330. for (let b = 0; b < this.editableTabs[0].tableWeekArrage.length; b++) {
  2331. //只有大于等于今天的数据才能保存和没有上机的
  2332. if (
  2333. this.getWeekByzhongwen(
  2334. this.editableTabs[0].tableWeekArrage[b].week
  2335. ) >= day &&
  2336. this.editableTabs[0].tableWeekArrage[b].is_edit
  2337. ) {
  2338. let obj = {
  2339. schedule_date:
  2340. this.editableTabs[0].tableWeekArrage[b].schedule_date,
  2341. schedule_type: this.editableTabs[0].tableWeekArrage[b].sch_type,
  2342. bed_id: this.editableTabs[0].tableWeekArrage[b].jihao_id,
  2343. schedule_week: this.getWeekByzhongwen(
  2344. this.editableTabs[0].tableWeekArrage[b].week
  2345. ),
  2346. mode_id: this.editableTabs[0].tableWeekArrage[b].mode_id,
  2347. sch_id: this.editableTabs[0].tableWeekArrage[b].sch_id,
  2348. zone_id: this.editableTabs[0].tableWeekArrage[b].zone_id,
  2349. week_type: "1",
  2350. week_name: this.editableTabs[0].tableWeekArrage[b].week,
  2351. };
  2352. saveOrEditTempData.push(obj);
  2353. }
  2354. }
  2355. for (let b = 0; b < this.editableTabs[1].tableWeekArrage.length; b++) {
  2356. let obj = {
  2357. schedule_date: this.editableTabs[1].tableWeekArrage[b].schedule_date,
  2358. schedule_type: this.editableTabs[1].tableWeekArrage[b].sch_type,
  2359. bed_id: this.editableTabs[1].tableWeekArrage[b].jihao_id,
  2360. schedule_week: this.getWeekByzhongwen(
  2361. this.editableTabs[1].tableWeekArrage[b].week
  2362. ),
  2363. mode_id: this.editableTabs[1].tableWeekArrage[b].mode_id,
  2364. sch_id: this.editableTabs[1].tableWeekArrage[b].sch_id,
  2365. zone_id: this.editableTabs[1].tableWeekArrage[b].zone_id,
  2366. week_type: "2",
  2367. week_name: this.editableTabs[1].tableWeekArrage[b].week,
  2368. };
  2369. saveOrEditTempData.push(obj);
  2370. }
  2371. for (let b = 0; b < this.editableTabs[2].tableWeekArrage.length; b++) {
  2372. let obj = {
  2373. schedule_date: this.editableTabs[2].tableWeekArrage[b].schedule_date,
  2374. schedule_type: this.editableTabs[2].tableWeekArrage[b].sch_type,
  2375. bed_id: this.editableTabs[2].tableWeekArrage[b].jihao_id,
  2376. schedule_week: this.getWeekByzhongwen(
  2377. this.editableTabs[2].tableWeekArrage[b].week
  2378. ),
  2379. mode_id: this.editableTabs[2].tableWeekArrage[b].mode_id,
  2380. sch_id: this.editableTabs[2].tableWeekArrage[b].sch_id,
  2381. zone_id: this.editableTabs[2].tableWeekArrage[b].zone_id,
  2382. week_type: "3",
  2383. week_name: this.editableTabs[2].tableWeekArrage[b].week,
  2384. };
  2385. saveOrEditTempData.push(obj);
  2386. }
  2387. //原始数据,用来与智能排版的数据进行比对,查出有排班记录,取消勾选的数据,作为删除的数据,提交给后端
  2388. for (let b = 0; b < this.current_patient_data[0].tableWeekArrage.length; b++) {
  2389. //只有大于等于今天的数据才能保存和没有上机的
  2390. if (
  2391. this.getWeekByzhongwen(
  2392. this.current_patient_data[0].tableWeekArrage[b].week
  2393. ) >= day &&
  2394. this.current_patient_data[0].tableWeekArrage[b].is_edit
  2395. ) {
  2396. let obj = {
  2397. schedule_date:
  2398. this.current_patient_data[0].tableWeekArrage[b].schedule_date,
  2399. schedule_type: this.current_patient_data[0].tableWeekArrage[b].sch_type,
  2400. bed_id: this.current_patient_data[0].tableWeekArrage[b].jihao_id,
  2401. schedule_week: this.getWeekByzhongwen(
  2402. this.current_patient_data[0].tableWeekArrage[b].week
  2403. ),
  2404. mode_id: this.current_patient_data[0].tableWeekArrage[b].mode_id,
  2405. sch_id: this.current_patient_data[0].tableWeekArrage[b].sch_id,
  2406. zone_id: this.current_patient_data[0].tableWeekArrage[b].zone_id,
  2407. week_type: "1",
  2408. week_name: this.current_patient_data[0].tableWeekArrage[b].week,
  2409. };
  2410. delTempData.push(obj);
  2411. }
  2412. }
  2413. for (let b = 0; b < this.current_patient_data[1].tableWeekArrage.length; b++) {
  2414. let obj = {
  2415. schedule_date: this.current_patient_data[1].tableWeekArrage[b].schedule_date,
  2416. schedule_type: this.current_patient_data[1].tableWeekArrage[b].sch_type,
  2417. bed_id: this.current_patient_data[1].tableWeekArrage[b].jihao_id,
  2418. schedule_week: this.getWeekByzhongwen(
  2419. this.current_patient_data[1].tableWeekArrage[b].week
  2420. ),
  2421. mode_id: this.current_patient_data[1].tableWeekArrage[b].mode_id,
  2422. sch_id: this.current_patient_data[1].tableWeekArrage[b].sch_id,
  2423. zone_id: this.current_patient_data[1].tableWeekArrage[b].zone_id,
  2424. week_type: "2",
  2425. week_name: this.current_patient_data[1].tableWeekArrage[b].week,
  2426. };
  2427. delTempData.push(obj);
  2428. }
  2429. for (let b = 0; b < this.current_patient_data[2].tableWeekArrage.length; b++) {
  2430. let obj = {
  2431. schedule_date: this.current_patient_data[2].tableWeekArrage[b].schedule_date,
  2432. schedule_type: this.current_patient_data[2].tableWeekArrage[b].sch_type,
  2433. bed_id: this.current_patient_data[2].tableWeekArrage[b].jihao_id,
  2434. schedule_week: this.getWeekByzhongwen(
  2435. this.current_patient_data[2].tableWeekArrage[b].week
  2436. ),
  2437. mode_id: this.current_patient_data[2].tableWeekArrage[b].mode_id,
  2438. sch_id: this.current_patient_data[2].tableWeekArrage[b].sch_id,
  2439. zone_id: this.current_patient_data[2].tableWeekArrage[b].zone_id,
  2440. week_type: "3",
  2441. week_name: this.current_patient_data[2].tableWeekArrage[b].week,
  2442. };
  2443. delTempData.push(obj);
  2444. }
  2445. for (let i = 0; i < saveOrEditTempData.length; i++) {
  2446. if (saveOrEditTempData[i].bed_id == "" || saveOrEditTempData[i].zone_id == "") {
  2447. this.$message.error("分区或者床位不能空");
  2448. return;
  2449. }
  2450. }
  2451. console.log(saveOrEditTempData)
  2452. console.log(delTempData)
  2453. if (saveOrEditTempData.length > 0 ) {
  2454. // console.log("111111")
  2455. // for(let i = 0; i < delTempData.length; i++){
  2456. // for(let b = 0; b < saveOrEditTempData.length; b++){
  2457. // console.log(delTempData[i].sch_id)
  2458. // console.log(saveOrEditTempData[b].sch_id)
  2459. //
  2460. // if(delTempData[i].sch_id == saveOrEditTempData[b].sch_id){
  2461. // console.log("被删元素"+delTempData[i])
  2462. // delTempData.splice(i,1)
  2463. // }
  2464. // }
  2465. // }
  2466. let obj = {
  2467. smart_schs: saveOrEditTempData,
  2468. del_schs:[],
  2469. };
  2470. this.saveloading = true;
  2471. BatchSmartSch(obj, this.cur_smart_patient_id).then((response) => {
  2472. if (response.data.state == 1) {
  2473. this.saveloading = false;
  2474. this.$message.success("保存成功");
  2475. this.smartVisible = false;
  2476. this.smart_keyword = "";
  2477. this.getSchedules();
  2478. } else {
  2479. this.saveloading = false;
  2480. this.smart_keyword = "";
  2481. this.$message.error(response.data.msg);
  2482. return;
  2483. }
  2484. });
  2485. } else {
  2486. this.$message.success("保存成功");
  2487. }
  2488. // var week = this.weekDay(day);
  2489. // if (week[0] == -1 || week[1] == -1) {
  2490. // return false;
  2491. // }
  2492. // if (this.toDay > this.weekDays[week[0] - 1]) {
  2493. // return false;
  2494. // }
  2495. // this.currentData.schedule_date = this.weekDays[week[0] - 1];
  2496. // this.currentData.schedule_type = week[1];
  2497. // this.currentData.bed_id = row.jihao_id;
  2498. // this.currentData.partition_id = row.zone_id;
  2499. // this.currentData.schedule_week = week[0];
  2500. // this.currentData.type_name = this.dayType(week[1]);
  2501. // this.currentData.zone_name = row.area;
  2502. // this.currentData.bed_name = row.cut;
  2503. // this.currentData.partition_type = row.zone_type;
  2504. // this.currentData.mode_id = this.cur_info.mode_id;
  2505. // this.currentData.id = 0;
  2506. // this.currentData.contagions = [];
  2507. // this.currentData.patient_id = this.cur_info.patient_id;
  2508. // this.currentData.patient = this.cur_info.patient_name;
  2509. // this.setSchedule()
  2510. },
  2511. querySearchAsync(keyword, cb) {
  2512. let key = "";
  2513. if (keyword != undefined) {
  2514. key = keyword;
  2515. }
  2516. let searchArray = [];
  2517. let obj = {
  2518. keyword: key,
  2519. };
  2520. PostSearchSmartSchPatient(obj).then((response) => {
  2521. if (response.data.state == 1) {
  2522. searchArray = response.data.data.patient;
  2523. cb(searchArray);
  2524. } else {
  2525. cb([]);
  2526. }
  2527. });
  2528. },
  2529. getTime(value, temp) {
  2530. if (value != undefined) {
  2531. return uParseTime(value, temp);
  2532. }
  2533. return "";
  2534. },
  2535. handleSelect(val) {
  2536. this.dataloading = true
  2537. getSmartSchByPatient(val.id).then((response) => {
  2538. this.dataloading = false
  2539. var sch = response.data.data.sch
  2540. this.editableTabsValue = "1";
  2541. this.editableTabs[0].tableWeekArrage = [];
  2542. this.editableTabs[1].tableWeekArrage = [];
  2543. this.editableTabs[2].tableWeekArrage = [];
  2544. this.editableTabs[0].checkedWeek = [];
  2545. this.editableTabs[1].checkedWeek = [];
  2546. this.editableTabs[2].checkedWeek = [];
  2547. var tempDate = new Date();
  2548. var day = tempDate.getDay();
  2549. console.log(day);
  2550. if (day == 0) {
  2551. day = 7;
  2552. }
  2553. console.log(val);
  2554. this.smart_keyword = val.name;
  2555. this.cur_smart_patient_id = val.id;
  2556. this.cur_smart_patient_name = val.name;
  2557. this.cur_smart_patient_no = val.dialysis_no;
  2558. //过滤出当前患者所有排班信息,填充对应的数据到智能排班列表
  2559. //根据患者的排班日期判断属于本周还是下周还是下下周
  2560. for (let i = 0; i < sch.length; i++) {
  2561. var week_type = this.getWeekType(
  2562. this.getTime(sch[i].schedule_date, "{y}-{m}-{d}")
  2563. );
  2564. switch (week_type) {
  2565. case "1":
  2566. var obj = {
  2567. mode_id: sch[i].mode_id,
  2568. sch_type: sch[i].schedule_type,
  2569. zone_id: sch[i].partition_id,
  2570. jihao_id:sch[i].bed_id,
  2571. is_edit: false,
  2572. week: this.getWeek(sch[i].schedule_week),
  2573. jihaos: this.partitionsProp[sch[i].partition_id].jihaos,
  2574. schedule_date: this.getDate(sch[i].schedule_week),
  2575. sch_id: sch[i].id,
  2576. };
  2577. let is_edit = true;
  2578. console.log("val.sch[i].order.id");
  2579. console.log(sch[i].order.id);
  2580. console.log("val.sch[i].order.id");
  2581. if (sch[i].schedule_week < day || sch[i].order.id > 0) {
  2582. is_edit = false;
  2583. } else {
  2584. is_edit = true;
  2585. }
  2586. obj.is_edit = is_edit;
  2587. for (let b = 0; b < this.weeks.length; b++) {
  2588. console.log(sch[i].schedule_week);
  2589. console.log(this.weeks[b].week_type);
  2590. if (sch[i].schedule_week == this.weeks[b].week_type) {
  2591. if (
  2592. this.weeks[b].week_type >= day ||
  2593. sch[i].order.id == 0
  2594. ) {
  2595. this.weeks[b].is_edit = true;
  2596. } else {
  2597. this.weeks[b].is_edit = false;
  2598. }
  2599. this.editableTabs[0].checkedWeek.push(this.weeks[b]);
  2600. }
  2601. }
  2602. this.editableTabs[0].tableWeekArrage.push(obj);
  2603. break;
  2604. case "2":
  2605. var obj2 = {
  2606. mode_id: sch[i].mode_id,
  2607. sch_type: sch[i].schedule_type,
  2608. zone_id: sch[i].partition_id,
  2609. jihao_id: sch[i].bed_id,
  2610. is_edit: false,
  2611. week: this.getWeek(sch[i].schedule_week),
  2612. jihaos: this.partitionsProp[sch[i].partition_id].jihaos,
  2613. schedule_date: this.getDate(sch[i].schedule_week + 7),
  2614. sch_id: sch[i].id,
  2615. };
  2616. let is_edit2 = true;
  2617. obj2.is_edit = is_edit2;
  2618. // let checkObj2={
  2619. // name:this.getWeek(val.sch[i].schedule_week),
  2620. // week_type:val.sch[i].schedule_week,
  2621. // is_edit:is_edit2
  2622. // }
  2623. // this.editableTabs[1].checkedWeek.push(checkObj2)
  2624. for (let b = 0; b < this.weeks.length; b++) {
  2625. if (sch[i].schedule_week == this.weeks[b].week_type) {
  2626. // this.weeks[b].is_edit = true;
  2627. this.editableTabs[1].checkedWeek.push(this.weeks[b]);
  2628. }
  2629. }
  2630. this.editableTabs[1].tableWeekArrage.push(obj2);
  2631. break;
  2632. case "3":
  2633. let obj3 = {
  2634. mode_id: sch[i].mode_id,
  2635. sch_type: sch[i].schedule_type,
  2636. zone_id: sch[i].partition_id,
  2637. jihao_id: sch[i].bed_id,
  2638. is_edit: false,
  2639. week: this.getWeek(sch[i].schedule_week),
  2640. jihaos: this.partitionsProp[sch[i].partition_id].jihaos,
  2641. schedule_date: this.getDate(sch[i].schedule_week + 14),
  2642. sch_id: sch[i].id,
  2643. };
  2644. let is_edit3 = true;
  2645. obj3.is_edit = is_edit3;
  2646. for (let b = 0; b < this.weeks.length; b++) {
  2647. if (sch[i].schedule_week == this.weeks[b].week_type) {
  2648. // this.weeks[b].is_edit = true;
  2649. this.editableTabs[2].checkedWeek.push(this.weeks[b]);
  2650. }
  2651. }
  2652. this.editableTabs[2].tableWeekArrage.push(obj3);
  2653. break;
  2654. }
  2655. }
  2656. if(this.editableTabsValue == "1") {
  2657. var tempDate = new Date();
  2658. var day = tempDate.getDay();
  2659. if (day == 0) {
  2660. day = 7;
  2661. }
  2662. for (let i = 0; i < this.weeks.length; i++) {
  2663. if (this.weeks[i].week_type < day) {
  2664. this.weeks[i].is_edit = false;
  2665. }
  2666. }
  2667. }
  2668. this.current_patient_data = this.editableTabs
  2669. this.current_all_sch = this.editableTabs;
  2670. });
  2671. },
  2672. getDate(week_type) {
  2673. console.log(week_type);
  2674. switch (week_type) {
  2675. case 1:
  2676. return this.days[0];
  2677. break;
  2678. case 2:
  2679. return this.days[1];
  2680. break;
  2681. case 3:
  2682. return this.days[2];
  2683. break;
  2684. case 4:
  2685. return this.days[3];
  2686. break;
  2687. case 5:
  2688. return this.days[4];
  2689. break;
  2690. case 6:
  2691. return this.days[5];
  2692. break;
  2693. case 7:
  2694. return this.days[6];
  2695. break;
  2696. case 8:
  2697. return this.days[7];
  2698. break;
  2699. case 9:
  2700. return this.days[8];
  2701. break;
  2702. case 10:
  2703. return this.days[9];
  2704. break;
  2705. case 11:
  2706. return this.days[10];
  2707. break;
  2708. case 12:
  2709. return this.days[11];
  2710. break;
  2711. case 13:
  2712. return this.days[12];
  2713. break;
  2714. case 14:
  2715. return this.days[13];
  2716. break;
  2717. case 15:
  2718. return this.days[14];
  2719. break;
  2720. case 16:
  2721. return this.days[15];
  2722. break;
  2723. case 17:
  2724. return this.days[16];
  2725. break;
  2726. case 18:
  2727. return this.days[17];
  2728. break;
  2729. case 19:
  2730. return this.days[18];
  2731. break;
  2732. case 20:
  2733. return this.days[19];
  2734. break;
  2735. case 21:
  2736. return this.days[20];
  2737. break;
  2738. }
  2739. },
  2740. getWeek(week) {
  2741. switch (week) {
  2742. case 1:
  2743. return "周一";
  2744. break;
  2745. case 2:
  2746. return "周二";
  2747. break;
  2748. case 3:
  2749. return "周三";
  2750. break;
  2751. case 4:
  2752. return "周四";
  2753. break;
  2754. case 5:
  2755. return "周五";
  2756. break;
  2757. case 6:
  2758. return "周六";
  2759. break;
  2760. case 7:
  2761. return "周日";
  2762. break;
  2763. }
  2764. },
  2765. getWeekType(date) {
  2766. console.log(date);
  2767. console.log(this.days);
  2768. let index = 0;
  2769. for (let i = 0; i < this.days.length; i++) {
  2770. if (date == this.days[i]) {
  2771. index = i;
  2772. console.log(index);
  2773. }
  2774. }
  2775. if (index >= 0 && index <= 6) {
  2776. return "1";
  2777. } else if (index > 6 && index <= 13) {
  2778. return "2";
  2779. } else if (index > 13 && index <= 20) {
  2780. return "3";
  2781. }
  2782. },
  2783. showSmartDialog() {
  2784. this.dataloading = true
  2785. this.editableTabsValue = "1";
  2786. for (let i = 0; i < this.patientList.length; i++) {
  2787. if (this.patientList[i].id == this.cur_info.patient_id) {
  2788. this.cur_smart_patient_name = this.patientList[i].name;
  2789. this.cur_smart_patient_no = this.patientList[i].dialysis_no;
  2790. this.cur_smart_patient_id = this.patientList[i].id;
  2791. }
  2792. }
  2793. let params = {
  2794. patient_id: this.cur_info.patient_id,
  2795. };
  2796. let data = [
  2797. {
  2798. checkedWeek: [],
  2799. title: "本周",
  2800. name: "1",
  2801. tableWeekArrage: [],
  2802. },
  2803. {
  2804. checkedWeek: [],
  2805. title: "下周",
  2806. name: "2",
  2807. tableWeekArrage: [],
  2808. },
  2809. {
  2810. checkedWeek: [],
  2811. title: "下下周",
  2812. name: "3",
  2813. tableWeekArrage: [],
  2814. },
  2815. ];
  2816. getPatientSmartSch(params).then((response) => {
  2817. if (response.data.state == 0) {
  2818. return false;
  2819. }
  2820. var schedules = response.data.data.schedules;
  2821. this.dataloading = false
  2822. this.current_all_sch[0].tableWeekArrage = [];
  2823. this.current_all_sch[1].tableWeekArrage = [];
  2824. this.current_all_sch[2].tableWeekArrage = [];
  2825. this.editableTabs[0].tableWeekArrage = [];
  2826. this.editableTabs[0].checkedWeek = [];
  2827. this.editableTabs[1].tableWeekArrage = [];
  2828. this.editableTabs[1].checkedWeek = [];
  2829. this.editableTabs[2].tableWeekArrage = [];
  2830. this.editableTabs[2].checkedWeek = [];
  2831. var tempDate = new Date();
  2832. var day = tempDate.getDay();
  2833. if (day == 0) {
  2834. day = 7;
  2835. }
  2836. for (let i = 0; i < schedules.length; i++) {
  2837. var week_type = this.getWeekType(
  2838. this.getTime(schedules[i].schedule_date, "{y}-{m}-{d}")
  2839. ).toString();
  2840. console.log(week_type);
  2841. console.log(this.getTime(schedules[i].schedule_date));
  2842. switch (week_type) {
  2843. case "1":
  2844. var obj = {
  2845. mode_id: schedules[i].mode_id,
  2846. sch_type: schedules[i].schedule_type,
  2847. zone_id: schedules[i].partition_id,
  2848. jihao_id: schedules[i].bed_id,
  2849. is_edit: false,
  2850. week: this.getWeek(schedules[i].schedule_week),
  2851. schedule_date: this.getDate(schedules[i].schedule_week),
  2852. jihaos: this.partitionsProp[schedules[i].partition_id].jihaos,
  2853. sch_id: schedules[i].id,
  2854. };
  2855. let is_edit = true;
  2856. if (
  2857. schedules[i].schedule_week < day ||
  2858. schedules[i].order.id > 0
  2859. ) {
  2860. is_edit = false;
  2861. } else {
  2862. is_edit = true;
  2863. }
  2864. obj.is_edit = is_edit;
  2865. for (let b = 0; b < this.weeks.length; b++) {
  2866. if (schedules[i].schedule_week == this.weeks[b].week_type) {
  2867. if (
  2868. this.weeks[b].week_type >= day &&
  2869. schedules[i].order.id == 0
  2870. ) {
  2871. console.log( "this.weeks[b].week_type")
  2872. console.log( this.weeks[b].week_type )
  2873. this.weeks[b].is_edit = true;
  2874. } else {
  2875. this.weeks[b].is_edit = false;
  2876. }
  2877. this.editableTabs[0].checkedWeek.push(this.weeks[b]);
  2878. }
  2879. }
  2880. data[0].tableWeekArrage.push(obj);
  2881. this.editableTabs[0].tableWeekArrage.push(obj);
  2882. break;
  2883. case "2":
  2884. var obj2 = {
  2885. mode_id: schedules[i].mode_id,
  2886. sch_type: schedules[i].schedule_type,
  2887. zone_id: schedules[i].partition_id,
  2888. jihao_id: schedules[i].bed_id,
  2889. is_edit: true,
  2890. week: this.getWeek(schedules[i].schedule_week),
  2891. schedule_date: this.getDate(schedules[i].schedule_week + 7),
  2892. jihaos: this.partitionsProp[schedules[i].partition_id].jihaos,
  2893. sch_id: schedules[i].id,
  2894. };
  2895. for (let b = 0; b < this.weeks.length; b++) {
  2896. if (schedules[i].schedule_week == this.weeks[b].week_type) {
  2897. // this.weeks[b].is_edit = true;
  2898. this.editableTabs[1].checkedWeek.push(this.weeks[b]);
  2899. }
  2900. }
  2901. data[1].tableWeekArrage.push(obj2);
  2902. this.editableTabs[1].tableWeekArrage.push(obj2);
  2903. break;
  2904. case "3":
  2905. let obj3 = {
  2906. mode_id: schedules[i].mode_id,
  2907. sch_type: schedules[i].schedule_type,
  2908. zone_id: schedules[i].partition_id,
  2909. jihao_id: schedules[i].bed_id,
  2910. is_edit: true,
  2911. week: this.getWeek(schedules[i].schedule_week),
  2912. schedule_date: this.getDate(schedules[i].schedule_week + 14),
  2913. jihaos: this.partitionsProp[schedules[i].partition_id].jihaos,
  2914. sch_id: schedules[i].id,
  2915. };
  2916. for (let b = 0; b < this.weeks.length; b++) {
  2917. if (schedules[i].schedule_week == this.weeks[b].week_type) {
  2918. // this.weeks[b].is_edit = true;
  2919. this.editableTabs[2].checkedWeek.push(this.weeks[b]);
  2920. }
  2921. }
  2922. data[2].tableWeekArrage.push(obj3);
  2923. this.editableTabs[2].tableWeekArrage.push(obj3);
  2924. break;
  2925. }
  2926. }
  2927. });
  2928. if(this.editableTabsValue == "1") {
  2929. var tempDate = new Date();
  2930. var day = tempDate.getDay();
  2931. if (day == 0) {
  2932. day = 7;
  2933. }
  2934. for (let i = 0; i < this.weeks.length; i++) {
  2935. if (this.weeks[i].week_type < day) {
  2936. this.weeks[i].is_edit = false;
  2937. }
  2938. }
  2939. }
  2940. for (let i = 0; i < this.editableTabs.length; i++) {
  2941. for(let b = 0; b < this.editableTabs[i].tableWeekArrage.length;b++){
  2942. data[i]["week_type"] = this.getWeekByzhongwen(data[i].week);
  2943. }
  2944. }
  2945. data.sort(function (a, b) {
  2946. return a.week_type - b.week_type;
  2947. });
  2948. this.current_patient_data = data
  2949. this.smartVisible = true;
  2950. this.current_all_sch = data;
  2951. },
  2952. select_week(val) {
  2953. // for(this)
  2954. this.current_all_sch = this.editableTabs
  2955. // for(let i = 0; i < this.editableTabs[0].tableWeekArrage.length; i++){
  2956. //
  2957. //
  2958. // }
  2959. var sch = [];
  2960. for (let i = 0; i < this.current_all_sch.length; i++) {
  2961. if (this.current_all_sch[i].name == this.editableTabsValue) {
  2962. sch = this.current_all_sch[i];
  2963. }
  2964. }
  2965. let data = [];
  2966. for (let i = 0; i < val.length; i++) {
  2967. let is_new = true;
  2968. let week_name = val[i].name;
  2969. let obj = {};
  2970. for (let b = 0; b < sch.tableWeekArrage.length; b++) {
  2971. if (week_name == sch.tableWeekArrage[b].week) {
  2972. is_new = false;
  2973. obj = sch.tableWeekArrage[b];
  2974. }
  2975. }
  2976. let keyIndex = "";
  2977. for (var key in this.partitionsProp) {
  2978. keyIndex = key;
  2979. }
  2980. if (!is_new) {
  2981. data.push(obj);
  2982. } else {
  2983. if (this.editableTabsValue == "2") {
  2984. data.push({
  2985. mode_id: 1,
  2986. week: val[i].name,
  2987. sch_type: 1,
  2988. zone_id: "",
  2989. jihao_id: "",
  2990. is_edit: true,
  2991. schedule_date: this.getDate(val[i].week_type + 7),
  2992. jihaos: [],
  2993. sch_id: 0,
  2994. });
  2995. } else if (this.editableTabsValue == "3") {
  2996. data.push({
  2997. mode_id: 1,
  2998. week: val[i].name,
  2999. sch_type: 1,
  3000. zone_id: "",
  3001. jihao_id: "",
  3002. is_edit: true,
  3003. schedule_date: this.getDate(val[i].week_type + 14),
  3004. jihaos: [],
  3005. sch_id: 0,
  3006. });
  3007. } else {
  3008. data.push({
  3009. mode_id: 1,
  3010. week: val[i].name,
  3011. sch_type: 1,
  3012. zone_id: "",
  3013. jihao_id: "",
  3014. is_edit: true,
  3015. schedule_date: this.getDate(val[i].week_type),
  3016. jihaos: [],
  3017. sch_id: 0,
  3018. });
  3019. }
  3020. }
  3021. }
  3022. for (let i = 0; i < data.length; i++) {
  3023. data[i]["week_type"] = this.getWeekByzhongwen(data[i].week);
  3024. }
  3025. data.sort(function (a, b) {
  3026. return a.week_type - b.week_type;
  3027. });
  3028. for (let i = 0; i < this.editableTabs.length; i++) {
  3029. if (this.editableTabs[i].name == this.editableTabsValue) {
  3030. this.editableTabs[i].tableWeekArrage = data;
  3031. }
  3032. }
  3033. this.current_all_sch = this.editableTabs
  3034. },
  3035. patientClick(row) {
  3036. console.log(row);
  3037. this.cur_info.patient_name = row.name;
  3038. this.cur_info.patient_id = row.id;
  3039. },
  3040. modeClick(row) {
  3041. console.log(row);
  3042. this.cur_info.mode_name = row.name;
  3043. this.cur_info.mode_id = row.id;
  3044. },
  3045. setEditData(patients, modes, days, zones) {
  3046. console.log("~~~~~~~~");
  3047. console.log(zones);
  3048. this.days = days;
  3049. this.all_zones = zones;
  3050. this.patientList = patients;
  3051. this.all_patients = patients;
  3052. for (var key in modes) {
  3053. let obj = {
  3054. id: modes[key].id,
  3055. name: modes[key].name,
  3056. };
  3057. this.modes.push(obj);
  3058. }
  3059. this.cur_info["patient_name"] = this.patientList[0].name;
  3060. this.cur_info["mode_name"] = this.modes[0].name;
  3061. this.cur_info["patient_id"] = this.patientList[0].id;
  3062. this.cur_info["mode_id"] = this.modes[0].id;
  3063. this.$refs.patient_table.setCurrentRow(this.patientList[0]);
  3064. this.$refs.mode_table.setCurrentRow(this.modes[0]);
  3065. for (let i = 0; i < this.weeks.length; i++) {
  3066. var tempDate = new Date();
  3067. var day = tempDate.getDay();
  3068. if (day == 0) {
  3069. day = 7;
  3070. }
  3071. if (this.weeks[i].week_type >= day) {
  3072. this.weeks[i].is_edit = true;
  3073. } else {
  3074. this.weeks[i].is_edit = false;
  3075. }
  3076. }
  3077. console.log("weeks");
  3078. console.log(this.weeks);
  3079. // this.getAllZones();
  3080. if (this.partitions_two.length > 0) {
  3081. this.jihaos_two.push(this.partitions_two[0].jihaos);
  3082. }
  3083. },
  3084. dragstartTwo(event, item) {},
  3085. dragendTwo(event) {},
  3086. drag(e, day, index, name) {
  3087. //开始
  3088. this.activeItem = { day: day, index: index, name: name };
  3089. },
  3090. allowDrop(e) {
  3091. e.preventDefault();
  3092. },
  3093. // ----------------------------------
  3094. // | !在html里面的chedule-item里绑定的|
  3095. // | ":draggable"可控制该表格能否拖 |
  3096. // | 动,根据实际情况进行修改 |
  3097. // | |
  3098. // -----------------------------------
  3099. drop(e, day, index, name, row) {
  3100. e.preventDefault();
  3101. for (var key in row) {
  3102. if (key == day) {
  3103. var week = this.weekDay(day);
  3104. this.currentData.schedule_date = this.weekDays[week[0] - 1];
  3105. this.currentData.schedule_type = week[1];
  3106. this.currentData.bed_id = row.jihao_id;
  3107. this.currentData.partition_id = row.zone_id;
  3108. this.currentData.schedule_week = week[0];
  3109. this.currentData.type_name = this.dayType(week[1]);
  3110. this.currentData.zone_name = row.area;
  3111. this.currentData.bed_name = row.cut;
  3112. this.currentData.partition_type = row.zone_type;
  3113. if (
  3114. row[key].patient.length > 0 ||
  3115. row[key].mode_name.length > 0 ||
  3116. row[key].mode_id > 0 ||
  3117. row[key].patient_id > 0
  3118. ) {
  3119. this.$message.error("当前机号已有排班");
  3120. return;
  3121. } else {
  3122. //接口提交排班数据
  3123. this.currentData.mode_id = this.cur_info.mode_id;
  3124. this.currentData.id = 0;
  3125. this.currentData.contagions = [];
  3126. this.currentData.patient_id = this.cur_info.patient_id;
  3127. this.currentData.patient = this.cur_info.patient_name;
  3128. this.setSchedule();
  3129. }
  3130. }
  3131. }
  3132. },
  3133. // 左边栏选中名字和模式拖动结束后
  3134. taskDraggerEnd(e) {
  3135. console.log(e.to);
  3136. console.log(e.form);
  3137. },
  3138. //move回调方法
  3139. onMove(e, originalEvent) {
  3140. return true;
  3141. },
  3142. compare(p) {
  3143. //这是比较函数
  3144. return function (m, n) {
  3145. var a = m[p];
  3146. var b = n[p];
  3147. return a - b; //升序
  3148. };
  3149. },
  3150. getWeekPanels() {
  3151. this.scheduleZone = [];
  3152. var partionStr = this.partition_id;
  3153. var arr = this.zoneIdList.join(",");
  3154. var str = "";
  3155. if (partionStr == 0) {
  3156. str = arr;
  3157. }
  3158. if (partionStr != 0) {
  3159. str = partionStr.join(",");
  3160. }
  3161. getWeekPanelsOne(1, str).then((response) => {
  3162. if (response.data.state == 0) {
  3163. return false;
  3164. }
  3165. var partitions = response.data.data.partitions;
  3166. console.log("partitions", partitions);
  3167. this.theWeek.thisWeek = response.data.data.theWeek;
  3168. console.log("这个周", response.data.data.theWeek);
  3169. this.theWeek.lastWeek = this.theWeek.thisWeek - 1;
  3170. this.theWeek.nextWeek = this.theWeek.thisWeek + 1;
  3171. this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2;
  3172. var that = this;
  3173. if (partitions.length > 0) {
  3174. partitions.forEach(function (partition) {
  3175. if (partition.jihaos.length == 0) {
  3176. return false;
  3177. }
  3178. that.scheduleZoneRow.push(partition.jihaos.length);
  3179. that.partitions[partition.id] = partition;
  3180. partition.jihaos.forEach(function (jihao) {
  3181. var thisPa = {
  3182. area: partition.name,
  3183. zone_id: partition.id,
  3184. zone_type: partition.type,
  3185. cut: jihao.number,
  3186. jihao_id: jihao.id,
  3187. sort: jihao.sort,
  3188. Mon_M: {
  3189. schedule_id: 0,
  3190. mode_id: 0,
  3191. mode_name: "",
  3192. dialysis_machine_name: "",
  3193. patient_id: 0,
  3194. patient: "",
  3195. zone_id: partition.id,
  3196. jihao_id: jihao.id,
  3197. },
  3198. Mon_A: {
  3199. schedule_id: 0,
  3200. mode_id: 0,
  3201. mode_name: "",
  3202. patient_id: 0,
  3203. dialysis_machine_name: "",
  3204. patient: "",
  3205. zone_id: partition.id,
  3206. jihao_id: jihao.id,
  3207. },
  3208. Mon_N: {
  3209. schedule_id: 0,
  3210. mode_id: 0,
  3211. mode_name: "",
  3212. patient_id: 0,
  3213. dialysis_machine_name: "",
  3214. patient: "",
  3215. zone_id: partition.id,
  3216. jihao_id: jihao.id,
  3217. },
  3218. Tue_M: {
  3219. schedule_id: 0,
  3220. mode_id: 0,
  3221. mode_name: "",
  3222. dialysis_machine_name: "",
  3223. patient_id: 0,
  3224. patient: "",
  3225. zone_id: partition.id,
  3226. jihao_id: jihao.id,
  3227. },
  3228. Tue_A: {
  3229. schedule_id: 0,
  3230. mode_id: 0,
  3231. dialysis_machine_name: "",
  3232. mode_name: "",
  3233. patient_id: 0,
  3234. patient: "",
  3235. zone_id: partition.id,
  3236. jihao_id: jihao.id,
  3237. },
  3238. Tue_N: {
  3239. schedule_id: 0,
  3240. mode_id: 0,
  3241. dialysis_machine_name: "",
  3242. mode_name: "",
  3243. patient_id: 0,
  3244. patient: "",
  3245. zone_id: partition.id,
  3246. jihao_id: jihao.id,
  3247. },
  3248. Wed_M: {
  3249. schedule_id: 0,
  3250. mode_id: 0,
  3251. dialysis_machine_name: "",
  3252. mode_name: "",
  3253. patient_id: 0,
  3254. patient: "",
  3255. zone_id: partition.id,
  3256. jihao_id: jihao.id,
  3257. },
  3258. Wed_A: {
  3259. schedule_id: 0,
  3260. mode_id: 0,
  3261. mode_name: "",
  3262. patient_id: 0,
  3263. patient: "",
  3264. zone_id: partition.id,
  3265. dialysis_machine_name: "",
  3266. jihao_id: jihao.id,
  3267. },
  3268. Wed_N: {
  3269. schedule_id: 0,
  3270. mode_id: 0,
  3271. mode_name: "",
  3272. patient_id: 0,
  3273. patient: "",
  3274. zone_id: partition.id,
  3275. dialysis_machine_name: "",
  3276. jihao_id: jihao.id,
  3277. },
  3278. Thurs_M: {
  3279. schedule_id: 0,
  3280. mode_id: 0,
  3281. mode_name: "",
  3282. patient_id: 0,
  3283. patient: "",
  3284. zone_id: partition.id,
  3285. dialysis_machine_name: "",
  3286. jihao_id: jihao.id,
  3287. },
  3288. Thurs_A: {
  3289. schedule_id: 0,
  3290. mode_id: 0,
  3291. mode_name: "",
  3292. patient_id: 0,
  3293. patient: "",
  3294. dialysis_machine_name: "",
  3295. zone_id: partition.id,
  3296. jihao_id: jihao.id,
  3297. },
  3298. Thurs_N: {
  3299. schedule_id: 0,
  3300. mode_id: 0,
  3301. mode_name: "",
  3302. patient_id: 0,
  3303. patient: "",
  3304. dialysis_machine_name: "",
  3305. zone_id: partition.id,
  3306. jihao_id: jihao.id,
  3307. },
  3308. Fri_M: {
  3309. schedule_id: 0,
  3310. mode_id: 0,
  3311. mode_name: "",
  3312. patient_id: 0,
  3313. dialysis_machine_name: "",
  3314. patient: "",
  3315. zone_id: partition.id,
  3316. jihao_id: jihao.id,
  3317. },
  3318. Fri_A: {
  3319. schedule_id: 0,
  3320. mode_id: 0,
  3321. mode_name: "",
  3322. patient_id: 0,
  3323. dialysis_machine_name: "",
  3324. patient: "",
  3325. zone_id: partition.id,
  3326. jihao_id: jihao.id,
  3327. },
  3328. Fri_N: {
  3329. schedule_id: 0,
  3330. mode_id: 0,
  3331. mode_name: "",
  3332. patient_id: 0,
  3333. dialysis_machine_name: "",
  3334. patient: "",
  3335. zone_id: partition.id,
  3336. jihao_id: jihao.id,
  3337. },
  3338. Sat_M: {
  3339. schedule_id: 0,
  3340. mode_id: 0,
  3341. mode_name: "",
  3342. dialysis_machine_name: "",
  3343. patient_id: 0,
  3344. patient: "",
  3345. zone_id: partition.id,
  3346. jihao_id: jihao.id,
  3347. },
  3348. Sat_A: {
  3349. schedule_id: 0,
  3350. mode_id: 0,
  3351. mode_name: "",
  3352. patient_id: 0,
  3353. dialysis_machine_name: "",
  3354. patient: "",
  3355. zone_id: partition.id,
  3356. jihao_id: jihao.id,
  3357. },
  3358. Sat_N: {
  3359. schedule_id: 0,
  3360. mode_id: 0,
  3361. mode_name: "",
  3362. patient_id: 0,
  3363. dialysis_machine_name: "",
  3364. patient: "",
  3365. },
  3366. Sun_A: {
  3367. schedule_id: 0,
  3368. mode_id: 0,
  3369. mode_name: "",
  3370. dialysis_machine_name: "",
  3371. patient_id: 0,
  3372. patient: "",
  3373. zone_id: partition.id,
  3374. jihao_id: jihao.id,
  3375. },
  3376. Sun_N: {
  3377. schedule_id: 0,
  3378. mode_id: 0,
  3379. mode_name: "",
  3380. dialysis_machine_name: "",
  3381. patient_id: 0,
  3382. patient: "",
  3383. zone_id: partition.id,
  3384. jihao_id: jihao.id,
  3385. },
  3386. Sun_M: {
  3387. schedule_id: 0,
  3388. mode_id: 0,
  3389. mode_name: "",
  3390. dialysis_machine_name: "",
  3391. patient_id: 0,
  3392. patient: "",
  3393. zone_id: partition.id,
  3394. jihao_id: jihao.id,
  3395. },
  3396. total: 0,
  3397. };
  3398. that.scheduleZone.push(thisPa);
  3399. });
  3400. });
  3401. }
  3402. this.scheduleZone.sort(this.compare("sort"));
  3403. });
  3404. },
  3405. cellClass({ row, column, rowIndex, columnIndex }) {
  3406. if (columnIndex == 0 || columnIndex == 1 || columnIndex == 23) {
  3407. return "";
  3408. } else {
  3409. if (this.weekTime == "lastWeek") {
  3410. if (
  3411. row[column.property].patient_id > 0 &&
  3412. row[column.property].patient_id == this.patient_id_hover
  3413. ) {
  3414. return "hover-td schedule-table-cell-disable";
  3415. } else {
  3416. return "schedule-table-cell-disable";
  3417. }
  3418. // return "schedule-table-cell-disable";
  3419. } else if (this.weekTime == "thisWeek") {
  3420. var weekday = Math.floor((columnIndex - 2) / 3 + 1);
  3421. if (weekday < this.weekday) {
  3422. if (
  3423. row[column.property].patient_id > 0 &&
  3424. row[column.property].patient_id == this.patient_id_hover
  3425. ) {
  3426. return "hover-td schedule-table-cell-disable";
  3427. } else {
  3428. return "schedule-table-cell-disable";
  3429. }
  3430. // return "schedule-table-cell-disable";
  3431. } else {
  3432. if (
  3433. row[column.property].patient_id > 0 &&
  3434. row[column.property].patient_id == this.patient_id_hover
  3435. ) {
  3436. return "hover-td";
  3437. } else {
  3438. return "";
  3439. }
  3440. }
  3441. }
  3442. }
  3443. return "";
  3444. },
  3445. SubmitSearch() {
  3446. this.patientQuery.keywords = this.searchKey;
  3447. this.getSchedulePatients();
  3448. },
  3449. changeSearchContagion(id) {
  3450. this.patientQuery.contagion = id;
  3451. this.getSchedulePatients();
  3452. },
  3453. changeSearchSchedule(id) {
  3454. this.patientQuery.schedule = id;
  3455. this.getSchedulePatients();
  3456. },
  3457. getSummaries(param) {
  3458. const { columns, data } = param;
  3459. const sums = [];
  3460. columns.forEach((column, index) => {
  3461. if (index === 0 || index === 25) {
  3462. sums[index] = "总数";
  3463. return;
  3464. }
  3465. if (index === 1 || index === 24) {
  3466. sums[index] = data.length;
  3467. return;
  3468. }
  3469. const values = data.map((item) => item[column.property]);
  3470. if (index === 23) {
  3471. sums[index] = values.reduce((prev, curr) => {
  3472. const value = Number(curr);
  3473. if (!isNaN(value)) {
  3474. return prev + curr;
  3475. } else {
  3476. return prev;
  3477. }
  3478. }, 0);
  3479. sums[index];
  3480. return;
  3481. }
  3482. sums[index] = values.reduce((prev, curr) => {
  3483. if (typeof curr["mode_id"] === "undefined") {
  3484. return prev;
  3485. }
  3486. const value = Number(curr["mode_id"]);
  3487. if (!isNaN(value) && value > 0) {
  3488. return prev + 1;
  3489. } else {
  3490. return prev;
  3491. }
  3492. }, 0);
  3493. sums[index];
  3494. });
  3495. this.$nextTick(() => {
  3496. this.$refs.table.doLayout();
  3497. });
  3498. return sums;
  3499. },
  3500. objectSpanMethod({ row, column, rowIndex, columnIndex }) {
  3501. var that = this;
  3502. var rowNum = 0;
  3503. rowNumber = 0;
  3504. var rutrnData = {};
  3505. if (columnIndex === 0 || columnIndex == 25) {
  3506. var rowLen = this.scheduleZoneRow.length;
  3507. if (rowLen > 0) {
  3508. for (let index = 0; index < rowLen; index++) {
  3509. rowNum = this.scheduleZoneRow[index];
  3510. rowNumber += rowNum;
  3511. var f = rowNumber - rowNum;
  3512. if (f == rowIndex) {
  3513. rutrnData = {
  3514. rowspan: rowNum,
  3515. colspan: 1,
  3516. };
  3517. break;
  3518. } else if (rowIndex < rowNumber) {
  3519. rutrnData = {
  3520. rowspan: 0,
  3521. colspan: 0,
  3522. };
  3523. break;
  3524. }
  3525. }
  3526. return rutrnData;
  3527. }
  3528. }
  3529. },
  3530. handleCurrentChange(row) {
  3531. if (typeof row === "undefined" || row == null) {
  3532. this.currentData.patient_id = 0;
  3533. this.currentData.contagions = [];
  3534. } else {
  3535. this.currentData.patient_id = row.id;
  3536. this.currentData.contagions = row.contagions;
  3537. }
  3538. },
  3539. closePatientPanel(row) {
  3540. this.dialogTableVisible = false;
  3541. this.$refs.singleTable.setCurrentRow(row);
  3542. this.currentData.patient_id = 0;
  3543. },
  3544. getSchedules() {
  3545. var partionStr = this.partition_id;
  3546. var arr = this.zoneIdList.join(",");
  3547. var str = "";
  3548. if (partionStr == 0) {
  3549. str = arr;
  3550. }
  3551. if (partionStr != 0) {
  3552. str = partionStr.join(",");
  3553. }
  3554. const params = {
  3555. weekTime: this.theType,
  3556. patitionid: str,
  3557. schedule_type: this.schedule_type,
  3558. };
  3559. getSchedulesOne(params).then((response) => {
  3560. if (response.data.state == 1) {
  3561. this.weekTitle = response.data.data.weekTitle;
  3562. this.weekDays = response.data.data.days;
  3563. this.toDay = response.data.data.today;
  3564. var theSchedules = response.data.data.schdules;
  3565. var that = this;
  3566. this.scheduleZone.forEach(function (zone, index) {
  3567. that.scheduleZone[index].Mon_M = {
  3568. mode_id: 0,
  3569. mode_name: "",
  3570. patient_id: 0,
  3571. patient: "",
  3572. dialysis_machine_name: "",
  3573. };
  3574. that.scheduleZone[index].Mon_A = {
  3575. mode_id: 0,
  3576. mode_name: "",
  3577. patient_id: 0,
  3578. patient: "",
  3579. dialysis_machine_name: "",
  3580. };
  3581. that.scheduleZone[index].Mon_N = {
  3582. mode_id: 0,
  3583. mode_name: "",
  3584. patient_id: 0,
  3585. patient: "",
  3586. dialysis_machine_name: "",
  3587. };
  3588. that.scheduleZone[index].Tue_M = {
  3589. mode_id: 0,
  3590. mode_name: "",
  3591. patient_id: 0,
  3592. patient: "",
  3593. dialysis_machine_name: "",
  3594. };
  3595. that.scheduleZone[index].Tue_A = {
  3596. mode_id: 0,
  3597. mode_name: "",
  3598. dialysis_machine_name: "",
  3599. patient_id: 0,
  3600. patient: "",
  3601. };
  3602. that.scheduleZone[index].Tue_N = {
  3603. mode_id: 0,
  3604. mode_name: "",
  3605. dialysis_machine_name: "",
  3606. patient_id: 0,
  3607. patient: "",
  3608. };
  3609. that.scheduleZone[index].Wed_M = {
  3610. mode_id: 0,
  3611. mode_name: "",
  3612. patient_id: 0,
  3613. dialysis_machine_name: "",
  3614. patient: "",
  3615. };
  3616. that.scheduleZone[index].Wed_A = {
  3617. mode_id: 0,
  3618. mode_name: "",
  3619. dialysis_machine_name: "",
  3620. patient_id: 0,
  3621. patient: "",
  3622. };
  3623. that.scheduleZone[index].Wed_N = {
  3624. mode_id: 0,
  3625. mode_name: "",
  3626. dialysis_machine_name: "",
  3627. patient_id: 0,
  3628. patient: "",
  3629. };
  3630. that.scheduleZone[index].Thurs_M = {
  3631. mode_id: 0,
  3632. mode_name: "",
  3633. patient_id: 0,
  3634. patient: "",
  3635. };
  3636. that.scheduleZone[index].Thurs_A = {
  3637. mode_id: 0,
  3638. mode_name: "",
  3639. dialysis_machine_name: "",
  3640. patient_id: 0,
  3641. patient: "",
  3642. };
  3643. that.scheduleZone[index].Thurs_N = {
  3644. mode_id: 0,
  3645. mode_name: "",
  3646. patient_id: 0,
  3647. patient: "",
  3648. };
  3649. that.scheduleZone[index].Fri_M = {
  3650. mode_id: 0,
  3651. mode_name: "",
  3652. dialysis_machine_name: "",
  3653. patient_id: 0,
  3654. patient: "",
  3655. };
  3656. that.scheduleZone[index].Fri_A = {
  3657. mode_id: 0,
  3658. mode_name: "",
  3659. patient_id: 0,
  3660. dialysis_machine_name: "",
  3661. patient: "",
  3662. };
  3663. that.scheduleZone[index].Fri_N = {
  3664. mode_id: 0,
  3665. mode_name: "",
  3666. patient_id: 0,
  3667. dialysis_machine_name: "",
  3668. patient: "",
  3669. };
  3670. that.scheduleZone[index].Sat_M = {
  3671. mode_id: 0,
  3672. mode_name: "",
  3673. dialysis_machine_name: "",
  3674. patient_id: 0,
  3675. patient: "",
  3676. };
  3677. that.scheduleZone[index].Sat_A = {
  3678. mode_id: 0,
  3679. mode_name: "",
  3680. patient_id: 0,
  3681. dialysis_machine_name: "",
  3682. patient: "",
  3683. };
  3684. that.scheduleZone[index].Sat_N = {
  3685. mode_id: 0,
  3686. mode_name: "",
  3687. patient_id: 0,
  3688. patient: "",
  3689. dialysis_machine_name: "",
  3690. };
  3691. that.scheduleZone[index].Sun_A = {
  3692. mode_id: 0,
  3693. mode_name: "",
  3694. patient_id: 0,
  3695. dialysis_machine_name: "",
  3696. patient: "",
  3697. };
  3698. that.scheduleZone[index].Sun_N = {
  3699. mode_id: 0,
  3700. mode_name: "",
  3701. dialysis_machine_name: "",
  3702. patient_id: 0,
  3703. patient: "",
  3704. };
  3705. that.scheduleZone[index].Sun_M = {
  3706. mode_id: 0,
  3707. mode_name: "",
  3708. patient_id: 0,
  3709. dialysis_machine_name: "",
  3710. patient: "",
  3711. };
  3712. that.scheduleZone[index].total = 0;
  3713. if (response.data.data.schdules.length > 0) {
  3714. theSchedules.forEach(function (schedule, sindex) {
  3715. if (zone.jihao_id == schedule.bed_id) {
  3716. var weekPath = that.weekPath(
  3717. schedule.schedule_week,
  3718. schedule.schedule_type
  3719. );
  3720. if (weekPath.length == 2) {
  3721. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  3722. that.scheduleZone[index][weekPathKey] = {
  3723. schedule_id: schedule.id,
  3724. mode_id: schedule.mode_id,
  3725. patient_id: schedule.patient_id,
  3726. patient: schedule.patient,
  3727. dialysis_machine_name: schedule.dialysis_machine_name,
  3728. patient_contagions: schedule.patient_contagions,
  3729. mode_name:
  3730. typeof that.modeOptions[schedule.mode_id] ===
  3731. "undefined"
  3732. ? ""
  3733. : that.modeOptions[schedule.mode_id].name,
  3734. };
  3735. that.scheduleZone[index].total += 1;
  3736. }
  3737. }
  3738. });
  3739. }
  3740. });
  3741. } else {
  3742. this.$message.error("网络错误");
  3743. return false;
  3744. }
  3745. });
  3746. },
  3747. getSchedulePatients() {
  3748. getSchedulePatients(this.patientQuery).then((response) => {
  3749. if (response.data.state == 1) {
  3750. this.patients = response.data.data.patients;
  3751. }
  3752. });
  3753. },
  3754. CancelSchedule(id) {
  3755. this.$confirm("确定要取消当前排班?", "提示", {
  3756. confirmButtonText: "确定",
  3757. cancelButtonText: "取消",
  3758. type: "warning",
  3759. })
  3760. .then(() => {
  3761. CancelSchedule(id).then((response) => {
  3762. if (response.data.state == 0) {
  3763. this.$message.error(response.data.msg);
  3764. } else {
  3765. this.$message({
  3766. type: "success",
  3767. message: "排班已取消!",
  3768. });
  3769. var that = this;
  3770. var schedule = response.data.data.schedule;
  3771. this.scheduleZone.forEach(function (zone, index) {
  3772. if (
  3773. zone.zone_id == schedule.partition_id &&
  3774. zone.jihao_id == schedule.bed_id
  3775. ) {
  3776. var weekPath = that.weekPath(
  3777. schedule.schedule_week,
  3778. schedule.schedule_type
  3779. );
  3780. if (weekPath.length == 2) {
  3781. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  3782. that.scheduleZone[index][weekPathKey] = {
  3783. schedule_id: 0,
  3784. mode_id: 0,
  3785. patient_id: 0,
  3786. patient: "",
  3787. mode_name: "",
  3788. dialysis_machine_name: "",
  3789. };
  3790. that.scheduleZone[index].total -= 1;
  3791. }
  3792. }
  3793. });
  3794. }
  3795. });
  3796. })
  3797. .catch(() => {});
  3798. },
  3799. changeScheduleActon(formName) {
  3800. this.changing_bed = true;
  3801. ChangeSchedule(this.currentData.id, this.changeSchedule)
  3802. .then((response) => {
  3803. if (response.data.state == 0) {
  3804. this.$message.error(response.data.msg);
  3805. } else {
  3806. this.$message({
  3807. type: "success",
  3808. message: "修改成功!",
  3809. });
  3810. var that = this;
  3811. var schedule = response.data.data.schedule;
  3812. this.scheduleZone.forEach(function (zone, index) {
  3813. if (
  3814. zone.zone_id == schedule.partition_id &&
  3815. zone.jihao_id == schedule.bed_id
  3816. ) {
  3817. var weekPath = that.weekPath(
  3818. schedule.schedule_week,
  3819. schedule.schedule_type
  3820. );
  3821. if (weekPath.length == 2) {
  3822. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  3823. that.scheduleZone[index][weekPathKey] = {
  3824. schedule_id: schedule.id,
  3825. mode_id: schedule.mode_id,
  3826. patient_id: schedule.patient_id,
  3827. patient: that.currentData.patient,
  3828. patient_contagions: that.currentData.contagions,
  3829. dialysis_machine_name: schedule.dialysis_machine_name,
  3830. mode_name:
  3831. typeof that.modeOptions[schedule.mode_id] === "undefined"
  3832. ? ""
  3833. : that.modeOptions[schedule.mode_id].name,
  3834. };
  3835. that.scheduleZone[index].total += 1;
  3836. }
  3837. }
  3838. if (
  3839. zone.zone_id == that.currentData.partition_id &&
  3840. zone.jihao_id == that.currentData.bed_id
  3841. ) {
  3842. var weekPath = that.weekPath(
  3843. that.currentData.schedule_week,
  3844. that.currentData.schedule_type
  3845. );
  3846. if (weekPath.length == 2) {
  3847. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  3848. that.scheduleZone[index][weekPathKey] = {
  3849. schedule_id: 0,
  3850. mode_id: 0,
  3851. patient_id: 0,
  3852. patient: "",
  3853. dialysis_machine_name: "",
  3854. mode_name: "",
  3855. patient_contagions: [],
  3856. };
  3857. that.scheduleZone[index].total -= 1;
  3858. }
  3859. }
  3860. });
  3861. this.$refs[formName].resetFields();
  3862. this.jhDialogVisible = false;
  3863. }
  3864. this.changing_bed = false;
  3865. })
  3866. .catch((err) => {
  3867. this.$message.error(err);
  3868. this.changing_bed = false;
  3869. });
  3870. },
  3871. CreateSchedule(id, data) {
  3872. this.creating_schedule = true;
  3873. CreateSchedule(id, data)
  3874. .then((response) => {
  3875. if (response.data.state == 0) {
  3876. this.$message.error(response.data.msg);
  3877. } else {
  3878. this.$message({
  3879. type: "success",
  3880. message: "排班成功!",
  3881. });
  3882. var that = this;
  3883. var schedule = response.data.data.schedule;
  3884. this.scheduleZone.forEach(function (zone, index) {
  3885. if (
  3886. zone.zone_id == schedule.partition_id &&
  3887. zone.jihao_id == schedule.bed_id
  3888. ) {
  3889. var weekPath = that.weekPath(
  3890. schedule.schedule_week,
  3891. schedule.schedule_type
  3892. );
  3893. if (weekPath.length == 2) {
  3894. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  3895. that.scheduleZone[index][weekPathKey] = {
  3896. schedule_id: schedule.id,
  3897. mode_id: schedule.mode_id,
  3898. patient_id: schedule.patient_id,
  3899. patient: schedule.patient,
  3900. dialysis_machine_name: schedule.dialysis_machine_name,
  3901. patient_contagions: that.currentData.contagions,
  3902. mode_name:
  3903. typeof that.modeOptions[schedule.mode_id] === "undefined"
  3904. ? ""
  3905. : that.modeOptions[schedule.mode_id].name,
  3906. };
  3907. that.scheduleZone[index].total += 1;
  3908. }
  3909. }
  3910. });
  3911. this.closePatientPanel();
  3912. }
  3913. this.creating_schedule = false;
  3914. })
  3915. .catch((err) => {
  3916. this.$message.error(err);
  3917. this.creating_schedule = false;
  3918. });
  3919. },
  3920. hoverMouse(row, column, cell, event) {
  3921. if (row[column.property].schedule_id > 0) {
  3922. let patient_id = row[column.property].patient_id;
  3923. this.patient_id_hover = patient_id;
  3924. } else {
  3925. this.patient_id_hover = -1;
  3926. }
  3927. },
  3928. // 删除某一单元格内的患者透析排班
  3929. deletePatientMode(row) {
  3930. console.log(row);
  3931. if (row.schedule_id > 0) {
  3932. this.CancelSchedule(row.schedule_id);
  3933. }
  3934. },
  3935. clickThis(row, column, cell, event) {
  3936. console.log(row, "row");
  3937. console.log(column, "column");
  3938. console.log(cell, "cell");
  3939. console.log(event, "event");
  3940. // debugger
  3941. var week = this.weekDay(column.property);
  3942. if (week[0] == -1 || week[1] == -1) {
  3943. return false;
  3944. }
  3945. if (this.toDay > this.weekDays[week[0] - 1]) {
  3946. return false;
  3947. }
  3948. this.currentData.schedule_date = this.weekDays[week[0] - 1];
  3949. this.currentData.schedule_type = week[1];
  3950. this.currentData.bed_id = row.jihao_id;
  3951. this.currentData.partition_id = row.zone_id;
  3952. this.currentData.schedule_week = week[0];
  3953. this.currentData.type_name = this.dayType(week[1]);
  3954. this.currentData.zone_name = row.area;
  3955. this.currentData.bed_name = row.cut;
  3956. this.currentData.partition_type = row.zone_type;
  3957. if (row[column.property].schedule_id > 0) {
  3958. this.currentData.mode_id = row[column.property].mode_id;
  3959. this.currentData.id = row[column.property].schedule_id;
  3960. this.currentData.patient_id = row[column.property].patient_id;
  3961. this.currentData.patient = row[column.property].patient;
  3962. this.currentData.contagions = row[column.property].patient_contagions;
  3963. this.tiaoZhengType = 1;
  3964. this.msDialogVisible = true;
  3965. }
  3966. },
  3967. submitTiaoZJH(formName) {
  3968. this.$refs[formName].validate((valid) => {
  3969. if (valid) {
  3970. var weekPath = this.weekPath(
  3971. this.changeSchedule.schedule_week,
  3972. this.changeSchedule.schedule_type
  3973. );
  3974. if (weekPath.length != 2) {
  3975. this.$message.error("数据异常");
  3976. return false;
  3977. }
  3978. this.changeSchedule.bed_id = this.device_id;
  3979. for (let i = 0; i < this.origin_device_numbers.length; i++) {
  3980. if (this.origin_device_numbers[i].id == this.device_id) {
  3981. this.changeSchedule.partition_id =
  3982. this.origin_device_numbers[i].zone_id;
  3983. }
  3984. }
  3985. this.changeSchedule.change_action = "change_device";
  3986. this.changeScheduleActon(formName);
  3987. // this.changeSchedule.spartition_type = this.scheduleZone[index].zone_type
  3988. // var weekPathKey = weekPath[0] + '_' + weekPath[1]
  3989. // for (var index in this.scheduleZone) {
  3990. // if (this.scheduleZone[index].jihao_id == this.changeSchedule.bed_id) {
  3991. // if (this.scheduleZone[index][weekPathKey].mode_id > 0) {
  3992. // this.$message.error('选中的区域已经存在排班,不能再排班!')
  3993. // return false
  3994. // }
  3995. // break
  3996. // }
  3997. // }
  3998. // 可能
  3999. // 患者有传染病,与选择的机器类型(传染病)不匹配
  4000. // 患者没有传染病,但机器是某个传染病的专用透析器
  4001. // 机器的透析模式与患者不匹配
  4002. // if (this.currentData.contagions.length > 0) {
  4003. // var cflag = false
  4004. // for (var index in this.currentData.contagions) {
  4005. // if (this.currentData.contagions[index].disease_id == this.changeSchedule.partition_type) {
  4006. // cflag = true
  4007. // }
  4008. // }
  4009. // if (!cflag) {
  4010. // this.$confirm('此患者有传染病,与此透析机不匹配,确定在此排班吗?', '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
  4011. // .then(() => {
  4012. //
  4013. // }).catch(() => {
  4014. // })
  4015. // } else {
  4016. // this.changeSchedule.change_action = 'change_device'
  4017. // this.changeScheduleActon(formName)
  4018. // }
  4019. // } else if (this.changeSchedule.partition_type > 1) {
  4020. // this.$confirm('此患者没有传染病,与此透析机不匹配,确定在此排班吗?', '提示', { confirmButtonText: '确 定', cancelButtonText: '取 消', type: 'warning' })
  4021. // .then(() => {
  4022. // this.changeSchedule.change_action = 'change_device'
  4023. // this.changeScheduleActon(formName)
  4024. // }).catch(() => {
  4025. // })
  4026. // } else {
  4027. // this.changeSchedule.change_action = 'change_device'
  4028. // this.changeScheduleActon(formName)
  4029. // }
  4030. }
  4031. });
  4032. },
  4033. submitMode(formName) {
  4034. this.changing_mode = true;
  4035. this.changeSchedule.change_action = "change_mode";
  4036. ChangeSchedule(this.currentData.id, this.changeSchedule)
  4037. .then((response) => {
  4038. if (response.data.state == 0) {
  4039. this.$message.error(response.data.msg);
  4040. } else {
  4041. this.$message({
  4042. type: "success",
  4043. message: "修改成功!",
  4044. });
  4045. var that = this;
  4046. var schedule = response.data.data.schedule;
  4047. this.scheduleZone.forEach(function (zone, index) {
  4048. if (
  4049. zone.zone_id == schedule.partition_id &&
  4050. zone.jihao_id == schedule.bed_id
  4051. ) {
  4052. var weekPath = that.weekPath(
  4053. schedule.schedule_week,
  4054. schedule.schedule_type
  4055. );
  4056. if (weekPath.length == 2) {
  4057. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  4058. that.scheduleZone[index][weekPathKey].dialysis_machine_name =
  4059. schedule.dialysis_machine_name;
  4060. that.scheduleZone[index][weekPathKey].mode_id =
  4061. schedule.mode_id;
  4062. that.scheduleZone[index][weekPathKey].mode_name =
  4063. typeof that.modeOptions[schedule.mode_id] === "undefined"
  4064. ? ""
  4065. : that.modeOptions[schedule.mode_id].name;
  4066. }
  4067. }
  4068. });
  4069. this.msDialogVisible = false;
  4070. }
  4071. this.changing_mode = false;
  4072. })
  4073. .catch((err) => {
  4074. this.$message.error(err);
  4075. this.changing_mode = false;
  4076. });
  4077. },
  4078. submitTiaoZMS(formName) {
  4079. this.$refs[formName].validate((valid) => {
  4080. if (valid) {
  4081. this.changing_mode = true;
  4082. this.changeSchedule.change_action = "change_mode";
  4083. ChangeSchedule(this.currentData.id, this.changeSchedule)
  4084. .then((response) => {
  4085. if (response.data.state == 0) {
  4086. this.$message.error(response.data.msg);
  4087. } else {
  4088. this.$message({
  4089. type: "success",
  4090. message: "修改成功!",
  4091. });
  4092. var that = this;
  4093. var schedule = response.data.data.schedule;
  4094. this.scheduleZone.forEach(function (zone, index) {
  4095. if (
  4096. zone.zone_id == schedule.partition_id &&
  4097. zone.jihao_id == schedule.bed_id
  4098. ) {
  4099. var weekPath = that.weekPath(
  4100. schedule.schedule_week,
  4101. schedule.schedule_type
  4102. );
  4103. if (weekPath.length == 2) {
  4104. var weekPathKey = weekPath[0] + "_" + weekPath[1];
  4105. that.scheduleZone[index][
  4106. weekPathKey
  4107. ].dialysis_machine_name = schedule.dialysis_machine_name;
  4108. that.scheduleZone[index][weekPathKey].mode_id =
  4109. schedule.mode_id;
  4110. that.scheduleZone[index][weekPathKey].mode_name =
  4111. typeof that.modeOptions[schedule.mode_id] ===
  4112. "undefined"
  4113. ? ""
  4114. : that.modeOptions[schedule.mode_id].name;
  4115. }
  4116. }
  4117. });
  4118. this.$refs[formName].resetFields();
  4119. this.msDialogVisible = false;
  4120. }
  4121. this.changing_mode = false;
  4122. })
  4123. .catch((err) => {
  4124. this.$message.error(err);
  4125. this.changing_mode = false;
  4126. });
  4127. }
  4128. });
  4129. },
  4130. changePartition(value) {
  4131. this.current_devices = this.zone_device_map[value];
  4132. this.device_id = this.current_devices[0].id;
  4133. },
  4134. changeScheduleType(schedule_type) {
  4135. const params = {
  4136. type: schedule_type,
  4137. date: this.currentData.schedule_date,
  4138. };
  4139. getUrgentScheduleInitData(params)
  4140. .then((rs) => {
  4141. if (rs.data.state == 1) {
  4142. this.origin_schedules = rs.data.data.schedules;
  4143. this.origin_device_numbers = rs.data.data.device_numbers;
  4144. var zone_device_map = {};
  4145. for (
  4146. let index = 0;
  4147. index < this.origin_device_numbers.length;
  4148. index++
  4149. ) {
  4150. const device_number = this.origin_device_numbers[index];
  4151. if (
  4152. zone_device_map[device_number.zone_name] == null ||
  4153. zone_device_map[device_number.zone_name] == undefined
  4154. ) {
  4155. zone_device_map[device_number.zone_name] = [];
  4156. }
  4157. zone_device_map[device_number.zone_name].push(device_number);
  4158. }
  4159. this.zone_device_map = zone_device_map;
  4160. this.zone_names = Object.keys(this.zone_device_map);
  4161. // console.log('8989898989898989',this.zone_names)
  4162. // console.log(this.current_devices);
  4163. if (this.zone_names.length > 0) {
  4164. this.zone_name = this.zone_names[0];
  4165. this.current_devices = this.zone_device_map[this.zone_name];
  4166. this.device_id = this.current_devices[0].id;
  4167. }
  4168. this.zone_device_options = [
  4169. { values: this.zone_names },
  4170. // { values: this.getDeviceNumberNames(this.current_devices) },
  4171. { values: this.current_devices },
  4172. ];
  4173. } else {
  4174. }
  4175. })
  4176. .catch((err) => {
  4177. this.loading = false;
  4178. });
  4179. },
  4180. submitTiaoX() {
  4181. // if (this.tiaoZhengType==1) {
  4182. // this.$confirm('确定要取消当前排班?', '提示', {
  4183. // confirmButtonText: '确定',
  4184. // cancelButtonText: '取消',
  4185. // type: 'warning'
  4186. // }).then(() => {
  4187. // this.CancelSchedule(this.currentData.id);
  4188. // }).catch(() => {});
  4189. // }
  4190. switch (this.tiaoZhengType) {
  4191. case 1:
  4192. this.CancelSchedule(this.currentData.id);
  4193. break;
  4194. case 2:
  4195. this.changeSchedule = {
  4196. mode_id: this.currentData.mode_id,
  4197. schedule_type: this.currentData.schedule_type,
  4198. partition_id: this.currentData.partition_id,
  4199. bed_id: this.currentData.bed_id,
  4200. schedule_week: this.currentData.schedule_week,
  4201. partition_type: "",
  4202. };
  4203. if (
  4204. typeof this.partitions[this.currentData.partition_id].jihaos !==
  4205. "undefined"
  4206. ) {
  4207. this.jihaos = this.partitions[this.currentData.partition_id].jihaos;
  4208. } else {
  4209. this.jihaos = [];
  4210. }
  4211. const params = {
  4212. type: this.currentData.schedule_type,
  4213. date: this.currentData.schedule_date,
  4214. };
  4215. getUrgentScheduleInitData(params)
  4216. .then((response) => {
  4217. if (response.data.state == 0) {
  4218. this.$message.error(response.data.msg);
  4219. } else {
  4220. if (response.data.state == 1) {
  4221. this.origin_schedules = response.data.data.schedules;
  4222. this.origin_device_numbers =
  4223. response.data.data.device_numbers;
  4224. var zone_device_map = {};
  4225. for (
  4226. let index = 0;
  4227. index < this.origin_device_numbers.length;
  4228. index++
  4229. ) {
  4230. const device_number = this.origin_device_numbers[index];
  4231. if (
  4232. zone_device_map[device_number.zone_name] == null ||
  4233. zone_device_map[device_number.zone_name] == undefined
  4234. ) {
  4235. zone_device_map[device_number.zone_name] = [];
  4236. }
  4237. zone_device_map[device_number.zone_name].push(
  4238. device_number
  4239. );
  4240. }
  4241. this.zone_device_map = zone_device_map;
  4242. this.zone_names = Object.keys(this.zone_device_map);
  4243. if (this.zone_names.length > 0) {
  4244. this.zone_name = this.zone_names[0];
  4245. this.current_devices = this.zone_device_map[this.zone_name];
  4246. this.device_id = this.current_devices[0].id;
  4247. }
  4248. this.zone_device_options = [
  4249. { values: this.zone_names },
  4250. // { values: this.getDeviceNumberNames(this.current_devices) },
  4251. { values: this.current_devices },
  4252. ];
  4253. //
  4254. // for (let i = this.origin_schedules.length - 1; i >= 0; i--) {
  4255. // for (let y = this.origin_device_numbers.length - 1; y >= 0; y--) {
  4256. // if (this.origin_device_numbers[y].id == this.origin_schedules[i].bed_id) {
  4257. // this.origin_device_numbers.splice(y, 1)
  4258. // }
  4259. // }
  4260. // }
  4261. // // debugger
  4262. // var zone_device_map = {}
  4263. // for (let index = 0; index < this.origin_device_numbers.length; index++) {
  4264. // const device_number = this.origin_device_numbers[index]
  4265. // if (zone_device_map[device_number.zone.name] == null || zone_device_map[device_number.zone.name] == undefined) {
  4266. // zone_device_map[device_number.zone.name] = []
  4267. // }
  4268. // zone_device_map[device_number.zone.name].push(device_number)
  4269. // }
  4270. // this.zone_device_map = zone_device_map
  4271. //
  4272. // this.zone_names = Object.keys(this.zone_device_map)
  4273. // if (this.zone_names.length > 0) {
  4274. // this.zone_name = this.zone_names[0]
  4275. // this.current_devices = this.zone_device_map[this.zone_name]
  4276. // this.device_id = this.current_devices[0].id
  4277. // }
  4278. //
  4279. // this.zone_device_options = [
  4280. // { values: this.zone_names },
  4281. // // { values: this.getDeviceNumberNames(this.current_devices) },
  4282. // { values: this.current_devices }
  4283. // ]
  4284. } else {
  4285. }
  4286. }
  4287. })
  4288. .catch((err) => {
  4289. this.$message.error(err);
  4290. });
  4291. this.tzDialogVisible = false;
  4292. this.jhDialogVisible = true;
  4293. break;
  4294. case 3:
  4295. this.changeSchedule = {
  4296. mode_id: "",
  4297. schedule_type: "",
  4298. partition_id: "",
  4299. bed_id: "",
  4300. schedule_week: "",
  4301. partition_type: "",
  4302. };
  4303. this.tzDialogVisible = false;
  4304. this.msDialogVisible = true;
  4305. break;
  4306. default:
  4307. break;
  4308. }
  4309. },
  4310. setSchedule() {
  4311. var that = this;
  4312. var submitFlag = true;
  4313. if (this.currentData.patient_id <= 0) {
  4314. this.$message.error("请先选择患者");
  4315. return false;
  4316. }
  4317. if (
  4318. this.currentData.schedule_date.length == 0 ||
  4319. this.currentData.schedule_type < 1 ||
  4320. this.currentData.schedule_type > 3 ||
  4321. this.currentData.bed_id < 1 ||
  4322. this.currentData.partition_id < 1 ||
  4323. this.currentData.schedule_week < 1 ||
  4324. this.currentData.schedule_week > 7
  4325. ) {
  4326. this.$message.error("请先选择排班时间或机号");
  4327. return false;
  4328. }
  4329. // 可能
  4330. // 患者有传染病,与选择的机器类型(传染病)不匹配
  4331. // 患者没有传染病,但机器是某个传染病的专用透析器
  4332. // 机器的透析模式与患者不匹配
  4333. if (this.currentData.contagions.length > 0) {
  4334. var cflag = false;
  4335. this.currentData.contagions.forEach(function (contagion) {
  4336. if (contagion.disease_id == that.currentData.partition_type) {
  4337. cflag = true;
  4338. }
  4339. });
  4340. if (!cflag) {
  4341. this.$confirm(
  4342. "此患者有传染病,与此透析机不匹配,确定在此排班吗?",
  4343. "提示",
  4344. {
  4345. confirmButtonText: "确 定",
  4346. cancelButtonText: "取 消",
  4347. type: "warning",
  4348. }
  4349. )
  4350. .then(() => {
  4351. this.CreateSchedule(
  4352. this.currentData.patient_id,
  4353. this.currentData
  4354. );
  4355. })
  4356. .catch(() => {});
  4357. } else {
  4358. this.CreateSchedule(this.currentData.patient_id, this.currentData);
  4359. }
  4360. } else if (that.currentData.partition_type > 1) {
  4361. this.$confirm(
  4362. "此患者没有传染病,与此透析机不匹配,确定在此排班吗?",
  4363. "提示",
  4364. {
  4365. confirmButtonText: "确 定",
  4366. cancelButtonText: "取 消",
  4367. type: "warning",
  4368. }
  4369. )
  4370. .then(() => {
  4371. this.CreateSchedule(this.currentData.patient_id, this.currentData);
  4372. })
  4373. .catch(() => {});
  4374. } else {
  4375. this.CreateSchedule(this.currentData.patient_id, this.currentData);
  4376. }
  4377. },
  4378. weekType(weekTime) {
  4379. var theType = 2;
  4380. switch (weekTime) {
  4381. case "lastWeek":
  4382. theType = 1;
  4383. break;
  4384. case "thisWeek":
  4385. theType = 2;
  4386. break;
  4387. case "nextWeek":
  4388. theType = 3;
  4389. break;
  4390. case "nextTwoWeek":
  4391. theType = 4;
  4392. break;
  4393. default:
  4394. theType = 2;
  4395. break;
  4396. }
  4397. return theType;
  4398. },
  4399. dayType(theType) {
  4400. var jType = "";
  4401. switch (theType) {
  4402. case 1:
  4403. jType = "上午";
  4404. break;
  4405. case 2:
  4406. jType = "下午";
  4407. break;
  4408. case 3:
  4409. jType = "晚上";
  4410. break;
  4411. default:
  4412. break;
  4413. }
  4414. return jType;
  4415. },
  4416. weekPath(week, schedule_type) {
  4417. var weekArr = {
  4418. 1: "Mon",
  4419. 2: "Tue",
  4420. 3: "Wed",
  4421. 4: "Thurs",
  4422. 5: "Fri",
  4423. 6: "Sat",
  4424. 7: "Sun",
  4425. };
  4426. var typeArr = { 1: "M", 2: "A", 3: "N" };
  4427. if (
  4428. typeof weekArr[week] === "undefined" ||
  4429. typeof typeArr[schedule_type] === "undefined"
  4430. ) {
  4431. return [];
  4432. }
  4433. return [weekArr[week], typeArr[schedule_type]];
  4434. },
  4435. weekDay(prop) {
  4436. var week = prop.split("_");
  4437. if (week.length != 2) {
  4438. return [-1, -1];
  4439. }
  4440. var w = -1;
  4441. var n = -1;
  4442. switch (week[0]) {
  4443. case "Mon":
  4444. w = 1;
  4445. break;
  4446. case "Tue":
  4447. w = 2;
  4448. break;
  4449. case "Wed":
  4450. w = 3;
  4451. break;
  4452. case "Thurs":
  4453. w = 4;
  4454. break;
  4455. case "Fri":
  4456. w = 5;
  4457. break;
  4458. case "Sat":
  4459. w = 6;
  4460. break;
  4461. case "Sun":
  4462. w = 7;
  4463. break;
  4464. default:
  4465. w = -1;
  4466. break;
  4467. }
  4468. switch (week[1]) {
  4469. case "M":
  4470. n = 1;
  4471. break;
  4472. case "A":
  4473. n = 2;
  4474. break;
  4475. case "N":
  4476. n = 3;
  4477. break;
  4478. default:
  4479. n = -1;
  4480. break;
  4481. }
  4482. if (w == -1 || n == -1) {
  4483. return [-1, -1];
  4484. }
  4485. return [w, n];
  4486. },
  4487. search: function () {
  4488. if (this.keywords.length == 0) {
  4489. this.patientList = this.all_patients;
  4490. } else {
  4491. this.patientList = [];
  4492. for (let i = 0; i < this.all_patients.length; i++) {
  4493. if (
  4494. this.all_patients[i].name.indexOf(this.keywords) != -1 ||
  4495. this.all_patients[i].dialysis_no.indexOf(this.keywords) != -1
  4496. ) {
  4497. this.patientList.push(this.all_patients[i]);
  4498. }
  4499. }
  4500. if (this.patientList.length > 0) {
  4501. this.cur_info.patient_name = this.patientList[0].name;
  4502. this.cur_info.mode_name = this.modes[0].name;
  4503. this.cur_info.patient_id = this.patientList[0].id;
  4504. this.cur_info.mode_id = this.modes[0].id;
  4505. this.$refs.patient_table.setCurrentRow(this.patientList[0]);
  4506. this.$refs.mode_table.setCurrentRow(this.modes[0]);
  4507. }
  4508. }
  4509. },
  4510. changeMachineNumber: function (index, row) {
  4511. this.currentData.schedule_type = row.schedule_type;
  4512. this.currentData.bed_id = row.bed_id;
  4513. this.currentData.partition_id = row.partition_id;
  4514. this.currentData.schedule_week = row.schedule_week;
  4515. switch (row.schedule_type) {
  4516. case 1:
  4517. this.currentData.type_name = "上午";
  4518. break;
  4519. case 2:
  4520. this.currentData.type_name = "下午";
  4521. break;
  4522. case 3:
  4523. this.currentData.type_name = "晚上";
  4524. break;
  4525. }
  4526. this.currentData.zone_name = row.zone.name;
  4527. this.currentData.bed_name = row.number.number;
  4528. this.currentData.partition_type = row.zone.type;
  4529. this.currentData.mode_id = row.mode_id;
  4530. this.currentData.patient_id = row.patient_id;
  4531. this.currentData.patient = row.patient;
  4532. this.currentData.contagions = row.patient_contagions;
  4533. this.currentData.id = row.id;
  4534. this.changeSchedule = {
  4535. mode_id: row.mode_id,
  4536. schedule_type: row.schedule_type,
  4537. partition_id: row.partition_id,
  4538. bed_id: row.bed_id,
  4539. schedule_week: row.schedule_week,
  4540. partition_type: "",
  4541. };
  4542. this.currentData.schedule_date = uParseTime(
  4543. row.schedule_date,
  4544. "{y}-{m}-{d}"
  4545. );
  4546. if (typeof this.partitions[row.partition_id].jihaos !== "undefined") {
  4547. this.jihaos = this.partitions[row.partition_id].jihaos;
  4548. } else {
  4549. this.jihaos = [];
  4550. }
  4551. this.searchTableVisible = false;
  4552. this.jhDialogVisible = true;
  4553. },
  4554. getDialysisDate: function (row) {
  4555. let week = "";
  4556. switch (row.schedule_week) {
  4557. case 7:
  4558. week = "周日";
  4559. break;
  4560. case 1:
  4561. week = "周一";
  4562. break;
  4563. case 2:
  4564. week = "周二";
  4565. break;
  4566. case 3:
  4567. week = "周三";
  4568. break;
  4569. case 4:
  4570. week = "周四";
  4571. break;
  4572. case 5:
  4573. week = "周五";
  4574. break;
  4575. case 6:
  4576. week = "周六";
  4577. break;
  4578. }
  4579. return week + "(" + uParseTime(row.schedule_date, "{y}-{m}-{d}") + ")";
  4580. },
  4581. getSchedulesType: function (type) {
  4582. let type_name = "";
  4583. switch (type) {
  4584. case 1:
  4585. type_name = "上午";
  4586. break;
  4587. case 2:
  4588. type_name = "下午";
  4589. break;
  4590. case 3:
  4591. type_name = "晚上";
  4592. break;
  4593. }
  4594. return type_name;
  4595. },
  4596. changeMode: function (index, row) {
  4597. this.changeSchedule = {
  4598. mode_id: "",
  4599. schedule_type: "",
  4600. partition_id: "",
  4601. bed_id: "",
  4602. schedule_week: "",
  4603. partition_type: "",
  4604. };
  4605. this.currentData.id = row.id;
  4606. this.searchTableVisible = false;
  4607. this.msDialogVisible = true;
  4608. },
  4609. tableRowClassName({ row, rowIndex }) {
  4610. if (row.zone_type == 1) {
  4611. return "table-row-new-class schedule-table-row";
  4612. } else {
  4613. return "table-row-new-class schedule-table-row backPurple";
  4614. }
  4615. },
  4616. getAllZones() {
  4617. getAllZones().then((response) => {
  4618. if (response.data.state == 1) {
  4619. var zones = response.data.data.zones;
  4620. for (let i = 0; i < zones.length; i++) {
  4621. this.zoneIdList.push(zones[i].id);
  4622. }
  4623. this.zones.push(...zones);
  4624. var strArr = this.zoneIdList.join(",");
  4625. this.strArr = strArr;
  4626. this.getWeekPanels();
  4627. }
  4628. });
  4629. },
  4630. changePartiton(val) {
  4631. console.log(this.scheduleZone);
  4632. this.$emit("event1", val);
  4633. this.partition_id = val;
  4634. this.getWeekPanels();
  4635. // this.getSchedules();
  4636. },
  4637. changeSchedule_type(val) {
  4638. this.$emit("event2", val);
  4639. this.schedule_type = val;
  4640. this.getSchedules();
  4641. },
  4642. },
  4643. components: {
  4644. ScheduleItem,
  4645. draggable,
  4646. },
  4647. mounted() {
  4648. this.tableContainHeight =
  4649. window.innerHeight - this.$refs.table.$el.offsetTop - 100;
  4650. // var theType = this.weekType(this.weekTime);
  4651. // this.getSchedules(theType);
  4652. const that = this;
  4653. window.onresize = () => {
  4654. return (() => {
  4655. window.fullHeight = document.documentElement.clientHeight;
  4656. if (window.fullHeight < 200) {
  4657. that.tableHeight = 200;
  4658. } else {
  4659. that.tableHeight = window.fullHeight - 160;
  4660. }
  4661. })();
  4662. };
  4663. },
  4664. // mounted:function(){
  4665. // this.tableContainHeight = window.innerHeight - this.$refs.table.$el.offsetTop - 160
  4666. // },
  4667. created() {
  4668. var date = new Date();
  4669. this.time = date;
  4670. var year = date.getFullYear();
  4671. var month = date.getMonth() + 1;
  4672. if (month < 10) {
  4673. month = "0" + month;
  4674. }
  4675. var day = date.getDate();
  4676. if (day < 10) {
  4677. day = "0" + day;
  4678. }
  4679. var nowDate = year + "-" + month + "-" + day;
  4680. var date = new Date(nowDate + " 00:00:00");
  4681. console.log("date23232323232323", date.getTime() / 1000);
  4682. this.now_time = date.getTime() / 1000;
  4683. this.getAllZones();
  4684. this.changeScheduleType(1);
  4685. rowNumber = 0;
  4686. this.modeOptions = this.$store.getters.treatment_mode;
  4687. this.partitions = this.partitionsProp;
  4688. var contagions = this.$store.getters.contagions;
  4689. if (contagions.length > 0) {
  4690. var that = this;
  4691. contagions.forEach(function (citem) {
  4692. if (citem.type == 2) {
  4693. that.diseasesArr.push({ value: citem.id, label: citem.name });
  4694. }
  4695. });
  4696. }
  4697. this.scheduleZoneRow = this.scheduleZoneRowProp;
  4698. this.weekday = new Date().getDay();
  4699. if (this.weekday == 0) {
  4700. this.weekday = 7;
  4701. }
  4702. },
  4703. };
  4704. </script>
  4705. <style rel="stylesheet/css" lang="scss">
  4706. .table_contain {
  4707. display: flex;
  4708. // justify-content: space-between;
  4709. .left_contain {
  4710. width: 16%;
  4711. margin-right: 15px;
  4712. .patient_mode {
  4713. display: flex;
  4714. justify-content: space-between;
  4715. }
  4716. }
  4717. .right_contain {
  4718. width: 84%;
  4719. }
  4720. .select_list {
  4721. text-align: right;
  4722. margin-bottom: 15px;
  4723. .el-select {
  4724. width: 13%;
  4725. }
  4726. }
  4727. }
  4728. .tiaozhengclass {
  4729. display: block;
  4730. margin: 0 auto;
  4731. }
  4732. // .el-table tr {
  4733. // background-color: #111 !important;
  4734. // }
  4735. .schedule-table-row {
  4736. background: #fff !important;
  4737. }
  4738. .schedule-table-row:hover {
  4739. background: #fff !important;
  4740. }
  4741. .schedule-table-row td:hover {
  4742. background: rgb(88, 162, 236) !important;
  4743. }
  4744. .schedule-table-row td .cell {
  4745. font-size: 12px;
  4746. white-space: nowrap !important;
  4747. }
  4748. .schedule-table-cell-disable {
  4749. background-color: rgb(245, 245, 245) !important;
  4750. }
  4751. #table_data {
  4752. min-height: calc(100vh - 350px);
  4753. }
  4754. #table_data ::-webkit-scrollbar {
  4755. height: 15px;
  4756. }
  4757. .el-table td,
  4758. .el-table th.is-leaf,
  4759. .el-table--border,
  4760. .el-table--group {
  4761. border-color: #d0d3da;
  4762. }
  4763. .el-table--border::after,
  4764. .el-table--group::after,
  4765. .el-table::before {
  4766. background-color: #d0d3da;
  4767. }
  4768. .el-table--border th {
  4769. border-color: #d0d3da;
  4770. }
  4771. .el-table--border td {
  4772. border-color: #d0d3da;
  4773. }
  4774. .el-table td {
  4775. border-color: #d0d3da;
  4776. }
  4777. // .hover-td{
  4778. // color: red;
  4779. // }
  4780. // .el-table__body tr.current-row > td {
  4781. // background-color: #409eff !important;
  4782. // color: #fff;
  4783. // }
  4784. // .el-table__body tr > td:hover {
  4785. // background-color: #409eff !important;
  4786. // }
  4787. #table_data {
  4788. .el-table__body tr.current-row > td {
  4789. background-color: #ecf5ff !important;
  4790. color: #3a8ee6;
  4791. }
  4792. .el-table__body tr > td:hover {
  4793. background-color: #409eff !important;
  4794. color: #fff;
  4795. .del_table_btn {
  4796. visibility: visible;
  4797. }
  4798. }
  4799. .el-table__body tr .hover-td {
  4800. background-color: #409eff !important;
  4801. color: #fff;
  4802. }
  4803. }
  4804. .backPurple {
  4805. color: #08c3df !important;
  4806. }
  4807. .del_table_btn {
  4808. position: absolute;
  4809. right: 0px;
  4810. top: -3px;
  4811. z-index: 999;
  4812. visibility: hidden;
  4813. .el-button {
  4814. width: 15px;
  4815. height: 15px;
  4816. padding: 0px;
  4817. }
  4818. }
  4819. .mode_change {
  4820. .el-dialog {
  4821. .el-dialog__footer {
  4822. text-align: center;
  4823. }
  4824. }
  4825. }
  4826. </style>
  4827. <style scoped>
  4828. .itxst {
  4829. margin: 10px;
  4830. text-align: left;
  4831. }
  4832. .col {
  4833. width: 40%;
  4834. flex: 1;
  4835. padding: 10px;
  4836. border: solid 1px #eee;
  4837. border-radius: 5px;
  4838. float: left;
  4839. }
  4840. .col + .col {
  4841. margin-left: 10px;
  4842. }
  4843. .item {
  4844. padding: 6px 12px;
  4845. margin: 0px 10px 0px 10px;
  4846. border: solid 1px #eee;
  4847. background-color: #409eff;
  4848. text-align: left;
  4849. color: #fff;
  4850. }
  4851. .item + .item {
  4852. border-top: none;
  4853. margin-top: 6px;
  4854. }
  4855. .item:hover {
  4856. background-color: #5695d4;
  4857. cursor: move;
  4858. }
  4859. .item2 {
  4860. padding: 6px 12px;
  4861. margin: 0px 10px 0px 10px;
  4862. border: solid 1px #eee;
  4863. background-color: pink;
  4864. text-align: left;
  4865. }
  4866. .item2 + .item2 {
  4867. border-top: none;
  4868. margin-top: 6px;
  4869. }
  4870. .item2:hover {
  4871. outline: solid 1px #ddd;
  4872. cursor: move;
  4873. }
  4874. .select_list_arrage {
  4875. width: 105px !important;
  4876. }
  4877. .checkSearch{
  4878. position: absolute;
  4879. top: 15px;
  4880. right: 120px;
  4881. }
  4882. </style>