index.vue 4.0 KB

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