|
|
@@ -0,0 +1,66 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <a-image width="100%" :preview="false" :src="bannerSrc" class="mb-4" />
|
|
|
+ <a-card>
|
|
|
+ <s-table ref="table" :columns="columns" :data="loadData" bordered :row-key="(record) => record.id">
|
|
|
+ <template #bodyCell="{ column, record }">
|
|
|
+ <template v-if="column.dataIndex == 'createTime'">{{ formatDateTime(record.createTime) }}</template>
|
|
|
+ <template v-if="column.dataIndex === 'action'">
|
|
|
+ <a-space>
|
|
|
+ <a @click="jumpDetail(record)">详情</a>
|
|
|
+ </a-space>
|
|
|
+ </template>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-card>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup name="learningFootprint">
|
|
|
+ import classCentre from '@/api/student/classCentre'
|
|
|
+ import { useRouter } from 'vue-router'
|
|
|
+ import { parseTime } from '@/utils/exam'
|
|
|
+ import bannerSrc from '@/assets/images/banner.jpg'
|
|
|
+ function formatDateTime(val) {
|
|
|
+ if (!val) return ''
|
|
|
+ return parseTime(val, '{y}-{m}-{d} {h}:{i}:{s}')
|
|
|
+ }
|
|
|
+
|
|
|
+ const router = useRouter()
|
|
|
+ const columns = [
|
|
|
+ {
|
|
|
+ title: '资源名',
|
|
|
+ dataIndex: 'fileName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '资源地址',
|
|
|
+ dataIndex: 'filePath'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '资源文件类型',
|
|
|
+ dataIndex: 'extendName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '创建时间',
|
|
|
+ dataIndex: 'createTime'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '操作',
|
|
|
+ dataIndex: 'action',
|
|
|
+ width: '100px'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ const loadData = (parameter) => {
|
|
|
+ return classCentre.resourceFootprint(parameter).then((data) => {
|
|
|
+ return data
|
|
|
+ })
|
|
|
+ }
|
|
|
+ const jumpDetail = (item) => {
|
|
|
+ router.push({
|
|
|
+ path: '/student/resourceDetails',
|
|
|
+ query: {
|
|
|
+ id: item.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+</script>
|