<script setup lang="ts">
import { ref } from 'vue'

import { taskMgrService } from '#/api/service/question-bank/task-mgr'

const props = defineProps({
  resourceId: {
    type: String,
    default: '',
  },
})

const knowledgeList = ref<any>([])

onMounted(async () => {
  const res = await taskMgrService.getListPaperKnowledge(props.resourceId)
  knowledgeList.value = res || []
})
</script>

<template>
  <!-- 知识点 -->
  <el-card shadow="never" class="detail-card">
    <!-- 列表 -->
    <el-table :data="knowledgeList" border style="width: 100%">
      <el-table-column
        prop="knowledgeName"
        label="知识点"
        header-align="center"
        align="center"
      />
      <el-table-column
        prop="titleScore"
        label="满分"
        header-align="center"
        align="center"
      />
      <el-table-column label="得分" header-align="center" align="center">
        <template #default="scope">
          {{ scope.row.answerScore || '-' }}
        </template>
      </el-table-column>
    </el-table>
  </el-card>
</template>

<style scoped></style>
