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

dialysisSolution.vue 75KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269
  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 == 2 || addPlan.mode == 3 || addPlan.mode == 12 || addPlan.mode == 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. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.addPlan.anticoagulant == 2 ){
  1000. this.addPlan.anticoagulant_zongliang = ""
  1001. this.addPlan.anticoagulant_zongliang = parseInt(this.addPlan.anticoagulant_shouji) + parseInt(this.addPlan.anticoagulant_weichi)
  1002. }
  1003. },
  1004. 'addPlan.anticoagulant_weichi': function() {
  1005. this.addPlan.anticoagulant_zongliang = calculateAnticoagulantZL(
  1006. 1,
  1007. this.addPlan.anticoagulant_shouji,
  1008. this.addPlan.dialysis_duration,
  1009. this.addPlan.anticoagulant_weichi
  1010. )
  1011. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.addPlan.anticoagulant == 2 ){
  1012. this.addPlan.anticoagulant_zongliang = ""
  1013. this.addPlan.anticoagulant_zongliang = parseInt(this.addPlan.anticoagulant_shouji) + parseInt(this.addPlan.anticoagulant_weichi)
  1014. }
  1015. }
  1016. },
  1017. components: {
  1018. MultiSelectBox,
  1019. tableTitle,
  1020. PatientSidebar
  1021. },
  1022. methods: {
  1023. showInnerDialog: function(val) {
  1024. this.InnerDialogProps.visibility = true
  1025. switch (val) {
  1026. case '5': // 透析器/灌流器
  1027. this.InnerDialogProps.values = this.dialyzerPerfusionApparatus
  1028. this.InnerDialogProps.titles = '透析器/灌流器'
  1029. this.InnerDialogProps.type = 'dialyzer_perfusion_apparatus'
  1030. this.InnerDialogProps.selected = this.addPlan.dialyzer_perfusion_apparatus
  1031. this.InnerDialogProps.isShowTextArea = false
  1032. break
  1033. case '6':
  1034. for(let i=0;i<this.dialyzers.length;i++){
  1035. this.dialyzers[i].name = this.dialyzers[i].specification_name
  1036. }
  1037. console.log("2222222",this.dialyzers)
  1038. this.InnerDialogProps.values = this.dialyzers
  1039. this.InnerDialogProps.titles = '透析器'
  1040. this.InnerDialogProps.type = 'dialyzers'
  1041. this.InnerDialogProps.selected = this.dialysis_dialyszers
  1042. this.InnerDialogProps.isShowTextArea = false
  1043. break
  1044. case '7':
  1045. for(let i=0;i<this.irrigations.length;i++){
  1046. this.irrigations[i].name = this.irrigations[i].specification_name
  1047. }
  1048. this.InnerDialogProps.values = this.irrigations
  1049. this.InnerDialogProps.titles = '灌流器'
  1050. this.InnerDialogProps.type = 'irrigations'
  1051. this.InnerDialogProps.selected = this.dialysis_irrigation
  1052. this.InnerDialogProps.isShowTextArea = false
  1053. break
  1054. case '8':
  1055. this.InnerDialogProps.values = this.plasmaSeparatorList
  1056. this.InnerDialogProps.titles = '血浆分离器'
  1057. this.InnerDialogProps.type = 'plasma_separator'
  1058. this.InnerDialogProps.selected = this.addPlan.plasma_separator
  1059. this.InnerDialogProps.isShowTextArea = false
  1060. break
  1061. case '9':
  1062. this.InnerDialogProps.values = this.bilirubinAdsorptionColumn
  1063. this.InnerDialogProps.titles = '胆红素吸附柱'
  1064. this.InnerDialogProps.type = 'bilirubin_adsorption_column'
  1065. this.InnerDialogProps.selected = this.addPlan.bilirubin_adsorption_column
  1066. this.InnerDialogProps.isShowTextArea = false
  1067. break
  1068. case '10':
  1069. this.InnerDialogProps.values = this.punctureNeedleOptions
  1070. this.InnerDialogProps.titles = '穿刺针'
  1071. this.InnerDialogProps.type = 'puncture_needle'
  1072. this.InnerDialogProps.selected = this.addPlan.puncture_needle
  1073. this.InnerDialogProps.isShowTextArea = false
  1074. break
  1075. }
  1076. },
  1077. innerDialogComfirm: function(val) {
  1078. console.log("value",val)
  1079. this.InnerDialogProps.visibility = false
  1080. switch (val.type) {
  1081. case 'dialyzer_perfusion_apparatus':
  1082. this.addPlan.dialyzer_perfusion_apparatus = val.value.join(',')
  1083. break
  1084. case 'dialyzers':
  1085. this.dialysis_dialyszers = val.value.join(',')
  1086. break
  1087. case 'irrigations':
  1088. this.dialysis_irrigation = val.value.join(',')
  1089. break
  1090. case 'plasma_separator':
  1091. this.addPlan.plasma_separator = val.value.join(',')
  1092. break
  1093. case 'bilirubin_adsorption_column':
  1094. this.addPlan.bilirubin_adsorption_column = val.value.join(',')
  1095. break
  1096. case 'puncture_needle':
  1097. this.addPlan.puncture_needle = val.value.join(',')
  1098. break
  1099. }
  1100. },
  1101. innerDialogCancle: function() {
  1102. this.InnerDialogProps.visibility = false
  1103. },
  1104. changeBodyFluid: function() {},
  1105. GetDeviceData: function() {
  1106. const params = {}
  1107. GetDeviceInfo(params).then(response => {
  1108. this.deviceList = response.data.data.device
  1109. })
  1110. },
  1111. selectnDialysisTime(val) {
  1112. var valTime = val.split(':')
  1113. this.addPlan.dialysis_duration = parseFloat(valTime[0]) + parseFloat((valTime[1] / 60).toFixed(2))
  1114. console.log("透析时长",this.addPlan.dialysis_duration)
  1115. this.addPlan.dialysis_duration_hour = valTime[0]
  1116. this.addPlan.dialysis_duration_minute = valTime[1]
  1117. },
  1118. tableCurrentChange(current) {
  1119. if (typeof current === 'undefined' || current == null) {
  1120. this.current_solution = {
  1121. id: 0,
  1122. name: '',
  1123. sub_name: '',
  1124. period: '',
  1125. times: '',
  1126. doctor: 0
  1127. }
  1128. this.solution_detail = {
  1129. id: 0,
  1130. affirm_state: 0,
  1131. dialysis_duration: '',
  1132. replacement_way: '',
  1133. mode_id: '',
  1134. blood_flow_volume: '',
  1135. hemodialysis_machine: '',
  1136. blood_filter: '',
  1137. perfusion_apparatus: '',
  1138. dialysate_flow: '',
  1139. kalium: '',
  1140. replacement_total: '',
  1141. sodium: '',
  1142. calcium: '',
  1143. bicarbonate: '',
  1144. anticoagulant: '',
  1145. anticoagulant_shouji: '',
  1146. anticoagulant_weichi: '',
  1147. anticoagulant_zongliang: '',
  1148. anticoagulant_gaimingcheng: '',
  1149. anticoagulant_gaijiliang: ''
  1150. }
  1151. return
  1152. }
  1153. this.current_solution = current
  1154. this.setCurrentMode(current.mode_id)
  1155. this.solution_detail = {
  1156. id: this.current_solution.id,
  1157. affirm_state: this.current_solution.affirm_state,
  1158. dialysis_duration:
  1159. this.current_solution.dialysis_duration != 0
  1160. ? this.current_solution.dialysis_duration
  1161. : '',
  1162. replacement_way:
  1163. this.current_solution.replacement_way != 0
  1164. ? this.current_solution.replacement_way
  1165. : '',
  1166. replacement_total:
  1167. this.current_solution.replacement_total != 0
  1168. ? this.current_solution.replacement_total
  1169. : '',
  1170. mode_id: this.current_solution.mode_id,
  1171. blood_flow_volume:
  1172. this.current_solution.blood_flow_volume != 0
  1173. ? this.current_solution.blood_flow_volume
  1174. : '',
  1175. hemodialysis_machine:
  1176. this.current_solution.hemodialysis_machine != 0
  1177. ? this.current_solution.hemodialysis_machine
  1178. : '',
  1179. blood_filter:
  1180. this.current_solution.blood_filter != 0
  1181. ? this.current_solution.blood_filter
  1182. : '',
  1183. perfusion_apparatus:
  1184. this.current_solution.perfusion_apparatus != 0
  1185. ? this.current_solution.perfusion_apparatus
  1186. : '',
  1187. dialysate_flow:
  1188. this.current_solution.dialysate_flow != 0
  1189. ? this.current_solution.dialysate_flow
  1190. : '',
  1191. kalium:
  1192. this.current_solution.kalium != 0 ? this.current_solution.kalium : '',
  1193. sodium:
  1194. this.current_solution.sodium != 0 ? this.current_solution.sodium : '',
  1195. calcium:
  1196. this.current_solution.calcium != 0
  1197. ? this.current_solution.calcium
  1198. : '',
  1199. bicarbonate:
  1200. this.current_solution.bicarbonate != 0
  1201. ? this.current_solution.bicarbonate
  1202. : '',
  1203. anticoagulant:
  1204. this.current_solution.anticoagulant != 0
  1205. ? this.current_solution.anticoagulant
  1206. : '',
  1207. anticoagulant_shouji:
  1208. this.current_solution.anticoagulant_shouji != 0
  1209. ? this.current_solution.anticoagulant_shouji
  1210. : '',
  1211. anticoagulant_weichi:
  1212. this.current_solution.anticoagulant_weichi != 0
  1213. ? this.current_solution.anticoagulant_weichi
  1214. : '',
  1215. anticoagulant_zongliang:
  1216. this.current_solution.anticoagulant_zongliang != 0
  1217. ? this.current_solution.anticoagulant_zongliang
  1218. : ''
  1219. }
  1220. },
  1221. handleDelete(index, row) {
  1222. if (row.use_state == 1) {
  1223. this.$message.error('方案已被使用,不能删除')
  1224. return false
  1225. }
  1226. this.$confirm('确定删除' + row.name + row.sub_name + '方案吗?', '提示', {
  1227. confirmButtonText: '确定',
  1228. cancelButtonText: '取消',
  1229. type: 'warning'
  1230. }).then(() => {
  1231. deleteDialysisSolution(row.id).then(response => {
  1232. if (response.data.state == 0) {
  1233. this.$message.error(response.data.msg)
  1234. return false
  1235. } else {
  1236. this.$notify({
  1237. title: '成功',
  1238. message: '删除成功',
  1239. type: 'success',
  1240. duration: 2000
  1241. })
  1242. this.tableData.splice(index, 1)
  1243. // if (row.parent_id>0) {
  1244. // this.tableData.splice(index,1);
  1245. // }else {
  1246. // var resetTableData = this.tableData;
  1247. // this.tableData = [];
  1248. // var that = this;
  1249. // resetTableData.forEach(function(item, itemindex){
  1250. // if (item.id != row.id && item.parent_id != row.id) {
  1251. // that.tableData.push(item);
  1252. // }
  1253. // });
  1254. // }
  1255. }
  1256. })
  1257. })
  1258. },
  1259. submitSolution(formName) {
  1260. editDialysisSolutionDetail(
  1261. this.patientID,
  1262. this.solution_detail.id,
  1263. this.solution_detail
  1264. ).then(response => {
  1265. if (response.data.state == 0) {
  1266. this.$message.error(response.data.msg)
  1267. return false
  1268. } else {
  1269. this.$notify({
  1270. title: '成功',
  1271. message: '修改成功',
  1272. type: 'success',
  1273. duration: 2000
  1274. })
  1275. var thisSolution = response.data.data.solution
  1276. var spliceIndex = -1
  1277. for (let index = this.tableData.length - 1; ; index--) {
  1278. if (this.tableData[index].id === thisSolution.id) {
  1279. spliceIndex = index
  1280. break
  1281. }
  1282. }
  1283. if (spliceIndex > -1) {
  1284. var newIndex = spliceIndex + 1
  1285. if (newIndex === this.tableData.length) {
  1286. this.tableData.pop()
  1287. this.tableData.push(thisSolution)
  1288. } else {
  1289. var swapData = this.tableData.splice(newIndex)
  1290. this.tableData.pop()
  1291. this.tableData.push(thisSolution)
  1292. this.tableData = this.tableData.concat(swapData)
  1293. }
  1294. }
  1295. this.solution_detail.affirm_state = thisSolution.affirm_state
  1296. this.$refs.solutionTable.setCurrentRow(this.tableData[spliceIndex])
  1297. }
  1298. })
  1299. },
  1300. submitEditChildSolution(formName) {
  1301. this.$refs[formName].validate(valid => {
  1302. if (valid) {
  1303. var editData = {
  1304. initiate_mode: this.childPlan.initiate_mode,
  1305. doctor: this.childPlan.doctor
  1306. }
  1307. editChildPatientDialysisSolution(
  1308. this.patientID,
  1309. this.childPlan.id,
  1310. editData
  1311. ).then(response => {
  1312. if (response.data.state == 0) {
  1313. this.$message.error(response.data.msg)
  1314. return false
  1315. } else {
  1316. this.$notify({
  1317. title: '成功',
  1318. message: '修改成功',
  1319. type: 'success',
  1320. duration: 2000
  1321. })
  1322. this.$refs[formName].resetFields()
  1323. this.dialogFormVisible = false
  1324. this.tableData[this.current_index].doctor =
  1325. response.data.data.solution.doctor
  1326. this.tableData[this.current_index].updated_time =
  1327. response.data.data.solution.updated_time
  1328. this.tableData[this.current_index].initiate_mode =
  1329. response.data.data.solution.initiate_mode
  1330. this.current_index = -1
  1331. return false
  1332. }
  1333. })
  1334. }
  1335. })
  1336. },
  1337. submitNewChildSolution(formName) {
  1338. this.$refs[formName].validate(valid => {
  1339. if (valid) {
  1340. var createData = {
  1341. parent_id: this.childPlan.parent_id,
  1342. sub_name: this.childPlan.sub_name,
  1343. initiate_mode: this.childPlan.initiate_mode,
  1344. doctor: this.childPlan.doctor
  1345. }
  1346. createChildPatientDialysisSolution(this.patientID, createData).then(
  1347. response => {
  1348. if (response.data.state == 0) {
  1349. this.$message.error(response.data.msg)
  1350. return false
  1351. } else {
  1352. this.$notify({
  1353. title: '成功',
  1354. message: '创建成功',
  1355. type: 'success',
  1356. duration: 2000
  1357. })
  1358. this.$refs[formName].resetFields()
  1359. var spliceIndex = -1
  1360. for (let index = this.tableData.length - 1; ; index--) {
  1361. if (
  1362. this.tableData[index].parent_id === createData.parent_id
  1363. ) {
  1364. spliceIndex = index
  1365. break
  1366. } else if (
  1367. this.tableData[index].id === createData.parent_id
  1368. ) {
  1369. spliceIndex = index
  1370. break
  1371. }
  1372. }
  1373. if (spliceIndex > -1) {
  1374. spliceIndex += 1
  1375. if (spliceIndex === this.tableData.length) {
  1376. this.tableData.push(response.data.data.solution)
  1377. } else {
  1378. var swapData = this.tableData.splice(spliceIndex)
  1379. this.tableData.push(response.data.data.solution)
  1380. this.tableData = this.tableData.concat(swapData)
  1381. }
  1382. }
  1383. this.dialogFormVisible = false
  1384. return false
  1385. }
  1386. }
  1387. )
  1388. }
  1389. })
  1390. },
  1391. submitEditSolution(formName) {
  1392. this.$refs[formName].validate(valid => {
  1393. if (valid) {
  1394. let mode = '2'
  1395. if (
  1396. this.addPlan.registrars_id != this.$store.getters.xt_user.user.id
  1397. ) {
  1398. mode = '3'
  1399. }
  1400. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1401. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1402. editPatientDialysisSolution(this.patientID,this.addPlan.id,this.addPlan, mode).then(response => {
  1403. if (response.data.state == 0) {
  1404. this.$message.error(response.data.msg)
  1405. return false
  1406. } else {
  1407. this.$notify({
  1408. title: '成功',
  1409. message: '修改成功',
  1410. type: 'success',
  1411. duration: 2000
  1412. })
  1413. this.$refs[formName].resetFields()
  1414. this.dialogVisible = false
  1415. for (var dindex in response.data.data.solution) {
  1416. if (dindex == 'id') {
  1417. continue
  1418. }
  1419. this.tableData[this.current_index][dindex] =
  1420. response.data.data.solution[dindex]
  1421. }
  1422. // this.tableData[this.current_index].dialysis_duration = response.data.data.solution.dialysis_duration;
  1423. // this.tableData[this.current_index].doctor = response.data.data.solution.doctor;
  1424. // this.tableData[this.current_index].updated_time = response.data.data.solution.updated_time;
  1425. this.current_index = -1
  1426. return false
  1427. }
  1428. })
  1429. }
  1430. })
  1431. },
  1432. submitNewSolution(formName) {
  1433. this.addPlan.anticoagulant_zongliang = this.addPlan.anticoagulant_zongliang.toString()
  1434. this.$refs[formName].validate(valid => {
  1435. if (valid) {
  1436. const mode = '1'
  1437. this.addPlan.dialysis_dialyszers = this.dialysis_dialyszers
  1438. this.addPlan.dialysis_irrigation = this.dialysis_irrigation
  1439. console.log("add",this.addPlan)
  1440. createPatientDialysisSolution(
  1441. this.patientID,
  1442. this.addPlan,
  1443. mode
  1444. ).then(response => {
  1445. if (response.data.state == 0) {
  1446. this.$message.error(response.data.msg)
  1447. return false
  1448. } else {
  1449. this.$notify({
  1450. title: '成功',
  1451. message: '创建成功',
  1452. type: 'success',
  1453. duration: 2000
  1454. })
  1455. this.$refs[formName].resetFields()
  1456. this.dialogVisible = false
  1457. this.tableData.unshift(response.data.data.solution)
  1458. if (this.tableData.length > 10) {
  1459. this.tableData.pop()
  1460. }
  1461. this.total += 1
  1462. return false
  1463. }
  1464. })
  1465. }
  1466. })
  1467. },
  1468. handleEdit(index, row) {
  1469. // console.log(index, row)
  1470. },
  1471. handleSizeChange(val) {
  1472. this.queryParams.limit = val
  1473. this.fetchPatientDialysisSolutions()
  1474. },
  1475. handleCurrentChange(val) {
  1476. this.queryParams.page = val
  1477. this.fetchPatientDialysisSolutions()
  1478. },
  1479. openEdit(index, row) {
  1480. console.log("ro2333333",row)
  1481. this.current_index = index
  1482. this.addPlan.id = row.id
  1483. this.addPlan.mode = row.mode_id
  1484. this.addPlan.mode_name = row.mode_name
  1485. this.addPlan.dialyzer = row.dialyzer ? row.dialyzer : ''
  1486. this.addPlan.dialysis_duration = '' + row.dialysis_duration
  1487. this.addPlan.dialysis_duration_hour = '' + row.dialysis_duration_hour
  1488. this.addPlan.dialysis_duration_minute = '' + row.dialysis_duration_minute
  1489. this.addPlan.hemodialysis_machine = row.hemodialysis_machine + ''
  1490. this.addPlan.perfusion_apparatus = row.perfusion_apparatus + ''
  1491. this.addPlan.max_ultrafiltration_rate = row.max_ultrafiltration_rate
  1492. this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang
  1493. this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji
  1494. this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi
  1495. // this.addPlan.oxygen_uptake = row.oxygen_uptake
  1496. // this.addPlan.hemodialysis_pipelines = row.hemodialysis_pipelines
  1497. // this.addPlan.hemodialysis_pipelines_count = row.hemodialysis_pipelines_count
  1498. // this.addPlan.puncture_needle = row.puncture_needle
  1499. // this.addPlan.puncture_needle_count = row.puncture_needle_count
  1500. // this.addPlan.epo = row.epo
  1501. // this.addPlan.epo_count = row.epo_count
  1502. if(row.blood_flow_volume!="" || row.blood_flow_volume!=undefined){
  1503. this.addPlan.blood_flow_volume = row.blood_flow_volume.toString()
  1504. }
  1505. if (row.anticoagulant == 3) {
  1506. this.addPlan.anticoagulant = '低分子肝素'
  1507. }
  1508. if (row.anticoagulant != 3) {
  1509. if(row.anticoagulant == 0){
  1510. this.addPlan.anticoagulant = ""
  1511. }else{
  1512. this.addPlan.anticoagulant = row.anticoagulant
  1513. }
  1514. }
  1515. this.addPlan.replacement_total = row.replacement_total
  1516. if(row.target_ktv!="" ||row.target_ktv!=undefined){
  1517. this.addPlan.target_ktv = row.target_ktv.toString()
  1518. }
  1519. if(row.target_ultrafiltration!="" || row.target_ultrafiltration!=undefined){
  1520. this.addPlan.target_ultrafiltration = row.target_ultrafiltration.toString()
  1521. }
  1522. this.addPlan.dialysis_duration = parseFloat(row.dialysis_duration_hour) + parseFloat((row.dialysis_duration_minute / 60).toFixed(2))
  1523. this.addPlan.dialysis_duration_hour = row.dialysis_duration_hour
  1524. this.addPlan.dialysis_duration_minute = row.dialysis_duration_minute
  1525. if(row.anticoagulant_shouji!=""|| row.anticoagulant_shouji!=undefined){
  1526. this.addPlan.anticoagulant_shouji = row.anticoagulant_shouji.toString()
  1527. }
  1528. if(row.anticoagulant_weichi!="" || row.anticoagulant_weichi!=undefined){
  1529. this.addPlan.anticoagulant_weichi = row.anticoagulant_weichi.toString()
  1530. }
  1531. if(row.anticoagulant_zongliang!="" || row.anticoagulant_zongliang!=undefined){
  1532. this.addPlan.anticoagulant_zongliang = row.anticoagulant_zongliang.toString()
  1533. }
  1534. if(row.anticoagulant_gaimingcheng!=""||row.anticoagulant_gaimingcheng!=undefined){
  1535. this.addPlan.anticoagulant_gaimingcheng = row.anticoagulant_gaimingcheng.toString()
  1536. }
  1537. if(row.anticoagulant_gaijiliang!=""||row.anticoagulant_gaijiliang!=undefined){
  1538. this.addPlan.anticoagulant_gaijiliang = row.anticoagulant_gaijiliang.toString()
  1539. }
  1540. if(row.kalium!=""||row.kalium!=undefined){
  1541. this.addPlan.kalium = row.kalium.toString()
  1542. }
  1543. if(row.sodium!=""||row.sodium!=undefined){
  1544. this.addPlan.sodium = row.sodium.toString()
  1545. }
  1546. if(row.calcium!=""||row.calcium!=undefined){
  1547. this.addPlan.calcium = row.calcium.toString()
  1548. }
  1549. if(row.bicarbonate!=""|| row.bicarbonate!=undefined){
  1550. this.addPlan.bicarbonate = row.bicarbonate.toString()
  1551. }
  1552. if(row.glucose!=""||row.glucose!=undefined){
  1553. this.addPlan.glucose = row.glucose.toString()
  1554. }
  1555. if(row.dialysate_flow!="" || row.dialysate_flow!=undefined){
  1556. this.addPlan.dialysate_flow = row.dialysate_flow.toString()
  1557. }
  1558. if( row.dialysate_temperature!=""|| row.dialysate_temperature!=undefined){
  1559. this.addPlan.dialysate_temperature = row.dialysate_temperature.toString()
  1560. }
  1561. if(row.conductivity!="" ||row.conductivity!=undefined ){
  1562. this.addPlan.conductivity = row.conductivity.toString()
  1563. }
  1564. this.addPlan.remark = row.remark
  1565. this.addPlan.hemodialysis_pipelines = row.hemodialysis_pipelines
  1566. if(row.hemodialysis_pipelines_count!="" || row.hemodialysis_pipelines_count!=undefined){
  1567. this.addPlan.hemodialysis_pipelines_count = row.hemodialysis_pipelines_count.toString()
  1568. }
  1569. this.addPlan.puncture_needle = row.puncture_needle
  1570. if(row.puncture_needle_count!=null || row.puncture_needle_count!=undefined){
  1571. this.addPlan.puncture_needle_count = row.puncture_needle_count.toString()
  1572. }
  1573. this.addPlan.epo = row.epo
  1574. if(row.epo_count!="" || row.epo_count!=undefined){
  1575. this.addPlan.epo_count = row.epo_count.toString()
  1576. }
  1577. if(row.dialyzer_perfusion_apparatus!="" || row.dialyzer_perfusion_apparatus!=undefined){
  1578. this.addPlan.dialyzer_perfusion_apparatus = row.dialyzer_perfusion_apparatus.toString()
  1579. }
  1580. if(row.plasma_separator!="" || row.plasma_separator!=undefined){
  1581. this.addPlan.plasma_separator = row.plasma_separator.toString()
  1582. }
  1583. if(row.bilirubin_adsorption_column!="" || row.bilirubin_adsorption_column!=undefined){
  1584. this.addPlan.bilirubin_adsorption_column = row.bilirubin_adsorption_column.toString()
  1585. }
  1586. this.addPlan.dialysis_irrigation = row.dialysis_irrigation
  1587. this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
  1588. this.dialysis_irrigation = row.dialysis_irrigation
  1589. this.dialysis_dialyszers = row.dialysis_dialyszers
  1590. this.addPlan.oxygen_uptake = row.oxygen_uptake
  1591. this.addPlan.max_ultrafiltration_rate = row.max_ultrafiltration_rate
  1592. this.addPlan.oxygen_flow = row.oxygen_flow
  1593. this.addPlan.oxygen_time = row.oxygen_time
  1594. if(row.oxygen_uptake == 1){
  1595. this.oxygenShow = true
  1596. }
  1597. if(row.oxygen_uptake == 2){
  1598. this.oxygenShow = false
  1599. }
  1600. this.addPlan.oxygen_flow = row.oxygen_flow
  1601. this.addPlan.oxygen_time = row.oxygen_time
  1602. if(row.body_fluid == 0){
  1603. this.addPlan.body_fluid = ""
  1604. }else{
  1605. this.addPlan.body_fluid = row.body_fluid
  1606. }
  1607. if(row.body_fluid_other!=''|| row.body_fluid_other!=undefined){
  1608. this.addPlan.body_fluid_other = row.body_fluid_other.toString()
  1609. }
  1610. this.addPlan.special_medicine = row.special_medicine
  1611. if(row.special_medicine_other!=""||row.special_medicine_other!=undefined){
  1612. this.addPlan.special_medicine_other = row.special_medicine_other.toString()
  1613. }
  1614. this.addPlan.displace_liqui_part = row.displace_liqui_part
  1615. if(row.displace_liqui_value!=''||row.displace_liqui_value!=undefined){
  1616. this.addPlan.displace_liqui_value = row.displace_liqui_value.toString()
  1617. }
  1618. if(row.ultrafiltration!='' || row.ultrafiltration!=undefined){
  1619. this.addPlan.ultrafiltration = row.ultrafiltration.toString()
  1620. }
  1621. this.addPlan.blood_access = row.blood_access
  1622. this.addPlan.registrars_id = row.registrars_id
  1623. this.addPlan.created_time = row.created_time
  1624. this.addPlan.dialysis_irrigation = row.dialysis_irrigation
  1625. this.addPlan.dialysis_dialyszers = row.dialysis_dialyszers
  1626. this.dialysis_irrigation = row.dialysis_irrigation
  1627. this.dialysis_dialyszers = row.dialysis_dialyszers
  1628. this.dialogVisible = true
  1629. this.isEdit = true
  1630. if(row.dialysate_formulation==0){
  1631. this.addPlan.dialysate_formulation= ""
  1632. }
  1633. this.addPlan.dialysate_formulation = row.dialysate_formulation
  1634. this.dialysisTimeShow = new Date(2018,1,1,this.addPlan.dialysis_duration_hour,this.addPlan.dialysis_duration_minute)
  1635. },
  1636. isShows(name) {
  1637. var filedList = store.getters.xt_user.fileds
  1638. for (let i = 0; i < filedList.length; i++) {
  1639. if (
  1640. filedList[i].module == 1 &&
  1641. filedList[i].filed_name_cn == name &&
  1642. filedList[i].is_show == 1
  1643. ) {
  1644. return true
  1645. }
  1646. }
  1647. return false
  1648. },
  1649. openNew() {
  1650. this.current_index = -1
  1651. this.addPlan = {
  1652. mode: '',
  1653. mode_name: '',
  1654. id: 0,
  1655. type: 1,
  1656. period: '',
  1657. times: '',
  1658. initiate_mode: '',
  1659. doctor: '',
  1660. first_dialysis: '',
  1661. dialyzer: '',
  1662. dialysate_formulation: '',
  1663. hemodialysis_machine: '',
  1664. perfusion_apparatus: '',
  1665. blood_flow_volume: '',
  1666. dewater: '',
  1667. displace_liqui: 0,
  1668. replacement_way: '',
  1669. anticoagulant: '',
  1670. anticoagulant_shouji: '',
  1671. anticoagulant_weichi: '',
  1672. anticoagulant_zongliang: '',
  1673. anticoagulant_gaimingcheng: '',
  1674. anticoagulant_gaijiliang: '',
  1675. kalium: '',
  1676. replacement_total: '',
  1677. sodium: '',
  1678. calcium: '',
  1679. bicarbonate: '',
  1680. glucose: '',
  1681. dry_weight: '',
  1682. dialysate_flow: '',
  1683. dialysate_temperature: '',
  1684. conductivity: '',
  1685. remark: '',
  1686. target_ktv: '',
  1687. target_ultrafiltration: '',
  1688. dialyzer_perfusion_apparatus: '',
  1689. body_fluid: '',
  1690. body_fluid_other: '',
  1691. special_medicine: '',
  1692. special_medicine_other: '',
  1693. displace_liqui_part: '',
  1694. displace_liqui_value: '',
  1695. ultrafiltration: '',
  1696. blood_access: '',
  1697. hemodialysis_pipelines:'',
  1698. hemodialysis_pipelines_count:'',
  1699. puncture_needle:"",
  1700. puncture_needle_count:"",
  1701. epo:"",
  1702. epo_count:"",
  1703. dialysis_duration: '3.30',
  1704. dialysis_duration_hour: '3',
  1705. dialysis_duration_minute: '30',
  1706. created_time:"",
  1707. plasma_separator:"",
  1708. bilirubin_adsorption_column:"",
  1709. }
  1710. this.addPlanTypeChange()
  1711. this.dialogVisible = true
  1712. this.isEdit = false
  1713. },
  1714. openNewChild(index, row) {
  1715. this.childPlan = {
  1716. mode: row.mode_name,
  1717. frequency: row.period + row.times,
  1718. name: row.name,
  1719. parent_id: row.id,
  1720. sub_name: '',
  1721. initiate_mode: '',
  1722. doctor: ''
  1723. }
  1724. this.isChildEdit = false
  1725. this.dialogFormVisible = true
  1726. },
  1727. openChildEdit(index, row) {
  1728. this.childPlan = {
  1729. mode: row.mode_name,
  1730. frequency: row.period + row.times,
  1731. name: row.name,
  1732. parent_id: row.parent_id,
  1733. id: row.id,
  1734. sub_name: row.sub_name,
  1735. initiate_mode: row.initiate_mode,
  1736. doctor: row.doctor
  1737. }
  1738. this.current_index = index
  1739. this.isChildEdit = true
  1740. this.dialogFormVisible = true
  1741. },
  1742. fetchAllDoctorAndNurse() {
  1743. fetchAllDoctorAndNurse().then(response => {
  1744. if (response.data.state == 1) {
  1745. this.doctorOptions = response.data.data.doctors
  1746. }
  1747. })
  1748. },
  1749. fetchAllAdminUsers() {
  1750. fetchAllAdminUsers().then(response => {
  1751. if (response.data.state == 1) {
  1752. this.adminUserOptions = response.data.data.users
  1753. }
  1754. })
  1755. },
  1756. fetchPatientDialysisSolutions() {
  1757. fetchPatientDialysisSolutions(this.queryParams).then(response => {
  1758. if (response.data.state == 1) {
  1759. this.tableData = response.data.data.solutions
  1760. this.total = response.data.data.total
  1761. this.stockType = response.data.data.stockType
  1762. console.log("2333555555555",this.stockType)
  1763. if(this.stockType.length >0 ){
  1764. var arr = []
  1765. var arrTwo = []
  1766. for(let i=0;i<this.stockType.length;i++){
  1767. if(this.stockType[i].stock_attribute == 2){
  1768. arr.push(this.stockType[i])
  1769. }
  1770. if(this.stockType[i].stock_attribute == 3){
  1771. arrTwo.push(this.stockType[i])
  1772. }
  1773. }
  1774. var dialyzator = []
  1775. var irrigation = []
  1776. for(let i=0;i<arr.length;i++){
  1777. for(let j=0;j<arr[i].GoodInfo.length;j++){
  1778. dialyzator.push(arr[i].GoodInfo[j])
  1779. }
  1780. }
  1781. console.log("透析器",dialyzator)
  1782. this.dialyzers = dialyzator
  1783. for(let i=0;i<arrTwo.length;i++){
  1784. for(let j=0;j<arrTwo[i].GoodInfo.length;j++){
  1785. irrigation.push(arrTwo[i].GoodInfo[j])
  1786. }
  1787. }
  1788. console.log("灌流器",irrigation)
  1789. this.irrigations = irrigation
  1790. }
  1791. }
  1792. })
  1793. },
  1794. addPlanTypeChange() {
  1795. if (this.addPlan.type == 1) {
  1796. this.periodOptions = periodWeek
  1797. this.numOptions = numOptionsWeek
  1798. } else {
  1799. this.addPlan.type == 2
  1800. this.periodOptions = periodDay
  1801. this.numOptions = numOptionsDay
  1802. }
  1803. },
  1804. changeThisAnticoagulant() {
  1805. var thismode = parseInt(this.addPlan.anticoagulant)
  1806. if (isNaN(thismode) || thismode <= 0) {
  1807. return false
  1808. }
  1809. if (
  1810. typeof this.anticoagulantsConfit[thismode] === 'undefined' ||
  1811. this.anticoagulantsConfit[thismode] == null
  1812. ) {
  1813. return false
  1814. }
  1815. this.anticoagulant = this.anticoagulantsConfit[thismode]
  1816. if(this.$store.getters.xt_user.template_info.template_id == 41 && this.addPlan.anticoagulant == 2 ){
  1817. this.addPlan.anticoagulant_zongliang = ""
  1818. this.addPlan.anticoagulant_zongliang = parseInt(this.addPlan.anticoagulant_shouji) + parseInt(this.addPlan.anticoagulant_weichi)
  1819. }
  1820. },
  1821. addPlanModeChange() {
  1822. var thismode = parseInt(this.addPlan.mode)
  1823. console.log("addplan22323",this.addPlan.mode)
  1824. if(thismode == 2 || thismode == 5 || thismode ==12){
  1825. this.zhiShow = true
  1826. this.huShow= true
  1827. this.totalShow = true
  1828. }else{
  1829. this.zhiShow= false
  1830. this.huShow = false
  1831. this.totalShow = false
  1832. }
  1833. if (isNaN(thismode) || thismode <= 0) {
  1834. return false
  1835. }
  1836. if (
  1837. typeof this.modeOptions[thismode] === 'undefined' ||
  1838. this.modeOptions[thismode] == null
  1839. ) {
  1840. return false
  1841. }
  1842. // this.current_model = this.modeOptions[thismode];
  1843. this.addPlan.mode_name = this.modeOptions[thismode].name
  1844. const params = {
  1845. id: thismode
  1846. }
  1847. getSystemPrescription(params).then(response => {
  1848. if (response.data.state == 1) {
  1849. var prescription = response.data.data.prescription
  1850. if(prescription.anticoagulant == 0){
  1851. prescription.anticoagulant = ""
  1852. }
  1853. if(prescription.body_fluid == 0){
  1854. prescription.body_fluid = ""
  1855. }
  1856. if (response.data.data.prescription.id > 0) {
  1857. for (const key in response.data.data.prescription) {
  1858. // 因为el-input特性整数类型或者浮点数类型需要转换成字符串,所以加上toString()
  1859. this.$set(
  1860. this.addPlan,
  1861. key,
  1862. response.data.data.prescription[key].toString()
  1863. )
  1864. }
  1865. // 因为el-select特性,整数类型不能转字符串,所以额外处理这些数据
  1866. this.$set(
  1867. this.addPlan,
  1868. 'dialysate_formulation',
  1869. response.data.data.prescription['dialysate_formulation']
  1870. )
  1871. this.$set(
  1872. this.addPlan,
  1873. 'anticoagulant',
  1874. response.data.data.prescription['anticoagulant']
  1875. )
  1876. this.$set(
  1877. this.addPlan,
  1878. 'body_fluid',
  1879. response.data.data.prescription['body_fluid']
  1880. )
  1881. this.$set(
  1882. this.addPlan,
  1883. 'special_medicine',
  1884. response.data.data.prescription['special_medicine']
  1885. )
  1886. this.$set(
  1887. this.addPlan,
  1888. 'displace_liqui_part',
  1889. response.data.data.prescription['displace_liqui_part']
  1890. )
  1891. this.$set(
  1892. this.addPlan,
  1893. 'blood_access',
  1894. response.data.data.prescription['blood_access']
  1895. )
  1896. this.dialysisTimeShow = new Date(
  1897. 2018,
  1898. 1,
  1899. 1,
  1900. this.addPlan.dialysis_duration_hour,
  1901. this.addPlan.dialysis_duration_minute
  1902. )
  1903. } else {
  1904. var tempAddPlan = {
  1905. id: 0,
  1906. dialyzer: '',
  1907. dialysis_duration: '',
  1908. dialysis_duration_hour: '',
  1909. dialysis_duration_minute: '',
  1910. hemodialysis_machine: '',
  1911. dialysate_formulation: '',
  1912. perfusion_apparatus: '',
  1913. blood_flow_volume: '',
  1914. dewater: '',
  1915. displace_liqui: 0,
  1916. replacement_way: '',
  1917. anticoagulant: '',
  1918. anticoagulant_shouji: '',
  1919. anticoagulant_weichi: '',
  1920. anticoagulant_zongliang: '',
  1921. anticoagulant_gaimingcheng: '',
  1922. anticoagulant_gaijiliang: '',
  1923. kalium: '',
  1924. replacement_total: '',
  1925. sodium: '',
  1926. calcium: '',
  1927. bicarbonate: '',
  1928. glucose: '',
  1929. dry_weight: '',
  1930. dialysate_flow: '',
  1931. dialysate_temperature: '',
  1932. conductivity: '',
  1933. doctor: '',
  1934. remark: '',
  1935. target_ktv: '',
  1936. target_ultrafiltration: '',
  1937. dialyzer_perfusion_apparatus: '',
  1938. body_fluid: '',
  1939. body_fluid_other: '',
  1940. special_medicine: '',
  1941. special_medicine_other: '',
  1942. displace_liqui_part: '',
  1943. displace_liqui_value: '',
  1944. ultrafiltration: '',
  1945. blood_access: '',
  1946. plasma_separator:"",
  1947. oxygen_time:"",
  1948. oxygen_uptake:"",
  1949. oxygen_flow:"",
  1950. hemodialysis_pipelines:'',
  1951. hemodialysis_pipelines_count:'',
  1952. puncture_needle:"",
  1953. puncture_needle_count:"",
  1954. epo:"",
  1955. epo_count:"",
  1956. }
  1957. for (const key in tempAddPlan) {
  1958. this.addPlan[key] = tempAddPlan[key]
  1959. }
  1960. }
  1961. }
  1962. })
  1963. },
  1964. setCurrentMode(id) {
  1965. if (
  1966. typeof this.modeOptions[id] === 'undefined' ||
  1967. this.modeOptions[id] == null
  1968. ) {
  1969. return false
  1970. }
  1971. this.current_model = this.modeOptions[id]
  1972. },
  1973. getDoctorName(doctorid) {
  1974. var name = ''
  1975. if (this.doctorOptions == null) {
  1976. return name
  1977. }
  1978. if (typeof this.doctorOptions.length === 'undefined') {
  1979. return name
  1980. }
  1981. var leng = this.doctorOptions.length
  1982. if (leng == 0) {
  1983. return name
  1984. }
  1985. for (let index = 0; index < leng; index++) {
  1986. if (this.doctorOptions[index].id == doctorid) {
  1987. name = this.doctorOptions[index].name
  1988. break
  1989. }
  1990. }
  1991. return name
  1992. },
  1993. getAdminUserName(id) {
  1994. var name = ''
  1995. if (this.adminUserOptions == null) {
  1996. return name
  1997. }
  1998. if (typeof this.adminUserOptions.length === 'undefined') {
  1999. return name
  2000. }
  2001. var leng = this.adminUserOptions.length
  2002. if (leng == 0) {
  2003. return name
  2004. }
  2005. for (let index = 0; index < leng; index++) {
  2006. if (this.adminUserOptions[index].id == id) {
  2007. name = this.adminUserOptions[index].name
  2008. break
  2009. }
  2010. }
  2011. return name
  2012. },
  2013. changeOxygenList(val){
  2014. if(val == 1){
  2015. this.oxygenShow = true
  2016. }
  2017. if(val == 2){
  2018. this.oxygenShow = false
  2019. this.addPlan.oxygen_flow = ""
  2020. this.addPlan.oxygen_time = ""
  2021. }
  2022. },
  2023. },
  2024. created() {
  2025. const id = this.$route.params && this.$route.params.id
  2026. this.patientID = parseInt(id)
  2027. if (isNaN(this.patientID) || this.patientID <= 0) {
  2028. this.$notify.error({
  2029. title: '错误',
  2030. message: '无效的id'
  2031. })
  2032. this.$router.back(-1)
  2033. }
  2034. this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
  2035. this.punctureNeedleOptions = getDataConfig('hemodialysis', 'puncture_needle')
  2036. this.epoOptions =getDataConfig('hemodialysis', 'epo')
  2037. this.GetDeviceData()
  2038. this.fetchAllAdminUsers()
  2039. this.fetchPatientDialysisSolutions()
  2040. this.modeOptions = this.$store.getters.treatment_mode
  2041. this.anticoagulantsSet = this.$store.getters.anticoagulants_set
  2042. this.replacementWays = this.$store.getters.replacement_ways
  2043. this.anticoagulantsConfit = this.$store.getters.anticoagulants_confit
  2044. this.blood_filters = this.$store.getters.blood_filters
  2045. this.perfusion_apparatus = this.$store.getters.perfusion_apparatus
  2046. this.hemodialysis_machines = this.$store.getters.hemodialysis_machines
  2047. this.dialysate_formulation = getDataConfig(
  2048. 'hemodialysis',
  2049. 'dialysate_formulation'
  2050. )
  2051. this.body_fluid_option = this.$store.getters.body_fluid
  2052. this.special_medicine_option = this.$store.getters.special_medicine
  2053. this.displace_liqui_part_option = this.$store.getters.displace_liqui
  2054. this.blood_access_option = this.$store.getters.blood_access
  2055. this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
  2056. this.dialyzerPerfusionApparatus = getDataConfig(
  2057. 'hemodialysis',
  2058. 'dialyzer_perfusion_apparatus'
  2059. )
  2060. this.plasmaSeparatorList = getDataConfig('hemodialysis','plasma_separator')
  2061. this.bilirubinAdsorptionColumn = getDataConfig('hemodialysis','bilirubin_adsorption_column')
  2062. this.queryParams.id = this.patientID
  2063. // this.fetchAllDoctorAndNurse();
  2064. }
  2065. }
  2066. </script>
  2067. <style rel="stylesheet/scss" lang="scss" scoped>
  2068. .Total {
  2069. .sure {
  2070. float: right;
  2071. margin: 5px 10px 0 0;
  2072. }
  2073. .plan {
  2074. font-size: 15px;
  2075. color: #6caef7;
  2076. background: #ecf5ff;
  2077. height: 42px;
  2078. line-height: 42px;
  2079. border: 1px #ebeef5 solid;
  2080. width: 100%;
  2081. padding-left: 15px;
  2082. span {
  2083. margin: 0 20px 0 0;
  2084. }
  2085. }
  2086. }
  2087. .form-table {
  2088. border: 1px #ebeef5 solid;
  2089. padding-bottom: 20px;
  2090. .el-col-6 {
  2091. width: 380px;
  2092. }
  2093. .el-row {
  2094. margin: 0 !important;
  2095. .el-form-item {
  2096. margin-bottom: 12px;
  2097. .el-form-item__content {
  2098. .el-select {
  2099. width: 100%;
  2100. }
  2101. }
  2102. }
  2103. }
  2104. }
  2105. </style>
  2106. <style>
  2107. .el-table td,
  2108. .el-table th.is-leaf,
  2109. .el-table--border,
  2110. .el-table--group {
  2111. border-color: #d0d3da;
  2112. }
  2113. .el-table--border::after,
  2114. .el-table--group::after,
  2115. .el-table::before {
  2116. background-color: #d0d3da;
  2117. }
  2118. </style>