提交 57bf4235 authored 作者: matian's avatar matian

性别默认传999

上级 a77721dd
...@@ -3,7 +3,7 @@ import httpRequest from '@/utils/axios' ...@@ -3,7 +3,7 @@ import httpRequest from '@/utils/axios'
// 获取校友列表 // 获取校友列表
export function getAlumniList(params?: { export function getAlumniList(params?: {
username?: string username?: string
sex?: string sex?: number
class_id?: string class_id?: string
province?: string province?: string
city?: string city?: string
......
<script setup lang="ts"> <script setup lang="ts">
import { useInfiniteScroll } from '@vueuse/core'
import { ref } from 'vue' import { ref } from 'vue'
import { getAlumniList, getClassList } from '../api' import { getAlumniList, getClassList } from '../api'
const appList = ref() const appList = ref()
...@@ -35,7 +34,7 @@ const listOptions = $computed(() => { ...@@ -35,7 +34,7 @@ const listOptions = $computed(() => {
params: { params: {
project_prefix: '', project_prefix: '',
username: '', username: '',
sex: '', sex: 999,
class_id: '', class_id: '',
province: '', province: '',
city: '', city: '',
...@@ -50,9 +49,10 @@ const listOptions = $computed(() => { ...@@ -50,9 +49,10 @@ const listOptions = $computed(() => {
prop: 'sex', prop: 'sex',
placeholder: '性别', placeholder: '性别',
options: [ options: [
{ value: '0', label: '女士' }, { value: 0, label: '女士' },
{ value: '1', label: '先生' }, { value: 1, label: '先生' },
{ value: '2', label: '未知' } { value: 2, label: '未知' },
{ value: 999, label: '全部' }
] ]
}, },
{ {
...@@ -71,12 +71,14 @@ const listOptions = $computed(() => { ...@@ -71,12 +71,14 @@ const listOptions = $computed(() => {
prop: 'sex', prop: 'sex',
align: 'center', align: 'center',
computed(row: any) { computed(row: any) {
if (row.row.sex === '0') { if (row.row.sex === 0) {
return '女士' return '女士'
} else if (row.row.sex === '1') { } else if (row.row.sex === 1) {
return '先生' return '先生'
} else if (row.row.sex === '2') { } else if (row.row.sex === 2) {
return '未知' return '未知'
} else if (row.row.sex === 999) {
return '全部'
} }
} }
}, },
......
...@@ -17,12 +17,14 @@ const getAlumniDetail = () => { ...@@ -17,12 +17,14 @@ const getAlumniDetail = () => {
}) })
} }
const sex = computed(() => { const sex = computed(() => {
if (detailList.value.sex === '0') { if (detailList.value.sex === 0) {
return '女士' return '女士'
} else if (detailList.value.sex === '1') { } else if (detailList.value.sex === 1) {
return '先生' return '先生'
} else if (detailList.value.sex === '2') { } else if (detailList.value.sex === 2) {
return '未知' return '未知'
} else if (detailList.value.sex === 999) {
return '全部'
} }
}) })
</script> </script>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论