<!-- ！！！ -->

<template>
  <view class="statistics">
    <view class="form">
      <view class="info-item">
        <label>执行包名称：</label>
        <text>{{ detailInfo.pickerName }}</text>
      </view>
      <view class="info-item">
        <label>执行包分值：</label>
        <text>{{ detailInfo.pkgScore }}</text>
      </view>
      <view class="info-item">
        <label>接包对象：</label>
        <text>{{ detailInfo.pickerName }}</text>
      </view>
      <view class="info-item">
        <label>创建日期：</label>
        <text>{{ detailInfo.createTime }}</text>
      </view>
      <view class="info-item">
        <label>审核通过积分值：</label>
        <text>{{ detailInfo.taskPassedScore }}</text>
      </view>
      <view class="info-item">
        <label>审核通过积分值百分比：</label>
        <text>{{ detailInfo.taskPassedPercentage }}</text>
      </view>
      <view class="info-item">
        <label>各类服务类型占比：</label>
        <text>{{ detailInfo.eachTaskTypeRate }}</text>
      </view>
    </view>
  </view>
</template>

<script setup lang="ts">
import { onReachBottom, onShow } from '@dcloudio/uni-app'
import { getListApi } from '@/service/modules/statistics'
import { ref } from 'vue'
import { useLoginStore } from '@/store/login'

const loginStore = useLoginStore()

class Params {
  entId = ''
  total = -1
  current = 1
  size = 10
}

onShow(() => {
  getList()
})
const searchParams = ref(new Params())
const listArr = ref<any[]>([])
const hasInfo = ref(false)
const detailInfo = ref()

const getList = async () => {
  uni.showLoading()
  let res = await getListApi(searchParams.value)
  detailInfo.value = res.data
  // listArr.value = listArr.value.concat(res.data.records)
  // searchParams.value.total = res.data.total
  // hasInfo.value = !!listArr.value.length
  uni.hideLoading()
}

onReachBottom(() => {
  getList()
})
</script>

<style lang="scss" scoped>
.statistics {
  background: #f2f2f2;
  min-height: 100vh;
  box-sizing: border-box;
  padding: 24rpx;
  .form {
    background: #fff;
    padding: 30rpx;
    border-radius: 12rpx;
    .info-item {
      margin-bottom: 20rpx;
      line-height: 36rpx;

      label {
        margin-right: 10rpx;
        color: #333;
      }
      text {
        color: #999;
      }
    }
  }
}
</style>
