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

doctorAdvice.vue 177KB

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