courseOfDisease_new.vue 156KB

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