tm-check-map-list.vue 1006 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <template>
  2. <view class="content-wrap">
  3. <view class="title-wrap">
  4. <text>{{item.name}}</text>
  5. <view>
  6. <image src="../../static/icon-map.png"></image>
  7. <text>{{item.deptClassName}}</text>
  8. </view>
  9. </view>
  10. <view class="content">
  11. <text>包含{{pointCount}}个查核要点,{{itemCount}}个查核项目</text>
  12. <text>
  13. 要点概览:
  14. <text v-for="(point, c) in item.pointList" :key="c">
  15. {{point.name}};
  16. </text>
  17. </text>
  18. </view>
  19. </view>
  20. </template>
  21. <script>
  22. export default {
  23. props: ['item'],
  24. computed: {
  25. pointCount: function() {
  26. let num = 0;
  27. (this.item.pointList || []).map(({selectFlag})=>{
  28. if(selectFlag || selectFlag === 'true') {
  29. num++;
  30. }
  31. })
  32. return num;
  33. },
  34. itemCount: function() {
  35. let num = 0;
  36. (this.item.pointList || []).map(({itemList})=>{
  37. itemList.map(({selectFlag})=>{
  38. if(selectFlag || selectFlag === 'true') {
  39. num++;
  40. }
  41. });
  42. });
  43. return num;
  44. }
  45. }
  46. }
  47. </script>