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

dialysisSolution.vue 75KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264
  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('钾')">
  390. <el-form-item label="钾(mmol/L): " prop="kalium">
  391. <el-input v-model="addPlan.kalium"></el-input>
  392. </el-form-item>
  393. </el-col>
  394. <el-col :span="8" v-if="isShows('钠')">
  395. <el-form-item label="钠(mmol/L): " prop="sodium">
  396. <el-input v-model="addPlan.sodium"></el-input>
  397. </el-form-item>
  398. </el-col>
  399. <el-col :span="8" v-if="isShows('钙')">
  400. <el-form-item label="钙(mmol/L): " prop="calcium">
  401. <el-input v-model="addPlan.calcium"></el-input>
  402. </el-form-item>
  403. </el-col>
  404. <el-col :span="8" v-if="isShows('透析器/灌流器')">
  405. <el-form-item label="透析器/灌流器:">
  406. <el-input
  407. v-model="addPlan.dialyzer_perfusion_apparatus" @focus="showInnerDialog('5')"></el-input>
  408. </el-form-item>
  409. </el-col>
  410. <el-col :span="8" v-if="isShows('透析器')">
  411. <el-form-item label="透析器:">
  412. <el-input v-model="dialysis_dialyszers" @focus="showInnerDialog('6')"></el-input>
  413. </el-form-item>
  414. </el-col>
  415. <el-col :span="8" v-if="isShows('灌流器') && (addPlan.mode == 2 || addPlan.mode == 3 || addPlan.mode == 12 || addPlan.mode == 5)">
  416. <el-form-item label="灌流器:">
  417. <el-input v-model="dialysis_irrigation" @focus="showInnerDialog('7')"></el-input>
  418. </el-form-item>
  419. </el-col>
  420. <el-col :span="8" v-if="isShows('碳酸氢盐')">
  421. <el-form-item label="碳酸氢盐(mmol/L): " prop="bicarbonate">
  422. <el-input v-model="addPlan.bicarbonate"></el-input>
  423. </el-form-item>
  424. </el-col>
  425. <el-col :span="8" v-if="isShows('葡萄糖')">
  426. <el-form-item label="葡萄糖(mmol/L): " prop="glucose">
  427. <el-input v-model="addPlan.glucose"></el-input>
  428. </el-form-item>
  429. </el-col>
  430. <el-col :span="8" v-if="isShows('透析液流量')">
  431. <el-form-item label="透析液流量(ml/min): " prop="dialysate_flow">
  432. <el-input v-model="addPlan.dialysate_flow"></el-input>
  433. </el-form-item>
  434. </el-col>
  435. <el-col :span="8" v-if="isShows('透析液温度')">
  436. <el-form-item
  437. label="透析液温度(℃): "
  438. prop="dialysate_temperature"
  439. >
  440. <el-input v-model="addPlan.dialysate_temperature"></el-input>
  441. </el-form-item>
  442. </el-col>
  443. <el-col :span="8" v-if="isShows('电导率')">
  444. <el-form-item label="电导率(mS/cm): " prop="conductivity">
  445. <el-input v-model="addPlan.conductivity"></el-input>
  446. </el-form-item>
  447. </el-col>
  448. <el-col :span="8" v-if="isShows('体液过多症状')">
  449. <el-form-item label="体液过多症状:">
  450. <el-select v-model="addPlan.body_fluid" @change="changeBodyFluid">
  451. <el-option
  452. v-for="item in body_fluid_option"
  453. :label="item.name"
  454. :key="item.id"
  455. :value="item.id"
  456. ></el-option>
  457. </el-select>
  458. </el-form-item>
  459. </el-col>
  460. <el-col :span="8" v-if="isShows('体液过多其他症状')">
  461. <el-form-item label="体液过多其他症状">
  462. <el-input v-model="addPlan.body_fluid_other"></el-input>
  463. </el-form-item>
  464. </el-col>
  465. <el-col :span="8" v-if="isShows('透析前使用特殊药物')">
  466. <el-form-item label="透析前使用特殊药物">
  467. <el-select
  468. v-model="addPlan.special_medicine"
  469. placeholder="请选择"
  470. style="width:100%;"
  471. >
  472. <el-option :key="0" label="请选择" :value="0"></el-option>
  473. <el-option
  474. v-for="item in special_medicine_option"
  475. :label="item.name"
  476. :key="item.id"
  477. :value="item.id"
  478. ></el-option>
  479. </el-select>
  480. </el-form-item>
  481. </el-col>
  482. <el-col :span="8" v-if="isShows('透析前使用其他特殊药物')">
  483. <el-form-item label="使用其他特殊药物">
  484. <el-input v-model="addPlan.special_medicine_other"></el-input>
  485. </el-form-item>
  486. </el-col>
  487. <el-col :span="8" v-if="isShows('置换量') && (addPlan.mode == 2 || addPlan.mode == 5 || addPlan.mode == 12)">
  488. <el-form-item label="置换量(L) : " prop="replacement_total">
  489. <el-input
  490. v-model="addPlan.replacement_total"
  491. type="number"
  492. ></el-input>
  493. </el-form-item>
  494. </el-col>
  495. <el-col :span="8">
  496. <el-form-item
  497. label="置换液:" v-if="isShows('置换液') && (addPlan.mode == 2 || addPlan.mode == 5 || addPlan.mode == 12)
  498. "
  499. >
  500. <el-select
  501. v-model="addPlan.displace_liqui_part"
  502. placeholder="请选择"
  503. >
  504. <el-option :key="0" label="请选择" :value="0"></el-option>
  505. <el-option
  506. v-for="(option, index) in displace_liqui_part_option"
  507. :key="index"
  508. :label="option.name"
  509. :value="option.id"
  510. ></el-option>
  511. </el-select>
  512. </el-form-item>
  513. <!-- <el-form-item
  514. label="置换方式:"
  515. v-if="
  516. isShows('置换液') && (addPlan.mode == 2 || addPlan.mode == 5 || addPlan.mode == 12)
  517. "
  518. >
  519. <el-select
  520. v-model="addPlan.displace_liqui_part"
  521. placeholder="请选择"
  522. >
  523. <el-option :key="0" label="请选择" :value="0"></el-option>
  524. <el-option
  525. v-for="(option, index) in displace_liqui_part_option"
  526. :key="index"
  527. :label="option.name"
  528. :value="option.id"
  529. ></el-option>
  530. </el-select>
  531. </el-form-item> -->
  532. </el-col>
  533. <el-col :span="8" v-if="isShows('置换液总量') && (addPlan.mode == 2 || addPlan.mode == 5 || addPlan.mode == 12)">
  534. <el-form-item label="置换液总量(L)">
  535. <el-input v-model="addPlan.displace_liqui_value"></el-input>
  536. </el-form-item>
  537. </el-col>
  538. <el-col :span="8" v-if="isShows('血管通路')">
  539. <el-form-item label="血管通路:">
  540. <el-select v-model="addPlan.blood_access" placeholder="请选择">
  541. <el-option :key="0" label="请选择" :value="0"></el-option>
  542. <el-option
  543. v-for="(option, index) in blood_access_option"
  544. :key="index"
  545. :label="option.name"
  546. :value="option.id"
  547. ></el-option>
  548. </el-select>
  549. </el-form-item>
  550. </el-col>
  551. <!-- </el-row>
  552. <el-row :gutter="20" > -->
  553. <el-col :span="8" v-if="isShows('实际超滤量')">
  554. <el-form-item label="实际超滤量(L)">
  555. <el-input v-model="addPlan.ultrafiltration"></el-input>
  556. </el-form-item>
  557. </el-col>
  558. <el-col :span="8" v-if="isShows('血浆分离器')">
  559. <el-form-item label="血浆分离器:">
  560. <el-input v-model="addPlan.plasma_separator" @focus="showInnerDialog('8')"></el-input>
  561. </el-form-item>
  562. </el-col>
  563. <el-col :span="8" v-if="isShows('吸氧')">
  564. <el-form-item label="吸氧:">
  565. <el-select v-model="addPlan.oxygen_uptake" placeholder="请选择" @change="changeOxygenList">
  566. <el-option :key="0" label="请选择" :value="0"></el-option>
  567. <el-option
  568. v-for="(item, index) in oxygenList "
  569. :key="index"
  570. :label="item.name"
  571. :value="item.id"
  572. ></el-option>
  573. </el-select>
  574. </el-form-item>
  575. </el-col>
  576. <el-col :span="8" v-if="isShows('吸氧') && oxygenShow == true">
  577. <el-form-item label="吸氧流量(L/分):">
  578. <el-input v-model="addPlan.oxygen_flow"></el-input>
  579. </el-form-item>
  580. </el-col>
  581. <el-col :span="8" v-if="isShows('吸氧') && oxygenShow == true">
  582. <el-form-item label="吸氧时长(h):">
  583. <el-input v-model="addPlan.oxygen_time"></el-input>
  584. </el-form-item>
  585. </el-col>
  586. <el-col :span="8" v-if="isShows('目标KT/V')">
  587. <el-form-item label="目标KT/V">
  588. <el-input v-model="addPlan.target_ktv"></el-input>
  589. </el-form-item>
  590. </el-col>
  591. <el-col :span="8" v-if="isShows('透析管路')">
  592. <el-form-item label="透析管路:">
  593. <el-select v-model="addPlan.hemodialysis_pipelines" >
  594. <el-option
  595. v-for="item in hemodialysisPipelinesOptions"
  596. :label="item.name"
  597. :key="item.id"
  598. :value="item.name"
  599. ></el-option>
  600. </el-select>
  601. </el-form-item>
  602. </el-col>
  603. <el-col :span="8" v-if="isShows('透析管路支数')">
  604. <el-form-item label="透析管路支数">
  605. <el-input v-model="addPlan.hemodialysis_pipelines_count"></el-input>
  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.puncture_needle" @focus="showInnerDialog('10')"></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_count"></el-input>
  616. </el-form-item>
  617. </el-col>
  618. <el-col :span="8" v-if="isShows('促红素')">
  619. <el-form-item label="促红素:">
  620. <el-select v-model="addPlan.epo" @change="changeBodyFluid">
  621. <el-option
  622. v-for="item in epoOptions"
  623. :label="item.name"
  624. :key="item.id"
  625. :value="item.name"
  626. ></el-option>
  627. </el-select>
  628. </el-form-item>
  629. </el-col>
  630. <el-col :span="8" v-if="isShows('促红素支数')">
  631. <el-form-item label="促红素支数">
  632. <el-input v-model="addPlan.epo_count"></el-input>
  633. </el-form-item>
  634. </el-col>
  635. <el-col :span="8" v-if="isShows('最大超滤率')">
  636. <el-form-item label="最大超滤率(ml/h)">
  637. <el-input v-model="addPlan.max_ultrafiltration_rate"></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. max_ultrafiltration_rate:"",
  836. },
  837. childPlan: {
  838. mode: '',
  839. frequency: '',
  840. name: '',
  841. parent_id: 0,
  842. sub_name: '',
  843. initiate_mode: '',
  844. doctor: ''
  845. },
  846. modeOptions: null,
  847. anticoagulantsSet: {
  848. type: 1
  849. },
  850. replacementWays: null,
  851. anticoagulantsConfit: null,
  852. dialysate_formulation: [],
  853. body_fluid_option: [],
  854. special_medicine_option: [],
  855. displace_liqui_part_option: [],
  856. blood_access_option: [],
  857. timeOptions: [{ value: 1, label: '按周' }, { value: 2, label: '按日' }],
  858. periodOptions: periodWeek,
  859. numOptions: numOptionsWeek,
  860. stateOptions: [{ value: 1, label: '启用' }, { value: 2, label: '停用' }],
  861. doctorOptions: null,
  862. adminUserOptions: null,
  863. current_index: -1,
  864. addPlanRules: {
  865. mode: [{ required: true, message: '请选择透析模式', trigger: 'blur' }],
  866. type: [{ required: true, message: '请选择频率', trigger: 'blur' }],
  867. period: [{ required: true, message: '请选择周期', trigger: 'blur' }],
  868. times: [{ required: true, message: '请选择次数', trigger: 'blur' }],
  869. initiate_mode: [
  870. { required: true, message: '请选择状态', trigger: 'blur' }
  871. ],
  872. doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }],
  873. first_dialysis: [{ validator: checkFirstDialysis, trigger: 'blur' }]
  874. },
  875. addChildPlanRules: {
  876. sub_name: [
  877. { required: true, message: '请填写处方名', trigger: 'blur' },
  878. {
  879. validator: checkSubName,
  880. trigger: 'blur'
  881. }
  882. ],
  883. initiate_mode: [
  884. { required: true, message: '请选择状态', trigger: 'blur' }
  885. ],
  886. doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }]
  887. },
  888. current_model: {
  889. id: 0,
  890. name: '',
  891. dialysis_duration: 2,
  892. replacement_total: 0,
  893. replacement_way: 2,
  894. hemodialysis_machine: 2,
  895. blood_filter: 2,
  896. perfusion_apparatus: 2,
  897. blood_flow_volume: 2,
  898. dialysate_flow: 2,
  899. kalium: 2,
  900. sodium: 2,
  901. calcium: 2,
  902. bicarbonate: 2
  903. },
  904. current_solution: {
  905. id: 0,
  906. name: '',
  907. sub_name: '',
  908. period: '',
  909. times: '',
  910. doctor: 0
  911. },
  912. anticoagulant: {
  913. id: 0,
  914. name: '',
  915. type: 1,
  916. shouji: 1,
  917. weichi: 1,
  918. zongliang: 1,
  919. gaimingcheng: -1,
  920. gaijiliang: -1,
  921. shouji_unit: 'mg',
  922. weichi_unit: 'mg/h',
  923. zongliang_unit: 'mg',
  924. gaimingcheng_unit: '',
  925. gaijiliang_unit: ''
  926. },
  927. blood_filters: null,
  928. perfusion_apparatus: null,
  929. hemodialysis_machines: null,
  930. dialyzerPerfusionApparatus: [],
  931. solution_detail: {
  932. id: 0,
  933. affirm_state: 0,
  934. dialysis_duration: '',
  935. replacement_way: '',
  936. mode_id: '',
  937. blood_flow_volume: '',
  938. hemodialysis_machine: '',
  939. blood_filter: '',
  940. perfusion_apparatus: '',
  941. dialysate_flow: '',
  942. kalium: '',
  943. replacement_total: '',
  944. sodium: '',
  945. calcium: '',
  946. bicarbonate: '',
  947. anticoagulant: '',
  948. anticoagulant_shouji: '',
  949. anticoagulant_weichi: '',
  950. anticoagulant_zongliang: '',
  951. anticoagulant_gaimingcheng: '',
  952. anticoagulant_gaijiliang: ''
  953. },
  954. queryParams: {
  955. page: 1,
  956. limit: 10,
  957. id: 0
  958. },
  959. stockType:[],
  960. irrigations:[],
  961. dialyzers:[],
  962. dialysis_dialyszers:'',
  963. dialysis_irrigation:"",
  964. plasmaSeparatorList:[],
  965. bilirubinAdsorptionColumn:[],
  966. oxygenList:[
  967. {id:1,name:"需"},
  968. {id:2,name:"无"}
  969. ],
  970. oxygenShow:false,
  971. }
  972. },
  973. watch: {
  974. 'dialysisTimeShow':function(){
  975. var val = this.addPlan.dialysis_duration_hour+":"+this.addPlan.dialysis_duration_minute
  976. var valTime = val.split(':')
  977. this.addPlan.dialysis_duration = parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
  978. this.addPlan.dialysis_duration_hour = valTime[0]
  979. this.addPlan.dialysis_duration_minute = valTime[1]
  980. },
  981. 'addPlan.dialysis_duration': function() {
  982. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
  983. this.addPlan.anticoagulant_shouji,
  984. this.addPlan.dialysis_duration,
  985. this.addPlan.anticoagulant_weichi
  986. )
  987. },
  988. 'addPlan.anticoagulant_shouji': function() {
  989. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
  990. this.addPlan.anticoagulant_shouji,
  991. this.addPlan.dialysis_duration,
  992. this.addPlan.anticoagulant_weichi
  993. )
  994. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.addPlan.anticoagulant == 2 ){
  995. this.addPlan.anticoagulant_zongliang = ""
  996. this.addPlan.anticoagulant_zongliang = parseInt(this.addPlan.anticoagulant_shouji) + parseInt(this.addPlan.anticoagulant_weichi)
  997. }
  998. },
  999. 'addPlan.anticoagulant_weichi': function() {
  1000. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  1001. 1,
  1002. this.addPlan.anticoagulant_shouji,
  1003. this.addPlan.dialysis_duration,
  1004. this.addPlan.anticoagulant_weichi
  1005. )
  1006. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.addPlan.anticoagulant == 2 ){
  1007. this.addPlan.anticoagulant_zongliang = ""
  1008. this.addPlan.anticoagulant_zongliang = parseInt(this.addPlan.anticoagulant_shouji) + parseInt(this.addPlan.anticoagulant_weichi)
  1009. }
  1010. }
  1011. },
  1012. components: {
  1013. MultiSelectBox,
  1014. tableTitle,
  1015. PatientSidebar
  1016. },
  1017. methods: {
  1018. showInnerDialog: function(val) {
  1019. this.InnerDialogProps.visibility = true
  1020. switch (val) {
  1021. case '5': // 透析器/灌流器
  1022. this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
  1023. this.InnerDialogProps.titles = '透析器/灌流器'
  1024. this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
  1025. this.InnerDialogProps.selected = this.addPlan.dialyzer_perfusion_apparatus
  1026. this.InnerDialogProps.isShowTextArea = false
  1027. break
  1028. case '6':
  1029. for(let i=0;i<this.dialyzers.length;i++){
  1030. this.dialyzers[i].name = this.dialyzers[i].specification_name
  1031. }
  1032. console.log("2222222",this.dialyzers)
  1033. this.InnerDialogProps.values = this.dialyzers
  1034. this.InnerDialogProps.titles = '透析器'
  1035. this.InnerDialogProps.type = 'dialyzers'
  1036. this.InnerDialogProps.selected = this.dialysis_dialyszers
  1037. this.InnerDialogProps.isShowTextArea = false
  1038. break
  1039. case '7':
  1040. for(let i=0;i<this.irrigations.length;i++){
  1041. this.irrigations[i].name = this.irrigations[i].specification_name
  1042. }
  1043. this.InnerDialogProps.values = this.irrigations
  1044. this.InnerDialogProps.titles = '灌流器'
  1045. this.InnerDialogProps.type = 'irrigations'
  1046. this.InnerDialogProps.selected = this.dialysis_irrigation
  1047. this.InnerDialogProps.isShowTextArea = false
  1048. break
  1049. case '8':
  1050. this.InnerDialogProps.values = this.plasmaSeparatorList
  1051. this.InnerDialogProps.titles = '血浆分离器'
  1052. this.InnerDialogProps.type = 'plasma_separator'
  1053. this.InnerDialogProps.selected = this.addPlan.plasma_separator
  1054. this.InnerDialogProps.isShowTextArea = false
  1055. break
  1056. case '9':
  1057. this.InnerDialogProps.values = this.bilirubinAdsorptionColumn
  1058. this.InnerDialogProps.titles = '胆红素吸附柱'
  1059. this.InnerDialogProps.type = 'bilirubin_adsorption_column'
  1060. this.InnerDialogProps.selected = this.addPlan.bilirubin_adsorption_column
  1061. this.InnerDialogProps.isShowTextArea = false
  1062. break
  1063. case '10':
  1064. this.InnerDialogProps.values = this.punctureNeedleOptions
  1065. this.InnerDialogProps.titles = '穿刺针'
  1066. this.InnerDialogProps.type = 'puncture_needle'
  1067. this.InnerDialogProps.selected = this.addPlan.puncture_needle
  1068. this.InnerDialogProps.isShowTextArea = false
  1069. break
  1070. }
  1071. },
  1072. innerDialogComfirm: function(val) {
  1073. console.log("value",val)
  1074. this.InnerDialogProps.visibility = false
  1075. switch (val.type) {
  1076. case 'dialyzer_perfusion_apparatus':
  1077. this.addPlan.dialyzer_perfusion_apparatus = val.value.join(',')
  1078. break
  1079. case 'dialyzers':
  1080. this.dialysis_dialyszers = val.value.join(',')
  1081. break
  1082. case 'irrigations':
  1083. this.dialysis_irrigation = val.value.join(',')
  1084. break
  1085. case 'plasma_separator':
  1086. this.addPlan.plasma_separator = val.value.join(',')
  1087. break
  1088. case 'bilirubin_adsorption_column':
  1089. this.addPlan.bilirubin_adsorption_column = val.value.join(',')
  1090. break
  1091. case 'puncture_needle':
  1092. this.addPlan.puncture_needle = val.value.join(',')
  1093. break
  1094. }
  1095. },
  1096. innerDialogCancle: function() {
  1097. this.InnerDialogProps.visibility = false
  1098. },
  1099. changeBodyFluid: function() {},
  1100. GetDeviceData: function() {
  1101. const params = {}
  1102. GetDeviceInfo(params).then(response => {
  1103. this.deviceList = response.data.data.device
  1104. })
  1105. },
  1106. selectnDialysisTime(val) {
  1107. var valTime = val.split(':')
  1108. this.addPlan.dialysis_duration = parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
  1109. console.log("透析时长",this.addPlan.dialysis_duration)
  1110. this.addPlan.dialysis_duration_hour = valTime[0]
  1111. this.addPlan.dialysis_duration_minute = valTime[1]
  1112. },
  1113. tableCurrentChange(current) {
  1114. if (typeof current === 'undefined' || current == null) {
  1115. this.current_solution = {
  1116. id: 0,
  1117. name: '',
  1118. sub_name: '',
  1119. period: '',
  1120. times: '',
  1121. doctor: 0
  1122. }
  1123. this.solution_detail = {
  1124. id: 0,
  1125. affirm_state: 0,
  1126. dialysis_duration: '',
  1127. replacement_way: '',
  1128. mode_id: '',
  1129. blood_flow_volume: '',
  1130. hemodialysis_machine: '',
  1131. blood_filter: '',
  1132. perfusion_apparatus: '',
  1133. dialysate_flow: '',
  1134. kalium: '',
  1135. replacement_total: '',
  1136. sodium: '',
  1137. calcium: '',
  1138. bicarbonate: '',
  1139. anticoagulant: '',
  1140. anticoagulant_shouji: '',
  1141. anticoagulant_weichi: '',
  1142. anticoagulant_zongliang: '',
  1143. anticoagulant_gaimingcheng: '',
  1144. anticoagulant_gaijiliang: ''
  1145. }
  1146. return
  1147. }
  1148. this.current_solution = current
  1149. this.setCurrentMode(current.mode_id)
  1150. this.solution_detail = {
  1151. id: this.current_solution.id,
  1152. affirm_state: this.current_solution.affirm_state,
  1153. dialysis_duration:
  1154. this.current_solution.dialysis_duration != 0
  1155. ? this.current_solution.dialysis_duration
  1156. : '',
  1157. replacement_way:
  1158. this.current_solution.replacement_way != 0
  1159. ? this.current_solution.replacement_way
  1160. : '',
  1161. replacement_total:
  1162. this.current_solution.replacement_total != 0
  1163. ? this.current_solution.replacement_total
  1164. : '',
  1165. mode_id: this.current_solution.mode_id,
  1166. blood_flow_volume:
  1167. this.current_solution.blood_flow_volume != 0
  1168. ? this.current_solution.blood_flow_volume
  1169. : '',
  1170. hemodialysis_machine:
  1171. this.current_solution.hemodialysis_machine != 0
  1172. ? this.current_solution.hemodialysis_machine
  1173. : '',
  1174. blood_filter:
  1175. this.current_solution.blood_filter != 0
  1176. ? this.current_solution.blood_filter
  1177. : '',
  1178. perfusion_apparatus:
  1179. this.current_solution.perfusion_apparatus != 0
  1180. ? this.current_solution.perfusion_apparatus
  1181. : '',
  1182. dialysate_flow:
  1183. this.current_solution.dialysate_flow != 0
  1184. ? this.current_solution.dialysate_flow
  1185. : '',
  1186. kalium:
  1187. this.current_solution.kalium != 0 ? this.current_solution.kalium : '',
  1188. sodium:
  1189. this.current_solution.sodium != 0 ? this.current_solution.sodium : '',
  1190. calcium:
  1191. this.current_solution.calcium != 0
  1192. ? this.current_solution.calcium
  1193. : '',
  1194. bicarbonate:
  1195. this.current_solution.bicarbonate != 0
  1196. ? this.current_solution.bicarbonate
  1197. : '',
  1198. anticoagulant:
  1199. this.current_solution.anticoagulant != 0
  1200. ? this.current_solution.anticoagulant
  1201. : '',
  1202. anticoagulant_shouji:
  1203. this.current_solution.anticoagulant_shouji != 0
  1204. ? this.current_solution.anticoagulant_shouji
  1205. : '',
  1206. anticoagulant_weichi:
  1207. this.current_solution.anticoagulant_weichi != 0
  1208. ? this.current_solution.anticoagulant_weichi
  1209. : '',
  1210. anticoagulant_zongliang:
  1211. this.current_solution.anticoagulant_zongliang != 0
  1212. ? this.current_solution.anticoagulant_zongliang
  1213. : ''
  1214. }
  1215. },
  1216. handleDelete(index, row) {
  1217. if (row.use_state == 1) {
  1218. this.$message.error('方案已被使用,不能删除')
  1219. return false
  1220. }
  1221. this.$confirm('确定删除' + row.name + row.sub_name + '方案吗?', '提示', {
  1222. confirmButtonText: '确定',
  1223. cancelButtonText: '取消',
  1224. type: 'warning'
  1225. }).then(() => {
  1226. deleteDialysisSolution(row.id).then(response => {
  1227. if (response.data.state == 0) {
  1228. this.$message.error(response.data.msg)
  1229. return false
  1230. } else {
  1231. this.$notify({
  1232. title: '成功',
  1233. message: '删除成功',
  1234. type: 'success',
  1235. duration: 2000
  1236. })
  1237. this.tableData.splice(index, 1)
  1238. // if (row.parent_id>0) {
  1239. // this.tableData.splice(index,1);
  1240. // }else {
  1241. // var resetTableData = this.tableData;
  1242. // this.tableData = [];
  1243. // var that = this;
  1244. // resetTableData.forEach(function(item, itemindex){
  1245. // if (item.id != row.id && item.parent_id != row.id) {
  1246. // that.tableData.push(item);
  1247. // }
  1248. // });
  1249. // }
  1250. }
  1251. })
  1252. })
  1253. },
  1254. submitSolution(formName) {
  1255. editDialysisSolutionDetail(
  1256. this.patientID,
  1257. this.solution_detail.id,
  1258. this.solution_detail
  1259. ).then(response => {
  1260. if (response.data.state == 0) {
  1261. this.$message.error(response.data.msg)
  1262. return false
  1263. } else {
  1264. this.$notify({
  1265. title: '成功',
  1266. message: '修改成功',
  1267. type: 'success',
  1268. duration: 2000
  1269. })
  1270. var thisSolution = response.data.data.solution
  1271. var spliceIndex = -1
  1272. for (let index = this.tableData.length - 1; ; index--) {
  1273. if (this.tableData[index].id === thisSolution.id) {
  1274. spliceIndex = index
  1275. break
  1276. }
  1277. }
  1278. if (spliceIndex > -1) {
  1279. var newIndex = spliceIndex + 1
  1280. if (newIndex === this.tableData.length) {
  1281. this.tableData.pop()
  1282. this.tableData.push(thisSolution)
  1283. } else {
  1284. var swapData = this.tableData.splice(newIndex)
  1285. this.tableData.pop()
  1286. this.tableData.push(thisSolution)
  1287. this.tableData = this.tableData.concat(swapData)
  1288. }
  1289. }
  1290. this.solution_detail.affirm_state = thisSolution.affirm_state
  1291. this.$refs.solutionTable.setCurrentRow(this.tableData[spliceIndex])
  1292. }
  1293. })
  1294. },
  1295. submitEditChildSolution(formName) {
  1296. this.$refs[formName].validate(valid => {
  1297. if (valid) {
  1298. var editData = {
  1299. initiate_mode: this.childPlan.initiate_mode,
  1300. doctor: this.childPlan.doctor
  1301. }
  1302. editChildPatientDialysisSolution(
  1303. this.patientID,
  1304. this.childPlan.id,
  1305. editData
  1306. ).then(response => {
  1307. if (response.data.state == 0) {
  1308. this.$message.error(response.data.msg)
  1309. return false
  1310. } else {
  1311. this.$notify({
  1312. title: '成功',
  1313. message: '修改成功',
  1314. type: 'success',
  1315. duration: 2000
  1316. })
  1317. this.dialogFormVisible = false
  1318. this.tableData[this.current_index].doctor =
  1319. response.data.data.solution.doctor
  1320. this.tableData[this.current_index].updated_time =
  1321. response.data.data.solution.updated_time
  1322. this.tableData[this.current_index].initiate_mode =
  1323. response.data.data.solution.initiate_mode
  1324. this.current_index = -1
  1325. this.$refs[formName].resetFields()
  1326. return false
  1327. }
  1328. })
  1329. }
  1330. })
  1331. },
  1332. submitNewChildSolution(formName) {
  1333. this.$refs[formName].validate(valid => {
  1334. if (valid) {
  1335. var createData = {
  1336. parent_id: this.childPlan.parent_id,
  1337. sub_name: this.childPlan.sub_name,
  1338. initiate_mode: this.childPlan.initiate_mode,
  1339. doctor: this.childPlan.doctor
  1340. }
  1341. createChildPatientDialysisSolution(this.patientID, createData).then(
  1342. response => {
  1343. if (response.data.state == 0) {
  1344. this.$message.error(response.data.msg)
  1345. return false
  1346. } else {
  1347. this.$notify({
  1348. title: '成功',
  1349. message: '创建成功',
  1350. type: 'success',
  1351. duration: 2000
  1352. })
  1353. this.$refs[formName].resetFields()
  1354. var spliceIndex = -1
  1355. for (let index = this.tableData.length - 1; ; index--) {
  1356. if (
  1357. this.tableData[index].parent_id === createData.parent_id
  1358. ) {
  1359. spliceIndex = index
  1360. break
  1361. } else if (
  1362. this.tableData[index].id === createData.parent_id
  1363. ) {
  1364. spliceIndex = index
  1365. break
  1366. }
  1367. }
  1368. if (spliceIndex > -1) {
  1369. spliceIndex += 1
  1370. if (spliceIndex === this.tableData.length) {
  1371. this.tableData.push(response.data.data.solution)
  1372. } else {
  1373. var swapData = this.tableData.splice(spliceIndex)
  1374. this.tableData.push(response.data.data.solution)
  1375. this.tableData = this.tableData.concat(swapData)
  1376. }
  1377. }
  1378. this.dialogFormVisible = false
  1379. return false
  1380. }
  1381. }
  1382. )
  1383. }
  1384. })
  1385. },
  1386. submitEditSolution(formName) {
  1387. this.$refs[formName].validate(valid => {
  1388. if (valid) {
  1389. let mode = '2'
  1390. if (
  1391. this.addPlan.registrars_id != this.$store.getters.xt_user.user.id
  1392. ) {
  1393. mode = '3'
  1394. }
  1395. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1396. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1397. this.addPlan.mode_id = parseInt(this.addPlan.mode_id)
  1398. editPatientDialysisSolution(this.patientID,this.addPlan.id,this.addPlan, mode).then(response => {
  1399. if (response.data.state == 0) {
  1400. this.$message.error(response.data.msg)
  1401. return false
  1402. } else {
  1403. this.$notify({
  1404. title: '成功',
  1405. message: '修改成功',
  1406. type: 'success',
  1407. duration: 2000
  1408. })
  1409. this.dialogVisible = false
  1410. // this.$refs[formName].resetFields()
  1411. for (var dindex in response.data.data.solution) {
  1412. if (dindex == 'id') {
  1413. continue
  1414. }
  1415. this.tableData[this.current_index][dindex] =
  1416. response.data.data.solution[dindex]
  1417. }
  1418. // this.tableData[this.current_index].dialysis_duration = response.data.data.solution.dialysis_duration;
  1419. // this.tableData[this.current_index].doctor = response.data.data.solution.doctor;
  1420. // this.tableData[this.current_index].updated_time = response.data.data.solution.updated_time;
  1421. this.current_index = -1
  1422. this.fetchPatientDialysisSolutions()
  1423. return false
  1424. }
  1425. })
  1426. }
  1427. })
  1428. },
  1429. submitNewSolution(formName) {
  1430. this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
  1431. this.$refs[formName].validate(valid => {
  1432. if (valid) {
  1433. const mode = '1'
  1434. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1435. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1436. this.addPlan.mode_id = parseInt(this.addPlan.mode_id)
  1437. console.log("add",this.addPlan)
  1438. createPatientDialysisSolution(
  1439. this.patientID,
  1440. this.addPlan,
  1441. mode
  1442. ).then(response => {
  1443. if (response.data.state == 0) {
  1444. this.$message.error(response.data.msg)
  1445. return false
  1446. } else {
  1447. this.$notify({
  1448. title: '成功',
  1449. message: '创建成功',
  1450. type: 'success',
  1451. duration: 2000
  1452. })
  1453. this.dialogVisible = false
  1454. // this.tableData.unshift(response.data.data.solution)
  1455. if (this.tableData.length > 10) {
  1456. this.tableData.pop()
  1457. }
  1458. this.total += 1
  1459. // this.$refs[formName].resetFields()
  1460. this.fetchPatientDialysisSolutions()
  1461. return false
  1462. }
  1463. })
  1464. }
  1465. })
  1466. },
  1467. handleEdit(index, row) {
  1468. // console.log(index, row)
  1469. },
  1470. handleSizeChange(val) {
  1471. this.queryParams.limit = val
  1472. this.fetchPatientDialysisSolutions()
  1473. },
  1474. handleCurrentChange(val) {
  1475. this.queryParams.page = val
  1476. this.fetchPatientDialysisSolutions()
  1477. },
  1478. openEdit(index, row) {
  1479. console.log("ro2333333",row)
  1480. this.current_index = index
  1481. this.addPlan.id = row.id
  1482. this.addPlan.mode = row.mode_id
  1483. this.addPlan.mode_name = row.mode_name
  1484. this.addPlan.dialyzer = row.dialyzer ? row.dialyzer : ''
  1485. this.addPlan.dialysis_duration = '' + row.dialysis_duration
  1486. this.addPlan.dialysis_duration_hour = '' + row.dialysis_duration_hour
  1487. this.addPlan.dialysis_duration_minute = '' + row.dialysis_duration_minute
  1488. this.addPlan.hemodialysis_machine = row.hemodialysis_machine + ''
  1489. this.addPlan.perfusion_apparatus = row.perfusion_apparatus + ''
  1490. this.addPlan.max_ultrafiltration_rate = row.max_ultrafiltration_rate
  1491. this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang
  1492. this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji
  1493. this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi
  1494. // this.addPlan.oxygen_uptake = row.oxygen_uptake
  1495. // this.addPlan.hemodialysis_pipelines = row.hemodialysis_pipelines
  1496. // this.addPlan.hemodialysis_pipelines_count = row.hemodialysis_pipelines_count
  1497. // this.addPlan.puncture_needle = row.puncture_needle
  1498. // this.addPlan.puncture_needle_count = row.puncture_needle_count
  1499. // this.addPlan.epo = row.epo
  1500. // this.addPlan.epo_count = row.epo_count
  1501. if(row.blood_flow_volume!="" || row.blood_flow_volume!=undefined){
  1502. this.addPlan.blood_flow_volume = row.blood_flow_volume.toString()
  1503. }
  1504. if (row.anticoagulant == 3) {
  1505. this.addPlan.anticoagulant = '低分子肝素'
  1506. }
  1507. if (row.anticoagulant != 3) {
  1508. if(row.anticoagulant == 0){
  1509. this.addPlan.anticoagulant = ""
  1510. }else{
  1511. this.addPlan.anticoagulant = row.anticoagulant
  1512. }
  1513. }
  1514. this.addPlan.replacement_total = row.replacement_total
  1515. if(row.target_ktv!="" ||row.target_ktv!=undefined){
  1516. this.addPlan.target_ktv = row.target_ktv.toString()
  1517. }
  1518. if(row.target_ultrafiltration!="" || row.target_ultrafiltration!=undefined){
  1519. this.addPlan.target_ultrafiltration = row.target_ultrafiltration.toString()
  1520. }
  1521. this.addPlan.dialysis_duration = parseFloat(row.dialysis_duration_hour) + parseFloat((row.dialysis_duration_minute / 60).toFixed(2))
  1522. this.addPlan.dialysis_duration_hour = row.dialysis_duration_hour
  1523. this.addPlan.dialysis_duration_minute = row.dialysis_duration_minute
  1524. if(row.anticoagulant_shouji!=""|| row.anticoagulant_shouji!=undefined){
  1525. this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji.toString()
  1526. }
  1527. if(row.anticoagulant_weichi!="" || row.anticoagulant_weichi!=undefined){
  1528. this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi.toString()
  1529. }
  1530. if(row.anticoagulant_zongliang!="" || row.anticoagulant_zongliang!=undefined){
  1531. this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang.toString()
  1532. }
  1533. if(row.anticoagulant_gaimingcheng!=""||row.anticoagulant_gaimingcheng!=undefined){
  1534. this.addPlan.anticoagulant_gaimingcheng = row.anticoagulant_gaimingcheng.toString()
  1535. }
  1536. if(row.anticoagulant_gaijiliang!=""||row.anticoagulant_gaijiliang!=undefined){
  1537. this.addPlan.anticoagulant_gaijiliang = row.anticoagulant_gaijiliang.toString()
  1538. }
  1539. if(row.kalium!=""||row.kalium!=undefined){
  1540. this.addPlan.kalium = row.kalium.toString()
  1541. }
  1542. if(row.sodium!=""||row.sodium!=undefined){
  1543. this.addPlan.sodium = row.sodium.toString()
  1544. }
  1545. if(row.calcium!=""||row.calcium!=undefined){
  1546. this.addPlan.calcium = row.calcium.toString()
  1547. }
  1548. if(row.bicarbonate!=""|| row.bicarbonate!=undefined){
  1549. this.addPlan.bicarbonate = row.bicarbonate.toString()
  1550. }
  1551. if(row.glucose!=""||row.glucose!=undefined){
  1552. this.addPlan.glucose = row.glucose.toString()
  1553. }
  1554. if(row.dialysate_flow!="" || row.dialysate_flow!=undefined){
  1555. this.addPlan.dialysate_flow = row.dialysate_flow.toString()
  1556. }
  1557. if( row.dialysate_temperature!=""|| row.dialysate_temperature!=undefined){
  1558. this.addPlan.dialysate_temperature = row.dialysate_temperature.toString()
  1559. }
  1560. if(row.conductivity!="" ||row.conductivity!=undefined ){
  1561. this.addPlan.conductivity = row.conductivity.toString()
  1562. }
  1563. this.addPlan.remark = row.remark
  1564. this.addPlan.hemodialysis_pipelines = row.hemodialysis_pipelines
  1565. if(row.hemodialysis_pipelines_count!="" || row.hemodialysis_pipelines_count!=undefined){
  1566. this.addPlan.hemodialysis_pipelines_count = row.hemodialysis_pipelines_count.toString()
  1567. }
  1568. this.addPlan.puncture_needle = row.puncture_needle
  1569. if(row.puncture_needle_count!=null || row.puncture_needle_count!=undefined){
  1570. this.addPlan.puncture_needle_count = row.puncture_needle_count.toString()
  1571. }
  1572. this.addPlan.epo = row.epo
  1573. if(row.epo_count!="" || row.epo_count!=undefined){
  1574. this.addPlan.epo_count = row.epo_count.toString()
  1575. }
  1576. if(row.dialyzer_perfusion_apparatus!="" || row.dialyzer_perfusion_apparatus!=undefined){
  1577. this.addPlan.dialyzer_perfusion_apparatus = row.dialyzer_perfusion_apparatus.toString()
  1578. }
  1579. if(row.plasma_separator!="" || row.plasma_separator!=undefined){
  1580. this.addPlan.plasma_separator = row.plasma_separator.toString()
  1581. }
  1582. if(row.bilirubin_adsorption_column!="" || row.bilirubin_adsorption_column!=undefined){
  1583. this.addPlan.bilirubin_adsorption_column = row.bilirubin_adsorption_column.toString()
  1584. }
  1585. this.addPlan.dialysis_irrigation = row.dialysis_irrigation
  1586. this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
  1587. this.dialysis_irrigation = row.dialysis_irrigation
  1588. this.dialysis_dialyszers = row.dialysis_dialyszers
  1589. this.addPlan.oxygen_uptake = row.oxygen_uptake
  1590. this.addPlan.max_ultrafiltration_rate = row.max_ultrafiltration_rate
  1591. this.addPlan.oxygen_flow = row.oxygen_flow
  1592. this.addPlan.oxygen_time = row.oxygen_time
  1593. if(row.oxygen_uptake == 1){
  1594. this.oxygenShow = true
  1595. }
  1596. if(row.oxygen_uptake == 2){
  1597. this.oxygenShow = false
  1598. }
  1599. this.addPlan.oxygen_flow = row.oxygen_flow
  1600. this.addPlan.oxygen_time = row.oxygen_time
  1601. if(row.body_fluid == 0){
  1602. this.addPlan.body_fluid = ""
  1603. }else{
  1604. this.addPlan.body_fluid = row.body_fluid
  1605. }
  1606. if(row.body_fluid_other!=''|| row.body_fluid_other!=undefined){
  1607. this.addPlan.body_fluid_other = row.body_fluid_other.toString()
  1608. }
  1609. this.addPlan.special_medicine = row.special_medicine
  1610. if(row.special_medicine_other!=""||row.special_medicine_other!=undefined){
  1611. this.addPlan.special_medicine_other = row.special_medicine_other.toString()
  1612. }
  1613. this.addPlan.displace_liqui_part = row.displace_liqui_part
  1614. if(row.displace_liqui_value!=''||row.displace_liqui_value!=undefined){
  1615. this.addPlan.displace_liqui_value = row.displace_liqui_value.toString()
  1616. }
  1617. if(row.ultrafiltration!='' || row.ultrafiltration!=undefined){
  1618. this.addPlan.ultrafiltration = row.ultrafiltration.toString()
  1619. }
  1620. this.addPlan.blood_access = row.blood_access
  1621. this.addPlan.registrars_id = row.registrars_id
  1622. this.addPlan.created_time = row.created_time
  1623. this.addPlan.dialysis_irrigation = row.dialysis_irrigation
  1624. this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
  1625. this.dialysis_irrigation = row.dialysis_irrigation
  1626. this.dialysis_dialyszers = row.dialysis_dialyszers
  1627. this.dialogVisible = true
  1628. this.isEdit = true
  1629. if(row.dialysate_formulation==0){
  1630. this.addPlan.dialysate_formulation= ""
  1631. }
  1632. this.addPlan.dialysate_formulation = row.dialysate_formulation
  1633. this.dialysisTimeShow = new Date(2018,1,1,this.addPlan.dialysis_duration_hour,this.addPlan.dialysis_duration_minute)
  1634. },
  1635. isShows(name) {
  1636. var filedList = store.getters.xt_user.fileds
  1637. for (let i = 0; i < filedList.length; i++) {
  1638. if (
  1639. filedList[i].module == 1 &&
  1640. filedList[i].filed_name_cn == name &&
  1641. filedList[i].is_show == 1
  1642. ) {
  1643. return true
  1644. }
  1645. }
  1646. return false
  1647. },
  1648. openNew() {
  1649. this.current_index = -1
  1650. this.addPlan = {
  1651. mode: '',
  1652. mode_name: '',
  1653. id: 0,
  1654. type: 1,
  1655. period: '',
  1656. times: '',
  1657. initiate_mode: '',
  1658. doctor: '',
  1659. first_dialysis: '',
  1660. dialyzer: '',
  1661. dialysate_formulation: '',
  1662. hemodialysis_machine: '',
  1663. perfusion_apparatus: '',
  1664. blood_flow_volume: '',
  1665. dewater: '',
  1666. displace_liqui: 0,
  1667. replacement_way: '',
  1668. anticoagulant: '',
  1669. anticoagulant_shouji: '',
  1670. anticoagulant_weichi: '',
  1671. anticoagulant_zongliang: '',
  1672. anticoagulant_gaimingcheng: '',
  1673. anticoagulant_gaijiliang: '',
  1674. kalium: '',
  1675. replacement_total: '',
  1676. sodium: '',
  1677. calcium: '',
  1678. bicarbonate: '',
  1679. glucose: '',
  1680. dry_weight: '',
  1681. dialysate_flow: '',
  1682. dialysate_temperature: '',
  1683. conductivity: '',
  1684. remark: '',
  1685. target_ktv: '',
  1686. target_ultrafiltration: '',
  1687. dialyzer_perfusion_apparatus: '',
  1688. body_fluid: '',
  1689. body_fluid_other: '',
  1690. special_medicine: '',
  1691. special_medicine_other: '',
  1692. displace_liqui_part: '',
  1693. displace_liqui_value: '',
  1694. ultrafiltration: '',
  1695. blood_access: '',
  1696. hemodialysis_pipelines:'',
  1697. hemodialysis_pipelines_count:'',
  1698. puncture_needle:"",
  1699. puncture_needle_count:"",
  1700. epo:"",
  1701. epo_count:"",
  1702. dialysis_duration: '3.30',
  1703. dialysis_duration_hour: '3',
  1704. dialysis_duration_minute: '30',
  1705. created_time:"",
  1706. plasma_separator:"",
  1707. bilirubin_adsorption_column:"",
  1708. }
  1709. this.addPlanTypeChange()
  1710. this.dialogVisible = true
  1711. this.isEdit = false
  1712. },
  1713. openNewChild(index, row) {
  1714. this.childPlan = {
  1715. mode: row.mode_name,
  1716. frequency: row.period + row.times,
  1717. name: row.name,
  1718. parent_id: row.id,
  1719. sub_name: '',
  1720. initiate_mode: '',
  1721. doctor: ''
  1722. }
  1723. this.isChildEdit = false
  1724. this.dialogFormVisible = true
  1725. },
  1726. openChildEdit(index, row) {
  1727. this.childPlan = {
  1728. mode: row.mode_name,
  1729. frequency: row.period + row.times,
  1730. name: row.name,
  1731. parent_id: row.parent_id,
  1732. id: row.id,
  1733. sub_name: row.sub_name,
  1734. initiate_mode: row.initiate_mode,
  1735. doctor: row.doctor
  1736. }
  1737. this.current_index = index
  1738. this.isChildEdit = true
  1739. this.dialogFormVisible = true
  1740. },
  1741. fetchAllDoctorAndNurse() {
  1742. fetchAllDoctorAndNurse().then(response => {
  1743. if (response.data.state == 1) {
  1744. this.doctorOptions = response.data.data.doctors
  1745. }
  1746. })
  1747. },
  1748. fetchAllAdminUsers() {
  1749. fetchAllAdminUsers().then(response => {
  1750. if (response.data.state == 1) {
  1751. this.adminUserOptions = response.data.data.users
  1752. }
  1753. })
  1754. },
  1755. fetchPatientDialysisSolutions() {
  1756. fetchPatientDialysisSolutions(this.queryParams).then(response => {
  1757. if (response.data.state == 1) {
  1758. this.tableData = response.data.data.solutions
  1759. this.total = response.data.data.total
  1760. this.stockType = response.data.data.stockType
  1761. console.log("2333555555555",this.stockType)
  1762. if(this.stockType.length >0 ){
  1763. var arr = []
  1764. var arrTwo = []
  1765. for(let i=0;i<this.stockType.length;i++){
  1766. if(this.stockType[i].stock_attribute == 2){
  1767. arr.push(this.stockType[i])
  1768. }
  1769. if(this.stockType[i].stock_attribute == 3){
  1770. arrTwo.push(this.stockType[i])
  1771. }
  1772. }
  1773. var dialyzator = []
  1774. var irrigation = []
  1775. for(let i=0;i<arr.length;i++){
  1776. for(let j=0;j<arr[i].GoodInfo.length;j++){
  1777. dialyzator.push(arr[i].GoodInfo[j])
  1778. }
  1779. }
  1780. console.log("透析器",dialyzator)
  1781. this.dialyzers = dialyzator
  1782. for(let i=0;i<arrTwo.length;i++){
  1783. for(let j=0;j<arrTwo[i].GoodInfo.length;j++){
  1784. irrigation.push(arrTwo[i].GoodInfo[j])
  1785. }
  1786. }
  1787. console.log("灌流器",irrigation)
  1788. this.irrigations = irrigation
  1789. }
  1790. }
  1791. })
  1792. },
  1793. addPlanTypeChange() {
  1794. if (this.addPlan.type == 1) {
  1795. this.periodOptions = periodWeek
  1796. this.numOptions = numOptionsWeek
  1797. } else {
  1798. this.addPlan.type == 2
  1799. this.periodOptions = periodDay
  1800. this.numOptions = numOptionsDay
  1801. }
  1802. },
  1803. changeThisAnticoagulant() {
  1804. var thismode = parseInt(this.addPlan.anticoagulant)
  1805. if (isNaN(thismode) || thismode <= 0) {
  1806. return false
  1807. }
  1808. if (
  1809. typeof this.anticoagulantsConfit[thismode] === 'undefined' ||
  1810. this.anticoagulantsConfit[thismode] == null
  1811. ) {
  1812. return false
  1813. }
  1814. this.anticoagulant = this.anticoagulantsConfit[thismode]
  1815. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.addPlan.anticoagulant == 2 ){
  1816. this.addPlan.anticoagulant_zongliang = ""
  1817. this.addPlan.anticoagulant_zongliang = parseInt(this.addPlan.anticoagulant_shouji) + parseInt(this.addPlan.anticoagulant_weichi)
  1818. }
  1819. },
  1820. addPlanModeChange() {
  1821. var thismode = parseInt(this.addPlan.mode)
  1822. if(thismode == 2 || thismode == 5 || thismode ==12){
  1823. this.zhiShow = true
  1824. this.huShow= true
  1825. this.totalShow = true
  1826. }else{
  1827. this.zhiShow= false
  1828. this.huShow = false
  1829. this.totalShow = false
  1830. }
  1831. if (isNaN(thismode) || thismode <= 0) {
  1832. return false
  1833. }
  1834. if (
  1835. typeof this.modeOptions[thismode] === 'undefined' ||
  1836. this.modeOptions[thismode] == null
  1837. ) {
  1838. return false
  1839. }
  1840. // this.current_model = this.modeOptions[thismode];
  1841. this.addPlan.mode_name = this.modeOptions[thismode].name
  1842. const params = {
  1843. id: thismode
  1844. }
  1845. getSystemPrescription(params).then(response => {
  1846. if (response.data.state == 1) {
  1847. var prescription = response.data.data.prescription
  1848. if(prescription.anticoagulant == 0){
  1849. prescription.anticoagulant = ""
  1850. }
  1851. if(prescription.body_fluid == 0){
  1852. prescription.body_fluid = ""
  1853. }
  1854. if (response.data.data.prescription.id > 0) {
  1855. for (const key in response.data.data.prescription) {
  1856. // 因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
  1857. this.$set(
  1858. this.addPlan,
  1859. key,
  1860. response.data.data.prescription[key].toString()
  1861. )
  1862. }
  1863. // 因为el-select特性,整数类型不能转字符串,所以额外处理这些数据
  1864. this.$set(
  1865. this.addPlan,
  1866. 'dialysate_formulation',
  1867. response.data.data.prescription['dialysate_formulation']
  1868. )
  1869. this.$set(
  1870. this.addPlan,
  1871. 'anticoagulant',
  1872. response.data.data.prescription['anticoagulant']
  1873. )
  1874. this.$set(
  1875. this.addPlan,
  1876. 'body_fluid',
  1877. response.data.data.prescription['body_fluid']
  1878. )
  1879. this.$set(
  1880. this.addPlan,
  1881. 'special_medicine',
  1882. response.data.data.prescription['special_medicine']
  1883. )
  1884. this.$set(
  1885. this.addPlan,
  1886. 'displace_liqui_part',
  1887. response.data.data.prescription['displace_liqui_part']
  1888. )
  1889. this.$set(
  1890. this.addPlan,
  1891. 'blood_access',
  1892. response.data.data.prescription['blood_access']
  1893. )
  1894. this.dialysisTimeShow = new Date(
  1895. 2018,
  1896. 1,
  1897. 1,
  1898. this.addPlan.dialysis_duration_hour,
  1899. this.addPlan.dialysis_duration_minute
  1900. )
  1901. } else {
  1902. var tempAddPlan = {
  1903. id: 0,
  1904. dialyzer: '',
  1905. dialysis_duration: '',
  1906. dialysis_duration_hour: '',
  1907. dialysis_duration_minute: '',
  1908. hemodialysis_machine: '',
  1909. dialysate_formulation: '',
  1910. perfusion_apparatus: '',
  1911. blood_flow_volume: '',
  1912. dewater: '',
  1913. displace_liqui: 0,
  1914. replacement_way: '',
  1915. anticoagulant: '',
  1916. anticoagulant_shouji: '',
  1917. anticoagulant_weichi: '',
  1918. anticoagulant_zongliang: '',
  1919. anticoagulant_gaimingcheng: '',
  1920. anticoagulant_gaijiliang: '',
  1921. kalium: '',
  1922. replacement_total: '',
  1923. sodium: '',
  1924. calcium: '',
  1925. bicarbonate: '',
  1926. glucose: '',
  1927. dry_weight: '',
  1928. dialysate_flow: '',
  1929. dialysate_temperature: '',
  1930. conductivity: '',
  1931. doctor: '',
  1932. remark: '',
  1933. target_ktv: '',
  1934. target_ultrafiltration: '',
  1935. dialyzer_perfusion_apparatus: '',
  1936. body_fluid: '',
  1937. body_fluid_other: '',
  1938. special_medicine: '',
  1939. special_medicine_other: '',
  1940. displace_liqui_part: '',
  1941. displace_liqui_value: '',
  1942. ultrafiltration: '',
  1943. blood_access: '',
  1944. plasma_separator:"",
  1945. oxygen_time:"",
  1946. oxygen_uptake:"",
  1947. oxygen_flow:"",
  1948. hemodialysis_pipelines:'',
  1949. hemodialysis_pipelines_count:'',
  1950. puncture_needle:"",
  1951. puncture_needle_count:"",
  1952. epo:"",
  1953. epo_count:"",
  1954. }
  1955. for (const key in tempAddPlan) {
  1956. this.addPlan[key] = tempAddPlan[key]
  1957. }
  1958. }
  1959. }
  1960. })
  1961. },
  1962. setCurrentMode(id) {
  1963. if (
  1964. typeof this.modeOptions[id] === 'undefined' ||
  1965. this.modeOptions[id] == null
  1966. ) {
  1967. return false
  1968. }
  1969. this.current_model = this.modeOptions[id]
  1970. },
  1971. getDoctorName(doctorid) {
  1972. var name = ''
  1973. if (this.doctorOptions == null) {
  1974. return name
  1975. }
  1976. if (typeof this.doctorOptions.length === 'undefined') {
  1977. return name
  1978. }
  1979. var leng = this.doctorOptions.length
  1980. if (leng == 0) {
  1981. return name
  1982. }
  1983. for (let index = 0; index < leng; index++) {
  1984. if (this.doctorOptions[index].id == doctorid) {
  1985. name = this.doctorOptions[index].name
  1986. break
  1987. }
  1988. }
  1989. return name
  1990. },
  1991. getAdminUserName(id) {
  1992. var name = ''
  1993. if (this.adminUserOptions == null) {
  1994. return name
  1995. }
  1996. if (typeof this.adminUserOptions.length === 'undefined') {
  1997. return name
  1998. }
  1999. var leng = this.adminUserOptions.length
  2000. if (leng == 0) {
  2001. return name
  2002. }
  2003. for (let index = 0; index < leng; index++) {
  2004. if (this.adminUserOptions[index].id == id) {
  2005. name = this.adminUserOptions[index].name
  2006. break
  2007. }
  2008. }
  2009. return name
  2010. },
  2011. changeOxygenList(val){
  2012. if(val == 1){
  2013. this.oxygenShow = true
  2014. }
  2015. if(val == 2){
  2016. this.oxygenShow = false
  2017. this.addPlan.oxygen_flow = ""
  2018. this.addPlan.oxygen_time = ""
  2019. }
  2020. },
  2021. },
  2022. created() {
  2023. const id = this.$route.params && this.$route.params.id
  2024. this.patientID = parseInt(id)
  2025. if (isNaN(this.patientID) || this.patientID <= 0) {
  2026. this.$notify.error({
  2027. title: '错误',
  2028. message: '无效的id'
  2029. })
  2030. this.$router.back(-1)
  2031. }
  2032. this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
  2033. this.punctureNeedleOptions = getDataConfig('hemodialysis', 'puncture_needle')
  2034. this.epoOptions =getDataConfig('hemodialysis', 'epo')
  2035. this.GetDeviceData()
  2036. this.fetchAllAdminUsers()
  2037. this.fetchPatientDialysisSolutions()
  2038. this.modeOptions = this.$store.getters.treatment_mode
  2039. this.anticoagulantsSet = this.$store.getters.anticoagulants_set
  2040. this.replacementWays = this.$store.getters.replacement_ways
  2041. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  2042. this.blood_filters = this.$store.getters.blood_filters
  2043. this.perfusion_apparatus = this.$store.getters.perfusion_apparatus
  2044. this.hemodialysis_machines = this.$store.getters.hemodialysis_machines
  2045. this.dialysate_formulation = getDataConfig(
  2046. 'hemodialysis',
  2047. 'dialysate_formulation'
  2048. )
  2049. this.body_fluid_option = this.$store.getters.body_fluid
  2050. this.special_medicine_option = this.$store.getters.special_medicine
  2051. this.displace_liqui_part_option = this.$store.getters.displace_liqui
  2052. this.blood_access_option = this.$store.getters.blood_access
  2053. this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
  2054. this.dialyzerPerfusionApparatus = getDataConfig(
  2055. 'hemodialysis',
  2056. 'dialyzer_perfusion_apparatus'
  2057. )
  2058. this.plasmaSeparatorList = getDataConfig('hemodialysis','plasma_separator')
  2059. this.bilirubinAdsorptionColumn = getDataConfig('hemodialysis','bilirubin_adsorption_column')
  2060. this.queryParams.id = this.patientID
  2061. }
  2062. }
  2063. </script>
  2064. <style rel="stylesheet/scss" lang="scss" scoped>
  2065. .Total {
  2066. .sure {
  2067. float: right;
  2068. margin: 5px 10px 0 0;
  2069. }
  2070. .plan {
  2071. font-size: 15px;
  2072. color: #6caef7;
  2073. background: #ecf5ff;
  2074. height: 42px;
  2075. line-height: 42px;
  2076. border: 1px #ebeef5 solid;
  2077. width: 100%;
  2078. padding-left: 15px;
  2079. span {
  2080. margin: 0 20px 0 0;
  2081. }
  2082. }
  2083. }
  2084. .form-table {
  2085. border: 1px #ebeef5 solid;
  2086. padding-bottom: 20px;
  2087. .el-col-6 {
  2088. width: 380px;
  2089. }
  2090. .el-row {
  2091. margin: 0 !important;
  2092. .el-form-item {
  2093. margin-bottom: 12px;
  2094. .el-form-item__content {
  2095. .el-select {
  2096. width: 100%;
  2097. }
  2098. }
  2099. }
  2100. }
  2101. }
  2102. </style>
  2103. <style>
  2104. .el-table td,
  2105. .el-table th.is-leaf,
  2106. .el-table--border,
  2107. .el-table--group {
  2108. border-color: #d0d3da;
  2109. }
  2110. .el-table--border::after,
  2111. .el-table--group::after,
  2112. .el-table::before {
  2113. background-color: #d0d3da;
  2114. }
  2115. </style>