hcCounts.vue 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="hcdata">
  3. <div class="nameTitle">当前监测图斑外业举证</div>
  4. <uni-row>
  5. <uni-col :span="6">
  6. <view class="status" @click.stop="golist({stepState:0})">
  7. <view class="num">{{ hccount.hz }}个</view>
  8. <view>全部图斑</view>
  9. </view>
  10. </uni-col>
  11. <uni-col :span="18">
  12. <view class='countview'>
  13. <div class="hcitem" v-for="(item, key) in hclist" :key="key" @click.stop="golist(item)">
  14. <image class="logo" src="@/static/logo.png"></image>
  15. {{item.name}}{{hccount[item.prop]}}个
  16. </div>
  17. </view>
  18. </uni-col>
  19. </uni-row>
  20. </view>
  21. </template>
  22. <script>
  23. import {
  24. getHcCount
  25. } from "@/api/dkjbxx.js";
  26. import {hcs}from "../config.js";
  27. export default {
  28. name: "hcCounts",
  29. components: {},
  30. data() {
  31. return {
  32. loading: false,
  33. hccount: {},
  34. hclist:hcs
  35. };
  36. },
  37. onLoad() {},
  38. created() {},
  39. mounted() {
  40. this.getList();
  41. },
  42. onReady() {
  43. //this.$refs.form.setRules(this.rules)
  44. },
  45. methods: {
  46. getList() {
  47. this.loading = true;
  48. getHcCount().then((res) => {
  49. this.hccount = res.data;
  50. this.loading = false;
  51. });
  52. },
  53. //跳转到详情页
  54. golist(data) {
  55. console.log(data, '----')
  56. this.$emit('golist', data, this.hccount)
  57. },
  58. },
  59. };
  60. </script>
  61. <style lang="scss">
  62. .hcdata {
  63. background: #fff;
  64. padding: 20rpx;
  65. border-radius: 20rpx;
  66. margin-bottom: 30rpx;
  67. height: 240rpx;
  68. .nameTitle {
  69. //color: red;
  70. line-height: 50rpx;
  71. font-weight: bold;
  72. margin-bottom: 20rpx;
  73. }
  74. .status {
  75. width: 130rpx;
  76. height: 130rpx;
  77. text-align: center;
  78. line-height: 40rpx !important;
  79. padding: 10rpx 0;
  80. background: #D2EFFC;
  81. border: 2rpx solid #02A7F0;
  82. border-radius: 10rpx;
  83. cursor: pointer;
  84. .num {
  85. color: #02A7F0;
  86. font-weight: 600;
  87. }
  88. }
  89. .countview {
  90. .hcitem {
  91. width: 40%;
  92. display: inline-block;
  93. .logo {
  94. width: 40rpx;
  95. height: 40rpx;
  96. }
  97. }
  98. }
  99. }
  100. </style>