index.vue 108KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898
  1. <template>
  2. <!-- 点击透析记录患者资料跳转的页面 -->
  3. <div class="main-contain">
  4. <div class="position">
  5. <bread-crumb :crumbs="crumbs"></bread-crumb>
  6. <div class="print" style="float:left;">
  7. <el-button
  8. v-if="queueConfig.txxqyxs == 1"
  9. size="small"
  10. type="primary"
  11. @click="call"
  12. >叫号</el-button
  13. >
  14. <el-button
  15. v-if="queueConfig.txxqyxs == 1"
  16. size="small"
  17. type="primary"
  18. @click="next"
  19. >下一位</el-button
  20. >
  21. <el-button
  22. size="small"
  23. type="primary"
  24. @click="printOrderOne"
  25. icon="el-icon-printer"
  26. >打印上机单</el-button>
  27. <el-button
  28. size="small"
  29. type="primary"
  30. @click="printOrder"
  31. icon="el-icon-printer"
  32. >打印</el-button
  33. >
  34. </div>
  35. </div>
  36. <div
  37. class="loadingBox"
  38. v-loading="loading"
  39. element-loading-text="拼命加载中"
  40. element-loading-spinner="el-icon-loading"
  41. element-loading-background="rgba(0, 0, 0, 0.8)"
  42. >
  43. <div class="patientBox" style="width:300px;padding-left:10px;position: relative;">
  44. <el-button
  45. style="position: absolute;right:0;top:2px;z-index:10"
  46. size="small"
  47. type="primary"
  48. @click="refresh"
  49. >刷新</el-button>
  50. <el-tabs v-model="activeName" @tab-click="handleClick">
  51. <!-- 候诊区 -->
  52. <el-tab-pane label="候诊区" name="first">
  53. <div class="cell clearfix" style="margin-bottom:10px;">
  54. <el-date-picker v-model="selected_date"
  55. prefix-icon="el-icon-date" @change="handleScheduleDateChange"
  56. :editable="false" :clearable="false"
  57. style="width: 45%;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" >
  58. </el-date-picker>
  59. <el-input size="small" style="width:25%;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
  60. <el-button size="small" class="filter-item" type="primary" style="margin-right:20px;" @click="searchAction">搜索</el-button>
  61. </div>
  62. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  63. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="margin-right:10px;" @change="handleStateChange">
  64. <el-option
  65. v-for="item in patient_state"
  66. :key="item.value"
  67. :label="item.label"
  68. :value="item.value">
  69. </el-option>
  70. </el-select>
  71. <el-select v-model="treatStateVal" placeholder="全部治疗状态" style="margin-right:20px;" @change="handleTreatChange">
  72. <el-option
  73. v-for="item in treat_state"
  74. :key="item.value"
  75. :label="item.label"
  76. :value="item.value">
  77. </el-option>
  78. </el-select>
  79. </div>
  80. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  81. <el-select v-model="scheduleStateVal" placeholder="班次" style="margin-right:10px;" @change="handletimeType">
  82. <el-option
  83. v-for="item in schedule_options"
  84. :key="item.value"
  85. :label="item.label"
  86. :value="item.value">
  87. </el-option>
  88. </el-select>
  89. <el-select v-model="zoneVal" placeholder="分区" style="margin-right:20px;" @change="handleZoneChange">
  90. <el-option
  91. v-for="item in zone_options"
  92. :key="item.id"
  93. :label="item.text"
  94. :value="item.id">
  95. </el-option>
  96. </el-select>
  97. </div>
  98. <div style="padding-right:20px;">
  99. <el-table
  100. ref="tab"
  101. @row-click="changePatient"
  102. highlight-current-row
  103. :data="tableData"
  104. height="500"
  105. border
  106. style="width: 100%">
  107. <el-table-column
  108. prop="date"
  109. label="患者"
  110. >
  111. <template slot-scope="scope">
  112. {{ scope.row.patient.name }}
  113. <span v-if="scope.row.assessment_before_dislysis && patientStateVal == 1">
  114. ({{ getTime(scope.row.assessment_before_dislysis.created_time) }})
  115. </span>
  116. </template>
  117. </el-table-column>
  118. <el-table-column
  119. prop="name"
  120. label="状态"
  121. >
  122. <template slot-scope="scope">
  123. <div style="display:flex;align-items:center;justify-content:space-around;">
  124. <span class="tip1" v-if="scope.row.prescription == null || scope.row.prescription.creater == 0">
  125. 待开处方
  126. </span>
  127. <span class="tip2" v-if="scope.row.assessment_before_dislysis == null || scope.row.assessment_before_dislysis.weight_before == ''">
  128. 待称重
  129. </span>
  130. </div>
  131. </template>
  132. </el-table-column>
  133. </el-table>
  134. </div>
  135. </el-tab-pane>
  136. <!-- 透析区 -->
  137. <el-tab-pane label="透析区" name="second">
  138. <div class="cell clearfix" style="margin-bottom:10px;">
  139. <el-date-picker v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange" :editable="false" :clearable="false" style="width: 45%;margin-right:10px;" type="date" placeholder="选择日期时间" align="right" ></el-date-picker>
  140. <el-input size="small" style="width:25%;" @keyup.enter.native='searchAction' v-model.trim="search_input" class="filter-item"/>
  141. <el-button size="small" class="filter-item" style="margin-right:20px;" type="primary" @click="searchAction">搜索</el-button>
  142. </div>
  143. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  144. <el-select v-model="patientStateVal" placeholder="全部患者状态" style="margin-right:10px;" @change="handleStateChange">
  145. <el-option
  146. v-for="item in patient_state"
  147. :key="item.value"
  148. :label="item.label"
  149. :value="item.value">
  150. </el-option>
  151. </el-select>
  152. <el-select v-model="treatStateVal" placeholder="全部治疗状态" style="margin-right:20px;" @change="handleTreatChange">
  153. <el-option
  154. v-for="item in treat_state"
  155. :key="item.value"
  156. :label="item.label"
  157. :value="item.value">
  158. </el-option>
  159. </el-select>
  160. </div>
  161. <div class="cell clearfix" style="margin-bottom:10px;display:flex;">
  162. <el-select v-model="scheduleStateVal" placeholder="班次" style="margin-right:10px;" @change="handletimeType">
  163. <el-option
  164. v-for="item in schedule_options"
  165. :key="item.value"
  166. :label="item.label"
  167. :value="item.value">
  168. </el-option>
  169. </el-select>
  170. <el-select v-model="zoneVal" placeholder="分区" style="margin-right:20px;" @change="handleZoneChange">
  171. <el-option
  172. v-for="item in zone_options"
  173. :key="item.id"
  174. :label="item.text"
  175. :value="item.id">
  176. </el-option>
  177. </el-select>
  178. </div>
  179. <div style="padding-right:20px;">
  180. <el-table
  181. ref="tab1"
  182. @row-click="changePatient"
  183. highlight-current-row
  184. :data="tableData1"
  185. height="500"
  186. border
  187. style="width: 100%">
  188. <el-table-column
  189. prop="date"
  190. label="患者"
  191. >
  192. <template slot-scope="scope">
  193. {{ scope.row.patient.name }}
  194. <span v-if="scope.row.assessment_before_dislysis && patientStateVal == 1">
  195. ({{ getTime(scope.row.assessment_before_dislysis.created_time) }})
  196. </span>
  197. </template>
  198. </el-table-column>
  199. <el-table-column
  200. prop="name"
  201. label="状态"
  202. >
  203. <template slot-scope="scope">
  204. <div style="display:flex;align-items:center;justify-content:space-around;">
  205. <span class="tip3" v-if="scope.row.dialysis_order ? scope.row.dialysis_order.stage == 1 : false">
  206. 已上机
  207. </span>
  208. <span class="tip4" v-if="scope.row.dialysis_order ? scope.row.dialysis_order.stage == 2 : false">
  209. 已下机
  210. </span>
  211. <span class="tip5" v-if="scope.row.treatment_summary == null || scope.row.treatment_summary.dialysis_summary == ''">
  212. 待开小结
  213. </span>
  214. </div>
  215. </template>
  216. </el-table-column>
  217. </el-table>
  218. </div>
  219. </el-tab-pane>
  220. </el-tabs>
  221. <!-- 打印上机单弹窗 -->
  222. <el-dialog
  223. :visible.sync="startVisibility"
  224. :close-on-click-modal="false"
  225. :close-on-press-escape="false"
  226. :show-close="false"
  227. width="30%"
  228. >
  229. <el-button
  230. size="small"
  231. icon="el-icon-printer"
  232. type="primary"
  233. @click="printAction"
  234. style="float:right"
  235. >打印</el-button
  236. >
  237. <div id="print_content">
  238. <div class="print_main_content">
  239. <div class="table_panel">
  240. <div v-for="(main_collection,index) in printList" :key="index">
  241. <div class="signPrint" style="width: 360px;font-size:16px;">
  242. <div style="margin-left:50px;">姓名:
  243. <span>{{main_collection.patient.name}} </span>
  244. ({{ main_collection.patient.dialysis_no }},{{getNewAge(main_collection.patient.id_card_no) }}岁)
  245. </div>
  246. <div class="printCell" style="display:flex;justify-content: space-around;">
  247. <span style="display: block;width: 50%;">
  248. 床号:{{ main_collection.number.number }}
  249. <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
  250. <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
  251. <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span>
  252. </span>
  253. <span style="display: block;width: 50%;">{{ printDate }}</span>
  254. </div>
  255. <div class="printCell" style="display:flex;justify-content: space-around;">
  256. <span style="display: block;width: 50%;">干体重:{{main_collection.assessmentbefor.dry_weight}}Kg</span>
  257. <span style="display: block;width: 50%;">抗凝剂:{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
  258. </div>
  259. <div class="printCell" style="display:flex;justify-content: space-around;">
  260. <span style="display: block;width: 50%;">净重值:{{ main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.additional_weight }}Kg</span>
  261. <span style="display: block;width: 50%;">
  262. 首剂: <span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_shouji}} mg</span>
  263. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  264. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  265. </span>
  266. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  267. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  268. </span>
  269. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  270. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  271. </span>
  272. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  273. {{main_collection.dialysissolution.anticoagulant_shouji}} mg
  274. </span>
  275. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  276. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  277. </span>
  278. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  279. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  280. </span>
  281. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  282. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  283. </span>
  284. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  285. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  286. </span>
  287. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  288. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  289. </span>
  290. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  291. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  292. </span>
  293. </span>
  294. </div>
  295. <div class="printCell" style="display:flex;justify-content: space-around;">
  296. <span style="display: block;width: 50%;">体重增加:{{ (main_collection.assessmentbefor.weight_before - assessmentAfterDislysis.weight_after).toFixed(2) }}Kg</span>
  297. <span style="display: block;width: 50%;">
  298. 维持:{{main_collection.dialysissolution.anticoagulant_weichi}}
  299. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  300. mg/h
  301. </span>
  302. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  303. mg/h
  304. </span>
  305. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  306. iu/h
  307. </span>
  308. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  309. mg/h
  310. </span>
  311. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  312. mg/h
  313. </span>
  314. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  315. iu/h
  316. </span>
  317. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  318. iu/h
  319. </span>
  320. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  321. iu/h
  322. </span>
  323. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  324. iu/h
  325. </span>
  326. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  327. iu/h
  328. </span>
  329. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  330. iu/h
  331. </span>
  332. </span>
  333. </div>
  334. <div class="printCell" style="display:flex;justify-content: space-around;">
  335. <span style="display: block;width: 50%;">处方脱水量:{{ main_collection.prescription.target_ultrafiltration }}
  336. <span v-if="$store.getters.xt_user.org.id == 10278 || $store.getters.xt_user.org.id == 10138 || $store.getters.xt_user.org.id == 10460">ml</span>
  337. <span v-else>L</span>
  338. </span>
  339. <span style="display: block;width: 50%;">
  340. 总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}
  341. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  342. mg
  343. </span>
  344. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  345. mg
  346. </span>
  347. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  348. iu
  349. </span>
  350. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  351. mg
  352. </span>
  353. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  354. mg
  355. </span>
  356. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  357. iu
  358. </span>
  359. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  360. iu
  361. </span>
  362. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  363. iu
  364. </span>
  365. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  366. iu
  367. </span>
  368. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  369. iu
  370. </span>
  371. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  372. iu
  373. </span>
  374. </span>
  375. </div>
  376. </div>
  377. </div>
  378. <!-- <div v-for="(main_collection,index) in printList" :key="index" style="width: 80%;">
  379. <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse; text-align: center; margin: auto;">
  380. <tr style="height: 20px;">
  381. <td>{{ printDate }}</td>
  382. <td>机号:{{ main_collection.number.number }}</td>
  383. </tr>
  384. <tr style="height: 20px;">
  385. <td>姓名</td>
  386. <td>{{main_collection.patient.name}}</td>
  387. </tr>
  388. <tr style="height: 20px;">
  389. <td>治疗方式</td>
  390. <td></td>
  391. </tr>
  392. <tr style="height: 20px;">
  393. <td>透析时间</td>
  394. <td>{{ printDate }}</td>
  395. </tr>
  396. <tr style="height: 20px;">
  397. <td>透前体重</td>
  398. <td></td>
  399. </tr>
  400. <tr style="height: 20px;">
  401. <td>干体重</td>
  402. <td>{{main_collection.assessmentbefor.dry_weight}}Kg</td>
  403. </tr>
  404. <tr style="height: 20px;">
  405. <td>超滤量</td>
  406. <td></td>
  407. </tr>
  408. <tr style="height: 20px;">
  409. <td>透前血压</td>
  410. <td>-</td>
  411. </tr>
  412. <tr style="height: 20px;">
  413. <td></td>
  414. <td></td>
  415. </tr>
  416. <tr style="height: 20px;">
  417. <td></td>
  418. <td></td>
  419. </tr>
  420. </table>
  421. </div> -->
  422. </div>
  423. </div>
  424. </div>
  425. <span slot="footer" class="dialog-footer">
  426. <el-button @click="startVisibility = false">取 消</el-button>
  427. </span>
  428. </el-dialog>
  429. <!-- 打印上机单弹窗----新 -->
  430. <el-dialog
  431. :visible.sync="centerDialogVisible"
  432. width="30%"
  433. >
  434. <el-button
  435. size="small"
  436. icon="el-icon-printer"
  437. type="primary"
  438. @click="printAction"
  439. style="float:right"
  440. >打印</el-button
  441. >
  442. <div id="print_content">
  443. <div class="print_main_content">
  444. <div class="table_panel" v-for="(main_collection,index) in printList">
  445. <div style="border: 1px solid black;width: 82%;" >
  446. <div style="margin: 5px 0;">
  447. <span style="font-weight: bolder;">{{main_collection.patient.name}} </span>&nbsp;&nbsp;
  448. <span>
  449. <span v-if="main_collection.patient.gender==1">男</span>
  450. <span v-if="main_collection.patient.gender==2">女</span>
  451. </span>&nbsp;&nbsp;
  452. <span>{{getNewAge(main_collection.patient.id_card_no) }}岁</span>&nbsp;&nbsp;<span>{{getTimes(main_collection.schedule_date)}}</span>&nbsp;&nbsp;
  453. <span></span>
  454. &nbsp;&nbsp;
  455. <span>
  456. <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
  457. <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
  458. <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span>
  459. </span>&nbsp;&nbsp;<span>{{ main_collection.number.number }}</span>
  460. </div>
  461. <div style="margin: 5px 0;">
  462. <span>身高:{{ main_collection.patient.height?main_collection.patient.height:"" }} cm</span>&nbsp;&nbsp;<span>干体重:{{main_collection.assessmentbefor.dry_weight}}kg</span>&nbsp;&nbsp;
  463. <span>HCT:%</span>&nbsp;&nbsp;<span>KTV目标:</span>
  464. </div>
  465. </div>
  466. <div style="height: 30px;width: 82%;border: 1px solid black;">
  467. </div>
  468. <div style="border: 1px solid black;width: 82%;">
  469. <div style="display: flex;margin: 5px 0;">
  470. <div style="flex: 1;">透析模式:{{getModeId(main_collection.mode_id)}}</div>
  471. <div style="flex: 1;">透析器/灌流器:{{main_collection.prescription.dialyzer_perfusion_apparatus }} </div>
  472. </div>
  473. <div style="display: flex;margin: 5px 0;">
  474. <div style="flex: 1;">血流量:{{main_collection.prescription.blood_flow_volume}}ml/min</div>
  475. <div style="flex: 1;">置换液总量:<span v-if="main_collection.prescription.displace_liqui_value>0">{{main_collection.prescription.displace_liqui_value}}</span>L</div>
  476. </div>
  477. <div style="margin: 5px 0;">
  478. <div>透析液类型:
  479. <span>Na:{{ main_collection.prescription.sodium }}</span>
  480. <span>K:{{ main_collection.prescription.kalium }}</span>
  481. <span>Ca:{{main_collection.prescription.calcium }}</span>
  482. <span>
  483. <span v-if="main_collection.prescription.chaptalization==0"> 不含 </span>
  484. <span v-if="main_collection.prescription.chaptalization>0"> 含糖:{{main_collection.prescription.chaptalization}} </span>
  485. HCO3:</span>
  486. </div>
  487. </div>
  488. <div style="display: flex;margin: 5px 0;">
  489. <div style="flex: 1;">超滤曲线:</div>
  490. <div style="flex: 1;">Na曲线:</div>
  491. </div>
  492. <div style="margin: 5px 0;">
  493. <span>抗凝方案:</span>
  494. <span>{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
  495. <span>
  496. 首剂:<span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_shouji}} mg</span>
  497. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  498. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  499. </span>
  500. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  501. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  502. </span>
  503. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  504. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  505. </span>
  506. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  507. {{main_collection.dialysissolution.anticoagulant_shouji}} mg
  508. </span>
  509. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  510. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  511. </span>
  512. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  513. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  514. </span>
  515. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  516. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  517. </span>
  518. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  519. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  520. </span>
  521. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  522. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  523. </span>
  524. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  525. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  526. </span>
  527. </span>
  528. <span>
  529. 维持:{{main_collection.dialysissolution.anticoagulant_weichi}}
  530. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  531. mg/h
  532. </span>
  533. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  534. mg/h
  535. </span>
  536. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  537. iu/h
  538. </span>
  539. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  540. mg/h
  541. </span>
  542. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  543. mg/h
  544. </span>
  545. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  546. iu/h
  547. </span>
  548. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  549. iu/h
  550. </span>
  551. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  552. iu/h
  553. </span>
  554. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  555. iu/h
  556. </span>
  557. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  558. iu/h
  559. </span>
  560. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  561. iu/h
  562. </span>
  563. </span>
  564. <span>
  565. 总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}
  566. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  567. mg
  568. </span>
  569. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  570. mg
  571. </span>
  572. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  573. iu
  574. </span>
  575. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  576. mg
  577. </span>
  578. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  579. mg
  580. </span>
  581. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  582. iu
  583. </span>
  584. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  585. iu
  586. </span>
  587. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  588. iu
  589. </span>
  590. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  591. iu
  592. </span>
  593. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  594. iu
  595. </span>
  596. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  597. iu
  598. </span>
  599. </span>
  600. </div>
  601. <div style="margin: 5px 0;">
  602. 血管通路:{{getBloodAccess(main_collection.assessmentbefor.blood_access_part_opera_id) }}
  603. </div>
  604. </div>
  605. <div style="border: 1px solid black;width: 82%;">
  606. <div style="margin: 5px 0;">高危因素:{{ main_collection.prescription.remark }}</div>
  607. </div>
  608. </div>
  609. </div>
  610. </div>
  611. <span slot="footer" class="dialog-footer">
  612. <el-button @click="centerDialogVisible = false">取 消</el-button>
  613. </span>
  614. </el-dialog>
  615. <el-dialog
  616. :visible.sync="endVisibility"
  617. :close-on-click-modal="false"
  618. :close-on-press-escape="false"
  619. :show-close="false"
  620. width="30%"
  621. >
  622. <el-button
  623. size="small"
  624. icon="el-icon-printer"
  625. type="primary"
  626. @click="printAction"
  627. style="float:right"
  628. >打印</el-button
  629. >
  630. <div id="print_content">
  631. <div class="print_main_content">
  632. <div class="table_panel">
  633. <div v-for="(main_collection,index) in printList" :key="index">
  634. <div class="signPrint" style="width: 360px;font-size:16px;">
  635. <div style="margin-left:50px;">姓名:
  636. <span>{{main_collection.patient.name}} </span>
  637. ({{ main_collection.patient.dialysis_no }},{{getNewAge(main_collection.patient.id_card_no) }}岁)
  638. </div>
  639. <div class="printCell" style="display:flex;justify-content: space-around;">
  640. <span style="display: block;width: 50%;">
  641. 床号:{{ main_collection.number.number }}
  642. <span style="width:auto;" v-if="main_collection.schedule_type == 1">上午</span>
  643. <span style="width:auto;" v-if="main_collection.schedule_type == 2">下午</span>
  644. <span style="width:auto;" v-if="main_collection.schedule_type == 3">晚上</span>
  645. </span>
  646. <span style="display: block;width: 50%;">{{ printDate }}</span>
  647. </div>
  648. <div class="printCell" style="display:flex;justify-content: space-around;">
  649. <span style="display: block;width: 50%;">干体重:{{main_collection.assessmentbefor.dry_weight}}Kg</span>
  650. <span style="display: block;width: 50%;">抗凝剂:{{ main_collection.dialysissolution.anticoagulant ? anticoagulants_confit[main_collection.dialysissolution.anticoagulant].name : ''}}</span>
  651. </div>
  652. <div class="printCell" style="display:flex;justify-content: space-around;">
  653. <span style="display: block;width: 50%;">净重值:{{ main_collection.assessmentbefor.weight_before - main_collection.assessmentbefor.additional_weight }}Kg</span>
  654. <span style="display: block;width: 50%;">
  655. 首剂: <span v-if="main_collection.dialysissolution.anticoagulant == 1">{{main_collection.dialysissolution.anticoagulant_shouji}} mg</span>
  656. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  657. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  658. </span>
  659. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  660. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  661. </span>
  662. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  663. {{main_collection.dialysissolution.anticoagulant_shouji}}mg
  664. </span>
  665. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  666. {{main_collection.dialysissolution.anticoagulant_shouji}} mg
  667. </span>
  668. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  669. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  670. </span>
  671. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  672. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  673. </span>
  674. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  675. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  676. </span>
  677. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  678. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  679. </span>
  680. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  681. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  682. </span>
  683. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  684. {{main_collection.dialysissolution.anticoagulant_shouji}}iu
  685. </span>
  686. </span>
  687. </div>
  688. <div class="printCell" style="display:flex;justify-content: space-around;">
  689. <span style="display: block;width: 50%;">体重增加:{{ (main_collection.assessmentbefor.weight_before - assessmentAfterDislysis.weight_after).toFixed(2) }}Kg</span>
  690. <span style="display: block;width: 50%;">
  691. 维持:{{main_collection.dialysissolution.anticoagulant_weichi}}
  692. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  693. mg/h
  694. </span>
  695. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  696. mg/h
  697. </span>
  698. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  699. iu/h
  700. </span>
  701. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  702. mg/h
  703. </span>
  704. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  705. mg/h
  706. </span>
  707. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  708. iu/h
  709. </span>
  710. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  711. iu/h
  712. </span>
  713. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  714. iu/h
  715. </span>
  716. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  717. iu/h
  718. </span>
  719. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  720. iu/h
  721. </span>
  722. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  723. iu/h
  724. </span>
  725. </span>
  726. </div>
  727. <div class="printCell" style="display:flex;justify-content: space-around;">
  728. <span style="display: block;width: 50%;">处方脱水量:{{ main_collection.prescription.target_ultrafiltration }}
  729. <span v-if="$store.getters.xt_user.org.id == 10278 || $store.getters.xt_user.org.id == 10138">ml</span>
  730. <span v-else>L</span>
  731. </span>
  732. <span style="display: block;width: 50%;">
  733. 总量:{{main_collection.dialysissolution.anticoagulant_zongliang}}
  734. <span v-if="main_collection.dialysissolution.anticoagulant == 1">
  735. mg
  736. </span>
  737. <span v-if="main_collection.dialysissolution.anticoagulant == 2">
  738. mg
  739. </span>
  740. <span v-if="main_collection.dialysissolution.anticoagulant == 3">
  741. iu
  742. </span>
  743. <span v-if="main_collection.dialysissolution.anticoagulant == 4">
  744. mg
  745. </span>
  746. <span v-if="main_collection.dialysissolution.anticoagulant == 5">
  747. mg
  748. </span>
  749. <span v-if="main_collection.dialysissolution.anticoagulant == 6">
  750. iu
  751. </span>
  752. <span v-if="main_collection.dialysissolution.anticoagulant == 7">
  753. iu
  754. </span>
  755. <span v-if="main_collection.dialysissolution.anticoagulant == 8">
  756. iu
  757. </span>
  758. <span v-if="main_collection.dialysissolution.anticoagulant == 9">
  759. iu
  760. </span>
  761. <span v-if="main_collection.dialysissolution.anticoagulant == 10">
  762. iu
  763. </span>
  764. <span v-if="main_collection.dialysissolution.anticoagulant == 11">
  765. iu
  766. </span>
  767. </span>
  768. </div>
  769. </div>
  770. </div>
  771. </div>
  772. </div>
  773. </div>
  774. <span slot="footer" class="dialog-footer">
  775. <el-button @click="endVisibility = false">取 消</el-button>
  776. </span>
  777. </el-dialog>
  778. </div>
  779. <div style="width:75%" v-show="!showView">
  780. <div style="margin-left:60px;color:#34495e">
  781. <span>{{ patient.name }}({{ patient.dialysis_no }})</span>
  782. <span v-if="newTime != ''">&nbsp;&nbsp;|&nbsp;&nbsp;</span>
  783. <span v-if="newTime != ''">签到时间:{{ newTime }}</span>
  784. </div>
  785. <nav-igation
  786. ref="nav"
  787. title="弹窗导航"
  788. @advice="adviceFunc"
  789. :patient="patient"
  790. :schedual="schedual"
  791. :prescription="prescription"
  792. :solution="solution"
  793. :receiver_treatment_access="receiver_treatment_access"
  794. :predialysis_evaluation="predialysis_evaluation"
  795. :doctor_advices="doctor_advices"
  796. :double_check="double_check"
  797. :assessment_after_dislysis="assessment_after_dislysis"
  798. :treatment_summary="treatment_summary"
  799. :monitor_records="monitor_records"
  800. :dialysis_order="dialysis_order"
  801. :admin_users="admin_users"
  802. :devices="devices"
  803. :device_numbers="device_numbers"
  804. :admin_user_map="admin_user_map"
  805. :device_map="device_map"
  806. :device_number_map="device_number_map"
  807. :niprocart_info="niprocart_info"
  808. :jms_info="jms_info"
  809. :fistula_needle_set_info="fistula_needle_set_info"
  810. :fistula_needle_set_16_info="fistula_needle_set_16_info"
  811. :hemoperfusion_info="hemoperfusion_info"
  812. :dialyser_sterilised_info="dialyser_sterilised_info"
  813. :filtryzer_info="filtryzer_info"
  814. :dialyzers_info="dialyzers_info"
  815. :injector_info="injector_info"
  816. :bloodlines_info="bloodlines_info"
  817. :tubingHemodialysis_info="tubingHemodialysis_info"
  818. :safe_package_info="safe_package_info"
  819. :aliquid_info="aliquid_info"
  820. :config="config"
  821. :longAdvices="longAdvices"
  822. :waitUploadAdvices="waitUploadAdvices"
  823. :is_open="is_open"
  824. :last_predialysis_evaluation="lastPredialysisEvaluation"
  825. :last_monitor_record="lastMonitorRecord"
  826. :last_assessment_after_dislysis="lastAssessmentAfterDislysis"
  827. :last_dialysis_prescribe="lastDialysisPrescribe"
  828. :last_dryWeight_dislysis="lastDryWeightDislysis"
  829. :special_premission="headNurses"
  830. @assessmentAfterDislysis="assessmentAfterDislysisFunc"
  831. :system_prescribe="system_prescribe"
  832. :his_is_open="his_is_open"
  833. :is_advice_open="is_advice_open"
  834. :lastAssessment="lastAssessment"
  835. :stockType="stockType"
  836. :his_doctor_advices="his_doctor_advices"
  837. :lastOrder="lastOrder"
  838. :dryWeightList="dryWeightList"
  839. :docList="docList"
  840. >
  841. </nav-igation>
  842. <basic-infor
  843. :patient="patient"
  844. :device_number="schedual.id == 0 ? '' : schedual.device_number.number"
  845. :steps="steps"
  846. title="基本信息"
  847. ></basic-infor>
  848. <dialysis-prescription
  849. :prescription="prescription"
  850. :solution="solution"
  851. :device_map="device_map"
  852. :preparestock="preparestock"
  853. title="透析处方"
  854. ></dialysis-prescription>
  855. <!-- <past-data class="往期数据"></past-data> -->
  856. <div style="height: 20px;background-color: #f6f8f9"></div>
  857. <accepts-assessment
  858. :record="receiver_treatment_access"
  859. title="接诊评估"
  860. ></accepts-assessment>
  861. <assessment-before
  862. :record="predialysis_evaluation"
  863. ref="assessment_before"
  864. title="透前评估"
  865. ></assessment-before>
  866. <stat-order
  867. ref="stat_order"
  868. :advices="doctor_advices"
  869. :doctor_map="admin_user_map"
  870. title="临时医嘱"
  871. ></stat-order>
  872. <double-check
  873. ref="double_check"
  874. :record="double_check"
  875. :admin_map="admin_user_map"
  876. title="双人核对 "
  877. ></double-check>
  878. <dialysis-computer
  879. ref="dialysis_computer"
  880. :record="dialysis_order"
  881. :admin_map="admin_user_map"
  882. :device_number_map="device_number_map"
  883. title="透析上机 "
  884. ></dialysis-computer>
  885. <dialysis-monitoring
  886. ref="monitoring"
  887. :monitores="monitor_records"
  888. title="透析监测"
  889. ></dialysis-monitoring>
  890. <el-dialog
  891. title="长期医嘱单"
  892. :visible.sync="dialogFormVisible"
  893. width="960px"
  894. >
  895. <div class="printForm">
  896. <h1 class="title">长期医嘱单</h1>
  897. <div class="info">
  898. <ul>
  899. <li>
  900. <span class="name">姓名:</span>
  901. <input type="text" class="InputBox" />
  902. </li>
  903. <li>
  904. <span class="name">性别:</span>
  905. <input type="text" class="InputBox" />
  906. </li>
  907. <li>
  908. <span class="name">年龄:</span>
  909. <input type="text" class="InputBox" />
  910. </li>
  911. <li>
  912. <span class="name">科别:</span>
  913. <input type="text" class="InputBox" />
  914. </li>
  915. <li>
  916. <span class="name">床号:</span>
  917. <input type="text" class="InputBox" />
  918. </li>
  919. <li>
  920. <span class="name">住院号:</span>
  921. <input type="text" class="InputBox" />
  922. </li>
  923. </ul>
  924. </div>
  925. <table
  926. border="1"
  927. style="border:1px #999 solid;margin-top:20px;"
  928. bordercolorlight="#fff"
  929. bordercolordark="#fff"
  930. width="100%"
  931. cellpadding="0"
  932. cellspacing="0"
  933. class="printTable"
  934. >
  935. <tbody>
  936. <tr align="center">
  937. <th style="width:20%;" colspan="2" align="center">起始</th>
  938. <th style="width:20%;" rowspan="2" align="center">医嘱</th>
  939. <th style="width:8%;" rowspan="2" align="center">医师签名</th>
  940. <th style="width:6%;" rowspan="2" align="center">执行护士签名</th>
  941. <th style="width:42%;" colspan="4" align="center">停止</th>
  942. </tr>
  943. <tr align="center">
  944. <th align="center">日期</th>
  945. <th align="center">时间</th>
  946. <th style="width:10%;" align="center">日期</th>
  947. <th style="width:10%;" align="center">时间</th>
  948. <th style="width:10%;" align="center">医师签名</th>
  949. <th style="width:6%;" align="center">执行护士签名</th>
  950. </tr>
  951. <tr align="center">
  952. <td>2018-90-09</td>
  953. <td>2018-90-09</td>
  954. <td>地方开发发地方开发发方发发发大渡岗</td>
  955. <td>张三</td>
  956. <td>张三</td>
  957. <td>张三</td>
  958. <td>张三</td>
  959. <td>张三</td>
  960. <td>张三</td>
  961. </tr>
  962. <tr align="center">
  963. <td>2018-90-09</td>
  964. <td>2018-90-09</td>
  965. <td>地方开发发地方开发发方发发发大渡岗</td>
  966. <td>张三</td>
  967. <td>张三</td>
  968. <td>张三</td>
  969. <td>张三</td>
  970. <td>张三</td>
  971. <td>张三</td>
  972. </tr>
  973. </tbody>
  974. </table>
  975. </div>
  976. </el-dialog>
  977. <el-dialog title="临时医嘱单" :visible.sync="orders" width="960px">
  978. <div class="printForm">
  979. <h1 class="title">临时医嘱单</h1>
  980. <div class="info">
  981. <ul>
  982. <li>
  983. <span class="name">姓名:</span>
  984. <input type="text" class="InputBox" />
  985. </li>
  986. <li>
  987. <span class="name">性别:</span>
  988. <input type="text" class="InputBox" />
  989. </li>
  990. <li>
  991. <span class="name">年龄:</span>
  992. <input type="text" class="InputBox" />
  993. </li>
  994. <li>
  995. <span class="name">科:</span>
  996. <input type="text" class="InputBox" />
  997. </li>
  998. <li>
  999. <span class="name">区:</span>
  1000. <input type="text" class="InputBox" />
  1001. </li>
  1002. <li>
  1003. <span class="name">房:</span>
  1004. <input type="text" class="InputBox" />
  1005. </li>
  1006. <li>
  1007. <span class="name">床:</span>
  1008. <input type="text" class="InputBox" />
  1009. </li>
  1010. <li>
  1011. <span class="name">住院号:</span>
  1012. <input type="text" class="InputBox" />
  1013. </li>
  1014. </ul>
  1015. </div>
  1016. <table
  1017. border="1"
  1018. style="border:1px #999 solid;margin-top:20px;"
  1019. bordercolorlight="#fff"
  1020. bordercolordark="#fff"
  1021. width="100%"
  1022. cellpadding="0"
  1023. cellspacing="0"
  1024. class="printTable"
  1025. >
  1026. <tbody>
  1027. <tr align="center">
  1028. <th style="width:10%;" align="center">日期</th>
  1029. <th style="width:10%;" align="center">时间</th>
  1030. <th style="width:10%;" align="center">医生签名</th>
  1031. <th style="width:40%;" align="center">医嘱内容</th>
  1032. <th style="width:10%;" align="center">执行时间</th>
  1033. <th style="width:10%;" align="center">护士签名</th>
  1034. <th style="width:10%;" align="center">金额</th>
  1035. </tr>
  1036. <tr align="center">
  1037. <td>2018-90-09</td>
  1038. <td>2018-90-09</td>
  1039. <td>张三</td>
  1040. <td>张三</td>
  1041. <td>张三</td>
  1042. <td>张三</td>
  1043. <td>888</td>
  1044. </tr>
  1045. <tr align="center">
  1046. <td>2018-90-09</td>
  1047. <td>2018-90-09</td>
  1048. <td>张三</td>
  1049. <td>张三</td>
  1050. <td>2018-90-09</td>
  1051. <td>张三</td>
  1052. <td>888</td>
  1053. </tr>
  1054. </tbody>
  1055. </table>
  1056. </div>
  1057. </el-dialog>
  1058. <dialysis-off
  1059. ref="dialysis_off"
  1060. :record="dialysis_order"
  1061. :admin_map="admin_user_map"
  1062. title="透析下机 "
  1063. ></dialysis-off>
  1064. <assessment-after
  1065. ref="assessment_after"
  1066. :record="assessment_after_dislysis"
  1067. title="透后评估"
  1068. ></assessment-after>
  1069. <treatment-of
  1070. ref="treatment_of"
  1071. :record="treatment_summary"
  1072. title="治疗小结"
  1073. ></treatment-of>
  1074. </div>
  1075. <div v-if="showView" style="text-align:center;margin: 0 auto;font-size:20px;">
  1076. <p style="margin-top:20px;">当前叫号</p>
  1077. <p style="margin-top:20px;">{{ $route.query.patient_name ? $route.query.patient_name : ""}}</p>
  1078. <p style="margin-top:20px;">签到时间:{{ $route.query.curPatientTime ? getDates($route.query.curPatientTime) : '' }}</p>
  1079. <p style="color:red;margin-top:20px;">提示:当前患者无排班,请先排班</p>
  1080. </div>
  1081. </div>
  1082. </div>
  1083. </template>
  1084. <script>
  1085. const moment = require('moment')
  1086. import axios from 'axios'
  1087. import NavIgation from './NavIgation'
  1088. import BasicInfor from './BasicInfor'
  1089. import DialysisPrescription from './DialysisPrescription'
  1090. import PastData from './pastData'
  1091. import AcceptsAssessment from './acceptsAssessment'
  1092. import AssessmentBefore from './assessmentBefore'
  1093. import StatOrder from './statOrder'
  1094. import DialysisComputer from './dialysisComputer'
  1095. import DoubleCheck from './doubleCheck'
  1096. import DialysisMonitoring from './dialysisMonitoring'
  1097. import DialysisOff from './dialysisOff'
  1098. import AssessmentAfter from './assessmentAfter'
  1099. import TreatmentOf from './treatmentOf'
  1100. import OperationStaff from './operationStaff'
  1101. import {
  1102. getDialysisScheduleDetail,
  1103. getLongAdviceTwo,
  1104. getDialysisRecordInitData,
  1105. getDialysisSchedules,
  1106. getInitPrintData
  1107. } from '@/api/dialysis_record'
  1108. import { getDataConfig } from '@/utils/data'
  1109. import { parseTime } from '@/utils'
  1110. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  1111. import print from 'print-js'
  1112. import { uParseTime } from '@/utils/tools'
  1113. export default {
  1114. name: 'index',
  1115. components: {
  1116. NavIgation,
  1117. BasicInfor,
  1118. DialysisPrescription,
  1119. PastData,
  1120. AcceptsAssessment,
  1121. AssessmentBefore,
  1122. StatOrder,
  1123. DialysisComputer,
  1124. DoubleCheck,
  1125. DialysisMonitoring,
  1126. DialysisOff,
  1127. AssessmentAfter,
  1128. TreatmentOf,
  1129. OperationStaff,
  1130. BreadCrumb
  1131. },
  1132. data() {
  1133. return {
  1134. crumbs: [
  1135. { path: false, name: '透析管理' },
  1136. { path: false, name: '透析记录' },
  1137. { path: false, name: '透析单' }
  1138. ],
  1139. dialogFormVisible: false,
  1140. orders: false,
  1141. loading: false,
  1142. patient_id: 0,
  1143. date: 0,
  1144. longAdvices: [],
  1145. waitUploadAdvices: [],
  1146. is_open: 0,
  1147. targetAdvices: [],
  1148. patient: { id: 0 }, // 患者信息
  1149. schedual: { id: 0 }, // 患者排班信息
  1150. prescription: { id: 0 }, // 透析处方
  1151. solution: { id: 0 }, // 透析方案
  1152. system_prescribe: { id: 0 },
  1153. receiver_treatment_access: { id: 0 }, // 接诊评估
  1154. predialysis_evaluation: { id: 0 }, // 透前评估
  1155. doctor_advices: [], // 临时医嘱
  1156. double_check: { id: 0 }, // 双人核对
  1157. assessment_after_dislysis: { id: 0 }, // 透后评估
  1158. treatment_summary: { id: 0 }, // 治疗小结
  1159. monitor_records: [], // 透析监测
  1160. dialysis_order: { id: 0 }, // 透析记录
  1161. admin_users: [], // 系统用户列表
  1162. devices: [], // 设备
  1163. device_numbers: [], // 床位号
  1164. admin_user_map: {}, // {user_id: admin_user object}
  1165. device_map: {}, // {device_id: device}
  1166. device_number_map: {}, // {device_number_id: device_number}
  1167. niprocart_info: [],
  1168. jms_info: [],
  1169. fistula_needle_set_info: [],
  1170. fistula_needle_set_16_info: [],
  1171. hemoperfusion_info: [],
  1172. dialyser_sterilised_info: [],
  1173. filtryzer_info: [],
  1174. dialyzers_info: [],
  1175. injector_info: [],
  1176. bloodlines_info: [],
  1177. tubingHemodialysis_info: [],
  1178. safe_package_info: [],
  1179. aliquid_info: [],
  1180. config: {},
  1181. his_is_open:0,
  1182. is_advice_open:0,
  1183. lastPredialysisEvaluation: { id: 0 },
  1184. lastMonitorRecord: { id: 0 },
  1185. lastAssessmentAfterDislysis: { id: 0 },
  1186. lastDryWeightDislysis: { id: 0 },
  1187. lastAssessment:{id:0},
  1188. headNurses: [],
  1189. lastDialysisPrescribe: { id: 0 },
  1190. //
  1191. activeName: 'first',
  1192. selected_date: new Date(),
  1193. // search_input 和 search_keyword,使输入关键字时不会经常刷新 filtedSchedules
  1194. search_keyword: '', // 确定用于搜索的关键字
  1195. search_input: '', // 输入中的关键字
  1196. patient_state: [
  1197. { value: 0, label: '全部患者' },
  1198. { value: 1, label: '已签到' },
  1199. { value: 2, label: '未签到' },
  1200. { value: 3, label: '已上机' },
  1201. { value: 4, label: '已下机' }
  1202. ],
  1203. patientStateVal: 0,
  1204. treat_state: [
  1205. { value: 0, label: '全部治疗' },
  1206. { value: 1, label: '待开处方' },
  1207. { value: 2, label: '待开小结' },
  1208. { value: 3, label: '待医嘱核对' },
  1209. ],
  1210. treatStateVal: 0,
  1211. schedule_options: [
  1212. { value: 0, label: '全部班' },
  1213. { value: 1, label: '上午' },
  1214. { value: 2, label: '下午' },
  1215. { value: 3, label: '晚上' }
  1216. ],
  1217. scheduleStateVal: 0,
  1218. zone_options: [
  1219. { id: 0, text: '全部分区' }
  1220. ],
  1221. zoneVal: 0,
  1222. tableData: [],
  1223. tableData1: [],
  1224. arr: [],
  1225. newName: '',
  1226. newTime: '',
  1227. scheudle_mode:"",
  1228. showView:false,
  1229. curPatient:{},
  1230. queueConfig:{},
  1231. stockType:[],
  1232. preparestock:[],
  1233. his_doctor_advices:[],
  1234. startVisibility:false,
  1235. endVisibility:false,
  1236. centerDialogVisible:false,//新上机单弹窗
  1237. printList:[],
  1238. anticoagulants_confit:null,
  1239. printDate:'',
  1240. assessmentAfterDislysis:{},
  1241. lastOrder:{},
  1242. dryWeightList:[],
  1243. docList:[],
  1244. blood_access_part_opera: [],
  1245. }
  1246. },
  1247. created() {
  1248. this.blood_access_part_opera = getDataConfig('hemodialysis', 'vascular_access_desc')
  1249. this.org_id = this.$store.getters.xt_user.org.id,
  1250. this.printDate = moment().format("YYYY-MM-DD HH:mm:ss")
  1251. if(this.$route.query.showView){
  1252. this.showView = this.$route.query.showView
  1253. }
  1254. if(sessionStorage.getItem("nameActive")){
  1255. this.activeName = sessionStorage.getItem("nameActive")
  1256. }
  1257. var patient_id = this.$route.query.patient_id
  1258. var date = this.$route.query.date
  1259. this.patient_id = patient_id
  1260. this.date = date
  1261. this.getScheduleDetail()
  1262. this.getLongAdvice()
  1263. this.selected_date = this.$route.query.date * 1000
  1264. var schedule_type_selected = this.$store.getters.schedule_type_selected
  1265. var zone_selected = this.$store.getters.zone_selected
  1266. var patient_state_selected = this.$store.getters.patient_state_selected
  1267. var treat_state_selected = this.$store.getters.treat_state_selected
  1268. var selected_date = this.$store.getters.selected_date
  1269. if (schedule_type_selected) {
  1270. this.scheduleStateVal = schedule_type_selected.schedule_type_selected
  1271. }
  1272. if (zone_selected) {
  1273. this.zoneVal = zone_selected.zone_selected
  1274. }
  1275. if (patient_state_selected) {
  1276. this.patientStateVal = patient_state_selected.patient_state_selected
  1277. }
  1278. if (treat_state_selected) {
  1279. this.treatStateVal = treat_state_selected.treat_state_selected
  1280. }
  1281. if (selected_date.selected_date) {
  1282. this.selected_date = selected_date.selected_date
  1283. }
  1284. this.initData = {
  1285. cmd: "queue/join",
  1286. data: {type:3,page:0,size:0},
  1287. };
  1288. this.websocketSend(this.initData)
  1289. this.getInitData()
  1290. this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
  1291. },
  1292. beforeMount() {
  1293. if (this.websocket) {
  1294. if (this.websocket.readyState == 1) {
  1295. console.log('执行1')
  1296. this.websocketMess();
  1297. } else {
  1298. setTimeout(() => {
  1299. console.log('执行2')
  1300. this.websocketMess();
  1301. }, 1000);
  1302. }
  1303. } else {
  1304. setTimeout(() => {
  1305. if (this.websocket) {
  1306. console.log('执行3')
  1307. this.websocketMess();
  1308. } else {
  1309. setTimeout(() => {
  1310. console.log('执行4')
  1311. this.websocketMess();
  1312. }, 1000);
  1313. }
  1314. }, 1000);
  1315. }
  1316. },
  1317. mounted() {
  1318. const timer = setInterval(() => {
  1319. // this.getInitData();
  1320. this.requestDialysisSchedules()
  1321. }, 1000 * 30)
  1322. // 通过$once来监听定时器,在beforeDestroy钩子可以被清除。
  1323. this.$once('hook:beforeDestroy', () => {
  1324. clearInterval(timer)
  1325. })
  1326. let obj = {
  1327. cmd: "queue/join",
  1328. data: {type:3,page:0,size:0},
  1329. };
  1330. this.websocketSend(obj)
  1331. },
  1332. computed: {
  1333. websocket() {
  1334. return this.$store.state.user.websocket;
  1335. },
  1336. steps: function() {
  1337. var steps = [
  1338. { title: '透析处方', finish: false },
  1339. { title: '接诊评估', finish: false },
  1340. { title: '透前评估', finish: false },
  1341. { title: '临时医嘱', finish: false },
  1342. { title: '双人核对', finish: false },
  1343. { title: '透析上机', finish: false },
  1344. { title: '透析监测', finish: false },
  1345. { title: '透析下机', finish: false },
  1346. { title: '透后评估', finish: false },
  1347. { title: '治疗小结', finish: false }
  1348. ]
  1349. steps[0].finish = this.prescription.id && this.prescription.creater > 0
  1350. steps[1].finish = this.receiver_treatment_access.id > 0
  1351. // steps[2].finish =this.predialysis_evaluation.id > 0 && this.predialysis_evaluation.creater > 0
  1352. steps[2].finish =this.predialysis_evaluation.id > 0
  1353. steps[3].finish = this.doctor_advices.length > 0
  1354. steps[5].finish = this.dialysis_order.id > 0
  1355. steps[7].finish =
  1356. this.dialysis_order.id > 0 && this.dialysis_order.stage == 2
  1357. steps[4].finish =
  1358. this.double_check.id > 0 &&
  1359. this.double_check.creater > 0 &&
  1360. this.double_check.modifier > 0
  1361. steps[6].finish = this.monitor_records.length > 0
  1362. // steps[8].finish = this.assessment_after_dislysis.id > 0 && this.assessment_after_dislysis.creater > 0
  1363. steps[8].finish = this.assessment_after_dislysis.id > 0
  1364. steps[9].finish = this.treatment_summary.id > 0
  1365. return steps
  1366. },
  1367. filtedSchedules: function() {
  1368. var search_keyword = this.search_keyword
  1369. if (search_keyword.length > 0) {
  1370. var schedules = []
  1371. for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  1372. const scheduleInfo = this.zone_schedules[o_i]
  1373. var originSchedules = scheduleInfo.schedules
  1374. if (originSchedules.length == 0) {
  1375. continue
  1376. }
  1377. var filtedSchedules = []
  1378. for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  1379. const schedule = originSchedules[s_i]
  1380. if (schedule.patient.name.indexOf(search_keyword) != -1) {
  1381. filtedSchedules.push(schedule)
  1382. // break
  1383. }
  1384. }
  1385. if (filtedSchedules.length > 0) {
  1386. schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  1387. }
  1388. }
  1389. return schedules
  1390. }
  1391. // var zone_selected = this.zoneVal
  1392. // var timetype_selected = this.scheduleStateVal
  1393. // if ((zone_selected == 0 && timetype_selected == 0) || this.zone_options.length <= 1) {
  1394. // var schedules = []
  1395. // for (let index = 0; index < this.zone_schedules.length; index++) {
  1396. // const scheduleInfo = this.zone_schedules[index]
  1397. // if (scheduleInfo.schedules.length != 0) {
  1398. // schedules.push(scheduleInfo)
  1399. // }
  1400. // }
  1401. // return schedules
  1402. // }
  1403. // var schedules = []
  1404. // for (let o_i = 0; o_i < this.zone_schedules.length; o_i++) {
  1405. // const scheduleInfo = this.zone_schedules[o_i]
  1406. // if (zone_selected == scheduleInfo.zone_id && timetype_selected == 0) {
  1407. // if (scheduleInfo.schedules.length == 0) {
  1408. // return []
  1409. // } else {
  1410. // return [scheduleInfo]
  1411. // }
  1412. // }
  1413. // var originSchedules = scheduleInfo.schedules
  1414. // if (originSchedules.length == 0) {
  1415. // continue
  1416. // }
  1417. // var filtedSchedules = []
  1418. // for (let s_i = 0; s_i < originSchedules.length; s_i++) {
  1419. // const schedule = originSchedules[s_i]
  1420. // if (zone_selected != 0) {
  1421. // if (zone_selected == schedule.device_number.zone.id) {
  1422. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  1423. // filtedSchedules.push(schedule)
  1424. // }
  1425. // }
  1426. // } else {
  1427. // if (timetype_selected == 0 || schedule.schedule_type == timetype_selected) {
  1428. // filtedSchedules.push(schedule)
  1429. // }
  1430. // }
  1431. // }
  1432. // if (filtedSchedules.length > 0) {
  1433. // schedules.push({ zone_id: scheduleInfo.zone_id, zone_name: scheduleInfo.zone_name, schedules: filtedSchedules })
  1434. // }
  1435. // }
  1436. // return schedules
  1437. }
  1438. },
  1439. beforeDestroy(){
  1440. let unObj = {
  1441. cmd: "queue/unjoin",
  1442. data: {type:3},
  1443. };
  1444. this.websocketSend(unObj)
  1445. },
  1446. methods: {
  1447. getNewAge(UUserCard) {
  1448. if (UUserCard != null && UUserCard != '') {
  1449. // 获取年龄
  1450. var myDate = new Date()
  1451. var month = myDate.getMonth() + 1
  1452. var day = myDate.getDate()
  1453. var age = myDate.getFullYear() - UUserCard.substring(6, 10) - 1
  1454. if (UUserCard.substring(10, 12) < month || UUserCard.substring(10, 12) == month && UUserCard.substring(12, 14) <= day) {
  1455. age++
  1456. }
  1457. return age
  1458. }
  1459. },
  1460. adviceFunc() {
  1461. this.getScheduleDetail()
  1462. },
  1463. getLongAdvice() {
  1464. const params = {
  1465. patient_id: this.patient_id,
  1466. schedule_date:this.$route.query.date,
  1467. }
  1468. getLongAdviceTwo(params).then(rs => {
  1469. var resp = rs.data
  1470. if (resp.state == 1) {
  1471. var status = parseInt(resp.data.status)
  1472. switch (status) {
  1473. case 2:
  1474. var totalAdvice = resp.data.advices
  1475. var longAdvicesTwo = resp.data.advices_two
  1476. var waitUploadAdvices = []
  1477. for (let i = 0; i < totalAdvice.length; i++) {
  1478. totalAdvice[i]['isCheck'] = 1
  1479. }
  1480. for (let i = 0; i < totalAdvice.length; i++) {
  1481. for (let a = 0; a < longAdvicesTwo.length; a++) {
  1482. if (
  1483. totalAdvice[i].template_id ==
  1484. longAdvicesTwo[a].template_id &&
  1485. totalAdvice[i].frequency_type ==
  1486. longAdvicesTwo[a].frequency_type
  1487. ) {
  1488. totalAdvice[i]['isCheck'] = 0
  1489. }
  1490. }
  1491. }
  1492. for (let i = 0; i < totalAdvice.length; i++) {
  1493. if (totalAdvice[i].isCheck == 1) {
  1494. waitUploadAdvices.push(totalAdvice[i])
  1495. }
  1496. }
  1497. this.is_open = resp.data.is_open_remind
  1498. if(this.his_is_open == 1){
  1499. this.is_open = 0
  1500. }
  1501. if(this.is_advice_open == 1){
  1502. this.is_open = 1
  1503. }
  1504. this.longAdvices = totalAdvice
  1505. console.log("长期医嘱汇总 u 公告让你😯23232322332",this.longAdvices)
  1506. this.waitUploadAdvices = waitUploadAdvices
  1507. break
  1508. }
  1509. } else {
  1510. this.$message.error(resp.msg)
  1511. }
  1512. })
  1513. },
  1514. assessmentAfterDislysisFunc: function(val) {
  1515. for (var index in val) {
  1516. this.$set(this.assessment_after_dislysis, index, val[index])
  1517. }
  1518. },
  1519. didDelMonitor(record_id) {
  1520. var mrl = this.monitor_records.length
  1521. for (let index = 0; index < mrl; index++) {
  1522. if (this.monitor_records[index].id == record_id) {
  1523. this.monitor_records.splice(index, 1)
  1524. break
  1525. }
  1526. }
  1527. },
  1528. getScheduleDetail: function() {
  1529. this.loading = true
  1530. var dateStr = parseTime(this.date, '{y}-{m}-{d}')
  1531. if(this.$route.query.showView == true){
  1532. this.loading = false
  1533. return
  1534. }
  1535. this.doctor_advices = []
  1536. getDialysisScheduleDetail(this.patient_id, dateStr).then(rs => {
  1537. var resp = rs.data
  1538. if (resp.state == 1) {
  1539. var patient = resp.data.patient // 患者信息
  1540. var schedual = resp.data.schedual // 患者排班信息
  1541. // console.log("排班22222222222",schedual)
  1542. var prescription = resp.data.prescription // 透析处方
  1543. if (prescription != null) {
  1544. if (prescription.body_fluid == -2) {
  1545. prescription.body_fluid = 0
  1546. }
  1547. if(prescription.bilirubin_adsorption_column == 0){
  1548. prescription.bilirubin_adsorption_column = ""
  1549. }
  1550. if(prescription.plasma_separator == 0){
  1551. prescription.plasma_separator = ""
  1552. }
  1553. }
  1554. var solution = resp.data.solution // 透析方案
  1555. var receiver_treatment_access = resp.data.receiver_treatment_access // 接诊评估
  1556. var predialysis_evaluation = resp.data.predialysis_evaluation // 透前评估
  1557. if (predialysis_evaluation != null) {
  1558. if (predialysis_evaluation.blood_access_part_id == -2) {
  1559. predialysis_evaluation.blood_access_part_id = 0
  1560. }
  1561. if(predialysis_evaluation.blood_pressure_during_dialysis == 0){
  1562. predialysis_evaluation.blood_pressure_during_dialysis = ""
  1563. }
  1564. }
  1565. var doctor_advices = resp.data.doctor_advices // 临时医嘱
  1566. var double_check = resp.data.double_check // 双人核对
  1567. var assessment_after_dislysis = resp.data.assessment_after_dislysis // 透后评估
  1568. var treatment_summary = resp.data.treatment_summary // 治疗小结
  1569. var monitor_records = resp.data.monitor_records // 透析监测
  1570. var dialysis_order = resp.data.dialysis_order // 透析记录
  1571. var niprocart_info = resp.data.niprocart_info
  1572. var jms_info = resp.data.jms_info
  1573. var fistula_needle_set_info = resp.data.fistula_needle_set_info
  1574. var fistula_needle_set_16_info = resp.data.fistula_needle_set_16_info
  1575. var hemoperfusion_info = resp.data.hemoperfusion_info
  1576. var dialyser_sterilised_info = resp.data.dialyser_sterilised_info
  1577. var filtryzer_info = resp.data.filtryzer_info
  1578. var dialyzers_info = resp.data.dialyzers_info
  1579. var injector_info = resp.data.injector_info
  1580. var bloodlines_info = resp.data.bloodlines_info
  1581. var tubingHemodialysis_info = resp.data.tubingHemodialysis_info
  1582. var safe_package_info = resp.data.safe_package_info
  1583. var aliquid_info = resp.data.aliquid_info
  1584. var lastPredialysisEvaluation = resp.data.lastPredialysisEvaluation
  1585. if (lastPredialysisEvaluation != null) {
  1586. if (lastPredialysisEvaluation.blood_access_part_id == -2) {
  1587. lastPredialysisEvaluation.blood_access_part_id = 0
  1588. }
  1589. }
  1590. var lastMonitorRecord = resp.data.lastMonitorRecord
  1591. var lastAssessmentAfterDislysis = resp.data.lastAssessmentAfterDislysis
  1592. // if(lastAssessmentAfterDislysis.hypertenison!=""){
  1593. // lastAssessmentAfterDislysis.hypertenison = lastAssessmentAfterDislysis.hypertenison.toString()
  1594. // }
  1595. // if(lastAssessmentAfterDislysis.hypopiesia!=""){
  1596. // lastAssessmentAfterDislysis.hypopiesia = lastAssessmentAfterDislysis.hypopiesia.toString()
  1597. // }
  1598. var lastDialysisPrescribe = resp.data.lastDialysisPrescribe
  1599. var lastDryWeightDislysis = resp.data.lastDryWeightDislysis
  1600. var system_prescribe = resp.data.system_prescribe
  1601. var lastAssessment = resp.data.lastAssessment
  1602. var lastOrder = resp.data.lastOrder
  1603. this.lastOrder = lastOrder
  1604. this.$refs.nav.setLastRecord(
  1605. lastPredialysisEvaluation,
  1606. lastMonitorRecord,
  1607. lastAssessmentAfterDislysis,
  1608. lastDialysisPrescribe,
  1609. lastDryWeightDislysis,
  1610. schedual,
  1611. system_prescribe,
  1612. lastAssessment,
  1613. )
  1614. var headNurses = resp.data.headNurse
  1615. var config = resp.data.config
  1616. this.lastPredialysisEvaluation = lastPredialysisEvaluation
  1617. this.lastMonitorRecord = lastMonitorRecord
  1618. this.lastAssessmentAfterDislysis = lastAssessmentAfterDislysis
  1619. this.lastDialysisPrescribe = lastDialysisPrescribe
  1620. this.lastDryWeightDislysis = lastDryWeightDislysis
  1621. this.lastAssessment = lastAssessment
  1622. this.headNurses = headNurses
  1623. this.system_prescribe = system_prescribe
  1624. this.niprocart_info = []
  1625. this.jms_info = []
  1626. this.fistula_needle_set_info = []
  1627. this.fistula_needle_set_16_info = []
  1628. this.hemoperfusion_info = []
  1629. this.dialyser_sterilised_info = []
  1630. this.filtryzer_info = []
  1631. this.dialyzers_info = []
  1632. this.injector_info = []
  1633. this.bloodlines_info = []
  1634. this.tubingHemodialysis_info = []
  1635. this.safe_package_info = []
  1636. this.aliquid_info = []
  1637. this.niprocart_info = niprocart_info
  1638. this.jms_info = jms_info
  1639. this.fistula_needle_set_info = fistula_needle_set_info
  1640. this.fistula_needle_set_16_info = fistula_needle_set_16_info
  1641. this.hemoperfusion_info = hemoperfusion_info
  1642. this.dialyser_sterilised_info = dialyser_sterilised_info
  1643. this.filtryzer_info = filtryzer_info
  1644. this.dialyzers_info = dialyzers_info
  1645. this.injector_info = injector_info
  1646. this.bloodlines_info = bloodlines_info
  1647. this.tubingHemodialysis_info = tubingHemodialysis_info
  1648. this.safe_package_info = safe_package_info
  1649. this.aliquid_info = aliquid_info
  1650. this.config = config
  1651. this.patient = patient
  1652. this.schedual = schedual == null ? { id: 0 } : schedual
  1653. this.prescription = prescription == null ? { id: 0 } : prescription
  1654. this.solution = solution == null ? { id: 0 } : solution
  1655. this.receiver_treatment_access =
  1656. receiver_treatment_access == null
  1657. ? { id: 0 }
  1658. : receiver_treatment_access
  1659. this.predialysis_evaluation =
  1660. predialysis_evaluation == null ? { id: 0 } : predialysis_evaluation
  1661. this.doctor_advices = doctor_advices == null ? [] : doctor_advices
  1662. this.double_check = double_check == null ? { id: 0 } : double_check
  1663. this.assessment_after_dislysis =
  1664. assessment_after_dislysis == null
  1665. ? { id: 0 }
  1666. : assessment_after_dislysis
  1667. this.treatment_summary =
  1668. treatment_summary == null ? { id: 0 } : treatment_summary
  1669. this.monitor_records = monitor_records == null ? [] : monitor_records
  1670. this.dialysis_order =
  1671. dialysis_order == null ? { id: 0 } : dialysis_order
  1672. this.admin_users = resp.data.doctors
  1673. this.devices = resp.data.devices
  1674. this.device_numbers = resp.data.device_numbers
  1675. var his_doctor_advices = resp.data.his_advices
  1676. this.his_doctor_advices = his_doctor_advices
  1677. this.his_is_open = resp.data.is_open_config.is_open
  1678. this.is_advice_open = resp.data.is_advice_open.is_advice_open
  1679. var stockType = resp.data.stockType
  1680. this.stockType = stockType
  1681. this.dryWeightList = resp.data.dryWeightList
  1682. this.docList = resp.data.docList
  1683. console.log("doclist-----",this.docList)
  1684. var prepare = resp.data.prepare
  1685. if(prepare!=null){
  1686. this.preparestock = prepare
  1687. }else{
  1688. this.preparestock = []
  1689. }
  1690. for (let i = 0; i < this.doctor_advices.length; i++){
  1691. this.doctor_advices[i]['origin'] = 1
  1692. }
  1693. if (his_doctor_advices != null) {
  1694. for (let i = 0; i < his_doctor_advices.length; i++) {
  1695. his_doctor_advices[i]['origin'] = 2
  1696. his_doctor_advices[i]['way'] = 1
  1697. this.doctor_advices.push(his_doctor_advices[i])
  1698. }
  1699. }
  1700. const obj = {}
  1701. this.doctor_advices = this.doctor_advices.reduce((cur, next) => {
  1702. obj[next.id] ? '' : obj[next.id] = true && cur.push(next)
  1703. return cur
  1704. }, []) // 设置cur默认类型为数组,并且初始值为空的数组
  1705. var device_map = {}
  1706. for (let index = 0; index < this.devices.length; index++) {
  1707. const device = this.devices[index]
  1708. device_map[device.id] = device
  1709. }
  1710. this.device_map = device_map
  1711. var admin_map = {}
  1712. for (let index = 0; index < this.admin_users.length; index++) {
  1713. const admin = this.admin_users[index]
  1714. admin_map[admin.id] = admin
  1715. }
  1716. this.admin_user_map = admin_map
  1717. var device_number_map = {}
  1718. for (let index = 0; index < this.device_numbers.length; index++) {
  1719. const device_number = this.device_numbers[index]
  1720. device_number_map[device_number.id] = device_number
  1721. }
  1722. this.device_number_map = device_number_map
  1723. } else {
  1724. this.$message.error(resp.msg)
  1725. }
  1726. // 目标超滤量是否默认上次数据
  1727. if (this.lastDialysisPrescribe != null) {
  1728. delete this.lastDialysisPrescribe.target_ultrafiltration
  1729. }
  1730. if (this.solution != null) {
  1731. delete this.solution.target_ultrafiltration
  1732. }
  1733. if(this.predialysis_evaluation.id > 0){
  1734. this.newTime = parseTime(this.predialysis_evaluation.created_time, '{h}:{i}')
  1735. }
  1736. this.loading = false
  1737. })
  1738. },
  1739. printOrder() {
  1740. var xtdate = parseTime(this.date, '{y}-{m}-{d}')
  1741. this.$router.push(
  1742. '/dialysis/print?xtdate=' + xtdate + '&xtno=' + this.patient.dialysis_no +"&patient_id="+this.patient.id
  1743. )
  1744. },
  1745. printOrderOne(){
  1746. this.getInitPrintData()
  1747. },
  1748. // 日期
  1749. handleScheduleDateChange: function(index) {
  1750. this.treatStateVal = 0
  1751. this.patientStateVal = 0
  1752. this.zoneVal = 0
  1753. this.scheduleStateVal = 0
  1754. this.search_keyword = this.search_input = ''
  1755. // this.$store.dispatch("SaveDialysisAreaSelectIndexs", {
  1756. // zone: this.zone_selected,
  1757. // schedule_type: this.schedule_type_selected,
  1758. // schedule_date: this.selected_date,
  1759. // })
  1760. this.selected_date = index
  1761. this.$store.dispatch('SetSelectedDate', { selected_date: index })
  1762. this.requestDialysisSchedules()
  1763. },
  1764. // 初始化数据
  1765. getInitData: function() {
  1766. getDialysisRecordInitData().then(rs => {
  1767. var resp = rs.data
  1768. if (resp.state == 1) {
  1769. var zones = resp.data.zones
  1770. var schedules = resp.data.schedules
  1771. var zone_options = [{ id: 0, text: '全部分区' }]
  1772. for (let z_i = 0; z_i < zones.length; z_i++) {
  1773. const zone = zones[z_i]
  1774. zone_options.push({ id: zone.id, text: zone.name })
  1775. }
  1776. this.zone_options = zone_options
  1777. this.arr = this.processedDialysisSchedules(schedules, this.zone_options)
  1778. this.requestDialysisSchedules()
  1779. } else {
  1780. this.$message.error(resp.msg)
  1781. }
  1782. })
  1783. },
  1784. // 班次
  1785. handletimeType: function(index) {
  1786. this.scheduleStateVal = index
  1787. this.$store.dispatch('SetScheduleTypeSelected', { schedule_type_selected: index })
  1788. this.search_keyword = this.search_input = ''
  1789. this.getData()
  1790. },
  1791. // 分区
  1792. handleZoneChange: function(index) {
  1793. this.zoneVal = index
  1794. this.$store.dispatch('SetZoneSelected', { zone_selected: index })
  1795. this.search_keyword = this.search_input = ''
  1796. this.getData()
  1797. },
  1798. // 患者状态
  1799. handleStateChange: function(index) {
  1800. this.patientStateVal = index
  1801. this.$store.dispatch('SetPatientStateSelected', { patient_state_selected: index })
  1802. this.search_keyword = this.search_input = ''
  1803. this.getData()
  1804. },
  1805. handleTreatChange: function(index) {
  1806. this.treatStateVal = index
  1807. this.$store.dispatch('SetTreatStateSelected', { treat_state_selected: index })
  1808. this.search_keyword = this.search_input = ''
  1809. this.getData()
  1810. },
  1811. processedDialysisSchedules: function(schedules, zone_options) {
  1812. var zoneMap = {}
  1813. var scheduleMap = {}
  1814. for (let z_i = 0; z_i < zone_options.length; z_i++) {
  1815. const zone = zone_options[z_i]
  1816. if (zone.id == 0) {
  1817. continue
  1818. }
  1819. scheduleMap[zone.id] = []
  1820. }
  1821. for (let index = 0; index < schedules.length; index++) {
  1822. const schedule = schedules[index]
  1823. scheduleMap[schedule.device_number.zone.id].push(schedule)
  1824. }
  1825. var zone_schedules = []
  1826. for (let index = 0; index < zone_options.length; index++) {
  1827. const zone = zone_options[index]
  1828. if (zone.id == 0) {
  1829. continue
  1830. }
  1831. var schedules = scheduleMap[zone.id]
  1832. zone_schedules.push({ zone_id: zone.id, zone_name: zone.text, schedules: schedules })
  1833. }
  1834. return zone_schedules
  1835. },
  1836. searchAction: function() {
  1837. this.search_keyword = this.search_input
  1838. this.scheduleStateVal = 0
  1839. this.zoneVal = 0
  1840. this.treatStateVal = 0
  1841. this.patientStateVal = 0
  1842. if (this.search_input != '') {
  1843. const arr = []
  1844. this.filtedSchedules.map(item => {
  1845. arr.push(...item.schedules)
  1846. })
  1847. if (this.activeName == 'first') {
  1848. this.tableData = arr
  1849. } else if (this.activeName == 'second') {
  1850. this.tableData1 = arr
  1851. }
  1852. } else {
  1853. this.getData()
  1854. }
  1855. },
  1856. requestDialysisSchedules: function() {
  1857. console.log("时间人民站起来了呃")
  1858. var ymd = parseTime(this.selected_date, '{y}-{m}-{d}')
  1859. getDialysisSchedules(ymd).then(rs => {
  1860. var resp = rs.data
  1861. if (resp.state == 1) {
  1862. var schedules = resp.data.schedules
  1863. // if(this.prescription!=null){
  1864. // for(let i=0;i<schedules.length;i++){
  1865. // if(this.prescription.patient_id == schedules[i].patient_id){
  1866. // this.prescription = schedules[i].prescription
  1867. // }
  1868. // }
  1869. // }
  1870. this.zone_schedules = this.processedDialysisSchedules(schedules, this.zone_options)
  1871. const patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  1872. if (this.activeName == 'first') {
  1873. for (let i = 0; i < patientArr.length; i++) {
  1874. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1875. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
  1876. // 删除元素后改变i的值
  1877. patientArr[i].schedules.splice(j--, 1)
  1878. }
  1879. }
  1880. }
  1881. } else if (this.activeName == 'second') {
  1882. for (let i = 0; i < patientArr.length; i++) {
  1883. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1884. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
  1885. // 删除元素后改变i的值
  1886. patientArr[i].schedules.splice(j--, 1)
  1887. }
  1888. }
  1889. }
  1890. }
  1891. const newArr = []
  1892. patientArr.map(item => {
  1893. newArr.push(...item.schedules)
  1894. })
  1895. this.tableData = newArr
  1896. this.getData()
  1897. } else {
  1898. this.$message.error(resp.msg)
  1899. }
  1900. })
  1901. },
  1902. changePatient(schedual) {
  1903. this.patient_id = schedual.patient_id
  1904. this.date = schedual.schedule_date
  1905. // this.getScheduleDetail();
  1906. this.getLongAdvice();
  1907. var patient_id = schedual.patient_id
  1908. var date = schedual.schedule_date
  1909. this.$router.push({
  1910. path: '/dialysis/details',
  1911. query: {
  1912. patient_id: patient_id,
  1913. date: date,
  1914. patient_name: schedual.patient.name,
  1915. mode_id:schedual.mode_id
  1916. }
  1917. })
  1918. },
  1919. handleClick(type) {
  1920. sessionStorage.setItem('nameActive', type.name);
  1921. this.getData()
  1922. },
  1923. getData() {
  1924. let patientArr = []
  1925. patientArr = JSON.parse(JSON.stringify(this.zone_schedules))
  1926. if (this.activeName == 'first') {
  1927. for (let i = 0; i < patientArr.length; i++) {
  1928. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  1929. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order != null) {
  1930. // 删除元素后改变i的值
  1931. // console.log('候诊区', patientArr[i].schedules[j])
  1932. patientArr[i].schedules.splice(j--, 1)
  1933. }
  1934. }
  1935. }
  1936. let arr1 = []
  1937. if (this.patientStateVal == 0) {
  1938. arr1 = patientArr
  1939. } else if (this.patientStateVal == 1) {
  1940. let arr = []
  1941. arr = patientArr
  1942. for (let i = 0; i < arr.length; i++) {
  1943. for (let j = 0; j < arr[i].schedules.length; j++) {
  1944. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis == null || (arr[i].schedules[j].assessment_before_dislysis.weight_before == '' && arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure == '' && arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure == ''))) {
  1945. // 删除元素后改变i的值
  1946. arr[i].schedules.splice(j--, 1)
  1947. }
  1948. }
  1949. }
  1950. // console.log('执行1', arr)
  1951. arr1 = arr
  1952. } else if (this.patientStateVal == 2) {
  1953. let arr = []
  1954. arr = patientArr
  1955. for (let i = 0; i < arr.length; i++) {
  1956. for (let j = 0; j < arr[i].schedules.length; j++) {
  1957. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis != null && (arr[i].schedules[j].assessment_before_dislysis.weight_before != 0 || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure != 0 || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure != 0))) {
  1958. // 删除元素后改变i的值
  1959. arr[i].schedules.splice(j--, 1)
  1960. }
  1961. }
  1962. }
  1963. // console.log('执行2', arr)
  1964. arr1 = arr
  1965. }
  1966. let arr2 = []
  1967. if (this.treatStateVal == 0) {
  1968. arr2 = JSON.parse(JSON.stringify(arr1))
  1969. } else if (this.treatStateVal == 1) {
  1970. let arr = []
  1971. arr = JSON.parse(JSON.stringify(arr1))
  1972. for (let i = 0; i < arr.length; i++) {
  1973. for (let j = 0; j < arr[i].schedules.length; j++) {
  1974. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].prescription != null || arr[i].schedules[j].prescription != null ? arr[i].schedules[j].prescription.creater != 0 : false)) {
  1975. // 删除元素后改变i的值
  1976. arr[i].schedules.splice(j--, 1)
  1977. }
  1978. }
  1979. }
  1980. arr2 = arr
  1981. } else if(this.treatStateVal == 3){
  1982. let arr = []
  1983. arr = JSON.parse(JSON.stringify(arr1))
  1984. for (let i = 0; i < arr.length; i++) {
  1985. for (let j = 0; j < arr[i].schedules.length; j++) {
  1986. if(arr[i].schedules[j].doctor_advice.length == 0){
  1987. arr[i].schedules.splice(j--, 1)
  1988. }
  1989. if(arr[i].schedules && arr[i].schedules[j] && arr[i].schedules[j].doctor_advice){
  1990. let sign = 0
  1991. arr[i].schedules[j].doctor_advice.map(item => {
  1992. if(item.check_state == 1){
  1993. sign++
  1994. }
  1995. })
  1996. if(sign == arr[i].schedules[j].doctor_advice.length && arr[i].schedules[j].doctor_advice.length > 0){
  1997. arr[i].schedules.splice(j--, 1)
  1998. }
  1999. }
  2000. }
  2001. }
  2002. arr2 = arr
  2003. }
  2004. let arr3 = []
  2005. if (this.scheduleStateVal == 0) {
  2006. arr3 = JSON.parse(JSON.stringify(arr2))
  2007. } else {
  2008. let arr = []
  2009. arr = JSON.parse(JSON.stringify(arr2))
  2010. for (let i = 0; i < arr.length; i++) {
  2011. for (let j = 0; j < arr[i].schedules.length; j++) {
  2012. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  2013. // 删除元素后改变i的值
  2014. arr[i].schedules.splice(j--, 1)
  2015. }
  2016. }
  2017. }
  2018. arr3 = arr
  2019. }
  2020. let arr4 = []
  2021. if (this.zoneVal == 0) {
  2022. arr4 = JSON.parse(JSON.stringify(arr3))
  2023. } else {
  2024. let arr = []
  2025. arr = JSON.parse(JSON.stringify(arr3))
  2026. for (let i = 0; i < arr.length; i++) {
  2027. if (this.zoneVal != arr[i].zone_id) {
  2028. // 删除元素后改变i的值
  2029. arr.splice(i--, 1)
  2030. }
  2031. }
  2032. arr4 = arr
  2033. }
  2034. const newArr = []
  2035. arr4.map(item => {
  2036. newArr.push(...item.schedules)
  2037. })
  2038. if(this.patientStateVal == 1){
  2039. newArr.map(item => {
  2040. item.created_time = item.assessment_before_dislysis.created_time
  2041. })
  2042. newArr.sort(this.compare('created_time'))
  2043. }
  2044. // console.log('排序',newArr)
  2045. this.tableData = newArr
  2046. const name = this.$route.query.patient_name
  2047. this.tableData.map((item, index) => {
  2048. if (name == item.patient.name) {
  2049. // if (item.assessment_before_dislysis != null) {
  2050. // this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
  2051. // }
  2052. setTimeout(() => {
  2053. this.$refs.tab.setCurrentRow(this.tableData[index])
  2054. }, 10)
  2055. }
  2056. })
  2057. } else if (this.activeName == 'second') {
  2058. for (let i = 0; i < patientArr.length; i++) {
  2059. for (let j = 0; j < patientArr[i].schedules.length; j++) {
  2060. if (patientArr[i].schedules.length > 0 && patientArr[i].schedules[j].dialysis_order == null) {
  2061. // 删除元素后改变i的值
  2062. patientArr[i].schedules.splice(j--, 1)
  2063. }
  2064. }
  2065. }
  2066. let arr1 = []
  2067. // let patientArr =
  2068. if (this.patientStateVal == 0) {
  2069. arr1 = patientArr
  2070. } else if (this.patientStateVal == 1) {
  2071. let arr = []
  2072. arr = patientArr
  2073. for (let i = 0; i < arr.length; i++) {
  2074. for (let j = 0; j < arr[i].schedules.length; j++) {
  2075. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis == null || (arr[i].schedules[j].assessment_before_dislysis.weight_before == '' && arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure == '' && arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure == ''))) {
  2076. // 删除元素后改变i的值
  2077. arr[i].schedules.splice(j--, 1)
  2078. }
  2079. }
  2080. }
  2081. arr1 = arr
  2082. } else if (this.patientStateVal == 2) {
  2083. let arr = []
  2084. arr = patientArr
  2085. for (let i = 0; i < arr.length; i++) {
  2086. for (let j = 0; j < arr[i].schedules.length; j++) {
  2087. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].assessment_before_dislysis != null && (arr[i].schedules[j].assessment_before_dislysis.weight_before != 0 || arr[i].schedules[j].assessment_before_dislysis.diastolic_blood_pressure != 0 || arr[i].schedules[j].assessment_before_dislysis.systolic_blood_pressure != 0))) {
  2088. // 删除元素后改变i的值
  2089. arr[i].schedules.splice(j--, 1)
  2090. }
  2091. }
  2092. }
  2093. arr1 = arr
  2094. } else if (this.patientStateVal == 3) {
  2095. let arr = []
  2096. arr = patientArr
  2097. for (let i = 0; i < arr.length; i++) {
  2098. for (let j = 0; j < arr[i].schedules.length; j++) {
  2099. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 1)) {
  2100. // 删除元素后改变i的值
  2101. arr[i].schedules.splice(j--, 1)
  2102. }
  2103. }
  2104. }
  2105. arr1 = arr
  2106. } else if (this.patientStateVal == 4) {
  2107. let arr = []
  2108. arr = patientArr
  2109. for (let i = 0; i < arr.length; i++) {
  2110. for (let j = 0; j < arr[i].schedules.length; j++) {
  2111. if (arr[i].schedules.length > 0 && (arr[i].schedules[j].dialysis_order != null && arr[i].schedules[j].dialysis_order.stage != 2)) {
  2112. // 删除元素后改变i的值
  2113. arr[i].schedules.splice(j--, 1)
  2114. }
  2115. }
  2116. }
  2117. arr1 = arr
  2118. }
  2119. let arr2 = []
  2120. if (this.treatStateVal == 0) {
  2121. arr2 = JSON.parse(JSON.stringify(arr1))
  2122. } else if (this.treatStateVal == 2) {
  2123. let arr = []
  2124. arr = JSON.parse(JSON.stringify(arr1))
  2125. for (let i = 0; i < arr.length; i++) {
  2126. for (let j = 0; j < arr[i].schedules.length; j++) {
  2127. if (arr[i].schedules.length > 0 && arr[i].schedules[j].treatment_summary != null && arr[i].schedules[j].treatment_summary.dialysis_summary != '') {
  2128. // 删除元素后改变i的值
  2129. arr[i].schedules.splice(j--, 1)
  2130. }
  2131. }
  2132. }
  2133. arr2 = arr
  2134. } else if(this.treatStateVal == 3){
  2135. let arr = []
  2136. arr = JSON.parse(JSON.stringify(arr1))
  2137. for (let i = 0; i < arr.length; i++) {
  2138. for (let j = 0; j < arr[i].schedules.length; j++) {
  2139. if(arr[i].schedules[j].doctor_advice.length == 0){
  2140. arr[i].schedules.splice(j--, 1)
  2141. }
  2142. if(arr[i].schedules && arr[i].schedules[j] && arr[i].schedules[j].doctor_advice){
  2143. let sign = 0
  2144. arr[i].schedules[j].doctor_advice.map(item => {
  2145. if(item.check_state == 1){
  2146. sign++
  2147. }
  2148. })
  2149. if(sign == arr[i].schedules[j].doctor_advice.length && arr[i].schedules[j].doctor_advice.length > 0){
  2150. arr[i].schedules.splice(j--, 1)
  2151. }
  2152. }
  2153. }
  2154. }
  2155. arr2 = arr
  2156. }
  2157. let arr3 = []
  2158. if (this.scheduleStateVal == 0) {
  2159. arr3 = JSON.parse(JSON.stringify(arr2))
  2160. } else {
  2161. let arr = []
  2162. arr = JSON.parse(JSON.stringify(arr2))
  2163. for (let i = 0; i < arr.length; i++) {
  2164. for (let j = 0; j < arr[i].schedules.length; j++) {
  2165. if (this.scheduleStateVal != arr[i].schedules[j].schedule_type) {
  2166. // 删除元素后改变i的值
  2167. arr[i].schedules.splice(j--, 1)
  2168. }
  2169. }
  2170. }
  2171. arr3 = arr
  2172. }
  2173. let arr4 = []
  2174. if (this.zoneVal == 0) {
  2175. arr4 = JSON.parse(JSON.stringify(arr3))
  2176. } else {
  2177. let arr = []
  2178. arr = JSON.parse(JSON.stringify(arr3))
  2179. for (let i = 0; i < arr.length; i++) {
  2180. if (this.zoneVal != arr[i].zone_id) {
  2181. // 删除元素后改变i的值
  2182. arr.splice(i--, 1)
  2183. }
  2184. }
  2185. arr4 = arr
  2186. }
  2187. const newArr = []
  2188. arr4.map(item => {
  2189. newArr.push(...item.schedules)
  2190. })
  2191. if(this.patientStateVal == 1){
  2192. newArr.map(item => {
  2193. item.created_time = item.assessment_before_dislysis.created_time
  2194. })
  2195. newArr.sort(this.compare('created_time'))
  2196. }
  2197. this.tableData1 = newArr
  2198. const name = this.$route.query.patient_name
  2199. this.tableData1.map((item, index) => {
  2200. if (name == item.patient.name) {
  2201. // if (item.assessment_before_dislysis != null) {
  2202. // this.newTime = parseTime(item.assessment_before_dislysis.created_time, '{h}:{i}')
  2203. // }
  2204. setTimeout(() => {
  2205. this.$refs.tab1.setCurrentRow(this.tableData1[index])
  2206. }, 10)
  2207. }
  2208. })
  2209. }
  2210. },
  2211. compare(property){
  2212. return function(a,b){
  2213. var value1 = a[property];
  2214. var value2 = b[property];
  2215. return value2 - value1;
  2216. }
  2217. },
  2218. getTime(date){
  2219. date = new Date(date * 1000)
  2220. var Y = date.getFullYear() + '-';
  2221. var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1);
  2222. var D = (date.getDate() < 10 ? '0'+date.getDate() : date.getDate());
  2223. var h = (date.getHours() < 10 ? '0'+date.getHours() : date.getHours());
  2224. var m = (date.getMinutes() < 10 ? '0'+date.getMinutes() : date.getMinutes());
  2225. var s = (date.getSeconds() < 10 ? '0'+date.getSeconds() : date.getSeconds());
  2226. let strDate = h + ':' + m;
  2227. return strDate;
  2228. },
  2229. getTimes(time) {
  2230. return uParseTime(time, '{y}-{m}-{d}')
  2231. },
  2232. refresh(){
  2233. this.requestDialysisSchedules()
  2234. },
  2235. websocketSend(data) {
  2236. try {
  2237. this.websocket.send(JSON.stringify(data))
  2238. } catch (error) {
  2239. this.showError = true;
  2240. this.showIndex = 4;
  2241. this.errorInfo = "网络异常,请稍后退出重试!";
  2242. }
  2243. },
  2244. websocketMess() {
  2245. this.websocket.onmessage = e => {
  2246. let res = JSON.parse(e.data);
  2247. // let res = re.data;
  2248. // console.log('res3333333333',res)
  2249. if(res.channel == 'queue/join'){
  2250. let timeType = null
  2251. if(this.scheduleStateVal == 1){
  2252. timeType = 1
  2253. }else if(this.scheduleStateVal == 2){
  2254. timeType = 2
  2255. }else{
  2256. if(new Date().getHours() < 10){
  2257. timeType = 1
  2258. }else if(new Date().getHours() >= 10){
  2259. timeType = 2
  2260. }
  2261. }
  2262. let fisrtQueueInfo = []
  2263. this.newFisrtQueueInfo = res.data.fisrtQueueInfo
  2264. this.queueConfig = res.data.queueConfig
  2265. if(res.data.fisrtQueueInfo != null){
  2266. if(timeType == 1){
  2267. fisrtQueueInfo = res.data.fisrtQueueInfo.morning
  2268. if(fisrtQueueInfo.create_time){
  2269. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  2270. }
  2271. }else if(timeType == 2){
  2272. fisrtQueueInfo = res.data.fisrtQueueInfo.afternoon
  2273. if(fisrtQueueInfo.create_time){
  2274. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  2275. }
  2276. }
  2277. }
  2278. this.fisrtQueueInfo = fisrtQueueInfo
  2279. // this.fisrtQueueInfo = res.data.fisrtQueueInfo
  2280. let arr = res.data.patientQueueList.data
  2281. let waitingCalledArr = []
  2282. let calledArr = []
  2283. arr.map(item => {
  2284. if(item.status == 1){
  2285. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  2286. waitingCalledArr.push(item)
  2287. }else if(item.status == 2){
  2288. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  2289. calledArr.push(item)
  2290. }
  2291. })
  2292. this.waitingCalled = waitingCalledArr
  2293. this.called = calledArr
  2294. }else if(res.channel == 'allQueueList'){
  2295. let arr = res.data.queue_list.data
  2296. let waitingCalledArr = []
  2297. let calledArr = []
  2298. arr.map(item => {
  2299. if(item.status == 1){
  2300. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  2301. waitingCalledArr.push(item)
  2302. }else if(item.status == 2){
  2303. // item.create_time = moment(item.create_time * 1000).format('HH:mm:ss')
  2304. calledArr.push(item)
  2305. }
  2306. })
  2307. this.waitingCalled = waitingCalledArr
  2308. this.called = calledArr
  2309. }else if(res.channel == 'patientCallInfo'){
  2310. res.data.patientInfo.create_time = moment(res.data.patientInfo.create_time * 1000).format('HH:mm')
  2311. this.fisrtQueueInfo = res.data.patientInfo
  2312. }else if(res.channel == 'fisrtQueueInfo'){
  2313. if(this.scheduleStateVal == 1){
  2314. timeType = 1
  2315. }else if(this.scheduleStateVal == 2){
  2316. timeType = 2
  2317. }else{
  2318. if(new Date().getHours() < 10){
  2319. timeType = 1
  2320. }else if(new Date().getHours() >= 10){
  2321. timeType = 2
  2322. }
  2323. }
  2324. let fisrtQueueInfo = []
  2325. this.newFisrtQueueInfo = res.data.patientInfo
  2326. if(res.data.patientInfo != null){
  2327. if(timeType == 1){
  2328. fisrtQueueInfo = res.data.patientInfo.morning
  2329. if(fisrtQueueInfo.create_time){
  2330. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  2331. }
  2332. }else if(timeType == 2){
  2333. fisrtQueueInfo = res.data.patientInfo.afternoon
  2334. if(fisrtQueueInfo.create_time){
  2335. fisrtQueueInfo.create_time = moment(parseInt(fisrtQueueInfo.create_time) * 1000).format('HH:mm')
  2336. }
  2337. }
  2338. }
  2339. this.fisrtQueueInfo = fisrtQueueInfo
  2340. }
  2341. }
  2342. },
  2343. call(){
  2344. // console.log('patient_id',patient_id)
  2345. let org_id = parseInt(sessionStorage.getItem("org_id"));
  2346. let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
  2347. axios.get('/api/index/callpatient?org_id=' + org_id + '&patient_id=' + this.patient_id + '&admin_user_id=' + admin_user_id).then(res => {
  2348. // let patientArr = res.data.queue_list.data
  2349. // this.patientArr = patientArr
  2350. // this.$emit('child-event',this.patientArr)
  2351. if(res.data.data.patientInfo == null){
  2352. this.$message.error('已经是最后一位了');
  2353. return
  2354. }
  2355. if(res.data.code == 200){
  2356. this.$message({
  2357. message: res.data.msg,
  2358. type: 'success'
  2359. });
  2360. this.curPatient = res.data.data.patientInfo
  2361. let arr = []
  2362. let newArr = []
  2363. this.zone_schedules.map(item => {
  2364. newArr.push(...item.schedules)
  2365. })
  2366. newArr.map(item => {
  2367. arr.push(item.patient_id)
  2368. })
  2369. if(arr.indexOf(parseInt(res.data.data.patientInfo.patient_id)) > -1){
  2370. this.showView = false
  2371. this.$router.push({
  2372. path: '/dialysis/details',
  2373. query: {
  2374. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  2375. date: this.$route.query.date,
  2376. patient_name: res.data.data.patientInfo.patient_name,
  2377. mode_id:newArr[arr.indexOf(parseInt(res.data.data.patientInfo.patient_id))].mode_id,
  2378. curPatientTime:res.data.data.patientInfo.create_time,
  2379. showView:false
  2380. }
  2381. })
  2382. }else {
  2383. this.showView = true
  2384. this.$router.push({
  2385. path: '/dialysis/details',
  2386. query: {
  2387. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  2388. date: this.$route.query.date,
  2389. patient_name: res.data.data.patientInfo.patient_name,
  2390. mode_id:this.$route.query.mode_id,
  2391. curPatientTime:res.data.data.patientInfo.create_time,
  2392. showView:true
  2393. }
  2394. })
  2395. }
  2396. }
  2397. })
  2398. },
  2399. next(){
  2400. let schedule_type = null
  2401. if(new Date().getHours() < 11){
  2402. schedule_type = 1
  2403. }else {
  2404. schedule_type = 2
  2405. }
  2406. let org_id = parseInt(sessionStorage.getItem("org_id"));
  2407. let admin_user_id = parseInt(sessionStorage.getItem("admin_user_id"));
  2408. axios.get('/api/index/nextcall?org_id=' + org_id + '&patient_id=' + this.patient_id + '&admin_user_id=' + admin_user_id + '&schedule_type=' + schedule_type).then(res => {
  2409. if(res.data.data.patientInfo == null){
  2410. this.$message.error('已经是最后一位了');
  2411. return
  2412. }
  2413. if(res.data.code == 200){
  2414. this.$message({
  2415. message: res.data.msg,
  2416. type: 'success'
  2417. });
  2418. this.curPatient = res.data.data.patientInfo
  2419. let arr = []
  2420. let newArr = []
  2421. this.zone_schedules.map(item => {
  2422. newArr.push(...item.schedules)
  2423. })
  2424. newArr.map(item => {
  2425. arr.push(item.patient_id)
  2426. })
  2427. if(arr.indexOf(parseInt(res.data.data.patientInfo.patient_id)) > -1){
  2428. this.showView = false
  2429. this.$router.push({
  2430. path: '/dialysis/details',
  2431. query: {
  2432. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  2433. date: this.$route.query.date,
  2434. patient_name: res.data.data.patientInfo.patient_name,
  2435. mode_id:newArr[arr.indexOf(parseInt(res.data.data.patientInfo.patient_id))].mode_id,
  2436. curPatientTime:res.data.data.patientInfo.create_time,
  2437. showView:false
  2438. }
  2439. })
  2440. }else {
  2441. this.showView = true
  2442. this.$router.push({
  2443. path: '/dialysis/details',
  2444. query: {
  2445. patient_id: parseInt(res.data.data.patientInfo.patient_id),
  2446. date: this.$route.query.date,
  2447. patient_name: res.data.data.patientInfo.patient_name,
  2448. mode_id:this.$route.query.mode_id,
  2449. curPatientTime:res.data.data.patientInfo.create_time,
  2450. showView:true
  2451. }
  2452. })
  2453. }
  2454. }
  2455. })
  2456. },
  2457. getDates(time){
  2458. return moment(time * 1000).format('HH:mm:ss')
  2459. },
  2460. printAction: function() {
  2461. const style = '@media print {.signPrint{margin-left:30px;} .print_main_content { background-color: white; width:960px; margin:0 auto; padding: 0 0 20px 0; } .order_title_panl { text-align: center; } .main_title { font-size: 18px; line-height: 40px; font-weight: 500; } .table_panel { } .table { width: 100%; border: 1px solid; border-collapse: collapse; padding: 2px; } thead tr td { border: 1px solid; text-align: center; font-size: 20px; padding: 15px 5px; } tbody tr td { border: 1px solid; text-align: center; font-size: 18px; padding: 10px 5px; } .proj { padding: 5px 0; text-align: left; } .proj_title { font-size: 16px; font-weight: 500; line-height: 25px; } .proj_item { font-size: 15px; line-height: 20px; } .zone_name { font-weight: 500; } .printCell span{display: inline-block;width: 180px;} @page {margin-top:10px;}}'
  2462. const style1 = '@page {margin-top:10px;} @media print{}'
  2463. printJS({
  2464. printable: 'print_content',
  2465. type: 'html',
  2466. documentTitle: '',
  2467. style: style1,
  2468. scanStyles: false
  2469. })
  2470. },
  2471. getInitPrintData(){
  2472. const loading = this.$loading({
  2473. lock: true,
  2474. text: 'Loading',
  2475. spinner: 'el-icon-loading',
  2476. background: 'rgba(0, 0, 0, 0.7)'
  2477. })
  2478. var params = {
  2479. patient_id:this.$route.query.patient_id,
  2480. record_date:this.$route.query.date,
  2481. }
  2482. getInitPrintData(params).then(response=>{
  2483. if(response.data.state == 1){
  2484. var list = response.data.data.list
  2485. console.log("listwowoowowowowow",list)
  2486. var assessmentAfterDislysis = response.data.data.assessmentAfterDislysis
  2487. this.printList = list
  2488. this.assessmentAfterDislysis = assessmentAfterDislysis
  2489. if(this.org_id == 0 || this.org_id ==10469){
  2490. this.centerDialogVisible = true
  2491. }else{
  2492. this.startVisibility = true
  2493. }
  2494. loading.close()
  2495. }
  2496. })
  2497. },
  2498. getModeId(val){
  2499. var name =""
  2500. if(val == 1){
  2501. name ="HD"
  2502. }
  2503. if(val == 2){
  2504. name ="HDF"
  2505. }
  2506. if(val == 3){
  2507. name ="HD+HP"
  2508. }
  2509. if(val == 4){
  2510. name ="HP"
  2511. }
  2512. if(val == 5){
  2513. name ="HF"
  2514. }
  2515. if(val == 6){
  2516. name ="SCUF"
  2517. }
  2518. if(val == 7){
  2519. name ="IUF"
  2520. }
  2521. if(val == 8){
  2522. name ="IUF"
  2523. }
  2524. if(val == 9){
  2525. name ="HFHD+HP"
  2526. }
  2527. if(val == 10){
  2528. name ="HFHD+HP"
  2529. }
  2530. if(val == 11){
  2531. name ="HFR"
  2532. }
  2533. if(val == 12){
  2534. name ="HDF+HP"
  2535. }
  2536. if(val == 13){
  2537. name ="CRRT"
  2538. }
  2539. if(val == 14){
  2540. name ="腹水回输"
  2541. }
  2542. if(val == 19){
  2543. name ="IUF+HD"
  2544. }
  2545. if(val == 20){
  2546. name ="UF"
  2547. }
  2548. if(val == 21){
  2549. name ="HD+"
  2550. }
  2551. if(val == 22){
  2552. name ="血浆胆红素吸附+HDF"
  2553. }
  2554. if(val == 23){
  2555. name ="血浆胆红素吸附"
  2556. }
  2557. if(val == 24){
  2558. name ="I-HDF"
  2559. }
  2560. if(val == 25){
  2561. name ="HD高通"
  2562. }
  2563. if(val == 26){
  2564. name ="CVVH"
  2565. }
  2566. if(val == 27){
  2567. name ="CVVHD"
  2568. }
  2569. if(val == 28){
  2570. name ="CVVHDF"
  2571. }
  2572. if(val == 29){
  2573. name ="PE"
  2574. }
  2575. if(val == 30){
  2576. name ="血浆胆红素吸附+HP"
  2577. }
  2578. if(val == 31){
  2579. name ="HPD"
  2580. }
  2581. if(val == 32){
  2582. name ="HDP"
  2583. }
  2584. return name
  2585. },
  2586. getBloodAccess(id){
  2587. var name = ""
  2588. for(let i=0;i<this.blood_access_part_opera.length;i++){
  2589. if(id == this.blood_access_part_opera[i].id){
  2590. name = this.blood_access_part_opera[i].name
  2591. }
  2592. }
  2593. return name
  2594. }
  2595. }
  2596. }
  2597. </script>
  2598. <style style="stylesheet/scss" lang="scss" scoped>
  2599. .details-bg {
  2600. background: #fff;
  2601. margin: 0 15px;
  2602. }
  2603. .printForm {
  2604. .title {
  2605. font-size: 30px;
  2606. font-weight: 500;
  2607. text-align: center;
  2608. line-height: 60px;
  2609. }
  2610. .info {
  2611. ul {
  2612. display: -webkit-box;
  2613. display: -moz-box;
  2614. display: -ms-flexbox;
  2615. display: -webkit-flex;
  2616. display: flex;
  2617. align-items: center;
  2618. -moz-box-sizing: border-box;
  2619. -webkit-box-sizing: border-box;
  2620. -o-box-sizing: border-box;
  2621. -ms-box-sizing: border-box;
  2622. box-sizing: border-box;
  2623. -webkit-justify-content: space-around;
  2624. -moz-justify-content: space-around;
  2625. -ms-justify-content: space-around;
  2626. -o-justify-content: space-around;
  2627. justify-content: space-around;
  2628. li {
  2629. display: flex;
  2630. box-sizing: border-box;
  2631. justify-content: space-around;
  2632. // .name {
  2633. // }
  2634. .InputBox {
  2635. padding: 0;
  2636. border: none;
  2637. border-bottom: 1px #e5e5e5 solid;
  2638. width: 60px;
  2639. outline: none;
  2640. }
  2641. }
  2642. }
  2643. }
  2644. .printTable {
  2645. tr {
  2646. padding: 2px;
  2647. th {
  2648. padding: 6px 4px;
  2649. }
  2650. td {
  2651. padding: 6px 4px;
  2652. }
  2653. }
  2654. }
  2655. }
  2656. .loadingBox{
  2657. display: flex;
  2658. .patientBox{
  2659. background: #fff;
  2660. }
  2661. .tip1{
  2662. background: #4fc7cb;
  2663. border-radius: 5px;
  2664. text-align: center;
  2665. font-size: 12px;
  2666. display: inline-block;
  2667. width: 60px;
  2668. // height: 23px;
  2669. // line-height: 23px;
  2670. color: #fff;
  2671. }
  2672. .tip2{
  2673. background: #ee8556;
  2674. border-radius: 5px;
  2675. text-align: center;
  2676. font-size: 12px;
  2677. display: inline-block;
  2678. width: 60px;
  2679. // height: 23px;
  2680. // line-height: 23px;
  2681. color: #fff;
  2682. }
  2683. .tip3{
  2684. background: #409eff;
  2685. border-radius: 5px;
  2686. text-align: center;
  2687. font-size: 12px;
  2688. display: inline-block;
  2689. width: 60px;
  2690. color: #fff;
  2691. }
  2692. .tip4{
  2693. background: #a8b3ba;
  2694. border-radius: 5px;
  2695. text-align: center;
  2696. font-size: 12px;
  2697. display: inline-block;
  2698. width: 60px;
  2699. color: #fff;
  2700. }
  2701. .tip5{
  2702. background: #7bce91;
  2703. border-radius: 5px;
  2704. text-align: center;
  2705. font-size: 12px;
  2706. display: inline-block;
  2707. width: 60px;
  2708. color: #fff;
  2709. }
  2710. }
  2711. </style>
  2712. <style lang="scss">
  2713. .loadingBox{
  2714. .el-loading-spinner{
  2715. top:10%;
  2716. }
  2717. .el-button--small, .el-button--small.is-round{
  2718. padding:9px 10px;
  2719. }
  2720. .el-date-editor{
  2721. .el-input__inner{
  2722. padding-right:0px;
  2723. }
  2724. }
  2725. .el-table td, .el-table th{
  2726. text-align: center;
  2727. }
  2728. .el-table td{
  2729. height: 44px !important;
  2730. }
  2731. .el-table .cell{
  2732. padding: 0;
  2733. }
  2734. }
  2735. </style>