提交 1c4b6f5f authored 作者: matian's avatar matian

chore:列表增加项目

上级 f26214dd
......@@ -32,77 +32,88 @@ const handleGetClassList = () => {
})
}
const listOptions = $computed(() => {
return {
remote: {
httpRequest: getAlumniList,
params: {
project_prefix: '',
username: '',
sex: '',
class_id: '',
province: '',
city: '',
industry: '',
workplace: ''
},
beforeRequest(params: any) {
if (params.sex === '') {
params.sex = '999'
const listOptions = {
remote: {
httpRequest: getAlumniList,
params: {
project_prefix: '',
username: '',
sex: '',
class_id: '',
province: '',
city: '',
industry: '',
workplace: ''
},
beforeRequest(params: any) {
if (params.sex === '') {
params.sex = '999'
}
return params
}
},
filters: [
{ type: 'input', prop: 'username', placeholder: '姓名' },
{
type: 'select',
prop: 'sex',
placeholder: '性别',
options: [
{ value: '0', label: '女士' },
{ value: '1', label: '先生' },
{ value: '2', label: '未知' }
]
},
{
prop: 'class_id',
slots: 'filter-class'
},
{
prop: 'project_prefix',
slots: 'filter-project'
},
{ type: 'input', prop: 'province', placeholder: '省份', slots: 'filter-province' },
{ type: 'input', prop: 'city', placeholder: '城市', slots: 'filter-city' },
{ type: 'select', prop: 'industry', placeholder: '所在行业', options: industryCategoryList },
{ type: 'input', prop: 'workplace', placeholder: '工作单位' }
],
columns: [
{ label: '姓名', prop: 'username', align: 'center' },
{
label: '性别',
prop: 'sex',
align: 'center',
computed(row: any) {
if (row.row.sex === '0') {
return '女士'
} else if (row.row.sex === '1') {
return '先生'
} else if (row.row.sex === '2') {
return '未知'
}
return params
}
},
filters: [
{ type: 'input', prop: 'username', placeholder: '姓名' },
{
type: 'select',
prop: 'sex',
placeholder: '性别',
options: [
{ value: '0', label: '女士' },
{ value: '1', label: '先生' },
{ value: '2', label: '未知' }
]
},
{
prop: 'class_id',
slots: 'filter-class'
},
{
prop: 'project_prefix',
slots: 'filter-project'
},
{ type: 'input', prop: 'province', placeholder: '省份', slots: 'filter-province' },
{ type: 'input', prop: 'city', placeholder: '城市', slots: 'filter-city' },
{ type: 'select', prop: 'industry', placeholder: '所在行业', options: industryCategoryList },
{ type: 'input', prop: 'workplace', placeholder: '工作单位' }
],
columns: [
{ label: '姓名', prop: 'username', align: 'center' },
{
label: '性别',
prop: 'sex',
align: 'center',
computed(row: any) {
if (row.row.sex === '0') {
return '女士'
} else if (row.row.sex === '1') {
return '先生'
} else if (row.row.sex === '2') {
return '未知'
{ label: '班级', prop: 'class.name', align: 'center' },
{
label: '项目',
prop: 'project_prefix',
align: 'center',
computed(row: any) {
return allPrefixList.filter((item: any) => {
console.log(item, row.row, 'item')
if (item.prefix === row.row.project_prefix) {
return item
}
}
},
{ label: '班级', prop: 'class.name', align: 'center' },
{ label: '省份', prop: 'province', align: 'center' },
{ label: '城市', prop: 'city', align: 'center' },
{ label: '所在行业', prop: 'industry', align: 'center' },
{ label: '工作单位', prop: 'workplace', align: 'center' },
{ label: '操作', slots: 'table-operate', width: 230, align: 'center' }
]
}
})
})[0].name
}
},
{ label: '省份', prop: 'province', align: 'center' },
{ label: '城市', prop: 'city', align: 'center' },
{ label: '所在行业', prop: 'industry', align: 'center' },
{ label: '工作单位', prop: 'workplace', align: 'center' },
{ label: '操作', slots: 'table-operate', width: 230, align: 'center' }
]
}
const handleFresh = () => {
appList.value.refetch()
}
......
<script setup lang="ts">
import { getAlumniView } from '../api'
import allPrefixList from '../prefix'
import {allPrefixList} from '../prefix'
const route = useRoute()
const detailList: any = ref({})
let project: any = ref([])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论