dialysisSolution.vue 59KB

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