|
@@ -39,8 +39,8 @@
|
|
|
<a-table-column title="" :width="60" data-index="user_avatar" tooltip>
|
|
<a-table-column title="" :width="60" data-index="user_avatar" tooltip>
|
|
|
<template #cell="{ record }">
|
|
<template #cell="{ record }">
|
|
|
<a-avatar>
|
|
<a-avatar>
|
|
|
- <img :alt="record.name ?? ''"
|
|
|
|
|
- :src="record.user_avatar" />
|
|
|
|
|
|
|
+ <IconUser v-if="!record.user_avatar"/>
|
|
|
|
|
+ <img :alt="record.name ?? ''" :src="record.user_avatar" v-else/>
|
|
|
</a-avatar>
|
|
</a-avatar>
|
|
|
</template>
|
|
</template>
|
|
|
</a-table-column>
|
|
</a-table-column>
|
|
@@ -55,7 +55,7 @@
|
|
|
icon: () => h(IconSearch)
|
|
icon: () => h(IconSearch)
|
|
|
}">
|
|
}">
|
|
|
<template #cell="{ record }">
|
|
<template #cell="{ record }">
|
|
|
- {{ record.name }}
|
|
|
|
|
|
|
+ {{ record.name ?? '请使用乐跑登录器更新信息' }}
|
|
|
</template>
|
|
</template>
|
|
|
</a-table-column>
|
|
</a-table-column>
|
|
|
<a-table-column title="性别" :width="80" ellipsis tooltip :filterable="{
|
|
<a-table-column title="性别" :width="80" ellipsis tooltip :filterable="{
|
|
@@ -67,8 +67,8 @@
|
|
|
}">
|
|
}">
|
|
|
<template #cell="{ record }">
|
|
<template #cell="{ record }">
|
|
|
<icon-man v-if="record.sex === 1" />
|
|
<icon-man v-if="record.sex === 1" />
|
|
|
- <icon-woman v-else />
|
|
|
|
|
- {{ record.sex === 1 ? '男' : '女' }}
|
|
|
|
|
|
|
+ <icon-woman v-else-if="record.sex === 2" />
|
|
|
|
|
+ {{ record.sex === 1 ? '男' : (record.sex === 2 ? '女' : '') }}
|
|
|
</template>
|
|
</template>
|
|
|
</a-table-column>
|
|
</a-table-column>
|
|
|
<a-table-column title="学院" :width="220" data-index="academy_name" ellipsis tooltip :filterable="{
|
|
<a-table-column title="学院" :width="220" data-index="academy_name" ellipsis tooltip :filterable="{
|
|
@@ -312,8 +312,14 @@ const handleBeforeOk = async (done) => {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ const studentNumRegex = /^\d{10}$/
|
|
|
|
|
+ if (!studentNumRegex.test(student_num)) {
|
|
|
|
|
+ Message.error('请检查学号格式是否正确')
|
|
|
|
|
+ return false
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/
|
|
const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/
|
|
|
- if(!emailRegex.test(email)) {
|
|
|
|
|
|
|
+ if (!emailRegex.test(email)) {
|
|
|
Message.error('请检查邮箱格式是否正确')
|
|
Message.error('请检查邮箱格式是否正确')
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|