patientDetails.vue 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <template>
  2. <div style="background-color: #f0f2f5; padding-bottom: 20px; min-height: 100%; " >
  3. <div style="padding: 20px; background-color: #fff;">
  4. 患者详情
  5. </div>
  6. <div class="my-content" v-if="item!=null">
  7. <div class="my-title">
  8. 患者信息
  9. </div>
  10. <el-descriptions title="" :column="3" border>
  11. <el-descriptions-item label="患者姓名" >
  12. <span v-if="item!=null">{{item.patientName}}</span>
  13. </el-descriptions-item>
  14. <el-descriptions-item label="身份证号" >
  15. <span v-if="item!=null">{{item.idCard}}</span>
  16. </el-descriptions-item>
  17. <el-descriptions-item label="出生年月" >
  18. <span v-if="item!=null">{{item.birthday}}</span>
  19. </el-descriptions-item>
  20. <el-descriptions-item label="性别" >
  21. <dict-tag :options="sexOptions" :value="item.sex"/>
  22. </el-descriptions-item>
  23. <el-descriptions-item label="手机号" >
  24. <span v-if="item!=null">{{item.mobile}}</span>
  25. </el-descriptions-item>
  26. <el-descriptions-item label="体重G" >
  27. <span v-if="item!=null">{{item.weight}}</span>
  28. </el-descriptions-item>
  29. <el-descriptions-item label="创建时间" >
  30. <span v-if="item!=null">{{item.createTime}}</span>
  31. </el-descriptions-item>
  32. </el-descriptions>
  33. </div>
  34. <div class="my-content" v-if="item!=null" >
  35. <div class="my-title">
  36. 采集信息详情
  37. <!-- 传入 userId -->
  38. <collection-detail
  39. v-if="item.userId"
  40. :userId="item.userId"
  41. :prescribeId="0"
  42. />
  43. </div>
  44. </div>
  45. <div class="my-content" v-if="item!=null" >
  46. <div class="my-title">
  47. 问诊订单
  48. </div>
  49. </div>
  50. <div class="my-content" v-if="item!=null" >
  51. <div class="my-title">
  52. 处方单
  53. </div>
  54. </div>
  55. </div>
  56. </template>
  57. <script>
  58. import collectionDetail from '@/views/components/collection/collectionDetail.vue';
  59. import { getPatientByPatientId } from "@/api/patient";
  60. export default {
  61. components: {
  62. collectionDetail // 注册引入的组件
  63. },
  64. name: "patientdetails",
  65. props:["data"],
  66. data() {
  67. return {
  68. sexOptions: [],
  69. item:null,
  70. }
  71. },
  72. created() {
  73. this.getDicts("sys_patient_sex").then(response => {
  74. this.sexOptions = response.data;
  75. });
  76. },
  77. methods: {
  78. getDetails(patientId) {
  79. this.item=null;
  80. getPatientByPatientId(patientId).then(response => {
  81. this.item = response.data;
  82. });
  83. },
  84. }
  85. }
  86. </script>
  87. <style lang="scss" scoped>
  88. .my-content{
  89. background-color: #fff;
  90. padding: 20px;
  91. margin: 20px;
  92. .my-title{
  93. margin-bottom: 20px;
  94. color: #524b4a;
  95. font-weight: bold;
  96. }
  97. .btn-box{
  98. margin:15px 0px;
  99. text-align:right;
  100. }
  101. }
  102. .el-descriptions-item__label.is-bordered-label{
  103. font-weight: normal;
  104. }
  105. .el-descriptions-item__content {
  106. max-width: 500px;
  107. min-width: 100px;
  108. }
  109. </style>