You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
< template >
<!-- 列表 -- >
< ContentWrap >
< el -table v-loading ="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="编号" align="center" prop="id" />
<el-table-column label="学生编号" align="center" prop="studentId" />
<el-table-column label="名字" align="center" prop="name" />
<el-table-column label="简介" align="center" prop="description" />
<el-table-column
label="出生日期"
align="center"
prop="birthday"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="性别" align="center" prop="sex">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="scope.row.sex" />
</template>
</el-table-column>
<el-table-column label="是否有效" align="center" prop="enabled">
<template #default="scope">
<dict-tag :type="DICT_TYPE.INFRA_BOOLEAN_STRING" :value="scope.row.enabled" />
</template>
</el-table-column>
<el-table-column label="头像" align="center" prop="avatar" />
<el-table-column label="附件" align="center" prop="video" />
<el-table-column label="备注" align="center" prop="memo" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
</el-table>
</ContentWrap>
</template>
<script setup lang="ts" >
import { DICT_TYPE } from ' @ / utils / dict '
import * as Demo12StudentApi from ' @ / api / infra / demo12 '
const props = defineProps < {
studentId : undefined / / 学 生 编 号 ( 主 表 的 关 联 字 段 )
} > ( )
const loading = ref ( true ) // 列表的加载中
const list = ref ( [ ] ) // 列表的数据
/** 查询列表 */
const getList = async ( ) => {
loading . value = true
try {
list . value = await Demo12StudentApi . getDemo12StudentContactListByStudentId ( studentId . props )
} finally {
loading . value = false
}
}
/** 初始化 **/
onMounted ( ( ) => {
getList ( )
} )
< / script >