Prescribing.vue 159 KB

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