Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

doctorAdvice.vue 175KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024
  1. <template>
  2. <div class="patient-container">
  3. <!--<el-dialog title="透析处方长期医嘱医生确认推送提醒" :visible.sync="dialogConfigVisible">-->
  4. <!--<el-form>-->
  5. <!--<el-form-item label="是否开启推送:">-->
  6. <!--<el-radio-group v-model="is_open_remind" @change="changeRemind">-->
  7. <!--<el-radio :label="1">开启</el-radio>-->
  8. <!--<el-radio :label="2">不开启</el-radio>-->
  9. <!--</el-radio-group>-->
  10. <!--</el-form-item>-->
  11. <!--</el-form>-->
  12. <!--</el-dialog>-->
  13. <patient-sidebar
  14. :id="patientID"
  15. defaultActive="1-4"
  16. v-on:tran-patient="onTranPatient"
  17. ></patient-sidebar>
  18. <div class="patient-app-container advice-container app-container">
  19. <div class="cellButton" style="float:right;">
  20. <!--<el-button :disabled="$store.getters.xt_user.subscibe.state==3?true:false" size="small"-->
  21. <!--@click="dialogConfigVisible = true"-->
  22. <!--type="primary" icon="el-icon-circle-plus-outline">长期医嘱提醒配置-->
  23. <!--</el-button>-->
  24. <el-button
  25. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  26. size="small"
  27. @click="openNew"
  28. type="primary"
  29. icon="el-icon-circle-plus-outline"
  30. >新增
  31. </el-button>
  32. <el-button
  33. size="small"
  34. @click="printThisInfo()"
  35. :type="
  36. adviceType == 1 || adviceType == 3 || adviceType == 2 || adviceType == 4
  37. ? 'primary'
  38. : 'warning'
  39. "
  40. icon="el-icon-printer"
  41. >打印
  42. </el-button>
  43. <!-- <el-button @click=lili()>调试</el-button>-->
  44. </div>
  45. <div class="cell clearfix">
  46. <el-input
  47. style="width: 400px;"
  48. v-model="listQuery.keywords"
  49. class="filter-item"
  50. size="small"
  51. />
  52. <el-button
  53. size="small"
  54. type="primary"
  55. icon="el-icon-search"
  56. @click="changeKey"
  57. >搜索
  58. </el-button>
  59. </div>
  60. <div class="cell clearfix">
  61. <label class="title"><span class="name">医嘱类型</span> : </label>
  62. <div class="time ">
  63. <ul class="">
  64. <li
  65. :class="item.value == adviceType ? 'active' : ''"
  66. @click="selectAdviceType(item.value)"
  67. v-for="item in adviceTypeArr"
  68. :key="item.value"
  69. >
  70. {{ item.label }}
  71. </li>
  72. </ul>
  73. </div>
  74. </div>
  75. <div class="cell clearfix">
  76. <label class="title"><span class="name">显示范围</span> : </label>
  77. <div class="time ">
  78. <ul class="">
  79. <li
  80. :class="item.value == stopType ? 'active' : ''"
  81. @click="selectStopType(item.value)"
  82. v-for="item in stopTypeArr"
  83. :key="item.value"
  84. >
  85. {{ item.label }}
  86. </li>
  87. </ul>
  88. </div>
  89. </div>
  90. <div class="cell clearfix">
  91. <label class="title"><span class="name">日期查询</span> : </label>
  92. <el-date-picker
  93. size="small"
  94. v-model="listQuery.start_time"
  95. prefix-icon="el-icon-date"
  96. @change="changeTime"
  97. :editable="false"
  98. style="width: 196px;"
  99. type="date"
  100. placeholder="选择日期时间"
  101. align="right"
  102. :picker-options="pickerOptions"
  103. format="yyyy-MM-dd"
  104. value-format="yyyy-MM-dd"
  105. ></el-date-picker>
  106. <span class="cellLine"> - </span>
  107. <el-date-picker
  108. size="small"
  109. v-model="listQuery.end_time"
  110. prefix-icon="el-icon-date"
  111. @change="changeTime"
  112. :editable="false"
  113. style="width: 196px;"
  114. type="date"
  115. placeholder="选择日期时间"
  116. align="right"
  117. :picker-options="pickerOptions"
  118. format="yyyy-MM-dd"
  119. value-format="yyyy-MM-dd"
  120. ></el-date-picker>
  121. </div>
  122. <el-table
  123. id="oictable"
  124. @cell-click="clickuseradvicecell"
  125. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  126. row-class-name="user-advice-table-row"
  127. :span-method="mergeSpan"
  128. ref="multipleTable"
  129. :data="adviceTableData"
  130. border
  131. fit
  132. highlight-current-row
  133. @select="selectAdvice"
  134. @selection-change="changeAdvice"
  135. style="width: 100%;margin-top: 10px;"
  136. :cell-class-name="adviceNameShow"
  137. >
  138. <el-table-column
  139. align="center"
  140. label="全选"
  141. width="60px"
  142. type="selection"
  143. fixed
  144. ></el-table-column>
  145. <!--<el-table-column type="index" :index="indexMethod" label="序号" width="60px" align="center"></el-table-column>-->
  146. <el-table-column
  147. label="期效"
  148. width="60px"
  149. property="advice_type"
  150. align="center"
  151. fixed
  152. >
  153. <template slot-scope="scope">
  154. <span v-if="scope.row.advice_type == 1">长嘱</span>
  155. <span v-else-if="scope.row.advice_type == 3 || scope.row.advice_type == 2">临嘱</span>
  156. <span v-else-if="scope.row.advice_type == 4">普通医嘱</span>
  157. <span v-else></span>
  158. </template>
  159. </el-table-column>
  160. <el-table-column
  161. label="开嘱时间"
  162. width="180"
  163. property="created_time"
  164. align="center"
  165. >
  166. <template slot-scope="scope">
  167. <span v-if="org_id == 10215">{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span>
  168. <span v-else>{{ scope.row.start_time | parseTime("{y}-{m}-{d} {h}:{i}") }} </span>
  169. </template>
  170. </el-table-column>
  171. <el-table-column
  172. label="医嘱内容"
  173. property="advice_name"
  174. width="180"
  175. align="center"
  176. style="word-break: keep-all;white-space:nowrap;"
  177. >
  178. <template slot-scope="scope">
  179. <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
  180. <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
  181. {{ scope.row.advice_name}}<i class="el-icon-arrow-down el-icon--right"></i>
  182. </span>
  183. <el-dropdown-menu slot="dropdown">
  184. <!--<el-dropdown-item :disabled="$store.getters.xt_user.subscibe.state==3?true:false"-->
  185. <!--@click.native="openEdit(scope.$index, scope.row)">修改医嘱-->
  186. <!--</el-dropdown-item>-->
  187. <el-dropdown-item
  188. v-if="scope.row.advice_type == 1"
  189. :disabled="
  190. $store.getters.xt_user.subscibe.state == 3 ? true : false
  191. "
  192. @click.native="openStop(scope.$index, scope.row)"
  193. >停止医嘱
  194. </el-dropdown-item>
  195. <el-dropdown-item
  196. v-if="scope.row.advice_type == 3"
  197. :disabled="
  198. $store.getters.xt_user.subscibe.state == 3 ? true : false
  199. "
  200. @click.native="openExec(scope.$index, scope.row)"
  201. >执行医嘱
  202. </el-dropdown-item>
  203. <el-dropdown-item
  204. v-if="scope.row.advice_type == 3"
  205. :disabled="
  206. $store.getters.xt_user.subscibe.state == 3 ? true : false
  207. "
  208. @click.native="openCheck(scope.$index, scope.row)"
  209. >核对医嘱
  210. </el-dropdown-item>
  211. <el-dropdown-item
  212. :disabled="
  213. $store.getters.xt_user.subscibe.state == 3 ? true : false
  214. "
  215. @click.native="openDelete(scope.$index, scope.row)"
  216. >删除医嘱
  217. </el-dropdown-item>
  218. <el-dropdown-item
  219. :disabled="
  220. $store.getters.xt_user.subscibe.state == 3 ? true : false
  221. "
  222. @click.native="openNewChild(scope.$index, scope.row)"
  223. >新增子药
  224. </el-dropdown-item>
  225. </el-dropdown-menu>
  226. </el-dropdown>
  227. <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
  228. <span class="el-dropdown-link">
  229. &emsp;&emsp;{{ scope.row.advice_name
  230. }}<i class="el-icon-arrow-down el-icon--right"></i>
  231. </span>
  232. <el-dropdown-menu slot="dropdown">
  233. <el-dropdown-item
  234. :disabled="
  235. $store.getters.xt_user.subscibe.state == 3 ? true : false
  236. "
  237. @click.native="openEdit(scope.$index, scope.row)"
  238. >修改医嘱
  239. </el-dropdown-item>
  240. <el-dropdown-item
  241. :disabled="
  242. $store.getters.xt_user.subscibe.state == 3 ? true : false
  243. "
  244. @click.native="openDelete(scope.$index, scope.row)"
  245. >删除医嘱
  246. </el-dropdown-item>
  247. </el-dropdown-menu>
  248. </el-dropdown>
  249. </template>
  250. </el-table-column>
  251. <!-- <el-table-column label="药品规格*数量" width="180" property="drug_spec" align="center">
  252. <template slot-scope="scope" >
  253. <span v-if="scope.row.drug_spec!=0">
  254. {{scope.row.drug_spec}}{{scope.row.drug_spec_unit}}
  255. </span>
  256. <span v-if="scope.row.prescribing_number!=0">*{{scope.row.prescribing_number}}{{scope.row.prescribing_number_unit}}</span>
  257. </template>
  258. </el-table-column> -->
  259. <el-table-column
  260. label="药品规格"
  261. width="180"
  262. property="advice_desc"
  263. align="center"
  264. >
  265. <template slot-scope="scope">
  266. <span v-if="scope.row.advice_desc"
  267. >{{ scope.row.advice_desc }}{{ scope.row.drug_spec_unit }}</span
  268. >
  269. </template>
  270. </el-table-column>
  271. <el-table-column
  272. label="开药数量"
  273. width="180"
  274. property="prescribing_number"
  275. align="center"
  276. >
  277. <template slot-scope="scope">
  278. <span v-if="scope.row.prescribing_number != 0"
  279. >{{ scope.row.prescribing_number
  280. }}{{ scope.row.prescribing_number_unit }}</span
  281. >
  282. </template>
  283. </el-table-column>
  284. <el-table-column
  285. label="单次用量"
  286. width="180"
  287. property="single_dose"
  288. align="center"
  289. >
  290. <template slot-scope="scope">
  291. <span v-if="scope.row.single_dose != 0"
  292. >{{ scope.row.single_dose }}{{ scope.row.single_dose_unit }}</span
  293. >
  294. </template>
  295. </el-table-column>
  296. <el-table-column
  297. label="频率"
  298. width="180"
  299. property="execution_frequency"
  300. align="center"
  301. >
  302. <template slot-scope="scope">
  303. <span v-if="scope.row.parent_id == 0">{{
  304. scope.row.execution_frequency
  305. }}</span>
  306. </template>
  307. </el-table-column>
  308. <el-table-column
  309. label="用法"
  310. width="180"
  311. property="delivery_way"
  312. align="center"
  313. >
  314. <template slot-scope="scope">
  315. <span v-if="scope.row.parent_id == 0">{{
  316. scope.row.delivery_way
  317. }}</span>
  318. </template>
  319. </el-table-column>
  320. <el-table-column
  321. label="执行时间"
  322. width="180"
  323. property="execution_time"
  324. align="center"
  325. >
  326. <template slot-scope="scope">
  327. <span v-if="scope.row.execution_state == 1">
  328. {{
  329. scope.row.execution_time | parseTime("{y}-{m}-{d} {h}:{i}")
  330. }}</span
  331. >
  332. </template>
  333. </el-table-column>
  334. <el-table-column
  335. label="医嘱状态"
  336. width="180"
  337. property="stop_time"
  338. align="center"
  339. >
  340. <template slot-scope="scope">
  341. <span v-if="scope.row.stop_state == 1">已停止</span>
  342. <span v-if="scope.row.stop_state == 2">未停止</span>
  343. </template>
  344. </el-table-column>
  345. <el-table-column
  346. label="终止时间"
  347. width="180"
  348. property="stop_time"
  349. align="center"
  350. >
  351. <template slot-scope="scope">
  352. <span v-if="scope.row.stop_state == 1">
  353. {{ scope.row.stop_time | parseTime("{y}-{m}-{d} {h}:{i}") }}</span
  354. >
  355. </template>
  356. </el-table-column>
  357. <el-table-column
  358. label="执行护士"
  359. width="180"
  360. property="execution_staff"
  361. v-show="adviceType == 3"
  362. align="center"
  363. >
  364. <template slot-scope="scope">
  365. <span v-if="scope.row.parent_id == 0">{{
  366. getXuserName(scope.row.execution_staff)
  367. }}</span>
  368. </template>
  369. </el-table-column>
  370. <el-table-column
  371. label="开嘱医生"
  372. width="180"
  373. property="advice_doctor"
  374. align="center"
  375. >
  376. <template slot-scope="scope">
  377. {{ getXuserName(scope.row.advice_doctor) }}
  378. </template>
  379. </el-table-column>
  380. <el-table-column
  381. label="开嘱时间"
  382. width="180"
  383. property="created_time"
  384. align="center"
  385. >
  386. <template slot-scope="scope">
  387. {{ scope.row.created_time | parseTime("{y}-{m}-{d} {h}:{i}") }}
  388. </template>
  389. </el-table-column>
  390. <el-table-column
  391. label="校对护士"
  392. width="180"
  393. property="checker"
  394. align="center"
  395. >
  396. <template slot-scope="scope">
  397. <span v-if="scope.row.parent_id == 0">{{
  398. getXuserName(scope.row.checker)
  399. }}</span>
  400. </template>
  401. </el-table-column>
  402. <el-table-column
  403. label="校对时间"
  404. width="180"
  405. property="check_time"
  406. align="center"
  407. >
  408. <template slot-scope="scope">
  409. <span v-if="scope.row.check_state == 1">{{
  410. scope.row.created_time | parseTime("{y}-{m}-{d} {h}:{i}")
  411. }}</span>
  412. </template>
  413. </el-table-column>
  414. <el-table-column
  415. label="推送截止日期"
  416. width="180"
  417. align="center"
  418. >
  419. <template slot-scope="scope">
  420. <span v-if="scope.row.push_start_time >0">{{scope.row.push_start_time | parseTime("{y}-{m}-{d}")}}</span>
  421. </template>
  422. </el-table-column>
  423. <!-- <template v-if="adviceType==3">
  424. <el-table-column key="advice_doctor_3" label="开嘱医生" min-width="80" property="advice_doctor" align="center">
  425. <template slot-scope="scope">
  426. {{getXuserName(scope.row.advice_doctor)}}
  427. </template>
  428. </el-table-column>
  429. <el-table-column key="execution_time_3" label="执行时间" min-width="80" property="execution_time" v-show="adviceType==3" align="center">
  430. <template slot-scope="scope">
  431. <span v-if="scope.row.execution_state==1&&scope.row.parent_id==0"> {{scope.row.execution_time | parseTime("{y}-{m}-{d} {h}:{i}")}}</span>
  432. </template>
  433. </el-table-column>
  434. <el-table-column key="execution_staff_3" label="执行人员" min-width="80" property="execution_staff" v-show="adviceType==3" align="center">
  435. <template slot-scope="scope">
  436. <span v-if="scope.row.parent_id==0">{{getXuserName(scope.row.execution_staff)}}</span>
  437. </template>
  438. </el-table-column>
  439. <el-table-column key="checker_3" label="核对人员" min-width="80" property="checker" v-show="adviceType==3" align="center">
  440. <template slot-scope="scope">
  441. <span v-if="scope.row.parent_id==0">{{getXuserName(scope.row.checker)}}</span>
  442. </template>
  443. </el-table-column>
  444. <el-table-column key="remark_3" label="备注" min-width="80" property="remark" align="center"> </el-table-column>
  445. </template>
  446. <template v-if="adviceType==1">
  447. <el-table-column key="advice_doctor_1" label="开嘱医生" min-width="80" property="advice_doctor" align="center">
  448. <template slot-scope="scope">
  449. {{getXuserName(scope.row.advice_doctor)}}
  450. </template>
  451. </el-table-column>
  452. <el-table-column key="advice_affirm_1" label="开嘱确认" min-width="80" property="advice_affirm" v-show="adviceType==0" align="center"> </el-table-column>
  453. <el-table-column key="stop_time_1" label="停止时间" min-width="80" property="stop_time" v-show="adviceType==1" align="center">
  454. <template slot-scope="scope">
  455. <span v-if="scope.row.stop_state==1&&scope.row.parent_id==0"> {{scope.row.stop_time | parseTime("{y}-{m}-{d} {h}:{i}")}}</span>
  456. </template>
  457. </el-table-column>
  458. <el-table-column key="stop_doctor_1" label="停嘱医生" min-width="80" property="stop_doctor" v-show="adviceType==1" align="center">
  459. <template slot-scope="scope">
  460. <span v-if="scope.row.stop_state==1&&scope.row.parent_id==0"> {{getXuserName(scope.row.stop_doctor)}}</span>
  461. </template>
  462. </el-table-column>
  463. </template> -->
  464. <el-table-column label="操作" width="180" align="center" fixed="right">
  465. <template slot-scope="scope">
  466. <!-- <el-button-group> -->
  467. <el-tooltip
  468. class="item"
  469. effect="dark"
  470. content="编辑"
  471. placement="top"
  472. >
  473. <el-button
  474. icon="el-icon-edit-outline"
  475. type="primary"
  476. size="small"
  477. :disabled="
  478. $store.getters.xt_user.subscibe.state == 3 ? true : false
  479. "
  480. @click="
  481. scope.row.groupno > 0
  482. ? openEditGroupAdvice(scope.row.groupno)
  483. : openEdit(scope.$index, scope.row)
  484. "
  485. v-if="isShowStartTime(scope.$index, scope.row)"
  486. ></el-button>
  487. </el-tooltip>
  488. <el-tooltip
  489. class="item"
  490. effect="dark"
  491. content="删除"
  492. placement="top"
  493. >
  494. <el-button
  495. icon="el-icon-delete"
  496. type="danger"
  497. size="small"
  498. :disabled="
  499. $store.getters.xt_user.subscibe.state == 3 ? true : false
  500. "
  501. @click="
  502. scope.row.groupno > 0
  503. ? DeleteGroupAdvice(scope.row.groupno, scope.row)
  504. : openDelete(scope.$index, scope.row)
  505. "
  506. v-if="isShowStartTime(scope.$index, scope.row)"
  507. ></el-button>
  508. </el-tooltip>
  509. <!-- </el-button-group> -->
  510. </template>
  511. </el-table-column>
  512. </el-table>
  513. <el-pagination
  514. @size-change="handleSizeChange"
  515. @current-change="handleCurrentChange"
  516. :page-sizes="[10, 20, 50, 100]"
  517. :page-size="10"
  518. background
  519. style="margin-top:20px;float: right"
  520. layout="total, sizes, prev, pager, next, jumper"
  521. :total="total"
  522. ></el-pagination>
  523. <el-dialog
  524. title="新增医嘱"
  525. :visible.sync="groupFormVisible"
  526. width="700px"
  527. >
  528. <el-form ref="groupForm" :rules="groupRules" :model="groupForm">
  529. <el-row>
  530. <el-col :span="12">
  531. <el-form-item label="医嘱类型 :" required prop="advice_type">
  532. <el-select
  533. v-model="groupForm.advice_type"
  534. placeholder="请选择"
  535. @change="changeOptions"
  536. >
  537. <el-option
  538. :label="item.label"
  539. :key="item.value"
  540. :value="item.value"
  541. v-for="item in adviceTypeOptions"
  542. ></el-option>
  543. </el-select>
  544. </el-form-item>
  545. </el-col>
  546. <el-col :span="12">
  547. <el-form-item label="开始时间 :" required prop="start_time">
  548. <el-date-picker
  549. style="width:200px"
  550. type="datetime"
  551. format="yyyy-MM-dd HH:mm"
  552. value-format="yyyy-MM-dd HH:mm"
  553. placeholder="选择时间"
  554. v-model="groupForm.start_time"
  555. ></el-date-picker>
  556. </el-form-item>
  557. </el-col>
  558. </el-row>
  559. <el-row>
  560. <el-form-item label="备注 :">
  561. <el-input type="textarea" v-model="groupForm.remark"></el-input>
  562. </el-form-item>
  563. </el-row>
  564. <el-row>
  565. <el-col :span="12">
  566. <el-form-item label="开嘱医生 :">
  567. <span>{{ adminusername }} </span>
  568. </el-form-item>
  569. </el-col>
  570. <el-col :span="12">
  571. <el-form-item label="开嘱时间 :">
  572. <span>{{ groupForm.advice_date }} </span>
  573. </el-form-item>
  574. </el-col>
  575. </el-row>
  576. <el-row>
  577. <el-col :span="2">
  578. &nbsp;
  579. </el-col>
  580. <el-col :span="5">
  581. <el-button
  582. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  583. round
  584. @click="openAdviceTemplate()"
  585. >选择医嘱模板
  586. </el-button>
  587. </el-col>
  588. <el-col :span="5">
  589. <el-button
  590. :disabled="
  591. $store.getters.xt_user.subscibe.state == 3 ? true : false
  592. "
  593. round
  594. @click="openGroupAdvice(0)"
  595. >新增医嘱内容
  596. </el-button>
  597. </el-col>
  598. <el-col :span="5">
  599. <el-button
  600. :disabled="
  601. $store.getters.xt_user.subscibe.state == 3 ? true : false
  602. "
  603. round
  604. @click="openGroupAdvice(1)"
  605. >修改医嘱内容
  606. </el-button>
  607. </el-col>
  608. <el-col :span="5">
  609. <el-button
  610. :disabled="
  611. $store.getters.xt_user.subscibe.state == 3 ? true : false
  612. "
  613. round
  614. @click="openDeleteGroupAdvice()"
  615. >删除医嘱内容
  616. </el-button>
  617. </el-col>
  618. </el-row>
  619. <el-row>
  620. <el-col :span="24">
  621. <el-table
  622. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  623. id="user-advice-name-table"
  624. :data="groupForm.adviceNames"
  625. border
  626. fit
  627. highlight-current-row
  628. :row-class-name="groupClassName"
  629. @current-change="selectGroupAdvice"
  630. style="width: 100%;margin-top: 10px;margin-bottom: 10px;"
  631. :row-key="getRowKey"
  632. ref="advicenametable"
  633. :expand-row-keys="expandRowKeys"
  634. type="expand"
  635. default-expand-all
  636. >
  637. <el-table-column
  638. label="医嘱内容"
  639. property="advice_name"
  640. style="word-break: keep-all;white-space:nowrap;"
  641. >
  642. </el-table-column>
  643. <!-- <el-table-column label="药品规格*数量" min-width="80" property="drug_spec" align="center">
  644. <template slot-scope="scope" >
  645. <span v-if="scope.row.drug_spec!=0">{{scope.row.drug_spec}}{{scope.row.drug_spec_unit}}</span>
  646. <span v-if="scope.row.prescribing_number!=0">*{{scope.row.prescribing_number}}{{scope.row.prescribing_number_unit}}</span>
  647. </template>
  648. </el-table-column> -->
  649. <el-table-column
  650. label="药品规格"
  651. min-width="80"
  652. property="advice_desc"
  653. align="center"
  654. >
  655. <template slot-scope="scope">
  656. <span v-if="scope.row.advice_desc"
  657. >{{ scope.row.advice_desc
  658. }}{{ scope.row.drug_spec_unit }}</span
  659. >
  660. </template>
  661. </el-table-column>
  662. <el-table-column
  663. label="开药数量"
  664. min-width="80"
  665. property="prescribing_number"
  666. align="center"
  667. >
  668. <template slot-scope="scope">
  669. <span v-if="scope.row.prescribing_number != 0"
  670. >{{ scope.row.prescribing_number
  671. }}{{ scope.row.prescribing_number_unit }}</span
  672. >
  673. </template>
  674. </el-table-column>
  675. <el-table-column
  676. label="单次用量"
  677. min-width="80"
  678. property="single_dose"
  679. align="center"
  680. >
  681. <template slot-scope="scope">
  682. <!-- <span v-if="scope.row.single_dose != 0">{{ scope.row.single_dose}}{{ scope.row.single_dose_unit }}</span>-->
  683. <span v-if="scope.row.single_dose != 0">
  684. <!-- {{ scope.row.single_dose}}{{ scope.row.single_dose_unit }}-->
  685. <span v-if="scope.row.single_dose_unit == 1" >{{ scope.row.single_dose}}g</span>
  686. <span v-else-if="scope.row.single_dose_unit == 2" >{{ scope.row.single_dose}}mg</span>
  687. <span v-else-if="scope.row.single_dose_unit == 3" >{{ scope.row.single_dose}}u</span>
  688. <span v-else-if="scope.row.single_dose_unit == 4" >{{ scope.row.single_dose}}ml</span>
  689. <span v-else-if="scope.row.single_dose_unit == 5" >{{ scope.row.single_dose}}万U</span>
  690. <span v-else-if="scope.row.single_dose_unit == 6" >{{ scope.row.single_dose}}枚</span>
  691. <span v-else-if="scope.row.single_dose_unit == 7" >{{ scope.row.single_dose}}粒</span>
  692. <span v-else-if="scope.row.single_dose_unit == 8" >{{ scope.row.single_dose}}片</span>
  693. <span v-else-if="scope.row.single_dose_unit == 9" >{{ scope.row.single_dose}}支</span>
  694. <span v-else-if="scope.row.single_dose_unit == 10" >{{ scope.row.single_dose}}ug</span>
  695. <span v-else-if="scope.row.single_dose_unit == 11" >{{ scope.row.single_dose}}iu</span>
  696. <span v-else-if="scope.row.single_dose_unit == 12" >{{ scope.row.single_dose}}包</span>
  697. <span v-else-if="scope.row.single_dose_unit == 13" >{{ scope.row.single_dose}}袋</span>
  698. <span v-else-if="scope.row.single_dose_unit == 14" >{{ scope.row.single_dose}}万</span>
  699. <span v-else-if="scope.row.single_dose_unit == 15" >{{ scope.row.single_dose}}万iu</span>
  700. <span v-else-if="scope.row.single_dose_unit == 16" >{{ scope.row.single_dose}}丸</span>
  701. <span v-else-if="scope.row.single_dose_unit == 17" >{{ scope.row.single_dose}}盒</span>
  702. <span v-else-if="scope.row.single_dose_unit == 18" >{{ scope.row.single_dose}}瓶</span>
  703. <span v-else-if="scope.row.single_dose_unit == 19" >{{ scope.row.single_dose}}瓶(袋)</span>
  704. <span v-else-if="scope.row.single_dose_unit == 20" >{{ scope.row.single_dose}}次</span>
  705. <span v-else >{{ scope.row.single_dose}}{{ scope.row.single_dose_unit }}</span>
  706. </span>
  707. </template>
  708. </el-table-column>
  709. <el-table-column
  710. label="给药途径"
  711. min-width="80"
  712. property="delivery_way"
  713. align="center"
  714. >
  715. <template slot-scope="scope">
  716. <span v-if="scope.row.parent_row == 0">{{
  717. scope.row.delivery_way
  718. }}</span>
  719. </template>
  720. </el-table-column>
  721. <el-table-column
  722. label="执行频率"
  723. min-width="80"
  724. property="execution_frequency"
  725. align="center"
  726. >
  727. <template slot-scope="scope">
  728. <span v-if="scope.row.parent_row == 0">{{
  729. scope.row.execution_frequency
  730. }}</span>
  731. </template>
  732. </el-table-column>
  733. <el-table-column
  734. label="提醒频率"
  735. min-width="80"
  736. property="execution_frequency"
  737. align="center"
  738. >
  739. <template slot-scope="scope">
  740. <span v-if="scope.row.frequency_type == 1">每次必推</span>
  741. <span v-if="scope.row.frequency_type == 2"
  742. >{{ scope.row.day_count }}天/1次</span
  743. >
  744. <span v-if="scope.row.frequency_type == 3"
  745. >每周{{ scope.row.week_days }}</span
  746. >
  747. </template>
  748. </el-table-column>
  749. <el-table-column
  750. label="推送截止日期"
  751. min-width="80"
  752. align="center"
  753. >
  754. <template slot-scope="scope">
  755. {{scope.row.push_start_time}}
  756. </template>
  757. </el-table-column>
  758. </el-table>
  759. </el-col>
  760. </el-row>
  761. </el-form>
  762. <div slot="footer" class="dialog-footer">
  763. <el-button
  764. :disabled="
  765. $store.getters.xt_user.subscibe.state == 3 ||
  766. groupForm.adviceNames.length == 0
  767. ? true
  768. : false
  769. "
  770. type="primary"
  771. @click="submitgroupAdvice('groupForm')"
  772. :loading="addLoading"
  773. >保 存
  774. </el-button>
  775. </div>
  776. </el-dialog>
  777. <el-dialog
  778. title="选择医嘱模板"
  779. :close-on-click-modal="false"
  780. :visible.sync="templateFormVisible"
  781. width="72%"
  782. >
  783. <el-row :gutter="20">
  784. <el-col :span="8">
  785. <el-table
  786. :data="adviceTemplates"
  787. ref="templatetable"
  788. border
  789. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  790. highlight-current-row
  791. @current-change="templateTableChange"
  792. style="width: 100%"
  793. >
  794. <el-table-column prop="name" label="模板名称"></el-table-column>
  795. </el-table>
  796. </el-col>
  797. <el-col :span="16">
  798. <el-table
  799. :header-cell-style="{ backgroundColor: 'rgb(245, 247, 250)' }"
  800. id="user-advice-select-template-table"
  801. :data="selectedTemp.list"
  802. border
  803. :span-method="spanselecttable"
  804. @select="selectTemplateAdvice"
  805. @selection-change="changeTemplateAdvice"
  806. @select-all="selectAllTemplateAdvice"
  807. row-key="row_key"
  808. ref="selecttemplatetable"
  809. style="width: 100%"
  810. >
  811. <el-table-column type="selection" width="55"></el-table-column>
  812. <el-table-column
  813. label="医嘱内容"
  814. property="advice_name"
  815. style="word-break: keep-all;white-space:nowrap;"
  816. ></el-table-column>
  817. <el-table-column label="药品规格" property="advice_desc">
  818. <template slot-scope="scope">
  819. <span v-if="scope.row.advice_desc"
  820. >{{ scope.row.advice_desc
  821. }}{{ scope.row.drug_spec_unit }}</span
  822. >
  823. </template>
  824. </el-table-column>
  825. <el-table-column
  826. label="开药数量"
  827. min-width="80"
  828. property="prescribing_number"
  829. align="center"
  830. >
  831. <template slot-scope="scope">
  832. <span v-if="scope.row.prescribing_number != 0"
  833. >{{ scope.row.prescribing_number
  834. }}{{ scope.row.prescribing_number_unit }}</span
  835. >
  836. </template>
  837. </el-table-column>
  838. <el-table-column
  839. label="单次用量"
  840. min-width="80"
  841. property="single_dose"
  842. align="center"
  843. >
  844. <template slot-scope="scope">
  845. <span v-if="scope.row.single_dose != 0"
  846. >{{ scope.row.single_dose
  847. }}{{ scope.row.single_dose_unit }}</span
  848. >
  849. </template>
  850. </el-table-column>
  851. <el-table-column
  852. label="给药途径"
  853. min-width="80"
  854. property="delivery_way"
  855. align="center"
  856. >
  857. <template slot-scope="scope">
  858. <span v-if="scope.row.parent_row == 0">{{
  859. scope.row.delivery_way
  860. }}</span>
  861. </template>
  862. </el-table-column>
  863. <el-table-column
  864. label="执行频率"
  865. min-width="80"
  866. property="execution_frequency"
  867. align="center"
  868. >
  869. <template slot-scope="scope">
  870. <span v-if="scope.row.parent_row == 0">{{
  871. scope.row.execution_frequency
  872. }}</span>
  873. </template>
  874. </el-table-column>
  875. <el-table-column
  876. v-if="groupForm.advice_type == 1"
  877. label="提醒频率"
  878. min-width="80"
  879. property="execution_frequency"
  880. align="center"
  881. >
  882. <template slot-scope="scope">
  883. <span v-if="scope.row.frequency_type == 1">每次必推</span>
  884. <span v-if="scope.row.frequency_type == 2"
  885. >{{ scope.row.day_count }}天/1次</span
  886. >
  887. <span v-if="scope.row.frequency_type == 3"
  888. >每周{{ scope.row.week_days }}</span
  889. >
  890. </template>
  891. </el-table-column>
  892. </el-table>
  893. </el-col>
  894. </el-row>
  895. <div slot="footer" class="dialog-footer">
  896. <el-button @click="cancleDialog()">取 消</el-button>
  897. <el-button
  898. :disabled="
  899. $store.getters.xt_user.subscibe.state == 3 ? true : false
  900. "
  901. type="primary"
  902. @click="newAddTempForm()"
  903. >保 存
  904. </el-button>
  905. </div>
  906. </el-dialog>
  907. <el-dialog
  908. title="选择医嘱模板"
  909. :visible.sync="oldTemplateFormVisible"
  910. width="700px"
  911. >
  912. <el-form
  913. ref="templateForm"
  914. :rules="templateRules"
  915. :model="templateForm"
  916. >
  917. <el-row>
  918. <el-col :span="24">
  919. <el-form-item prop="id">
  920. <el-select
  921. v-model="templateForm.id"
  922. filterable
  923. clearable
  924. placeholder="请选择(输入可搜索)"
  925. style="width:100%"
  926. >
  927. <el-option
  928. v-for="item in adviceTemplates"
  929. :key="item.id"
  930. :label="item.name"
  931. :value="item.id"
  932. >
  933. </el-option>
  934. </el-select>
  935. </el-form-item>
  936. </el-col>
  937. </el-row>
  938. </el-form>
  939. <div slot="footer" class="dialog-footer">
  940. <el-button @click="templateFormVisible = false">取 消</el-button>
  941. <el-button
  942. :disabled="
  943. $store.getters.xt_user.subscibe.state == 3 ? true : false
  944. "
  945. type="primary"
  946. @click="addTempForm('templateForm')"
  947. >保 存
  948. </el-button>
  949. </div>
  950. </el-dialog>
  951. <el-dialog
  952. :title="nameFormTitle"
  953. :visible.sync="nameFormVisible"
  954. width="800px"
  955. >
  956. <el-form
  957. ref="nameForm"
  958. :rules="nameRules"
  959. :model="nameForm"
  960. label-width="120px"
  961. >
  962. <el-row>
  963. <el-col :span="10">
  964. <el-form-item label="医嘱内容:" required prop="advice_name"><!--第二处-->
  965. <el-autocomplete
  966. style="width:100%;"
  967. class="inline-input"
  968. v-model="nameForm.advice_name"
  969. :fetch-suggestions="querySearch"
  970. placeholder="请输入内容"
  971. @select="handleSelect"
  972. @input="changeDrugName"
  973. ></el-autocomplete>
  974. <!-- <div style="color:red;font-size:12px;">
  975. 库存不足50
  976. </div> -->
  977. </el-form-item>
  978. </el-col>
  979. <el-col :span="14">
  980. <el-form-item label="药品规格 :" prop="advice_desc">
  981. <el-col :span="6">
  982. <el-autocomplete
  983. style="width:100px;"
  984. class="inline-input"
  985. v-model="nameForm.advice_desc"
  986. :fetch-suggestions="querySearch1"
  987. placeholder="请输入内容"
  988. @select="handleSelect1"
  989. @input="changeDrugDesc"
  990. ></el-autocomplete>
  991. </el-col>
  992. <el-col class="line" :span="2">&nbsp;</el-col>
  993. <el-col :span="6">
  994. <el-select
  995. v-model="nameForm.drug_spec_unit"
  996. filterable
  997. clearable
  998. allow-create
  999. placeholder="选择"
  1000. >
  1001. <el-option
  1002. v-for="item in unitsOption"
  1003. :key="item.id"
  1004. :label="item.name"
  1005. :value="item.name"
  1006. >
  1007. </el-option>
  1008. </el-select>
  1009. </el-col>
  1010. </el-form-item>
  1011. </el-col>
  1012. </el-row>
  1013. <el-row>
  1014. <el-col :span="12">
  1015. <el-form-item label="单次用量 :" prop="single_dose">
  1016. <el-col :span="8">
  1017. <el-input v-model="nameForm.single_dose"></el-input>
  1018. </el-col>
  1019. <el-col class="line" :span="2">&nbsp;</el-col>
  1020. <el-col :span="14">
  1021. <el-select
  1022. v-model="nameForm.single_dose_unit"
  1023. filterable
  1024. clearable
  1025. allow-create
  1026. placeholder="选择"
  1027. >
  1028. <el-option
  1029. v-for="item in unitsOption"
  1030. :key="item.id"
  1031. :label="item.name"
  1032. :value="item.id"
  1033. >
  1034. </el-option>
  1035. </el-select>
  1036. </el-col>
  1037. </el-form-item>
  1038. </el-col>
  1039. <el-col :span="12">
  1040. <el-form-item label="开药数量 :" prop="prescribing_number">
  1041. <el-col :span="8">
  1042. <el-input v-model="nameForm.prescribing_number"></el-input>
  1043. </el-col>
  1044. <el-col class="line" :span="2">&nbsp;</el-col>
  1045. <el-col :span="14">
  1046. <el-select
  1047. v-model="nameForm.prescribing_number_unit"
  1048. filterable
  1049. clearable
  1050. allow-create
  1051. placeholder="选择"
  1052. >
  1053. <el-option
  1054. v-for="item in unitsOption"
  1055. :key="item.id"
  1056. :label="item.name"
  1057. :value="item.name"
  1058. >
  1059. </el-option>
  1060. </el-select>
  1061. </el-col>
  1062. </el-form-item>
  1063. </el-col>
  1064. </el-row>
  1065. <el-row>
  1066. <el-col :span="12">
  1067. <el-form-item label="给药途径 :" prop="delivery_way">
  1068. <el-select
  1069. v-model="nameForm.delivery_way"
  1070. filterable
  1071. clearable
  1072. allow-create
  1073. :disabled="isChild"
  1074. placeholder="请选择(输入可搜索)"
  1075. style="width:100%"
  1076. >
  1077. <el-option
  1078. v-for="item in deliveryWayOptions"
  1079. :key="item.id"
  1080. :label="item.name"
  1081. :value="item.name"
  1082. >
  1083. </el-option>
  1084. </el-select>
  1085. </el-form-item>
  1086. </el-col>
  1087. <el-col :span="12">
  1088. <el-form-item label="执行频率 :" prop="execution_frequency">
  1089. <el-select
  1090. v-model="nameForm.execution_frequency"
  1091. filterable
  1092. clearable
  1093. allow-create
  1094. :disabled="isChild"
  1095. placeholder="请选择(输入可搜索)"
  1096. style="width:100%"
  1097. >
  1098. <el-option
  1099. v-for="item in executionFrequencyOptions"
  1100. :key="item.id"
  1101. :label="item.name"
  1102. :value="item.name"
  1103. >
  1104. </el-option>
  1105. </el-select>
  1106. </el-form-item>
  1107. </el-col>
  1108. <el-col :span="24" v-if="groupForm.advice_type == 1 && !isChild">
  1109. <el-form-item label="周期提醒 :">
  1110. <el-radio-group v-model="nameForm.frequency_type">
  1111. <el-radio :label="1">每次必推</el-radio>
  1112. <el-radio :label="2">天数频率</el-radio>
  1113. <el-radio :label="3">星期频率</el-radio>
  1114. </el-radio-group>
  1115. </el-form-item>
  1116. </el-col>
  1117. <el-col :span="12" v-if="nameForm.frequency_type == 2">
  1118. <el-form-item prop="day_count">
  1119. <el-input
  1120. style="width: 50px"
  1121. v-model="nameForm.day_count"
  1122. ></el-input
  1123. >&nbsp; 天/一次
  1124. </el-form-item>
  1125. </el-col>
  1126. <el-col :span="24" v-if="nameForm.frequency_type == 3">
  1127. <el-form-item prop="weekday">
  1128. <el-checkbox-group v-model="weeks">
  1129. <el-checkbox label="周一" name="type"></el-checkbox>
  1130. <el-checkbox label="周二" name="type"></el-checkbox>
  1131. <el-checkbox label="周三" name="type"></el-checkbox>
  1132. <el-checkbox label="周四" name="type"></el-checkbox>
  1133. <el-checkbox label="周五" name="type"></el-checkbox>
  1134. <el-checkbox label="周六" name="type"></el-checkbox>
  1135. <el-checkbox label="周日" name="type"></el-checkbox>
  1136. </el-checkbox-group>
  1137. </el-form-item>
  1138. </el-col>
  1139. <el-col :span="24">
  1140. <el-form-item label="推送截止日期:">
  1141. <el-date-picker
  1142. v-model="nameForm.push_start_time"
  1143. type="date"
  1144. format="yyyy-MM-dd"
  1145. value-format="yyyy-MM-dd"
  1146. :picker-options="pickerOptionsOne"
  1147. placeholder="推送截止日期">
  1148. </el-date-picker>
  1149. </el-form-item>
  1150. </el-col>
  1151. </el-row>
  1152. </el-form>
  1153. <div slot="footer" class="dialog-footer">
  1154. <el-button @click="nameFormVisible = false">取消</el-button>
  1155. <el-button
  1156. :disabled="
  1157. $store.getters.xt_user.subscibe.state == 3 ? true : false
  1158. "
  1159. type="primary"
  1160. @click="submitNameForm('nameForm')"
  1161. >保 存
  1162. </el-button>
  1163. </div>
  1164. </el-dialog>
  1165. <edit-group-advice
  1166. :adviceTemplates="adviceTemplates"
  1167. :groupFormVisible="groupEditFormVisible"
  1168. :groupForm="groupForm"
  1169. :adviceTypeOptions="adviceTypeOptions"
  1170. :executionFrequencyOptions="executionFrequencyOptions"
  1171. :adminusername="adminusername"
  1172. :unitsOption="unitsOption"
  1173. :deliveryWayOptions="deliveryWayOptions"
  1174. :rowKey="rowKey"
  1175. :adviceTemplateMaps="adviceTemplateMaps"
  1176. :patientID="patientID"
  1177. :adviceType="adviceType"
  1178. :adviceTableData="adviceTableData"
  1179. ref="editGroupForm"
  1180. ></edit-group-advice>
  1181. <!-- 新增子药 -->
  1182. <el-dialog
  1183. :title="dialogTitle"
  1184. :visible.sync="dialogFormVisible"
  1185. width="700px"
  1186. >
  1187. <el-form
  1188. ref="adviceForm"
  1189. :rules="adviceRules"
  1190. :model="adviceForm"
  1191. label-width="120px"
  1192. >
  1193. <el-row>
  1194. <el-col :span="12">
  1195. <el-form-item label="医嘱类型 :" required prop="advice_type">
  1196. <el-select
  1197. v-model="adviceForm.advice_type"
  1198. :disabled="isEdit || adviceForm.parent_id > 0 ? true : false"
  1199. placeholder="请选择"
  1200. >
  1201. <el-option
  1202. :label="item.label"
  1203. :key="item.value"
  1204. :value="item.value"
  1205. v-for="item in adviceTypeOptions"
  1206. ></el-option>
  1207. </el-select>
  1208. </el-form-item>
  1209. </el-col>
  1210. <el-col :span="12">
  1211. <el-form-item label="开嘱时间 :" required prop="advice_date">
  1212. <el-date-picker
  1213. type="date"
  1214. readonly
  1215. format="yyyy-MM-dd"
  1216. value-format="yyyy-MM-dd"
  1217. placeholder="选择日期"
  1218. v-model="adviceForm.advice_date"
  1219. style="width: 100%;"
  1220. ></el-date-picker>
  1221. </el-form-item>
  1222. </el-col>
  1223. <el-col :span="12">
  1224. <el-form-item
  1225. label="开始时间 :"
  1226. required
  1227. prop="start_time"
  1228. style="width:280px;"
  1229. >
  1230. <el-date-picker
  1231. type="datetime"
  1232. format="yyyy-MM-dd HH:mm:ss"
  1233. value-format="yyyy-MM-dd HH:mm:ss"
  1234. placeholder="选择时间"
  1235. v-model="adviceForm.start_time"
  1236. :disabled="adviceForm.parent_id == 0 ? false : true"
  1237. ></el-date-picker>
  1238. </el-form-item>
  1239. </el-col>
  1240. <el-col :span="12">
  1241. <el-form-item label="医嘱内容 :" required prop="advice_name">
  1242. <el-autocomplete
  1243. style="width:100%;"
  1244. class="inline-input"
  1245. v-model="adviceForm.advice_name"
  1246. :fetch-suggestions="querySearch"
  1247. placeholder="请输入内容"
  1248. @select="handleSelect"
  1249. @input="changeDrugNameTwo"
  1250. ></el-autocomplete>
  1251. </el-form-item>
  1252. </el-col>
  1253. <el-col :span="12">
  1254. <el-form-item label="药品规格 :" prop="advice_desc">
  1255. <el-col :span="9">
  1256. <!-- <el-input v-model="adviceForm.advice_desc"></el-input> -->
  1257. <el-autocomplete
  1258. style="width:100px;"
  1259. class="inline-input"
  1260. v-model="adviceForm.advice_desc"
  1261. :fetch-suggestions="querySearch1"
  1262. placeholder="请输入内容"
  1263. @select="handleSelect1"
  1264. @input="changeDrugDescTwo"
  1265. ></el-autocomplete>
  1266. </el-col>
  1267. <el-col class="line" :span="1">&nbsp;</el-col>
  1268. <el-col :span="14">
  1269. <el-select
  1270. v-model="adviceForm.drug_spec_unit"
  1271. filterable
  1272. clearable
  1273. allow-create
  1274. placeholder="选择"
  1275. >
  1276. <el-option
  1277. v-for="item in unitsOption"
  1278. :key="item.id"
  1279. :label="item.name"
  1280. :value="item.name"
  1281. >
  1282. </el-option>
  1283. </el-select>
  1284. </el-col>
  1285. </el-form-item>
  1286. </el-col>
  1287. <el-col :span="12">
  1288. <el-form-item label="单次用量 :" prop="single_dose">
  1289. <el-col :span="9">
  1290. <el-input v-model="adviceForm.single_dose"></el-input>
  1291. </el-col>
  1292. <el-col class="line" :span="1">&nbsp;</el-col>
  1293. <el-col :span="14">
  1294. <!-- <el-input v-model="adviceForm.single_dose_unit" ></el-input> -->
  1295. <el-select
  1296. v-model="adviceForm.single_dose_unit"
  1297. filterable
  1298. clearable
  1299. allow-create
  1300. placeholder="选择"
  1301. >
  1302. <el-option
  1303. v-for="item in unitsOption"
  1304. :key="item.id"
  1305. :label="item.name"
  1306. :value="item.name"
  1307. >
  1308. </el-option>
  1309. </el-select>
  1310. </el-col>
  1311. </el-form-item>
  1312. </el-col>
  1313. <el-col :span="12">
  1314. <el-form-item label="开药数量 :" prop="prescribing_number">
  1315. <el-col :span="9">
  1316. <el-input v-model="adviceForm.prescribing_number"></el-input>
  1317. </el-col>
  1318. <el-col class="line" :span="1">&nbsp;</el-col>
  1319. <el-col :span="14">
  1320. <el-select
  1321. v-model="adviceForm.prescribing_number_unit"
  1322. filterable
  1323. clearable
  1324. allow-create
  1325. placeholder="选择"
  1326. >
  1327. <el-option
  1328. v-for="item in unitsOption"
  1329. :key="item.id"
  1330. :label="item.name"
  1331. :value="item.name"
  1332. >
  1333. </el-option>
  1334. </el-select>
  1335. <!-- <el-input v-model="adviceForm.prescribing_number_unit" ></el-input> -->
  1336. </el-col>
  1337. </el-form-item>
  1338. </el-col>
  1339. <el-col :span="12">
  1340. <el-form-item label="给药途径 :" prop="delivery_way">
  1341. <el-select
  1342. v-model="adviceForm.delivery_way"
  1343. :disabled="adviceForm.parent_id == 0 ? false : true"
  1344. filterable
  1345. clearable
  1346. allow-create
  1347. placeholder="请选择(输入可搜索)"
  1348. style="width:100%"
  1349. >
  1350. <el-option
  1351. v-for="item in deliveryWayOptions"
  1352. :key="item.id"
  1353. :label="item.name"
  1354. :value="item.name"
  1355. >
  1356. </el-option>
  1357. </el-select>
  1358. </el-form-item>
  1359. </el-col>
  1360. <el-col :span="12">
  1361. <el-form-item
  1362. label="执行频率 :"
  1363. prop="execution_frequency"
  1364. style="width:100%;"
  1365. >
  1366. <el-select
  1367. v-model="adviceForm.execution_frequency"
  1368. :disabled="adviceForm.parent_id == 0 ? false : true"
  1369. filterable
  1370. clearable
  1371. allow-create
  1372. placeholder="请选择(输入可搜索)"
  1373. style="width:100%"
  1374. >
  1375. <el-option
  1376. v-for="item in executionFrequencyOptions"
  1377. :key="item.id"
  1378. :label="item.name"
  1379. :value="item.name"
  1380. >
  1381. </el-option>
  1382. </el-select>
  1383. </el-form-item>
  1384. </el-col>
  1385. <el-col :span="24">
  1386. <el-form-item label="推送截止日期:">
  1387. <el-date-picker
  1388. v-model="adviceForm.push_start_time"
  1389. type="date"
  1390. format="yyyy-MM-dd"
  1391. value-format="yyyy-MM-dd"
  1392. :picker-options="pickerOptionsOne"
  1393. placeholder="推送截止日期">
  1394. </el-date-picker>
  1395. </el-form-item>
  1396. </el-col>
  1397. </el-row>
  1398. <el-form-item label="备注 :">
  1399. <el-input type="textarea" v-model="adviceForm.remark"></el-input>
  1400. </el-form-item>
  1401. <el-form-item label="开嘱医生 :">
  1402. <span>{{ adminusername }} </span>
  1403. </el-form-item>
  1404. </el-form>
  1405. <div slot="footer" class="dialog-footer">
  1406. <template v-if="isEdit">
  1407. <el-button @click="dialogFormVisible = false">取消</el-button>
  1408. <el-button
  1409. :disabled="
  1410. $store.getters.xt_user.subscibe.state == 3 ? true : false
  1411. "
  1412. type="primary"
  1413. @click="submitEditAdvice('adviceForm')"
  1414. >保 存
  1415. </el-button>
  1416. </template>
  1417. <template v-else>
  1418. <el-button
  1419. @click="dialogFormVisible = false"
  1420. v-if="adviceForm.parent_id > 0"
  1421. >取 消
  1422. </el-button>
  1423. <el-button
  1424. :disabled="
  1425. $store.getters.xt_user.subscibe.state == 3 ? true : false
  1426. "
  1427. type="primary"
  1428. @click="submitNewAdvice('adviceForm', 're')"
  1429. v-if="adviceForm.parent_id == 0"
  1430. >继 续
  1431. </el-button>
  1432. <el-button
  1433. :disabled="
  1434. $store.getters.xt_user.subscibe.state == 3 ? true : false
  1435. "
  1436. type="primary"
  1437. @click="submitNewAdvice('adviceForm', 'on')"
  1438. >保 存
  1439. </el-button>
  1440. </template>
  1441. </div>
  1442. </el-dialog>
  1443. <el-dialog
  1444. title="停止医嘱"
  1445. :visible.sync="dialogStopFormVisible"
  1446. width="600px"
  1447. >
  1448. <el-form
  1449. ref="stopForm"
  1450. :model="stopForm"
  1451. :rules="stopRules"
  1452. label-width="90px"
  1453. >
  1454. <el-form-item label="停止时间 :" required prop="stop_time">
  1455. <el-date-picker
  1456. type="datetime"
  1457. format="yyyy-MM-dd HH:mm:ss"
  1458. value-format="yyyy-MM-dd HH:mm:ss"
  1459. placeholder="选择时间"
  1460. v-model="stopForm.stop_time"
  1461. style="width:50%"
  1462. ></el-date-picker>
  1463. </el-form-item>
  1464. </el-form>
  1465. <div slot="footer" class="dialog-footer">
  1466. <el-button @click="dialogStopFormVisible = false">取消</el-button>
  1467. <el-button
  1468. :disabled="
  1469. $store.getters.xt_user.subscibe.state == 3 ? true : false
  1470. "
  1471. type="primary"
  1472. @click="submitStopAdvice('stopForm')"
  1473. >保 存
  1474. </el-button>
  1475. </div>
  1476. </el-dialog>
  1477. <el-dialog
  1478. title="执行医嘱"
  1479. :visible.sync="execTimeDialogVisible"
  1480. width="600px"
  1481. >
  1482. <el-form
  1483. ref="execForm"
  1484. :model="execForm"
  1485. :rules="execRules"
  1486. label-width="90px"
  1487. >
  1488. <el-form-item label="执行时间 :" required prop="exec_time">
  1489. <el-date-picker
  1490. type="datetime"
  1491. format="yyyy-MM-dd HH:mm:ss"
  1492. value-format="yyyy-MM-dd HH:mm:ss"
  1493. placeholder="选择时间"
  1494. v-model="execForm.exec_time"
  1495. style="width:50%"
  1496. ></el-date-picker>
  1497. </el-form-item>
  1498. </el-form>
  1499. <div slot="footer" class="dialog-footer">
  1500. <el-button
  1501. :disabled="
  1502. $store.getters.xt_user.subscibe.state == 3 ? true : false
  1503. "
  1504. type="primary"
  1505. @click="submitExecAdvice('execForm')"
  1506. >保 存
  1507. </el-button>
  1508. <el-button type="primary" @click="execTimeDialogVisible = false"
  1509. >取消
  1510. </el-button>
  1511. </div>
  1512. </el-dialog>
  1513. </div>
  1514. <div style="display:none">
  1515. <div class="printForm" id="printCQadvice">
  1516. <h2 class="hospital_title">{{ orgname }}</h2>
  1517. <h1 class="title">长期医嘱单</h1>
  1518. <div class="info">
  1519. <ul>
  1520. <li>
  1521. <span class="name">姓名:</span>
  1522. <span class="InputBox">&nbsp;{{ currentPatient.name }}</span>
  1523. </li>
  1524. <li>
  1525. <span class="name">性别:</span>
  1526. <span class="InputBox"
  1527. >&nbsp;{{ tranSex(currentPatient.gender) }}</span
  1528. >
  1529. </li>
  1530. <li>
  1531. <span class="name">年龄:</span>
  1532. <span class="InputBox"
  1533. >&nbsp;{{ tranAge(currentPatient.birthday) }}岁</span
  1534. >
  1535. </li>
  1536. <li v-if="currentPatient.user_org_id!=10090">
  1537. <span class="name">科别:</span>
  1538. <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
  1539. </li>
  1540. <li>
  1541. <span class="name">透析号:</span>
  1542. <span class="InputBox"
  1543. >&nbsp;&nbsp;&nbsp;{{
  1544. currentPatient.dialysis_no
  1545. }}&nbsp;&nbsp;</span
  1546. >
  1547. </li>
  1548. </ul>
  1549. </div>
  1550. <table
  1551. border="1"
  1552. style="border:1px #999 solid;margin-top:20px;"
  1553. bordercolorlight="#fff"
  1554. bordercolordark="#fff"
  1555. width="100%"
  1556. cellpadding="0"
  1557. cellspacing="0"
  1558. class="printTable"
  1559. >
  1560. <tbody>
  1561. <tr align="center">
  1562. <th style="width:20%;" colspan="2" align="center">起始</th>
  1563. <th style="width:20%;" rowspan="2" align="">医嘱</th>
  1564. <th style="width:8%;" rowspan="2" align="center">医师签名</th>
  1565. <th style="width:6%;" rowspan="2" align="center">执行护士签名</th>
  1566. <th style="width:42%;" colspan="4" align="center">停止</th>
  1567. </tr>
  1568. <tr align="center">
  1569. <th align="center">日期</th>
  1570. <th align="center">时间</th>
  1571. <th style="width:10%;" align="center">日期</th>
  1572. <th style="width:10%;" align="center">时间</th>
  1573. <th style="width:10%;" align="center">医师签名</th>
  1574. <th style="width:6%;" align="center">执行护士签名</th>
  1575. </tr>
  1576. <tr
  1577. align="center"
  1578. v-for="(advice, index) in cqtableData"
  1579. :key="advice.id"
  1580. >
  1581. <td>
  1582. <span>{{ advice.start_time | parseTime("{y}-{m}-{d}") }}</span>
  1583. </td>
  1584. <td>
  1585. <span>{{ advice.start_time | parseTime("{h}:{i}") }}</span>
  1586. </td>
  1587. <td style="text-align:left">
  1588. <span v-if="advice.parent_id > 0">▲</span>
  1589. <span>{{ advice.advice_name }}</span>
  1590. <span v-if="advice.advice_desc"
  1591. >{{ advice.advice_desc }}{{ advice.drug_spec_unit }}</span
  1592. >
  1593. <span v-if="advice.prescribing_number"
  1594. >*{{ advice.prescribing_number
  1595. }}{{ advice.prescribing_number_unit }}</span
  1596. >
  1597. <span v-if="advice.single_dose != 0">
  1598. 单次用量 {{ advice.single_dose
  1599. }}{{ advice.single_dose_unit }}</span
  1600. >
  1601. <span>{{ advice.delivery_way }}</span>
  1602. <span>{{ advice.execution_frequency }}</span>
  1603. </td>
  1604. <td>
  1605. <div>
  1606. <span v-if="setAdminUserES(advice.advice_doctor) == ''">{{getXuserName(advice.advice_doctor)}}</span>
  1607. <img
  1608. class="es-img"
  1609. :src="setAdminUserES(advice.advice_doctor)"
  1610. alt=""
  1611. srcset=""
  1612. v-else
  1613. />
  1614. </div>
  1615. </td>
  1616. <td></td>
  1617. <td>
  1618. <span v-if="advice.stop_state == 1">{{ advice.stop_time | parseTime("{y}-{m}-{d}") }}</span>
  1619. </td>
  1620. <td>
  1621. <span v-if="advice.stop_state == 1">{{ advice.stop_time | parseTime("{h}:{i}") }}</span>
  1622. </td>
  1623. <td>
  1624. <div><span v-if="setAdminUserES(advice.stop_doctor) == ''">{{getXuserName(advice.stop_doctor)}}</span>
  1625. <img
  1626. class="es-img"
  1627. :src="setAdminUserES(advice.stop_doctor)"
  1628. alt=""
  1629. srcset=""
  1630. v-else
  1631. />
  1632. </div>
  1633. </td>
  1634. <td></td>
  1635. </tr>
  1636. </tbody>
  1637. </table>
  1638. </div>
  1639. </div>
  1640. <div style="display:none">
  1641. <div class="printForm" id="printLSadvice">
  1642. <h2 class="hospital_title">{{ orgname }}</h2>
  1643. <h1 class="title">临时医嘱单</h1>
  1644. <div class="info">
  1645. <ul>
  1646. <li>
  1647. <span class="name" style="width:50px;">姓名:</span>
  1648. <span class="InputBox">&nbsp;{{ currentPatient.name }}</span>
  1649. </li>
  1650. <li>
  1651. <span class="name" style="width:50px;">性别:</span>
  1652. <span class="InputBox"
  1653. >&nbsp;{{ tranSex(currentPatient.gender) }}</span
  1654. >
  1655. </li>
  1656. <li>
  1657. <span class="name" style="width:50px;">年龄:</span>
  1658. <span class="InputBox"
  1659. >&nbsp;{{ tranAge(currentPatient.birthday) }}岁</span
  1660. >
  1661. </li>
  1662. <li v-if="currentPatient.user_org_id!=10090">
  1663. <span class="name" style="width:30px;">科:</span>
  1664. <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
  1665. </li>
  1666. <li v-if="currentPatient.user_org_id!=10090">
  1667. <span class="name" style="width:30px;">区:</span>
  1668. <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
  1669. </li>
  1670. <li v-if="currentPatient.user_org_id!=10090">
  1671. <span class="name" style="width:30px;">房:</span>
  1672. <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
  1673. </li>
  1674. <li v-if="currentPatient.user_org_id!=10090">
  1675. <span class="name" style="width:30px;">床:</span>
  1676. <span class="InputBox">&nbsp;&nbsp;&nbsp;&nbsp;</span>
  1677. </li>
  1678. <li>
  1679. <span class="name" style="width:70px;">透析号:</span>
  1680. <span class="InputBox"
  1681. >&nbsp;{{ currentPatient.dialysis_no }}&nbsp;&nbsp;&nbsp;</span
  1682. >
  1683. </li>
  1684. </ul>
  1685. </div>
  1686. <table
  1687. border="1"
  1688. style="border:1px #999 solid;margin-top:20px;"
  1689. bordercolorlight="#fff"
  1690. bordercolordark="#fff"
  1691. width="100%"
  1692. cellpadding="0"
  1693. cellspacing="0"
  1694. class="printTable"
  1695. >
  1696. <tbody>
  1697. <tr align="center">
  1698. <th style="width:10%;" align="center">日期</th>
  1699. <th style="width:10%;" align="center">时间</th>
  1700. <th style="width:10%;" align="center">医生签名</th>
  1701. <th style="width:40%;" align="">医嘱内容</th>
  1702. <th style="width:10%;" align="center">执行时间</th>
  1703. <th style="width:10%;" align="center">护士签名</th>
  1704. </tr>
  1705. <tr align="center" v-for="advice in lstableData" :key="advice.id">
  1706. <td>
  1707. <span v-if="advice.parent_id == 0">{{
  1708. advice.start_time | parseTime("{y}-{m}-{d}")
  1709. }}</span>
  1710. </td>
  1711. <td>
  1712. <span v-if="advice.parent_id == 0">{{
  1713. advice.start_time | parseTime("{h}:{i}")
  1714. }}</span>
  1715. </td>
  1716. <td>
  1717. <div v-if="isShowCQStartTime(index, advice)">
  1718. <span v-if="setAdminUserES(advice.advice_doctor) == ''">{{
  1719. getXuserName(advice.advice_doctor)
  1720. }}</span>
  1721. <img
  1722. class="es-img"
  1723. :src="setAdminUserES(advice.advice_doctor)"
  1724. alt=""
  1725. srcset=""
  1726. v-else
  1727. />
  1728. </div>
  1729. </td>
  1730. <td style="text-align:left">
  1731. <span v-if="advice.parent_id > 0">▲</span>
  1732. <span>{{ advice.advice_name }}</span>
  1733. <span>{{ advice.advice_desc }}</span>
  1734. <span v-if="advice.advice_desc"
  1735. >{{ advice.advice_desc }}{{ advice.drug_spec_unit }}</span
  1736. >
  1737. <span v-if="advice.prescribing_number"
  1738. >*{{ advice.prescribing_number
  1739. }}{{ advice.prescribing_number_unit }}</span
  1740. >
  1741. <span v-if="advice.single_dose != 0"
  1742. >单次用量 {{ advice.single_dose
  1743. }}{{ advice.single_dose_unit }}</span
  1744. >
  1745. <span>{{ advice.delivery_way }}</span>
  1746. <span>{{ advice.execution_frequency }}</span>
  1747. </td>
  1748. <td>
  1749. <span v-if="advice.execution_time != 0">{{
  1750. advice.execution_time | parseTime("{y}-{m}-{d} {h}:{i}")
  1751. }}</span>
  1752. </td>
  1753. <td>
  1754. <div v-if="isShowCQStartTime(index, advice)">
  1755. <span v-if="setAdminUserES(advice.execution_staff) == ''">{{
  1756. getXuserName(advice.execution_staff)
  1757. }}</span>
  1758. <img
  1759. class="es-img"
  1760. :src="setAdminUserES(advice.execution_staff)"
  1761. alt=""
  1762. srcset=""
  1763. v-else
  1764. />
  1765. </div>
  1766. </td>
  1767. </tr>
  1768. </tbody>
  1769. </table>
  1770. </div>
  1771. </div>
  1772. <div style="display:none;">
  1773. <div id="printCQadvice_fq" class="advice-order">
  1774. <div class="ls-title">{{ orgname }}</div>
  1775. <div class="ls-type">长期医嘱单</div>
  1776. <div class="ls-name">
  1777. <div>
  1778. 姓名:<span class="item-value">{{ currentPatient.name }}</span>
  1779. </div>
  1780. <div>
  1781. 透析号:<span class="item-value">{{
  1782. currentPatient.dialysis_no
  1783. }}</span>
  1784. </div>
  1785. </div>
  1786. <table
  1787. cellspacing="0"
  1788. cellpadding="0"
  1789. border="1"
  1790. class="el-table__body"
  1791. style="width: 100%;"
  1792. >
  1793. <tbody>
  1794. <tr style="text-align:center;">
  1795. <td colspan="3">
  1796. 开始
  1797. </td>
  1798. <td colspan="2">
  1799. 停止
  1800. </td>
  1801. <td rowspan="2">
  1802. 备注
  1803. </td>
  1804. </tr>
  1805. <tr style="text-align:center;">
  1806. <td>时间</td>
  1807. <td style="max-width:50%">医嘱</td>
  1808. <td>医生</td>
  1809. <td>时间</td>
  1810. <td>医生</td>
  1811. </tr>
  1812. <tr v-for="(advice, index) in cqtableData" :key="advice.id">
  1813. <td>
  1814. <span v-if="isShowCQStartTime(index, advice)">{{
  1815. advice.start_time | parseTime("{y}-{m}-{d} {h}:{i}")
  1816. }}</span>
  1817. <span v-else></span>
  1818. </td>
  1819. <td>
  1820. <span>{{ advice.advice_name }}</span>
  1821. <span>{{ advice.advice_desc }}</span>
  1822. <span v-if="advice.single_dose"
  1823. >{{ advice.single_dose }}{{ advice.single_dose_unit }}</span
  1824. >
  1825. <span v-if="advice.prescribing_number"
  1826. >*{{ advice.prescribing_number
  1827. }}{{ advice.prescribing_number_unit }}</span
  1828. >
  1829. <span>{{ advice.delivery_way }}</span>
  1830. <span>{{ advice.execution_frequency }}</span>
  1831. </td>
  1832. <td>
  1833. <span v-if="advice.parent_id == 0">{{
  1834. getXuserName(advice.advice_doctor)
  1835. }}</span>
  1836. </td>
  1837. <td>
  1838. <span v-if="advice.parent_id == 0">{{
  1839. advice.stop_time | parseTime("{y}-{m}-{d} {h}:{i}")
  1840. }}</span>
  1841. <span v-else></span>
  1842. </td>
  1843. <td>
  1844. <span v-if="advice.parent_id == 0">{{
  1845. getXuserName(advice.stop_doctor)
  1846. }}</span>
  1847. <span v-else></span>
  1848. </td>
  1849. <td>
  1850. {{ advice.remark }}
  1851. </td>
  1852. </tr>
  1853. </tbody>
  1854. </table>
  1855. </div>
  1856. </div>
  1857. <div style="display:none;">
  1858. <div id="printLSadvice_fq" class="advice-order">
  1859. <div class="ls-title">{{ orgname }}</div>
  1860. <div class="ls-type">临时医嘱单</div>
  1861. <div class="ls-name">
  1862. <div>
  1863. 姓名:<span class="item-value">{{ currentPatient.name }}</span>
  1864. </div>
  1865. <div>
  1866. 透析号:<span class="item-value">{{
  1867. currentPatient.dialysis_no
  1868. }}</span>
  1869. </div>
  1870. </div>
  1871. <table
  1872. cellspacing="0"
  1873. cellpadding="0"
  1874. border="1"
  1875. class="el-table__body"
  1876. style="width: 100%;"
  1877. >
  1878. <thead>
  1879. <th>时间</th>
  1880. <th>医嘱</th>
  1881. <th>医生</th>
  1882. <th>执行护士</th>
  1883. <th>执行时间</th>
  1884. </thead>
  1885. <tbody>
  1886. <tr v-for="(advice, index) in lstableData" :key="advice.id">
  1887. <td>
  1888. <span v-if="isShowLSStartTime(index, advice)">{{
  1889. advice.start_time | parseTime("{y}-{m}-{d} {h}:{i}")
  1890. }}</span>
  1891. <span v-else></span>
  1892. </td>
  1893. <td>
  1894. <span>{{ advice.advice_name }}</span>
  1895. <span>{{ advice.advice_desc }}</span>
  1896. <span v-if="advice.single_dose"
  1897. >{{ advice.single_dose }}{{ advice.single_dose_unit }}</span
  1898. >
  1899. <span v-if="advice.advice_desc"
  1900. >{{ advice.advice_desc }}{{ advice.drug_spec_unit }}</span
  1901. >
  1902. <span v-if="advice.prescribing_number"
  1903. >*{{ advice.prescribing_number
  1904. }}{{ advice.prescribing_number_unit }}</span
  1905. >
  1906. <span>{{ advice.delivery_way }}</span>
  1907. <span>{{ advice.execution_frequency }}</span>
  1908. </td>
  1909. <td>
  1910. <span v-if="advice.parent_id == 0">{{
  1911. getXuserName(advice.advice_doctor)
  1912. }}</span>
  1913. </td>
  1914. <td>
  1915. <span v-if="advice.parent_id == 0">{{
  1916. getXuserName(advice.execution_staff)
  1917. }}</span>
  1918. </td>
  1919. <td>
  1920. <span v-if="advice.execution_time != 0">{{
  1921. advice.execution_time | parseTime("{y}-{m}-{d} {h}:{i}")
  1922. }}</span>
  1923. </td>
  1924. </tr>
  1925. </tbody>
  1926. </table>
  1927. </div>
  1928. </div>
  1929. </div>
  1930. </template>
  1931. <script>
  1932. import PatientSidebar from "./components/PatientSidebar";
  1933. import EditGroupAdvice from "./components/EditGroupAdvice";
  1934. import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from "@/api/doctor";
  1935. import {
  1936. CheckGroupAdvice,
  1937. CreateNewDoctorAdvice,
  1938. CreateNewGroupAdvice,
  1939. DeleteNewDoctorAdvice,
  1940. DeleteNewGroupAdvice,
  1941. EditNewDoctorAdvice,
  1942. ExecGroupAdvice,
  1943. getAdviceConfig,
  1944. getAllAdviceConfig,
  1945. getDoctorAdviceList,
  1946. StopDoctorAdvice,
  1947. getPatientSchedules,
  1948. getPrintInfo
  1949. } from "@/api/advice";
  1950. import { fetchPatient, PostRemind } from "@/api/patient";
  1951. import { jsGetAge, uParseTime } from "@/utils/tools";
  1952. import { getDataConfig } from "@/utils/data";
  1953. import { getSelfMedicalList,getDrugDescByDrugName } from "@/api/drug/drug"
  1954. let rowIndex = 1;
  1955. const rowKey = 0;
  1956. export default {
  1957. name: "doctorAdvice",
  1958. data() {
  1959. return {
  1960. pickerOptionsOne: {
  1961. // 限制收货时间不让选择今天以前的
  1962. disabledDate(time) {
  1963. return time.getTime() < Date.now() - 8.64e7;
  1964. },
  1965. },
  1966. weeks: [],
  1967. is_open_remind: "",
  1968. checkList: [],
  1969. rowKey: 0,
  1970. nameFormTitle: "",
  1971. adminusername: "",
  1972. aminuserid: 0,
  1973. orgname: "",
  1974. tempArr: [],
  1975. dialogConfigVisible: false,
  1976. currentPatient: {},
  1977. currentIndex: -1,
  1978. dialogTitle: "新增",
  1979. dialogFormVisible: false,
  1980. groupEditFormVisible: false,
  1981. nameFormVisible: false,
  1982. templateFormVisible: false,
  1983. oldTemplateFormVisible: false,
  1984. dialogStopFormVisible: false,
  1985. execTimeDialogVisible: false,
  1986. groupFormVisible: false,
  1987. isEdit: false,
  1988. isChild: false,
  1989. searchKey: "",
  1990. pickerOptions: {
  1991. shortcuts: [
  1992. {
  1993. text: "今天",
  1994. onClick(picker) {
  1995. picker.$emit("pick", new Date());
  1996. }
  1997. },
  1998. {
  1999. text: "昨天",
  2000. onClick(picker) {
  2001. const date = new Date();
  2002. date.setTime(date.getTime() - 3600 * 1000 * 24);
  2003. picker.$emit("pick", date);
  2004. }
  2005. },
  2006. {
  2007. text: "一周前",
  2008. onClick(picker) {
  2009. const date = new Date();
  2010. date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
  2011. picker.$emit("pick", date);
  2012. }
  2013. },
  2014. {
  2015. text: "清空",
  2016. onClick(picker) {
  2017. picker.$emit("pick");
  2018. }
  2019. }
  2020. ]
  2021. },
  2022. adviceType: 0,
  2023. adviceTypeArr: [
  2024. { value: 0, label: "全部" },
  2025. { value: 1, label: "长期" },
  2026. { value: 2, label: "临时" },
  2027. { value: 4, label: "普通医嘱" },
  2028. ],
  2029. adviceTypeOptions: [
  2030. { value: 1, label: "长期" },
  2031. { value: 3, label: "临时" },
  2032. { value: 4, label: "普通医嘱" },
  2033. ],
  2034. stopType: 0,
  2035. stopTypeArr: [
  2036. { value: 0, label: "全部" },
  2037. { value: 2, label: "未停止" },
  2038. { value: 1, label: "已停止" }
  2039. ],
  2040. adviceTableData: [],
  2041. doctorOptions: [],
  2042. adminUserOptions: null,
  2043. adviceTemplates: [],
  2044. adviceTemplateMaps: {},
  2045. drugOptions: [],
  2046. deliveryWayOptions: [],
  2047. executionFrequencyOptions: [],
  2048. unitsOption: [],
  2049. templateForm: { id: "" },
  2050. adviceForm: {
  2051. advice_type: "",
  2052. advice_date: "",
  2053. start_time: "",
  2054. advice_name: "",
  2055. advice_desc: "",
  2056. single_dose: "",
  2057. template_id: 0,
  2058. single_dose_unit: "",
  2059. prescribing_number: "",
  2060. prescribing_number_unit: "",
  2061. delivery_way: "",
  2062. execution_frequency: "",
  2063. advice_doctor: "",
  2064. remark: "",
  2065. parent_id: 0,
  2066. drug_id:0,
  2067. way:0,
  2068. drug_name_id:0,
  2069. push_start_time:"",
  2070. },
  2071. nameForm: {
  2072. advice_name: "",
  2073. single_dose: "",
  2074. single_dose_unit: "",
  2075. drug_spec: "",
  2076. drug_spec_unit: "",
  2077. prescribing_number: "",
  2078. prescribing_number_unit: "",
  2079. delivery_way: "",
  2080. execution_frequency: "",
  2081. template_id: 0,
  2082. isEdit: 0,
  2083. index: 0,
  2084. id: 0,
  2085. children: [],
  2086. push_start_time:"",
  2087. },
  2088. groupForm: {
  2089. day_count: "",
  2090. advice_type: "",
  2091. advice_date: "",
  2092. start_time: "",
  2093. adviceNames: [],
  2094. advice_doctor: "",
  2095. remark: "",
  2096. parent_id: 0,
  2097. remind: 0,
  2098. frequency_type: 0
  2099. },
  2100. stopForm: {
  2101. id: 0,
  2102. stop_time: "",
  2103. stop_reason: ""
  2104. },
  2105. execForm: {
  2106. exec_time: "",
  2107. groupno: ""
  2108. },
  2109. templateRules: {
  2110. id: [{ required: true, message: "请选择医嘱模板" }]
  2111. },
  2112. adviceRules: {
  2113. advice_type: [{ required: true, message: "请选择医嘱类型" }],
  2114. advice_date: [{ required: true, message: "请选择开嘱时间" }],
  2115. start_time: [{ required: true, message: "请选择开始时间" }],
  2116. advice_name: [{ required: true, message: "请填写医嘱内容" }],
  2117. advice_doctor: [{ required: true, message: "请选择开嘱医生" }]
  2118. },
  2119. nameRules: {
  2120. advice_name: [{ required: true, message: "请填写医嘱内容" }]
  2121. },
  2122. groupRules: {
  2123. advice_type: [{ required: true, message: "请选择医嘱类型" }],
  2124. advice_date: [{ required: true, message: "请选择开嘱时间" }],
  2125. start_time: [{ required: true, message: "请选择开始时间" }],
  2126. advice_name: [{ required: true, message: "请填写医嘱内容" }],
  2127. advice_doctor: [{ required: true, message: "请选择开嘱医生" }],
  2128. frequency_type: [
  2129. { required: true, message: "请选择周期提醒", trigger: "change" }
  2130. ]
  2131. },
  2132. stopRules: {
  2133. stop_time: [{ required: true, message: "请选择停止时间" }]
  2134. },
  2135. execRules: {
  2136. exec_time: [{ required: true, message: "请选择时间" }]
  2137. },
  2138. listQuery: {
  2139. start_time: "",
  2140. end_time: "",
  2141. advice_type: 0,
  2142. stop_state: "",
  2143. keywords: "",
  2144. id: 0,
  2145. limit: 10,
  2146. page: 1
  2147. },
  2148. total: 0,
  2149. addLoading: false,
  2150. lstableData: [],
  2151. cqtableData: [],
  2152. groupSelectRow: null,
  2153. expandRowKeys: [],
  2154. operators: [],
  2155. operatorMaps: {},
  2156. selectedTemp: { id: 0, name: "", org_id: 0, list: [], rows: [] },
  2157. selectedTemplate: [],
  2158. allSelectedTemplate: [],
  2159. tableData: [],
  2160. multipleSelection: [],
  2161. patientID: 0,
  2162. temp: null,
  2163. schedulStatus: 0,
  2164. doctorAdvice: [],
  2165. dataAdvice: [],
  2166. medicals:[],
  2167. private_drug_config:{},
  2168. patient_id:"",
  2169. drugSpec:[],
  2170. all_drug:[],
  2171. current_drug_name:"",
  2172. current_drug_spec: "",
  2173. drug_id: 0,
  2174. src_type:"",
  2175. org_id:0,
  2176. };
  2177. },
  2178. methods: {
  2179. clickuseradvicecell(row, column, cell, event) {
  2180. // console.log("row1", row);
  2181. // console.log("column", column);
  2182. },
  2183. onTranPatient: function(tranPatient) {
  2184. console.log("患者信息",tranPatient)
  2185. this.currentPatient = tranPatient;
  2186. },
  2187. adviceNameShow({ row, column, rowIndex, columnIndex }) {
  2188. if (columnIndex == 3) {
  2189. return "advicenamedisplay";
  2190. } else {
  2191. return "";
  2192. }
  2193. },
  2194. submitEditAdvice(formName) {
  2195. this.$refs[formName].validate(valid => {
  2196. if (valid) {
  2197. let mode = "";
  2198. if (this.adviceForm.advice_type == 1) {
  2199. mode = "1-3";
  2200. if (
  2201. this.adviceForm.advice_doctor !=
  2202. this.$store.getters.xt_user.user.id
  2203. ) {
  2204. mode = "1-4";
  2205. }
  2206. } else if (this.adviceForm.advice_type == 3) {
  2207. mode = "2-1";
  2208. if (
  2209. this.adviceForm.advice_doctor !=
  2210. this.$store.getters.xt_user.user.id
  2211. ) {
  2212. mode = "3-1";
  2213. }
  2214. }
  2215. if(this.src_type == ""){
  2216. this.adviceForm.way = 0
  2217. this.adviceForm.drug_id = 0
  2218. this.adviceForm.drug_name_id = 0
  2219. }
  2220. if(this.src_type == 2){ //自备药
  2221. var arr = this.adviceForm.advice_name.split("(自备药)")
  2222. this.adviceForm.advice_name = arr[0]
  2223. }
  2224. console.log("2323223",this.adviceForm)
  2225. EditNewDoctorAdvice(
  2226. this.patientID,
  2227. this.adviceForm.id,
  2228. this.adviceForm,
  2229. mode
  2230. ).then(response => {
  2231. if (response.data.state == 0) {
  2232. this.$message.error(response.data.msg);
  2233. return false;
  2234. } else {
  2235. this.$notify({
  2236. title: "成功",
  2237. message: "修改医嘱成功",
  2238. type: "success",
  2239. duration: 2000
  2240. });
  2241. this.dialogFormVisible = false;
  2242. this.resetForm(formName);
  2243. var advice = response.data.data.advice;
  2244. this.adviceTableData[this.currentIndex].drug_spec =
  2245. advice.drug_spec;
  2246. this.adviceTableData[this.currentIndex].drug_spec_unit =
  2247. advice.drug_spec_unit;
  2248. this.adviceTableData[this.currentIndex].start_time =
  2249. advice.start_time;
  2250. this.adviceTableData[this.currentIndex].advice_name =
  2251. advice.advice_name;
  2252. this.adviceTableData[this.currentIndex].advice_desc =
  2253. advice.advice_desc;
  2254. this.adviceTableData[this.currentIndex].single_dose =
  2255. advice.single_dose;
  2256. this.adviceTableData[this.currentIndex].single_dose_unit =
  2257. advice.single_dose_unit;
  2258. this.adviceTableData[this.currentIndex].delivery_way =
  2259. advice.delivery_way;
  2260. this.adviceTableData[this.currentIndex].execution_frequency =
  2261. advice.execution_frequency;
  2262. this.adviceTableData[this.currentIndex].prescribing_number =
  2263. advice.prescribing_number;
  2264. this.adviceTableData[this.currentIndex].prescribing_number_unit =
  2265. advice.prescribing_number_unit;
  2266. this.adviceTableData[this.currentIndex].advice_doctor =
  2267. advice.advice_doctor;
  2268. this.adviceTableData[this.currentIndex].remark = advice.remark;
  2269. this.adviceTableData[this.currentIndex].push_start_time = advice.push_start_time;
  2270. this.currentIndex = -1;
  2271. return false;
  2272. }
  2273. });
  2274. }
  2275. });
  2276. },
  2277. submitgroupAdvice(formName) {
  2278. this.addLoading = true;
  2279. this.$refs[formName].validate(valid => {
  2280. if (valid) {
  2281. var submitForm = {
  2282. advice_type: this.groupForm.advice_type,
  2283. advice_date: this.groupForm.advice_date,
  2284. start_time: this.groupForm.start_time,
  2285. adviceNames: [],
  2286. advice_doctor: this.groupForm.advice_doctor,
  2287. remark: this.groupForm.remark,
  2288. parent_id: this.groupForm.parent_id,
  2289. };
  2290. var adviceNames = [];
  2291. for (const index in this.groupForm.adviceNames) {
  2292. this.groupForm.adviceNames[
  2293. index
  2294. ].day_count = this.groupForm.adviceNames[
  2295. index
  2296. ].day_count.toString();
  2297. adviceNames.unshift(this.groupForm.adviceNames[index]);
  2298. }
  2299. submitForm.adviceNames = adviceNames;
  2300. let mode = "";
  2301. if (this.groupForm.advice_type == 1) {
  2302. mode = "1-2";
  2303. } else if (this.groupForm.advice_type == 3) {
  2304. mode = "1-1";
  2305. }else if (this.groupForm.advice_type == 4){
  2306. mode = "1-3"
  2307. }
  2308. console.log("长期医嘱3333",submitForm)
  2309. if(this.private_drug_config != null&&this.private_drug_config.drug_start == 1){
  2310. for(let index=0;index<submitForm.adviceNames.length;index++){
  2311. for(let i=0;i<this.medicals.length;i++){
  2312. if(submitForm.adviceNames[index].drug_id == this.medicals[i].drug_name_id){
  2313. submitForm.adviceNames[index].way = 2
  2314. submitForm.adviceNames[index].drug_name_id = this.medicals[i].drug_name_id
  2315. }
  2316. }
  2317. }
  2318. }
  2319. console.log("模板数据",submitForm)
  2320. CreateNewGroupAdvice(this.patientID, 0, submitForm, mode).then(
  2321. response => {
  2322. if (response.data.state == 0) {
  2323. this.$message.error(response.data.msg);
  2324. this.addLoading = false;
  2325. return false;
  2326. } else {
  2327. this.addLoading = false;
  2328. this.$notify({
  2329. title: "成功",
  2330. message: "新增成功",
  2331. type: "success",
  2332. duration: 2000
  2333. });
  2334. if (
  2335. this.adviceType == this.groupForm.advice_type ||
  2336. this.adviceType == 0
  2337. ) {
  2338. var childMap = {};
  2339. for (const index in response.data.data.advices) {
  2340. if (response.data.data.advices[index].parent_id == 0) {
  2341. continue;
  2342. }
  2343. if (
  2344. response.data.data.advices[index].parent_id in
  2345. childMap ===
  2346. false
  2347. ) {
  2348. childMap[
  2349. response.data.data.advices[index].parent_id
  2350. ] = [];
  2351. }
  2352. childMap[
  2353. response.data.data.advices[index].parent_id
  2354. ].unshift(response.data.data.advices[index]);
  2355. }
  2356. var parentArr = [];
  2357. for (const index in response.data.data.advices) {
  2358. if (response.data.data.advices[index].parent_id > 0) {
  2359. continue;
  2360. }
  2361. parentArr.push(response.data.data.advices[index]);
  2362. }
  2363. for (const index in parentArr) {
  2364. if (parentArr[index].id in childMap) {
  2365. for (const j in childMap[parentArr[index].id]) {
  2366. this.adviceTableData.unshift(
  2367. childMap[parentArr[index].id][j]
  2368. );
  2369. }
  2370. }
  2371. this.adviceTableData.unshift(parentArr[index]);
  2372. }
  2373. }
  2374. this.resetForm(formName);
  2375. this.groupFormVisible = false;
  2376. return false;
  2377. }
  2378. }
  2379. );
  2380. } else {
  2381. this.addLoading = false;
  2382. }
  2383. });
  2384. },
  2385. submitNewAdvice(formName, action) {
  2386. console.log("kkkthis.adviceForm",this.adviceForm)
  2387. this.$refs[formName].validate(valid => {
  2388. if (valid) {
  2389. let mode = "";
  2390. if (this.adviceForm.advice_type == 1) {
  2391. //长期
  2392. mode = "1-2";
  2393. } else if (this.adviceForm.advice_type == 3) {
  2394. //临时
  2395. mode = "1-1";
  2396. }
  2397. if(this.src_type == ""){
  2398. this.adviceForm.way = 0
  2399. this.adviceForm.drug_id = 0
  2400. this.adviceForm.drug_name_id = 0
  2401. }
  2402. if(this.src_type == 2){ //自备药
  2403. var arr = this.adviceForm.advice_name.split("(自备药)")
  2404. this.adviceForm.advice_name = arr[0]
  2405. }
  2406. console.log("222222???????this.adviceForm",this.adviceForm)
  2407. CreateNewDoctorAdvice(this.patientID, this.adviceForm, mode).then(
  2408. response => {
  2409. if (response.data.state == 0) {
  2410. this.$message.error(response.data.msg);
  2411. return false;
  2412. } else {
  2413. this.$notify({
  2414. title: "成功",
  2415. message: "新增医嘱成功",
  2416. type: "success",
  2417. duration: 2000
  2418. });
  2419. if (action != "re") {
  2420. this.dialogFormVisible = false;
  2421. }
  2422. if (
  2423. this.adviceType == this.adviceForm.advice_type ||
  2424. this.adviceType == 0
  2425. ) {
  2426. if (this.adviceForm.parent_id > 0) {
  2427. var spliceIndex = -1;
  2428. for (
  2429. let index = this.adviceTableData.length - 1;
  2430. ;
  2431. index--
  2432. ) {
  2433. if (
  2434. this.adviceTableData[index].parent_id ===
  2435. this.adviceForm.parent_id
  2436. ) {
  2437. spliceIndex = index;
  2438. break;
  2439. } else if (
  2440. this.adviceTableData[index].id ===
  2441. this.adviceForm.parent_id
  2442. ) {
  2443. spliceIndex = index;
  2444. break;
  2445. }
  2446. }
  2447. if (spliceIndex > -1) {
  2448. spliceIndex += 1;
  2449. if (spliceIndex === this.adviceTableData.length) {
  2450. this.adviceTableData.push(response.data.data.advice);
  2451. } else {
  2452. var swapData = this.adviceTableData.splice(spliceIndex);
  2453. this.adviceTableData.push(response.data.data.advice);
  2454. this.adviceTableData = this.adviceTableData.concat(
  2455. swapData
  2456. );
  2457. }
  2458. }
  2459. } else {
  2460. this.adviceTableData.unshift(response.data.data.advice);
  2461. }
  2462. }
  2463. this.resetForm(formName);
  2464. this.currentIndex = -1;
  2465. return false;
  2466. }
  2467. }
  2468. );
  2469. }
  2470. });
  2471. },
  2472. submitStopAdvice(formName) {
  2473. this.$refs[formName].validate(valid => {
  2474. if (valid) {
  2475. let mode = "1-5";
  2476. if (this.temp.advice_doctor != this.$store.getters.xt_user.user.id) {
  2477. mode = "1-8";
  2478. }
  2479. StopDoctorAdvice(this.stopForm.id, this.stopForm, mode).then(
  2480. response => {
  2481. if (response.data.state == 0) {
  2482. this.$message.error(response.data.msg);
  2483. return false;
  2484. } else {
  2485. this.$notify({
  2486. title: "成功",
  2487. message: "医嘱已经停止",
  2488. type: "success",
  2489. duration: 2000
  2490. });
  2491. // this.stopResetData(this.stopForm.id);
  2492. var atlen = this.adviceTableData.length;
  2493. var _this = this;
  2494. for (let index = atlen - 1; index >= 0; index--) {
  2495. if (
  2496. this.adviceTableData[index].id == this.stopForm.id ||
  2497. this.adviceTableData[index].parent_id == this.stopForm.id
  2498. ) {
  2499. if (_this.stopType == 0) {
  2500. this.adviceTableData[index].stop_state =
  2501. response.data.data.advice.stop_state;
  2502. this.adviceTableData[index].stop_doctor =
  2503. response.data.data.advice.stop_doctor;
  2504. this.adviceTableData[index].stop_time =
  2505. response.data.data.advice.stop_time;
  2506. } else if (_this.stopType == 2) {
  2507. this.adviceTableData.splice(index, 1);
  2508. }
  2509. }
  2510. }
  2511. this.dialogStopFormVisible = false;
  2512. }
  2513. }
  2514. );
  2515. }
  2516. });
  2517. },
  2518. submitExecAdvice(formName) {
  2519. this.$refs[formName].validate(valid => {
  2520. if (valid) {
  2521. let mode = "6-1";
  2522. ExecGroupAdvice(
  2523. this.execForm.groupno,
  2524. this.execForm.exec_time,
  2525. mode
  2526. ).then(response => {
  2527. if (response.data.state == 0) {
  2528. this.$message.error(response.data.msg);
  2529. return false;
  2530. } else {
  2531. this.$notify({
  2532. title: "成功",
  2533. message: "医嘱已经执行",
  2534. type: "success",
  2535. duration: 2000
  2536. });
  2537. var atlen = this.adviceTableData.length;
  2538. for (const index in this.adviceTableData) {
  2539. if (
  2540. this.adviceTableData[index].groupno == this.execForm.groupno
  2541. ) {
  2542. this.adviceTableData[index].execution_time =
  2543. response.data.data.advice.execution_time;
  2544. this.adviceTableData[index].execution_staff =
  2545. response.data.data.advice.execution_staff;
  2546. this.adviceTableData[index].execution_state = 1;
  2547. }
  2548. }
  2549. this.execTimeDialogVisible = false;
  2550. }
  2551. });
  2552. }
  2553. });
  2554. },
  2555. openAdviceTemplate() {
  2556. if (this.groupForm.advice_type == "") {
  2557. this.$message.error("请先选择医嘱类型");
  2558. return;
  2559. }
  2560. if (this.groupForm.advice_type == 1) {
  2561. this.getAdviceConfig(1);
  2562. } else if (this.groupForm.advice_type == 3) {
  2563. this.getAdviceConfig(0);
  2564. }else if(this.groupForm.advice_type == 4){
  2565. this.getAdviceConfig(0)
  2566. }
  2567. this.templateForm = { id: "" };
  2568. this.selectedTemp = { id: 0, name: "", org_id: 0, list: [], rows: [] };
  2569. this.selectedTemplate = [];
  2570. if (typeof this.$refs.templatetable !== "undefined") {
  2571. this.$refs.templatetable.setCurrentRow(null);
  2572. }
  2573. this.templateFormVisible = true;
  2574. },
  2575. openGroupChild() {
  2576. if (this.groupSelectRow === null) {
  2577. this.$message.error("未选择医嘱内容,无法添加子药");
  2578. return;
  2579. } else if (this.groupSelectRow.parent_row > 0) {
  2580. this.$message.error("子药不能添加子药");
  2581. return;
  2582. }
  2583. this.nameForm = {
  2584. advice_name: "",
  2585. single_dose: "",
  2586. single_dose_unit: "",
  2587. drug_spec: "",
  2588. drug_spec_unit: "",
  2589. prescribing_number: "",
  2590. prescribing_number_unit: "",
  2591. delivery_way: this.groupSelectRow.delivery_way,
  2592. execution_frequency: this.groupSelectRow.execution_frequency,
  2593. isEdit: 0,
  2594. index: 0,
  2595. children: [],
  2596. checkIds: [],
  2597. parent_row: this.groupSelectRow.row_key,
  2598. id: 0
  2599. };
  2600. this.isChild = true;
  2601. this.nameFormVisible = true;
  2602. this.nameFormTitle = "添加子药内容";
  2603. },
  2604. openGroupAdvice(isEdit) {
  2605. this.isChild = false;
  2606. if (isEdit) {
  2607. if (this.groupSelectRow === null) {
  2608. this.$message.error("未选择要修改的医嘱内容");
  2609. return;
  2610. }
  2611. if (this.groupSelectRow.parent_row) {
  2612. this.isChild = true;
  2613. }
  2614. this.nameForm = {
  2615. advice_name: this.groupSelectRow.advice_name,
  2616. advice_desc: this.groupSelectRow.advice_desc,
  2617. single_dose: this.groupSelectRow.single_dose,
  2618. single_dose_unit: this.groupSelectRow.single_dose_unit,
  2619. drug_spec: this.groupSelectRow.drug_spec,
  2620. drug_spec_unit: this.groupSelectRow.drug_spec_unit,
  2621. prescribing_number: this.groupSelectRow.prescribing_number,
  2622. prescribing_number_unit: this.groupSelectRow.prescribing_number_unit,
  2623. way:this.groupSelectRow.way,
  2624. drug_id:this.groupSelectRow.drug_id,
  2625. drug_name_id:this.groupSelectRow.drug_name_id,
  2626. delivery_way: this.isChild ? "" : this.groupSelectRow.delivery_way,
  2627. execution_frequency: this.isChild
  2628. ? ""
  2629. : this.groupSelectRow.execution_frequency,
  2630. isEdit: 1,
  2631. index: this.groupSelectRow.index,
  2632. id: this.groupSelectRow.id,
  2633. children: [],
  2634. parent_row: this.groupSelectRow.parent_row,
  2635. day_count: this.groupSelectRow.day_count,
  2636. week_days: this.groupSelectRow.week_days,
  2637. frequency_type: this.groupSelectRow.frequency_type
  2638. };
  2639. this.weeks = this.groupSelectRow.week_days.split(",");
  2640. this.nameFormTitle = "修改医嘱内容";
  2641. } else {
  2642. if (this.groupForm.advice_type == "") {
  2643. this.$message.error("请先选择医嘱类型");
  2644. return;
  2645. }
  2646. this.nameForm = {
  2647. advice_name: "",
  2648. advice_desc: "",
  2649. single_dose: "",
  2650. single_dose_unit: "",
  2651. drug_spec: "",
  2652. drug_spec_unit: "",
  2653. prescribing_number: "",
  2654. prescribing_number_unit: "",
  2655. delivery_way: "",
  2656. execution_frequency: "",
  2657. day_count: "",
  2658. week_days: "",
  2659. frequency_type: 0,
  2660. template_id: "",
  2661. isEdit: 0,
  2662. index: 0,
  2663. id: 0,
  2664. children: [],
  2665. parent_row: 0,
  2666. way:0,
  2667. drug_id:0,
  2668. drug_name_id:0,
  2669. };
  2670. this.nameFormTitle = "新增医嘱内容";
  2671. }
  2672. this.nameFormVisible = true;
  2673. },
  2674. openDeleteGroupAdvice() {
  2675. if (this.groupSelectRow === null) {
  2676. this.$message.error("未选择要删除的医嘱内容");
  2677. return;
  2678. }
  2679. var content = "";
  2680. if (this.groupSelectRow.children.length > 0) {
  2681. content = "确认删除此医嘱内容,包括它的子药?";
  2682. } else {
  2683. content = "确认删除此医嘱内容?";
  2684. }
  2685. var isChild = !!this.groupSelectRow.parent_row;
  2686. var title = isChild ? "删除子药内容" : "删除医嘱内容";
  2687. var msg = isChild ? "确认删除此子药内容?" : content;
  2688. this.$confirm(msg, title, {
  2689. confirmButtonText: "确定",
  2690. cancelButtonText: "取消",
  2691. type: "warning"
  2692. })
  2693. .then(() => {
  2694. if (isChild) {
  2695. for (const index in this.groupForm.adviceNames) {
  2696. if (
  2697. this.groupForm.adviceNames[index].row_key ==
  2698. this.groupSelectRow.parent_row
  2699. ) {
  2700. for (const j in this.groupForm.adviceNames[index].children) {
  2701. if (
  2702. this.groupForm.adviceNames[index].children[j].row_key ==
  2703. this.groupSelectRow.row_key
  2704. ) {
  2705. this.groupForm.adviceNames[index].children.splice(j, 1);
  2706. this.$set(
  2707. this.groupForm.adviceNames,
  2708. index,
  2709. this.groupForm.adviceNames[index]
  2710. );
  2711. this.toggleRowExpansion();
  2712. break;
  2713. }
  2714. }
  2715. }
  2716. }
  2717. } else {
  2718. for (const index in this.groupForm.adviceNames) {
  2719. if (
  2720. this.groupForm.adviceNames[index].row_key ==
  2721. this.groupSelectRow.row_key
  2722. ) {
  2723. this.groupForm.adviceNames.splice(index, 1);
  2724. this.toggleRowExpansion();
  2725. break;
  2726. }
  2727. }
  2728. }
  2729. })
  2730. .catch(() => {});
  2731. },
  2732. DeleteGroupAdvice(groupno, row) {
  2733. this.$confirm("确认删除这组医嘱?", "医嘱删除", {
  2734. confirmButtonText: "确定",
  2735. cancelButtonText: "取消",
  2736. type: "warning"
  2737. })
  2738. .then(() => {
  2739. // console.log(row);
  2740. let mode = "";
  2741. if (row.advice_type == 3) {
  2742. mode = "4-1";
  2743. if (row.advice_doctor != this.$store.getters.xt_user.user.id) {
  2744. mode = "5-1";
  2745. }
  2746. } else if (row.advice_type == 1) {
  2747. mode = "1-6";
  2748. if (row.advice_doctor != this.$store.getters.xt_user.user.id) {
  2749. mode = "1-7";
  2750. }
  2751. }
  2752. DeleteNewGroupAdvice(groupno, mode).then(response => {
  2753. if (response.data.state == 0) {
  2754. this.$message.error(response.data.msg)``;
  2755. return false;
  2756. } else {
  2757. this.$notify({
  2758. title: "成功",
  2759. message: "医嘱已经删除",
  2760. type: "success",
  2761. duration: 2000
  2762. });
  2763. var resetTableData = this.adviceTableData;
  2764. this.adviceTableData = [];
  2765. var that = this;
  2766. for (const key in resetTableData) {
  2767. if (resetTableData[key].groupno != groupno) {
  2768. that.adviceTableData.push(resetTableData[key]);
  2769. }
  2770. }
  2771. }
  2772. });
  2773. })
  2774. .catch(() => {});
  2775. },
  2776. openDelete(index, row) {
  2777. this.$confirm("确认删除此条医嘱?", "医嘱删除", {
  2778. confirmButtonText: "确定",
  2779. cancelButtonText: "取消",
  2780. type: "warning"
  2781. })
  2782. .then(() => {
  2783. let mode;
  2784. if (row.advice_type == 1) {
  2785. mode = "1-6";
  2786. if (row.advice_doctor != this.$store.getters.xt_user.user.id) {
  2787. mode = "1-7";
  2788. }
  2789. } else if (row.advice_type == 3) {
  2790. mode = "4-1";
  2791. if (row.advice_doctor != this.$store.getters.xt_user.user.id) {
  2792. mode = "5-1";
  2793. }
  2794. }
  2795. DeleteNewDoctorAdvice(row.id, mode).then(response => {
  2796. if (response.data.state == 0) {
  2797. this.$message.error(response.data.msg);
  2798. return false;
  2799. } else {
  2800. this.$notify({
  2801. title: "成功",
  2802. message: "医嘱已经删除",
  2803. type: "success",
  2804. duration: 2000
  2805. });
  2806. this.deleteResetData(index, row);
  2807. }
  2808. });
  2809. })
  2810. .catch(() => {});
  2811. },
  2812. resetForm(formName) {
  2813. this.$refs[formName].resetFields();
  2814. },
  2815. changeTime() {
  2816. this.getList();
  2817. },
  2818. changeKey() {
  2819. this.getList();
  2820. },
  2821. openExec(index, row) {
  2822. if (row.stop_state == 1 || row.execution_state == 1) {
  2823. this.$message.error("所选医嘱已停止或执行");
  2824. return false;
  2825. }
  2826. this.execForm = {
  2827. exec_time: "",
  2828. groupno: row.groupno
  2829. };
  2830. this.execTimeDialogVisible = true;
  2831. this.currentIndex = index;
  2832. },
  2833. openCheck(index, row) {
  2834. if (row.check_state == 1) {
  2835. this.$message.error("所选医嘱已核对");
  2836. return false;
  2837. }
  2838. if (row.execution_state != 1) {
  2839. this.$message.error("所选医嘱未执行,无法核对");
  2840. return false;
  2841. }
  2842. if (
  2843. row.execution_staff > 0 &&
  2844. row.execution_staff == this.$store.getters.xt_user.user.id
  2845. ) {
  2846. this.$message.error("核对与执行不能是同一人");
  2847. return false;
  2848. }
  2849. this.$confirm("确认提交核对?", "医嘱核对", {
  2850. confirmButtonText: "确定",
  2851. cancelButtonText: "取消",
  2852. closeOnClickModal: false,
  2853. type: "warning"
  2854. })
  2855. .then(() => {
  2856. this.deleLoading = true;
  2857. let mode = "7-1";
  2858. CheckGroupAdvice(row.groupno, mode).then(response => {
  2859. if (response.data.state == 0) {
  2860. this.$message.error(response.data.msg);
  2861. return false;
  2862. } else {
  2863. this.$notify({
  2864. title: "成功",
  2865. message: "核对成功",
  2866. type: "success",
  2867. duration: 2000
  2868. });
  2869. var atlen = this.adviceTableData.length;
  2870. for (const index in this.adviceTableData) {
  2871. if (this.adviceTableData[index].groupno == row.groupno) {
  2872. this.adviceTableData[index].checker =
  2873. response.data.data.advice.checker;
  2874. this.adviceTableData[index].check_time =
  2875. response.data.data.advice.check_time;
  2876. this.adviceTableData[index].check_state = 1;
  2877. }
  2878. }
  2879. }
  2880. });
  2881. })
  2882. .catch(() => {});
  2883. },
  2884. openStop(index, row) {
  2885. if (row.stop_state == 1 || row.execution_state == 1) {
  2886. this.$message.error("所选医嘱已停止!");
  2887. return false;
  2888. }
  2889. this.temp = row;
  2890. // console.log(row);
  2891. this.stopForm = {
  2892. id: row.parent_id > 0 ? row.parent_id : row.id,
  2893. stop_time: "",
  2894. stop_reason: "",
  2895. groupno: row.groupno
  2896. };
  2897. this.currentIndex = index;
  2898. this.dialogStopFormVisible = true;
  2899. },
  2900. openNew() {
  2901. var theDate = new Date();
  2902. var year = theDate.getFullYear();
  2903. var month = theDate.getMonth() + 1;
  2904. var dat = theDate.getDate();
  2905. month = month < 10 ? "0" + month : month;
  2906. dat = dat < 10 ? "0" + dat : dat;
  2907. var adviceDate = year + "-" + month + "-" + dat;
  2908. // this.groupForm.advice_date = adviceDate;
  2909. this.groupForm = {
  2910. advice_type: "",
  2911. advice_date: adviceDate,
  2912. start_time: "",
  2913. adviceNames: [],
  2914. advice_doctor: "",
  2915. remark: "",
  2916. parent_id: 0
  2917. };
  2918. this.rowKey = 0;
  2919. this.groupFormVisible = true;
  2920. },
  2921. openConfig() {},
  2922. openEditGroupAdvice(groupno) {
  2923. console.log("groupno",groupno)
  2924. var groups = [];
  2925. this.rowKey = 0;
  2926. for(let i=0;i<this.adviceTableData.length;i++){
  2927. if(this.adviceTableData[i].advice_type == 2){
  2928. this.adviceTableData[i].advice_type = "临时"
  2929. }
  2930. }
  2931. for (const index in this.adviceTableData) {
  2932. if (groupno == this.adviceTableData[index].groupno) {
  2933. groups.push(this.adviceTableData[index]);
  2934. }
  2935. }
  2936. if (groups.length == 0) {
  2937. return false;
  2938. }
  2939. this.groupForm = {
  2940. advice_type: groups[0].advice_type,
  2941. advice_date: uParseTime(groups[0].advice_date, "{y}-{m}-{d}"),
  2942. start_time: uParseTime(groups[0].start_time, "{y}-{m}-{d} {h}:{i}"),
  2943. adviceNames: [],
  2944. advice_doctor: groups[0].user_name,
  2945. doctor: groups[0].advice_doctor,
  2946. remark: groups[0].remark,
  2947. groupno: groupno,
  2948. };
  2949. console.log("到了",groups[0]);
  2950. var childMap = {};
  2951. for (const index in groups) {
  2952. if (groups[index].parent_id == 0) {
  2953. continue;
  2954. }
  2955. if (groups[index].parent_id in childMap === false) {
  2956. childMap[groups[index].parent_id] = [];
  2957. }
  2958. childMap[groups[index].parent_id].push(groups[index]);
  2959. }
  2960. for (const index in groups) {
  2961. if (groups[index].parent_id > 0) {
  2962. continue;
  2963. }
  2964. this.rowKey++;
  2965. var item = {
  2966. advice_name: groups[index].advice_name,
  2967. advice_desc: groups[index].advice_desc,
  2968. single_dose: "" + groups[index].single_dose,
  2969. single_dose_unit: groups[index].single_dose_unit,
  2970. drug_spec: "" + groups[index].drug_spec,
  2971. drug_spec_unit: groups[index].drug_spec_unit,
  2972. prescribing_number: "" + groups[index].prescribing_number,
  2973. prescribing_number_unit: groups[index].prescribing_number_unit,
  2974. delivery_way: groups[index].delivery_way,
  2975. execution_frequency: groups[index].execution_frequency,
  2976. frequency_type: groups[index].frequency_type,
  2977. day_count: groups[index].day_count,
  2978. week_day: groups[index].week_day,
  2979. drug_id:groups[index].drug_id,
  2980. drug_name_id:groups[index].drug_name_id,
  2981. wary:groups[index].way,
  2982. isEdit: 0,
  2983. index: 0,
  2984. id: groups[index].id,
  2985. children: [],
  2986. parent_row: 0,
  2987. row_key: this.rowKey,
  2988. table: [],
  2989. push_start_time:uParseTime(groups[index].push_start_time, "{y}-{m}-{d}")
  2990. };
  2991. if (item.id in childMap) {
  2992. for (const key in childMap[item.id]) {
  2993. this.rowKey++;
  2994. var child = {
  2995. advice_name: childMap[item.id][key].advice_name,
  2996. advice_desc: childMap[item.id][key].advice_desc,
  2997. single_dose: "" + childMap[item.id][key].single_dose,
  2998. single_dose_unit: childMap[item.id][key].single_dose_unit,
  2999. drug_spec: "" + childMap[item.id][key].drug_spec,
  3000. drug_spec_unit: childMap[item.id][key].drug_spec_unit,
  3001. prescribing_number:
  3002. "" + childMap[item.id][key].prescribing_number,
  3003. prescribing_number_unit:
  3004. childMap[item.id][key].prescribing_number_unit,
  3005. delivery_way: childMap[item.id][key].delivery_way,
  3006. execution_frequency: childMap[item.id][key].execution_frequency,
  3007. drug_id:childMap[item.id][key].drug_id,
  3008. way:childMap[item.id][key].way,
  3009. drug_name_id:childMap[item.id][key].drug_name_id,
  3010. isEdit: 0,
  3011. index: 0,
  3012. id: childMap[item.id][key].id,
  3013. children: [],
  3014. parent_row: item.row_key,
  3015. row_key: this.rowKey,
  3016. push_start_time:uParseTime(childMap[item.id][key].push_start_time, "{y}-{m}-{d}")
  3017. };
  3018. item.children.push(child);
  3019. }
  3020. this.$set(item, "children", item.children);
  3021. }
  3022. this.groupForm.adviceNames.push(item);
  3023. }
  3024. // console.log(this.groupForm);
  3025. this.$refs.editGroupForm.open();
  3026. },
  3027. openEdit(index, row) {
  3028. this.currentIndex = index;
  3029. (this.dialogTitle = "修改医嘱"), (this.isEdit = true);
  3030. if (row.stop_state == 1 || row.execution_state == 1) {
  3031. this.$message.error("所选医嘱已停止,不能修改!");
  3032. return false;
  3033. }
  3034. // if (row.advice_doctor != this.aminuserid) {
  3035. // this.$message.error("不能修改非本人添加的医嘱!");
  3036. // return false;
  3037. // }
  3038. // console.log(row);
  3039. this.setAdviceForm(row);
  3040. this.dialogFormVisible = true;
  3041. },
  3042. openNewChild(index, row) {
  3043. this.currentIndex = index;
  3044. this.dialogTitle = "新增子药";
  3045. this.isEdit = false;
  3046. if (row.stop_state == 1 || row.execution_state == 1) {
  3047. this.$message.error("所选医嘱已停止");
  3048. return false;
  3049. }
  3050. this.adviceForm = {
  3051. advice_type: row.advice_type,
  3052. advice_date: uParseTime(row.advice_date, "{y}-{m}-{d}"),
  3053. start_time: uParseTime(row.start_time, "{y}-{m}-{d} {h}:{i}"),
  3054. advice_name: "",
  3055. advice_desc: "",
  3056. single_dose: "",
  3057. single_dose_unit: "",
  3058. drug_spec: "",
  3059. drug_spec_unit: "",
  3060. prescribing_number: "",
  3061. prescribing_number_unit: "",
  3062. delivery_way: row.delivery_way,
  3063. execution_frequency: row.execution_frequency,
  3064. advice_doctor: row.advice_doctor,
  3065. remark: "",
  3066. parent_id: row.parent_id > 0 ? row.parent_id : row.id,
  3067. drug_id:"",
  3068. push_start_time:"",
  3069. };
  3070. this.dialogFormVisible = true;
  3071. },
  3072. changeAdviceName(key) {
  3073. if (key in this.adviceTemplateMaps) {
  3074. this.adviceForm.advice_name = this.adviceTemplateMaps[key].advice_name;
  3075. this.adviceForm.advice_desc = this.adviceTemplateMaps[key].advice_desc;
  3076. this.adviceForm.single_dose_unit = this.adviceTemplateMaps[
  3077. key
  3078. ].single_dose_unit;
  3079. this.adviceForm.single_dose =
  3080. this.adviceTemplateMaps[key].single_dose + "";
  3081. this.adviceForm.prescribing_number_unit = this.adviceTemplateMaps[
  3082. key
  3083. ].prescribing_number_unit;
  3084. this.adviceForm.prescribing_number =
  3085. this.adviceTemplateMaps[key].prescribing_number + "";
  3086. this.adviceForm.delivery_way = this.adviceTemplateMaps[
  3087. key
  3088. ].delivery_way;
  3089. this.adviceForm.execution_frequency = this.adviceTemplateMaps[
  3090. key
  3091. ].execution_frequency;
  3092. }
  3093. },
  3094. indexMethod(index) {
  3095. if (index === 0) {
  3096. rowIndex = 1;
  3097. }
  3098. var row = this.adviceTableData[index];
  3099. if (row.parent_id > 0) {
  3100. return "";
  3101. } else if (
  3102. index > 0 &&
  3103. row.groupno > 0 &&
  3104. row.groupno == this.adviceTableData[index - 1].groupno
  3105. ) {
  3106. return "";
  3107. }
  3108. return rowIndex++;
  3109. },
  3110. isShowStartTime(index, row) {
  3111. if (row.parent_id > 0) {
  3112. return false;
  3113. } else if (
  3114. index > 0 &&
  3115. row.groupno > 0 &&
  3116. row.groupno == this.adviceTableData[index - 1].groupno
  3117. ) {
  3118. return false;
  3119. }
  3120. return true;
  3121. },
  3122. isShowCQStartTime(index, row) {
  3123. if (row.parent_id > 0) {
  3124. return false;
  3125. } else if (
  3126. index > 0 &&
  3127. row.groupno > 0 &&
  3128. row.groupno == this.cqtableData[index - 1].groupno
  3129. ) {
  3130. return false;
  3131. }
  3132. return true;
  3133. },
  3134. isShowLSStartTime(index, row) {
  3135. if (row.parent_id > 0) {
  3136. return false;
  3137. } else if (
  3138. index > 0 &&
  3139. row.groupno > 0 &&
  3140. row.groupno == this.lstableData[index - 1].groupno
  3141. ) {
  3142. return false;
  3143. }
  3144. return true;
  3145. },
  3146. selectAdviceType(type) {
  3147. this.adviceType = type;
  3148. this.listQuery.advice_type = type;
  3149. this.getList();
  3150. },
  3151. selectStopType(type) {
  3152. this.stopType = type;
  3153. this.listQuery.stop_state = type;
  3154. this.getList();
  3155. },
  3156. deleteResetData(index, row) {
  3157. if (row.parent_id > 0) {
  3158. this.adviceTableData.splice(index, 1);
  3159. } else {
  3160. var resetTableData = this.adviceTableData;
  3161. this.adviceTableData = [];
  3162. var that = this;
  3163. resetTableData.forEach(function(item, itemindex) {
  3164. if (item.id != row.id && item.parent_id != row.id) {
  3165. that.adviceTableData.push(item);
  3166. }
  3167. });
  3168. }
  3169. },
  3170. stopResetData(id) {
  3171. var resetTableData = this.adviceTableData;
  3172. this.adviceTableData = [];
  3173. var that = this;
  3174. resetTableData.forEach(function(item, index) {
  3175. if (item.id != id && item.parent_id != id) {
  3176. that.adviceTableData.push(item);
  3177. }
  3178. });
  3179. },
  3180. fetchAllDoctorAndNurse() {
  3181. fetchAllDoctorAndNurse().then(response => {
  3182. if (response.data.state == 1) {
  3183. this.doctorOptions = response.data.data.doctors;
  3184. }
  3185. });
  3186. },
  3187. fetchAllAdminUsers() {
  3188. fetchAllAdminUsers().then(response => {
  3189. if (response.data.state == 1) {
  3190. this.adminUserOptions = response.data.data.users;
  3191. var alen = this.adminUserOptions.length;
  3192. for (let index = 0; index < alen; index++) {
  3193. if (this.adminUserOptions[index].user_type == 2) {
  3194. this.doctorOptions.push(this.adminUserOptions[index]);
  3195. }
  3196. }
  3197. }
  3198. });
  3199. },
  3200. getAdviceConfig(type) {
  3201. getAdviceConfig(type).then(response => {
  3202. if (response.data.state == 1) {
  3203. this.deliveryWayOptions =
  3204. response.data.data.drugways === null
  3205. ? []
  3206. : response.data.data.drugways;
  3207. this.executionFrequencyOptions =
  3208. response.data.data.efs === null ? [] : response.data.data.efs;
  3209. this.adviceTemplates =
  3210. response.data.data.advice_templates === null
  3211. ? []
  3212. : response.data.data.advice_templates;
  3213. var templateLen = this.adviceTemplates.length;
  3214. for (let index = 0; index < templateLen; index++) {
  3215. if (!this.adviceTemplates[index].DoctorAdviceTemplate) {
  3216. continue;
  3217. }
  3218. var DoctorAdviceTemplate = this.adviceTemplates[index]
  3219. .DoctorAdviceTemplate;
  3220. for (let i = 0; i < DoctorAdviceTemplate.length; i++) {
  3221. DoctorAdviceTemplate[i].selection = false;
  3222. }
  3223. var item = this.adviceTemplates[index];
  3224. item.DoctorAdviceTemplate = [];
  3225. var datMap = {};
  3226. for (const key in DoctorAdviceTemplate) {
  3227. if (DoctorAdviceTemplate[key].parent_id == 0) {
  3228. datMap[DoctorAdviceTemplate[key].id] =
  3229. DoctorAdviceTemplate[key];
  3230. }
  3231. }
  3232. for (const key in DoctorAdviceTemplate) {
  3233. if (DoctorAdviceTemplate[key].parent_id in datMap) {
  3234. if ("children" in datMap[DoctorAdviceTemplate[key].parent_id]) {
  3235. datMap[DoctorAdviceTemplate[key].parent_id].children.push(
  3236. DoctorAdviceTemplate[key]
  3237. );
  3238. } else {
  3239. datMap[DoctorAdviceTemplate[key].parent_id].children = [];
  3240. datMap[DoctorAdviceTemplate[key].parent_id].children.push(
  3241. DoctorAdviceTemplate[key]
  3242. );
  3243. }
  3244. }
  3245. }
  3246. for (const key in datMap) {
  3247. item.DoctorAdviceTemplate.push(datMap[key]);
  3248. }
  3249. this.$set(
  3250. this.adviceTemplateMaps,
  3251. this.adviceTemplates[index].id,
  3252. item
  3253. );
  3254. }
  3255. }
  3256. });
  3257. },
  3258. getDoctorName(doctorid) {
  3259. if (doctorid <= 0) {
  3260. return "";
  3261. }
  3262. var name = "";
  3263. if (
  3264. this.doctorOptions == null ||
  3265. typeof this.doctorOptions.length === "undefined"
  3266. ) {
  3267. return name;
  3268. }
  3269. var leng = this.doctorOptions.length;
  3270. if (leng == 0) {
  3271. return name;
  3272. }
  3273. for (let index = 0; index < leng; index++) {
  3274. if (this.doctorOptions[index].id == doctorid) {
  3275. name = this.doctorOptions[index].name;
  3276. break;
  3277. }
  3278. }
  3279. return name;
  3280. },
  3281. getXuserName(id) {
  3282. if (id <= 0) {
  3283. return "";
  3284. }
  3285. var name = "";
  3286. if (
  3287. this.adminUserOptions == null ||
  3288. typeof this.adminUserOptions.length === "undefined"
  3289. ) {
  3290. return name;
  3291. }
  3292. var leng = this.adminUserOptions.length;
  3293. if (leng == 0) {
  3294. return name;
  3295. }
  3296. for (let index = 0; index < leng; index++) {
  3297. if (this.adminUserOptions[index].id == id) {
  3298. name = this.adminUserOptions[index].name;
  3299. break;
  3300. }
  3301. }
  3302. return name;
  3303. },
  3304. setAdviceForm(row) {
  3305. this.adviceForm = {
  3306. advice_type: row.advice_type,
  3307. advice_date: uParseTime(row.advice_date, "{y}-{m}-{d}"),
  3308. start_time: uParseTime(row.start_time, "{y}-{m}-{d} {h}:{i}"),
  3309. advice_name: row.advice_name,
  3310. advice_desc: row.advice_desc,
  3311. drug_spec: row.drug_spec != 0 ? row.drug_spec : "",
  3312. drug_spec_unit: row.drug_spec_unit,
  3313. single_dose: row.single_dose != 0 ? row.single_dose : "",
  3314. single_dose_unit: row.single_dose_unit,
  3315. prescribing_number:
  3316. row.prescribing_number != 0 ? row.prescribing_number : "",
  3317. prescribing_number_unit: row.prescribing_number_unit,
  3318. delivery_way: row.delivery_way,
  3319. execution_frequency: row.execution_frequency,
  3320. advice_doctor: row.advice_doctor,
  3321. remark: row.remark,
  3322. id: row.id,
  3323. parent_id: row.parent_id,
  3324. push_start_time:uParseTime(row.push_start_time, "{y}-{m}-{d}"),
  3325. };
  3326. },
  3327. getList() {
  3328. getDoctorAdviceList(this.listQuery).then(response => {
  3329. if (response.data.state == 1) {
  3330. this.adviceTableData = response.data.data.advices;
  3331. console.log("数据是什么", this.adviceTableData);
  3332. var advice = response.data.data.advices;
  3333. var one = response.data.data.advicetwo;
  3334. let dataInfo = {};
  3335. one.forEach((item, index) => {
  3336. let { start_time } = item;
  3337. if (!dataInfo[start_time]) {
  3338. dataInfo[start_time] = {
  3339. start_time,
  3340. child: []
  3341. };
  3342. }
  3343. });
  3344. let list = Object.values(dataInfo);
  3345. list.map(item => {
  3346. for (let i = 0; i < advice.length; i++) {
  3347. if (
  3348. item.start_time === advice[i].start_time &&
  3349. advice[i].parent_id === 0
  3350. ) {
  3351. item.child.push(advice[i]);
  3352. }
  3353. }
  3354. });
  3355. let objarr = [];
  3356. for (let i = 0; i < advice.length; i++) {
  3357. if (advice[i].parent_id != 0) {
  3358. objarr.push(advice[i]);
  3359. }
  3360. }
  3361. this.childList = objarr;
  3362. let arr = this.doctorAdvice;
  3363. arr.push(...list.reverse());
  3364. // console.log("arr", arr);
  3365. this.doctorAdvice = arr;
  3366. var total = response.data.data.total;
  3367. // console.log("total", total);
  3368. this.total = total;
  3369. this.operators = response.data.data.operators;
  3370. if (this.operators.length > 0) {
  3371. var operatorsLen = this.operators.length;
  3372. for (var index = 0; index < operatorsLen; index++) {
  3373. this.$set(
  3374. this.operatorMaps,
  3375. this.operators[index].creator,
  3376. this.operators[index]
  3377. );
  3378. }
  3379. }
  3380. } else {
  3381. this.adviceTableData = [];
  3382. }
  3383. this.handleSpanTempArr();
  3384. });
  3385. },
  3386. groupClassName({ row, rowIndex }) {
  3387. row.index = rowIndex;
  3388. // row.row_key = rowIndex+1;
  3389. },
  3390. getRowKey(row) {
  3391. return row.row_key;
  3392. },
  3393. getMaxRowKey() {
  3394. return this.rowKey;
  3395. },
  3396. selectGroupAdvice(row) {
  3397. this.groupSelectRow = row;
  3398. },
  3399. selectAdvice(selection, row) {
  3400. console.log("row322232322323",this.adviceType)
  3401. if (this.adviceType != 3) {
  3402. this.lstableData = [];
  3403. } else if (this.adviceType != 1) {
  3404. this.cqtableData = [];
  3405. }
  3406. this.$refs.multipleTable.toggleRowSelection(row);
  3407. var dlen = this.adviceTableData.length;
  3408. if (row.parent_id > 0) {
  3409. for (let index = 0; index < dlen; index++) {
  3410. if (
  3411. this.adviceTableData[index].id == row.parent_id ||
  3412. this.adviceTableData[index].parent_id == row.parent_id
  3413. ) {
  3414. this.$refs.multipleTable.toggleRowSelection(
  3415. this.adviceTableData[index]
  3416. );
  3417. }
  3418. }
  3419. } else {
  3420. for (let index = 0; index < dlen; index++) {
  3421. if (
  3422. this.adviceTableData[index].parent_id == row.id ||
  3423. this.adviceTableData[index].id == row.id ||
  3424. this.adviceTableData[index].groupno == row.groupno
  3425. ) {
  3426. this.$refs.multipleTable.toggleRowSelection(
  3427. this.adviceTableData[index]
  3428. );
  3429. }
  3430. }
  3431. }
  3432. },
  3433. changeAdvice(selection) {
  3434. this.multipleSelection = selection;
  3435. },
  3436. handleClick(val) {
  3437. // console.log("val", val);
  3438. },
  3439. printThisInfo() {
  3440. console.log("hh233233",this.adviceType)
  3441. if (this.adviceType == 1) {
  3442. if (this.cqtableData.length == 0) {
  3443. this.$message.error("请勾选需要打印的医嘱!");
  3444. return false;
  3445. }
  3446. const style =
  3447. "@media print {.printForm{width:960px} .printForm .hospital_title{font-size:20px;font-weight:400;text-align:center;letter-spacing:5px}.printForm .title{font-size:30px;font-weight:500;text-align:center}.printForm .title{font-size:30px;font-weight:500;text-align:center}.printForm .info ul{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-justify-content:space-around;-moz-justify-content:space-around;-ms-justify-content:space-around;-o-justify-content:space-around;justify-content:space-around}.printForm .info ul li{display:flex;box-sizing:border-box;justify-content:space-around}.printForm .info ul li .InputBox{padding:0;border:0;border-bottom:1px #e5e5e5 solid;outline:0;width: 80px;}.printForm .printTable tr{padding:2px}.printForm .printTable tr>th{padding:6px 4px}.printForm .printTable tr>td{padding:6px 4px} .es-img {height: 25px;}";
  3448. setTimeout(() => {
  3449. printJS({
  3450. printable: "printCQadvice",
  3451. type: "html",
  3452. style: style,
  3453. scanStyles: false
  3454. });
  3455. }, 1);
  3456. } else if (this.adviceType == 3 || this.adviceType == 2 || this.adviceType == 4) {
  3457. console.log("lstableData",this.lstableData)
  3458. if (this.lstableData.length == 0) {
  3459. this.$message.error("请勾选需要打印的医嘱!");
  3460. return false;
  3461. }
  3462. const style =
  3463. "@media print {.printForm{width:960px} .printForm .hospital_title{font-size:20px;font-weight:400;text-align:center;letter-spacing:5px}.printForm .title{font-size:30px;font-weight:500;text-align:center}.printForm .title{font-size:30px;font-weight:500;text-align:center}.printForm .info ul{display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;align-items:center;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;-o-box-sizing:border-box;-ms-box-sizing:border-box;box-sizing:border-box;-webkit-justify-content:space-around;-moz-justify-content:space-around;-ms-justify-content:space-around;-o-justify-content:space-around;justify-content:space-around}.printForm .info ul li{display:flex;box-sizing:border-box;justify-content:space-around}.printForm .info ul li .InputBox{padding:0;border:0;border-bottom:1px #e5e5e5 solid;outline:0;width: 80px;}.printForm .printTable tr{padding:2px}.printForm .printTable tr>th{padding:6px 4px}.printForm .printTable tr>td{padding:6px 4px} .es-img {height: 25px;}";
  3464. setTimeout(() => {
  3465. printJS({
  3466. printable: "printLSadvice",
  3467. type: "html",
  3468. style: style,
  3469. scanStyles: false
  3470. });
  3471. }, 1);
  3472. } else {
  3473. this.$message.error(
  3474. "请先将医嘱类型切换到长期或临时,勾选需要打印的医嘱!"
  3475. );
  3476. return false;
  3477. }
  3478. },
  3479. cellClassName({ row, column, rowIndex, columnIndex }) {
  3480. return "ls-table-row";
  3481. },
  3482. tranAge(birthday) {
  3483. var birth = uParseTime(birthday, "{y}-{m}-{d}");
  3484. return jsGetAge(birth, "-");
  3485. },
  3486. changeTemplateAdvice(selection) {
  3487. this.selectedTemplate = selection;
  3488. },
  3489. selectAllTemplateAdvice(selection) {
  3490. var adviceArray = this.adviceTemplateMaps[this.selectedTemp.id]
  3491. .DoctorAdviceTemplate;
  3492. for (let y = 0; y < adviceArray.length; y++) {
  3493. adviceArray[y].selection = false;
  3494. }
  3495. if (selection.length > 0) {
  3496. for (let y = 0; y < adviceArray.length; y++) {
  3497. for (let i = 0; i < selection.length; i++) {
  3498. if (adviceArray[y].id == selection[i].advice_id) {
  3499. adviceArray[y].selection = true;
  3500. }
  3501. }
  3502. }
  3503. }
  3504. },
  3505. selectTemplateAdvice(selection, row) {
  3506. var adviceArray = this.adviceTemplateMaps[this.selectedTemp.id]
  3507. .DoctorAdviceTemplate;
  3508. for (let y = 0; y < adviceArray.length; y++) {
  3509. adviceArray[y].selection = false;
  3510. }
  3511. if (selection.length > 0) {
  3512. for (let y = 0; y < adviceArray.length; y++) {
  3513. for (let i = 0; i < selection.length; i++) {
  3514. if (adviceArray[y].id == selection[i].advice_id) {
  3515. adviceArray[y].selection = true;
  3516. }
  3517. }
  3518. }
  3519. }
  3520. if (row.children.length > 0) {
  3521. for (const index in row.children) {
  3522. this.$refs.selecttemplatetable.toggleRowSelection(
  3523. row.children[index]
  3524. );
  3525. }
  3526. }
  3527. // 下面两步的作用是为了上选中的数据的输出顺序不变
  3528. for (const index in this.selectedTemp.list) {
  3529. this.$refs.selecttemplatetable.toggleRowSelection(
  3530. this.selectedTemp.list[index]
  3531. );
  3532. if (this.selectedTemp.list[index].children.length > 0) {
  3533. for (const j in this.selectedTemp.list[index].children) {
  3534. this.$refs.selecttemplatetable.toggleRowSelection(
  3535. this.selectedTemp.list[index].children[j]
  3536. );
  3537. }
  3538. }
  3539. }
  3540. for (const index in this.selectedTemp.list) {
  3541. this.$refs.selecttemplatetable.toggleRowSelection(
  3542. this.selectedTemp.list[index]
  3543. );
  3544. if (this.selectedTemp.list[index].children.length > 0) {
  3545. for (const j in this.selectedTemp.list[index].children) {
  3546. this.$refs.selecttemplatetable.toggleRowSelection(
  3547. this.selectedTemp.list[index].children[j]
  3548. );
  3549. }
  3550. }
  3551. }
  3552. // console.log(this.selectedTemp.list);
  3553. },
  3554. spanselecttable({ row, column, rowIndex, columnIndex }) {
  3555. if (columnIndex == 0) {
  3556. const _row = this.selectedTemp.rows[rowIndex];
  3557. const _col = _row > 0 ? 1 : 0;
  3558. return {
  3559. rowspan: _row,
  3560. colspan: _col
  3561. };
  3562. }
  3563. },
  3564. calcselectedTemp() {
  3565. var rowKeys = 0;
  3566. for (const index in this.selectedTemp.list) {
  3567. var pkey = rowKeys;
  3568. this.selectedTemp.rows[rowKeys] = 1;
  3569. if (this.selectedTemp.list[index].children.length > 0) {
  3570. for (const childindex in this.selectedTemp.list[index].children) {
  3571. rowKeys++;
  3572. this.selectedTemp.rows[pkey] += 1;
  3573. this.selectedTemp.rows[rowKeys] = 0;
  3574. }
  3575. }
  3576. rowKeys++;
  3577. this.$nextTick(function() {
  3578. if (this.selectedTemp.list[index].selection) {
  3579. this.$refs.selecttemplatetable.toggleRowSelection(
  3580. this.selectedTemp.list[index]
  3581. );
  3582. }
  3583. });
  3584. }
  3585. },
  3586. templateTableChange(currentRow, oldCurrentRow) {
  3587. this.selectedTemp = { id: 0, name: "", org_id: 0, list: [], rows: [] };
  3588. if (currentRow == null) {
  3589. return false;
  3590. }
  3591. this.selectedTemp.id = currentRow.id;
  3592. this.selectedTemp.name = currentRow.name;
  3593. this.selectedTemp.org_id = currentRow.org_id;
  3594. if (this.selectedTemp.id in this.adviceTemplateMaps) {
  3595. var mapid = this.selectedTemp.id;
  3596. var thisRowKey = 0;
  3597. for (const index in this.adviceTemplateMaps[mapid]
  3598. .DoctorAdviceTemplate) {
  3599. thisRowKey++;
  3600. var item = {
  3601. advice_name: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  3602. index
  3603. ].advice_name,
  3604. advice_desc: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  3605. index
  3606. ].advice_desc,
  3607. single_dose:
  3608. "" +
  3609. this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3610. .single_dose,
  3611. single_dose_unit: this.adviceTemplateMaps[mapid]
  3612. .DoctorAdviceTemplate[index].single_dose_unit,
  3613. drug_spec:
  3614. "" +
  3615. this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3616. .drug_spec,
  3617. drug_spec_unit: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  3618. index
  3619. ].drug_spec_unit,
  3620. prescribing_number:
  3621. "" +
  3622. this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3623. .prescribing_number,
  3624. prescribing_number_unit: this.adviceTemplateMaps[mapid]
  3625. .DoctorAdviceTemplate[index].prescribing_number_unit,
  3626. delivery_way: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  3627. index
  3628. ].delivery_way,
  3629. execution_frequency: this.adviceTemplateMaps[mapid]
  3630. .DoctorAdviceTemplate[index].execution_frequency,
  3631. advice_id: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  3632. index
  3633. ].id,
  3634. selection: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  3635. index
  3636. ].selection,
  3637. day_count: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  3638. index
  3639. ].day_count,
  3640. week_days: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  3641. index
  3642. ].week_days,
  3643. frequency_type: this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  3644. index
  3645. ].frequency_type,
  3646. drug_id:this.adviceTemplateMaps[mapid].drug_id,
  3647. way:this.adviceTemplateMaps[mapid].way,
  3648. drug_name_id:this.adviceTemplateMaps[mapid].way,
  3649. isEdit: 0,
  3650. id: 0,
  3651. children: [],
  3652. parent_row: 0,
  3653. row_key: thisRowKey
  3654. };
  3655. if (
  3656. "children" in
  3657. this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index] &&
  3658. this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index].children
  3659. .length > 0
  3660. ) {
  3661. var parentRow = thisRowKey;
  3662. var children = this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[
  3663. index
  3664. ].children;
  3665. for (const key in children) {
  3666. thisRowKey++;
  3667. var child = {
  3668. advice_id: children[key].id,
  3669. advice_name: children[key].advice_name,
  3670. advice_desc: children[key].advice_desc,
  3671. single_dose: "" + children[key].single_dose,
  3672. single_dose_unit: children[key].single_dose_unit,
  3673. drug_spec: "" + children[key].drug_spec,
  3674. drug_spec_unit: children[key].drug_spec_unit,
  3675. prescribing_number: "" + children[key].prescribing_number,
  3676. prescribing_number_unit: children[key].prescribing_number_unit,
  3677. delivery_way: children[key].delivery_way,
  3678. execution_frequency: children[key].execution_frequency,
  3679. drug_id:children[key].drug_id,
  3680. way:children[key].way,
  3681. drug_name_id:children[key].drug_name_id,
  3682. isEdit: 0,
  3683. id: 0,
  3684. children: [],
  3685. parent_row: parentRow,
  3686. row_key: thisRowKey
  3687. };
  3688. item.children.push(child);
  3689. }
  3690. this.$set(item, "children", item.children);
  3691. }
  3692. this.selectedTemp.list.unshift(item);
  3693. }
  3694. }
  3695. },
  3696. newAddTempForm() {
  3697. this.allSelectedTemplate = [];
  3698. var thisRowKey = 0;
  3699. for (const indexs in this.adviceTemplateMaps) {
  3700. const adviceTemplate = this.adviceTemplateMaps[indexs];
  3701. for (const index in adviceTemplate.DoctorAdviceTemplate) {
  3702. if (adviceTemplate.DoctorAdviceTemplate[index].selection) {
  3703. thisRowKey++;
  3704. // console.log(adviceTemplate.DoctorAdviceTemplate[index].id);
  3705. var item = {
  3706. advice_name:
  3707. adviceTemplate.DoctorAdviceTemplate[index].advice_name,
  3708. advice_desc:
  3709. adviceTemplate.DoctorAdviceTemplate[index].advice_desc,
  3710. single_dose:
  3711. "" + adviceTemplate.DoctorAdviceTemplate[index].single_dose,
  3712. single_dose_unit:
  3713. adviceTemplate.DoctorAdviceTemplate[index].single_dose_unit,
  3714. drug_spec:
  3715. "" + adviceTemplate.DoctorAdviceTemplate[index].drug_spec,
  3716. drug_spec_unit:
  3717. adviceTemplate.DoctorAdviceTemplate[index].drug_spec_unit,
  3718. prescribing_number:
  3719. "" +
  3720. adviceTemplate.DoctorAdviceTemplate[index].prescribing_number,
  3721. prescribing_number_unit:
  3722. adviceTemplate.DoctorAdviceTemplate[index]
  3723. .prescribing_number_unit,
  3724. delivery_way:
  3725. adviceTemplate.DoctorAdviceTemplate[index].delivery_way,
  3726. execution_frequency:
  3727. adviceTemplate.DoctorAdviceTemplate[index].execution_frequency,
  3728. advice_id: adviceTemplate.DoctorAdviceTemplate[index].id,
  3729. selection: adviceTemplate.DoctorAdviceTemplate[index].selection,
  3730. day_count: adviceTemplate.DoctorAdviceTemplate[index].day_count,
  3731. frequency_type:
  3732. adviceTemplate.DoctorAdviceTemplate[index].frequency_type,
  3733. week_days: adviceTemplate.DoctorAdviceTemplate[index].week_days,
  3734. template_id: "T" + adviceTemplate.DoctorAdviceTemplate[index].id,
  3735. drug_id: adviceTemplate.DoctorAdviceTemplate[index].drug_id,
  3736. way:adviceTemplate.DoctorAdviceTemplate[index].way,
  3737. drug_name_id:adviceTemplate.DoctorAdviceTemplate[index].drug_name_id,
  3738. isEdit: 0,
  3739. id: 0,
  3740. children: [],
  3741. parent_row: 0,
  3742. row_key: thisRowKey
  3743. };
  3744. console.log("item22222222",item)
  3745. if (
  3746. "children" in adviceTemplate.DoctorAdviceTemplate[index] &&
  3747. adviceTemplate.DoctorAdviceTemplate[index].children.length > 0
  3748. ) {
  3749. var parentRow = thisRowKey;
  3750. var children =
  3751. adviceTemplate.DoctorAdviceTemplate[index].children;
  3752. for (const key in children) {
  3753. thisRowKey++;
  3754. var child = {
  3755. advice_id: children[key].id,
  3756. template_id: "T" + children[key].id,
  3757. advice_name: children[key].advice_name,
  3758. advice_desc: children[key].advice_desc,
  3759. single_dose: "" + children[key].single_dose,
  3760. single_dose_unit: children[key].single_dose_unit,
  3761. drug_spec: "" + children[key].drug_spec,
  3762. drug_spec_unit: children[key].drug_spec_unit,
  3763. prescribing_number: "" + children[key].prescribing_number,
  3764. prescribing_number_unit:
  3765. children[key].prescribing_number_unit,
  3766. delivery_way: children[key].delivery_way,
  3767. execution_frequency: children[key].execution_frequency,
  3768. drug_id:children[key].drug_id,
  3769. way:children[key].way,
  3770. drug_name_id:children[key].drug_name_id,
  3771. isEdit: 0,
  3772. id: 0,
  3773. children: [],
  3774. parent_row: parentRow,
  3775. row_key: thisRowKey
  3776. };
  3777. console.log("child",child)
  3778. item.children.push(child);
  3779. this.allSelectedTemplate.unshift(child);
  3780. }
  3781. this.$set(item, "children", item.children);
  3782. }
  3783. this.allSelectedTemplate.unshift(item);
  3784. adviceTemplate.DoctorAdviceTemplate[index].selection = false;
  3785. }
  3786. }
  3787. }
  3788. var childMap = {};
  3789. for (const index in this.allSelectedTemplate) {
  3790. if (this.allSelectedTemplate[index].parent_row > 0) {
  3791. if (!(this.allSelectedTemplate[index].parent_row in childMap)) {
  3792. childMap[this.allSelectedTemplate[index].parent_row] = [];
  3793. }
  3794. childMap[this.allSelectedTemplate[index].parent_row].push(
  3795. this.allSelectedTemplate[index]
  3796. );
  3797. }
  3798. }
  3799. for (const index in this.allSelectedTemplate) {
  3800. if (this.allSelectedTemplate[index].parent_row > 0) {
  3801. continue;
  3802. }
  3803. this.rowKey++;
  3804. // console.log(this.allSelectedTemplate[index]);
  3805. var item = {
  3806. template_id: this.allSelectedTemplate[index].template_id,
  3807. advice_name: this.allSelectedTemplate[index].advice_name,
  3808. advice_desc: this.allSelectedTemplate[index].advice_desc,
  3809. single_dose: "" + this.allSelectedTemplate[index].single_dose,
  3810. single_dose_unit: this.allSelectedTemplate[index].single_dose_unit,
  3811. drug_spec: "" + this.allSelectedTemplate[index].drug_spec,
  3812. drug_spec_unit: this.allSelectedTemplate[index].drug_spec_unit,
  3813. prescribing_number:
  3814. "" + this.allSelectedTemplate[index].prescribing_number,
  3815. prescribing_number_unit: this.allSelectedTemplate[index]
  3816. .prescribing_number_unit,
  3817. delivery_way: this.allSelectedTemplate[index].delivery_way,
  3818. execution_frequency: this.allSelectedTemplate[index]
  3819. .execution_frequency,
  3820. day_count: this.allSelectedTemplate[index].day_count,
  3821. frequency_type: this.allSelectedTemplate[index].frequency_type,
  3822. week_days: this.allSelectedTemplate[index].week_days,
  3823. drug_id:this.allSelectedTemplate[index].drug_id,
  3824. way:this.allSelectedTemplate[index].way,
  3825. drug_name_id:this.allSelectedTemplate[index].drug_name_id,
  3826. isEdit: 0,
  3827. id: 0,
  3828. children: [],
  3829. parent_row: 0,
  3830. row_key: this.rowKey
  3831. };
  3832. if (this.allSelectedTemplate[index].children.length > 0) {
  3833. if (this.allSelectedTemplate[index].row_key in childMap) {
  3834. var parentRow = this.rowKey;
  3835. var children = childMap[this.allSelectedTemplate[index].row_key];
  3836. for (const key in children) {
  3837. this.rowKey++;
  3838. var child = {
  3839. template_id: children[key].template_id,
  3840. advice_name: children[key].advice_name,
  3841. advice_desc: children[key].advice_desc,
  3842. single_dose: "" + children[key].single_dose,
  3843. single_dose_unit: children[key].single_dose_unit,
  3844. drug_spec: "" + children[key].drug_spec,
  3845. drug_spec_unit: children[key].drug_spec_unit,
  3846. prescribing_number: "" + children[key].prescribing_number,
  3847. prescribing_number_unit: children[key].prescribing_number_unit,
  3848. delivery_way: children[key].delivery_way,
  3849. execution_frequency: children[key].execution_frequency,
  3850. drug_id:children[key].drug_id,
  3851. way:children[key].way,
  3852. drug_name_id:children[key].way,
  3853. isEdit: 0,
  3854. id: 0,
  3855. children: [],
  3856. parent_row: parentRow,
  3857. row_key: this.rowKey
  3858. };
  3859. console.log("child",child)
  3860. item.children.push(child);
  3861. }
  3862. this.$set(item, "children", item.children);
  3863. }
  3864. }
  3865. this.groupForm.adviceNames.push(item);
  3866. }
  3867. // console.log(this.groupForm);
  3868. this.templateFormVisible = false;
  3869. // 清除数据源的选中记录
  3870. },
  3871. addTempForm(formName) {
  3872. var _this = this;
  3873. this.$refs[formName].validate(valid => {
  3874. if (valid) {
  3875. if (_this.templateForm.id in _this.adviceTemplateMaps) {
  3876. var mapid = _this.templateForm.id;
  3877. for (const index in _this.adviceTemplateMaps[mapid]
  3878. .DoctorAdviceTemplate) {
  3879. this.rowKey++;
  3880. var item = {
  3881. advice_name:
  3882. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3883. .advice_name,
  3884. advice_desc:
  3885. "" +
  3886. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3887. .advice_desc,
  3888. single_dose:
  3889. "" +
  3890. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3891. .single_dose,
  3892. single_dose_unit:
  3893. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3894. .single_dose_unit,
  3895. drug_spec:
  3896. "" +
  3897. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3898. .drug_spec,
  3899. drug_spec_unit:
  3900. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3901. .drug_spec_unit,
  3902. prescribing_number:
  3903. "" +
  3904. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3905. .prescribing_number,
  3906. prescribing_number_unit:
  3907. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3908. .prescribing_number_unit,
  3909. delivery_way:
  3910. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3911. .delivery_way,
  3912. execution_frequency:
  3913. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3914. .execution_frequency,
  3915. parent_id:
  3916. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3917. .parent_id,
  3918. isEdit: 0,
  3919. id: 0,
  3920. children: [],
  3921. parent_row: 0,
  3922. row_key: this.rowKey
  3923. };
  3924. if (
  3925. "children" in
  3926. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index] &&
  3927. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3928. .children
  3929. ) {
  3930. var parentRow = this.rowKey;
  3931. var children =
  3932. _this.adviceTemplateMaps[mapid].DoctorAdviceTemplate[index]
  3933. .children;
  3934. for (const key in children) {
  3935. this.rowKey++;
  3936. var child = {
  3937. advice_name: children[key].advice_name,
  3938. advice_desc: children[key].advice_desc,
  3939. single_dose: "" + children[key].single_dose,
  3940. single_dose_unit: children[key].single_dose_unit,
  3941. drug_spec: "" + children[key].drug_spec,
  3942. drug_spec_unit: children[key].drug_spec_unit,
  3943. prescribing_number: "" + children[key].prescribing_number,
  3944. prescribing_number_unit:
  3945. children[key].prescribing_number_unit,
  3946. delivery_way: children[key].delivery_way,
  3947. execution_frequency: children[key].execution_frequency,
  3948. drug_id:children[key].drug_id,
  3949. way:children[key].way,
  3950. drug_name_id:children[key].way,
  3951. isEdit: 0,
  3952. id: 0,
  3953. children: [],
  3954. parent_row: parentRow,
  3955. row_key: this.rowKey
  3956. };
  3957. item.children.push(child);
  3958. }
  3959. _this.$set(item, "children", item.children);
  3960. }
  3961. _this.groupForm.adviceNames.unshift(item);
  3962. // _this.groupForm.adviceNames.unshift(item);
  3963. _this.toggleRowExpansion();
  3964. }
  3965. }
  3966. _this.templateFormVisible = false;
  3967. }
  3968. });
  3969. },
  3970. submitNameForm(formName) {
  3971. if(this.src_type == ""){
  3972. this.nameForm.way = 0
  3973. this.nameForm.drug_id = 0
  3974. }
  3975. if(this.src_type == 2){ //自备药
  3976. var arr = this.nameForm.advice_name.split("(自备药)")
  3977. this.nameForm.advice_name = arr[0]
  3978. }
  3979. console.log("医嘱2222",this.nameForm)
  3980. var _this = this;
  3981. this.$refs[formName].validate(valid => {
  3982. if (valid) {
  3983. if (_this.nameForm.isEdit) {
  3984. var ale = _this.groupForm.adviceNames.length;
  3985. if (_this.isChild) {
  3986. for (let index = 0; index < ale; index++) {
  3987. if (
  3988. _this.groupSelectRow.parent_row ==
  3989. _this.groupForm.adviceNames[index].row_key
  3990. ) {
  3991. var cle = _this.groupForm.adviceNames[index].children.length;
  3992. var children = _this.groupForm.adviceNames[index].children;
  3993. for (let j = 0; j < ale; j++) {
  3994. if (_this.groupSelectRow.row_key == children[j].row_key) {_this.groupForm.adviceNames[index].children[j].advice_name = _this.nameForm.advice_name;
  3995. _this.groupForm.adviceNames[index].children[j].advice_desc = _this.nameForm.advice_desc;
  3996. _this.groupForm.adviceNames[index].children[j].single_dose = "" + _this.nameForm.single_dose;
  3997. _this.groupForm.adviceNames[index].children[j].single_dose_unit = _this.nameForm.single_dose_unit;
  3998. _this.groupForm.adviceNames[index].children[j].drug_spec ="" + _this.nameForm.drug_spec;
  3999. _this.groupForm.adviceNames[index].children[j].drug_spec_unit = _this.nameForm.drug_spec_unit;
  4000. _this.groupForm.adviceNames[index].children[j].prescribing_number ="" + _this.nameForm.prescribing_number;
  4001. _this.groupForm.adviceNames[index].children[j].prescribing_number_unit =_this.nameForm.prescribing_number_unit;
  4002. _this.groupForm.adviceNames[index].children[j].delivery_way = _this.nameForm.delivery_way;
  4003. _this.groupForm.adviceNames[index].children[j].execution_frequency =_this.nameForm.execution_frequency;
  4004. _this.groupForm.adviceNames[index].children[j].drug_id = _this.nameForm.drug_id;
  4005. _this.groupForm.adviceNames[index].children[j].way = _this.nameForm.way;
  4006. _this.groupForm.adviceNames[index].children[j].push_start_time = _this.nameForm.push_start_time;
  4007. _this.$set(
  4008. _this.groupForm.adviceNames[index].children,
  4009. j,
  4010. _this.groupForm.adviceNames[index].children[j]
  4011. );
  4012. _this.toggleRowExpansion();
  4013. break;
  4014. }
  4015. }
  4016. }
  4017. }
  4018. } else {
  4019. for (let index = 0; index < ale; index++) {
  4020. if (_this.groupSelectRow.row_key == _this.groupForm.adviceNames[index].row_key) {
  4021. _this.groupForm.adviceNames[index].advice_name =_this.nameForm.advice_name;
  4022. _this.groupForm.adviceNames[index].advice_desc =_this.nameForm.advice_desc;
  4023. _this.groupForm.adviceNames[index].single_dose = "" + _this.nameForm.single_dose;
  4024. _this.groupForm.adviceNames[index].single_dose_unit =_this.nameForm.single_dose_unit;
  4025. _this.groupForm.adviceNames[index].drug_spec = "" + _this.nameForm.drug_spec;
  4026. _this.groupForm.adviceNames[index].drug_spec_unit =_this.nameForm.drug_spec_unit;
  4027. _this.groupForm.adviceNames[index].prescribing_number = "" + _this.nameForm.prescribing_number;
  4028. _this.groupForm.adviceNames[index].prescribing_number_unit = _this.nameForm.prescribing_number_unit;
  4029. _this.groupForm.adviceNames[index].delivery_way = _this.nameForm.delivery_way;
  4030. _this.groupForm.adviceNames[index].execution_frequency = _this.nameForm.execution_frequency;
  4031. _this.groupForm.adviceNames[index].push_start_time = _this.nameForm.push_start_time
  4032. if (_this.nameForm.frequency_type == 1) {
  4033. _this.groupForm.adviceNames[index].frequency_type =
  4034. _this.nameForm.frequency_type;
  4035. _this.groupForm.adviceNames[index].day_count = "0";
  4036. _this.groupForm.adviceNames[index].week_days = "";
  4037. } else if (_this.nameForm.frequency_type == 2) {
  4038. _this.groupForm.adviceNames[index].frequency_type =
  4039. _this.nameForm.frequency_type;
  4040. _this.groupForm.adviceNames[index].day_count =
  4041. _this.nameForm.day_count;
  4042. _this.groupForm.adviceNames[index].week_days = "";
  4043. } else if (_this.nameForm.frequency_type == 3) {
  4044. _this.groupForm.adviceNames[index].frequency_type =
  4045. _this.nameForm.frequency_type;
  4046. _this.groupForm.adviceNames[index].drug_id = _this.nameForm.drug_id
  4047. _this.groupForm.adviceNames[index].way = _this.nameForm.way
  4048. _this.groupForm.adviceNames[index].day_count = "0";
  4049. _this.groupForm.adviceNames[index].week_days = this.weeks
  4050. .filter(function(s) {
  4051. return s && s.trim();
  4052. })
  4053. .join(",");
  4054. }
  4055. _this.$set(
  4056. _this.groupForm.adviceNames,
  4057. index,
  4058. _this.groupForm.adviceNames[index]
  4059. );
  4060. _this.toggleRowExpansion();
  4061. this.weeks = [];
  4062. break;
  4063. }
  4064. }
  4065. }
  4066. } else {
  4067. if (_this.isChild) {
  4068. _this.rowKey++;
  4069. _this.nameForm.row_key = _this.rowKey;
  4070. var ale = _this.groupForm.adviceNames.length;
  4071. for (let index = 0; index < ale; index++) {
  4072. if (
  4073. _this.nameForm.parent_row ==
  4074. _this.groupForm.adviceNames[index].row_key
  4075. ) {
  4076. _this.groupForm.adviceNames[index].children.push(
  4077. _this.nameForm
  4078. );
  4079. _this.$set(
  4080. _this.groupForm.adviceNames,
  4081. index,
  4082. _this.groupForm.adviceNames[index]
  4083. );
  4084. // _this.$refs.advicenametable.doLayout();
  4085. _this.toggleRowExpansion();
  4086. break;
  4087. }
  4088. }
  4089. } else {
  4090. _this.nameForm.template_id =
  4091. "D" + new Date().getTime() + this.getRandValue();
  4092. if (_this.nameForm.frequency_type == 1) {
  4093. _this.nameForm.frequency_type = _this.nameForm.frequency_type;
  4094. _this.nameForm.day_count = "0";
  4095. _this.nameForm.week_days = "";
  4096. } else if (this.nameForm.frequency_type == 2) {
  4097. _this.nameForm.frequency_type = _this.nameForm.frequency_type;
  4098. _this.nameForm.day_count = _this.nameForm.day_count;
  4099. _this.nameForm.week_days = "";
  4100. } else if (this.nameForm.frequency_type == 3) {
  4101. _this.nameForm.frequency_type = _this.nameForm.frequency_type;
  4102. _this.nameForm.day_count = "0";
  4103. _this.nameForm.week_days = this.weeks
  4104. .filter(function(s) {
  4105. return s && s.trim();
  4106. })
  4107. .join(",");
  4108. }
  4109. this.weeks = [];
  4110. _this.rowKey++;
  4111. _this.nameForm.row_key = _this.rowKey;
  4112. _this.groupForm.adviceNames.push(_this.nameForm);
  4113. _this.toggleRowExpansion();
  4114. }
  4115. }
  4116. _this.nameFormVisible = false;
  4117. }
  4118. });
  4119. },
  4120. setAdminUserES(id) {
  4121. if (id == 0) {
  4122. return "";
  4123. }
  4124. if (id in this.operatorMaps) {
  4125. return this.operatorMaps[id].url;
  4126. } else {
  4127. return "";
  4128. }
  4129. },
  4130. tranSex(gender) {
  4131. var sex = "未知";
  4132. switch (gender) {
  4133. case 1:
  4134. sex = "男";
  4135. break;
  4136. case 2:
  4137. sex = "女";
  4138. break;
  4139. default:
  4140. break;
  4141. }
  4142. return sex;
  4143. },
  4144. load(tree, treeNode, resolve) {},
  4145. toggleRowExpansion() {
  4146. for (const index in this.groupForm.adviceNames) {
  4147. this.$refs.advicenametable.toggleRowExpansion(
  4148. this.groupForm.adviceNames[index],
  4149. true
  4150. );
  4151. }
  4152. },
  4153. handleSpanTempArr() {
  4154. this.tempArr = [];
  4155. for (let i = 0; i < this.adviceTableData.length; i++) {
  4156. if (i === 0) {
  4157. this.tempArr.push(1);
  4158. this.pos = 0;
  4159. } else {
  4160. // 判断当前元素与上一个元素是否相同
  4161. if (
  4162. this.adviceTableData[i].groupno ===
  4163. this.adviceTableData[i - 1].groupno
  4164. ) {
  4165. this.tempArr[this.pos] += 1;
  4166. this.tempArr.push(0);
  4167. } else {
  4168. this.tempArr.push(1);
  4169. this.pos = i;
  4170. }
  4171. }
  4172. }
  4173. // let sameRowArr = [], sIdx = 0;
  4174. // this.adviceTemplates.forEach((item, index) => {
  4175. // item.index = index
  4176. // if (index === 0) {
  4177. // sameRowArr.push([index])
  4178. // } else {
  4179. // if (item.template_id === this.adviceTemplates[index - 1].template_id) {
  4180. // sameRowArr[sIdx].push(index)
  4181. // } else {
  4182. // sIdx = sIdx + 1;
  4183. // sameRowArr.push([index])
  4184. // }
  4185. // }
  4186. // })
  4187. // this.sameRowArr = sameRowArr;
  4188. },
  4189. mergeSpan({ row, column, rowIndex, columnIndex }) {
  4190. if (columnIndex === 0 || columnIndex === 1 || columnIndex === 2) {
  4191. const _row = this.tempArr[rowIndex];
  4192. const _col = _row > 0 ? 1 : 0;
  4193. return {
  4194. rowspan: _row,
  4195. colspan: _col
  4196. };
  4197. }
  4198. },
  4199. cancleDialog() {
  4200. this.templateFormVisible = false;
  4201. this.weeks = [];
  4202. for (const indexs in this.adviceTemplateMaps) {
  4203. const adviceTemplate = this.adviceTemplateMaps[indexs];
  4204. for (const index in adviceTemplate.DoctorAdviceTemplate) {
  4205. adviceTemplate.DoctorAdviceTemplate[index].selection = false;
  4206. }
  4207. }
  4208. },
  4209. changeRemind(val) {
  4210. const params = {
  4211. is_open_remind: val,
  4212. id: this.patientID
  4213. };
  4214. PostRemind(params).then(response => {
  4215. if (response.data.state == 1) {
  4216. this.is_open_remind = response.data.data.is_open_remind;
  4217. if (response.data.data.is_open_remind == 1) {
  4218. this.$message.success("开启成功");
  4219. } else {
  4220. this.$message.success("关闭成功");
  4221. }
  4222. } else {
  4223. this.$message.error(response.data.msg);
  4224. }
  4225. });
  4226. },
  4227. getPatient(params) {
  4228. fetchPatient(params.id).then(response => {
  4229. if (response.data.state == 1) {
  4230. var patietInfo = response.data.data.patient;
  4231. this.is_open_remind = patietInfo.is_open_remind;
  4232. } else {
  4233. this.$message.error(response.data.msg);
  4234. }
  4235. });
  4236. },
  4237. getRandValue() {
  4238. var charactors = "1234567890";
  4239. var value = "",
  4240. i;
  4241. for (let j = 1; j <= 4; j++) {
  4242. i = parseInt(10 * Math.random());
  4243. value = value + charactors.charAt(i);
  4244. }
  4245. return value;
  4246. },
  4247. getAllAdviceConfig: function() {
  4248. getAllAdviceConfig().then(response => {
  4249. if (response.data.state == 1) {
  4250. this.deliveryWayOptions =
  4251. response.data.data.drugways === null? []: response.data.data.drugways;
  4252. this.executionFrequencyOptions = response.data.data.efs === null ? [] : response.data.data.efs;
  4253. }
  4254. });
  4255. },
  4256. // 获取勾选中的行
  4257. getPrintInfo(ids) {
  4258. console.log("ids",ids)
  4259. console.log("23332332323232",this.adviceType,"33333333",this.stopType)
  4260. getPrintInfo({ids:ids},this.adviceType,this.stopType).then(response => {
  4261. if (response.data.state === 1) {
  4262. var doctoradvice = response.data.data.doctoradvice;
  4263. console.log("doctoradvice", doctoradvice);
  4264. this.dataAdvice = doctoradvice;
  4265. if (this.adviceType === 3 || this.adviceType === 2 || this.adviceType == 4) {
  4266. this.lstableData = this.dataAdvice;
  4267. } else if (this.adviceType === 1) {
  4268. this.cqtableData = doctoradvice;
  4269. }
  4270. }
  4271. });
  4272. },
  4273. getdata: function(data) {
  4274. data = data.sort();
  4275. for (var i = 0; i < data.length; i++) {
  4276. if (data[i] === data[i + 1]) {
  4277. data.splice(i, 1);
  4278. }
  4279. }
  4280. return data;
  4281. },
  4282. getPatientSchedules(id) {
  4283. getPatientSchedules(id).then(response => {
  4284. if (response.data.state === 1) {
  4285. var scheduls = response.data.data.scheduls;
  4286. // console.log("scheduls", scheduls);
  4287. this.schedulStatus = 1;
  4288. // console.log("sch22", this.schedulStatus);
  4289. }
  4290. if (response.data.state === 0) {
  4291. this.schedulStatus = 2;
  4292. // console.log("sch23", this.schedulStatus);
  4293. }
  4294. });
  4295. },
  4296. changeOptions(type) {
  4297. if (type == 3 && this.schedulStatus == 2) {
  4298. this.$message.error("该病人未排班,不能开临时医嘱!");
  4299. this.groupFormVisible = false;
  4300. }
  4301. },
  4302. handleCurrentChange(page) {
  4303. this.listQuery.page = page;
  4304. this.getList();
  4305. },
  4306. handleSizeChange(limit) {
  4307. this.listQuery.limit = limit;
  4308. this.getList();
  4309. },
  4310. getSelfMedicalList(id){
  4311. const params = {
  4312. patient_id:id
  4313. }
  4314. console.log("params-----",params)
  4315. getSelfMedicalList(params).then(response=>{
  4316. if (response.data.state == 1) {
  4317. this.arr_drug = []
  4318. var medicalList = response.data.data.private_drug_list
  4319. var base_drug_list = response.data.data.base_drug_list
  4320. var base_drug_cofig = response.data.data.base_drug_config
  4321. var private_drug_cofig = response.data.data.private_drug_config
  4322. if(private_drug_cofig != null&&private_drug_cofig.drug_start == 1) {
  4323. for (let i = 0; i < medicalList.length; i++) {
  4324. if(medicalList[i].drug_specs != null) {
  4325. for (let a = 0; a < medicalList[i].drug_specs.length; a++) {
  4326. medicalList[i].drug_specs[a]['type'] = 2
  4327. }
  4328. }
  4329. let obj = {
  4330. drug_name: "",
  4331. drug_desc: "",
  4332. delivery_way: "",
  4333. execution_frequency: "",
  4334. single_dose: "",
  4335. single_dose_unit: "",
  4336. prescribing_number: "",
  4337. prescribing_number_unit: "",
  4338. type_id: "",
  4339. type: "",
  4340. custom_id: "",
  4341. drug_specs: [],
  4342. drug_id:"",
  4343. }
  4344. medicalList[i].drug_name = medicalList[i].drug_name + "(自备药)"
  4345. obj.drug_name = medicalList[i].drug_name
  4346. obj.delivery_way = medicalList[i].delivery_way
  4347. obj.execution_frequency = medicalList[i].execution_frequency
  4348. obj.single_dose = medicalList[i].single_dose
  4349. obj.prescribing_number = medicalList[i].prescribing_number
  4350. obj.type_id = medicalList[i].id
  4351. obj.type = 2
  4352. obj.custom_id = this.rand(10000000, 99999999)
  4353. obj.drug_specs = medicalList[i].drug_specs
  4354. obj.drug_id = medicalList[i].id
  4355. this.all_drug.push(obj)
  4356. }
  4357. }
  4358. for (let i = 0; i < base_drug_list.length; i++) {
  4359. if(base_drug_list[i].drug_specs != null) {
  4360. for (let a = 0; a < base_drug_list[i].drug_specs.length; a++) {
  4361. base_drug_list[i].drug_specs[a]['type'] = 1
  4362. }
  4363. }
  4364. let obj = {
  4365. drug_name: "",
  4366. drug_desc: "",
  4367. delivery_way: "",
  4368. execution_frequency: "",
  4369. single_dose: "",
  4370. single_dose_unit: "",
  4371. prescribing_number: "",
  4372. prescribing_number_unit: "",
  4373. type_id: "",
  4374. type: "",
  4375. custom_id: "",
  4376. drug_specs: [],
  4377. drug_id:"",
  4378. }
  4379. obj.drug_name = base_drug_list[i].drug_name
  4380. obj.delivery_way = base_drug_list[i].delivery_way
  4381. obj.execution_frequency = base_drug_list[i].execution_frequency
  4382. obj.single_dose = base_drug_list[i].single_dose
  4383. obj.prescribing_number = base_drug_list[i].prescribing_number
  4384. obj.type_id = base_drug_list[i].id
  4385. obj.type = 1
  4386. obj.custom_id = this.rand(10000000, 99999999)
  4387. obj.drug_specs = base_drug_list[i].drug_specs
  4388. obj.drug_id = base_drug_list[i].id
  4389. this.all_drug.push(obj)
  4390. }
  4391. }
  4392. this.private_drug_config = response.data.data.private_drug_config
  4393. console.log("medicals",medicalList)
  4394. this.medicals = medicalList
  4395. })
  4396. },
  4397. changeDrugNameTwo(name){
  4398. this.current_drug_name = name
  4399. this.adviceForm.advice_desc = ''
  4400. this.drugSpec = []
  4401. for (let i = 0; i < this.all_drug.length; i++) {
  4402. if (this.all_drug[i].drug_name == name) {
  4403. this.drugSpec = this.all_drug[i].drug_specs
  4404. }
  4405. }
  4406. },
  4407. changeDrugDescTwo(name){
  4408. this.current_drug_spec = name
  4409. for (let i = 0; i < this.drugSpec.length; i++) {
  4410. if (this.drugSpec[i].drug_spec == name) {
  4411. this.adviceForm.advice_desc = this.drugSpec[i].drug_spec
  4412. this.adviceForm.prescribing_number = this.drugSpec[i].prescribing_number.toString()
  4413. this.adviceForm.single_dose = this.drugSpec[i].single_dose.toString()
  4414. this.adviceForm.delivery_way = this.drugSpec[i].delivery_way.toString()
  4415. this.adviceForm.execution_frequency = this.drugSpec[i].execution_frequency.toString()
  4416. this.drug_id = this.drugSpec[i].id
  4417. this.src_type = this.drugSpec[i].type
  4418. this.adviceForm.drug_id = this.drugSpec[i].id
  4419. this.adviceForm.way = this.drugSpec[i].type
  4420. this.adviceForm.single_dose_unit = this.drugSpec[i].min_unit
  4421. this.adviceForm.drug_spec_unit = this.drugSpec[i].min_unit
  4422. this.adviceForm.prescribing_number_unit = this.drugSpec[i].min_unit
  4423. if(this.drugSpec[i].drug_name_id){
  4424. this.adviceForm.drug_name_id = this.drugSpec[i].drug_name_id
  4425. }else{
  4426. this.adviceForm.drug_name_id = 0
  4427. }
  4428. }
  4429. }
  4430. },
  4431. changeDrugName(name){
  4432. this.current_drug_name = name
  4433. this.nameForm.advice_desc = ''
  4434. this.drugSpec = []
  4435. for (let i = 0; i < this.all_drug.length; i++) {
  4436. if (this.all_drug[i].drug_name == name) {
  4437. this.drugSpec = this.all_drug[i].drug_specs
  4438. }
  4439. }
  4440. },
  4441. changeDrugDesc(name) {
  4442. this.current_drug_spec = name
  4443. for (let i = 0; i < this.drugSpec.length; i++) {
  4444. if (this.drugSpec[i].drug_spec == name) {
  4445. this.nameForm.advice_desc = this.drugSpec[i].drug_spec
  4446. this.nameForm.prescribing_number = this.drugSpec[i].prescribing_number.toString()
  4447. this.nameForm.single_dose = this.drugSpec[i].single_dose.toString()
  4448. this.nameForm.delivery_way = this.drugSpec[i].delivery_way.toString()
  4449. this.nameForm.execution_frequency = this.drugSpec[i].execution_frequency.toString()
  4450. this.drug_id = this.drugSpec[i].id
  4451. this.src_type = this.drugSpec[i].type
  4452. this.nameForm.drug_id = this.drugSpec[i].id
  4453. this.nameForm.way = this.drugSpec[i].type
  4454. this.nameForm.single_dose_unit = this.drugSpec[i].min_unit
  4455. this.nameForm.drug_spec_unit = this.drugSpec[i].min_unit
  4456. this.nameForm.prescribing_number_unit = this.drugSpec[i].min_unit
  4457. if(this.drugSpec[i].drug_name_id){
  4458. this.nameForm.drug_name_id = this.drugSpec[i].drug_name_id
  4459. }else{
  4460. this.nameForm.drug_name_id = 0
  4461. }
  4462. }
  4463. }
  4464. },
  4465. rand(min, max) {
  4466. return Math.floor(Math.random() * (max - min)) + min;
  4467. },
  4468. querySearch(queryString, cb) {
  4469. console.log('queryString',queryString)
  4470. var restaurants = this.all_drug;
  4471. restaurants.map(item => {
  4472. item.value = item.drug_name
  4473. })
  4474. var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
  4475. // 调用 callback 返回建议列表的数据
  4476. console.log('results',results)
  4477. cb(results);
  4478. },
  4479. createFilter(queryString) {
  4480. return (restaurant) => {
  4481. return (restaurant.drug_name.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
  4482. };
  4483. },
  4484. querySearch1(queryString, cb) {
  4485. console.log('queryString',queryString)
  4486. var restaurants = this.drugSpec;
  4487. console.log(restaurants)
  4488. restaurants.map(item => {
  4489. item.value = item.drug_spec
  4490. })
  4491. var results = queryString ? restaurants.filter(this.createFilter(queryString)) : restaurants;
  4492. // 调用 callback 返回建议列表的数据
  4493. console.log('results',results)
  4494. cb(results);
  4495. },
  4496. handleSelect1(val){
  4497. this.drug_id = val.drug_id
  4498. },
  4499. handleSelect(val){
  4500. this.src_type = 1
  4501. this.drug_id = val.drug_id
  4502. this.nameForm.drug_id = val.drug_id
  4503. this.nameForm.way = 1
  4504. this.nameForm.drug_name_id = val.drug_id
  4505. var tmp = val.drug_specs[0]
  4506. console.log("tmp",tmp)
  4507. this.nameForm.advice_desc = tmp.dose+tmp.dose_unit+"*"+tmp.min_number+tmp.min_unit+"/"//药品规格
  4508. this.nameForm.drug_spec_unit = tmp.max_unit
  4509. this.nameForm.prescribing_number = tmp.prescribing_number//开药数量
  4510. this.nameForm.prescribing_number_unit = tmp.prescribing_number_unit
  4511. this.nameForm.single_dose = tmp.single_dose//单次用量
  4512. this.nameForm.single_dose_unit = tmp.drug_dose_unit
  4513. this.nameForm.delivery_way = tmp.delivery_way//给药途径
  4514. this.nameForm.execution_frequency = tmp.execution_frequency//执行频率
  4515. this.nameForm.drug_id = tmp.id
  4516. console.log("isiisisthis.adviceForm",this.adviceForm)
  4517. this.adviceForm.drug_id = tmp.id
  4518. },
  4519. getTime(val) {
  4520. if(val < 0){
  4521. return ""
  4522. }
  4523. if(val == ""){
  4524. return ""
  4525. }else {
  4526. return uParseTime(val, '{y}-{m}-{d}')
  4527. }
  4528. },
  4529. },
  4530. watch: {
  4531. adviceTableData: function() {
  4532. this.handleSpanTempArr();
  4533. },
  4534. "selectedTemp.list": function() {
  4535. this.calcselectedTemp();
  4536. },
  4537. multipleSelection: function() {
  4538. const arr = [];
  4539. const group = [];
  4540. const grouptwo = [];
  4541. const ids = [];
  4542. console.log("multipleSelection",this.multipleSelection)
  4543. for (const i in this.multipleSelection) {
  4544. arr.push(this.multipleSelection[i]);
  4545. group.push(this.multipleSelection[i].groupno);
  4546. }
  4547. grouptwo.push(this.getdata(group));
  4548. // console.log('组号', group)
  4549. // console.log('组号2', grouptwo)
  4550. // console.log('ids', ids)
  4551. this.getPrintInfo(group);
  4552. }
  4553. },
  4554. components: {
  4555. PatientSidebar,
  4556. EditGroupAdvice
  4557. },
  4558. created() {
  4559. const id = this.$route.params && this.$route.params.id;
  4560. this.patientID = parseInt(id);
  4561. if (isNaN(this.patientID) || this.patientID <= 0) {
  4562. this.$notify.error({
  4563. title: "错误",
  4564. message: "无效的id"
  4565. });
  4566. this.$router.push("/patients/patients");
  4567. }
  4568. this.listQuery.id = this.patientID;
  4569. this.org_id = this.$store.getters.xt_user.template_info.org_id
  4570. // var nowDate = new Date()
  4571. // var nowYear = nowDate.getFullYear()
  4572. // var nowMonth = nowDate.getMonth() + 1
  4573. // var nowDay = nowDate.getDate()
  4574. // this.listQuery.end_time =
  4575. // nowYear +
  4576. // '-' +
  4577. // (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  4578. // '-' +
  4579. // (nowDay < 10 ? '0' + nowDay : nowDay)
  4580. //
  4581. // nowDate.setMonth(nowDate.getMonth() - 1)
  4582. // nowYear = nowDate.getFullYear()
  4583. // nowMonth = nowDate.getMonth() + 1
  4584. // nowDay = nowDate.getDate()
  4585. //
  4586. // this.listQuery.start_time =
  4587. // nowYear +
  4588. // '-' +
  4589. // (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  4590. // '-' +
  4591. // (nowDay < 10 ? '0' + nowDay : nowDay)
  4592. // this.fetchAllDoctorAndNurse();
  4593. this.fetchAllAdminUsers();
  4594. this.getAllAdviceConfig();
  4595. this.getList();
  4596. const params = {
  4597. id: this.patientID
  4598. };
  4599. this.getPatient(params);
  4600. var xtuser = this.$store.getters.xt_user;
  4601. this.orgname = xtuser.org.org_name;
  4602. this.adminusername = xtuser.user.user_name;
  4603. this.aminuserid = xtuser.user.id;
  4604. this.unitsOption = getDataConfig("hemodialysis", "units");
  4605. //查询该病人是否有排班记录
  4606. this.getPatientSchedules(id);
  4607. this.getSelfMedicalList(id)
  4608. }
  4609. };
  4610. </script>
  4611. <style>
  4612. #oictable ::-webkit-scrollbar {
  4613. height: 15px;
  4614. }
  4615. </style>
  4616. <style rel="stylesheet/scss" lang="scss" scoped>
  4617. .printForm {
  4618. width: 960px;
  4619. }
  4620. .printForm .hospital_title {
  4621. font-size: 20px;
  4622. font-weight: 400;
  4623. text-align: center;
  4624. letter-spacing: 5px;
  4625. }
  4626. .printForm .title {
  4627. font-size: 30px;
  4628. font-weight: 500;
  4629. text-align: center;
  4630. }
  4631. .printForm .title {
  4632. font-size: 30px;
  4633. font-weight: 500;
  4634. text-align: center;
  4635. }
  4636. .printForm .info ul {
  4637. display: -webkit-box;
  4638. display: -moz-box;
  4639. display: -ms-flexbox;
  4640. display: -webkit-flex;
  4641. display: flex;
  4642. align-items: center;
  4643. -moz-box-sizing: border-box;
  4644. -webkit-box-sizing: border-box;
  4645. -o-box-sizing: border-box;
  4646. -ms-box-sizing: border-box;
  4647. box-sizing: border-box;
  4648. -webkit-justify-content: space-around;
  4649. -moz-justify-content: space-around;
  4650. -ms-justify-content: space-around;
  4651. -o-justify-content: space-around;
  4652. justify-content: space-around;
  4653. }
  4654. .printForm .info ul li {
  4655. display: flex;
  4656. box-sizing: border-box;
  4657. justify-content: space-around;
  4658. }
  4659. .printForm .info ul li .InputBox {
  4660. padding: 0;
  4661. border: none;
  4662. border-bottom: 1px #e5e5e5 solid;
  4663. outline: none;
  4664. width: 80px;
  4665. }
  4666. .printForm .printTable tr {
  4667. padding: 2px;
  4668. }
  4669. .printForm .printTable tr > th {
  4670. padding: 6px 4px;
  4671. }
  4672. .printForm .printTable tr > td {
  4673. padding: 6px 4px;
  4674. }
  4675. .es-img {
  4676. height: 25px;
  4677. }
  4678. .advice-container {
  4679. font-size: 15px;
  4680. .filter-container {
  4681. padding-bottom: 5px;
  4682. }
  4683. .search-component {
  4684. width: 500px;
  4685. .searchBox {
  4686. width: 300px;
  4687. height: 36px;
  4688. line-height: 36px;
  4689. padding-left: 15px;
  4690. border: 1px #dcdfe6 solid;
  4691. border-right: none;
  4692. outline: none;
  4693. float: left;
  4694. border-radius: 6px 0 0 6px;
  4695. font-size: 14px;
  4696. color: #333;
  4697. background: #fff;
  4698. box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
  4699. }
  4700. .searchBtn {
  4701. background-color: #409eff;
  4702. color: #fff;
  4703. font-size: 15px;
  4704. text-align: center;
  4705. height: 36px;
  4706. line-height: 36px;
  4707. float: left;
  4708. outline: none;
  4709. width: 70px;
  4710. border: none;
  4711. border-radius: 0 6px 6px 0;
  4712. font-family: "Microsoft Yahei";
  4713. cursor: pointer;
  4714. }
  4715. }
  4716. .amount {
  4717. font-weight: normal;
  4718. padding: 10px 0 0 0;
  4719. color: #606266;
  4720. font-size: 14px;
  4721. span {
  4722. color: #ef2525;
  4723. font-family: "Arial";
  4724. padding: 0 2px;
  4725. }
  4726. }
  4727. .el-dropdown-link {
  4728. cursor: pointer;
  4729. }
  4730. }
  4731. .advice-order .ls-title {
  4732. text-align: center;
  4733. font-weight: 600;
  4734. font-size: 30px;
  4735. line-height: 80px;
  4736. margin-bottom: 20px;
  4737. }
  4738. .advice-order .ls-type {
  4739. text-align: center;
  4740. margin-bottom: 20px;
  4741. }
  4742. .advice-order .ls-name {
  4743. display: flex;
  4744. align-items: center;
  4745. justify-content: space-between;
  4746. padding: 30px 2em;
  4747. }
  4748. </style>
  4749. <style>
  4750. .advice-order .el-table__body {
  4751. border: 1px solid #333;
  4752. }
  4753. .advice-order .el-table__body td {
  4754. border: 1px solid #333;
  4755. }
  4756. .advice-order .item-value {
  4757. flex: 1;
  4758. border-bottom: 1px solid #333;
  4759. }
  4760. .advice-order th,
  4761. .advice-order td {
  4762. padding: 5px 10px;
  4763. }
  4764. #user-advice-name-table .expanded {
  4765. display: table-row !important;
  4766. }
  4767. #user-advice-name-table .el-table__expand-icon {
  4768. -webkit-transform: rotate(90deg) !important;
  4769. transform: rotate(90deg) !important;
  4770. }
  4771. .user-advice-table-row:hover > td {
  4772. background: #fff !important;
  4773. }
  4774. .user-advice-table-row td:hover {
  4775. background: #fff !important;
  4776. }
  4777. #user-advice-select-template-table .el-table__row {
  4778. display: table-row !important;
  4779. }
  4780. #user-advice-select-template-table .el-table__expand-icon {
  4781. -webkit-transform: rotate(90deg) !important;
  4782. transform: rotate(90deg) !important;
  4783. }
  4784. .advicenamedisplay .cell {
  4785. float: left;
  4786. text-align: left;
  4787. }
  4788. </style>