templateSummary.vue 78KB

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