auditItemDetails.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <template>
  2. <view class="auditItemDetails">
  3. <view class="top-box">
  4. <view class="icon-wrap">
  5. <image src="../../static/chahexiang-bg.png"></image>
  6. <text>查核项</text>
  7. </view>
  8. <image class="img-tuli"
  9. @click="goLegendDetails(detail.checkItemId)"
  10. src="../../static/tuli.png"></image>
  11. <view class="title-wrap">
  12. <text>{{detail.checkItemName}}</text>
  13. <text>{{detail.checkPointName}}</text>
  14. </view>
  15. <view class="children">
  16. <view class="child">
  17. <text>{{detail.deptName || '--'}}</text>
  18. <text>查核单位</text>
  19. </view>
  20. <view class="child">
  21. <text>{{detail.checkModelName || '--'}}</text>
  22. <text>查核方式</text>
  23. </view>
  24. <view class="child">
  25. <text>{{detail.lastResult || '--'}}</text>
  26. <text>上次结果</text>
  27. </view>
  28. <view class="child">
  29. <text>{{detail.checkResult || '--'}}</text>
  30. <text>本次结果</text>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="bottom-box"
  35. v-for="(item, index) in detail.checkResultRequestList"
  36. :key="index">
  37. <view class="box-item">
  38. <view>查核结果</view>
  39. <view>{{item.checkResultDescribe}}</view>
  40. </view>
  41. <view class="box-item">
  42. <view>查核时间</view>
  43. <view>{{detail.completeTimeStr}}</view>
  44. </view>
  45. <view class="box-item">
  46. <view>图片展示</view>
  47. <view class="img-wrap">
  48. <image mode="widthFix"
  49. v-for="(img, i) in getArr(item.checkResultUrl)"
  50. :key="i"
  51. :src="img"></image>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. </template>
  57. <script>
  58. /**
  59. * 查核项详情
  60. */
  61. export default {
  62. data() {
  63. return {
  64. detail: {
  65. checkPointName: '',
  66. deptName: '',
  67. checkModelName: '',
  68. lastResult: '',
  69. checkResult: '',
  70. checkItemName: '',
  71. checkResultRequestList: []
  72. }
  73. };
  74. },
  75. onLoad: function ({id}) {
  76. this.dispatch('checkTaskDetail', {id}).then((data)=>{
  77. if(data) {
  78. this.detail = data;
  79. }
  80. });
  81. },
  82. methods: {
  83. getArr(value) {
  84. return value ? value.split(',') : [];
  85. },
  86. goLegendDetails(checkItemId) {
  87. //跳转到图例详情
  88. uni.navigateTo({
  89. url: `/pages/legendDetails/legendDetails?checkItemId=${checkItemId}`
  90. });
  91. },
  92. dispatch(key, data) {
  93. return this.$store.dispatch({type: 'checkList/commActions', key, data});
  94. }
  95. }
  96. }
  97. </script>
  98. <style lang="less">
  99. .auditItemDetails {
  100. .top-box {
  101. position: relative;
  102. margin-top: 15rpx;
  103. padding-bottom: 37.5rpx;
  104. background-color: #fff;
  105. .icon-wrap {
  106. position: relative;
  107. overflow: hidden;
  108. width: 125rpx;
  109. height: 37.5rpx;
  110. image {
  111. width: 100%;
  112. height: 100%;
  113. }
  114. text {
  115. position: absolute;
  116. top: 0;
  117. left: 25rpx;
  118. font-size: 20rpx;
  119. line-height: 37.5rpx;
  120. color: #fff;
  121. }
  122. }
  123. .img-tuli {
  124. position: absolute;
  125. top: 25rpx;
  126. right: 25rpx;
  127. width: 40rpx;
  128. height: 40rpx;
  129. }
  130. .title-wrap {
  131. display: flex;
  132. flex-direction: column;
  133. padding: 25rpx 31.25rpx;
  134. text {
  135. font-size: 25rpx;
  136. line-height: 37.5rpx;
  137. &:last-child {
  138. padding-top: 4.37rpx;
  139. font-size: 17.5rpx;
  140. line-height: 26.25rpx;
  141. color: #7A8599;
  142. }
  143. }
  144. }
  145. .children {
  146. display: flex;
  147. flex-direction: row;
  148. align-items: center;
  149. margin-top: 10.62rpx;
  150. .child {
  151. display: flex;
  152. flex-direction: column;
  153. justify-content: center;
  154. align-items: center;
  155. flex: 1;
  156. border-right: 1px solid #DADEE6;
  157. text {
  158. font-weight: 500;
  159. &:last-child {
  160. font-size: 17.5rpx;
  161. line-height: 26.25rpx;
  162. color: #7A8599;
  163. font-weight: 400;
  164. }
  165. }
  166. &:last-child {
  167. border-right: 0;
  168. }
  169. }
  170. }
  171. }
  172. .bottom-box {
  173. margin-top: 15rpx;
  174. padding: 0 25rpx;
  175. background-color: #fff;
  176. .box-item {
  177. display: flex;
  178. flex-direction: row;
  179. border-bottom: 0.62rpx solid #DADEE6;
  180. padding: 26.25rpx 0;
  181. &:last-child {
  182. border-bottom: 0;
  183. }
  184. >view {
  185. width: 100%;
  186. &:first-child {
  187. width: 175rpx;
  188. white-space: nowrap;
  189. color: #525866;
  190. }
  191. &.img-wrap {
  192. display: flex;
  193. flex-direction: row;
  194. flex-wrap: wrap;
  195. image {
  196. margin-bottom: 12.5rpx;
  197. width: calc(50% - 12.5rpx);
  198. &:nth-child(2n) {
  199. margin-left: 12.5rpx;
  200. }
  201. }
  202. }
  203. }
  204. }
  205. }
  206. }
  207. </style>