index.vue 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  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 style="float: right; width: 447rpx; word-wrap: break-word;">{{detailsData.symptom}}</text>
  18. </view>
  19. <view class="text-block">
  20. <text class="text-title">症状体征照片</text>
  21. <text v-if="detailsData.symptomImgs.length != 0" class="text-img" v-for="item in detailsData.symptomImgs">
  22. <image :src="item"></image>
  23. </text>
  24. <text v-else style="float: right; width: 447rpx; word-wrap: break-word;">无</text>
  25. </view>
  26. <view class="text-block">
  27. <text class="text-title">处置后照片</text>
  28. <text v-if="detailsData.emergencyImgs.length != 0" class="text-img" v-for="item in detailsData.emergencyImgs">
  29. <image :src="item"></image>
  30. </text>
  31. <text v-else style="float: right; width: 447rpx; word-wrap: break-word;">无</text>
  32. </view>
  33. <view class="text-block">
  34. <text class="text-title">处理措施</text>
  35. <text style="float: right; width: 447rpx; word-wrap: break-word;">{{detailsData.disposeRecords[0].text}}</text>
  36. </view>
  37. <view v-for="(item, id) in detailsData.disposeRecords">
  38. <view class="text-block" v-if="id != 0">
  39. <text class="text-title">后续处理</text>
  40. <text style="float: right; width: 447rpx; word-wrap: break-word;">{{item.text}}</text>
  41. </view>
  42. <view class="handle-time">
  43. 处理时间:{{item.createTime}}
  44. </view>
  45. </view>
  46. <view class="text-block">
  47. <text class="text-title">备注</text>
  48. <text style="float: right; width: 447rpx; word-wrap: break-word;">{{detailsData.remark}}</text>
  49. </view>
  50. <view class="text-block" style="border-bottom: 20rpx solid #f5f6f7;">
  51. <text class="text-title">状态</text>
  52. <text>{{detailsData.isWatch ? '跟踪观察' : '取消观察'}}</text>
  53. </view>
  54. <view class="edit" @click="toEdit">
  55. 编辑
  56. </view>
  57. <!-- <view style="height: 200rpx;"></view> -->
  58. </view>
  59. </template>
  60. <script>
  61. export default {
  62. data() {
  63. return {
  64. id: '',
  65. detailsData: '',
  66. }
  67. },
  68. onLoad(options){
  69. console.log(options.id)
  70. this.id = options.id
  71. this.getData()
  72. },
  73. methods: {
  74. getData(){
  75. this.$request({
  76. url: this.$api.index.emergencyDetail,
  77. data: {
  78. id: this.id,
  79. },
  80. }).then(res => {
  81. for(let item of res.data.detail.disposeRecords){
  82. item.createTime = item.createTime.replace('T', ' ')
  83. item.createTime = item.createTime.slice(0, item.createTime.length - 3)
  84. }
  85. res.data.detail.symptomImgs = res.data.detail.symptomImgs.split(',')
  86. res.data.detail.emergencyImgs = res.data.detail.emergencyImgs.split(',')
  87. this.detailsData = res.data.detail
  88. console.log(this.detailsData)
  89. })
  90. },
  91. // 跳转编辑页面
  92. toEdit(){
  93. uni.navigateTo({
  94. url: `/pages/addHandle/index?id=${this.id}&type=2`
  95. })
  96. },
  97. }
  98. }
  99. </script>
  100. <style lang="scss" scoped>
  101. page{
  102. /* background-color: #D9D9D9; */
  103. // background-color: #F5F5F5 !important;
  104. padding-top: 40rpx;
  105. box-sizing: border-box;
  106. font-size: 32rpx;
  107. }
  108. .text-block{
  109. padding: 18rpx 32rpx;
  110. box-sizing: border-box;
  111. overflow: hidden;
  112. }
  113. .text-title{
  114. width: 240rpx;
  115. display: inline-block;
  116. color: rgba(0,0,0,0.60);
  117. vertical-align: top;
  118. }
  119. .text-div{
  120. width: 450rpx;
  121. display: inline-block;
  122. overflow:hidden;
  123. white-space:nowrap;
  124. text-overflow:ellipsis;
  125. }
  126. .text-img{
  127. width: 160rpx;
  128. height: 160rpx;
  129. border-radius: 13px;
  130. background-color: #ccc;
  131. display: inline-block;
  132. overflow: hidden;
  133. margin-right: 20rpx;
  134. image{
  135. width: 100%;
  136. height: 100%;
  137. }
  138. }
  139. .handle-time{
  140. height: 80rpx;
  141. line-height: 80rpx;
  142. background: #f5f6f7;
  143. box-sizing: border-box;
  144. padding-left: 32rpx;
  145. color: rgba(0,0,0,0.60);
  146. font-size: 23rpx;
  147. }
  148. .edit{
  149. height: 112rpx;
  150. line-height: 112rpx;
  151. text-align: center;
  152. color: #7B5DF0;
  153. font-size: 33rpx;
  154. }
  155. </style>