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

doctorAdvice.vue 156KB

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