firstDisease.vue 31KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830
  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;">标题:
  61. {{hosDetail.title}}
  62. </div>
  63. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">记录医师:
  64. {{getDoctor(hosDetail.doctor)}}
  65. </div>
  66. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">主诉内容:
  67. <span v-html="hosDetail.main_content"></span>
  68. </div>
  69. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">病例特点:
  70. <span v-html="hosDetail.patient_case"></span>
  71. </div>
  72. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">初步诊断:
  73. <span v-html="hosDetail.tentative_diagnosis"></span>
  74. </div>
  75. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">诊断依据:
  76. <span v-html="hosDetail.diagnostic_basis"></span>
  77. </div>
  78. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">鉴别诊断:
  79. <span v-html="hosDetail.differential_diagnosis"></span>
  80. </div>
  81. <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;">诊疗计划:
  82. <span v-html="hosDetail.treatment_plan"></span>
  83. </div>
  84. </div>
  85. </el-col>
  86. </el-row>
  87. </div>
  88. </div>
  89. <el-dialog title="新增首次病程记录" width="60%" top="5vh" :visible.sync="show_dialog">
  90. <div>
  91. <div class="new_record_form">
  92. <div class="cell clearfix">
  93. <label class="title"><span class="name">标题</span> : </label>
  94. <el-input v-model="form.title" style="width:200px"></el-input>
  95. <label class="title"><span class="name">记录医师</span>:</label>
  96. <el-select v-model="form.doctor" placeholder="请选择">
  97. <el-option
  98. v-for="item in doctorList"
  99. :key="item.admin_user_id"
  100. :label="item.user_name"
  101. :value="item.admin_user_id">
  102. </el-option>
  103. </el-select>
  104. <label class="title"><span class="name">记录日期</span> : </label>
  105. <el-date-picker v-model="form.record_date"
  106. prefix-icon="el-icon-date"
  107. style="width: 200px;"
  108. type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm"
  109. value-format="yyyy-MM-dd HH:mm">
  110. </el-date-picker>
  111. </div>
  112. <div class="cell clearfix" style="margin-top:10px">
  113. <label class="title"><span class="name">主诉内容</span> : </label>
  114. <el-select v-model="form.main_content_id" placeholder="可选择病程模板" @change="changeMainContent">
  115. <el-option v-for="(option, index) in mainContentList" :key="index" :label="option.title"
  116. :value="option.content"></el-option>
  117. </el-select>
  118. <div class="textarea_panel">
  119. <keep-alive>
  120. <editor ref="editor"
  121. id="editor"
  122. style="width: 800px"
  123. v-bind:r_content="form.main_content">
  124. </editor>
  125. </keep-alive>
  126. </div>
  127. <label class="title"><span class="name">病例特点</span> : </label>
  128. <el-select v-model="form.patient_case_id" placeholder="可选择病程模板" @change="changePatientCase">
  129. <el-option v-for="(option, index) in patientCaseList" :key="index" :label="option.title"
  130. :value="option.content"></el-option>
  131. </el-select>
  132. <div class="textarea_panel">
  133. <keep-alive>
  134. <editor ref="editorOne"
  135. id="editorOne"
  136. style="width: 800px"
  137. v-bind:r_content="form.patient_case">
  138. </editor>
  139. </keep-alive>
  140. </div>
  141. <label class="title"><span class="name">初步诊断</span> : </label>
  142. <el-select v-model="form.tentative_diagnosis_id" placeholder="可选择病程模板" @change="changeTentativeDiagnosis">
  143. <el-option v-for="(option, index) in tentativeDiagnosisList" :key="index" :label="option.title"
  144. :value="option.content"></el-option>
  145. </el-select>
  146. <div class="textarea_panel">
  147. <keep-alive>
  148. <editor ref="editorTwo"
  149. id="editorTwo"
  150. style="width: 800px"
  151. v-bind:r_content="form.tentative_diagnosis">
  152. </editor>
  153. </keep-alive>
  154. </div>
  155. <label class="title"><span class="name">诊断依据</span> : </label>
  156. <el-select v-model="form.diagnostic_basis_id" placeholder="可选择病程模板" @change="changeDiagnosticBasis">
  157. <el-option v-for="(option, index) in diagnosticBasisList" :key="index" :label="option.title"
  158. :value="option.content"></el-option>
  159. </el-select>
  160. <div class="textarea_panel">
  161. <keep-alive>
  162. <editor ref="editorThree"
  163. id="editorThree"
  164. style="width: 800px"
  165. v-bind:r_content="form.diagnostic_basis">
  166. </editor>
  167. </keep-alive>
  168. </div>
  169. <label class="title"><span class="name">鉴别诊断</span> : </label>
  170. <el-select v-model="form.differential_diagnosis_id" placeholder="可选择病程模板" @change="changeDifferentialDiagnosis">
  171. <el-option v-for="(option, index) in differentialDiagnosisList" :key="index" :label="option.title"
  172. :value="option.content"></el-option>
  173. </el-select>
  174. <div class="textarea_panel">
  175. <keep-alive>
  176. <editor ref="editorFour"
  177. id="editorFour"
  178. style="width: 800px"
  179. v-bind:r_content="form.differential_diagnosis">
  180. </editor>
  181. </keep-alive>
  182. </div>
  183. <label class="title"><span class="name">诊疗计划</span> : </label>
  184. <el-select v-model="form.treatment_plan_id" placeholder="可选择病程模板" @change="changeTreateMentContent">
  185. <el-option v-for="(option, index) in treateMentList" :key="index" :label="option.title"
  186. :value="option.content"></el-option>
  187. </el-select>
  188. <div class="textarea_panel">
  189. <keep-alive>
  190. <editor ref="editorFive"
  191. id="editorFive"
  192. style="width: 800px"
  193. v-bind:r_content="form.treatment_plan">
  194. </editor>
  195. </keep-alive>
  196. </div>
  197. </div>
  198. <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
  199. <el-button @click="show_dialog = false">取消</el-button>
  200. <el-button type="primary"
  201. @click="createAction" :loading="uploading_new_record">保存
  202. </el-button>
  203. </div>
  204. </div>
  205. </div>
  206. </el-dialog>
  207. <el-dialog title="编辑首次病程记录" width="60%" top="5vh" :visible.sync="edit_show_dialog">
  208. <div>
  209. <div class="new_record_form">
  210. <div class="cell clearfix">
  211. <label class="title"><span class="name">标题</span> : </label>
  212. <el-input v-model="form.title" style="width:200px"></el-input>
  213. <label class="title"><span class="name">记录医师</span>:</label>
  214. <el-select v-model="form.doctor" placeholder="请选择">
  215. <el-option
  216. v-for="item in doctorList"
  217. :key="item.admin_user_id"
  218. :label="item.user_name"
  219. :value="item.admin_user_id">
  220. </el-option>
  221. </el-select>
  222. <label class="title"><span class="name">记录日期</span> : </label>
  223. <el-date-picker v-model="form.record_date"
  224. prefix-icon="el-icon-date"
  225. style="width: 200px;"
  226. type="datetime" placeholder="选择日期时间" align="right" format="yyyy-MM-dd HH:mm"
  227. value-format="yyyy-MM-dd HH:mm">
  228. </el-date-picker>
  229. </div>
  230. <div class="cell clearfix" style="margin-top:10px">
  231. <label class="title"><span class="name">主诉内容</span> : </label>
  232. <el-select v-model="form.main_content_id" placeholder="可选择病程模板" @change="changeMainContent">
  233. <el-option v-for="(option, index) in mainContentList" :key="index" :label="option.title"
  234. :value="option.content"></el-option>
  235. </el-select>
  236. <div class="textarea_panel">
  237. <keep-alive>
  238. <editor ref="editorTen"
  239. id="editorTen"
  240. style="width: 800px"
  241. v-bind:r_content="form.main_content">
  242. </editor>
  243. </keep-alive>
  244. </div>
  245. <label class="title"><span class="name">病例特点</span> : </label>
  246. <el-select v-model="form.patient_case_id" placeholder="可选择病程模板" @change="changePatientCase">
  247. <el-option v-for="(option, index) in patientCaseList" :key="index" :label="option.title"
  248. :value="option.content"></el-option>
  249. </el-select>
  250. <div class="textarea_panel">
  251. <keep-alive>
  252. <editor ref="editorTenOne"
  253. id="editorTenOne"
  254. style="width: 800px"
  255. v-bind:r_content="form.patient_case">
  256. </editor>
  257. </keep-alive>
  258. </div>
  259. <label class="title"><span class="name">初步诊断</span> : </label>
  260. <el-select v-model="form.tentative_diagnosis_id" placeholder="可选择病程模板" @change="changeTentativeDiagnosis">
  261. <el-option v-for="(option, index) in tentativeDiagnosisList" :key="index" :label="option.title"
  262. :value="option.content"></el-option>
  263. </el-select>
  264. <div class="textarea_panel">
  265. <keep-alive>
  266. <editor ref="editorTenTwo"
  267. id="editorTenTwo"
  268. style="width: 800px"
  269. v-bind:r_content="form.tentative_diagnosis">
  270. </editor>
  271. </keep-alive>
  272. </div>
  273. <label class="title"><span class="name">诊断依据</span> : </label>
  274. <el-select v-model="form.diagnostic_basis_id" placeholder="可选择病程模板" @change="changeDiagnosticBasis">
  275. <el-option v-for="(option, index) in diagnosticBasisList" :key="index" :label="option.title"
  276. :value="option.content"></el-option>
  277. </el-select>
  278. <div class="textarea_panel">
  279. <keep-alive>
  280. <editor ref="editorTenThree"
  281. id="editorTenThree"
  282. style="width: 800px"
  283. v-bind:r_content="form.diagnostic_basis">
  284. </editor>
  285. </keep-alive>
  286. </div>
  287. <label class="title"><span class="name">鉴别诊断</span> : </label>
  288. <el-select v-model="form.differential_diagnosis_id" placeholder="可选择病程模板" @change="changeDifferentialDiagnosis">
  289. <el-option v-for="(option, index) in differentialDiagnosisList" :key="index" :label="option.title"
  290. :value="option.content"></el-option>
  291. </el-select>
  292. <div class="textarea_panel">
  293. <keep-alive>
  294. <editor ref="editorTenFour"
  295. id="editorTenFour"
  296. style="width: 800px"
  297. v-bind:r_content="form.differential_diagnosis">
  298. </editor>
  299. </keep-alive>
  300. </div>
  301. <label class="title"><span class="name">诊疗计划</span> : </label>
  302. <el-select v-model="form.treatment_plan_id" placeholder="可选择病程模板" @change="changeTreateMentContent">
  303. <el-option v-for="(option, index) in treateMentList" :key="index" :label="option.title"
  304. :value="option.content"></el-option>
  305. </el-select>
  306. <div class="textarea_panel">
  307. <keep-alive>
  308. <editor ref="editorTenFive"
  309. id="editorTenFive"
  310. style="width: 800px"
  311. v-bind:r_content="form.treatment_plan">
  312. </editor>
  313. </keep-alive>
  314. </div>
  315. </div>
  316. <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
  317. <el-button @click="edit_show_dialog = false">取消</el-button>
  318. <el-button type="primary"
  319. @click="updateAction" :loading="uploading_new_record">保存
  320. </el-button>
  321. </div>
  322. </div>
  323. </div>
  324. </el-dialog>
  325. </div>
  326. </div>
  327. </template>
  328. <script>
  329. import PatientSidebar from './components/PatientSidebar'
  330. import Editor from '@/components/Editor'
  331. import { createFirstDisease,getFirstDiseaseList,getFirstDetail,updateFirstDisease,deleteFirstDisease} from '@/api/patient'
  332. import { parseTime } from '@/utils'
  333. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  334. import { uParseTime } from '@/utils/tools'
  335. import { getDataConfig } from '@/utils/data'
  336. import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
  337. import MsgTip from '../dialysis/details/dialog/MsgTip'
  338. import { getAllDoctorList } from "@/api/device"
  339. const moment = require('moment')
  340. export default {
  341. name: 'hospitalSummary',
  342. components: {
  343. PatientSidebar,
  344. BreadCrumb,
  345. Editor,
  346. MsgTip,
  347. multiSelectBox,
  348. },
  349. data() {
  350. return {
  351. InnerDialogProps: {
  352. values: [],
  353. visibility: false,
  354. isShowTextArea: true,
  355. customContent: '',
  356. titles: '',
  357. type: '' // 不同弹框类型,用来匹配数据
  358. },
  359. loading: false,
  360. title: '',
  361. patient_id: 0,
  362. date: [],
  363. start_time: '',
  364. end_time: '',
  365. course_of_disease_time: '',
  366. records: [],
  367. doctors: [],
  368. current_select_record: null,
  369. show_dialog: false,
  370. show_edit_dialog: false,
  371. uploading_new_record: false,
  372. edit_show_dialog:false,
  373. mainContentList: this.$store.getters.configlist.main_content,
  374. patientCaseList:this.$store.getters.configlist.patient_case,
  375. tentativeDiagnosisList:this.$store.getters.configlist.tentative_diagnosis,
  376. diagnosticBasisList:this.$store.getters.configlist.diagnostic_basis,
  377. differentialDiagnosisList:this.$store.getters.configlist.differential_diagnosis,
  378. treateMentList:this.$store.getters.configlist.treatment_plan,
  379. select_template: '',
  380. new_content: '',
  381. edit_new_content: '',
  382. edit_course_of_disease_time: '',
  383. selectingRows: [],
  384. table_current_index: -1,
  385. edit_current_id: 0,
  386. edit_title: '',
  387. value:'',
  388. form:{
  389. id:0,
  390. title:"",
  391. doctor:this.$store.getters.xt_user.user.id,
  392. record_date:this.getTimeOne(new Date()),
  393. pathology:"",
  394. record_time:"",
  395. main_content_id:"",
  396. main_content:"",
  397. patient_case_id:"",
  398. patient_case:"",
  399. tentative_diagnosis_id:"",
  400. tentative_diagnosis:"",
  401. diagnostic_basis_id:"",
  402. diagnostic_basis:"",
  403. differential_diagnosis_id:"",
  404. differential_diagnosis:"",
  405. treatment_plan_id:"",
  406. treatment_plan:""
  407. },
  408. tableData:[],
  409. docList:[],
  410. doctorList:[],
  411. hosDetail:{},
  412. ids:"",
  413. patient:{},
  414. }
  415. },
  416. created() {
  417. this.patient_id = this.$route.params && this.$route.params.id
  418. var now = new Date()
  419. this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
  420. var nowDate = new Date()
  421. var nowYear = nowDate.getFullYear()
  422. var nowMonth = nowDate.getMonth() + 1
  423. var nowDay = nowDate.getDate()
  424. this.end_time =
  425. nowYear +
  426. '-' +
  427. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  428. '-' +
  429. (nowDay < 10 ? '0' + nowDay : nowDay)
  430. nowDate.setMonth(nowDate.getMonth() - 1)
  431. nowYear = nowDate.getFullYear()
  432. nowMonth = nowDate.getMonth() + 1
  433. nowDay = nowDate.getDate()
  434. this.start_time =
  435. nowYear +
  436. '-' +
  437. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  438. '-' +
  439. (nowDay < 10 ? '0' + nowDay : nowDay)
  440. this.other_start_time = nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' + (nowDay < 10 ? '0' + nowDay : nowDay)
  441. this.getAllDoctorList()
  442. this.getlist()
  443. },
  444. methods: {
  445. getTime(val) {
  446. if(val == "" || val == undefined){
  447. return ""
  448. }else {
  449. return uParseTime(val, '{y}-{m}-{d}')
  450. }
  451. },
  452. getTimeOne(val) {
  453. if(val == "" || val == undefined){
  454. return ""
  455. }else {
  456. return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
  457. }
  458. },
  459. startTimeChange(val){
  460. this.start_time = val
  461. this.getlist()
  462. },
  463. endTimeChange(val){
  464. this.end_time = val
  465. this.getlist()
  466. },
  467. print(){
  468. this.$router.push({path:"/patient/patient/firstDisease/print?id="+this.form.id+"&patient_id="+this.patient_id})
  469. },
  470. tableRow(){
  471. },
  472. changeCurrentRecordTwo(row){
  473. this.form.id = 0
  474. if(row!=null){
  475. this.form.id = row.id
  476. this.getFirstDetail(row.id)
  477. }
  478. },
  479. selectSummary(row){
  480. var arr = []
  481. for(let i=0;i<row.length;i++){
  482. arr.push(row[i].id)
  483. }
  484. var ids = arr.join(",")
  485. this.ids = ids
  486. },
  487. changeMainContent(content){
  488. this.form.main_content = content
  489. },
  490. changePatientCase(content){
  491. this.form.patient_case = content
  492. },
  493. changeTentativeDiagnosis(content){
  494. this.form.tentative_diagnosis = content
  495. },
  496. changeDiagnosticBasis(content){
  497. this.form.diagnostic_basis =content
  498. },
  499. changeDifferentialDiagnosis(content){
  500. this.form.differential_diagnosis = content
  501. },
  502. changeTreateMentContent(content){
  503. this.form.treatment_plan = content
  504. },
  505. createAction(){
  506. if(this.form.doctor == ""){
  507. this.form.doctor = 0
  508. }
  509. var params = {
  510. patient_id:parseInt(this.patient_id),
  511. title:this.form.title,
  512. main_content:this.$refs.editor.content,
  513. patient_case:this.$refs.editorOne.content,
  514. tentative_diagnosis:this.$refs.editorTwo.content,
  515. diagnostic_basis:this.$refs.editorThree.content,
  516. differential_diagnosis:this.$refs.editorFour.content,
  517. treatment_plan:this.$refs.editorFive.content,
  518. record_date:this.form.record_date,
  519. doctor:this.form.doctor,
  520. }
  521. console.log("params",params)
  522. createFirstDisease(params).then(response=>{
  523. if(response.data.state == 1){
  524. var list = response.data.data.firstDisease
  525. this.$message.success("保存成功!")
  526. this.show_dialog = false
  527. this.getlist()
  528. }
  529. })
  530. },
  531. getAllDoctorList(){
  532. getAllDoctorList().then(response=>{
  533. if(response.data.state == 1){
  534. var list = response.data.data.list
  535. this.doctorList = list
  536. }
  537. })
  538. },
  539. getTime(val) {
  540. if(val == ""){
  541. return ""
  542. }else {
  543. return uParseTime(val, '{y}-{m}-{d}')
  544. }
  545. },
  546. getlist(){
  547. var params = {
  548. start_time:this.start_time,
  549. end_time:this.end_time,
  550. patient_id:parseInt(this.patient_id),
  551. }
  552. getFirstDiseaseList(params).then(response=>{
  553. if(response.data.state ==1){
  554. var list = response.data.data.list
  555. this.tableData = list
  556. }
  557. })
  558. },
  559. getDoctor(id){
  560. var name = ""
  561. for(let i=0;i<this.doctorList.length;i++){
  562. if(id == this.doctorList[i].admin_user_id){
  563. name = this.doctorList[i].user_name
  564. }
  565. }
  566. return name
  567. },
  568. getFirstDetail(id){
  569. getFirstDetail(id).then(response=>{
  570. if(response.data.state == 1){
  571. var detail = response.data.data.detail
  572. this.hosDetail = detail
  573. }
  574. })
  575. },
  576. getHospitalSummaryDetailOne(id){
  577. getFirstDetail(id).then(response=>{
  578. if(response.data.state == 1){
  579. var detail = response.data.data.detail
  580. console.log("detial------",detail)
  581. if(detail.doctor == 0){
  582. this.form.doctor = ""
  583. }
  584. this.form.id = detail.id
  585. this.form.title = detail.title
  586. this.form.record_date = this.getTimeOne(detail.record_date)
  587. this.form.doctor = detail.doctor
  588. this.form.main_content = detail.main_content
  589. this.form.patient_case = detail.patient_case
  590. this.form.tentative_diagnosis = detail.tentative_diagnosis
  591. this.form.diagnostic_basis = detail.diagnostic_basis
  592. this.form.differential_diagnosis = detail.differential_diagnosis
  593. this.form.treatment_plan =detail.treatment_plan
  594. this.edit_show_dialog = true
  595. }
  596. })
  597. },
  598. toEdit(){
  599. this.getHospitalSummaryDetailOne(this.form.id)
  600. },
  601. updateAction(){
  602. if(this.form.doctor == ""){
  603. this.form.doctor = 0
  604. }
  605. if(this.form.dean == ""){
  606. this.form.dean = 0
  607. }
  608. var params = {
  609. id:this.form.id,
  610. patient_id:parseInt(this.patient_id),
  611. title:this.form.title,
  612. doctor:this.form.doctor,
  613. record_date:this.form.record_date,
  614. main_content:this.$refs.editorTen.content,
  615. patient_case:this.$refs.editorTenOne.content,
  616. tentative_diagnosis:this.$refs.editorTenTwo.content,
  617. diagnostic_basis:this.$refs.editorTenThree.content,
  618. differential_diagnosis:this.$refs.editorTenFour.content,
  619. treatment_plan:this.$refs.editorTenFive.content,
  620. }
  621. console.log("poarams2323322323",params)
  622. updateFirstDisease(params).then(response=>{
  623. if(response.data.state == 1){
  624. var detail = response.data.data.detail
  625. this.edit_show_dialog = false
  626. // this.$refs.monthlyPlanTable.setCurrentRow(detail)
  627. this.getlist()
  628. }
  629. })
  630. },
  631. deleteAction(){
  632. if(this.ids.length == 0){
  633. this.$message.error("请勾选需要删除的数据")
  634. return false
  635. }
  636. this.$confirm('确认删除吗?', '删除', {
  637. confirmButtonText: '确 定',
  638. cancelButtonText: '取 消',
  639. type: 'warning'
  640. }).then(() => {
  641. var params = {
  642. ids:this.ids,
  643. }
  644. deleteFirstDisease(params).then(response => {
  645. if (response.data.state == 1) {
  646. var msg = response.data.data.msg
  647. this.getlist()
  648. this.$message.success("删除成功")
  649. } else {
  650. this.$message.error("删除失败")
  651. }
  652. })
  653. }).catch(() => {
  654. })
  655. },
  656. addAction(){
  657. this.form.title = ""
  658. this.form.main_content = ""
  659. this.form.patient_case = ""
  660. this.form.tentative_diagnosis = ""
  661. this.form.diagnostic_basis = ""
  662. this.form.differential_diagnosis = ""
  663. this.form.treatment_plan = ""
  664. this.show_dialog = true
  665. },
  666. },
  667. watch: {
  668. tableData: function() {
  669. this.$nextTick(function() {
  670. this.$refs.monthlyPlanTable.setCurrentRow(this.tableData[0])
  671. })
  672. }
  673. },
  674. }
  675. </script>
  676. <style rel="stylesheet/css" lang="scss" scoped>
  677. .borderBox{
  678. border: 1px solid #DCDFE6;
  679. padding: 10px;
  680. margin-top: 10px;
  681. border-radius: 4px;
  682. p{
  683. font-weight: bold;
  684. font-size: 20px;
  685. margin: 10px 0;
  686. }
  687. }
  688. .container {
  689. margin-left: 180px;
  690. padding: 20px;
  691. background: #fff;
  692. min-height: calc(100vh - 173px);
  693. margin-bottom: 15px;
  694. .record {
  695. padding-top: 20px;
  696. }
  697. }
  698. .record_content_panel {
  699. border-width: 1px;
  700. border-style: solid;
  701. border-color: #ebeef5;
  702. min-height: 200px;
  703. .title {
  704. font-size: 14px;
  705. font-weight: 500;
  706. color: #909399;
  707. line-height: 44px;
  708. height: 44px;
  709. text-align: center;
  710. border-bottom-width: 1px;
  711. border-bottom-style: solid;
  712. border-bottom-color: #ebeef5;
  713. }
  714. .content {
  715. padding: 12px 15px;
  716. font-size: 15px;
  717. color: gray;
  718. line-height: 22px;
  719. }
  720. }
  721. .new_record_form {
  722. /*/ / padding: 10 px, 25 px;*/
  723. .textarea_panel {
  724. margin-top: 10px;
  725. }
  726. }
  727. </style>
  728. <style>
  729. .el-table td,
  730. .el-table th.is-leaf,
  731. .el-table--border,
  732. .el-table--group {
  733. border-color: #d0d3da;
  734. }
  735. .el-table--border::after,
  736. .el-table--group::after,
  737. .el-table::before {
  738. background-color: #d0d3da;
  739. }
  740. .el-select-dropdown {
  741. max-width: 1000px !important;
  742. }
  743. </style>