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

doctorAdvice.vue 156KB

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