Prescribing.vue 165 KB

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