Prescribing.vue 167 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609
  1. <template>
  2. <!-- 智能开方 -->
  3. <div class="prescribing flex-plane-center-top">
  4. <div class="pre-left" v-if="!isShrink">
  5. <!-- 标题信息 -->
  6. <div class="pre-title">
  7. <div class="flex-vertical-center-l title-container">
  8. <span></span>
  9. <div>患者信息</div>
  10. </div>
  11. </div>
  12. <div class="patiens-msg" v-if="Object.keys(patiensMsg).length>0">
  13. <p v-if="patiensMsg.sex">患者性别:{{patiensMsg.sex}}</p>
  14. <p v-if="patiensMsg.age">患者年龄:{{patiensMsg.age}}</p>
  15. <p
  16. v-if="patiensMsg.isGravidity && patiensMsg.isGravidity=='2'"
  17. >是否怀孕:{{patiensMsg.isGravidity=='1'?'否':patiensMsg.isGravidity=='2'?'是':'无'}}</p>
  18. <p
  19. v-if="patiensMsg.isBreastFeeding && patiensMsg.isBreastFeeding==1"
  20. >是否哺乳:{{patiensMsg.isBreastFeeding==1?'是':patiensMsg.isBreastFeeding==2?'否':'无'}}</p>
  21. </div>
  22. <div class="pre-title mr-t10">
  23. <div class="flex-vertical-center-l title-container">
  24. <span></span>
  25. <div>中医电子病历</div>
  26. </div>
  27. </div>
  28. <div class="patiens-msg" v-if="patiensMsg.outpatientElectronicmedicalrecord">
  29. <p v-if="patiensMsg.outpatientElectronicmedicalrecord.chiefcomplaint">
  30. <span>主诉:</span>
  31. {{patiensMsg.outpatientElectronicmedicalrecord.chiefcomplaint}}
  32. </p>
  33. <p v-if="patiensMsg.outpatientElectronicmedicalrecord.historypresent">
  34. <span>现病史:</span>
  35. {{patiensMsg.outpatientElectronicmedicalrecord.historypresent}}
  36. </p>
  37. <p v-if="patiensMsg.outpatientElectronicmedicalrecord.pasthistory">
  38. <span>既往史:</span>
  39. {{patiensMsg.outpatientElectronicmedicalrecord.pasthistory}}
  40. </p>
  41. <p v-if="patiensMsg.outpatientElectronicmedicalrecord.fourmedicine">
  42. <span>中医四诊:</span>
  43. {{patiensMsg.outpatientElectronicmedicalrecord.fourmedicine}}
  44. </p>
  45. <p v-if="patiensMsg.outpatientElectronicmedicalrecord.physicalexamination">
  46. <span>体格检查:</span>
  47. {{patiensMsg.outpatientElectronicmedicalrecord.physicalexamination}}
  48. </p>
  49. <p v-if="patiensMsg.outpatientElectronicmedicalrecord.supplementaryexamination">
  50. <span>辅助检查:</span>
  51. {{patiensMsg.outpatientElectronicmedicalrecord.supplementaryexamination}}
  52. </p>
  53. <div v-if="patiensMsg.outpatientElectronicmedicalrecord.image1.length>0">
  54. <div style="margin: 4px 0 8px;">报告上传:</div>
  55. <el-image
  56. :preview-src-list="patiensMsg.outpatientElectronicmedicalrecord.image1"
  57. :src="item"
  58. :key="index"
  59. style="width:64px;height: 64px;margin-right: 10px;"
  60. alt
  61. v-for="(item,index) in patiensMsg.outpatientElectronicmedicalrecord.image1"
  62. />
  63. </div>
  64. </div>
  65. <!-- mr-t30 -->
  66. <div class="pre-title" v-if="false">
  67. <div class="flex-vertical-center-l title-container">
  68. <span></span>
  69. <div>中医诊断</div>
  70. <!-- inferRecipe(2) -->
  71. <el-button size="mini" type="warning" @click="tcmClick()" style="margin-left:10px;">推导</el-button>
  72. </div>
  73. </div>
  74. <!-- <TCMDiagnosis v-if="Object.keys(patiensMsg).length>0" :patiensMsg="patiensMsg" ref="TCM"></TCMDiagnosis> -->
  75. <div class="pre-title mr-t10">
  76. <div class="flex-vertical-center-l title-container">
  77. <span></span>
  78. <div>快捷查询</div>
  79. </div>
  80. </div>
  81. <!-- 协定方 -->
  82. <div class="mr-t10 agreement">
  83. <div class="agree-tab flex-vertical-between">
  84. <div
  85. :class="agree_current==0?'flex-center agree-active':'flex-center'"
  86. @click.stop="changeAgree(0)"
  87. >协定方</div>
  88. <div
  89. :class="agree_current==1?'flex-center agree-active':'flex-center'"
  90. @click.stop="changeAgree(1)"
  91. >方剂</div>
  92. <div
  93. :class="agree_current==2?'flex-center agree-active':'flex-center'"
  94. @click.stop="changeAgree(2)"
  95. >参考医案</div>
  96. </div>
  97. <!-- 展开效果 -->
  98. <div class="collapse" v-if="agree_current==0">
  99. <el-collapse v-model="activeNames" accordion @change="activeChange">
  100. <el-collapse-item
  101. :title="item.name"
  102. :name="item.index"
  103. v-for="(item,index) in collapseData"
  104. :key="item.name+index"
  105. >
  106. <div class="collapse-body">
  107. <div
  108. class="collapse-item flex-vertical-between"
  109. v-for="(item1,index1) in item.list"
  110. :key="item1.name+index1"
  111. >
  112. <div class="med-name" @click="getAccordDetail(item1.preId)">{{item1.name}}</div>
  113. <!-- <div class="med-btns flex-vertical-center-r">
  114. <div class="flex-center" @click="showAgree=true">换方</div>
  115. <div class="bg-yellow flex-center">合方</div>
  116. </div>-->
  117. </div>
  118. <div class="collapse-more flex-center" @click="loadMoreCollapse(item)">
  119. <img src="../../assets/point3.png" alt />
  120. </div>
  121. </div>
  122. </el-collapse-item>
  123. </el-collapse>
  124. </div>
  125. <!-- 第二个 和第三个 tab 选中效果 -->
  126. <div class="basis" v-if="agree_current!=0">
  127. <div class="basis-top-search flex-center">
  128. <div v-if="agree_current==1">
  129. <el-input placeholder="请输入内容" v-model="agree_key" size="mini">
  130. <i slot="prefix" class="el-input__icon el-icon-search"></i>
  131. </el-input>
  132. </div>
  133. <div v-if="agree_current==2">
  134. <el-input placeholder="请输入内容" v-model="agree_key1" size="mini">
  135. <i slot="prefix" class="el-input__icon el-icon-search"></i>
  136. </el-input>
  137. </div>
  138. <div class="flex-center search-btn" @click="searchPre">搜索</div>
  139. </div>
  140. <!-- 方剂 -->
  141. <div v-if="agree_current==1">
  142. <div
  143. class="collapse-item flex-vertical-between"
  144. v-for="(item,index) in rPrescription.list"
  145. :key="'d'+index"
  146. >
  147. <div
  148. class="med-name"
  149. @click="getPreDetal(item.pried ||item.acupreid,1)"
  150. >{{item.prename || item.acupreid}}</div>
  151. <div class="med-btns flex-vertical-center-r" v-if="agree_current!=2">
  152. <div class="flex-center" @click.self.stop="inferChange(item)">换方</div>
  153. <div class="bg-yellow flex-center" @click.self.stop="inferChange1(item)">合方</div>
  154. </div>
  155. </div>
  156. </div>
  157. <!-- 参考议案 -->
  158. <div v-if="agree_current==2">
  159. <div
  160. class="collapse-item flex-vertical-between"
  161. v-for="(item,index) in rDoctorCase.list"
  162. :key="item.disname+index"
  163. >
  164. <div
  165. class="med-name"
  166. @click="getDCaseDetail(item.verifyid)"
  167. >{{item.disname}} {{item.attendingexpert}}</div>
  168. </div>
  169. </div>
  170. <div class="collapse-more flex-center" @click="loadMorePre">
  171. <img src="../../assets/point3.png" alt />
  172. </div>
  173. </div>
  174. </div>
  175. <div class="pre-title mr-t10" v-if="false">
  176. <div class="flex-vertical-center-l title-container">
  177. <span></span>
  178. <div>就诊记录</div>
  179. </div>
  180. </div>
  181. <div class="pre-steps" v-if="false">
  182. <div class="steps">
  183. <el-steps direction="vertical" :active="patiensMsg.recordLength" space="55px">
  184. <el-step v-for="(item,index) in patiensMsg.patientRecord" :key="item.timeStr+index">
  185. <template slot="icon">
  186. <img src="../../assets/step.png" alt class="icon" />
  187. </template>
  188. <template slot="title">
  189. <div @click="getSeeDByID(item.id)" class="step-body">
  190. <div class="step-name">{{item.timeStr}}</div>
  191. <div class="step-name">{{item.illnessName}}</div>
  192. </div>
  193. </template>
  194. </el-step>
  195. </el-steps>
  196. </div>
  197. <!-- <div class="find-more flex-center">
  198. <img src="../../assets/more-down.png" alt="">
  199. <span>查看更多</span>
  200. </div>-->
  201. </div>
  202. </div>
  203. <!-- 中间主体部分 -->
  204. <div class="pre-center">
  205. <!-- 768 页面 展示病名 -->
  206. <div class="page-768">
  207. <!-- 扩展icon -->
  208. <div class="kz-icon" @click="setShrink">
  209. <i class="el-icon-d-arrow-right" v-if="!isShrink"></i>
  210. <i class="el-icon-d-arrow-left" v-if="isShrink"></i>
  211. </div>
  212. <!-- 中医诊断 -->
  213. <TCMDiagnosis
  214. direction="horizontal"
  215. :patiensMsg="patiensMsg"
  216. v-if="Object.keys(patiensMsg).length>0"
  217. ref="TCM"
  218. class-name="prescr"
  219. ></TCMDiagnosis>
  220. <!-- 推导按钮 -->
  221. <div class="deduce">
  222. <el-button size="mini" type="primary" @click="tcmClick()">推导</el-button>
  223. <el-popover
  224. placement="top-start"
  225. title
  226. width="220"
  227. trigger="hover"
  228. style="margin-left:10px;"
  229. v-if="innerWidth <= 768"
  230. >
  231. <el-button size="mini" slot="reference" type="primary">HIS</el-button>
  232. <div class="his-msg his-msg-mini" v-if="Object.keys(patiensMsg).length>0">
  233. <div class="his-item">
  234. <div class="name">HIS病名:</div>
  235. <div class="value">
  236. <el-input
  237. size="mini"
  238. disabled
  239. :value="patiensMsg.maindiagnosis.namemedicinehis || ''"
  240. ></el-input>
  241. </div>
  242. </div>
  243. <div class="his-item">
  244. <div class="name">HIS证型:</div>
  245. <div class="value">
  246. <el-input
  247. size="mini"
  248. disabled
  249. :value="patiensMsg.maindiagnosis.syndrometypeshis || ''"
  250. ></el-input>
  251. </div>
  252. </div>
  253. </div>
  254. </el-popover>
  255. </div>
  256. <!-- his信息 -->
  257. <div class="his-msg" v-if="innerWidth>768 ">
  258. <div class="his-item" v-if="Object.keys(patiensMsg).length>0">
  259. <div class="name">HIS病名:</div>
  260. <div class="value">
  261. <el-input size="mini" disabled :value="patiensMsg.maindiagnosis.namemedicinehis ||''"></el-input>
  262. </div>
  263. </div>
  264. <div class="his-item" v-if="Object.keys(patiensMsg).length>0">
  265. <div class="name">HIS证型:</div>
  266. <div class="value">
  267. <el-input
  268. size="mini"
  269. disabled
  270. :value="patiensMsg.maindiagnosis.syndrometypeshis || ''"
  271. ></el-input>
  272. </div>
  273. </div>
  274. </div>
  275. </div>
  276. <div class="flex-vertical-between center-header">
  277. <div class="center-tab flex-vertical-center-l">
  278. <template v-for="(item,index) in contentTabs">
  279. <div
  280. :class="container_i==index?'flex-center active':'flex-center'"
  281. @click.self="changeContainer(index)"
  282. v-if="!item.hide"
  283. :key="item.name+index"
  284. >
  285. <span @click="changeContainer(index)" :style="{color:item.color}">{{item.name}}</span>
  286. </div>
  287. </template>
  288. </div>
  289. <div class="header-total flex-vertical-center-r flex-wrap" v-if="false">
  290. <div v-if="contentTabs[0].check">
  291. 中药处方总费用:
  292. <span>{{chineseM.allMoney}}元</span>
  293. </div>
  294. <div v-if="contentTabs[1].check">
  295. 中药制剂总费用:
  296. <span>{{medicineC.allMoney}}元</span>
  297. </div>
  298. <div v-if="contentTabs[2].check">
  299. 适宜技术处方总费用:
  300. <span>{{suitScience.allMoney}}元</span>
  301. </div>
  302. <div>
  303. 合计费用:
  304. <span>{{totalPrice}}元</span>
  305. </div>
  306. </div>
  307. <!-- 右侧按钮 -->
  308. <div class="flex-vertical-center-r flex-wrap">
  309. <el-button size="mini" @click="openUnifyPrescPrec" type="primary">萧然医派协定方</el-button>
  310. <el-button size="mini" :loading="tongueAndFaceLoading" :disabled="!tongueAndFaceAnalysis" @click="openTongueAndFaceAnalysis" type="primary">舌面诊影像</el-button>
  311. <el-button
  312. size="mini"
  313. type="primary"
  314. @click="handleReplenish"
  315. >{{ innerWidth > 768 ? '补充中医电子病历' :'补充病历' }}</el-button>
  316. <el-button size="mini" @click="openDCase" v-if="isShrink">参考医案</el-button>
  317. <el-button size="mini" @click="openPrec" type="primary">协定方/方剂</el-button>
  318. <el-popover
  319. placement="left"
  320. title
  321. width="150"
  322. trigger="hover"
  323. v-if="rRecomendR.length>0 && isShrink"
  324. style="margin-left:10px;"
  325. >
  326. <!-- hover -->
  327. <el-button size="mini" type="primary" slot="reference">推荐的方剂</el-button>
  328. <template>
  329. <div class="recommend flex-center" style="width:100%">
  330. <div class="banner">
  331. <div class="r-banner-body">
  332. <div
  333. class="r-body-item flex-vertical-between"
  334. v-for="(item1,index1) in rRecomendR"
  335. :key="'c'+index1"
  336. >
  337. <div
  338. :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid || tjRecipeId==item1.acupreid ?'active':'',]"
  339. v-if="item1.showType==0"
  340. @click.stop="getPreDetal(item1.preid || item1,1)"
  341. >
  342. <span v-if="item1.prename">{{item1.prename}}</span>
  343. <span
  344. v-else
  345. >{{item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}}</span>
  346. <!-- {{item1.prename?item1.prename+'('+item1.book?item1.book:'暂无'+')': item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}} -->
  347. </div>
  348. <!-- 经验方 -->
  349. <div
  350. :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid ?'active':'',]"
  351. v-else
  352. @click="getExperinceDetail(item1.pid)"
  353. >
  354. <!-- <img src='~@/assets/expr.png' v-if="item1.showType==1" class="icon-expr" /> -->
  355. <span>{{item1.name}}({{item1.experttitle}})</span>
  356. </div>
  357. </div>
  358. </div>
  359. </div>
  360. </div>
  361. </template>
  362. </el-popover>
  363. <el-button size="mini" type="primary" v-if="isShrink&&rRecomendR.length==0">推荐的方剂</el-button>
  364. </div>
  365. </div>
  366. <!-- 代煎/配送 -->
  367. <!-- <div class="address">
  368. <medAdress
  369. ref="medAdress"
  370. :container_i="container_i"
  371. @psChange="psChange"
  372. @djChange="djChange"
  373. :isShowDj="isShowDj"
  374. :isShowPs="isShowPs"
  375. ></medAdress>
  376. </div>-->
  377. <!-- 表格数据展示 -->
  378. <div class="center-table">
  379. <chinese-medicine
  380. @find="findDrug($event)"
  381. v-show="container_i===0"
  382. id="chineseM"
  383. ref="chineseM"
  384. :totalAllMoney.sync="chineseM.allMoney"
  385. @submit="submitRecipe1()"
  386. :showSubmit="showSubmit"
  387. :isShrink="isShrink"
  388. :isDaiJian="Number(isDaiJian)"
  389. :isPs="isPs"
  390. @updateDp="onUpdateDp"
  391. ></chinese-medicine>
  392. <medicineChinese
  393. @find="findDrug($event)"
  394. v-show="container_i==1"
  395. ref="medicineC"
  396. id="medicineC"
  397. @submit="submitRecipe1()"
  398. :totalAllMoney.sync="medicineC.allMoney"
  399. :showSubmit="showSubmit"
  400. :isPs="isPs"
  401. ></medicineChinese>
  402. <suitScience
  403. @find="find($event)"
  404. v-show="container_i==2"
  405. ref="suitScience"
  406. id="suitScience"
  407. @submit="submitRecipe1()"
  408. :totalAllMoney.sync="suitScience.allMoney"
  409. :showSubmit="showSubmit"
  410. ></suitScience>
  411. </div>
  412. </div>
  413. <div class="pre-right" v-show="container_i!=1 && !isShrink">
  414. <!-- 标题信息 -->
  415. <div class="pre-title flex-vertical-between">
  416. <div class="flex-vertical-center-l title-container">
  417. <span></span>
  418. <div>推荐的方剂</div>
  419. </div>
  420. <!-- <div class="tuidao flex-center" @click="inferRecipe(2)" v-if="rRecomendR.length>0">推导</div> -->
  421. </div>
  422. <!-- 推荐方剂 -->
  423. <div class="recommend flex-center" v-if="rRecomendR.length>0">
  424. <!-- <div class="arrow-left flex-center" @click="changeRbanner('reduce')">
  425. <img src="../../assets/arrow-left.png" alt="">
  426. </div>-->
  427. <div class="banner">
  428. <!-- <el-carousel ref="r_banner" height="80px" :initial-index='r_current' arrow='never' indicator-position='none'
  429. :autoplay='false'>-->
  430. <!-- <el-carousel-item v-for="(item,index) in rRecomendR" :key="'b'+index"> -->
  431. <div class="r-banner-body">
  432. <div
  433. class="r-body-item flex-vertical-between"
  434. v-for="(item1,index1) in rRecomendR"
  435. :key="'c'+index1"
  436. >
  437. <div
  438. :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid || tjRecipeId==item1.acupreid ?'active':'',]"
  439. v-if="item1.showType==0"
  440. @click.stop="getPreDetal(item1.preid || item1,1)"
  441. >
  442. <span v-if="item1.prename">{{item1.prename}}</span>
  443. <span
  444. v-else
  445. >{{item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}}</span>
  446. <!-- {{item1.prename?item1.prename+'('+item1.book?item1.book:'暂无'+')': item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}} -->
  447. </div>
  448. <!-- 经验方 -->
  449. <div
  450. :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid ?'active':'',]"
  451. v-else
  452. @click="getExperinceDetail(item1.pid)"
  453. >
  454. <!-- <img src='~@/assets/expr.png' v-if="item1.showType==1" class="icon-expr" /> -->
  455. <span>{{item1.name}}({{item1.experttitle}})</span>
  456. </div>
  457. <!-- <div class="med-btns flex-vertical-center-r"> -->
  458. <!-- 专家经验换方 -->
  459. <!-- <div class="flex-center" v-if="item1.showType==1" @click.self.stop="turnRecipe3(item1)">换方</div>
  460. <div class="flex-center bg-yellow" v-if="item1.showType==1" @click.self.stop="joinRecipe3(item1)">合方
  461. </div>
  462. <div class="flex-center" v-if="item1.showType==0"
  463. @click.self.stop="inferChange(item1,item1.prename?'':1,item1.prename?'':1)">换方</div>
  464. <div class="bg-yellow flex-center" v-if="item1.showType==0"
  465. @click.self.stop="inferChange1(item1,item1.prename?'':1,item1.prename?'':1)">合方
  466. </div>-->
  467. <!-- </div> -->
  468. </div>
  469. </div>
  470. <!-- </el-carousel-item> -->
  471. <!-- </el-carousel> -->
  472. </div>
  473. <!-- <div class="arrow-left flex-center" @click="changeRbanner('add')">
  474. <img src="../../assets/arrow-right.png" alt="">
  475. </div>-->
  476. </div>
  477. <!-- 安全合理用药检测 -->
  478. <div class="pre-title mr-t10" v-if="container_i!=2">
  479. <div class="flex-vertical-center-l title-container">
  480. <span></span>
  481. <div>安全合理用药检测</div>
  482. </div>
  483. <div class="patiens-msg mr-t10" v-if="rationalMed.length>0">
  484. <div class="p" v-if="raDoseShow">
  485. <!-- {{item.matname}}({{item.matbzjj}}) -->
  486. <!-- <div class="patiens-name">{{item.matname}}</div> -->
  487. <div class="patiens-cate">超剂量药品:</div>
  488. <div class="patiens-desc" v-for="(item,index) in rationalMed10" :key="index">
  489. <span v-if="item.showDose">
  490. <span class="matname">{{item.matname}}</span>
  491. <span style="color:red;">({{item.matmindosage}}-{{item.matmaxdosage}})</span>
  492. </span>
  493. </div>
  494. </div>
  495. <div class="p" v-if="rationalMed2.length>0">
  496. <div class="patiens-cate">慎忌禁用药:</div>
  497. <div class="patiens-desc" v-for="(item,index) in rationalMed2" :key="index">
  498. <span v-if="item.matsjj">
  499. <span class="matname">{{item.matname}}</span>
  500. ({{item.matsjj |ftsjj}})
  501. </span>
  502. </div>
  503. </div>
  504. <div class="p" v-if="rationalMed3.length>0">
  505. <div class="patiens-cate">孕妇慎忌禁:</div>
  506. <div class="patiens-desc" v-for="(item,index) in rationalMed3" :key="index">
  507. <span v-if="item.matyfsjj">
  508. <span class="matname">{{item.matname}}</span>
  509. <span :style="{color:item.matyfsj==3?'red':''}">({{item.matyfsjj |fyfsjj}})</span>
  510. </span>
  511. </div>
  512. </div>
  513. <div class="p" v-if="rationalMed4.length>0">
  514. <div class="patiens-cate">服药饮食禁忌:</div>
  515. <div class="patiens-desc" v-for="(item,index) in rationalMed4" :key="index">
  516. <span v-if="item.matysjj">
  517. <span class="matname">{{item.matname}}</span>
  518. ({{item.matysjj?item.matysjj:'无'}})
  519. </span>
  520. </div>
  521. </div>
  522. <div class="p" v-if="rationalMed5.length>0">
  523. <div class="patiens-cate">药物毒性说明:</div>
  524. <div class="patiens-desc" v-for="(item,index) in rationalMed5" :key="index">
  525. <span v-if="item.matdxsm">
  526. <span class="matname" style="color:red;">{{item.matname}}</span>
  527. ({{item.matdxsm?item.matdxsm:'无'}})
  528. </span>
  529. </div>
  530. </div>
  531. <div class="p" v-if="rationalMed6.length>0">
  532. <div class="patiens-cate">病证用药禁忌:</div>
  533. <div class="patiens-desc" v-for="(item,index) in rationalMed6" :key="index">
  534. <span v-if="item.matbzjj">
  535. <span class="matname">{{item.matname}}</span>
  536. ({{item.matbzjj?item.matbzjj:'无'}})
  537. </span>
  538. </div>
  539. </div>
  540. <div class="p" v-if="rationalMed7.length>0">
  541. <div class="patiens-cate">十八反:</div>
  542. <div class="patiens-desc" v-for="(item,index) in rationalMed7" :key="index">
  543. <!-- <span v-if='item.matsbf'>{{fsbf(item.matsbf,item.matname)}}</span> -->
  544. <span v-if="item.matsbf">
  545. <span style="color:red;">{{item.matname}}</span>
  546. 反{{item.matsbf}}
  547. </span>
  548. </div>
  549. </div>
  550. <div class="p" v-if="rationalMed8.length>0">
  551. <div class="patiens-cate">十九畏:</div>
  552. <div class="patiens-desc" v-for="(item,index) in rationalMed8" :key="index">
  553. <!-- <span v-if="item.matsjw">{{fsjw(item.matsjw,item.matname)}}</span> -->
  554. <span v-if="item.matsjw">
  555. <span style="color:red;">{{item.matname}}</span>
  556. 畏{{item.matsjw}}
  557. </span>
  558. </div>
  559. </div>
  560. <div class="p" v-if="rationalMed9.length>0">
  561. <div class="patiens-cate">用药不宜:</div>
  562. <div class="patiens-desc" v-for="(item,index) in rationalMed9" :key="index">
  563. <span v-if="item.matby">{{fmatby(item.matby,item.matname) }}</span>
  564. </div>
  565. </div>
  566. </div>
  567. </div>
  568. </div>
  569. <!-- 方剂详情 -->
  570. <Popup
  571. :showDialog="showDialog"
  572. distanceTop="3vh"
  573. @cancle="changeRecipe"
  574. title="方剂详情"
  575. @confim="joinRecipe()"
  576. confimText="合方"
  577. cancleText="换方"
  578. :cancleStyle="{background:'#FFB55F',color:'#fff'}"
  579. width="700px"
  580. >
  581. <div class="drug-body" slot="body">
  582. <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
  583. <span>方剂名:</span>
  584. <div>{{preInfo.prename}}</div>
  585. </div>
  586. <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
  587. <span>功效:</span>
  588. <div>{{preInfo.efficacy}}</div>
  589. </div>
  590. <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
  591. <span>主治:</span>
  592. <div>{{preInfo.indication}}</div>
  593. </div>
  594. <div class="drug-item flex-plane-center-l">
  595. <span>处方明细:</span>
  596. <div class="flex-vertical-center-l flex-wrap">
  597. <span
  598. v-for="(item,index) in preInfo.items"
  599. :key="'e'+index"
  600. >{{item.matname || item.acuname}}{{item.dose}}{{item.unit}}</span>
  601. </div>
  602. </div>
  603. <div class="drug-item flex-plane-center-l">
  604. <span>方解:</span>
  605. <div>{{preInfo.annotation ||preInfo.operation}}</div>
  606. </div>
  607. <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
  608. <span>用法:</span>
  609. <div>{{preInfo.preusage}}</div>
  610. </div>
  611. <div class="drug-item flex-plane-center-l">
  612. <span>出处:</span>
  613. <div>{{preInfo.presource || preInfo.book}}</div>
  614. </div>
  615. </div>
  616. </Popup>
  617. <!-- 药品详情 -->
  618. <Popup
  619. width="80%"
  620. :showDialog="showDrug"
  621. @cancle="showDrug=false"
  622. distanceTop="3vh"
  623. title="药品详情"
  624. :showBtns="false"
  625. >
  626. <div class="drug-body" slot="body">
  627. <div class="drug-item flex-plane-center-l">
  628. <span>名称:</span>
  629. <div>{{drugInfo.matname}}</div>
  630. </div>
  631. <div class="drug-item flex-plane-center-l">
  632. <span>别名:</span>
  633. <div>{{drugInfo.matsynonyms}}</div>
  634. </div>
  635. <div class="drug-item flex-plane-center-l">
  636. <span>剂量区间:</span>
  637. <div>{{drugInfo.matmindosage}}-{{drugInfo.matmaxdosage}}{{drugInfo.unit}}</div>
  638. </div>
  639. <div class="drug-item flex-plane-center-l">
  640. <span>单位:</span>
  641. <div>{{drugInfo.unit}}</div>
  642. </div>
  643. <div class="drug-item flex-plane-center-l">
  644. <span>用法:</span>
  645. <div>{{drugInfo.matusage}}</div>
  646. </div>
  647. <div class="drug-item flex-plane-center-l">
  648. <span>用法禁忌:</span>
  649. <div>{{drugInfo.matsjj}}</div>
  650. </div>
  651. <div class="drug-item flex-plane-center-l">
  652. <span>性味:</span>
  653. <div>{{drugInfo.matflavour}}</div>
  654. </div>
  655. <div class="drug-item flex-plane-center-l">
  656. <span>归经:</span>
  657. <div>{{drugInfo.matmeridian}}</div>
  658. </div>
  659. <div class="drug-item flex-plane-center-l">
  660. <span>功效:</span>
  661. <div>{{drugInfo.matefficacy}}</div>
  662. </div>
  663. <div class="drug-item flex-plane-center-l">
  664. <span>应用:</span>
  665. <div>{{drugInfo.matapplication}}</div>
  666. </div>
  667. <div class="drug-item flex-plane-center-l">
  668. <span>使用注意:</span>
  669. <div>
  670. <div>{{drugInfo.mattaboo}}</div>
  671. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  672. </div>
  673. </div>
  674. <div class="drug-item flex-plane-center-l">
  675. <span>图示:</span>
  676. <div
  677. class="flex-plane-center-l"
  678. v-for="(item,index) in drugInfo.matphoto"
  679. :key="'f'+index"
  680. >
  681. <img :src="item" alt />
  682. </div>
  683. </div>
  684. <div class="flex-vertical-center-l flex-wrap">
  685. <div class="drug-item1 flex-plane-center-l">
  686. <span>相似中药鉴别使用:</span>
  687. <div>
  688. <div v-for="(item,index) in drugInfo.xiangsi" :key="'g'+index">
  689. <span
  690. class="mad-cy"
  691. v-for="(item1,index1) in item.relmats"
  692. :key="'h'+index1"
  693. >{{item1.matname}}{{index1==item.relmats.length-1?'':'、'}}</span>
  694. <div style="margin-bottom:10px;">{{item.differencedesc}}</div>
  695. </div>
  696. </div>
  697. </div>
  698. </div>
  699. <div class="flex-vertical-center-l flex-wrap">
  700. <div class="drug-item1 flex-plane-center-l">
  701. <span>常用药对:</span>
  702. <div>
  703. <div v-for="(item,index) in drugInfo.changyong" :key="index">
  704. <span
  705. class="mad-cy"
  706. v-for="(item1,index1) in item.relmats"
  707. :key="'i'+index1"
  708. >{{item1.matname}}{{index1==item.relmats.length-1?'':'、'}}</span>
  709. <div style="margin-bottom:10px;">{{item.differencedesc}}</div>
  710. </div>
  711. </div>
  712. </div>
  713. </div>
  714. </div>
  715. </Popup>
  716. <!-- 药品详情 -->
  717. <Popup
  718. width="50%"
  719. distanceTop="5vh"
  720. :showDialog="showXuewei"
  721. @cancle="showXuewei=false"
  722. title="穴位详情"
  723. :showBtns="false"
  724. >
  725. <div class="drug-body" slot="body">
  726. <div class="drug-item flex-plane-center-l">
  727. <span>穴位名称:</span>
  728. <div>
  729. <div>{{xwinfo.acuname}}</div>
  730. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  731. </div>
  732. </div>
  733. <div class="drug-item flex-plane-center-l">
  734. <span>定位:</span>
  735. <div>
  736. <div>{{xwinfo.acuposotion}}</div>
  737. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  738. </div>
  739. </div>
  740. <div class="drug-item flex-plane-center-l">
  741. <span>解剖:</span>
  742. <div>
  743. <div>{{xwinfo.acudiscection}}</div>
  744. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  745. </div>
  746. </div>
  747. <div class="drug-item flex-plane-center-l">
  748. <span>主治:</span>
  749. <div>
  750. <div>{{xwinfo.acumaintreat}}</div>
  751. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  752. </div>
  753. </div>
  754. <div class="drug-item flex-plane-center-l">
  755. <span>操作:</span>
  756. <div>
  757. <div>{{xwinfo.acuoperation}}</div>
  758. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  759. </div>
  760. </div>
  761. <div class="drug-item flex-plane-center-l">
  762. <span>针刺:</span>
  763. <div>
  764. <div>{{xwinfo.acuneedling}}</div>
  765. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  766. </div>
  767. </div>
  768. <div class="drug-item flex-plane-center-l">
  769. <span>图示:</span>
  770. <!-- <div class="flex-plane-center-l" v-for="(item,index) in drugInfo.acuimg" :key="index">
  771. <img :src="item" alt="">
  772. </div>-->
  773. <div class="img">
  774. <img :src="xwinfo.acuimg" alt />
  775. </div>
  776. </div>
  777. </div>
  778. </Popup>
  779. <!-- 我的协定方 -->
  780. <Popup
  781. :showDialog="showAgree"
  782. @cancle="showAgree=false"
  783. distanceTop="5vh"
  784. title="我的协定方"
  785. :showBtns="false"
  786. >
  787. <div class="drug-body" slot="body">
  788. <div class="drug-item flex-plane-center-l">
  789. <span>方名:</span>
  790. <div>{{agreeInfo.name}}</div>
  791. </div>
  792. <div class="drug-item flex-plane-center-l">
  793. <span>功效适应症:</span>
  794. <div>{{agreeInfo.effect}}</div>
  795. </div>
  796. <div class="drug-item flex-plane-center-l">
  797. <span>类别:</span>
  798. <div>{{agreeInfo.type=='0'?'组方':'配方'}}</div>
  799. </div>
  800. <div class="drug-item flex-plane-center-l">
  801. <span>明细:</span>
  802. <div class="detail">
  803. <p class="flex-center btns" @click="agreeTurnRecipe(agreeInfo)">转方</p>
  804. <p class="drug-detail flex-plane-center-l flex-wrap">
  805. <span
  806. v-for="(item,index) in agreeInfo.preStiDetails"
  807. :key="item.ypmc+index"
  808. >{{item.ypmc}}{{item.dose}}{{item.dw}}</span>
  809. </p>
  810. </div>
  811. </div>
  812. <div class="drug-item flex-plane-center-l">
  813. <span>分享医生:</span>
  814. <div>{{agreeInfo.createName}}</div>
  815. </div>
  816. </div>
  817. </Popup>
  818. <!-- 专家经验 -->
  819. <Popup
  820. :showDialog="showExpr"
  821. distanceTop="5vh"
  822. @cancle="showExpr=false"
  823. title="专家经验"
  824. :showBtns="false"
  825. width="700px"
  826. >
  827. <div class="drug-body" slot="body">
  828. <div class="drug-item flex-plane-center-l">
  829. <span>方名:</span>
  830. <div>{{exprInfo.name}}</div>
  831. </div>
  832. <div class="drug-item flex-plane-center-l">
  833. <span>方解:</span>
  834. <div>{{exprInfo.solution}}</div>
  835. </div>
  836. <div class="drug-item flex-plane-center-l">
  837. <span>功效适应症:</span>
  838. <div>{{exprInfo.effect}}</div>
  839. </div>
  840. <div class="drug-item flex-plane-center-l">
  841. <span>明细:</span>
  842. <div class="detail">
  843. <div class="trun-join">
  844. <p class="flex-center btns" @click="turnRecipe3(exprInfo)">转方</p>
  845. <p class="flex-center btns bg-yellow" @click="joinRecipe3(exprInfo)">合方</p>
  846. </div>
  847. <p class="drug-detail flex-plane-center-l flex-wrap">
  848. <span
  849. v-for="item in exprInfo.prescriptionDetailVos"
  850. :key="item.drugname+item.pid"
  851. >{{item.drugname}}{{item.dose}}{{item.unit}}</span>
  852. </p>
  853. </div>
  854. </div>
  855. <div class="drug-item flex-plane-center-l">
  856. <span>专家名称:</span>
  857. <div>{{exprInfo.expert}}</div>
  858. </div>
  859. </div>
  860. </Popup>
  861. <!-- 名家验案详情 -->
  862. <Popup
  863. :showDialog="showTestCase"
  864. distanceTop="5vh"
  865. @cancle="showTestCase=false"
  866. title="名家验案详情"
  867. :showBtns="false"
  868. width="700px"
  869. >
  870. <div slot="body" class="testCase">
  871. <div class="testCase-item flex-plane-center-l">
  872. <span class="testCase-left">性别:</span>
  873. <div class="testCase-right">{{testCaseInfo.patientgender=='M'?'男':'女'}}</div>
  874. </div>
  875. <div class="testCase-item flex-plane-center-l">
  876. <span class="testCase-left">年龄:</span>
  877. <div class="testCase-right">{{testCaseInfo.patientage}}岁</div>
  878. </div>
  879. <div class="testCase-item flex-plane-center-l">
  880. <span class="testCase-left">婚姻:</span>
  881. <div class="testCase-right">{{testCaseInfo.patientmarriage=='0'?'未婚':'已婚'}}</div>
  882. </div>
  883. <div class="testCase-item flex-plane-center-l" v-if="testCaseInfo.dialist">
  884. <span class="testCase-left">主诉及现病史:</span>
  885. <div class="testCase-right">{{testCaseInfo.dialist[0].situation}}</div>
  886. </div>
  887. <div class="testCase-item flex-plane-center-l">
  888. <span class="testCase-left">辩证:</span>
  889. <div class="testCase-right">{{testCaseInfo.chinesesymptom}}</div>
  890. </div>
  891. <div class="testCase-item flex-plane-center-l">
  892. <span class="testCase-left">治法:</span>
  893. <div class="testCase-right">{{testCaseInfo.therapy}}</div>
  894. </div>
  895. <div v-for="(item,index) in testCaseInfo.dialist" :key="index">
  896. <div class="testCase-title">{{index==0?'初诊':item.diatimes+'诊'}}</div>
  897. <div class="testCase-item flex-plane-center-l">
  898. <span class="testCase-left">就诊日期:</span>
  899. <div class="testCase-right">{{item.checktime[0]}}</div>
  900. </div>
  901. <div class="testCase-item flex-plane-center-l">
  902. <span class="testCase-left">治疗意见:</span>
  903. <div
  904. class="testCase-right"
  905. v-for="(item1,index1) in item.fjlist"
  906. :key="item1.preusage+index1"
  907. >
  908. <div class="flex-vertical-center-l case-yijian">
  909. <span>{{item1.preusage}}</span>
  910. <div class="testCase-btns flex-center" @click="turnRecipe(item1)">转方</div>
  911. </div>
  912. <div class="flex-vertical-center-l flex-wrap case-detial">
  913. <span
  914. v-for="(item2,index2) in item1.verpreitemlist"
  915. :key="item2.matname+index2"
  916. >{{item2.matname}}{{item2.dose}}{{item2.unit}}</span>
  917. </div>
  918. </div>
  919. </div>
  920. </div>
  921. <div class="testCase-item flex-plane-center-l">
  922. <span class="testCase-left">按语:</span>
  923. <div class="testCase-right">{{testCaseInfo.words}}</div>
  924. </div>
  925. <div class="testCase-item flex-plane-center-l">
  926. <span class="testCase-left">来源:</span>
  927. <div class="testCase-right">{{testCaseInfo.book}}</div>
  928. </div>
  929. </div>
  930. </Popup>
  931. <!-- 就诊记录详情 -->
  932. <Popup :showDialog="showRecord" @cancle="showRecord=false" title="就诊记录详情" :showBtns="false">
  933. <div slot="body" class="testCase" v-if="recordInfo.patient">
  934. <div class="testCase-item flex-plane-center-l">
  935. <span class="testCase-left">姓名:</span>
  936. <div class="testCase-right">{{recordInfo.patient.name}}</div>
  937. </div>
  938. <div class="testCase-item flex-plane-center-l">
  939. <span class="testCase-left">性别:</span>
  940. <div class="testCase-right">{{recordInfo.patient.sex}}</div>
  941. </div>
  942. <div class="testCase-item flex-plane-center-l">
  943. <span class="testCase-left">年龄:</span>
  944. <div class="testCase-right">{{recordInfo.patient.age}}岁</div>
  945. </div>
  946. <div class="testCase-item flex-plane-center-l">
  947. <span class="testCase-left">医疗机构:</span>
  948. <div class="testCase-right">{{recordInfo.patient.institutionidSelsourceName}}</div>
  949. </div>
  950. <div class="testCase-item flex-plane-center-l">
  951. <span class="testCase-left">科室名称:</span>
  952. <div class="testCase-right">{{recordInfo.patient.institutionidSelsourceName}}</div>
  953. </div>
  954. <div class="testCase-item flex-plane-center-l">
  955. <span class="testCase-left">诊断:</span>
  956. <div class="testCase-right">
  957. <div>中医诊断:{{recordInfo.mainDiagnosis.namemedicine?recordInfo.mainDiagnosis.namemedicine:'无'}}</div>
  958. <div>西医诊断:{{recordInfo.mainDiagnosis.diagnosis?recordInfo.mainDiagnosis.diagnosis:'无'}}</div>
  959. </div>
  960. </div>
  961. <div class="testCase-item flex-plane-center-l">
  962. <span class="testCase-left">治疗意见:</span>
  963. <div
  964. class="testCase-right"
  965. v-for="(item,index) in recordInfo.patientprescription"
  966. :key="'i'+index"
  967. >
  968. <div class="flex-vertical-center-l case-yijian">
  969. <span>{{item.type=='0'?'中药处方'+(index+1):item.type=='1'?'中药制剂':'适宜技术处方'}}</span>
  970. <div class="testCase-btns flex-center" @click="turnRecipe1(item)">转方</div>
  971. </div>
  972. <div class="flex-vertical-center-l flex-wrap case-detial">
  973. <span
  974. v-for="(item1,index1) in item.myPatientDetailVos"
  975. :key="item1.name+index1"
  976. >{{item1.name}}{{item1.num}}{{item1.unit}}</span>
  977. </div>
  978. </div>
  979. </div>
  980. <div class="testCase-item flex-plane-center-l">
  981. <span class="testCase-left">开方医生:</span>
  982. <div
  983. class="testCase-right"
  984. >{{recordInfo.patientprescription.length>0?recordInfo.patientprescription[0].updateUser:'无'}}</div>
  985. </div>
  986. <div class="testCase-item flex-plane-center-l">
  987. <span class="testCase-left">时间:</span>
  988. <div
  989. class="testCase-right"
  990. >{{recordInfo.patientprescription.length>0?recordInfo.patientprescription[0].updateTime:'无'}}</div>
  991. </div>
  992. </div>
  993. </Popup>
  994. <!-- 处方预览 -->
  995. <submitRecipe :show.sync="showPriview" :priviewData="priviewData"></submitRecipe>
  996. <!-- <div style="position:fixed;top:0;z-index:9999;width:100vw;">
  997. <suitMadePad></suitMadePad>
  998. </div>-->
  999. <!--参考医案例 页面768-->
  1000. <Popup
  1001. :showDialog="showCase"
  1002. @cancle="showCase=false"
  1003. title="参考医案"
  1004. :showBtns="false"
  1005. width="700px"
  1006. distanceTop="5vh"
  1007. >
  1008. <div slot="body">
  1009. <doctorCase :searchKey="agree_key1"></doctorCase>
  1010. </div>
  1011. </Popup>
  1012. <!-- 查询协定方 方剂 页面768 -->
  1013. <Popup
  1014. :showDialog="showPresc"
  1015. @cancle="showPresc=false"
  1016. title="查询方剂/查询协定方"
  1017. :showBtns="false"
  1018. width="78%"
  1019. distanceTop="5vh"
  1020. >
  1021. <div slot="body">
  1022. <prescription></prescription>
  1023. </div>
  1024. </Popup>
  1025. <!-- 查询萧然医派协定方 页面768 -->
  1026. <Popup
  1027. :showDialog="showUnifyPresc"
  1028. @cancle="showUnifyPresc=false"
  1029. title="查询萧然医派协定方"
  1030. :showBtns="false"
  1031. width="78%"
  1032. distanceTop="5vh"
  1033. >
  1034. <div slot="body">
  1035. <UnifyPrescription></UnifyPrescription>
  1036. </div>
  1037. </Popup>
  1038. <!-- 查询舌象分析 页面768 -->
  1039. <Popup
  1040. :showDialog="showTongueAnalysis"
  1041. @cancle="showTongueAnalysis=false"
  1042. title="舌面诊影像"
  1043. :showBtns="false"
  1044. width="70%"
  1045. distanceTop="5vh"
  1046. >
  1047. <div style="height: 100%" slot="body">
  1048. <TongueAnalysis v-if="showTongueAnalysis" :dataset="tongueAndFaceAnalysis"></TongueAnalysis>
  1049. </div>
  1050. </Popup>
  1051. <!-- 安全合理用药弹窗 -->
  1052. <!-- 查询协定方 方剂 页面768 -->
  1053. <Popup
  1054. :showDialog.sync="showSafeD"
  1055. @cancle="showSafeD=false"
  1056. title="安全合理用药检测"
  1057. :showBtns="false"
  1058. width="700px"
  1059. distanceTop="5vh"
  1060. :destroyOnClose="true"
  1061. >
  1062. <div slot="body">
  1063. <safeDrug v-if="showSafeD"></safeDrug>
  1064. </div>
  1065. </Popup>
  1066. <!-- 选择代煎 地址栏 -->
  1067. <Popup
  1068. :showDialog="showAddress"
  1069. @cancle="submitAddress"
  1070. @confim="submitAddress"
  1071. title="请和患者确认以下信息"
  1072. width="700px"
  1073. distanceTop="5vh"
  1074. >
  1075. <div slot="body">
  1076. <medAdressNew
  1077. ref="medAdress"
  1078. @psChange="psChange"
  1079. @djChange="djChange"
  1080. :isDaijian="Number(isDaiJian)"
  1081. :isPs="Number(isPs)"
  1082. :isShowDj="isShowDj"
  1083. :isShowPs="isShowPs"
  1084. ></medAdressNew>
  1085. </div>
  1086. </Popup>
  1087. </div>
  1088. </template>
  1089. <script>
  1090. import Popup from "@/components/Propup.vue";
  1091. import chineseMedicine from "@/components/ChineseMedicine.vue";
  1092. import medicineChinese from "@/components/MedicineAndChina.vue";
  1093. import suitScience from "@/components/SuitScience.vue";
  1094. import submitRecipe from "./components/submitRecipe.vue";
  1095. // import TCMDiagnosis from "./components/TCMDiagnosis.vue";
  1096. import TCMDiagnosis from "../../components/TCMDiagnosis.vue";
  1097. import doctorCase from "./components/doctorCase.vue";
  1098. import prescription from "./components/prescription.vue";
  1099. import UnifyPrescription from "./components/prescription-unify.vue";
  1100. import TongueAnalysis from "./components/tongue-analysis.vue";
  1101. import safeDrug from "./components/safeDrug.vue";
  1102. import medAdress from "./components/medAddress.vue";
  1103. import medAdressNew from "./components/medAddressNew.vue";
  1104. import {
  1105. getPatiensBasisM,
  1106. getTongueAndFaceAnalysisRecords,
  1107. addRecipe,
  1108. getRecipeShowData,
  1109. getRecipeDataByid,
  1110. getAgreeRecipe,
  1111. getSeeDByID,
  1112. getDrugDetail,
  1113. getAccordDetail,
  1114. changeBasisPre,
  1115. updateRecipe,
  1116. changeExpre,
  1117. recipeIsPay,
  1118. getPreNumber,
  1119. getRecipePriview,
  1120. getMaxMinDoaseNumber
  1121. } from "@/api/diagnosis.js";
  1122. import { numberToUpperCase } from "@/utils/format.js";
  1123. import { addRecipeFrom } from "@/api/dataAnalysis.js";
  1124. import {
  1125. getPrescriptionsList,
  1126. getDoctorCaseL,
  1127. getRationalMed,
  1128. getRationalMedForPlat,
  1129. inferRecipe,
  1130. getDCaseDetail,
  1131. changeAndJoin,
  1132. getPreDetal,
  1133. getAcupointD,
  1134. getMedDetail
  1135. } from "@/api/knowledge.js";
  1136. import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
  1137. import { getExperinceDetail } from "@/api/business.js";
  1138. import { setTimeout } from "timers";
  1139. import prescribing from "../../utils/minix/prescribing";
  1140. import {formatPicture} from "@/utils/picture";
  1141. export default {
  1142. mixins: [prescribing],
  1143. components: {
  1144. Popup,
  1145. chineseMedicine,
  1146. medicineChinese,
  1147. suitScience,
  1148. TCMDiagnosis,
  1149. submitRecipe,
  1150. prescription,
  1151. UnifyPrescription,
  1152. TongueAnalysis,
  1153. doctorCase,
  1154. safeDrug,
  1155. medAdress,
  1156. medAdressNew
  1157. },
  1158. data() {
  1159. return {
  1160. tongueAndFaceLoading: false, // 舌面象加载
  1161. tongueAndFaceAnalysis: null, // 舌面象数据
  1162. showTongueAnalysis: false, // 舌象分析弹窗
  1163. showPriview: false, // 展示预览数据
  1164. showDialog: false, // 方剂详情
  1165. showDrug: false, // 药品详情
  1166. showAgree: false, // 协定方
  1167. showTestCase: false, // 名医验案
  1168. showRecord: false, // 就诊记录
  1169. showXuewei: false, // 穴位详情信息
  1170. showTestCase: false, // 名医验案
  1171. isTuiDaoSuit: false, //适宜技术处方是否推导过
  1172. isTuiDataZy: false, // 中药处方是否推导过
  1173. raDoseShow: false,
  1174. tjRecipeId: "", // 当前选中推荐 方剂的 id
  1175. isMyMade: true, // 是否是自拟处方
  1176. showExpr: false, // 专家经验
  1177. priviewData: {}, // 预览数据
  1178. exprInfo: {}, // 专家经验信息
  1179. // 名医弹窗信息
  1180. testCaseInfo: {},
  1181. // 就诊记录 弹窗信息
  1182. recordInfo: {},
  1183. //药品弹窗信息
  1184. drugInfo: {},
  1185. xwinfo: {},
  1186. // 方剂弹窗信息
  1187. preInfo: {},
  1188. // 协定方弹窗信息
  1189. agreeInfo: {},
  1190. // 右侧搜索
  1191. agree_key: "",
  1192. agree_key1: "",
  1193. key: "",
  1194. // 推荐方剂 下标
  1195. r_current: 0,
  1196. // 协定方下标
  1197. agree_current: 0,
  1198. // 协定方手风琴 选中
  1199. activeNames: "0",
  1200. activeNamesLast: "0",
  1201. // 右侧手风琴面板数据
  1202. collapseData: [
  1203. {
  1204. name: "个人",
  1205. index: "0",
  1206. page: 1,
  1207. loadMore: true,
  1208. list: []
  1209. },
  1210. {
  1211. name: "二级科室",
  1212. index: "1",
  1213. page: 1,
  1214. loadMore: true,
  1215. list: []
  1216. },
  1217. {
  1218. name: "科室",
  1219. index: "2",
  1220. page: 1,
  1221. loadMore: true,
  1222. list: []
  1223. },
  1224. {
  1225. name: "本院",
  1226. index: "3",
  1227. page: 1,
  1228. loadMore: true,
  1229. list: []
  1230. }
  1231. ],
  1232. // 右侧方剂列表
  1233. rPrescription: {
  1234. list: [],
  1235. page: 1,
  1236. loadMore: true,
  1237. key: ""
  1238. },
  1239. // 右侧参考医案
  1240. rDoctorCase: {
  1241. list: [],
  1242. page: 1,
  1243. loadMore: true,
  1244. key: ""
  1245. },
  1246. // 保存右侧合理用药信息
  1247. rationalMed: [],
  1248. // 从1-9 分别对应 超剂量 到 19反
  1249. rationalMed1: [],
  1250. rationalMed2: [],
  1251. rationalMed3: [],
  1252. rationalMed4: [],
  1253. rationalMed5: [],
  1254. rationalMed6: [],
  1255. rationalMed7: [],
  1256. rationalMed8: [],
  1257. rationalMed9: [],
  1258. rationalMed10: [],
  1259. // 右侧推荐方剂
  1260. rRecomendR: [],
  1261. // 中间顶部tab
  1262. container_i: 0,
  1263. contentTabs: [
  1264. {
  1265. name: "中药处方",
  1266. check: true,
  1267. color: ""
  1268. },
  1269. {
  1270. name: "中药制剂",
  1271. check: false,
  1272. hide: true,
  1273. color: ""
  1274. },
  1275. {
  1276. name: "适宜技术处方",
  1277. check: false,
  1278. hide: true,
  1279. color: ""
  1280. }
  1281. ],
  1282. patiensMsg: {}, // 患者信息
  1283. dianosisMsg: [], // 诊断信息
  1284. ops: {
  1285. vuescroll: {},
  1286. scrollPanel: {},
  1287. rail: {
  1288. keepShow: true
  1289. },
  1290. bar: {
  1291. hoverStyle: true,
  1292. onlyShowBarOnScroll: false, //是否只有滚动的时候才显示滚动条
  1293. background: "#C1C1C1", //滚动条颜色
  1294. opacity: 0.5, //滚动条透明度
  1295. "overflow-x": "hidden"
  1296. }
  1297. },
  1298. showSubmit: true,
  1299. // refs 信息暂存
  1300. chineseM: {
  1301. allMoney: 0,
  1302. recipeTabs: []
  1303. },
  1304. medicineC: {
  1305. allMoney: 0
  1306. },
  1307. suitScience: {
  1308. allMoney: 0
  1309. }
  1310. };
  1311. },
  1312. created() {
  1313. // console.log(this.getIsSee, 'issee');
  1314. this.showSubmit = String(this.getIsSee) == "true" ? true : false;
  1315. // 获取右侧协定方数据
  1316. this.getAgreeRecipe();
  1317. if (this.getPatiensInfo.pid) {
  1318. this.getPatiensBasisM();
  1319. this.getPatientBasisTongueAndFaceAnalysis();
  1320. }
  1321. },
  1322. mounted() {
  1323. this._processRouteQuery();
  1324. },
  1325. beforeRouteLeave(to, from, next) {
  1326. if (to.path == "/index/recipe") {
  1327. sessionStorage.removeItem("prescr" + this.getPatiensInfo.pid);
  1328. next();
  1329. } else {
  1330. this._setDataToStorage(next);
  1331. }
  1332. },
  1333. watch: {
  1334. rationalMed10: {
  1335. deep: true,
  1336. immediate: true,
  1337. handler: function() {
  1338. this.countDose();
  1339. }
  1340. }
  1341. },
  1342. methods: {
  1343. // 处理路由参数
  1344. async _processRouteQuery() {
  1345. const query = this.$route.query || {};
  1346. // 暂存处方数据(不含药品)
  1347. if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage(true);
  1348. // 名医名方 —> 方剂查询
  1349. if (query.recipeID && query.kjType === "kj-fj") await this.getPreDetal(query.recipeID);
  1350. // 就诊记录转方
  1351. else if (query.recipeID) await this.getRecipeDataByid(this.$route.query.recipeID);
  1352. // 名医名方 —> 名医医案
  1353. else if (query.doctorCase) await this.changeAndJoin();
  1354. // 中医诊疗 -> 智能辩证
  1355. else if (query.type === "tuidao") {
  1356. await Promise.all([
  1357. this.inferRecipe(4, "1"),
  1358. // this.inferRecipe(4, "3"),
  1359. this.inferRecipe(),
  1360. ])
  1361. this.isTuiDaoZy = true;
  1362. }
  1363. // 处方编辑 recipeType
  1364. else if (query.from !== 'his' && this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
  1365. // 暂存处方
  1366. else if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage();
  1367. // 历史处方
  1368. else {
  1369. // 跟据就诊记录id获取处方号
  1370. let res = await getPreNumber({pid: this.getPatiensInfo.pid}).catch(() => void 0);
  1371. const has = res && res.ResultCode == 0 && res.Data.length > 0;
  1372. if (has) await this.getRecipeShowData();
  1373. else if (this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
  1374. }
  1375. },
  1376. // 参考医案
  1377. // 中医诊断推导点击
  1378. tcmClick(isauto = true) {
  1379. let params = this.$refs.TCM.getParams();
  1380. if (!params.namemedicine || !params.syndrometypes) {
  1381. this.$message.warning("请完善病名证型信息");
  1382. return;
  1383. }
  1384. let newDiaMsg = this.$refs.TCM.getDiamsg();
  1385. this.agree_key1 = params.namemedicine;
  1386. this.patiensMsg.maindiagnosis.disid = newDiaMsg.disid;
  1387. this.patiensMsg.maindiagnosis.symptomid = newDiaMsg.symptomid;
  1388. this.patiensMsg.maindiagnosis.treatment = newDiaMsg.treatment;
  1389. // 获取最新病名的参考医案
  1390. this.rDoctorCase.page = 1;
  1391. this.rDoctorCase.list = [];
  1392. this.rDoctorCase.loadMore = true;
  1393. this.getDoctorCaseL();
  1394. // --end
  1395. if (isauto) {
  1396. this.inferRecipe(2);
  1397. }
  1398. setTimeout(() => {
  1399. this.inferRecipe(4, "1");
  1400. this.inferRecipe(4, "3");
  1401. if (this.getPatiensInfo.pid) {
  1402. this.getPatiensBasisM();
  1403. }
  1404. }, 1000);
  1405. },
  1406. // 系统数据存入缓存
  1407. _setDataToStorage(next) {
  1408. let children = this.$children.filter(item => {
  1409. return (
  1410. item.name == "中药处方" ||
  1411. item.name == "中药制剂" ||
  1412. item.name == "适宜技术处方"
  1413. );
  1414. });
  1415. let child1 = children[0];
  1416. let child2 = children[1];
  1417. let child3 = children[2];
  1418. let obj = {
  1419. container_i: this.container_i,
  1420. child1: {
  1421. recipe_tabs: child1.recipe_tabs,
  1422. recipe_tabs_c: child1.recipe_tabs_c
  1423. },
  1424. child2: {
  1425. tableData3: child2.tableData3,
  1426. bottom_form: child2.bottom_form
  1427. },
  1428. child3: {
  1429. tableData4: child3.tableData4,
  1430. listLeft: child3.listLeft,
  1431. listRight: child3.listRight,
  1432. bottom_form: child3.bottom_form
  1433. },
  1434. rationalMed: {
  1435. // 保存右侧合理用药信息
  1436. rationalMed: this.rationalMed,
  1437. // 从1-9 分别对应 超剂量 到 19反
  1438. rationalMed1: this.rationalMed1,
  1439. rationalMed2: this.rationalMed2,
  1440. rationalMed3: this.rationalMed3,
  1441. rationalMed4: this.rationalMed4,
  1442. rationalMed5: this.rationalMed5,
  1443. rationalMed6: this.rationalMed6,
  1444. rationalMed7: this.rationalMed7,
  1445. rationalMed8: this.rationalMed8,
  1446. rationalMed9: this.rationalMed9,
  1447. rationalMed10: this.rationalMed10
  1448. }
  1449. };
  1450. sessionStorage.setItem(
  1451. "prescr" + this.getPatiensInfo.pid,
  1452. JSON.stringify(obj)
  1453. );
  1454. next();
  1455. // getPatiensInfo
  1456. },
  1457. // 展示系统缓存数据
  1458. async _showDataFromStorage(ignoreTable = false) {
  1459. let storageData = JSON.parse(
  1460. sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)
  1461. );
  1462. let children = this.$children.filter(item => {
  1463. return (
  1464. item.name == "中药处方" ||
  1465. item.name == "中药制剂" ||
  1466. item.name == "适宜技术处方"
  1467. );
  1468. });
  1469. let child1 = children[0];
  1470. let child2 = children[1];
  1471. let child3 = children[2];
  1472. if (typeof child1.loaded === 'function') await child1.loaded(storageData.child1);
  1473. if (storageData.child1.recipe_tabs[0].totalTableD.length > 1) {
  1474. this.isTuiDaoZy = true;
  1475. }
  1476. if (storageData.child3.tableData4.length > 1) {
  1477. this.isTuiDaoZy = true;
  1478. }
  1479. if (ignoreTable) {
  1480. for (const recipe of storageData.child1.recipe_tabs) {
  1481. recipe.tableData = [];
  1482. recipe.tableData1 = [];
  1483. recipe.totalTableD = [];
  1484. }
  1485. storageData.child2.tableData3 = [];
  1486. storageData.child3.tableData4 = [];
  1487. }
  1488. this.container_i = storageData.container_i;
  1489. child1.recipe_tabs = storageData.child1.recipe_tabs;
  1490. child1.recipe_tabs_c = storageData.child1.recipe_tabs_c;
  1491. // child1.getSelectType("剂型", 0);
  1492. // child1.getSelectType("处方用法");
  1493. // child1.getSelectType("中药服药时间");
  1494. // child1.getSelectType("中药频次");
  1495. // child1.getPharmacyID();
  1496. child2.tableData3 = storageData.child2.tableData3;
  1497. child2.bottom_form = storageData.child2.bottom_form;
  1498. child3.tableData4 = storageData.child3.tableData4;
  1499. child3.listLeft = storageData.child3.listLeft;
  1500. child3.listRight = storageData.child3.listRight;
  1501. child3.bottom_form = storageData.child3.bottom_form;
  1502. this.rationalMed = storageData.rationalMed.rationalMed;
  1503. // 保存右侧合理用药信息
  1504. // 从1-9 分别对应 超剂量 到 19反
  1505. this.rationalMed1 = storageData.rationalMed.rationalMed1;
  1506. this.rationalMed2 = storageData.rationalMed.rationalMed2;
  1507. this.rationalMed3 = storageData.rationalMed.rationalMed3;
  1508. this.rationalMed4 = storageData.rationalMed.rationalMed4;
  1509. this.rationalMed5 = storageData.rationalMed.rationalMed5;
  1510. this.rationalMed6 = storageData.rationalMed.rationalMed6;
  1511. this.rationalMed7 = storageData.rationalMed.rationalMed7;
  1512. this.rationalMed8 = storageData.rationalMed.rationalMed8;
  1513. this.rationalMed9 = storageData.rationalMed.rationalMed9;
  1514. this.rationalMed10 = storageData.rationalMed.rationalMed10;
  1515. },
  1516. // 方剂顶部搜索
  1517. searchPre() {
  1518. if (this.agree_current == 1) {
  1519. this.rPrescription.page = 1;
  1520. this.rPrescription.list = [];
  1521. this.rPrescription.loadMore = true;
  1522. this.getPrescriptionsList();
  1523. } else if (this.agree_current == 2) {
  1524. this.rDoctorCase.page = 1;
  1525. this.rDoctorCase.list = [];
  1526. this.rDoctorCase.loadMore = true;
  1527. this.getDoctorCaseL();
  1528. }
  1529. },
  1530. // 方剂加载更多
  1531. loadMorePre() {
  1532. if (this.agree_current == 1) {
  1533. if (!this.rPrescription.loadMore) {
  1534. this.$message({
  1535. showClose: false,
  1536. message: "没有更多数据了",
  1537. type: "warning "
  1538. });
  1539. return;
  1540. }
  1541. this.getPrescriptionsList(this.rPrescription.loadMore);
  1542. } else if (this.agree_current == 2) {
  1543. if (!this.rDoctorCase.loadMore) {
  1544. this.$message({
  1545. showClose: false,
  1546. message: "没有更多数据了",
  1547. type: "warning "
  1548. });
  1549. return;
  1550. }
  1551. this.getDoctorCaseL(this.rDoctorCase.loadMore);
  1552. }
  1553. },
  1554. // 加载更多协定方数据
  1555. loadMoreCollapse(item) {
  1556. if (!item.loadMore) {
  1557. this.$message({
  1558. showClose: false,
  1559. message: "没有更多数据了",
  1560. type: "warning "
  1561. });
  1562. return;
  1563. }
  1564. this.getAgreeRecipe(item.loadMore);
  1565. },
  1566. // 手风琴 更改
  1567. activeChange(e) {
  1568. console.log(e, "手风琴该表");
  1569. // if (this.activeNames == e) return;
  1570. if (e) {
  1571. this.activeNames = e;
  1572. this.activeNamesLast = e;
  1573. this.collapseData[this.activeNames].page = 1;
  1574. this.collapseData[this.activeNames].loadMore = true;
  1575. this.collapseData[this.activeNames].list = [];
  1576. this.getAgreeRecipe(this.collapseData[this.activeNames].loadMore);
  1577. } else {
  1578. this.activeNames = this.activeNamesLast;
  1579. }
  1580. },
  1581. // 处理中药处方提交数据
  1582. dealRecipe1() {
  1583. let children = this.$children.filter(item => {
  1584. return (
  1585. item.name == "中药处方" ||
  1586. item.name == "中药制剂" ||
  1587. item.name == "适宜技术处方"
  1588. );
  1589. });
  1590. let data1 = children[0];
  1591. let isAutoCheck = data1.isAutoCheck;
  1592. let hasDoseNum = true; // 是否有剂数
  1593. let hasData = true; // 是否有处方药品数据
  1594. let hasAddress = true;
  1595. let noFull = false; // 是否有药品库存不足
  1596. let recipeAlert = [];
  1597. data1.recipe_tabs.forEach((item, index) => {
  1598. if (item.isMyMade) {
  1599. this.addRecipeFrom("3");
  1600. }
  1601. if (!item.bottom_form.doseNum) {
  1602. hasDoseNum = false;
  1603. }
  1604. if (item.bottom_form.radio == "0" && !item.bottom_form.savename) {
  1605. hasAddress = false;
  1606. }
  1607. if (item.bottom_form.radio == "0" && !item.bottom_form.phone) {
  1608. hasAddress = false;
  1609. }
  1610. if (item.bottom_form.radio == "0" && !item.bottom_form.province) {
  1611. hasAddress = false;
  1612. }
  1613. if (item.bottom_form.radio == "0" && !item.bottom_form.city) {
  1614. hasAddress = false;
  1615. }
  1616. if (item.bottom_form.radio == "0" && !item.bottom_form.area) {
  1617. hasAddress = false;
  1618. }
  1619. if (item.bottom_form.radio == "0" && !item.bottom_form.address) {
  1620. hasAddress = false;
  1621. }
  1622. if (item.totalTableD.length < 2) {
  1623. hasData = false;
  1624. }
  1625. if (item.totalTableD.length - 1 < this.doseMin) {
  1626. recipeAlert.push({
  1627. text: `中药处方${index + 1}不符合最小药味数${this.doseMin}!`,
  1628. isAllow: this.doseAllowMin
  1629. });
  1630. }
  1631. if (item.totalTableD.length - 1 > this.doseMax) {
  1632. recipeAlert.push({
  1633. text: `中药处方${index + 1}不符合最大药味数${this.doseMax}!`,
  1634. isAllow: this.doseAllowMax
  1635. });
  1636. }
  1637. item.totalTableD.forEach(item1 => {
  1638. if (item1.color == "red") {
  1639. noFull = true;
  1640. }
  1641. if (!item1.dose && item1.name) {
  1642. hasDoseNum = false;
  1643. }
  1644. });
  1645. });
  1646. if (!hasData) {
  1647. this.$message.error({
  1648. message: "请完善中药处方药品信息",
  1649. showClose: false,
  1650. type: "error"
  1651. });
  1652. return [];
  1653. }
  1654. if (recipeAlert.length > 0) {
  1655. recipeAlert.forEach(item => {
  1656. if (item.text) {
  1657. setTimeout(() => {
  1658. this.$message({
  1659. message: item.text,
  1660. showClose: true,
  1661. type: "warning"
  1662. });
  1663. }, 200);
  1664. }
  1665. });
  1666. // return false;
  1667. }
  1668. // if (!hasAddress) {
  1669. // this.$message({
  1670. // message: "请完善中药处方配送信息",
  1671. // showClose: false,
  1672. // type: "error"
  1673. // });
  1674. // return false;
  1675. // }
  1676. if (!hasDoseNum) {
  1677. this.$message.error({
  1678. message: "请完善中药处方剂数剂量信息",
  1679. showClose: false,
  1680. type: "error"
  1681. });
  1682. return false;
  1683. }
  1684. if (noFull) {
  1685. this.$message.error({
  1686. message: "部分药品库存不足",
  1687. showClose: false,
  1688. type: "error"
  1689. });
  1690. return false;
  1691. }
  1692. console.log(recipeAlert, "recipeAlert");
  1693. // let data2 = children[1]
  1694. // let data3 = children[2]
  1695. let zhongPrescriptionVo = [];
  1696. let medAdressData = {};
  1697. if (this.showAddress) {
  1698. medAdressData = this.$refs.medAdress.form;
  1699. }
  1700. data1.recipe_tabs.forEach((item, index) => {
  1701. let obj = {
  1702. seqn: index + 1,
  1703. province:
  1704. this.isShowPs && this.showAddress ? medAdressData.province : "", // 省
  1705. city: this.isShowPs && this.showAddress ? medAdressData.city : "", // 市
  1706. district: this.isShowPs && this.showAddress ? medAdressData.area : "", // 区
  1707. address:
  1708. this.isShowPs && this.showAddress ? medAdressData.address : "", // 详细地址
  1709. agency: item.bottom_form.isDaiJian, // 代煎
  1710. // agency: this.showAddress ? medAdressData.isDaiJian : 0, // 代煎
  1711. // agency: this.isShowDj ? this.isDaiJian : 0, // 代煎
  1712. allprice: item.bottom_form.allMoney, // 总金额(合计金额)
  1713. command: item.bottom_form.zhutuo, // 嘱托
  1714. consigneeName:
  1715. this.isShowPs && this.showAddress ? medAdressData.savename : "", // 收货人姓名
  1716. consigneePhone:
  1717. this.isShowPs && this.showAddress ? medAdressData.phone : "", // 收货人电话
  1718. deliveryfree:
  1719. medAdressData.radio == 0 && this.isShowPs && this.showAddress
  1720. ? item.bottom_form.moneyMsg.deliveryPrice
  1721. : 0, // 配送费
  1722. deploymentfree:
  1723. item.bottom_form.doseType == "2" || item.bottom_form.doseType == "3"
  1724. ? item.bottom_form.moneyMsg.specialDeploymentPrice
  1725. : 0, // 特殊调配费
  1726. dosageForm: item.bottom_form.doseType, // 剂型
  1727. eatMedicineTime: item.bottom_form.time, // 服药时间
  1728. frequency: item.bottom_form.num, // 频次
  1729. friedfree: item.bottom_form.daijian
  1730. ? item.bottom_form.moneyMsg.agencyPrice
  1731. : 0, // 代煎费
  1732. // isdelivery: this.isPs == 1 ? 0 : 1, // 是否配送
  1733. isdelivery: item.bottom_form.radio,
  1734. markfree:
  1735. item.bottom_form.doseType == "0"
  1736. ? item.bottom_form.moneyMsg.systemOfCreamPrice
  1737. : 0, // 制膏费
  1738. num: item.bottom_form.doseNum, //剂数
  1739. pharmacyid: item.pharmacyID, // 药房id 暂时写死
  1740. drugtype: item.radio.split("@")[1], // 药房类型
  1741. price: item.bottom_form.nowRecipeMoney, // 单剂金额
  1742. recordid: this.getPatiensInfo.pid, //门诊id
  1743. strongFried: item.bottom_form.nongjian, //浓煎
  1744. type: 0, // 处方类型
  1745. useexplain: item.bottom_form.caozuo, // 操作指南
  1746. usestr: item.bottom_form.usege, //处方用法
  1747. zhongdetail: [], // 中药明细 表格内部数据
  1748. // preId: this.$route.query.recipeID ? this.$route.query.recipeID : ""
  1749. preId: item.preId ? item.pageId : ""
  1750. };
  1751. item.totalTableD.forEach(item1 => {
  1752. if (item1.name && item1.color != "red") {
  1753. let obj1 = {
  1754. allprice: item1.total,
  1755. dose: Number(item1.dose),
  1756. drugName: item1.name,
  1757. drugid: item1.medid,
  1758. origin: item1.originname,
  1759. seqn: item1.id,
  1760. specification: item1.spec,
  1761. unit: item1.unit,
  1762. unitprice: item1.price,
  1763. usagestr: item1.usage,
  1764. preDetailId: this.getEditPreNo(),
  1765. };
  1766. obj.zhongdetail.push(obj1);
  1767. }
  1768. });
  1769. if (!recipeAlert[index]) {
  1770. recipeAlert.push({
  1771. isAllow: 0
  1772. });
  1773. }
  1774. // 当前审核流程为自动时 用his 的支付状态判断
  1775. // if (isAutoCheck == 1) {
  1776. // } else {
  1777. // if (
  1778. // !item.isPay &&
  1779. // (item.prescribed == 0 || !item.prescribed) &&
  1780. // recipeAlert[index].isAllow == 0
  1781. // ) {
  1782. // zhongPrescriptionVo.push(obj);
  1783. // }
  1784. // }
  1785. if (
  1786. (item.paystate == 0 || !item.paystate) &&
  1787. recipeAlert[index].isAllow == 0
  1788. ) {
  1789. zhongPrescriptionVo.push(obj);
  1790. }
  1791. });
  1792. return zhongPrescriptionVo;
  1793. },
  1794. // 处理中成药处方提交数据
  1795. dealRecipe2() {
  1796. let children = this.$children.filter(item => {
  1797. return (
  1798. item.name == "中药处方" ||
  1799. item.name == "中药制剂" ||
  1800. item.name == "适宜技术处方"
  1801. );
  1802. });
  1803. let data1 = children[1];
  1804. let isAutoCheck = data1.isAutoCheck;
  1805. if (data1.tableData3.length == 1) {
  1806. // this.$message.error("请完善中成药处方药品信息");
  1807. return {};
  1808. }
  1809. let hasDrugMsg = [];
  1810. data1.tableData3.forEach((item, index) => {
  1811. if (
  1812. item.name &&
  1813. (!item.dose || !item.usage || !item.timesQuan || !item.nums)
  1814. ) {
  1815. // || !item.time
  1816. hasDrugMsg.push(index + 1);
  1817. }
  1818. });
  1819. if (hasDrugMsg.length > 0) {
  1820. this.$message.error(
  1821. "请完善中药制剂处方药品相关信息(序号:" + hasDrugMsg.join(",") + ")"
  1822. );
  1823. return false;
  1824. }
  1825. let hasAddress = true;
  1826. let medAdressData = {};
  1827. if (this.showAddress) {
  1828. medAdressData = this.$refs.medAdress.form;
  1829. }
  1830. this.addRecipeFrom("3");
  1831. let obj = {
  1832. province:
  1833. this.showAddress && this.isShowPs ? medAdressData.province : "", // 省
  1834. city: this.showAddress && this.isShowPs ? medAdressData.city : "", // 市
  1835. district: this.showAddress && this.isShowPs ? medAdressData.area : "", // 区
  1836. address: this.showAddress && this.isShowPs ? medAdressData.address : "",
  1837. command: data1.bottom_form.zhutuo,
  1838. consigneeName:
  1839. this.showAddress && this.isShowPs ? medAdressData.savename : "",
  1840. consigneePhone:
  1841. this.showAddress && this.isShowPs ? medAdressData.phone : "",
  1842. isdelivery: data1.bottom_form.radio,
  1843. // isdelivery: this.isPs == 0 ? 1 : 0,
  1844. deliveryfree:
  1845. this.showAddress && this.isShowPs && medAdressData.radio == 0
  1846. ? data1.moneyMsg.deliveryPrice
  1847. : 0, // 配送费
  1848. pharmacyid: data1.pharmacyID,
  1849. type: 1,
  1850. chengDetail: [],
  1851. // preId: this.$route.query.recipeID ? this.$route.query.recipeID : ""
  1852. preId: data1.preId ? data1.pageId : ""
  1853. };
  1854. data1.tableData3.forEach(item => {
  1855. if (item.name) {
  1856. let obj1 = {
  1857. allprice: item.total,
  1858. dose: item.dose,
  1859. drugName: item.name,
  1860. drugid: item.medid,
  1861. frequency: item.nums,
  1862. medicationtime: item.time,
  1863. origin: item.from,
  1864. price: item.price,
  1865. secondDose: item.timesQuan,
  1866. seqn: item.id,
  1867. specification: item.spec,
  1868. unit: item.unit,
  1869. usagestr: item.usage,
  1870. preDetailId: this.getEditPreNo(),
  1871. bzdw: item.doseUnit,
  1872. zxdw: item.timesUnit
  1873. };
  1874. obj.chengDetail.push(obj1);
  1875. }
  1876. });
  1877. // if ((data1.isPay || data1.prescribed == 1) && isAutoCheck == 0) {
  1878. // return {};
  1879. // }
  1880. // && isAutoCheck == 1
  1881. if (data1.paystate == 1) {
  1882. return {};
  1883. }
  1884. return obj;
  1885. },
  1886. // 处理适宜剂数处方提交数据
  1887. dealRecipe3() {
  1888. let children = this.$children.filter(item => {
  1889. return (
  1890. item.name == "中药处方" ||
  1891. item.name == "中药制剂" ||
  1892. item.name == "适宜技术处方"
  1893. );
  1894. });
  1895. let data1 = children[2];
  1896. let isAutoCheck = data1.isAutoCheck;
  1897. if (data1.tableData4.length == 1) {
  1898. // this.$message.error('请完善适宜技术处方药品信息')
  1899. return {};
  1900. }
  1901. let hasDrugMsg = [];
  1902. data1.tableData4.forEach((item, index) => {
  1903. if (!item.name && index != data1.tableData4.length - 1) {
  1904. hasDrugMsg.push(index + 1);
  1905. }
  1906. });
  1907. if (hasDrugMsg.length > 0) {
  1908. // this.$message.error(
  1909. // "请完善适宜技术处方药品相关信息(序号:" + hasDrugMsg.join(",") + ")"
  1910. // );
  1911. return false;
  1912. }
  1913. if (!data1.bottom_form.doseNum1) {
  1914. this.$message.error({
  1915. message: "请完善适宜技术处方次数信息",
  1916. showClose: false,
  1917. type: "error"
  1918. });
  1919. return false;
  1920. }
  1921. if (!data1.bottom_form.doseType1) {
  1922. this.$message.error({
  1923. message: "请完善适宜技术处方类型信息",
  1924. showClose: false,
  1925. type: "error"
  1926. });
  1927. return false;
  1928. }
  1929. let obj = {
  1930. command: data1.bottom_form.zhutuo,
  1931. num: Number(data1.bottom_form.doseNum1),
  1932. technologyType: data1.bottom_form.doseType1,
  1933. type: 2,
  1934. useexplain: data1.bottom_form.caozuo,
  1935. // preId: this.$route.query.recipeID ? this.$route.query.recipeID : "",
  1936. preId: data1.preId ? data1.pageId : "",
  1937. detail: []
  1938. };
  1939. data1.tableData4.forEach(item => {
  1940. if (item.name) {
  1941. let obj1 = {
  1942. pointid: item.acuid,
  1943. pointname: item.acuname,
  1944. price: data1.bottom_form.doseType,
  1945. seqn: item.id,
  1946. preDetailId: this.getEditPreNo(),
  1947. };
  1948. obj.detail.push(obj1);
  1949. }
  1950. });
  1951. if (data1.isMyMade) {
  1952. this.addRecipeFrom("3");
  1953. }
  1954. // if ((data1.isPay || data1.prescribed == 1) && isAutoCheck == 0) {
  1955. // return {};
  1956. // }
  1957. // && isAutoCheck == 1
  1958. if (data1.paystate == 1) {
  1959. return {};
  1960. }
  1961. return obj;
  1962. },
  1963. // 获取数据 赋值给 中药处方
  1964. assignRecipe1(data, loading) {
  1965. setTimeout(() => {
  1966. let children = this.$children.filter(item => {
  1967. return (
  1968. item.name == "中药处方" ||
  1969. item.name == "中药制剂" ||
  1970. item.name == "适宜技术处方"
  1971. );
  1972. });
  1973. let data1 = children[0];
  1974. let isAutoCheck = data1.isAutoCheck;
  1975. let arr = [];
  1976. data.forEach((item, index) => {
  1977. let objAssaign = {};
  1978. // let medAdressData = this.$refs.medAdress;
  1979. let obj = {
  1980. name: "处方1",
  1981. pharmacyID: "", // 药房id
  1982. totalTableD: [],
  1983. tableData: [
  1984. {
  1985. id: 1
  1986. }
  1987. ],
  1988. radio: "1",
  1989. tableData1: [],
  1990. bottom_form: {
  1991. doseNum: "",
  1992. doseType: "",
  1993. doseTypeList: [],
  1994. usegeList: [],
  1995. usege: "",
  1996. num: "",
  1997. numList: [], // 频次后台数据
  1998. daijian: "",
  1999. nongjian: "",
  2000. time: "",
  2001. timeList: [], // 服药时间后台数据
  2002. caozuo: "",
  2003. zhutuo: "",
  2004. radio: item.isdelivery,
  2005. daijian: "1",
  2006. provinceList: [],
  2007. cityList: [],
  2008. areaList: [],
  2009. province: "",
  2010. city: "",
  2011. area: "",
  2012. address: "",
  2013. phone: "",
  2014. doseType1: "",
  2015. doseNum1: "",
  2016. savename: "",
  2017. nowRecipeMoney: 0, //单剂金额
  2018. nowRecipeMoney1: 0, //当前处方金额
  2019. allMoney: 0, // 合计金额
  2020. moneyMsg: {} // 价格数据
  2021. },
  2022. prescribed: 0, //是否开方 0 否 1 是,
  2023. paystate: 0,
  2024. preId: null
  2025. };
  2026. // if (
  2027. // index == data.length - 1 &&
  2028. // item.prescribed == 1 &&
  2029. // isAutoCheck == 0
  2030. // ) {
  2031. // objAssaign = JSON.parse(JSON.stringify(obj));
  2032. // }
  2033. // && isAutoCheck == 1
  2034. if (index == data.length - 1 && item.paystate == 1) {
  2035. objAssaign = JSON.parse(JSON.stringify(obj));
  2036. }
  2037. if (this.$route.query.type == "edit") {
  2038. } else {
  2039. }
  2040. obj.preId = item.preId ? item.preId : "";
  2041. obj.name = "处方" + (index + 1);
  2042. obj.radio = item.pharmacyid + "@" + item.drugtype;
  2043. obj.pharmacyID = item.pharmacyid;
  2044. obj.bottom_form.doseNum = item.num;
  2045. obj.bottom_form.doseType = item.dosageForm;
  2046. obj.bottom_form.usege = item.usestr;
  2047. obj.bottom_form.nongjian = item.strongFried;
  2048. obj.bottom_form.num = item.frequency;
  2049. obj.bottom_form.caozuo = item.useexplain;
  2050. obj.bottom_form.zhutuo = item.command;
  2051. if (!!this.getEditPreNo()) {
  2052. if (item.revierwstate == 1 && isAutoCheck == 0) {
  2053. obj.prescribed = 0;
  2054. } else {
  2055. obj.prescribed = item.prescribed;
  2056. }
  2057. obj.paystate = item.paystate;
  2058. // if (isAutoCheck == 1) {
  2059. // }
  2060. obj.bottom_form.radio = Number(item.isdelivery);
  2061. obj.bottom_form.savename = item.consigneeName;
  2062. obj.bottom_form.phone = item.consigneePhone;
  2063. obj.bottom_form.address = item.address;
  2064. obj.bottom_form.province = item.province;
  2065. obj.bottom_form.city = item.city;
  2066. obj.bottom_form.area = item.district;
  2067. if (obj.paystate == 1) {
  2068. obj.bottom_form.disable = true;
  2069. obj.disable = true;
  2070. }
  2071. } else {
  2072. obj.prescribed = item.prescribed;
  2073. obj.paystate = item.paystate;
  2074. if (obj.paystate == 1) {
  2075. obj.bottom_form.disable = true;
  2076. obj.disable = true;
  2077. }
  2078. }
  2079. obj.bottom_form.moneyMsg = {
  2080. deliveryPrice: item.deliveryfree,
  2081. specialDeploymentPrice: item.deploymentfree,
  2082. agencyPrice: item.friedfree,
  2083. systemOfCreamPrice: item.markfree
  2084. };
  2085. //
  2086. obj.bottom_form.daijian = item.agency;
  2087. obj.bottom_form.isDaiJian = Number(item.agency);
  2088. // medAdressData.isDaiJian = Number(item.agency);
  2089. obj.bottom_form.nowRecipeMoney = item.price;
  2090. obj.bottom_form.nowRecipeMoney1 = item.thisRecipePrice;
  2091. obj.bottom_form.allMoney = item.allprice;
  2092. obj.bottom_form.time = item.eatMedicineTime;
  2093. // data1.getProver()
  2094. obj.bottom_form.provinceList = data1.provinceList1;
  2095. if (item.isdelivery == "0") {
  2096. data1.recipe_tabs_c = index;
  2097. data1.getArea(item.province, 1);
  2098. data1.getArea(item.city, 2);
  2099. }
  2100. setTimeout(() => {
  2101. data1.recipeChange(index);
  2102. }, 500);
  2103. item.zhongdetail.forEach((item1, index1) => {
  2104. let obj1 = {
  2105. drugList: [],
  2106. page: 1,
  2107. loadMore: true,
  2108. usageList: [],
  2109. id: item1.seqn,
  2110. name: item1.drugName,
  2111. spec: item1.specification, // 规格
  2112. dose: item1.dose, // 剂量
  2113. unit: item1.unit, // 单位
  2114. // usage: item.usagestr, // 用法
  2115. usage: item1.usagestr,
  2116. price: item1.unitprice,
  2117. total: item1.allprice,
  2118. inventory: item1.instock, // 库存
  2119. key: "",
  2120. search_i: index1,
  2121. medid: item1.drugid, // 药品id
  2122. originname: item1.origin // 产地名称
  2123. };
  2124. obj.totalTableD.push(obj1);
  2125. data1.getSelectType("中药药品用法", index1);
  2126. });
  2127. obj.totalTableD.push({
  2128. drugList: [],
  2129. page: 1,
  2130. loadMore: true,
  2131. usageList: [],
  2132. showSearch: false,
  2133. search_i: 0,
  2134. id: Number(item.zhongdetail[item.zhongdetail.length - 1].seqn) + 1
  2135. });
  2136. obj.totalTableD.filter((item3, index3) => {
  2137. this.rationalMed = [];
  2138. this.resetRationalMed();
  2139. this.getRationalMed(item3.medid);
  2140. return (item3.id = index3 + 1);
  2141. });
  2142. obj.tableData = obj.totalTableD.filter(item2 => {
  2143. return Number(item2.id) % 2 != 0;
  2144. });
  2145. obj.tableData1 = obj.totalTableD.filter(item2 => {
  2146. return Number(item2.id) % 2 == 0;
  2147. });
  2148. arr.push(obj);
  2149. // if (
  2150. // index == data.length - 1 &&
  2151. // item.prescribed == 1 &&
  2152. // isAutoCheck == 0
  2153. // ) {
  2154. // // arr.push(objAssaign)
  2155. // setTimeout(() => {
  2156. // data1.addRecipeTba(arr.length - 1);
  2157. // }, 500);
  2158. // }
  2159. // && isAutoCheck == 1
  2160. if (index == data.length - 1 && item.paystate == 1) {
  2161. // arr.push(objAssaign)
  2162. setTimeout(() => {
  2163. data1.addRecipeTba(arr.length - 1);
  2164. }, 500);
  2165. }
  2166. });
  2167. data1.recipe_tabs_c = arr.length - 1;
  2168. data1.recipe_tabs = arr;
  2169. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.radio =
  2170. arr[arr.length - 1].bottom_form.radio;
  2171. data1.changePharmacy(
  2172. arr[arr.length - 1].radio,
  2173. arr[arr.length - 1].radio
  2174. );
  2175. data1.$forceUpdate();
  2176. loading.close();
  2177. }, 1000);
  2178. },
  2179. // 获取数据 赋值给 中成药处方
  2180. assignRecipe2(data, loading) {
  2181. setTimeout(() => {
  2182. let children = this.$children.filter(item => {
  2183. return (
  2184. item.name == "中药处方" ||
  2185. item.name == "中药制剂" ||
  2186. item.name == "适宜技术处方"
  2187. );
  2188. });
  2189. let data1 = children[1];
  2190. let isAutoCheck = data1.isAutoCheck;
  2191. data1.bottom_form.zhutuo = data.command;
  2192. data1.preId = data.preId ? data.preId : "";
  2193. if (!!this.getEditPreNo()) {
  2194. data1.bottom_form.radio = Number(data.isdelivery);
  2195. data1.bottom_form.savename = data.consigneeName;
  2196. data1.bottom_form.phone = data.consigneePhone;
  2197. data1.bottom_form.address = data.address;
  2198. data1.province = data.province;
  2199. data1.city = data.city;
  2200. data1.area = data.district;
  2201. if (data.revierwstate == 1) {
  2202. data1.prescribed = 0; // 是否已开方 0否 1是
  2203. data1.paystate = 0;
  2204. } else {
  2205. data1.prescribed = data.prescribed; // 是否已开方 0否 1是
  2206. data1.paystate = data.paystate;
  2207. }
  2208. } else {
  2209. data1.prescribed = data.prescribed; // 是否已开方 0否 1是
  2210. data1.paystate = data.paystate;
  2211. }
  2212. data1.bottom_form.zhutuo = data.command;
  2213. if (data.province) {
  2214. data1.getArea(data.province, 1);
  2215. }
  2216. if (data.city) {
  2217. data1.getArea(data.city, 2);
  2218. }
  2219. data1.nowRecipeMoney = data.thisRecipePrice;
  2220. data1.allMoney = data.allprice;
  2221. let arr = [];
  2222. data.chengDetail.forEach((item, index) => {
  2223. let obj = {
  2224. id: item.seqn,
  2225. drugList: [],
  2226. search_i: "",
  2227. page: 1,
  2228. loadMore: true,
  2229. usageList: [],
  2230. numList: [],
  2231. timeList: [],
  2232. name: item.drugName,
  2233. spec: item.specification, // 规格
  2234. dose: item.dose, // 剂量
  2235. unit: item.unit, // 单位
  2236. usage: item.usagestr, // 用法
  2237. nums: item.frequency, //频次
  2238. timesQuan: item.secondDose, // 次用量,
  2239. timesUnit: item.zxdw,
  2240. time: item.medicationtime, // 服药时间
  2241. doseUnit: item.bzdw,
  2242. from: item.origin, // 产地
  2243. price: item.price,
  2244. total: item.allprice,
  2245. inventory: item.instock, // 库存
  2246. key: "",
  2247. medid: item.drugid
  2248. };
  2249. data1.getSelectType("中药制剂药品用法", index);
  2250. data1.getSelectType("中药制剂服药时间", index);
  2251. data1.getSelectType("中药制剂频次", index);
  2252. arr.push(obj);
  2253. });
  2254. arr.push({
  2255. key: "",
  2256. page: 1,
  2257. drugList: [],
  2258. usageList: [],
  2259. numList: [],
  2260. timeList: [],
  2261. loadMore: true
  2262. });
  2263. data1.tableData3 = arr;
  2264. data1.tableData3.filter((item, index) => {
  2265. return (item.id = index + 1);
  2266. });
  2267. this.$forceUpdate();
  2268. loading.close();
  2269. }, 1000);
  2270. },
  2271. // 获取数据 赋值给 适宜技术处方
  2272. assignRecipe3(data, loading) {
  2273. setTimeout(() => {
  2274. let children = this.$children.filter(item => {
  2275. return (
  2276. item.name == "中药处方" ||
  2277. item.name == "中药制剂" ||
  2278. item.name == "适宜技术处方"
  2279. );
  2280. });
  2281. let data1 = children[2];
  2282. let isAutoCheck = data1.isAutoCheck;
  2283. data1.preId = data.preId ? data.preId : "";
  2284. data1.bottom_form.doseNum1 = data.num;
  2285. data1.bottom_form.doseType1 = data.technologyType;
  2286. data1.bottom_form.zhutuo = data.command;
  2287. data1.bottom_form.caozuo = data.useexplain;
  2288. data1.allMoney = data.allprice;
  2289. data1.nowMoney = data.thisRecipePrice;
  2290. if (!!this.getEditPreNo()) {
  2291. if (data.revierwstate == 1) {
  2292. data1.prescribed = 0; // 是否已开方 0否 1是
  2293. data1.paystate = 0;
  2294. } else {
  2295. data1.prescribed = data.prescribed; // 是否已开方 0否 1是
  2296. data1.paystate = data.paystate;
  2297. }
  2298. } else {
  2299. data1.prescribed = data.prescribed; // 是否已开方 0否 1是
  2300. data1.paystate = data.paystate;
  2301. }
  2302. let arr = [];
  2303. data.detail.forEach((item, index) => {
  2304. let obj = {
  2305. id: item.sqen,
  2306. name: item.pointname,
  2307. acuname: item.pointname,
  2308. acuid: item.pointid
  2309. };
  2310. arr.push(obj);
  2311. });
  2312. arr.filter((item, index) => {
  2313. return (item.id = index + 1);
  2314. });
  2315. data1.tableData4 = arr;
  2316. loading.close();
  2317. }, 1000);
  2318. },
  2319. // 协定方数据转方 赋值给中药处方
  2320. agreeAssignToTCM(data, loading, request = true) {
  2321. let children = this.$children.filter(item => {
  2322. return (
  2323. item.name == "中药处方" ||
  2324. item.name == "中药制剂" ||
  2325. item.name == "适宜技术处方"
  2326. );
  2327. });
  2328. let data1 = children[0];
  2329. console.log(data1, "打印data1");
  2330. data1.recipe_tabs[data1.recipe_tabs_c].disable = false;
  2331. if (data.isupdate && data.isupdate === "1") {
  2332. // 专家经验 不允许 修改
  2333. data1.recipe_tabs[data1.recipe_tabs_c].disable = true;
  2334. sessionStorage.setItem("isupdateExpre", "1");
  2335. }
  2336. if (data.type && data.type === "1") {
  2337. // 协定方 不允许 修改
  2338. data1.recipe_tabs[data1.recipe_tabs_c].disable = true;
  2339. sessionStorage.setItem("isupdateExpre", "1");
  2340. }
  2341. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
  2342. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.disable =
  2343. data.type == "1";
  2344. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
  2345. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.doseType =
  2346. data.curetype;
  2347. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.nongjian =
  2348. data.density;
  2349. data1.recipe_tabs[
  2350. data1.recipe_tabs_c
  2351. ].bottom_form.specialDeploymentPrice = data.deploymentfree;
  2352. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.num = data.frequency;
  2353. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.time =
  2354. data.medicationtime;
  2355. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.agencyPrice =
  2356. data.fryingfee;
  2357. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.systemOfCreamPrice =
  2358. data.markfree;
  2359. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.radio =
  2360. data.prescriptiontype;
  2361. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.usege = data.usrage;
  2362. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = [];
  2363. if (!request) return;
  2364. // 赋值给表格
  2365. data.preStiDetails.forEach((item, index) => {
  2366. let obj1 = {
  2367. drugList: [],
  2368. page: 1,
  2369. loadMore: true,
  2370. usageList: [],
  2371. id: item.seqn,
  2372. name: item.ypmc || item.drugname,
  2373. spec: item.gg || item.specification, // 规格
  2374. dose: item.dose, // 剂量
  2375. unit: item.dw || item.unit, // 单位
  2376. usage: item.usagestr, // 用法
  2377. // usage: "",
  2378. // price: item.lsjg,
  2379. price: item.price ? item.price : 0,
  2380. total: item.price ? item.price * item.dose : 0,
  2381. inventory: item.kc, // 库存
  2382. key: "",
  2383. search_i: index,
  2384. medid: item.ypmc ? item.pid || item.matid : drugid, // 药品id
  2385. originname: item.cdmc, // 产地名称
  2386. showSearch: false
  2387. };
  2388. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push(obj1);
  2389. data1.getSelectType("中药药品用法", index);
  2390. });
  2391. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push({
  2392. drugList: [],
  2393. page: 1,
  2394. loadMore: true,
  2395. usageList: [],
  2396. showSearch: false,
  2397. search_i: 0,
  2398. key: "",
  2399. id: 1
  2400. });
  2401. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.filter(
  2402. (item3, index3) => {
  2403. this.rationalMed = [];
  2404. this.resetRationalMed();
  2405. this.getRationalMed(item3.medid);
  2406. return (item3.id = index3 + 1);
  2407. }
  2408. );
  2409. data1.recipe_tabs[data1.recipe_tabs_c].tableData = data1.recipe_tabs[
  2410. data1.recipe_tabs_c
  2411. ].totalTableD.filter(item2 => {
  2412. return Number(item2.id) % 2 != 0;
  2413. });
  2414. data1.recipe_tabs[data1.recipe_tabs_c].tableData1 = data1.recipe_tabs[
  2415. data1.recipe_tabs_c
  2416. ].totalTableD.filter(item2 => {
  2417. return Number(item2.id) % 2 == 0;
  2418. });
  2419. this.showAgree = false;
  2420. this.showExpr = false;
  2421. this.showPresc = false;
  2422. this.showUnifyPresc = false;
  2423. data1.getPharmacyID();
  2424. data1.changePharmacy();
  2425. },
  2426. // 存为协定方后打开处方
  2427. openRecipeAfterAgree() {
  2428. let zhongPrescriptionVo = this.zhongPrescriptionVo;
  2429. let chengPrescriptionVo = this.chengPrescriptionVo;
  2430. let technologyPrescriptionVo = this.technologyPrescriptionVo;
  2431. this._getRecipePriview(
  2432. zhongPrescriptionVo,
  2433. chengPrescriptionVo,
  2434. technologyPrescriptionVo
  2435. );
  2436. },
  2437. // 提交中药处方
  2438. async submitRecipe1() {
  2439. let zhongPrescriptionVo = this.dealRecipe1();
  2440. if (!zhongPrescriptionVo.length) return;
  2441. this.saving = true;
  2442. try {
  2443. const {options, force} = await this.getRationalSafeUse();
  2444. if (options.length) {
  2445. const child = this.$children.find(item => item.name === "中药处方");
  2446. const results = await Promise.all(child.recipe_tabs.map((_, index) => this.getRationalMed2(index)));
  2447. const tips = results.map((item, index) => {
  2448. const value = options.map(i => item[i] ? `<div class="title">${item[i].title}</div><div class="content">${item[i].collection.join('')}</div>` : '').join('');
  2449. return value ? `<div style="padding-top: ${index ? 12 : 0}px;border-bottom: 1px dashed #dcdcdc;"><h2 style="margin-bottom: 16px;">${item.title}</h2>${value}</div>` : '';
  2450. }).join('');
  2451. if (tips) {
  2452. if (!force) {
  2453. this.$message({
  2454. dangerouslyUseHTMLString: true,
  2455. customClass: 'message-rational-safe-use-wrapper',
  2456. message: tips,
  2457. duration: 1000 * 3,
  2458. showClose: true,
  2459. })
  2460. } else if (await this.$confirm(tips, '温馨提示:是否保存处方?', {
  2461. confirmButtonText: '保存',
  2462. cancelButtonText: '取消',
  2463. dangerouslyUseHTMLString: true,
  2464. customClass: 'message-rational-safe-use-wrapper',
  2465. }).then(() => /* 继续 */ false, () => /* 取消 */ true)) return;
  2466. }
  2467. }
  2468. } catch (e) {}
  2469. this.saving = false;
  2470. let chengPrescriptionVo = {};
  2471. // setTimeout(() => {
  2472. // chengPrescriptionVo = this.dealRecipe2();
  2473. // }, 100);
  2474. let technologyPrescriptionVo = {};
  2475. // setTimeout(() => {
  2476. // technologyPrescriptionVo = this.dealRecipe3();
  2477. // }, 200);
  2478. setTimeout(() => {
  2479. /*if (technologyPrescriptionVo === false) {
  2480. technologyPrescriptionVo = {};
  2481. this.container_i = 2;
  2482. return;
  2483. }
  2484. if (chengPrescriptionVo === false) {
  2485. chengPrescriptionVo = {};
  2486. this.container_i = 1;
  2487. return;
  2488. }*/
  2489. if (zhongPrescriptionVo === false) {
  2490. zhongPrescriptionVo = [];
  2491. this.container_i = 0;
  2492. return;
  2493. }
  2494. if (Object.keys(zhongPrescriptionVo).length === 0) return;
  2495. /*if (
  2496. zhongPrescriptionVo.length == 0 &&
  2497. Object.keys(zhongPrescriptionVo).length == 0 &&
  2498. Object.keys(technologyPrescriptionVo).length == 0
  2499. )
  2500. return;*/
  2501. this.$refs.TCM.saveDiagnosisData();
  2502. this._getRecipePriview(
  2503. zhongPrescriptionVo,
  2504. chengPrescriptionVo,
  2505. technologyPrescriptionVo
  2506. );
  2507. // if (this.isShowDj || this.isShowPs) {
  2508. // this.showAddress = true;
  2509. // } else {
  2510. // this._getRecipePriview(
  2511. // zhongPrescriptionVo,
  2512. // chengPrescriptionVo,
  2513. // technologyPrescriptionVo
  2514. // );
  2515. // }
  2516. // if (zhongPrescriptionVo && zhongPrescriptionVo.length > 0) {
  2517. // // 有中药处方 打开是否存为协定方界面
  2518. // this.$confirm("是否存为协定方?", "温馨提示", {
  2519. // confirmButtonText: "是",
  2520. // cancelButtonText: "否",
  2521. // type: "warning"
  2522. // })
  2523. // .then(() => {
  2524. // this.zhongPrescriptionVo = zhongPrescriptionVo;
  2525. // this.chengPrescriptionVo = chengPrescriptionVo;
  2526. // this.technologyPrescriptionVo = technologyPrescriptionVo;
  2527. // this.$refs.chineseM.saveToMine("reserve");
  2528. // })
  2529. // .catch(() => {
  2530. // this._getRecipePriview(
  2531. // zhongPrescriptionVo,
  2532. // chengPrescriptionVo,
  2533. // technologyPrescriptionVo
  2534. // );
  2535. // });
  2536. // } else {
  2537. // }
  2538. }, 500);
  2539. },
  2540. // 修改推荐方剂轮播图下标
  2541. changeRbanner(type) {
  2542. if (type == "add") {
  2543. if (this.r_current == 3) {
  2544. this.r_current = 0;
  2545. } else {
  2546. this.r_current += 1;
  2547. }
  2548. this.$refs.r_banner.setActiveItem(this.r_current);
  2549. } else if (type == "reduce") {
  2550. if (this.r_current == 0) {
  2551. this.r_current = 3;
  2552. } else {
  2553. this.r_current -= 1;
  2554. }
  2555. this.$refs.r_banner.setActiveItem(this.r_current);
  2556. }
  2557. },
  2558. // 修改协定方 tab
  2559. changeAgree(type) {
  2560. this.agree_current = type;
  2561. if (type == 0) {
  2562. // this.activeNames = '0'
  2563. this.collapseData[this.activeNames].page = 1;
  2564. this.collapseData[this.activeNames].loadMore = true;
  2565. this.collapseData[this.activeNames].list = [];
  2566. this.getAgreeRecipe(this.collapseData[this.activeNames].loadMore);
  2567. } else if (type == 1) {
  2568. this.getPrescriptionsList();
  2569. } else if (type == 2) {
  2570. this.getDoctorCaseL();
  2571. }
  2572. },
  2573. // 查看药品信息
  2574. findDrug(scope) {
  2575. console.log(scope, "药品信息");
  2576. // this.showDrug = true
  2577. if (scope.row.color == "red") {
  2578. this.getMedDetail(scope.row.medid);
  2579. } else {
  2580. this.getDrugDetail(scope.row.medid);
  2581. }
  2582. },
  2583. // 查看穴位信息
  2584. find(scope) {
  2585. this.getAcupointD(scope.row.acuid);
  2586. },
  2587. // 顶部tab 改变
  2588. changeContainer(type) {
  2589. this.container_i = type;
  2590. if (type == 1) return;
  2591. // if (this.contentTabs[type].color == 'red') {
  2592. this.inferRecipe(3);
  2593. // }
  2594. // if (type == 2) {
  2595. // if (!this.isTuiDaoSuit) {
  2596. // this.isTuiDaoSuit = true
  2597. // this.inferRecipe()
  2598. // }
  2599. // }
  2600. // if (type == 0) {
  2601. // if (!this.isTuiDaoZy) {
  2602. // this.isTuiDaoZy = true
  2603. // this.inferRecipe()
  2604. // }
  2605. // }
  2606. },
  2607. checked(item1) {
  2608. this.contentTabs.forEach(item => {
  2609. if (item.name == item1.name) {
  2610. item.check = !item.check;
  2611. }
  2612. });
  2613. let type = this.container_i;
  2614. setTimeout(() => {
  2615. if (type == 0) {
  2616. let arr = this.$refs.chineseM.recipe_tabs;
  2617. let allmoney = 0;
  2618. arr.forEach(item => {
  2619. allmoney += item.bottom_form.allMoney;
  2620. });
  2621. this.chineseM.allMoney = allmoney;
  2622. } else if (type == 1) {
  2623. console.log(this.$refs.medicineC.allMoney);
  2624. this.medicineC.allMoney = this.$refs.medicineC.allMoney;
  2625. } else if (type == 2) {
  2626. this.suitScience.allMoney = this.$refs.suitScience.allMoney;
  2627. }
  2628. }, 500);
  2629. },
  2630. // 名家验案转方
  2631. turnRecipe(item) {
  2632. this.setDrugsInfo(item.verpreitemlist);
  2633. this.changeAndJoin();
  2634. this.addRecipeFrom("5");
  2635. },
  2636. // 就诊记录转方
  2637. turnRecipe1(item) {
  2638. // 病历转方
  2639. this.addRecipeFrom("6");
  2640. this.getRecipeDataByid(item.pid);
  2641. this.showRecord = false;
  2642. this.showAgree = false;
  2643. },
  2644. transposition(recipe) {
  2645. const is = recipe.medicine.every(m => m.matid);
  2646. if (is) {
  2647. // 调用 方剂 换方
  2648. const medicine = recipe.medicine.map((m, i) => {
  2649. return {
  2650. matid: m.matid,
  2651. matname: m.ypmc,
  2652. dose: m.dose,
  2653. unit: m.dw || m.zxdw || m.bzdw,
  2654. useage: m.usagestr,
  2655. seqn: i + 1,
  2656. }
  2657. });
  2658. if (recipe.__RecipeFrom__ === '2') this.agreeAssignToTCM(recipe, void 0, true);
  2659. this.setDrugsInfo(medicine);
  2660. this.changeAndJoin(1);
  2661. } else if (recipe.__RecipeFrom__ === '2') {
  2662. this.agreeInfo = recipe;
  2663. this.changeBasisPre(this.agreeInfo.pid);
  2664. }
  2665. if (recipe.__RecipeFrom__) this.addRecipeFrom(recipe.__RecipeFrom__ /* 2 协定方*/);
  2666. },
  2667. /**
  2668. * 协定方转方
  2669. * @deprecated
  2670. */
  2671. turnRecipe2() {
  2672. this.addRecipeFrom("2");
  2673. this.changeBasisPre(this.agreeInfo.pid);
  2674. // this.showAgree = false
  2675. },
  2676. // 专家经验合方
  2677. joinRecipe3(info) {
  2678. let children = this.$children.filter(item => {
  2679. return (
  2680. item.name == "中药处方" ||
  2681. item.name == "中药制剂" ||
  2682. item.name == "适宜技术处方"
  2683. );
  2684. });
  2685. let data1 = children[0];
  2686. let data = info;
  2687. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
  2688. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.disable =
  2689. data.type == "1";
  2690. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
  2691. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.doseType =
  2692. data.curetype;
  2693. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.nongjian =
  2694. data.density;
  2695. data1.recipe_tabs[
  2696. data1.recipe_tabs_c
  2697. ].bottom_form.specialDeploymentPrice = data.deploymentfree;
  2698. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.num = data.frequency;
  2699. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.time =
  2700. data.medicationtime;
  2701. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.agencyPrice =
  2702. data.fryingfee;
  2703. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.systemOfCreamPrice =
  2704. data.markfree;
  2705. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.radio =
  2706. data.prescriptiontype;
  2707. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.usege = data.usrage;
  2708. if (data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.length == 1) {
  2709. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = [];
  2710. } else {
  2711. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.pop();
  2712. }
  2713. if (info.isupdate == "1") {
  2714. this.turnRecipe3(info);
  2715. return;
  2716. }
  2717. // 赋值给表格
  2718. data.preStiDetails.forEach((item, index) => {
  2719. let obj1 = {
  2720. drugList: [],
  2721. page: 1,
  2722. loadMore: true,
  2723. usageList: [],
  2724. id: item.seqn,
  2725. name: item.ypmc || item.drugname,
  2726. spec: item.gg || item.specification, // 规格
  2727. dose: item.dose, // 剂量
  2728. unit: item.dw || item.unit, // 单位
  2729. // usage: item.usagestr, // 用法
  2730. usage: "",
  2731. // usage: item.yf,
  2732. // price: item.lsjg,
  2733. price: item.price ? item.price : 0,
  2734. total: item.price ? item.price * item.dose : 0,
  2735. inventory: item.kc, // 库存
  2736. key: "",
  2737. search_i: index,
  2738. medid: item.ypmc ? item.pid : drugid, // 药品id
  2739. originname: item.cdmc, // 产地名称
  2740. showSearch: false
  2741. };
  2742. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push(obj1);
  2743. data1.getSelectType("中药药品用法", index);
  2744. });
  2745. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push({
  2746. drugList: [],
  2747. page: 1,
  2748. loadMore: true,
  2749. usageList: [],
  2750. showSearch: false,
  2751. search_i: 0,
  2752. key: "",
  2753. id: 1
  2754. });
  2755. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.filter(
  2756. (item3, index3) => {
  2757. this.rationalMed = [];
  2758. this.resetRationalMed();
  2759. this.getRationalMed(item3.medid);
  2760. return (item3.id = index3 + 1);
  2761. }
  2762. );
  2763. data1.recipe_tabs[data1.recipe_tabs_c].tableData = data1.recipe_tabs[
  2764. data1.recipe_tabs_c
  2765. ].totalTableD.filter(item2 => {
  2766. return Number(item2.id) % 2 != 0;
  2767. });
  2768. data1.recipe_tabs[data1.recipe_tabs_c].tableData1 = data1.recipe_tabs[
  2769. data1.recipe_tabs_c
  2770. ].totalTableD.filter(item2 => {
  2771. return Number(item2.id) % 2 == 0;
  2772. });
  2773. this.showAgree = false;
  2774. this.showExpr = false;
  2775. data1.getPharmacyID();
  2776. },
  2777. //专家经验转方
  2778. turnRecipe3(info) {
  2779. this.changeExpre(info);
  2780. },
  2781. // 适宜技术处方 专方 和方
  2782. suitChnageOrJoin(type = "") {
  2783. // type = '' 专访 type == 1 和方
  2784. if (this.container_i == 1) return;
  2785. const loading = this.$loading({
  2786. lock: true,
  2787. text: "正在处理数据,请稍后",
  2788. spinner: "el-icon-loading",
  2789. background: "rgba(0, 0, 0, 0.7)"
  2790. });
  2791. let children = this.$children.filter(item => {
  2792. return (
  2793. item.name == "中药处方" ||
  2794. item.name == "中药制剂" ||
  2795. item.name == "适宜技术处方"
  2796. );
  2797. });
  2798. let child = children[2];
  2799. let drugs = this.getDrugInfo;
  2800. if (type == "") {
  2801. // 转方
  2802. child.tableData4 = [];
  2803. drugs.forEach((item, index) => {
  2804. let obj = {
  2805. id: index + 1,
  2806. name: item.acuname,
  2807. acuname: item.acuname,
  2808. acuid: item.acuid
  2809. };
  2810. // 锚点
  2811. child.bottom_form.caozuo +=
  2812. obj.acuname + ":" + item.acuoperation + " ";
  2813. child.tableData4.push(obj);
  2814. });
  2815. child.tableData4.push({
  2816. id: "",
  2817. name: "",
  2818. acuname: "",
  2819. acuid: ""
  2820. });
  2821. child.tableData4.filter((item, index) => {
  2822. return (item.id = index + 1);
  2823. });
  2824. } else if (type == 1) {
  2825. child.tableData4.pop();
  2826. drugs.forEach((item, index) => {
  2827. let obj = {
  2828. id: index + 1,
  2829. name: item.acuname,
  2830. acuname: item.acuname,
  2831. acuid: item.acuid
  2832. };
  2833. child.tableData4.push(obj);
  2834. });
  2835. child.tableData4.push({
  2836. id: "",
  2837. name: "",
  2838. acuname: "",
  2839. acuid: ""
  2840. });
  2841. child.tableData4.filter((item, index) => {
  2842. return (item.id = index + 1);
  2843. });
  2844. }
  2845. this.showDialog = false;
  2846. loading.close();
  2847. },
  2848. // 换方 按钮 直接点击
  2849. inferChange(item, type = "", type1 = "") {
  2850. // type == 1 type1 == 1 不掉详情接口 直接转方 和方
  2851. this.addRecipeFrom("4", 2);
  2852. if (type == 1 && type1 == 1) {
  2853. this.setDrugsInfo(item.items);
  2854. this.suitChnageOrJoin();
  2855. return;
  2856. }
  2857. console.log(item, "item");
  2858. this.getPreDetal(item.preid || item.pried || item.acupreid);
  2859. },
  2860. // 和方按钮直接点击
  2861. inferChange1(item, type = "", type1 = "") {
  2862. let isupdateExpre = sessionStorage.getItem("isupdateExpre");
  2863. if (isupdateExpre == "1") {
  2864. this.$message("请先清空当前处方");
  2865. return;
  2866. }
  2867. this.addRecipeFrom("4", 2);
  2868. if (type == 1 && type1 == 1) {
  2869. this.setDrugsInfo(item.items);
  2870. this.suitChnageOrJoin(1);
  2871. return;
  2872. }
  2873. this.getPreDetal(item.preid || item.pried || item.acupreid, 2);
  2874. },
  2875. //方剂合方
  2876. joinRecipe() {
  2877. let isupdateExpre = sessionStorage.getItem("isupdateExpre");
  2878. if (isupdateExpre == "1") {
  2879. this.$message("请先清空当前处方");
  2880. return;
  2881. }
  2882. if (!this.preInfo.prename) {
  2883. this.addRecipeFrom("4", 2);
  2884. this.suitChnageOrJoin(1);
  2885. return;
  2886. }
  2887. this.addRecipeFrom("4");
  2888. this.setDrugsInfo(this.preInfo.items);
  2889. this.changeAndJoin(2);
  2890. },
  2891. // 方剂换方
  2892. changeRecipe(e) {
  2893. if (e == 1) {
  2894. this.showDialog = false;
  2895. // this.tjRecipeId = ''
  2896. return;
  2897. }
  2898. if (!this.preInfo.prename) {
  2899. this.addRecipeFrom("4", 2);
  2900. // 适宜技术处方
  2901. this.suitChnageOrJoin();
  2902. return;
  2903. }
  2904. this.addRecipeFrom("4");
  2905. this.setDrugsInfo(this.preInfo.items);
  2906. this.changeAndJoin(1);
  2907. },
  2908. // 药方是否支付
  2909. async _recipeIsPay(id, type, index) {
  2910. let res = await recipeIsPay({
  2911. preId: id,
  2912. visitId: JSON.parse(sessionStorage.getItem("patiensInfo")).pid
  2913. });
  2914. if (res.ResultCode == 0) {
  2915. // 跟据id 回显
  2916. let children = this.$children.filter(item => {
  2917. return (
  2918. item.name == "中药处方" ||
  2919. item.name == "中药制剂" ||
  2920. item.name == "适宜技术处方"
  2921. );
  2922. });
  2923. let data1 = children[0];
  2924. let data2 = children[1];
  2925. let data3 = children[2];
  2926. if (type == 1) {
  2927. // 根据处方id 回显
  2928. setTimeout(() => {
  2929. if (data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.length > 1) {
  2930. data1.recipe_tabs[data1.recipe_tabs_c].isPay = res.Data;
  2931. }
  2932. if (data2.tableData3.length > 1) {
  2933. data2.isPay = res.Data;
  2934. }
  2935. if (data3.tableData4.length > 1) {
  2936. data3.isPay = res.Data;
  2937. }
  2938. }, 1000);
  2939. }
  2940. if (type == 2) {
  2941. setTimeout(() => {
  2942. // 处方回显
  2943. if (index) {
  2944. data1.recipe_tabs[index].isPay = res.Data;
  2945. }
  2946. if (data2.tableData3.length > 1) {
  2947. data2.isPay = res.Data;
  2948. }
  2949. if (data3.tableData4.length > 1) {
  2950. data3.isPay = res.Data;
  2951. }
  2952. }, 1000);
  2953. }
  2954. }
  2955. },
  2956. // 获取穴位信息
  2957. async getAcupointD(id) {
  2958. let res = await getAcupointD({
  2959. acuid: id
  2960. });
  2961. if (res.code == 0) {
  2962. this.xwinfo = res.data;
  2963. this.showXuewei = true;
  2964. }
  2965. },
  2966. // 获取病人 左侧信息
  2967. async getPatiensBasisM() {
  2968. let res = await getPatiensBasisM({
  2969. patientId: this.getPatiensInfo.pid
  2970. // patientId: '4e9db43d-25aa-4683-9564-5120deac2c56'
  2971. });
  2972. if (res.ResultCode == 0) {
  2973. // res.Data.recordLength = res.Data.patientRecord.length;
  2974. // this.agree_key = res.Data.maindiagnosis ?
  2975. // res.Data.maindiagnosis.namemedicine ?
  2976. // res.Data.maindiagnosis.namemedicine :
  2977. // "" :
  2978. // "";
  2979. this.agree_key1 = res.Data.maindiagnosis
  2980. ? res.Data.maindiagnosis.namemedicine
  2981. ? res.Data.maindiagnosis.namemedicine
  2982. : ""
  2983. : "";
  2984. res.Data.secondarydiagnosis = res.Data.secondarydiagnosis
  2985. ? res.Data.secondarydiagnosis
  2986. : [];
  2987. this.patiensMsg = res.Data;
  2988. this.patiensMsg.outpatientElectronicmedicalrecord.image1 = formatPicture(this.patiensMsg.outpatientElectronicmedicalrecord.image1);
  2989. // if (!this.patiensMsg.maindiagnosis.disid) {
  2990. // this.$message.warning("请先提交一条诊断信息");
  2991. // this.$router.replace({
  2992. // path: "/index/diagnosis"
  2993. // });
  2994. // return;
  2995. // }
  2996. // if (this.patiensMsg.maindiagnosis.disid) {
  2997. // this.inferRecipe();
  2998. // }
  2999. }
  3000. },
  3001. async openTongueAndFaceAnalysis() {
  3002. if (!this.tongueAndFaceAnalysis) await this.getPatientBasisTongueAndFaceAnalysis()
  3003. if (this.tongueAndFaceAnalysis) this.showTongueAnalysis = true;
  3004. },
  3005. // 获取病人 舌面象数据
  3006. async getPatientBasisTongueAndFaceAnalysis() {
  3007. this.tongueAndFaceLoading = true;
  3008. try {
  3009. const get = getTongueAndFaceAnalysisRecords.bind(null, this.getPatiensInfo ? this.getPatiensInfo.pid : "")
  3010. let result = await get(1, 3);
  3011. this.tongueAndFaceAnalysis = result.total > 0 ? {...result, get} : null;
  3012. } catch (e) {
  3013. this.$message.error(e.ResultInfo);
  3014. }
  3015. this.tongueAndFaceLoading = false;
  3016. },
  3017. // 获取处方预览数据
  3018. async _getRecipePriview(zhongyao, zhongchengyao, technology) {
  3019. const loading = this.$loading({
  3020. lock: true,
  3021. text: "正在提交",
  3022. spinner: "el-icon-loading",
  3023. background: "rgba(0, 0, 0, 0.7)"
  3024. });
  3025. let params = {
  3026. recordid: this.getPatiensInfo.pid,
  3027. technology: technology,
  3028. zhongchengyao: zhongchengyao,
  3029. zhongyao: zhongyao
  3030. };
  3031. let res = await getRecipePriview(params).catch(err => {
  3032. loading.close();
  3033. });
  3034. if (res.ResultCode == 0) {
  3035. loading.close();
  3036. res.Data.tcmPrescriptionFormVos.forEach((item, index) => {
  3037. // if(item.)
  3038. item.isdelivery = zhongyao[index].isdelivery;
  3039. });
  3040. this.priviewData = res.Data;
  3041. sessionStorage.setItem(
  3042. "priviewRawData",
  3043. JSON.stringify({
  3044. zhongyao,
  3045. zhongchengyao,
  3046. technology
  3047. })
  3048. );
  3049. this.showPriview = true;
  3050. }
  3051. },
  3052. // 获取处方回显数据
  3053. async getRecipeShowData() {
  3054. const loading = this.$loading({
  3055. lock: true,
  3056. text: "正在加载数据",
  3057. spinner: "el-icon-loading",
  3058. background: "rgba(0, 0, 0, 0.7)"
  3059. });
  3060. let res = await getRecipeShowData(this.getPatiensInfo.pid).catch(err => {
  3061. loading.close();
  3062. });
  3063. if (res.ResultCode == 0) {
  3064. if (!res.Data.flag) {
  3065. loading.close();
  3066. if (this.getPatiensInfo.pid) {
  3067. await this.getPatiensBasisM();
  3068. }
  3069. return;
  3070. }
  3071. this.contentTabs[0].check = res.Data.zhongyao.length > 0;
  3072. this.contentTabs[1].check = res.Data.zhongchengyao.chengDetail !== null;
  3073. this.contentTabs[2].check = res.Data.technology.detail !== null;
  3074. this.container_i = this.contentTabs[0].check
  3075. ? 0
  3076. : this.contentTabs[1].check
  3077. ? 1
  3078. : this.contentTabs[2].check
  3079. ? 2
  3080. : 0;
  3081. this.chineseM.allMoney = res.Data.zhonyaoPrice;
  3082. this.medicineC.allMoney = res.Data.zhonchengPrice;
  3083. this.suitScience.allMoney = res.Data.technologyPrice;
  3084. if (this.contentTabs[0].check) {
  3085. this.assignRecipe1(res.Data.zhongyao, loading);
  3086. res.Data.zhongyao.forEach((item, index) => {
  3087. this._recipeIsPay(item.preId, 2, index);
  3088. });
  3089. this.container_i = 0;
  3090. }
  3091. if (this.contentTabs[1].check) {
  3092. this.assignRecipe2(res.Data.zhongchengyao, loading);
  3093. this._recipeIsPay(res.Data.zhongchengyao.preId, 2);
  3094. this.container_i = 1;
  3095. }
  3096. if (this.contentTabs[2].check) {
  3097. this.assignRecipe3(res.Data.technology, loading);
  3098. this._recipeIsPay(res.Data.technology.preId, 2);
  3099. this.container_i = 2;
  3100. }
  3101. if (this.getPatiensInfo.pid) {
  3102. this.getPatiensBasisM();
  3103. }
  3104. }
  3105. },
  3106. // 跟据id 获取处方回显数据
  3107. async getRecipeDataByid(id) {
  3108. let params = {
  3109. pid: id
  3110. };
  3111. const loading = this.$loading({
  3112. lock: true,
  3113. text: "正在处理转方数据",
  3114. spinner: "el-icon-loading",
  3115. background: "rgba(0, 0, 0, 0.7)"
  3116. });
  3117. let res = await getRecipeDataByid(params).catch(err => {
  3118. loading.close();
  3119. });
  3120. if (res.ResultCode == 0) {
  3121. if (res.Data.type == 0) {
  3122. res.Data.zhongdetail = res.Data.detail;
  3123. let arr = [];
  3124. arr.push(res.Data);
  3125. this.container_i = 0;
  3126. this.contentTabs[0].check = true;
  3127. this.contentTabs[1].check = false;
  3128. this.contentTabs[2].check = false;
  3129. this.assignRecipe1(arr, loading);
  3130. } else if (res.Data.type == 1) {
  3131. res.Data.chengDetail = res.Data.detail;
  3132. this.container_i = 1;
  3133. this.contentTabs[0].check = false;
  3134. this.contentTabs[1].check = true;
  3135. this.contentTabs[2].check = false;
  3136. this.assignRecipe2(res.Data, loading);
  3137. } else if (res.Data.type == 2) {
  3138. this.container_i = 2;
  3139. this.contentTabs[0].check = false;
  3140. this.contentTabs[1].check = false;
  3141. this.contentTabs[2].check = true;
  3142. this.assignRecipe3(res.Data, loading);
  3143. }
  3144. await this._recipeIsPay(id, 1);
  3145. }
  3146. },
  3147. //获取右侧协定方列表
  3148. async getAgreeRecipe(load = true) {
  3149. if (!load) return;
  3150. let params = {
  3151. type: this.activeNames,
  3152. pageId: this.collapseData[this.activeNames].page,
  3153. pageSize: 10
  3154. };
  3155. let res = await getAgreeRecipe(params);
  3156. if (res.ResultCode == 0) {
  3157. if (
  3158. this.collapseData[this.activeNames].list.length <=
  3159. res.Data.TotalRecordCount
  3160. ) {
  3161. this.collapseData[this.activeNames].list = [
  3162. ...this.collapseData[this.activeNames].list,
  3163. ...res.Data.Items
  3164. ];
  3165. if (
  3166. this.collapseData[this.activeNames].list.length >=
  3167. res.Data.TotalRecordCount
  3168. ) {
  3169. this.collapseData[this.activeNames].loadMore = false;
  3170. } else {
  3171. this.collapseData[this.activeNames].page += 1;
  3172. }
  3173. } else {
  3174. this.collapseData[this.activeNames].loadMore = false;
  3175. }
  3176. }
  3177. },
  3178. // 获取方剂列表
  3179. async getPrescriptionsList(load = true) {
  3180. if (!load) return;
  3181. let params = {
  3182. pageid: this.rPrescription.page,
  3183. pagesize: 5,
  3184. searchtype: "",
  3185. keyword: this.agree_key
  3186. };
  3187. let res = await getPrescriptionsList(params);
  3188. if (res.code == 0) {
  3189. if (this.rPrescription.page <= res.data.TotalPageCount) {
  3190. this.rPrescription.list = [
  3191. ...this.rPrescription.list,
  3192. ...res.data.pres
  3193. ];
  3194. if (this.rPrescription.page == res.data.TotalPageCount) {
  3195. this.rPrescription.loadMore = false;
  3196. } else {
  3197. this.rPrescription.page += 1;
  3198. }
  3199. } else {
  3200. this.rPrescription.loadMore = false;
  3201. }
  3202. }
  3203. },
  3204. // 获取参考医案
  3205. async getDoctorCaseL(load = true) {
  3206. if (!load) return;
  3207. let params = {
  3208. pageid: this.rDoctorCase.page,
  3209. pagesize: 5,
  3210. searchtype: "",
  3211. keyword: this.agree_key1
  3212. };
  3213. let res = await getDoctorCaseL(params);
  3214. if (res.code == 0) {
  3215. if (this.rDoctorCase.page <= res.data.TotalPageCount) {
  3216. res.data.verifys.filter(item => {
  3217. return (item.content = item.disname + " " + item.attendingexpert);
  3218. });
  3219. this.rDoctorCase.list = [
  3220. ...this.rDoctorCase.list,
  3221. ...res.data.verifys
  3222. ];
  3223. if (this.rDoctorCase.page == res.data.TotalPageCount) {
  3224. this.rDoctorCase.loadMore = false;
  3225. } else {
  3226. this.rDoctorCase.page += 1;
  3227. }
  3228. } else {
  3229. this.rPrescriprDoctorCasetion = { ...this.rPrescriprDoctorCasetion, loadMore: false, };
  3230. }
  3231. }
  3232. },
  3233. // 获取右侧合理用药信息展示
  3234. async getRationalMed2(index) {
  3235. const child = this.$children.find(item => item.name === "中药处方");
  3236. if (index == null) index = child.recipe_tabs_c;
  3237. const gather = child.recipe_tabs[index].totalTableD.filter(item => item.name && item.medid).map(item => item.medid);
  3238. const request = (id, i, ids) => getRationalMed({
  3239. matID: id,
  3240. matIds: [...ids.slice(0, i), ...ids.slice(i + 1)],
  3241. orgId: this.getuserinfo.organizationid,
  3242. }).then(res => res.code === 0 ? Object.assign({matid: id}, res.data) : null).catch(err => null)
  3243. const rationalMed = await Promise.all(gather.map(request)).then(data => data.filter(Boolean));
  3244. return rationalMed.reduce((data, item) => {
  3245. const color = 'blue';
  3246. if (item.matdosage && item.showDose) {
  3247. const ref = {}, i = 1;
  3248. const child = data[i] || (data[i] = {title: '', collection: []});
  3249. child.collection.push(`<div>
  3250. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3251. <span class="met-value">${ref[item.matdosage]}</span>
  3252. </div>`);
  3253. }
  3254. if (item.matsjj) {
  3255. const ref = {1: '慎用', 2: '忌用', 3: '禁用'}, i = 2;
  3256. const child = data[i] || (data[i] = {title: '慎忌禁用药', collection: []});
  3257. child.collection.push(`<div>
  3258. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3259. <span class="met-value">${ref[item.matsjj]}</span>
  3260. </div>`);
  3261. }
  3262. if (item.matyfsjj) {
  3263. const color = item.matyfsjj === '3' ? 'red' : 'blue';
  3264. const ref = {1: '孕妇慎用', 2: '孕妇忌用', 3: '孕妇禁用'}, i = 3;
  3265. const child = data[i] || (data[i] = {title: '孕妇慎忌禁', collection: []});
  3266. child.collection.push(`<div>
  3267. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3268. <span class="met-value">${ref[item.matyfsjj]}</span>
  3269. </div>`);
  3270. }
  3271. if (item.matysjj) {
  3272. const ref = {}, i = 4;
  3273. const child = data[i] || (data[i] = {title: '服药饮食禁忌', collection: []});
  3274. child.collection.push(`<div>
  3275. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3276. <span class="met-value">${item.matysjj || '无'}</span>
  3277. </div>`);
  3278. }
  3279. if (item.matdxsm) {
  3280. const color = 'red';
  3281. const ref = {}, i = 5;
  3282. const child = data[i] || (data[i] = {title: '药物毒性说明', collection: []});
  3283. child.collection.push(`<div>
  3284. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3285. <span class="met-value">${item.matdxsm || '无'}</span>
  3286. </div>`);
  3287. }
  3288. if (item.matbzjj) {
  3289. const ref = {}, i = 6;
  3290. const child = data[i] || (data[i] = {title: '病证用药禁忌', collection: []});
  3291. child.collection.push(`<div>
  3292. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3293. <span class="met-value">${item.matbzjj || '无'}</span>
  3294. </div>`);
  3295. }
  3296. if (item.matsbf) {
  3297. const color = 'red';
  3298. const ref = {}, i = 7;
  3299. const child = data[i] || (data[i] = {title: '十八反', collection: []});
  3300. child.collection.push(`<div>
  3301. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3302. <span class="met-value">反${item.matsbf}</span>
  3303. </div>`);
  3304. }
  3305. if (item.matsjw) {
  3306. const color = 'red';
  3307. const ref = {}, i = 8;
  3308. const child = data[i] || (data[i] = {title: '十九畏', collection: []});
  3309. child.collection.push(`<div>
  3310. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3311. <span class="met-value">畏${item.matsjw}</span>
  3312. </div>`);
  3313. }
  3314. if (item.matby) {
  3315. const ref = {}, i = 9;
  3316. const child = data[i] || (data[i] = {title: '用药不宜', collection: []});
  3317. child.collection.push(`<div>
  3318. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3319. <span class="met-value">不宜与${item.matby}同用</span>
  3320. </div>`);
  3321. }
  3322. if (item.matmindosage && item.matmaxdosage) {
  3323. const ref = {}, i = 10;
  3324. const child = data[i] || (data[i] = {title: '超剂量药品', collection: []});
  3325. child.collection.push(`<div>
  3326. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3327. <span class="met-value" style="color: red;">(${item.matmindosage}-${item.matmaxdosage})</span>
  3328. </div>`);
  3329. }
  3330. return data;
  3331. }, {title: `中药处方${index + 1}`});
  3332. },
  3333. async getRationalMed(id) {
  3334. let ids = [];
  3335. // this.rationalMed = []
  3336. let children = this.$children.filter(item => {
  3337. return (
  3338. item.name == "中药处方" ||
  3339. item.name == "中药制剂" ||
  3340. item.name == "适宜技术处方"
  3341. );
  3342. });
  3343. let child = children[0];
  3344. child.recipe_tabs[child.recipe_tabs_c].totalTableD.forEach(item => {
  3345. if (item.name) {
  3346. ids.push(item.medid);
  3347. }
  3348. });
  3349. let idsIndex = 0;
  3350. ids.forEach((item, index) => {
  3351. if (item == id) {
  3352. idsIndex = index;
  3353. }
  3354. });
  3355. ids.splice(idsIndex, 1);
  3356. // this.rationalMed = []
  3357. let res = await getRationalMed({
  3358. matID: id,
  3359. orgId: this.getuserinfo.organizationid,
  3360. matIds: ids
  3361. });
  3362. if (res.code == 0 && res.message) {
  3363. res.data.reqID = id;
  3364. this.rationalMed.push(res.data);
  3365. // 去重
  3366. const removeRepeat = (arr, key) => {
  3367. let obj = {};
  3368. arr = arr.reduce((pre, next) => {
  3369. obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
  3370. return pre;
  3371. }, []);
  3372. return arr;
  3373. };
  3374. this.resetRationalMed();
  3375. this.rationalMed = removeRepeat(this.rationalMed, "reqID");
  3376. }
  3377. },
  3378. resetRationalMed() {
  3379. const removeRepeat = (arr, key) => {
  3380. let obj = {};
  3381. arr = arr.reduce((pre, next) => {
  3382. obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
  3383. return pre;
  3384. }, []);
  3385. return arr;
  3386. };
  3387. this.rationalMed1 = [];
  3388. this.rationalMed2 = [];
  3389. this.rationalMed3 = [];
  3390. this.rationalMed4 = [];
  3391. this.rationalMed5 = [];
  3392. this.rationalMed6 = [];
  3393. this.rationalMed7 = [];
  3394. this.rationalMed8 = [];
  3395. this.rationalMed9 = [];
  3396. this.rationalMed10 = [];
  3397. this.rationalMed = removeRepeat(this.rationalMed, "reqID");
  3398. this.rationalMed.forEach(item => {
  3399. item.showDose = item.showDose ? true : false;
  3400. if (item.matdosage) {
  3401. // 超剂量药品:
  3402. this.rationalMed1.push(item);
  3403. }
  3404. if (item.matsjj) {
  3405. // 慎忌禁用药:
  3406. this.rationalMed2.push(item);
  3407. }
  3408. if (item.matyfsjj) {
  3409. // 孕妇慎忌禁:
  3410. this.rationalMed3.push(item);
  3411. }
  3412. if (item.matysjj) {
  3413. // 服药饮食禁忌:
  3414. this.rationalMed4.push(item);
  3415. }
  3416. if (item.matdxsm) {
  3417. /// 药物毒性说明:
  3418. this.rationalMed5.push(item);
  3419. }
  3420. if (item.matbzjj) {
  3421. // 病证用药禁忌:
  3422. this.rationalMed6.push(item);
  3423. }
  3424. if (item.matsbf) {
  3425. // 18反
  3426. this.rationalMed7.push(item);
  3427. }
  3428. if (item.matsjw) {
  3429. // 十九畏:
  3430. this.rationalMed8.push(item);
  3431. }
  3432. if (item.matby) {
  3433. // 用药不宜:
  3434. this.rationalMed9.push(item);
  3435. }
  3436. if (item.matmaxdosage && item.matmindosage) {
  3437. this.rationalMed10.push(item);
  3438. }
  3439. });
  3440. this.rationalMed1 = removeRepeat(this.rationalMed1, "matid");
  3441. this.rationalMed2 = removeRepeat(this.rationalMed2, "matid");
  3442. this.rationalMed3 = removeRepeat(this.rationalMed3, "matid");
  3443. this.rationalMed4 = removeRepeat(this.rationalMed4, "matid");
  3444. this.rationalMed5 = removeRepeat(this.rationalMed5, "matid");
  3445. this.rationalMed6 = removeRepeat(this.rationalMed6, "matid");
  3446. this.rationalMed7 = removeRepeat(this.rationalMed7, "matid");
  3447. this.rationalMed8 = removeRepeat(this.rationalMed8, "matid");
  3448. this.rationalMed9 = removeRepeat(this.rationalMed9, "matid");
  3449. this.rationalMed10 = removeRepeat(this.rationalMed10, "matid");
  3450. },
  3451. // 获取合理用药信息 平台
  3452. async getRationalMedForPlat(id) {
  3453. let ids = [];
  3454. this.rationalMed = [];
  3455. let children = this.$children.filter(item => {
  3456. return (
  3457. item.name == "中药处方" ||
  3458. item.name == "中药制剂" ||
  3459. item.name == "适宜技术处方"
  3460. );
  3461. });
  3462. let child = children[0];
  3463. child.recipe_tabs[child.recipe_tabs_c].totalTableD.forEach(item => {
  3464. if (item.name) {
  3465. ids.push(item.medid);
  3466. }
  3467. });
  3468. let idsIndex = 0;
  3469. ids.forEach((item, index) => {
  3470. if (item == id) {
  3471. idsIndex = index;
  3472. }
  3473. });
  3474. ids.splice(idsIndex, 1);
  3475. let res = await getRationalMedForPlat({
  3476. matID: id,
  3477. // orgId: this.getuserinfo.organizationid
  3478. matIds: ids
  3479. });
  3480. if (res.code == 0 && res.message) {
  3481. res.data.reqID = id;
  3482. this.rationalMed.push(res.data);
  3483. // 去重
  3484. const removeRepeat = (arr, key) => {
  3485. let obj = {};
  3486. arr = arr.reduce((pre, next) => {
  3487. obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
  3488. return pre;
  3489. }, []);
  3490. return arr;
  3491. };
  3492. this.rationalMed = removeRepeat(this.rationalMed, "reqID");
  3493. this.rationalMed.forEach(item => {
  3494. item.showDose = item.showDose ? true : false;
  3495. if (item.matdosage) {
  3496. // 超剂量药品:
  3497. this.rationalMed1.push(item);
  3498. }
  3499. if (item.matsjj) {
  3500. // 慎忌禁用药:
  3501. this.rationalMed2.push(item);
  3502. }
  3503. if (item.matyfsjj) {
  3504. // 孕妇慎忌禁:
  3505. this.rationalMed3.push(item);
  3506. }
  3507. if (item.matysjj) {
  3508. // 服药饮食禁忌:
  3509. this.rationalMed4.push(item);
  3510. }
  3511. if (item.matdxsm) {
  3512. /// 药物毒性说明:
  3513. this.rationalMed5.push(item);
  3514. }
  3515. if (item.matbzjj) {
  3516. // 病证用药禁忌:
  3517. this.rationalMed6.push(item);
  3518. }
  3519. if (item.matsbf) {
  3520. // 18反
  3521. this.rationalMed7.push(item);
  3522. }
  3523. if (item.matsjw) {
  3524. // 十九畏:
  3525. this.rationalMed8.push(item);
  3526. }
  3527. if (item.matby) {
  3528. // 用药不宜:
  3529. this.rationalMed9.push(item);
  3530. }
  3531. if (item.matmaxdosage && item.matmindosage) {
  3532. this.rationalMed10.push(item);
  3533. }
  3534. });
  3535. // 去重
  3536. this.rationalMed1 = removeRepeat(this.rationalMed1, "matid");
  3537. this.rationalMed2 = removeRepeat(this.rationalMed2, "matid");
  3538. this.rationalMed3 = removeRepeat(this.rationalMed3, "matid");
  3539. this.rationalMed4 = removeRepeat(this.rationalMed4, "matid");
  3540. this.rationalMed5 = removeRepeat(this.rationalMed5, "matid");
  3541. this.rationalMed6 = removeRepeat(this.rationalMed6, "matid");
  3542. this.rationalMed7 = removeRepeat(this.rationalMed7, "matid");
  3543. this.rationalMed8 = removeRepeat(this.rationalMed8, "matid");
  3544. this.rationalMed9 = removeRepeat(this.rationalMed9, "matid");
  3545. this.rationalMed10 = removeRepeat(this.rationalMed10, "matid");
  3546. }
  3547. },
  3548. // 推导处方
  3549. async inferRecipe(type = 1, businesstype) {
  3550. if (!this.patiensMsg.maindiagnosis.disid) {
  3551. return;
  3552. }
  3553. if (this.container_i == 1) return;
  3554. if (type != 4) {
  3555. // if (!this.patiensMsg.maindiagnosis.disid) {
  3556. // this.$message.warning('请先提交一条诊断信息');
  3557. // this.$router.replace({
  3558. // path: '/index/diagnosis'
  3559. // })
  3560. // return;
  3561. // }
  3562. }
  3563. if (type != 4) {
  3564. businesstype =
  3565. this.container_i == 0 ? "1" : this.container_i == 2 ? "3" : "1";
  3566. }
  3567. let params = {
  3568. businesstype: businesstype,
  3569. disid: this.patiensMsg.maindiagnosis.disid,
  3570. symid: this.patiensMsg.maindiagnosis.symptomid,
  3571. therapy: this.patiensMsg.maindiagnosis.treatment
  3572. };
  3573. const loading = this.$loading({
  3574. lock: true,
  3575. text: "正在获取推荐方剂数据",
  3576. spinner: "el-icon-loading",
  3577. background: "rgba(0, 0, 0, 0.7)"
  3578. });
  3579. let res = await inferRecipe(params).catch(err => {
  3580. loading.close();
  3581. });
  3582. if (res.code == 0) {
  3583. loading.close();
  3584. let arr = [];
  3585. res.data.expList.forEach(item => {
  3586. item.showType = 1; // 专家经验
  3587. item.book = item.book ? item.book : "(暂无)";
  3588. });
  3589. res.data.schemes[0].pres.forEach(item => {
  3590. item.showType = 0; // 之前的推导出
  3591. item.book = item.book ? item.book : "(暂无)";
  3592. });
  3593. // this.inferRecipeId = res.data.schemes[0].preid
  3594. let arr2 = res.data.expList.concat(res.data.schemes[0].pres);
  3595. if (type == 4) {
  3596. this.contentTabs[businesstype - 1].color =
  3597. arr2.length > 0 ? "red" : "";
  3598. return;
  3599. }
  3600. if (arr2.length > 0) {
  3601. this.tjRecipeId = arr2[0].preid || arr2[0].pid || arr2[0].acupreid;
  3602. } else {
  3603. let children = this.$children.filter(item => {
  3604. return (
  3605. item.name == "中药处方" ||
  3606. item.name == "中药制剂" ||
  3607. item.name == "适宜技术处方"
  3608. );
  3609. });
  3610. let child = children[0];
  3611. if (
  3612. !child.recipe_tabs[child.recipe_tabs_c].isPay ||
  3613. child.recipe_tabs[child.recipe_tabs_c].paystate == 0
  3614. ) {
  3615. // child.clearRecipe();
  3616. }
  3617. }
  3618. this.rRecomendR = arr2;
  3619. if (this.$route.query.type != "tuidao" && type == 1) return;
  3620. if (type == 3 && this.container_i == 0 && this.isTuiDaoZy) return;
  3621. if (type == 3 && this.container_i == 2 && this.isTuiDaoSuit) return;
  3622. if (this.rRecomendR.length == 0) return;
  3623. let children = this.$children.filter(item => {
  3624. return (
  3625. item.name == "中药处方" ||
  3626. item.name == "中药制剂" ||
  3627. item.name == "适宜技术处方"
  3628. );
  3629. });
  3630. let child = children[0];
  3631. let child2 = children[2];
  3632. if (
  3633. child.recipe_tabs[child.recipe_tabs_c].isPay ||
  3634. child.recipe_tabs[child.recipe_tabs_c].paystate == 1
  3635. ) {
  3636. // 已付费
  3637. child.addRecipeTba();
  3638. }
  3639. if (child2.isPay || child2.paystate == 1) {
  3640. // 已付费
  3641. this.$message.error("当前为已付费处方,暂不支持推导");
  3642. return;
  3643. }
  3644. setTimeout(() => {
  3645. if (
  3646. // this.$route.query.infer &&
  3647. // this.$route.query.infer == "true" &&
  3648. // && child.recipe_tabs[child.recipe_tabs_c].totalTableD.length == 1
  3649. this.container_i == 0
  3650. ) {
  3651. // console.log(arr, 'res.data');
  3652. this.addRecipeFrom("4");
  3653. if (arr2[0].showType == 1) {
  3654. // 专家经验
  3655. this.turnRecipe3(arr2[0]);
  3656. } else {
  3657. // 推导处方
  3658. this.getPreDetal(arr2[0].preid);
  3659. }
  3660. if (type == 3) {
  3661. this.isTuiDaoZy = true;
  3662. }
  3663. } else if (this.container_i == 2) {
  3664. // && child2.tableData4.length == 1
  3665. if (arr2.length > 0) {
  3666. this.setDrugsInfo(arr2[0].items);
  3667. }
  3668. this.addRecipeFrom("4", 2);
  3669. this.suitChnageOrJoin();
  3670. if (type == 3) {
  3671. this.isTuiDaoSuit = true;
  3672. }
  3673. }
  3674. }, 500);
  3675. }
  3676. },
  3677. // 新增处方来源
  3678. async addRecipeFrom(type, isSuit = "") {
  3679. if (type != 3) {
  3680. let children = this.$children.filter(item => {
  3681. return (
  3682. item.name == "中药处方" ||
  3683. item.name == "中药制剂" ||
  3684. item.name == "适宜技术处方"
  3685. );
  3686. });
  3687. let child = children[0];
  3688. let child2 = children[2];
  3689. // debugger;
  3690. child.recipe_tabs[child.recipe_tabs_c].isMyMade = false;
  3691. if (isSuit == 2) {
  3692. child2.isMyMade = false;
  3693. }
  3694. }
  3695. let res = await addRecipeFrom({
  3696. type: type
  3697. });
  3698. },
  3699. // 获取参考医案详情
  3700. async getDCaseDetail(id) {
  3701. let res = await getDCaseDetail({
  3702. verId: id
  3703. });
  3704. if (res.code == 0) {
  3705. this.showTestCase = true;
  3706. res.data.dialist.forEach(item => {
  3707. item.checktime = item.checktime.split(" ");
  3708. item.diatimes = numberToUpperCase(item.diatimes - 1);
  3709. });
  3710. this.testCaseInfo = res.data;
  3711. }
  3712. },
  3713. // 协定方转方 判断
  3714. async changeBasisPre(id) {
  3715. let params = {
  3716. basisPreId: id
  3717. };
  3718. let res = await changeBasisPre(params);
  3719. if (res.ResultCode == 0) {
  3720. this.agreeAssignToTCM(this.agreeInfo);
  3721. }
  3722. },
  3723. // 专家经验转方判断
  3724. async changeExpre(info) {
  3725. let params = {
  3726. basisPreId: info.pid
  3727. };
  3728. let res = await changeExpre(params);
  3729. if (res.ResultCode == 0) {
  3730. // info.preStiDetails = info.prescriptionDetailVos
  3731. this.agreeAssignToTCM(info);
  3732. }
  3733. },
  3734. // 名家验案和 方剂转方/合方
  3735. async changeAndJoin(type = 1) {
  3736. // type == 1 转方 type ==2 合方
  3737. let children = this.$children.filter(item => {
  3738. return (
  3739. item.name == "中药处方" ||
  3740. item.name == "中药制剂" ||
  3741. item.name == "适宜技术处方"
  3742. );
  3743. });
  3744. let child = children[0];
  3745. child.recipe_tabs[child.recipe_tabs_c].disable = false;
  3746. let drugs = this.getDrugInfo;
  3747. // let type1 = 0
  3748. let type1 = child.recipe_tabs[child.recipe_tabs_c].radio.split("@")[1];
  3749. let ids = [];
  3750. drugs.forEach(item => {
  3751. let idDose = item.matid + "&" + item.dose + "&" + (item.useage || "");
  3752. ids.push(idDose);
  3753. });
  3754. if (this.container_i == 1) return;
  3755. const loading = this.$loading({
  3756. lock: true,
  3757. text: "正在处理药品数据,请稍等",
  3758. spinner: "el-icon-loading",
  3759. background: "rgba(0, 0, 0, 0.7)"
  3760. });
  3761. let res = await changeAndJoin({
  3762. pharmacyid: child.recipe_tabs[child.recipe_tabs_c].pharmacyID,
  3763. type: type1, // child.recipe_tabs[child.recipe_tabs_c].radio,
  3764. drugIds: ids
  3765. }).catch(err => {
  3766. loading.close();
  3767. });
  3768. if (this.container_i == 0) {
  3769. // 中药处方
  3770. if (res.ResultCode == 0) {
  3771. const getUsage = (function (list = [], value = '') {
  3772. if (!Array.isArray(list) || list.length === 0) return void 0;
  3773. const option = value && list.find(item => item.value === value || item.key == value);
  3774. return option ? option.key : list[0].key;
  3775. }).bind(null, child.usageList);
  3776. let noDrugs = []; // 查找不到的药品
  3777. let hasDrugs = []; // 查找的到的药品
  3778. res.Data.forEach((item, index) => {
  3779. drugs.forEach((item1, index1) => {
  3780. if (item == item1.matid) {
  3781. // debugger
  3782. item1.color = "red";
  3783. let obj = {
  3784. drugList: [],
  3785. page: 1,
  3786. loadMore: true,
  3787. usageList: [],
  3788. seqn: item1.seqn,
  3789. ypmc: item1.matname,
  3790. gg: "",
  3791. dw: item1.unit,
  3792. lsjg: item1.price ? item1.price : 0,
  3793. price: item1.price ? item1.price : 0,
  3794. kc: 0,
  3795. cdmc: "无",
  3796. pid: item1.matid,
  3797. color: "red",
  3798. dose: item1.dose,
  3799. usage: item1.useage || item1.usagestr, // child.usegeList[0].key,
  3800. showSearch: false,
  3801. matid: item1.matid,
  3802. key: "",
  3803. search_i: index
  3804. };
  3805. /* 修正 */ obj.usage = obj.useage = getUsage(obj.usage);
  3806. noDrugs.push(obj);
  3807. // noDrugs.push(item1.matname)
  3808. }
  3809. if (item instanceof Object && item.oldYpid == item1.matid) {
  3810. if (item.kc > 0) hasDrugs.push(item);
  3811. else {
  3812. item.color = 'red';
  3813. noDrugs.push(item);
  3814. }
  3815. }
  3816. });
  3817. });
  3818. hasDrugs = hasDrugs.concat(noDrugs);
  3819. if (hasDrugs.length > 0 && type == 1) {
  3820. child.recipe_tabs[child.recipe_tabs_c].totalTableD = [];
  3821. // console.log(hasDrugs, 'has');
  3822. // 赋值给表格
  3823. hasDrugs.forEach((item, index) => {
  3824. let obj1 = {
  3825. drugList: [],
  3826. page: 1,
  3827. loadMore: true,
  3828. usageList: [],
  3829. id: item.seqn,
  3830. name: item.ypmc,
  3831. spec: item.gg, // 规格
  3832. dose: item.dose, // 剂量
  3833. unit: item.dw, // 单位
  3834. // usage: item.usagestr, // 用法
  3835. usage: item.useage || item.usagestr, // child.usegeList[0].key,
  3836. // price: item.lsjg,
  3837. price: item.price ? item.price : 0,
  3838. total: item.price * item.dose,
  3839. inventory: item.kc, // 库存
  3840. key: "",
  3841. search_i: index,
  3842. medid: item.pid, // 药品id
  3843. originname: item.cdmc, // 产地名称
  3844. showSearch: false,
  3845. color: item.color ? item.color : "#000"
  3846. };
  3847. /* 修正 */ obj1.usage = obj1.useage = getUsage(obj1.usage);
  3848. child.recipe_tabs[child.recipe_tabs_c].totalTableD.push(obj1);
  3849. child.getSelectType("中药药品用法", index);
  3850. });
  3851. child.recipe_tabs[child.recipe_tabs_c].totalTableD.push({
  3852. drugList: [],
  3853. page: 1,
  3854. loadMore: true,
  3855. usageList: [],
  3856. showSearch: false,
  3857. search_i: 0,
  3858. id: 1,
  3859. key: ""
  3860. });
  3861. child.recipe_tabs[child.recipe_tabs_c].totalTableD.filter(
  3862. (item3, index3) => {
  3863. if (item3.medid) {
  3864. this.rationalMed = [];
  3865. this.resetRationalMed();
  3866. // if (item3.color != '#000') {
  3867. // this.getRationalMedForPlat(item3.medid)
  3868. // } else {
  3869. // this.getRationalMed(item3.medid)
  3870. // }
  3871. if (item3.medid.indexOf("-") != -1) {
  3872. this.getRationalMed(item3.medid);
  3873. } else {
  3874. this.getRationalMedForPlat(item3.medid);
  3875. }
  3876. }
  3877. return (item3.id = index3 + 1);
  3878. }
  3879. );
  3880. child.recipe_tabs[
  3881. child.recipe_tabs_c
  3882. ].tableData = child.recipe_tabs[
  3883. child.recipe_tabs_c
  3884. ].totalTableD.filter(item2 => {
  3885. return Number(item2.id) % 2 != 0;
  3886. });
  3887. child.recipe_tabs[
  3888. child.recipe_tabs_c
  3889. ].tableData1 = child.recipe_tabs[
  3890. child.recipe_tabs_c
  3891. ].totalTableD.filter(item2 => {
  3892. return Number(item2.id) % 2 == 0;
  3893. });
  3894. } else if (hasDrugs.length > 0 && type == 2) {
  3895. child.recipe_tabs[
  3896. child.recipe_tabs_c
  3897. ].totalTableD = child.recipe_tabs[
  3898. child.recipe_tabs_c
  3899. ].totalTableD.filter(item => {
  3900. return item.name;
  3901. });
  3902. // console.log(hasDrugs, "has");
  3903. // 赋值给表格
  3904. hasDrugs.forEach((item, index) => {
  3905. let obj1 = {
  3906. color: item.color ? item.color : "#000",
  3907. drugList: [],
  3908. page: 1,
  3909. loadMore: true,
  3910. usageList: [],
  3911. id: item.seqn,
  3912. name: item.ypmc,
  3913. spec: item.gg, // 规格
  3914. dose: item.dose, // 剂量
  3915. unit: item.dw, // 单位
  3916. // usage: item.usagestr, // 用法
  3917. usage: item.useage || item.usagestr, // child.usegeList[0].key,
  3918. // price: item.lsjg,
  3919. price: item.price ? item.price : 0,
  3920. total: item.price * item.dose,
  3921. inventory: item.kc, // 库存
  3922. key: "",
  3923. search_i: index,
  3924. medid: item.pid, // 药品id
  3925. originname: item.cdmc, // 产地名称
  3926. showSearch: false
  3927. };
  3928. /* 修正 */ obj1.usage = obj1.useage = getUsage(obj1.usage);
  3929. child.recipe_tabs[child.recipe_tabs_c].totalTableD.push(obj1);
  3930. child.getSelectType("中药药品用法", index);
  3931. });
  3932. child.recipe_tabs[child.recipe_tabs_c].totalTableD.push({
  3933. drugList: [],
  3934. page: 1,
  3935. loadMore: true,
  3936. usageList: [],
  3937. showSearch: false,
  3938. search_i: 0,
  3939. id: 1,
  3940. key: ""
  3941. });
  3942. child.recipe_tabs[
  3943. child.recipe_tabs_c
  3944. ].totalTableD = this.removeRepeat(
  3945. child.recipe_tabs[child.recipe_tabs_c].totalTableD,
  3946. "medid"
  3947. );
  3948. child.recipe_tabs[child.recipe_tabs_c].totalTableD.filter(
  3949. (item3, index3) => {
  3950. return (item3.id = index3 + 1);
  3951. }
  3952. );
  3953. child.recipe_tabs[
  3954. child.recipe_tabs_c
  3955. ].tableData = child.recipe_tabs[
  3956. child.recipe_tabs_c
  3957. ].totalTableD.filter(item2 => {
  3958. if (item2.medid) {
  3959. // if (item2.color != '#000') {
  3960. // this.getRationalMedForPlat(item2.medid)
  3961. // } else {
  3962. // this.getRationalMed(item2.medid)
  3963. // }
  3964. if (item2.medid.indexOf("-") != -1) {
  3965. this.getRationalMed(item2.medid);
  3966. } else {
  3967. this.getRationalMedForPlat(item2.medid);
  3968. }
  3969. }
  3970. return Number(item2.id) % 2 != 0;
  3971. });
  3972. child.recipe_tabs[
  3973. child.recipe_tabs_c
  3974. ].tableData1 = child.recipe_tabs[
  3975. child.recipe_tabs_c
  3976. ].totalTableD.filter(item2 => {
  3977. return Number(item2.id) % 2 == 0;
  3978. });
  3979. }
  3980. this.showTestCase = false;
  3981. this.showDialog = false;
  3982. this.showPresc = false;
  3983. this.showUnifyPresc = false;
  3984. loading.close();
  3985. }
  3986. } else if (this.container_i == 2) {
  3987. // 适宜技术处方
  3988. }
  3989. },
  3990. // 跟据就诊记录id 获取就诊记录详细信息
  3991. async getSeeDByID(id) {
  3992. let params = {
  3993. recId: id
  3994. };
  3995. const loading = this.$loading({
  3996. lock: true,
  3997. text: "正在查找数据",
  3998. spinner: "el-icon-loading",
  3999. background: "rgba(0, 0, 0, 0.7)"
  4000. });
  4001. let res = await getSeeDByID(params).catch(err => {
  4002. loading.close();
  4003. });
  4004. if (res.ResultCode == 0) {
  4005. loading.close();
  4006. this.recordInfo = res.Data;
  4007. this.showRecord = true;
  4008. }
  4009. },
  4010. // 获取中药详情
  4011. async getMedDetail(id) {
  4012. let res = await getMedDetail({
  4013. matid: id
  4014. });
  4015. if (res.code == 0) {
  4016. res.data.matphoto = res.data.matphoto.split(",");
  4017. // res.data.matphoto = res.data.matphoto.split(',')
  4018. res.data.xiangsi = res.data.relativedata.filter(item => {
  4019. return item.relativetype == 1;
  4020. });
  4021. res.data.changyong = res.data.relativedata.filter(item => {
  4022. return item.relativetype == 2;
  4023. });
  4024. this.drugInfo = res.data;
  4025. this.showDrug = true;
  4026. }
  4027. },
  4028. // 获取药品详细信息并展示
  4029. async getDrugDetail(id) {
  4030. let res = await getDrugDetail({
  4031. stiDrugId: id
  4032. });
  4033. if (res.ResultCode == 0) {
  4034. res.Data.matphoto = res.Data.matphoto.split(",");
  4035. // res.data.matphoto = res.data.matphoto.split(',')
  4036. res.Data.xiangsi = res.Data.relativedata.filter(item => {
  4037. return item.relativetype == 1;
  4038. });
  4039. res.Data.changyong = res.Data.relativedata.filter(item => {
  4040. return item.relativetype == 2;
  4041. });
  4042. this.drugInfo = res.Data;
  4043. this.showDrug = true;
  4044. }
  4045. },
  4046. // 获取方剂详情
  4047. async getPreDetal(id, type = "") {
  4048. if (id instanceof Object) {
  4049. // 适宜技术处方
  4050. this.preInfo = id;
  4051. this.setDrugsInfo(id.items);
  4052. this.showDialog = true;
  4053. this.tjRecipeId = id.acupreid;
  4054. return;
  4055. }
  4056. let res = await getPreDetal({
  4057. preid: id
  4058. });
  4059. if (res.code === 0) {
  4060. this.preInfo = res.data;
  4061. if (type == 1 || type == "") {
  4062. this.tjRecipeId = id;
  4063. }
  4064. this.setDrugsInfo(res.data.items);
  4065. if (!type || type == 2) {
  4066. // console.log(res.data, 'RES.datas');
  4067. if (type == "") {
  4068. this.changeAndJoin(1);
  4069. } else {
  4070. this.changeAndJoin(2);
  4071. }
  4072. } else {
  4073. this.showDialog = true;
  4074. }
  4075. }
  4076. },
  4077. // 获取协定方详细信息
  4078. async getAccordDetail(id) {
  4079. let res = await getAccordDetail({
  4080. pid: id
  4081. });
  4082. if (res.ResultCode == 0) {
  4083. this.agreeInfo = res.Data;
  4084. this.showAgree = true;
  4085. }
  4086. },
  4087. // 获取专家经验详细信息
  4088. async getExperinceDetail(id) {
  4089. let res = await getExperinceDetail({
  4090. pid: id
  4091. });
  4092. if (res.ResultCode == 0) {
  4093. this.tjRecipeId = id;
  4094. this.exprInfo = res.Data;
  4095. this.showExpr = true;
  4096. }
  4097. },
  4098. fmatby(val, mat) {
  4099. return mat + "不宜与" + val + "同用" + ",";
  4100. let list = val.split(",");
  4101. let str = "";
  4102. list.forEach(item => {
  4103. str += mat + "不宜与" + item + "同用" + ",";
  4104. });
  4105. return str;
  4106. },
  4107. fsjw(val, mat) {
  4108. return mat + "畏" + val + ",";
  4109. let list = val.split(",");
  4110. let str = "";
  4111. list.forEach(item => {
  4112. str += mat + "畏" + item + ",";
  4113. });
  4114. return str;
  4115. },
  4116. fsbf(val, mat) {
  4117. return '<span style="color:red;">' + mat + "</span>" + "反" + val + ",";
  4118. let list = val.split(",");
  4119. let str = "";
  4120. list.forEach(item => {
  4121. str += mat + "反" + item + ",";
  4122. });
  4123. return str;
  4124. },
  4125. // 去重
  4126. removeRepeat(arr, key) {
  4127. let obj = {};
  4128. arr = arr.reduce((pre, next) => {
  4129. obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
  4130. return pre;
  4131. }, []);
  4132. return arr;
  4133. },
  4134. countDose() {
  4135. let show = false;
  4136. this.rationalMed10.forEach(item => {
  4137. if (item.showDose) {
  4138. show = true;
  4139. }
  4140. });
  4141. this.$forceUpdate();
  4142. this.raDoseShow = show;
  4143. },
  4144. getEditPreNo() {
  4145. return this.$route.query && this.$route.query.recipeType === "edit" ? this.$route.query.recipeID : this.getPreNo;
  4146. },
  4147. ...mapMutations({
  4148. setDrugsInfo: "drug/setDrugsInfo"
  4149. })
  4150. },
  4151. computed: {
  4152. // 三种药房合计金额
  4153. totalPrice() {
  4154. return (this.contentTabs[0].check
  4155. ? Number(this.chineseM.allMoney)
  4156. : 0 + this.contentTabs[1].check
  4157. ? Number(this.medicineC.allMoney)
  4158. : 0 + this.contentTabs[2].check
  4159. ? Number(this.suitScience.allMoney)
  4160. : 0
  4161. ).toFixed(2);
  4162. },
  4163. ...mapGetters(["getPatiensInfo", "getuserinfo", "getDrugInfo", "getIsSee", "getPreNo"])
  4164. },
  4165. filters: {
  4166. ftsjj(value) {
  4167. if (value == 1) {
  4168. return "慎用";
  4169. }
  4170. if (value == 2) {
  4171. return "忌用";
  4172. }
  4173. if (value == 3) {
  4174. return "禁用";
  4175. }
  4176. },
  4177. fyfsjj(value) {
  4178. if (value == 1) {
  4179. return "孕妇慎用";
  4180. }
  4181. if (value == 2) {
  4182. return "孕妇忌用";
  4183. }
  4184. if (value == 3) {
  4185. return "孕妇禁用";
  4186. }
  4187. }
  4188. }
  4189. };
  4190. </script>
  4191. <style lang="scss" scoped>
  4192. @import "../../style/common.scss";
  4193. @import "../../style/media/diagnosis/prescribing-common.scss";
  4194. .prescribing {
  4195. height: 100%;
  4196. // background: red;
  4197. .pre-title {
  4198. margin-bottom: 10px;
  4199. .title-container {
  4200. span {
  4201. width: 3px;
  4202. height: 14px;
  4203. background: #5386f6;
  4204. border-radius: 1px;
  4205. display: inline-block;
  4206. }
  4207. div {
  4208. font-size: 18px;
  4209. font-family: PingFang SC;
  4210. font-weight: 400;
  4211. color: #5386f6;
  4212. margin-left: 9px;
  4213. }
  4214. }
  4215. .patiens-msg {
  4216. font-size: 14px;
  4217. font-family: PingFang SC;
  4218. font-weight: 400;
  4219. color: #333333;
  4220. .p {
  4221. margin-bottom: 5px;
  4222. cursor: default;
  4223. .patiens-name {
  4224. color: #5386f6;
  4225. font-weight: bold;
  4226. font-size: 16px;
  4227. }
  4228. .patiens-desc {
  4229. display: inline-block;
  4230. .matname {
  4231. color: #5386f6;
  4232. }
  4233. }
  4234. .patiens-cate {
  4235. font-weight: bold;
  4236. }
  4237. }
  4238. }
  4239. }
  4240. .pre-left {
  4241. height: 100%;
  4242. width: 200px;
  4243. padding: 10px 12px;
  4244. background: #fff;
  4245. box-sizing: border-box;
  4246. margin-right: 5px;
  4247. overflow-y: auto;
  4248. height: 470px;
  4249. .patiens-msg {
  4250. font-size: 14px;
  4251. font-family: PingFang SC;
  4252. font-weight: 400;
  4253. color: #333333;
  4254. h4 {
  4255. font-size: 16px;
  4256. font-family: PingFang SC;
  4257. font-weight: 500;
  4258. color: #333333;
  4259. margin-bottom: 5px;
  4260. }
  4261. p {
  4262. span {
  4263. display: inline-block;
  4264. width: 70px;
  4265. text-align: right;
  4266. }
  4267. margin-bottom: 5px;
  4268. }
  4269. }
  4270. .pre-steps {
  4271. .find-more {
  4272. cursor: pointer;
  4273. img {
  4274. width: 12px;
  4275. }
  4276. span {
  4277. font-size: 12px;
  4278. font-family: PingFang SC;
  4279. font-weight: 400;
  4280. color: #ffae45;
  4281. margin-left: 7px;
  4282. }
  4283. }
  4284. .icon {
  4285. width: 22px;
  4286. }
  4287. .step-body:hover {
  4288. background: #d8d8d8;
  4289. }
  4290. .step-name {
  4291. font-size: 14px;
  4292. font-family: PingFang SC;
  4293. font-weight: 400;
  4294. color: #333333;
  4295. cursor: pointer;
  4296. }
  4297. }
  4298. }
  4299. .pre-right {
  4300. overflow: auto;
  4301. height: 100%;
  4302. margin-left: 5px;
  4303. width: 200px;
  4304. padding: 10px 10px;
  4305. background: #fff;
  4306. box-sizing: border-box;
  4307. overflow-y: auto;
  4308. height: 470px;
  4309. .tuidao {
  4310. cursor: pointer;
  4311. width: 70px;
  4312. height: 26px;
  4313. background: #ffae45;
  4314. border-radius: 2px;
  4315. font-size: 14px;
  4316. font-family: PingFang SC;
  4317. font-weight: 400;
  4318. color: #ffffff;
  4319. }
  4320. }
  4321. // 协定方
  4322. .agreement {
  4323. .agree-tab {
  4324. div {
  4325. width: 66px;
  4326. height: 24px;
  4327. background: rgba($color: #5386f6, $alpha: 0.1);
  4328. font-size: 13px;
  4329. font-family: PingFang SC;
  4330. font-weight: 400;
  4331. color: #333333;
  4332. cursor: pointer;
  4333. }
  4334. .agree-active {
  4335. background: #5386f6;
  4336. color: #fff;
  4337. }
  4338. }
  4339. .collapse {
  4340. border: 1px solid #ebeef5;
  4341. // padding: 0 0 0 10px;
  4342. }
  4343. .collapse-item {
  4344. // margin-bottom: 10px;
  4345. padding: 13px;
  4346. border-bottom: 1px dashed #ebeef5;
  4347. .med-name {
  4348. // width: 70px;
  4349. flex: 1;
  4350. overflow: hidden;
  4351. text-overflow: ellipsis;
  4352. white-space: nowrap;
  4353. font-size: 14px;
  4354. font-family: PingFang SC;
  4355. font-weight: 400;
  4356. color: #333333;
  4357. cursor: pointer;
  4358. }
  4359. .med-name:hover {
  4360. background: #d8d8d8;
  4361. }
  4362. .med-btns {
  4363. margin-left: 10px;
  4364. div {
  4365. width: 34px;
  4366. height: 20px;
  4367. background: #5386f6;
  4368. border-radius: 2px;
  4369. color: #fff;
  4370. font-size: 12px;
  4371. font-family: PingFang SC;
  4372. font-weight: 400;
  4373. cursor: pointer;
  4374. color: #ffffff;
  4375. }
  4376. .bg-yellow {
  4377. background: #ffae45;
  4378. margin-left: 10px;
  4379. }
  4380. }
  4381. }
  4382. .collapse-more {
  4383. // margin-top: 10px;
  4384. img {
  4385. width: 26px;
  4386. }
  4387. }
  4388. .basis {
  4389. border: 1px solid #ebeef5;
  4390. .basis-top-search {
  4391. padding: 9px 7px 9px 11px;
  4392. border-bottom: 1px dashed #eaeaea;
  4393. .search-btn {
  4394. width: 37px;
  4395. height: 28px;
  4396. background: #ffb55f;
  4397. border-radius: 0 2px 2px 0;
  4398. cursor: pointer;
  4399. font-size: 12px;
  4400. font-family: Source Han Sans CN;
  4401. font-weight: 400;
  4402. color: #ffffff;
  4403. }
  4404. }
  4405. }
  4406. }
  4407. .pre-center {
  4408. display: flex;
  4409. flex-direction: column;
  4410. flex: 1;
  4411. padding: 5px 5px;
  4412. background: #fff;
  4413. box-sizing: border-box;
  4414. overflow: hidden;
  4415. > div { flex: none; }
  4416. > div.center-table { flex: auto; }
  4417. .center-tab {
  4418. div {
  4419. cursor: default;
  4420. width: 146px;
  4421. height: 26px;
  4422. background: rgba($color: #5386f6, $alpha: 0.1);
  4423. font-size: 16px;
  4424. font-family: PingFang SC;
  4425. font-weight: 400;
  4426. color: #666666;
  4427. margin-right: 2px;
  4428. span {
  4429. margin-right: 9px;
  4430. }
  4431. }
  4432. .active {
  4433. background: #5386f6;
  4434. color: #fff;
  4435. }
  4436. .checked {
  4437. img {
  4438. width: 16px;
  4439. margin-top: 5px;
  4440. }
  4441. }
  4442. }
  4443. .header-total {
  4444. font-size: 12px;
  4445. font-family: PingFang SC;
  4446. font-weight: 500;
  4447. color: #333333;
  4448. div {
  4449. margin-left: 20px;
  4450. }
  4451. span {
  4452. color: #ff3a3a;
  4453. }
  4454. }
  4455. .center-table {
  4456. border: 2px solid #dedede;
  4457. padding: 0px 0 0;
  4458. // min-height: 680px;
  4459. // position: relative;
  4460. .table-header {
  4461. padding-bottom: 0px;
  4462. border-bottom: 2px solid #dedede;
  4463. .table-label {
  4464. .label-item {
  4465. cursor: pointer;
  4466. width: 134px;
  4467. border-right: 2px solid #eaeaea;
  4468. div {
  4469. color: #666;
  4470. transform: rotate(45deg);
  4471. font-size: 28px;
  4472. margin-left: 12px;
  4473. margin-top: 1px;
  4474. }
  4475. }
  4476. span {
  4477. font-size: 14px;
  4478. font-family: PingFang SC;
  4479. font-weight: 400;
  4480. color: #666666;
  4481. }
  4482. .l_active {
  4483. color: #5386f6;
  4484. }
  4485. }
  4486. }
  4487. .add-presc {
  4488. width: 70px;
  4489. height: 26px;
  4490. background: #ffae45;
  4491. border-radius: 4px;
  4492. font-size: 12px;
  4493. font-family: PingFang SC;
  4494. font-weight: 400;
  4495. color: #ffffff;
  4496. cursor: pointer;
  4497. margin-right: 20px;
  4498. }
  4499. .table-container {
  4500. padding: 37px 10px;
  4501. .t-con-header {
  4502. margin-bottom: 20px;
  4503. .t-con-radio {
  4504. flex: 1;
  4505. }
  4506. .t-radio-title {
  4507. width: 82px;
  4508. font-size: 16px;
  4509. font-family: PingFang SC;
  4510. font-weight: 400;
  4511. color: #333333;
  4512. }
  4513. .t-radio-group {
  4514. flex: 1;
  4515. }
  4516. .add-presc1 {
  4517. width: 84px;
  4518. height: 34px;
  4519. background: #ffae45;
  4520. border-radius: 4px;
  4521. font-size: 14px;
  4522. font-family: PingFang SC;
  4523. font-weight: bold;
  4524. color: #ffffff;
  4525. }
  4526. }
  4527. }
  4528. .table-show {
  4529. width: 100%;
  4530. // background: #5386F6;
  4531. // overflow: hidden;
  4532. .table-left-body {
  4533. width: 49.5%;
  4534. position: relative;
  4535. perspective: 100px;
  4536. padding-bottom: 53px;
  4537. }
  4538. .table-left {
  4539. width: 100%;
  4540. overflow-y: auto;
  4541. border: 1px solid #dedede;
  4542. box-sizing: border-box;
  4543. .table-l-hader {
  4544. white-space: nowrap;
  4545. div {
  4546. display: inline-block;
  4547. // padding: 15px 10px;
  4548. background: #f3fffb;
  4549. text-align: center;
  4550. height: 48px;
  4551. line-height: 48px;
  4552. border: 1px solid #dedede;
  4553. border-bottom: 0 !important;
  4554. // border-top: 0 !important;
  4555. }
  4556. .med-name {
  4557. margin-left: 50px;
  4558. }
  4559. .kucun {
  4560. padding-right: 120px;
  4561. }
  4562. .fixed-r {
  4563. position: fixed;
  4564. right: 0;
  4565. }
  4566. .fixed-left {
  4567. position: fixed;
  4568. left: 0;
  4569. }
  4570. }
  4571. .table-l-item {
  4572. white-space: nowrap;
  4573. .bg-green {
  4574. .div1 {
  4575. background: #f3fffb;
  4576. border: 1px solid #dedede;
  4577. }
  4578. }
  4579. .div1 {
  4580. display: inline-block;
  4581. // padding: 15px 10px;
  4582. background: #ffffff;
  4583. text-align: center;
  4584. height: 53px;
  4585. line-height: 53px;
  4586. border: 1px solid #dedede;
  4587. z-index: 9999;
  4588. border-top: 0 !important;
  4589. }
  4590. .med-name {
  4591. margin-left: 50px;
  4592. }
  4593. .kucun {
  4594. padding-right: 120px;
  4595. border-right: 1px solid #dedede;
  4596. }
  4597. .fixed-r {
  4598. position: fixed;
  4599. right: 0;
  4600. }
  4601. .fixed-left {
  4602. position: fixed;
  4603. left: 0;
  4604. // border-left: 1px solid #DEDEDE;
  4605. }
  4606. .no-data {
  4607. width: 100%;
  4608. box-sizing: border-box;
  4609. // border-top: 1px solid #DEDEDE;
  4610. position: relative;
  4611. left: 0;
  4612. right: 0;
  4613. bottom: 0px;
  4614. // float: left;
  4615. }
  4616. }
  4617. }
  4618. }
  4619. .operate {
  4620. width: 100%;
  4621. height: 100%;
  4622. display: flex;
  4623. align-items: center;
  4624. justify-content: space-around;
  4625. img {
  4626. width: 16px;
  4627. }
  4628. }
  4629. .bottom-input {
  4630. background: #fff;
  4631. padding: 12.5px 30px 12.5px 52px;
  4632. position: relative;
  4633. // z-index: 999;
  4634. // perspective: 100px;
  4635. .div {
  4636. width: 154px;
  4637. }
  4638. .table-choose {
  4639. z-index: 9999;
  4640. width: 332px;
  4641. height: 221px;
  4642. background: #ffffff;
  4643. border: 2px solid #d8d8d8;
  4644. position: relative;
  4645. top: 2px;
  4646. left: -48px;
  4647. overflow: auto;
  4648. .table-choose-h {
  4649. background: #f3fffb;
  4650. div {
  4651. height: 36px;
  4652. width: 73px;
  4653. }
  4654. div:first-child {
  4655. width: 115px;
  4656. }
  4657. }
  4658. .t-c-b {
  4659. cursor: pointer;
  4660. .td {
  4661. background: #f3fffb;
  4662. }
  4663. p {
  4664. border: 1px solid #ededed;
  4665. height: 36px;
  4666. width: 73px;
  4667. // flex: 1;
  4668. box-sizing: border-box;
  4669. }
  4670. p:first-child {
  4671. width: 115px;
  4672. }
  4673. }
  4674. }
  4675. }
  4676. .table-bottom {
  4677. // position: absolute;
  4678. // bottom: 0;
  4679. // right: 0;
  4680. // left: 0;\
  4681. padding: 0 37px;
  4682. margin-top: 241px;
  4683. .header-about {
  4684. .item {
  4685. margin-right: 20px;
  4686. margin-bottom: 10px;
  4687. span {
  4688. font-size: 16px;
  4689. font-family: PingFang SC;
  4690. font-weight: 400;
  4691. color: #333333;
  4692. }
  4693. .div1 {
  4694. width: 120px;
  4695. }
  4696. .div2 {
  4697. width: 74px;
  4698. }
  4699. .city1 {
  4700. width: 120px;
  4701. }
  4702. .div3 {
  4703. width: 92px;
  4704. }
  4705. .div4 {
  4706. width: 160px;
  4707. }
  4708. .input-suffix {
  4709. line-height: 36px;
  4710. }
  4711. }
  4712. .right {
  4713. width: 70px;
  4714. height: 26px;
  4715. background: #ffae45;
  4716. border-radius: 4px;
  4717. font-size: 14px;
  4718. font-family: PingFang SC;
  4719. font-weight: 400;
  4720. color: #ffffff;
  4721. margin-bottom: 10px;
  4722. cursor: pointer;
  4723. }
  4724. }
  4725. }
  4726. .table-b-bottom {
  4727. padding: 10px 27px;
  4728. border-top: 2px solid #dedede;
  4729. margin-top: 10px;
  4730. .t-b-l-item {
  4731. font-size: 16px;
  4732. font-family: PingFang SC;
  4733. font-weight: 400;
  4734. color: #333333;
  4735. margin-right: 20px;
  4736. span {
  4737. color: #ff6245;
  4738. }
  4739. }
  4740. .t-b-b-right {
  4741. div {
  4742. width: 130px;
  4743. height: 46px;
  4744. background: #ffae45;
  4745. border-radius: 4px;
  4746. font-size: 16px;
  4747. font-family: PingFang SC;
  4748. font-weight: 500;
  4749. color: #ffffff;
  4750. cursor: pointer;
  4751. }
  4752. .bg-green {
  4753. background: #5386f6;
  4754. margin-left: 20px;
  4755. }
  4756. }
  4757. }
  4758. // 中成药 和适宜技术配方
  4759. .chinese_medicine {
  4760. padding: 0 37px;
  4761. .clearer {
  4762. width: 84px;
  4763. height: 34px;
  4764. background: #ffae45;
  4765. border-radius: 4px;
  4766. font-size: 14px;
  4767. font-family: PingFang SC;
  4768. font-weight: bold;
  4769. color: #ffffff;
  4770. cursor: pointer;
  4771. margin-bottom: 20px;
  4772. }
  4773. .c-m-table {
  4774. width: 100%;
  4775. overflow: hidden;
  4776. .unit {
  4777. font-size: 14px;
  4778. font-family: PingFang SC;
  4779. font-weight: 400;
  4780. color: #000000;
  4781. // margin-left: 10px;
  4782. }
  4783. .input {
  4784. width: 40px;
  4785. }
  4786. }
  4787. }
  4788. }
  4789. }
  4790. }
  4791. .table-choose3 {
  4792. z-index: 99999;
  4793. width: 332px;
  4794. height: 221px;
  4795. background: #ffffff;
  4796. border: 2px solid #d8d8d8;
  4797. // position: absolute;
  4798. position: fixed;
  4799. margin-top: 33px;
  4800. // left: -4px;
  4801. overflow: auto;
  4802. .table-choose-h {
  4803. background: #f3fffb;
  4804. div {
  4805. height: 36px;
  4806. width: 73px;
  4807. }
  4808. div:first-child {
  4809. width: 115px;
  4810. }
  4811. }
  4812. .t-c-b {
  4813. cursor: pointer;
  4814. .td {
  4815. background: #f3fffb;
  4816. }
  4817. p {
  4818. border: 1px solid #ededed;
  4819. height: 36px;
  4820. width: 73px;
  4821. // flex: 1;
  4822. box-sizing: border-box;
  4823. }
  4824. p:first-child {
  4825. width: 115px;
  4826. }
  4827. }
  4828. }
  4829. .drug-body {
  4830. box-sizing: border-box;
  4831. // height: 50vh;
  4832. padding: 0 50px;
  4833. .drug-item {
  4834. font-size: 14px;
  4835. font-family: PingFang SC;
  4836. font-weight: 400;
  4837. color: #333333;
  4838. margin-bottom: 10px;
  4839. .trun-join {
  4840. display: flex;
  4841. align-items: center;
  4842. justify-content: flex-start;
  4843. }
  4844. .bg-yellow {
  4845. margin-left: 10px;
  4846. background: #ffae45 !important;
  4847. }
  4848. span {
  4849. display: inline-block;
  4850. width: 100px;
  4851. text-align-last: justify;
  4852. }
  4853. div {
  4854. flex: 1;
  4855. img {
  4856. width: 126px;
  4857. height: 126px;
  4858. // background: red;
  4859. margin-right: 32px;
  4860. }
  4861. span {
  4862. text-align-last: left;
  4863. }
  4864. }
  4865. .detail {
  4866. flex: 1;
  4867. .btns {
  4868. width: 80px;
  4869. height: 30px;
  4870. background: #5386f6;
  4871. border-radius: 2px 2px 2px 2px;
  4872. font-size: 14px;
  4873. font-family: PingFang SC;
  4874. font-weight: 400;
  4875. color: #ffffff;
  4876. cursor: pointer;
  4877. margin-bottom: 20px;
  4878. }
  4879. .drug-detail {
  4880. span {
  4881. text-align-last: left;
  4882. margin-right: 10px;
  4883. margin-bottom: 10px;
  4884. }
  4885. }
  4886. }
  4887. }
  4888. .drug-item1 {
  4889. font-size: 16px;
  4890. font-family: PingFang SC;
  4891. font-weight: 400;
  4892. color: #333333;
  4893. margin-bottom: 15px;
  4894. margin-right: 50px;
  4895. div {
  4896. flex: 1;
  4897. }
  4898. }
  4899. .mad-cy {
  4900. color: #5386f6;
  4901. font-weight: bold;
  4902. }
  4903. }
  4904. .testCase {
  4905. padding: 0 50px;
  4906. .testCase-item {
  4907. font-size: 14px;
  4908. font-family: PingFang SC;
  4909. font-weight: 400;
  4910. color: #333333;
  4911. margin-bottom: 10px;
  4912. .testCase-left {
  4913. text-align-last: justify;
  4914. width: 112px;
  4915. }
  4916. .testCase-right {
  4917. flex: 1;
  4918. }
  4919. .case-yijian {
  4920. margin-bottom: 15px;
  4921. span {
  4922. margin-right: 5px;
  4923. }
  4924. .testCase-btns {
  4925. width: 80px;
  4926. height: 30px;
  4927. background: #5386f6;
  4928. border-radius: 2px 2px 2px 2px;
  4929. font-size: 14px;
  4930. font-family: PingFang SC;
  4931. font-weight: 400;
  4932. color: #ffffff;
  4933. cursor: pointer;
  4934. }
  4935. }
  4936. .case-detial {
  4937. span {
  4938. margin-right: 20px;
  4939. margin-bottom: 15px;
  4940. }
  4941. }
  4942. }
  4943. .testCase-title {
  4944. font-size: 16px;
  4945. font-family: PingFang SC;
  4946. font-weight: 400;
  4947. color: #5386f6;
  4948. margin-bottom: 15px;
  4949. }
  4950. }
  4951. // 推荐方剂
  4952. .recommend {
  4953. cursor: pointer;
  4954. .arrow-left {
  4955. width: 11px;
  4956. height: 80px;
  4957. background: #d8d8d8;
  4958. border-radius: 6px;
  4959. img {
  4960. width: 6px;
  4961. }
  4962. }
  4963. .banner {
  4964. flex: 1;
  4965. height: 80px;
  4966. margin: 0 0px;
  4967. overflow-y: auto;
  4968. .r-banner-body {
  4969. cursor: pointer;
  4970. .r-body-item {
  4971. margin-bottom: 10px;
  4972. .med-name {
  4973. // width: 70px;
  4974. overflow: hidden;
  4975. text-overflow: ellipsis;
  4976. white-space: nowrap;
  4977. font-size: 14px;
  4978. font-family: PingFang SC;
  4979. font-weight: 400;
  4980. color: #333333;
  4981. span {
  4982. cursor: pointer;
  4983. }
  4984. }
  4985. .icon-expr {
  4986. width: 18px;
  4987. }
  4988. .med-name1 {
  4989. display: flex;
  4990. align-items: center;
  4991. justify-content: flex-start;
  4992. flex: 1;
  4993. img {
  4994. width: 18px;
  4995. margin-right: 5px;
  4996. }
  4997. span {
  4998. display: inline-block;
  4999. // width: 70px;
  5000. width: 100%;
  5001. // flex: 1;
  5002. // background: #5386F6;
  5003. overflow: hidden;
  5004. text-overflow: ellipsis;
  5005. white-space: nowrap;
  5006. font-size: 14px;
  5007. font-family: PingFang SC;
  5008. font-weight: 400;
  5009. // color: #333333;
  5010. color: #5386f6;
  5011. cursor: pointer;
  5012. }
  5013. }
  5014. // .med-name-bg:hover {
  5015. // background: #D8D8D8;
  5016. // }
  5017. .med-name:hover {
  5018. background: #d8d8d8;
  5019. }
  5020. .med-btns {
  5021. div {
  5022. width: 34px;
  5023. height: 20px;
  5024. background: #5386f6;
  5025. border-radius: 2px;
  5026. color: #fff;
  5027. font-size: 12px;
  5028. font-family: PingFang SC;
  5029. font-weight: 400;
  5030. cursor: pointer;
  5031. color: #ffffff;
  5032. }
  5033. .bg-yellow {
  5034. background: #ffae45;
  5035. margin-left: 10px;
  5036. }
  5037. }
  5038. }
  5039. }
  5040. }
  5041. .active {
  5042. color: #5386f6 !important;
  5043. }
  5044. }
  5045. .pre-steps::v-deep .el-step__icon.is-text {
  5046. border: 0;
  5047. }
  5048. .collapse::v-deep .el-collapse-item__header {
  5049. padding: 0 0 0 10px;
  5050. border-bottom: 1px dashed #ebeef5;
  5051. font-size: 14px;
  5052. font-family: PingFang SC;
  5053. font-weight: 500;
  5054. color: #333333;
  5055. }
  5056. .body-msg {
  5057. span {
  5058. font-size: 16px;
  5059. font-family: PingFang SC;
  5060. font-weight: 400;
  5061. color: #333333;
  5062. margin-bottom: 5px;
  5063. }
  5064. }
  5065. .collapse ::v-deep .el-collapse-item__content {
  5066. padding-bottom: 5px;
  5067. }
  5068. .c-m-table::v-deep .el-table .cell {
  5069. text-align: center;
  5070. }
  5071. .table-show::v-deep .el-table .cell {
  5072. text-align: center;
  5073. }
  5074. .c-m-table::v-deep .el-select input {
  5075. padding: 0 15px 0 5px;
  5076. }
  5077. .table-show ::v-deep .el-select input {
  5078. padding: 0 15px 0 5px;
  5079. }
  5080. .t_dose::v-deep .el-input__inner {
  5081. // text-align: left;
  5082. padding: 0 5px !important;
  5083. }
  5084. .city::v-deep .el-select input {
  5085. padding: 0 20px 0 10px;
  5086. // height: 32px;
  5087. }
  5088. .xuewei::v-deep .el-select {
  5089. width: 100%;
  5090. }
  5091. // 滚动条位置
  5092. .prescribing ::v-deep .__bar-is-vertical {
  5093. right: -1px !important;
  5094. }
  5095. // 隐藏横向滚动条
  5096. .prescribing ::v-deep .__bar-is-horizontal {
  5097. display: none !important;
  5098. }
  5099. .table-left-body::v-deep .el-table__empty-text {
  5100. color: #fff;
  5101. }
  5102. </style>
  5103. <style lang="scss" scoped>
  5104. @import "../../style/media/diagnosis/prescribing.scss";
  5105. </style>
  5106. <style lang="scss">
  5107. /* @media screen and (max-width: 768px) {
  5108. body {
  5109. width: 100% !important;
  5110. }
  5111. } */
  5112. .message-rational-safe-use-wrapper {
  5113. align-items: flex-start;
  5114. max-height: 80vh;
  5115. overflow-y: auto;
  5116. &.el-message-box {
  5117. overflow-y: hidden;
  5118. .el-message-box__content {
  5119. max-height: calc(80vh - 45px - 48px);
  5120. overflow: auto;
  5121. }
  5122. }
  5123. .title {
  5124. font-size: 16px;
  5125. font-weight: 700;
  5126. }
  5127. .content {
  5128. margin: 12px 0;
  5129. > div {
  5130. margin: 8px 0;
  5131. }
  5132. }
  5133. .el-message__content {
  5134. width: 100%;
  5135. color: #333;
  5136. }
  5137. }
  5138. </style>