Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-hr-admin
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-hr-admin
Commits
2022a97a
提交
2022a97a
authored
6月 20, 2022
作者:
matian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
下拉数据整合
上级
1c4b6f5f
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
35 行增加
和
34 行删除
+35
-34
prefix.ts
src/modules/alumni/prefix.ts
+15
-0
List.vue
src/modules/alumni/views/List.vue
+14
-22
View.vue
src/modules/alumni/views/View.vue
+6
-12
没有找到文件。
src/modules/alumni/prefix.ts
浏览文件 @
2022a97a
...
@@ -59,3 +59,18 @@ export const industryCategory: Record<string, string> = {
...
@@ -59,3 +59,18 @@ export const industryCategory: Record<string, string> = {
'90'
:
'其他'
'90'
:
'其他'
}
}
export
const
industryCategoryList
=
Object
.
values
(
industryCategory
).
map
(
item
=>
({
label
:
item
,
value
:
item
}))
export
const
industryCategoryList
=
Object
.
values
(
industryCategory
).
map
(
item
=>
({
label
:
item
,
value
:
item
}))
// 学历
export
const
highGraduation
=
[
{
value
:
'1'
,
label
:
'高中或以下'
},
{
value
:
'2'
,
label
:
'大专'
},
{
value
:
'3'
,
label
:
'本科'
},
{
value
:
'4'
,
label
:
'硕士研究生'
},
{
value
:
'5'
,
label
:
'博士'
}
]
// 性别
export
const
sexList
=
[
{
value
:
'1'
,
label
:
'女士'
},
{
value
:
'2'
,
label
:
'先生'
},
{
value
:
'3'
,
label
:
'未知'
}
]
src/modules/alumni/views/List.vue
浏览文件 @
2022a97a
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
allPrefixList
,
industryCategoryList
}
from
'../prefix'
import
{
allPrefixList
,
industryCategoryList
,
sexList
}
from
'../prefix'
import
{
useArea
}
from
'@/composables/useArea'
import
{
useArea
}
from
'@/composables/useArea'
import
{
ref
}
from
'vue'
import
{
ref
}
from
'vue'
import
{
getAlumniList
,
getClassList
}
from
'../api'
import
{
getAlumniList
,
getClassList
}
from
'../api'
const
appList
=
ref
()
const
appList
=
ref
()
...
@@ -17,7 +16,7 @@ const classListItem = reactive<classList>({ loading: false, page: 1, total: 0, l
...
@@ -17,7 +16,7 @@ const classListItem = reactive<classList>({ loading: false, page: 1, total: 0, l
onMounted
(()
=>
{
onMounted
(()
=>
{
handleGetClassList
()
handleGetClassList
()
})
})
// 获取班级列表
const
handleGetClassList
=
()
=>
{
const
handleGetClassList
=
()
=>
{
const
params
=
{
const
params
=
{
page
:
classListItem
.
page
,
page
:
classListItem
.
page
,
...
@@ -28,10 +27,12 @@ const handleGetClassList = () => {
...
@@ -28,10 +27,12 @@ const handleGetClassList = () => {
}
}
getClassList
(
params
).
then
((
res
:
any
)
=>
{
getClassList
(
params
).
then
((
res
:
any
)
=>
{
classListItem
.
list
=
res
.
data
.
data
classListItem
.
list
=
res
.
data
.
data
console
.
log
(
classListItem
)
})
})
}
}
// 刷新页面
const
handleFresh
=
()
=>
{
appList
.
value
?.
refetch
()
}
const
listOptions
=
{
const
listOptions
=
{
remote
:
{
remote
:
{
httpRequest
:
getAlumniList
,
httpRequest
:
getAlumniList
,
...
@@ -58,11 +59,7 @@ const listOptions = {
...
@@ -58,11 +59,7 @@ const listOptions = {
type
:
'select'
,
type
:
'select'
,
prop
:
'sex'
,
prop
:
'sex'
,
placeholder
:
'性别'
,
placeholder
:
'性别'
,
options
:
[
options
:
sexList
{
value
:
'0'
,
label
:
'女士'
},
{
value
:
'1'
,
label
:
'先生'
},
{
value
:
'2'
,
label
:
'未知'
}
]
},
},
{
{
prop
:
'class_id'
,
prop
:
'class_id'
,
...
@@ -84,13 +81,12 @@ const listOptions = {
...
@@ -84,13 +81,12 @@ const listOptions = {
prop
:
'sex'
,
prop
:
'sex'
,
align
:
'center'
,
align
:
'center'
,
computed
(
row
:
any
)
{
computed
(
row
:
any
)
{
if
(
row
.
row
.
sex
===
'0'
)
{
return
sexList
.
filter
((
item
:
any
)
=>
{
return
'女士'
console
.
log
(
item
,
row
.
row
,
'item'
)
}
else
if
(
row
.
row
.
sex
===
'1'
)
{
if
(
item
.
value
===
row
.
row
.
sex
)
{
return
'先生'
return
item
}
else
if
(
row
.
row
.
sex
===
'2'
)
{
}
return
'未知'
})[
0
]?.
label
}
}
}
},
},
{
label
:
'班级'
,
prop
:
'class.name'
,
align
:
'center'
},
{
label
:
'班级'
,
prop
:
'class.name'
,
align
:
'center'
},
...
@@ -100,11 +96,10 @@ const listOptions = {
...
@@ -100,11 +96,10 @@ const listOptions = {
align
:
'center'
,
align
:
'center'
,
computed
(
row
:
any
)
{
computed
(
row
:
any
)
{
return
allPrefixList
.
filter
((
item
:
any
)
=>
{
return
allPrefixList
.
filter
((
item
:
any
)
=>
{
console
.
log
(
item
,
row
.
row
,
'item'
)
if
(
item
.
prefix
===
row
.
row
.
project_prefix
)
{
if
(
item
.
prefix
===
row
.
row
.
project_prefix
)
{
return
item
return
item
}
}
})[
0
].
name
})[
0
]
?
.
name
}
}
},
},
{
label
:
'省份'
,
prop
:
'province'
,
align
:
'center'
},
{
label
:
'省份'
,
prop
:
'province'
,
align
:
'center'
},
...
@@ -114,9 +109,6 @@ const listOptions = {
...
@@ -114,9 +109,6 @@ const listOptions = {
{
label
:
'操作'
,
slots
:
'table-operate'
,
width
:
230
,
align
:
'center'
}
{
label
:
'操作'
,
slots
:
'table-operate'
,
width
:
230
,
align
:
'center'
}
]
]
}
}
const
handleFresh
=
()
=>
{
appList
.
value
.
refetch
()
}
</
script
>
</
script
>
<
template
>
<
template
>
...
...
src/modules/alumni/views/View.vue
浏览文件 @
2022a97a
<
script
setup
lang=
"ts"
>
<
script
setup
lang=
"ts"
>
import
{
getAlumniView
}
from
'../api'
import
{
getAlumniView
}
from
'../api'
import
{
allPrefixList
}
from
'../prefix'
import
{
allPrefixList
,
highGraduation
,
sexList
}
from
'../prefix'
const
route
=
useRoute
()
const
route
=
useRoute
()
const
detailList
:
any
=
ref
({})
const
detailList
:
any
=
ref
({})
let
project
:
any
=
ref
([])
let
project
:
any
=
ref
([])
...
@@ -8,6 +8,7 @@ let project: any = ref([])
...
@@ -8,6 +8,7 @@ let project: any = ref([])
onMounted
(()
=>
{
onMounted
(()
=>
{
getAlumniDetail
()
getAlumniDetail
()
})
})
// 获取详情列表
const
getAlumniDetail
=
()
=>
{
const
getAlumniDetail
=
()
=>
{
const
params
:
any
=
{
id
:
route
.
query
.
id
}
const
params
:
any
=
{
id
:
route
.
query
.
id
}
getAlumniView
(
params
).
then
((
res
:
any
)
=>
{
getAlumniView
(
params
).
then
((
res
:
any
)
=>
{
...
@@ -16,22 +17,15 @@ const getAlumniDetail = () => {
...
@@ -16,22 +17,15 @@ const getAlumniDetail = () => {
project
.
value
=
allPrefixList
.
filter
((
item
:
any
)
=>
item
.
prefix
===
detailList
.
value
.
project_prefix
)
project
.
value
=
allPrefixList
.
filter
((
item
:
any
)
=>
item
.
prefix
===
detailList
.
value
.
project_prefix
)
})
})
}
}
const
sex
=
computed
(()
=>
{
if
(
detailList
.
value
.
sex
===
'0'
)
{
return
'女士'
}
else
if
(
detailList
.
value
.
sex
===
'1'
)
{
return
'先生'
}
else
if
(
detailList
.
value
.
sex
===
'2'
)
{
return
'未知'
}
})
</
script
>
</
script
>
<
template
>
<
template
>
<AppCard
title=
"校友详情"
>
<AppCard
title=
"校友详情"
>
<el-descriptions
:column=
"3"
title=
"基本信息"
>
<el-descriptions
:column=
"3"
title=
"基本信息"
>
<el-descriptions-item
label=
"姓名:"
>
{{
detailList
?.
username
}}
</el-descriptions-item>
<el-descriptions-item
label=
"姓名:"
>
{{
detailList
?.
username
}}
</el-descriptions-item>
<el-descriptions-item
label=
"性别:"
>
{{
sex
}}
</el-descriptions-item>
<el-descriptions-item
label=
"性别:"
>
{{
sexList
.
filter
(
item
=>
item
.
value
===
detailList
?.
sex
)[
0
]?.
label
}}
</el-descriptions-item>
<el-descriptions-item
label=
"出生日期:"
>
{{
detailList
?.
birthday
}}
</el-descriptions-item>
<el-descriptions-item
label=
"出生日期:"
>
{{
detailList
?.
birthday
}}
</el-descriptions-item>
<el-descriptions-item
label=
"毕业院校:"
>
<el-descriptions-item
label=
"毕业院校:"
>
{{
detailList
?.
graduating_institution
}}
{{
detailList
?.
graduating_institution
}}
...
@@ -40,7 +34,7 @@ const sex = computed(() => {
...
@@ -40,7 +34,7 @@ const sex = computed(() => {
{{
detailList
?.
specialty
}}
{{
detailList
?.
specialty
}}
</el-descriptions-item>
</el-descriptions-item>
<el-descriptions-item
label=
"最高学历:"
>
<el-descriptions-item
label=
"最高学历:"
>
{{
detailList
?.
highest_qualification
}}
{{
highGraduation
.
filter
(
item
=>
item
.
value
===
detailList
?.
highest_qualification
)[
0
]?.
label
}}
</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>
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论