firstDisease.vue 48KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318
  1. <template>
  2. <div class="patient-container">
  3. <patient-sidebar :id="patient_id" defaultActive="1-11"></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="addAction">新增</el-button>
  10. <el-button type="primary" icon="el-icon-edit-outline" size="small"
  11. @click="toEdit">修改</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 class="cell clearfix">
  18. <label class="title"><span class="name">日期查询</span> : </label>
  19. <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
  20. type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
  21. value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
  22. <span class="">-</span>
  23. <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
  24. type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
  25. value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
  26. </div>
  27. <div class="record">
  28. <el-row :gutter="15">
  29. <el-col :span="10">
  30. <el-table :header-cell-style="{
  31. backgroundColor: 'rgb(245, 247, 250)',
  32. color: '#606266'
  33. }"
  34. :row-style="{ color: '#303133' }" ref="monthlyPlanTable" :data="tableData"
  35. border highlight-current-row @current-change="changeCurrentRecordTwo"
  36. @selection-change="selectSummary"
  37. :row-class-name="tableRow"
  38. >
  39. <el-table-column type="selection" width="60" align="center"></el-table-column>
  40. <el-table-column label="标题" align="center">
  41. <template slot-scope="scope">
  42. {{scope.row.title}}
  43. </template>
  44. </el-table-column>
  45. <el-table-column label="记录日期" align="center">
  46. <template slot-scope="scope">
  47. {{getTimeOne(scope.row.record_date)}}
  48. </template>
  49. </el-table-column>
  50. <el-table-column label="记录医师" align="center">
  51. <template slot-scope="scope">
  52. {{getDoctor(scope.row.doctor)}}
  53. </template>
  54. </el-table-column>
  55. </el-table>
  56. </el-col>
  57. <el-col :span="14">
  58. <div class="record_content_panel">
  59. <div style="background-color:rgb(245, 247, 250)" class="title">首次病程内容</div>
  60. <div style="padding:10px;border-bottom:1px solid #DCDFE6;word-break: break-all;word-wrap: break-word">标题:
  61. {{hosDetail.title}}
  62. </div>
  63. <div
  64. style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
  65. word-break: break-all;word-wrap: break-word">
  66. 记录医师:
  67. {{getDoctor(hosDetail.doctor)}}
  68. </div>
  69. <div style="padding:10px;
  70. border-bottom:1px solid #DCDFE6;line-height:20px;
  71. word-break: break-all;word-wrap: break-word">主诉内容:
  72. <span v-html="hosDetail.main_content"></span>
  73. </div>
  74. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
  75. word-break: break-all;word-wrap: break-word">病例特点:
  76. <span v-html="hosDetail.patient_case"></span>
  77. <div>
  78. <div v-for="item in hosDetail.template_inspection_content">
  79. <p style="font-weight: bold;margin: 10px 0;">{{ item.project_name }} 检查日期:{{getTime(item.arr[0].inspect_date)}}</p>
  80. <div style="display:flex;flex-wrap: wrap;">
  81. <div v-for="it in item.arr" style="width:33%;margin-bottom:5px;">
  82. {{ it.item_name }} <span v-if="it.unit!=''">[{{it.unit}}]</span>:
  83. {{it.inspect_value}}
  84. <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
  85. </span>
  86. <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
  87. </span>
  88. </div>
  89. </div>
  90. </div>
  91. </div>
  92. </div>
  93. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
  94. word-break: break-all;word-wrap: break-word">初步诊断:
  95. <span v-html="hosDetail.tentative_diagnosis"></span>
  96. </div>
  97. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
  98. word-break: break-all;word-wrap: break-word">诊断依据:
  99. <span v-html="hosDetail.diagnostic_basis"></span>
  100. </div>
  101. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
  102. word-break: break-all;word-wrap: break-word">鉴别诊断:
  103. <span v-html="hosDetail.differential_diagnosis"></span>
  104. </div>
  105. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
  106. word-break: break-all;word-wrap: break-word">诊疗计划:
  107. <span v-html="hosDetail.treatment_plan"></span>
  108. </div>
  109. </div>
  110. </el-col>
  111. </el-row>
  112. </div>
  113. </div>
  114. <el-dialog title="新增首次病程记录" width="60%" top="5vh" :visible.sync="show_dialog">
  115. <div>
  116. <div class="new_record_form">
  117. <div class="cell clearfix">
  118. <label class="title"><span class="name">标题</span> : </label>
  119. <el-input v-model="form.title" style="width:200px"></el-input>
  120. <label class="title"><span class="name">记录医师</span>:</label>
  121. <el-select v-model="form.doctor" placeholder="请选择">
  122. <el-option
  123. v-for="item in doctorList"
  124. :key="item.admin_user_id"
  125. :label="item.user_name"
  126. :value="item.admin_user_id">
  127. </el-option>
  128. </el-select>
  129. <label class="title"><span class="name">记录日期</span> : </label>
  130. <el-date-picker v-model="form.record_date"
  131. prefix-icon="el-icon-date"
  132. style="width: 200px;"
  133. type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm"
  134. value-format="yyyy-MM-dd HH:mm">
  135. </el-date-picker>
  136. </div>
  137. <div class="cell clearfix" style="margin-top:10px">
  138. <label class="title"><span class="name">主诉内容</span> : </label>
  139. <el-select v-model="form.main_content_id" placeholder="可选择病程模板" @change="changeMainContent">
  140. <el-option v-for="(option, index) in mainContentList" :key="index" :label="option.title"
  141. :value="option.content"></el-option>
  142. </el-select>
  143. <div class="textarea_panel">
  144. <keep-alive>
  145. <editor ref="editor"
  146. id="editor"
  147. style="width: 800px"
  148. v-bind:r_content="form.main_content">
  149. </editor>
  150. </keep-alive>
  151. </div>
  152. <label class="title"><span class="name">病例特点</span> : </label>
  153. <el-select v-model="form.patient_case_id" placeholder="可选择病程模板" @change="changePatientCase">
  154. <el-option v-for="(option, index) in patientCaseList" :key="index" :label="option.title"
  155. :value="option.content"></el-option>
  156. </el-select>
  157. <el-button type="primary" @click="toInspection">选择检验检查</el-button>
  158. <div class="textarea_panel">
  159. <keep-alive>
  160. <editor ref="editorOne"
  161. id="editorOne"
  162. style="width: 800px"
  163. v-bind:r_content="form.patient_case">
  164. </editor>
  165. </keep-alive>
  166. </div>
  167. <div class="borderBox">
  168. <div v-for="item in form.patient_case_one">
  169. <p>{{ item.project_name }}</p>
  170. <div style="display:flex;flex-wrap: wrap;">
  171. <div v-for="it in item.arr" style="width:33%;">
  172. {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>:
  173. {{it.inspect_value}}
  174. <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
  175. </span>
  176. <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
  177. </span>
  178. </div>
  179. </div>
  180. </div>
  181. </div>
  182. <label class="title"><span class="name">初步诊断</span> : </label>
  183. <el-select v-model="form.tentative_diagnosis_id" placeholder="可选择病程模板" @change="changeTentativeDiagnosis">
  184. <el-option v-for="(option, index) in tentativeDiagnosisList" :key="index" :label="option.title"
  185. :value="option.content"></el-option>
  186. </el-select>
  187. <div class="textarea_panel">
  188. <keep-alive>
  189. <editor ref="editorTwo"
  190. id="editorTwo"
  191. style="width: 800px"
  192. v-bind:r_content="form.tentative_diagnosis">
  193. </editor>
  194. </keep-alive>
  195. </div>
  196. <label class="title"><span class="name">诊断依据</span> : </label>
  197. <el-select v-model="form.diagnostic_basis_id" placeholder="可选择病程模板" @change="changeDiagnosticBasis">
  198. <el-option v-for="(option, index) in diagnosticBasisList" :key="index" :label="option.title"
  199. :value="option.content"></el-option>
  200. </el-select>
  201. <div class="textarea_panel">
  202. <keep-alive>
  203. <editor ref="editorThree"
  204. id="editorThree"
  205. style="width: 800px"
  206. v-bind:r_content="form.diagnostic_basis">
  207. </editor>
  208. </keep-alive>
  209. </div>
  210. <label class="title"><span class="name">鉴别诊断</span> : </label>
  211. <el-select v-model="form.differential_diagnosis_id" placeholder="可选择病程模板" @change="changeDifferentialDiagnosis">
  212. <el-option v-for="(option, index) in differentialDiagnosisList" :key="index" :label="option.title"
  213. :value="option.content"></el-option>
  214. </el-select>
  215. <div class="textarea_panel">
  216. <keep-alive>
  217. <editor ref="editorFour"
  218. id="editorFour"
  219. style="width: 800px"
  220. v-bind:r_content="form.differential_diagnosis">
  221. </editor>
  222. </keep-alive>
  223. </div>
  224. <label class="title"><span class="name">诊疗计划</span> : </label>
  225. <el-select v-model="form.treatment_plan_id" placeholder="可选择病程模板" @change="changeTreateMentContent">
  226. <el-option v-for="(option, index) in treateMentList" :key="index" :label="option.title"
  227. :value="option.content"></el-option>
  228. </el-select>
  229. <div class="textarea_panel">
  230. <keep-alive>
  231. <editor ref="editorFive"
  232. id="editorFive"
  233. style="width: 800px"
  234. v-bind:r_content="form.treatment_plan">
  235. </editor>
  236. </keep-alive>
  237. </div>
  238. </div>
  239. <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
  240. <el-button @click="show_dialog = false">取消</el-button>
  241. <el-button type="primary"
  242. @click="createAction" :loading="uploading_new_record">保存
  243. </el-button>
  244. </div>
  245. </div>
  246. </div>
  247. </el-dialog>
  248. <el-dialog title="编辑首次病程记录" width="60%" top="5vh" :visible.sync="edit_show_dialog">
  249. <div>
  250. <div class="new_record_form">
  251. <div class="cell clearfix">
  252. <label class="title"><span class="name">标题</span> : </label>
  253. <el-input v-model="form.title" style="width:200px"></el-input>
  254. <label class="title"><span class="name">记录医师</span>:</label>
  255. <el-select v-model="form.doctor" placeholder="请选择">
  256. <el-option
  257. v-for="item in doctorList"
  258. :key="item.admin_user_id"
  259. :label="item.user_name"
  260. :value="item.admin_user_id">
  261. </el-option>
  262. </el-select>
  263. <label class="title"><span class="name">记录日期</span> : </label>
  264. <el-date-picker v-model="form.record_date"
  265. prefix-icon="el-icon-date"
  266. style="width: 200px;"
  267. type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm"
  268. value-format="yyyy-MM-dd HH:mm">
  269. </el-date-picker>
  270. </div>
  271. <div class="cell clearfix" style="margin-top:10px">
  272. <label class="title"><span class="name">主诉内容</span> : </label>
  273. <el-select v-model="form.main_content_id" placeholder="可选择病程模板" @change="changeMainContent">
  274. <el-option v-for="(option, index) in mainContentList" :key="index" :label="option.title"
  275. :value="option.content"></el-option>
  276. </el-select>
  277. <div class="textarea_panel">
  278. <keep-alive>
  279. <editor ref="editorTen"
  280. id="editorTen"
  281. style="width: 800px"
  282. v-bind:r_content="form.main_content">
  283. </editor>
  284. </keep-alive>
  285. </div>
  286. <label class="title"><span class="name">病例特点</span> : </label>
  287. <el-select v-model="form.patient_case_id" placeholder="可选择病程模板" @change="changePatientCase">
  288. <el-option v-for="(option, index) in patientCaseList" :key="index" :label="option.title"
  289. :value="option.content"></el-option>
  290. </el-select>
  291. <el-button type="primary" @click="toInspection">选择检验检查</el-button>
  292. <div class="borderBox">
  293. <div v-for="item in form.patient_case_one">
  294. <p>{{ item.project_name }}</p>
  295. <div style="display:flex;flex-wrap: wrap;">
  296. <div v-for="it in item.arr" style="width:33%;">
  297. {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>:
  298. {{it.inspect_value}}
  299. <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
  300. </span>
  301. <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
  302. </span>
  303. </div>
  304. </div>
  305. </div>
  306. </div>
  307. <div class="textarea_panel">
  308. <keep-alive>
  309. <editor ref="editorTenOne"
  310. id="editorTenOne"
  311. style="width: 800px"
  312. v-bind:r_content="form.patient_case">
  313. </editor>
  314. </keep-alive>
  315. </div>
  316. <label class="title"><span class="name">初步诊断</span> : </label>
  317. <el-select v-model="form.tentative_diagnosis_id" placeholder="可选择病程模板" @change="changeTentativeDiagnosis">
  318. <el-option v-for="(option, index) in tentativeDiagnosisList" :key="index" :label="option.title"
  319. :value="option.content"></el-option>
  320. </el-select>
  321. <div class="textarea_panel">
  322. <keep-alive>
  323. <editor ref="editorTenTwo"
  324. id="editorTenTwo"
  325. style="width: 800px"
  326. v-bind:r_content="form.tentative_diagnosis">
  327. </editor>
  328. </keep-alive>
  329. </div>
  330. <label class="title"><span class="name">诊断依据</span> : </label>
  331. <el-select v-model="form.diagnostic_basis_id" placeholder="可选择病程模板" @change="changeDiagnosticBasis">
  332. <el-option v-for="(option, index) in diagnosticBasisList" :key="index" :label="option.title"
  333. :value="option.content"></el-option>
  334. </el-select>
  335. <div class="textarea_panel">
  336. <keep-alive>
  337. <editor ref="editorTenThree"
  338. id="editorTenThree"
  339. style="width: 800px"
  340. v-bind:r_content="form.diagnostic_basis">
  341. </editor>
  342. </keep-alive>
  343. </div>
  344. <label class="title"><span class="name">鉴别诊断</span> : </label>
  345. <el-select v-model="form.differential_diagnosis_id" placeholder="可选择病程模板" @change="changeDifferentialDiagnosis">
  346. <el-option v-for="(option, index) in differentialDiagnosisList" :key="index" :label="option.title"
  347. :value="option.content"></el-option>
  348. </el-select>
  349. <div class="textarea_panel">
  350. <keep-alive>
  351. <editor ref="editorTenFour"
  352. id="editorTenFour"
  353. style="width: 800px"
  354. v-bind:r_content="form.differential_diagnosis">
  355. </editor>
  356. </keep-alive>
  357. </div>
  358. <label class="title"><span class="name">诊疗计划</span> : </label>
  359. <el-select v-model="form.treatment_plan_id" placeholder="可选择病程模板" @change="changeTreateMentContent">
  360. <el-option v-for="(option, index) in treateMentList" :key="index" :label="option.title"
  361. :value="option.content"></el-option>
  362. </el-select>
  363. <div class="textarea_panel">
  364. <keep-alive>
  365. <editor ref="editorTenFive"
  366. id="editorTenFive"
  367. style="width: 800px"
  368. v-bind:r_content="form.treatment_plan">
  369. </editor>
  370. </keep-alive>
  371. </div>
  372. </div>
  373. <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
  374. <el-button @click="edit_show_dialog = false">取消</el-button>
  375. <el-button type="primary"
  376. @click="updateAction" :loading="uploading_new_record">保存
  377. </el-button>
  378. </div>
  379. </div>
  380. </div>
  381. </el-dialog>
  382. <el-dialog
  383. title="提示"
  384. :visible.sync="dialogVisibleInspection"
  385. width="80%"
  386. >
  387. <span>
  388. <el-form>
  389. <el-row>
  390. <el-form-item>
  391. <span>选择检验检查时间:</span>
  392. <div>
  393. <el-form-item label="时间:">
  394. <el-radio-group style="padding: 10px;" v-model="radio" @change="changeRadio">
  395. <el-radio :label="1">月份</el-radio>
  396. <el-radio :label="2">季度</el-radio>
  397. </el-radio-group>
  398. </el-form-item>
  399. <el-form-item v-show="showquarty">
  400. <el-select v-model="quartype" placeholder="请选择" @change="changetype">
  401. <el-option
  402. v-for="item in quarterType"
  403. :key="item.id"
  404. :label="item.name"
  405. :value="item.id">
  406. </el-option>
  407. </el-select>
  408. </el-form-item>
  409. <el-form-item v-show="showtime">
  410. <el-date-picker
  411. @change="changeYear"
  412. v-model="startYear"
  413. class="timePicker"
  414. type="month"
  415. placeholder=""
  416. format="yyyy-MM"
  417. value-format="yyyy-MM">
  418. </el-date-picker>
  419. </el-form-item>
  420. </div>
  421. </el-form-item>
  422. </el-row>
  423. <el-row>
  424. <span>选择检验检查项目:</span>
  425. <div class="record">
  426. <el-row :gutter="15">
  427. <el-col :span="10">
  428. <el-table :header-cell-style="{
  429. backgroundColor: 'rgb(245, 247, 250)',
  430. color: '#606266'
  431. }"
  432. :row-style="{ color: '#303133' }"
  433. ref="single_table"
  434. :data="tableList"
  435. border highlight-current-row
  436. @current-change="changeCurrentRecord"
  437. @selection-change="selectionChangeOne"
  438. :row-class-name="tableRow"
  439. >
  440. <el-table-column type="selection" width="60" align="center"></el-table-column>
  441. <el-table-column label="检验项目" align="center">
  442. <template slot-scope="scope">
  443. {{scope.row.project_name}}
  444. </template>
  445. </el-table-column>
  446. </el-table>
  447. </el-col>
  448. <el-col :span="14">
  449. <div class="record_content_panel">
  450. <el-table :header-cell-style="{
  451. backgroundColor: 'rgb(245, 247, 250)',
  452. color: '#606266'
  453. }"
  454. :row-style="{ color: '#303133' }" :data="tableData"
  455. border highlight-current-row
  456. :row-class-name="tableRow"
  457. >
  458. <el-table-column label="检验项目" align="center">
  459. <template slot-scope="scope">
  460. {{scope.row.item_name}}
  461. </template>
  462. </el-table-column>
  463. <el-table-column label="结果" align="center">
  464. <template slot-scope="scope">
  465. {{scope.row.inspect_value}}
  466. <span v-if="parseInt(scope.row.inspect_value) < parseInt(scope.row.range_min)">
  467. </span>
  468. <span v-if="parseInt(scope.row.inspect_value) > parseInt(scope.row.range_max)">
  469. </span>
  470. </template>
  471. </el-table-column>
  472. <el-table-column label="参考值" align="center">
  473. <template slot-scope="scope">
  474. {{scope.row.range_min}} ~ {{scope.row.range_max}}
  475. </template>
  476. </el-table-column>
  477. <el-table-column label="单位" align="center">
  478. <template slot-scope="scope">
  479. {{scope.row.unit}}
  480. </template>
  481. </el-table-column>
  482. </el-table>
  483. </div>
  484. </el-col>
  485. </el-row>
  486. </div>
  487. </el-row>
  488. </el-form>
  489. </span>
  490. <span slot="footer" class="dialog-footer">
  491. <el-button @click="dialogVisibleInspection = false">取 消</el-button>
  492. <el-button type="primary" @click="toContent">确 定</el-button>
  493. </span>
  494. </el-dialog>
  495. </div>
  496. </div>
  497. </template>
  498. <script>
  499. import PatientSidebar from './components/PatientSidebar'
  500. import Editor from '@/components/Editor'
  501. import {getInitDataList,getInspectionMajorItem,getInspectionDetail,getInspectionItemList,createFirstDisease,getFirstDiseaseList,getFirstDetail,updateFirstDisease,deleteFirstDisease} from '@/api/patient'
  502. import { parseTime } from '@/utils'
  503. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  504. import { uParseTime } from '@/utils/tools'
  505. import { getDataConfig } from '@/utils/data'
  506. import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
  507. import MsgTip from '../dialysis/details/dialog/MsgTip'
  508. import { getAllDoctorList } from "@/api/device"
  509. const moment = require('moment')
  510. export default {
  511. name: 'hospitalSummary',
  512. components: {
  513. PatientSidebar,
  514. BreadCrumb,
  515. Editor,
  516. MsgTip,
  517. multiSelectBox,
  518. },
  519. data() {
  520. return {
  521. InnerDialogProps: {
  522. values: [],
  523. visibility: false,
  524. isShowTextArea: true,
  525. customContent: '',
  526. titles: '',
  527. type: '' // 不同弹框类型,用来匹配数据
  528. },
  529. loading: false,
  530. title: '',
  531. patient_id: 0,
  532. date: [],
  533. start_time: '',
  534. end_time: '',
  535. course_of_disease_time: '',
  536. records: [],
  537. doctors: [],
  538. current_select_record: null,
  539. show_dialog: false,
  540. show_edit_dialog: false,
  541. uploading_new_record: false,
  542. edit_show_dialog:false,
  543. mainContentList: this.$store.getters.configlist.main_content,
  544. patientCaseList:this.$store.getters.configlist.patient_case,
  545. tentativeDiagnosisList:this.$store.getters.configlist.tentative_diagnosis,
  546. diagnosticBasisList:this.$store.getters.configlist.diagnostic_basis,
  547. differentialDiagnosisList:this.$store.getters.configlist.differential_diagnosis,
  548. treateMentList:this.$store.getters.configlist.treatment_plan,
  549. select_template: '',
  550. new_content: '',
  551. edit_new_content: '',
  552. edit_course_of_disease_time: '',
  553. selectingRows: [],
  554. table_current_index: -1,
  555. edit_current_id: 0,
  556. edit_title: '',
  557. value:'',
  558. form:{
  559. id:0,
  560. title:"",
  561. doctor:this.$store.getters.xt_user.user.id,
  562. record_date:this.getTimeOne(new Date()),
  563. pathology:"",
  564. record_time:"",
  565. main_content_id:"",
  566. main_content:"",
  567. patient_case_id:"",
  568. patient_case:"",
  569. patient_case_one:"",
  570. tentative_diagnosis_id:"",
  571. tentative_diagnosis:"",
  572. diagnostic_basis_id:"",
  573. diagnostic_basis:"",
  574. differential_diagnosis_id:"",
  575. differential_diagnosis:"",
  576. treatment_plan_id:"",
  577. treatment_plan:"",
  578. radio:1,
  579. quarter:1,
  580. start_year:new Date(),
  581. start_month:new Date(),
  582. detai_id:0,
  583. },
  584. tableData:[],
  585. docList:[],
  586. doctorList:[],
  587. hosDetail:{},
  588. ids:"",
  589. patient:{},
  590. dialogVisibleInspection:false,
  591. quarterType: [
  592. { id: 1, name: "第一季度"},
  593. { id: 2, name: "第二季度"},
  594. { id: 3, name: "第三季度"},
  595. { id: 4, name: "第四季度"}
  596. ],
  597. quartype:1,
  598. radio:1,
  599. showtime:true,
  600. showquarty:false,
  601. startYear:moment(new Date()).endOf('month').subtract('month', +1).endOf('month').format("YYYY-MM-DD") ,
  602. start_date: moment(new Date()).startOf("month").format("YYYY-MM-DD"),
  603. end_date: moment(new Date()).endOf('month').format("YYYY-MM-DD"),
  604. summaryList:[],
  605. planList:[],
  606. tableList:[],
  607. projectList:[],
  608. inspectionList:[],
  609. org_id:0
  610. }
  611. },
  612. created() {
  613. this.patient_id = this.$route.params && this.$route.params.id
  614. var now = new Date()
  615. this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
  616. var nowDate = new Date()
  617. var nowYear = nowDate.getFullYear()
  618. var nowMonth = nowDate.getMonth() + 1
  619. var nowDay = nowDate.getDate()
  620. this.end_time =
  621. nowYear +
  622. '-' +
  623. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  624. '-' +
  625. (nowDay < 10 ? '0' + nowDay : nowDay)
  626. nowDate.setMonth(nowDate.getMonth() - 1)
  627. nowYear = nowDate.getFullYear()-1
  628. nowMonth = nowDate.getMonth() + 1
  629. nowDay = nowDate.getDate()
  630. this.start_time =
  631. nowYear +
  632. '-' +
  633. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  634. '-' +
  635. (nowDay < 10 ? '0' + nowDay : nowDay)
  636. this.other_start_time = nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' + (nowDay < 10 ? '0' + nowDay : nowDay)
  637. this.getAllDoctorList()
  638. this.getlist()
  639. this.getInspectionMajor()
  640. this.getInitDataList()
  641. },
  642. methods: {
  643. getTime(val) {
  644. if(val == "" || val == undefined){
  645. return ""
  646. }else {
  647. return uParseTime(val, '{y}-{m}-{d}')
  648. }
  649. },
  650. getTimeOne(val) {
  651. if(val == "" || val == undefined){
  652. return ""
  653. }else {
  654. return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
  655. }
  656. },
  657. startTimeChange(val){
  658. this.start_time = val
  659. this.getlist()
  660. },
  661. endTimeChange(val){
  662. this.end_time = val
  663. this.getlist()
  664. },
  665. print(){
  666. this.$router.push({path:"/patient/patient/firstDisease/print?id="+this.form.id+"&patient_id="+this.patient_id})
  667. },
  668. tableRow(){
  669. },
  670. changeCurrentRecordTwo(row){
  671. this.form.id = 0
  672. if(row!=null){
  673. this.form.id = row.id
  674. this.getFirstDetail(row.id)
  675. }
  676. },
  677. changeCurrentRecord(val){
  678. this.tableData = []
  679. this.getInspectionDetai(val)
  680. },
  681. selectionChangeOne(val){
  682. this.getInspectionItemList(val)
  683. },
  684. getInspectionItemList(val){
  685. this.projectList = []
  686. this.inspectDataList = []
  687. for(let i=0;i<val.length;i++){
  688. this.projectList.push(val[i].project_id)
  689. this.inspectDataList.push(val[i].inspect_date)
  690. }
  691. },
  692. selectSummary(row){
  693. var arr = []
  694. for(let i=0;i<row.length;i++){
  695. arr.push(row[i].id)
  696. }
  697. var ids = arr.join(",")
  698. this.ids = ids
  699. },
  700. changeMainContent(content){
  701. this.form.main_content = content
  702. },
  703. changePatientCase(content){
  704. this.form.patient_case = content
  705. },
  706. changeTentativeDiagnosis(content){
  707. this.form.tentative_diagnosis = content
  708. },
  709. changeDiagnosticBasis(content){
  710. this.form.diagnostic_basis =content
  711. },
  712. changeDifferentialDiagnosis(content){
  713. this.form.differential_diagnosis = content
  714. },
  715. changeTreateMentContent(content){
  716. this.form.treatment_plan = content
  717. },
  718. createAction(){
  719. if(this.form.doctor == ""){
  720. this.form.doctor = 0
  721. }
  722. if(this.projectIndate == undefined){
  723. this.projectIndate = ""
  724. }
  725. if(this.projectStr == undefined){
  726. this.project_id = ""
  727. }
  728. var params = {
  729. patient_id:parseInt(this.patient_id),
  730. title:this.form.title,
  731. main_content:this.$refs.editor.content,
  732. patient_case:this.$refs.editorOne.content,
  733. tentative_diagnosis:this.$refs.editorTwo.content,
  734. diagnostic_basis:this.$refs.editorThree.content,
  735. differential_diagnosis:this.$refs.editorFour.content,
  736. treatment_plan:this.$refs.editorFive.content,
  737. record_date:this.form.record_date,
  738. doctor:this.form.doctor,
  739. project_id:this.projectStr,
  740. inspect_date:this.projectIndate,
  741. }
  742. if(params.project_id == undefined){
  743. params.project_id = ""
  744. }
  745. console.log("params",params)
  746. createFirstDisease(params).then(response=>{
  747. if(response.data.state == 1){
  748. var list = response.data.data.firstDisease
  749. this.$message.success("保存成功!")
  750. this.show_dialog = false
  751. this.getlist()
  752. }
  753. })
  754. },
  755. getAllDoctorList(){
  756. getAllDoctorList().then(response=>{
  757. if(response.data.state == 1){
  758. var list = response.data.data.list
  759. this.doctorList = list
  760. }
  761. })
  762. },
  763. getTime(val) {
  764. if(val == ""){
  765. return ""
  766. }else {
  767. return uParseTime(val, '{y}-{m}-{d}')
  768. }
  769. },
  770. getlist(){
  771. var params = {
  772. start_time:this.start_time,
  773. end_time:this.end_time,
  774. patient_id:parseInt(this.patient_id),
  775. }
  776. getFirstDiseaseList(params).then(response=>{
  777. if(response.data.state ==1){
  778. var list = response.data.data.list
  779. this.tableData = list
  780. }
  781. })
  782. },
  783. getDoctor(id){
  784. var name = ""
  785. for(let i=0;i<this.doctorList.length;i++){
  786. if(id == this.doctorList[i].admin_user_id){
  787. name = this.doctorList[i].user_name
  788. }
  789. }
  790. return name
  791. },
  792. getFirstDetail(id){
  793. getFirstDetail(id).then(response=>{
  794. if(response.data.state == 1){
  795. var detail = response.data.data.detail
  796. this.hosDetail = detail
  797. var inspectlist = response.data.data.inspectlist
  798. let arr = this.unique(inspectlist,'project_name')
  799. this.hosDetail.template_inspection_content = arr
  800. console.log("内容233323232323223",this.hosDetail)
  801. }
  802. })
  803. },
  804. getHospitalSummaryDetailOne(id){
  805. getFirstDetail(id).then(response=>{
  806. if(response.data.state == 1){
  807. var detail = response.data.data.detail
  808. console.log("detial------",detail)
  809. var inspectlist = response.data.data.inspectlist
  810. let arr = this.unique(inspectlist,'project_name')
  811. this.form.patient_case_one = arr
  812. if(detail.doctor == 0){
  813. this.form.doctor = ""
  814. }
  815. this.form.id = detail.id
  816. this.form.detai_id = detail.id
  817. this.form.title = detail.title
  818. this.form.record_date = this.getTimeOne(detail.record_date)
  819. this.form.doctor = detail.doctor
  820. this.form.main_content = detail.main_content
  821. this.form.patient_case = detail.patient_case
  822. this.form.tentative_diagnosis = detail.tentative_diagnosis
  823. this.form.diagnostic_basis = detail.diagnostic_basis
  824. this.form.differential_diagnosis = detail.differential_diagnosis
  825. this.form.treatment_plan =detail.treatment_plan
  826. this.projectStr = detail.project_id
  827. this.projectIndate = detail.inspect_date
  828. this.edit_show_dialog = true
  829. }
  830. })
  831. },
  832. toEdit(){
  833. this.getHospitalSummaryDetailOne(this.form.id)
  834. },
  835. updateAction(){
  836. if(this.form.doctor == ""){
  837. this.form.doctor = 0
  838. }
  839. if(this.form.dean == ""){
  840. this.form.dean = 0
  841. }
  842. if(this.projectIndate == undefined){
  843. this.projectIndate = ""
  844. }
  845. if(this.projectStr == undefined){
  846. this.project_id = ""
  847. }
  848. var main_content = ""
  849. var patient_case = ""
  850. var tentative_diagnosis = ""
  851. var diagnostic_basis = ""
  852. var differential_diagnosis = ""
  853. var treatment_plan = ""
  854. if(this.$refs.editorTen.content == ""){
  855. main_content = this.hosDetail.main_content
  856. }else{
  857. main_content = this.$refs.editorTen.content
  858. }
  859. if(this.$refs.editorTenOne.content == ""){
  860. patient_case = this.hosDetail.patient_case
  861. }else{
  862. patient_case = this.$refs.editorTenOne.content
  863. }
  864. if(this.$refs.editorTenTwo.content == ""){
  865. tentative_diagnosis = this.hosDetail.tentative_diagnosis
  866. }else{
  867. tentative_diagnosis = this.$refs.editorTenTwo.content
  868. }
  869. if(this.$refs.editorTenThree.content == ""){
  870. diagnostic_basis = this.hosDetail.diagnostic_basis
  871. }else{
  872. diagnostic_basis = this.$refs.editorTenThree.content
  873. }
  874. if(this.$refs.editorTenFour.content == ""){
  875. differential_diagnosis = this.hosDetail.differential_diagnosis
  876. }else{
  877. differential_diagnosis = this.$refs.editorTenFour.content
  878. }
  879. if(this.$refs.editorTenFive.content == ""){
  880. treatment_plan = this.hosDetail.treatment_plan
  881. }else{
  882. treatment_plan = this.$refs.editorTenFive.content
  883. }
  884. var params = {
  885. id:this.form.detai_id,
  886. patient_id:parseInt(this.patient_id),
  887. title:this.form.title,
  888. doctor:this.form.doctor,
  889. record_date:this.form.record_date,
  890. main_content:main_content,
  891. patient_case:patient_case,
  892. tentative_diagnosis:tentative_diagnosis,
  893. diagnostic_basis:diagnostic_basis,
  894. differential_diagnosis:differential_diagnosis,
  895. treatment_plan:treatment_plan,
  896. project_id:this.projectStr,
  897. inspect_date:this.projectIndate,
  898. }
  899. console.log("poarams2323322323",params)
  900. if(params.project_id!=undefined){
  901. params.project_id = ""
  902. }
  903. updateFirstDisease(params).then(response=>{
  904. if(response.data.state == 1){
  905. var detail = response.data.data.detail
  906. this.edit_show_dialog = false
  907. // this.$refs.monthlyPlanTable.setCurrentRow(detail)
  908. this.getlist()
  909. }
  910. })
  911. },
  912. deleteAction(){
  913. if(this.ids.length == 0){
  914. this.$message.error("请勾选需要删除的数据")
  915. return false
  916. }
  917. this.$confirm('确认删除吗?', '删除', {
  918. confirmButtonText: '确 定',
  919. cancelButtonText: '取 消',
  920. type: 'warning'
  921. }).then(() => {
  922. var params = {
  923. ids:this.ids,
  924. }
  925. deleteFirstDisease(params).then(response => {
  926. if (response.data.state == 1) {
  927. var msg = response.data.data.msg
  928. this.getlist()
  929. this.$message.success("删除成功")
  930. } else {
  931. this.$message.error("删除失败")
  932. }
  933. })
  934. }).catch(() => {
  935. })
  936. },
  937. addAction(){
  938. this.form.title = ""
  939. this.form.main_content = ""
  940. this.form.patient_case = ""
  941. this.form.tentative_diagnosis = ""
  942. this.form.diagnostic_basis = ""
  943. this.form.differential_diagnosis = ""
  944. this.form.treatment_plan = ""
  945. this.show_dialog = true
  946. },
  947. toInspection(){
  948. this.dialogVisibleInspection = true
  949. },
  950. changeRadio(val){
  951. if(val == 1){
  952. this.showtime = true
  953. this.showquarty = false
  954. this.getInspectionMajor()
  955. }
  956. if(val == 2){
  957. this.showquarty = true
  958. this.showtime = false
  959. this.getInspectionMajor()
  960. }
  961. },
  962. //获取大项数据来源
  963. getInspectionMajor(){
  964. var start_time = ""
  965. var end_time = ""
  966. console.log("radio2332322332",this.radio)
  967. if(this.radio == 1){
  968. console.log("start_year",this.startYear)
  969. console.log("endyaer",this.lastYear)
  970. end_time = this.startYear
  971. start_time = this.lastYear
  972. }
  973. if(this.radio == 2){
  974. if(this.quartype == 1){
  975. start_time = moment().startOf('year').format('YYYY-MM-DD')
  976. end_time = moment().month(2).endOf('month').format("YYYY-MM-DD")
  977. }
  978. if(this.quartype == 2){
  979. start_time = moment().month(3).startOf('month').format("YYYY-MM-DD")
  980. end_time = moment().month(5).endOf('month').format("YYYY-MM-DD")
  981. }
  982. if(this.quartype == 3){
  983. start_time = moment().month(6).startOf('month').format("YYYY-MM-DD")
  984. end_time = moment().month(8).endOf('month').format("YYYY-MM-DD")
  985. }
  986. if(this.quartype == 4){
  987. start_time = moment().month(9).startOf('month').format("YYYY-MM-DD")
  988. end_time = moment().month(11).endOf('month').format("YYYY-MM-DD")
  989. }
  990. }
  991. console.log("start_time",start_time)
  992. console.log("end_time",end_time)
  993. var params = {
  994. other_start_time:end_time,
  995. patient_id:this.patient_id,
  996. last_time:start_time,
  997. }
  998. console.log("开始数据",params)
  999. getInspectionMajorItem(params).then(response=>{
  1000. if(response.data.state == 1){
  1001. var list = response.data.data.list
  1002. console.log("列表23232232323",list)
  1003. // this.$refs.single_table.setCurrentRow(list[0])
  1004. this.tableList = list
  1005. }
  1006. })
  1007. },
  1008. //获取小项的值
  1009. getInspectionDetai(val){
  1010. console.log("val2332232",val)
  1011. var params = {
  1012. project_id:val.project_id,
  1013. patient_id:val.patient_id,
  1014. inspect_date:val.inspect_date,
  1015. }
  1016. // console.log("param2233233223",params)
  1017. getInspectionDetail(params).then(response=>{
  1018. if(response.data.state ==1){
  1019. var list = response.data.data.list
  1020. // console.log("详情222",list)
  1021. this.tableData = list
  1022. }
  1023. })
  1024. },
  1025. getInitDataList(){
  1026. var params={
  1027. start_year:this.getTime(this.form.start_year),
  1028. start_month:this.getTime(this.form.start_month),
  1029. quarter:this.form.quarter,
  1030. patient_id:this.patient_id,
  1031. start_time:this.start_date,
  1032. end_time:this.end_date,
  1033. }
  1034. getInitDataList(params).then(response=>{
  1035. if(response.data.state == 1){
  1036. var modelist = response.data.data.modelist
  1037. console.log("modelist",modelist)
  1038. var docList = response.data.data.docList
  1039. // console.log("doctlist",docList)
  1040. this.docList = docList
  1041. var summaryList = response.data.data.summaryList
  1042. // console.log("summaryList",summaryList)
  1043. this.summaryList = summaryList
  1044. var planList = response.data.data.planList
  1045. // console.log("planlist",planList)
  1046. this.planList = planList
  1047. }
  1048. })
  1049. },
  1050. changeYear(val){
  1051. if(val == "2021-02"){
  1052. this.startYear = val+"-" + "28"
  1053. }else if(val == "2021-08"){
  1054. this.startYear = val+"-" + "31"
  1055. }else if(val == "2021-10"){
  1056. this.startYear = val+"-" + "31"
  1057. }else if(val == "2021-12"){
  1058. this.startYear = val+"-" + "31"
  1059. }else{
  1060. this.startYear = val+"-" + "30"
  1061. }
  1062. this.lastYear = val+"-"+"01"
  1063. this.getInspectionMajor()
  1064. },
  1065. selectSummary(val){
  1066. console.log("val23232",val)
  1067. var arr = []
  1068. for( let i=0;i<val.length;i++){
  1069. arr.push(val[i].id)
  1070. }
  1071. var str = arr.join(",")
  1072. console.log("str",str)
  1073. this.ids = str
  1074. },
  1075. toContent(){
  1076. var str = this.projectList.join(",")
  1077. this.projectStr = str
  1078. var inspe_date = this.inspectDataList.join(",")
  1079. this.projectIndate = inspe_date
  1080. var params = {
  1081. ids:str,
  1082. inspect_date:inspe_date,
  1083. patient_id:this.patient_id,
  1084. }
  1085. getInspectionItemList(params).then(response=>{
  1086. if(response.data.state == 1){
  1087. var list = response.data.data.list
  1088. let arr = this.unique(list,'project_name')
  1089. this.form.patient_case_one = arr
  1090. this.dialogVisibleInspection = false
  1091. console.log("2323232owowowowowow",this.form.id)
  1092. }
  1093. })
  1094. },
  1095. unique(data, key) {
  1096. let lastData = [];
  1097. data.forEach(item => {
  1098. let status = lastData.some(project_name => project_name[key] == item[key]);
  1099. if (!status) {
  1100. let obj = {
  1101. project_name:'',
  1102. arr:[]
  1103. }
  1104. obj.project_name = item.project_name
  1105. obj.arr.push(item);
  1106. lastData.push(obj);
  1107. } else {
  1108. lastData.forEach((project_name, index) => {
  1109. if (project_name[key] === item[key]) {
  1110. project_name.arr.push(item);
  1111. }
  1112. });
  1113. }
  1114. });
  1115. return lastData;
  1116. },
  1117. changetype(){
  1118. this.getInspectionMajor()
  1119. },
  1120. },
  1121. watch: {
  1122. tableData: function() {
  1123. this.$nextTick(function() {
  1124. this.$refs.monthlyPlanTable.setCurrentRow(this.tableData[0])
  1125. })
  1126. }
  1127. },
  1128. }
  1129. </script>
  1130. <style rel="stylesheet/css" lang="scss" scoped>
  1131. .borderBox{
  1132. border: 1px solid #DCDFE6;
  1133. padding: 10px;
  1134. margin-top: 10px;
  1135. border-radius: 4px;
  1136. p{
  1137. font-weight: bold;
  1138. font-size: 20px;
  1139. margin: 10px 0;
  1140. }
  1141. }
  1142. .container {
  1143. margin-left: 180px;
  1144. padding: 20px;
  1145. background: #fff;
  1146. min-height: calc(100vh - 173px);
  1147. margin-bottom: 15px;
  1148. .record {
  1149. padding-top: 20px;
  1150. }
  1151. }
  1152. .record_content_panel {
  1153. border-width: 1px;
  1154. border-style: solid;
  1155. border-color: #ebeef5;
  1156. min-height: 200px;
  1157. .title {
  1158. font-size: 14px;
  1159. font-weight: 500;
  1160. color: #909399;
  1161. line-height: 44px;
  1162. height: 44px;
  1163. text-align: center;
  1164. border-bottom-width: 1px;
  1165. border-bottom-style: solid;
  1166. border-bottom-color: #ebeef5;
  1167. }
  1168. .content {
  1169. padding: 12px 15px;
  1170. font-size: 15px;
  1171. color: gray;
  1172. line-height: 22px;
  1173. }
  1174. }
  1175. .new_record_form {
  1176. /*/ / padding: 10 px, 25 px;*/
  1177. .textarea_panel {
  1178. margin-top: 10px;
  1179. }
  1180. }
  1181. </style>
  1182. <style>
  1183. .el-table td,
  1184. .el-table th.is-leaf,
  1185. .el-table--border,
  1186. .el-table--group {
  1187. border-color: #d0d3da;
  1188. }
  1189. .el-table--border::after,
  1190. .el-table--group::after,
  1191. .el-table::before {
  1192. background-color: #d0d3da;
  1193. }
  1194. .el-select-dropdown {
  1195. max-width: 1000px !important;
  1196. }
  1197. </style>