Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
f8b27f95
提交
f8b27f95
authored
9月 26, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: 评分专家增加所属机构
上级
39e3e1d8
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
20 行增加
和
4 行删除
+20
-4
FormDialog.vue
src/modules/admin/contest/experts/components/FormDialog.vue
+14
-4
types.ts
src/modules/admin/contest/experts/types.ts
+6
-0
没有找到文件。
src/modules/admin/contest/experts/components/FormDialog.vue
浏览文件 @
f8b27f95
...
@@ -5,6 +5,7 @@ import { ElMessage } from 'element-plus'
...
@@ -5,6 +5,7 @@ import { ElMessage } from 'element-plus'
import
{
createExpert
,
updateExpert
}
from
'../api'
import
{
createExpert
,
updateExpert
}
from
'../api'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useMapStore
}
from
'@/stores/map'
import
{
useArea
}
from
'@/composables/useArea'
import
{
useArea
}
from
'@/composables/useArea'
import
{
useGetProjectList
}
from
'@/composables/useGetProjectList'
interface
Props
{
interface
Props
{
data
?:
Expert
data
?:
Expert
...
@@ -17,6 +18,8 @@ const emit = defineEmits<{
...
@@ -17,6 +18,8 @@ const emit = defineEmits<{
(
e
:
'update:modelValue'
,
visible
:
boolean
):
void
(
e
:
'update:modelValue'
,
visible
:
boolean
):
void
}
>
()
}
>
()
// 机构列表
const
{
organizations
}
=
useGetProjectList
()
// 性别
// 性别
const
genderList
=
useMapStore
().
getMapValuesByKey
(
'system_gender'
)
const
genderList
=
useMapStore
().
getMapValuesByKey
(
'system_gender'
)
// 职务
// 职务
...
@@ -31,7 +34,8 @@ const form = reactive<ExpertCreateParams>({
...
@@ -31,7 +34,8 @@ const form = reactive<ExpertCreateParams>({
position_id
:
''
,
position_id
:
''
,
province
:
''
,
province
:
''
,
city
:
''
,
city
:
''
,
area
:
''
area
:
''
,
organization_id
:
''
})
})
const
{
provinceList
,
cityList
,
countyList
,
provinceValue
,
cityValue
,
countyValue
}
=
useArea
(
const
{
provinceList
,
cityList
,
countyList
,
provinceValue
,
cityValue
,
countyValue
}
=
useArea
(
...
@@ -47,7 +51,7 @@ watchEffect(() => {
...
@@ -47,7 +51,7 @@ watchEffect(() => {
watchEffect
(()
=>
{
watchEffect
(()
=>
{
if
(
!
props
.
data
)
return
if
(
!
props
.
data
)
return
Object
.
assign
(
form
,
props
.
data
,
{
position_id
:
props
.
data
.
position
.
id
})
Object
.
assign
(
form
,
props
.
data
,
{
position_id
:
props
.
data
.
position
.
id
,
organization_id
:
props
.
data
.
organization
.
id
})
})
})
const
rules
=
ref
<
FormRules
>
({
const
rules
=
ref
<
FormRules
>
({
...
@@ -57,7 +61,8 @@ const rules = ref<FormRules>({
...
@@ -57,7 +61,8 @@ const rules = ref<FormRules>({
position_id
:
[{
required
:
true
,
message
:
'请选择职务'
}],
position_id
:
[{
required
:
true
,
message
:
'请选择职务'
}],
province
:
[{
required
:
true
,
message
:
'请选择省'
}],
province
:
[{
required
:
true
,
message
:
'请选择省'
}],
city
:
[{
required
:
true
,
message
:
'请选择市'
}],
city
:
[{
required
:
true
,
message
:
'请选择市'
}],
area
:
[{
required
:
true
,
message
:
'请选择区/县'
}]
area
:
[{
required
:
true
,
message
:
'请选择区/县'
}],
organization_id
:
[{
required
:
true
,
message
:
'请选择所属部门/学校'
}]
})
})
const
isUpdate
=
$computed
(()
=>
{
const
isUpdate
=
$computed
(()
=>
{
return
!!
props
.
data
?.
id
return
!!
props
.
data
?.
id
...
@@ -93,7 +98,12 @@ function handleUpdate() {
...
@@ -93,7 +98,12 @@ function handleUpdate() {
<
template
>
<
template
>
<el-dialog
:title=
"title"
:close-on-click-modal=
"false"
width=
"600px"
@
update:modelValue=
"$emit('update:modelValue')"
>
<el-dialog
:title=
"title"
:close-on-click-modal=
"false"
width=
"600px"
@
update:modelValue=
"$emit('update:modelValue')"
>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
label-width=
"80px"
>
<el-form
ref=
"formRef"
:model=
"form"
:rules=
"rules"
label-width=
"120px"
>
<el-form-item
label=
"所属部门/学校"
prop=
"organization_id"
>
<el-select
v-model=
"form.organization_id"
style=
"width: 100%"
:disabled=
"isUpdate"
>
<el-option
v-for=
"item in organizations"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"姓名"
prop=
"name"
>
<el-form-item
label=
"姓名"
prop=
"name"
>
<el-input
v-model=
"form.name"
:disabled=
"isUpdate"
/>
<el-input
v-model=
"form.name"
:disabled=
"isUpdate"
/>
</el-form-item>
</el-form-item>
...
...
src/modules/admin/contest/experts/types.ts
浏览文件 @
f8b27f95
...
@@ -14,6 +14,7 @@ export interface Expert {
...
@@ -14,6 +14,7 @@ export interface Expert {
updated_time
:
string
updated_time
:
string
position
:
ExpertPosition
position
:
ExpertPosition
competition
:
ExpertCompetition
competition
:
ExpertCompetition
organization
:
ExpertOrganization
check_count
:
1
check_count
:
1
}
}
export
interface
ExpertPosition
{
export
interface
ExpertPosition
{
...
@@ -25,6 +26,10 @@ export interface ExpertCompetition {
...
@@ -25,6 +26,10 @@ export interface ExpertCompetition {
id
:
string
id
:
string
name
:
string
name
:
string
}
}
export
interface
ExpertOrganization
{
id
:
string
name
:
string
}
export
interface
ExpertCreateParams
{
export
interface
ExpertCreateParams
{
name
:
string
name
:
string
mobile
:
string
mobile
:
string
...
@@ -34,6 +39,7 @@ export interface ExpertCreateParams {
...
@@ -34,6 +39,7 @@ export interface ExpertCreateParams {
province
:
string
province
:
string
city
:
string
city
:
string
area
:
string
area
:
string
organization_id
:
string
}
}
export
type
ExpertUpdateParams
=
ExpertCreateParams
&
{
id
:
string
}
export
type
ExpertUpdateParams
=
ExpertCreateParams
&
{
id
:
string
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论