index.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <template>
  2. <view>
  3. <view class="text-block">
  4. <text class="text-title">姓名</text>
  5. <text>{{detailsData.name}}</text>
  6. </view>
  7. <view class="text-block">
  8. <text class="text-title">性别</text>
  9. <text>{{detailsData.sex == 1 ? '男' : '女'}}</text>
  10. </view>
  11. <view class="text-block">
  12. <text class="text-title">班级</text>
  13. <text>{{detailsData.className}}</text>
  14. </view>
  15. <view class="text-block">
  16. <text class="text-title">症状体征</text>
  17. <text>{{detailsData.symptom}}</text>
  18. </view>
  19. <view class="text-block">
  20. <text class="text-title">症状体征照片</text>
  21. <text class="text-img">
  22. <image src="https://cdn.uviewui.com/uview/swiper/1.jpg"></image>
  23. </text>
  24. </view>
  25. <view class="text-block">
  26. <text class="text-title">处理措施</text>
  27. <text>{{detailsData.symptomImgs}}</text>
  28. </view>
  29. <view class="text-block">
  30. <text class="text-title">处置后照片</text>
  31. <text class="text-img">
  32. <image src="https://cdn.uviewui.com/uview/swiper/1.jpg"></image>
  33. </text>
  34. </view>
  35. <view v-for="(item, id) in detailsData.disposeRecords">
  36. <view class="text-block">
  37. <text class="text-title">后续处理</text>
  38. <text class="text-div">{{item.text}}</text>
  39. </view>
  40. <view class="handle-time">
  41. 处理时间:{{item.createTime}}
  42. </view>
  43. </view>
  44. <view class="text-block" style="border-bottom: 20rpx solid #f5f6f7;">
  45. <text class="text-title">状态</text>
  46. <text>跟踪观察</text>
  47. </view>
  48. <view class="edit" @click="toEdit">
  49. 编辑
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. id: '',
  58. detailsData: '',
  59. }
  60. },
  61. onLoad(options){
  62. console.log(options.id)
  63. this.id = options.id
  64. this.getData()
  65. },
  66. methods: {
  67. getData(){
  68. this.$request({
  69. url: this.$api.index.emergencyDetail,
  70. data: {
  71. id: this.id,
  72. },
  73. }).then(res => {
  74. for(let item of res.data.detail.disposeRecords){
  75. item.createTime = item.createTime.replace('T', ' ')
  76. }
  77. this.detailsData = res.data.detail
  78. })
  79. },
  80. // 跳转编辑页面
  81. toEdit(){
  82. uni.navigateTo({
  83. url: `/pages/addHandle/index?id=${this.id}&type=2`
  84. })
  85. },
  86. }
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. page{
  91. /* background-color: #D9D9D9; */
  92. // background-color: #F5F5F5 !important;
  93. padding-top: 40rpx;
  94. box-sizing: border-box;
  95. font-size: 32rpx;
  96. }
  97. .text-block{
  98. padding: 18rpx 32rpx;
  99. box-sizing: border-box;
  100. }
  101. .text-title{
  102. width: 240rpx;
  103. display: inline-block;
  104. color: rgba(0,0,0,0.60);
  105. vertical-align: top;
  106. }
  107. .text-div{
  108. width: 450rpx;
  109. display: inline-block;
  110. overflow:hidden;
  111. white-space:nowrap;
  112. text-overflow:ellipsis;
  113. }
  114. .text-img{
  115. width: 160rpx;
  116. height: 160rpx;
  117. border-radius: 13px;
  118. background-color: #ccc;
  119. display: inline-block;
  120. overflow: hidden;
  121. image{
  122. width: 100%;
  123. height: 100%;
  124. }
  125. }
  126. .handle-time{
  127. height: 80rpx;
  128. line-height: 80rpx;
  129. background: #f5f6f7;
  130. box-sizing: border-box;
  131. padding-left: 32rpx;
  132. color: rgba(0,0,0,0.60);
  133. font-size: 23rpx;
  134. }
  135. .edit{
  136. height: 112rpx;
  137. line-height: 112rpx;
  138. text-align: center;
  139. color: #7B5DF0;
  140. font-size: 33rpx;
  141. }
  142. </style>