Elizabeth's proactive approach involves introducing urinal toilet attachment , an ingenious concept that optimizes space and functionality.

doctorDesk.vue 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. <template>
  2. <div class="main-contain new-main-contain">
  3. <div class="position">
  4. <bread-crumb :crumbs='crumbs'></bread-crumb>
  5. </div>
  6. <div class="app-container" style="display:flex;flex: 1;padding: 20px 20px 0px 20px;">
  7. <div class="mainLeft">
  8. <div class="mainCell" style="justify-content: space-between;">
  9. <p>未就诊:<span>{{cal_one}}</span>人</p>
  10. <p>已就诊:<span>{{cal_two}}</span>人</p>
  11. </div>
  12. <div class="mainCell">
  13. <el-radio-group v-model="radio" @change="change">
  14. <el-radio :label="1">未就诊</el-radio>
  15. <el-radio :label="2">已就诊</el-radio>
  16. <el-radio :label="0">全部</el-radio>
  17. </el-radio-group>
  18. </div>
  19. <div class="mainCell" style="margin-bottom:10px;">
  20. <el-input size="small" placeholder="请输入姓名或就诊号" @keyup.enter.native='searchAction' v-model="search_input" class="filter-item"/>
  21. <el-button size="small" style="margin-left:10px;" class="filter-item" type="primary" @click="searchAction">
  22. 搜索
  23. </el-button>
  24. </div>
  25. <div>
  26. <el-table :data="patientTableData" :height="tableHeight" @row-click='choosePatient' border style="width: 100%;"
  27. :row-style="{ color: '#303133' }"
  28. :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
  29. highlight-current-row
  30. ref="tab"
  31. >
  32. <el-table-column prop="name" label="姓名" width='89'>
  33. <template slot-scope="scope">{{scope.row.patients?scope.row.patients.name:''}}</template>
  34. </el-table-column>
  35. <el-table-column prop="name" label="就诊号" width="110">
  36. <template slot-scope="scope">{{ scope.row.his_patient ?scope.row.his_patient.number:''}}</template>
  37. </el-table-column>
  38. </el-table>
  39. </div>
  40. </div>
  41. <div class="mainRight">
  42. <div class="mainHeader">
  43. <el-radio-group class="titleBox" v-model="titleType" @change="changeTab">
  44. <el-radio-button label="电子处方"></el-radio-button>
  45. <el-radio-button label="电子病历"></el-radio-button>
  46. </el-radio-group>
  47. <div class="mainCell fixedCell" style="float:right" v-if="titleType == '处方'">
  48. <el-button size="small" ref="button_one" @click="open(1)" type="primary" style="margin-left:10px;">保存</el-button>
  49. <el-button size="small" ref="button_two" @click="open(2)" type="primary">打印</el-button>
  50. <el-button size="small" ref="button_three" @click="open(4)" type="primary">选择模板</el-button>
  51. <el-button size="small" ref="button_four" @click="open(5)" type="primary">存模板</el-button>
  52. </div>
  53. <div class="mainCell fixedCell" style="float:right" v-if="titleType == '病历'">
  54. <el-button size="small" @click="opentwo(1)" type="primary" style="margin-left:10px;">保存</el-button>
  55. <el-button size="small" @click="opentwo(2)" type="primary">打印</el-button>
  56. <el-button size="small" @click="opentwo(3)" type="primary">病历调用</el-button>
  57. <el-button size="small" @click="opentwo(4)" type="primary">存模板</el-button>
  58. </div>
  59. </div>
  60. <!--<desk-prescription ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo" :hisPatientInfo="hisPatientInfo"-->
  61. <!--v-if="titleType == '处方'" style="flex:1;"></desk-prescription>-->
  62. <desk-prescription :diagnoses="diagnoses" :other_sick="other_sick" :record_date="record_date"
  63. ref="prescriptions" :prescriptions="prescriptions" :patientInfo="patientInfo"
  64. :hisPatientInfo="hisPatientInfo"
  65. v-show="titleType == '处方'" style="flex:1;"></desk-prescription>
  66. <desk-record :record_date="record_date" :case_history="case_history" :patientInfo="patientInfo"
  67. :hisPatientInfo="hisPatientInfo" v-show="titleType == '病历'" :detalid="detalid" ref="child"></desk-record>
  68. <medicalRecord ref='medicalRecord' @func="getMsgFormSon" ></medicalRecord>
  69. <saveRecordTemplate ref='saveRecordTemplate'></saveRecordTemplate>
  70. </div>
  71. </div>
  72. </div>
  73. </template>
  74. <script>
  75. import BreadCrumb from '@/xt_pages/components/bread-crumb'
  76. import deskPrescription from './components/deskPrescription'
  77. import deskRecord from './components/deskRecord'
  78. import { getPatientInfo, getSchedulePatientList,createCaseHistory } from '@/api/his/his'
  79. import { getDictionaryDataConfig } from '@/utils/data'
  80. import medicalRecord from './components/medicalRecord'
  81. import saveRecordTemplate from './components/saveRecordTemplate'
  82. import { uParseTime } from '@/utils/tools'
  83. export default {
  84. components: {
  85. BreadCrumb,
  86. deskPrescription,
  87. deskRecord,
  88. medicalRecord,
  89. saveRecordTemplate
  90. },
  91. data() {
  92. return {
  93. tableHeight:'',
  94. fullHeight: document.documentElement.clientHeight,
  95. prescriptions: [
  96. {
  97. name: '处方1',
  98. advice: [],
  99. project: []
  100. }
  101. ],
  102. search_input: '',
  103. cal_one: 0,
  104. cal_two: 0,
  105. radio: 1,
  106. record_date: '',
  107. crumbs: [
  108. { path: false, name: '门诊医生站' },
  109. { path: false, name: '医生工作台' }
  110. ],
  111. titleType: '处方',
  112. patientTableData: [{}],
  113. patientTableDataTwo:[{}],
  114. patientInfo: {},
  115. hisPatientInfo: {},
  116. case_history: {},
  117. patient_id: 0,
  118. diagnoses: [],
  119. other_sick: [],
  120. info:{},
  121. templatedetail:{},
  122. detalid:0,
  123. }
  124. },
  125. methods: {
  126. getDictionaryDataConfig(module, filed_name) {
  127. console.log(getDictionaryDataConfig(module, filed_name))
  128. return getDictionaryDataConfig(module, filed_name)
  129. },
  130. changeTab(val) {
  131. },
  132. searchAction() {
  133. if(this.search_input.length == 0){
  134. this.patientTableData = this.patientTableDataTwo
  135. }else{
  136. let arr = []
  137. for (let i = 0; i < this.patientTableData.length; i++){
  138. if(this.patientTableData[i].patients.name.indexOf(this.search_input) != -1 ){
  139. arr = arr.concat(this.patientTableData[i])
  140. }
  141. }
  142. if(arr.length > 0){
  143. this.patientTableData = arr
  144. }
  145. }
  146. },
  147. change(val) {
  148. this.getList()
  149. },
  150. getList() {
  151. let params = {
  152. 'record_date': this.record_date,
  153. 'type': this.radio
  154. }
  155. getSchedulePatientList(params).then(response => {
  156. if (response.data.state == 0) {
  157. this.$message.error(response.data.msg)
  158. return false
  159. } else {
  160. this.patientTableData = response.data.data.list
  161. this.patientTableDataTwo = response.data.data.list
  162. console.log('222', this.patientTableData)
  163. // this.$refs.tab.setCurrentRow(this.patientTableData[0])
  164. let cal_one = 0
  165. let cal_two = 0
  166. for (let i = 0; i < response.data.data.list.length; i++) {
  167. if (response.data.data.list[i].prescription == null || response.data.data.list[i].prescription.length == 0) {
  168. cal_one = cal_one + 1
  169. }
  170. if (response.data.data.list[i].prescription != null && response.data.data.list[i].prescription.length > 0) {
  171. cal_two = cal_two + 1
  172. }
  173. }
  174. this.$refs.tab.setCurrentRow(this.patientTableData[0])
  175. console.log(this.patientTableData[0])
  176. this.choosePatient(this.patientTableData[0])
  177. this.cal_one = cal_one
  178. this.cal_two = cal_two
  179. }
  180. })
  181. },
  182. choosePatient(val) {
  183. let params = {
  184. 'record_date': this.record_date,
  185. 'patient_id': val.patients.id
  186. }
  187. getPatientInfo(params).then(response => {
  188. if (response.data.state == 0) {
  189. this.$message.error(response.data.msg)
  190. return false
  191. } else {
  192. this.prescriptions = []
  193. this.patientInfo = response.data.data.xt_info
  194. this.hisPatientInfo = response.data.data.his_info
  195. this.case_history = response.data.data.case_history
  196. this.info = response.data.data.info
  197. this.patientInfo.birth = uParseTime(this.patientInfo.birthday, '{y}-{m}-{d}')
  198. if (this.case_history.temperature <= 0) {
  199. this.case_history.temperature = ''
  200. }
  201. if (this.case_history.blood_sugar <= 0) {
  202. this.case_history.blood_sugar = ''
  203. }
  204. if (this.case_history.pulse <= 0) {
  205. this.case_history.pulse = ''
  206. }
  207. if (this.case_history.sbp <= 0) {
  208. this.case_history.sbp = ''
  209. }
  210. if (this.case_history.dbp <= 0) {
  211. this.case_history.dbp = ''
  212. }
  213. if (this.case_history.height <= 0) {
  214. this.case_history.height = ''
  215. }
  216. if (this.case_history.blood_fat <= 0) {
  217. this.case_history.blood_fat = ''
  218. }
  219. if (this.case_history.sick_type <= 0) {
  220. this.case_history.sick_type = ''
  221. }
  222. this.case_history.sick_date = uParseTime(this.case_history.sick_date, '{y}-{m}-{d}')
  223. if (this.case_history.is_infect == 1) {
  224. this.case_history.is_infect = true
  225. } else {
  226. this.case_history.is_infect = false
  227. }
  228. if (response.data.data.prescription.length > 0) {
  229. for (let i = 0; i < response.data.data.prescription.length; i++) {
  230. var prescription = response.data.data.prescription[i]
  231. let tempAdvice = []
  232. let tempProject = []
  233. for (let b = 0; b < prescription.advices.length; b++) {
  234. let obj = {
  235. advice_id: prescription.advices[b].id,
  236. drug_name: prescription.advices[b].advice_name,
  237. single_dose: prescription.advices[b].single_dose,
  238. delivery_way: prescription.advices[b].delivery_way,
  239. execution_frequency: prescription.advices[b].execution_frequency,
  240. retail_price: prescription.advices[b].price.toString(),
  241. remark: prescription.advices[b].remark,
  242. prescribing_number:prescription.advices[b].prescribing_number.toString(),
  243. single_dose_unit:prescription.advices[b].single_dose_unit,
  244. prescribing_number_unit:prescription.advices[b].prescribing_number_unit,
  245. min_unit:prescription.advices[b].single_dose_unit,
  246. medical_insurance_number:prescription.advices[b].med_list_codg,
  247. id:prescription.advices[b].drug_id
  248. }
  249. tempAdvice.push(obj)
  250. }
  251. for (let b = 0; b < prescription.project.length; b++) {
  252. console.log(prescription.project[b])
  253. console.log(prescription.project[b].project)
  254. let obj = {
  255. id: prescription.project[b].id,
  256. project_id: prescription.project[b].project.id,
  257. project_name: prescription.project[b].project.project_name,
  258. statistical_classification: prescription.project[b].project.statistical_classification,
  259. single_dose: prescription.project[b].single_dose,
  260. delivery_way: prescription.project[b].delivery_way,
  261. execution_frequency: prescription.project[b].execution_frequency,
  262. number_days: prescription.project[b].day,
  263. total:prescription.project[b].count.toString(),
  264. price:prescription.project[b].price,
  265. remark:prescription.project[b].remark,
  266. medical_code:prescription.project[b].project.medical_code,
  267. }
  268. tempProject.push(obj)
  269. }
  270. let index = i + 1
  271. let obj = {
  272. id: prescription.id,
  273. name: '处方' + index,
  274. advices: tempAdvice,
  275. project: tempProject,
  276. order_status:prescription.order_status
  277. }
  278. this.prescriptions.push(obj)
  279. }
  280. } else {
  281. let obj = {
  282. id:0,
  283. name: '处方' + 1,
  284. advices: [],
  285. project: [],
  286. orderStatus:0,
  287. }
  288. this.prescriptions.push(obj)
  289. }
  290. console.log(this.prescriptions)
  291. this.$refs.prescriptions.setData(this.prescriptions,this.info)
  292. }
  293. })
  294. },
  295. open(index) {
  296. if (index == 1) {
  297. this.$refs.prescriptions.open(1)
  298. } else if (index == 2) {
  299. this.$router.push("/outpatientDoctorStation/template/printOne?record="+this.record_date)
  300. } else if (index == 3) {
  301. this.$refs.prescriptions.open(3)
  302. } else if (index == 4) {
  303. this.$refs.prescriptions.open(4)
  304. }
  305. },
  306. opentwo(index) {
  307. console.log("index",index)
  308. if (index == 1) {
  309. if(this.patientInfo.id == undefined){
  310. this.$message.error("请先选择病人")
  311. return
  312. }
  313. this.$refs.child.createCaseHistory()
  314. } else if (index == 2) {
  315. this.$router.push('/outpatientDoctorStation/recordPrint?record='+this.record_date)
  316. } else if (index == 3) {
  317. this.$refs.medicalRecord.show()
  318. } else if (index == 4) {
  319. this.$refs.saveRecordTemplate.show(this.case_history)
  320. }
  321. },
  322. // changePatient(val){
  323. // console.log("患者val",val)
  324. // this.hisPatientInfo = val.hisPatientInfo
  325. // console.log("333333",this.hisPatientInfo)
  326. // }
  327. getMsgFormSon(id){
  328. console.log("id----------",id)
  329. this.detalid = id
  330. },
  331. // getTemplateDetail(id){
  332. // getTemplateDetail(id).then(response=>{
  333. // if(response.data.state == 1){
  334. // var templatedetail = response.data.data.templateDetail
  335. // console.log("templatedetail",templatedetail)
  336. // templatedetail =
  337. // }
  338. // })
  339. // },
  340. },
  341. created() {
  342. var nowDate = new Date()
  343. var nowYear = nowDate.getFullYear()
  344. var nowMonth = nowDate.getMonth() + 1
  345. var nowDay = nowDate.getDate()
  346. this.record_date =
  347. nowYear +
  348. '-' +
  349. (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
  350. '-' +
  351. (nowDay < 10 ? '0' + nowDay : nowDay)
  352. this.getList()
  353. this.diagnoses = this.getDictionaryDataConfig('system', 'diagnose')
  354. this.other_sick = this.getDictionaryDataConfig('system', 'other_sick_history')
  355. console.log('1222232434234',document.documentElement.clientHeight)
  356. let tableHeight = document.body.clientHeight - 263
  357. this.tableHeight = tableHeight
  358. },
  359. mounted(){
  360. const that = this
  361. window.onresize = () => {
  362. return (() => {
  363. window.fullHeight = document.documentElement.clientHeight
  364. that.fullHeight = window.fullHeight
  365. })()
  366. }
  367. },
  368. watch: {
  369. fullHeight (val) {
  370. if(!this.timer) {
  371. this.fullHeight = val
  372. let tableHeight = val - 263
  373. this.tableHeight = tableHeight
  374. this.timer = true
  375. let that = this
  376. setTimeout(function (){
  377. that.timer = false
  378. },400)
  379. }
  380. }
  381. }
  382. }
  383. </script>
  384. <style lang="scss" scoped>
  385. .new-main-contain {
  386. height: 100%;
  387. display: flex;
  388. flex-direction: column;
  389. }
  390. .app-container {
  391. height: 100%;
  392. }
  393. .mainCell {
  394. height: 36px;
  395. display: flex;
  396. align-items: center;
  397. }
  398. .mainLeft {
  399. width: 200px;
  400. height: 100%;
  401. display: flex;
  402. flex-direction: column;
  403. .el-radio {
  404. margin-right: 5px;
  405. }
  406. }
  407. .mainRight {
  408. margin-left: 20px;
  409. flex: 1;
  410. height: 100%;
  411. display: flex;
  412. flex-direction: column;
  413. overflow-y: auto;
  414. .cellSpan {
  415. min-width: 80px;
  416. display: inline-block;
  417. margin-right: 10px;
  418. }
  419. }
  420. .mainCenter {
  421. display: flex;
  422. flex: 1;
  423. }
  424. .centerLeft {
  425. flex: 1;
  426. display: flex;
  427. flex-direction: column;
  428. position: relative;
  429. .el-form-item {
  430. width: 32%;
  431. margin-right: 1%;
  432. float: left;
  433. }
  434. .el-form-item__label {
  435. text-align: left;
  436. }
  437. }
  438. .backColor {
  439. background: #f6f8f9;
  440. height: 5px;
  441. margin-bottom: 5px;
  442. }
  443. .tabsBox {
  444. position: relative;
  445. height: 76%;
  446. overflow-y: auto;
  447. margin-bottom: 60px;
  448. .el-tabs__item {
  449. padding: 0 10px;
  450. }
  451. }
  452. .preTabs {
  453. height: 100%;
  454. }
  455. .costBox {
  456. width: 100%;
  457. height: 60px;
  458. background: #fff;
  459. position: absolute;
  460. bottom: 0;
  461. display: flex;
  462. align-items: center;
  463. }
  464. .addTab {
  465. position: absolute;
  466. right: 0;
  467. top: 14px;
  468. z-index: 20;
  469. }
  470. .centerRight {
  471. width: 300px;
  472. margin-left: 5px;
  473. display: flex;
  474. flex-direction: column;
  475. position: relative;
  476. }
  477. .rightTab {
  478. height: 40px;
  479. width: 100%;
  480. border: 1px solid #d2d2d2;
  481. box-sizing: border-box;
  482. p {
  483. width: 50%;
  484. height: 40px;
  485. line-height: 40px;
  486. text-align: center;
  487. background: #eee;
  488. float: left;
  489. }
  490. > p:last-child {
  491. border-left: 1px solid #d2d2d2;
  492. float: right;
  493. }
  494. .activeP {
  495. background: #409EFF;
  496. color: #fff;
  497. }
  498. }
  499. .comfirmBox {
  500. width: 100%;
  501. height: 60px;
  502. background: #fff;
  503. position: absolute;
  504. bottom: 0;
  505. display: flex;
  506. align-items: center;
  507. justify-content: space-between;
  508. }
  509. .mainHeader{
  510. width:100%;
  511. background: #fff;
  512. position: fixed;
  513. z-index: 100;
  514. height: 36px;
  515. }
  516. .titleBox{
  517. position: fixed;
  518. z-index: 99;
  519. background: #fff;
  520. }
  521. .fixedCell{
  522. position: fixed;
  523. z-index: 99;
  524. right: 30px;
  525. background: #fff;
  526. }
  527. </style>
  528. <style lang="scss">
  529. .centerLeft {
  530. .el-form-item__label {
  531. text-align: left;
  532. }
  533. }
  534. .tabsBox {
  535. .el-tabs__item {
  536. padding: 0 10px;
  537. }
  538. .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:nth-child(2), .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:nth-child(2) {
  539. padding: 0 10px;
  540. }
  541. .el-tabs--bottom .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--bottom.el-tabs--card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--left > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top .el-tabs--right > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--border-card > .el-tabs__header .el-tabs__item:last-child, .el-tabs--top.el-tabs--card > .el-tabs__header .el-tabs__item:last-child {
  542. padding: 0 10px;
  543. }
  544. .el-tabs--card > .el-tabs__header .el-tabs__item.is-active.is-closable {
  545. padding: 0 10px;
  546. }
  547. }
  548. .centerRight {
  549. .el-tabs__nav-scroll {
  550. display: flex;
  551. }
  552. .el-tabs__nav {
  553. margin: 0 auto;
  554. }
  555. .el-table th .cell, .el-table td .cell {
  556. padding: 0 2px;
  557. }
  558. }
  559. .preTabs {
  560. .el-tabs__content {
  561. }
  562. }
  563. .rightTabs {
  564. height: 100%;
  565. .el-tabs__content {
  566. }
  567. }
  568. </style>