editTableData.vue 193KB

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