Prescribing.vue 159 KB

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