sickHistory_new.vue 36KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134
  1. <template>
  2. <div class="patient-container">
  3. <!-- <patient-sidebar :id="patient_id" defaultActive="3-1"></patient-sidebar> -->
  4. <PatientSidebar :id="patient_id" defaultActive="3-4"></PatientSidebar>
  5. <!-- <div class="app-container"> -->
  6. <div v-loading="loading">
  7. <div class="patient-app-container advice-container app-container">
  8. <div style="display: flex;">
  9. <div style="width: 25%;">
  10. <div style="display: flex;">
  11. <div style="flex: 1.1;">
  12. <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;">病史列表</span>
  13. </div>
  14. <div style="flex: 0.9;text-align: right;">
  15. <el-button type="primary" size="small" @click="add_click">添加</el-button>
  16. </div>
  17. </div>
  18. <div>
  19. <el-table class="table"
  20. ref="record_table"
  21. :data="tableData"
  22. :highlight-current-row="true"
  23. @current-change="getCurrentChange"
  24. style="width: 100%">
  25. <el-table-column prop="index" label="序号" width="50" align="center">
  26. <template slot-scope="scope">
  27. {{ scope.$index + 1 }}
  28. </template>
  29. </el-table-column>
  30. <el-table-column prop="date" label="时间" width="" align="center">
  31. <template slot-scope="scope">
  32. {{ getTime(scope.row.record_time) }}
  33. </template>
  34. </el-table-column>
  35. <el-table-column prop="doctor" label="医生" align="center">
  36. <template slot-scope="scope">
  37. {{ getDocName(scope.row.doctor_id) }}
  38. </template>
  39. </el-table-column>
  40. </el-table>
  41. </div>
  42. </div>
  43. <div style="width: 75%;margin-left: 10px;">
  44. <div style="display: flex;">
  45. <div style="flex: 1;">
  46. <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;">详情</span>
  47. </div>
  48. <div style="flex: 1;text-align: right;">
  49. <div v-if='add_index == 0'>
  50. <el-button type="primary" size="small" @click="showEdit">修改</el-button>
  51. <el-button size="small" type="danger" @click="deleteAction">删除</el-button>
  52. <el-button type="primary" size="small" @click="printOne">打印</el-button>
  53. </div>
  54. <div v-if="add_index == 1">
  55. <el-button type="primary" size="small" @click="createAction">保存</el-button>
  56. <el-button size="small" @click="showCancel">取消</el-button>
  57. </div>
  58. </div>
  59. </div>
  60. <div style="display: flex;margin: 20px 0;">
  61. <div style="flex: 1;">
  62. 日期:
  63. <el-date-picker
  64. v-model="start_time"
  65. type="date"
  66. format="yyyy-MM-dd"
  67. :disabled="disabled"
  68. style="width: 150px;"
  69. value-format="yyyy-MM-dd"
  70. placeholder="选择日期">
  71. </el-date-picker>
  72. </div>
  73. <div style="flex: 1;">
  74. 肾移植史:
  75. <el-select v-model="shen_yizhi" placeholder="请选择" style="width: 120px;" :disabled="disabled">
  76. <el-option
  77. v-for="item in yizhi_options"
  78. :key="item.value"
  79. :label="item.label"
  80. :value="item.value">
  81. </el-option>
  82. </el-select>
  83. </div>
  84. <div style="flex: 1;">
  85. 腹膜透析史:
  86. <el-select v-model="shen_fumo" placeholder="请选择" style="width: 120px;" :disabled="disabled">
  87. <el-option
  88. v-for="item in yizhi_options"
  89. :key="item.value"
  90. :label="item.label"
  91. :value="item.value">
  92. </el-option>
  93. </el-select>
  94. </div>
  95. </div>
  96. <div style="display: flex;">
  97. <div style="width: 30%;">
  98. 医生:
  99. <el-select v-model="admin_user_id" placeholder="请选择" style="width: 120px;" :disabled="disabled">
  100. <el-option
  101. v-for="item in doctorOptions"
  102. :key="item.admin_user_id"
  103. :label="item.user_name"
  104. :value="item.admin_user_id">
  105. </el-option>
  106. </el-select>
  107. </div>
  108. <div style="width: 30%;">
  109. 过敏药物:
  110. <el-select v-model="shen_guomi" placeholder="请选择" style="width: 120px;" :disabled="disabled">
  111. <el-option
  112. v-for="item in guomi_options"
  113. :key="item.value"
  114. :label="item.label"
  115. :value="item.value">
  116. </el-option>
  117. </el-select>
  118. </div>
  119. <div style="width: 50%;" v-if="shen_guomi == 2" >
  120. 过敏药物备注: <el-input v-model="guominyaowu_desc" style="width: 300px;"></el-input>
  121. </div>
  122. </div>
  123. <div style="margin-top: 15px;">
  124. <span style="display: inline-block;border-left: 5px solid #3891f1f5;padding-left: 5px;margin-bottom: 5px;">详情</span>
  125. <keep-alive>
  126. <ueditor ref="editor" :content="new_content" id="editors" :disabled="disabled"></ueditor>
  127. </keep-alive>
  128. </div>
  129. <div style="text-align: right;margin-top:10px ;">
  130. <el-button type="primary" size="small" @click="template_click">
  131. {{ add_index == 0 ? '设置模板' : '模板库' }}
  132. </el-button>
  133. </div>
  134. </div>
  135. </div>
  136. </div>
  137. <el-dialog
  138. title="设置模板"
  139. :visible.sync="template_dialog"
  140. width="20%"
  141. center>
  142. <div>
  143. 模板名称:
  144. <el-input v-model="template_name" placeholder="请输入内容" style="width: 160px;"></el-input>
  145. </div>
  146. <span slot="footer" class="dialog-footer">
  147. <el-button @click="template_dialog = false">取 消</el-button>
  148. <el-button type="primary" @click="saveTemplate">确 定</el-button>
  149. </span>
  150. </el-dialog>
  151. <el-dialog
  152. title="模板库"
  153. :visible.sync="library_dialog"
  154. width="70%"
  155. class="lirary"
  156. >
  157. <div>
  158. <div style="display: flex;">
  159. <div style="width: 27%;">
  160. <el-table
  161. ref="record_table_one"
  162. :data="templateList"
  163. :highlight-current-row="true"
  164. @current-change="getCurrentChangeOne"
  165. style="width: 100%">
  166. <el-table-column prop="index" label="序号" width="" align="center">
  167. <template slot-scope="scope">
  168. {{ scope.$index + 1 }}
  169. </template>
  170. </el-table-column>
  171. <el-table-column prop="name" label="模板名称" width="" align="center">
  172. <template slot-scope="scope">
  173. {{ scope.row.title }}
  174. </template>
  175. </el-table-column>
  176. </el-table>
  177. </div>
  178. <div style="width: 72%;margin-left: 10px;">
  179. <div class="Second_title">模板内容</div>
  180. <div style="">
  181. <keep-alive>
  182. <ueditor ref="editorOne" id="editors" :content="new_content"></ueditor>
  183. </keep-alive>
  184. </div>
  185. </div>
  186. </div>
  187. </div>
  188. <span slot="footer" class="dialog-footer" style="text-align: center;">
  189. <el-button type="danger" @click="template_dele">删除模板</el-button>
  190. <el-button type="primary" @click="template_save">保存模板</el-button>
  191. <el-button type="primary" @click="toContentPint">应用</el-button>
  192. <el-button @click="library_dialog = false">取消</el-button>
  193. </span>
  194. </el-dialog>
  195. </div>
  196. <!-- 打印 -->
  197. <div style="display: none;">
  198. <div id="Physical_print_content" style="font-size: 14px;">
  199. <div style="width: 100%;text-align: center;margin-bottom: 10px;">
  200. <h2>{{orgname}}</h2>
  201. </div>
  202. <div style="display: flex;padding: 5px 0;border-bottom: 1px solid black;">
  203. <div style="flex: 1;">姓名:</div>
  204. <div style="flex: 1;">病历号:</div>
  205. <div style="flex: 1;">病区-床号:</div>
  206. <div style="flex: 1;">接收日期:</div>
  207. </div>
  208. <div style="display: flex;margin: 5px;">
  209. <div style="flex: 1;">性别:</div>
  210. <div style="flex: 1;">年龄:岁 出生日期:</div>
  211. <div style="flex: 1;">身份证号:340223194809195837</div>
  212. </div>
  213. <div style="display: flex;margin: 5px;">
  214. <div style="flex: 1;">病人来源:</div>
  215. <div style="flex: 1;">透析号:</div>
  216. <div style="flex: 1;">首次透析日期:</div>
  217. </div>
  218. <div style="display: flex;margin: 5px;">
  219. <div style="flex: 1;">报销方式:</div>
  220. <div style="flex: 1;">工作单位:</div>
  221. <div style="flex: 1;">联系电话:</div>
  222. </div>
  223. <div style="display: flex;margin: 5px;">
  224. <div style="flex: 1;">过敏药物:</div>
  225. <div style="flex: 1;">肾移植史:</div>
  226. <div style="flex: 1;">腹膜透析史:</div>
  227. </div>
  228. <div style="display: flex;margin: 5px;">
  229. <div style="flex: 1;">家庭住址: </div>
  230. <!-- <div style="flex: 1;"></div>
  231. <div style="flex: 1;"></div> -->
  232. </div>
  233. <div style="font-size: 20px;font-weight: bold;text-align: center;margin: 10px;">病史内容</div>
  234. <div v-html="template_content"></div>
  235. <div class="content" style="margin-top: 20px;">
  236. <div style="text-align: center;font-size: 20px;font-weight: bold;margin: 10px;">体格检查单</div>
  237. <div style="display: flex;justify-content: space-around;padding: 5px;">
  238. <div style="">T:</div>
  239. <div style="">P:</div>
  240. <div style="">R:</div>
  241. <div style="">BP:</div>
  242. </div>
  243. <div >
  244. <span >{{ }}贫血容貌,</span>
  245. <span>{{ }}体位,</span>
  246. <span>{{ }}浮肿,</span>
  247. <span>出血点/瘀斑/血肿:{{ }},</span>
  248. <span>发育{{ }},</span>
  249. <span>营养{{ }},</span>
  250. <span>神志{{ }}</span> <br/>
  251. <span style="font-weight: bold;">皮肤黏膜:</span>
  252. <span>皮肤黏膜{{ }},</span>
  253. <span>{{ }}皮下出血,</span>
  254. <span>{{ }}紫癜,</span>
  255. <span>皮肤温度:{{ }}</span><br/>
  256. <span style="font-weight: bold;">淋巴结:</span>
  257. <span>浅表淋巴肿大:{{ }}</span>
  258. <span>部位:{{ }}</span>
  259. <br/>
  260. <span style="font-weight: bold;">头部:</span>
  261. <span>眼睑{{ }}</span>
  262. <span>瞳孔(等大等圆):{{ }}</span>
  263. <span>左(mm):{{ }}</span>
  264. <span>右(mm):{{ }}</span>
  265. <span>对光反射:{{ }}</span>
  266. <span>扁桃体:{{ }}</span>
  267. <span>咽部:{{ }}</span>
  268. <span>其他:{{ }}</span><br/>
  269. <span style="font-weight: bold;">颈部:</span>
  270. <span>颈静脉:{{ }}</span>
  271. <span>甲状腺:{{ }}</span>
  272. <span>其他:{{ }}</span><br/>
  273. <span style="font-weight: bold;"> 肺脏:</span>
  274. <span>呼吸音:{{ }}</span>
  275. <span>胸膜摩擦音:{{ }}</span>
  276. <span>部位:{{ }}</span>
  277. <span>啰音:{{ }}</span>
  278. <span>描述:{{ }}</span><br/>
  279. <span style="font-weight: bold;">心脏:</span>
  280. <span>心脏大小:{{ }}</span>
  281. <span>心律:{{ }}</span>
  282. <span>心包摩擦声:{{ }}</span>
  283. <span>杂音:{{ }}</span>
  284. <span>附加音:{{ }}</span>
  285. <span>描述:{{ }}</span><br/>
  286. <span style="font-weight: bold;">腹部:</span>
  287. <span>腹水征:{{ }}</span>
  288. <span>肝颈静脉返流征:{{ }}</span>
  289. <span>肝脏(压痛):{{ }}</span>
  290. <span>肝脏(叩痛):{{ }}</span>
  291. <span>脾脏(压痛):{{ }}</span>
  292. <span>脾脏(叩痛):{{ }}</span>
  293. <span>肾脏(压痛):{{ }}</span>
  294. <span>肾脏(叩痛):{{ }}</span>
  295. <span>描述:{{ }}</span><br/>
  296. <span style="font-weight: bold;">其他:</span>
  297. <span>{{ }}</span>
  298. </div>
  299. </div>
  300. <div style="text-align: right;">
  301. <span>病历书写者:</span>
  302. <span>日期:</span>
  303. </div>
  304. </div>
  305. </div>
  306. </div>
  307. </template>
  308. <script>
  309. import PatientSidebar from './components/PatientSidebar'
  310. import PatientSidebar_new from './components/PatientSidebar_new'
  311. import Editor from '@/components/Editor'
  312. import ueditor from '@/components/Uedtior'
  313. import { fetchMoibleAllDoctorAndNurse } from "@/api/doctor";
  314. import print from 'print-js'
  315. import {
  316. createNewSickHistoryRecord,
  317. deleteNewSickHistory,
  318. getNewSickHistory,
  319. ModifySickHistoryRecord,
  320. saveSickHistoryTemplate,
  321. getSickHistoryTempalate,
  322. modifySickHistoryTemplate,
  323. deleteSickHistoryTempalte,
  324. fetchPatient,
  325. } from '@/api/patient'
  326. import { parseTime } from '@/utils'
  327. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  328. import { uParseTime } from '@/utils/tools'
  329. import { getDataConfig } from "@/utils/data";
  330. export default {
  331. name: 'CourseOfDisease',
  332. components: {
  333. PatientSidebar,
  334. BreadCrumb,
  335. Editor,
  336. ueditor,
  337. PatientSidebar_new
  338. },
  339. data() {
  340. return {
  341. loading: false,
  342. title: '',
  343. patient_id: 0,
  344. date: [],
  345. start_time: '',
  346. end_time: '',
  347. sick_history_time: '',
  348. is_shenyizhishi:'',
  349. is_fumotouxishi:'',
  350. is_guominyaowu:'',
  351. guominyaowu_desc:"",
  352. edit_is_shenyizhishi:'',
  353. edit_is_fumotouxishi:'',
  354. edit_is_guominyaowu:'',
  355. edit_guominyaowu_desc:"",
  356. doctor_id:"",
  357. doctorOptions:null,
  358. records: [],
  359. doctors: [],
  360. current_select_record: null,
  361. show_dialog: false,
  362. show_edit_dialog: false,
  363. uploading_new_record: false,
  364. templates: this.$store.getters.configlist.sick_history,
  365. select_template:"",
  366. new_content: "",
  367. edit_new_content: '',
  368. edit_sick_history_time: '',
  369. selectingRows: [],
  370. table_current_index: -1,
  371. edit_current_id: 0,
  372. edit_doctor_id:0,
  373. edit_title: '',
  374. ids:"",
  375. idArr:[],
  376. add_index:0,
  377. disabled:true,
  378. history_date:'',
  379. shen_yizhi:'',
  380. shen_fumo:'',
  381. shen_yishen:'',
  382. shen_guomi:'',
  383. template_name:'',
  384. template_dialog:false,
  385. library_dialog:false,
  386. yizhi_options:[{value:1,label:'无'},{value:2,label:'有'}],
  387. yishen_options:[],
  388. guomi_options:[{value:1,label:'无'},{value:2,label:'有'},{value:3,label:'不详'}],
  389. tableData:[],
  390. admin_user_id:"",
  391. templateList:[],
  392. template_content:"",
  393. template_id:0,
  394. form:{},
  395. wayOptions: null,
  396. patientVascularAccessOne:{},
  397. orgname:'',
  398. ids:[]
  399. }
  400. },
  401. created() {
  402. this.orgname = this.$store.getters.xt_user.org.org_name;
  403. this.fetchAllDoctorAndNurse()
  404. this.wayOptions = getDataConfig("patient", "reimbursement_ways");
  405. console.log('this.wayOptions',this.wayOptions);
  406. this.admin_user_id = this.$store.getters.xt_user.user.id
  407. if(this.admin_user_id == 0){
  408. this.admin_user_id = ""
  409. }
  410. this.patient_id = parseInt(this.$route.query.id)
  411. if (isNaN(this.patient_id) || this.patient_id <= 0) {
  412. this.$notify.error({
  413. title: '错误',
  414. message: '无效的id'
  415. })
  416. this.$router.push('/patients/patients')
  417. return
  418. }
  419. var now = new Date()
  420. this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
  421. var nowDate = new Date()
  422. var nowYear = nowDate.getFullYear()
  423. var nowMonth = nowDate.getMonth() + 1
  424. var nowDay = nowDate.getDate()
  425. this.end_time =
  426. nowYear +
  427. '-' +
  428. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  429. '-' +
  430. (nowDay < 10 ? '0' + nowDay : nowDay)
  431. nowDate.setMonth(nowDate.getMonth() - 1)
  432. nowYear = nowDate.getFullYear()
  433. nowMonth = nowDate.getMonth() + 1
  434. nowDay = nowDate.getDate()
  435. this.start_time =
  436. nowYear +
  437. '-' +
  438. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  439. '-' +
  440. (nowDay < 10 ? '0' + nowDay : nowDay)
  441. this.getlist()
  442. this.fetchPatient(this.patient_id)
  443. },
  444. methods: {
  445. printOne(){
  446. if(this.ids.length == 0){
  447. this.$message.error('请选择要打印的病程')
  448. return
  449. }
  450. this.$router.push({ path: "/sickhistory/print?ids="+this.ids+"&patient_id="+this.patient_id});
  451. },
  452. template_dele(){
  453. console.log("hahhahahah",this.template_id)
  454. if(this.template_id == 0){
  455. this.$message.error("默认模版不能删除!")
  456. return false
  457. }
  458. deleteSickHistoryTempalte(this.template_id).then(response=>{
  459. if(response.data.state == 1){
  460. var msg = response.data.data.msg
  461. this.$message.success("删除成功!")
  462. this.getSickHistoryTempalateOne()
  463. }
  464. })
  465. },
  466. getSickHistoryTempalateOne(){
  467. getSickHistoryTempalate().then(response=>{
  468. if(response.data.state == 1){
  469. this.templateList = []
  470. this.templateList = response.data.data.templateList
  471. if(this.templateList!=null && this.templateList.length>0){
  472. this.$refs.record_table_one.setCurrentRow(this.templateList[0])
  473. }
  474. }
  475. })
  476. },
  477. add_click(){
  478. this.admin_user_id = ""
  479. this.admin_user_id = this.$store.getters.xt_user.user.id
  480. this.fetchAllDoctorAndNurse()
  481. this.$refs.editor.contents = ""
  482. this.id = 0
  483. this.disabled = false
  484. this.add_index = 1
  485. },
  486. showSave(){
  487. this.disabled = true
  488. this.add_index = 0
  489. },
  490. showCancel(){
  491. this.disabled = true
  492. this.add_index = 0
  493. },
  494. rowclick(row,column, eventc){
  495. console.log('row',row);
  496. this.edit_index = row.index
  497. },
  498. template_click(){
  499. console.log('this.add_index',this.getwayoption(this.form.reimbursement_way_id));
  500. if(this.add_index ==0){
  501. this.template_dialog = true
  502. }else{
  503. const mode=`<p style="font-size: 18px;font-weight: 600;width:100%;margin-bottom: 10px;text-align: center;">血液净化治疗患者首次门诊病历</p>
  504. <table border="1" style="border-collapse: collapse;text-align: center;">
  505. <tbody>
  506. <tr>
  507. <td style="width:8%;padding: 5px 0px;font-size: 16px;">
  508. 姓名
  509. </td>
  510. <td style="padding: 5px 0px;font-size: 16px;width:15%;">
  511. ${this.form.name}
  512. </td>
  513. <td style="padding: 5px 0px;font-size: 16px;width:7%;">
  514. 性别
  515. </td>
  516. <td style="padding: 5px 0px;font-size: 16px;width:5%;">
  517. ${this.form.gender==1 ? '男':'女'}
  518. </td>
  519. <td style="padding: 5px 0px;font-size: 16px;width:8%;">
  520. 年龄
  521. </td>
  522. <td style="padding: 5px 0px;font-size: 16px;width:10%;">
  523. ${this.form.age}岁
  524. </td>
  525. <td style="padding: 5px 0px;font-size: 16px;width:12%;">
  526. 医保类型
  527. </td>
  528. <td style="padding: 5px 0px;font-size: 16px;width: 15%;">
  529. ${this.getwayoption(this.form.reimbursement_way_id)}
  530. </td>
  531. <td style="padding: 5px 0px;font-size: 16px;width:10%;">
  532. 透析号
  533. </td>
  534. <td style="padding: 5px 0px;font-size: 16px;width:10%;">
  535. ${this.form.dialysis_no}
  536. </td>
  537. </tr>
  538. <tr>
  539. <td style="padding: 5px 0px;font-size: 16px;">
  540. 电话
  541. </td>
  542. <td style="padding: 5px 0px;font-size: 16px;">
  543. ${this.form.phone}
  544. </td>
  545. <td style="padding: 5px 0px;font-size: 16px;">
  546. 民族
  547. </td>
  548. <td colspan="3" style="padding: 5px 0px;font-size: 16px;">
  549. ${this.form.nation}
  550. </td>
  551. <td style="padding: 5px 0px;font-size: 16px;">
  552. 身份证号
  553. </td>
  554. <td colspan="3" style="padding: 5px 0px;font-size: 16px;">
  555. ${this.form.id_card_no}
  556. </td>
  557. </tr>
  558. <tr>
  559. <td style="padding: 5px 0px;font-size: 16px;">
  560. 联系人
  561. </td>
  562. <td style="padding: 5px 0px;font-size: 16px;">
  563. ${this.form.contact_name}
  564. </td>
  565. <td style="padding: 5px 0px;font-size: 16px;">
  566. 电话
  567. </td>
  568. <td colspan="3" style="padding: 5px 0px;font-size: 16px;">
  569. ${this.form.home_telephone}
  570. </td>
  571. <td style="padding: 5px 0px;font-size: 16px;">
  572. 联系地址
  573. </td>
  574. <td colspan="3" style="padding: 5px 0px;font-size: 16px;">
  575. ${this.form.home_address}
  576. </td>
  577. </tr>
  578. <tr>
  579. <td colspan="2" style="padding: 5px 0px;font-size: 16px;">
  580. 首次透析时间
  581. </td>
  582. <td colspan="4" style="padding: 5px 0px;font-size: 16px;">
  583. ${this.getTime(this.form.first_dialysis_date)}
  584. </td>
  585. <td style="padding: 5px 0px;font-size: 16px;">
  586. 血管通路
  587. </td>
  588. <td colspan="3" style="padding: 5px 0px;font-size: 16px;">
  589. ${this.patientVascularAccessOne.blood_access_part_id } ${ this.patientVascularAccessOne.blood_access_part_opera_id }
  590. </td>
  591. </tr>
  592. <tr>
  593. <td style="padding: 5px 0px;font-size: 16px; ">
  594. 主诉
  595. </td>
  596. <td colspan="9" style="text-align: left; padding:0px 5px ;font-size: 16px;">
  597. ${this.form.patient_complains}
  598. </td>
  599. </tr>
  600. <tr>
  601. <td>
  602. <div class="td_proj_title">现<br />病<br />史</div>
  603. </td>
  604. <td colspan="9">${this.form.present_history}</td>
  605. </tr>
  606. <tr>
  607. <td>
  608. <div class="td_proj_title">既<br />往<br />史</div>
  609. </td>
  610. <td colspan="9">${this.form.past_history}</td>
  611. </tr>
  612. <tr>
  613. <td>
  614. <div class="td_proj_title">过敏史</div>
  615. </td>
  616. <td colspan="5">${this.form.allergic_history}</td>
  617. <td>
  618. <div class="td_proj_title">家族史</div>
  619. </td>
  620. <td colspan="3">${this.form.famality_record}</td>
  621. </tr>
  622. <tr>
  623. <td colspan="10"><div class="td_proj_title">体格检查</div></td>
  624. </tr>
  625. <tr>
  626. <td colspan="10">
  627. T:${this.form.temperature}℃&nbsp;&nbsp;&nbsp; P:${this.form.pulse}次/分&nbsp;&nbsp;&nbsp; R:${this.form.respiratory}次/分&nbsp;&nbsp;&nbsp; BP:${this.form.sbp}/${this.form.dbp}mmHg
  628. </td>
  629. </tr>
  630. <tr>
  631. <td colspan="10">${this.form.remark}</td>
  632. </tr>
  633. <tr>
  634. <td style="width: 15%;">
  635. <div class="td_proj_title">辅助检查</div>
  636. </td>
  637. <td colspan="9">
  638. <p style='min-height:30px'></p>
  639. </td>
  640. </tr>
  641. <tr>
  642. <td>
  643. <div class="td_proj_title">诊<br />断</div>
  644. </td>
  645. <td colspan="9">${this.form.diagnose}</td>
  646. </tr>
  647. <tr>
  648. <td>
  649. <div class="td_proj_title">诊<br />疗<br />计<br />划</div>
  650. </td>
  651. <td colspan="9"><p>${this.form.treatment_plan}</p></td>
  652. </tr>
  653. </tbody>
  654. </table>`
  655. const obj={
  656. id:0,
  657. title:'病史模板',
  658. status:1,
  659. content:mode,
  660. ctime:parseFloat((new Date()).getTime()/1000).toFixed(0),
  661. mtime: parseFloat((new Date()).getTime()/1000).toFixed(0),
  662. }
  663. const arr = []
  664. arr.push(obj)
  665. console.log('1111',arr);
  666. getSickHistoryTempalate().then(response=>{
  667. if(response.data.state == 1){
  668. this.library_dialog = true
  669. this.templateList = response.data.data.templateList
  670. this.templateList = this.templateList.concat(arr)
  671. // this.templateList.unshift(obj)
  672. console.log("hahhahahaha",this.$refs)
  673. if(this.templateList!=null && this.templateList.length>0){
  674. this.$nextTick(()=>{
  675. this.$refs.record_table_one.setCurrentRow(this.templateList[0])
  676. })
  677. }
  678. console.log("haaaaaaaaaaaaa",this.templateList)
  679. }
  680. })
  681. // this.templateList.push(obj)
  682. console.log('11111111',obj);
  683. }
  684. },
  685. template_save(){
  686. var params = {
  687. template_id:this.template_id,
  688. content:this.$refs.editorOne.contents
  689. }
  690. modifySickHistoryTemplate(params).then(response=>{
  691. if(response.data.state == 1){
  692. var msg = response.data.data.msg
  693. this.$message.success("保存成功!")
  694. this.template_dialog = false
  695. }
  696. })
  697. },
  698. prints(){
  699. const style ='@media print{.content{width:960px;margin:0 auto;}}'
  700. printJS({
  701. printable: 'Physical_print_content',
  702. type: 'html',
  703. style: style,
  704. scanStyles: false
  705. })
  706. },
  707. fetchAllDoctorAndNurse() {
  708. fetchMoibleAllDoctorAndNurse().then(response => {
  709. if (response.data.state == 1) {
  710. this.doctorOptions= []
  711. this.doctorOptions = response.data.data.doctors;
  712. }
  713. });
  714. },
  715. didChangeCurrentRecord: function(record) {
  716. this.current_select_record = record
  717. },
  718. recordTime: function(timestamp) {
  719. var time = new Date(timestamp * 1000)
  720. return parseTime(time, '{y}-{m}-{d} {h}:{i}:{s}')
  721. },
  722. modifyAction: function() {
  723. this.edit_new_content = this.$refs.edit_neditor.content
  724. if (this.edit_new_content.length == 0) {
  725. this.$message.error('请填写病程内容')
  726. return
  727. }
  728. if(this.admin_user_id == 0){
  729. this.$message.error('请选择医生')
  730. return
  731. }
  732. if(this.start_time==""){
  733. this.$message.error('请选择时间')
  734. return
  735. }
  736. this.uploading_new_record = true
  737. if(this.shen_yizhi == ""){
  738. this.shen_yizhi = 0
  739. }
  740. if(this.shen_fumo == ""){
  741. this.shen_fumo = 0
  742. }
  743. if(this.shen_guomi == ""){
  744. this.shen_guomi = 0
  745. }
  746. if(this.admin_user_id == ""){
  747. this.admin_user_id = 0
  748. }
  749. let params = {
  750. id:this.id,
  751. patient_id: this.patient_id,
  752. content: this.new_content,
  753. record_time: this.sick_history_time +" 00:00:00",
  754. title: this.title,
  755. is_shenyizhishi:this.shen_yizhi,
  756. is_fumotouxishi:this.shen_fumo,
  757. is_guominyaowu:this.shen_guomi,
  758. guominyaowu_desc:this.guominyaowu_desc,
  759. doctor_id: this.admin_user_id
  760. }
  761. ModifySickHistoryRecord(params).then(rs => {
  762. this.uploading_new_record = false
  763. var resp = rs.data
  764. if (resp.state == 1) {
  765. this.records[this.table_current_index].content = resp.data.record.content
  766. this.records[this.table_current_index].record_time = resp.data.record.record_time
  767. this.records[this.table_current_index].recorder = resp.data.record.recorder
  768. this.records[this.table_current_index].title = resp.data.record.title
  769. this.records[this.table_current_index].doctor_id = resp.data.record.doctor_id
  770. this.records[this.table_current_index].is_shenyizhi_history = resp.data.record.is_shenyizhi_history
  771. this.records[this.table_current_index].is_fumo_dialysis_history = resp.data.record.is_fumo_dialysis_history
  772. this.records[this.table_current_index].is_hypersusceptibility = resp.data.record.is_hypersusceptibility
  773. this.records[this.table_current_index].hypersusceptibility_desc = resp.data.record.hypersusceptibility_desc
  774. this.show_edit_dialog = false
  775. this.edit_new_content = ''
  776. this.table_current_index = -1
  777. } else {
  778. this.table_current_index = -1
  779. this.$message.error(resp.msg)
  780. }
  781. }).catch(error => {
  782. this.table_current_index = -1
  783. this.uploading_new_record = false
  784. this.$message.error(error)
  785. })
  786. },
  787. createAction: function() {
  788. console.log("hhhhhhhhhhhhhhhhhh",this.$refs)
  789. this.new_content = this.$refs.editor.contents
  790. if (this.new_content.length == 0) {
  791. this.$message.error('请填写病程内容')
  792. return
  793. }
  794. if(this.admin_user_id == 0){
  795. this.$message.error('请选择医生')
  796. return
  797. }
  798. if(this.start_time == ""){
  799. this.$message.error('请选择时间')
  800. return
  801. }
  802. if(this.shen_yizhi == ""){
  803. this.shen_yizhi = 0
  804. }
  805. if(this.shen_fumo == ""){
  806. this.shen_fumo = 0
  807. }
  808. if(this.shen_guomi == ""){
  809. this.shen_guomi = 0
  810. }
  811. if(this.admin_user_id == ""){
  812. this.admin_user_id = 0
  813. }
  814. let params = {
  815. id:this.id,
  816. patient_id: this.patient_id,
  817. content: this.new_content,
  818. record_time: this.start_time,
  819. title: this.title,
  820. is_shenyizhishi:this.shen_yizhi,
  821. is_fumotouxishi:this.shen_fumo,
  822. is_guominyaowu:this.shen_guomi,
  823. guominyaowu_desc:this.guominyaowu_desc,
  824. doctor_id: this.admin_user_id
  825. }
  826. createNewSickHistoryRecord(params).then(response => {
  827. if(response.data.state == 1){
  828. var patientSickHistory = response.data.data.patientSickHistory
  829. this.$message.success("保存成功!")
  830. this.getlist()
  831. this.add_index = 0
  832. this.disabled = true
  833. }
  834. }).catch(error => {
  835. this.uploading_new_record = false
  836. this.$message.error(error)
  837. })
  838. },
  839. didSelectTemplate: function(templateContent) {
  840. this.new_content = this.new_content.length > 0 ? (this.new_content + templateContent) : templateContent
  841. }, didEditSelectTemplate: function(templateContent) {
  842. this.edit_new_content = this.edit_new_content.length > 0 ? (this.edit_new_content + templateContent) : templateContent
  843. },
  844. didSelectionChange: function(selectRows) {
  845. var arr = []
  846. for(let i=0;i<selectRows.length;i++){
  847. arr.push(selectRows[i].id)
  848. }
  849. var newArr = arr.join(',')
  850. this.ids = newArr
  851. console.log("select23322332",this.ids)
  852. this.selectingRows = selectRows
  853. },
  854. deleteAction(){
  855. if(this.id == 0){
  856. this.$message.error("请选择要删除的信息!")
  857. return false
  858. }
  859. this.$confirm('确定要取消吗?', '提示', {
  860. confirmButtonText: '确定',
  861. cancelButtonText: '取消',
  862. type: 'warning'
  863. }).then(() => {
  864. deleteNewSickHistory(this.id).then(response=>{
  865. if (response.data.state==1) {
  866. var msg = response.data.data.msg
  867. this.$message.success("保存成功!")
  868. this.getlist()
  869. }
  870. });
  871. }).catch(() => {
  872. });
  873. },
  874. showEdit() {
  875. this.add_index =1
  876. this.disabled = false
  877. }, tableRow({ row, rowIndex }) {
  878. // 把每一行的索引放进row
  879. row.index = rowIndex
  880. }, onRowClick(row, event, column) {
  881. this.table_current_index = row.index
  882. },
  883. getlist(){
  884. var params = {
  885. patient_id:this.patient_id
  886. }
  887. getNewSickHistory(params).then(response=>{
  888. if(response.data.state ==1 ){
  889. var list = response.data.data.list
  890. this.tableData = list
  891. this.$refs.record_table.setCurrentRow(this.tableData[0])
  892. }
  893. })
  894. },
  895. getDocName(admin_user_id){
  896. var user_name = ""
  897. for(let i=0;i<this.doctorOptions.length;i++){
  898. if(admin_user_id == this.doctorOptions[i].admin_user_id){
  899. user_name = this.doctorOptions[i].user_name
  900. }
  901. }
  902. return user_name
  903. },
  904. getTime (time) {
  905. if(time <0){
  906. return ""
  907. }else{
  908. return uParseTime(time, '{y}-{m}-{d}')
  909. }
  910. },
  911. getCurrentChange(val){
  912. this.ids = []
  913. this.ids.push(val.id)
  914. this.$refs.editor.contents = val.content
  915. this.record_time = this.getTime(val.record_time)
  916. this.id = val.id
  917. this.guominyaowu_desc = val.hypersusceptibility_desc
  918. if(val.is_fumo_dialysis_history>0){
  919. this.shen_fumo = val.is_fumo_dialysis_history
  920. }else{
  921. this.shen_fumo = ""
  922. }
  923. if(val.is_shenyizhi_history>0){
  924. this.shen_yizhi = val.is_shenyizhi_history
  925. }else{
  926. this.shen_yizhi = ""
  927. }
  928. if(val.is_hypersusceptibility>0){
  929. this.shen_guomi = val.is_hypersusceptibility
  930. }else{
  931. this.shen_guomi = ""
  932. }
  933. this.patient_id = val.patient_id
  934. this.admin_user_id = val.doctor_id
  935. if(this.admin_user_id == 0){
  936. this.admin_user_id = ""
  937. }
  938. this.start_time = this.getTime(val.record_date)
  939. },
  940. getCurrentChangeOne(val){
  941. this.$refs.editorOne.contents = val.content
  942. this.template_content = ""
  943. this.template_content = val.content
  944. this.template_id = ""
  945. this.template_id = val.id
  946. },
  947. saveTemplate(){
  948. var params = {
  949. title:this.template_name,
  950. content: this.$refs.editor.contents,
  951. }
  952. saveSickHistoryTemplate(params).then(response=>{
  953. if(response.data.state == 1){
  954. var sickHistoryTemplate = response.data.data.sickHistoryTemplate
  955. this.$message.success("保存成功!")
  956. this.template_dialog = false
  957. }
  958. })
  959. },
  960. toContentPint(){
  961. this.$refs.editor.contents = this.template_content
  962. this.library_dialog = false
  963. },
  964. fetchPatient(id) {
  965. fetchPatient(id).then((response) => {
  966. console.log('fetchPatient11111',response.data.data);
  967. if(response.data.state ==1){
  968. this.form = response.data.data.patient;
  969. this.patientVascularAccessOne = response.data.data.patientVascularAccessOne
  970. }
  971. })
  972. .catch((err) => {
  973. console.log("patient get err", err);
  974. this.$notify.error({
  975. title: "错误",
  976. message: "网络异常",
  977. });
  978. this.$router.push("/patients/patients");
  979. });
  980. },
  981. getwayoption(id){
  982. if(id != 0){
  983. for(let i in this.wayOptions){
  984. if(id == this.wayOptions[i].id){
  985. console.log('22222',this.wayOptions[i].name);
  986. return this.wayOptions[i].name
  987. }
  988. }
  989. }else{
  990. return ''
  991. }
  992. }
  993. }
  994. }
  995. </script>
  996. <style rel="stylesheet/css" lang="scss" scoped>
  997. .container {
  998. margin-left: 180px;
  999. padding: 20px;
  1000. background: #fff;
  1001. min-height: calc(100vh - 173px);
  1002. margin-bottom: 15px;
  1003. .record {
  1004. padding-top: 20px;
  1005. }
  1006. }
  1007. .record_content_panel {
  1008. border-width: 1px;
  1009. border-style: solid;
  1010. border-color: #ebeef5;
  1011. min-height: 200px;
  1012. .title {
  1013. font-size: 14px;
  1014. font-weight: 500;
  1015. color: #909399;
  1016. line-height: 44px;
  1017. height: 44px;
  1018. text-align: center;
  1019. border-bottom-width: 1px;
  1020. border-bottom-style: solid;
  1021. border-bottom-color: #ebeef5;
  1022. }
  1023. .content {
  1024. padding: 12px 15px;
  1025. font-size: 15px;
  1026. color: gray;
  1027. line-height: 22px;
  1028. }
  1029. }
  1030. .new_record_form {
  1031. /*/ / padding: 10 px, 25 px;*/
  1032. .textarea_panel {
  1033. margin-top: 10px;
  1034. }
  1035. }
  1036. .Second_title{
  1037. border-left: 5px solid #3891f1f5;
  1038. text-align: left;
  1039. padding-left: 5px;
  1040. // margin-left: 10px;
  1041. margin-bottom: 5px;
  1042. font-size: 16px;
  1043. }
  1044. </style>
  1045. <style lang="scss">
  1046. .el-table td,
  1047. .el-table th.is-leaf,
  1048. .el-table--border,
  1049. .el-table--group {
  1050. border-color: #d0d3da;
  1051. }
  1052. .el-table--border::after,
  1053. .el-table--group::after,
  1054. .el-table::before {
  1055. background-color: #d0d3da;
  1056. }
  1057. .lirary{
  1058. .el-dialog__body{
  1059. padding: 0px 20px !important;
  1060. }
  1061. .el-dialog__footer{
  1062. text-align: center;
  1063. }
  1064. }
  1065. </style>