detail.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <template>
  2. <view class="content">
  3. <view class="item" v-for="(item,index) in list" :key="index">
  4. <view class="title">
  5. <view class="left">{{item.check_location}}</view>
  6. <view class="right">扣分:{{item.score}}</view>
  7. </view>
  8. <view class="time">
  9. <view class="icon"></view>
  10. <view class="text">{{item.check_datetime}}</view>
  11. </view>
  12. <view class="inner">
  13. <view class="item">
  14. <view class="label">问题描述:</view>
  15. <view class="text">{{item.problem}}</view>
  16. </view>
  17. <view class="item">
  18. <view class="label">解决建议:</view>
  19. <view class="text">{{item.correct_proposal}}</view>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import time from "@/common/time.js"
  27. export default {
  28. data() {
  29. return {
  30. start_time: "",
  31. end_time: "",
  32. depart_id:"",
  33. list:[]
  34. };
  35. },
  36. onLoad(option) {
  37. // 初始化时间
  38. this.start_time = new Date().format("yyyy-MM-01")
  39. this.end_time = new Date().format("yyyy-MM-dd")
  40. this.depart_id = option.depart_id
  41. this.get_list()
  42. },
  43. methods:{
  44. get_list(){
  45. this.$p_api.danger_depart_info({
  46. depart_id:this.depart_id,
  47. start_time: this.start_time,
  48. end_time: this.end_time
  49. }).then((res)=>{
  50. // console.log(res.data.data)
  51. this.list = res.data.data
  52. })
  53. }
  54. }
  55. }
  56. </script>
  57. <style lang="scss">
  58. page{
  59. background-color: #F1F1F1;
  60. }
  61. .content{
  62. width: 749rpx;
  63. box-sizing: border-box;
  64. padding: 24rpx;
  65. }
  66. .item{
  67. margin-bottom: 20rpx;
  68. background-color: #FFFFFF;
  69. border-radius: 8px;
  70. overflow: hidden;
  71. .title{
  72. line-height: 80rpx;
  73. border-left: 8rpx solid #E54E3A;
  74. border-bottom: 1px solid #eee;
  75. display: flex;
  76. justify-content: space-between;
  77. .left{
  78. padding-left: 20rpx;
  79. }
  80. .right{
  81. margin-right: 20rpx;
  82. color: #BE5853;
  83. }
  84. }
  85. .time{
  86. height: 80rpx;
  87. display: flex;
  88. align-items: center;
  89. box-sizing: border-box;
  90. padding: 0 20rpx;
  91. .icon{
  92. width: 40rpx;
  93. height: 40rpx;
  94. background-image: url(./icon/time.png);
  95. background-size: cover;
  96. background-repeat: no-repeat;
  97. }
  98. .text{
  99. margin-left: 10rpx;
  100. }
  101. }
  102. .inner{
  103. width: 700rpx;
  104. box-sizing: border-box;
  105. padding: 0 20rpx 40rpx;
  106. .item{
  107. display: flex;
  108. .label{
  109. width: 220rpx;
  110. }
  111. .text{
  112. width: 480rpx;
  113. }
  114. }
  115. }
  116. }
  117. </style>