Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
S
saas-lab
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
saas-lab
Commits
7b210237
提交
7b210237
authored
11月 28, 2024
作者:
lhh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
11.27需求开发
上级
76da5682
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
71 行增加
和
39 行删除
+71
-39
FormDialog.vue
src/modules/admin/contest/items/components/FormDialog.vue
+70
-39
types.ts
src/modules/admin/contest/items/types.ts
+1
-0
没有找到文件。
src/modules/admin/contest/items/components/FormDialog.vue
浏览文件 @
7b210237
...
...
@@ -43,7 +43,7 @@ const formRef = $ref<FormInstance>()
const
form
=
reactive
({
id
:
''
,
name
:
''
,
client_id
:
''
,
client_id
:
'
client_1
'
,
host_unit_id
:
''
,
organizer_ids
:
[],
technical_support_unit_id
:
''
,
...
...
@@ -61,20 +61,24 @@ const form = reactive({
datetimeRange2
:
undefined
,
is_switchable_theory_practice
:
0
,
is_customer_anti_cheat
:
0
,
practical_competition_tag_name
:
''
,
practical_environment_tag_name
:
''
,
practical_answer_tag_name
:
''
,
practical_report_abel_ame
:
''
,
train_platform_configs
:
[
{
name
:
appConfig
.
xTrainLabel
||
'1+X理论考试'
,
is_show
:
'1'
,
type
:
'1'
,
url
:
''
,
platform_key
:
'x_exam'
},
{
name
:
appConfig
.
labTrainLabel
||
'商业数据分析实验'
,
is_show
:
'0'
,
type
:
'2'
,
url
:
''
,
platform_key
:
'career_data_analysis'
},
{
name
:
'
数据营销
实操'
,
is_show
:
'0'
,
type
:
'2'
,
url
:
''
,
platform_key
:
'data_marketing'
}
//
{ name: appConfig.xTrainLabel || '1+X理论考试', is_show: '1', type: '1', url: '', platform_key: 'x_exam' },
//
{
//
name: appConfig.labTrainLabel || '商业数据分析实验',
//
is_show: '0',
//
type: '2',
//
url: '',
//
platform_key: 'career_data_analysis'
//
},
{
name
:
'实操'
,
is_show
:
'0'
,
type
:
'2'
,
url
:
''
,
platform_key
:
'data_marketing'
}
],
competition_platform_configs
:
[
{
name
:
appConfig
.
xExamLabel
||
'
1+X理论考试
'
,
name
:
appConfig
.
xExamLabel
||
'
理论
'
,
is_show
:
'1'
,
type
:
'1'
,
url
:
''
,
...
...
@@ -88,7 +92,7 @@ const form = reactive({
// url: '',
// platform_key: 'career_data_analysis'
// },
{
name
:
'
数据营销
实操'
,
is_show
:
'0'
,
type
:
'2'
,
url
:
''
,
platform_key
:
'data_marketing'
}
{
name
:
'实操'
,
is_show
:
'0'
,
type
:
'2'
,
url
:
''
,
platform_key
:
'data_marketing'
}
]
})
watchEffect
(()
=>
{
...
...
@@ -105,10 +109,22 @@ watchEffect(() => {
new
Date
(
props
.
data
.
operational_end_time
*
1000
)
]
const
is_switchable_theory_practice
=
parseInt
(
props
.
data
.
is_switchable_theory_practice
)
const
is_customer_anti_cheat
=
parseInt
(
props
.
data
?.
is_customer_anti_cheat
)
||
0
const
type
=
props
.
data
?.
type
+
''
const
status
=
props
.
data
?.
status
+
''
const
apply_expiration_date
=
props
.
data
.
apply_expiration_date
*
1000
let
is_customer_anti_cheat
=
0
let
practical_competition_tag_name
=
''
let
practical_environment_tag_name
=
''
let
practical_answer_tag_name
=
''
let
practical_report_abel_ame
=
''
if
(
props
.
data
.
extended_field
)
{
is_customer_anti_cheat
=
props
.
data
.
extended_field
?.
is_customer_anti_cheat
practical_competition_tag_name
=
props
.
data
.
extended_field
?.
practical_competition_tag_name
practical_environment_tag_name
=
props
.
data
.
extended_field
?.
practical_environment_tag_name
practical_answer_tag_name
=
props
.
data
.
extended_field
?.
practical_answer_tag_name
practical_report_abel_ame
=
props
.
data
.
extended_field
?.
practical_report_abel_ame
}
Object
.
assign
(
form
,
props
.
data
,
{
host_unit_id
,
organizer_ids
,
...
...
@@ -120,9 +136,13 @@ watchEffect(() => {
datetimeRange2
,
apply_expiration_date
,
is_switchable_theory_practice
,
is_customer_anti_cheat
,
type
,
status
status
,
is_customer_anti_cheat
,
practical_competition_tag_name
,
practical_environment_tag_name
,
practical_answer_tag_name
,
practical_report_abel_ame
})
})
const
checkApplyExpirationDate
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
...
...
@@ -197,6 +217,10 @@ const checkCompetitionPlatformConfigs = (rule: any, value: any, callback: any) =
}
const
rules
=
ref
<
FormRules
>
({
name
:
[{
required
:
true
,
message
:
'请输入赛项名称'
}],
practical_competition_tag_name
:
[{
required
:
true
,
message
:
'请输入'
}],
practical_environment_tag_name
:
[{
required
:
true
,
message
:
'请输入'
}],
practical_answer_tag_name
:
[{
required
:
true
,
message
:
'请输入'
}],
practical_report_abel_ame
:
[{
required
:
true
,
message
:
'请输入'
}],
host_unit_id
:
[{
required
:
true
,
message
:
'请选择主办单位'
}],
organizer_ids
:
[{
type
:
'array'
,
required
:
true
,
message
:
'请选择承办单位'
}],
technical_support_unit_id
:
[{
required
:
true
,
message
:
'请选择技术支持单位'
}],
...
...
@@ -254,7 +278,14 @@ function handleSubmit() {
end_at
:
dayjs
(
secondDatetime
).
year
(
year
).
month
(
month
).
date
(
date
).
unix
(),
operational_start_time
:
dayjs
(
firstDatetime2
).
year
(
year
).
month
(
month
).
date
(
date
).
unix
(),
operational_end_time
:
dayjs
(
secondDatetime2
).
year
(
year
).
month
(
month
).
date
(
date
).
unix
(),
apply_expiration_date
:
dayjs
(
form
.
apply_expiration_date
).
endOf
(
'date'
).
unix
()
apply_expiration_date
:
dayjs
(
form
.
apply_expiration_date
).
endOf
(
'date'
).
unix
(),
extended_field
:
JSON
.
stringify
({
practical_competition_tag_name
:
form
.
practical_competition_tag_name
,
practical_environment_tag_name
:
form
.
practical_environment_tag_name
,
practical_answer_tag_name
:
form
.
practical_answer_tag_name
,
practical_report_abel_ame
:
form
.
practical_report_abel_ame
,
is_customer_anti_cheat
:
form
.
is_customer_anti_cheat
})
}
// 判断正式比赛理论答题时间和选择的考试
...
...
@@ -263,7 +294,6 @@ function handleSubmit() {
const
examEndTime
=
new
Date
(
findExam
?.
end_time
||
''
).
getTime
()
// console.log(containsNumber(examStartTime, mergedForm.start_at), containsNumber(examEndTime, mergedForm.end_at))
const
findXItem
=
form
.
competition_platform_configs
.
find
(
item
=>
item
.
type
===
'1'
)
console
.
log
(
findXItem
,
'findXItem'
,
form
.
competition_platform_configs
)
if
(
findXItem
?.
is_show
===
'1'
)
{
if
(
containsNumber
(
examStartTime
,
mergedForm
.
start_at
)
!==
true
||
...
...
@@ -298,9 +328,8 @@ function handleSubmit() {
'train_platform_configs',
'competition_platform_configs',
'is_switchable_theory_practice',
'
is_customer_anti_cheat
'
'
extended_field
'
])
console.log(isUpdate, 'isUpdate')
isUpdate ? handleUpdate(params) : handleCreate(params)
})
}
...
...
@@ -331,9 +360,14 @@ function handleDateRangeChange(value: any) {
}
const clientList = [
{ label: '商务数据分析师赛项', value: 'business_data_analyst' },
{ label: '全媒体运营师赛项', value: 'all_media_operator' },
{ label: '网络主播赛项', value: 'network_anchor_competition' }
// { label: '商务数据分析师赛项', value: 'business_data_analyst' },
// { label: '全媒体运营师赛项', value: 'all_media_operator' },
// { label: '网络主播赛项', value: 'network_anchor_competition' }
{ label: '客户端1', value: 'client_1' },
{ label: '客户端2', value: 'client_2' },
{ label: '客户端3', value: 'client_3' },
{ label: '客户端4', value: 'client_4' },
{ label: '客户端5', value: 'client_5' }
]
let examList = $ref<Record<string, any>[]>([])
...
...
@@ -408,17 +442,17 @@ onMounted(() => {
<el-option
v-for=
"item in teachers"
:key=
"item.id"
:label=
"item.name"
:value=
"item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item
label=
"实操赛题标签名称"
prop=
"name"
>
<el-input
v-model=
"form.
name"
/>
<el-form-item
label=
"实操赛题标签名称"
prop=
"
practical_competition_tag_
name"
>
<el-input
placeholder=
"请输入"
v-model=
"form.practical_competition_tag_
name"
/>
</el-form-item>
<el-form-item
label=
"实操环境标签名称"
prop=
"name"
>
<el-input
v-model=
"form.
name"
/>
<el-form-item
label=
"实操环境标签名称"
prop=
"
practical_environment_tag_
name"
>
<el-input
placeholder=
"请输入"
v-model=
"form.practical_environment_tag_
name"
/>
</el-form-item>
<el-form-item
label=
"实操报告标签名称"
prop=
"name"
>
<el-input
v-model=
"form.
name"
/>
<el-form-item
label=
"实操报告标签名称"
prop=
"
practical_answer_tag_
name"
>
<el-input
placeholder=
"请输入"
v-model=
"form.practical_answer_tag_
name"
/>
</el-form-item>
<el-form-item
label=
"实操答题标签名称"
prop=
"
n
ame"
>
<el-input
v-model=
"form.n
ame"
/>
<el-form-item
label=
"实操答题标签名称"
prop=
"
practical_report_abel_
ame"
>
<el-input
placeholder=
"请输入"
v-model=
"form.practical_report_abel_
ame"
/>
</el-form-item>
<el-form-item
label=
"有效状态"
prop=
"status"
>
<el-radio-group
v-model=
"form.status"
>
...
...
@@ -449,9 +483,12 @@ onMounted(() => {
</el-radio-group>
</el-form-item>
-->
<el-form-item
label=
"客户端标识"
prop=
"client_id"
>
<el-select
v-model=
"form.client_id"
style=
"width: 100%"
clearable
>
<
!--
<
el-select
v-model=
"form.client_id"
style=
"width: 100%"
clearable
>
<el-option
v-for=
"item in clientList"
:key=
"item.value"
:label=
"item.label"
:value=
"item.value"
></el-option>
</el-select>
</el-select>
-->
<el-radio-group
v-model=
"form.client_id"
>
<el-radio
v-for=
"item in clientList"
:key=
"item.value"
:label=
"item.value"
>
{{
item
.
label
}}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"报名截止日期"
prop=
"apply_expiration_date"
>
<el-date-picker
type=
"date"
v-model=
"form.apply_expiration_date"
style=
"width: 100%"
/>
...
...
@@ -490,7 +527,7 @@ onMounted(() => {
</div>
</el-checkbox>
</el-form-item>
<el-form-item
label=
"
是否允许客户端切换
"
prop=
"is_switchable_theory_practice"
>
<el-form-item
label=
"
客户端切换理论与实操
"
prop=
"is_switchable_theory_practice"
>
<el-radio-group
v-model=
"form.is_switchable_theory_practice"
>
<el-radio
:label=
"0"
>
否
</el-radio>
<el-radio
:label=
"1"
>
是
</el-radio>
...
...
@@ -502,12 +539,6 @@ onMounted(() => {
<el-radio
:label=
"1"
>
是
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"客户端切换理论与实操"
prop=
"is_switchable_theory_practice"
>
<el-radio-group
v-model=
"form.is_switchable_theory_practice"
>
<el-radio
:label=
"0"
>
否
</el-radio>
<el-radio
:label=
"1"
>
是
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"赛项LOGO"
prop=
"logo"
>
<AppUpload
v-model=
"form.logo"
accept=
"image/*"
></AppUpload>
...
...
src/modules/admin/contest/items/types.ts
浏览文件 @
7b210237
...
...
@@ -36,6 +36,7 @@ export interface ContestItem {
competition_platform_configs
:
any
[]
is_switchable_theory_practice
:
string
,
is_customer_anti_cheat
:
string
extended_field
:
any
}
export
interface
ContestCreateParams
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论