auditItemDetails.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  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. checkPointId: ''
  73. }
  74. };
  75. },
  76. onLoad: function ({id, checkPointId}) {
  77. this.checkPointId = checkPointId;
  78. this.dispatch('checkTaskDetail', {id}).then((data)=>{
  79. if(data) {
  80. this.detail = data;
  81. }
  82. });
  83. },
  84. methods: {
  85. getArr(value) {
  86. return value ? value.split(',') : [];
  87. },
  88. goLegendDetails(checkItemId) {
  89. //跳转到图例详情
  90. uni.navigateTo({
  91. url: `/pages/legendDetails/legendDetails?checkItemId=${checkItemId}&checkPointId=${this.checkPointId}`
  92. });
  93. },
  94. dispatch(key, data) {
  95. return this.$store.dispatch({type: 'checkList/commActions', key, data});
  96. }
  97. }
  98. }
  99. </script>
  100. <style lang="less">
  101. .auditItemDetails {
  102. .top-box {
  103. position: relative;
  104. margin-top: 15rpx;
  105. padding-bottom: 37.5rpx;
  106. background-color: #fff;
  107. .icon-wrap {
  108. position: relative;
  109. overflow: hidden;
  110. width: 125rpx;
  111. height: 37.5rpx;
  112. image {
  113. width: 100%;
  114. height: 100%;
  115. }
  116. text {
  117. position: absolute;
  118. top: 0;
  119. left: 25rpx;
  120. font-size: 20rpx;
  121. line-height: 37.5rpx;
  122. color: #fff;
  123. }
  124. }
  125. .img-tuli {
  126. position: absolute;
  127. top: 25rpx;
  128. right: 25rpx;
  129. width: 40rpx;
  130. height: 40rpx;
  131. }
  132. .title-wrap {
  133. display: flex;
  134. flex-direction: column;
  135. padding: 25rpx 31.25rpx;
  136. text {
  137. font-size: 25rpx;
  138. line-height: 37.5rpx;
  139. &:last-child {
  140. padding-top: 4.37rpx;
  141. font-size: 17.5rpx;
  142. line-height: 26.25rpx;
  143. color: #7A8599;
  144. }
  145. }
  146. }
  147. .children {
  148. display: flex;
  149. flex-direction: row;
  150. align-items: center;
  151. margin-top: 10.62rpx;
  152. .child {
  153. display: flex;
  154. flex-direction: column;
  155. justify-content: center;
  156. align-items: center;
  157. flex: 1;
  158. border-right: 1px solid #DADEE6;
  159. text {
  160. font-weight: 500;
  161. &:last-child {
  162. font-size: 17.5rpx;
  163. line-height: 26.25rpx;
  164. color: #7A8599;
  165. font-weight: 400;
  166. }
  167. }
  168. &:last-child {
  169. border-right: 0;
  170. }
  171. }
  172. }
  173. }
  174. .bottom-box {
  175. margin-top: 15rpx;
  176. padding: 0 25rpx;
  177. background-color: #fff;
  178. .box-item {
  179. display: flex;
  180. flex-direction: row;
  181. border-bottom: 0.62rpx solid #DADEE6;
  182. padding: 26.25rpx 0;
  183. &:last-child {
  184. border-bottom: 0;
  185. }
  186. >view {
  187. width: 100%;
  188. &:first-child {
  189. width: 175rpx;
  190. white-space: nowrap;
  191. color: #525866;
  192. }
  193. &.img-wrap {
  194. display: flex;
  195. flex-direction: row;
  196. flex-wrap: wrap;
  197. image {
  198. margin-bottom: 12.5rpx;
  199. width: calc(50% - 12.5rpx);
  200. &:nth-child(2n) {
  201. margin-left: 12.5rpx;
  202. }
  203. }
  204. }
  205. }
  206. }
  207. }
  208. }
  209. </style>