dialysisSolution.vue 73KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231
  1. <template>
  2. <div class="patient-container">
  3. <patient-sidebar :id="patientID" defaultActive="2-1"></patient-sidebar>
  4. <div class="patient-app-container app-container">
  5. <div class="Total">
  6. <!-- <div class="plan" >透析计划</div> -->
  7. <!-- <table-title title="长期透析处方"></table-title> -->
  8. <div class="sum">
  9. <!-- <span>透析总频率:<el-input :value="totalrate" disabled style="width:180px"></el-input></span> -->
  10. <el-button
  11. type="primary"
  12. size="small"
  13. icon="el-icon-plus"
  14. @click="openNew"
  15. :disabled="
  16. $store.getters.xt_user.subscibe.state == 3 ? true : false
  17. "
  18. >新增透析处方
  19. </el-button>
  20. </div>
  21. </div>
  22. <el-table
  23. ref="solutionTable"
  24. :data="tableData"
  25. border
  26. fit
  27. highlight-current-row
  28. @current-change="tableCurrentChange"
  29. :header-cell-style="{
  30. backgroundColor: 'rgb(245, 247, 250)',
  31. color: '#606266'
  32. }"
  33. :row-style="{ color: '#303133' }"
  34. style="width: 100%"
  35. >
  36. <el-table-column type="index" align="center" label="序号" width="60">
  37. </el-table-column>
  38. <el-table-column
  39. prop="mode_name"
  40. align="center"
  41. label="透析模式"
  42. min-width="50"
  43. >
  44. <template slot-scope="scope">
  45. {{ modeOptions[scope.row.mode_id]?modeOptions[scope.row.mode_id].name:'' }}
  46. </template>
  47. </el-table-column>
  48. <el-table-column
  49. prop="dialysis_duration"
  50. align="center"
  51. label="透析时长"
  52. min-width="50"
  53. >
  54. <template slot-scope="scope">
  55. {{ scope.row.dialysis_duration_hour }} 小时
  56. {{ scope.row.dialysis_duration_minute }} 分钟
  57. </template>
  58. </el-table-column>
  59. <!-- <el-table-column
  60. prop="period"
  61. label="频率"
  62. align="center"
  63. min-width="50">
  64. <template slot-scope="scope" >
  65. <span v-if="scope.row.parent_id === 0" >{{scope.row.period}}{{scope.row.times}}</span>
  66. <span v-else >--</span>
  67. </template>
  68. </el-table-column> -->
  69. <!-- <el-table-column
  70. prop="name"
  71. label="处方名"
  72. align="center"
  73. min-width="50">
  74. <template slot-scope="scope" >
  75. <span >{{scope.row.name}}{{scope.row.sub_name}}</span>
  76. </template>
  77. </el-table-column> -->
  78. <el-table-column
  79. prop="doctor"
  80. label="医生"
  81. align="center"
  82. min-width="110"
  83. >
  84. <template slot-scope="scope">
  85. <span>{{ getAdminUserName(scope.row.registrars_id) }}</span>
  86. </template>
  87. </el-table-column>
  88. <el-table-column
  89. prop="created_time"
  90. align="center"
  91. label="创建日期"
  92. min-width="60"
  93. >
  94. <template slot-scope="scope">
  95. <span>{{ scope.row.created_time | parseTime("{y}-{m}-{d}") }}</span>
  96. </template>
  97. </el-table-column>
  98. <el-table-column
  99. prop="updated_time"
  100. align="center"
  101. label="更新日期"
  102. min-width="60"
  103. >
  104. <template slot-scope="scope">
  105. <span>{{ scope.row.updated_time | parseTime("{y}-{m}-{d}") }}</span>
  106. </template>
  107. </el-table-column>
  108. <!-- <el-table-column
  109. prop="state"
  110. label="状态"
  111. align="center"
  112. min-width="40">
  113. <template slot-scope="scope" >
  114. <span v-if="scope.row.initiate_mode==1">启用</span>
  115. <span v-else-if="scope.row.initiate_mode==2">停用</span>
  116. <span v-else>未知</span>
  117. </template>
  118. </el-table-column> -->
  119. <el-table-column label="操作" align="center" min-width="140">
  120. <template slot-scope="scope">
  121. <el-tooltip
  122. class="item"
  123. effect="dark"
  124. content="编辑"
  125. placement="top"
  126. >
  127. <el-button
  128. size="small"
  129. type="primary"
  130. icon="el-icon-edit-outline"
  131. @click="openEdit(scope.$index, scope.row)"
  132. ></el-button>
  133. </el-tooltip>
  134. <!-- <el-button
  135. size="mini"
  136. type="primary"
  137. @click="openChildEdit(scope.$index, scope.row)" v-else>编辑</el-button>
  138. <el-button
  139. size="mini"
  140. type="success"
  141. @click="openNewChild(scope.$index, scope.row)" v-if="scope.row.parent_id===0">新增</el-button>
  142. <el-button
  143. size="mini"
  144. type="danger"
  145. @click="handleDelete(scope.$index, scope.row)">删除</el-button>-->
  146. </template>
  147. </el-table-column>
  148. </el-table>
  149. <el-pagination
  150. align="right"
  151. @size-change="handleSizeChange"
  152. @current-change="handleCurrentChange"
  153. :current-page="queryParams.page"
  154. :page-sizes="[10, 20, 50, 100]"
  155. :page-size="10"
  156. background
  157. style="margin-top:20px;"
  158. layout="total, sizes, prev, pager, next, jumper"
  159. :total="total"
  160. >
  161. </el-pagination>
  162. </div>
  163. <el-dialog
  164. :title="isEdit ? '编辑透析处方' : '新增透析处方'"
  165. :visible.sync="dialogVisible"
  166. width="1010px"
  167. >
  168. <el-form
  169. ref="addPlan"
  170. :model="addPlan"
  171. :rules="addPlanRules"
  172. label-width="160px"
  173. >
  174. <el-row :gutter="20">
  175. <el-col :span="8" v-if="isShows('透析模式')">
  176. <el-form-item label="透析模式:" prop="mode">
  177. <el-select
  178. v-model="addPlan.mode"
  179. @change="addPlanModeChange"
  180. :disabled="isEdit ? true : false"
  181. >
  182. <el-option
  183. v-for="item in modeOptions"
  184. :label="item.name"
  185. :key="item.id"
  186. :value="item.id"
  187. ></el-option>
  188. </el-select>
  189. </el-form-item>
  190. </el-col>
  191. <el-col :span="8" v-if="isShows('透析时长')">
  192. <el-form-item label="透析时长(h):" prop="dialysis_duration">
  193. <el-time-picker
  194. v-model="dialysisTimeShow"
  195. :picker-options="{
  196. selectableRange: '00:01:00 - 23:59:00'
  197. }"
  198. placeholder="透析时长"
  199. style="width:100%;"
  200. value-format="H:m"
  201. format="H:m"
  202. @change="selectnDialysisTime"
  203. >
  204. </el-time-picker>
  205. </el-form-item>
  206. </el-col>
  207. <el-col :span="8" v-if="isShows('血流量')">
  208. <el-form-item label="血流量(ml/min):" prop="blood_flow_volume">
  209. <el-input v-model="addPlan.blood_flow_volume"></el-input>
  210. </el-form-item>
  211. </el-col>
  212. <el-col :span="8" v-if="isShows('透析液配方')">
  213. <el-form-item label="透析液配方:">
  214. <el-select v-model="addPlan.dialysate_formulation">
  215. <el-option
  216. v-for="item in dialysate_formulation"
  217. :label="item.name"
  218. :key="item.id"
  219. :value="item.id"
  220. ></el-option>
  221. </el-select>
  222. </el-form-item>
  223. </el-col>
  224. <el-col :span="8" v-if="isShows('抗凝剂')">
  225. <el-form-item label="抗凝剂:" prop="anticoagulant">
  226. <el-select
  227. v-model="addPlan.anticoagulant"
  228. @change="changeThisAnticoagulant"
  229. >
  230. <el-option
  231. v-for="item in anticoagulantsConfit"
  232. :label="item.name"
  233. :key="item.id"
  234. :value="item.id"
  235. ></el-option>
  236. </el-select>
  237. </el-form-item>
  238. </el-col>
  239. <el-col
  240. :span="8"
  241. v-if="anticoagulant.shouji != -1 && isShows('首剂')"
  242. >
  243. <div v-if="this.$store.getters.xt_user.template_info.org_id == 10101">
  244. <el-form-item
  245. :label="'首剂(mg): '"
  246. prop="anticoagulant_shouji"
  247. v-if="addPlan.anticoagulant == 2"
  248. >
  249. <el-input
  250. v-model="addPlan.anticoagulant_shouji"
  251. :disabled="anticoagulant.shouji == 1 ? false : true"
  252. type="number"
  253. ></el-input>
  254. </el-form-item>
  255. <el-form-item
  256. :label="'首剂(iu): '"
  257. prop="anticoagulant_shouji"
  258. v-else
  259. >
  260. <el-input
  261. v-model="addPlan.anticoagulant_shouji"
  262. :disabled="anticoagulant.shouji == 1 ? false : true"
  263. type="number"
  264. ></el-input>
  265. </el-form-item>
  266. </div>
  267. <div v-else>
  268. <el-form-item
  269. :label="'首剂(' + anticoagulant.shouji_unit + '): '"
  270. prop="anticoagulant_shouji"
  271. >
  272. <el-input
  273. v-model="addPlan.anticoagulant_shouji"
  274. :disabled="anticoagulant.shouji == 1 ? false : true"
  275. type="number"
  276. ></el-input>
  277. </el-form-item>
  278. </div>
  279. </el-col>
  280. <el-col
  281. :span="8"
  282. v-if="anticoagulant.weichi != -1 && isShows('维持')"
  283. >
  284. <div v-if="this.$store.getters.xt_user.template_info.org_id == 10101">
  285. <el-form-item
  286. :label="'维持(mg/h): '"
  287. prop="anticoagulant_weichi"
  288. v-if="addPlan.anticoagulant == 2"
  289. >
  290. <el-input
  291. v-model="addPlan.anticoagulant_weichi"
  292. :disabled="anticoagulant.weichi == 1 ? false : true"
  293. type="number"
  294. ></el-input>
  295. </el-form-item>
  296. <el-form-item
  297. :label="'维持(iu/h): '"
  298. prop="anticoagulant_weichi"
  299. v-else
  300. >
  301. <el-input
  302. v-model="addPlan.anticoagulant_weichi"
  303. :disabled="anticoagulant.weichi == 1 ? false : true"
  304. type="number"
  305. ></el-input>
  306. </el-form-item>
  307. </div>
  308. <div v-else>
  309. <el-form-item
  310. :label="'维持(' + anticoagulant.weichi_unit + '): '"
  311. prop="anticoagulant_weichi"
  312. >
  313. <el-input
  314. v-model="addPlan.anticoagulant_weichi"
  315. :disabled="anticoagulant.weichi == 1 ? false : true"
  316. type="number"
  317. ></el-input>
  318. </el-form-item>
  319. </div>
  320. </el-col>
  321. <el-col
  322. :span="8"
  323. v-if="anticoagulant.zongliang != -1 && isShows('总量')"
  324. >
  325. <div v-if="this.$store.getters.xt_user.template_info.org_id == 10101">
  326. <el-form-item
  327. :label="'总量(mg): '"
  328. prop="anticoagulant_zongliang"
  329. v-if="addPlan.anticoagulant == 2"
  330. >
  331. <el-input
  332. v-model="addPlan.anticoagulant_zongliang"
  333. :disabled="anticoagulant.zongliang == 1 ? false : true"
  334. type="number"
  335. ></el-input>
  336. </el-form-item>
  337. <el-form-item
  338. :label="'总量(iu): '"
  339. prop="anticoagulant_zongliang"
  340. v-else
  341. >
  342. <el-input
  343. v-model="addPlan.anticoagulant_zongliang"
  344. :disabled="anticoagulant.zongliang == 1 ? false : true"
  345. type="number"
  346. ></el-input>
  347. </el-form-item>
  348. </div>
  349. <div v-else>
  350. <el-form-item
  351. :label="'总量(' + anticoagulant.zongliang_unit + '): '"
  352. prop="anticoagulant_zongliang"
  353. >
  354. <el-input
  355. v-model="addPlan.anticoagulant_zongliang"
  356. :disabled="anticoagulant.zongliang == 1 ? false : true"
  357. type="number"
  358. ></el-input>
  359. </el-form-item>
  360. </div>
  361. </el-col>
  362. <el-col
  363. :span="8"
  364. v-if="anticoagulant.gaimingcheng != -1 && isShows('钙名称')"
  365. >
  366. <el-form-item label="钙名称:" prop="anticoagulant_gaimingcheng">
  367. <el-input
  368. v-model="addPlan.anticoagulant_gaimingcheng"
  369. :disabled="anticoagulant.gaimingcheng == 1 ? false : true"
  370. placeholder="钙名称"
  371. ></el-input>
  372. </el-form-item>
  373. </el-col>
  374. <el-col
  375. :span="8"
  376. v-if="anticoagulant.gaijiliang != -1 && isShows('钙剂量')"
  377. >
  378. <el-form-item
  379. :label="'钙剂量(' + anticoagulant.gaimingcheng_unit + '): '"
  380. prop="anticoagulant_gaijiliang"
  381. >
  382. <el-input
  383. v-model="addPlan.anticoagulant_gaijiliang"
  384. :disabled="anticoagulant.gaijiliang == 1 ? false : true"
  385. placeholder="钙剂量"
  386. ></el-input>
  387. </el-form-item>
  388. </el-col>
  389. <el-col :span="8" v-if="isShows('置换量')" v-show="zhiShow">
  390. <el-form-item label="置换量(L) : " prop="replacement_total">
  391. <el-input
  392. v-model="addPlan.replacement_total"
  393. type="number"
  394. ></el-input>
  395. </el-form-item>
  396. </el-col>
  397. <el-col :span="8" v-if="isShows('钾')">
  398. <el-form-item label="钾(mmol/L): " prop="kalium">
  399. <el-input v-model="addPlan.kalium"></el-input>
  400. </el-form-item>
  401. </el-col>
  402. <el-col :span="8" v-if="isShows('钠')">
  403. <el-form-item label="钠(mmol/L): " prop="sodium">
  404. <el-input v-model="addPlan.sodium"></el-input>
  405. </el-form-item>
  406. </el-col>
  407. <el-col :span="8" v-if="isShows('钙')">
  408. <el-form-item label="钙(mmol/L): " prop="calcium">
  409. <el-input v-model="addPlan.calcium"></el-input>
  410. </el-form-item>
  411. </el-col>
  412. <el-col :span="8" v-if="isShows('透析器/灌流器')">
  413. <el-form-item label="透析器/灌流器:">
  414. <el-input
  415. v-model="addPlan.dialyzer_perfusion_apparatus" @focus="showInnerDialog('5')"></el-input>
  416. </el-form-item>
  417. </el-col>
  418. <el-col :span="8" v-if="isShows('透析器')">
  419. <el-form-item label="透析器:">
  420. <el-input v-model="dialysis_dialyszers" @focus="showInnerDialog('6')"></el-input>
  421. </el-form-item>
  422. </el-col>
  423. <el-col :span="8" v-if="isShows('灌流器') && (addPlan.mode_id == 2 || addPlan.mode_id == 12 || addPlan.mode_id == 5)">
  424. <el-form-item label="灌流器:">
  425. <el-input v-model="dialysis_irrigation" @focus="showInnerDialog('7')"></el-input>
  426. </el-form-item>
  427. </el-col>
  428. <el-col :span="8" v-if="isShows('碳酸氢盐')">
  429. <el-form-item label="碳酸氢盐(mmol/L): " prop="bicarbonate">
  430. <el-input v-model="addPlan.bicarbonate"></el-input>
  431. </el-form-item>
  432. </el-col>
  433. <el-col :span="8" v-if="isShows('葡萄糖')">
  434. <el-form-item label="葡萄糖(mmol/L): " prop="glucose">
  435. <el-input v-model="addPlan.glucose"></el-input>
  436. </el-form-item>
  437. </el-col>
  438. <el-col :span="8" v-if="isShows('透析液流量')">
  439. <el-form-item label="透析液流量(ml/min): " prop="dialysate_flow">
  440. <el-input v-model="addPlan.dialysate_flow"></el-input>
  441. </el-form-item>
  442. </el-col>
  443. <el-col :span="8" v-if="isShows('透析液温度')">
  444. <el-form-item
  445. label="透析液温度(℃): "
  446. prop="dialysate_temperature"
  447. >
  448. <el-input v-model="addPlan.dialysate_temperature"></el-input>
  449. </el-form-item>
  450. </el-col>
  451. <el-col :span="8" v-if="isShows('电导率')">
  452. <el-form-item label="电导率(mS/cm): " prop="conductivity">
  453. <el-input v-model="addPlan.conductivity"></el-input>
  454. </el-form-item>
  455. </el-col>
  456. <el-col :span="8" v-if="isShows('体液过多症状')">
  457. <el-form-item label="体液过多症状:">
  458. <el-select v-model="addPlan.body_fluid" @change="changeBodyFluid">
  459. <el-option
  460. v-for="item in body_fluid_option"
  461. :label="item.name"
  462. :key="item.id"
  463. :value="item.id"
  464. ></el-option>
  465. </el-select>
  466. </el-form-item>
  467. </el-col>
  468. <el-col :span="8" v-if="isShows('体液过多其他症状')">
  469. <el-form-item label="体液过多其他症状">
  470. <el-input v-model="addPlan.body_fluid_other"></el-input>
  471. </el-form-item>
  472. </el-col>
  473. <el-col :span="8" v-if="isShows('透析前使用特殊药物')">
  474. <el-form-item label="透析前使用特殊药物">
  475. <el-select
  476. v-model="addPlan.special_medicine"
  477. placeholder="请选择"
  478. style="width:100%;"
  479. >
  480. <el-option :key="0" label="请选择" :value="0"></el-option>
  481. <el-option
  482. v-for="item in special_medicine_option"
  483. :label="item.name"
  484. :key="item.id"
  485. :value="item.id"
  486. ></el-option>
  487. </el-select>
  488. </el-form-item>
  489. </el-col>
  490. <el-col :span="8" v-if="isShows('透析前使用其他特殊药物')">
  491. <el-form-item label="使用其他特殊药物">
  492. <el-input v-model="addPlan.special_medicine_other"></el-input>
  493. </el-form-item>
  494. </el-col>
  495. <el-col :span="8">
  496. <el-form-item
  497. label="置换液:"
  498. v-if="
  499. isShows('置换液') &&
  500. this.$store.getters.xt_user.template_info.template_id != 6
  501. "
  502. v-show="huShow"
  503. >
  504. <el-select
  505. v-model="addPlan.displace_liqui_part"
  506. placeholder="请选择"
  507. >
  508. <el-option :key="0" label="请选择" :value="0"></el-option>
  509. <el-option
  510. v-for="(option, index) in displace_liqui_part_option"
  511. :key="index"
  512. :label="option.name"
  513. :value="option.id"
  514. ></el-option>
  515. </el-select>
  516. </el-form-item>
  517. <el-form-item
  518. label="置换方式:"
  519. v-if="
  520. isShows('置换液') &&
  521. this.$store.getters.xt_user.template_info.template_id == 6
  522. "
  523. >
  524. <el-select
  525. v-model="addPlan.displace_liqui_part"
  526. placeholder="请选择"
  527. >
  528. <el-option :key="0" label="请选择" :value="0"></el-option>
  529. <el-option
  530. v-for="(option, index) in displace_liqui_part_option"
  531. :key="index"
  532. :label="option.name"
  533. :value="option.id"
  534. ></el-option>
  535. </el-select>
  536. </el-form-item>
  537. </el-col>
  538. <el-col :span="8" v-if="isShows('置换液总量')" v-show="totalShow">
  539. <el-form-item label="置换液总量(L)">
  540. <el-input v-model="addPlan.displace_liqui_value"></el-input>
  541. </el-form-item>
  542. </el-col>
  543. <el-col :span="8" v-if="isShows('血管通路')">
  544. <el-form-item label="血管通路:">
  545. <el-select v-model="addPlan.blood_access" placeholder="请选择">
  546. <el-option :key="0" label="请选择" :value="0"></el-option>
  547. <el-option
  548. v-for="(option, index) in blood_access_option"
  549. :key="index"
  550. :label="option.name"
  551. :value="option.id"
  552. ></el-option>
  553. </el-select>
  554. </el-form-item>
  555. </el-col>
  556. <!-- </el-row>
  557. <el-row :gutter="20" > -->
  558. <el-col :span="8" v-if="isShows('实际超滤量')">
  559. <el-form-item label="实际超滤量(L)">
  560. <el-input v-model="addPlan.ultrafiltration"></el-input>
  561. </el-form-item>
  562. </el-col>
  563. <el-col :span="8" v-if="isShows('血浆分离器')">
  564. <el-form-item label="血浆分离器:">
  565. <el-input v-model="addPlan.plasma_separator" @focus="showInnerDialog('8')"></el-input>
  566. </el-form-item>
  567. </el-col>
  568. <el-col :span="8" v-if="isShows('吸氧')">
  569. <el-form-item label="吸氧:">
  570. <el-select v-model="addPlan.oxygen_uptake" placeholder="请选择" @change="changeOxygenList">
  571. <el-option :key="0" label="请选择" :value="0"></el-option>
  572. <el-option
  573. v-for="(item, index) in oxygenList "
  574. :key="index"
  575. :label="item.name"
  576. :value="item.id"
  577. ></el-option>
  578. </el-select>
  579. </el-form-item>
  580. </el-col>
  581. <el-col :span="8" v-if="isShows('吸氧') && oxygenShow == true">
  582. <el-form-item label="吸氧流量(L/分):">
  583. <el-input v-model="addPlan.oxygen_flow"></el-input>
  584. </el-form-item>
  585. </el-col>
  586. <el-col :span="8" v-if="isShows('吸氧') && oxygenShow == true">
  587. <el-form-item label="吸氧时长(h):">
  588. <el-input v-model="addPlan.oxygen_time"></el-input>
  589. </el-form-item>
  590. </el-col>
  591. <el-col :span="8" v-if="isShows('目标KT/V')">
  592. <el-form-item label="目标KT/V">
  593. <el-input v-model="addPlan.target_ktv"></el-input>
  594. </el-form-item>
  595. </el-col>
  596. <el-col :span="8" v-if="isShows('透析管路')">
  597. <el-form-item label="透析管路:">
  598. <el-select v-model="addPlan.hemodialysis_pipelines" >
  599. <el-option
  600. v-for="item in hemodialysisPipelinesOptions"
  601. :label="item.name"
  602. :key="item.id"
  603. :value="item.name"
  604. ></el-option>
  605. </el-select>
  606. </el-form-item>
  607. </el-col>
  608. <el-col :span="8" v-if="isShows('透析管路支数')">
  609. <el-form-item label="透析管路支数">
  610. <el-input v-model="addPlan.hemodialysis_pipelines_count"></el-input>
  611. </el-form-item>
  612. </el-col>
  613. <el-col :span="8" v-if="isShows('穿刺针')">
  614. <el-form-item label="穿刺针:">
  615. <el-input v-model="addPlan.puncture_needle" @focus="showInnerDialog('10')"></el-input>
  616. </el-form-item>
  617. </el-col>
  618. <el-col :span="8" v-if="isShows('穿刺针支数')">
  619. <el-form-item label="穿刺针支数">
  620. <el-input v-model="addPlan.puncture_needle_count"></el-input>
  621. </el-form-item>
  622. </el-col>
  623. <el-col :span="8" v-if="isShows('促红素')">
  624. <el-form-item label="促红素:">
  625. <el-select v-model="addPlan.epo" @change="changeBodyFluid">
  626. <el-option
  627. v-for="item in epoOptions"
  628. :label="item.name"
  629. :key="item.id"
  630. :value="item.name"
  631. ></el-option>
  632. </el-select>
  633. </el-form-item>
  634. </el-col>
  635. <el-col :span="8" v-if="isShows('促红素支数')">
  636. <el-form-item label="促红素支数">
  637. <el-input v-model="addPlan.epo_count"></el-input>
  638. </el-form-item>
  639. </el-col>
  640. </el-row>
  641. <el-row :gutter="24">
  642. <el-col :span="24">
  643. <el-form-item label="备注: " prop="remark">
  644. <el-input
  645. type="textarea"
  646. :rows="2"
  647. placeholder="请输入内容"
  648. v-model="addPlan.remark"
  649. >
  650. </el-input>
  651. </el-form-item>
  652. </el-col>
  653. </el-row>
  654. </el-form>
  655. <span slot="footer" class="dialog-footer">
  656. <el-button @click="dialogVisible = false">取 消</el-button>
  657. <el-button
  658. type="primary"
  659. @click="submitEditSolution('addPlan')"
  660. v-if="isEdit"
  661. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  662. >保 存</el-button
  663. >
  664. <el-button
  665. type="primary"
  666. @click="submitNewSolution('addPlan')"
  667. v-else
  668. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  669. >保 存</el-button
  670. >
  671. </span>
  672. </el-dialog>
  673. <multi-select-box
  674. :propsForm="InnerDialogProps"
  675. v-on:dialog-comfirm="innerDialogComfirm"
  676. v-on:dialog-cancle="innerDialogCancle">
  677. </multi-select-box>
  678. </div>
  679. </template>
  680. <script>
  681. import tableTitle from './components/tableTitle'
  682. import PatientSidebar from './components/PatientSidebar'
  683. import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
  684. import {
  685. createChildPatientDialysisSolution,
  686. createPatientDialysisSolution,
  687. deleteDialysisSolution,
  688. editChildPatientDialysisSolution,
  689. editDialysisSolutionDetail,
  690. editPatientDialysisSolution,
  691. fetchPatientDialysisSolutions
  692. } from '@/api/patient'
  693. import { getSystemPrescription } from '@/api/config'
  694. import { getDataConfig } from '@/utils/data'
  695. import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
  696. import store from '@/store'
  697. import { GetDeviceInfo } from '@/api/dialysis'
  698. import MultiSelectBox from '../dialysis/details/dialog/MultiSelectBox/index'
  699. const periodWeek = [
  700. { value: '每周', label: '每周' },
  701. { value: '两周', label: '两周' },
  702. { value: '三周', label: '三周' },
  703. { value: '四周', label: '四周' }
  704. ]
  705. const periodDay = [
  706. { value: '2天', label: '2天' },
  707. { value: '3天', label: '3天' },
  708. { value: '4天', label: '4天' },
  709. { value: '5天', label: '5天' },
  710. { value: '10天', label: '10天' },
  711. { value: '15天', label: '15天' },
  712. { value: '30天', label: '30天' }
  713. ]
  714. const numOptionsWeek = [
  715. { value: '1次', label: '1次' },
  716. { value: '2次', label: '2次' },
  717. { value: '3次', label: '3次' },
  718. { value: '4次', label: '4次' },
  719. { value: '5次', label: '5次' },
  720. { value: '6次', label: '6次' },
  721. { value: '7次', label: '7次' }
  722. ]
  723. const numOptionsDay = [{ value: '1次', label: '1次' }]
  724. export default {
  725. name: 'Dialysis',
  726. data() {
  727. var checkFirstDialysis = (rule, value, callback) => {
  728. if (this.addPlan.type == 2 && !value) {
  729. return callback(new Error('请选择首次透析!'))
  730. }
  731. callback()
  732. }
  733. var checkSubName = (rule, value, callback) => {
  734. var pattern = /^\d*$/
  735. if (!pattern.test(value)) {
  736. return callback(new Error('只填写0-9的数字'))
  737. }
  738. callback()
  739. }
  740. return {
  741. hemodialysisPipelinesOptions:[],
  742. punctureNeedleOptions:[],
  743. epoOptions:[],
  744. zhiShow:false,
  745. huShow:false,
  746. totalShow:false,
  747. InnerDialogProps: {
  748. values: [],
  749. visibility: false,
  750. isShowTextArea: true,
  751. customContent: '',
  752. titles: '',
  753. type: '' // 不同弹框类型,用来匹配数据
  754. },
  755. deviceList: [],
  756. dialysisTimeShow: new Date(2018, 1, 1, 3, 0),
  757. isEdit: false,
  758. isChildEdit: false,
  759. totalrate: '无/两周一次',
  760. patientID: 0,
  761. dialogVisible: false,
  762. dialogFormVisible: false,
  763. formLabelWidth: '80px',
  764. formInputWidth: '80px',
  765. total: 0,
  766. tableData: null,
  767. form: {
  768. name: '',
  769. region: '',
  770. date1: '',
  771. date2: '',
  772. delivery: false,
  773. type: [],
  774. resource: '',
  775. desc: ''
  776. },
  777. addPlan: {
  778. id: 0,
  779. mode: '',
  780. mode_name: '',
  781. registrars_id: 0,
  782. dialyzer: '',
  783. dialysis_duration: '',
  784. dialysis_duration_hour: '',
  785. dialysis_duration_minute: '',
  786. hemodialysis_machine: '',
  787. perfusion_apparatus: '',
  788. blood_flow_volume: '',
  789. dewater: '',
  790. displace_liqui: 0,
  791. replacement_way: '',
  792. anticoagulant: '',
  793. anticoagulant_shouji: '',
  794. anticoagulant_weichi: '',
  795. anticoagulant_zongliang: '',
  796. anticoagulant_gaimingcheng: '',
  797. anticoagulant_gaijiliang: '',
  798. kalium: '',
  799. replacement_total: '',
  800. sodium: '',
  801. calcium: '',
  802. bicarbonate: '',
  803. glucose: '',
  804. dry_weight: '',
  805. dialysate_flow: '',
  806. dialysate_temperature: '',
  807. conductivity: '',
  808. doctor: '',
  809. dialysate_formulation: '',
  810. remark: '',
  811. target_ktv: '',
  812. target_ultrafiltration: '',
  813. dialyzer_perfusion_apparatus: '',
  814. body_fluid: '',
  815. body_fluid_other: '',
  816. special_medicine: '',
  817. special_medicine_other: '',
  818. displace_liqui_part: '',
  819. displace_liqui_value: '',
  820. ultrafiltration: '',
  821. blood_access: '',
  822. dialysis_dialyszers:'',
  823. dialysis_irrigation:'',
  824. plasma_separator:"",
  825. bilirubin_adsorption_column:"",
  826. oxygen_uptake:"",
  827. oxygen_flow:"",
  828. oxygen_time:"",
  829. hemodialysis_pipelines:'',
  830. hemodialysis_pipelines_count:'',
  831. puncture_needle:"",
  832. puncture_needle_count:"",
  833. epo:"",
  834. epo_count:"",
  835. },
  836. childPlan: {
  837. mode: '',
  838. frequency: '',
  839. name: '',
  840. parent_id: 0,
  841. sub_name: '',
  842. initiate_mode: '',
  843. doctor: ''
  844. },
  845. modeOptions: null,
  846. anticoagulantsSet: {
  847. type: 1
  848. },
  849. replacementWays: null,
  850. anticoagulantsConfit: null,
  851. dialysate_formulation: [],
  852. body_fluid_option: [],
  853. special_medicine_option: [],
  854. displace_liqui_part_option: [],
  855. blood_access_option: [],
  856. timeOptions: [{ value: 1, label: '按周' }, { value: 2, label: '按日' }],
  857. periodOptions: periodWeek,
  858. numOptions: numOptionsWeek,
  859. stateOptions: [{ value: 1, label: '启用' }, { value: 2, label: '停用' }],
  860. doctorOptions: null,
  861. adminUserOptions: null,
  862. current_index: -1,
  863. addPlanRules: {
  864. mode: [{ required: true, message: '请选择透析模式', trigger: 'blur' }],
  865. type: [{ required: true, message: '请选择频率', trigger: 'blur' }],
  866. period: [{ required: true, message: '请选择周期', trigger: 'blur' }],
  867. times: [{ required: true, message: '请选择次数', trigger: 'blur' }],
  868. initiate_mode: [
  869. { required: true, message: '请选择状态', trigger: 'blur' }
  870. ],
  871. doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }],
  872. first_dialysis: [{ validator: checkFirstDialysis, trigger: 'blur' }]
  873. },
  874. addChildPlanRules: {
  875. sub_name: [
  876. { required: true, message: '请填写处方名', trigger: 'blur' },
  877. {
  878. validator: checkSubName,
  879. trigger: 'blur'
  880. }
  881. ],
  882. initiate_mode: [
  883. { required: true, message: '请选择状态', trigger: 'blur' }
  884. ],
  885. doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }]
  886. },
  887. current_model: {
  888. id: 0,
  889. name: '',
  890. dialysis_duration: 2,
  891. replacement_total: 0,
  892. replacement_way: 2,
  893. hemodialysis_machine: 2,
  894. blood_filter: 2,
  895. perfusion_apparatus: 2,
  896. blood_flow_volume: 2,
  897. dialysate_flow: 2,
  898. kalium: 2,
  899. sodium: 2,
  900. calcium: 2,
  901. bicarbonate: 2
  902. },
  903. current_solution: {
  904. id: 0,
  905. name: '',
  906. sub_name: '',
  907. period: '',
  908. times: '',
  909. doctor: 0
  910. },
  911. anticoagulant: {
  912. id: 0,
  913. name: '',
  914. type: 1,
  915. shouji: 1,
  916. weichi: 1,
  917. zongliang: 1,
  918. gaimingcheng: -1,
  919. gaijiliang: -1,
  920. shouji_unit: 'mg',
  921. weichi_unit: 'mg/h',
  922. zongliang_unit: 'mg',
  923. gaimingcheng_unit: '',
  924. gaijiliang_unit: ''
  925. },
  926. blood_filters: null,
  927. perfusion_apparatus: null,
  928. hemodialysis_machines: null,
  929. dialyzerPerfusionApparatus: [],
  930. solution_detail: {
  931. id: 0,
  932. affirm_state: 0,
  933. dialysis_duration: '',
  934. replacement_way: '',
  935. mode_id: '',
  936. blood_flow_volume: '',
  937. hemodialysis_machine: '',
  938. blood_filter: '',
  939. perfusion_apparatus: '',
  940. dialysate_flow: '',
  941. kalium: '',
  942. replacement_total: '',
  943. sodium: '',
  944. calcium: '',
  945. bicarbonate: '',
  946. anticoagulant: '',
  947. anticoagulant_shouji: '',
  948. anticoagulant_weichi: '',
  949. anticoagulant_zongliang: '',
  950. anticoagulant_gaimingcheng: '',
  951. anticoagulant_gaijiliang: ''
  952. },
  953. queryParams: {
  954. page: 1,
  955. limit: 10,
  956. id: 0
  957. },
  958. stockType:[],
  959. irrigations:[],
  960. dialyzers:[],
  961. dialysis_dialyszers:'',
  962. dialysis_irrigation:"",
  963. plasmaSeparatorList:[],
  964. bilirubinAdsorptionColumn:[],
  965. oxygenList:[
  966. {id:1,name:"需"},
  967. {id:2,name:"无"}
  968. ],
  969. oxygenShow:false,
  970. }
  971. },
  972. watch: {
  973. 'dialysisTimeShow':function(){
  974. var val = this.addPlan.dialysis_duration_hour+":"+this.addPlan.dialysis_duration_minute
  975. var valTime = val.split(':')
  976. this.addPlan.dialysis_duration = parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
  977. this.addPlan.dialysis_duration_hour = valTime[0]
  978. this.addPlan.dialysis_duration_minute = valTime[1]
  979. },
  980. 'addPlan.dialysis_duration': function() {
  981. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
  982. this.addPlan.anticoagulant_shouji,
  983. this.addPlan.dialysis_duration,
  984. this.addPlan.anticoagulant_weichi
  985. )
  986. },
  987. 'addPlan.anticoagulant_shouji': function() {
  988. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
  989. this.addPlan.anticoagulant_shouji,
  990. this.addPlan.dialysis_duration,
  991. this.addPlan.anticoagulant_weichi
  992. )
  993. },
  994. 'addPlan.anticoagulant_weichi': function() {
  995. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  996. 1,
  997. this.addPlan.anticoagulant_shouji,
  998. this.addPlan.dialysis_duration,
  999. this.addPlan.anticoagulant_weichi
  1000. )
  1001. }
  1002. },
  1003. components: {
  1004. MultiSelectBox,
  1005. tableTitle,
  1006. PatientSidebar
  1007. },
  1008. methods: {
  1009. showInnerDialog: function(val) {
  1010. this.InnerDialogProps.visibility = true
  1011. switch (val) {
  1012. case '5': // 透析器/灌流器
  1013. this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
  1014. this.InnerDialogProps.titles = '透析器/灌流器'
  1015. this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
  1016. this.InnerDialogProps.selected = this.addPlan.dialyzer_perfusion_apparatus
  1017. this.InnerDialogProps.isShowTextArea = false
  1018. break
  1019. case '6':
  1020. for(let i=0;i<this.dialyzers.length;i++){
  1021. this.dialyzers[i].name = this.dialyzers[i].specification_name
  1022. }
  1023. console.log("2222222",this.dialyzers)
  1024. this.InnerDialogProps.values = this.dialyzers
  1025. this.InnerDialogProps.titles = '透析器'
  1026. this.InnerDialogProps.type = 'dialyzers'
  1027. this.InnerDialogProps.selected = this.dialysis_dialyszers
  1028. this.InnerDialogProps.isShowTextArea = false
  1029. break
  1030. case '7':
  1031. for(let i=0;i<this.irrigations.length;i++){
  1032. this.irrigations[i].name = this.irrigations[i].specification_name
  1033. }
  1034. this.InnerDialogProps.values = this.irrigations
  1035. this.InnerDialogProps.titles = '灌流器'
  1036. this.InnerDialogProps.type = 'irrigations'
  1037. this.InnerDialogProps.selected = this.dialysis_irrigation
  1038. this.InnerDialogProps.isShowTextArea = false
  1039. break
  1040. case '8':
  1041. this.InnerDialogProps.values = this.plasmaSeparatorList
  1042. this.InnerDialogProps.titles = '血浆分离器'
  1043. this.InnerDialogProps.type = 'plasma_separator'
  1044. this.InnerDialogProps.selected = this.addPlan.plasma_separator
  1045. this.InnerDialogProps.isShowTextArea = false
  1046. break
  1047. case '9':
  1048. this.InnerDialogProps.values = this.bilirubinAdsorptionColumn
  1049. this.InnerDialogProps.titles = '胆红素吸附柱'
  1050. this.InnerDialogProps.type = 'bilirubin_adsorption_column'
  1051. this.InnerDialogProps.selected = this.addPlan.bilirubin_adsorption_column
  1052. this.InnerDialogProps.isShowTextArea = false
  1053. break
  1054. case '10':
  1055. this.InnerDialogProps.values = this.punctureNeedleOptions
  1056. this.InnerDialogProps.titles = '穿刺针'
  1057. this.InnerDialogProps.type = 'puncture_needle'
  1058. this.InnerDialogProps.selected = this.addPlan.puncture_needle
  1059. this.InnerDialogProps.isShowTextArea = false
  1060. break
  1061. }
  1062. },
  1063. innerDialogComfirm: function(val) {
  1064. console.log("value",val)
  1065. this.InnerDialogProps.visibility = false
  1066. switch (val.type) {
  1067. case 'dialyzer_perfusion_apparatus':
  1068. this.addPlan.dialyzer_perfusion_apparatus = val.value.join(',')
  1069. break
  1070. case 'dialyzers':
  1071. this.dialysis_dialyszers = val.value.join(',')
  1072. break
  1073. case 'irrigations':
  1074. this.dialysis_irrigation = val.value.join(',')
  1075. break
  1076. case 'plasma_separator':
  1077. this.addPlan.plasma_separator = val.value.join(',')
  1078. break
  1079. case 'bilirubin_adsorption_column':
  1080. this.addPlan.bilirubin_adsorption_column = val.value.join(',')
  1081. break
  1082. case 'puncture_needle':
  1083. this.addPlan.puncture_needle = val.value.join(',')
  1084. break
  1085. }
  1086. },
  1087. innerDialogCancle: function() {
  1088. this.InnerDialogProps.visibility = false
  1089. },
  1090. changeBodyFluid: function() {},
  1091. GetDeviceData: function() {
  1092. const params = {}
  1093. GetDeviceInfo(params).then(response => {
  1094. this.deviceList = response.data.data.device
  1095. })
  1096. },
  1097. selectnDialysisTime(val) {
  1098. var valTime = val.split(':')
  1099. this.addPlan.dialysis_duration = parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
  1100. console.log("透析时长",this.addPlan.dialysis_duration)
  1101. this.addPlan.dialysis_duration_hour = valTime[0]
  1102. this.addPlan.dialysis_duration_minute = valTime[1]
  1103. },
  1104. tableCurrentChange(current) {
  1105. if (typeof current === 'undefined' || current == null) {
  1106. this.current_solution = {
  1107. id: 0,
  1108. name: '',
  1109. sub_name: '',
  1110. period: '',
  1111. times: '',
  1112. doctor: 0
  1113. }
  1114. this.solution_detail = {
  1115. id: 0,
  1116. affirm_state: 0,
  1117. dialysis_duration: '',
  1118. replacement_way: '',
  1119. mode_id: '',
  1120. blood_flow_volume: '',
  1121. hemodialysis_machine: '',
  1122. blood_filter: '',
  1123. perfusion_apparatus: '',
  1124. dialysate_flow: '',
  1125. kalium: '',
  1126. replacement_total: '',
  1127. sodium: '',
  1128. calcium: '',
  1129. bicarbonate: '',
  1130. anticoagulant: '',
  1131. anticoagulant_shouji: '',
  1132. anticoagulant_weichi: '',
  1133. anticoagulant_zongliang: '',
  1134. anticoagulant_gaimingcheng: '',
  1135. anticoagulant_gaijiliang: ''
  1136. }
  1137. return
  1138. }
  1139. this.current_solution = current
  1140. this.setCurrentMode(current.mode_id)
  1141. this.solution_detail = {
  1142. id: this.current_solution.id,
  1143. affirm_state: this.current_solution.affirm_state,
  1144. dialysis_duration:
  1145. this.current_solution.dialysis_duration != 0
  1146. ? this.current_solution.dialysis_duration
  1147. : '',
  1148. replacement_way:
  1149. this.current_solution.replacement_way != 0
  1150. ? this.current_solution.replacement_way
  1151. : '',
  1152. replacement_total:
  1153. this.current_solution.replacement_total != 0
  1154. ? this.current_solution.replacement_total
  1155. : '',
  1156. mode_id: this.current_solution.mode_id,
  1157. blood_flow_volume:
  1158. this.current_solution.blood_flow_volume != 0
  1159. ? this.current_solution.blood_flow_volume
  1160. : '',
  1161. hemodialysis_machine:
  1162. this.current_solution.hemodialysis_machine != 0
  1163. ? this.current_solution.hemodialysis_machine
  1164. : '',
  1165. blood_filter:
  1166. this.current_solution.blood_filter != 0
  1167. ? this.current_solution.blood_filter
  1168. : '',
  1169. perfusion_apparatus:
  1170. this.current_solution.perfusion_apparatus != 0
  1171. ? this.current_solution.perfusion_apparatus
  1172. : '',
  1173. dialysate_flow:
  1174. this.current_solution.dialysate_flow != 0
  1175. ? this.current_solution.dialysate_flow
  1176. : '',
  1177. kalium:
  1178. this.current_solution.kalium != 0 ? this.current_solution.kalium : '',
  1179. sodium:
  1180. this.current_solution.sodium != 0 ? this.current_solution.sodium : '',
  1181. calcium:
  1182. this.current_solution.calcium != 0
  1183. ? this.current_solution.calcium
  1184. : '',
  1185. bicarbonate:
  1186. this.current_solution.bicarbonate != 0
  1187. ? this.current_solution.bicarbonate
  1188. : '',
  1189. anticoagulant:
  1190. this.current_solution.anticoagulant != 0
  1191. ? this.current_solution.anticoagulant
  1192. : '',
  1193. anticoagulant_shouji:
  1194. this.current_solution.anticoagulant_shouji != 0
  1195. ? this.current_solution.anticoagulant_shouji
  1196. : '',
  1197. anticoagulant_weichi:
  1198. this.current_solution.anticoagulant_weichi != 0
  1199. ? this.current_solution.anticoagulant_weichi
  1200. : '',
  1201. anticoagulant_zongliang:
  1202. this.current_solution.anticoagulant_zongliang != 0
  1203. ? this.current_solution.anticoagulant_zongliang
  1204. : ''
  1205. }
  1206. },
  1207. handleDelete(index, row) {
  1208. if (row.use_state == 1) {
  1209. this.$message.error('方案已被使用,不能删除')
  1210. return false
  1211. }
  1212. this.$confirm('确定删除' + row.name + row.sub_name + '方案吗?', '提示', {
  1213. confirmButtonText: '确定',
  1214. cancelButtonText: '取消',
  1215. type: 'warning'
  1216. }).then(() => {
  1217. deleteDialysisSolution(row.id).then(response => {
  1218. if (response.data.state == 0) {
  1219. this.$message.error(response.data.msg)
  1220. return false
  1221. } else {
  1222. this.$notify({
  1223. title: '成功',
  1224. message: '删除成功',
  1225. type: 'success',
  1226. duration: 2000
  1227. })
  1228. this.tableData.splice(index, 1)
  1229. // if (row.parent_id>0) {
  1230. // this.tableData.splice(index,1);
  1231. // }else {
  1232. // var resetTableData = this.tableData;
  1233. // this.tableData = [];
  1234. // var that = this;
  1235. // resetTableData.forEach(function(item, itemindex){
  1236. // if (item.id != row.id && item.parent_id != row.id) {
  1237. // that.tableData.push(item);
  1238. // }
  1239. // });
  1240. // }
  1241. }
  1242. })
  1243. })
  1244. },
  1245. submitSolution(formName) {
  1246. editDialysisSolutionDetail(
  1247. this.patientID,
  1248. this.solution_detail.id,
  1249. this.solution_detail
  1250. ).then(response => {
  1251. if (response.data.state == 0) {
  1252. this.$message.error(response.data.msg)
  1253. return false
  1254. } else {
  1255. this.$notify({
  1256. title: '成功',
  1257. message: '修改成功',
  1258. type: 'success',
  1259. duration: 2000
  1260. })
  1261. var thisSolution = response.data.data.solution
  1262. var spliceIndex = -1
  1263. for (let index = this.tableData.length - 1; ; index--) {
  1264. if (this.tableData[index].id === thisSolution.id) {
  1265. spliceIndex = index
  1266. break
  1267. }
  1268. }
  1269. if (spliceIndex > -1) {
  1270. var newIndex = spliceIndex + 1
  1271. if (newIndex === this.tableData.length) {
  1272. this.tableData.pop()
  1273. this.tableData.push(thisSolution)
  1274. } else {
  1275. var swapData = this.tableData.splice(newIndex)
  1276. this.tableData.pop()
  1277. this.tableData.push(thisSolution)
  1278. this.tableData = this.tableData.concat(swapData)
  1279. }
  1280. }
  1281. this.solution_detail.affirm_state = thisSolution.affirm_state
  1282. this.$refs.solutionTable.setCurrentRow(this.tableData[spliceIndex])
  1283. }
  1284. })
  1285. },
  1286. submitEditChildSolution(formName) {
  1287. this.$refs[formName].validate(valid => {
  1288. if (valid) {
  1289. var editData = {
  1290. initiate_mode: this.childPlan.initiate_mode,
  1291. doctor: this.childPlan.doctor
  1292. }
  1293. editChildPatientDialysisSolution(
  1294. this.patientID,
  1295. this.childPlan.id,
  1296. editData
  1297. ).then(response => {
  1298. if (response.data.state == 0) {
  1299. this.$message.error(response.data.msg)
  1300. return false
  1301. } else {
  1302. this.$notify({
  1303. title: '成功',
  1304. message: '修改成功',
  1305. type: 'success',
  1306. duration: 2000
  1307. })
  1308. this.$refs[formName].resetFields()
  1309. this.dialogFormVisible = false
  1310. this.tableData[this.current_index].doctor =
  1311. response.data.data.solution.doctor
  1312. this.tableData[this.current_index].updated_time =
  1313. response.data.data.solution.updated_time
  1314. this.tableData[this.current_index].initiate_mode =
  1315. response.data.data.solution.initiate_mode
  1316. this.current_index = -1
  1317. return false
  1318. }
  1319. })
  1320. }
  1321. })
  1322. },
  1323. submitNewChildSolution(formName) {
  1324. this.$refs[formName].validate(valid => {
  1325. if (valid) {
  1326. var createData = {
  1327. parent_id: this.childPlan.parent_id,
  1328. sub_name: this.childPlan.sub_name,
  1329. initiate_mode: this.childPlan.initiate_mode,
  1330. doctor: this.childPlan.doctor
  1331. }
  1332. createChildPatientDialysisSolution(this.patientID, createData).then(
  1333. response => {
  1334. if (response.data.state == 0) {
  1335. this.$message.error(response.data.msg)
  1336. return false
  1337. } else {
  1338. this.$notify({
  1339. title: '成功',
  1340. message: '创建成功',
  1341. type: 'success',
  1342. duration: 2000
  1343. })
  1344. this.$refs[formName].resetFields()
  1345. var spliceIndex = -1
  1346. for (let index = this.tableData.length - 1; ; index--) {
  1347. if (
  1348. this.tableData[index].parent_id === createData.parent_id
  1349. ) {
  1350. spliceIndex = index
  1351. break
  1352. } else if (
  1353. this.tableData[index].id === createData.parent_id
  1354. ) {
  1355. spliceIndex = index
  1356. break
  1357. }
  1358. }
  1359. if (spliceIndex > -1) {
  1360. spliceIndex += 1
  1361. if (spliceIndex === this.tableData.length) {
  1362. this.tableData.push(response.data.data.solution)
  1363. } else {
  1364. var swapData = this.tableData.splice(spliceIndex)
  1365. this.tableData.push(response.data.data.solution)
  1366. this.tableData = this.tableData.concat(swapData)
  1367. }
  1368. }
  1369. this.dialogFormVisible = false
  1370. return false
  1371. }
  1372. }
  1373. )
  1374. }
  1375. })
  1376. },
  1377. submitEditSolution(formName) {
  1378. this.$refs[formName].validate(valid => {
  1379. if (valid) {
  1380. let mode = '2'
  1381. if (
  1382. this.addPlan.registrars_id != this.$store.getters.xt_user.user.id
  1383. ) {
  1384. mode = '3'
  1385. }
  1386. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1387. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1388. editPatientDialysisSolution(this.patientID,this.addPlan.id,this.addPlan, mode).then(response => {
  1389. if (response.data.state == 0) {
  1390. this.$message.error(response.data.msg)
  1391. return false
  1392. } else {
  1393. this.$notify({
  1394. title: '成功',
  1395. message: '修改成功',
  1396. type: 'success',
  1397. duration: 2000
  1398. })
  1399. this.$refs[formName].resetFields()
  1400. this.dialogVisible = false
  1401. for (var dindex in response.data.data.solution) {
  1402. if (dindex == 'id') {
  1403. continue
  1404. }
  1405. this.tableData[this.current_index][dindex] =
  1406. response.data.data.solution[dindex]
  1407. }
  1408. // this.tableData[this.current_index].dialysis_duration = response.data.data.solution.dialysis_duration;
  1409. // this.tableData[this.current_index].doctor = response.data.data.solution.doctor;
  1410. // this.tableData[this.current_index].updated_time = response.data.data.solution.updated_time;
  1411. this.current_index = -1
  1412. return false
  1413. }
  1414. })
  1415. }
  1416. })
  1417. },
  1418. submitNewSolution(formName) {
  1419. this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
  1420. this.$refs[formName].validate(valid => {
  1421. if (valid) {
  1422. const mode = '1'
  1423. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1424. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1425. console.log("add",this.addPlan)
  1426. createPatientDialysisSolution(
  1427. this.patientID,
  1428. this.addPlan,
  1429. mode
  1430. ).then(response => {
  1431. if (response.data.state == 0) {
  1432. this.$message.error(response.data.msg)
  1433. return false
  1434. } else {
  1435. this.$notify({
  1436. title: '成功',
  1437. message: '创建成功',
  1438. type: 'success',
  1439. duration: 2000
  1440. })
  1441. this.$refs[formName].resetFields()
  1442. this.dialogVisible = false
  1443. this.tableData.unshift(response.data.data.solution)
  1444. if (this.tableData.length > 10) {
  1445. this.tableData.pop()
  1446. }
  1447. this.total += 1
  1448. return false
  1449. }
  1450. })
  1451. }
  1452. })
  1453. },
  1454. handleEdit(index, row) {
  1455. // console.log(index, row)
  1456. },
  1457. handleSizeChange(val) {
  1458. this.queryParams.limit = val
  1459. this.fetchPatientDialysisSolutions()
  1460. },
  1461. handleCurrentChange(val) {
  1462. this.queryParams.page = val
  1463. this.fetchPatientDialysisSolutions()
  1464. },
  1465. openEdit(index, row) {
  1466. console.log("ro2333333",row)
  1467. this.current_index = index
  1468. this.addPlan.id = row.id
  1469. this.addPlan.mode = row.mode_id
  1470. this.addPlan.mode_name = row.mode_name
  1471. this.addPlan.dialyzer = row.dialyzer ? row.dialyzer : ''
  1472. this.addPlan.dialysis_duration = '' + row.dialysis_duration
  1473. this.addPlan.dialysis_duration_hour = '' + row.dialysis_duration_hour
  1474. this.addPlan.dialysis_duration_minute = '' + row.dialysis_duration_minute
  1475. this.addPlan.hemodialysis_machine = row.hemodialysis_machine + ''
  1476. this.addPlan.perfusion_apparatus = row.perfusion_apparatus + ''
  1477. if(row.blood_flow_volume!="" || row.blood_flow_volume!=undefined){
  1478. this.addPlan.blood_flow_volume = row.blood_flow_volume.toString()
  1479. }
  1480. if (row.anticoagulant == 3) {
  1481. this.addPlan.anticoagulant = '低分子肝素'
  1482. }
  1483. if (row.anticoagulant != 3) {
  1484. if(row.anticoagulant == 0){
  1485. this.addPlan.anticoagulant = ""
  1486. }else{
  1487. this.addPlan.anticoagulant = row.anticoagulant
  1488. }
  1489. }
  1490. this.addPlan.replacement_total = row.replacement_total
  1491. if(row.target_ktv!="" ||row.target_ktv!=undefined){
  1492. this.addPlan.target_ktv = row.target_ktv.toString()
  1493. }
  1494. if(row.target_ultrafiltration!="" || row.target_ultrafiltration!=undefined){
  1495. this.addPlan.target_ultrafiltration = row.target_ultrafiltration.toString()
  1496. }
  1497. this.addPlan.dialysis_duration = parseFloat(row.dialysis_duration_hour) + parseFloat((row.dialysis_duration_minute / 60).toFixed(2))
  1498. this.addPlan.dialysis_duration_hour = row.dialysis_duration_hour
  1499. this.addPlan.dialysis_duration_minute = row.dialysis_duration_minute
  1500. if(row.anticoagulant_shouji!=""|| row.anticoagulant_shouji!=undefined){
  1501. this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji.toString()
  1502. }
  1503. if(row.anticoagulant_weichi!="" || row.anticoagulant_weichi!=undefined){
  1504. this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi.toString()
  1505. }
  1506. if(row.anticoagulant_zongliang!="" || row.anticoagulant_zongliang!=undefined){
  1507. this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang.toString()
  1508. }
  1509. if(row.anticoagulant_gaimingcheng!=""||row.anticoagulant_gaimingcheng!=undefined){
  1510. this.addPlan.anticoagulant_gaimingcheng = row.anticoagulant_gaimingcheng.toString()
  1511. }
  1512. if(row.anticoagulant_gaijiliang!=""||row.anticoagulant_gaijiliang!=undefined){
  1513. this.addPlan.anticoagulant_gaijiliang = row.anticoagulant_gaijiliang.toString()
  1514. }
  1515. if(row.kalium!=""||row.kalium!=undefined){
  1516. this.addPlan.kalium = row.kalium.toString()
  1517. }
  1518. if(row.sodium!=""||row.sodium!=undefined){
  1519. this.addPlan.sodium = row.sodium.toString()
  1520. }
  1521. if(row.calcium!=""||row.calcium!=undefined){
  1522. this.addPlan.calcium = row.calcium.toString()
  1523. }
  1524. if(row.bicarbonate!=""|| row.bicarbonate!=undefined){
  1525. this.addPlan.bicarbonate = row.bicarbonate.toString()
  1526. }
  1527. if(row.glucose!=""||row.glucose!=undefined){
  1528. this.addPlan.glucose = row.glucose.toString()
  1529. }
  1530. if(row.dialysate_flow!="" || row.dialysate_flow!=undefined){
  1531. this.addPlan.dialysate_flow = row.dialysate_flow.toString()
  1532. }
  1533. if( row.dialysate_temperature!=""|| row.dialysate_temperature!=undefined){
  1534. this.addPlan.dialysate_temperature = row.dialysate_temperature.toString()
  1535. }
  1536. if(row.conductivity!="" ||row.conductivity!=undefined ){
  1537. this.addPlan.conductivity = row.conductivity.toString()
  1538. }
  1539. this.addPlan.remark = row.remark
  1540. // this.addPlan.hemodialysis_pipelines = row.hemodialysis_pipelines
  1541. // if(row.hemodialysis_pipelines_count!="" || row.hemodialysis_pipelines_count!=undefined){
  1542. // this.addPlan.hemodialysis_pipelines_count = row.hemodialysis_pipelines_count.toString()
  1543. // }
  1544. // this.addPlan.puncture_needle = row.puncture_needle
  1545. // if(row.puncture_needle_count!=null || row.puncture_needle_count!=undefined){
  1546. // this.addPlan.puncture_needle_count = row.puncture_needle_count.toString()
  1547. // }
  1548. // this.addPlan.epo = row.epo
  1549. // if(row.epo_count!="" || row.epo_count!=undefined){
  1550. // this.addPlan.epo_count = row.epo_count.toString()
  1551. // }
  1552. if(row.dialyzer_perfusion_apparatus!="" || row.dialyzer_perfusion_apparatus!=undefined){
  1553. this.addPlan.dialyzer_perfusion_apparatus = row.dialyzer_perfusion_apparatus.toString()
  1554. }
  1555. if(row.plasma_separator!="" || row.plasma_separator!=undefined){
  1556. this.addPlan.plasma_separator = row.plasma_separator.toString()
  1557. }
  1558. if(row.bilirubin_adsorption_column!="" || row.bilirubin_adsorption_column!=undefined){
  1559. this.addPlan.bilirubin_adsorption_column = row.bilirubin_adsorption_column.toString()
  1560. }
  1561. this.addPlan.dialysis_irrigation = row.dialysis_irrigation
  1562. this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
  1563. this.dialysis_irrigation = row.dialysis_irrigation
  1564. this.dialysis_dialyszers = row.dialysis_dialyszers
  1565. this.addPlan.oxygen_uptake = row.oxygen_uptake
  1566. if(row.oxygen_uptake == 1){
  1567. this.oxygenShow = true
  1568. }
  1569. if(row.oxygen_uptake == 2){
  1570. this.oxygenShow = false
  1571. }
  1572. this.addPlan.oxygen_flow = row.oxygen_flow
  1573. this.addPlan.oxygen_time = row.oxygen_time
  1574. if(row.body_fluid == 0){
  1575. this.addPlan.body_fluid = ""
  1576. }else{
  1577. this.addPlan.body_fluid = row.body_fluid
  1578. }
  1579. if(row.body_fluid_other!=''|| row.body_fluid_other!=undefined){
  1580. this.addPlan.body_fluid_other = row.body_fluid_other.toString()
  1581. }
  1582. this.addPlan.special_medicine = row.special_medicine
  1583. if(row.special_medicine_other!=""||row.special_medicine_other!=undefined){
  1584. this.addPlan.special_medicine_other = row.special_medicine_other.toString()
  1585. }
  1586. this.addPlan.displace_liqui_part = row.displace_liqui_part
  1587. if(row.displace_liqui_value!=''||row.displace_liqui_value!=undefined){
  1588. this.addPlan.displace_liqui_value = row.displace_liqui_value.toString()
  1589. }
  1590. if(row.ultrafiltration!='' || row.ultrafiltration!=undefined){
  1591. this.addPlan.ultrafiltration = row.ultrafiltration.toString()
  1592. }
  1593. this.addPlan.blood_access = row.blood_access
  1594. this.addPlan.registrars_id = row.registrars_id
  1595. this.addPlan.created_time = row.created_time
  1596. this.addPlan.dialysis_irrigation = row.dialysis_irrigation
  1597. this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
  1598. this.dialysis_irrigation = row.dialysis_irrigation
  1599. this.dialysis_dialyszers = row.dialysis_dialyszers
  1600. this.dialogVisible = true
  1601. this.isEdit = true
  1602. if(row.dialysate_formulation==0){
  1603. this.addPlan.dialysate_formulation= ""
  1604. }
  1605. this.addPlan.dialysate_formulation = row.dialysate_formulation
  1606. this.dialysisTimeShow = new Date(2018,1,1,this.addPlan.dialysis_duration_hour,this.addPlan.dialysis_duration_minute)
  1607. },
  1608. isShows(name) {
  1609. var filedList = store.getters.xt_user.fileds
  1610. for (let i = 0; i < filedList.length; i++) {
  1611. if (
  1612. filedList[i].module == 1 &&
  1613. filedList[i].filed_name_cn == name &&
  1614. filedList[i].is_show == 1
  1615. ) {
  1616. return true
  1617. }
  1618. }
  1619. return false
  1620. },
  1621. openNew() {
  1622. this.current_index = -1
  1623. this.addPlan = {
  1624. mode: '',
  1625. mode_name: '',
  1626. id: 0,
  1627. type: 1,
  1628. period: '',
  1629. times: '',
  1630. initiate_mode: '',
  1631. doctor: '',
  1632. first_dialysis: '',
  1633. dialyzer: '',
  1634. dialysate_formulation: '',
  1635. hemodialysis_machine: '',
  1636. perfusion_apparatus: '',
  1637. blood_flow_volume: '',
  1638. dewater: '',
  1639. displace_liqui: 0,
  1640. replacement_way: '',
  1641. anticoagulant: '',
  1642. anticoagulant_shouji: '',
  1643. anticoagulant_weichi: '',
  1644. anticoagulant_zongliang: '',
  1645. anticoagulant_gaimingcheng: '',
  1646. anticoagulant_gaijiliang: '',
  1647. kalium: '',
  1648. replacement_total: '',
  1649. sodium: '',
  1650. calcium: '',
  1651. bicarbonate: '',
  1652. glucose: '',
  1653. dry_weight: '',
  1654. dialysate_flow: '',
  1655. dialysate_temperature: '',
  1656. conductivity: '',
  1657. remark: '',
  1658. target_ktv: '',
  1659. target_ultrafiltration: '',
  1660. dialyzer_perfusion_apparatus: '',
  1661. body_fluid: '',
  1662. body_fluid_other: '',
  1663. special_medicine: '',
  1664. special_medicine_other: '',
  1665. displace_liqui_part: '',
  1666. displace_liqui_value: '',
  1667. ultrafiltration: '',
  1668. blood_access: '',
  1669. hemodialysis_pipelines:'',
  1670. hemodialysis_pipelines_count:'',
  1671. puncture_needle:"",
  1672. puncture_needle_count:"",
  1673. epo:"",
  1674. epo_count:"",
  1675. dialysis_duration: '3.30',
  1676. dialysis_duration_hour: '3',
  1677. dialysis_duration_minute: '30',
  1678. created_time:"",
  1679. plasma_separator:"",
  1680. bilirubin_adsorption_column:"",
  1681. }
  1682. this.addPlanTypeChange()
  1683. this.dialogVisible = true
  1684. this.isEdit = false
  1685. },
  1686. openNewChild(index, row) {
  1687. this.childPlan = {
  1688. mode: row.mode_name,
  1689. frequency: row.period + row.times,
  1690. name: row.name,
  1691. parent_id: row.id,
  1692. sub_name: '',
  1693. initiate_mode: '',
  1694. doctor: ''
  1695. }
  1696. this.isChildEdit = false
  1697. this.dialogFormVisible = true
  1698. },
  1699. openChildEdit(index, row) {
  1700. this.childPlan = {
  1701. mode: row.mode_name,
  1702. frequency: row.period + row.times,
  1703. name: row.name,
  1704. parent_id: row.parent_id,
  1705. id: row.id,
  1706. sub_name: row.sub_name,
  1707. initiate_mode: row.initiate_mode,
  1708. doctor: row.doctor
  1709. }
  1710. this.current_index = index
  1711. this.isChildEdit = true
  1712. this.dialogFormVisible = true
  1713. },
  1714. fetchAllDoctorAndNurse() {
  1715. fetchAllDoctorAndNurse().then(response => {
  1716. if (response.data.state == 1) {
  1717. this.doctorOptions = response.data.data.doctors
  1718. }
  1719. })
  1720. },
  1721. fetchAllAdminUsers() {
  1722. fetchAllAdminUsers().then(response => {
  1723. if (response.data.state == 1) {
  1724. this.adminUserOptions = response.data.data.users
  1725. }
  1726. })
  1727. },
  1728. fetchPatientDialysisSolutions() {
  1729. fetchPatientDialysisSolutions(this.queryParams).then(response => {
  1730. if (response.data.state == 1) {
  1731. this.tableData = response.data.data.solutions
  1732. this.total = response.data.data.total
  1733. this.stockType = response.data.data.stockType
  1734. console.log("2333555555555",this.stockType)
  1735. if(this.stockType.length >0 ){
  1736. var arr = []
  1737. var arrTwo = []
  1738. for(let i=0;i<this.stockType.length;i++){
  1739. if(this.stockType[i].stock_attribute == 2){
  1740. arr.push(this.stockType[i])
  1741. }
  1742. if(this.stockType[i].stock_attribute == 3){
  1743. arrTwo.push(this.stockType[i])
  1744. }
  1745. }
  1746. var dialyzator = []
  1747. var irrigation = []
  1748. for(let i=0;i<arr.length;i++){
  1749. for(let j=0;j<arr[i].GoodInfo.length;j++){
  1750. dialyzator.push(arr[i].GoodInfo[j])
  1751. }
  1752. }
  1753. console.log("透析器",dialyzator)
  1754. this.dialyzers = dialyzator
  1755. for(let i=0;i<arrTwo.length;i++){
  1756. for(let j=0;j<arrTwo[i].GoodInfo.length;j++){
  1757. irrigation.push(arrTwo[i].GoodInfo[j])
  1758. }
  1759. }
  1760. console.log("灌流器",irrigation)
  1761. this.irrigations = irrigation
  1762. }
  1763. }
  1764. })
  1765. },
  1766. addPlanTypeChange() {
  1767. if (this.addPlan.type == 1) {
  1768. this.periodOptions = periodWeek
  1769. this.numOptions = numOptionsWeek
  1770. } else {
  1771. this.addPlan.type == 2
  1772. this.periodOptions = periodDay
  1773. this.numOptions = numOptionsDay
  1774. }
  1775. },
  1776. changeThisAnticoagulant() {
  1777. var thismode = parseInt(this.addPlan.anticoagulant)
  1778. if (isNaN(thismode) || thismode <= 0) {
  1779. return false
  1780. }
  1781. if (
  1782. typeof this.anticoagulantsConfit[thismode] === 'undefined' ||
  1783. this.anticoagulantsConfit[thismode] == null
  1784. ) {
  1785. return false
  1786. }
  1787. this.anticoagulant = this.anticoagulantsConfit[thismode]
  1788. },
  1789. addPlanModeChange() {
  1790. var thismode = parseInt(this.addPlan.mode)
  1791. if(thismode == 2 || thismode == 5 || thismode ==12){
  1792. this.zhiShow = true
  1793. this.huShow= true
  1794. this.totalShow = true
  1795. }else{
  1796. this.zhiShow= false
  1797. this.huShow = false
  1798. this.totalShow = false
  1799. }
  1800. if (isNaN(thismode) || thismode <= 0) {
  1801. return false
  1802. }
  1803. if (
  1804. typeof this.modeOptions[thismode] === 'undefined' ||
  1805. this.modeOptions[thismode] == null
  1806. ) {
  1807. return false
  1808. }
  1809. // this.current_model = this.modeOptions[thismode];
  1810. this.addPlan.mode_name = this.modeOptions[thismode].name
  1811. const params = {
  1812. id: thismode
  1813. }
  1814. getSystemPrescription(params).then(response => {
  1815. if (response.data.state == 1) {
  1816. var prescription = response.data.data.prescription
  1817. if(prescription.anticoagulant == 0){
  1818. prescription.anticoagulant = ""
  1819. }
  1820. if(prescription.body_fluid == 0){
  1821. prescription.body_fluid = ""
  1822. }
  1823. if (response.data.data.prescription.id > 0) {
  1824. for (const key in response.data.data.prescription) {
  1825. // 因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
  1826. this.$set(
  1827. this.addPlan,
  1828. key,
  1829. response.data.data.prescription[key].toString()
  1830. )
  1831. }
  1832. // 因为el-select特性,整数类型不能转字符串,所以额外处理这些数据
  1833. this.$set(
  1834. this.addPlan,
  1835. 'dialysate_formulation',
  1836. response.data.data.prescription['dialysate_formulation']
  1837. )
  1838. this.$set(
  1839. this.addPlan,
  1840. 'anticoagulant',
  1841. response.data.data.prescription['anticoagulant']
  1842. )
  1843. this.$set(
  1844. this.addPlan,
  1845. 'body_fluid',
  1846. response.data.data.prescription['body_fluid']
  1847. )
  1848. this.$set(
  1849. this.addPlan,
  1850. 'special_medicine',
  1851. response.data.data.prescription['special_medicine']
  1852. )
  1853. this.$set(
  1854. this.addPlan,
  1855. 'displace_liqui_part',
  1856. response.data.data.prescription['displace_liqui_part']
  1857. )
  1858. this.$set(
  1859. this.addPlan,
  1860. 'blood_access',
  1861. response.data.data.prescription['blood_access']
  1862. )
  1863. this.dialysisTimeShow = new Date(
  1864. 2018,
  1865. 1,
  1866. 1,
  1867. this.addPlan.dialysis_duration_hour,
  1868. this.addPlan.dialysis_duration_minute
  1869. )
  1870. } else {
  1871. var tempAddPlan = {
  1872. id: 0,
  1873. dialyzer: '',
  1874. dialysis_duration: '',
  1875. dialysis_duration_hour: '',
  1876. dialysis_duration_minute: '',
  1877. hemodialysis_machine: '',
  1878. dialysate_formulation: '',
  1879. perfusion_apparatus: '',
  1880. blood_flow_volume: '',
  1881. dewater: '',
  1882. displace_liqui: 0,
  1883. replacement_way: '',
  1884. anticoagulant: '',
  1885. anticoagulant_shouji: '',
  1886. anticoagulant_weichi: '',
  1887. anticoagulant_zongliang: '',
  1888. anticoagulant_gaimingcheng: '',
  1889. anticoagulant_gaijiliang: '',
  1890. kalium: '',
  1891. replacement_total: '',
  1892. sodium: '',
  1893. calcium: '',
  1894. bicarbonate: '',
  1895. glucose: '',
  1896. dry_weight: '',
  1897. dialysate_flow: '',
  1898. dialysate_temperature: '',
  1899. conductivity: '',
  1900. doctor: '',
  1901. remark: '',
  1902. target_ktv: '',
  1903. target_ultrafiltration: '',
  1904. dialyzer_perfusion_apparatus: '',
  1905. body_fluid: '',
  1906. body_fluid_other: '',
  1907. special_medicine: '',
  1908. special_medicine_other: '',
  1909. displace_liqui_part: '',
  1910. displace_liqui_value: '',
  1911. ultrafiltration: '',
  1912. blood_access: '',
  1913. plasma_separator:"",
  1914. oxygen_time:"",
  1915. oxygen_uptake:"",
  1916. oxygen_flow:"",
  1917. hemodialysis_pipelines:'',
  1918. hemodialysis_pipelines_count:'',
  1919. puncture_needle:"",
  1920. puncture_needle_count:"",
  1921. epo:"",
  1922. epo_count:"",
  1923. }
  1924. for (const key in tempAddPlan) {
  1925. this.addPlan[key] = tempAddPlan[key]
  1926. }
  1927. }
  1928. }
  1929. })
  1930. },
  1931. setCurrentMode(id) {
  1932. if (
  1933. typeof this.modeOptions[id] === 'undefined' ||
  1934. this.modeOptions[id] == null
  1935. ) {
  1936. return false
  1937. }
  1938. this.current_model = this.modeOptions[id]
  1939. },
  1940. getDoctorName(doctorid) {
  1941. var name = ''
  1942. if (this.doctorOptions == null) {
  1943. return name
  1944. }
  1945. if (typeof this.doctorOptions.length === 'undefined') {
  1946. return name
  1947. }
  1948. var leng = this.doctorOptions.length
  1949. if (leng == 0) {
  1950. return name
  1951. }
  1952. for (let index = 0; index < leng; index++) {
  1953. if (this.doctorOptions[index].id == doctorid) {
  1954. name = this.doctorOptions[index].name
  1955. break
  1956. }
  1957. }
  1958. return name
  1959. },
  1960. getAdminUserName(id) {
  1961. var name = ''
  1962. if (this.adminUserOptions == null) {
  1963. return name
  1964. }
  1965. if (typeof this.adminUserOptions.length === 'undefined') {
  1966. return name
  1967. }
  1968. var leng = this.adminUserOptions.length
  1969. if (leng == 0) {
  1970. return name
  1971. }
  1972. for (let index = 0; index < leng; index++) {
  1973. if (this.adminUserOptions[index].id == id) {
  1974. name = this.adminUserOptions[index].name
  1975. break
  1976. }
  1977. }
  1978. return name
  1979. },
  1980. changeOxygenList(val){
  1981. if(val == 1){
  1982. this.oxygenShow = true
  1983. }
  1984. if(val == 2){
  1985. this.oxygenShow = false
  1986. this.addPlan.oxygen_flow = ""
  1987. this.addPlan.oxygen_time = ""
  1988. }
  1989. },
  1990. },
  1991. created() {
  1992. const id = this.$route.params && this.$route.params.id
  1993. this.patientID = parseInt(id)
  1994. if (isNaN(this.patientID) || this.patientID <= 0) {
  1995. this.$notify.error({
  1996. title: '错误',
  1997. message: '无效的id'
  1998. })
  1999. this.$router.back(-1)
  2000. }
  2001. this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
  2002. this.punctureNeedleOptions = getDataConfig('hemodialysis', 'puncture_needle')
  2003. this.epoOptions =getDataConfig('hemodialysis', 'epo')
  2004. this.GetDeviceData()
  2005. this.fetchAllAdminUsers()
  2006. this.fetchPatientDialysisSolutions()
  2007. this.modeOptions = this.$store.getters.treatment_mode
  2008. this.anticoagulantsSet = this.$store.getters.anticoagulants_set
  2009. this.replacementWays = this.$store.getters.replacement_ways
  2010. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  2011. this.blood_filters = this.$store.getters.blood_filters
  2012. this.perfusion_apparatus = this.$store.getters.perfusion_apparatus
  2013. this.hemodialysis_machines = this.$store.getters.hemodialysis_machines
  2014. this.dialysate_formulation = getDataConfig(
  2015. 'hemodialysis',
  2016. 'dialysate_formulation'
  2017. )
  2018. this.body_fluid_option = this.$store.getters.body_fluid
  2019. this.special_medicine_option = this.$store.getters.special_medicine
  2020. this.displace_liqui_part_option = this.$store.getters.displace_liqui
  2021. this.blood_access_option = this.$store.getters.blood_access
  2022. this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
  2023. this.dialyzerPerfusionApparatus = getDataConfig(
  2024. 'hemodialysis',
  2025. 'dialyzer_perfusion_apparatus'
  2026. )
  2027. this.plasmaSeparatorList = getDataConfig('hemodialysis','plasma_separator')
  2028. this.bilirubinAdsorptionColumn = getDataConfig('hemodialysis','bilirubin_adsorption_column')
  2029. this.queryParams.id = this.patientID
  2030. // this.fetchAllDoctorAndNurse();
  2031. }
  2032. }
  2033. </script>
  2034. <style rel="stylesheet/scss" lang="scss" scoped>
  2035. .Total {
  2036. .sure {
  2037. float: right;
  2038. margin: 5px 10px 0 0;
  2039. }
  2040. .plan {
  2041. font-size: 15px;
  2042. color: #6caef7;
  2043. background: #ecf5ff;
  2044. height: 42px;
  2045. line-height: 42px;
  2046. border: 1px #ebeef5 solid;
  2047. width: 100%;
  2048. padding-left: 15px;
  2049. span {
  2050. margin: 0 20px 0 0;
  2051. }
  2052. }
  2053. }
  2054. .form-table {
  2055. border: 1px #ebeef5 solid;
  2056. padding-bottom: 20px;
  2057. .el-col-6 {
  2058. width: 380px;
  2059. }
  2060. .el-row {
  2061. margin: 0 !important;
  2062. .el-form-item {
  2063. margin-bottom: 12px;
  2064. .el-form-item__content {
  2065. .el-select {
  2066. width: 100%;
  2067. }
  2068. }
  2069. }
  2070. }
  2071. }
  2072. </style>
  2073. <style>
  2074. .el-table td,
  2075. .el-table th.is-leaf,
  2076. .el-table--border,
  2077. .el-table--group {
  2078. border-color: #d0d3da;
  2079. }
  2080. .el-table--border::after,
  2081. .el-table--group::after,
  2082. .el-table::before {
  2083. background-color: #d0d3da;
  2084. }
  2085. </style>