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

templateSummary.vue 69KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771
  1. <template>
  2. <div class="patient-container">
  3. <patient-sidebar :id="patient_id" defaultActive="1-9"></patient-sidebar>
  4. <div v-loading="loading">
  5. <div class="patient-app-container advice-container app-container">
  6. <div>
  7. <span style="margin-left: 10px;float:right;">
  8. <el-button type="primary" icon="el-icon-circle-plus-outline" size="small"
  9. @click="show_dialog = true">新增</el-button>
  10. <el-button type="primary" icon="el-icon-edit-outline" size="small"
  11. @click="showEdit">修改</el-button>
  12. <el-button type="primary" icon="el-icon-printer" size="small"
  13. @click="print">打印</el-button>
  14. <el-button size="small" v-show="selectingRows.length > 0" type="danger"
  15. @click="deleteAction">删除</el-button>
  16. </span>
  17. </div>
  18. <!--<div></div>-->
  19. <div class="cell clearfix">
  20. <label class="title"><span class="name">日期查询</span> : </label>
  21. <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
  22. type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
  23. value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
  24. <span class="">-</span>
  25. <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
  26. type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
  27. value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
  28. </div>
  29. <div class="record">
  30. <el-row :gutter="15">
  31. <el-col :span="10">
  32. <el-table :header-cell-style="{
  33. backgroundColor: 'rgb(245, 247, 250)',
  34. color: '#606266'
  35. }"
  36. :row-style="{ color: '#303133' }" ref="inspection_table" :data="inspectionList"
  37. border highlight-current-row @current-change="changeCurrentRecordTwo"
  38. :row-class-name="tableRow"
  39. >
  40. <el-table-column type="selection" width="60" align="center"></el-table-column>
  41. <el-table-column label="阶段小结名称" align="center">
  42. <template slot-scope="scope">
  43. {{scope.row.title}}
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="记录时间" align="center">
  47. <template slot-scope="scope">
  48. {{getTime(scope.row.record_time)}}
  49. </template>
  50. </el-table-column>
  51. <el-table-column label="记录医生" align="center">
  52. <template slot-scope="scope">
  53. {{getDoctor(scope.row.admin_user_id)}}
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. </el-col>
  58. <el-col :span="14">
  59. <div class="record_content_panel">
  60. <div style="background-color:rgb(245, 247, 250)" class="title">阶段小结内容</div>
  61. <div style="padding:10px;border-bottom:1px solid #DCDFE6;">阶段小结时间:{{getTime(editObj.record_time)}}</div>
  62. <div style="padding: 10px 10px 0;">阶段小结概要:</div>
  63. <div style="padding:10px;border-bottom:1px solid #DCDFE6;">
  64. <span style="margin-right:10px;line-height:20px;">干体重(kg):{{editObj.dry_weight}}</span>
  65. <span style="margin-right:10px;line-height:20px;">共透析:{{editObj.dialysis_count}}次</span>
  66. <span style="margin-right:10px;line-height:20px;">HD:{{editObj.hd_count}}次</span>
  67. <br>
  68. <span style="margin-right:10px;line-height:20px;">HDF:{{editObj.hdf_count}}次</span>
  69. <span style="margin-right:10px;line-height:20px;">HP:{{editObj.hp_count}}次</span>
  70. <span style="margin-right:10px;line-height:20px;">其他:{{editObj.other_count}}次</span>
  71. <br>
  72. <span style="margin-right:10px;line-height:20px;">透析器:{{editObj.dialzer_apparatus}}</span>
  73. <span style="margin-right:10px;line-height:20px;">抗凝剂:
  74. <span> {{getAnticoagulant(editObj.anticoagulant)}}</span>
  75. </span>
  76. <span style="margin-right:10px;line-height:20px;">透析液:(钾:{{editObj.kalium}} 钙:{{editObj.autunite}} Na:{{editObj.natrium}})</span>
  77. <br>
  78. <span style="margin-right:10px;line-height:20px;">每次透析:<span v-if="editObj.hour!=''"> {{editObj.hour}}小时</span>
  79. <span v-if="editObj.minute!=''">{{editObj.minute}}</span>分</span>
  80. <span style="margin-right:10px;line-height:20px;">透前体重(kg):{{editObj.befor_weight}}</span>
  81. <span style="margin-right:10px;line-height:20px;">透后体重(kg):{{editObj.after_weight}}</span>
  82. <br>
  83. <span style="margin-right:10px;line-height:20px;">透前血压(mmHg):{{editObj.befor_pressure}}</span>
  84. <span style="margin-right:10px;line-height:20px;">透后血压(mmHg):{{editObj.after_pressure}}</span>
  85. </div>
  86. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">阶段小结总结:
  87. {{editObj.template_summary_content}}
  88. </div>
  89. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">阶段小结化验结果:
  90. <div>
  91. <div v-for="item in editObj.template_inspection_content">
  92. <p style="font-weight: bold;margin: 10px 0;">{{ item.project_name }}</p>
  93. <div style="display:flex;flex-wrap: wrap;">
  94. <div v-for="it in item.arr" style="width:33%;">
  95. {{ it.item_name }} <span v-if="it.unit!=''">[{{it.unit}}]</span>
  96. <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
  97. {{it.inspect_value}}↓
  98. </span>
  99. <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
  100. {{it.inspect_value}}↑
  101. </span>
  102. </div>
  103. </div>
  104. </div>
  105. </div>
  106. </div>
  107. <div style="padding:10px;line-height:20px;">阶段小结个体化透析方案:{{editObj.template_plan_content}}</div>
  108. </div>
  109. </el-col>
  110. </el-row>
  111. </div>
  112. </div>
  113. <el-dialog title="新增阶段小结" width="80%" top="5vh" :visible.sync="show_dialog">
  114. <div>
  115. <div class="new_record_form">
  116. <div class="cell clearfix">
  117. <el-form :model="form" ref="form">
  118. <el-row :gutter="24">
  119. <el-col :span="20">
  120. <el-form-item label="阶段小结名称:">
  121. <el-input v-model="form.title"></el-input>
  122. </el-form-item>
  123. </el-col>
  124. </el-row>
  125. <el-row :gutter="24">
  126. <el-col :span="8">
  127. <el-form-item label="阶段小结时间:">
  128. <el-date-picker
  129. @change="changeStartYear"
  130. v-model="form.start_year"
  131. type="year"
  132. value-format="yyyy"
  133. placeholder="选择年">
  134. </el-date-picker>
  135. </el-form-item>
  136. </el-col>
  137. <el-col :span="8">
  138. <el-form-item>
  139. <el-radio-group v-model="form.radio">
  140. <el-radio :label="1" >月份</el-radio>
  141. <el-radio :label="2" >季度</el-radio>
  142. </el-radio-group>
  143. </el-form-item>
  144. </el-col>
  145. <el-col :span="8" v-if="form.radio == 1">
  146. <el-form-item>
  147. <!-- <el-select v-model="form.start_month" placeholder="请选择" @change="changeStartMonth">
  148. <el-option
  149. v-for="item in monthType"
  150. :key="item.id"
  151. :label="item.name"
  152. :value="item.id">
  153. </el-option>
  154. </el-select> -->
  155. <el-date-picker
  156. @change="changeStartMonth"
  157. value-format="MM"
  158. v-model="form.start_month"
  159. type="month"
  160. placeholder="选择月">
  161. </el-date-picker>
  162. </el-form-item>
  163. </el-col>
  164. <el-col :span="8" v-if="form.radio == 2">
  165. <el-form-item>
  166. <el-select v-model="form.quarter" placeholder="请选择" @change="changeQuarter">
  167. <el-option
  168. v-for="item in timeType"
  169. :key="item.id"
  170. :label="item.name"
  171. :value="item.id">
  172. </el-option>
  173. </el-select>
  174. </el-form-item>
  175. </el-col>
  176. </el-row>
  177. </el-form>
  178. </div>
  179. <div class="cell clearfix" style="margin-top: 10px">
  180. <label class="title"><span class="name">阶段小结摘要</span> : </label>
  181. <el-form>
  182. <el-row :gutter="24">
  183. <el-col :span="8">
  184. <el-form-item label="干体重">
  185. <el-input v-model="form.dry_weight"></el-input>
  186. </el-form-item>
  187. </el-col>
  188. <el-col :span="8">
  189. <el-form-item label="共透析(次)">
  190. <el-input v-model="form.dialysis_count"></el-input>
  191. </el-form-item>
  192. </el-col>
  193. <el-col :span="8">
  194. <el-form-item label="HD(次)">
  195. <el-input v-model="form.hd_count"></el-input>
  196. </el-form-item>
  197. </el-col>
  198. </el-row>
  199. <el-row :gutter="24">
  200. <el-col :span="8">
  201. <el-form-item label="HDF(次)">
  202. <el-input v-model="form.hdf_count"></el-input>
  203. </el-form-item>
  204. </el-col>
  205. <el-col :span="8">
  206. <el-form-item label="HP(次)">
  207. <el-input v-model="form.hp_count"></el-input>
  208. </el-form-item>
  209. </el-col>
  210. <el-col :span="8">
  211. <el-form-item label="其他(次)">
  212. <el-input v-model="form.other_count"></el-input>
  213. </el-form-item>
  214. </el-col>
  215. </el-row>
  216. <el-row :gutter="24">
  217. <el-col :span="8">
  218. <el-form-item label="透析器">
  219. <el-input v-model="form.dialzer_apparatus" @focus="showInnerDialog('7')"></el-input>
  220. </el-form-item>
  221. </el-col>
  222. <el-col :span="8">
  223. <el-form-item label="灌流器">
  224. <el-input v-model="form.perfusion_apparatus" @focus="showInnerDialog('8')"></el-input>
  225. </el-form-item>
  226. </el-col>
  227. <el-col :span="8">
  228. <el-form-item label="抗凝剂">
  229. <el-select v-model="form.anticoagulant" placeholder="请选择" style="width:100%;">
  230. <el-option :key="0" label="请选择" :value="0"></el-option>
  231. <el-option v-for="(item, index) in anticoagulantList" :label="item.name" :key="index + 'e'"
  232. :value="item.id"></el-option>
  233. </el-select>
  234. </el-form-item>
  235. </el-col>
  236. </el-row>
  237. <div>透析液</div>
  238. <el-row :gutter="24">
  239. <el-col :span="8">
  240. <el-form-item label="钾">
  241. <el-input v-model="form.kalium"></el-input>
  242. </el-form-item>
  243. </el-col>
  244. <el-col :span="8">
  245. <el-form-item label="钙">
  246. <el-input v-model="form.autunite"></el-input>
  247. </el-form-item>
  248. </el-col>
  249. <el-col :span="8">
  250. <el-form-item label="钠">
  251. <el-input v-model="form.natrium"></el-input>
  252. </el-form-item>
  253. </el-col>
  254. </el-row>
  255. <div>透析时长</div>
  256. <el-row :gutter="24">
  257. <el-col :span="8">
  258. <el-form-item label="时">
  259. <el-input v-model="form.hour"></el-input>
  260. </el-form-item>
  261. </el-col>
  262. <el-col :span="8">
  263. <el-form-item label="分">
  264. <el-input v-model="form.minute"></el-input>
  265. </el-form-item>
  266. </el-col>
  267. </el-row>
  268. <el-row :gutter="24">
  269. <el-col :span="8">
  270. <el-form-item label="透前体重(kg)">
  271. <el-input v-model="form.befor_weight"></el-input>
  272. </el-form-item>
  273. </el-col>
  274. <el-col :span="8">
  275. <el-form-item label="透后体重(kg)">
  276. <el-input v-model="form.after_weight"></el-input>
  277. </el-form-item>
  278. </el-col>
  279. </el-row>
  280. <el-row :gutter="24">
  281. <el-col :span="8">
  282. <el-form-item label="透前血压(mmHg)">
  283. <el-input v-model="form.befor_pressure"></el-input>
  284. </el-form-item>
  285. </el-col>
  286. <el-col :span="8">
  287. <el-form-item label="透后血压(mmHg)">
  288. <el-input v-model="form.after_pressure"></el-input>
  289. </el-form-item>
  290. </el-col>
  291. </el-row>
  292. <el-row>
  293. <label class="title"><span class="name">阶段小结总结</span> : </label>
  294. <el-select v-model="form.template_summary_id" placeholder="请选择" @change="changeSummary">
  295. <el-option
  296. v-for="item in summaryList"
  297. :key="item.value"
  298. :label="item.content"
  299. :value="item.value">
  300. </el-option>
  301. </el-select>
  302. <el-input style="margin:10px 0;" type="text" v-model="form.template_summary_content"></el-input>
  303. </el-row>
  304. <el-row>
  305. <label class="title"><span class="name">阶段小结个体化透析方案</span> : </label>
  306. <el-select v-model="form.template_plan_id" placeholder="请选择" @change="changeTempalte">
  307. <el-option
  308. v-for="item in planList"
  309. :key="item.value"
  310. :label="item.content"
  311. :value="item.value">
  312. </el-option>
  313. </el-select>
  314. <el-input style="margin:10px 0;" type="text" v-model="form.template_plan_content"></el-input>
  315. </el-row>
  316. <el-row>
  317. <label class="title"><span class="name">阶段小结化验结果</span> : </label>
  318. <el-button type="primary" @click="toInspection">选择检验检查</el-button>
  319. <div class="borderBox">
  320. <div v-for="item in form.template_inspection_content">
  321. <p>{{ item.project_name }}</p>
  322. <div style="display:flex;flex-wrap: wrap;">
  323. <div v-for="it in item.arr" style="width:33%;">
  324. {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>
  325. <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
  326. {{it.inspect_value}}↓
  327. </span>
  328. <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
  329. {{it.inspect_value}}↑
  330. </span>
  331. </div>
  332. </div>
  333. </div>
  334. </div>
  335. </el-row>
  336. <el-row>
  337. <el-col :span="8">
  338. <el-form-item label="记录医生">
  339. <el-select v-model="form.admin_user_id" placeholder="请选择">
  340. <el-option
  341. v-for="item in docList"
  342. :key="item.admin_user_id"
  343. :label="item.user_name"
  344. :value="item.admin_user_id">
  345. </el-option>
  346. </el-select>
  347. </el-form-item>
  348. </el-col>
  349. <el-col :span="8">
  350. <el-form-item label="记录时间">
  351. <el-date-picker
  352. v-model="form.record_time"
  353. type="datetime"
  354. placeholder="选择日期时间">
  355. </el-date-picker>
  356. </el-form-item>
  357. </el-col>
  358. </el-row>
  359. </el-form>
  360. </div>
  361. <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
  362. <el-button @click="show_dialog = false">取消</el-button>
  363. <el-button type="primary" @click="saveCreation()">保存
  364. </el-button>
  365. </div>
  366. </div>
  367. </div>
  368. </el-dialog>
  369. <!-- 编辑阶段小结 -->
  370. <el-dialog title="编辑阶段小结" width="80%" top="5vh" :visible.sync="edit_show_dialog">
  371. <div>
  372. <div class="new_record_form">
  373. <div class="cell clearfix">
  374. <el-form :model="form" ref="form">
  375. <el-row :gutter="24">
  376. <el-col :span="20">
  377. <el-form-item label="阶段小结名称:">
  378. <el-input v-model="form.title"></el-input>
  379. </el-form-item>
  380. </el-col>
  381. </el-row>
  382. <el-row :gutter="24">
  383. <el-col :span="8">
  384. <el-form-item label="阶段小结时间:">
  385. <el-date-picker
  386. v-model="form.start_year"
  387. type="year"
  388. value-format="yyyy-MM-dd"
  389. placeholder="选择年">
  390. </el-date-picker>
  391. </el-form-item>
  392. </el-col>
  393. <el-col :span="8">
  394. <el-form-item>
  395. <el-radio-group v-model="form.radio">
  396. <el-radio :label="1" >月份</el-radio>
  397. <el-radio :label="2" >季度</el-radio>
  398. </el-radio-group>
  399. </el-form-item>
  400. </el-col>
  401. <el-col :span="8" v-if="form.radio == 1">
  402. <el-form-item>
  403. <el-date-picker
  404. value-format="MM"
  405. v-model="form.start_month"
  406. type="month"
  407. placeholder="选择月">
  408. </el-date-picker>
  409. </el-form-item>
  410. </el-col>
  411. <el-col :span="8" v-if="form.radio == 2">
  412. <el-form-item>
  413. <el-select v-model="form.quarter" placeholder="请选择">
  414. <el-option
  415. v-for="item in timeType"
  416. :key="item.id"
  417. :label="item.name"
  418. :value="item.id">
  419. </el-option>
  420. </el-select>
  421. </el-form-item>
  422. </el-col>
  423. </el-row>
  424. </el-form>
  425. </div>
  426. <div class="cell clearfix" style="margin-top: 10px">
  427. <label class="title"><span class="name">阶段小结摘要</span> : </label>
  428. <el-form>
  429. <el-row :gutter="24">
  430. <el-col :span="8">
  431. <el-form-item label="干体重">
  432. <el-input v-model="form.dry_weight"></el-input>
  433. </el-form-item>
  434. </el-col>
  435. <el-col :span="8">
  436. <el-form-item label="共透析(次)">
  437. <el-input v-model="form.dialysis_count"></el-input>
  438. </el-form-item>
  439. </el-col>
  440. <el-col :span="8">
  441. <el-form-item label="HD(次)">
  442. <el-input v-model="form.hd_count"></el-input>
  443. </el-form-item>
  444. </el-col>
  445. </el-row>
  446. <el-row :gutter="24">
  447. <el-col :span="8">
  448. <el-form-item label="HDF(次)">
  449. <el-input v-model="form.hdf_count"></el-input>
  450. </el-form-item>
  451. </el-col>
  452. <el-col :span="8">
  453. <el-form-item label="HP(次)">
  454. <el-input v-model="form.hp_count"></el-input>
  455. </el-form-item>
  456. </el-col>
  457. <el-col :span="8">
  458. <el-form-item label="其他(次)">
  459. <el-input v-model="form.other_count"></el-input>
  460. </el-form-item>
  461. </el-col>
  462. </el-row>
  463. <el-row :gutter="24">
  464. <el-col :span="8">
  465. <el-form-item label="透析器">
  466. <el-input v-model="form.dialzer_apparatus" @focus="showInnerDialog('7')"></el-input>
  467. </el-form-item>
  468. </el-col>
  469. <el-col :span="8">
  470. <el-form-item label="灌流器">
  471. <el-input v-model="form.perfusion_apparatus" @focus="showInnerDialog('8')"></el-input>
  472. </el-form-item>
  473. </el-col>
  474. <el-col :span="8">
  475. <el-form-item label="抗凝剂">
  476. <!-- <el-input v-model="form.anticoagulant"></el-input> -->
  477. <el-select v-model="form.anticoagulant" placeholder="请选择" style="width:100%;">
  478. <el-option :key="0" label="请选择" :value="0"></el-option>
  479. <el-option v-for="(item, index) in anticoagulantList" :label="item.name" :key="index + 'e'"
  480. :value="item.id"></el-option>
  481. </el-select>
  482. </el-form-item>
  483. </el-col>
  484. </el-row>
  485. <div>透析液</div>
  486. <el-row :gutter="24">
  487. <el-col :span="8">
  488. <el-form-item label="钾">
  489. <el-input v-model="form.kalium"></el-input>
  490. </el-form-item>
  491. </el-col>
  492. <el-col :span="8">
  493. <el-form-item label="钙">
  494. <el-input v-model="form.autunite"></el-input>
  495. </el-form-item>
  496. </el-col>
  497. <el-col :span="8">
  498. <el-form-item label="钠">
  499. <el-input v-model="form.natrium"></el-input>
  500. </el-form-item>
  501. </el-col>
  502. </el-row>
  503. <div>透析时长</div>
  504. <el-row :gutter="24">
  505. <el-col :span="8">
  506. <el-form-item label="时">
  507. <el-input v-model="form.hour"></el-input>
  508. </el-form-item>
  509. </el-col>
  510. <el-col :span="8">
  511. <el-form-item label="分">
  512. <el-input v-model="form.minute"></el-input>
  513. </el-form-item>
  514. </el-col>
  515. </el-row>
  516. <el-row :gutter="24">
  517. <el-col :span="8">
  518. <el-form-item label="透前体重(kg)">
  519. <el-input v-model="form.befor_weight"></el-input>
  520. </el-form-item>
  521. </el-col>
  522. <el-col :span="8">
  523. <el-form-item label="透后体重(kg)">
  524. <el-input v-model="form.after_weight"></el-input>
  525. </el-form-item>
  526. </el-col>
  527. </el-row>
  528. <el-row :gutter="24">
  529. <el-col :span="8">
  530. <el-form-item label="透前血压(mmHg)">
  531. <el-input v-model="form.befor_pressure"></el-input>
  532. </el-form-item>
  533. </el-col>
  534. <el-col :span="8">
  535. <el-form-item label="透后血压(mmHg)">
  536. <el-input v-model="form.after_pressure"></el-input>
  537. </el-form-item>
  538. </el-col>
  539. </el-row>
  540. <el-row>
  541. <label class="title"><span class="name">阶段小结总结</span> : </label>
  542. <el-select v-model="form.template_summary_id" placeholder="请选择" @change="changeSummaryOne">
  543. <el-option
  544. v-for="item in summaryList"
  545. :key="item.value"
  546. :label="item.content"
  547. :value="item.value">
  548. </el-option>
  549. </el-select>
  550. <el-input style="margin:10px 0;" type="text" v-model="form.template_summary_content"></el-input>
  551. </el-row>
  552. <el-row>
  553. <label class="title"><span class="name">阶段小结个体化透析方案</span> : </label>
  554. <el-select v-model="form.template_plan_id" placeholder="请选择" @change="changeTempalte">
  555. <el-option
  556. v-for="item in planList"
  557. :key="item.value"
  558. :label="item.content"
  559. :value="item.value">
  560. </el-option>
  561. </el-select>
  562. <el-input style="margin:10px 0;" type="text" v-model="form.template_plan_content"></el-input>
  563. </el-row>
  564. <el-row>
  565. <label class="title"><span class="name">阶段小结化验结果</span> : </label>
  566. <el-button type="primary" @click="toInspection">选择检验检查</el-button>
  567. <!-- <el-input style="margin:10px 0;" type="textarea" v-model="form.template_inspection_content"></el-input> -->
  568. <div class="borderBox">
  569. <div v-for="item in form.template_inspection_content">
  570. <p>{{ item.project_name }}</p>
  571. <div style="display:flex;flex-wrap: wrap;">
  572. <div v-for="it in item.arr" style="width:33%;">
  573. {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>
  574. <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
  575. {{it.inspect_value}}↓
  576. </span>
  577. <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
  578. {{it.inspect_value}}↑
  579. </span>
  580. </div>
  581. </div>
  582. </div>
  583. </div>
  584. </el-row>
  585. <el-row>
  586. <el-col :span="8">
  587. <el-form-item label="记录医生">
  588. <el-select v-model="form.admin_user_id" placeholder="请选择">
  589. <el-option
  590. v-for="item in docList"
  591. :key="item.admin_user_id"
  592. :label="item.user_name"
  593. :value="item.admin_user_id">
  594. </el-option>
  595. </el-select>
  596. </el-form-item>
  597. </el-col>
  598. <el-col :span="8">
  599. <el-form-item label="记录时间">
  600. <el-date-picker
  601. v-model="form.record_time"
  602. type="datetime"
  603. placeholder="选择日期时间">
  604. </el-date-picker>
  605. </el-form-item>
  606. </el-col>
  607. </el-row>
  608. </el-form>
  609. </div>
  610. <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
  611. <el-button @click="edit_show_dialog = false">取消</el-button>
  612. <el-button type="primary" @click="editCreation()">保存
  613. </el-button>
  614. </div>
  615. </div>
  616. </div>
  617. </el-dialog>
  618. <el-dialog
  619. title="提示"
  620. :visible.sync="dialogVisibleInspection"
  621. width="80%"
  622. >
  623. <span>
  624. <el-form>
  625. <el-row>
  626. <el-form-item>
  627. <span>选择检验检查时间:</span>
  628. <div>
  629. <el-form-item
  630. label="时间:"
  631. prop="startYear"
  632. style="width:100%;"
  633. >
  634. <el-date-picker
  635. @change="changeYear"
  636. v-model="startYear"
  637. class="timePicker"
  638. type="month"
  639. placeholder=""
  640. format="yyyy-MM"
  641. value-format="yyyy-MM">
  642. </el-date-picker>
  643. </el-form-item>
  644. <!-- <el-form-item label="月份:"
  645. prop="startYear"
  646. style="width:100%;">
  647. <el-date-picker
  648. v-model="startMonth"
  649. type="month"
  650. format="MM"
  651. value-format="MM"
  652. placeholder="请选择">
  653. </el-date-picker>
  654. </el-form-item> -->
  655. </div>
  656. </el-form-item>
  657. </el-row>
  658. <el-row>
  659. <span>选择检验检查项目:</span>
  660. <div class="record">
  661. <el-row :gutter="15">
  662. <el-col :span="10">
  663. <el-table :header-cell-style="{
  664. backgroundColor: 'rgb(245, 247, 250)',
  665. color: '#606266'
  666. }"
  667. :row-style="{ color: '#303133' }"
  668. ref="single_table"
  669. :data="tableList"
  670. border highlight-current-row
  671. @current-change="changeCurrentRecord"
  672. @selection-change="selectionChangeOne"
  673. :row-class-name="tableRow"
  674. @row-click="onRowClick"
  675. >
  676. <el-table-column type="selection" width="60" align="center"></el-table-column>
  677. <el-table-column label="检验项目" align="center">
  678. <template slot-scope="scope">
  679. {{scope.row.project_name}}
  680. </template>
  681. </el-table-column>
  682. </el-table>
  683. </el-col>
  684. <el-col :span="14">
  685. <div class="record_content_panel">
  686. <el-table :header-cell-style="{
  687. backgroundColor: 'rgb(245, 247, 250)',
  688. color: '#606266'
  689. }"
  690. :row-style="{ color: '#303133' }" :data="tableData"
  691. border highlight-current-row @current-change="didChangeCurrentRecord"
  692. @selection-change="selectionChange"
  693. :row-class-name="tableRow"
  694. >
  695. <el-table-column label="检验项目" align="center">
  696. <template slot-scope="scope">
  697. {{scope.row.item_name}}
  698. </template>
  699. </el-table-column>
  700. <el-table-column label="结果" align="center">
  701. <template slot-scope="scope">
  702. {{scope.row.project_name}} <span v-if="scope.row.unit!=''">[{{scope.row.unit}}]</span>
  703. <span v-if="parseInt(scope.row.inspect_value) < parseInt(scope.row.range_min)">
  704. {{scope.row.inspect_value}}↓
  705. </span>
  706. <span v-if="parseInt(scope.row.inspect_value) > parseInt(scope.row.range_max)">
  707. {{scope.row.inspect_value}}↑
  708. </span>
  709. </template>
  710. </el-table-column>
  711. <el-table-column label="参考值" align="center">
  712. <template slot-scope="scope">
  713. {{scope.row.range_min}} ~ {{scope.row.range_max}}
  714. </template>
  715. </el-table-column>
  716. <el-table-column label="单位" align="center">
  717. <template slot-scope="scope">
  718. {{scope.row.unit}}
  719. </template>
  720. </el-table-column>
  721. </el-table>
  722. </div>
  723. </el-col>
  724. </el-row>
  725. </div>
  726. </el-row>
  727. </el-form>
  728. </span>
  729. <span slot="footer" class="dialog-footer">
  730. <el-button @click="dialogVisibleInspection = false">取 消</el-button>
  731. <el-button type="primary" @click="toContent">确 定</el-button>
  732. </span>
  733. </el-dialog>
  734. <multi-select-box
  735. :propsForm="InnerDialogProps"
  736. v-on:dialog-comfirm="innerDialogComfirm"
  737. v-on:dialog-cancle="innerDialogCancle"
  738. ></multi-select-box>
  739. </div>
  740. </div>
  741. <!-- </div> -->
  742. </template>
  743. <script>
  744. import PatientSidebar from './components/PatientSidebar'
  745. import Editor from '@/components/Editor'
  746. import { getInitDataList,getInspectionMajorItem,getInspectionDetail,getInspectionItemList,saveCreation,getTemplateSummaryList,getTemplateSummaryDetail,UpdateTemplateSummary } from '@/api/patient'
  747. import { parseTime } from '@/utils'
  748. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  749. import { uParseTime } from '@/utils/tools'
  750. import { getDataConfig } from '@/utils/data'
  751. import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
  752. import MsgTip from '../dialysis/details/dialog/MsgTip'
  753. const moment = require('moment')
  754. export default {
  755. name: 'templateSummary',
  756. components: {
  757. PatientSidebar,
  758. BreadCrumb,
  759. Editor,
  760. MsgTip,
  761. multiSelectBox,
  762. },
  763. data() {
  764. return {
  765. InnerDialogProps: {
  766. values: [],
  767. visibility: false,
  768. isShowTextArea: true,
  769. customContent: '',
  770. titles: '',
  771. type: '' // 不同弹框类型,用来匹配数据
  772. },
  773. loading: false,
  774. title: '',
  775. patient_id: 0,
  776. date: [],
  777. start_time: '',
  778. end_time: '',
  779. course_of_disease_time: '',
  780. records: [],
  781. doctors: [],
  782. current_select_record: null,
  783. show_dialog: false,
  784. show_edit_dialog: false,
  785. uploading_new_record: false,
  786. templates: this.$store.getters.configlist.course_disease,
  787. select_template: '',
  788. new_content: '',
  789. edit_new_content: '',
  790. edit_course_of_disease_time: '',
  791. selectingRows: [],
  792. table_current_index: -1,
  793. edit_current_id: 0,
  794. edit_title: '',
  795. value:'',
  796. form:{
  797. id:0,
  798. title:"",
  799. start_year:new Date(),
  800. start_month:new Date(),
  801. radio:1,
  802. quarter:1,
  803. dry_weight:"",
  804. dialysis_count:"",
  805. hd_count:"",
  806. hdf_count:"",
  807. hp_count:"",
  808. other_count:"",
  809. dialzer_apparatus:"",
  810. perfusion_apparatus:"",
  811. anticoagulant:"",
  812. kalium:"",
  813. autunite:"",
  814. natrium:"",
  815. hour:"",
  816. minute:"",
  817. befor_weight:"",
  818. after_weight:"",
  819. befor_pressure:"",
  820. after_pressure:"",
  821. template_summary_id:"",
  822. template_summary_content:"",
  823. template_plan_id:"",
  824. template_summary_content:"",
  825. template_inspection_id:0,
  826. template_inspection_content:"",
  827. admin_user_id:this.$store.getters.xt_user.user.id,
  828. record_time:new Date(),
  829. patient_id:"",
  830. start_time:"",
  831. end_time:"",
  832. },
  833. timeType:[
  834. {id:1,name:"第一季度"},
  835. {id:2,name:"第二季度"},
  836. {id:3,name:"第三季度"},
  837. {id:4,name:"第四季度"},
  838. ],
  839. monthType:[
  840. {id:1,name:"一月"},
  841. {id:2,name:"二月"},
  842. {id:3,name:"三月"},
  843. {id:4,name:"四月"},
  844. {id:5,name:"五月"},
  845. {id:6,name:"六月"},
  846. {id:7,name:"七月"},
  847. {id:8,name:"八月"},
  848. {id:9,name:"九月"},
  849. {id:10,name:"十月"},
  850. {id:11,name:"十一月"},
  851. {id:12,name:"十二月"},
  852. ],
  853. options:[],
  854. dialogVisibleInspection:false,
  855. editDialogVisible:false,
  856. edit_show_dialog:false,
  857. InspectionMajor:[],
  858. other_start_time:"",
  859. startYear:moment(new Date()).endOf('month').subtract('month', +1).endOf('month').format("YYYY-MM-DD") ,
  860. // startMonth:(new Date().getMonth - 1).toString(),
  861. tableList:[],
  862. tableData:[],
  863. inspectDataList:[],
  864. projectList:[],
  865. docList:[],
  866. inspectionList:[],
  867. editObj:{},
  868. anticoagulantList:[],
  869. dialyzerPerfusionApparatus:[],
  870. irrigations:[],
  871. dialyzerList:[],
  872. irrigationList:[],
  873. stockType:[],
  874. summaryList:[],
  875. planList:[],
  876. projectStr:"",
  877. projectIndate:"",
  878. start_year:"2021",
  879. start_month:"",
  880. start_date: moment(new Date()).startOf("month").format("YYYY-MM-DD"),
  881. end_date: moment(new Date()).endOf('month').format("YYYY-MM-DD"),
  882. }
  883. },
  884. created() {
  885. this.patient_id = this.$route.params && this.$route.params.id
  886. var now = new Date()
  887. this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
  888. var nowDate = new Date()
  889. var nowYear = nowDate.getFullYear()
  890. var nowMonth = nowDate.getMonth() + 1
  891. var nowDay = nowDate.getDate()
  892. this.end_time =
  893. nowYear +
  894. '-' +
  895. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  896. '-' +
  897. (nowDay < 10 ? '0' + nowDay : nowDay)
  898. nowDate.setMonth(nowDate.getMonth() - 1)
  899. nowYear = nowDate.getFullYear()
  900. nowMonth = nowDate.getMonth() + 1
  901. nowDay = nowDate.getDate()
  902. this.start_time =
  903. nowYear +
  904. '-' +
  905. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  906. '-' +
  907. (nowDay < 10 ? '0' + nowDay : nowDay)
  908. this.other_start_time = nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' + (nowDay < 10 ? '0' + nowDay : nowDay)
  909. var anticoagulantsConfitOne = this.$store.getters.anticoagulants_confit
  910. const arrFour = []
  911. Object.keys(anticoagulantsConfitOne).map((item, index) => {
  912. if (index != 2) {
  913. arrFour.push(anticoagulantsConfitOne[item])
  914. }
  915. })
  916. this.anticoagulantList = arrFour
  917. console.log("抗凝剂量",this.anticoagulantList)
  918. var endtime= moment(new Date()).endOf('month').subtract('month', +1).endOf('month').format("YYYY-MM-DD")
  919. console.log("endtime",endtime)
  920. this.getlist()
  921. this.getInspectionMajor()
  922. this.getTemplateSummaryList()
  923. },
  924. methods: {
  925. getTime(val) {
  926. if(val < 0){
  927. return ""
  928. }
  929. if(val == ""){
  930. return ""
  931. }else {
  932. return uParseTime(val, '{y}-{m}-{d}')
  933. }
  934. },
  935. getTimeOne(val) {
  936. if(val < 0){
  937. return ""
  938. }
  939. if(val == ""){
  940. return ""
  941. }else {
  942. return uParseTime(val, '{m}')
  943. }
  944. },
  945. showEdit(){
  946. this.getCurrentRecordDetailOne()
  947. },
  948. deleteAction(){
  949. },
  950. onRowClick(){
  951. },
  952. didChangeCurrentRecord(){
  953. },
  954. changeCurrentRecord(val){
  955. this.getInspectionDetai(val)
  956. },
  957. selectionChangeOne(val){
  958. // console.log("hhhhhhhhh",val)
  959. this.getInspectionItemList(val)
  960. },
  961. startTimeChange(val){
  962. console.log("val",val)
  963. this.start_time = val
  964. this.getTemplateSummaryList()
  965. },
  966. endTimeChange(val){
  967. this.end_time = val
  968. this.getTemplateSummaryList()
  969. },
  970. print(){
  971. this.$router.push({path:"/patient/patient/templateSummary/print?id="+this.form.id})
  972. },
  973. tableRow(){
  974. },
  975. getQuarter(year,quarter){
  976. var start_time = ""
  977. if(quarter == 1){
  978. }
  979. },
  980. didSelectionChange(){
  981. },
  982. changeCurrentRecordTwo(val){
  983. this.form.id = val.id
  984. this.getCurrentRecordDetail(val.id)
  985. },
  986. changeCurrentRecordOne(){
  987. },
  988. getlist(){
  989. var params={
  990. start_year:this.getTime(this.form.start_year),
  991. start_month:this.getTime(this.form.start_month),
  992. quarter:this.form.quarter,
  993. patient_id:this.patient_id,
  994. start_time:this.start_date,
  995. end_time:this.end_date,
  996. }
  997. console.log("世纪时间",params)
  998. console.log(moment(moment(2020 + '-01-01').toDate()).quarter(2).format("YYYY-MM-DD"))
  999. getInitDataList(params).then(response=>{
  1000. if(response.data.state == 1){
  1001. var prescription_list = response.data.data.prescription_list
  1002. this.form.dialzer_apparatus = prescription_list.dialysis_dialyszers
  1003. this.form.perfusion_apparatus = prescription_list.dialysis_irrigation
  1004. this.form.anticoagulant = prescription_list.anticoagulant
  1005. this.form.hour = prescription_list.dialysis_duration_hour
  1006. this.form.minute = prescription_list.dialysis_duration_minute
  1007. this.form.kalium = prescription_list.kalium
  1008. this.form.natrium = prescription_list.sodium
  1009. this.form.autunite = prescription_list.calcium
  1010. var beforlist = response.data.data.beforlist
  1011. console.log("透前数据565665565656",beforlist)
  1012. this.form.befor_weight = beforlist.weight_before
  1013. this.form.dry_weight = beforlist.dry_weight
  1014. var afterlist = response.data.data.after_list
  1015. console.log("透后数据232332323232",afterlist)
  1016. this.form.after_weight = afterlist.weight_after
  1017. this.form.after_pressure = afterlist.systolic_blood_pressure + "/"+afterlist.diastolic_blood_pressure
  1018. this.form.befor_pressure = beforlist.systolic_blood_pressure +"/"+beforlist.diastolic_blood_pressure
  1019. var modelist = response.data.data.modelist
  1020. console.log("modelist",modelist)
  1021. var docList = response.data.data.docList
  1022. // console.log("doctlist",docList)
  1023. this.docList = docList
  1024. var stockType = response.data.data.stockType
  1025. var arr = []
  1026. var arrTwo = []
  1027. for(let i=0;i<stockType.length;i++){
  1028. if(stockType[i].stock_attribute == 2){
  1029. arr.push(stockType[i])
  1030. }
  1031. if(stockType[i].stock_attribute == 3){
  1032. arrTwo.push(stockType[i])
  1033. }
  1034. }
  1035. var dialyzator = []
  1036. var irrigation = []
  1037. for(let i=0;i<arr.length;i++){
  1038. for(let j=0;j<arr[i].GoodInfo.length;j++){
  1039. dialyzator.push(arr[i].GoodInfo[j])
  1040. }
  1041. }
  1042. this.dialyzerList = dialyzator
  1043. // console.log("arrtt2323232332232323",arrTwo)
  1044. for(let i=0;i<arrTwo.length;i++){
  1045. for(let j=0;j<arrTwo[i].GoodInfo.length;j++){
  1046. irrigation.push(arrTwo[i].GoodInfo[j])
  1047. }
  1048. }
  1049. this.irrigationList = irrigation
  1050. // console.log("透析器233223",this.dialyzerList)
  1051. // console.log("灌流器323323223",this.irrigationList)
  1052. var count = ""
  1053. var total_count = 0
  1054. for(let i=0;i<modelist.length;i++){
  1055. total_count += modelist[i].count
  1056. if(modelist[i].mode_id == 1){
  1057. this.form.hd_count = modelist[i].count
  1058. }
  1059. if(modelist[i].mode_id == 2){
  1060. this.form.hdf_count = modelist[i].count
  1061. }
  1062. if(modelist[i].mode_id == 4){
  1063. this.form.hp_count = modelist[i].count
  1064. }
  1065. if(modelist[i].mode_id!=1&&modelist[i].mode_id!=2 && modelist[i].mode_id!=4){
  1066. count += modelist[i].count
  1067. }
  1068. }
  1069. this.form.other_count = count
  1070. this.form.dialysis_count = total_count
  1071. // console.log("modelist",modelist)
  1072. var summaryList = response.data.data.summaryList
  1073. // console.log("summaryList",summaryList)
  1074. this.summaryList = summaryList
  1075. var planList = response.data.data.planList
  1076. // console.log("planlist",planList)
  1077. this.planList = planList
  1078. }
  1079. })
  1080. },
  1081. toInspection(){
  1082. this.dialogVisibleInspection = true
  1083. },
  1084. //获取大项数据来源
  1085. getInspectionMajor(){
  1086. console.log("start_year",this.startYear)
  1087. var params = {
  1088. other_start_time:this.startYear,
  1089. patient_id:this.patient_id,
  1090. }
  1091. console.log("开始数据",params)
  1092. getInspectionMajorItem(params).then(response=>{
  1093. if(response.data.state == 1){
  1094. var list = response.data.data.list
  1095. console.log("列表23232232323",list)
  1096. // this.$refs.single_table.setCurrentRow(list[0])
  1097. this.tableList = list
  1098. }
  1099. })
  1100. },
  1101. //获取小项的值
  1102. getInspectionDetai(val){
  1103. var params = {
  1104. project_id:val.project_id,
  1105. patient_id:val.patient_id,
  1106. inspect_date:val.inspect_date,
  1107. }
  1108. // console.log("param2233233223",params)
  1109. getInspectionDetail(params).then(response=>{
  1110. if(response.data.state ==1){
  1111. var list = response.data.data.list
  1112. // console.log("详情222",list)
  1113. this.tableData = list
  1114. }
  1115. })
  1116. },
  1117. selectionChange(val){
  1118. // console.log("val233223",val)
  1119. selectionChange().then(response=>{
  1120. })
  1121. },
  1122. getInspectionItemList(val){
  1123. // console.log("中国龚23232323232332",val)
  1124. for(let i=0;i<val.length;i++){
  1125. this.projectList.push(val[i].project_id)
  1126. this.inspectDataList.push(val[i].inspect_date)
  1127. }
  1128. },
  1129. toContent(){
  1130. var str = this.projectList.join(",")
  1131. this.projectStr = str
  1132. var inspe_date = this.inspectDataList.join(",")
  1133. this.projectIndate = inspe_date
  1134. var params = {
  1135. ids:str,
  1136. inspect_date:inspe_date,
  1137. patient_id:this.patient_id,
  1138. }
  1139. // console.log("params",params)
  1140. getInspectionItemList(params).then(response=>{
  1141. if(response.data.state == 1){
  1142. var list = response.data.data.list
  1143. let arr = this.unique(list,'project_name')
  1144. // console.log("选择检验检查",arr)
  1145. this.form.template_inspection_content = arr
  1146. this.dialogVisibleInspection = false
  1147. this.projectList = []
  1148. this.inspectDataList = []
  1149. }
  1150. })
  1151. },
  1152. saveCreation(){
  1153. if (this.form.dry_weight == ""){
  1154. this.form.dry_weight = 0
  1155. }
  1156. if (this.form.dialysis_count == ""){
  1157. this.form.dialysis_count = 0
  1158. }
  1159. if (this.form.hd_count == ""){
  1160. this.form.hd_count = 0
  1161. }
  1162. if (this.form.hdf_count == ""){
  1163. this.form.hdf_count = 0
  1164. }
  1165. if (this.form.hp_count == ""){
  1166. this.form.hp_count = 0
  1167. }
  1168. if (this.form.other_count == ""){
  1169. this.form.other_count = 0
  1170. }
  1171. if (this.form.kalium == ""){
  1172. this.form.kalium = 0
  1173. }
  1174. if (this.form.autunite == ""){
  1175. this.form.autunite = 0
  1176. }
  1177. if (this.form.natrium == ""){
  1178. this.form.natrium = 0
  1179. }
  1180. if (this.form.hour == ""){
  1181. this.form.hour = 0
  1182. }
  1183. if (this.form.minute == ""){
  1184. this.form.minute = 0
  1185. }
  1186. if(this.form.befor_weight == ""){
  1187. this.form.befor_weight = 0
  1188. }
  1189. if(this.form.after_weight == ""){
  1190. this.form.after_weight = 0
  1191. }
  1192. if(this.form.befor_pressure == ""){
  1193. this.form.befor_pressure = 0
  1194. }
  1195. var year = this.form.start_year+"-"+"01"+"-"+"01"
  1196. console.log("年",year)
  1197. var month = this.form.start_year+"-"+this.form.start_month+"-"+"01"
  1198. console.log("月",month)
  1199. var params = {
  1200. title:this.form.title,
  1201. dry_weight:this.form.dry_weight.toString(),
  1202. dialysis_count:parseInt(this.form.dialysis_count),
  1203. hd_count:parseInt(this.form.hd_count),
  1204. hdf_count:parseInt(this.form.hdf_count),
  1205. hp_count:parseInt(this.form.hp_count),
  1206. other_count:parseInt(this.form.other_count),
  1207. dialzer_apparatus:this.form.dialzer_apparatus,
  1208. perfusion_apparatus:this.form.perfusion_apparatus,
  1209. anticoagulant:this.form.anticoagulant,
  1210. kalium:this.form.kalium.toString(),
  1211. autunite:this.form.autunite.toString(),
  1212. natrium:this.form.natrium.toString(),
  1213. hour:parseInt(this.form.hour),
  1214. minute:parseInt(this.form.minute),
  1215. befor_weight:this.form.befor_weight.toString(),
  1216. after_weight:this.form.after_weight.toString(),
  1217. befor_pressure:this.form.befor_pressure,
  1218. template_summary_content:this.form.template_summary_content,
  1219. template_plan_content:this.form.template_plan_content,
  1220. // template_inspection_content:JSON.stringify(this.form.template_inspection_content),
  1221. admin_user_id:this.form.admin_user_id,
  1222. record_time:this.getTime(this.form.record_time),
  1223. after_pressure:this.form.after_pressure,
  1224. template_summary_id:this.form.template_summary_id,
  1225. template_summary_content:this.form.template_summary_content,
  1226. template_plan_id:this.form.template_plan_id,
  1227. template_inspection_id:this.form.template_inspection_id,
  1228. patient_id:parseInt(this.patient_id),
  1229. project_id:this.projectStr,
  1230. inspect_date:this.projectIndate,
  1231. start_year:year,
  1232. start_month:month,
  1233. radio:this.form.radio,
  1234. }
  1235. console.log("parawm232323223",params)
  1236. saveCreation(params).then(response=>{
  1237. if(response.data.state ==1){
  1238. var summary = response.data.data.summary
  1239. // console.log("summary",summary)
  1240. this.getTemplateSummaryList()
  1241. this.$message.success("保存成功!");
  1242. this.show_dialog = false
  1243. this.form.title = ""
  1244. this.form.dry_weight = ""
  1245. this.form.dialysis_count =""
  1246. this.form.hd_count= ""
  1247. this.form.hdf_count = ""
  1248. this.form.hp_count = ""
  1249. this.form.other_count =""
  1250. this.form.dialzer_apparatus = ""
  1251. this.form.perfusion_apparatus = ""
  1252. this.form.anticoagulant = ""
  1253. this.form.kalium = ""
  1254. this.form.autunite = ""
  1255. this.form.natrium = ""
  1256. this.form.hour =""
  1257. this.form.minute = ""
  1258. this.form.befor_weight = ""
  1259. this.form.after_weight = ""
  1260. this.form.befor_pressure = ""
  1261. this.form.template_summary_content = ""
  1262. this.form.template_plan_content = ""
  1263. this.form.template_inspection_content = ""
  1264. this.form.admin_user_id = ""
  1265. this.form.record_time = ""
  1266. this.from.after_pressure = ""
  1267. this.form.template_summary_id = ""
  1268. this.form.template_plan_id = ""
  1269. this.form.template_inspection_id = ""
  1270. }
  1271. })
  1272. },
  1273. getTemplateSummaryList(){
  1274. var params = {
  1275. patient_id:this.patient_id,
  1276. start_time:this.start_time,
  1277. end_time:this.end_time,
  1278. }
  1279. console.log("param2222",params)
  1280. getTemplateSummaryList(params).then(response=>{
  1281. if(response.data.state ==1){
  1282. var list = response.data.data.list
  1283. this.inspectionList = list
  1284. this.$refs.inspection_table.setCurrentRow(this.inspectionList[0])
  1285. this.getCurrentRecordDetail(this.inspectionList[0].id)
  1286. }
  1287. })
  1288. },
  1289. getCurrentRecordDetail(id){
  1290. var params = {
  1291. id:id
  1292. }
  1293. getTemplateSummaryDetail(params).then(response=>{
  1294. if(response.data.state == 1){
  1295. var list = response.data.data.list
  1296. var inspectlist = response.data.data.inspectlist
  1297. console.log("inspectlist2322332",list)
  1298. let arr = this.unique(inspectlist,'project_name')
  1299. console.log("hhh23h2323223223232323",arr)
  1300. list.template_inspection_content = arr
  1301. this.editObj = list
  1302. }
  1303. })
  1304. },
  1305. getTime(val) {
  1306. if(val < 0){
  1307. return ""
  1308. }
  1309. if(val == ""){
  1310. return ""
  1311. }else {
  1312. return uParseTime(val, '{y}-{m}-{d}')
  1313. }
  1314. },
  1315. showInnerDialog: function(val) {
  1316. this.InnerDialogProps.visibility = true
  1317. switch (val) {
  1318. case '7': // 透析器
  1319. for(let i=0;i<this.dialyzerList.length;i++){
  1320. this.dialyzerList[i].name = this.dialyzerList[i].specification_name
  1321. }
  1322. this.InnerDialogProps.values = this.dialyzerList
  1323. this.InnerDialogProps.titles = '透析器'
  1324. this.InnerDialogProps.type = 'dialyzers'
  1325. this.InnerDialogProps.selected = this.form.dialzer_apparatus
  1326. this.InnerDialogProps.isShowTextArea = false
  1327. break
  1328. case '8':
  1329. for(let i=0;i<this.irrigationList.length;i++){
  1330. this.irrigationList[i].name = this.irrigationList[i].specification_name
  1331. }
  1332. this.InnerDialogProps.values = this.irrigationList
  1333. this.InnerDialogProps.titles = '灌流器'
  1334. this.InnerDialogProps.type = 'irrigations'
  1335. this.InnerDialogProps.selected = this.form.perfusion_apparatus
  1336. this.InnerDialogProps.isShowTextArea = false
  1337. break
  1338. }
  1339. },
  1340. innerDialogComfirm: function(val) {
  1341. this.InnerDialogProps.visibility = false
  1342. switch (val.type) {
  1343. case 'dialyzers':
  1344. this.form.dialzer_apparatus = val.value.join(',')
  1345. break
  1346. case 'irrigations':
  1347. this.form.perfusion_apparatus = val.value.join(',')
  1348. break
  1349. }
  1350. },
  1351. innerDialogCancle: function() {
  1352. this.InnerDialogProps.visibility = false
  1353. },
  1354. getCurrentRecordDetailOne(){
  1355. var params = {
  1356. id:this.form.id
  1357. }
  1358. getTemplateSummaryDetail(params).then(response=>{
  1359. if(response.data.state == 1){
  1360. var list = response.data.data.list
  1361. var inspectlist = response.data.data.inspectlist
  1362. let arr = this.unique(inspectlist,'project_name')
  1363. this.form.template_inspection_content = arr
  1364. this.edit_show_dialog = true
  1365. this.form.title = list.title
  1366. this.form.id = list.id
  1367. this.form.admin_user_id = list.admin_user_id
  1368. this.form.after_pressure = list.after_pressure
  1369. this.form.after_weight = list.after_weight
  1370. this.form.anticoagulant = list.anticoagulant
  1371. this.form.autunite = list.autunite
  1372. this.form.befor_pressure = list.befor_pressure
  1373. this.form.befor_weight = list.befor_weight
  1374. this.form.dialysis_count = list.dialysis_count
  1375. this.form.dialzer_apparatus = list.dialzer_apparatus
  1376. this.form.dry_weight = list.dry_weight
  1377. this.form.hd_count= list.hd_count
  1378. this.form.hdf_count= list.hdf_count
  1379. this.form.hour = list.hour
  1380. this.form.hp_count = list.hp_count
  1381. this.form.kalium= list.kalium
  1382. this.form.minute = list.minute
  1383. this.form.natrium =list.natrium
  1384. this.form.perfusion_apparatus= list.perfusion_apparatus
  1385. this.form.record_time = this.getTime(list.record_time)
  1386. this.form.template_inspection_id = list.template_inspection_id
  1387. this.form.template_plan_content = list.template_plan_content
  1388. this.form.template_summary_content =list.template_summary_content
  1389. this.form.template_summary_id = list.template_summary_id
  1390. this.projectIndate = list.inspect_date
  1391. this.projectStr = list.project_id
  1392. }
  1393. })
  1394. },
  1395. changeSummary(){
  1396. for(let i=0;i<this.summaryList.length;i++){
  1397. if(this.form.template_summary_id == this.summaryList[i].value){
  1398. this.form.template_summary_content = this.summaryList[i].content
  1399. }
  1400. }
  1401. },
  1402. changeSummaryOne(){
  1403. for(let i=0;i<this.summaryList.length;i++){
  1404. if(this.form.template_summary_id == this.summaryList[i].value){
  1405. this.form.template_summary_content = this.summaryList[i].content
  1406. }
  1407. }
  1408. },
  1409. changeTempalte(){
  1410. for(let i=0;i<this.planList.length;i++){
  1411. if(this.form.template_plan_id == this.planList[i].value){
  1412. this.form.template_plan_content = this.planList[i].content
  1413. }
  1414. }
  1415. },
  1416. editCreation(){
  1417. var params = {
  1418. id:this.form.id,
  1419. title:this.form.title,
  1420. dry_weight:this.form.dry_weight.toString(),
  1421. dialysis_count:parseInt(this.form.dialysis_count),
  1422. hd_count:parseInt(this.form.hd_count),
  1423. hdf_count:parseInt(this.form.hdf_count),
  1424. hp_count:parseInt(this.form.hp_count),
  1425. other_count:parseInt(this.form.other_count),
  1426. dialzer_apparatus:this.form.dialzer_apparatus,
  1427. perfusion_apparatus:this.form.perfusion_apparatus,
  1428. anticoagulant:this.form.anticoagulant,
  1429. kalium:this.form.kalium.toString(),
  1430. autunite:this.form.autunite.toString(),
  1431. natrium:this.form.natrium.toString(),
  1432. hour:parseInt(this.form.hour),
  1433. minute:parseInt(this.form.minute),
  1434. befor_weight:this.form.befor_weight.toString(),
  1435. after_weight:this.form.after_weight.toString(),
  1436. befor_pressure:this.form.befor_pressure,
  1437. template_summary_content:this.form.template_summary_content,
  1438. template_plan_content:this.form.template_plan_content,
  1439. admin_user_id:this.form.admin_user_id,
  1440. record_time:this.form.record_time,
  1441. after_pressure:this.form.after_pressure,
  1442. template_summary_id:this.form.template_summary_id,
  1443. template_plan_id:this.form.template_plan_id,
  1444. template_inspection_id:this.form.template_inspection_id,
  1445. patient_id:parseInt(this.patient_id),
  1446. project_id:this.projectStr,
  1447. inspect_date:this.projectIndate,
  1448. }
  1449. console.log("parawm232323223",params)
  1450. UpdateTemplateSummary(params).then(response=>{
  1451. if(response.data.state == 1){
  1452. var list = response.data.data.list
  1453. this.$message.success("保存成功")
  1454. this.edit_show_dialog = false
  1455. }
  1456. })
  1457. },
  1458. unique(data, key) {
  1459. let lastData = [];
  1460. data.forEach(item => {
  1461. let status = lastData.some(project_name => project_name[key] == item[key]);
  1462. if (!status) {
  1463. let obj = {
  1464. project_name:'',
  1465. arr:[]
  1466. }
  1467. obj.project_name = item.project_name
  1468. obj.arr.push(item);
  1469. lastData.push(obj);
  1470. } else {
  1471. lastData.forEach((project_name, index) => {
  1472. if (project_name[key] === item[key]) {
  1473. project_name.arr.push(item);
  1474. }
  1475. });
  1476. }
  1477. });
  1478. return lastData;
  1479. },
  1480. getDoctor(id){
  1481. var user_name = ""
  1482. for(let i=0;i<this.docList.length;i++){
  1483. if(id == this.docList[i].admin_user_id){
  1484. user_name = this.docList[i].user_name
  1485. }
  1486. }
  1487. return user_name
  1488. },
  1489. changeStartYear(){
  1490. this.form.title = ""
  1491. this.form.dry_weight = ""
  1492. this.form.dialysis_count =""
  1493. this.form.hd_count= ""
  1494. this.form.hdf_count = ""
  1495. this.form.hp_count = ""
  1496. this.form.other_count =""
  1497. this.form.dialzer_apparatus = ""
  1498. this.form.perfusion_apparatus = ""
  1499. this.form.anticoagulant = ""
  1500. this.form.kalium = ""
  1501. this.form.autunite = ""
  1502. this.form.natrium = ""
  1503. this.form.hour =""
  1504. this.form.minute = ""
  1505. this.form.befor_weight = ""
  1506. this.form.after_weight = ""
  1507. this.form.befor_pressure = ""
  1508. this.form.template_summary_content = ""
  1509. this.form.template_plan_content = ""
  1510. this.form.template_inspection_content = ""
  1511. this.form.admin_user_id = ""
  1512. this.form.record_time = ""
  1513. this.from.after_pressure = ""
  1514. this.form.template_summary_id = ""
  1515. this.form.template_plan_id = ""
  1516. this.form.template_inspection_id = ""
  1517. this.start_year = this.form.start_year
  1518. console.log("年份",this.form.start_year)
  1519. console.log("月份",this.getTimeOne(this.form.start_month))
  1520. var start = this.form.start_year + "-" + this.getTimeOne(this.form.start_month) + "-"+"01"
  1521. var end = this.form.start_year + "-" + this.getTimeOne(this.form.start_month) + "-"+"30"
  1522. this.start_date = start
  1523. this.end_date = end
  1524. this.getlist()
  1525. },
  1526. changeStartMonth(){
  1527. this.form.title = ""
  1528. this.form.dry_weight = ""
  1529. this.form.dialysis_count =""
  1530. this.form.hd_count= ""
  1531. this.form.hdf_count = ""
  1532. this.form.hp_count = ""
  1533. this.form.other_count =""
  1534. this.form.dialzer_apparatus = ""
  1535. this.form.perfusion_apparatus = ""
  1536. this.form.anticoagulant = ""
  1537. this.form.kalium = ""
  1538. this.form.autunite = ""
  1539. this.form.natrium = ""
  1540. this.form.hour =""
  1541. this.form.minute = ""
  1542. this.form.befor_weight = ""
  1543. this.form.after_weight = ""
  1544. this.form.befor_pressure = ""
  1545. this.form.template_summary_content = ""
  1546. this.form.template_plan_content = ""
  1547. this.form.template_inspection_content = ""
  1548. this.form.admin_user_id = ""
  1549. this.form.record_time = ""
  1550. this.from.after_pressure = ""
  1551. this.form.template_summary_id = ""
  1552. this.form.template_plan_id = ""
  1553. this.form.template_inspection_id = ""
  1554. var start = this.start_year +"-"+ this.form.start_month+"-"+"01"
  1555. var end = this.start_year +"-"+ this.form.start_month + "-"+"30"
  1556. this.start_date = start
  1557. this.end_date = end
  1558. console.log("开始时间",this.start_date)
  1559. console.log("结束时间",this.end_date)
  1560. this.getlist()
  1561. },
  1562. changeQuarter(val){
  1563. this.form.title = ""
  1564. this.form.dry_weight = ""
  1565. this.form.dialysis_count =""
  1566. this.form.hd_count= ""
  1567. this.form.hdf_count = ""
  1568. this.form.hp_count = ""
  1569. this.form.other_count =""
  1570. this.form.dialzer_apparatus = ""
  1571. this.form.perfusion_apparatus = ""
  1572. this.form.anticoagulant = ""
  1573. this.form.kalium = ""
  1574. this.form.autunite = ""
  1575. this.form.natrium = ""
  1576. this.form.hour =""
  1577. this.form.minute = ""
  1578. this.form.befor_weight = ""
  1579. this.form.after_weight = ""
  1580. this.form.befor_pressure = ""
  1581. this.form.template_summary_content = ""
  1582. this.form.template_plan_content = ""
  1583. this.form.template_inspection_content = ""
  1584. this.form.admin_user_id = ""
  1585. this.form.record_time = ""
  1586. this.from.after_pressure = ""
  1587. this.form.template_summary_id = ""
  1588. this.form.template_plan_id = ""
  1589. this.form.template_inspection_id = ""
  1590. if(val == 1){
  1591. this.start_date = this.start_year+"-"+"01"+"-"+"01"
  1592. this.end_date = this.start_year +"-"+"03"+"-"+"31"
  1593. }
  1594. if(val == 2){
  1595. this.start_date = this.start_year +"-"+ "04"+"-"+"01"
  1596. this.end_date = this.start_year +"-"+ "06"+"-"+"30"
  1597. }
  1598. if(val == 3){
  1599. this.start_date = this.start_year +"-"+ "07"+"-"+"01"
  1600. this.end_date = this.start_year +"-"+ "09"+"-"+"30"
  1601. }
  1602. if(val == 4){
  1603. this.start_date = this.start_year +"-"+ "09"+"-"+"01"
  1604. this.end_date = this.start_year +"-"+ "12"+"-"+"31"
  1605. }
  1606. this.getlist()
  1607. },
  1608. getAnticoagulant(id){
  1609. var name = ""
  1610. for(let i=0;i<this.anticoagulantList.length;i++){
  1611. if(id == this.anticoagulantList[i].id){
  1612. name = this.anticoagulantList[i].name
  1613. }
  1614. }
  1615. return name
  1616. },
  1617. changeYear(val){
  1618. console.log("val2323323223",val)
  1619. this.startYear = val+"-" + "30"
  1620. this.getInspectionMajor()
  1621. }
  1622. },
  1623. // watch: {
  1624. // inspectionList: function() {
  1625. // this.$nextTick(function() {
  1626. // this.$refs.inspection_table.setCurrentRow(this.inspectionList[0])
  1627. // })
  1628. // },
  1629. // },
  1630. }
  1631. </script>
  1632. <style rel="stylesheet/css" lang="scss" scoped>
  1633. .borderBox{
  1634. border: 1px solid #DCDFE6;
  1635. padding: 10px;
  1636. margin-top: 10px;
  1637. border-radius: 4px;
  1638. p{
  1639. font-weight: bold;
  1640. font-size: 20px;
  1641. margin: 10px 0;
  1642. }
  1643. }
  1644. .container {
  1645. margin-left: 180px;
  1646. padding: 20px;
  1647. background: #fff;
  1648. min-height: calc(100vh - 173px);
  1649. margin-bottom: 15px;
  1650. .record {
  1651. padding-top: 20px;
  1652. }
  1653. }
  1654. .record_content_panel {
  1655. border-width: 1px;
  1656. border-style: solid;
  1657. border-color: #ebeef5;
  1658. min-height: 200px;
  1659. .title {
  1660. font-size: 14px;
  1661. font-weight: 500;
  1662. color: #909399;
  1663. line-height: 44px;
  1664. height: 44px;
  1665. text-align: center;
  1666. border-bottom-width: 1px;
  1667. border-bottom-style: solid;
  1668. border-bottom-color: #ebeef5;
  1669. }
  1670. .content {
  1671. padding: 12px 15px;
  1672. font-size: 15px;
  1673. color: gray;
  1674. line-height: 22px;
  1675. }
  1676. }
  1677. .new_record_form {
  1678. /*/ / padding: 10 px, 25 px;*/
  1679. .textarea_panel {
  1680. margin-top: 10px;
  1681. }
  1682. }
  1683. </style>
  1684. <style>
  1685. .el-table td,
  1686. .el-table th.is-leaf,
  1687. .el-table--border,
  1688. .el-table--group {
  1689. border-color: #d0d3da;
  1690. }
  1691. .el-table--border::after,
  1692. .el-table--group::after,
  1693. .el-table::before {
  1694. background-color: #d0d3da;
  1695. }
  1696. </style>