courseOfDisease_new.vue 157KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129
  1. <template>
  2. <!-- <div class="main-contain">
  3. <div class="position">
  4. <bread-crumb></bread-crumb>
  5. </div> -->
  6. <div class="patient-container">
  7. <PatientSidebar :id="patient_id" defaultActive="3-5"></PatientSidebar>
  8. <div v-loading="loading">
  9. <div class="patient-app-container advice-container app-container" style="">
  10. <div style="display: flex;">
  11. <div style="width: 34%;">
  12. <div style="display: flex;">
  13. <div style="flex: 1.1;">
  14. <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;">病史列表</span>
  15. </div>
  16. <div style="flex: 0.9;text-align: right;">
  17. <el-button type="primary" size="small" @click="add_click">添加</el-button>
  18. </div>
  19. </div>
  20. <div>
  21. <el-table class="table"
  22. ref="phy_table"
  23. :data="tableData"
  24. :highlight-current-row="true"
  25. @current-change="getCurrentChangeOne"
  26. style="width: 100%">
  27. <el-table-column prop="index" label="序号" width="50">
  28. <template slot-scope="scope">
  29. {{ scope.$index + 1 }}
  30. </template>
  31. </el-table-column>
  32. <el-table-column prop="date" label="时间" width="">
  33. <template slot-scope="scope">
  34. {{ getTimeThree(scope.row.record_time) }}
  35. </template>
  36. </el-table-column>
  37. <el-table-column prop="doctor" label="医生">
  38. <template slot-scope="scope">
  39. {{ getDocName(scope.row.recorder) }}
  40. </template>
  41. </el-table-column>
  42. </el-table>
  43. </div>
  44. </div>
  45. <div style="width: 65%;margin-left: 10px;">
  46. <div style="display: flex;">
  47. <div style="flex: 1;">
  48. <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;">详情</span>
  49. </div>
  50. <div style="flex: 1;text-align: right;">
  51. <div v-if='add_index == 0'>
  52. <el-button type="primary" size="small" @click="showEdit">修改</el-button>
  53. <el-button size="small" type="danger" @click="deleteAction">删除</el-button>
  54. <el-button type="primary" size="small" @click="prints">打印</el-button>
  55. </div>
  56. <div v-if="add_index == 1">
  57. <el-button type="primary" size="small" @click="showSave">保存</el-button>
  58. <el-button size="small" @click="showCancel">取消</el-button>
  59. </div>
  60. </div>
  61. </div>
  62. <div style="display: flex;margin: 10px 0;">
  63. <div style="flex: 1;">
  64. 记录时间:
  65. <el-date-picker v-model="record_date" prefix-icon="el-icon-date" :editable="false"
  66. style="width: 200px;"
  67. format="yyyy-MM-dd HH:mm:ss"
  68. value-format="yyyy-MM-dd HH:mm:ss"
  69. type="datetime" placeholder="选择日期时间" align="right"
  70. ></el-date-picker>
  71. </div>
  72. <div style="flex: 1;">
  73. 病程医生:
  74. <el-select v-model="admin_user_id" placeholder="请选择" :disabled="disabled">
  75. <el-option
  76. v-for="item in doctorOptions"
  77. :key="item.admin_user_id"
  78. :label="item.user_name"
  79. :value="item.admin_user_id">
  80. </el-option>
  81. </el-select>
  82. </div>
  83. <div style="flex: 1;">
  84. 病程标题:
  85. <el-input style="width: 150px;" v-model="title"></el-input>
  86. </div>
  87. </div>
  88. <div>
  89. <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;margin-bottom: 5px;">
  90. 病程内容
  91. </span>
  92. <div style="margin: 10px 0;">
  93. <el-button type="primary" size="small" @click="template_click">
  94. {{ add_index ==0 ? '设置模板' : '模板库' }}
  95. </el-button>
  96. <el-button type="primary" size="small" @click="auto_click" style="padding-bottom: 10px;">
  97. 自动生成
  98. </el-button>
  99. <el-button type="primary" size="small" @click="Inspect_click" style="padding-bottom: 10px;">
  100. 科室检查
  101. </el-button>
  102. <el-button type="primary" size="small" @click="blood_click" style="padding-bottom: 10px;">
  103. 血压
  104. </el-button>
  105. <el-button type="primary" size="small" @click="summary_click" style="margin-bottom: 10px;">
  106. 透析小结汇总
  107. </el-button>
  108. <el-button type="primary" size="small" @click="weight_click" style="margin-bottom: 10px;">
  109. 干体重
  110. </el-button>
  111. <el-button type="primary" size="small" @click="option_click" style="margin-bottom: 10px;">
  112. 透析方案
  113. </el-button>
  114. <el-button type="primary" size="small" @click="advice_click" style="margin-bottom: 10px;">
  115. 医嘱
  116. </el-button>
  117. <el-button type="primary" size="small" @click="diagnosis_click" style="margin-bottom: 10px;">
  118. 诊断
  119. </el-button>
  120. <el-button type="primary" size="small" @click="hospital_click" style="margin-bottom: 10px;">
  121. 出入院记录
  122. </el-button>
  123. </div>
  124. <ueditor ref="editor" id="editors" :content="new_content"></ueditor>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. <el-dialog
  130. title="设置模板"
  131. :visible.sync="template_dialog"
  132. width="20%"
  133. center>
  134. <div>
  135. 模板名称:
  136. <el-input v-model="title" placeholder="请输入内容" style="width: 160px;"></el-input>
  137. </div>
  138. <span slot="footer" class="dialog-footer">
  139. <el-button @click="template_dialog = false">取 消</el-button>
  140. <el-button type="primary" @click="saveTemplate">确 定</el-button>
  141. </span>
  142. </el-dialog>
  143. <el-dialog
  144. title="模板库"
  145. :visible.sync="library_dialog"
  146. width="70%"
  147. class="lirary"
  148. >
  149. <div>
  150. <div style="display: flex;">
  151. <div style="width: 27%;">
  152. <el-table
  153. :data="templateList"
  154. :highlight-current-row="true"
  155. @row-click="rowclick"
  156. ref="record_table_one"
  157. @current-change="getCurrentChangeTwo"
  158. style="width: 100%">
  159. <el-table-column prop="index" label="序号" width="">
  160. <template slot-scope="scope">
  161. {{ scope.$index + 1 }}
  162. </template>
  163. </el-table-column>
  164. <el-table-column prop="name" label="模板名称" width="">
  165. <template slot-scope="scope">
  166. {{ scope.row.title }}
  167. </template>
  168. </el-table-column>
  169. </el-table>
  170. </div>
  171. <div style="width: 72%;margin-left: 10px;">
  172. <div class="Second_title">模板内容</div>
  173. <div style="">
  174. <keep-alive>
  175. <ueditor ref="editorOne" id="editors" :content="new_content"></ueditor>
  176. </keep-alive>
  177. </div>
  178. </div>
  179. </div>
  180. </div>
  181. <span slot="footer" class="dialog-footer" style="text-align: center;">
  182. <el-button type="danger" @click="template_dele">删除模板</el-button>
  183. <el-button type="primary" @click="template_save">保存模板</el-button>
  184. <el-button type="primary" @click="toContentPint(1)">应用</el-button>
  185. <el-button @click="library_dialog = false">取消</el-button>
  186. </span>
  187. </el-dialog>
  188. <el-dialog
  189. title="提示"
  190. :visible.sync="auto_dialog"
  191. width="70%"
  192. top="0"
  193. >
  194. <div>
  195. <div style="display:flex;position: absolute;left: 20%;top: 20px;">
  196. <div>
  197. 取值时间:
  198. <el-select v-model="quzhi_date" @change="datachange" placeholder="请选择" style="width: 120px;">
  199. <el-option
  200. v-for="item in quzhi_options"
  201. :key="item.value"
  202. :label="item.label"
  203. :value="item.value">
  204. </el-option>
  205. </el-select>
  206. </div>
  207. <div style="margin:0 10px">
  208. <el-date-picker
  209. @change="changStartDate"
  210. v-model="start_date"
  211. type="date"
  212. value-format="yyyy-MM-dd"
  213. placeholder="选择日期"
  214. style="width: 150px;">
  215. </el-date-picker>
  216. <span>-</span>
  217. <el-date-picker
  218. @change="changEndDate"
  219. v-model="end_date"
  220. type="date"
  221. value-format="yyyy-MM-dd"
  222. placeholder="选择日期"
  223. style="width: 150px;">
  224. </el-date-picker>
  225. </div>
  226. <div style="text-align: right;margin-bottom: 10px;">
  227. <el-button type="primary" size="small" @click="autotext_click">
  228. 生成
  229. </el-button>
  230. <el-button type="primary" size="small" @click="auto_dialog=false">
  231. 取消
  232. </el-button>
  233. </div>
  234. </div>
  235. <div v-show="AuToShow">
  236. <div v-html="textcontent" id="editer"></div>
  237. <!-- <text_content @new_content="newcontent" :patient="patient" :prescription="prescription" :berforList="berforList"
  238. :monitorList="monitorList" :dryweightList="dryweightList" :inpectionList="inpectionList" :dialysisOrderList="dialysisOrderList"
  239. :start_date="start_date" :end_date="end_date" :patient_id="patient_id" :num="num" :longAdvice="longAdvice" :groupPrescriptionList="groupPrescriptionList" :afterList="afterList" :max_blood_flow_volume="max_blood_flow_volume"
  240. :max_befor_systolic_blood_pressure="max_befor_systolic_blood_pressure" :min_befor_systolic_blood_pressure="min_befor_systolic_blood_pressure" :max_befor_diastolic_blood_pressure="max_befor_diastolic_blood_pressure" :min_befor_diastolic_blood_pressure="min_befor_diastolic_blood_pressure"
  241. :max_after_systolic_blood_pressure="max_after_systolic_blood_pressure" :min_after_systolic_blood_pressure="min_after_systolic_blood_pressure" :max_after_diastolic_blood_pressure="max_after_diastolic_blood_pressure" :min_after_diastolic_blood_pressure="min_after_diastolic_blood_pressure"
  242. :max_monitor_systolic_blood_pressure="max_monitor_systolic_blood_pressure" :min_monitor_systolic_blood_pressure="min_monitor_systolic_blood_pressure" :max_monitor_diastolic_blood_pressure="max_monitor_diastolic_blood_pressure" :min_monitor_diastolic_blood_pressure="min_monitor_diastolic_blood_pressure"
  243. :lastDryWeight="lastDryWeight" :patientVascularAccess="patientVascularAccess" :lastBefor="lastBefor"></text_content> -->
  244. </div>
  245. </div>
  246. </el-dialog>
  247. <!-- 血压 -->
  248. <el-dialog
  249. title="血压"
  250. :visible.sync="blood_dialog"
  251. width="70%"
  252. class="lirary"
  253. >
  254. <div>
  255. <div style="display:flex;">
  256. <div>
  257. 日期:
  258. <el-select v-model="blood_date" @change="blood_chang" placeholder="请选择" style="width: 120px;">
  259. <el-option
  260. v-for="item in date_options"
  261. :key="item.value"
  262. :label="item.label"
  263. :value="item.value">
  264. </el-option>
  265. </el-select>
  266. </div>
  267. <div style="margin:0 10px">
  268. <el-date-picker
  269. @change="changStartDate"
  270. v-model="start_date1"
  271. type="date"
  272. value-format="yyyy-MM-dd"
  273. placeholder="选择日期"
  274. style="width: 150px;">
  275. </el-date-picker>
  276. <span>-</span>
  277. <el-date-picker
  278. @change="changEndDate"
  279. v-model="end_date1"
  280. type="date"
  281. value-format="yyyy-MM-dd"
  282. placeholder="选择日期"
  283. style="width: 150px;">
  284. </el-date-picker>
  285. </div>
  286. <div style="text-align: right;margin-bottom: 10px;">
  287. <el-button type="primary" size="small" @click="getMonitorSearchList">
  288. 查询
  289. </el-button>
  290. </div>
  291. </div>
  292. <div style="display: flex;">
  293. <div style="width: 27%;">
  294. <div class="Second_title">血压列表</div>
  295. <el-table
  296. :data="monitorListOne"
  297. :highlight-current-row="true"
  298. ref="blood_table"
  299. @current-change="handleMonitorChange"
  300. style="width: 100%">
  301. <el-table-column prop="date" label="透析日期" width="" align="center">
  302. <template slot-scope="scope" a>
  303. {{ getTime(scope.row.schedule_date) }}
  304. </template>
  305. </el-table-column>
  306. <el-table-column prop="mode" label="透析方式" width="" align="center">
  307. <template slot-scope="scope">
  308. {{ getModeId(scope.row.mode_id) }}
  309. </template>
  310. </el-table-column>
  311. </el-table>
  312. </div>
  313. <div style="width: 72%;margin-left: 10px;">
  314. <div class="Second_title">内容</div>
  315. <div class="blood_text" style="" >
  316. <div v-html="monitor_blood_context"></div>
  317. </div>
  318. </div>
  319. </div>
  320. </div>
  321. <span slot="footer" class="dialog-footer" style="text-align: center;">
  322. <el-button type="primary" @click="toMonitorPint">应用</el-button>
  323. <!-- <el-button type="danger" @click="template_dele">删除模板</el-button>
  324. <el-button type="primary" @click="template_save">保存模板</el-button> -->
  325. <!-- <el-button type="primary" @click="toContentPint(2)">应用</el-button> -->
  326. <el-button @click="blood_dialog = false">取消</el-button>
  327. </span>
  328. </el-dialog>
  329. <!-- 透析小结汇总 -->
  330. <el-dialog
  331. title="透析小结"
  332. :visible.sync="summary_dialog"
  333. width="70%"
  334. class="lirary"
  335. >
  336. <div>
  337. <div style="display:flex;">
  338. <div>
  339. 日期:
  340. <el-select v-model="blood_date" @change="blood_chang" placeholder="请选择" style="width: 120px;">
  341. <el-option
  342. v-for="item in date_options"
  343. :key="item.value"
  344. :label="item.label"
  345. :value="item.value">
  346. </el-option>
  347. </el-select>
  348. </div>
  349. <div style="margin:0 10px">
  350. <el-date-picker
  351. @change="changStartDate"
  352. v-model="start_date1"
  353. type="date"
  354. value-format="yyyy-MM-dd"
  355. placeholder="选择日期"
  356. style="width: 150px;">
  357. </el-date-picker>
  358. <span>-</span>
  359. <el-date-picker
  360. @change="changEndDate"
  361. v-model="end_date1"
  362. type="date"
  363. value-format="yyyy-MM-dd"
  364. placeholder="选择日期"
  365. style="width: 150px;">
  366. </el-date-picker>
  367. </div>
  368. <div style="text-align: right;margin-bottom: 10px;">
  369. <el-button type="primary" size="small" @click="getSummarySearchList">
  370. 查询
  371. </el-button>
  372. </div>
  373. </div>
  374. <div style="display: flex;">
  375. <div style="width: 27%;">
  376. <div class="Second_title">透析小结汇总列表</div>
  377. <el-table
  378. :data="summaryList"
  379. :highlight-current-row="true"
  380. ref="blood_table"
  381. @current-change="summaryChange"
  382. @selection-change="selectionchange2"
  383. style="width: 100%">
  384. <el-table-column type="selection"width="55">
  385. </el-table-column>
  386. <el-table-column prop="date" label="透析日期" width="" align="center">
  387. <template slot-scope="scope" a>
  388. {{ getTime(scope.row.schedule_date) }}
  389. </template>
  390. </el-table-column>
  391. <el-table-column prop="mode" label="透析方式" width="" align="center">
  392. <template slot-scope="scope">
  393. {{ getModeId(scope.row.mode_id) }}
  394. </template>
  395. </el-table-column>
  396. </el-table>
  397. </div>
  398. <div style="width: 72%;margin-left: 10px;">
  399. <div class="Second_title">内容</div>
  400. <div class="blood_text" style="" >
  401. <div v-html="summary_context"></div>
  402. </div>
  403. </div>
  404. </div>
  405. </div>
  406. <span slot="footer" class="dialog-footer" style="text-align: center;">
  407. <!-- <el-button type="danger" @click="template_dele">删除模板</el-button>
  408. <el-button type="primary" @click="template_save">保存模板</el-button> -->
  409. <el-button type="primary" @click="toSummaryPint">应用</el-button>
  410. <el-button @click="summary_dialog = false">取消</el-button>
  411. </span>
  412. </el-dialog>
  413. <!-- 干体重 -->
  414. <el-dialog
  415. title="干体重"
  416. :visible.sync="weight_dialog"
  417. width="70%"
  418. class="lirary"
  419. >
  420. <div>
  421. <div style="display:flex;">
  422. <div>
  423. 日期:
  424. <el-select v-model="blood_date" @change="blood_chang" placeholder="请选择" style="width: 120px;">
  425. <el-option
  426. v-for="item in date_options"
  427. :key="item.value"
  428. :label="item.label"
  429. :value="item.value">
  430. </el-option>
  431. </el-select>
  432. </div>
  433. <div style="margin:0 10px">
  434. <el-date-picker
  435. @change="changStartDate"
  436. v-model="start_date1"
  437. type="date"
  438. value-format="yyyy-MM-dd"
  439. placeholder="选择日期"
  440. style="width: 150px;">
  441. </el-date-picker>
  442. <span>-</span>
  443. <el-date-picker
  444. @change="changEndDate"
  445. v-model="end_date1"
  446. type="date"
  447. value-format="yyyy-MM-dd"
  448. placeholder="选择日期"
  449. style="width: 150px;">
  450. </el-date-picker>
  451. </div>
  452. <div style="text-align: right;margin-bottom: 10px;">
  453. <el-button type="primary" size="small" @click="getPatientDryWeightList">
  454. 查询
  455. </el-button>
  456. </div>
  457. </div>
  458. <div style="display: flex;">
  459. <div style="width: 27%;">
  460. <div class="Second_title">干体重调整列表</div>
  461. <el-table
  462. :data="dryWeightList"
  463. :highlight-current-row="true"
  464. ref="weight_table"
  465. @current-change="weightChange"
  466. @selection-change="selectionchange3"
  467. style="width: 100%">
  468. <el-table-column prop="date" label="时间" width="" align="center">
  469. <template slot-scope="scope">
  470. {{ getTimeTwo(scope.row.ctime) }}
  471. </template>
  472. </el-table-column>
  473. </el-table>
  474. </div>
  475. <div style="width: 72%;margin-left: 10px;">
  476. <div class="Second_title">内容</div>
  477. <div class="blood_text" style="" >
  478. <div v-html="weight_context"></div>
  479. </div>
  480. </div>
  481. </div>
  482. </div>
  483. <span slot="footer" class="dialog-footer" style="text-align: center;">
  484. <!-- <el-button type="danger" @click="template_dele">删除模板</el-button>
  485. <el-button type="primary" @click="template_save">保存模板</el-button> -->
  486. <el-button type="primary" @click="toDryWeightPint">应用</el-button>
  487. <el-button @click="weight_dialog = false">取消</el-button>
  488. </span>
  489. </el-dialog>
  490. <!-- 透析方案 -->
  491. <el-dialog
  492. title="透析方案"
  493. :visible.sync="option_dialog"
  494. width="70%"
  495. class="lirary"
  496. >
  497. <div>
  498. <div style="display: flex;">
  499. <div style="width: 27%;">
  500. <div class="Second_title">透析方案列表</div>
  501. <el-table
  502. ref="option_table"
  503. :data="optionlist"
  504. :highlight-current-row="true"
  505. @selection-change="selectionchange4"
  506. style="width: 100%">
  507. <el-table-column type="selection"width="55">
  508. </el-table-column>
  509. <el-table-column prop="start" label="状态" width=""></el-table-column>
  510. <el-table-column prop="mode" label="透析模式" width=""></el-table-column>
  511. </el-table>
  512. </div>
  513. <div style="width: 72%;margin-left: 10px;">
  514. <div class="Second_title">方案详情</div>
  515. <div style="">
  516. <keep-alive>
  517. <ueditor ref="editorOne" id="editors" :content="option_context"></ueditor>
  518. </keep-alive>
  519. </div>
  520. </div>
  521. </div>
  522. </div>
  523. <span slot="footer" class="dialog-footer" style="text-align: center;">
  524. <el-button type="primary" @click="toSystemContentPint">应用</el-button>
  525. <el-button @click="option_dialog = false">取消</el-button>
  526. </span>
  527. </el-dialog>
  528. <!-- 医嘱 -->
  529. <el-dialog
  530. title="医嘱"
  531. :visible.sync="advice_dialog"
  532. width="80%"
  533. class="lirary"
  534. >
  535. <div>
  536. <div style="display:flex;">
  537. <div>
  538. 医嘱类型:
  539. <el-select v-model="advice_type" @change="type_chang" placeholder="请选择" style="width: 120px;">
  540. <el-option
  541. v-for="item in type_option"
  542. :key="item.value"
  543. :label="item.label"
  544. :value="item.value">
  545. </el-option>
  546. </el-select>
  547. </div>
  548. <div style="margin-left: 10px;">
  549. 医嘱状态:
  550. <el-select v-model="advice_status" @change="status_chang" placeholder="请选择" style="width: 120px;">
  551. <el-option
  552. v-for="item in status_option"
  553. :key="item.value"
  554. :label="item.label"
  555. :value="item.value">
  556. </el-option>
  557. </el-select>
  558. </div>
  559. </div>
  560. <div style="">
  561. <el-table
  562. :data="adviceList"
  563. :highlight-current-row="true"
  564. ref="weight_table"
  565. @selection-change="selectionchange5"
  566. style="width: 100%">
  567. <el-table-column type="selection"width="55">
  568. </el-table-column>
  569. <el-table-column prop="date" label="开始时间" width="" align="center">
  570. <template slot-scope="scope">
  571. {{ getTimeThree(scope.row.start_time) }}
  572. </template>
  573. </el-table-column>
  574. <el-table-column prop="name" label="医嘱名称" width="" align="center">
  575. <template slot-scope="scope">
  576. {{scope.row.advice_name }}
  577. </template>
  578. </el-table-column>
  579. <el-table-column prop="guige" label="规格" width="" align="center">
  580. <template slot-scope="scope">
  581. {{scope.row.advice_desc}}
  582. </template>
  583. </el-table-column>
  584. <el-table-column prop="danci" label="单次用量" width="" align="center">
  585. <template slot-scope="scope">
  586. <span v-if="scope.row.single_dose>0">{{ scope.row.single_dose }}</span>
  587. </template>
  588. </el-table-column>
  589. <el-table-column prop="geiyao" label="给药途径" width="" align="center">
  590. <template slot-scope="scope">
  591. {{scope.row.delivery_way}}
  592. </template>
  593. </el-table-column>
  594. <el-table-column prop="pinlv" label="执行频率" width="" align="center">
  595. <template slot-scope="scope">
  596. {{scope.row.execution_frequency }}
  597. </template>
  598. </el-table-column>
  599. <el-table-column prop="beizhu" label="备注" width="" align="center">
  600. <template slot-scope="scope">
  601. {{scope.row.remark}}
  602. </template>
  603. </el-table-column>
  604. <el-table-column prop="tingzhi" label="停止时间/执行时间" width="" align="center">
  605. <template slot-scope="scope">
  606. <span v-if="scope.row.advice_type == 1">
  607. {{ getTimeThree(scope.row.stop_time) }}
  608. </span>
  609. <span v-if="scope.row.advice_type != 1">
  610. {{ getTimeThree(scope.row.execution_time) }}
  611. </span>
  612. </template>
  613. </el-table-column>
  614. <el-table-column prop="yuanyin" label="停止原因" width="" align="center">
  615. <template slot-scope="scope">
  616. <span v-if="scope.row.advice_type == 1">
  617. {{scope.row.remark }}
  618. </span>
  619. </template>
  620. </el-table-column>
  621. <el-table-column prop="yisheng" label="停止医生" width="" align="center">
  622. <template slot-scope="scope">
  623. <span v-if="scope.row.advice_type == 1">
  624. {{ getDocName(scope.row.advice_doctor) }}
  625. </span>
  626. </template>
  627. </el-table-column>
  628. </el-table>
  629. </div>
  630. </div>
  631. <span slot="footer" class="dialog-footer" style="text-align: center;" align="center">
  632. <el-button type="primary" @click="toAdviceContentPint">应用</el-button>
  633. <el-button @click="advice_dialog = false">取消</el-button>
  634. </span>
  635. </el-dialog>
  636. <!-- 科室检查 -->
  637. <el-dialog
  638. title="科室检查"
  639. :visible.sync="Inspect_dialog"
  640. width="70%"
  641. class="lirary"
  642. >
  643. <div>
  644. <div style="display:flex;">
  645. <div>
  646. 日期:
  647. <el-select v-model="blood_date" @change="blood_chang" placeholder="请选择" style="width: 120px;">
  648. <el-option
  649. v-for="item in date_options"
  650. :key="item.value"
  651. :label="item.label"
  652. :value="item.value">
  653. </el-option>
  654. </el-select>
  655. </div>
  656. <div style="margin:0 10px">
  657. <el-date-picker
  658. @change="changStartDate"
  659. v-model="start_date1"
  660. type="date"
  661. value-format="yyyy-MM-dd"
  662. placeholder="选择日期"
  663. style="width: 150px;">
  664. </el-date-picker>
  665. <span>-</span>
  666. <el-date-picker
  667. @change="changEndDate"
  668. v-model="end_date1"
  669. type="date"
  670. value-format="yyyy-MM-dd"
  671. placeholder="选择日期"
  672. style="width: 150px;">
  673. </el-date-picker>
  674. </div>
  675. <div style="text-align: right;margin-bottom: 10px;">
  676. <el-button type="primary" size="small" @click="toInspection">
  677. 查询
  678. </el-button>
  679. </div>
  680. </div>
  681. <div style="display: flex;">
  682. <div style="width: 27%;">
  683. <div style="display: flex;">
  684. <div style="flex: 1;">
  685. <div class="Second_title">检验项目</div>
  686. </div>
  687. <div style="flex: 1;text-align: right;">
  688. 全选<el-checkbox v-model="checked" @change="changeInspetion"></el-checkbox>
  689. </div>
  690. </div>
  691. <div>
  692. <el-collapse v-model="activeNames" @change="handleChange" v-for="(item,index) in newInspectionList" :key="item.id">
  693. <el-collapse-item :title="item.project_name" :name="item.project_id">
  694. <ul>
  695. <li v-for="i in item.child" class="inspect" @click="childclick(i)">{{getTime(i.inspect_date)}}</li>
  696. </ul>
  697. </el-collapse-item>
  698. </el-collapse>
  699. </div>
  700. </div>
  701. <div style="width: 72%;margin-left: 10px;">
  702. <div class="Second_title">内容</div>
  703. <div class="blood_text" style="" >
  704. <div v-html="inspect_context"></div>
  705. <!-- {{ blood_context }} -->
  706. </div>
  707. </div>
  708. </div>
  709. </div>
  710. <span slot="footer" class="dialog-footer" style="text-align: center;">
  711. <!-- <el-button type="danger" @click="template_dele">删除模板</el-button>
  712. <el-button type="primary" @click="template_save">保存模板</el-button> -->
  713. <el-button type="primary" @click="toInpectionContentPint">应用</el-button>
  714. <el-button @click="Inspect_dialog = false">取消</el-button>
  715. </span>
  716. </el-dialog>
  717. </div>
  718. <!-- <table border="1" style="border-collapse: collapse;width: 100%;">
  719. <tr><td colspan="4">HD,每周3次,启用</td></tr>
  720. <tr>
  721. <td>透析时长(h):4</td>
  722. <td>置换方式:</td>
  723. <td>血流量(ml/min):250</td>
  724. <td></td>
  725. </tr>
  726. <tr>
  727. <td>血透器:空心纤维血液透析器B-18BHF(B-18BHF)</td>
  728. <td>血滤器:</td>
  729. <td>灌流器:</td>
  730. <td>透析液流量(ml/min):500</td>
  731. </tr>
  732. <tr>
  733. <td>钾(mmol/L):2.0</td>
  734. <td>钠(mmol/L):138</td>
  735. <td>钙(mmol/L):1.5</td>
  736. <td>碳酸氢根(mmol/L):32</td>
  737. </tr>
  738. <tr>
  739. <td>抗凝剂:低分子肝素</td>
  740. <td>首剂(iu):4500</td>
  741. <td>维持(iu): 0</td>
  742. <td>总量(iu):4500</td>
  743. </tr>
  744. <tr><td colspan="4">抗凝剂公式:自定义维持时长(H)</td></tr>
  745. </table> -->
  746. </div>
  747. </template>
  748. <script>
  749. import PatientSidebar from './components/PatientSidebar'
  750. import PatientSidebar_new from './components/PatientSidebar_new'
  751. import Editor from '@/components/Editor'
  752. import ueditor from '@/components/Uedtior'
  753. import text_content from './text_content'
  754. const moment = require('moment')
  755. import { getDataConfig } from "@/utils/data";
  756. import {
  757. createNewCourseOfDiseaseRecord,
  758. deleteNewCouseOfDisease,
  759. modifyCourseOfDiseaseRecord,
  760. getPatientCourseOfDiseaseList,
  761. saveCoureseTemplateTitle,
  762. getPatientCoureOfTempalate,
  763. saveCourseOfNewTemplate,
  764. deleteCourseTempalte,
  765. getAutoPatientContent,
  766. getMonitorSearchList,
  767. getSummarySearchList,
  768. getPatientDryWeightList,
  769. getDilaysisSystemList,
  770. getPatientAdviceList,
  771. getPatientInspectionList,
  772. getInspectionByProjectId,
  773. } from '@/api/patient'
  774. import { fetchMoibleAllDoctorAndNurse } from "@/api/doctor";
  775. import { parseTime } from '@/utils'
  776. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  777. import { uParseTime } from '@/utils/tools'
  778. export default {
  779. name: 'CourseOfDisease',
  780. components: {
  781. PatientSidebar,
  782. BreadCrumb,
  783. Editor,
  784. PatientSidebar_new,
  785. ueditor,
  786. text_content,
  787. },
  788. data() {
  789. return {
  790. loading: false,
  791. title: '',
  792. patient_id: 0,
  793. date: [],
  794. start_time: '',
  795. end_time: '',
  796. course_of_disease_time: moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
  797. records: [],
  798. doctors: [],
  799. current_select_record: null,
  800. show_dialog: false,
  801. show_edit_dialog: false,
  802. uploading_new_record: false,
  803. templates: this.$store.getters.configlist.course_disease,
  804. select_template: '',
  805. new_content: '',
  806. edit_new_content: '',
  807. edit_course_of_disease_time: '',
  808. selectingRows: [],
  809. table_current_index: -1,
  810. edit_current_id: 0,
  811. edit_title: '',
  812. ids:"",
  813. idArr:[],
  814. org_id:0,
  815. add_index:0,
  816. disabled:true,
  817. template_dialog:false,
  818. library_dialog:false,
  819. auto_dialog:false,
  820. blood_dialog:false,
  821. summary_dialog:false,
  822. weight_dialog:false,
  823. option_dialog:false,
  824. advice_dialog:false,
  825. Inspect_dialog:false,
  826. checked:false,
  827. quzhi_date:1,
  828. start_date:'',
  829. end_date:'',
  830. start_date1:'',
  831. end_date1:'',
  832. quzhi_options:[{value:1,label:'本周'},{value:2,label:'上周'},{value:3,label:'本月'},{value:4,label:'上月'},],
  833. tableData:[],
  834. admin_user_id:"",
  835. record_date:moment(new Date()).format('YYYY-MM-DD HH:mm:ss'),
  836. template_name:"",
  837. id:0,
  838. doctorOptions:[],
  839. template_content:"",
  840. template_id:0,
  841. title:"",
  842. templateList:[],
  843. prescription:[],
  844. berforList:[],
  845. monitorList:[],
  846. dryweightList:[],
  847. inpectionList:[],
  848. dialysisOrderList:[],
  849. patient:{},
  850. AuToShow:false,
  851. num:"",
  852. longAdvice:[],
  853. groupPrescriptionList:[],
  854. afterList:[],
  855. max_blood_flow_volume:"",
  856. max_befor_systolic_blood_pressure:"",
  857. min_befor_systolic_blood_pressure:"",
  858. max_befor_diastolic_blood_pressure:"",
  859. min_befor_diastolic_blood_pressure:"",
  860. max_after_systolic_blood_pressure:"",
  861. min_after_systolic_blood_pressure:"",
  862. max_after_diastolic_blood_pressure:"",
  863. min_after_diastolic_blood_pressure:"",
  864. max_monitor_systolic_blood_pressure:"",
  865. min_monitor_systolic_blood_pressure:"",
  866. max_monitor_diastolic_blood_pressure:"",
  867. min_monitor_diastolic_blood_pressure:"",
  868. lastDryWeight:{},
  869. patientVascularAccess:{},
  870. lastBefor:{},
  871. Inspect:[],
  872. textcontent:'',
  873. bloodList:[
  874. {date:'2024-12-14',mode:'HD',
  875. content:'2024-12-14(HD) 透前血压:150/66mmHg;监测记录:150/66mmHg,拒测/拒测mmHg,142/69mmHg,拒测/拒测mmHg,145/69mmHg;透后血压:145/69mmHg。'
  876. },
  877. {date:'2024-12-12',mode:'HD',
  878. content:'2024-12-12(HD) 透前血压:150/66mmHg;监测记录:150/66mmHg,拒测/拒测mmHg,142/69mmHg,拒测/拒测mmHg,145/69mmHg;透后血压:145/69mmHg。'}
  879. ],
  880. weightlist:[],
  881. optionlist:[{start:'启',mode:'HD',content:''},{start:'启',mode:'HDF',content:''}],
  882. advicelist:[{date:'2024-12-17 07:13',name:'非布司他片',guige:'40mg*16T',danci:'25 mg',geiyao:'口服',pinlv:'qn',beizhu:'40mg*16T',tingzhi:'',yuanyin:'口服',yisheng:'qn',},
  883. {date:'2024-12-17 07:13',name:'非布司他片',guige:'40mg*16T',danci:'25 mg',geiyao:'口服',pinlv:'qn',beizhu:'40mg*16T',tingzhi:'',yuanyin:'口服',yisheng:'qn',}
  884. ],
  885. Inspectlist:[{id:'0001',name:'传染病四项',child:[{c_id:1,pater_id:"0001",date:'2024-12-17 07:13',text:'传染病四项 - 检验日期:2024-06-12;HbsAg阴性;抗-HCV阴性;抗-HIV阴性; 梅毒TP阴性;'},
  886. {c_id:2,pater_id:"0001",date:'2024-12-14 07:13',text:'传染病四项 - 检验日期:2024-06-12;HbsAg阴性;抗-HCV阴性;抗-HIV阴性; 梅毒TP阴性;'},{c_id:3,pater_id:"0001",date:'2024-12-17 07:13',text:''},{c_id:4,pater_id:"0001",date:'2024-12-14 07:13',text:''}]},
  887. {id:'0002',name:'铁五项',child:[{c_id:1,pater_id:"0002",date:'2024-12-15 07:13',text:''},{c_id:2,pater_id:"0002",date:'2024-12-16 07:13',text:''}]}
  888. ],
  889. bloodRows:[],
  890. summaryRows:[],
  891. weightRows:[],
  892. optionRows:[],
  893. adviceRows:[],
  894. activeNames:[],
  895. InspectRows:[],
  896. blood_context:'',
  897. summary_context:'',
  898. weight_context:'',
  899. option_context:'',
  900. advice_context:'',
  901. Inspect_context:'',
  902. blood_date:2,
  903. advice_type:2,
  904. advice_status:1,
  905. date_options:[{value:1,label:'当天'},{value:2,label:'最近七天'},{value:3,label:'最近30天'},{value:4,label:'本周'},
  906. {value:5,label:'上周'},{value:6,label:'本月'},{value:7,label:'上月'},{value:8,label:'今年一季度'},
  907. {value:9,label:'今年二季度'},{value:10,label:'今年三季度'},{value:11,label:'今年四季度'},{value:12,label:'今年上半年'},
  908. {value:13,label:'今年下半年'},{value:14,label:'今年'},{value:15,label:'上一年'},{value:16,label:'自定义'},
  909. ],
  910. type_option:[{value:1,label:'不限'},{value:2,label:'长期医嘱'},{value:3,label:'临时医嘱'}],
  911. status_option:[{value:1,label:'不限'},{value:2,label:'未停止'},{value:3,label:'已停止'}],
  912. monitorListOne:[],
  913. monitor_blood_context:"",
  914. summaryList:[],
  915. dryWeightList:[],
  916. adviceList:[],
  917. newInspectionList:[],
  918. newInspectionListOne:[],
  919. inspect_context:"",
  920. inspectionList:[],
  921. newIds:[],
  922. adviceNewList:[],
  923. all_select:0,
  924. systemPrescritpionList:[]
  925. }
  926. },
  927. created() {
  928. this.admin_user_id = this.$store.getters.xt_user.user.id
  929. if(this.admin_user_id == 0){
  930. this.admin_user_id = ""
  931. }
  932. this.patient_id = parseInt(this.$route.query.id)
  933. this.org_id = this.$store.getters.xt_user.template_info.org_id;
  934. if (isNaN(this.patient_id) || this.patient_id <= 0) {
  935. this.$notify.error({
  936. title: '错误',
  937. message: '无效的id'
  938. })
  939. this.$router.push('/patients/patients')
  940. return
  941. }
  942. // const ceshi = ``
  943. // // const ceshi=`hellow word`
  944. // this.new_content = ceshi
  945. // this.$refs.editor.contents=ceshi
  946. // this.start_date = this.getFirstDayOfWeek(new Date())
  947. // this.end_date = this.getTime(new Date())
  948. this.fetchAllDoctorAndNurse()
  949. this.getlist()
  950. },
  951. methods: {
  952. getModeId(mode_id){
  953. var mode_name = ""
  954. if(mode_id == 1){
  955. mode_name ="HD"
  956. }
  957. if(mode_id == 2){
  958. mode_name ="HDF"
  959. }
  960. if(mode_id == 3){
  961. mode_name ="HD+HP"
  962. }
  963. if(mode_id == 4){
  964. mode_name ="HP"
  965. }
  966. if(mode_id == 5){
  967. mode_name ="HF"
  968. }
  969. if(mode_id == 6){
  970. mode_name ="SCUF"
  971. }
  972. if(mode_id == 7){
  973. mode_name ="IUF"
  974. }
  975. if(mode_id == 8){
  976. mode_name ="HFHD"
  977. }
  978. if(mode_id == 9){
  979. mode_name ="HFHD+HP"
  980. }
  981. if(mode_id == 10){
  982. mode_name ="PHF"
  983. }
  984. if(mode_id == 11){
  985. mode_name ="HFR"
  986. }
  987. if(mode_id == 12){
  988. mode_name ="HDF+HP"
  989. }
  990. if(mode_id == 13){
  991. mode_name ="CRRT"
  992. }
  993. if(mode_id == 14){
  994. mode_name ="腹水回输"
  995. }
  996. if(mode_id == 19){
  997. mode_name ="IUF+HD"
  998. }
  999. if(mode_id == 20){
  1000. mode_name ="UF"
  1001. }
  1002. if(mode_id == 21){
  1003. mode_name ="HD+"
  1004. }
  1005. if(mode_id == 22){
  1006. mode_name ="血浆胆红素吸附+HDF"
  1007. }
  1008. if(mode_id == 23){
  1009. mode_name ="血浆胆红素吸附"
  1010. }
  1011. if(mode_id == 24){
  1012. mode_name ="I-HDF"
  1013. }
  1014. if(mode_id == 25){
  1015. mode_name ="HD高通"
  1016. }
  1017. if(mode_id == 26){
  1018. mode_name ="CVVH"
  1019. }
  1020. if(mode_id == 27){
  1021. mode_name ="CVVHD"
  1022. }
  1023. if(mode_id == 28){
  1024. mode_name ="CVVHDF"
  1025. }
  1026. if(mode_id == 29){
  1027. mode_name ="PE"
  1028. }
  1029. if(mode_id == 30){
  1030. mode_name ="血浆胆红素吸附+HP"
  1031. }
  1032. if(mode_id == 31){
  1033. mode_name ="HPD"
  1034. }
  1035. if(mode_id == 32){
  1036. mode_name ="HDP"
  1037. }
  1038. if(mode_id == 33){
  1039. mode_name = "HFD"
  1040. }
  1041. if(mode_id == 34){
  1042. mode_name = "HDF100"
  1043. }
  1044. if(mode_id == 35){
  1045. mode_name = "HDF600"
  1046. }
  1047. if(mode_id == 36){
  1048. mode_name = "HDF800"
  1049. }
  1050. if(mode_id == 37){
  1051. mode_name = "HDF1000"
  1052. }
  1053. if(mode_id == 38){
  1054. mode_name = "HDF80"
  1055. }
  1056. if(mode_id == 39){
  1057. mode_name = "HF16"
  1058. }
  1059. if(mode_id == 40){
  1060. mode_name = "HD(无肝素)"
  1061. }
  1062. if(mode_id == 41){
  1063. mode_name = "HDF17H"
  1064. }
  1065. if(mode_id == 42){
  1066. mode_name = "HD."
  1067. }
  1068. if(mode_id == 43){
  1069. mode_name = "HD(2)"
  1070. }
  1071. if(mode_id == 44){
  1072. mode_name = "导管溶栓"
  1073. }
  1074. return mode_name
  1075. },
  1076. getAnticoagulantName(val){
  1077. var anticoagulant_name = ""
  1078. if(val == 1){
  1079. anticoagulant_name = "无肝素"
  1080. }
  1081. if(val == 2){
  1082. anticoagulant_name = "普通肝素"
  1083. }
  1084. if(val == 3){
  1085. anticoagulant_name = "低分子肝素"
  1086. }
  1087. if(val == 4){
  1088. anticoagulant_name = "阿加曲班"
  1089. }
  1090. if(val == 5){
  1091. anticoagulant_name = "枸橼酸钠"
  1092. }
  1093. if(val == 6){
  1094. anticoagulant_name = "低分子肝素钙"
  1095. }
  1096. if(val == 7){
  1097. anticoagulant_name = "低分子肝素钠"
  1098. }
  1099. if(val == 8){
  1100. anticoagulant_name = "依诺肝素"
  1101. }
  1102. if(val == 9){
  1103. anticoagulant_name = "达肝素"
  1104. }
  1105. if(val == 10){
  1106. anticoagulant_name = "体外抗凝"
  1107. }
  1108. if(val == 11){
  1109. anticoagulant_name = "那屈肝素"
  1110. }
  1111. if(val == 12){
  1112. anticoagulant_name = "无抗凝剂"
  1113. }
  1114. if(val == 13){
  1115. anticoagulant_name = "那屈肝素钙"
  1116. }
  1117. if(val == 14){
  1118. anticoagulant_name = "肝素钙注射液"
  1119. }
  1120. if(val == 15){
  1121. anticoagulant_name = "甲磺酸萘莫司他"
  1122. }
  1123. if(val == 16){
  1124. anticoagulant_name = "低分子量肝素钙"
  1125. }
  1126. if(val == 17){
  1127. anticoagulant_name = "肝素钠"
  1128. }
  1129. if(val == 18){
  1130. anticoagulant_name = "贝米肝素钠注射液"
  1131. }
  1132. if(val == 19){
  1133. anticoagulant_name = "低分子量肝素钠"
  1134. }
  1135. return anticoagulant_name
  1136. },
  1137. getAnticoagulantUnit(val){
  1138. var anticoagulant_name = ""
  1139. if(val == 1){
  1140. anticoagulant_name = "mg"
  1141. }
  1142. if(val == 2){
  1143. anticoagulant_name = "IU"
  1144. }
  1145. if(val == 3){
  1146. anticoagulant_name = "IU"
  1147. }
  1148. if(val == 4){
  1149. anticoagulant_name = "mg"
  1150. }
  1151. if(val == 5){
  1152. anticoagulant_name = "ml/h"
  1153. }
  1154. if(val == 6){
  1155. anticoagulant_name = "IU"
  1156. }
  1157. if(val == 7){
  1158. anticoagulant_name = "IU"
  1159. }
  1160. if(val == 8){
  1161. anticoagulant_name = "IU"
  1162. }
  1163. if(val == 9){
  1164. anticoagulant_name = "IU/h"
  1165. }
  1166. if(val == 10){
  1167. anticoagulant_name = "mg/h"
  1168. }
  1169. if(val == 11){
  1170. anticoagulant_name = "mg/h"
  1171. }
  1172. if(val == 12){
  1173. anticoagulant_name = "mg/h"
  1174. }
  1175. if(val == 13){
  1176. anticoagulant_name = "mg/h"
  1177. }
  1178. if(val == 14){
  1179. anticoagulant_name = "iu/h"
  1180. }
  1181. if(val == 15){
  1182. anticoagulant_name = "mg/h"
  1183. }
  1184. if(val == 16){
  1185. anticoagulant_name = "iu/h"
  1186. }
  1187. if(val == 17){
  1188. anticoagulant_name = "mg/h"
  1189. }
  1190. if(val == 18){
  1191. anticoagulant_name = "iu/h"
  1192. }
  1193. if(val == 19){
  1194. anticoagulant_name = "iu/h"
  1195. }
  1196. return anticoagulant_name
  1197. },
  1198. changStartDate(val){
  1199. this.start_date = val
  1200. },
  1201. changEndDate(val){
  1202. this.end_date = val
  1203. },
  1204. datachange(val){
  1205. if(val ==1){
  1206. this.start_date = this.getFirstDayOfWeek(new Date())
  1207. this.end_date = this.getTime(new Date())
  1208. }else if(val ==2){
  1209. this.getlastweek(new Date())
  1210. }else if(val ==3){
  1211. this.start_date = this.getFirstDayOfMonth(new Date())
  1212. this.end_date = this.getTime(new Date())
  1213. }else if(val ==4){
  1214. this.start_date = this.getLastMonthFirstDay()
  1215. this.end_date = this.getLastMonthLastDay()
  1216. }
  1217. },
  1218. toAdviceContentPint(val){
  1219. console.log('blood_context',this.blood_context,this.template_content);
  1220. this.template_content = this.template_content +'<br/>'+ this.blood_context+'<br/>'+this.summary_context +'<br/>' +this.advice_context+'<br/>'+this.option_context
  1221. this.$refs.editor.contents = this.template_content
  1222. const iframe = document.getElementsByClassName('edui-editor-iframeholder')[0].getElementsByTagName('iframe')[0].contentDocument.getElementsByTagName('body')[0]
  1223. this.$nextTick(()=>{
  1224. const new_list=document.createElement('table')
  1225. new_list.style.cssText='border:1px solid black;border-collapse:collapse;width:100%';
  1226. let newListItem1 = document.createElement('tr');
  1227. let new_td1 = document.createElement('td');
  1228. let new_td2 = document.createElement('td');
  1229. let new_td3 = document.createElement('td');
  1230. let new_td4 = document.createElement('td');
  1231. let new_td5 = document.createElement('td');
  1232. let new_td6 = document.createElement('td');
  1233. let new_td7 = document.createElement('td');
  1234. let new_td8 = document.createElement('td');
  1235. let new_td9 = document.createElement('td');
  1236. let new_td10 = document.createElement('td');
  1237. new_td1.textContent ='开始时间'
  1238. new_td2.textContent ='医嘱名称'
  1239. new_td3.textContent ='规格'
  1240. new_td4.textContent ='单次用量'
  1241. new_td5.textContent ='给药途径'
  1242. new_td6.textContent ='执行频率'
  1243. new_td7.textContent ='备注'
  1244. new_td8.textContent ='停止时间/执行时间'
  1245. new_td9.textContent ='停止原因'
  1246. new_td10.textContent ='停嘱医生'
  1247. newListItem1.appendChild(new_td1);
  1248. newListItem1.appendChild(new_td2);
  1249. newListItem1.appendChild(new_td3);
  1250. newListItem1.appendChild(new_td4);
  1251. newListItem1.appendChild(new_td5);
  1252. newListItem1.appendChild(new_td6);
  1253. newListItem1.appendChild(new_td7);
  1254. newListItem1.appendChild(new_td8);
  1255. newListItem1.appendChild(new_td9);
  1256. newListItem1.appendChild(new_td10);
  1257. new_list.appendChild(newListItem1)
  1258. if(this.adviceList!=null && this.adviceList.length>0 && this.all_select == 0){
  1259. for(let i in this.adviceList){
  1260. let newListItem2 = document.createElement('tr');
  1261. let new_td1 = document.createElement('td');
  1262. let new_td2 = document.createElement('td');
  1263. let new_td3 = document.createElement('td');
  1264. let new_td4 = document.createElement('td');
  1265. let new_td5 = document.createElement('td');
  1266. let new_td6 = document.createElement('td');
  1267. let new_td7 = document.createElement('td');
  1268. let new_td8 = document.createElement('td');
  1269. let new_td9 = document.createElement('td');
  1270. let new_td10 = document.createElement('td');
  1271. new_td1.textContent =this.getTimeThree(this.adviceList[i].start_time)
  1272. new_td2.textContent =this.adviceList[i].advice_name
  1273. new_td3.textContent =this.adviceList[i].advice_desc
  1274. new_td4.textContent =this.adviceList[i].single_dose
  1275. new_td5.textContent =this.adviceList[i].delivery_way
  1276. new_td6.textContent =this.adviceList[i].execution_frequency
  1277. new_td7.textContent =this.adviceList[i].remark
  1278. if(this.adviceList[i].advice_type == 1){
  1279. new_td8.textContent =this.getTimeThree(this.adviceList[i].stop_time)
  1280. }else{
  1281. new_td8.textContent =this.getTimeThree(this.adviceList[i].execution_time)
  1282. }
  1283. new_td9.textContent =this.adviceList[i].stop_reason
  1284. new_td10.textContent =this.getDocName(this.adviceList[i].advice_doctor)
  1285. newListItem2.appendChild(new_td1);
  1286. newListItem2.appendChild(new_td2);
  1287. newListItem2.appendChild(new_td3);
  1288. newListItem2.appendChild(new_td4);
  1289. newListItem2.appendChild(new_td5);
  1290. newListItem2.appendChild(new_td6);
  1291. newListItem2.appendChild(new_td7);
  1292. newListItem2.appendChild(new_td8);
  1293. newListItem2.appendChild(new_td9);
  1294. newListItem2.appendChild(new_td10);
  1295. new_list.appendChild(newListItem2)
  1296. }
  1297. }
  1298. if(this.adviceNewList!=null && this.adviceNewList.length>0 && this.all_select == 1){
  1299. for(let i in this.adviceNewList){
  1300. let newListItem2 = document.createElement('tr');
  1301. let new_td1 = document.createElement('td');
  1302. let new_td2 = document.createElement('td');
  1303. let new_td3 = document.createElement('td');
  1304. let new_td4 = document.createElement('td');
  1305. let new_td5 = document.createElement('td');
  1306. let new_td6 = document.createElement('td');
  1307. let new_td7 = document.createElement('td');
  1308. let new_td8 = document.createElement('td');
  1309. let new_td9 = document.createElement('td');
  1310. let new_td10 = document.createElement('td');
  1311. new_td1.textContent =this.getTimeThree(this.adviceNewList[i].start_time)
  1312. new_td2.textContent =this.adviceNewList[i].advice_name
  1313. new_td3.textContent =this.adviceNewList[i].advice_desc
  1314. new_td4.textContent =this.adviceNewList[i].single_dose
  1315. new_td5.textContent =this.adviceNewList[i].delivery_way
  1316. new_td6.textContent =this.adviceNewList[i].execution_frequency
  1317. new_td7.textContent =this.adviceNewList[i].remark
  1318. if(this.adviceNewList[i].advice_type == 1){
  1319. new_td8.textContent =this.getTimeThree(this.adviceNewList[i].stop_time)
  1320. }else{
  1321. new_td8.textContent =this.getTimeThree(this.adviceNewList[i].execution_time)
  1322. }
  1323. new_td9.textContent =this.adviceNewList[i].stop_reason
  1324. new_td10.textContent =this.getDocName(this.adviceNewList[i].advice_doctor)
  1325. newListItem2.appendChild(new_td1);
  1326. newListItem2.appendChild(new_td2);
  1327. newListItem2.appendChild(new_td3);
  1328. newListItem2.appendChild(new_td4);
  1329. newListItem2.appendChild(new_td5);
  1330. newListItem2.appendChild(new_td6);
  1331. newListItem2.appendChild(new_td7);
  1332. newListItem2.appendChild(new_td8);
  1333. newListItem2.appendChild(new_td9);
  1334. newListItem2.appendChild(new_td10);
  1335. new_list.appendChild(newListItem2)
  1336. }
  1337. }
  1338. const cont = iframe.getElementsByClassName('advice_table')[0]
  1339. cont.appendChild(new_list)
  1340. console.log('iframe.appendChild(new_list)',cont);
  1341. console.log('this.advice_context',this.advice_context);
  1342. })
  1343. this.advice_dialog = false
  1344. },
  1345. getCurrentChangeOne(val){
  1346. console.log('bbbbbb1111',val);
  1347. this.$refs.editor.contents = val.content
  1348. this.record_date = ""
  1349. if(val.id > 0){
  1350. this.record_date = this.getTimeThree(val.record_time)
  1351. }else{
  1352. this.record_date = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
  1353. }
  1354. // console.log("record_date----------------",this.record_date)
  1355. this.admin_user_id = val.recorder
  1356. if(this.admin_user_id == 0){
  1357. this.admin_user_id = ""
  1358. }
  1359. this.id = val.id
  1360. this.ids = val.id
  1361. this.title = val.title
  1362. },
  1363. getCurrentChangeTwo(val){
  1364. this.$refs.editorOne.contents = val.content
  1365. this.template_content = ""
  1366. this.template_content = val.content
  1367. this.template_id = val.id
  1368. },
  1369. template_dele(){
  1370. deleteCourseTempalte(this.template_id).then(response=>{
  1371. if(response.data.state == 1){
  1372. var msg = response.data.data.msg
  1373. this.$message.success("删除成功!")
  1374. this.library_dialog = false
  1375. this.getPatientCoureOfTempalateOne()
  1376. }
  1377. })
  1378. },
  1379. getPatientCoureOfTempalateOne(){
  1380. },
  1381. rowclick(){
  1382. },
  1383. saveTemplate(){
  1384. var params = {
  1385. title:this.title,
  1386. content: this.$refs.editor.contents,
  1387. }
  1388. saveCoureseTemplateTitle(params).then(response=>{
  1389. if(response.data.state == 1){
  1390. var courseTemplate = response.data.data.courseTemplate
  1391. this.$message.success("保存成功!")
  1392. this.template_dialog = false
  1393. }
  1394. })
  1395. },
  1396. template_save(){
  1397. var params = {
  1398. template_id:this.template_id,
  1399. content:this.$refs.editorOne.contents
  1400. }
  1401. saveCourseOfNewTemplate(params).then(response=>{
  1402. if(response.data.state == 1){
  1403. var msg = response.data.data.msg
  1404. this.$message.success("保存成功")
  1405. this.library_dialog = false
  1406. }
  1407. })
  1408. },
  1409. getDocName(admin_user_id){
  1410. var user_name = ""
  1411. for(let i=0;i<this.doctorOptions.length;i++){
  1412. if(admin_user_id == this.doctorOptions[i].admin_user_id){
  1413. user_name = this.doctorOptions[i].user_name
  1414. }
  1415. }
  1416. return user_name
  1417. },
  1418. getlist(){
  1419. var params = {
  1420. patient_id:this.patient_id
  1421. }
  1422. getPatientCourseOfDiseaseList(params).then(response=>{
  1423. if(response.data.state == 1){
  1424. var list = response.data.data.list
  1425. this.tableData = []
  1426. this.tableData = list
  1427. }
  1428. })
  1429. },
  1430. fetchAllDoctorAndNurse() {
  1431. fetchMoibleAllDoctorAndNurse().then(response => {
  1432. if (response.data.state == 1) {
  1433. this.doctorOptions= []
  1434. this.doctorOptions = response.data.data.doctors;
  1435. }
  1436. });
  1437. },
  1438. add_click(){
  1439. this.record_date = ""
  1440. this.record_date = moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
  1441. this.admin_user_id = ""
  1442. this.admin_user_id = this.$store.getters.xt_user.user.id
  1443. this.fetchAllDoctorAndNurse()
  1444. this.$refs.editor.contents = ""
  1445. this.id = 0
  1446. this.disabled = false
  1447. this.add_index = 1
  1448. },
  1449. showCancel(){
  1450. this.add_index = 0
  1451. this.disabled = true
  1452. },
  1453. showSave(){
  1454. this.add_index = 0
  1455. this.disabled = true
  1456. console.log("haaaaaaaaaaaaaaa",this.record_date)
  1457. this.getlist()
  1458. if(this.record_date.length == 0) {
  1459. this.$message.error('请选择时间')
  1460. return
  1461. }
  1462. this.new_content = this.$refs.editor.contents
  1463. if (this.new_content.length == 0) {
  1464. this.$message.error('请填写病程内容')
  1465. return
  1466. }
  1467. if(this.admin_user_id == ""){
  1468. this.admin_user_id = 0
  1469. }
  1470. var params = {
  1471. id:this.id,
  1472. patient_id:this.patient_id,
  1473. record_date:this.record_date,
  1474. content:this.new_content,
  1475. admin_user_id:this.admin_user_id,
  1476. title:this.title
  1477. }
  1478. console.log("params",params)
  1479. createNewCourseOfDiseaseRecord(params).then(response => {
  1480. if(response.data.state == 1){
  1481. var msg = response.data.data.msg
  1482. this.$message.success("保存成功!")
  1483. this.getlist()
  1484. }
  1485. }).catch(error => {
  1486. })
  1487. },
  1488. template_click(){
  1489. console.log('this.add_index',this.add_index);
  1490. if(this.add_index ==0){
  1491. this.template_dialog = true
  1492. }else{
  1493. getPatientCoureOfTempalate().then(response=>{
  1494. if(response.data.state == 1){
  1495. this.library_dialog = true
  1496. this.templateList = response.data.data.templateList
  1497. console.log("hahhahahaha",this.$refs)
  1498. if(this.templateList!=null && this.templateList.length>0){
  1499. this.$refs.record_table_one.setCurrentRow(this.templateList[0])
  1500. }
  1501. console.log("haaaaaaaaaaaaa",this.templateList)
  1502. }
  1503. })
  1504. }
  1505. },
  1506. auto_click(){
  1507. this.start_date = this.getFirstDayOfWeek(new Date())
  1508. this.end_date = this.getTime(new Date())
  1509. this.getAutoPatientContent()
  1510. // this.auto_dialog = true
  1511. },
  1512. // 季度第一天
  1513. getquarterstart(index,number){
  1514. const currentYear = new Date().getFullYear();
  1515. const Start = this.timeFormat(new Date(currentYear, index, number));
  1516. return Start
  1517. },
  1518. // 季度最后一天
  1519. getquarterend(index,number){
  1520. const currentYear = new Date().getFullYear();
  1521. const End = this.timeFormat(new Date(currentYear, index, number));
  1522. return End
  1523. },
  1524. // 日期格式化
  1525. timeFormat(date) {
  1526. if (!date || typeof(date) === "string") {
  1527. this.error("参数异常,请检查...");
  1528. }
  1529. var y = date.getFullYear(); //年
  1530. if(date.getMonth() + 1<10){
  1531. var m ='0'+(date.getMonth() + 1); //月
  1532. }else{
  1533. var m =date.getMonth() + 1; //月
  1534. }
  1535. if(date.getDate()<10){
  1536. var d ='0'+date.getDate(); //日
  1537. }else{
  1538. var d = date.getDate(); //日
  1539. }
  1540. // var d = date.getDate(); //日
  1541. return y + "-" + m + "-" + d;
  1542. },
  1543. requestCourseRecords: function() {
  1544. this.loading = true
  1545. getCourseOfDiseaseRecords(this.patient_id, this.start_time, this.end_time).then(rs => {
  1546. this.loading = false
  1547. var resp = rs.data
  1548. if (resp.state == 1) {
  1549. this.current_select_record = null
  1550. this.records = resp.data.records
  1551. console.log("records232322332323232323223",this.records)
  1552. this.doctors = resp.data.doctors
  1553. } else {
  1554. this.$message.error(resp.msg)
  1555. }
  1556. }).catch(error => {
  1557. this.loading = false
  1558. this.$message.error(error)
  1559. })
  1560. },
  1561. didChangeCurrentRecord: function(record) {
  1562. this.current_select_record = record
  1563. },
  1564. recordTime: function(timestamp) {
  1565. var time = new Date(timestamp * 1000)
  1566. return parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
  1567. },
  1568. doctorName: function(doctor_id) {
  1569. for (let index = 0; index < this.doctors.length; index++) {
  1570. const doctor = this.doctors[index]
  1571. if (doctor.id == doctor_id) {
  1572. return doctor.name
  1573. }
  1574. }
  1575. return ''
  1576. },
  1577. modifyAction: function() {
  1578. this.edit_new_content = this.$refs.edit_neditor.content
  1579. if (this.edit_new_content.length == 0) {
  1580. this.$message.error('请填写病程内容')
  1581. return
  1582. }
  1583. this.uploading_new_record = true
  1584. modifyCourseOfDiseaseRecord(this.patient_id, this.edit_new_content, this.edit_course_of_disease_time, this.edit_current_id, this.edit_title).then(rs => {
  1585. this.uploading_new_record = false
  1586. var resp = rs.data
  1587. if (resp.state == 1) {
  1588. this.records[this.table_current_index].content = resp.data.record.content
  1589. this.records[this.table_current_index].record_time = resp.data.record.record_time
  1590. this.records[this.table_current_index].recorder = resp.data.record.recorder
  1591. this.records[this.table_current_index].title = resp.data.record.title
  1592. this.show_edit_dialog = false
  1593. this.edit_new_content = ''
  1594. this.table_current_index = -1
  1595. } else {
  1596. this.table_current_index = -1
  1597. this.$message.error(resp.msg)
  1598. }
  1599. }).catch(error => {
  1600. this.table_current_index = -1
  1601. this.uploading_new_record = false
  1602. this.$message.error(error)
  1603. })
  1604. },
  1605. autotext_click(){
  1606. if(this.start_date == ""){
  1607. this.$message.error("请选择开始时间")
  1608. }
  1609. if(this.end_date == ""){
  1610. this.$message.error("请选择结束时间")
  1611. }
  1612. var params = {
  1613. start_time:this.start_date,
  1614. end_time:this.end_date,
  1615. patient_id:this.patient_id,
  1616. }
  1617. console.log("start_time==============",params)
  1618. getAutoPatientContent(params).then(response=>{
  1619. if(response.data.state == 1){
  1620. var prescription = response.data.data.prescription
  1621. this.prescription=[]
  1622. this.prescription = prescription
  1623. var berfor = response.data.data.berfor
  1624. this.berforList = []
  1625. this.berforList = berfor
  1626. var monitorList = response.data.data.monitorList
  1627. this.monitorList = []
  1628. this.monitorList = monitorList
  1629. var dryweightList = response.data.data.dryweightList
  1630. this.dryweightList = []
  1631. this.dryweightList = dryweightList
  1632. var inpectionList = response.data.data.inpectionList
  1633. this.inpectionList = []
  1634. this.inpectionList = inpectionList
  1635. var patient = response.data.data.patient
  1636. if(patient.gender == 1){
  1637. patient.gender_name = "男"
  1638. }
  1639. if(patient.gender == 2){
  1640. patient.gender_name = "女"
  1641. }
  1642. this.patient = patient
  1643. var dialysisOrderList =response.data.data.dialysisOrder
  1644. this.dialysisOrderList = []
  1645. this.dialysisOrderList = dialysisOrderList
  1646. var longAdvice = response.data.data.longAdvice
  1647. this.longAdvice = []
  1648. this.longAdvice = longAdvice
  1649. this.groupPrescriptionList = []
  1650. this.groupPrescriptionList = response.data.data.groupPrescriptionList
  1651. this.afterList = response.data.data.after
  1652. this.max_blood_flow_volume = response.data.data.max_blood_flow_volume
  1653. this.max_befor_systolic_blood_pressure = response.data.data.max_befor_systolic_blood_pressure
  1654. this.min_befor_systolic_blood_pressure = response.data.data.min_befor_systolic_blood_pressure
  1655. this.max_befor_diastolic_blood_pressure = response.data.data.max_befor_diastolic_blood_pressure
  1656. this.min_befor_diastolic_blood_pressure = response.data.data.min_befor_diastolic_blood_pressure
  1657. this.max_after_systolic_blood_pressure = response.data.data.max_after_systolic_blood_pressure
  1658. this.min_after_systolic_blood_pressure = response.data.data.min_after_systolic_blood_pressure
  1659. this.max_after_diastolic_blood_pressure = response.data.data.max_after_diastolic_blood_pressure
  1660. this.min_after_diastolic_blood_pressure = response.data.data.min_after_diastolic_blood_pressure
  1661. this.max_monitor_systolic_blood_pressure = response.data.data.max_monitor_systolic_blood_pressure
  1662. this.min_monitor_systolic_blood_pressure = response.data.data.min_monitor_systolic_blood_pressure
  1663. this.max_monitor_diastolic_blood_pressure = response.data.data.max_monitor_diastolic_blood_pressure
  1664. this.min_monitor_diastolic_blood_pressure = response.data.data.min_monitor_diastolic_blood_pressure
  1665. this.lastDryWeight = response.data.data.lastDryWeight
  1666. this.patientVascularAccess = response.data.data.patientVascularAccess
  1667. this.lastBefor = response.data.data.lastBefor
  1668. var hd_total =0
  1669. var hdArr =[]
  1670. var hdf_total =0
  1671. var hdfArr=[]
  1672. var hdhp_total = 0
  1673. var hdhpArr = []
  1674. var hp_total = 0
  1675. var hpArr= []
  1676. var hf_total = 0
  1677. var hfArr = []
  1678. var scuf_total =0
  1679. var scufArr = []
  1680. var iuf_total =0
  1681. var iufArr = []
  1682. var hfhd_total =0
  1683. var hfhdArr = []
  1684. var hfhdhp_total =0
  1685. var hfhdhpArr = []
  1686. var phf_total =0
  1687. var phfArr = []
  1688. var hdfhp_total =0
  1689. var hdfhpArr = []
  1690. var crrt_total =0
  1691. var crrtArr = []
  1692. var iufhd_total =0
  1693. var iufhdArr = []
  1694. var uf_total =0
  1695. var ufArr = []
  1696. var hdjia_total =0
  1697. var hdjiaArr = []
  1698. var ihdf_total =0
  1699. var ihdfArr = []
  1700. var hdgaotong_total =0
  1701. var hdgaotongArr = []
  1702. var cvvh_total =0
  1703. var cvvhArr = []
  1704. var cvvhd_total =0
  1705. var cvvhdArr = []
  1706. var cvvhdf_total =0
  1707. var cvvhdfArr = []
  1708. var petotal =0
  1709. var peArr=[]
  1710. var hpdtotal =0
  1711. var hpdArr=[]
  1712. var hdptotal=0
  1713. var hdpArr =[]
  1714. var hfdtotal=0
  1715. var hfdArr =[]
  1716. var hdf100total=0
  1717. var hdf100Arr =[]
  1718. var hdf600total=0
  1719. var hdf600Arr =[]
  1720. var hdf100total=0
  1721. var hdf100Arr =[]
  1722. var hdf800total=0
  1723. var hdf800Arr =[]
  1724. var hdf1000total=0
  1725. var hdf1000Arr =[]
  1726. var hdf80total=0
  1727. var hdf80Arr =[]
  1728. var hf16total=0
  1729. var hf16Arr =[]
  1730. var hdwugantotal=0
  1731. var hdwuganArr =[]
  1732. var hdf17total=0
  1733. var hdf17Arr =[]
  1734. var hddiantotal=0
  1735. var hddianArr =[]
  1736. var hd2total=0
  1737. var hd2Arr =[]
  1738. var total_count = 0
  1739. var total_min = 0
  1740. var total_hour = 0
  1741. var total_hour_str =""
  1742. var dialyzerPerfusionApparatus = []
  1743. var dialyzerArr = []
  1744. var dialysisStrainerArr = []
  1745. var dialysisIrrigationArr = []
  1746. var kaliumArr= []
  1747. var sodiumArr= []
  1748. var calciumArr= []
  1749. var bicarbonateArr = []
  1750. var prescriptionSodiumArr = []
  1751. if(this.dialysisOrderList!=null&&this.dialysisOrderList.length>0){
  1752. total_count = this.dialysisOrderList.length
  1753. }
  1754. total_count = this.dialysisOrderList.length
  1755. if(this.prescription!=null && this.prescription.length>0){
  1756. for(let i=0;i< this.prescription.length;i++){
  1757. if( this.prescription[i].dialyzer_perfusion_apparatus!=""){
  1758. dialyzerPerfusionApparatus.push( this.prescription[i].dialyzer_perfusion_apparatus)
  1759. }
  1760. if(this.prescription[i].dialysis_dialyszers!=""){
  1761. dialyzerArr.push( this.prescription[i].dialysis_dialyszers)
  1762. }
  1763. if(this.prescription[i].dialysis_strainer!=""){
  1764. dialysisStrainerArr.push( this.prescription[i].dialysis_strainer)
  1765. }
  1766. if(this.prescription[i].dialysis_irrigation!=""){
  1767. dialysisIrrigationArr.push( this.prescription[i].dialysis_irrigation)
  1768. }
  1769. if( this.prescription[i].kalium!=""){
  1770. kaliumArr.push(this.prescription[i].kalium)
  1771. }
  1772. if( this.prescription[i].sodium!=""){
  1773. sodiumArr.push(this.prescription[i].kalium)
  1774. }
  1775. if( this.prescription[i].calcium!=""){
  1776. calciumArr.push(this.prescription[i].calcium)
  1777. }
  1778. if( this.prescription[i].bicarbonate!=""){
  1779. bicarbonateArr.push(this.prescription[i].bicarbonate)
  1780. }
  1781. if( this.prescription[i].prescription_sodium!=""){
  1782. prescriptionSodiumArr.push(this.prescription[i].prescription_sodium)
  1783. }
  1784. total_min += parseInt(this.prescription[i].dialysis_duration_hour *60)+ parseInt(this.prescription[i].dialysis_duration_minute)
  1785. if(this.prescription[i].mode_id == 1){
  1786. hdArr.push(this.prescription[i])
  1787. }
  1788. if(this.prescription[i].mode_id == 2){
  1789. hdfArr.push(this.prescription[i])
  1790. }
  1791. if(this.prescription[i].mode_id == 3){
  1792. hdhpArr.push(this.prescription[i])
  1793. }
  1794. if(this.prescription[i].mode_id == 4){
  1795. hpArr.push(this.prescription[i])
  1796. }
  1797. if(this.prescription[i].mode_id == 5){
  1798. hfArr.push(this.prescription[i])
  1799. }
  1800. if(this.prescription[i].mode_id == 6){
  1801. scufArr.push(this.prescription[i])
  1802. }
  1803. if(this.prescription[i].mode_id == 7){
  1804. iufArr.push(this.prescription[i])
  1805. }
  1806. if(this.prescription[i].mode_id == 8){
  1807. hfhdArr.push(this.prescription[i])
  1808. }
  1809. if(this.prescription[i].mode_id == 9){
  1810. hfhdhpArr.push(this.prescription[i])
  1811. }
  1812. if(this.prescription[i].mode_id == 10){
  1813. phfArr.push(this.prescription[i])
  1814. }
  1815. if(this.prescription[i].mode_id == 11){
  1816. hfArr.push(this.prescription[i])
  1817. }
  1818. if(this.prescription[i].mode_id == 12){
  1819. hdfhpArr.push(this.prescription[i])
  1820. }
  1821. if(this.prescription[i].mode_id == 13){
  1822. crrtArr.push(this.prescription[i])
  1823. }
  1824. if(this.prescription[i].mode_id == 19){
  1825. iufhdArr.push(this.prescription[i])
  1826. }
  1827. if(this.prescription[i].mode_id == 20){
  1828. ufArr.push(this.prescription[i])
  1829. }
  1830. if(this.prescription[i].mode_id == 21){
  1831. hdjiaArr.push(this.prescription[i])
  1832. }
  1833. if(this.prescription[i].mode_id == 24){
  1834. ihdfArr.push(this.prescription[i])
  1835. }
  1836. if(this.prescription[i].mode_id == 25){
  1837. hdgaotongArr.push(this.prescription[i])
  1838. }
  1839. if(this.prescription[i].mode_id == 26){
  1840. cvvhArr.push(this.prescription[i])
  1841. }
  1842. if(this.prescription[i].mode_id == 27){
  1843. cvvhdArr.push(this.prescription[i])
  1844. }
  1845. if(this.prescription[i].mode_id == 28){
  1846. cvvhdfArr.push(this.prescription[i])
  1847. }
  1848. if(this.prescription[i].mode_id == 29){
  1849. peArr.push(this.prescription[i])
  1850. }
  1851. if(this.prescription[i].mode_id == 31){
  1852. hpdArr.push(this.prescription[i])
  1853. }
  1854. if(this.prescription[i].mode_id == 32){
  1855. hdpArr.push(this.prescription[i])
  1856. }
  1857. if(this.prescription[i].mode_id == 33){
  1858. hfdArr.push(this.prescription[i])
  1859. }
  1860. if(this.prescription[i].mode_id == 34){
  1861. hdf100Arr.push(this.prescription[i])
  1862. }
  1863. if(this.prescription[i].mode_id == 35){
  1864. hdf600Arr.push(this.prescription[i])
  1865. }
  1866. if(this.prescription[i].mode_id == 36){
  1867. hdf800Arr.push(this.prescription[i])
  1868. }
  1869. if(this.prescription[i].mode_id == 37){
  1870. hdf1000Arr.push(this.prescription[i])
  1871. }
  1872. if(this.prescription[i].mode_id == 38){
  1873. hdf80Arr.push(this.prescription[i])
  1874. }
  1875. if(this.prescription[i].mode_id == 39){
  1876. hf16Arr.push(this.prescription[i])
  1877. }
  1878. console.log("hf16Arr--------------------",hf16Arr)
  1879. if(this.prescription[i].mode_id == 40){
  1880. hdwuganArr.push(this.prescription[i])
  1881. }
  1882. if(this.prescription[i].mode_id == 41){
  1883. hdf17Arr.push(this.prescription[i])
  1884. }
  1885. if(this.prescription[i].mode_id == 42){
  1886. hddianArr.push(this.prescription[i])
  1887. }
  1888. if( this.prescription[i].mode_id == 43){
  1889. hd2Arr.push(thisprescription[i])
  1890. }
  1891. }
  1892. }
  1893. total_hour = ((total_min/60)/total_count).toFixed(2)
  1894. total_hour_str = total_hour +"小时/次"
  1895. hd_total = hdArr.length
  1896. var hd_str = ""
  1897. if(hd_total>0){
  1898. hd_str = "HD"+ "("+hd_total+")" +"次"
  1899. }
  1900. hdf_total = hdfArr.length
  1901. var hdf_str =""
  1902. if(hdf_total>0){
  1903. hdf_str = "HDF"+ "("+hd_total+")" +"次"
  1904. }
  1905. hdhp_total = hdhpArr.length
  1906. var hdhp_str =""
  1907. if(hdhp_total>0){
  1908. hdhp_str = "HD+HP"+"("+ hdhp_total+")"+"次"
  1909. }
  1910. hp_total = hpArr.length
  1911. var hp_str= ""
  1912. if(hp_total>0){
  1913. hp_str = "HP"+"("+hdptotal+")"+"次"
  1914. }
  1915. hf_total = hfArr.length
  1916. var hf_str = ""
  1917. if(hf_total>0){
  1918. hf_str = "HF "+"("+hf_total+")"+"次"
  1919. }
  1920. var scuf_str = ""
  1921. scuf_total = scufArr.length
  1922. if(scuf_total>0){
  1923. scuf_str = "SCUF"+"("+scuf_total+")"+"次"
  1924. }
  1925. iuf_total = iufArr.length
  1926. var iuf_str= ""
  1927. if(iuf_total>0){
  1928. iuf_str = "IUF"+"("+iuf_total+")"+"次"
  1929. }
  1930. hfhd_total = hfhdArr.length
  1931. var hfhd_str= ""
  1932. if(hfhd_total>0){
  1933. hfhd_str = "HFHD"+"("+hfhd_total+")"+"次"
  1934. }
  1935. hfhdhp_total = hfhdhpArr.length
  1936. var hfhdhp_str =""
  1937. if(hfhdhp_total>0){
  1938. hfhdhp_str = "HFHD+HP"+"("+hfhdhp_total+")"+"次"
  1939. }
  1940. phf_total = phfArr.length
  1941. var phf_str= ""
  1942. if(phf_total>0){
  1943. phf_str = "PHF"+ "(" +phf_total+")" + "次"
  1944. }
  1945. hdfhp_total = hdfhpArr.length
  1946. var hdfhp_str =""
  1947. if(hdfhp_total>0){
  1948. hdfhp_str = "HDFHP"+ "("+ hdfhp_total+")"+"次"
  1949. }
  1950. crrt_total = crrtArr.length
  1951. var crrt_str =""
  1952. if(crrt_total>0){
  1953. crrt_str = "CRRT"+"("+crrt_total+")"+"次"
  1954. }
  1955. iuf_total = iufhdArr.length
  1956. var iuf_str = ""
  1957. if(iuf_total>0){
  1958. iuf_str = "IUF"+"("+iuf_total+")"+"次"
  1959. }
  1960. uf_total = ufArr.length
  1961. var uf_str= ""
  1962. if(uf_total>0){
  1963. uf_str = "UF"+"("+uf_total+")" +"次"
  1964. }
  1965. hdjia_total = hdjiaArr.length
  1966. var hdjia_str =""
  1967. if(hdjia_total>0){
  1968. hdjia_str = "HD+"+"("+hdjia_total+")"+"次"
  1969. }
  1970. ihdf_total = ihdfArr.length
  1971. var ihdf_str = ""
  1972. if(ihdf_total>0){
  1973. ihdf_str = "IHDF"+"("+ihdf_total+")" +"次"
  1974. }
  1975. hdgaotong_total = hdgaotongArr
  1976. var hdgaotong_str = ""
  1977. if(hdgaotong_total>0){
  1978. hdgaotong_str = "HD高通"+"("+hdgaotong_total+")"+"次"
  1979. }
  1980. cvvh_total = cvvhArr.length
  1981. var cvvh_str =""
  1982. if(cvvh_total>0){
  1983. cvvh_str = "CVVH"+"("+cvvh_total+")" + "次"
  1984. }
  1985. cvvhd_total = cvvhdArr.length
  1986. var cvvhd_str = ""
  1987. if(cvvhd_total>0){
  1988. cvvhd_str = "CVVHD"+"("+cvvhd_total+")"+"次"
  1989. }
  1990. cvvhdf_total =cvvhdfArr.length
  1991. var cvvhdf_str = ""
  1992. if(cvvhdf_total>0){
  1993. cvvhdf_str="CVVHDF"+"("+cvvhdf_total+")"+"次"
  1994. }
  1995. petotal = peArr.length
  1996. var pe_str =""
  1997. if(petotal>0){
  1998. pe_str = "PE"+"("+petotal+")"+"次"
  1999. }
  2000. hpdtotal = hpdArr.length
  2001. var hpd_str =""
  2002. if(hpdtotal>0){
  2003. hpd_str = "HDP"+"("+hpdtotal+")"+"次"
  2004. }
  2005. hfdtotal = hfdArr.length
  2006. var hfd_str =""
  2007. if(hfdtotal>0){
  2008. hfd_str ="HFD"+"("+hfdtotal+")" +"次"
  2009. }
  2010. hdf100total = hdf1000Arr.length
  2011. var hdf100str = ""
  2012. if(hdf100total>0){
  2013. hdf100str = "HDF100"+"("+hdf100total+")"+"次"
  2014. }
  2015. hdf600total = hdf600Arr.length
  2016. var hdf600str = ""
  2017. if(hdf600total>0){
  2018. hdf600str = "HDF600"+"("+hdf600tota+")"+"次"
  2019. }
  2020. hdf100total = hdf1000Arr.length
  2021. var hdf1000str = ""
  2022. if(hdf100total>0){
  2023. hdf1000str = "HDF1000"+"("+hdf100total+")"+"次"
  2024. }
  2025. hdf80total = hdf80Arr.length
  2026. var hdf80str = ""
  2027. if(hdf80total>0){
  2028. hdf80str ="HDF80"+"("+hdf80str+")" +"次"
  2029. }
  2030. hf16total = hf16Arr.length
  2031. var hf16str = ""
  2032. if(hf16total>0){
  2033. hf16str = "HF16"+"("+ hf16total +")"+"次"
  2034. }
  2035. hdwugantotal = hdwuganArr.length
  2036. var hdwuganstr = ""
  2037. if(hdwugantotal>0){
  2038. hdwuganstr = "HD无肝素"+"("+hdwugantotal+")"+"次"
  2039. }
  2040. hdf17total = hdf17Arr.length
  2041. var hdf17str = ""
  2042. if(hdf17total>0){
  2043. hdf17str = "HDF17"+"("+hdf17total+")" + "次"
  2044. }
  2045. hddiantotal = hddianArr.length
  2046. var hddianstr = ""
  2047. if(hddiantotal>0){
  2048. hddianstr = "HD."+"("+hddiantotal+")" + "次"
  2049. }
  2050. var hd2str = ""
  2051. hd2total = hd2Arr.length
  2052. if(hd2total>0){
  2053. hd2str = "HD2"+"("+hd2total+")"+"次"
  2054. }
  2055. let dialyzerPerfusionApparatusObj={}
  2056. let dialyzerPerfusionApparatusStr = ""
  2057. let dialyzerArrObj = {}
  2058. let dialyzer_str = ""
  2059. let dialysisStrainerObj = {}
  2060. let dialysisStrainerStr = ""
  2061. let dialysisIrrigationObj = {}
  2062. let dialysisIrrigationStr = ""
  2063. let kaliumObj = {}
  2064. let kaliumStr =""
  2065. let kalium =""
  2066. if(kaliumArr!=null && kaliumArr.length>0){
  2067. kaliumArr.forEach(item => {
  2068. kaliumObj[item] = (kaliumObj[item] + 1) || 1
  2069. })
  2070. }
  2071. if(kaliumObj!=""){
  2072. kaliumStr = JSON.stringify(kaliumObj).replace(/^{|}$/g, '')
  2073. }
  2074. if(kaliumStr!=""){
  2075. var str = kaliumStr.split(":")[0]
  2076. kalium = "钾:" + str.replace(/^"(.*)"$/, '$1')+"."+"0"+"mmol/L" + "(" +kaliumStr.split(":")[1]+")"
  2077. }
  2078. let sodiumObj = {}
  2079. let sodiumStr =""
  2080. let sodium = ""
  2081. if(sodiumArr!=null && sodiumArr.length>0){
  2082. sodiumArr.forEach(item => {
  2083. sodiumObj[item] = (sodiumObj[item] + 1) || 1
  2084. })
  2085. }
  2086. if(sodiumObj!=""){
  2087. sodiumStr = JSON.stringify(sodiumObj).replace(/^{|}$/g, '')
  2088. }
  2089. if(sodiumStr!=""){
  2090. var str = sodiumStr.split(":")[0]
  2091. sodium = "钠:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +sodiumStr.split(":")[1]+")"
  2092. }
  2093. let calciumObj = {}
  2094. let calciumStr =""
  2095. let calcium =""
  2096. if(calciumArr!=null && calciumArr.length>0){
  2097. calciumArr.forEach(item => {
  2098. calciumObj[item] = (calciumObj[item] + 1) || 1
  2099. })
  2100. }
  2101. if(calciumObj!=""){
  2102. calciumStr = JSON.stringify(calciumObj).replace(/^{|}$/g, '')
  2103. }
  2104. if(calciumStr!=""){
  2105. var str = calciumStr.split(":")[0]
  2106. calcium = "钙:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +calciumStr.split(":")[1]+")"
  2107. }
  2108. let bicarbonateObj = {}
  2109. let bicarbonateStr =""
  2110. let bicarbonate = ""
  2111. if(bicarbonateArr!=null && bicarbonateArr.length>0){
  2112. bicarbonateArr.forEach(item => {
  2113. bicarbonateObj[item] = (bicarbonateObj[item] + 1) || 1
  2114. })
  2115. }
  2116. if(bicarbonateObj!=""){
  2117. bicarbonateStr = JSON.stringify(bicarbonateObj).replace(/^{|}$/g, '')
  2118. }
  2119. if(bicarbonateStr!=""){
  2120. var str = bicarbonateStr.split(":")[0]
  2121. bicarbonate = "碳酸氢根:" + str.replace(/^"(.*)"$/, '$1')+"mmol/L" + "(" +bicarbonateStr.split(":")[1]+")"
  2122. }
  2123. if(dialyzerPerfusionApparatus!=null && dialyzerPerfusionApparatus.length>0){
  2124. dialyzerPerfusionApparatus.forEach(item => {
  2125. dialyzerPerfusionApparatusObj[item] = (dialyzerPerfusionApparatusObj[item] + 1) || 1
  2126. })
  2127. }
  2128. if(dialyzerPerfusionApparatus!=null && dialyzerPerfusionApparatus.length>0){
  2129. dialyzerPerfusionApparatus.forEach(item => {
  2130. dialyzerPerfusionApparatusObj[item] = (dialyzerPerfusionApparatusObj[item] + 1) || 1
  2131. })
  2132. }
  2133. if(dialyzerPerfusionApparatusObj!=""){
  2134. dialyzerPerfusionApparatusStr = JSON.stringify(dialyzerPerfusionApparatusObj).replace(/^{|}$/g, '')
  2135. }
  2136. if(dialyzerArr!=null && dialyzerArr.length>0){
  2137. dialyzerArr.forEach(item => {
  2138. dialyzerArrObj[item] = (dialyzerArrObj[item] + 1) || 1
  2139. })
  2140. }
  2141. dialyzer_str = JSON.stringify(dialyzerArrObj).replace(/^{|}$/g, '')
  2142. if(dialysisStrainerArr!=null && dialysisStrainerArr.length>0){
  2143. dialysisStrainerArr.forEach(item => {
  2144. dialysisStrainerObj[item] = (dialysisStrainerObj[item] + 1) || 1
  2145. })
  2146. }
  2147. dialysisStrainerStr = JSON.stringify(dialysisStrainerObj).replace(/^{|}$/g, '')
  2148. if(dialysisIrrigationArr!=null && dialysisIrrigationArr.length>0){
  2149. dialysisIrrigationArr.forEach(item => {
  2150. dialysisIrrigationObj[item] = (dialysisIrrigationObj[item] + 1) || 1
  2151. })
  2152. }
  2153. dialysisIrrigationStr = JSON.stringify(dialysisIrrigationObj).replace(/^{|}$/g, '')
  2154. // 医嘱
  2155. if(this.longAdvice!=null && this.longAdvice.length>0){
  2156. for(let i=0;i<this.longAdvice.length;i++){
  2157. this.longAdvice[i].advice_type_name = ""
  2158. if(this.longAdvice[i].advice_type == 1){
  2159. this.longAdvice[i].advice_type_name = "长期医嘱"
  2160. }
  2161. if(this.longAdvice[i].advice_type == 2){
  2162. this.longAdvice[i].advice_type_name = "长期医嘱"
  2163. }
  2164. if(this.longAdvice[i].stop_state == 1){
  2165. this.longAdvice[i].stop_state_name = "停用"
  2166. }
  2167. if(this.longAdvice[i].stop_state == 2){
  2168. this.longAdvice[i].stop_state_name = "未停用"
  2169. }
  2170. }
  2171. }
  2172. //抗凝剂
  2173. var anticoagulant_str =""
  2174. if(this.groupPrescriptionList!=null && this.groupPrescriptionList.length>0){
  2175. for(let i=0;i<this.groupPrescriptionList.length;i++){
  2176. anticoagulant_str += this.getAnticoagulantName(this.groupPrescriptionList[i].anticoagulant) +"," + "剂量:" +this.groupPrescriptionList[i].MinZongLiang +this.getAnticoagulantUnit(this.groupPrescriptionList[i].anticoagulant)+ "~" +this.groupPrescriptionList[i].MaxZongLiang + this.getAnticoagulantUnit(this.groupPrescriptionList[i].anticoagulant)
  2177. }
  2178. }
  2179. //透前
  2180. var befor_total =0
  2181. var cha_weight = 0
  2182. var befor_weight =0
  2183. var after_weight =0
  2184. var pingjun_weight = 0
  2185. if(this.berforList!=null){
  2186. befor_total = this.berforList.length
  2187. for(let i=0;i<this.berforList.length;i++){
  2188. // cha_weight += this.berforList[i].weight_before - this.berforList[i].WeightAfter
  2189. befor_weight +=this.berforList[i].weight_before
  2190. after_weight += this.berforList[i].WeightAfter
  2191. }
  2192. }
  2193. console.log("befor-weight",befor_weight)
  2194. console.log("after_weight",after_weight)
  2195. pingjun_weight = ((befor_weight-after_weight)/befor_total).toFixed(2)
  2196. //透后凝血
  2197. var cruorNewArr = []
  2198. if(this.afterList!=null && this.afterList.length>0){
  2199. for(let i=0;i<this.afterList.length;i++){
  2200. cruorNewArr.push(this.afterList[i].cruor)
  2201. }
  2202. }
  2203. let dialysisCrruorObj = {}
  2204. let dialysisCrruorStr = ""
  2205. if(cruorNewArr!=null && cruorNewArr.length>0){
  2206. cruorNewArr.forEach(item => {
  2207. dialysisCrruorObj[item] = (dialysisCrruorObj[item] + 1) || 1
  2208. })
  2209. }
  2210. dialysisCrruorStr = JSON.stringify(dialysisCrruorObj).replace(/^{|}$/g, '')
  2211. //监测
  2212. var blood_flow_volume_total = 0
  2213. var ultrafiltration_volume_total = 0
  2214. var ultrafiltration_rate_total = 0
  2215. var total_length = 0
  2216. var pingjun_blood_flow_volume = 0
  2217. var pingjun_ultrafiltration_volume_total = 0
  2218. var pingjun_ultrafiltration_rate_total = 0
  2219. if(this.monitorList!=null && this.monitorList.length>0){
  2220. for(let i=0;i<this.monitorList.length;i++){
  2221. blood_flow_volume_total+=this.monitorList[i].blood_flow_volume
  2222. ultrafiltration_volume_total+=this.monitorList[i].ultrafiltration_volume
  2223. ultrafiltration_rate_total += this.monitorList[i].ultrafiltration_rate
  2224. total_length = this.monitorList.length
  2225. }
  2226. }
  2227. pingjun_blood_flow_volume = (blood_flow_volume_total/total_length).toFixed(2)
  2228. if(pingjun_blood_flow_volume=="NaN"){
  2229. pingjun_blood_flow_volume = ""
  2230. }
  2231. pingjun_ultrafiltration_volume_total = (ultrafiltration_volume_total/total_length).toFixed(2)
  2232. if(pingjun_ultrafiltration_volume_total=="NaN"){
  2233. pingjun_ultrafiltration_volume_total = ""
  2234. }
  2235. pingjun_ultrafiltration_rate_total = (ultrafiltration_rate_total/total_length).toFixed(2)
  2236. if(pingjun_ultrafiltration_rate_total == "NaN"){
  2237. pingjun_ultrafiltration_rate_total = ""
  2238. }
  2239. var dry_weight_str = ""
  2240. //干体重
  2241. if(this.dryweightList!=null && this.dryweightList.length>0){
  2242. for(let i=0;i<this.dryweightList.length;i++){
  2243. dry_weight_str = this.getTimeOne(this.dryweightList[i].ctime)+" " +this.dryweightList[i].adjusted_value.slice(4,6)+ this.dryweightList[i].adjusted_value.slice(0,3)+"kg" + "调整到" +" "+ this.dryweightList[i].dry_weight+"kg"+","
  2244. }
  2245. }
  2246. //血管通路
  2247. var vascularAccess_str = ""
  2248. var created_time = ""
  2249. if(this.patientVascularAccess!=undefined){
  2250. vascularAccess_str = this.patientVascularAccess.blood_access_part_id + this.patientVascularAccess.blood_access_part_opera_id
  2251. created_time = this.getTime(this.patientVascularAccess.first_start_time)
  2252. }
  2253. //并发症
  2254. var complication = ""
  2255. if(this.lastBefor!=undefined){
  2256. complication = this.lastBefor.complication
  2257. }
  2258. if(this.inpectionList!=null&& this.inpectionList.length>0){
  2259. for(let i=0;i<this.inpectionList.length;i++){
  2260. this.inpectionList[i].group_no = ""
  2261. this.inpectionList[i].group_no = this.inpectionList[i].project_id.toString()+"_"+this.inpectionList[i].inspect_date.toString()
  2262. }
  2263. }
  2264. if(this.inpectionList!=null && this.inpectionList.length>0){
  2265. let dataInfo = {}
  2266. this.inpectionList.forEach((item, index) => {
  2267. let { group_no } = item
  2268. if (!dataInfo[group_no]) {
  2269. dataInfo[group_no] = {
  2270. group_no:group_no,
  2271. project_id:item.project_id,
  2272. name:item.project_name,
  2273. date:this.getTime(item.inspect_date),
  2274. child:[],
  2275. left: [],
  2276. right:[]
  2277. }
  2278. }
  2279. })
  2280. let arr = Object.values(dataInfo)
  2281. console.log("arr----------------------",arr)
  2282. if(arr!=null && arr.length>0){
  2283. for(let i=0;i<arr.length;i++){
  2284. for(let j=0;j<this.inpectionList.length;j++){
  2285. if(arr[i].group_no == this.inpectionList[j].group_no){
  2286. arr[i].child.push(this.inpectionList[j])
  2287. }
  2288. }
  2289. }
  2290. }
  2291. for(let i=0;i<arr.length;i++){
  2292. for(let j=0;j<arr[i].child.length;j++){
  2293. if(j%2 ==0){
  2294. arr[i].left.push(arr[i].child[j])
  2295. }
  2296. if(j%2 == 1){
  2297. arr[i].right.push(arr[i].child[j])
  2298. }
  2299. }
  2300. }
  2301. this.Inspect = []
  2302. this.Inspect = arr
  2303. console.log("newarr----------------",arr)
  2304. }
  2305. // const contents = `<table border="1" class="table" style="border-collapse: collapse;width: 100%;">
  2306. // <tr>
  2307. // <th colspan="2" style="padding: 5px;">透析阶段小结(${this.start_date}~${this.end_date})</th>
  2308. // </tr>
  2309. // <tr>
  2310. // <td width="130" style="padding: 5px;">基本信息</td>
  2311. // <td style="padding: 5px;">
  2312. // <span>姓名:${this.patient.name}</span> <span>性别:${this.patient.gender_name}</span> <span>年龄:${this.patient.age}</span> <span>透析号:${this.patient.dialysis_no}</span>
  2313. // </td>
  2314. // </tr>
  2315. // <tr>
  2316. // <td style="align-items: center;padding: 5px;">透析处方</td>
  2317. // <td style='padding:5px'>
  2318. // <p style='font-weight: bold;'>总次数:${total_count}次 ;</p>
  2319. // <p>其中;${hd_str}${hdf_str}${hdhp_str}${hp_str}${hf_str}${scuf_str}${iuf_str}${hfhd_str}${hfhdhp_str}${phf_str}${hdfhp_str}${crrt_str}${iuf_str}${uf_str}${hdjia_str}${ihdf_str}${hdgaotong_str}${cvvhd_str}${pe_str}
  2320. // ${hpd_str}${hfd_str}${hdf100str}${hdf600str}${hdf1000str}${hdf80str}${hf16str}${hdwuganstr}${hdf17str}${hddianstr}${hd2str}</p>
  2321. // <p style='font-weight: bold;'>透析器:</p>
  2322. // <p>${dialyzerPerfusionApparatusStr}${dialyzer_str}${dialysisStrainerStr}${dialysisIrrigationStr}</p>
  2323. // <p style='font-weight: bold;'>透析液处方:</p>
  2324. // <p>${kalium}${sodium}${calcium}${bicarbonate}</p>
  2325. // <p style='font-weight: bold;'>抗凝方式:</p>
  2326. // <p >${anticoagulant_str}</p>
  2327. // </td>
  2328. // </tr>
  2329. // <tr>
  2330. // <td style="align-items: center;padding: 5px;">透析情况</td>
  2331. // <td style='padding:5px'>
  2332. // <p>透析间期平均体重增加:${pingjun_weight}kg;</p>
  2333. // <p>凝血:${dialysisCrruorStr};</p>
  2334. // <p>平均血流量:${pingjun_blood_flow_volume}mL/min;最大血流量:${this.max_blood_flow_volume}mL/min;</p>
  2335. // <p>平均超滤量:${pingjun_ultrafiltration_volume_total}ml/次;平均超滤率:${pingjun_ultrafiltration_rate_total}mL/h;</p>
  2336. // <p><span style='font-weight: bold;'>透前血压:</span>&nbsp;<span class="">收缩压:${this.min_befor_systolic_blood_pressure}mmHg~${this.max_befor_systolic_blood_pressure}mmHg;舒张压:${this.min_befor_diastolic_blood_pressure}mmHg~${this.max_after_systolic_blood_pressure}mmHg;</span></p>
  2337. // <p><span style='font-weight: bold;'>透后血压:</span>&nbsp;<span class="">收缩压:${this.min_after_systolic_blood_pressure}mmHg~${this.max_after_systolic_blood_pressure}mmHg;舒张压:${this.min_after_diastolic_blood_pressure}~${this.max_after_diastolic_blood_pressure}mmHg;</span></p>
  2338. // <p><span style='font-weight: bold;'>透中最低血压:</span>&nbsp;<span class="">收缩压:${this.min_monitor_systolic_blood_pressure}mmHg~${this.max_monitor_systolic_blood_pressure}mmHg</span></p>
  2339. // <p><span style='font-weight: bold;'>透中最高血压:</span>&nbsp;<span class="">舒张压:${this.min_monitor_diastolic_blood_pressure}mmHg~${this.max_monitor_diastolic_blood_pressure}mmHg;</span></p>
  2340. // </td>
  2341. // </tr>
  2342. // <tr>
  2343. // <td style="align-items: center;padding: 5px;">干体重</td>
  2344. // <td style='padding: 5px;'>
  2345. // <p><span style='font-weight: bold;'>当前干体重:${this.berforList[this.berforList.length-1].dry_weight}</span>&nbsp;<span class="">kg;</span></p>
  2346. // <p><span style='font-weight: bold;'>调整记录:${dry_weight_str}</span>&nbsp;<span class=""></span></p>
  2347. // </td>
  2348. // </tr>
  2349. // <tr>
  2350. // <td style="align-items: center;padding: 5px;">血管通路</td>
  2351. // <td style='padding: 5px;'>
  2352. // <p><span style='font-weight: bold;'>使用的血管通路:${vascularAccess_str }</span>&nbsp;<span class=""> &nbsp;&nbsp;建立时间:${ created_time }</span></p>
  2353. // </td>
  2354. // </tr>
  2355. // <tr>
  2356. // <td style="align-items: center;padding: 5px;">合并症/并发症</td>
  2357. // <td style='padding: 5px;'>
  2358. // <p><span style='font-weight: bold;'>合并症:</span>&nbsp;<span class="">无</span></p>
  2359. // <p><span style='font-weight: bold;'>透析并发症:</span>&nbsp;<span class="">${complication}</span></p>
  2360. // </td>
  2361. // </tr>
  2362. // <tr>
  2363. // <td style="align-items: center;padding: 5px;">检查结果</td>
  2364. // <td style='padding: 5px;'><span class="">无</span></td>
  2365. // </tr>
  2366. // <tr>
  2367. // <td style="align-items: center;padding: 5px;">检验结果</td>
  2368. // <td></td>
  2369. // </tr>
  2370. // <tr>
  2371. // <td style="align-items: center;padding: 5px;">医嘱用药</td>
  2372. // <td class='' style="padding: 0;">
  2373. // <p style="display: flex;text-align: center;border-bottom: 1px solid black;"><span style="width: 30%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">药物名称</span><span style="width:20% ;display: inline-block;padding: 5px 0;border-right: 1px solid black;">医嘱类型</span><span style="width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">开始时间</span><span style="width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">单次用量</span><span style="width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">执行频率</span><span style="width: 10%;padding: 5px 0;display: inline-block;">状态</span></p>
  2374. // </td>
  2375. // </tr>
  2376. // <tr>
  2377. // <td style="align-items: center;padding: 5px;">透析总评价和建议</td>
  2378. // <td style='padding: 5px;'>
  2379. // <p class="">1、血压控制不良,随时监测血压,并加用口服降压药,将血压控制在正常范围;</p>
  2380. // <p class="">2、透析间期体重增加稳定,继续保持;</p>
  2381. // <p class="">3、血液透析时血流量达标,注意保护内瘘避免狭窄;</p>
  2382. // </td>
  2383. // </tr>
  2384. // <tr>
  2385. // <td style="align-items: center;padding: 5px;">医师签名</td>
  2386. // <td style='padding: 5px;'>
  2387. // <p class=""></p>
  2388. // </td>
  2389. // </tr>
  2390. // </table>`
  2391. const contents = `<table border="1" class="table" style="border-collapse: collapse;width: 100%;">
  2392. <tr><th colspan="2" style="padding: 5px;">透析阶段小结(${this.start_date}~${this.end_date})</th></tr>
  2393. <tr>
  2394. <td width="130" style="padding: 5px;">基本信息</td>
  2395. <td style="padding: 5px;">
  2396. <span>姓名:${this.patient.name}</span> <span>性别:${this.patient.gender_name}</span> <span>年龄:${this.patient.age}</span> <span>透析号:${this.patient.dialysis_no}</span>
  2397. </td>
  2398. </tr>
  2399. <tr>
  2400. <td style="align-items: center;padding: 5px;">透析处方</td>
  2401. <td style='padding:5px'>
  2402. <span style='font-weight: bold;'>总次数:${total_count}次 ;</span><br/><span>其中;${hd_str}${hdf_str}${hdhp_str}${hp_str}${hf_str}${scuf_str}${iuf_str}${hfhd_str}${hfhdhp_str}${phf_str}${hdfhp_str}${crrt_str}${iuf_str}${uf_str}${hdjia_str}${ihdf_str}${hdgaotong_str}${cvvhd_str}${pe_str}
  2403. ${hpd_str}${hfd_str}${hdf100str}${hdf600str}${hdf1000str}${hdf80str}${hf16str}${hdwuganstr}${hdf17str}${hddianstr}${hd2str}</span><br/>
  2404. <span style='font-weight: bold;'>透析器:</span><br/><span>${dialyzerPerfusionApparatusStr}${dialyzer_str}${dialysisStrainerStr}${dialysisIrrigationStr}</span><br/>
  2405. <span style='font-weight: bold;'>透析液处方:</span><br/><span>${kalium}${sodium}${calcium}${bicarbonate}</span><br/><span style='font-weight: bold;'>抗凝方式:</span><br/><span >${anticoagulant_str}</span>
  2406. </td>
  2407. </tr>
  2408. <tr>
  2409. <td style="align-items: center;padding: 5px;">透析情况</td>
  2410. <td style='padding:5px'>
  2411. <span>透析间期平均体重增加:${pingjun_weight}kg;</span><br/><span>凝血:${dialysisCrruorStr};</span><br/>
  2412. <span>平均血流量:${pingjun_blood_flow_volume}mL/min;最大血流量:${this.max_blood_flow_volume}mL/min;</span><br/>
  2413. <span>平均超滤量:${pingjun_ultrafiltration_volume_total}ml/次;平均超滤率:${pingjun_ultrafiltration_rate_total}mL/h;</span><br/>
  2414. <span style='font-weight: bold;'>透前血压:</span>&nbsp;<span class="">收缩压:${this.min_befor_systolic_blood_pressure}mmHg~${this.max_befor_systolic_blood_pressure}mmHg;舒张压:${this.min_befor_diastolic_blood_pressure}mmHg~${this.max_after_systolic_blood_pressure}mmHg;</span><br/>
  2415. <span style='font-weight: bold;'>透后血压:</span>&nbsp;<span class="">收缩压:${this.min_after_systolic_blood_pressure}mmHg~${this.max_after_systolic_blood_pressure}mmHg;舒张压:${this.min_after_diastolic_blood_pressure}~${this.max_after_diastolic_blood_pressure}mmHg;</span><br/>
  2416. <span style='font-weight: bold;'>透中最低血压:</span>&nbsp;<span class="">收缩压:${this.min_monitor_systolic_blood_pressure}mmHg~${this.max_monitor_systolic_blood_pressure}mmHg</span><br/>
  2417. <span style='font-weight: bold;'>透中最高血压:</span>&nbsp;<span class="">舒张压:${this.min_monitor_diastolic_blood_pressure}mmHg~${this.max_monitor_diastolic_blood_pressure}mmHg;</span>
  2418. </td>
  2419. </tr>
  2420. <tr>
  2421. <td style="align-items: center;padding: 5px;">干体重</td>
  2422. <td style='padding: 5px;'>
  2423. <span style='font-weight: bold;'>当前干体重:${this.berforList[this.berforList.length-1].dry_weight}</span>&nbsp;<span class="">kg;</span>
  2424. <span style='font-weight: bold;'>调整记录:${dry_weight_str}</span>&nbsp;<span class=""></span>
  2425. </td>
  2426. </tr>
  2427. <tr>
  2428. <td style="align-items: center;padding: 5px;">血管通路</td>
  2429. <td style='padding: 5px;'>
  2430. <span style='font-weight: bold;'>使用的血管通路:${vascularAccess_str }</span>&nbsp;<span class=""> &nbsp;&nbsp;建立时间:${ created_time }</span>
  2431. </td>
  2432. </tr>
  2433. <tr>
  2434. <td style="align-items: center;padding: 5px;">合并症/并发症</td>
  2435. <td style='padding: 5px;'>
  2436. <span style='font-weight: bold;'>合并症:</span>&nbsp;<span class="">无</span><br/>
  2437. <span style='font-weight: bold;'>透析并发症:</span>&nbsp;<span class="">${complication}</span>
  2438. </td>
  2439. </tr>
  2440. <tr>
  2441. <td style="align-items: center;padding: 5px;">检查结果</td>
  2442. <td style='padding: 5px;'><span class="">无</span></td>
  2443. </tr>
  2444. <tr>
  2445. <td style="align-items: center;padding: 5px;">检验结果</td>
  2446. <td></td>
  2447. </tr>
  2448. <tr>
  2449. <td style="align-items: center;padding: 5px;">医嘱用药</td>
  2450. <td class='' style="padding: 0;">
  2451. <p style="display: flex;text-align: center;border-bottom: 1px solid black;"><span style="width: 30%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">药物名称</span><span style="width:20% ;display: inline-block;padding: 5px 0;border-right: 1px solid black;">医嘱类型</span><span style="width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">开始时间</span><span style="width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">单次用量</span><span style="width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;">执行频率</span><span style="width: 10%;padding: 5px 0;display: inline-block;">状态</span></p>
  2452. </td>
  2453. </tr>
  2454. <tr>
  2455. <td style="align-items: center;padding: 5px;">透析总评价和建议</td>
  2456. <td style='padding: 5px;'>
  2457. <span class="">1、血压控制不良,随时监测血压,并加用口服降压药,将血压控制在正常范围;</span><br/><span class="">2、透析间期体重增加稳定,继续保持;</span><br/>
  2458. <span class="">3、血液透析时血流量达标,注意保护内瘘避免狭窄;</span>
  2459. </td>
  2460. </tr>
  2461. <tr>
  2462. <td style="align-items: center;padding: 5px;">医师签名</td>
  2463. <td style='padding: 5px;'>
  2464. <p class=""></p>
  2465. </td>
  2466. </tr>
  2467. </table>`
  2468. this.textcontent = contents
  2469. this.$nextTick(()=>{
  2470. console.log('document.getElementById(editer)',document.getElementById('editer').getElementsByTagName('tbody')[0].children[9]);
  2471. const iframeDoc = document.getElementById('editer').getElementsByTagName('tbody')[0].children[9].children[1]
  2472. const jiancDoc = document.getElementById('editer').getElementsByTagName('tbody')[0].children[8].children[1]
  2473. console.log('document.getElementById(editer)1111',iframeDoc,jiancDoc);
  2474. if(this.Inspect.length<1){
  2475. let newList = document.createElement('p');
  2476. newList.style.cssText = 'padding: 5px;'
  2477. newList.textContent = '无';
  2478. jiancDoc.appendChild(newList)
  2479. }else{
  2480. let newList = document.createElement('p');
  2481. newList.style.cssText='display: flex;text-align: center;border-bottom: 1px solid black;';
  2482. let newListItem1 = document.createElement('span');
  2483. newListItem1.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2484. let newListItem2 = document.createElement('span');
  2485. newListItem2.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2486. let newListItem3 = document.createElement('span');
  2487. newListItem3.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2488. let newListItem4 = document.createElement('span');
  2489. newListItem4.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2490. let newListItem5 = document.createElement('span');
  2491. newListItem5.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2492. let newListItem6 = document.createElement('span');
  2493. newListItem6.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;'
  2494. newListItem1.textContent = '检验项目';
  2495. newListItem2.textContent = '检验时间';
  2496. newListItem3.textContent = '检验内容';
  2497. newListItem4.textContent = '结果';
  2498. newListItem5.textContent = '检验内容';
  2499. newListItem6.textContent = '结果';
  2500. newList.appendChild(newListItem1);
  2501. newList.appendChild(newListItem2);
  2502. newList.appendChild(newListItem3);
  2503. newList.appendChild(newListItem4);
  2504. newList.appendChild(newListItem5);
  2505. newList.appendChild(newListItem6);
  2506. jiancDoc.appendChild(newList)
  2507. for(let i in this.Inspect){
  2508. let newList1 = document.createElement('p');
  2509. const child1 = document.createElement('span')
  2510. const child2 = document.createElement('span')
  2511. newList1.appendChild(child1);
  2512. newList1.appendChild(child2);
  2513. newList1.style.cssText='display: flex;text-align: center;border-bottom: 1px solid black;';
  2514. child1.style.cssText= 'width: 40%;display: inline-block;border-right: 1px solid black;display: flex;'
  2515. child2.style.cssText= 'width: 80%;display: inline-block;display: flex;flex-wrap: wrap;'
  2516. // child3.style.cssText= 'width: 40%;display: inline-block;display: flex;flex-wrap: wrap;'
  2517. let newListItem1 = document.createElement('span');
  2518. newListItem1.style.cssText= 'flex:1;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2519. let newListItem2 = document.createElement('span');
  2520. newListItem2.style.cssText= 'flex:1;display: inline-block;padding: 5px 0;'
  2521. newListItem1.textContent = this.Inspect[i].name;
  2522. newListItem2.textContent = this.Inspect[i].date;
  2523. child1.appendChild(newListItem1);
  2524. child1.appendChild(newListItem2);
  2525. for(let j in this.Inspect[i].left){
  2526. let newListItem3 = document.createElement('span');
  2527. newListItem3.style.cssText= 'border-bottom: 1px solid black;width:25%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2528. let newListItem4 = document.createElement('span');
  2529. newListItem4.style.cssText= 'border-bottom: 1px solid black;width:25%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2530. newListItem3.textContent = this.Inspect[i].left[j].item_name;
  2531. newListItem4.textContent = this.Inspect[i].left[j].inspect_value;
  2532. child2.appendChild(newListItem3);
  2533. child2.appendChild(newListItem4);
  2534. }
  2535. for(let x in this.Inspect[i].right){
  2536. let newListItem5 = document.createElement('span');
  2537. newListItem5.style.cssText= 'width: 25%;display: inline-block;padding: 5px 0;border-right: 1px solid black;border-bottom: 1px solid black;'
  2538. let newListItem6 = document.createElement('span');
  2539. newListItem6.style.cssText= 'width: 25%;display: inline-block;padding: 5px 0;border-bottom: 1px solid black;border-right: 1px solid black;'
  2540. newListItem5.textContent = this.Inspect[i].right[x].item_name;
  2541. newListItem6.textContent = this.Inspect[i].right[x].inspect_value;
  2542. child2.appendChild(newListItem5);
  2543. child2.appendChild(newListItem6);
  2544. }
  2545. jiancDoc.appendChild(newList1)
  2546. }
  2547. }
  2548. var newListArr =[]
  2549. for(let j in this.longAdvice){
  2550. const obj={
  2551. id:this.longAdvice[j].id,
  2552. newlist:'newList'+j
  2553. }
  2554. newListArr.push(obj)
  2555. }
  2556. for(let i in this.longAdvice){
  2557. for(let j in newListArr){
  2558. if(this.longAdvice[i].id==newListArr[j].id){
  2559. let newList = document.createElement('p');
  2560. newList.style.cssText='display: flex;text-align: center;border-bottom: 1px solid black;';
  2561. let newListItem1 = document.createElement('span');
  2562. newListItem1.style.cssText= 'width: 30%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2563. let newListItem2 = document.createElement('span');
  2564. newListItem2.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2565. let newListItem3 = document.createElement('span');
  2566. newListItem3.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2567. let newListItem4 = document.createElement('span');
  2568. newListItem4.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2569. let newListItem5 = document.createElement('span');
  2570. newListItem5.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2571. let newListItem6 = document.createElement('span');
  2572. newListItem6.style.cssText= 'width: 10%;display: inline-block;padding: 5px 0;'
  2573. newListItem1.textContent = this.longAdvice[i].advice_name;
  2574. newListItem2.textContent = this.longAdvice[i].advice_type_name;
  2575. newListItem3.textContent = this.getTime(this.longAdvice[i].start_time)
  2576. newListItem4.textContent = this.longAdvice[i].single_dose +this.longAdvice[i].single_dose_unit ;
  2577. newListItem5.textContent = this.longAdvice[i].execution_frequency;
  2578. newListItem6.textContent = this.longAdvice[i].stop_state_name;
  2579. newList.appendChild(newListItem1);
  2580. newList.appendChild(newListItem2);
  2581. newList.appendChild(newListItem3);
  2582. newList.appendChild(newListItem4);
  2583. newList.appendChild(newListItem5);
  2584. newList.appendChild(newListItem6);
  2585. iframeDoc.appendChild(newList)
  2586. }
  2587. }
  2588. }
  2589. })
  2590. this.new_content = this.textcontent
  2591. this.$refs.editor.contents = this.new_content
  2592. this.$nextTick(()=>{
  2593. const iframeDoc1 = document.getElementsByClassName('edui-editor-iframeholder')[0].getElementsByTagName('iframe')[0].contentDocument.getElementsByTagName('tbody')[0].children[9].children[1]
  2594. const jiancDoc1 = document.getElementsByClassName('edui-editor-iframeholder')[0].getElementsByTagName('iframe')[0].contentDocument.getElementsByTagName('tbody')[0].children[8].children[1]
  2595. console.log('document.getElementById(editer)2222',jiancDoc1,iframeDoc1);
  2596. jiancDoc1.getElementsByTagName('br')[0].remove()
  2597. jiancDoc1.style.cssText='padding: 0'
  2598. if(this.Inspect.length<1){
  2599. let newList2 = document.createElement('p');
  2600. newList2.style.cssText = 'padding: 5px;'
  2601. newList2.textContent = '无';
  2602. jiancDoc.appendChild(newList2)
  2603. }else{
  2604. let newList = document.createElement('p');
  2605. newList.style.cssText='display: flex;text-align: center;border-bottom: 1px solid black;';
  2606. let newListItem1 = document.createElement('span');
  2607. newListItem1.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2608. let newListItem2 = document.createElement('span');
  2609. newListItem2.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2610. let newListItem3 = document.createElement('span');
  2611. newListItem3.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2612. let newListItem4 = document.createElement('span');
  2613. newListItem4.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2614. let newListItem5 = document.createElement('span');
  2615. newListItem5.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2616. let newListItem6 = document.createElement('span');
  2617. newListItem6.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;'
  2618. newListItem1.textContent = '检验项目';
  2619. newListItem2.textContent = '检验时间';
  2620. newListItem3.textContent = '检验内容';
  2621. newListItem4.textContent = '结果';
  2622. newListItem5.textContent = '检验内容';
  2623. newListItem6.textContent = '结果';
  2624. newList.appendChild(newListItem1);
  2625. newList.appendChild(newListItem2);
  2626. newList.appendChild(newListItem3);
  2627. newList.appendChild(newListItem4);
  2628. newList.appendChild(newListItem5);
  2629. newList.appendChild(newListItem6);
  2630. jiancDoc1.appendChild(newList)
  2631. for(let i in this.Inspect){
  2632. let newList1 = document.createElement('p');
  2633. const child1 = document.createElement('span')
  2634. const child2 = document.createElement('span')
  2635. // const child3 = document.createElement('span')
  2636. newList1.appendChild(child1);
  2637. newList1.appendChild(child2);
  2638. // newList1.appendChild(child3);
  2639. newList1.style.cssText='display: flex;text-align: center;border-bottom: 1px solid black;';
  2640. child1.style.cssText= 'width: 40%;display: inline-block;border-right: 1px solid black;display: flex;'
  2641. child2.style.cssText= 'width: 80%;display: inline-block;display: flex;flex-wrap: wrap;'
  2642. let newListItem1 = document.createElement('span');
  2643. newListItem1.style.cssText= 'flex:1;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2644. let newListItem2 = document.createElement('span');
  2645. newListItem2.style.cssText= 'flex:1;display: inline-block;padding: 5px 0;'
  2646. newListItem1.textContent = this.Inspect[i].name;
  2647. newListItem2.textContent = this.Inspect[i].date;
  2648. child1.appendChild(newListItem1);
  2649. child1.appendChild(newListItem2);
  2650. for(let j in this.Inspect[i].left){
  2651. let newListItem3 = document.createElement('span');
  2652. newListItem3.style.cssText= 'border-bottom: 1px solid black;width:25%;box-sizing: border-box;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2653. let newListItem4 = document.createElement('span');
  2654. newListItem4.style.cssText= 'border-bottom: 1px solid black;width:25%;box-sizing: border-box;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2655. newListItem3.textContent = this.Inspect[i].left[j].item_name;
  2656. newListItem4.textContent = this.Inspect[i].left[j].inspect_value;
  2657. child2.appendChild(newListItem3);
  2658. child2.appendChild(newListItem4);
  2659. }
  2660. for(let x in this.Inspect[i].right){
  2661. let newListItem5 = document.createElement('span');
  2662. newListItem5.style.cssText= 'width: 25%;box-sizing: border-box;display: inline-block;padding: 5px 0;border-right: 1px solid black;border-bottom: 1px solid black;'
  2663. let newListItem6 = document.createElement('span');
  2664. newListItem6.style.cssText= 'width: 25%;box-sizing: border-box;display: inline-block;padding: 5px 0;border-bottom: 1px solid black;border-right: 1px solid black;'
  2665. newListItem5.textContent = this.Inspect[i].right[x].item_name;
  2666. newListItem6.textContent = this.Inspect[i].right[x].inspect_value;
  2667. child2.appendChild(newListItem5);
  2668. child2.appendChild(newListItem6);
  2669. }
  2670. jiancDoc1.appendChild(newList1)
  2671. }
  2672. }
  2673. var newListArr2 =[]
  2674. for(let j in this.longAdvice){
  2675. const obj={
  2676. id:this.longAdvice[j].id,
  2677. newlist:'newList'+j
  2678. }
  2679. newListArr2.push(obj)
  2680. }
  2681. for(let i in this.longAdvice){
  2682. for(let j in newListArr2){
  2683. if(this.longAdvice[i].id==newListArr2[j].id){
  2684. let newList = document.createElement('p');
  2685. newList.style.cssText='display: flex;text-align: center;border-bottom: 1px solid black;';
  2686. let newListItem1 = document.createElement('span');
  2687. newListItem1.style.cssText= 'width: 30%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2688. let newListItem2 = document.createElement('span');
  2689. newListItem2.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2690. let newListItem3 = document.createElement('span');
  2691. newListItem3.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2692. let newListItem4 = document.createElement('span');
  2693. newListItem4.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2694. let newListItem5 = document.createElement('span');
  2695. newListItem5.style.cssText= 'width: 20%;display: inline-block;padding: 5px 0;border-right: 1px solid black;'
  2696. let newListItem6 = document.createElement('span');
  2697. newListItem6.style.cssText= 'width: 10%;display: inline-block;padding: 5px 0;'
  2698. newListItem1.textContent = this.longAdvice[i].advice_name;
  2699. newListItem2.textContent = this.longAdvice[i].advice_type_name;
  2700. newListItem3.textContent = this.getTime(this.longAdvice[i].created_time)
  2701. newListItem4.textContent = this.longAdvice[i].single_dose +this.longAdvice[i].single_dose_unit ;
  2702. newListItem5.textContent = this.longAdvice[i].execution_frequency;
  2703. newListItem6.textContent = this.longAdvice[i].stop_state_name;
  2704. newList.appendChild(newListItem1);
  2705. newList.appendChild(newListItem2);
  2706. newList.appendChild(newListItem3);
  2707. newList.appendChild(newListItem4);
  2708. newList.appendChild(newListItem5);
  2709. newList.appendChild(newListItem6);
  2710. iframeDoc1.appendChild(newList)
  2711. }
  2712. }
  2713. }
  2714. })
  2715. this.AuToShow = true
  2716. console.log('document.getElementById(editer)1111',this.new_content);
  2717. }
  2718. })
  2719. },
  2720. blood_chang(val){
  2721. if(val == 1){
  2722. this.start_date1 = this.getTime(new Date())
  2723. this.end_date1 = this.getTime(new Date())
  2724. }else if (val == 2){
  2725. this.start_date1 = this.timeForMat(7)
  2726. this.end_date1 = this.getTime(new Date())
  2727. }else if (val == 3){
  2728. this.start_date1 = this.timeForMat(30)
  2729. this.end_date1 = this.getTime(new Date())
  2730. }else if (val == 4){
  2731. this.start_date1 = this.getFirstDayOfWeek(new Date())
  2732. this.end_date1 = this.getTime(new Date())
  2733. }else if (val == 5){
  2734. this.getlastweek(new Date())
  2735. }else if (val == 6){
  2736. this.start_date1 = this.getFirstDayOfMonth(new Date())
  2737. this.end_date1 = this.getTime(new Date())
  2738. }else if (val == 7){
  2739. this.start_date1 = this.getLastMonthFirstDay()
  2740. this.end_date1 = this.getLastMonthLastDay()
  2741. }else if (val == 8){
  2742. this.start_date1 = this.getquarterstart(0,1)
  2743. this.end_date1 = this.getquarterend(2,31)
  2744. }else if (val == 9){
  2745. this.start_date1 = this.getquarterstart(3,1)
  2746. this.end_date1 = this.getquarterend(5,30)
  2747. }else if (val == 10){
  2748. this.start_date1 = this.getquarterstart(6,1)
  2749. this.end_date1 = this.getquarterend(8,30)
  2750. }else if (val == 11){
  2751. this.start_date1 = this.getquarterstart(9,1)
  2752. this.end_date1 = this.getquarterend(11,31)
  2753. }else if (val == 12){
  2754. this.start_date1 = this.getquarterstart(0,1)
  2755. this.end_date1 = this.getquarterend(5,30)
  2756. }else if (val == 13){
  2757. this.start_date1 = this.getquarterstart(6,1)
  2758. this.end_date1 = this.getquarterend(11,31)
  2759. }else if (val == 14){
  2760. this.start_date1 = this.getFirstDayOfYear(new Date())
  2761. this.end_date1 = this.getTime(new Date())
  2762. }else if (val == 15){
  2763. this.start_date1 = this.getLastYearFirstDay()
  2764. this.end_date1 = this.getLastYearLastDay()
  2765. }else{
  2766. this.start_date1 = this.getPreviousDate(7)
  2767. this.end_date1 = this.getTime(new Date())
  2768. }
  2769. },
  2770. // 最近七,30天
  2771. timeForMat(count) {
  2772. // 拼接时间
  2773. const time1 = new Date()
  2774. const time2 = new Date()
  2775. if (count === 1) {
  2776. time1.setTime(time1.getTime() - (24 * 60 * 60 * 1000))
  2777. } else {
  2778. time1.setTime(time1.getTime())
  2779. }
  2780. const Y1 = time1.getFullYear()
  2781. const M1 = ((time1.getMonth() + 1) > 9 ? (time1.getMonth() + 1) : '0' + (time1.getMonth() + 1))
  2782. const D1 = (time1.getDate() > 9 ? time1.getDate() : '0' + time1.getDate())
  2783. const timer1 = Y1 + '-' + M1 + '-' + D1 + ' ' + '23:59:59' // 当前时间
  2784. time2.setTime(time2.getTime() - (24 * 60 * 60 * 1000 * count))
  2785. const Y2 = time2.getFullYear()
  2786. const M2 = ((time2.getMonth() + 1) > 9 ? (time2.getMonth() + 1) : '0' + (time2.getMonth() + 1))
  2787. const D2 = (time2.getDate() > 9 ? time2.getDate() : '0' + time2.getDate())
  2788. const timer2 = Y2 + '-' + M2 + '-' + D2 // 之前的7天或者30天
  2789. console.log('timer2, timer1',timer2, timer1);
  2790. return timer2
  2791. },
  2792. // 本周
  2793. getFirstDayOfWeek(date){
  2794. var weekday = date.getDay()
  2795. date.setDate(date.getDate()-weekday+1);//往前算(weekday-1)天,年份、月份会自动变化
  2796. return this.timeFormat(date);
  2797. },
  2798. // 上周
  2799. getlastweek(date){
  2800. date.setDate(date.getDate()-7 - date.getDay() + 1);
  2801. var m =''
  2802. var d = ''
  2803. if(date.getMonth() + 1<10){
  2804. m = '0'+(date.getMonth() + 1)
  2805. }else{
  2806. m = date.getMonth() + 1
  2807. }
  2808. if(date.getDate()<10){
  2809. d = '0'+date.getDate()
  2810. }else{
  2811. d = date.getDate()
  2812. }
  2813. // this.start_date = date.getFullYear() + "-" + (date.getMonth() + 1) + "-" + date.getDate() ;
  2814. this.start_date = date.getFullYear() + "-" + m + "-" + d ;
  2815. this.start_date1 = date.getFullYear() + "-" + m + "-" + d ;
  2816. date.setDate(date.getDate() +6);
  2817. var mm = ''
  2818. var dd = ''
  2819. if(date.getMonth() + 1<10){
  2820. mm = '0'+(date.getMonth() + 1)
  2821. }else{
  2822. mm = date.getMonth() + 1
  2823. }
  2824. if(date.getDate()<10){
  2825. dd = '0'+date.getDate()
  2826. }else{
  2827. dd = date.getDate()
  2828. }
  2829. this.end_date = date.getFullYear() + "-" + mm + "-" + dd ;
  2830. this.end_date1 = date.getFullYear() + "-" + mm + "-" + dd ;
  2831. },
  2832. // 本月
  2833. getFirstDayOfMonth (date) {
  2834. date.setDate(1);
  2835. return this.timeFormat(date);
  2836. },
  2837. //上个月第一天
  2838. getLastMonthFirstDay() {
  2839. var date = new Date();
  2840. date.setDate(0);
  2841. var y = date.getFullYear(); //获取年份
  2842. var m = date.getMonth() + 1; //获取月份
  2843. m = m < 10 ? "0" + m : m;
  2844. // this.start_date = [y, m, '01'].join("-")
  2845. return [y, m, '01'].join("-");
  2846. },
  2847. // 上个月最后一天
  2848. getLastMonthLastDay() {
  2849. var date = new Date();
  2850. date.setDate(0);
  2851. var y = date.getFullYear(); //获取年份
  2852. var m = date.getMonth() + 1; //获取月份
  2853. var d = new Date(y, m, 0).getDate(); //获取当月最后一日
  2854. m = m < 10 ? "0" + m : m; //月份补 0
  2855. d = d < 10 ? "0" + d : d; //日数补 0
  2856. // this.end_date = [y, m, d].join("-")
  2857. return [y, m, d].join("-");
  2858. },
  2859. // 本年
  2860. getFirstDayOfYear (date) {
  2861. date.setDate(1);
  2862. date.setMonth(0);
  2863. return this.timeFormat(date);
  2864. },
  2865. // 上一年第一天
  2866. getLastYearFirstDay() {
  2867. let date = new Date();
  2868. const year= date.setFullYear(date.getFullYear() - 1); // 设置年份为前一年
  2869. const start_month= date.setMonth(0); // 设置月份为1月(注意月份是从0开始的)
  2870. const start_day = date.setDate(1); // 设置日期为1日
  2871. // const last_month = date.setMonth(11); // 设置月份为12月
  2872. // const last_day = date.setDate(0); // 设置日期为0,这将自动设置为该月的最后一天
  2873. // this.start_date = year+ "-" +start_month+ "-" +start_day
  2874. // this.start_date = this.getTime(start_day)
  2875. return this.getTime(start_day)
  2876. },
  2877. // 上一年最后一天
  2878. getLastYearLastDay() {
  2879. let date = new Date();
  2880. const year= date.setFullYear(date.getFullYear() - 1); // 设置年份为前一年
  2881. const last_month = date.setMonth(12); // 设置月份为12月
  2882. const last_day = date.setDate(0);// 设置日期为0,这将自动设置为该月的最后一天
  2883. // this.end_date = year+ "-" +last_month+ "-" +last_day
  2884. // this.end_date = this.getTime(last_day)
  2885. console.log('this.end_date',this.end_date);
  2886. return this.getTime(last_day)
  2887. },
  2888. // 季度第一天
  2889. getquarterstart(index,number){
  2890. const currentYear = new Date().getFullYear();
  2891. const Start = this.timeFormat(new Date(currentYear, index, number));
  2892. return Start
  2893. },
  2894. // 季度最后一天
  2895. getquarterend(index,number){
  2896. const currentYear = new Date().getFullYear();
  2897. const End = this.timeFormat(new Date(currentYear, index, number));
  2898. return End
  2899. },
  2900. // 日期格式化
  2901. timeFormat(date) {
  2902. if (!date || typeof(date) === "string") {
  2903. this.error("参数异常,请检查...");
  2904. }
  2905. var y = date.getFullYear(); //年
  2906. if(date.getMonth() + 1<10){
  2907. var m ='0'+(date.getMonth() + 1); //月
  2908. }else{
  2909. var m =date.getMonth() + 1; //月
  2910. }
  2911. if(date.getDate()<10){
  2912. var d ='0'+date.getDate(); //日
  2913. }else{
  2914. var d = date.getDate(); //日
  2915. }
  2916. // var d = date.getDate(); //日
  2917. return y + "-" + m + "-" + d;
  2918. },
  2919. requestCourseRecords: function() {
  2920. this.loading = true
  2921. getCourseOfDiseaseRecords(this.patient_id, this.start_time, this.end_time).then(rs => {
  2922. this.loading = false
  2923. var resp = rs.data
  2924. if (resp.state == 1) {
  2925. this.current_select_record = null
  2926. this.records = resp.data.records
  2927. console.log("records232322332323232323223",this.records)
  2928. this.doctors = resp.data.doctors
  2929. } else {
  2930. this.$message.error(resp.msg)
  2931. }
  2932. }).catch(error => {
  2933. this.loading = false
  2934. this.$message.error(error)
  2935. })
  2936. },
  2937. didChangeCurrentRecord: function(record) {
  2938. this.current_select_record = record
  2939. },
  2940. recordTime: function(timestamp) {
  2941. var time = new Date(timestamp * 1000)
  2942. return parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
  2943. },
  2944. doctorName: function(doctor_id) {
  2945. for (let index = 0; index < this.doctors.length; index++) {
  2946. const doctor = this.doctors[index]
  2947. if (doctor.id == doctor_id) {
  2948. return doctor.name
  2949. }
  2950. }
  2951. return ''
  2952. },
  2953. modifyAction: function() {
  2954. this.edit_new_content = this.$refs.edit_neditor.content
  2955. if (this.edit_new_content.length == 0) {
  2956. this.$message.error('请填写病程内容')
  2957. return
  2958. }
  2959. this.uploading_new_record = true
  2960. modifyCourseOfDiseaseRecord(this.patient_id, this.edit_new_content, this.edit_course_of_disease_time, this.edit_current_id, this.edit_title).then(rs => {
  2961. this.uploading_new_record = false
  2962. var resp = rs.data
  2963. if (resp.state == 1) {
  2964. this.records[this.table_current_index].content = resp.data.record.content
  2965. this.records[this.table_current_index].record_time = resp.data.record.record_time
  2966. this.records[this.table_current_index].recorder = resp.data.record.recorder
  2967. this.records[this.table_current_index].title = resp.data.record.title
  2968. this.show_edit_dialog = false
  2969. this.edit_new_content = ''
  2970. this.table_current_index = -1
  2971. } else {
  2972. this.table_current_index = -1
  2973. this.$message.error(resp.msg)
  2974. }
  2975. }).catch(error => {
  2976. this.table_current_index = -1
  2977. this.uploading_new_record = false
  2978. this.$message.error(error)
  2979. })
  2980. },
  2981. getAutoPatientContent(){
  2982. if(this.start_date == ""){
  2983. this.$message.error("请选择开始时间")
  2984. }
  2985. if(this.end_date == ""){
  2986. this.$message.error("请选择结束时间")
  2987. }
  2988. var params = {
  2989. start_time:this.start_date,
  2990. end_time:this.end_date,
  2991. patient_id:this.patient_id,
  2992. }
  2993. console.log("start_time==============",params)
  2994. getAutoPatientContent(params).then(response=>{
  2995. if(response.data.state == 1){
  2996. var prescription = response.data.data.prescription
  2997. this.prescription=[]
  2998. this.prescription = prescription
  2999. var berfor = response.data.data.berfor
  3000. this.berforList = []
  3001. this.berforList = berfor
  3002. var monitorList = response.data.data.monitorList
  3003. this.monitorList = []
  3004. this.monitorList = monitorList
  3005. var dryweightList = response.data.data.dryweightList
  3006. this.dryweightList = []
  3007. this.dryweightList = dryweightList
  3008. var inpectionList = response.data.data.inpectionList
  3009. this.inpectionList = []
  3010. this.inpectionList = inpectionList
  3011. var patient = response.data.data.patient
  3012. if(patient.gender == 1){
  3013. patient.gender_name = "男"
  3014. }
  3015. if(patient.gender == 2){
  3016. patient.gender_name = "女"
  3017. }
  3018. this.patient = patient
  3019. var dialysisOrderList =response.data.data.dialysisOrder
  3020. this.dialysisOrderList = []
  3021. this.dialysisOrderList = dialysisOrderList
  3022. var longAdvice = response.data.data.longAdvice
  3023. this.longAdvice = []
  3024. this.longAdvice = longAdvice
  3025. this.groupPrescriptionList = []
  3026. this.groupPrescriptionList = response.data.data.groupPrescriptionList
  3027. this.afterList = response.data.data.after
  3028. this.max_blood_flow_volume = response.data.data.max_blood_flow_volume
  3029. this.max_befor_systolic_blood_pressure = response.data.data.max_befor_systolic_blood_pressure
  3030. this.min_befor_systolic_blood_pressure = response.data.data.min_befor_systolic_blood_pressure
  3031. this.max_befor_diastolic_blood_pressure = response.data.data.max_befor_diastolic_blood_pressure
  3032. this.min_befor_diastolic_blood_pressure = response.data.data.min_befor_diastolic_blood_pressure
  3033. this.max_after_systolic_blood_pressure = response.data.data.max_after_systolic_blood_pressure
  3034. this.min_after_systolic_blood_pressure = response.data.data.min_after_systolic_blood_pressure
  3035. this.max_after_diastolic_blood_pressure = response.data.data.max_after_diastolic_blood_pressure
  3036. this.min_after_diastolic_blood_pressure = response.data.data.min_after_diastolic_blood_pressure
  3037. this.max_monitor_systolic_blood_pressure = response.data.data.max_monitor_systolic_blood_pressure
  3038. this.min_monitor_systolic_blood_pressure = response.data.data.min_monitor_systolic_blood_pressure
  3039. this.max_monitor_diastolic_blood_pressure = response.data.data.max_monitor_diastolic_blood_pressure
  3040. this.min_monitor_diastolic_blood_pressure = response.data.data.min_monitor_diastolic_blood_pressure
  3041. this.lastDryWeight = response.data.data.lastDryWeight
  3042. this.patientVascularAccess = response.data.data.patientVascularAccess
  3043. this.lastBefor = response.data.data.lastBefor
  3044. this.auto_dialog = true
  3045. }
  3046. })
  3047. },
  3048. didSelectTemplate: function(templateContent) {
  3049. this.new_content = this.new_content.length > 0 ? (this.new_content + templateContent) : templateContent
  3050. }, didEditSelectTemplate: function(templateContent) {
  3051. this.edit_new_content = this.edit_new_content.length > 0 ? (this.edit_new_content + templateContent) : templateContent
  3052. },
  3053. didSelectionChange: function(selectRows) {
  3054. var arr = []
  3055. for(let i=0;i<selectRows.length;i++){
  3056. arr.push(selectRows[i].id)
  3057. }
  3058. var newArr = arr.join(',')
  3059. this.ids = newArr
  3060. console.log("select23322332",this.ids)
  3061. this.selectingRows = selectRows
  3062. },
  3063. deleteAction(){
  3064. if(this.id == 0){
  3065. this.$message.error("请选择要删除的信息!")
  3066. return false
  3067. }
  3068. this.$confirm('确定要取消吗?', '提示', {
  3069. confirmButtonText: '确定',
  3070. cancelButtonText: '取消',
  3071. type: 'warning'
  3072. }).then(() => {
  3073. deleteNewCouseOfDisease(this.id).then(response=>{
  3074. if (response.data.state==1) {
  3075. var msg = response.data.data.msg
  3076. this.$message.success("删除成功!")
  3077. this.getlist()
  3078. }
  3079. });
  3080. }).catch(() => {
  3081. });
  3082. },
  3083. showEdit() {
  3084. this.add_index =1
  3085. this.disabled = false
  3086. console.log('时间',this.record_date);
  3087. }, tableRow({ row, rowIndex }) {
  3088. // 把每一行的索引放进row
  3089. row.index = rowIndex
  3090. }, onRowClick(row, event, column) {
  3091. this.table_current_index = row.index
  3092. },
  3093. prints(){
  3094. if(this.ids.length == 0){
  3095. this.$message.error('请选择要打印的病程')
  3096. return
  3097. }
  3098. this.$router.push({ path: "/course/print?ids="+this.ids+"&patient_id="+this.patient_id});
  3099. },
  3100. GetAnticoagulant(id){
  3101. var anticoagulant_name = ""
  3102. if(id == 1){
  3103. anticoagulant_name = "无肝素"
  3104. }
  3105. if(id == 2){
  3106. anticoagulant_name = "普通肝素"
  3107. }
  3108. if(id == 3){
  3109. anticoagulant_name = "低分子肝素"
  3110. }
  3111. if(id == 4){
  3112. anticoagulant_name = "阿加曲班"
  3113. }
  3114. if(id == 5){
  3115. anticoagulant_name = "枸橼酸钠"
  3116. }
  3117. if(id == 6){
  3118. anticoagulant_name = "低分子肝素钙"
  3119. }
  3120. if(id == 7){
  3121. anticoagulant_name = "低分子肝素钠"
  3122. }
  3123. if(id == 8){
  3124. anticoagulant_name = "依诺肝素"
  3125. }
  3126. if(id == 9){
  3127. anticoagulant_name = "达肝素"
  3128. }
  3129. if(id == 10){
  3130. anticoagulant_name = "体外抗凝"
  3131. }
  3132. if(id == 11){
  3133. anticoagulant_name = "那屈肝素"
  3134. }
  3135. if(id == 12){
  3136. anticoagulant_name = "无抗凝剂"
  3137. }
  3138. if(id == 13){
  3139. anticoagulant_name = "那屈肝素钙"
  3140. }
  3141. if(id == 14){
  3142. anticoagulant_name = "肝素钙注射液"
  3143. }
  3144. if(id == 15){
  3145. anticoagulant_name = "甲磺酸萘莫司他"
  3146. }
  3147. return anticoagulant_name
  3148. },
  3149. getTime (time) {
  3150. return uParseTime(time, '{y}-{m}-{d}')
  3151. },
  3152. getTimeOne (time) {
  3153. return uParseTime(time, '{y}-{m}-{d}')
  3154. },
  3155. getTimeTwo (time) {
  3156. return uParseTime(time, '{y}-{m}-{d} {h}:{i}')
  3157. },
  3158. getTimeThree (time) {
  3159. return uParseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
  3160. },
  3161. newcontent(val){
  3162. this.new_content =''
  3163. this.new_content = val
  3164. console.log('1111112323',val);
  3165. this.$refs.editor.contents = this.new_content
  3166. },
  3167. bloodChange(val){
  3168. this.bloodRows = []
  3169. const text = val.content
  3170. this.blood_context = text
  3171. console.log('this.blood_context',this.blood_context);
  3172. },
  3173. summaryChange(val){
  3174. this.summary_context=""
  3175. if(val!=undefined){
  3176. if(val.summary!=null && val.summary!=undefined){
  3177. this.summary_context = val.summary.dialysis_summary
  3178. }
  3179. }
  3180. },
  3181. toSummaryPint(){
  3182. this.$refs.editor.contents = this.$refs.editor.contents +this.summary_context
  3183. this.summary_dialog = false
  3184. },
  3185. weightChange(val){
  3186. var text = this.getTimeTwo(val.ctime) + " " + "调整值"+val.adjusted_value.slice(0,3)+"kg"+"("+val.adjusted_value.slice(4,6)+")"+"," +"干体重:"+val.dry_weight+"kg"
  3187. this.weight_context = text
  3188. },
  3189. toDryWeightPint(){
  3190. this.$refs.editor.contents = this.$refs.editor.contents +this.weight_context
  3191. this.weight_dialog = false
  3192. },
  3193. type_chang(val){
  3194. this.advice_type = val
  3195. this.getPatientAdviceList()
  3196. },
  3197. status_chang(val){
  3198. this.advice_status = val
  3199. this.getPatientAdviceList()
  3200. },
  3201. selectionchange(val){
  3202. this.bloodRows = val
  3203. this.gettext(val)
  3204. console.log('血压',this.bloodRows);
  3205. },
  3206. selectionchange2(val){
  3207. this.summaryRows = val
  3208. this.summary_context=""
  3209. if(val!=null){
  3210. // if(val.summary!=null && val.summary!=undefined){
  3211. // this.summary_context = val.summary.dialysis_summary
  3212. // }
  3213. for(let i=0;i<val.length;i++){
  3214. this.summary_context += val[i].summary.dialysis_summary+"</br>"
  3215. }
  3216. this.summary_context = this.summary_context
  3217. }
  3218. // this.getsummary(val)
  3219. // console.log('透析小结',this.summaryRows);
  3220. },
  3221. selectionchange3(val){
  3222. this.weightRows = val
  3223. this.getweight(val)
  3224. console.log('透析小结',this.weightRows);
  3225. },
  3226. selectionchange4(val){
  3227. this.optionRows = val
  3228. this.getoption(val)
  3229. console.log('透析小结',this.weightRows);
  3230. },
  3231. selectionchange5(val){
  3232. this.adviceRows = val
  3233. this.getNewPatientAdviceList(val)
  3234. },
  3235. gettext(val){
  3236. const arr= []
  3237. if(val.length>0){
  3238. for(let i in val){
  3239. arr.push(val[i].content)
  3240. }
  3241. }
  3242. this.blood_context = arr.join('<br/>')
  3243. console.log('拼接val.content.join()',arr.join('<br/>'));
  3244. },
  3245. getsummary(val){
  3246. const arr= []
  3247. if(val.length>0){
  3248. for(let i in val){
  3249. const obj = val[i].date +'('+ val[i].mode + ')'+'透析过程平稳,无不适主诉,顺利结束透析治疗。'
  3250. arr.push(obj)
  3251. }
  3252. }
  3253. console.log('1111111',arr);
  3254. this.summary_context = `${arr.join('<br/>')}`
  3255. },
  3256. getweight(val){
  3257. const arr= []
  3258. if(val.length>0){
  3259. for(let i in val){
  3260. const obj = val[i].date + '调整值'+ val[i].value + 'kg' + '干体重'+ val[i].weight+'kg'
  3261. arr.push(obj)
  3262. }
  3263. }
  3264. console.log('1111111',arr);
  3265. this.weight_context = `${arr.join('<br/>')}`
  3266. },
  3267. getoption(val){
  3268. var newArr = []
  3269. for(let i=0;i<this.systemPrescritpionList.length;i++){
  3270. for(let j=0;j<val.length;j++){
  3271. if(val[j].mode == this.systemPrescritpionList[i].mode_name){
  3272. newArr.push(this.systemPrescritpionList[i])
  3273. }
  3274. }
  3275. }
  3276. const arr= []
  3277. if(newArr.length>0){
  3278. for(let i=0;i<newArr.length;i++){
  3279. const text = `<table border="1" style="border-collapse: collapse;width: 100%;">
  3280. <tr><td colspan="4">${newArr[i].mode_name},启用</td></tr>
  3281. <tr>
  3282. <td>透析时长:${newArr[i].dialysis_duration_hour}时${newArr[i].dialysis_duration_minute}分</td>
  3283. <td>置换方式:${newArr[i].displace_name}</td>
  3284. <td>血流量(ml/min):${newArr[i].blood_flow_volume}</td>
  3285. <td></td>
  3286. </tr>
  3287. <tr>
  3288. <td>透析器:${newArr[i].dialysis_dialyszers}</td>
  3289. <td>灌流器:${newArr[i].dialysis_irrigation}</td>
  3290. <td>透析液流量(ml/min):${newArr[i].dialysate_flow}</td>
  3291. </tr>
  3292. <tr>
  3293. <td>钾(mmol/L):${newArr[i].kalium}</td>
  3294. <td>钠(mmol/L):${newArr[i].sodium}</td>
  3295. <td>钙(mmol/L):${newArr[i].calcium}</td>
  3296. <td>碳酸氢根(mmol/L):${newArr[i].bicarbonates}</td>
  3297. </tr>
  3298. <tr>
  3299. <td>抗凝剂:${newArr[i].anticoagulant_name}</td>
  3300. <td>首剂(iu):${newArr[i].anticoagulant_shouji}</td>
  3301. <td>维持(iu):${newArr[i].anticoagulant_weichi}</td>
  3302. <td>总量(iu):${newArr[i].anticoagulant_zongliang}</td>
  3303. </tr>
  3304. <tr><td colspan="4"></td></tr>
  3305. </table>`
  3306. arr.push(text)
  3307. }
  3308. }
  3309. const contenttext = `${arr.join('<br/>')}`
  3310. this.option_context = contenttext
  3311. // console.log('option_context',this.option_context);
  3312. this.$refs.editorOne.contents = this.option_context
  3313. },
  3314. // 血压搜索
  3315. bloodsearch(val){
  3316. },
  3317. blood_click(){
  3318. this.blood_dialog =true
  3319. this.start_date1 = this.timeForMat(7)
  3320. this.end_date1 = this.getTime(new Date())
  3321. this.$nextTick(()=>{
  3322. this.$refs.blood_table.setCurrentRow(this.bloodList[0])
  3323. })
  3324. },
  3325. summary_click(){
  3326. this.summary_dialog = true
  3327. this.start_date1 = this.timeForMat(7)
  3328. this.end_date1 = this.getTime(new Date())
  3329. this.$nextTick(()=>{
  3330. this.$refs.blood_table.setCurrentRow(this.bloodList[0])
  3331. })
  3332. },
  3333. weight_click(){
  3334. this.weight_dialog =true
  3335. this.start_date1 = this.timeForMat(7)
  3336. this.end_date1 = this.getTime(new Date())
  3337. this.$nextTick(()=>{
  3338. this.$refs.weight_table.setCurrentRow(this.weightlist[0])
  3339. })
  3340. },
  3341. option_click(val){
  3342. this.option_dialog =true
  3343. // this.start_date1 = this.timeForMat(7)
  3344. // this.end_date1 = this.getTime(new Date())
  3345. // this.$nextTick(()=>{
  3346. // this.$refs.option_table.setCurrentRow(this.weightlist[0])
  3347. // })
  3348. this.getDilaysisSystemList()
  3349. },
  3350. advice_click(){
  3351. const text =`<p class='advice_table'></p>`
  3352. this.advice_context = text
  3353. this.getPatientAdviceList()
  3354. this.advice_dialog = true
  3355. },
  3356. diagnosis_click(){
  3357. const text =`<table border="1" style="border-collapse: collapse;text-align: center;">
  3358. <tr><td>1</td><td>高尿酸血症</td></tr>
  3359. <tr><td>2</td><td>继发性甲状旁腺功能亢进</td></tr>
  3360. </table>`
  3361. // this.$refs.editor.contents = this.new_content
  3362. this.$refs.editor.contents = this.$refs.editor.contents +text
  3363. },
  3364. hospital_click(){
  3365. const text = `<p style="line-height: 50px;display: flex;"><span style="display: inline-block;flex: 1;">住院日期:</span><span style="display: inline-block;flex: 1;">出院日期:</span></p>
  3366. <p style="line-height: 50px;display: flex;"><span style="display: inline-block;flex: 1;">入院诊断:</span><span style="display: inline-block;flex: 1;">出院诊断:</span></p>`
  3367. this.$refs.editor.contents = this.$refs.editor.contents + text
  3368. },
  3369. Inspect_click(){
  3370. this.Inspect_dialog = true
  3371. this.start_date1 = this.timeForMat(7)
  3372. this.end_date1 = this.getTime(new Date())
  3373. for(let i in this.Inspectlist){
  3374. this.activeNames.push(this.Inspectlist[i].id)
  3375. }
  3376. },
  3377. handleChange(val){
  3378. },
  3379. childclick(i){
  3380. var params = {
  3381. patient_id:i.patient_id,
  3382. project_id:i.project_id,
  3383. inspect_date:i.inspect_date,
  3384. }
  3385. getInspectionByProjectId(params).then(response=>{
  3386. if(response.data.state == 1){
  3387. var inspection = response.data.data.inspection
  3388. var referenceList = response.data.data.referenceList
  3389. console.log("referenctLit=====",referenceList)
  3390. var inspection_str = i.project_name + "-"+"检验日期:"+this.getTime(i.inspect_date)+";"
  3391. if(inspection!=null && inspection.length>0){
  3392. for(let i=0;i<inspection.length;i++){
  3393. inspection[i].unit = ""
  3394. for(let j=0;j<referenceList.length;j++){
  3395. if(inspection[i].item_id == referenceList[j].id){
  3396. inspection[i].unit = referenceList[j].unit
  3397. }
  3398. }
  3399. if(inspection[i].inspect_value!=""){
  3400. inspection_str += inspection[i].item_name+ "("+inspection[i].unit+")"+":" + inspection[i].inspect_value+","
  3401. }
  3402. }
  3403. }
  3404. this.inspect_context = inspection_str
  3405. }
  3406. })
  3407. // // const inspect_arr = []
  3408. // if(this.InspectRows.length ==0){
  3409. // this.InspectRows.push(eve)
  3410. // }else{
  3411. // let index = this.InspectRows.findIndex((obj) => obj.c_id === eve.c_id && obj.pater_id == eve.pater_id);
  3412. // if (index === -1) {
  3413. // this.InspectRows.push(eve);
  3414. // } else {
  3415. // this.InspectRows.splice(index, 1);
  3416. // }
  3417. // }
  3418. // this.getinspect(this.InspectRows)
  3419. // console.log('检查',this.InspectRows.includes(eve));
  3420. },
  3421. toInpectionContentPint(){
  3422. this.$refs.editor.contents = this.$refs.editor.contents +this.inspect_context
  3423. this.Inspect_dialog = false
  3424. },
  3425. getinspect(val){
  3426. const arr = []
  3427. if(val != ''){
  3428. for(let i in val){
  3429. arr.push(val[i].text)
  3430. }
  3431. const contenttext = `${arr.join('<br/>')}`
  3432. this.Inspect_context = contenttext
  3433. }else{
  3434. this.Inspect_context = ''
  3435. }
  3436. },
  3437. check_change(){
  3438. const arr = []
  3439. if(this.checked==true){
  3440. for(let i in this.Inspectlist){
  3441. for(let j in this.Inspectlist[i].child){
  3442. if(this.InspectRows.length ==0){
  3443. this.InspectRows.push(this.Inspectlist[i].child[j])
  3444. }else{
  3445. this.InspectRows.push(this.Inspectlist[i].child[j])
  3446. for(let x=0;x<this.InspectRows.length;x++){
  3447. for(let y =x+1;y<this.InspectRows.length;y++){
  3448. if(this.InspectRows[x].c_id === this.InspectRows[y].c_id &&
  3449. this.InspectRows[x].pater_id == this.InspectRows[y].pater_id
  3450. ){
  3451. this.InspectRows.splice(y,1)
  3452. }
  3453. }
  3454. }
  3455. }
  3456. }
  3457. }
  3458. }else{
  3459. this.InspectRows = []
  3460. }
  3461. this.getinspect(this.InspectRows)
  3462. // console.log('this',this.InspectRows);
  3463. },
  3464. //血压
  3465. getMonitorSearchList(){
  3466. var params = {
  3467. start_time:this.start_date1,
  3468. end_time:this.end_date1,
  3469. patient_id:this.patient_id,
  3470. }
  3471. getMonitorSearchList(params).then(response=>{
  3472. if(response.data.state == 1){
  3473. var monitorList = response.data.data.monitorList
  3474. this.monitorListOne = monitorList
  3475. }
  3476. })
  3477. },
  3478. getSummarySearchList(){
  3479. var params = {
  3480. start_time:this.start_date1,
  3481. end_time:this.end_date1,
  3482. patient_id:this.patient_id,
  3483. }
  3484. getSummarySearchList(params).then(response=>{
  3485. if(response.data.state ==1){
  3486. this.summaryList =[]
  3487. this.summaryList = response.data.data.summaryList
  3488. }
  3489. })
  3490. },
  3491. getPatientDryWeightList(){
  3492. var params = {
  3493. start_time:this.start_date1,
  3494. end_time:this.end_date1,
  3495. patient_id:this.patient_id,
  3496. }
  3497. getPatientDryWeightList(params).then(response=>{
  3498. if(response.data.state == 1){
  3499. var dryWeightList = response.data.data.dryWeightList
  3500. this.dryWeightList = []
  3501. this.dryWeightList = dryWeightList
  3502. }
  3503. })
  3504. },
  3505. getDilaysisSystemList(){
  3506. var params = {
  3507. start_time:this.start_date1,
  3508. end_time:this.end_date1,
  3509. patient_id:this.patient_id,
  3510. }
  3511. getDilaysisSystemList(params).then(response=>{
  3512. if(response.data.state == 1){
  3513. this.systemPrescritpionList = []
  3514. var systemPrescritpionList = response.data.data.prescription
  3515. if(systemPrescritpionList!=null && systemPrescritpionList.length>0){
  3516. for(let i=0;i<systemPrescritpionList.length;i++){
  3517. systemPrescritpionList[i].mode_name = ""
  3518. systemPrescritpionList[i].mode_name = this.getModeId(systemPrescritpionList[i].mode_id)
  3519. systemPrescritpionList[i].displace_name = this.getDisplaceLiqu(systemPrescritpionList[i].displace_liqui)
  3520. systemPrescritpionList[i].anticoagulant_name = this.getAnticoagulantName(systemPrescritpionList[i].anticoagulant)
  3521. }
  3522. }
  3523. this.systemPrescritpionList = systemPrescritpionList
  3524. }
  3525. })
  3526. },
  3527. getDisplaceLiqu(id){
  3528. var displace_liqui_List = this.$store.getters.displace_liqui
  3529. var name = ""
  3530. for(let i=0;i<displace_liqui_List.length;i++){
  3531. if(id == displace_liqui_List[i].id){
  3532. name = displace_liqui_List[i].name
  3533. }
  3534. }
  3535. return name
  3536. },
  3537. getPatientAdviceList(){
  3538. var ids = this.newIds.join()
  3539. var params = {
  3540. start_time:this.start_date1,
  3541. end_time:this.end_date1,
  3542. patient_id:this.patient_id,
  3543. advice_type:this.advice_type,
  3544. advice_status:this.advice_status,
  3545. }
  3546. getPatientAdviceList(params).then(response=>{
  3547. if(response.data.state == 1){
  3548. var advicelist = response.data.data.advicelist
  3549. this.adviceList = []
  3550. this.adviceList =advicelist
  3551. }
  3552. })
  3553. },
  3554. getNewPatientAdviceList(val){
  3555. var newArr= []
  3556. for(let i=0;i<val.length;i++){
  3557. for(let j=0;j<this.adviceList.length;j++){
  3558. if(val[i].id == this.adviceList[j].id){
  3559. newArr.push(this.adviceList[j])
  3560. }
  3561. }
  3562. }
  3563. this.adviceNewList = []
  3564. this.adviceNewList = newArr
  3565. this.all_select = 1
  3566. },
  3567. handleMonitorChange(val){
  3568. var str = ""
  3569. var monitor_str =""
  3570. if(val.monitor!=null && val.monitor.length>0){
  3571. for(let i=0;i<val.monitor.length;i++){
  3572. monitor_str += val.monitor[i].systolic_blood_pressure+"/"+val.monitor[i].diastolic_blood_pressure+";"
  3573. }
  3574. }
  3575. if(val!=undefined){
  3576. str += this.getTime(val.schedule_date) + "("+this.getModeId(val.mode_id)+")"+" "+"透前血压:"+val.befor.systolic_blood_pressure+"/"+val.befor.diastolic_blood_pressure
  3577. +" " +"监测记录:"+monitor_str+" "+"透后血压:"+val.after.systolic_blood_pressure +"/"+ val.after.diastolic_blood_pressure
  3578. }
  3579. this.monitor_blood_context =""
  3580. this.monitor_blood_context = str
  3581. },
  3582. toMonitorPint(){
  3583. this.$refs.editor.contents = this.$refs.editor.contents+this.monitor_blood_context
  3584. this.blood_dialog = false
  3585. },
  3586. toInspection(){
  3587. var params = {
  3588. start_time:this.start_date1,
  3589. end_time:this.end_date1,
  3590. patient_id:this.patient_id,
  3591. }
  3592. getPatientInspectionList(params).then(response=>{
  3593. if(response.data.state == 1){
  3594. var groupList = response.data.data.groupList
  3595. var inspection = response.data.data.inspection
  3596. this.inspectionList = inspection
  3597. if(groupList.length!=null && groupList.length>0){
  3598. for(let i=0;i<groupList.length;i++){
  3599. groupList[i].child = []
  3600. for(let j=0;j<inspection.length;j++){
  3601. if(groupList[i].project_id == inspection[j].project_id && groupList[i].inspect_date == inspection[j].inspect_date){
  3602. groupList[i].child.push(inspection[j])
  3603. }
  3604. }
  3605. }
  3606. }
  3607. for(let i=0;i<groupList.length;i++){
  3608. for(let j=0;j<groupList[i].child.length;j++){
  3609. groupList[i].child =this.getInspection(groupList[i].child)
  3610. }
  3611. }
  3612. this.newInspectionList = groupList
  3613. }
  3614. })
  3615. },
  3616. getInspection(tempArr) {
  3617. let newArr = [];
  3618. for (let i = 0; i < tempArr.length; i++) {
  3619. if (newArr.indexOf(tempArr[i].inspect_date) == -1) {
  3620. newArr.push(tempArr[i].inspect_date);
  3621. } else {
  3622. tempArr.splice(i, 1);
  3623. i--;
  3624. };
  3625. };
  3626. return tempArr;
  3627. },
  3628. changeInspetion(){
  3629. for(let i=0;i<this.newInspectionList.length;i++){
  3630. this.newInspectionList[i].childOne =[]
  3631. for(let j=0;j<this.inspectionList.length;j++){
  3632. if(this.newInspectionList[i].project_id == this.inspectionList[j].project_id &&this.newInspectionList[i].inspect_date== this.inspectionList[j].inspect_date ){
  3633. this.newInspectionList[i].childOne.push(this.inspectionList[j])
  3634. }
  3635. }
  3636. }
  3637. var new_inspection_str =""
  3638. if(this.newInspectionList!=null&& this.newInspectionList.length>0){
  3639. for(let i=0;i<this.newInspectionList.length;i++){
  3640. if(this.newInspectionList[i].childOne!=null && this.newInspectionList[i].childOne.length>0){
  3641. new_inspection_str += "<br/>"+ this.newInspectionList[i].project_name +"-" +"检验日期:"+ this.getTime(this.newInspectionList[i].childOne[0].inspect_date) +" "
  3642. for(let j=0;j<this.newInspectionList[i].childOne.length;j++){
  3643. if(this.newInspectionList[i].childOne[j].inspect_value!=""){
  3644. new_inspection_str+= this.newInspectionList[i].childOne[j].item_name+":" + this.newInspectionList[i].childOne[j].inspect_value+","+" "
  3645. }
  3646. }
  3647. }
  3648. }
  3649. }
  3650. this.inspect_context = new_inspection_str
  3651. },
  3652. toSystemContentPint(){
  3653. this.$refs.editor.contents = this.$refs.editor.contents +this.option_context
  3654. this.option_dialog = false
  3655. },
  3656. toContentPint(){
  3657. console.log("hhhhhhhhhhhhhhhhhhhh",this.$refs.editor)
  3658. this.$refs.editor.contents = this.$refs.editor.contents + this.$refs.editorOne.contents
  3659. this.library_dialog = false
  3660. }
  3661. },
  3662. beforeMount(){
  3663. },
  3664. mounted(){
  3665. },
  3666. }
  3667. </script>
  3668. <style rel="stylesheet/css" lang="scss" scoped>
  3669. .container {
  3670. margin-left: 180px;
  3671. padding: 20px;
  3672. background: #fff;
  3673. min-height: calc(100vh - 173px);
  3674. margin-bottom: 15px;
  3675. .record {
  3676. padding-top: 20px;
  3677. }
  3678. }
  3679. .record_content_panel {
  3680. border-width: 1px;
  3681. border-style: solid;
  3682. border-color: #ebeef5;
  3683. min-height: 200px;
  3684. .title {
  3685. font-size: 14px;
  3686. font-weight: 500;
  3687. color: #909399;
  3688. line-height: 44px;
  3689. height: 44px;
  3690. text-align: center;
  3691. border-bottom-width: 1px;
  3692. border-bottom-style: solid;
  3693. border-bottom-color: #ebeef5;
  3694. }
  3695. .content {
  3696. padding: 12px 15px;
  3697. font-size: 15px;
  3698. color: gray;
  3699. line-height: 22px;
  3700. }
  3701. }
  3702. .new_record_form {
  3703. /*/ / padding: 10 px, 25 px;*/
  3704. .textarea_panel {
  3705. margin-top: 10px;
  3706. }
  3707. }
  3708. .eldialog{
  3709. .el-dialog{
  3710. .el-dialog__body{
  3711. max-height: calc(100vh - 80px) !important;
  3712. padding: 0px 20px;
  3713. }
  3714. }
  3715. }
  3716. .Second_title{
  3717. border-left: 5px solid #3891f1f5;
  3718. text-align: left;
  3719. padding-left: 5px;
  3720. // margin-left: 10px;
  3721. margin-bottom: 5px;
  3722. font-size: 16px;
  3723. }
  3724. .text_margin{
  3725. display: block;
  3726. }
  3727. .blood_text{
  3728. border: 1px solid #cfcaca;
  3729. min-height: 400px;
  3730. padding: 5px;
  3731. }
  3732. .inspect{
  3733. line-height: 40px;
  3734. text-align: center;
  3735. border: 1px solid gainsboro;
  3736. }
  3737. .Selectli{
  3738. color: #409eff;
  3739. border-color: #409eff;
  3740. }
  3741. </style>
  3742. <style lang="scss">
  3743. .el-table td,
  3744. .el-table th.is-leaf,
  3745. .el-table--border,
  3746. .el-table--group {
  3747. border-color: #d0d3da;
  3748. }
  3749. .el-table--border::after,
  3750. .el-table--group::after,
  3751. .el-table::before {
  3752. background-color: #d0d3da;
  3753. }
  3754. .eldialog{
  3755. .el-dialog{
  3756. .el-dialog__body{
  3757. max-height: calc(100vh - 80px) !important;
  3758. padding: 0px 20px;
  3759. }
  3760. }
  3761. }
  3762. .lirary{
  3763. .el-dialog__body{
  3764. padding: 0px 20px !important;
  3765. }
  3766. .el-dialog__footer{
  3767. text-align: center;
  3768. }
  3769. }
  3770. .course{
  3771. .el-dialog{
  3772. height: 90%;
  3773. // position: fixed !important;
  3774. // top: 10% !important;
  3775. }
  3776. }
  3777. .elcollapseitem{
  3778. .el-collapse-item__header{
  3779. font-size: 16px;
  3780. color: white;
  3781. background: #409eff;
  3782. }
  3783. }
  3784. </style>