templateSummary.vue 71KB

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