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

dialysisSolution.vue 73KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239
  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-col :span="8" v-if="isShows('最大超滤率')">
  641. <el-form-item label="最大超滤率(ml/h)">
  642. <el-input v-model="addPlan.max_ultrafiltration_rate"></el-input>
  643. </el-form-item>
  644. </el-col>
  645. </el-row>
  646. <el-row :gutter="24">
  647. <el-col :span="24">
  648. <el-form-item label="备注: " prop="remark">
  649. <el-input
  650. type="textarea"
  651. :rows="2"
  652. placeholder="请输入内容"
  653. v-model="addPlan.remark"
  654. >
  655. </el-input>
  656. </el-form-item>
  657. </el-col>
  658. </el-row>
  659. </el-form>
  660. <span slot="footer" class="dialog-footer">
  661. <el-button @click="dialogVisible = false">取 消</el-button>
  662. <el-button
  663. type="primary"
  664. @click="submitEditSolution('addPlan')"
  665. v-if="isEdit"
  666. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  667. >保 存</el-button
  668. >
  669. <el-button
  670. type="primary"
  671. @click="submitNewSolution('addPlan')"
  672. v-else
  673. :disabled="$store.getters.xt_user.subscibe.state == 3 ? true : false"
  674. >保 存</el-button
  675. >
  676. </span>
  677. </el-dialog>
  678. <multi-select-box
  679. :propsForm="InnerDialogProps"
  680. v-on:dialog-comfirm="innerDialogComfirm"
  681. v-on:dialog-cancle="innerDialogCancle">
  682. </multi-select-box>
  683. </div>
  684. </template>
  685. <script>
  686. import tableTitle from './components/tableTitle'
  687. import PatientSidebar from './components/PatientSidebar'
  688. import { fetchAllAdminUsers, fetchAllDoctorAndNurse } from '@/api/doctor'
  689. import {
  690. createChildPatientDialysisSolution,
  691. createPatientDialysisSolution,
  692. deleteDialysisSolution,
  693. editChildPatientDialysisSolution,
  694. editDialysisSolutionDetail,
  695. editPatientDialysisSolution,
  696. fetchPatientDialysisSolutions
  697. } from '@/api/patient'
  698. import { getSystemPrescription } from '@/api/config'
  699. import { getDataConfig } from '@/utils/data'
  700. import { calculateAnticoagulantZL, uParseTime } from '@/utils/tools'
  701. import store from '@/store'
  702. import { GetDeviceInfo } from '@/api/dialysis'
  703. import MultiSelectBox from '../dialysis/details/dialog/MultiSelectBox/index'
  704. const periodWeek = [
  705. { value: '每周', label: '每周' },
  706. { value: '两周', label: '两周' },
  707. { value: '三周', label: '三周' },
  708. { value: '四周', label: '四周' }
  709. ]
  710. const periodDay = [
  711. { value: '2天', label: '2天' },
  712. { value: '3天', label: '3天' },
  713. { value: '4天', label: '4天' },
  714. { value: '5天', label: '5天' },
  715. { value: '10天', label: '10天' },
  716. { value: '15天', label: '15天' },
  717. { value: '30天', label: '30天' }
  718. ]
  719. const numOptionsWeek = [
  720. { value: '1次', label: '1次' },
  721. { value: '2次', label: '2次' },
  722. { value: '3次', label: '3次' },
  723. { value: '4次', label: '4次' },
  724. { value: '5次', label: '5次' },
  725. { value: '6次', label: '6次' },
  726. { value: '7次', label: '7次' }
  727. ]
  728. const numOptionsDay = [{ value: '1次', label: '1次' }]
  729. export default {
  730. name: 'Dialysis',
  731. data() {
  732. var checkFirstDialysis = (rule, value, callback) => {
  733. if (this.addPlan.type == 2 && !value) {
  734. return callback(new Error('请选择首次透析!'))
  735. }
  736. callback()
  737. }
  738. var checkSubName = (rule, value, callback) => {
  739. var pattern = /^\d*$/
  740. if (!pattern.test(value)) {
  741. return callback(new Error('只填写0-9的数字'))
  742. }
  743. callback()
  744. }
  745. return {
  746. hemodialysisPipelinesOptions:[],
  747. punctureNeedleOptions:[],
  748. epoOptions:[],
  749. zhiShow:false,
  750. huShow:false,
  751. totalShow:false,
  752. InnerDialogProps: {
  753. values: [],
  754. visibility: false,
  755. isShowTextArea: true,
  756. customContent: '',
  757. titles: '',
  758. type: '' // 不同弹框类型,用来匹配数据
  759. },
  760. deviceList: [],
  761. dialysisTimeShow: new Date(2018, 1, 1, 3, 0),
  762. isEdit: false,
  763. isChildEdit: false,
  764. totalrate: '无/两周一次',
  765. patientID: 0,
  766. dialogVisible: false,
  767. dialogFormVisible: false,
  768. formLabelWidth: '80px',
  769. formInputWidth: '80px',
  770. total: 0,
  771. tableData: null,
  772. form: {
  773. name: '',
  774. region: '',
  775. date1: '',
  776. date2: '',
  777. delivery: false,
  778. type: [],
  779. resource: '',
  780. desc: ''
  781. },
  782. addPlan: {
  783. id: 0,
  784. mode: '',
  785. mode_name: '',
  786. registrars_id: 0,
  787. dialyzer: '',
  788. dialysis_duration: '',
  789. dialysis_duration_hour: '',
  790. dialysis_duration_minute: '',
  791. hemodialysis_machine: '',
  792. perfusion_apparatus: '',
  793. blood_flow_volume: '',
  794. dewater: '',
  795. displace_liqui: 0,
  796. replacement_way: '',
  797. anticoagulant: '',
  798. anticoagulant_shouji: '',
  799. anticoagulant_weichi: '',
  800. anticoagulant_zongliang: '',
  801. anticoagulant_gaimingcheng: '',
  802. anticoagulant_gaijiliang: '',
  803. kalium: '',
  804. replacement_total: '',
  805. sodium: '',
  806. calcium: '',
  807. bicarbonate: '',
  808. glucose: '',
  809. dry_weight: '',
  810. dialysate_flow: '',
  811. dialysate_temperature: '',
  812. conductivity: '',
  813. doctor: '',
  814. dialysate_formulation: '',
  815. remark: '',
  816. target_ktv: '',
  817. target_ultrafiltration: '',
  818. dialyzer_perfusion_apparatus: '',
  819. body_fluid: '',
  820. body_fluid_other: '',
  821. special_medicine: '',
  822. special_medicine_other: '',
  823. displace_liqui_part: '',
  824. displace_liqui_value: '',
  825. ultrafiltration: '',
  826. blood_access: '',
  827. dialysis_dialyszers:'',
  828. dialysis_irrigation:'',
  829. plasma_separator:"",
  830. bilirubin_adsorption_column:"",
  831. oxygen_uptake:"",
  832. oxygen_flow:"",
  833. oxygen_time:"",
  834. hemodialysis_pipelines:'',
  835. hemodialysis_pipelines_count:'',
  836. puncture_needle:"",
  837. puncture_needle_count:"",
  838. epo:"",
  839. epo_count:"",
  840. max_ultrafiltration_rate:"",
  841. },
  842. childPlan: {
  843. mode: '',
  844. frequency: '',
  845. name: '',
  846. parent_id: 0,
  847. sub_name: '',
  848. initiate_mode: '',
  849. doctor: ''
  850. },
  851. modeOptions: null,
  852. anticoagulantsSet: {
  853. type: 1
  854. },
  855. replacementWays: null,
  856. anticoagulantsConfit: null,
  857. dialysate_formulation: [],
  858. body_fluid_option: [],
  859. special_medicine_option: [],
  860. displace_liqui_part_option: [],
  861. blood_access_option: [],
  862. timeOptions: [{ value: 1, label: '按周' }, { value: 2, label: '按日' }],
  863. periodOptions: periodWeek,
  864. numOptions: numOptionsWeek,
  865. stateOptions: [{ value: 1, label: '启用' }, { value: 2, label: '停用' }],
  866. doctorOptions: null,
  867. adminUserOptions: null,
  868. current_index: -1,
  869. addPlanRules: {
  870. mode: [{ required: true, message: '请选择透析模式', trigger: 'blur' }],
  871. type: [{ required: true, message: '请选择频率', trigger: 'blur' }],
  872. period: [{ required: true, message: '请选择周期', trigger: 'blur' }],
  873. times: [{ required: true, message: '请选择次数', trigger: 'blur' }],
  874. initiate_mode: [
  875. { required: true, message: '请选择状态', trigger: 'blur' }
  876. ],
  877. doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }],
  878. first_dialysis: [{ validator: checkFirstDialysis, trigger: 'blur' }]
  879. },
  880. addChildPlanRules: {
  881. sub_name: [
  882. { required: true, message: '请填写处方名', trigger: 'blur' },
  883. {
  884. validator: checkSubName,
  885. trigger: 'blur'
  886. }
  887. ],
  888. initiate_mode: [
  889. { required: true, message: '请选择状态', trigger: 'blur' }
  890. ],
  891. doctor: [{ required: true, message: '请选择医生', trigger: 'blur' }]
  892. },
  893. current_model: {
  894. id: 0,
  895. name: '',
  896. dialysis_duration: 2,
  897. replacement_total: 0,
  898. replacement_way: 2,
  899. hemodialysis_machine: 2,
  900. blood_filter: 2,
  901. perfusion_apparatus: 2,
  902. blood_flow_volume: 2,
  903. dialysate_flow: 2,
  904. kalium: 2,
  905. sodium: 2,
  906. calcium: 2,
  907. bicarbonate: 2
  908. },
  909. current_solution: {
  910. id: 0,
  911. name: '',
  912. sub_name: '',
  913. period: '',
  914. times: '',
  915. doctor: 0
  916. },
  917. anticoagulant: {
  918. id: 0,
  919. name: '',
  920. type: 1,
  921. shouji: 1,
  922. weichi: 1,
  923. zongliang: 1,
  924. gaimingcheng: -1,
  925. gaijiliang: -1,
  926. shouji_unit: 'mg',
  927. weichi_unit: 'mg/h',
  928. zongliang_unit: 'mg',
  929. gaimingcheng_unit: '',
  930. gaijiliang_unit: ''
  931. },
  932. blood_filters: null,
  933. perfusion_apparatus: null,
  934. hemodialysis_machines: null,
  935. dialyzerPerfusionApparatus: [],
  936. solution_detail: {
  937. id: 0,
  938. affirm_state: 0,
  939. dialysis_duration: '',
  940. replacement_way: '',
  941. mode_id: '',
  942. blood_flow_volume: '',
  943. hemodialysis_machine: '',
  944. blood_filter: '',
  945. perfusion_apparatus: '',
  946. dialysate_flow: '',
  947. kalium: '',
  948. replacement_total: '',
  949. sodium: '',
  950. calcium: '',
  951. bicarbonate: '',
  952. anticoagulant: '',
  953. anticoagulant_shouji: '',
  954. anticoagulant_weichi: '',
  955. anticoagulant_zongliang: '',
  956. anticoagulant_gaimingcheng: '',
  957. anticoagulant_gaijiliang: ''
  958. },
  959. queryParams: {
  960. page: 1,
  961. limit: 10,
  962. id: 0
  963. },
  964. stockType:[],
  965. irrigations:[],
  966. dialyzers:[],
  967. dialysis_dialyszers:'',
  968. dialysis_irrigation:"",
  969. plasmaSeparatorList:[],
  970. bilirubinAdsorptionColumn:[],
  971. oxygenList:[
  972. {id:1,name:"需"},
  973. {id:2,name:"无"}
  974. ],
  975. oxygenShow:false,
  976. }
  977. },
  978. watch: {
  979. 'dialysisTimeShow':function(){
  980. var val = this.addPlan.dialysis_duration_hour+":"+this.addPlan.dialysis_duration_minute
  981. var valTime = val.split(':')
  982. this.addPlan.dialysis_duration = parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
  983. this.addPlan.dialysis_duration_hour = valTime[0]
  984. this.addPlan.dialysis_duration_minute = valTime[1]
  985. },
  986. 'addPlan.dialysis_duration': function() {
  987. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
  988. this.addPlan.anticoagulant_shouji,
  989. this.addPlan.dialysis_duration,
  990. this.addPlan.anticoagulant_weichi
  991. )
  992. },
  993. 'addPlan.anticoagulant_shouji': function() {
  994. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(1,
  995. this.addPlan.anticoagulant_shouji,
  996. this.addPlan.dialysis_duration,
  997. this.addPlan.anticoagulant_weichi
  998. )
  999. },
  1000. 'addPlan.anticoagulant_weichi': function() {
  1001. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  1002. 1,
  1003. this.addPlan.anticoagulant_shouji,
  1004. this.addPlan.dialysis_duration,
  1005. this.addPlan.anticoagulant_weichi
  1006. )
  1007. }
  1008. },
  1009. components: {
  1010. MultiSelectBox,
  1011. tableTitle,
  1012. PatientSidebar
  1013. },
  1014. methods: {
  1015. showInnerDialog: function(val) {
  1016. this.InnerDialogProps.visibility = true
  1017. switch (val) {
  1018. case '5': // 透析器/灌流器
  1019. this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
  1020. this.InnerDialogProps.titles = '透析器/灌流器'
  1021. this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
  1022. this.InnerDialogProps.selected = this.addPlan.dialyzer_perfusion_apparatus
  1023. this.InnerDialogProps.isShowTextArea = false
  1024. break
  1025. case '6':
  1026. for(let i=0;i<this.dialyzers.length;i++){
  1027. this.dialyzers[i].name = this.dialyzers[i].specification_name
  1028. }
  1029. console.log("2222222",this.dialyzers)
  1030. this.InnerDialogProps.values = this.dialyzers
  1031. this.InnerDialogProps.titles = '透析器'
  1032. this.InnerDialogProps.type = 'dialyzers'
  1033. this.InnerDialogProps.selected = this.dialysis_dialyszers
  1034. this.InnerDialogProps.isShowTextArea = false
  1035. break
  1036. case '7':
  1037. for(let i=0;i<this.irrigations.length;i++){
  1038. this.irrigations[i].name = this.irrigations[i].specification_name
  1039. }
  1040. this.InnerDialogProps.values = this.irrigations
  1041. this.InnerDialogProps.titles = '灌流器'
  1042. this.InnerDialogProps.type = 'irrigations'
  1043. this.InnerDialogProps.selected = this.dialysis_irrigation
  1044. this.InnerDialogProps.isShowTextArea = false
  1045. break
  1046. case '8':
  1047. this.InnerDialogProps.values = this.plasmaSeparatorList
  1048. this.InnerDialogProps.titles = '血浆分离器'
  1049. this.InnerDialogProps.type = 'plasma_separator'
  1050. this.InnerDialogProps.selected = this.addPlan.plasma_separator
  1051. this.InnerDialogProps.isShowTextArea = false
  1052. break
  1053. case '9':
  1054. this.InnerDialogProps.values = this.bilirubinAdsorptionColumn
  1055. this.InnerDialogProps.titles = '胆红素吸附柱'
  1056. this.InnerDialogProps.type = 'bilirubin_adsorption_column'
  1057. this.InnerDialogProps.selected = this.addPlan.bilirubin_adsorption_column
  1058. this.InnerDialogProps.isShowTextArea = false
  1059. break
  1060. case '10':
  1061. this.InnerDialogProps.values = this.punctureNeedleOptions
  1062. this.InnerDialogProps.titles = '穿刺针'
  1063. this.InnerDialogProps.type = 'puncture_needle'
  1064. this.InnerDialogProps.selected = this.addPlan.puncture_needle
  1065. this.InnerDialogProps.isShowTextArea = false
  1066. break
  1067. }
  1068. },
  1069. innerDialogComfirm: function(val) {
  1070. console.log("value",val)
  1071. this.InnerDialogProps.visibility = false
  1072. switch (val.type) {
  1073. case 'dialyzer_perfusion_apparatus':
  1074. this.addPlan.dialyzer_perfusion_apparatus = val.value.join(',')
  1075. break
  1076. case 'dialyzers':
  1077. this.dialysis_dialyszers = val.value.join(',')
  1078. break
  1079. case 'irrigations':
  1080. this.dialysis_irrigation = val.value.join(',')
  1081. break
  1082. case 'plasma_separator':
  1083. this.addPlan.plasma_separator = val.value.join(',')
  1084. break
  1085. case 'bilirubin_adsorption_column':
  1086. this.addPlan.bilirubin_adsorption_column = val.value.join(',')
  1087. break
  1088. case 'puncture_needle':
  1089. this.addPlan.puncture_needle = val.value.join(',')
  1090. break
  1091. }
  1092. },
  1093. innerDialogCancle: function() {
  1094. this.InnerDialogProps.visibility = false
  1095. },
  1096. changeBodyFluid: function() {},
  1097. GetDeviceData: function() {
  1098. const params = {}
  1099. GetDeviceInfo(params).then(response => {
  1100. this.deviceList = response.data.data.device
  1101. })
  1102. },
  1103. selectnDialysisTime(val) {
  1104. var valTime = val.split(':')
  1105. this.addPlan.dialysis_duration = parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
  1106. console.log("透析时长",this.addPlan.dialysis_duration)
  1107. this.addPlan.dialysis_duration_hour = valTime[0]
  1108. this.addPlan.dialysis_duration_minute = valTime[1]
  1109. },
  1110. tableCurrentChange(current) {
  1111. if (typeof current === 'undefined' || current == null) {
  1112. this.current_solution = {
  1113. id: 0,
  1114. name: '',
  1115. sub_name: '',
  1116. period: '',
  1117. times: '',
  1118. doctor: 0
  1119. }
  1120. this.solution_detail = {
  1121. id: 0,
  1122. affirm_state: 0,
  1123. dialysis_duration: '',
  1124. replacement_way: '',
  1125. mode_id: '',
  1126. blood_flow_volume: '',
  1127. hemodialysis_machine: '',
  1128. blood_filter: '',
  1129. perfusion_apparatus: '',
  1130. dialysate_flow: '',
  1131. kalium: '',
  1132. replacement_total: '',
  1133. sodium: '',
  1134. calcium: '',
  1135. bicarbonate: '',
  1136. anticoagulant: '',
  1137. anticoagulant_shouji: '',
  1138. anticoagulant_weichi: '',
  1139. anticoagulant_zongliang: '',
  1140. anticoagulant_gaimingcheng: '',
  1141. anticoagulant_gaijiliang: ''
  1142. }
  1143. return
  1144. }
  1145. this.current_solution = current
  1146. this.setCurrentMode(current.mode_id)
  1147. this.solution_detail = {
  1148. id: this.current_solution.id,
  1149. affirm_state: this.current_solution.affirm_state,
  1150. dialysis_duration:
  1151. this.current_solution.dialysis_duration != 0
  1152. ? this.current_solution.dialysis_duration
  1153. : '',
  1154. replacement_way:
  1155. this.current_solution.replacement_way != 0
  1156. ? this.current_solution.replacement_way
  1157. : '',
  1158. replacement_total:
  1159. this.current_solution.replacement_total != 0
  1160. ? this.current_solution.replacement_total
  1161. : '',
  1162. mode_id: this.current_solution.mode_id,
  1163. blood_flow_volume:
  1164. this.current_solution.blood_flow_volume != 0
  1165. ? this.current_solution.blood_flow_volume
  1166. : '',
  1167. hemodialysis_machine:
  1168. this.current_solution.hemodialysis_machine != 0
  1169. ? this.current_solution.hemodialysis_machine
  1170. : '',
  1171. blood_filter:
  1172. this.current_solution.blood_filter != 0
  1173. ? this.current_solution.blood_filter
  1174. : '',
  1175. perfusion_apparatus:
  1176. this.current_solution.perfusion_apparatus != 0
  1177. ? this.current_solution.perfusion_apparatus
  1178. : '',
  1179. dialysate_flow:
  1180. this.current_solution.dialysate_flow != 0
  1181. ? this.current_solution.dialysate_flow
  1182. : '',
  1183. kalium:
  1184. this.current_solution.kalium != 0 ? this.current_solution.kalium : '',
  1185. sodium:
  1186. this.current_solution.sodium != 0 ? this.current_solution.sodium : '',
  1187. calcium:
  1188. this.current_solution.calcium != 0
  1189. ? this.current_solution.calcium
  1190. : '',
  1191. bicarbonate:
  1192. this.current_solution.bicarbonate != 0
  1193. ? this.current_solution.bicarbonate
  1194. : '',
  1195. anticoagulant:
  1196. this.current_solution.anticoagulant != 0
  1197. ? this.current_solution.anticoagulant
  1198. : '',
  1199. anticoagulant_shouji:
  1200. this.current_solution.anticoagulant_shouji != 0
  1201. ? this.current_solution.anticoagulant_shouji
  1202. : '',
  1203. anticoagulant_weichi:
  1204. this.current_solution.anticoagulant_weichi != 0
  1205. ? this.current_solution.anticoagulant_weichi
  1206. : '',
  1207. anticoagulant_zongliang:
  1208. this.current_solution.anticoagulant_zongliang != 0
  1209. ? this.current_solution.anticoagulant_zongliang
  1210. : ''
  1211. }
  1212. },
  1213. handleDelete(index, row) {
  1214. if (row.use_state == 1) {
  1215. this.$message.error('方案已被使用,不能删除')
  1216. return false
  1217. }
  1218. this.$confirm('确定删除' + row.name + row.sub_name + '方案吗?', '提示', {
  1219. confirmButtonText: '确定',
  1220. cancelButtonText: '取消',
  1221. type: 'warning'
  1222. }).then(() => {
  1223. deleteDialysisSolution(row.id).then(response => {
  1224. if (response.data.state == 0) {
  1225. this.$message.error(response.data.msg)
  1226. return false
  1227. } else {
  1228. this.$notify({
  1229. title: '成功',
  1230. message: '删除成功',
  1231. type: 'success',
  1232. duration: 2000
  1233. })
  1234. this.tableData.splice(index, 1)
  1235. // if (row.parent_id>0) {
  1236. // this.tableData.splice(index,1);
  1237. // }else {
  1238. // var resetTableData = this.tableData;
  1239. // this.tableData = [];
  1240. // var that = this;
  1241. // resetTableData.forEach(function(item, itemindex){
  1242. // if (item.id != row.id && item.parent_id != row.id) {
  1243. // that.tableData.push(item);
  1244. // }
  1245. // });
  1246. // }
  1247. }
  1248. })
  1249. })
  1250. },
  1251. submitSolution(formName) {
  1252. editDialysisSolutionDetail(
  1253. this.patientID,
  1254. this.solution_detail.id,
  1255. this.solution_detail
  1256. ).then(response => {
  1257. if (response.data.state == 0) {
  1258. this.$message.error(response.data.msg)
  1259. return false
  1260. } else {
  1261. this.$notify({
  1262. title: '成功',
  1263. message: '修改成功',
  1264. type: 'success',
  1265. duration: 2000
  1266. })
  1267. var thisSolution = response.data.data.solution
  1268. var spliceIndex = -1
  1269. for (let index = this.tableData.length - 1; ; index--) {
  1270. if (this.tableData[index].id === thisSolution.id) {
  1271. spliceIndex = index
  1272. break
  1273. }
  1274. }
  1275. if (spliceIndex > -1) {
  1276. var newIndex = spliceIndex + 1
  1277. if (newIndex === this.tableData.length) {
  1278. this.tableData.pop()
  1279. this.tableData.push(thisSolution)
  1280. } else {
  1281. var swapData = this.tableData.splice(newIndex)
  1282. this.tableData.pop()
  1283. this.tableData.push(thisSolution)
  1284. this.tableData = this.tableData.concat(swapData)
  1285. }
  1286. }
  1287. this.solution_detail.affirm_state = thisSolution.affirm_state
  1288. this.$refs.solutionTable.setCurrentRow(this.tableData[spliceIndex])
  1289. }
  1290. })
  1291. },
  1292. submitEditChildSolution(formName) {
  1293. this.$refs[formName].validate(valid => {
  1294. if (valid) {
  1295. var editData = {
  1296. initiate_mode: this.childPlan.initiate_mode,
  1297. doctor: this.childPlan.doctor
  1298. }
  1299. editChildPatientDialysisSolution(
  1300. this.patientID,
  1301. this.childPlan.id,
  1302. editData
  1303. ).then(response => {
  1304. if (response.data.state == 0) {
  1305. this.$message.error(response.data.msg)
  1306. return false
  1307. } else {
  1308. this.$notify({
  1309. title: '成功',
  1310. message: '修改成功',
  1311. type: 'success',
  1312. duration: 2000
  1313. })
  1314. this.$refs[formName].resetFields()
  1315. this.dialogFormVisible = false
  1316. this.tableData[this.current_index].doctor =
  1317. response.data.data.solution.doctor
  1318. this.tableData[this.current_index].updated_time =
  1319. response.data.data.solution.updated_time
  1320. this.tableData[this.current_index].initiate_mode =
  1321. response.data.data.solution.initiate_mode
  1322. this.current_index = -1
  1323. return false
  1324. }
  1325. })
  1326. }
  1327. })
  1328. },
  1329. submitNewChildSolution(formName) {
  1330. this.$refs[formName].validate(valid => {
  1331. if (valid) {
  1332. var createData = {
  1333. parent_id: this.childPlan.parent_id,
  1334. sub_name: this.childPlan.sub_name,
  1335. initiate_mode: this.childPlan.initiate_mode,
  1336. doctor: this.childPlan.doctor
  1337. }
  1338. createChildPatientDialysisSolution(this.patientID, createData).then(
  1339. response => {
  1340. if (response.data.state == 0) {
  1341. this.$message.error(response.data.msg)
  1342. return false
  1343. } else {
  1344. this.$notify({
  1345. title: '成功',
  1346. message: '创建成功',
  1347. type: 'success',
  1348. duration: 2000
  1349. })
  1350. this.$refs[formName].resetFields()
  1351. var spliceIndex = -1
  1352. for (let index = this.tableData.length - 1; ; index--) {
  1353. if (
  1354. this.tableData[index].parent_id === createData.parent_id
  1355. ) {
  1356. spliceIndex = index
  1357. break
  1358. } else if (
  1359. this.tableData[index].id === createData.parent_id
  1360. ) {
  1361. spliceIndex = index
  1362. break
  1363. }
  1364. }
  1365. if (spliceIndex > -1) {
  1366. spliceIndex += 1
  1367. if (spliceIndex === this.tableData.length) {
  1368. this.tableData.push(response.data.data.solution)
  1369. } else {
  1370. var swapData = this.tableData.splice(spliceIndex)
  1371. this.tableData.push(response.data.data.solution)
  1372. this.tableData = this.tableData.concat(swapData)
  1373. }
  1374. }
  1375. this.dialogFormVisible = false
  1376. return false
  1377. }
  1378. }
  1379. )
  1380. }
  1381. })
  1382. },
  1383. submitEditSolution(formName) {
  1384. this.$refs[formName].validate(valid => {
  1385. if (valid) {
  1386. let mode = '2'
  1387. if (
  1388. this.addPlan.registrars_id != this.$store.getters.xt_user.user.id
  1389. ) {
  1390. mode = '3'
  1391. }
  1392. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1393. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1394. editPatientDialysisSolution(this.patientID,this.addPlan.id,this.addPlan, mode).then(response => {
  1395. if (response.data.state == 0) {
  1396. this.$message.error(response.data.msg)
  1397. return false
  1398. } else {
  1399. this.$notify({
  1400. title: '成功',
  1401. message: '修改成功',
  1402. type: 'success',
  1403. duration: 2000
  1404. })
  1405. this.$refs[formName].resetFields()
  1406. this.dialogVisible = false
  1407. for (var dindex in response.data.data.solution) {
  1408. if (dindex == 'id') {
  1409. continue
  1410. }
  1411. this.tableData[this.current_index][dindex] =
  1412. response.data.data.solution[dindex]
  1413. }
  1414. // this.tableData[this.current_index].dialysis_duration = response.data.data.solution.dialysis_duration;
  1415. // this.tableData[this.current_index].doctor = response.data.data.solution.doctor;
  1416. // this.tableData[this.current_index].updated_time = response.data.data.solution.updated_time;
  1417. this.current_index = -1
  1418. return false
  1419. }
  1420. })
  1421. }
  1422. })
  1423. },
  1424. submitNewSolution(formName) {
  1425. this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
  1426. this.$refs[formName].validate(valid => {
  1427. if (valid) {
  1428. const mode = '1'
  1429. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1430. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1431. console.log("add",this.addPlan)
  1432. createPatientDialysisSolution(
  1433. this.patientID,
  1434. this.addPlan,
  1435. mode
  1436. ).then(response => {
  1437. if (response.data.state == 0) {
  1438. this.$message.error(response.data.msg)
  1439. return false
  1440. } else {
  1441. this.$notify({
  1442. title: '成功',
  1443. message: '创建成功',
  1444. type: 'success',
  1445. duration: 2000
  1446. })
  1447. this.$refs[formName].resetFields()
  1448. this.dialogVisible = false
  1449. this.tableData.unshift(response.data.data.solution)
  1450. if (this.tableData.length > 10) {
  1451. this.tableData.pop()
  1452. }
  1453. this.total += 1
  1454. return false
  1455. }
  1456. })
  1457. }
  1458. })
  1459. },
  1460. handleEdit(index, row) {
  1461. // console.log(index, row)
  1462. },
  1463. handleSizeChange(val) {
  1464. this.queryParams.limit = val
  1465. this.fetchPatientDialysisSolutions()
  1466. },
  1467. handleCurrentChange(val) {
  1468. this.queryParams.page = val
  1469. this.fetchPatientDialysisSolutions()
  1470. },
  1471. openEdit(index, row) {
  1472. console.log("ro2333333",row)
  1473. this.current_index = index
  1474. this.addPlan.id = row.id
  1475. this.addPlan.mode = row.mode_id
  1476. this.addPlan.mode_name = row.mode_name
  1477. this.addPlan.dialyzer = row.dialyzer ? row.dialyzer : ''
  1478. this.addPlan.dialysis_duration = '' + row.dialysis_duration
  1479. this.addPlan.dialysis_duration_hour = '' + row.dialysis_duration_hour
  1480. this.addPlan.dialysis_duration_minute = '' + row.dialysis_duration_minute
  1481. this.addPlan.hemodialysis_machine = row.hemodialysis_machine + ''
  1482. this.addPlan.perfusion_apparatus = row.perfusion_apparatus + ''
  1483. this.addPlan.max_ultrafiltration_rate = row.max_ultrafiltration_rate
  1484. if(row.blood_flow_volume!="" || row.blood_flow_volume!=undefined){
  1485. this.addPlan.blood_flow_volume = row.blood_flow_volume.toString()
  1486. }
  1487. if (row.anticoagulant == 3) {
  1488. this.addPlan.anticoagulant = '低分子肝素'
  1489. }
  1490. if (row.anticoagulant != 3) {
  1491. if(row.anticoagulant == 0){
  1492. this.addPlan.anticoagulant = ""
  1493. }else{
  1494. this.addPlan.anticoagulant = row.anticoagulant
  1495. }
  1496. }
  1497. this.addPlan.replacement_total = row.replacement_total
  1498. if(row.target_ktv!="" ||row.target_ktv!=undefined){
  1499. this.addPlan.target_ktv = row.target_ktv.toString()
  1500. }
  1501. if(row.target_ultrafiltration!="" || row.target_ultrafiltration!=undefined){
  1502. this.addPlan.target_ultrafiltration = row.target_ultrafiltration.toString()
  1503. }
  1504. this.addPlan.dialysis_duration = parseFloat(row.dialysis_duration_hour) + parseFloat((row.dialysis_duration_minute / 60).toFixed(2))
  1505. this.addPlan.dialysis_duration_hour = row.dialysis_duration_hour
  1506. this.addPlan.dialysis_duration_minute = row.dialysis_duration_minute
  1507. if(row.anticoagulant_shouji!=""|| row.anticoagulant_shouji!=undefined){
  1508. this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji.toString()
  1509. }
  1510. if(row.anticoagulant_weichi!="" || row.anticoagulant_weichi!=undefined){
  1511. this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi.toString()
  1512. }
  1513. if(row.anticoagulant_zongliang!="" || row.anticoagulant_zongliang!=undefined){
  1514. this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang.toString()
  1515. }
  1516. if(row.anticoagulant_gaimingcheng!=""||row.anticoagulant_gaimingcheng!=undefined){
  1517. this.addPlan.anticoagulant_gaimingcheng = row.anticoagulant_gaimingcheng.toString()
  1518. }
  1519. if(row.anticoagulant_gaijiliang!=""||row.anticoagulant_gaijiliang!=undefined){
  1520. this.addPlan.anticoagulant_gaijiliang = row.anticoagulant_gaijiliang.toString()
  1521. }
  1522. if(row.kalium!=""||row.kalium!=undefined){
  1523. this.addPlan.kalium = row.kalium.toString()
  1524. }
  1525. if(row.sodium!=""||row.sodium!=undefined){
  1526. this.addPlan.sodium = row.sodium.toString()
  1527. }
  1528. if(row.calcium!=""||row.calcium!=undefined){
  1529. this.addPlan.calcium = row.calcium.toString()
  1530. }
  1531. if(row.bicarbonate!=""|| row.bicarbonate!=undefined){
  1532. this.addPlan.bicarbonate = row.bicarbonate.toString()
  1533. }
  1534. if(row.glucose!=""||row.glucose!=undefined){
  1535. this.addPlan.glucose = row.glucose.toString()
  1536. }
  1537. if(row.dialysate_flow!="" || row.dialysate_flow!=undefined){
  1538. this.addPlan.dialysate_flow = row.dialysate_flow.toString()
  1539. }
  1540. if( row.dialysate_temperature!=""|| row.dialysate_temperature!=undefined){
  1541. this.addPlan.dialysate_temperature = row.dialysate_temperature.toString()
  1542. }
  1543. if(row.conductivity!="" ||row.conductivity!=undefined ){
  1544. this.addPlan.conductivity = row.conductivity.toString()
  1545. }
  1546. this.addPlan.remark = row.remark
  1547. // this.addPlan.hemodialysis_pipelines = row.hemodialysis_pipelines
  1548. // if(row.hemodialysis_pipelines_count!="" || row.hemodialysis_pipelines_count!=undefined){
  1549. // this.addPlan.hemodialysis_pipelines_count = row.hemodialysis_pipelines_count.toString()
  1550. // }
  1551. // this.addPlan.puncture_needle = row.puncture_needle
  1552. // if(row.puncture_needle_count!=null || row.puncture_needle_count!=undefined){
  1553. // this.addPlan.puncture_needle_count = row.puncture_needle_count.toString()
  1554. // }
  1555. // this.addPlan.epo = row.epo
  1556. // if(row.epo_count!="" || row.epo_count!=undefined){
  1557. // this.addPlan.epo_count = row.epo_count.toString()
  1558. // }
  1559. if(row.dialyzer_perfusion_apparatus!="" || row.dialyzer_perfusion_apparatus!=undefined){
  1560. this.addPlan.dialyzer_perfusion_apparatus = row.dialyzer_perfusion_apparatus.toString()
  1561. }
  1562. if(row.plasma_separator!="" || row.plasma_separator!=undefined){
  1563. this.addPlan.plasma_separator = row.plasma_separator.toString()
  1564. }
  1565. if(row.bilirubin_adsorption_column!="" || row.bilirubin_adsorption_column!=undefined){
  1566. this.addPlan.bilirubin_adsorption_column = row.bilirubin_adsorption_column.toString()
  1567. }
  1568. this.addPlan.dialysis_irrigation = row.dialysis_irrigation
  1569. this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
  1570. this.dialysis_irrigation = row.dialysis_irrigation
  1571. this.dialysis_dialyszers = row.dialysis_dialyszers
  1572. this.addPlan.oxygen_uptake = row.oxygen_uptake
  1573. this.addPlan.max_ultrafiltration_rate = row.max_ultrafiltration_rate
  1574. if(row.oxygen_uptake == 1){
  1575. this.oxygenShow = true
  1576. }
  1577. if(row.oxygen_uptake == 2){
  1578. this.oxygenShow = false
  1579. }
  1580. this.addPlan.oxygen_flow = row.oxygen_flow
  1581. this.addPlan.oxygen_time = row.oxygen_time
  1582. if(row.body_fluid == 0){
  1583. this.addPlan.body_fluid = ""
  1584. }else{
  1585. this.addPlan.body_fluid = row.body_fluid
  1586. }
  1587. if(row.body_fluid_other!=''|| row.body_fluid_other!=undefined){
  1588. this.addPlan.body_fluid_other = row.body_fluid_other.toString()
  1589. }
  1590. this.addPlan.special_medicine = row.special_medicine
  1591. if(row.special_medicine_other!=""||row.special_medicine_other!=undefined){
  1592. this.addPlan.special_medicine_other = row.special_medicine_other.toString()
  1593. }
  1594. this.addPlan.displace_liqui_part = row.displace_liqui_part
  1595. if(row.displace_liqui_value!=''||row.displace_liqui_value!=undefined){
  1596. this.addPlan.displace_liqui_value = row.displace_liqui_value.toString()
  1597. }
  1598. if(row.ultrafiltration!='' || row.ultrafiltration!=undefined){
  1599. this.addPlan.ultrafiltration = row.ultrafiltration.toString()
  1600. }
  1601. this.addPlan.blood_access = row.blood_access
  1602. this.addPlan.registrars_id = row.registrars_id
  1603. this.addPlan.created_time = row.created_time
  1604. this.addPlan.dialysis_irrigation = row.dialysis_irrigation
  1605. this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
  1606. this.dialysis_irrigation = row.dialysis_irrigation
  1607. this.dialysis_dialyszers = row.dialysis_dialyszers
  1608. this.dialogVisible = true
  1609. this.isEdit = true
  1610. if(row.dialysate_formulation==0){
  1611. this.addPlan.dialysate_formulation= ""
  1612. }
  1613. this.addPlan.dialysate_formulation = row.dialysate_formulation
  1614. this.dialysisTimeShow = new Date(2018,1,1,this.addPlan.dialysis_duration_hour,this.addPlan.dialysis_duration_minute)
  1615. },
  1616. isShows(name) {
  1617. var filedList = store.getters.xt_user.fileds
  1618. for (let i = 0; i < filedList.length; i++) {
  1619. if (
  1620. filedList[i].module == 1 &&
  1621. filedList[i].filed_name_cn == name &&
  1622. filedList[i].is_show == 1
  1623. ) {
  1624. return true
  1625. }
  1626. }
  1627. return false
  1628. },
  1629. openNew() {
  1630. this.current_index = -1
  1631. this.addPlan = {
  1632. mode: '',
  1633. mode_name: '',
  1634. id: 0,
  1635. type: 1,
  1636. period: '',
  1637. times: '',
  1638. initiate_mode: '',
  1639. doctor: '',
  1640. first_dialysis: '',
  1641. dialyzer: '',
  1642. dialysate_formulation: '',
  1643. hemodialysis_machine: '',
  1644. perfusion_apparatus: '',
  1645. blood_flow_volume: '',
  1646. dewater: '',
  1647. displace_liqui: 0,
  1648. replacement_way: '',
  1649. anticoagulant: '',
  1650. anticoagulant_shouji: '',
  1651. anticoagulant_weichi: '',
  1652. anticoagulant_zongliang: '',
  1653. anticoagulant_gaimingcheng: '',
  1654. anticoagulant_gaijiliang: '',
  1655. kalium: '',
  1656. replacement_total: '',
  1657. sodium: '',
  1658. calcium: '',
  1659. bicarbonate: '',
  1660. glucose: '',
  1661. dry_weight: '',
  1662. dialysate_flow: '',
  1663. dialysate_temperature: '',
  1664. conductivity: '',
  1665. remark: '',
  1666. target_ktv: '',
  1667. target_ultrafiltration: '',
  1668. dialyzer_perfusion_apparatus: '',
  1669. body_fluid: '',
  1670. body_fluid_other: '',
  1671. special_medicine: '',
  1672. special_medicine_other: '',
  1673. displace_liqui_part: '',
  1674. displace_liqui_value: '',
  1675. ultrafiltration: '',
  1676. blood_access: '',
  1677. hemodialysis_pipelines:'',
  1678. hemodialysis_pipelines_count:'',
  1679. puncture_needle:"",
  1680. puncture_needle_count:"",
  1681. epo:"",
  1682. epo_count:"",
  1683. dialysis_duration: '3.30',
  1684. dialysis_duration_hour: '3',
  1685. dialysis_duration_minute: '30',
  1686. created_time:"",
  1687. plasma_separator:"",
  1688. bilirubin_adsorption_column:"",
  1689. }
  1690. this.addPlanTypeChange()
  1691. this.dialogVisible = true
  1692. this.isEdit = false
  1693. },
  1694. openNewChild(index, row) {
  1695. this.childPlan = {
  1696. mode: row.mode_name,
  1697. frequency: row.period + row.times,
  1698. name: row.name,
  1699. parent_id: row.id,
  1700. sub_name: '',
  1701. initiate_mode: '',
  1702. doctor: ''
  1703. }
  1704. this.isChildEdit = false
  1705. this.dialogFormVisible = true
  1706. },
  1707. openChildEdit(index, row) {
  1708. this.childPlan = {
  1709. mode: row.mode_name,
  1710. frequency: row.period + row.times,
  1711. name: row.name,
  1712. parent_id: row.parent_id,
  1713. id: row.id,
  1714. sub_name: row.sub_name,
  1715. initiate_mode: row.initiate_mode,
  1716. doctor: row.doctor
  1717. }
  1718. this.current_index = index
  1719. this.isChildEdit = true
  1720. this.dialogFormVisible = true
  1721. },
  1722. fetchAllDoctorAndNurse() {
  1723. fetchAllDoctorAndNurse().then(response => {
  1724. if (response.data.state == 1) {
  1725. this.doctorOptions = response.data.data.doctors
  1726. }
  1727. })
  1728. },
  1729. fetchAllAdminUsers() {
  1730. fetchAllAdminUsers().then(response => {
  1731. if (response.data.state == 1) {
  1732. this.adminUserOptions = response.data.data.users
  1733. }
  1734. })
  1735. },
  1736. fetchPatientDialysisSolutions() {
  1737. fetchPatientDialysisSolutions(this.queryParams).then(response => {
  1738. if (response.data.state == 1) {
  1739. this.tableData = response.data.data.solutions
  1740. this.total = response.data.data.total
  1741. this.stockType = response.data.data.stockType
  1742. console.log("2333555555555",this.stockType)
  1743. if(this.stockType.length >0 ){
  1744. var arr = []
  1745. var arrTwo = []
  1746. for(let i=0;i<this.stockType.length;i++){
  1747. if(this.stockType[i].stock_attribute == 2){
  1748. arr.push(this.stockType[i])
  1749. }
  1750. if(this.stockType[i].stock_attribute == 3){
  1751. arrTwo.push(this.stockType[i])
  1752. }
  1753. }
  1754. var dialyzator = []
  1755. var irrigation = []
  1756. for(let i=0;i<arr.length;i++){
  1757. for(let j=0;j<arr[i].GoodInfo.length;j++){
  1758. dialyzator.push(arr[i].GoodInfo[j])
  1759. }
  1760. }
  1761. console.log("透析器",dialyzator)
  1762. this.dialyzers = dialyzator
  1763. for(let i=0;i<arrTwo.length;i++){
  1764. for(let j=0;j<arrTwo[i].GoodInfo.length;j++){
  1765. irrigation.push(arrTwo[i].GoodInfo[j])
  1766. }
  1767. }
  1768. console.log("灌流器",irrigation)
  1769. this.irrigations = irrigation
  1770. }
  1771. }
  1772. })
  1773. },
  1774. addPlanTypeChange() {
  1775. if (this.addPlan.type == 1) {
  1776. this.periodOptions = periodWeek
  1777. this.numOptions = numOptionsWeek
  1778. } else {
  1779. this.addPlan.type == 2
  1780. this.periodOptions = periodDay
  1781. this.numOptions = numOptionsDay
  1782. }
  1783. },
  1784. changeThisAnticoagulant() {
  1785. var thismode = parseInt(this.addPlan.anticoagulant)
  1786. if (isNaN(thismode) || thismode <= 0) {
  1787. return false
  1788. }
  1789. if (
  1790. typeof this.anticoagulantsConfit[thismode] === 'undefined' ||
  1791. this.anticoagulantsConfit[thismode] == null
  1792. ) {
  1793. return false
  1794. }
  1795. this.anticoagulant = this.anticoagulantsConfit[thismode]
  1796. },
  1797. addPlanModeChange() {
  1798. var thismode = parseInt(this.addPlan.mode)
  1799. if(thismode == 2 || thismode == 5 || thismode ==12){
  1800. this.zhiShow = true
  1801. this.huShow= true
  1802. this.totalShow = true
  1803. }else{
  1804. this.zhiShow= false
  1805. this.huShow = false
  1806. this.totalShow = false
  1807. }
  1808. if (isNaN(thismode) || thismode <= 0) {
  1809. return false
  1810. }
  1811. if (
  1812. typeof this.modeOptions[thismode] === 'undefined' ||
  1813. this.modeOptions[thismode] == null
  1814. ) {
  1815. return false
  1816. }
  1817. // this.current_model = this.modeOptions[thismode];
  1818. this.addPlan.mode_name = this.modeOptions[thismode].name
  1819. const params = {
  1820. id: thismode
  1821. }
  1822. getSystemPrescription(params).then(response => {
  1823. if (response.data.state == 1) {
  1824. var prescription = response.data.data.prescription
  1825. if(prescription.anticoagulant == 0){
  1826. prescription.anticoagulant = ""
  1827. }
  1828. if(prescription.body_fluid == 0){
  1829. prescription.body_fluid = ""
  1830. }
  1831. if (response.data.data.prescription.id > 0) {
  1832. for (const key in response.data.data.prescription) {
  1833. // 因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
  1834. this.$set(
  1835. this.addPlan,
  1836. key,
  1837. response.data.data.prescription[key].toString()
  1838. )
  1839. }
  1840. // 因为el-select特性,整数类型不能转字符串,所以额外处理这些数据
  1841. this.$set(
  1842. this.addPlan,
  1843. 'dialysate_formulation',
  1844. response.data.data.prescription['dialysate_formulation']
  1845. )
  1846. this.$set(
  1847. this.addPlan,
  1848. 'anticoagulant',
  1849. response.data.data.prescription['anticoagulant']
  1850. )
  1851. this.$set(
  1852. this.addPlan,
  1853. 'body_fluid',
  1854. response.data.data.prescription['body_fluid']
  1855. )
  1856. this.$set(
  1857. this.addPlan,
  1858. 'special_medicine',
  1859. response.data.data.prescription['special_medicine']
  1860. )
  1861. this.$set(
  1862. this.addPlan,
  1863. 'displace_liqui_part',
  1864. response.data.data.prescription['displace_liqui_part']
  1865. )
  1866. this.$set(
  1867. this.addPlan,
  1868. 'blood_access',
  1869. response.data.data.prescription['blood_access']
  1870. )
  1871. this.dialysisTimeShow = new Date(
  1872. 2018,
  1873. 1,
  1874. 1,
  1875. this.addPlan.dialysis_duration_hour,
  1876. this.addPlan.dialysis_duration_minute
  1877. )
  1878. } else {
  1879. var tempAddPlan = {
  1880. id: 0,
  1881. dialyzer: '',
  1882. dialysis_duration: '',
  1883. dialysis_duration_hour: '',
  1884. dialysis_duration_minute: '',
  1885. hemodialysis_machine: '',
  1886. dialysate_formulation: '',
  1887. perfusion_apparatus: '',
  1888. blood_flow_volume: '',
  1889. dewater: '',
  1890. displace_liqui: 0,
  1891. replacement_way: '',
  1892. anticoagulant: '',
  1893. anticoagulant_shouji: '',
  1894. anticoagulant_weichi: '',
  1895. anticoagulant_zongliang: '',
  1896. anticoagulant_gaimingcheng: '',
  1897. anticoagulant_gaijiliang: '',
  1898. kalium: '',
  1899. replacement_total: '',
  1900. sodium: '',
  1901. calcium: '',
  1902. bicarbonate: '',
  1903. glucose: '',
  1904. dry_weight: '',
  1905. dialysate_flow: '',
  1906. dialysate_temperature: '',
  1907. conductivity: '',
  1908. doctor: '',
  1909. remark: '',
  1910. target_ktv: '',
  1911. target_ultrafiltration: '',
  1912. dialyzer_perfusion_apparatus: '',
  1913. body_fluid: '',
  1914. body_fluid_other: '',
  1915. special_medicine: '',
  1916. special_medicine_other: '',
  1917. displace_liqui_part: '',
  1918. displace_liqui_value: '',
  1919. ultrafiltration: '',
  1920. blood_access: '',
  1921. plasma_separator:"",
  1922. oxygen_time:"",
  1923. oxygen_uptake:"",
  1924. oxygen_flow:"",
  1925. hemodialysis_pipelines:'',
  1926. hemodialysis_pipelines_count:'',
  1927. puncture_needle:"",
  1928. puncture_needle_count:"",
  1929. epo:"",
  1930. epo_count:"",
  1931. }
  1932. for (const key in tempAddPlan) {
  1933. this.addPlan[key] = tempAddPlan[key]
  1934. }
  1935. }
  1936. }
  1937. })
  1938. },
  1939. setCurrentMode(id) {
  1940. if (
  1941. typeof this.modeOptions[id] === 'undefined' ||
  1942. this.modeOptions[id] == null
  1943. ) {
  1944. return false
  1945. }
  1946. this.current_model = this.modeOptions[id]
  1947. },
  1948. getDoctorName(doctorid) {
  1949. var name = ''
  1950. if (this.doctorOptions == null) {
  1951. return name
  1952. }
  1953. if (typeof this.doctorOptions.length === 'undefined') {
  1954. return name
  1955. }
  1956. var leng = this.doctorOptions.length
  1957. if (leng == 0) {
  1958. return name
  1959. }
  1960. for (let index = 0; index < leng; index++) {
  1961. if (this.doctorOptions[index].id == doctorid) {
  1962. name = this.doctorOptions[index].name
  1963. break
  1964. }
  1965. }
  1966. return name
  1967. },
  1968. getAdminUserName(id) {
  1969. var name = ''
  1970. if (this.adminUserOptions == null) {
  1971. return name
  1972. }
  1973. if (typeof this.adminUserOptions.length === 'undefined') {
  1974. return name
  1975. }
  1976. var leng = this.adminUserOptions.length
  1977. if (leng == 0) {
  1978. return name
  1979. }
  1980. for (let index = 0; index < leng; index++) {
  1981. if (this.adminUserOptions[index].id == id) {
  1982. name = this.adminUserOptions[index].name
  1983. break
  1984. }
  1985. }
  1986. return name
  1987. },
  1988. changeOxygenList(val){
  1989. if(val == 1){
  1990. this.oxygenShow = true
  1991. }
  1992. if(val == 2){
  1993. this.oxygenShow = false
  1994. this.addPlan.oxygen_flow = ""
  1995. this.addPlan.oxygen_time = ""
  1996. }
  1997. },
  1998. },
  1999. created() {
  2000. const id = this.$route.params && this.$route.params.id
  2001. this.patientID = parseInt(id)
  2002. if (isNaN(this.patientID) || this.patientID <= 0) {
  2003. this.$notify.error({
  2004. title: '错误',
  2005. message: '无效的id'
  2006. })
  2007. this.$router.back(-1)
  2008. }
  2009. this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
  2010. this.punctureNeedleOptions = getDataConfig('hemodialysis', 'puncture_needle')
  2011. this.epoOptions =getDataConfig('hemodialysis', 'epo')
  2012. this.GetDeviceData()
  2013. this.fetchAllAdminUsers()
  2014. this.fetchPatientDialysisSolutions()
  2015. this.modeOptions = this.$store.getters.treatment_mode
  2016. this.anticoagulantsSet = this.$store.getters.anticoagulants_set
  2017. this.replacementWays = this.$store.getters.replacement_ways
  2018. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  2019. this.blood_filters = this.$store.getters.blood_filters
  2020. this.perfusion_apparatus = this.$store.getters.perfusion_apparatus
  2021. this.hemodialysis_machines = this.$store.getters.hemodialysis_machines
  2022. this.dialysate_formulation = getDataConfig(
  2023. 'hemodialysis',
  2024. 'dialysate_formulation'
  2025. )
  2026. this.body_fluid_option = this.$store.getters.body_fluid
  2027. this.special_medicine_option = this.$store.getters.special_medicine
  2028. this.displace_liqui_part_option = this.$store.getters.displace_liqui
  2029. this.blood_access_option = this.$store.getters.blood_access
  2030. this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
  2031. this.dialyzerPerfusionApparatus = getDataConfig(
  2032. 'hemodialysis',
  2033. 'dialyzer_perfusion_apparatus'
  2034. )
  2035. this.plasmaSeparatorList = getDataConfig('hemodialysis','plasma_separator')
  2036. this.bilirubinAdsorptionColumn = getDataConfig('hemodialysis','bilirubin_adsorption_column')
  2037. this.queryParams.id = this.patientID
  2038. // this.fetchAllDoctorAndNurse();
  2039. }
  2040. }
  2041. </script>
  2042. <style rel="stylesheet/scss" lang="scss" scoped>
  2043. .Total {
  2044. .sure {
  2045. float: right;
  2046. margin: 5px 10px 0 0;
  2047. }
  2048. .plan {
  2049. font-size: 15px;
  2050. color: #6caef7;
  2051. background: #ecf5ff;
  2052. height: 42px;
  2053. line-height: 42px;
  2054. border: 1px #ebeef5 solid;
  2055. width: 100%;
  2056. padding-left: 15px;
  2057. span {
  2058. margin: 0 20px 0 0;
  2059. }
  2060. }
  2061. }
  2062. .form-table {
  2063. border: 1px #ebeef5 solid;
  2064. padding-bottom: 20px;
  2065. .el-col-6 {
  2066. width: 380px;
  2067. }
  2068. .el-row {
  2069. margin: 0 !important;
  2070. .el-form-item {
  2071. margin-bottom: 12px;
  2072. .el-form-item__content {
  2073. .el-select {
  2074. width: 100%;
  2075. }
  2076. }
  2077. }
  2078. }
  2079. }
  2080. </style>
  2081. <style>
  2082. .el-table td,
  2083. .el-table th.is-leaf,
  2084. .el-table--border,
  2085. .el-table--group {
  2086. border-color: #d0d3da;
  2087. }
  2088. .el-table--border::after,
  2089. .el-table--group::after,
  2090. .el-table::before {
  2091. background-color: #d0d3da;
  2092. }
  2093. </style>