提交 76ca616e authored 作者: matian's avatar matian

updates

上级 9ce60b65
...@@ -70,7 +70,7 @@ export const highGraduation = [ ...@@ -70,7 +70,7 @@ export const highGraduation = [
] ]
// 性别 // 性别
export const sexList = [ export const sexList = [
{ value: '1', label: '女士' }, { value: '0', label: '女士' },
{ value: '2', label: '先生' }, { value: '1', label: '先生' },
{ value: '3', label: '未知' } { value: '2', label: '未知' }
] ]
export interface AlumniType {
id: string
project_prefix: 'sofia' | 'kelley' | 'marywood' | 'marywood_plus' | 'cbu_plus' | 'sbu_plus'
sso_id: string
username: string
sex: '0' | '1' | '2'
birthday: string
graduating_institution: string
specialty: string
highest_qualification: string
province: string
city: string
industry: string
workplace: string
department: string
position: string
class: classType[]
}
export interface classType {
class_id: string
name: string
project_prefix: string
}
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import { useArea } from '@/composables/useArea' import { useArea } from '@/composables/useArea'
import { allPrefixList, industryCategoryList, sexList } from '../prefix' import { allPrefixList, industryCategoryList, sexList } from '../prefix'
import { getAlumniList, getClassList } from '../api' import { getAlumniList, getClassList } from '../api'
import type { AlumniType } from '../types'
const appList = ref() const appList = ref()
// 省市 // 省市
const { provinceList, cityList, provinceValue, cityValue } = useArea() const { provinceList, cityList, provinceValue, cityValue } = useArea()
...@@ -67,9 +68,9 @@ const listOptions = { ...@@ -67,9 +68,9 @@ const listOptions = {
label: '性别', label: '性别',
prop: 'sex', prop: 'sex',
align: 'center', align: 'center',
computed(row: any) { computed({ row }: { row: AlumniType }) {
return sexList.filter((item: any) => { return sexList.filter((item: any) => {
if (item.value === row.row.sex) { if (item.value === row.sex) {
return item return item
} }
})[0]?.label })[0]?.label
...@@ -80,9 +81,9 @@ const listOptions = { ...@@ -80,9 +81,9 @@ const listOptions = {
label: '项目', label: '项目',
prop: 'project_prefix', prop: 'project_prefix',
align: 'center', align: 'center',
computed(row: any) { computed({ row }: { row: AlumniType }) {
return allPrefixList.filter((item: any) => { return allPrefixList.filter((item: any) => {
if (item.prefix === row.row.project_prefix) { if (item.prefix === row.project_prefix) {
return item return item
} }
})[0]?.name })[0]?.name
......
...@@ -34,7 +34,10 @@ const getAlumniDetail = () => { ...@@ -34,7 +34,10 @@ const getAlumniDetail = () => {
{{ detailList?.specialty }} {{ detailList?.specialty }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="最高学历:"> <el-descriptions-item label="最高学历:">
{{ highGraduation.filter(item => item.value === detailList?.highest_qualification)[0]?.label }} {{
highGraduation.filter(item => item.value === detailList?.highest_qualification)[0]?.label ||
detailList?.highest_qualification
}}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="省份:">{{ detailList?.province }}</el-descriptions-item> <el-descriptions-item label="省份:">{{ detailList?.province }}</el-descriptions-item>
<el-descriptions-item label="城市:">{{ detailList?.city }}</el-descriptions-item> <el-descriptions-item label="城市:">{{ detailList?.city }}</el-descriptions-item>
......
// 公司性质
export const natureList = [
{ label: '国有企业', value: 1 },
{ label: '集体企业', value: 2 },
{ label: '联营企业', value: 3 },
{ label: '股份合作制企业', value: 4 },
{ label: '私营企业', value: 5 },
{ label: '个体户', value: 6 },
{ label: '合伙企业', value: 7 },
{ label: '有限责任公司', value: 8 },
{ label: '股份有限公司营业性质', value: 9 }
]
// 审批状态
export const adultStatus = [
{ value: 1, label: '审核通过' },
{ value: 2, label: '审核不通过' },
{ value: 3, label: '待审核' }
]
// 启用状态
export const statusMap = [
{ value: 1, label: '启用' },
{ value: 2, label: '禁用' }
]
<script setup lang="ts"> <script setup lang="ts">
import { natureList, adultStatus, statusMap } from '../map'
import { getCompanyList, getCompanyStatus } from '../api' import { getCompanyList, getCompanyStatus } from '../api'
const router = useRouter() const router = useRouter()
const appList = ref() const appList = ref()
const natureList = [
{ label: '国有企业', value: 1 },
{ label: '集体企业', value: 2 },
{ label: '联营企业', value: 3 },
{ label: '股份合作制企业', value: 4 },
{ label: '私营企业', value: 5 },
{ label: '个体户', value: 6 },
{ label: '合伙企业', value: 7 },
{ label: '有限责任公司', value: 8 },
{ label: '股份有限公司营业性质', value: 9 }
]
const listOptions = { const listOptions = {
remote: { remote: {
httpRequest: getCompanyList, httpRequest: getCompanyList,
...@@ -34,20 +24,13 @@ const listOptions = { ...@@ -34,20 +24,13 @@ const listOptions = {
type: 'select', type: 'select',
prop: 'audit_status', prop: 'audit_status',
placeholder: '审核状态', placeholder: '审核状态',
options: [ options: adultStatus
{ value: 1, label: '审核通过' },
{ value: 2, label: '审核不通过' },
{ value: 3, label: '待审核' }
]
}, },
{ {
type: 'select', type: 'select',
prop: 'status', prop: 'status',
placeholder: '启用状态', placeholder: '启用状态',
options: [ options: statusMap
{ value: 1, label: '启用' },
{ value: 2, label: '禁用' }
]
} }
], ],
columns: [ columns: [
...@@ -71,13 +54,7 @@ const listOptions = { ...@@ -71,13 +54,7 @@ const listOptions = {
label: '审核状态', label: '审核状态',
prop: 'audit_status', prop: 'audit_status',
computed(row: any) { computed(row: any) {
if (row.row.audit_status === 1) { return adultStatus.filter(item => item.value === row.row.audit_status)[0]?.label
return '审核通过'
} else if (row.row.audit_status === 2) {
return '审核不通过'
} else if (row.row.audit_status === 3) {
return '待审核'
}
} }
}, },
{ label: '操作', slots: 'table-operate', width: 230, align: 'center' } { label: '操作', slots: 'table-operate', width: 230, align: 'center' }
...@@ -123,9 +100,7 @@ const handleDetail = (row: any) => { ...@@ -123,9 +100,7 @@ const handleDetail = (row: any) => {
</template> </template>
<template #table-operate="{ row }"> <template #table-operate="{ row }">
<el-space> <el-space>
<el-link type="primary" :disabled="row.status === 2 && row.audit_status === 3" @click="handleDetail(row)">{{ <el-link type="primary" @click="handleDetail(row)">{{ row.audit_status !== 3 ? '查看' : '审批' }}</el-link>
row.audit_status !== 3 ? '查看' : '审批'
}}</el-link>
</el-space> </el-space>
</template> </template>
</AppList> </AppList>
......
<script setup lang="ts"> <script setup lang="ts">
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { natureList } from '../map'
import { getCompanyDetails, getCompanyAdult } from '../api' import { getCompanyDetails, getCompanyAdult } from '../api'
const route = useRoute() const route = useRoute()
const router = useRouter() const router = useRouter()
const detailList: any = ref({}) const detailList: any = ref({})
const natureList: any = [
{ label: '国有企业', value: 1 },
{ label: '集体企业', value: 2 },
{ label: '联营企业', value: 3 },
{ label: '股份合作制企业', value: 4 },
{ label: '私营企业', value: 5 },
{ label: '个体户', value: 6 },
{ label: '合伙企业', value: 7 },
{ label: '有限责任公司', value: 8 },
{ label: '股份有限公司营业性质', value: 9 }
]
//审核通过 //审核通过
const handleAdultSuccess = () => { const handleAdultSuccess = () => {
const params: any = { const params: any = {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论