inquiryTempDetails.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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="content" v-if="item!=null">
  7. <div class="desct">
  8. 问诊模板信息
  9. </div>
  10. <el-descriptions title="" :column="3" border>
  11. <el-descriptions-item label="标题" >
  12. <span v-if="item!=null">{{item.title}}</span>
  13. </el-descriptions-item>
  14. <el-descriptions-item label="状态" >
  15. <dict-tag :options="tempTypeOptions" :value="item.tempType"/>
  16. </el-descriptions-item>
  17. <el-descriptions-item label="排序" >
  18. <span v-if="item!=null">{{item.sort}}</span>
  19. </el-descriptions-item>
  20. <el-descriptions-item label="创建时间" >
  21. <span v-if="item!=null">{{item.createTime}}</span>
  22. </el-descriptions-item>
  23. <el-descriptions-item label="修改时间" >
  24. <span v-if="item!=null">{{item.updateTime}}</span>
  25. </el-descriptions-item>
  26. </el-descriptions>
  27. </div>
  28. <div class="content" v-if="item!=null">
  29. <div class="desct">
  30. 选项内容
  31. </div>
  32. <el-table :data="itemJson" :cell-style="{ textAlign: 'center' }" :header-cell-style="{textAlign: 'center'}">
  33. <el-table-column label="标题" prop="name" >
  34. <template slot-scope="scope">
  35. {{ scope.row.name }}
  36. </template>
  37. </el-table-column>
  38. <el-table-column label="分值" prop="score" >
  39. <template slot-scope="scope">
  40. {{ scope.row.score }}
  41. </template>
  42. </el-table-column>
  43. </el-table>
  44. </div>
  45. </div>
  46. </template>
  47. <script>
  48. import { listInquiryTemp, getInquiryTemp, delInquiryTemp, addInquiryTemp, updateInquiryTemp, exportInquiryTemp } from "@/api/his/inquiryTemp";
  49. export default {
  50. name: "patientdetails",
  51. props:["data"],
  52. data() {
  53. return {
  54. // 状态字典
  55. tempTypeOptions: [],
  56. item:null,
  57. itemJson:[],
  58. }
  59. },
  60. created() {
  61. this.getDicts("sys_inquiry_temp_type").then(response => {
  62. this.tempTypeOptions = response.data;
  63. });
  64. },
  65. methods: {
  66. getDetails(orderId) {
  67. this.item=null;
  68. getInquiryTemp(orderId).then(response => {
  69. this.item = response.data;
  70. this.itemJson=JSON.parse(response.data.itemJson);
  71. });
  72. },
  73. }
  74. }
  75. </script>
  76. <style>
  77. .el-descriptions-item__content {
  78. max-width: 150px;
  79. min-width: 100px;
  80. }
  81. .content{
  82. height: 100%;
  83. background-color: #fff;
  84. padding: 0px 20px 20px;
  85. margin: 20px;
  86. }
  87. .el-descriptions-item__label.is-bordered-label{
  88. font-weight: normal;
  89. }
  90. .desct{
  91. padding-top: 20px;
  92. padding-bottom: 20px;
  93. color: #524b4a;
  94. font-weight: bold;
  95. }
  96. </style>