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

doctorAdvice.vue 157KB

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