templateSummary.vue 71KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825
  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" type="danger" @click="deleteAction">删除</el-button>
  15. </span>
  16. </div>
  17. <!--<div></div>-->
  18. <div class="cell clearfix">
  19. <label class="title"><span class="name">日期查询</span> : </label>
  20. <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
  21. type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
  22. value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
  23. <span class="">-</span>
  24. <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
  25. type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
  26. value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
  27. </div>
  28. <div class="record">
  29. <el-row :gutter="15">
  30. <el-col :span="10">
  31. <el-table :header-cell-style="{
  32. backgroundColor: 'rgb(245, 247, 250)',
  33. color: '#606266'
  34. }"
  35. :row-style="{ color: '#303133' }" ref="inspection_table" :data="inspectionList"
  36. border highlight-current-row @current-change="changeCurrentRecordTwo"
  37. @selection-change="selectSummary"
  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:30px;">干体重(kg):{{editObj.dry_weight}}</span>
  65. <span style="margin-right:10px;line-height:30px;">共透析:{{editObj.dialysis_count}}次</span>
  66. <span style="margin-right:10px;line-height:30px;">HD:{{editObj.hd_count}}次</span>
  67. <br>
  68. <span style="margin-right:10px;line-height:30px;">HDF:{{editObj.hdf_count}}次</span>
  69. <span style="margin-right:10px;line-height:30px;">HP:{{editObj.hp_count}}次</span>
  70. <span style="margin-right:10px;line-height:30px;">其他:{{editObj.other_count}}次</span>
  71. <br>
  72. <span style="margin-right:10px;line-height:30px;">透析器:{{editObj.dialzer_apparatus}}</span>
  73. <span style="margin-right:10px;line-height:30px;">灌流器:{{editObj.perfusion_apparatus}}</span>
  74. <span style="margin-right:10px;line-height:30px;">抗凝剂:
  75. <span> {{getAnticoagulant(editObj.anticoagulant)}}</span>
  76. </span>
  77. <span style="margin-right:10px;line-height:30px;">透析液:(钾:{{editObj.kalium}} 钙:{{editObj.autunite}} Na:{{editObj.natrium}})</span>
  78. <br>
  79. <span style="margin-right:10px;line-height:30px;">每次透析:<span v-if="editObj.hour!=''"> {{editObj.hour}}小时</span>
  80. <span v-if="editObj.minute!=''">{{editObj.minute}}</span>分</span>
  81. <span style="margin-right:10px;line-height:30px;">透前体重(kg):{{editObj.befor_weight}}</span>
  82. <span style="margin-right:10px;line-height:30px;">透后体重(kg):{{editObj.after_weight}}</span>
  83. <br>
  84. <span style="margin-right:10px;line-height:30px;">透前血压(mmHg):{{editObj.befor_pressure}}</span>
  85. <span style="margin-right:10px;line-height:30px;">透后血压(mmHg):{{editObj.after_pressure}}</span>
  86. </div>
  87. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">阶段小结总结:
  88. {{editObj.template_summary_content}}
  89. </div>
  90. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">阶段小结化验结果:
  91. <div>
  92. <div v-for="item in editObj.template_inspection_content">
  93. <p style="font-weight: bold;margin: 10px 0;">{{ item.project_name }} 检查日期:{{getTime(item.arr[0].inspect_date)}}</p>
  94. <div style="display:flex;flex-wrap: wrap;">
  95. <div v-for="it in item.arr" style="width:33%;margin-bottom:5px;">
  96. {{ it.item_name }} <span v-if="it.unit!=''">[{{it.unit}}]</span>:
  97. {{it.inspect_value}}
  98. <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
  99. </span>
  100. <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
  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. {{it.inspect_value}}
  326. <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
  327. </span>
  328. <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
  329. </span>
  330. </div>
  331. </div>
  332. </div>
  333. </div>
  334. </el-row>
  335. <el-row style="margin:10px 0 0;">
  336. <el-col :span="8">
  337. <el-form-item label="记录医生">
  338. <el-select v-model="form.admin_user_id" placeholder="请选择">
  339. <el-option
  340. v-for="item in docList"
  341. :key="item.admin_user_id"
  342. :label="item.user_name"
  343. :value="item.admin_user_id">
  344. </el-option>
  345. </el-select>
  346. </el-form-item>
  347. </el-col>
  348. <el-col :span="8">
  349. <el-form-item label="记录时间">
  350. <el-date-picker
  351. v-model="form.record_time"
  352. type="datetime"
  353. value-format="yyyy-MM-dd"
  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. {{it.inspect_value}}
  575. <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
  576. </span>
  577. <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
  578. </span>
  579. </div>
  580. </div>
  581. </div>
  582. </div>
  583. </el-row>
  584. <el-row style="margin-top:10px;">
  585. <el-col :span="8">
  586. <el-form-item label="记录医生">
  587. <el-select v-model="form.admin_user_id" placeholder="请选择">
  588. <el-option
  589. v-for="item in docList"
  590. :key="item.admin_user_id"
  591. :label="item.user_name"
  592. :value="item.admin_user_id">
  593. </el-option>
  594. </el-select>
  595. </el-form-item>
  596. </el-col>
  597. <el-col :span="8">
  598. <el-form-item label="记录时间">
  599. <el-date-picker
  600. v-model="form.record_time"
  601. type="datetime"
  602. value-format="yyyy-MM-dd"
  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.inspect_value}}
  703. <span v-if="parseInt(scope.row.inspect_value) < parseInt(scope.row.range_min)">
  704. </span>
  705. <span v-if="parseInt(scope.row.inspect_value) > parseInt(scope.row.range_max)">
  706. </span>
  707. </template>
  708. </el-table-column>
  709. <el-table-column label="参考值" align="center">
  710. <template slot-scope="scope">
  711. {{scope.row.range_min}} ~ {{scope.row.range_max}}
  712. </template>
  713. </el-table-column>
  714. <el-table-column label="单位" align="center">
  715. <template slot-scope="scope">
  716. {{scope.row.unit}}
  717. </template>
  718. </el-table-column>
  719. </el-table>
  720. </div>
  721. </el-col>
  722. </el-row>
  723. </div>
  724. </el-row>
  725. </el-form>
  726. </span>
  727. <span slot="footer" class="dialog-footer">
  728. <el-button @click="dialogVisibleInspection = false">取 消</el-button>
  729. <el-button type="primary" @click="toContent">确 定</el-button>
  730. </span>
  731. </el-dialog>
  732. <multi-select-box
  733. :propsForm="InnerDialogProps"
  734. v-on:dialog-comfirm="innerDialogComfirm"
  735. v-on:dialog-cancle="innerDialogCancle"
  736. ></multi-select-box>
  737. </div>
  738. </div>
  739. <!-- </div> -->
  740. </template>
  741. <script>
  742. import PatientSidebar from './components/PatientSidebar'
  743. import Editor from '@/components/Editor'
  744. import { getInitDataList,getInspectionMajorItem,getInspectionDetail,getInspectionItemList,saveCreation,getTemplateSummaryList,getTemplateSummaryDetail,UpdateTemplateSummary,deleteSummary } from '@/api/patient'
  745. import { parseTime } from '@/utils'
  746. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  747. import { uParseTime } from '@/utils/tools'
  748. import { getDataConfig } from '@/utils/data'
  749. import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
  750. import MsgTip from '../dialysis/details/dialog/MsgTip'
  751. const moment = require('moment')
  752. export default {
  753. name: 'templateSummary',
  754. components: {
  755. PatientSidebar,
  756. BreadCrumb,
  757. Editor,
  758. MsgTip,
  759. multiSelectBox,
  760. },
  761. data() {
  762. return {
  763. InnerDialogProps: {
  764. values: [],
  765. visibility: false,
  766. isShowTextArea: true,
  767. customContent: '',
  768. titles: '',
  769. type: '' // 不同弹框类型,用来匹配数据
  770. },
  771. loading: false,
  772. title: '',
  773. patient_id: 0,
  774. date: [],
  775. start_time: '',
  776. end_time: '',
  777. course_of_disease_time: '',
  778. records: [],
  779. doctors: [],
  780. current_select_record: null,
  781. show_dialog: false,
  782. show_edit_dialog: false,
  783. uploading_new_record: false,
  784. templates: this.$store.getters.configlist.course_disease,
  785. select_template: '',
  786. new_content: '',
  787. edit_new_content: '',
  788. edit_course_of_disease_time: '',
  789. selectingRows: [],
  790. table_current_index: -1,
  791. edit_current_id: 0,
  792. edit_title: '',
  793. value:'',
  794. form:{
  795. id:0,
  796. title:"",
  797. start_year:new Date(),
  798. start_month:new Date(),
  799. radio:1,
  800. quarter:1,
  801. dry_weight:"",
  802. dialysis_count:"",
  803. hd_count:"",
  804. hdf_count:"",
  805. hp_count:"",
  806. other_count:"",
  807. dialzer_apparatus:"",
  808. perfusion_apparatus:"",
  809. anticoagulant:"",
  810. kalium:"",
  811. autunite:"",
  812. natrium:"",
  813. hour:"",
  814. minute:"",
  815. befor_weight:"",
  816. after_weight:"",
  817. befor_pressure:"",
  818. after_pressure:"",
  819. template_summary_id:"",
  820. template_summary_content:"",
  821. template_plan_id:"",
  822. template_summary_content:"",
  823. template_inspection_id:0,
  824. template_inspection_content:"",
  825. admin_user_id:this.$store.getters.xt_user.user.id,
  826. record_time: moment().locale('zh-cn').format('YYYY-MM-DD'),
  827. patient_id:"",
  828. start_time:"",
  829. end_time:"",
  830. template_plan_content:"",
  831. },
  832. timeType:[
  833. {id:1,name:"第一季度"},
  834. {id:2,name:"第二季度"},
  835. {id:3,name:"第三季度"},
  836. {id:4,name:"第四季度"},
  837. ],
  838. monthType:[
  839. {id:1,name:"一月"},
  840. {id:2,name:"二月"},
  841. {id:3,name:"三月"},
  842. {id:4,name:"四月"},
  843. {id:5,name:"五月"},
  844. {id:6,name:"六月"},
  845. {id:7,name:"七月"},
  846. {id:8,name:"八月"},
  847. {id:9,name:"九月"},
  848. {id:10,name:"十月"},
  849. {id:11,name:"十一月"},
  850. {id:12,name:"十二月"},
  851. ],
  852. options:[],
  853. dialogVisibleInspection:false,
  854. editDialogVisible:false,
  855. edit_show_dialog:false,
  856. InspectionMajor:[],
  857. other_start_time:"",
  858. startYear:moment(new Date()).endOf('month').subtract('month', +1).endOf('month').format("YYYY-MM-DD") ,
  859. // startMonth:(new Date().getMonth - 1).toString(),
  860. tableList:[],
  861. tableData:[],
  862. inspectDataList:[],
  863. projectList:[],
  864. docList:[],
  865. inspectionList:[],
  866. editObj:{},
  867. anticoagulantList:[],
  868. dialyzerPerfusionApparatus:[],
  869. irrigations:[],
  870. dialyzerList:[],
  871. irrigationList:[],
  872. stockType:[],
  873. summaryList:[],
  874. planList:[],
  875. projectStr:"",
  876. projectIndate:"",
  877. start_year:"2021",
  878. start_month:"",
  879. start_date: moment(new Date()).startOf("month").format("YYYY-MM-DD"),
  880. end_date: moment(new Date()).endOf('month').format("YYYY-MM-DD"),
  881. ids:"",
  882. }
  883. },
  884. created() {
  885. console.log("this.$store.getters.xt_user.user.id",this.$store.getters.xt_user.user.id)
  886. this.patient_id = this.$route.params && this.$route.params.id
  887. var now = new Date()
  888. this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
  889. var nowDate = new Date()
  890. var nowYear = nowDate.getFullYear()
  891. var nowMonth = nowDate.getMonth() + 1
  892. var nowDay = nowDate.getDate()
  893. this.end_time =
  894. nowYear +
  895. '-' +
  896. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  897. '-' +
  898. (nowDay < 10 ? '0' + nowDay : nowDay)
  899. nowDate.setMonth(nowDate.getMonth() - 1)
  900. nowYear = nowDate.getFullYear()
  901. nowMonth = nowDate.getMonth() + 1
  902. nowDay = nowDate.getDate()
  903. this.start_time =
  904. nowYear +
  905. '-' +
  906. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  907. '-' +
  908. (nowDay < 10 ? '0' + nowDay : nowDay)
  909. this.other_start_time = nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' + (nowDay < 10 ? '0' + nowDay : nowDay)
  910. var anticoagulantsConfitOne = this.$store.getters.anticoagulants_confit
  911. const arrFour = []
  912. Object.keys(anticoagulantsConfitOne).map((item, index) => {
  913. if (index != 2) {
  914. arrFour.push(anticoagulantsConfitOne[item])
  915. }
  916. })
  917. this.anticoagulantList = arrFour
  918. console.log("抗凝剂量",this.anticoagulantList)
  919. var endtime= moment(new Date()).endOf('month').subtract('month', +1).endOf('month').format("YYYY-MM-DD")
  920. console.log("endtime",endtime)
  921. this.getlist()
  922. this.getInspectionMajor()
  923. this.getTemplateSummaryList()
  924. },
  925. methods: {
  926. getTime(value, temp) {
  927. if (value == 0) {
  928. return ''
  929. }
  930. if (value != undefined) {
  931. return uParseTime(value, temp)
  932. }
  933. return ''
  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. onRowClick(){
  949. },
  950. didChangeCurrentRecord(){
  951. },
  952. changeCurrentRecord(val){
  953. this.getInspectionDetai(val)
  954. },
  955. selectionChangeOne(val){
  956. // console.log("hhhhhhhhh",val)
  957. this.getInspectionItemList(val)
  958. },
  959. startTimeChange(val){
  960. console.log("val",val)
  961. this.start_time = val
  962. this.getTemplateSummaryList()
  963. },
  964. endTimeChange(val){
  965. this.end_time = val
  966. this.getTemplateSummaryList()
  967. },
  968. print(){
  969. this.$router.push({path:"/patient/patient/templateSummary/print?id="+this.form.id})
  970. },
  971. tableRow(){
  972. },
  973. getQuarter(year,quarter){
  974. var start_time = ""
  975. if(quarter == 1){
  976. }
  977. },
  978. didSelectionChange(){
  979. },
  980. changeCurrentRecordTwo(val){
  981. this.form.id = val.id
  982. this.getCurrentRecordDetail(val.id)
  983. },
  984. changeCurrentRecordOne(){
  985. },
  986. getlist(){
  987. var params={
  988. start_year:this.getTime(this.form.start_year),
  989. start_month:this.getTime(this.form.start_month),
  990. quarter:this.form.quarter,
  991. patient_id:this.patient_id,
  992. start_time:this.start_date,
  993. end_time:this.end_date,
  994. }
  995. console.log("世纪时间",params)
  996. console.log(moment(moment(2020 + '-01-01').toDate()).quarter(2).format("YYYY-MM-DD"))
  997. getInitDataList(params).then(response=>{
  998. if(response.data.state == 1){
  999. var prescription_list = response.data.data.prescription_list
  1000. this.form.dialzer_apparatus = prescription_list.dialysis_dialyszers
  1001. this.form.perfusion_apparatus = prescription_list.dialysis_irrigation
  1002. this.form.anticoagulant = prescription_list.anticoagulant
  1003. this.form.hour = prescription_list.dialysis_duration_hour
  1004. this.form.minute = prescription_list.dialysis_duration_minute
  1005. this.form.kalium = prescription_list.kalium
  1006. this.form.natrium = prescription_list.sodium
  1007. this.form.autunite = prescription_list.calcium
  1008. var beforlist = response.data.data.beforlist
  1009. console.log("透前数据565665565656",beforlist)
  1010. this.form.befor_weight = beforlist.weight_before
  1011. this.form.dry_weight = beforlist.dry_weight
  1012. var afterlist = response.data.data.after_list
  1013. console.log("透后数据232332323232",afterlist)
  1014. this.form.after_weight = afterlist.weight_after
  1015. this.form.after_pressure = afterlist.systolic_blood_pressure + "/"+afterlist.diastolic_blood_pressure
  1016. this.form.befor_pressure = beforlist.systolic_blood_pressure +"/"+beforlist.diastolic_blood_pressure
  1017. var modelist = response.data.data.modelist
  1018. console.log("modelist",modelist)
  1019. var docList = response.data.data.docList
  1020. // console.log("doctlist",docList)
  1021. this.docList = docList
  1022. var stockType = response.data.data.stockType
  1023. var arr = []
  1024. var arrTwo = []
  1025. for(let i=0;i<stockType.length;i++){
  1026. if(stockType[i].stock_attribute == 2){
  1027. arr.push(stockType[i])
  1028. }
  1029. if(stockType[i].stock_attribute == 3){
  1030. arrTwo.push(stockType[i])
  1031. }
  1032. }
  1033. var dialyzator = []
  1034. var irrigation = []
  1035. for(let i=0;i<arr.length;i++){
  1036. for(let j=0;j<arr[i].GoodInfo.length;j++){
  1037. dialyzator.push(arr[i].GoodInfo[j])
  1038. }
  1039. }
  1040. this.dialyzerList = dialyzator
  1041. // console.log("arrtt2323232332232323",arrTwo)
  1042. for(let i=0;i<arrTwo.length;i++){
  1043. for(let j=0;j<arrTwo[i].GoodInfo.length;j++){
  1044. irrigation.push(arrTwo[i].GoodInfo[j])
  1045. }
  1046. }
  1047. this.irrigationList = irrigation
  1048. // console.log("透析器233223",this.dialyzerList)
  1049. // console.log("灌流器323323223",this.irrigationList)
  1050. var count = ""
  1051. var total_count = 0
  1052. for(let i=0;i<modelist.length;i++){
  1053. total_count += modelist[i].count
  1054. if(modelist[i].mode_id == 1){
  1055. this.form.hd_count = modelist[i].count
  1056. }
  1057. if(modelist[i].mode_id == 2){
  1058. this.form.hdf_count = modelist[i].count
  1059. }
  1060. if(modelist[i].mode_id == 4){
  1061. this.form.hp_count = modelist[i].count
  1062. }
  1063. if(modelist[i].mode_id!=1&&modelist[i].mode_id!=2 && modelist[i].mode_id!=4){
  1064. count += modelist[i].count
  1065. }
  1066. }
  1067. this.form.other_count = count
  1068. this.form.dialysis_count = total_count
  1069. // console.log("modelist",modelist)
  1070. var summaryList = response.data.data.summaryList
  1071. // console.log("summaryList",summaryList)
  1072. this.summaryList = summaryList
  1073. var planList = response.data.data.planList
  1074. // console.log("planlist",planList)
  1075. this.planList = planList
  1076. }
  1077. })
  1078. },
  1079. toInspection(){
  1080. this.dialogVisibleInspection = true
  1081. },
  1082. //获取大项数据来源
  1083. getInspectionMajor(){
  1084. console.log("start_year",this.startYear)
  1085. var params = {
  1086. other_start_time:this.startYear,
  1087. patient_id:this.patient_id,
  1088. }
  1089. console.log("开始数据",params)
  1090. getInspectionMajorItem(params).then(response=>{
  1091. if(response.data.state == 1){
  1092. var list = response.data.data.list
  1093. console.log("列表23232232323",list)
  1094. // this.$refs.single_table.setCurrentRow(list[0])
  1095. this.tableList = list
  1096. }
  1097. })
  1098. },
  1099. //获取小项的值
  1100. getInspectionDetai(val){
  1101. var params = {
  1102. project_id:val.project_id,
  1103. patient_id:val.patient_id,
  1104. inspect_date:val.inspect_date,
  1105. }
  1106. // console.log("param2233233223",params)
  1107. getInspectionDetail(params).then(response=>{
  1108. if(response.data.state ==1){
  1109. var list = response.data.data.list
  1110. // console.log("详情222",list)
  1111. this.tableData = list
  1112. }
  1113. })
  1114. },
  1115. selectionChange(val){
  1116. // console.log("val233223",val)
  1117. selectionChange().then(response=>{
  1118. })
  1119. },
  1120. getInspectionItemList(val){
  1121. this.projectList = []
  1122. this.inspectDataList = []
  1123. for(let i=0;i<val.length;i++){
  1124. this.projectList.push(val[i].project_id)
  1125. this.inspectDataList.push(val[i].inspect_date)
  1126. }
  1127. },
  1128. toContent(){
  1129. var str = this.projectList.join(",")
  1130. this.projectStr = str
  1131. var inspe_date = this.inspectDataList.join(",")
  1132. this.projectIndate = inspe_date
  1133. var params = {
  1134. ids:str,
  1135. inspect_date:inspe_date,
  1136. patient_id:this.patient_id,
  1137. }
  1138. // console.log("params",params)
  1139. getInspectionItemList(params).then(response=>{
  1140. if(response.data.state == 1){
  1141. var list = response.data.data.list
  1142. let arr = this.unique(list,'project_name')
  1143. // console.log("选择检验检查",arr)
  1144. this.form.template_inspection_content = arr
  1145. this.dialogVisibleInspection = false
  1146. }
  1147. })
  1148. },
  1149. saveCreation(){
  1150. if (this.form.dry_weight == ""){
  1151. this.form.dry_weight = 0
  1152. }
  1153. if (this.form.dialysis_count == ""){
  1154. this.form.dialysis_count = 0
  1155. }
  1156. if (this.form.hd_count == ""){
  1157. this.form.hd_count = 0
  1158. }
  1159. if (this.form.hdf_count == ""){
  1160. this.form.hdf_count = 0
  1161. }
  1162. if (this.form.hp_count == ""){
  1163. this.form.hp_count = 0
  1164. }
  1165. if (this.form.other_count == ""){
  1166. this.form.other_count = 0
  1167. }
  1168. if (this.form.kalium == ""){
  1169. this.form.kalium = 0
  1170. }
  1171. if (this.form.autunite == ""){
  1172. this.form.autunite = 0
  1173. }
  1174. if (this.form.natrium == ""){
  1175. this.form.natrium = 0
  1176. }
  1177. if (this.form.hour == ""){
  1178. this.form.hour = 0
  1179. }
  1180. if (this.form.minute == ""){
  1181. this.form.minute = 0
  1182. }
  1183. if(this.form.befor_weight == ""){
  1184. this.form.befor_weight = 0
  1185. }
  1186. if(this.form.after_weight == ""){
  1187. this.form.after_weight = 0
  1188. }
  1189. if(this.form.befor_pressure == ""){
  1190. this.form.befor_pressure = 0
  1191. }
  1192. var year = this.form.start_year+"-"+"01"+"-"+"01"
  1193. console.log("年",year)
  1194. var month = this.form.start_year+"-"+this.form.start_month+"-"+"01"
  1195. console.log("月",month)
  1196. var params = {
  1197. title:this.form.title,
  1198. dry_weight:this.form.dry_weight.toString(),
  1199. dialysis_count:parseInt(this.form.dialysis_count),
  1200. hd_count:parseInt(this.form.hd_count),
  1201. hdf_count:parseInt(this.form.hdf_count),
  1202. hp_count:parseInt(this.form.hp_count),
  1203. other_count:parseInt(this.form.other_count),
  1204. dialzer_apparatus:this.form.dialzer_apparatus,
  1205. perfusion_apparatus:this.form.perfusion_apparatus,
  1206. anticoagulant:this.form.anticoagulant,
  1207. kalium:this.form.kalium.toString(),
  1208. autunite:this.form.autunite.toString(),
  1209. natrium:this.form.natrium.toString(),
  1210. hour:parseInt(this.form.hour),
  1211. minute:parseInt(this.form.minute),
  1212. befor_weight:this.form.befor_weight.toString(),
  1213. after_weight:this.form.after_weight.toString(),
  1214. befor_pressure:this.form.befor_pressure,
  1215. template_summary_content:this.form.template_summary_content,
  1216. template_plan_content:this.form.template_plan_content,
  1217. // template_inspection_content:JSON.stringify(this.form.template_inspection_content),
  1218. admin_user_id:this.form.admin_user_id,
  1219. record_time:this.getTime(this.form.record_time),
  1220. after_pressure:this.form.after_pressure,
  1221. template_summary_id:this.form.template_summary_id,
  1222. template_summary_content:this.form.template_summary_content,
  1223. template_plan_id:this.form.template_plan_id,
  1224. template_inspection_id:this.form.template_inspection_id,
  1225. patient_id:parseInt(this.patient_id),
  1226. project_id:this.projectStr,
  1227. inspect_date:this.projectIndate,
  1228. start_year:year,
  1229. start_month:month,
  1230. radio:this.form.radio,
  1231. }
  1232. console.log("parawm232323223",params)
  1233. saveCreation(params).then(response=>{
  1234. if(response.data.state ==1){
  1235. var summary = response.data.data.summary
  1236. // console.log("summary",summary)
  1237. this.getTemplateSummaryList()
  1238. this.$message.success("保存成功!");
  1239. this.show_dialog = false
  1240. this.form.title = ""
  1241. this.form.dry_weight = ""
  1242. this.form.dialysis_count =""
  1243. this.form.hd_count= ""
  1244. this.form.hdf_count = ""
  1245. this.form.hp_count = ""
  1246. this.form.other_count =""
  1247. this.form.dialzer_apparatus = ""
  1248. this.form.perfusion_apparatus = ""
  1249. this.form.anticoagulant = ""
  1250. this.form.kalium = ""
  1251. this.form.autunite = ""
  1252. this.form.natrium = ""
  1253. this.form.hour =""
  1254. this.form.minute = ""
  1255. this.form.befor_weight = ""
  1256. this.form.after_weight = ""
  1257. this.form.befor_pressure = ""
  1258. this.form.template_summary_content = ""
  1259. this.form.template_plan_content = ""
  1260. this.form.template_inspection_content = ""
  1261. this.form.admin_user_id = ""
  1262. this.form.record_time = ""
  1263. this.from.after_pressure = ""
  1264. this.form.template_summary_id = ""
  1265. this.form.template_plan_id = ""
  1266. this.form.template_inspection_id = ""
  1267. }
  1268. })
  1269. },
  1270. getTemplateSummaryList(){
  1271. var params = {
  1272. patient_id:this.patient_id,
  1273. start_time:this.start_time,
  1274. end_time:this.end_time,
  1275. }
  1276. console.log("param2222",params)
  1277. getTemplateSummaryList(params).then(response=>{
  1278. if(response.data.state ==1){
  1279. var list = response.data.data.list
  1280. this.inspectionList = list
  1281. this.$refs.inspection_table.setCurrentRow(this.inspectionList[0])
  1282. this.getCurrentRecordDetail(this.inspectionList[0].id)
  1283. }
  1284. })
  1285. },
  1286. getCurrentRecordDetail(id){
  1287. var params = {
  1288. id:id
  1289. }
  1290. getTemplateSummaryDetail(params).then(response=>{
  1291. if(response.data.state == 1){
  1292. var list = response.data.data.list
  1293. var inspectlist = response.data.data.inspectlist
  1294. console.log("inspectlist2322332",list)
  1295. let arr = this.unique(inspectlist,'project_name')
  1296. console.log("hhh23h2323223223232323",arr)
  1297. list.template_inspection_content = arr
  1298. this.editObj = list
  1299. }
  1300. })
  1301. },
  1302. getTime(val) {
  1303. if(val < 0){
  1304. return ""
  1305. }
  1306. if(val == ""){
  1307. return ""
  1308. }else {
  1309. return uParseTime(val, '{y}-{m}-{d}')
  1310. }
  1311. },
  1312. showInnerDialog: function(val) {
  1313. this.InnerDialogProps.visibility = true
  1314. switch (val) {
  1315. case '7': // 透析器
  1316. for(let i=0;i<this.dialyzerList.length;i++){
  1317. this.dialyzerList[i].name = this.dialyzerList[i].specification_name
  1318. }
  1319. this.InnerDialogProps.values = this.dialyzerList
  1320. this.InnerDialogProps.titles = '透析器'
  1321. this.InnerDialogProps.type = 'dialyzers'
  1322. this.InnerDialogProps.selected = this.form.dialzer_apparatus
  1323. this.InnerDialogProps.isShowTextArea = false
  1324. break
  1325. case '8':
  1326. for(let i=0;i<this.irrigationList.length;i++){
  1327. this.irrigationList[i].name = this.irrigationList[i].specification_name
  1328. }
  1329. this.InnerDialogProps.values = this.irrigationList
  1330. this.InnerDialogProps.titles = '灌流器'
  1331. this.InnerDialogProps.type = 'irrigations'
  1332. this.InnerDialogProps.selected = this.form.perfusion_apparatus
  1333. this.InnerDialogProps.isShowTextArea = false
  1334. break
  1335. }
  1336. },
  1337. innerDialogComfirm: function(val) {
  1338. this.InnerDialogProps.visibility = false
  1339. switch (val.type) {
  1340. case 'dialyzers':
  1341. this.form.dialzer_apparatus = val.value.join(',')
  1342. break
  1343. case 'irrigations':
  1344. this.form.perfusion_apparatus = val.value.join(',')
  1345. break
  1346. }
  1347. },
  1348. innerDialogCancle: function() {
  1349. this.InnerDialogProps.visibility = false
  1350. },
  1351. getCurrentRecordDetailOne(){
  1352. var params = {
  1353. id:this.form.id
  1354. }
  1355. getTemplateSummaryDetail(params).then(response=>{
  1356. if(response.data.state == 1){
  1357. var list = response.data.data.list
  1358. var inspectlist = response.data.data.inspectlist
  1359. console.log("详情232332233223232323",list)
  1360. let arr = this.unique(inspectlist,'project_name')
  1361. this.form.template_inspection_content = arr
  1362. this.edit_show_dialog = true
  1363. this.form.title = list.title
  1364. this.form.id = list.id
  1365. this.form.admin_user_id = list.admin_user_id
  1366. this.form.after_pressure = list.after_pressure
  1367. this.form.after_weight = list.after_weight
  1368. this.form.anticoagulant = list.anticoagulant
  1369. this.form.autunite = list.autunite
  1370. this.form.befor_pressure = list.befor_pressure
  1371. this.form.befor_weight = list.befor_weight
  1372. this.form.dialysis_count = list.dialysis_count
  1373. this.form.dialzer_apparatus = list.dialzer_apparatus
  1374. this.form.dry_weight = list.dry_weight
  1375. this.form.hd_count= list.hd_count
  1376. this.form.hdf_count= list.hdf_count
  1377. this.form.hour = list.hour
  1378. this.form.hp_count = list.hp_count
  1379. this.form.kalium= list.kalium
  1380. this.form.minute = list.minute
  1381. this.form.natrium =list.natrium
  1382. this.form.perfusion_apparatus= list.perfusion_apparatus
  1383. this.form.record_time = this.getTime(list.record_time)
  1384. console.log("时间232233232",this.form.record_time)
  1385. this.form.template_inspection_id = list.template_inspection_id
  1386. this.form.template_plan_content = list.template_plan_content
  1387. this.form.template_summary_content =list.template_summary_content
  1388. this.form.template_summary_id = list.template_summary_id
  1389. this.projectIndate = list.inspect_date
  1390. this.projectStr = list.project_id
  1391. }
  1392. })
  1393. },
  1394. changeSummary(){
  1395. for(let i=0;i<this.summaryList.length;i++){
  1396. if(this.form.template_summary_id == this.summaryList[i].value){
  1397. this.form.template_summary_content = this.summaryList[i].content
  1398. }
  1399. }
  1400. },
  1401. changeSummaryOne(){
  1402. for(let i=0;i<this.summaryList.length;i++){
  1403. if(this.form.template_summary_id == this.summaryList[i].value){
  1404. this.form.template_summary_content = this.summaryList[i].content
  1405. }
  1406. }
  1407. },
  1408. changeTempalte(){
  1409. for(let i=0;i<this.planList.length;i++){
  1410. if(this.form.template_plan_id == this.planList[i].value){
  1411. this.form.template_plan_content = this.planList[i].content
  1412. }
  1413. }
  1414. },
  1415. editCreation(){
  1416. var params = {
  1417. id:this.form.id,
  1418. title:this.form.title,
  1419. dry_weight:this.form.dry_weight.toString(),
  1420. dialysis_count:parseInt(this.form.dialysis_count),
  1421. hd_count:parseInt(this.form.hd_count),
  1422. hdf_count:parseInt(this.form.hdf_count),
  1423. hp_count:parseInt(this.form.hp_count),
  1424. other_count:parseInt(this.form.other_count),
  1425. dialzer_apparatus:this.form.dialzer_apparatus,
  1426. perfusion_apparatus:this.form.perfusion_apparatus,
  1427. anticoagulant:this.form.anticoagulant,
  1428. kalium:this.form.kalium.toString(),
  1429. autunite:this.form.autunite.toString(),
  1430. natrium:this.form.natrium.toString(),
  1431. hour:parseInt(this.form.hour),
  1432. minute:parseInt(this.form.minute),
  1433. befor_weight:this.form.befor_weight.toString(),
  1434. after_weight:this.form.after_weight.toString(),
  1435. befor_pressure:this.form.befor_pressure,
  1436. template_summary_content:this.form.template_summary_content,
  1437. template_plan_content:this.form.template_plan_content,
  1438. admin_user_id:this.form.admin_user_id,
  1439. record_time:this.form.record_time,
  1440. after_pressure:this.form.after_pressure,
  1441. template_summary_id:this.form.template_summary_id,
  1442. template_plan_id:this.form.template_plan_id,
  1443. template_inspection_id:this.form.template_inspection_id,
  1444. patient_id:parseInt(this.patient_id),
  1445. project_id:this.projectStr,
  1446. inspect_date:this.projectIndate,
  1447. }
  1448. console.log("parawm232323223",params)
  1449. UpdateTemplateSummary(params).then(response=>{
  1450. if(response.data.state == 1){
  1451. var list = response.data.data.list
  1452. this.$message.success("保存成功")
  1453. this.edit_show_dialog = false
  1454. }
  1455. })
  1456. },
  1457. unique(data, key) {
  1458. let lastData = [];
  1459. data.forEach(item => {
  1460. let status = lastData.some(project_name => project_name[key] == item[key]);
  1461. if (!status) {
  1462. let obj = {
  1463. project_name:'',
  1464. arr:[]
  1465. }
  1466. obj.project_name = item.project_name
  1467. obj.arr.push(item);
  1468. lastData.push(obj);
  1469. } else {
  1470. lastData.forEach((project_name, index) => {
  1471. if (project_name[key] === item[key]) {
  1472. project_name.arr.push(item);
  1473. }
  1474. });
  1475. }
  1476. });
  1477. return lastData;
  1478. },
  1479. getDoctor(id){
  1480. var user_name = ""
  1481. for(let i=0;i<this.docList.length;i++){
  1482. if(id == this.docList[i].admin_user_id){
  1483. user_name = this.docList[i].user_name
  1484. }
  1485. }
  1486. return user_name
  1487. },
  1488. changeStartYear(){
  1489. this.form.title = ""
  1490. this.form.dry_weight = ""
  1491. this.form.dialysis_count =""
  1492. this.form.hd_count= ""
  1493. this.form.hdf_count = ""
  1494. this.form.hp_count = ""
  1495. this.form.other_count =""
  1496. this.form.dialzer_apparatus = ""
  1497. this.form.perfusion_apparatus = ""
  1498. this.form.anticoagulant = ""
  1499. this.form.kalium = ""
  1500. this.form.autunite = ""
  1501. this.form.natrium = ""
  1502. this.form.hour =""
  1503. this.form.minute = ""
  1504. this.form.befor_weight = ""
  1505. this.form.after_weight = ""
  1506. this.form.befor_pressure = ""
  1507. this.form.template_summary_content = ""
  1508. this.form.template_plan_content = ""
  1509. this.form.template_inspection_content = ""
  1510. this.form.admin_user_id = ""
  1511. this.form.record_time = ""
  1512. this.from.after_pressure = ""
  1513. this.form.template_summary_id = ""
  1514. this.form.template_plan_id = ""
  1515. this.form.template_inspection_id = ""
  1516. this.start_year = this.form.start_year
  1517. console.log("年份",this.form.start_year)
  1518. console.log("月份",this.getTimeOne(this.form.start_month))
  1519. var start = this.form.start_year + "-" + this.getTimeOne(this.form.start_month) + "-"+"01"
  1520. var end = this.form.start_year + "-" + this.getTimeOne(this.form.start_month) + "-"+"30"
  1521. this.start_date = start
  1522. this.end_date = end
  1523. this.getlist()
  1524. },
  1525. changeStartMonth(){
  1526. this.form.title = ""
  1527. this.form.dry_weight = ""
  1528. this.form.dialysis_count =""
  1529. this.form.hd_count= ""
  1530. this.form.hdf_count = ""
  1531. this.form.hp_count = ""
  1532. this.form.other_count =""
  1533. this.form.dialzer_apparatus = ""
  1534. this.form.perfusion_apparatus = ""
  1535. this.form.anticoagulant = ""
  1536. this.form.kalium = ""
  1537. this.form.autunite = ""
  1538. this.form.natrium = ""
  1539. this.form.hour =""
  1540. this.form.minute = ""
  1541. this.form.befor_weight = ""
  1542. this.form.after_weight = ""
  1543. this.form.befor_pressure = ""
  1544. this.form.template_summary_content = ""
  1545. this.form.template_plan_content = ""
  1546. this.form.template_inspection_content = ""
  1547. this.form.admin_user_id = ""
  1548. this.form.record_time = ""
  1549. this.form.after_pressure = ""
  1550. this.form.template_summary_id = ""
  1551. this.form.template_plan_id = ""
  1552. this.form.template_inspection_id = ""
  1553. console.log("sart",this.form.start_month)
  1554. var end = ""
  1555. if(this.form.start_month == "02"){
  1556. end = this.start_year +"-"+ this.form.start_month + "-"+"28"
  1557. }else{
  1558. end = this.start_year +"-"+ this.form.start_month + "-"+"30"
  1559. }
  1560. var start = this.start_year +"-"+ this.form.start_month+"-"+"01"
  1561. this.start_date = start
  1562. this.end_date = end
  1563. console.log("开始时间",this.start_date)
  1564. console.log("结束时间",this.end_date)
  1565. this.getlist()
  1566. },
  1567. changeQuarter(val){
  1568. this.form.title = ""
  1569. this.form.dry_weight = ""
  1570. this.form.dialysis_count =""
  1571. this.form.hd_count= ""
  1572. this.form.hdf_count = ""
  1573. this.form.hp_count = ""
  1574. this.form.other_count =""
  1575. this.form.dialzer_apparatus = ""
  1576. this.form.perfusion_apparatus = ""
  1577. this.form.anticoagulant = ""
  1578. this.form.kalium = ""
  1579. this.form.autunite = ""
  1580. this.form.natrium = ""
  1581. this.form.hour =""
  1582. this.form.minute = ""
  1583. this.form.befor_weight = ""
  1584. this.form.after_weight = ""
  1585. this.form.befor_pressure = ""
  1586. this.form.template_summary_content = ""
  1587. this.form.template_plan_content = ""
  1588. this.form.template_inspection_content = ""
  1589. this.form.admin_user_id = ""
  1590. this.form.record_time = ""
  1591. this.form.after_pressure = ""
  1592. this.form.template_summary_id = ""
  1593. this.form.template_plan_id = ""
  1594. this.form.template_inspection_id = ""
  1595. if(val == 1){
  1596. this.start_date = this.start_year+"-"+"01"+"-"+"01"
  1597. this.end_date = this.start_year +"-"+"03"+"-"+"31"
  1598. }
  1599. if(val == 2){
  1600. this.start_date = this.start_year +"-"+ "04"+"-"+"01"
  1601. this.end_date = this.start_year +"-"+ "06"+"-"+"30"
  1602. }
  1603. if(val == 3){
  1604. this.start_date = this.start_year +"-"+ "07"+"-"+"01"
  1605. this.end_date = this.start_year +"-"+ "09"+"-"+"30"
  1606. }
  1607. if(val == 4){
  1608. this.start_date = this.start_year +"-"+ "09"+"-"+"01"
  1609. this.end_date = this.start_year +"-"+ "12"+"-"+"31"
  1610. }
  1611. this.getlist()
  1612. },
  1613. getAnticoagulant(id){
  1614. var name = ""
  1615. for(let i=0;i<this.anticoagulantList.length;i++){
  1616. if(id == this.anticoagulantList[i].id){
  1617. name = this.anticoagulantList[i].name
  1618. }
  1619. }
  1620. return name
  1621. },
  1622. changeYear(val){
  1623. console.log("val2323323223",val)
  1624. this.startYear = val+"-" + "30"
  1625. this.getInspectionMajor()
  1626. },
  1627. selectSummary(val){
  1628. console.log("val23232",val)
  1629. var arr = []
  1630. for( let i=0;i<val.length;i++){
  1631. arr.push(val[i].id)
  1632. }
  1633. var str = arr.join(",")
  1634. console.log("str",str)
  1635. this.ids = str
  1636. },
  1637. deleteAction(){
  1638. if(this.ids == ""){
  1639. this.$message.error("请勾选需要删除的数据")
  1640. return
  1641. }
  1642. this.$confirm('确认删除这条记录?', '删除记录', {
  1643. confirmButtonText: '确定',
  1644. cancelButtonText: '取消',
  1645. type: 'warning'
  1646. }).then(() => {
  1647. let params = {
  1648. ids: this.ids,
  1649. }
  1650. console.log("params2323",params)
  1651. deleteSummary(params).then(response => {
  1652. if (response.data.state == 0) {
  1653. this.$message.error(response.data.msg)
  1654. return false
  1655. } else {
  1656. var msg =response.data.data.msg
  1657. this.getTemplateSummaryList()
  1658. }
  1659. })
  1660. })
  1661. .catch(() => {
  1662. })
  1663. }
  1664. },
  1665. // watch: {
  1666. // inspectionList: function() {
  1667. // this.$nextTick(function() {
  1668. // this.$refs.inspection_table.setCurrentRow(this.inspectionList[0])
  1669. // })
  1670. // },
  1671. // },
  1672. }
  1673. </script>
  1674. <style rel="stylesheet/css" lang="scss" scoped>
  1675. .borderBox{
  1676. border: 1px solid #DCDFE6;
  1677. padding: 10px;
  1678. margin-top: 10px;
  1679. border-radius: 4px;
  1680. p{
  1681. font-weight: bold;
  1682. font-size: 20px;
  1683. margin: 10px 0;
  1684. }
  1685. }
  1686. .container {
  1687. margin-left: 180px;
  1688. padding: 20px;
  1689. background: #fff;
  1690. min-height: calc(100vh - 173px);
  1691. margin-bottom: 15px;
  1692. .record {
  1693. padding-top: 20px;
  1694. }
  1695. }
  1696. .record_content_panel {
  1697. border-width: 1px;
  1698. border-style: solid;
  1699. border-color: #ebeef5;
  1700. min-height: 200px;
  1701. .title {
  1702. font-size: 14px;
  1703. font-weight: 500;
  1704. color: #909399;
  1705. line-height: 44px;
  1706. height: 44px;
  1707. text-align: center;
  1708. border-bottom-width: 1px;
  1709. border-bottom-style: solid;
  1710. border-bottom-color: #ebeef5;
  1711. }
  1712. .content {
  1713. padding: 12px 15px;
  1714. font-size: 15px;
  1715. color: gray;
  1716. line-height: 22px;
  1717. }
  1718. }
  1719. .new_record_form {
  1720. /*/ / padding: 10 px, 25 px;*/
  1721. .textarea_panel {
  1722. margin-top: 10px;
  1723. }
  1724. }
  1725. </style>
  1726. <style>
  1727. .el-table td,
  1728. .el-table th.is-leaf,
  1729. .el-table--border,
  1730. .el-table--group {
  1731. border-color: #d0d3da;
  1732. }
  1733. .el-table--border::after,
  1734. .el-table--group::after,
  1735. .el-table::before {
  1736. background-color: #d0d3da;
  1737. }
  1738. </style>