Prescribing.vue 171 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595
  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 v-if="!item.hide" :key="item.id" class="flex-center" :class="{active: container_i === index}"
  280. @click="changeContainer(item, index)">
  281. <span :style="{color:item.color}">{{ item.name }}</span>
  282. </div>
  283. </template>
  284. </div>
  285. <div class="header-total flex-vertical-center-r flex-wrap" v-if="false">
  286. <div v-if="contentTabs[0].check">
  287. 中药处方总费用:
  288. <span>{{chineseM.allMoney}}元</span>
  289. </div>
  290. <div v-if="contentTabs[1].check">
  291. 中药制剂总费用:
  292. <span>{{medicineC.allMoney}}元</span>
  293. </div>
  294. <div v-if="contentTabs[2].check">
  295. 适宜技术处方总费用:
  296. <span>{{suitScience.allMoney}}元</span>
  297. </div>
  298. <div>
  299. 合计费用:
  300. <span>{{totalPrice}}元</span>
  301. </div>
  302. </div>
  303. <!-- 右侧按钮 -->
  304. <div class="flex-vertical-center-r flex-wrap">
  305. <el-button v-if="showPrec" size="mini" @click="openUnifyPrescPrec" type="primary">萧然医派协定方</el-button>
  306. <el-button size="mini" key="tongue" :loading="tongueAndFaceLoading" :disabled="!tongueAndFaceAnalysis" @click="openTongueAndFaceAnalysis" type="primary">舌面诊影像</el-button>
  307. <el-button
  308. size="mini"
  309. type="primary"
  310. @click="handleReplenish"
  311. >{{ innerWidth > 768 ? '补充中医电子病历' :'补充病历' }}</el-button>
  312. <el-button size="mini" @click="openDCase" v-if="showPrec && isShrink">参考医案</el-button>
  313. <el-button v-if="showPrec" size="mini" @click="openPrec" type="primary">协定方/方剂</el-button>
  314. <el-popover
  315. placement="left"
  316. title
  317. width="150"
  318. trigger="hover"
  319. v-if="rRecomendR.length>0 && isShrink"
  320. style="margin-left:10px;"
  321. >
  322. <!-- hover -->
  323. <el-button size="mini" type="primary" slot="reference">推荐的方剂</el-button>
  324. <template>
  325. <div class="recommend flex-center" style="width:100%">
  326. <div class="banner">
  327. <div class="r-banner-body">
  328. <div
  329. class="r-body-item flex-vertical-between"
  330. v-for="(item1,index1) in rRecomendR"
  331. :key="'c'+index1"
  332. >
  333. <div
  334. :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid || tjRecipeId==item1.acupreid ?'active':'',]"
  335. v-if="item1.showType==0"
  336. @click.stop="getPreDetal(item1.preid || item1,1)"
  337. >
  338. <span v-if="item1.prename">{{item1.prename}}</span>
  339. <span
  340. v-else
  341. >{{item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}}</span>
  342. <!-- {{item1.prename?item1.prename+'('+item1.book?item1.book:'暂无'+')': item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}} -->
  343. </div>
  344. <!-- 经验方 -->
  345. <div
  346. :class="['med-name med-name-bg',tjRecipeId==item1.preid ||tjRecipeId==item1.pid ?'active':'',]"
  347. v-else
  348. @click="getExperinceDetail(item1.pid)"
  349. >
  350. <!-- <img src='~@/assets/expr.png' v-if="item1.showType==1" class="icon-expr" /> -->
  351. <span>{{item1.name}}({{item1.experttitle}})</span>
  352. </div>
  353. </div>
  354. </div>
  355. </div>
  356. </div>
  357. </template>
  358. </el-popover>
  359. <el-button size="mini" type="primary" v-if="showPrec && isShrink&&rRecomendR.length==0">推荐的方剂</el-button>
  360. </div>
  361. </div>
  362. <!-- 代煎/配送 -->
  363. <!-- <div class="address">
  364. <medAdress
  365. ref="medAdress"
  366. :container_i="container_i"
  367. @psChange="psChange"
  368. @djChange="djChange"
  369. :isShowDj="isShowDj"
  370. :isShowPs="isShowPs"
  371. ></medAdress>
  372. </div>-->
  373. <!-- 表格数据展示 -->
  374. <div class="center-table">
  375. <chinese-medicine
  376. @find="findDrug($event)"
  377. v-show="container_i===0"
  378. id="chineseM"
  379. ref="chineseM"
  380. :totalAllMoney.sync="chineseM.allMoney"
  381. @submit="submitRecipe1()"
  382. @clear="clearContainer('0')"
  383. :showSubmit="showSubmit"
  384. :isShrink="isShrink"
  385. :isDaiJian="Number(isDaiJian)"
  386. :isPs="isPs"
  387. @updateDp="onUpdateDp"
  388. ></chinese-medicine>
  389. <medicineChinese
  390. @find="findDrug($event)"
  391. v-show="container_i==1"
  392. ref="medicineC"
  393. id="medicineC"
  394. @submit="submitRecipe1()"
  395. @clear="clearContainer('1')"
  396. :totalAllMoney.sync="medicineC.allMoney"
  397. :showSubmit="showSubmit"
  398. :isPs="isPs"
  399. ></medicineChinese>
  400. <suitScience
  401. @find="find($event)"
  402. v-show="container_i==2"
  403. ref="suitScience"
  404. id="suitScience"
  405. @submit="submitRecipe1()"
  406. @clear="clearContainer('2')"
  407. :totalAllMoney.sync="suitScience.allMoney"
  408. :showSubmit="showSubmit"
  409. ></suitScience>
  410. </div>
  411. </div>
  412. <div class="pre-right" v-show="container_i!=1 && !isShrink">
  413. <!-- 标题信息 -->
  414. <div class="pre-title flex-vertical-between">
  415. <div class="flex-vertical-center-l title-container">
  416. <span></span>
  417. <div>推荐的方剂</div>
  418. </div>
  419. <!-- <div class="tuidao flex-center" @click="inferRecipe(2)" v-if="rRecomendR.length>0">推导</div> -->
  420. </div>
  421. <!-- 推荐方剂 -->
  422. <div class="recommend flex-center" v-if="rRecomendR.length>0">
  423. <!-- <div class="arrow-left flex-center" @click="changeRbanner('reduce')">
  424. <img src="../../assets/arrow-left.png" alt="">
  425. </div>-->
  426. <div class="banner">
  427. <!-- <el-carousel ref="r_banner" height="80px" :initial-index='r_current' arrow='never' indicator-position='none'
  428. :autoplay='false'>-->
  429. <!-- <el-carousel-item v-for="(item,index) in rRecomendR" :key="'b'+index"> -->
  430. <div class="r-banner-body">
  431. <div
  432. class="r-body-item flex-vertical-between"
  433. v-for="(item1,index1) in rRecomendR"
  434. :key="'c'+index1"
  435. >
  436. <div class="med-name med-name-bg"
  437. :class="{active: tjRecipeId && (tjRecipeId==item1.preid ||tjRecipeId==item1.pid || tjRecipeId==item1.acupreid)}"
  438. v-if="item1.showType==0"
  439. @click.stop="getPreDetal(item1.preid || item1,1)"
  440. >
  441. <span v-if="item1.prename">{{item1.prename}}</span>
  442. <span
  443. v-else
  444. >{{item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}}</span>
  445. <!-- {{item1.prename?item1.prename+'('+item1.book?item1.book:'暂无'+')': item1.acupretype==1?'针灸':item1.acupretype==2?'艾灸':item1.acupretype==3?'推拿':'拔罐'}} -->
  446. </div>
  447. <!-- 经验方 -->
  448. <div class="med-name med-name-bg"
  449. :class="{active: tjRecipeId && (tjRecipeId==item1.preid ||tjRecipeId==item1.pid) }"
  450. v-else
  451. @click="getExperinceDetail(item1.pid)"
  452. >
  453. <!-- <img src='~@/assets/expr.png' v-if="item1.showType==1" class="icon-expr" /> -->
  454. <span>{{item1.name}}({{item1.experttitle}})</span>
  455. </div>
  456. <!-- <div class="med-btns flex-vertical-center-r"> -->
  457. <!-- 专家经验换方 -->
  458. <!-- <div class="flex-center" v-if="item1.showType==1" @click.self.stop="turnRecipe3(item1)">换方</div>
  459. <div class="flex-center bg-yellow" v-if="item1.showType==1" @click.self.stop="joinRecipe3(item1)">合方
  460. </div>
  461. <div class="flex-center" v-if="item1.showType==0"
  462. @click.self.stop="inferChange(item1,item1.prename?'':1,item1.prename?'':1)">换方</div>
  463. <div class="bg-yellow flex-center" v-if="item1.showType==0"
  464. @click.self.stop="inferChange1(item1,item1.prename?'':1,item1.prename?'':1)">合方
  465. </div>-->
  466. <!-- </div> -->
  467. </div>
  468. </div>
  469. <!-- </el-carousel-item> -->
  470. <!-- </el-carousel> -->
  471. </div>
  472. <!-- <div class="arrow-left flex-center" @click="changeRbanner('add')">
  473. <img src="../../assets/arrow-right.png" alt="">
  474. </div>-->
  475. </div>
  476. <!-- 安全合理用药检测 -->
  477. <div class="pre-title mr-t10" v-if="container_i!=2">
  478. <div class="flex-vertical-center-l title-container">
  479. <span></span>
  480. <div>安全合理用药检测</div>
  481. </div>
  482. <div class="patiens-msg mr-t10" v-if="rationalMed.length>0">
  483. <div class="p" v-if="raDoseShow">
  484. <!-- {{item.matname}}({{item.matbzjj}}) -->
  485. <!-- <div class="patiens-name">{{item.matname}}</div> -->
  486. <div class="patiens-cate">超剂量药品:</div>
  487. <div class="patiens-desc" v-for="(item,index) in rationalMed10" :key="index">
  488. <span v-if="item.showDose">
  489. <span class="matname">{{item.matname}}</span>
  490. <span style="color:red;">({{item.matmindosage}}-{{item.matmaxdosage}})</span>
  491. </span>
  492. </div>
  493. </div>
  494. <div class="p" v-if="rationalMed2.length>0">
  495. <div class="patiens-cate">慎忌禁用药:</div>
  496. <div class="patiens-desc" v-for="(item,index) in rationalMed2" :key="index">
  497. <span v-if="item.matsjj">
  498. <span class="matname">{{item.matname}}</span>
  499. ({{item.matsjj |ftsjj}})
  500. </span>
  501. </div>
  502. </div>
  503. <div class="p" v-if="rationalMed3.length>0">
  504. <div class="patiens-cate">孕妇慎忌禁:</div>
  505. <div class="patiens-desc" v-for="(item,index) in rationalMed3" :key="index">
  506. <span v-if="item.matyfsjj">
  507. <span class="matname">{{item.matname}}</span>
  508. <span :style="{color:item.matyfsj==3?'red':''}">({{item.matyfsjj |fyfsjj}})</span>
  509. </span>
  510. </div>
  511. </div>
  512. <div class="p" v-if="rationalMed4.length>0">
  513. <div class="patiens-cate">服药饮食禁忌:</div>
  514. <div class="patiens-desc" v-for="(item,index) in rationalMed4" :key="index">
  515. <span v-if="item.matysjj">
  516. <span class="matname">{{item.matname}}</span>
  517. ({{item.matysjj?item.matysjj:'无'}})
  518. </span>
  519. </div>
  520. </div>
  521. <div class="p" v-if="rationalMed5.length>0">
  522. <div class="patiens-cate">药物毒性说明:</div>
  523. <div class="patiens-desc" v-for="(item,index) in rationalMed5" :key="index">
  524. <span v-if="item.matdxsm">
  525. <span class="matname" style="color:red;">{{item.matname}}</span>
  526. ({{item.matdxsm?item.matdxsm:'无'}})
  527. </span>
  528. </div>
  529. </div>
  530. <div class="p" v-if="rationalMed6.length>0">
  531. <div class="patiens-cate">病证用药禁忌:</div>
  532. <div class="patiens-desc" v-for="(item,index) in rationalMed6" :key="index">
  533. <span v-if="item.matbzjj">
  534. <span class="matname">{{item.matname}}</span>
  535. ({{item.matbzjj?item.matbzjj:'无'}})
  536. </span>
  537. </div>
  538. </div>
  539. <div class="p" v-if="rationalMed7.length>0">
  540. <div class="patiens-cate">十八反:</div>
  541. <div class="patiens-desc" v-for="(item,index) in rationalMed7" :key="index">
  542. <!-- <span v-if='item.matsbf'>{{fsbf(item.matsbf,item.matname)}}</span> -->
  543. <span v-if="item.matsbf">
  544. <span style="color:red;">{{item.matname}}</span>
  545. 反{{item.matsbf}}
  546. </span>
  547. </div>
  548. </div>
  549. <div class="p" v-if="rationalMed8.length>0">
  550. <div class="patiens-cate">十九畏:</div>
  551. <div class="patiens-desc" v-for="(item,index) in rationalMed8" :key="index">
  552. <!-- <span v-if="item.matsjw">{{fsjw(item.matsjw,item.matname)}}</span> -->
  553. <span v-if="item.matsjw">
  554. <span style="color:red;">{{item.matname}}</span>
  555. 畏{{item.matsjw}}
  556. </span>
  557. </div>
  558. </div>
  559. <div class="p" v-if="rationalMed9.length>0">
  560. <div class="patiens-cate">用药不宜:</div>
  561. <div class="patiens-desc" v-for="(item,index) in rationalMed9" :key="index">
  562. <span v-if="item.matby">{{fmatby(item.matby,item.matname) }}</span>
  563. </div>
  564. </div>
  565. </div>
  566. </div>
  567. </div>
  568. <!-- 方剂详情 -->
  569. <Popup
  570. :showDialog="showDialog"
  571. distanceTop="3vh"
  572. @cancle="changeRecipe"
  573. title="方剂详情"
  574. @confim="joinRecipe()"
  575. confimText="合方"
  576. cancleText="换方"
  577. :cancleStyle="{background:'#FFB55F',color:'#fff'}"
  578. width="700px"
  579. >
  580. <div class="drug-body" slot="body">
  581. <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
  582. <span>方剂名:</span>
  583. <div>{{preInfo.prename}}</div>
  584. </div>
  585. <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
  586. <span>功效:</span>
  587. <div>{{preInfo.efficacy}}</div>
  588. </div>
  589. <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
  590. <span>主治:</span>
  591. <div>{{preInfo.indication}}</div>
  592. </div>
  593. <div class="drug-item flex-plane-center-l">
  594. <span>处方明细:</span>
  595. <div class="flex-vertical-center-l flex-wrap">
  596. <span
  597. v-for="(item,index) in preInfo.items"
  598. :key="'e'+index"
  599. >{{item.matname || item.acuname}}{{item.dose}}{{item.unit}}</span>
  600. </div>
  601. </div>
  602. <div class="drug-item flex-plane-center-l">
  603. <span>方解:</span>
  604. <div>{{preInfo.annotation ||preInfo.operation}}</div>
  605. </div>
  606. <div v-if="preInfo.prename" class="drug-item flex-plane-center-l">
  607. <span>用法:</span>
  608. <div>{{preInfo.preusage}}</div>
  609. </div>
  610. <div class="drug-item flex-plane-center-l">
  611. <span>出处:</span>
  612. <div>{{preInfo.presource || preInfo.book}}</div>
  613. </div>
  614. </div>
  615. </Popup>
  616. <!-- 药品详情 -->
  617. <Popup
  618. width="80%"
  619. :showDialog="showDrug"
  620. @cancle="showDrug=false"
  621. distanceTop="3vh"
  622. title="药品详情"
  623. :showBtns="false"
  624. >
  625. <div class="drug-body" slot="body">
  626. <div class="drug-item flex-plane-center-l">
  627. <span>名称:</span>
  628. <div>{{drugInfo.matname}}</div>
  629. </div>
  630. <div class="drug-item flex-plane-center-l">
  631. <span>别名:</span>
  632. <div>{{drugInfo.matsynonyms}}</div>
  633. </div>
  634. <div class="drug-item flex-plane-center-l">
  635. <span>剂量区间:</span>
  636. <div>{{drugInfo.matmindosage}}-{{drugInfo.matmaxdosage}}{{drugInfo.unit}}</div>
  637. </div>
  638. <div class="drug-item flex-plane-center-l">
  639. <span>单位:</span>
  640. <div>{{drugInfo.unit}}</div>
  641. </div>
  642. <div class="drug-item flex-plane-center-l">
  643. <span>用法:</span>
  644. <div>{{drugInfo.matusage}}</div>
  645. </div>
  646. <div class="drug-item flex-plane-center-l">
  647. <span>用法禁忌:</span>
  648. <div>{{drugInfo.matsjj}}</div>
  649. </div>
  650. <div class="drug-item flex-plane-center-l">
  651. <span>性味:</span>
  652. <div>{{drugInfo.matflavour}}</div>
  653. </div>
  654. <div class="drug-item flex-plane-center-l">
  655. <span>归经:</span>
  656. <div>{{drugInfo.matmeridian}}</div>
  657. </div>
  658. <div class="drug-item flex-plane-center-l">
  659. <span>功效:</span>
  660. <div>{{drugInfo.matefficacy}}</div>
  661. </div>
  662. <div class="drug-item flex-plane-center-l">
  663. <span>应用:</span>
  664. <div>{{drugInfo.matapplication}}</div>
  665. </div>
  666. <div class="drug-item flex-plane-center-l">
  667. <span>使用注意:</span>
  668. <div>
  669. <div>{{drugInfo.mattaboo}}</div>
  670. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  671. </div>
  672. </div>
  673. <div class="drug-item flex-plane-center-l">
  674. <span>图示:</span>
  675. <div
  676. class="flex-plane-center-l"
  677. v-for="(item,index) in drugInfo.matphoto"
  678. :key="'f'+index"
  679. >
  680. <img :src="item" alt />
  681. </div>
  682. </div>
  683. <div class="flex-vertical-center-l flex-wrap">
  684. <div class="drug-item1 flex-plane-center-l">
  685. <span>相似中药鉴别使用:</span>
  686. <div>
  687. <div v-for="(item,index) in drugInfo.xiangsi" :key="'g'+index">
  688. <span
  689. class="mad-cy"
  690. v-for="(item1,index1) in item.relmats"
  691. :key="'h'+index1"
  692. >{{item1.matname}}{{index1==item.relmats.length-1?'':'、'}}</span>
  693. <div style="margin-bottom:10px;">{{item.differencedesc}}</div>
  694. </div>
  695. </div>
  696. </div>
  697. </div>
  698. <div class="flex-vertical-center-l flex-wrap">
  699. <div class="drug-item1 flex-plane-center-l">
  700. <span>常用药对:</span>
  701. <div>
  702. <div v-for="(item,index) in drugInfo.changyong" :key="index">
  703. <span
  704. class="mad-cy"
  705. v-for="(item1,index1) in item.relmats"
  706. :key="'i'+index1"
  707. >{{item1.matname}}{{index1==item.relmats.length-1?'':'、'}}</span>
  708. <div style="margin-bottom:10px;">{{item.differencedesc}}</div>
  709. </div>
  710. </div>
  711. </div>
  712. </div>
  713. </div>
  714. </Popup>
  715. <!-- 药品详情 -->
  716. <Popup
  717. width="50%"
  718. distanceTop="5vh"
  719. :showDialog="showXuewei"
  720. @cancle="showXuewei=false"
  721. title="穴位详情"
  722. :showBtns="false"
  723. >
  724. <div class="drug-body" slot="body">
  725. <div class="drug-item flex-plane-center-l">
  726. <span>穴位名称:</span>
  727. <div>
  728. <div>{{xwinfo.acuname}}</div>
  729. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  730. </div>
  731. </div>
  732. <div class="drug-item flex-plane-center-l">
  733. <span>定位:</span>
  734. <div>
  735. <div>{{xwinfo.acuposotion}}</div>
  736. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  737. </div>
  738. </div>
  739. <div class="drug-item flex-plane-center-l">
  740. <span>解剖:</span>
  741. <div>
  742. <div>{{xwinfo.acudiscection}}</div>
  743. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  744. </div>
  745. </div>
  746. <div class="drug-item flex-plane-center-l">
  747. <span>主治:</span>
  748. <div>
  749. <div>{{xwinfo.acumaintreat}}</div>
  750. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  751. </div>
  752. </div>
  753. <div class="drug-item flex-plane-center-l">
  754. <span>操作:</span>
  755. <div>
  756. <div>{{xwinfo.acuoperation}}</div>
  757. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  758. </div>
  759. </div>
  760. <div class="drug-item flex-plane-center-l">
  761. <span>针刺:</span>
  762. <div>
  763. <div>{{xwinfo.acuneedling}}</div>
  764. <!-- <div>2.通常补血用当归身,活血用当归尾,补血活血用全当归</div> -->
  765. </div>
  766. </div>
  767. <div class="drug-item flex-plane-center-l">
  768. <span>图示:</span>
  769. <!-- <div class="flex-plane-center-l" v-for="(item,index) in drugInfo.acuimg" :key="index">
  770. <img :src="item" alt="">
  771. </div>-->
  772. <div class="img">
  773. <img :src="xwinfo.acuimg" alt />
  774. </div>
  775. </div>
  776. </div>
  777. </Popup>
  778. <!-- 我的协定方 -->
  779. <Popup
  780. :showDialog="showAgree"
  781. @cancle="showAgree=false"
  782. distanceTop="5vh"
  783. title="我的协定方"
  784. :showBtns="false"
  785. >
  786. <div class="drug-body" slot="body">
  787. <div class="drug-item flex-plane-center-l">
  788. <span>方名:</span>
  789. <div>{{agreeInfo.name}}</div>
  790. </div>
  791. <div class="drug-item flex-plane-center-l">
  792. <span>功效适应症:</span>
  793. <div>{{agreeInfo.effect}}</div>
  794. </div>
  795. <div class="drug-item flex-plane-center-l">
  796. <span>类别:</span>
  797. <div>{{agreeInfo.type=='0'?'组方':'配方'}}</div>
  798. </div>
  799. <div class="drug-item flex-plane-center-l">
  800. <span>明细:</span>
  801. <div class="detail">
  802. <p class="flex-center btns" @click="agreeTurnRecipe(agreeInfo)">转方</p>
  803. <p class="drug-detail flex-plane-center-l flex-wrap">
  804. <span
  805. v-for="(item,index) in agreeInfo.preStiDetails"
  806. :key="item.ypmc+index"
  807. >{{item.ypmc}}{{item.dose}}{{item.dw}}</span>
  808. </p>
  809. </div>
  810. </div>
  811. <div class="drug-item flex-plane-center-l">
  812. <span>分享医生:</span>
  813. <div>{{agreeInfo.createName}}</div>
  814. </div>
  815. </div>
  816. </Popup>
  817. <!-- 专家经验 -->
  818. <Popup
  819. :showDialog="showExpr"
  820. distanceTop="5vh"
  821. @cancle="showExpr=false"
  822. title="专家经验"
  823. :showBtns="false"
  824. width="700px"
  825. >
  826. <div class="drug-body" slot="body">
  827. <div class="drug-item flex-plane-center-l">
  828. <span>方名:</span>
  829. <div>{{exprInfo.name}}</div>
  830. </div>
  831. <div class="drug-item flex-plane-center-l">
  832. <span>方解:</span>
  833. <div>{{exprInfo.solution}}</div>
  834. </div>
  835. <div class="drug-item flex-plane-center-l">
  836. <span>功效适应症:</span>
  837. <div>{{exprInfo.effect}}</div>
  838. </div>
  839. <div class="drug-item flex-plane-center-l">
  840. <span>明细:</span>
  841. <div class="detail">
  842. <div class="trun-join">
  843. <p class="flex-center btns" @click="turnRecipe3(exprInfo)">转方</p>
  844. <p class="flex-center btns bg-yellow" @click="joinRecipe3(exprInfo)">合方</p>
  845. </div>
  846. <p class="drug-detail flex-plane-center-l flex-wrap">
  847. <span
  848. v-for="item in exprInfo.prescriptionDetailVos"
  849. :key="item.drugname+item.pid"
  850. >{{item.drugname}}{{item.dose}}{{item.unit}}</span>
  851. </p>
  852. </div>
  853. </div>
  854. <div class="drug-item flex-plane-center-l">
  855. <span>专家名称:</span>
  856. <div>{{exprInfo.expert}}</div>
  857. </div>
  858. </div>
  859. </Popup>
  860. <!-- 名家验案详情 -->
  861. <Popup
  862. :showDialog="showTestCase"
  863. distanceTop="5vh"
  864. @cancle="showTestCase=false"
  865. title="名家验案详情"
  866. :showBtns="false"
  867. width="700px"
  868. >
  869. <div slot="body" class="testCase">
  870. <div class="testCase-item flex-plane-center-l">
  871. <span class="testCase-left">性别:</span>
  872. <div class="testCase-right">{{testCaseInfo.patientgender=='M'?'男':'女'}}</div>
  873. </div>
  874. <div class="testCase-item flex-plane-center-l">
  875. <span class="testCase-left">年龄:</span>
  876. <div class="testCase-right">{{testCaseInfo.patientage}}岁</div>
  877. </div>
  878. <div class="testCase-item flex-plane-center-l">
  879. <span class="testCase-left">婚姻:</span>
  880. <div class="testCase-right">{{testCaseInfo.patientmarriage=='0'?'未婚':'已婚'}}</div>
  881. </div>
  882. <div class="testCase-item flex-plane-center-l" v-if="testCaseInfo.dialist">
  883. <span class="testCase-left">主诉及现病史:</span>
  884. <div class="testCase-right">{{testCaseInfo.dialist[0].situation}}</div>
  885. </div>
  886. <div class="testCase-item flex-plane-center-l">
  887. <span class="testCase-left">辩证:</span>
  888. <div class="testCase-right">{{testCaseInfo.chinesesymptom}}</div>
  889. </div>
  890. <div class="testCase-item flex-plane-center-l">
  891. <span class="testCase-left">治法:</span>
  892. <div class="testCase-right">{{testCaseInfo.therapy}}</div>
  893. </div>
  894. <div v-for="(item,index) in testCaseInfo.dialist" :key="index">
  895. <div class="testCase-title">{{index==0?'初诊':item.diatimes+'诊'}}</div>
  896. <div class="testCase-item flex-plane-center-l">
  897. <span class="testCase-left">就诊日期:</span>
  898. <div class="testCase-right">{{item.checktime[0]}}</div>
  899. </div>
  900. <div class="testCase-item flex-plane-center-l">
  901. <span class="testCase-left">治疗意见:</span>
  902. <div
  903. class="testCase-right"
  904. v-for="(item1,index1) in item.fjlist"
  905. :key="item1.preusage+index1"
  906. >
  907. <div class="flex-vertical-center-l case-yijian">
  908. <span>{{item1.preusage}}</span>
  909. <div class="testCase-btns flex-center" @click="turnRecipe(item1)">转方</div>
  910. </div>
  911. <div class="flex-vertical-center-l flex-wrap case-detial">
  912. <span
  913. v-for="(item2,index2) in item1.verpreitemlist"
  914. :key="item2.matname+index2"
  915. >{{item2.matname}}{{item2.dose}}{{item2.unit}}</span>
  916. </div>
  917. </div>
  918. </div>
  919. </div>
  920. <div class="testCase-item flex-plane-center-l">
  921. <span class="testCase-left">按语:</span>
  922. <div class="testCase-right">{{testCaseInfo.words}}</div>
  923. </div>
  924. <div class="testCase-item flex-plane-center-l">
  925. <span class="testCase-left">来源:</span>
  926. <div class="testCase-right">{{testCaseInfo.book}}</div>
  927. </div>
  928. </div>
  929. </Popup>
  930. <!-- 就诊记录详情 -->
  931. <Popup :showDialog="showRecord" @cancle="showRecord=false" title="就诊记录详情" :showBtns="false">
  932. <div slot="body" class="testCase" v-if="recordInfo.patient">
  933. <div class="testCase-item flex-plane-center-l">
  934. <span class="testCase-left">姓名:</span>
  935. <div class="testCase-right">{{recordInfo.patient.name}}</div>
  936. </div>
  937. <div class="testCase-item flex-plane-center-l">
  938. <span class="testCase-left">性别:</span>
  939. <div class="testCase-right">{{recordInfo.patient.sex}}</div>
  940. </div>
  941. <div class="testCase-item flex-plane-center-l">
  942. <span class="testCase-left">年龄:</span>
  943. <div class="testCase-right">{{recordInfo.patient.age}}岁</div>
  944. </div>
  945. <div class="testCase-item flex-plane-center-l">
  946. <span class="testCase-left">医疗机构:</span>
  947. <div class="testCase-right">{{recordInfo.patient.institutionidSelsourceName}}</div>
  948. </div>
  949. <div class="testCase-item flex-plane-center-l">
  950. <span class="testCase-left">科室名称:</span>
  951. <div class="testCase-right">{{recordInfo.patient.institutionidSelsourceName}}</div>
  952. </div>
  953. <div class="testCase-item flex-plane-center-l">
  954. <span class="testCase-left">诊断:</span>
  955. <div class="testCase-right">
  956. <div>中医诊断:{{recordInfo.mainDiagnosis.namemedicine?recordInfo.mainDiagnosis.namemedicine:'无'}}</div>
  957. <div>西医诊断:{{recordInfo.mainDiagnosis.diagnosis?recordInfo.mainDiagnosis.diagnosis:'无'}}</div>
  958. </div>
  959. </div>
  960. <div class="testCase-item flex-plane-center-l">
  961. <span class="testCase-left">治疗意见:</span>
  962. <div
  963. class="testCase-right"
  964. v-for="(item,index) in recordInfo.patientprescription"
  965. :key="'i'+index"
  966. >
  967. <div class="flex-vertical-center-l case-yijian">
  968. <span>{{item.type=='0'?'中药处方'+(index+1):item.type=='1'?'中药制剂':'适宜技术处方'}}</span>
  969. <div class="testCase-btns flex-center" @click="turnRecipe1(item)">转方</div>
  970. </div>
  971. <div class="flex-vertical-center-l flex-wrap case-detial">
  972. <span
  973. v-for="(item1,index1) in item.myPatientDetailVos"
  974. :key="item1.name+index1"
  975. >{{item1.name}}{{item1.num}}{{item1.unit}}</span>
  976. </div>
  977. </div>
  978. </div>
  979. <div class="testCase-item flex-plane-center-l">
  980. <span class="testCase-left">开方医生:</span>
  981. <div
  982. class="testCase-right"
  983. >{{recordInfo.patientprescription.length>0?recordInfo.patientprescription[0].updateUser:'无'}}</div>
  984. </div>
  985. <div class="testCase-item flex-plane-center-l">
  986. <span class="testCase-left">时间:</span>
  987. <div
  988. class="testCase-right"
  989. >{{recordInfo.patientprescription.length>0?recordInfo.patientprescription[0].updateTime:'无'}}</div>
  990. </div>
  991. </div>
  992. </Popup>
  993. <!-- 处方预览 -->
  994. <submitRecipe :show.sync="showPriview" :priviewData="priviewData"></submitRecipe>
  995. <!-- <div style="position:fixed;top:0;z-index:9999;width:100vw;">
  996. <suitMadePad></suitMadePad>
  997. </div>-->
  998. <!--参考医案例 页面768-->
  999. <Popup
  1000. :showDialog="showCase"
  1001. @cancle="showCase=false"
  1002. title="参考医案"
  1003. :showBtns="false"
  1004. width="700px"
  1005. distanceTop="5vh"
  1006. >
  1007. <div slot="body">
  1008. <doctorCase :searchKey="agree_key1"></doctorCase>
  1009. </div>
  1010. </Popup>
  1011. <!-- 查询协定方 方剂 页面768 -->
  1012. <Popup
  1013. :showDialog="showPresc"
  1014. @cancle="showPresc=false"
  1015. title="查询方剂/查询协定方"
  1016. :showBtns="false"
  1017. width="78%"
  1018. distanceTop="5vh"
  1019. >
  1020. <div slot="body">
  1021. <prescription></prescription>
  1022. </div>
  1023. </Popup>
  1024. <!-- 查询萧然医派协定方 页面768 -->
  1025. <Popup
  1026. :showDialog="showUnifyPresc"
  1027. @cancle="showUnifyPresc=false"
  1028. title="查询萧然医派协定方"
  1029. :showBtns="false"
  1030. width="78%"
  1031. distanceTop="5vh"
  1032. >
  1033. <div slot="body">
  1034. <UnifyPrescription></UnifyPrescription>
  1035. </div>
  1036. </Popup>
  1037. <!-- 查询舌象分析 页面768 -->
  1038. <Popup
  1039. :showDialog="showTongueAnalysis"
  1040. @cancle="showTongueAnalysis=false"
  1041. title="舌面诊影像"
  1042. :showBtns="false"
  1043. width="70%"
  1044. distanceTop="5vh"
  1045. >
  1046. <div style="height: 100%" slot="body">
  1047. <TongueAnalysis v-if="showTongueAnalysis" :dataset="tongueAndFaceAnalysis"></TongueAnalysis>
  1048. </div>
  1049. </Popup>
  1050. <!-- 安全合理用药弹窗 -->
  1051. <!-- 查询协定方 方剂 页面768 -->
  1052. <Popup
  1053. :showDialog.sync="showSafeD"
  1054. @cancle="showSafeD=false"
  1055. title="安全合理用药检测"
  1056. :showBtns="false"
  1057. width="700px"
  1058. distanceTop="5vh"
  1059. :destroyOnClose="true"
  1060. >
  1061. <div slot="body">
  1062. <safeDrug v-if="showSafeD"></safeDrug>
  1063. </div>
  1064. </Popup>
  1065. <!-- 选择代煎 地址栏 -->
  1066. <Popup
  1067. :showDialog="showAddress"
  1068. @cancle="submitAddress(true)"
  1069. @confim="submitAddress()"
  1070. title="请和患者确认以下信息"
  1071. width="700px"
  1072. distanceTop="5vh"
  1073. >
  1074. <div slot="body">
  1075. <medAdressNew
  1076. ref="medAdress"
  1077. :isDaijian="Number(isDaiJian)"
  1078. :isPs="Number(isPs)"
  1079. :isShowDj="isShowDj"
  1080. :isShowPs="isShowPs"
  1081. ></medAdressNew>
  1082. </div>
  1083. </Popup>
  1084. </div>
  1085. </template>
  1086. <script>
  1087. import Popup from "@/components/Propup.vue";
  1088. import chineseMedicine from "@/components/ChineseMedicine.vue";
  1089. import medicineChinese from "@/components/MedicineAndChina.vue";
  1090. import suitScience from "@/components/SuitScience.vue";
  1091. import submitRecipe from "./components/submitRecipe.vue";
  1092. // import TCMDiagnosis from "./components/TCMDiagnosis.vue";
  1093. import TCMDiagnosis from "../../components/TCMDiagnosis.vue";
  1094. import doctorCase from "./components/doctorCase.vue";
  1095. import prescription from "./components/prescription.vue";
  1096. import UnifyPrescription from "./components/prescription-unify.vue";
  1097. import TongueAnalysis from "./components/tongue-analysis.vue";
  1098. import safeDrug from "./components/safeDrug.vue";
  1099. import medAdress from "./components/medAddress.vue";
  1100. import medAdressNew from "./components/medAddressNew.vue";
  1101. import {
  1102. getPatiensBasisM,
  1103. getTongueAndFaceAnalysisRecords,
  1104. addRecipe,
  1105. getRecipeShowData,
  1106. getRecipeDataByid,
  1107. getAgreeRecipe,
  1108. getSeeDByID,
  1109. getDrugDetail,
  1110. getAccordDetail,
  1111. changeBasisPre,
  1112. updateRecipe,
  1113. changeExpre,
  1114. recipeIsPay,
  1115. getPreNumber,
  1116. getRecipePriview,
  1117. getMaxMinDoaseNumber
  1118. } from "@/api/diagnosis.js";
  1119. import { numberToUpperCase } from "@/utils/format.js";
  1120. import { addRecipeFrom } from "@/api/dataAnalysis.js";
  1121. import {
  1122. getPrescriptionsList,
  1123. getDoctorCaseL,
  1124. getRationalMed,
  1125. getRationalMedForPlat,
  1126. inferRecipe,
  1127. getDCaseDetail,
  1128. changeAndJoin,
  1129. getPreDetal,
  1130. getAcupointD,
  1131. getMedDetail
  1132. } from "@/api/knowledge.js";
  1133. import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
  1134. import { getExperinceDetail } from "@/api/business.js";
  1135. import { setTimeout } from "timers";
  1136. import prescribing from "../../utils/minix/prescribing";
  1137. import {formatPicture} from "@/utils/picture";
  1138. import {CC_Dosage2Basis} from '@/utils/medicine';
  1139. export default {
  1140. mixins: [prescribing],
  1141. components: {
  1142. Popup,
  1143. chineseMedicine,
  1144. medicineChinese,
  1145. suitScience,
  1146. TCMDiagnosis,
  1147. submitRecipe,
  1148. prescription,
  1149. UnifyPrescription,
  1150. TongueAnalysis,
  1151. doctorCase,
  1152. safeDrug,
  1153. medAdress,
  1154. medAdressNew
  1155. },
  1156. data() {
  1157. return {
  1158. tongueAndFaceLoading: false, // 舌面象加载
  1159. tongueAndFaceAnalysis: null, // 舌面象数据
  1160. showTongueAnalysis: false, // 舌象分析弹窗
  1161. showPriview: false, // 展示预览数据
  1162. showDialog: false, // 方剂详情
  1163. showDrug: false, // 药品详情
  1164. showAgree: false, // 协定方
  1165. showTestCase: false, // 名医医案
  1166. showRecord: false, // 就诊记录
  1167. showXuewei: false, // 穴位详情信息
  1168. showTestCase: false, // 名医医案
  1169. isTuiDaoSuit: false, //适宜技术处方是否推导过
  1170. isTuiDataZy: false, // 中药处方是否推导过
  1171. raDoseShow: false,
  1172. tjRecipeId: "", // 当前选中推荐 方剂的 id
  1173. isMyMade: true, // 是否是自拟处方
  1174. showExpr: false, // 专家经验
  1175. priviewData: {}, // 预览数据
  1176. exprInfo: {}, // 专家经验信息
  1177. // 名医弹窗信息
  1178. testCaseInfo: {},
  1179. // 就诊记录 弹窗信息
  1180. recordInfo: {},
  1181. //药品弹窗信息
  1182. drugInfo: {},
  1183. xwinfo: {},
  1184. // 方剂弹窗信息
  1185. preInfo: {},
  1186. // 协定方弹窗信息
  1187. agreeInfo: {},
  1188. // 右侧搜索
  1189. agree_key: "",
  1190. agree_key1: "",
  1191. key: "",
  1192. // 推荐方剂 下标
  1193. r_current: 0,
  1194. // 协定方下标
  1195. agree_current: 0,
  1196. // 协定方手风琴 选中
  1197. activeNames: "0",
  1198. activeNamesLast: "0",
  1199. // 右侧手风琴面板数据
  1200. collapseData: [
  1201. {
  1202. name: "个人",
  1203. index: "0",
  1204. page: 1,
  1205. loadMore: true,
  1206. list: []
  1207. },
  1208. {
  1209. name: "二级科室",
  1210. index: "1",
  1211. page: 1,
  1212. loadMore: true,
  1213. list: []
  1214. },
  1215. {
  1216. name: "科室",
  1217. index: "2",
  1218. page: 1,
  1219. loadMore: true,
  1220. list: []
  1221. },
  1222. {
  1223. name: "本院",
  1224. index: "3",
  1225. page: 1,
  1226. loadMore: true,
  1227. list: []
  1228. }
  1229. ],
  1230. // 右侧方剂列表
  1231. rPrescription: {
  1232. list: [],
  1233. page: 1,
  1234. loadMore: true,
  1235. key: ""
  1236. },
  1237. // 右侧参考医案
  1238. rDoctorCase: {
  1239. list: [],
  1240. page: 1,
  1241. loadMore: true,
  1242. key: ""
  1243. },
  1244. // 保存右侧合理用药信息
  1245. rationalMed: [],
  1246. // 从1-9 分别对应 超剂量 到 19反
  1247. rationalMed1: [],
  1248. rationalMed2: [],
  1249. rationalMed3: [],
  1250. rationalMed4: [],
  1251. rationalMed5: [],
  1252. rationalMed6: [],
  1253. rationalMed7: [],
  1254. rationalMed8: [],
  1255. rationalMed9: [],
  1256. rationalMed10: [],
  1257. // 右侧推荐方剂
  1258. rRecomendR: [],
  1259. // 中间顶部tab
  1260. container_i: 0,
  1261. /* 下列顺便不能轻易变动 */
  1262. contentTabs: [
  1263. {
  1264. id: '0',
  1265. businesstype: '1',
  1266. name: "中药处方",
  1267. check: true,
  1268. hide: true,
  1269. color: '',
  1270. },
  1271. {
  1272. id: '1',
  1273. name: "中药制剂",
  1274. check: false,
  1275. hide: true,
  1276. color: ""
  1277. },
  1278. {
  1279. id: '2',
  1280. businesstype: '3',
  1281. name: "适宜技术处方",
  1282. check: false,
  1283. hide: true,
  1284. color: ""
  1285. }
  1286. ],
  1287. patiensMsg: {}, // 患者信息
  1288. dianosisMsg: [], // 诊断信息
  1289. ops: {
  1290. vuescroll: {},
  1291. scrollPanel: {},
  1292. rail: {
  1293. keepShow: true
  1294. },
  1295. bar: {
  1296. hoverStyle: true,
  1297. onlyShowBarOnScroll: false, //是否只有滚动的时候才显示滚动条
  1298. background: "#C1C1C1", //滚动条颜色
  1299. opacity: 0.5, //滚动条透明度
  1300. "overflow-x": "hidden"
  1301. }
  1302. },
  1303. showSubmit: true,
  1304. // refs 信息暂存
  1305. chineseM: {
  1306. allMoney: 0,
  1307. recipeTabs: []
  1308. },
  1309. medicineC: {
  1310. allMoney: 0
  1311. },
  1312. suitScience: {
  1313. allMoney: 0
  1314. }
  1315. };
  1316. },
  1317. created() {
  1318. try {
  1319. const tabs = this.getuserinfo.ableprescription.split(',');
  1320. for (const id of tabs) try { this.contentTabs.find(item => item.id === id).hide = false; } catch (e) {}
  1321. } catch (e) {
  1322. }
  1323. // console.log(this.getIsSee, 'issee');
  1324. this.showSubmit = String(this.getIsSee) == "true" ? true : false;
  1325. // 获取右侧协定方数据
  1326. this.getAgreeRecipe();
  1327. if (this.getPatiensInfo.pid) {
  1328. this.getPatiensBasisM();
  1329. this.getPatientBasisTongueAndFaceAnalysis();
  1330. }
  1331. },
  1332. mounted() {
  1333. this._processRouteQuery();
  1334. },
  1335. beforeRouteLeave(to, from, next) {
  1336. if (to.path == "/index/recipe") {
  1337. sessionStorage.removeItem("prescr" + this.getPatiensInfo.pid);
  1338. next();
  1339. } else {
  1340. this._setDataToStorage(next);
  1341. }
  1342. },
  1343. watch: {
  1344. rationalMed10: {
  1345. deep: true,
  1346. immediate: true,
  1347. handler: function() {
  1348. this.countDose();
  1349. }
  1350. }
  1351. },
  1352. methods: {
  1353. // 处理路由参数
  1354. async _processRouteQuery() {
  1355. const query = this.$route.query || {};
  1356. // 暂存处方数据(不含药品)
  1357. if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage(true);
  1358. // 名医名方 —> 方剂查询
  1359. if (query.recipeID && query.kjType === "kj-fj") await this.getPreDetal(query.recipeID);
  1360. // 就诊记录转方
  1361. else if (query.recipeID) await this.getRecipeDataByid(this.$route.query.recipeID);
  1362. // 名医名方 —> 名医医案
  1363. else if (query.doctorCase) await this.changeAndJoin();
  1364. // 中医诊疗 -> 智能辩证
  1365. else if (query.type === "tuidao") {
  1366. this.isTuiDaoSuit = false;
  1367. this.isTuiDaoZy = false;
  1368. await this.inferRecipe();
  1369. const current = this.contentTabs[this.container_i];
  1370. if (!current) return;
  1371. if (current.id === '0') this.isTuiDaoZy = true
  1372. else if (current.id === '2') this.isTuiDaoSuit = true
  1373. }
  1374. // 处方编辑 recipeType
  1375. else if (query.from !== 'his' && this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
  1376. // 暂存处方
  1377. else if (sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)) await this._showDataFromStorage();
  1378. // 历史处方
  1379. else {
  1380. // 跟据就诊记录id获取处方号
  1381. let res = await getPreNumber({pid: this.getPatiensInfo.pid}).catch(() => void 0);
  1382. const has = res && res.ResultCode == 0 && res.Data.length > 0;
  1383. if (has) await this.getRecipeShowData();
  1384. else if (this.getEditPreNo()) await this.getRecipeDataByid(this.getEditPreNo());
  1385. }
  1386. },
  1387. // 中医诊断推导点击
  1388. tcmClick(isauto = true) {
  1389. this.isTuiDaoZy = false;
  1390. this.isTuiDaoSuit = false;
  1391. let params = this.$refs.TCM.getParams();
  1392. if (!params.namemedicine || !params.syndrometypes) {
  1393. this.$message.warning("请完善病名证型信息");
  1394. return;
  1395. }
  1396. let newDiaMsg = this.$refs.TCM.getDiamsg();
  1397. this.agree_key1 = params.namemedicine;
  1398. this.patiensMsg.maindiagnosis.disid = newDiaMsg.disid;
  1399. this.patiensMsg.maindiagnosis.symptomid = newDiaMsg.symptomid;
  1400. this.patiensMsg.maindiagnosis.treatment = newDiaMsg.treatment;
  1401. // 获取最新病名的参考医案
  1402. this.rDoctorCase.page = 1;
  1403. this.rDoctorCase.list = [];
  1404. this.rDoctorCase.loadMore = true;
  1405. this.getDoctorCaseL();
  1406. // --end
  1407. const current = this.contentTabs[this.container_i];
  1408. if (!current) return;
  1409. if (isauto && current.id !== '1') {
  1410. this.inferRecipe(2, current.businesstype);
  1411. }
  1412. setTimeout(() => {
  1413. for (const tab of this.contentTabs) {
  1414. if (tab.id === '1' || tab.hide) continue;
  1415. this.inferRecipe(4, tab.businesstype).then(() => {
  1416. if (tab.id === current.id ) {
  1417. if (current.id === '0') this.isTuiDaoZy = true
  1418. else if (current.id === '2') this.isTuiDaoSuit = true
  1419. }
  1420. })
  1421. }
  1422. if (this.getPatiensInfo.pid) {
  1423. this.getPatiensBasisM();
  1424. }
  1425. }, 1000);
  1426. },
  1427. // 系统数据存入缓存
  1428. _setDataToStorage(next) {
  1429. let children = this.$children.filter(item => {
  1430. return (
  1431. item.name == "中药处方" ||
  1432. item.name == "中药制剂" ||
  1433. item.name == "适宜技术处方"
  1434. );
  1435. });
  1436. let child1 = children[0];
  1437. let child2 = children[1];
  1438. let child3 = children[2];
  1439. let obj = {
  1440. contentTabs: this.contentTabs,
  1441. container_i: this.container_i,
  1442. child1: {
  1443. recipe_tabs: child1.recipe_tabs,
  1444. recipe_tabs_c: child1.recipe_tabs_c
  1445. },
  1446. child2: {
  1447. tableData3: child2.tableData3,
  1448. bottom_form: child2.bottom_form
  1449. },
  1450. child3: Object.assign({...child3.$data}, {acupointList: []}),
  1451. rationalMed: {
  1452. // 保存右侧合理用药信息
  1453. rationalMed: this.rationalMed,
  1454. // 从1-9 分别对应 超剂量 到 19反
  1455. rationalMed1: this.rationalMed1,
  1456. rationalMed2: this.rationalMed2,
  1457. rationalMed3: this.rationalMed3,
  1458. rationalMed4: this.rationalMed4,
  1459. rationalMed5: this.rationalMed5,
  1460. rationalMed6: this.rationalMed6,
  1461. rationalMed7: this.rationalMed7,
  1462. rationalMed8: this.rationalMed8,
  1463. rationalMed9: this.rationalMed9,
  1464. rationalMed10: this.rationalMed10
  1465. }
  1466. };
  1467. sessionStorage.setItem(
  1468. "prescr" + this.getPatiensInfo.pid,
  1469. JSON.stringify(obj)
  1470. );
  1471. next();
  1472. // getPatiensInfo
  1473. },
  1474. // 展示系统缓存数据
  1475. async _showDataFromStorage(ignoreTable = false) {
  1476. let storageData = JSON.parse(
  1477. sessionStorage.getItem("prescr" + this.getPatiensInfo.pid)
  1478. );
  1479. let children = this.$children.filter(item => {
  1480. return (
  1481. item.name == "中药处方" ||
  1482. item.name == "中药制剂" ||
  1483. item.name == "适宜技术处方"
  1484. );
  1485. });
  1486. let child1 = children[0];
  1487. let child2 = children[1];
  1488. let child3 = children[2];
  1489. child1.recipe_tabs = storageData.child1.recipe_tabs;
  1490. child1.recipe_tabs_c = storageData.child1.recipe_tabs_c;
  1491. if (typeof child1.loaded === 'function') await child1.loaded(storageData.child1);
  1492. if (storageData.child1.recipe_tabs[0].totalTableD.length > 1) {
  1493. this.isTuiDaoZy = true;
  1494. }
  1495. if (storageData.child3.tableData4.length > 1) {
  1496. this.isTuiDaoSuit = true;
  1497. }
  1498. if (ignoreTable) {
  1499. for (const recipe of storageData.child1.recipe_tabs) {
  1500. recipe.tableData = [];
  1501. recipe.tableData1 = [];
  1502. recipe.totalTableD = [];
  1503. }
  1504. storageData.child2.tableData3 = [];
  1505. storageData.child3.tableData4 = [];
  1506. }
  1507. this.contentTabs = storageData.contentTabs;
  1508. this.container_i = storageData.container_i;
  1509. // child1.getSelectType("剂型", 0);
  1510. // child1.getSelectType("处方用法");
  1511. // child1.getSelectType("中药服药时间");
  1512. // child1.getSelectType("中药频次");
  1513. // child1.getPharmacyID();
  1514. child2.tableData3 = storageData.child2.tableData3;
  1515. child2.bottom_form = storageData.child2.bottom_form;
  1516. for (const [key, value] of Object.entries(storageData.child3)) child3[key] = value;
  1517. this.rationalMed = storageData.rationalMed.rationalMed;
  1518. // 保存右侧合理用药信息
  1519. // 从1-9 分别对应 超剂量 到 19反
  1520. this.rationalMed1 = storageData.rationalMed.rationalMed1;
  1521. this.rationalMed2 = storageData.rationalMed.rationalMed2;
  1522. this.rationalMed3 = storageData.rationalMed.rationalMed3;
  1523. this.rationalMed4 = storageData.rationalMed.rationalMed4;
  1524. this.rationalMed5 = storageData.rationalMed.rationalMed5;
  1525. this.rationalMed6 = storageData.rationalMed.rationalMed6;
  1526. this.rationalMed7 = storageData.rationalMed.rationalMed7;
  1527. this.rationalMed8 = storageData.rationalMed.rationalMed8;
  1528. this.rationalMed9 = storageData.rationalMed.rationalMed9;
  1529. this.rationalMed10 = storageData.rationalMed.rationalMed10;
  1530. },
  1531. // 方剂顶部搜索
  1532. searchPre() {
  1533. if (this.agree_current == 1) {
  1534. this.rPrescription.page = 1;
  1535. this.rPrescription.list = [];
  1536. this.rPrescription.loadMore = true;
  1537. this.getPrescriptionsList();
  1538. } else if (this.agree_current == 2) {
  1539. this.rDoctorCase.page = 1;
  1540. this.rDoctorCase.list = [];
  1541. this.rDoctorCase.loadMore = true;
  1542. this.getDoctorCaseL();
  1543. }
  1544. },
  1545. // 方剂加载更多
  1546. loadMorePre() {
  1547. if (this.agree_current == 1) {
  1548. if (!this.rPrescription.loadMore) {
  1549. this.$message({
  1550. showClose: false,
  1551. message: "没有更多数据了",
  1552. type: "warning "
  1553. });
  1554. return;
  1555. }
  1556. this.getPrescriptionsList(this.rPrescription.loadMore);
  1557. } else if (this.agree_current == 2) {
  1558. if (!this.rDoctorCase.loadMore) {
  1559. this.$message({
  1560. showClose: false,
  1561. message: "没有更多数据了",
  1562. type: "warning "
  1563. });
  1564. return;
  1565. }
  1566. this.getDoctorCaseL(this.rDoctorCase.loadMore);
  1567. }
  1568. },
  1569. // 加载更多协定方数据
  1570. loadMoreCollapse(item) {
  1571. if (!item.loadMore) {
  1572. this.$message({
  1573. showClose: false,
  1574. message: "没有更多数据了",
  1575. type: "warning "
  1576. });
  1577. return;
  1578. }
  1579. this.getAgreeRecipe(item.loadMore);
  1580. },
  1581. // 手风琴 更改
  1582. activeChange(e) {
  1583. console.log(e, "手风琴该表");
  1584. // if (this.activeNames == e) return;
  1585. if (e) {
  1586. this.activeNames = e;
  1587. this.activeNamesLast = e;
  1588. this.collapseData[this.activeNames].page = 1;
  1589. this.collapseData[this.activeNames].loadMore = true;
  1590. this.collapseData[this.activeNames].list = [];
  1591. this.getAgreeRecipe(this.collapseData[this.activeNames].loadMore);
  1592. } else {
  1593. this.activeNames = this.activeNamesLast;
  1594. }
  1595. },
  1596. // 处理中药处方提交数据
  1597. dealRecipe1(data1) {
  1598. let isAutoCheck = data1.isAutoCheck;
  1599. let hasDoseNum = true; // 是否有剂数
  1600. let hasData = true; // 是否有处方药品数据
  1601. let hasAddress = true;
  1602. let noFull = false; // 是否有药品库存不足
  1603. let recipeAlert = [];
  1604. data1.recipe_tabs.forEach((item, index) => {
  1605. if (item.isMyMade) {
  1606. this.addRecipeFrom("3");
  1607. }
  1608. if (!item.bottom_form.doseNum) {
  1609. hasDoseNum = false;
  1610. }
  1611. if (item.bottom_form.radio == "0" && !item.bottom_form.savename) {
  1612. hasAddress = false;
  1613. }
  1614. if (item.bottom_form.radio == "0" && !item.bottom_form.phone) {
  1615. hasAddress = false;
  1616. }
  1617. if (item.bottom_form.radio == "0" && !item.bottom_form.province) {
  1618. hasAddress = false;
  1619. }
  1620. if (item.bottom_form.radio == "0" && !item.bottom_form.city) {
  1621. hasAddress = false;
  1622. }
  1623. if (item.bottom_form.radio == "0" && !item.bottom_form.area) {
  1624. hasAddress = false;
  1625. }
  1626. if (item.bottom_form.radio == "0" && !item.bottom_form.address) {
  1627. hasAddress = false;
  1628. }
  1629. if (item.totalTableD.length < 2) {
  1630. hasData = false;
  1631. }
  1632. if (item.totalTableD.length - 1 < this.doseMin) {
  1633. recipeAlert.push({
  1634. text: `中药处方${index + 1}不符合最小药味数${this.doseMin}!`,
  1635. isAllow: this.doseAllowMin
  1636. });
  1637. }
  1638. if (item.totalTableD.length - 1 > this.doseMax) {
  1639. recipeAlert.push({
  1640. text: `中药处方${index + 1}不符合最大药味数${this.doseMax}!`,
  1641. isAllow: this.doseAllowMax
  1642. });
  1643. }
  1644. item.totalTableD.forEach(item1 => {
  1645. if (item1.color == "red") {
  1646. noFull = true;
  1647. }
  1648. if (!+item1.dose && item1.name) {
  1649. hasDoseNum = false;
  1650. }
  1651. });
  1652. });
  1653. if (!hasData) {
  1654. this.$message.error({
  1655. message: "请完善中药处方药品信息",
  1656. showClose: true,
  1657. type: "error"
  1658. });
  1659. return [];
  1660. }
  1661. if (recipeAlert.length > 0) {
  1662. recipeAlert.forEach(item => {
  1663. if (item.text) {
  1664. setTimeout(() => {
  1665. this.$message({
  1666. message: item.text,
  1667. showClose: true,
  1668. type: "warning"
  1669. });
  1670. }, 200);
  1671. }
  1672. });
  1673. // return false;
  1674. }
  1675. // if (!hasAddress) {
  1676. // this.$message({
  1677. // message: "请完善中药处方配送信息",
  1678. // showClose: false,
  1679. // type: "error"
  1680. // });
  1681. // return false;
  1682. // }
  1683. if (!hasDoseNum) {
  1684. this.$message.error({
  1685. message: "请完善中药处方剂数剂量信息",
  1686. showClose: false,
  1687. type: "error"
  1688. });
  1689. return false;
  1690. }
  1691. if (noFull) {
  1692. this.$message.error({
  1693. message: "部分药品库存不足",
  1694. showClose: false,
  1695. type: "error"
  1696. });
  1697. return false;
  1698. }
  1699. console.log(recipeAlert, "recipeAlert");
  1700. // let data2 = children[1]
  1701. // let data3 = children[2]
  1702. let zhongPrescriptionVo = [];
  1703. let medAdressData = {};
  1704. if (this.showAddress) {
  1705. medAdressData = this.$refs.medAdress.form;
  1706. }
  1707. console.group("debug:20250558")
  1708. data1.recipe_tabs.forEach((item, index) => {
  1709. console.log("填写值", item.bottom_form.radio)
  1710. let obj = {
  1711. seqn: index + 1,
  1712. province:
  1713. this.isShowPs && this.showAddress ? medAdressData.province : "", // 省
  1714. city: this.isShowPs && this.showAddress ? medAdressData.city : "", // 市
  1715. district: this.isShowPs && this.showAddress ? medAdressData.area : "", // 区
  1716. address:
  1717. this.isShowPs && this.showAddress ? medAdressData.address : "", // 详细地址
  1718. agency: item.bottom_form.isDaiJian, // 代煎
  1719. // agency: this.showAddress ? medAdressData.isDaiJian : 0, // 代煎
  1720. // agency: this.isShowDj ? this.isDaiJian : 0, // 代煎
  1721. allprice: item.bottom_form.allMoney, // 总金额(合计金额)
  1722. command: item.bottom_form.zhutuo, // 嘱托
  1723. consigneeName:
  1724. this.isShowPs && this.showAddress ? medAdressData.savename : "", // 收货人姓名
  1725. consigneePhone:
  1726. this.isShowPs && this.showAddress ? medAdressData.phone : "", // 收货人电话
  1727. deliveryfree:
  1728. medAdressData.radio == 0 && this.isShowPs && this.showAddress
  1729. ? item.bottom_form.moneyMsg.deliveryPrice
  1730. : 0, // 配送费
  1731. deploymentfree:
  1732. item.bottom_form.doseType == "2" || item.bottom_form.doseType == "3"
  1733. ? item.bottom_form.moneyMsg.specialDeploymentPrice
  1734. : 0, // 特殊调配费
  1735. dosageForm: item.bottom_form.doseType, // 剂型
  1736. eatMedicineTime: item.bottom_form.time, // 服药时间
  1737. frequency: item.bottom_form.num, // 频次
  1738. friedfree: item.bottom_form.daijian
  1739. ? item.bottom_form.moneyMsg.agencyPrice
  1740. : 0, // 代煎费
  1741. // isdelivery: this.isPs == 1 ? 0 : 1, // 是否配送
  1742. isdelivery: item.bottom_form.radio,
  1743. markfree:
  1744. item.bottom_form.doseType == "0"
  1745. ? item.bottom_form.moneyMsg.systemOfCreamPrice
  1746. : 0, // 制膏费
  1747. num: item.bottom_form.doseNum, //剂数
  1748. pharmacyid: item.pharmacyID, // 药房id 暂时写死
  1749. drugtype: item.radio.split("@")[1], // 药房类型
  1750. price: item.bottom_form.nowRecipeMoney, // 单剂金额
  1751. recordid: this.getPatiensInfo.pid, //门诊id
  1752. strongFried: item.bottom_form.nongjian, //浓煎
  1753. type: 0, // 处方类型
  1754. useexplain: item.bottom_form.caozuo, // 操作指南
  1755. usestr: item.bottom_form.usege, //处方用法
  1756. zhongdetail: [], // 中药明细 表格内部数据
  1757. // preId: this.$route.query.recipeID ? this.$route.query.recipeID : ""
  1758. preId: item.preId ? item.pageId : ""
  1759. };
  1760. console.log("保存值", obj.isdelivery)
  1761. item.totalTableD.forEach(item1 => {
  1762. if (item1.name && item1.color != "red") {
  1763. let obj1 = {
  1764. allprice: item1.total,
  1765. dose: Number(item1.dose),
  1766. drugName: item1.name,
  1767. drugid: item1.medid,
  1768. origin: item1.originname,
  1769. seqn: item1.id,
  1770. specification: item1.spec,
  1771. unit: item1.unit,
  1772. unitprice: item1.price,
  1773. usagestr: item1.usage,
  1774. preDetailId: this.getEditPreNo(),
  1775. };
  1776. obj.zhongdetail.push(obj1);
  1777. }
  1778. });
  1779. if (!recipeAlert[index]) {
  1780. recipeAlert.push({
  1781. isAllow: 0
  1782. });
  1783. }
  1784. // 当前审核流程为自动时 用his 的支付状态判断
  1785. // if (isAutoCheck == 1) {
  1786. // } else {
  1787. // if (
  1788. // !item.isPay &&
  1789. // (item.prescribed == 0 || !item.prescribed) &&
  1790. // recipeAlert[index].isAllow == 0
  1791. // ) {
  1792. // zhongPrescriptionVo.push(obj);
  1793. // }
  1794. // }
  1795. if (
  1796. (item.paystate == 0 || !item.paystate) &&
  1797. recipeAlert[index].isAllow == 0
  1798. ) {
  1799. zhongPrescriptionVo.push(obj);
  1800. }
  1801. });
  1802. console.groupEnd()
  1803. return zhongPrescriptionVo;
  1804. },
  1805. // 处理中药制剂提交数据
  1806. dealRecipe2(data1) {
  1807. let isAutoCheck = data1.isAutoCheck;
  1808. if (!data1.tableData3.filter(item => item.name).length) {
  1809. this.$message.error({ message: '请完善中药制剂药品信息', showClose: true });
  1810. return {};
  1811. }
  1812. let hasDrugMsg = [];
  1813. data1.tableData3.forEach((item, index) => {
  1814. if (
  1815. item.name &&
  1816. (!item.dose || !item.usage || !item.timesQuan || !item.nums)
  1817. ) {
  1818. // || !item.time
  1819. hasDrugMsg.push(index + 1);
  1820. }
  1821. });
  1822. if (hasDrugMsg.length > 0) {
  1823. this.$message.error(
  1824. "请完善中药制剂处方药品相关信息(序号:" + hasDrugMsg.join(",") + ")"
  1825. );
  1826. return false;
  1827. }
  1828. let hasAddress = true;
  1829. let medAdressData = {};
  1830. if (this.showAddress) {
  1831. medAdressData = this.$refs.medAdress.form;
  1832. }
  1833. this.addRecipeFrom("3");
  1834. let obj = {
  1835. province:
  1836. this.showAddress && this.isShowPs ? medAdressData.province : "", // 省
  1837. city: this.showAddress && this.isShowPs ? medAdressData.city : "", // 市
  1838. district: this.showAddress && this.isShowPs ? medAdressData.area : "", // 区
  1839. address: this.showAddress && this.isShowPs ? medAdressData.address : "",
  1840. command: data1.bottom_form.zhutuo,
  1841. consigneeName:
  1842. this.showAddress && this.isShowPs ? medAdressData.savename : "",
  1843. consigneePhone:
  1844. this.showAddress && this.isShowPs ? medAdressData.phone : "",
  1845. isdelivery: data1.bottom_form.radio,
  1846. // isdelivery: this.isPs == 0 ? 1 : 0,
  1847. deliveryfree:
  1848. this.showAddress && this.isShowPs && medAdressData.radio == 0
  1849. ? data1.moneyMsg.deliveryPrice
  1850. : 0, // 配送费
  1851. pharmacyid: data1.pharmacyID,
  1852. type: 1,
  1853. chengDetail: [],
  1854. // preId: this.$route.query.recipeID ? this.$route.query.recipeID : ""
  1855. preId: data1.preId ? data1.pageId : ""
  1856. };
  1857. data1.tableData3.forEach(item => {
  1858. if (item.name) {
  1859. let obj1 = {
  1860. allprice: item.total,
  1861. dose: item.dose,
  1862. drugName: item.name,
  1863. drugid: item.medid,
  1864. frequency: item.nums,
  1865. medicationtime: item.time,
  1866. origin: item.from,
  1867. price: item.price,
  1868. secondDose: item.timesQuan,
  1869. seqn: item.id,
  1870. specification: item.spec,
  1871. unit: item.unit,
  1872. usagestr: item.usage,
  1873. preDetailId: this.getEditPreNo(),
  1874. bzdw: item.doseUnit,
  1875. zxdw: item.timesUnit
  1876. };
  1877. obj.chengDetail.push(obj1);
  1878. }
  1879. });
  1880. // if ((data1.isPay || data1.prescribed == 1) && isAutoCheck == 0) {
  1881. // return {};
  1882. // }
  1883. // && isAutoCheck == 1
  1884. if (data1.paystate == 1) {
  1885. return {};
  1886. }
  1887. return obj;
  1888. },
  1889. // 处理适宜剂数处方提交数据
  1890. dealRecipe3(data1) {
  1891. let isAutoCheck = data1.isAutoCheck;
  1892. if (!data1.tableData4.filter(item => item.name).length) {
  1893. this.$message.error({ message: '请完善适宜技术处方穴位信息', showClose: true });
  1894. return {};
  1895. }
  1896. let hasDrugMsg = [];
  1897. data1.tableData4.forEach((item, index) => {
  1898. if (!item.name && index != data1.tableData4.length - 1) {
  1899. hasDrugMsg.push(index + 1);
  1900. }
  1901. });
  1902. if (hasDrugMsg.length > 0) {
  1903. // this.$message.error(
  1904. // "请完善适宜技术处方穴位相关信息(序号:" + hasDrugMsg.join(",") + ")"
  1905. // );
  1906. return false;
  1907. }
  1908. if (!data1.bottom_form.doseNum1) {
  1909. this.$message.error({
  1910. message: "请完善适宜技术处方次数信息",
  1911. showClose: false,
  1912. type: "error"
  1913. });
  1914. return false;
  1915. }
  1916. if (!data1.bottom_form.doseType1) {
  1917. this.$message.error({
  1918. message: "请完善适宜技术处方类型信息",
  1919. showClose: false,
  1920. type: "error"
  1921. });
  1922. return false;
  1923. }
  1924. let obj = {
  1925. command: data1.bottom_form.zhutuo,
  1926. num: Number(data1.bottom_form.doseNum1),
  1927. technologyType: data1.bottom_form.doseType1,
  1928. type: 2,
  1929. useexplain: data1.bottom_form.caozuo,
  1930. // preId: this.$route.query.recipeID ? this.$route.query.recipeID : "",
  1931. preId: data1.preId ? data1.pageId : "",
  1932. detail: []
  1933. };
  1934. data1.tableData4.forEach(item => {
  1935. if (item.name) {
  1936. let obj1 = {
  1937. pointid: item.acuid,
  1938. pointname: item.acuname,
  1939. price: data1.bottom_form.doseType,
  1940. seqn: item.id,
  1941. preDetailId: this.getEditPreNo(),
  1942. };
  1943. obj.detail.push(obj1);
  1944. }
  1945. });
  1946. if (data1.isMyMade) {
  1947. this.addRecipeFrom("3");
  1948. }
  1949. // if ((data1.isPay || data1.prescribed == 1) && isAutoCheck == 0) {
  1950. // return {};
  1951. // }
  1952. // && isAutoCheck == 1
  1953. if (data1.paystate == 1) {
  1954. return {};
  1955. }
  1956. return obj;
  1957. },
  1958. // 获取数据 赋值给 中药处方
  1959. assignRecipe1(data, loading) {
  1960. setTimeout(() => {
  1961. let children = this.$children.filter(item => {
  1962. return (
  1963. item.name == "中药处方" ||
  1964. item.name == "中药制剂" ||
  1965. item.name == "适宜技术处方"
  1966. );
  1967. });
  1968. let data1 = children[0];
  1969. let isAutoCheck = data1.isAutoCheck;
  1970. let arr = [];
  1971. data.forEach((item, index) => {
  1972. let objAssaign = {};
  1973. // let medAdressData = this.$refs.medAdress;
  1974. let obj = {
  1975. name: "处方1",
  1976. pharmacyID: "", // 药房id
  1977. totalTableD: [],
  1978. tableData: [
  1979. {
  1980. id: 1
  1981. }
  1982. ],
  1983. radio: "1",
  1984. tableData1: [],
  1985. bottom_form: {
  1986. doseNum: "",
  1987. doseType: "",
  1988. doseTypeList: [],
  1989. usegeList: [],
  1990. usege: "",
  1991. num: "",
  1992. numList: [], // 频次后台数据
  1993. daijian: "",
  1994. nongjian: "",
  1995. time: "",
  1996. timeList: [], // 服药时间后台数据
  1997. caozuo: "",
  1998. zhutuo: "",
  1999. radio: item.isdelivery,
  2000. daijian: "1",
  2001. provinceList: [],
  2002. cityList: [],
  2003. areaList: [],
  2004. province: "",
  2005. city: "",
  2006. area: "",
  2007. address: "",
  2008. phone: "",
  2009. doseType1: "",
  2010. doseNum1: "",
  2011. savename: "",
  2012. nowRecipeMoney: 0, //单剂金额
  2013. nowRecipeMoney1: 0, //当前处方金额
  2014. allMoney: 0, // 合计金额
  2015. moneyMsg: {} // 价格数据
  2016. },
  2017. prescribed: 0, //是否开方 0 否 1 是,
  2018. paystate: 0,
  2019. preId: null
  2020. };
  2021. // if (
  2022. // index == data.length - 1 &&
  2023. // item.prescribed == 1 &&
  2024. // isAutoCheck == 0
  2025. // ) {
  2026. // objAssaign = JSON.parse(JSON.stringify(obj));
  2027. // }
  2028. // && isAutoCheck == 1
  2029. if (index == data.length - 1 && item.paystate == 1) {
  2030. objAssaign = JSON.parse(JSON.stringify(obj));
  2031. }
  2032. if (this.$route.query.type == "edit") {
  2033. } else {
  2034. }
  2035. obj.preId = item.preId ? item.preId : "";
  2036. obj.name = "处方" + (index + 1);
  2037. obj.radio = item.pharmacyid + "@" + item.drugtype;
  2038. obj.pharmacyID = item.pharmacyid;
  2039. obj.bottom_form.doseNum = item.num;
  2040. obj.bottom_form.doseType = item.dosageForm;
  2041. obj.bottom_form.usege = item.usestr;
  2042. obj.bottom_form.nongjian = item.strongFried;
  2043. obj.bottom_form.num = item.frequency;
  2044. obj.bottom_form.caozuo = item.useexplain;
  2045. obj.bottom_form.zhutuo = item.command;
  2046. if (!!this.getEditPreNo()) {
  2047. if (item.revierwstate == 1 && isAutoCheck == 0) {
  2048. obj.prescribed = 0;
  2049. } else {
  2050. obj.prescribed = item.prescribed;
  2051. }
  2052. obj.paystate = item.paystate;
  2053. // if (isAutoCheck == 1) {
  2054. // }
  2055. console.group("debug:20250558")
  2056. console.log('配送原始', item.isdelivery);
  2057. obj.bottom_form.radio = item.isdelivery == null ? null : Number(item.isdelivery);
  2058. console.log('配送赋值', obj.bottom_form.radio);
  2059. console.groupEnd()
  2060. obj.bottom_form.savename = item.consigneeName;
  2061. obj.bottom_form.phone = item.consigneePhone;
  2062. obj.bottom_form.address = item.address;
  2063. obj.bottom_form.province = item.province;
  2064. obj.bottom_form.city = item.city;
  2065. obj.bottom_form.area = item.district;
  2066. if (obj.paystate == 1) {
  2067. obj.bottom_form.disable = true;
  2068. obj.disable = true;
  2069. }
  2070. } else {
  2071. obj.prescribed = item.prescribed;
  2072. obj.paystate = item.paystate;
  2073. if (obj.paystate == 1) {
  2074. obj.bottom_form.disable = true;
  2075. obj.disable = true;
  2076. }
  2077. }
  2078. obj.bottom_form.moneyMsg = {
  2079. deliveryPrice: item.deliveryfree,
  2080. specialDeploymentPrice: item.deploymentfree,
  2081. agencyPrice: item.friedfree,
  2082. systemOfCreamPrice: item.markfree
  2083. };
  2084. //
  2085. obj.bottom_form.daijian = item.agency;
  2086. obj.bottom_form.isDaiJian = Number(item.agency);
  2087. // medAdressData.isDaiJian = Number(item.agency);
  2088. obj.bottom_form.nowRecipeMoney = item.price;
  2089. obj.bottom_form.nowRecipeMoney1 = item.thisRecipePrice;
  2090. obj.bottom_form.allMoney = item.allprice;
  2091. obj.bottom_form.time = item.eatMedicineTime;
  2092. // data1.getProver()
  2093. obj.bottom_form.provinceList = data1.provinceList1;
  2094. if (item.isdelivery == "0") {
  2095. data1.recipe_tabs_c = index;
  2096. data1.getArea(item.province, 1);
  2097. data1.getArea(item.city, 2);
  2098. }
  2099. setTimeout(() => {
  2100. data1.recipeChange(index);
  2101. }, 500);
  2102. item.zhongdetail.forEach((item1, index1) => {
  2103. let obj1 = {
  2104. drugList: [],
  2105. page: 1,
  2106. loadMore: true,
  2107. usageList: [],
  2108. id: item1.seqn,
  2109. name: item1.drugName,
  2110. spec: item1.specification, // 规格
  2111. dose: item1.dose, // 剂量
  2112. unit: item1.unit, // 单位
  2113. // usage: item.usagestr, // 用法
  2114. usage: item1.usagestr,
  2115. price: item1.unitprice,
  2116. total: item1.allprice,
  2117. inventory: item1.instock, // 库存
  2118. key: "",
  2119. search_i: index1,
  2120. medid: item1.drugid, // 药品id
  2121. originname: item1.origin // 产地名称
  2122. };
  2123. obj.totalTableD.push(obj1);
  2124. data1.getSelectType("中药药品用法", index1);
  2125. });
  2126. obj.totalTableD.push({
  2127. drugList: [],
  2128. page: 1,
  2129. loadMore: true,
  2130. usageList: [],
  2131. showSearch: false,
  2132. search_i: 0,
  2133. id: Number(item.zhongdetail[item.zhongdetail.length - 1].seqn) + 1
  2134. });
  2135. obj.totalTableD.filter((item3, index3) => {
  2136. this.rationalMed = [];
  2137. this.resetRationalMed();
  2138. this.getRationalMed(item3.medid);
  2139. return (item3.id = index3 + 1);
  2140. });
  2141. obj.tableData = obj.totalTableD.filter(item2 => {
  2142. return Number(item2.id) % 2 != 0;
  2143. });
  2144. obj.tableData1 = obj.totalTableD.filter(item2 => {
  2145. return Number(item2.id) % 2 == 0;
  2146. });
  2147. arr.push(obj);
  2148. // if (
  2149. // index == data.length - 1 &&
  2150. // item.prescribed == 1 &&
  2151. // isAutoCheck == 0
  2152. // ) {
  2153. // // arr.push(objAssaign)
  2154. // setTimeout(() => {
  2155. // data1.addRecipeTba(arr.length - 1);
  2156. // }, 500);
  2157. // }
  2158. // && isAutoCheck == 1
  2159. if (index == data.length - 1 && item.paystate == 1) {
  2160. // arr.push(objAssaign)
  2161. setTimeout(() => {
  2162. data1.addRecipeTba(arr.length - 1);
  2163. }, 500);
  2164. }
  2165. });
  2166. data1.recipe_tabs_c = arr.length - 1;
  2167. data1.recipe_tabs = arr;
  2168. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.radio =
  2169. arr[arr.length - 1].bottom_form.radio;
  2170. data1.changePharmacy(
  2171. arr[arr.length - 1].radio,
  2172. arr[arr.length - 1].radio
  2173. );
  2174. data1.$forceUpdate();
  2175. loading.close();
  2176. }, 1000);
  2177. },
  2178. // 获取数据 赋值给 中药制剂
  2179. assignRecipe2(data, loading) {
  2180. setTimeout(() => {
  2181. let children = this.$children.filter(item => {
  2182. return (
  2183. item.name == "中药处方" ||
  2184. item.name == "中药制剂" ||
  2185. item.name == "适宜技术处方"
  2186. );
  2187. });
  2188. let data1 = children[1];
  2189. let isAutoCheck = data1.isAutoCheck;
  2190. data1.bottom_form.zhutuo = data.command;
  2191. data1.preId = data.preId ? data.preId : "";
  2192. if (!!this.getEditPreNo()) {
  2193. data1.bottom_form.radio = data.isdelivery == null ? null : Number(data.isdelivery);
  2194. data1.bottom_form.savename = data.consigneeName;
  2195. data1.bottom_form.phone = data.consigneePhone;
  2196. data1.bottom_form.address = data.address;
  2197. data1.province = data.province;
  2198. data1.city = data.city;
  2199. data1.area = data.district;
  2200. if (data.revierwstate == 1) {
  2201. data1.prescribed = 0; // 是否已开方 0否 1是
  2202. data1.paystate = 0;
  2203. } else {
  2204. data1.prescribed = data.prescribed; // 是否已开方 0否 1是
  2205. data1.paystate = data.paystate;
  2206. }
  2207. } else {
  2208. data1.prescribed = data.prescribed; // 是否已开方 0否 1是
  2209. data1.paystate = data.paystate;
  2210. }
  2211. data1.bottom_form.zhutuo = data.command;
  2212. if (data.province) {
  2213. data1.getArea(data.province, 1);
  2214. }
  2215. if (data.city) {
  2216. data1.getArea(data.city, 2);
  2217. }
  2218. data1.nowRecipeMoney = data.thisRecipePrice;
  2219. data1.allMoney = data.allprice;
  2220. let arr = [];
  2221. data.chengDetail.forEach((item, index) => {
  2222. let obj = {
  2223. id: item.seqn,
  2224. drugList: [],
  2225. search_i: "",
  2226. page: 1,
  2227. loadMore: true,
  2228. usageList: [],
  2229. numList: [],
  2230. timeList: [],
  2231. name: item.drugName,
  2232. spec: item.specification, // 规格
  2233. dose: item.dose, // 剂量
  2234. unit: item.unit, // 单位
  2235. usage: item.usagestr, // 用法
  2236. nums: item.frequency, //频次
  2237. timesQuan: item.secondDose, // 次用量,
  2238. timesUnit: item.zxdw,
  2239. time: item.medicationtime, // 服药时间
  2240. doseUnit: item.bzdw,
  2241. from: item.origin, // 产地
  2242. price: item.price,
  2243. total: item.allprice,
  2244. inventory: item.instock, // 库存
  2245. key: "",
  2246. medid: item.drugid
  2247. };
  2248. data1.getSelectType("中药制剂药品用法", index);
  2249. data1.getSelectType("中药制剂服药时间", index);
  2250. data1.getSelectType("中药制剂频次", index);
  2251. arr.push(obj);
  2252. });
  2253. arr.push({
  2254. key: "",
  2255. page: 1,
  2256. drugList: [],
  2257. usageList: [],
  2258. numList: [],
  2259. timeList: [],
  2260. loadMore: true
  2261. });
  2262. data1.tableData3 = arr;
  2263. data1.tableData3.filter((item, index) => {
  2264. return (item.id = index + 1);
  2265. });
  2266. this.$forceUpdate();
  2267. loading.close();
  2268. }, 1000);
  2269. },
  2270. // 获取数据 赋值给 适宜技术处方
  2271. assignRecipe3(data, loading) {
  2272. setTimeout(() => {
  2273. let children = this.$children.filter(item => {
  2274. return (
  2275. item.name == "中药处方" ||
  2276. item.name == "中药制剂" ||
  2277. item.name == "适宜技术处方"
  2278. );
  2279. });
  2280. let data1 = children[2];
  2281. let isAutoCheck = data1.isAutoCheck;
  2282. data1.preId = data.preId ? data.preId : "";
  2283. data1.bottom_form.doseNum1 = data.num;
  2284. data1.bottom_form.doseType1 = data.technologyType;
  2285. data1.bottom_form.zhutuo = data.command;
  2286. data1.bottom_form.caozuo = data.useexplain;
  2287. data1.allMoney = data.allprice;
  2288. data1.nowMoney = data.thisRecipePrice;
  2289. if (!!this.getEditPreNo()) {
  2290. if (data.revierwstate == 1) {
  2291. data1.prescribed = 0; // 是否已开方 0否 1是
  2292. data1.paystate = 0;
  2293. } else {
  2294. data1.prescribed = data.prescribed; // 是否已开方 0否 1是
  2295. data1.paystate = data.paystate;
  2296. }
  2297. } else {
  2298. data1.prescribed = data.prescribed; // 是否已开方 0否 1是
  2299. data1.paystate = data.paystate;
  2300. }
  2301. let arr = [];
  2302. data.detail.forEach((item, index) => {
  2303. let obj = {
  2304. id: item.sqen,
  2305. name: item.pointname,
  2306. acuname: item.pointname,
  2307. acuid: item.pointid
  2308. };
  2309. arr.push(obj);
  2310. });
  2311. arr.filter((item, index) => {
  2312. return (item.id = index + 1);
  2313. });
  2314. data1.tableData4 = arr;
  2315. loading.close();
  2316. }, 1000);
  2317. },
  2318. // 协定方数据转方 赋值给中药处方
  2319. agreeAssignToTCM(data, loading, request = true) {
  2320. let children = this.$children.filter(item => {
  2321. return (
  2322. item.name == "中药处方" ||
  2323. item.name == "中药制剂" ||
  2324. item.name == "适宜技术处方"
  2325. );
  2326. });
  2327. let data1 = children[0];
  2328. console.log(data1, "打印data1");
  2329. data1.recipe_tabs[data1.recipe_tabs_c].disable = false;
  2330. if (data.isupdate && data.isupdate === "1") {
  2331. // 专家经验 不允许 修改
  2332. data1.recipe_tabs[data1.recipe_tabs_c].disable = true;
  2333. sessionStorage.setItem("isupdateExpre", "1");
  2334. }
  2335. if (data.type && data.type === "1") {
  2336. // 协定方 不允许 修改
  2337. data1.recipe_tabs[data1.recipe_tabs_c].disable = true;
  2338. sessionStorage.setItem("isupdateExpre", "1");
  2339. }
  2340. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
  2341. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.disable =
  2342. data.type == "1";
  2343. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
  2344. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.doseType =
  2345. data.curetype;
  2346. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.nongjian =
  2347. data.density;
  2348. data1.recipe_tabs[
  2349. data1.recipe_tabs_c
  2350. ].bottom_form.specialDeploymentPrice = data.deploymentfree;
  2351. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.num = data.frequency;
  2352. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.time =
  2353. data.medicationtime;
  2354. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.agencyPrice =
  2355. data.fryingfee;
  2356. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.systemOfCreamPrice =
  2357. data.markfree;
  2358. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.radio =
  2359. data.prescriptiontype;
  2360. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.usege = data.usrage;
  2361. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = [];
  2362. if (!request) return;
  2363. // 赋值给表格
  2364. data.preStiDetails.forEach((item, index) => {
  2365. let obj1 = {
  2366. drugList: [],
  2367. page: 1,
  2368. loadMore: true,
  2369. usageList: [],
  2370. id: item.seqn,
  2371. name: item.ypmc || item.drugname,
  2372. spec: item.gg || item.specification, // 规格
  2373. dose: item.dose, // 剂量
  2374. unit: item.dw || item.unit, // 单位
  2375. usage: item.usagestr, // 用法
  2376. // usage: "",
  2377. // price: item.lsjg,
  2378. price: item.price ? item.price : 0,
  2379. total: item.price ? item.price * item.dose : 0,
  2380. inventory: item.kc, // 库存
  2381. key: "",
  2382. search_i: index,
  2383. medid: item.ypmc ? item.pid || item.matid : drugid, // 药品id
  2384. originname: item.cdmc, // 产地名称
  2385. showSearch: false
  2386. };
  2387. obj1.ggnum = +item.ggnum || 1;
  2388. obj1.xbzxs = +item.xbzxs || '34'.includes(item.zylx) ? obj1.ggnum : 1;
  2389. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push(obj1);
  2390. data1.getSelectType("中药药品用法", index);
  2391. });
  2392. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push({
  2393. drugList: [],
  2394. page: 1,
  2395. loadMore: true,
  2396. usageList: [],
  2397. showSearch: false,
  2398. search_i: 0,
  2399. key: "",
  2400. id: 1
  2401. });
  2402. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.filter(
  2403. (item3, index3) => {
  2404. this.rationalMed = [];
  2405. this.resetRationalMed();
  2406. this.getRationalMed(item3.medid);
  2407. return (item3.id = index3 + 1);
  2408. }
  2409. );
  2410. data1.recipe_tabs[data1.recipe_tabs_c].tableData = data1.recipe_tabs[
  2411. data1.recipe_tabs_c
  2412. ].totalTableD.filter(item2 => {
  2413. return Number(item2.id) % 2 != 0;
  2414. });
  2415. data1.recipe_tabs[data1.recipe_tabs_c].tableData1 = data1.recipe_tabs[
  2416. data1.recipe_tabs_c
  2417. ].totalTableD.filter(item2 => {
  2418. return Number(item2.id) % 2 == 0;
  2419. });
  2420. this.showAgree = false;
  2421. this.showExpr = false;
  2422. this.showPresc = false;
  2423. this.showUnifyPresc = false;
  2424. data1.getPharmacyID();
  2425. data1.changePharmacy();
  2426. },
  2427. // 存为协定方后打开处方
  2428. openRecipeAfterAgree() {
  2429. let zhongPrescriptionVo = this.zhongPrescriptionVo;
  2430. let chengPrescriptionVo = this.chengPrescriptionVo;
  2431. let technologyPrescriptionVo = this.technologyPrescriptionVo;
  2432. this._getRecipePriview(
  2433. zhongPrescriptionVo,
  2434. chengPrescriptionVo,
  2435. technologyPrescriptionVo
  2436. );
  2437. },
  2438. // 提交中药处方
  2439. async submitRecipe1() {
  2440. const cancel = (id) => {
  2441. this.saving = false;
  2442. if (id) this.container_i = this.contentTabs.findIndex(tab => tab.id === id);
  2443. }
  2444. this.saving = true;
  2445. if (!await this.$refs.TCM.saveDiagnosisData()) return cancel();
  2446. let zhongPrescriptionVo = [];
  2447. let chengPrescriptionVo = {};
  2448. let technologyPrescriptionVo = {};
  2449. const selected = this.contentTabs[this.container_i];
  2450. const tabs = this.contentTabs.filter(tab => tab.check && tab.id !== selected.id)
  2451. tabs.unshift(selected);
  2452. for (const tab of tabs) {
  2453. const child = this.$children.find(child => child.name === tab.name);
  2454. if (!(child.saveable || selected.id === tab.id)) continue;
  2455. switch (tab.id) {
  2456. case /*中药处方*/
  2457. '0': {
  2458. zhongPrescriptionVo = this.dealRecipe1(child);
  2459. if (!zhongPrescriptionVo || !zhongPrescriptionVo.length) return cancel(tab.id);
  2460. try {
  2461. const {options, force} = await this.getRationalSafeUse();
  2462. if (options.length) {
  2463. const results = await Promise.all(child.recipe_tabs.map((_, index) => this.getRationalMed2(index)));
  2464. const tips = results.map((item, index) => {
  2465. const value = options.map(i => item[i] ? `<div class="title">${item[i].title}</div><div class="content">${item[i].collection.join('')}</div>` : '').join('');
  2466. 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>` : '';
  2467. }).join('');
  2468. if (tips) {
  2469. if (!force) {
  2470. this.$message({
  2471. dangerouslyUseHTMLString: true,
  2472. customClass: 'message-rational-safe-use-wrapper',
  2473. message: tips,
  2474. duration: 1000 * 3,
  2475. showClose: true,
  2476. })
  2477. } else if (await this.$confirm(tips, '温馨提示:是否保存处方?', {
  2478. confirmButtonText: '保存',
  2479. cancelButtonText: '取消',
  2480. dangerouslyUseHTMLString: true,
  2481. customClass: 'message-rational-safe-use-wrapper',
  2482. }).then(() => /* 继续 */ false, () => /* 取消 */ true)) return cancel(tab.id);
  2483. }
  2484. }
  2485. } catch (e) {}
  2486. break;
  2487. }
  2488. case /*中药制剂*/
  2489. '1': {
  2490. if (+child.paystate === 1) continue;
  2491. chengPrescriptionVo = this.dealRecipe2(child);
  2492. if (!chengPrescriptionVo || !Object.keys(chengPrescriptionVo).length) return cancel(tab.id);
  2493. break;
  2494. }
  2495. case /*适宜技术*/
  2496. '2': {
  2497. if (+child.paystate === 1) continue;
  2498. technologyPrescriptionVo = this.dealRecipe3(child);
  2499. if (!technologyPrescriptionVo || !Object.keys(technologyPrescriptionVo).length) return cancel(tab.id);
  2500. break;
  2501. }
  2502. }
  2503. }
  2504. await this._getRecipePriview(
  2505. zhongPrescriptionVo,
  2506. chengPrescriptionVo,
  2507. technologyPrescriptionVo
  2508. );
  2509. return cancel();
  2510. },
  2511. // 修改推荐方剂轮播图下标
  2512. changeRbanner(type) {
  2513. if (type == "add") {
  2514. if (this.r_current == 3) {
  2515. this.r_current = 0;
  2516. } else {
  2517. this.r_current += 1;
  2518. }
  2519. this.$refs.r_banner.setActiveItem(this.r_current);
  2520. } else if (type == "reduce") {
  2521. if (this.r_current == 0) {
  2522. this.r_current = 3;
  2523. } else {
  2524. this.r_current -= 1;
  2525. }
  2526. this.$refs.r_banner.setActiveItem(this.r_current);
  2527. }
  2528. },
  2529. // 修改协定方 tab
  2530. changeAgree(type) {
  2531. this.agree_current = type;
  2532. if (type == 0) {
  2533. // this.activeNames = '0'
  2534. this.collapseData[this.activeNames].page = 1;
  2535. this.collapseData[this.activeNames].loadMore = true;
  2536. this.collapseData[this.activeNames].list = [];
  2537. this.getAgreeRecipe(this.collapseData[this.activeNames].loadMore);
  2538. } else if (type == 1) {
  2539. this.getPrescriptionsList();
  2540. } else if (type == 2) {
  2541. this.getDoctorCaseL();
  2542. }
  2543. },
  2544. // 查看药品信息
  2545. findDrug(scope) {
  2546. console.log(scope, "药品信息");
  2547. // this.showDrug = true
  2548. if (scope.row.color == "red") {
  2549. this.getMedDetail(scope.row.medid);
  2550. } else {
  2551. this.getDrugDetail(scope.row.medid);
  2552. }
  2553. },
  2554. // 查看穴位信息
  2555. find(scope) {
  2556. this.getAcupointD(scope.row.acuid);
  2557. },
  2558. clearContainer(id) {
  2559. try { this.contentTabs.find(tab => tab.id === id).color = ''; } catch (e) {}
  2560. },
  2561. // 顶部tab 改变
  2562. async changeContainer(item, type) {
  2563. this.container_i = type;
  2564. item.check = true;
  2565. if (item.id === '1') return;
  2566. // if (this.contentTabs[type].color == 'red') {
  2567. await this.inferRecipe(3, item.businesstype);
  2568. const child = this.$children.find(child => child.name === item.name);
  2569. if (!child) return
  2570. if (item.id === '0') {
  2571. try { this.tjRecipeId = child.recipe_tabs[child.recipe_tabs_c].id; } catch (e) { this.tjRecipeId = "" }
  2572. } else if (item.id === '2') {
  2573. try { this.tjRecipeId = child.recipeId; } catch (e) { this.tjRecipeId = "" }
  2574. }
  2575. // }
  2576. // if (type == 2) {
  2577. // if (!this.isTuiDaoSuit) {
  2578. // this.isTuiDaoSuit = true
  2579. // this.inferRecipe()
  2580. // }
  2581. // }
  2582. // if (type == 0) {
  2583. // if (!this.isTuiDaoZy) {
  2584. // this.isTuiDaoZy = true
  2585. // this.inferRecipe()
  2586. // }
  2587. // }
  2588. },
  2589. checked(item1) {
  2590. this.contentTabs.forEach(item => {
  2591. if (item.name == item1.name) {
  2592. item.check = !item.check;
  2593. }
  2594. });
  2595. let type = this.container_i;
  2596. setTimeout(() => {
  2597. if (type == 0) {
  2598. let arr = this.$refs.chineseM.recipe_tabs;
  2599. let allmoney = 0;
  2600. arr.forEach(item => {
  2601. allmoney += item.bottom_form.allMoney;
  2602. });
  2603. this.chineseM.allMoney = allmoney;
  2604. } else if (type == 1) {
  2605. console.log(this.$refs.medicineC.allMoney);
  2606. this.medicineC.allMoney = this.$refs.medicineC.allMoney;
  2607. } else if (type == 2) {
  2608. this.suitScience.allMoney = this.$refs.suitScience.allMoney;
  2609. }
  2610. }, 500);
  2611. },
  2612. // 名家验案转方
  2613. turnRecipe(item) {
  2614. this.setDrugsInfo(item.verpreitemlist);
  2615. this.setRecipeId('');
  2616. this.changeAndJoin();
  2617. this.addRecipeFrom("5");
  2618. },
  2619. // 就诊记录转方
  2620. turnRecipe1(item) {
  2621. // 病历转方
  2622. this.addRecipeFrom("6");
  2623. this.getRecipeDataByid(item.pid);
  2624. this.showRecord = false;
  2625. this.showAgree = false;
  2626. },
  2627. transposition(recipe) {
  2628. const is = recipe.medicine.every(m => m.matid);
  2629. if (is) {
  2630. // 调用 方剂 换方
  2631. const medicines = recipe.medicine.map((m, i) => {
  2632. const medicine = {
  2633. matid: m.matid,
  2634. matname: m.ypmc,
  2635. dose: m.dose,
  2636. unit: m.dw || m.zxdw || m.bzdw,
  2637. useage: m.usagestr,
  2638. seqn: i + 1,
  2639. }
  2640. medicine.ggnum = +m.ggnum || 1;
  2641. medicine.xbzxs = +m.xbzxs || '34'.includes(m.zylx) ? medicine.ggnum : 1;
  2642. return medicine;
  2643. });
  2644. if (recipe.__RecipeFrom__ === '2') this.agreeAssignToTCM(recipe, void 0, true);
  2645. this.setDrugsInfo(medicines);
  2646. this.setRecipeId('');
  2647. this.changeAndJoin(1);
  2648. } else if (recipe.__RecipeFrom__ === '2') {
  2649. this.agreeInfo = recipe;
  2650. this.changeBasisPre(this.agreeInfo.pid);
  2651. }
  2652. if (recipe.__RecipeFrom__) this.addRecipeFrom(recipe.__RecipeFrom__ /* 2 协定方*/);
  2653. },
  2654. /**
  2655. * 协定方转方
  2656. * @deprecated
  2657. */
  2658. turnRecipe2() {
  2659. this.addRecipeFrom("2");
  2660. this.changeBasisPre(this.agreeInfo.pid);
  2661. // this.showAgree = false
  2662. },
  2663. // 专家经验合方
  2664. joinRecipe3(info) {
  2665. let children = this.$children.filter(item => {
  2666. return (
  2667. item.name == "中药处方" ||
  2668. item.name == "中药制剂" ||
  2669. item.name == "适宜技术处方"
  2670. );
  2671. });
  2672. let data1 = children[0];
  2673. let data = info;
  2674. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
  2675. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.disable =
  2676. data.type == "1";
  2677. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.preType = data.type;
  2678. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.doseType =
  2679. data.curetype;
  2680. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.nongjian =
  2681. data.density;
  2682. data1.recipe_tabs[
  2683. data1.recipe_tabs_c
  2684. ].bottom_form.specialDeploymentPrice = data.deploymentfree;
  2685. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.num = data.frequency;
  2686. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.time =
  2687. data.medicationtime;
  2688. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.agencyPrice =
  2689. data.fryingfee;
  2690. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.systemOfCreamPrice =
  2691. data.markfree;
  2692. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.radio =
  2693. data.prescriptiontype;
  2694. data1.recipe_tabs[data1.recipe_tabs_c].bottom_form.usege = data.usrage;
  2695. if (data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.length == 1) {
  2696. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD = [];
  2697. } else {
  2698. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.pop();
  2699. }
  2700. if (info.isupdate == "1") {
  2701. this.turnRecipe3(info);
  2702. return;
  2703. }
  2704. // 赋值给表格
  2705. data.preStiDetails.forEach((item, index) => {
  2706. let obj1 = {
  2707. drugList: [],
  2708. page: 1,
  2709. loadMore: true,
  2710. usageList: [],
  2711. id: item.seqn,
  2712. name: item.ypmc || item.drugname,
  2713. spec: item.gg || item.specification, // 规格
  2714. dose: item.dose, // 剂量
  2715. unit: item.dw || item.unit, // 单位
  2716. // usage: item.usagestr, // 用法
  2717. usage: "",
  2718. // usage: item.yf,
  2719. // price: item.lsjg,
  2720. price: item.price ? item.price : 0,
  2721. total: item.price ? item.price * item.dose : 0,
  2722. inventory: item.kc, // 库存
  2723. key: "",
  2724. search_i: index,
  2725. medid: item.ypmc ? item.pid : drugid, // 药品id
  2726. originname: item.cdmc, // 产地名称
  2727. showSearch: false
  2728. };
  2729. obj1.ggnum = +item.ggnum || 1;
  2730. obj1.xbzxs = +item.xbzxs || '34'.includes(item.zylx) ? obj1.ggnum : 1;
  2731. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push(obj1);
  2732. data1.getSelectType("中药药品用法", index);
  2733. });
  2734. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.push({
  2735. drugList: [],
  2736. page: 1,
  2737. loadMore: true,
  2738. usageList: [],
  2739. showSearch: false,
  2740. search_i: 0,
  2741. key: "",
  2742. id: 1
  2743. });
  2744. data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.filter(
  2745. (item3, index3) => {
  2746. this.rationalMed = [];
  2747. this.resetRationalMed();
  2748. this.getRationalMed(item3.medid);
  2749. return (item3.id = index3 + 1);
  2750. }
  2751. );
  2752. data1.recipe_tabs[data1.recipe_tabs_c].tableData = data1.recipe_tabs[
  2753. data1.recipe_tabs_c
  2754. ].totalTableD.filter(item2 => {
  2755. return Number(item2.id) % 2 != 0;
  2756. });
  2757. data1.recipe_tabs[data1.recipe_tabs_c].tableData1 = data1.recipe_tabs[
  2758. data1.recipe_tabs_c
  2759. ].totalTableD.filter(item2 => {
  2760. return Number(item2.id) % 2 == 0;
  2761. });
  2762. this.showAgree = false;
  2763. this.showExpr = false;
  2764. data1.getPharmacyID();
  2765. },
  2766. //专家经验转方
  2767. turnRecipe3(info) {
  2768. this.changeExpre(info);
  2769. },
  2770. // 适宜技术处方 专方 和方
  2771. suitChnageOrJoin(type = "", info) {
  2772. // type = '' 专访 type == 1 和方
  2773. if (this.container_i == 1) return;
  2774. const child = this.$children.find(child => child.name === '适宜技术处方');
  2775. if (!child) return;
  2776. const loading = this.$loading({
  2777. lock: true,
  2778. text: "正在处理数据,请稍后",
  2779. spinner: "el-icon-loading",
  2780. background: "rgba(0, 0, 0, 0.7)"
  2781. });
  2782. let drugs = this.getDrugInfo;
  2783. const recipeId = +type !== 1 ? this.getRecipeId : "";
  2784. this.setRecipeId('');
  2785. this.tjRecipeId = recipeId
  2786. const merge = !(info && info.operation)
  2787. if (type == "") {
  2788. child.bottom_form.caozuo = merge || !info ? '' : info.operation;
  2789. // 转方
  2790. child.tableData4 = [];
  2791. drugs.forEach((item, index) => {
  2792. let obj = {
  2793. id: index + 1,
  2794. name: item.acuname,
  2795. acuname: item.acuname,
  2796. acuid: item.acuid
  2797. };
  2798. // 锚点
  2799. if (merge && item.acuoperation) child.bottom_form.caozuo += obj.acuname + ':' + item.acuoperation + ' ';
  2800. child.tableData4.push(obj);
  2801. });
  2802. child.tableData4.push({
  2803. id: "",
  2804. name: "",
  2805. acuname: "",
  2806. acuid: ""
  2807. });
  2808. child.tableData4.filter((item, index) => {
  2809. return (item.id = index + 1);
  2810. });
  2811. } else if (type == 1) {
  2812. child.tableData4.pop();
  2813. for (const item of drugs) {
  2814. if (child.tableData4.find(({acuid}) => acuid === item.acuid)) continue;
  2815. let obj = {
  2816. id: child.tableData4.length + 1,
  2817. name: item.acuname,
  2818. acuname: item.acuname,
  2819. acuid: item.acuid,
  2820. };
  2821. // 锚点
  2822. if (merge && item.acuoperation) child.bottom_form.caozuo += obj.acuname + ':' + item.acuoperation + ' ';
  2823. child.tableData4.push(obj);
  2824. }
  2825. child.tableData4.push({
  2826. id: "",
  2827. name: "",
  2828. acuname: "",
  2829. acuid: ""
  2830. });
  2831. child.tableData4.filter((item, index) => {
  2832. return (item.id = index + 1);
  2833. });
  2834. }
  2835. child.recipeId = recipeId
  2836. this.showDialog = false;
  2837. loading.close();
  2838. },
  2839. // 换方 按钮 直接点击
  2840. inferChange(item, type = "", type1 = "") {
  2841. // type == 1 type1 == 1 不掉详情接口 直接转方 和方
  2842. this.addRecipeFrom("4", 2);
  2843. if (type == 1 && type1 == 1) {
  2844. this.setDrugsInfo(item.items);
  2845. this.setRecipeId('');
  2846. this.suitChnageOrJoin('', item);
  2847. return;
  2848. }
  2849. console.log(item, "item");
  2850. this.getPreDetal(item.preid || item.pried || item.acupreid);
  2851. },
  2852. // 和方按钮直接点击
  2853. inferChange1(item, type = "", type1 = "") {
  2854. let isupdateExpre = sessionStorage.getItem("isupdateExpre");
  2855. if (isupdateExpre == "1") {
  2856. this.$message("请先清空当前处方");
  2857. return;
  2858. }
  2859. this.addRecipeFrom("4", 2);
  2860. if (type == 1 && type1 == 1) {
  2861. this.setDrugsInfo(item.items);
  2862. this.setRecipeId('');
  2863. this.suitChnageOrJoin(1, item);
  2864. return;
  2865. }
  2866. this.getPreDetal(item.preid || item.pried || item.acupreid, 2);
  2867. },
  2868. //方剂合方
  2869. joinRecipe() {
  2870. let isupdateExpre = sessionStorage.getItem("isupdateExpre");
  2871. if (isupdateExpre == "1") {
  2872. this.$message("请先清空当前处方");
  2873. return;
  2874. }
  2875. if (!this.preInfo.prename) {
  2876. this.addRecipeFrom("4", 2);
  2877. this.suitChnageOrJoin(1, this.preInfo);
  2878. return;
  2879. }
  2880. this.addRecipeFrom("4");
  2881. this.setDrugsInfo(this.preInfo.items);
  2882. this.setRecipeId('');
  2883. this.changeAndJoin(2);
  2884. },
  2885. // 方剂换方
  2886. changeRecipe(e) {
  2887. if (e == 1) {
  2888. this.showDialog = false;
  2889. // this.tjRecipeId = ''
  2890. return;
  2891. }
  2892. if (!this.preInfo.prename) {
  2893. this.addRecipeFrom("4", 2);
  2894. // 适宜技术处方
  2895. this.suitChnageOrJoin('', this.preInfo);
  2896. return;
  2897. }
  2898. this.addRecipeFrom("4");
  2899. this.setDrugsInfo(this.preInfo.items);
  2900. this.changeAndJoin(1);
  2901. },
  2902. // 药方是否支付
  2903. async _recipeIsPay(id, type, index) {
  2904. let res = await recipeIsPay({
  2905. preId: id,
  2906. visitId: JSON.parse(sessionStorage.getItem("patiensInfo")).pid
  2907. });
  2908. if (res.ResultCode == 0) {
  2909. // 跟据id 回显
  2910. let children = this.$children.filter(item => {
  2911. return (
  2912. item.name == "中药处方" ||
  2913. item.name == "中药制剂" ||
  2914. item.name == "适宜技术处方"
  2915. );
  2916. });
  2917. let data1 = children[0];
  2918. let data2 = children[1];
  2919. let data3 = children[2];
  2920. if (type == 1) {
  2921. // 根据处方id 回显
  2922. setTimeout(() => {
  2923. if (data1.recipe_tabs[data1.recipe_tabs_c].totalTableD.length > 1) {
  2924. data1.recipe_tabs[data1.recipe_tabs_c].isPay = res.Data;
  2925. }
  2926. if (data2.tableData3.length > 1) {
  2927. data2.isPay = res.Data;
  2928. }
  2929. if (data3.tableData4.length > 1) {
  2930. data3.isPay = res.Data;
  2931. }
  2932. }, 1000);
  2933. }
  2934. if (type == 2) {
  2935. setTimeout(() => {
  2936. // 处方回显
  2937. if (index) {
  2938. data1.recipe_tabs[index].isPay = res.Data;
  2939. }
  2940. if (data2.tableData3.length > 1) {
  2941. data2.isPay = res.Data;
  2942. }
  2943. if (data3.tableData4.length > 1) {
  2944. data3.isPay = res.Data;
  2945. }
  2946. }, 1000);
  2947. }
  2948. }
  2949. },
  2950. // 获取穴位信息
  2951. async getAcupointD(id) {
  2952. let res = await getAcupointD({
  2953. acuid: id
  2954. });
  2955. if (res.code == 0) {
  2956. this.xwinfo = res.data;
  2957. this.showXuewei = true;
  2958. }
  2959. },
  2960. // 获取病人 左侧信息
  2961. async getPatiensBasisM() {
  2962. let res = await getPatiensBasisM({
  2963. patientId: this.getPatiensInfo.pid
  2964. // patientId: '4e9db43d-25aa-4683-9564-5120deac2c56'
  2965. });
  2966. if (res.ResultCode == 0) {
  2967. // res.Data.recordLength = res.Data.patientRecord.length;
  2968. // this.agree_key = res.Data.maindiagnosis ?
  2969. // res.Data.maindiagnosis.namemedicine ?
  2970. // res.Data.maindiagnosis.namemedicine :
  2971. // "" :
  2972. // "";
  2973. this.agree_key1 = res.Data.maindiagnosis
  2974. ? res.Data.maindiagnosis.namemedicine
  2975. ? res.Data.maindiagnosis.namemedicine
  2976. : ""
  2977. : "";
  2978. res.Data.secondarydiagnosis = res.Data.secondarydiagnosis
  2979. ? res.Data.secondarydiagnosis
  2980. : [];
  2981. this.patiensMsg = res.Data;
  2982. this.patiensMsg.outpatientElectronicmedicalrecord.image1 = formatPicture(this.patiensMsg.outpatientElectronicmedicalrecord.image1);
  2983. // if (!this.patiensMsg.maindiagnosis.disid) {
  2984. // this.$message.warning("请先提交一条诊断信息");
  2985. // this.$router.replace({
  2986. // path: "/index/diagnosis"
  2987. // });
  2988. // return;
  2989. // }
  2990. // if (this.patiensMsg.maindiagnosis.disid) {
  2991. // this.inferRecipe();
  2992. // }
  2993. }
  2994. },
  2995. async openTongueAndFaceAnalysis() {
  2996. if (!this.tongueAndFaceAnalysis) await this.getPatientBasisTongueAndFaceAnalysis()
  2997. if (this.tongueAndFaceAnalysis) this.showTongueAnalysis = true;
  2998. },
  2999. // 获取病人 舌面象数据
  3000. async getPatientBasisTongueAndFaceAnalysis() {
  3001. this.tongueAndFaceLoading = true;
  3002. try {
  3003. const get = getTongueAndFaceAnalysisRecords.bind(null, this.getPatiensInfo ? this.getPatiensInfo.pid : "")
  3004. let result = await get(1, 3);
  3005. this.tongueAndFaceAnalysis = result.total > 0 ? {...result, get} : null;
  3006. } catch (e) {
  3007. this.$message.error(e.ResultInfo);
  3008. }
  3009. this.tongueAndFaceLoading = false;
  3010. },
  3011. // 获取处方预览数据
  3012. async _getRecipePriview(zhongyao, zhongchengyao, technology) {
  3013. const loading = this.$loading({
  3014. lock: true,
  3015. text: "正在提交",
  3016. spinner: "el-icon-loading",
  3017. background: "rgba(0, 0, 0, 0.7)"
  3018. });
  3019. let params = {
  3020. recordid: this.getPatiensInfo.pid,
  3021. technology: technology,
  3022. zhongchengyao: zhongchengyao,
  3023. zhongyao: zhongyao
  3024. };
  3025. let res = await getRecipePriview(params).catch(err => {
  3026. loading.close();
  3027. });
  3028. if (res.ResultCode == 0) {
  3029. loading.close();
  3030. res.Data.tcmPrescriptionFormVos.forEach((item, index) => {
  3031. // if(item.)
  3032. item.isdelivery = zhongyao[index].isdelivery;
  3033. });
  3034. this.priviewData = res.Data;
  3035. sessionStorage.setItem(
  3036. "priviewRawData",
  3037. JSON.stringify({
  3038. zhongyao,
  3039. zhongchengyao,
  3040. technology
  3041. })
  3042. );
  3043. this.showPriview = true;
  3044. }
  3045. },
  3046. // 获取处方回显数据
  3047. async getRecipeShowData() {
  3048. const loading = this.$loading({
  3049. lock: true,
  3050. text: "正在加载数据",
  3051. spinner: "el-icon-loading",
  3052. background: "rgba(0, 0, 0, 0.7)"
  3053. });
  3054. let res = await getRecipeShowData(this.getPatiensInfo.pid).catch(err => {
  3055. loading.close();
  3056. });
  3057. if (res.ResultCode == 0) {
  3058. if (!res.Data.flag) {
  3059. loading.close();
  3060. if (this.getPatiensInfo.pid) {
  3061. await this.getPatiensBasisM();
  3062. }
  3063. return;
  3064. }
  3065. this.contentTabs[0].check = res.Data.zhongyao.length > 0;
  3066. this.contentTabs[1].check = res.Data.zhongchengyao.chengDetail !== null;
  3067. this.contentTabs[2].check = res.Data.technology.detail !== null;
  3068. this.container_i = Math.max(this.contentTabs.findIndex(item => item.check), 0);
  3069. this.chineseM.allMoney = res.Data.zhonyaoPrice;
  3070. this.medicineC.allMoney = res.Data.zhonchengPrice;
  3071. this.suitScience.allMoney = res.Data.technologyPrice;
  3072. if (this.contentTabs[0].check) {
  3073. this.assignRecipe1(res.Data.zhongyao, loading);
  3074. res.Data.zhongyao.forEach((item, index) => {
  3075. this._recipeIsPay(item.preId, 2, index);
  3076. });
  3077. }
  3078. if (this.contentTabs[1].check) {
  3079. this.assignRecipe2(res.Data.zhongchengyao, loading);
  3080. this._recipeIsPay(res.Data.zhongchengyao.preId, 2);
  3081. }
  3082. if (this.contentTabs[2].check) {
  3083. this.assignRecipe3(res.Data.technology, loading);
  3084. this._recipeIsPay(res.Data.technology.preId, 2);
  3085. }
  3086. if (this.getPatiensInfo.pid) {
  3087. this.getPatiensBasisM();
  3088. }
  3089. }
  3090. },
  3091. // 跟据id 获取处方回显数据
  3092. async getRecipeDataByid(id) {
  3093. let params = {
  3094. pid: id
  3095. };
  3096. const loading = this.$loading({
  3097. lock: true,
  3098. text: "正在处理转方数据",
  3099. spinner: "el-icon-loading",
  3100. background: "rgba(0, 0, 0, 0.7)"
  3101. });
  3102. let res = await getRecipeDataByid(params).catch(err => {
  3103. loading.close();
  3104. });
  3105. if (res.ResultCode == 0) {
  3106. if (res.Data.type == 0) {
  3107. res.Data.zhongdetail = res.Data.detail;
  3108. let arr = [];
  3109. arr.push(res.Data);
  3110. this.container_i = 0;
  3111. this.contentTabs[0].check = true;
  3112. this.contentTabs[1].check = false;
  3113. this.contentTabs[2].check = false;
  3114. this.assignRecipe1(arr, loading);
  3115. } else if (res.Data.type == 1) {
  3116. res.Data.chengDetail = res.Data.detail;
  3117. this.container_i = 1;
  3118. this.contentTabs[0].check = false;
  3119. this.contentTabs[1].check = true;
  3120. this.contentTabs[2].check = false;
  3121. this.assignRecipe2(res.Data, loading);
  3122. } else if (res.Data.type == 2) {
  3123. this.container_i = 2;
  3124. this.contentTabs[0].check = false;
  3125. this.contentTabs[1].check = false;
  3126. this.contentTabs[2].check = true;
  3127. this.assignRecipe3(res.Data, loading);
  3128. }
  3129. await this._recipeIsPay(id, 1);
  3130. }
  3131. },
  3132. //获取右侧协定方列表
  3133. async getAgreeRecipe(load = true) {
  3134. if (!load) return;
  3135. let params = {
  3136. type: this.activeNames,
  3137. pageId: this.collapseData[this.activeNames].page,
  3138. pageSize: 10
  3139. };
  3140. let res = await getAgreeRecipe(params);
  3141. if (res.ResultCode == 0) {
  3142. if (
  3143. this.collapseData[this.activeNames].list.length <=
  3144. res.Data.TotalRecordCount
  3145. ) {
  3146. this.collapseData[this.activeNames].list = [
  3147. ...this.collapseData[this.activeNames].list,
  3148. ...res.Data.Items
  3149. ];
  3150. if (
  3151. this.collapseData[this.activeNames].list.length >=
  3152. res.Data.TotalRecordCount
  3153. ) {
  3154. this.collapseData[this.activeNames].loadMore = false;
  3155. } else {
  3156. this.collapseData[this.activeNames].page += 1;
  3157. }
  3158. } else {
  3159. this.collapseData[this.activeNames].loadMore = false;
  3160. }
  3161. }
  3162. },
  3163. // 获取方剂列表
  3164. async getPrescriptionsList(load = true) {
  3165. if (!load) return;
  3166. let params = {
  3167. pageid: this.rPrescription.page,
  3168. pagesize: 5,
  3169. searchtype: "",
  3170. keyword: this.agree_key
  3171. };
  3172. let res = await getPrescriptionsList(params);
  3173. if (res.code == 0) {
  3174. if (this.rPrescription.page <= res.data.TotalPageCount) {
  3175. this.rPrescription.list = [
  3176. ...this.rPrescription.list,
  3177. ...res.data.pres
  3178. ];
  3179. if (this.rPrescription.page == res.data.TotalPageCount) {
  3180. this.rPrescription.loadMore = false;
  3181. } else {
  3182. this.rPrescription.page += 1;
  3183. }
  3184. } else {
  3185. this.rPrescription.loadMore = false;
  3186. }
  3187. }
  3188. },
  3189. // 获取参考医案
  3190. async getDoctorCaseL(load = true) {
  3191. if (!load) return;
  3192. let params = {
  3193. pageid: this.rDoctorCase.page,
  3194. pagesize: 5,
  3195. searchtype: "",
  3196. keyword: this.agree_key1
  3197. };
  3198. let res = await getDoctorCaseL(params);
  3199. if (res.code == 0) {
  3200. if (this.rDoctorCase.page <= res.data.TotalPageCount) {
  3201. res.data.verifys.filter(item => {
  3202. return (item.content = item.disname + " " + item.attendingexpert);
  3203. });
  3204. this.rDoctorCase.list = [
  3205. ...this.rDoctorCase.list,
  3206. ...res.data.verifys
  3207. ];
  3208. if (this.rDoctorCase.page == res.data.TotalPageCount) {
  3209. this.rDoctorCase.loadMore = false;
  3210. } else {
  3211. this.rDoctorCase.page += 1;
  3212. }
  3213. } else {
  3214. this.rPrescriprDoctorCasetion = { ...this.rPrescriprDoctorCasetion, loadMore: false, };
  3215. }
  3216. }
  3217. },
  3218. // 获取右侧合理用药信息展示
  3219. async getRationalMed2(index) {
  3220. const child = this.$children.find(item => item.name === "中药处方");
  3221. if (index == null) index = child.recipe_tabs_c;
  3222. const gather = child.recipe_tabs[index].totalTableD.filter(item => item.name && item.medid).map(item => item.medid);
  3223. const request = (id, i, ids) => getRationalMed({
  3224. matID: id,
  3225. matIds: [...ids.slice(0, i), ...ids.slice(i + 1)],
  3226. orgId: this.getuserinfo.organizationid,
  3227. }).then(res => res.code === 0 ? Object.assign({matid: id}, res.data) : null).catch(err => null)
  3228. const rationalMed = await Promise.all(gather.map(request)).then(data => data.filter(Boolean));
  3229. return rationalMed.reduce((data, item) => {
  3230. const color = 'blue';
  3231. if (item.matdosage && item.showDose) {
  3232. const ref = {}, i = 1;
  3233. const child = data[i] || (data[i] = {title: '', collection: []});
  3234. child.collection.push(`<div>
  3235. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3236. <span class="met-value">${ref[item.matdosage]}</span>
  3237. </div>`);
  3238. }
  3239. if (item.matsjj) {
  3240. const ref = {1: '慎用', 2: '忌用', 3: '禁用'}, i = 2;
  3241. const child = data[i] || (data[i] = {title: '慎忌禁用药', collection: []});
  3242. child.collection.push(`<div>
  3243. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3244. <span class="met-value">${ref[item.matsjj]}</span>
  3245. </div>`);
  3246. }
  3247. if (item.matyfsjj) {
  3248. const color = item.matyfsjj === '3' ? 'red' : 'blue';
  3249. const ref = {1: '孕妇慎用', 2: '孕妇忌用', 3: '孕妇禁用'}, i = 3;
  3250. const child = data[i] || (data[i] = {title: '孕妇慎忌禁', collection: []});
  3251. child.collection.push(`<div>
  3252. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3253. <span class="met-value">${ref[item.matyfsjj]}</span>
  3254. </div>`);
  3255. }
  3256. if (item.matysjj) {
  3257. const ref = {}, i = 4;
  3258. const child = data[i] || (data[i] = {title: '服药饮食禁忌', collection: []});
  3259. child.collection.push(`<div>
  3260. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3261. <span class="met-value">${item.matysjj || '无'}</span>
  3262. </div>`);
  3263. }
  3264. if (item.matdxsm) {
  3265. const color = 'red';
  3266. const ref = {}, i = 5;
  3267. const child = data[i] || (data[i] = {title: '药物毒性说明', collection: []});
  3268. child.collection.push(`<div>
  3269. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3270. <span class="met-value">${item.matdxsm || '无'}</span>
  3271. </div>`);
  3272. }
  3273. if (item.matbzjj) {
  3274. const ref = {}, i = 6;
  3275. const child = data[i] || (data[i] = {title: '病证用药禁忌', collection: []});
  3276. child.collection.push(`<div>
  3277. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3278. <span class="met-value">${item.matbzjj || '无'}</span>
  3279. </div>`);
  3280. }
  3281. if (item.matsbf) {
  3282. const color = 'red';
  3283. const ref = {}, i = 7;
  3284. const child = data[i] || (data[i] = {title: '十八反', collection: []});
  3285. child.collection.push(`<div>
  3286. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3287. <span class="met-value">反${item.matsbf}</span>
  3288. </div>`);
  3289. }
  3290. if (item.matsjw) {
  3291. const color = 'red';
  3292. const ref = {}, i = 8;
  3293. const child = data[i] || (data[i] = {title: '十九畏', collection: []});
  3294. child.collection.push(`<div>
  3295. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3296. <span class="met-value">畏${item.matsjw}</span>
  3297. </div>`);
  3298. }
  3299. if (item.matby) {
  3300. const ref = {}, i = 9;
  3301. const child = data[i] || (data[i] = {title: '用药不宜', collection: []});
  3302. child.collection.push(`<div>
  3303. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3304. <span class="met-value">不宜与${item.matby}同用</span>
  3305. </div>`);
  3306. }
  3307. if (item.matmindosage && item.matmaxdosage) {
  3308. const ref = {}, i = 10;
  3309. const child = data[i] || (data[i] = {title: '超剂量药品', collection: []});
  3310. child.collection.push(`<div>
  3311. <span class="met-name" style="color: ${color};">${item.matname}</span>
  3312. <span class="met-value" style="color: red;">(${item.matmindosage}-${item.matmaxdosage})</span>
  3313. </div>`);
  3314. }
  3315. return data;
  3316. }, {title: `中药处方${index + 1}`});
  3317. },
  3318. async getRationalMed(id) {
  3319. // this.rationalMed = []
  3320. let children = this.$children.filter(item => {
  3321. return (
  3322. item.name == "中药处方" ||
  3323. item.name == "中药制剂" ||
  3324. item.name == "适宜技术处方"
  3325. );
  3326. });
  3327. let child = children[0];
  3328. const medicines = child.recipe_tabs[child.recipe_tabs_c].totalTableD || [];
  3329. const medicine = medicines.find(medicine => medicine.medid === id);
  3330. const ids = medicines.filter(medicine => medicine.name && medicine.medid !== id).map(medicine => medicine.medid);
  3331. // this.rationalMed = []
  3332. let res = await getRationalMed({
  3333. matID: id,
  3334. orgId: this.getuserinfo.organizationid,
  3335. matIds: ids
  3336. });
  3337. if (res.code == 0 && res.message) {
  3338. res.data.reqID = id;
  3339. this.rationalMed.push(Object.assign(res.data, {__medicine__: medicine}));
  3340. // 去重
  3341. const removeRepeat = (arr, key) => {
  3342. let obj = {};
  3343. arr = arr.reduce((pre, next) => {
  3344. obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
  3345. return pre;
  3346. }, []);
  3347. return arr;
  3348. };
  3349. this.resetRationalMed();
  3350. this.rationalMed = removeRepeat(this.rationalMed, "reqID");
  3351. }
  3352. },
  3353. resetRationalMed() {
  3354. const removeRepeat = (arr, key) => {
  3355. let obj = {};
  3356. arr = arr.reduce((pre, next) => {
  3357. obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
  3358. return pre;
  3359. }, []);
  3360. return arr;
  3361. };
  3362. this.rationalMed1 = [];
  3363. this.rationalMed2 = [];
  3364. this.rationalMed3 = [];
  3365. this.rationalMed4 = [];
  3366. this.rationalMed5 = [];
  3367. this.rationalMed6 = [];
  3368. this.rationalMed7 = [];
  3369. this.rationalMed8 = [];
  3370. this.rationalMed9 = [];
  3371. this.rationalMed10 = [];
  3372. this.rationalMed = removeRepeat(this.rationalMed, "reqID");
  3373. this.rationalMed.forEach(item => {
  3374. item.showDose = item.showDose ? true : false;
  3375. if (item.matdosage) {
  3376. // 超剂量药品:
  3377. this.rationalMed1.push(item);
  3378. }
  3379. if (item.matsjj) {
  3380. // 慎忌禁用药:
  3381. this.rationalMed2.push(item);
  3382. }
  3383. if (item.matyfsjj) {
  3384. // 孕妇慎忌禁:
  3385. this.rationalMed3.push(item);
  3386. }
  3387. if (item.matysjj) {
  3388. // 服药饮食禁忌:
  3389. this.rationalMed4.push(item);
  3390. }
  3391. if (item.matdxsm) {
  3392. /// 药物毒性说明:
  3393. this.rationalMed5.push(item);
  3394. }
  3395. if (item.matbzjj) {
  3396. // 病证用药禁忌:
  3397. this.rationalMed6.push(item);
  3398. }
  3399. if (item.matsbf) {
  3400. // 18反
  3401. this.rationalMed7.push(item);
  3402. }
  3403. if (item.matsjw) {
  3404. // 十九畏:
  3405. this.rationalMed8.push(item);
  3406. }
  3407. if (item.matby) {
  3408. // 用药不宜:
  3409. this.rationalMed9.push(item);
  3410. }
  3411. if (item.matmaxdosage && item.matmindosage) {
  3412. try {
  3413. const dose = CC_Dosage2Basis(item.__medicine__);
  3414. if (dose && (dose < item.matmindosage || dose > item.matmaxdosage)) item.showDose = true;
  3415. } catch (e) {}
  3416. this.rationalMed10.push(item);
  3417. }
  3418. });
  3419. this.rationalMed1 = removeRepeat(this.rationalMed1, "matid");
  3420. this.rationalMed2 = removeRepeat(this.rationalMed2, "matid");
  3421. this.rationalMed3 = removeRepeat(this.rationalMed3, "matid");
  3422. this.rationalMed4 = removeRepeat(this.rationalMed4, "matid");
  3423. this.rationalMed5 = removeRepeat(this.rationalMed5, "matid");
  3424. this.rationalMed6 = removeRepeat(this.rationalMed6, "matid");
  3425. this.rationalMed7 = removeRepeat(this.rationalMed7, "matid");
  3426. this.rationalMed8 = removeRepeat(this.rationalMed8, "matid");
  3427. this.rationalMed9 = removeRepeat(this.rationalMed9, "matid");
  3428. this.rationalMed10 = removeRepeat(this.rationalMed10, "matid");
  3429. },
  3430. // 获取合理用药信息 平台
  3431. async getRationalMedForPlat(id) {
  3432. this.rationalMed = [];
  3433. let children = this.$children.filter(item => {
  3434. return (
  3435. item.name == "中药处方" ||
  3436. item.name == "中药制剂" ||
  3437. item.name == "适宜技术处方"
  3438. );
  3439. });
  3440. let child = children[0];
  3441. const medicines = child.recipe_tabs[child.recipe_tabs_c].totalTableD || [];
  3442. const medicine = medicines.find(medicine => medicine.medid === id);
  3443. const ids = medicines.filter(medicine => medicine.name && medicine.medid !== id).map(medicine => medicine.medid);
  3444. let res = await getRationalMedForPlat({
  3445. matID: id,
  3446. // orgId: this.getuserinfo.organizationid
  3447. matIds: ids
  3448. });
  3449. if (res.code == 0 && res.message) {
  3450. res.data.reqID = id;
  3451. this.rationalMed.push(Object.assign(res.data, {__medicine__: medicine}));
  3452. // 去重
  3453. const removeRepeat = (arr, key) => {
  3454. let obj = {};
  3455. arr = arr.reduce((pre, next) => {
  3456. obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
  3457. return pre;
  3458. }, []);
  3459. return arr;
  3460. };
  3461. this.rationalMed = removeRepeat(this.rationalMed, "reqID");
  3462. this.rationalMed.forEach(item => {
  3463. item.showDose = item.showDose ? true : false;
  3464. if (item.matdosage) {
  3465. // 超剂量药品:
  3466. this.rationalMed1.push(item);
  3467. }
  3468. if (item.matsjj) {
  3469. // 慎忌禁用药:
  3470. this.rationalMed2.push(item);
  3471. }
  3472. if (item.matyfsjj) {
  3473. // 孕妇慎忌禁:
  3474. this.rationalMed3.push(item);
  3475. }
  3476. if (item.matysjj) {
  3477. // 服药饮食禁忌:
  3478. this.rationalMed4.push(item);
  3479. }
  3480. if (item.matdxsm) {
  3481. /// 药物毒性说明:
  3482. this.rationalMed5.push(item);
  3483. }
  3484. if (item.matbzjj) {
  3485. // 病证用药禁忌:
  3486. this.rationalMed6.push(item);
  3487. }
  3488. if (item.matsbf) {
  3489. // 18反
  3490. this.rationalMed7.push(item);
  3491. }
  3492. if (item.matsjw) {
  3493. // 十九畏:
  3494. this.rationalMed8.push(item);
  3495. }
  3496. if (item.matby) {
  3497. // 用药不宜:
  3498. this.rationalMed9.push(item);
  3499. }
  3500. if (item.matmaxdosage && item.matmindosage) {
  3501. try {
  3502. const dose = CC_Dosage2Basis(item.__medicine__);
  3503. if (dose < item.matmindosage || dose > item.matmaxdosage) item.showDose = true;
  3504. } catch (e) {}
  3505. this.rationalMed10.push(item);
  3506. }
  3507. });
  3508. // 去重
  3509. this.rationalMed1 = removeRepeat(this.rationalMed1, "matid");
  3510. this.rationalMed2 = removeRepeat(this.rationalMed2, "matid");
  3511. this.rationalMed3 = removeRepeat(this.rationalMed3, "matid");
  3512. this.rationalMed4 = removeRepeat(this.rationalMed4, "matid");
  3513. this.rationalMed5 = removeRepeat(this.rationalMed5, "matid");
  3514. this.rationalMed6 = removeRepeat(this.rationalMed6, "matid");
  3515. this.rationalMed7 = removeRepeat(this.rationalMed7, "matid");
  3516. this.rationalMed8 = removeRepeat(this.rationalMed8, "matid");
  3517. this.rationalMed9 = removeRepeat(this.rationalMed9, "matid");
  3518. this.rationalMed10 = removeRepeat(this.rationalMed10, "matid");
  3519. }
  3520. },
  3521. // 推导处方
  3522. async inferRecipe(type = 1, businesstype) {
  3523. if (!this.patiensMsg.maindiagnosis.disid) {
  3524. return;
  3525. }
  3526. if (this.container_i == 1) return;
  3527. if (type != 4) {
  3528. // if (!this.patiensMsg.maindiagnosis.disid) {
  3529. // this.$message.warning('请先提交一条诊断信息');
  3530. // this.$router.replace({
  3531. // path: '/index/diagnosis'
  3532. // })
  3533. // return;
  3534. // }
  3535. }
  3536. if (type != 4 && businesstype == null) {
  3537. businesstype =
  3538. this.container_i == 0 ? "1" : this.container_i == 2 ? "3" : "1";
  3539. }
  3540. let params = {
  3541. businesstype: businesstype,
  3542. disid: this.patiensMsg.maindiagnosis.disid,
  3543. symid: this.patiensMsg.maindiagnosis.symptomid,
  3544. therapy: this.patiensMsg.maindiagnosis.treatment
  3545. };
  3546. const loading = this.$loading({
  3547. lock: true,
  3548. text: "正在获取推荐方剂数据",
  3549. spinner: "el-icon-loading",
  3550. background: "rgba(0, 0, 0, 0.7)"
  3551. });
  3552. let res = await inferRecipe(params).catch(err => {
  3553. loading.close();
  3554. });
  3555. if (res.code == 0) {
  3556. loading.close();
  3557. let arr = [];
  3558. res.data.expList.forEach(item => {
  3559. item.showType = 1; // 专家经验
  3560. item.book = item.book ? item.book : "(暂无)";
  3561. });
  3562. res.data.schemes[0].pres.forEach(item => {
  3563. item.showType = 0; // 之前的推导出
  3564. item.book = item.book ? item.book : "(暂无)";
  3565. });
  3566. // this.inferRecipeId = res.data.schemes[0].preid
  3567. let arr2 = res.data.expList.concat(res.data.schemes[0].pres);
  3568. if (type == 4) {
  3569. try { this.contentTabs.find(tab => tab.businesstype === businesstype).color = arr2.length > 0 ? "red" : ""; } catch (e) {}
  3570. return;
  3571. } else if (+type === 1) {
  3572. for (const tab of this.contentTabs) { if (!tab.hide) tab.color = "" }
  3573. }
  3574. if (arr2.length > 0) {
  3575. this.tjRecipeId = arr2[0].preid || arr2[0].pid || arr2[0].acupreid;
  3576. } else {
  3577. let children = this.$children.filter(item => {
  3578. return (
  3579. item.name == "中药处方" ||
  3580. item.name == "中药制剂" ||
  3581. item.name == "适宜技术处方"
  3582. );
  3583. });
  3584. let child = children[0];
  3585. if (
  3586. !child.recipe_tabs[child.recipe_tabs_c].isPay ||
  3587. child.recipe_tabs[child.recipe_tabs_c].paystate == 0
  3588. ) {
  3589. // child.clearRecipe();
  3590. }
  3591. }
  3592. this.rRecomendR = arr2;
  3593. if (this.$route.query.type != "tuidao" && type == 1) return;
  3594. if (type === 3) {
  3595. try { if (this.contentTabs[this.container_i].id === '0' && this.isTuiDaoZy) return; } catch (e) {}
  3596. try { if (this.contentTabs[this.container_i].id === '2' && this.isTuiDaoSuit) return; } catch (e) {}
  3597. }
  3598. if (this.rRecomendR.length == 0) return;
  3599. let children = this.$children.filter(item => {
  3600. return (
  3601. item.name == "中药处方" ||
  3602. item.name == "中药制剂" ||
  3603. item.name == "适宜技术处方"
  3604. );
  3605. });
  3606. let child = children[0];
  3607. let child2 = children[2];
  3608. if (
  3609. child.recipe_tabs[child.recipe_tabs_c].isPay ||
  3610. child.recipe_tabs[child.recipe_tabs_c].paystate == 1
  3611. ) {
  3612. // 已付费
  3613. child.addRecipeTba();
  3614. }
  3615. if (child2.isPay || child2.paystate == 1) {
  3616. // 已付费
  3617. this.$message.error("当前为已付费处方,暂不支持推导");
  3618. return;
  3619. }
  3620. setTimeout(() => {
  3621. if (
  3622. // this.$route.query.infer &&
  3623. // this.$route.query.infer == "true" &&
  3624. // && child.recipe_tabs[child.recipe_tabs_c].totalTableD.length == 1
  3625. this.container_i == 0
  3626. ) {
  3627. // console.log(arr, 'res.data');
  3628. this.addRecipeFrom("4");
  3629. if (arr2[0].showType == 1) {
  3630. // 专家经验
  3631. this.turnRecipe3(arr2[0]);
  3632. } else {
  3633. // 推导处方
  3634. this.getPreDetal(arr2[0].preid);
  3635. }
  3636. if (type == 3) {
  3637. this.isTuiDaoZy = true;
  3638. }
  3639. } else if (this.container_i == 2) {
  3640. // && child2.tableData4.length == 1
  3641. let info
  3642. if (arr2.length > 0) {
  3643. this.setDrugsInfo(arr2[0].items);
  3644. this.setRecipeId(arr2[0].acupreid);
  3645. info = arr2[0]
  3646. }
  3647. this.addRecipeFrom("4", 2);
  3648. this.suitChnageOrJoin('', info);
  3649. if (type == 3) {
  3650. this.isTuiDaoSuit = true;
  3651. }
  3652. }
  3653. }, 500);
  3654. }
  3655. },
  3656. // 新增处方来源
  3657. async addRecipeFrom(type, isSuit = "") {
  3658. if (type != 3) {
  3659. let children = this.$children.filter(item => {
  3660. return (
  3661. item.name == "中药处方" ||
  3662. item.name == "中药制剂" ||
  3663. item.name == "适宜技术处方"
  3664. );
  3665. });
  3666. let child = children[0];
  3667. let child2 = children[2];
  3668. // debugger;
  3669. child.recipe_tabs[child.recipe_tabs_c].isMyMade = false;
  3670. if (isSuit == 2) {
  3671. child2.isMyMade = false;
  3672. }
  3673. }
  3674. let res = await addRecipeFrom({
  3675. type: type
  3676. });
  3677. },
  3678. // 获取参考医案详情
  3679. async getDCaseDetail(id) {
  3680. let res = await getDCaseDetail({
  3681. verId: id
  3682. });
  3683. if (res.code == 0) {
  3684. this.showTestCase = true;
  3685. res.data.dialist.forEach(item => {
  3686. item.checktime = item.checktime.split(" ");
  3687. item.diatimes = numberToUpperCase(item.diatimes - 1);
  3688. });
  3689. this.testCaseInfo = res.data;
  3690. }
  3691. },
  3692. // 协定方转方 判断
  3693. async changeBasisPre(id) {
  3694. let params = {
  3695. basisPreId: id
  3696. };
  3697. let res = await changeBasisPre(params);
  3698. if (res.ResultCode == 0) {
  3699. this.agreeAssignToTCM(this.agreeInfo);
  3700. }
  3701. },
  3702. // 专家经验转方判断
  3703. async changeExpre(info) {
  3704. let params = {
  3705. basisPreId: info.pid
  3706. };
  3707. let res = await changeExpre(params);
  3708. if (res.ResultCode == 0) {
  3709. // info.preStiDetails = info.prescriptionDetailVos
  3710. this.agreeAssignToTCM(info);
  3711. }
  3712. },
  3713. // 名家验案和 方剂转方/合方
  3714. async changeAndJoin(type = 1) {
  3715. // type == 1 转方 type ==2 合方
  3716. let children = this.$children.filter(item => {
  3717. return (
  3718. item.name == "中药处方" ||
  3719. item.name == "中药制剂" ||
  3720. item.name == "适宜技术处方"
  3721. );
  3722. });
  3723. let child = children[0];
  3724. child.recipe_tabs[child.recipe_tabs_c].disable = false;
  3725. let drugs = this.getDrugInfo;
  3726. const recipeId = +type === 1 ? this.getRecipeId : "";
  3727. this.setRecipeId('');
  3728. this.tjRecipeId = recipeId;
  3729. // let type1 = 0
  3730. let type1 = child.recipe_tabs[child.recipe_tabs_c].radio.split("@")[1];
  3731. let ids = [];
  3732. drugs.forEach(item => {
  3733. item.oldDose = CC_Dosage2Basis(item);
  3734. let idDose = item.matid + "&" + item.oldDose + "&" + (item.useage || "");
  3735. ids.push(idDose);
  3736. });
  3737. if (this.container_i == 1) return;
  3738. const loading = this.$loading({
  3739. lock: true,
  3740. text: "正在处理药品数据,请稍等",
  3741. spinner: "el-icon-loading",
  3742. background: "rgba(0, 0, 0, 0.7)"
  3743. });
  3744. let res = await changeAndJoin({
  3745. pharmacyid: child.recipe_tabs[child.recipe_tabs_c].pharmacyID,
  3746. type: type1, // child.recipe_tabs[child.recipe_tabs_c].radio,
  3747. drugIds: ids
  3748. }).catch(err => {
  3749. loading.close();
  3750. });
  3751. if (this.container_i == 0) {
  3752. // 中药处方
  3753. if (res.ResultCode == 0) {
  3754. const getUsage = (function (list = [], value = '') {
  3755. if (!Array.isArray(list) || list.length === 0) return void 0;
  3756. const option = value && list.find(item => item.value === value || item.key == value);
  3757. return option ? option.key : list[0].key;
  3758. }).bind(null, child.usageList);
  3759. let noDrugs = []; // 查找不到的药品
  3760. let hasDrugs = []; // 查找的到的药品
  3761. res.Data.forEach((item, index) => {
  3762. drugs.forEach((item1, index1) => {
  3763. if (item == item1.matid) {
  3764. // debugger
  3765. item1.color = "red";
  3766. let obj = {
  3767. drugList: [],
  3768. page: 1,
  3769. loadMore: true,
  3770. usageList: [],
  3771. seqn: item1.seqn,
  3772. ypmc: item1.matname,
  3773. gg: "",
  3774. dw: item1.unit,
  3775. lsjg: item1.price ? item1.price : 0,
  3776. price: item1.price ? item1.price : 0,
  3777. kc: 0,
  3778. cdmc: "无",
  3779. pid: item1.matid,
  3780. color: "red",
  3781. dose: item1.dose,
  3782. usage: item1.useage || item1.usagestr, // child.usegeList[0].key,
  3783. showSearch: false,
  3784. matid: item1.matid,
  3785. key: "",
  3786. search_i: index
  3787. };
  3788. obj.oldDose = item1.oldDose;
  3789. /* 修正 */ obj.usage = obj.useage = getUsage(obj.usage);
  3790. noDrugs.push(obj);
  3791. // noDrugs.push(item1.matname)
  3792. }
  3793. if (item instanceof Object && item.oldYpid == item1.matid) {
  3794. item.oldDose = item.placeholderdose || item1.oldDose;
  3795. item.ggnum = +item.ggnum || 1;
  3796. item.xbzxs = +item.xbzxs || '34'.includes(item.zylx) ? item.ggnum : 1;
  3797. if (item.kc > 0) hasDrugs.push(item);
  3798. else {
  3799. item.color = 'red';
  3800. noDrugs.push(item);
  3801. }
  3802. }
  3803. });
  3804. });
  3805. hasDrugs = hasDrugs.concat(noDrugs);
  3806. if (hasDrugs.length > 0 && type == 1) {
  3807. child.recipe_tabs[child.recipe_tabs_c].totalTableD = [];
  3808. // console.log(hasDrugs, 'has');
  3809. // 赋值给表格
  3810. hasDrugs.forEach((item, index) => {
  3811. let obj1 = {
  3812. drugList: [],
  3813. page: 1,
  3814. loadMore: true,
  3815. usageList: [],
  3816. id: item.seqn,
  3817. name: item.ypmc,
  3818. spec: item.gg, // 规格
  3819. dose: item.dose, // 剂量
  3820. unit: item.dw, // 单位
  3821. // usage: item.usagestr, // 用法
  3822. usage: item.useage || item.usagestr, // child.usegeList[0].key,
  3823. // price: item.lsjg,
  3824. price: item.price ? item.price : 0,
  3825. total: item.price * item.dose,
  3826. inventory: item.kc, // 库存
  3827. key: "",
  3828. search_i: index,
  3829. medid: item.pid, // 药品id
  3830. originname: item.cdmc, // 产地名称
  3831. showSearch: false,
  3832. color: item.color ? item.color : "#000"
  3833. };
  3834. /* 修正 */ obj1.usage = obj1.useage = getUsage(obj1.usage);
  3835. obj1.oldDose = +item.oldDose || '';
  3836. obj1.ggnum = +item.ggnum || 1;
  3837. obj1.xbzxs = +item.xbzxs || '34'.includes(item.zylx) ? obj1.ggnum : 1;
  3838. child.recipe_tabs[child.recipe_tabs_c].totalTableD.push(obj1);
  3839. child.getSelectType("中药药品用法", index);
  3840. });
  3841. child.recipe_tabs[child.recipe_tabs_c].totalTableD.push({
  3842. drugList: [],
  3843. page: 1,
  3844. loadMore: true,
  3845. usageList: [],
  3846. showSearch: false,
  3847. search_i: 0,
  3848. id: 1,
  3849. key: ""
  3850. });
  3851. child.recipe_tabs[child.recipe_tabs_c].totalTableD.filter(
  3852. (item3, index3) => {
  3853. if (item3.medid) {
  3854. this.rationalMed = [];
  3855. this.resetRationalMed();
  3856. // if (item3.color != '#000') {
  3857. // this.getRationalMedForPlat(item3.medid)
  3858. // } else {
  3859. // this.getRationalMed(item3.medid)
  3860. // }
  3861. if (item3.medid.indexOf("-") != -1) {
  3862. this.getRationalMed(item3.medid);
  3863. } else {
  3864. this.getRationalMedForPlat(item3.medid);
  3865. }
  3866. }
  3867. return (item3.id = index3 + 1);
  3868. }
  3869. );
  3870. child.recipe_tabs[
  3871. child.recipe_tabs_c
  3872. ].tableData = child.recipe_tabs[
  3873. child.recipe_tabs_c
  3874. ].totalTableD.filter(item2 => {
  3875. return Number(item2.id) % 2 != 0;
  3876. });
  3877. child.recipe_tabs[
  3878. child.recipe_tabs_c
  3879. ].tableData1 = child.recipe_tabs[
  3880. child.recipe_tabs_c
  3881. ].totalTableD.filter(item2 => {
  3882. return Number(item2.id) % 2 == 0;
  3883. });
  3884. } else if (hasDrugs.length > 0 && type == 2) {
  3885. child.recipe_tabs[
  3886. child.recipe_tabs_c
  3887. ].totalTableD = child.recipe_tabs[
  3888. child.recipe_tabs_c
  3889. ].totalTableD.filter(item => {
  3890. return item.name;
  3891. });
  3892. // console.log(hasDrugs, "has");
  3893. // 赋值给表格
  3894. hasDrugs.forEach((item, index) => {
  3895. let obj1 = {
  3896. color: item.color ? item.color : "#000",
  3897. drugList: [],
  3898. page: 1,
  3899. loadMore: true,
  3900. usageList: [],
  3901. id: item.seqn,
  3902. name: item.ypmc,
  3903. spec: item.gg, // 规格
  3904. dose: item.dose, // 剂量
  3905. unit: item.dw, // 单位
  3906. // usage: item.usagestr, // 用法
  3907. usage: item.useage || item.usagestr, // child.usegeList[0].key,
  3908. // price: item.lsjg,
  3909. price: item.price ? item.price : 0,
  3910. total: item.price * item.dose,
  3911. inventory: item.kc, // 库存
  3912. key: "",
  3913. search_i: index,
  3914. medid: item.pid, // 药品id
  3915. originname: item.cdmc, // 产地名称
  3916. showSearch: false
  3917. };
  3918. /* 修正 */ obj1.usage = obj1.useage = getUsage(obj1.usage);
  3919. obj1.oldDose = +item.oldDose || '';
  3920. obj1.ggnum = +item.ggnum || 1;
  3921. obj1.xbzxs = +item.xbzxs || '34'.includes(item.zylx) ? obj1.ggnum : 1;
  3922. child.recipe_tabs[child.recipe_tabs_c].totalTableD.push(obj1);
  3923. child.getSelectType("中药药品用法", index);
  3924. });
  3925. child.recipe_tabs[child.recipe_tabs_c].totalTableD.push({
  3926. drugList: [],
  3927. page: 1,
  3928. loadMore: true,
  3929. usageList: [],
  3930. showSearch: false,
  3931. search_i: 0,
  3932. id: 1,
  3933. key: ""
  3934. });
  3935. child.recipe_tabs[
  3936. child.recipe_tabs_c
  3937. ].totalTableD = this.removeRepeat(
  3938. child.recipe_tabs[child.recipe_tabs_c].totalTableD,
  3939. "medid"
  3940. );
  3941. child.recipe_tabs[child.recipe_tabs_c].totalTableD.filter(
  3942. (item3, index3) => {
  3943. return (item3.id = index3 + 1);
  3944. }
  3945. );
  3946. child.recipe_tabs[
  3947. child.recipe_tabs_c
  3948. ].tableData = child.recipe_tabs[
  3949. child.recipe_tabs_c
  3950. ].totalTableD.filter(item2 => {
  3951. if (item2.medid) {
  3952. // if (item2.color != '#000') {
  3953. // this.getRationalMedForPlat(item2.medid)
  3954. // } else {
  3955. // this.getRationalMed(item2.medid)
  3956. // }
  3957. if (item2.medid.indexOf("-") != -1) {
  3958. this.getRationalMed(item2.medid);
  3959. } else {
  3960. this.getRationalMedForPlat(item2.medid);
  3961. }
  3962. }
  3963. return Number(item2.id) % 2 != 0;
  3964. });
  3965. child.recipe_tabs[
  3966. child.recipe_tabs_c
  3967. ].tableData1 = child.recipe_tabs[
  3968. child.recipe_tabs_c
  3969. ].totalTableD.filter(item2 => {
  3970. return Number(item2.id) % 2 == 0;
  3971. });
  3972. }
  3973. this.showTestCase = false;
  3974. this.showDialog = false;
  3975. this.showPresc = false;
  3976. this.showUnifyPresc = false;
  3977. loading.close();
  3978. try { child.recipe_tabs[child.recipe_tabs_c].id = recipeId; } catch (e) {}
  3979. }
  3980. } else if (this.container_i == 2) {
  3981. // 适宜技术处方
  3982. }
  3983. },
  3984. // 跟据就诊记录id 获取就诊记录详细信息
  3985. async getSeeDByID(id) {
  3986. let params = {
  3987. recId: id
  3988. };
  3989. const loading = this.$loading({
  3990. lock: true,
  3991. text: "正在查找数据",
  3992. spinner: "el-icon-loading",
  3993. background: "rgba(0, 0, 0, 0.7)"
  3994. });
  3995. let res = await getSeeDByID(params).catch(err => {
  3996. loading.close();
  3997. });
  3998. if (res.ResultCode == 0) {
  3999. loading.close();
  4000. this.recordInfo = res.Data;
  4001. this.showRecord = true;
  4002. }
  4003. },
  4004. // 获取中药详情
  4005. async getMedDetail(id) {
  4006. let res = await getMedDetail({
  4007. matid: id
  4008. });
  4009. if (res.code == 0) {
  4010. res.data.matphoto = res.data.matphoto.split(",");
  4011. // res.data.matphoto = res.data.matphoto.split(',')
  4012. res.data.xiangsi = res.data.relativedata.filter(item => {
  4013. return item.relativetype == 1;
  4014. });
  4015. res.data.changyong = res.data.relativedata.filter(item => {
  4016. return item.relativetype == 2;
  4017. });
  4018. this.drugInfo = res.data;
  4019. this.showDrug = true;
  4020. }
  4021. },
  4022. // 获取药品详细信息并展示
  4023. async getDrugDetail(id) {
  4024. let res = await getDrugDetail({
  4025. stiDrugId: id
  4026. });
  4027. if (res.ResultCode == 0) {
  4028. res.Data.matphoto = res.Data.matphoto.split(",");
  4029. // res.data.matphoto = res.data.matphoto.split(',')
  4030. res.Data.xiangsi = res.Data.relativedata.filter(item => {
  4031. return item.relativetype == 1;
  4032. });
  4033. res.Data.changyong = res.Data.relativedata.filter(item => {
  4034. return item.relativetype == 2;
  4035. });
  4036. this.drugInfo = res.Data;
  4037. this.showDrug = true;
  4038. }
  4039. },
  4040. // 获取方剂详情
  4041. async getPreDetal(id, type = "") {
  4042. if (id instanceof Object) {
  4043. // 适宜技术处方
  4044. this.preInfo = id;
  4045. this.setDrugsInfo(id.items);
  4046. this.setRecipeId(id.acupreid);
  4047. this.showDialog = true;
  4048. return;
  4049. }
  4050. let res = await getPreDetal({
  4051. preid: id
  4052. });
  4053. if (res.code === 0) {
  4054. this.preInfo = res.data;
  4055. /*if (type == 1 || type == "") {
  4056. this.tjRecipeId = id;
  4057. }*/
  4058. this.setDrugsInfo(res.data.items);
  4059. this.setRecipeId(id);
  4060. if (!type || type == 2) {
  4061. // console.log(res.data, 'RES.datas');
  4062. if (type == "") {
  4063. this.changeAndJoin(1);
  4064. } else {
  4065. this.changeAndJoin(2);
  4066. }
  4067. } else {
  4068. this.showDialog = true;
  4069. }
  4070. }
  4071. },
  4072. // 获取协定方详细信息
  4073. async getAccordDetail(id) {
  4074. let res = await getAccordDetail({
  4075. pid: id
  4076. });
  4077. if (res.ResultCode == 0) {
  4078. this.agreeInfo = res.Data;
  4079. this.showAgree = true;
  4080. }
  4081. },
  4082. // 获取专家经验详细信息
  4083. async getExperinceDetail(id) {
  4084. let res = await getExperinceDetail({
  4085. pid: id
  4086. });
  4087. if (res.ResultCode == 0) {
  4088. this.tjRecipeId = id;
  4089. this.exprInfo = res.Data;
  4090. this.showExpr = true;
  4091. }
  4092. },
  4093. fmatby(val, mat) {
  4094. return mat + "不宜与" + val + "同用" + ",";
  4095. let list = val.split(",");
  4096. let str = "";
  4097. list.forEach(item => {
  4098. str += mat + "不宜与" + item + "同用" + ",";
  4099. });
  4100. return str;
  4101. },
  4102. fsjw(val, mat) {
  4103. return mat + "畏" + val + ",";
  4104. let list = val.split(",");
  4105. let str = "";
  4106. list.forEach(item => {
  4107. str += mat + "畏" + item + ",";
  4108. });
  4109. return str;
  4110. },
  4111. fsbf(val, mat) {
  4112. return '<span style="color:red;">' + mat + "</span>" + "反" + val + ",";
  4113. let list = val.split(",");
  4114. let str = "";
  4115. list.forEach(item => {
  4116. str += mat + "反" + item + ",";
  4117. });
  4118. return str;
  4119. },
  4120. // 去重
  4121. removeRepeat(arr, key) {
  4122. let obj = {};
  4123. arr = arr.reduce((pre, next) => {
  4124. obj[next[key]] ? "" : (obj[next[key]] = true && pre.push(next));
  4125. return pre;
  4126. }, []);
  4127. return arr;
  4128. },
  4129. countDose() {
  4130. let show = false;
  4131. this.rationalMed10.forEach(item => {
  4132. if (item.showDose) {
  4133. show = true;
  4134. }
  4135. });
  4136. this.$forceUpdate();
  4137. this.raDoseShow = show;
  4138. },
  4139. getEditPreNo() {
  4140. return this.$route.query && this.$route.query.recipeType === "edit" ? this.$route.query.recipeID : this.getPreNo;
  4141. },
  4142. ...mapMutations({
  4143. setRecipeId: "drug/setRecipeId",
  4144. setDrugsInfo: "drug/setDrugsInfo"
  4145. })
  4146. },
  4147. computed: {
  4148. // 显示协定方按钮
  4149. showPrec() {
  4150. try { return this.contentTabs[this.container_i].id === '0' } catch (e) { return true }
  4151. },
  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", "getRecipeId", "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>