<template>
  <view class="p-15">
    <BasicListLayout @register="register">
      <template v-slot="{data,index}">
        <view class="white-bg-color r-md p-15 mb-15 flex-row items-center">
          <view class="flex-1">
            <view class="font-w-500 flex-row">
              <view class="mr-5">{{ data.fullName }}</view>
              <view class="mr-5">{{ data.remark }}</view>
              <view v-if="data.roleName=='系统管理员'">{{ data.roleName }}{{ data.userName }}</view>
            </view>
            <template v-for="(arr,key) in data.items">
              <view class="font-14 font-w-500  mt-15">{{ key }}</view>
              <view class="font-14 mt-6" v-for="(item,index) in arr">
                {{ item.inspectStandard }},{{
                  item.scoreType == 2 ? '扣' : '加'
                }}{{ Math.abs(item.score) }}分;
              </view>
            </template>
            <view style="text-align: right">
              <view>{{ data.createdTime.split(" ")[0] }}</view>
            </view>
          </view>
        </view>
      </template>
    </BasicListLayout>
  </view>
</template>

<script setup lang="ts">
import {useDataStore} from "@/store/modules/data";
import {useLayout} from "@/components/BasicListLayout/hooks/useLayout";
import {evaluationFindPageApi} from "@/api/base/assesment";
import Template from "@/components/BasicQrcode/_template/template.vue";

const useData = useDataStore()
const {getData} = storeToRefs(useData)
const [register, lhkh] = useLayout({
  api: evaluationFindPageApi,
  param: {
    showWeek: 1
  },
  componentProps: {
    loadingMoreEnabled: false,
    auto: false
  },
})
console.log(111, getData.value)
if (getData.value.gradeClassId) {
  lhkh.setParam({gradeClassId: getData.value.gradeClassId})
  lhkh.reload()
}

</script>


<style scoped lang="scss">

</style>
