提交 2272c727 authored 作者: 王鹏飞's avatar 王鹏飞

feat: 新增客户端标识

上级 e0cee58b
......@@ -60,12 +60,24 @@ const form = reactive({
datetimeRange: undefined,
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: 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理论考试', is_show: '1', type: '1', url: '', platform_key: 'x_exam' },
{ name: appConfig.labExamLabel || '商业数据分析实验', is_show: '0', type: '2', url: '', platform_key: 'career_data_analysis' },
{
name: appConfig.labExamLabel || '商业数据分析实验',
is_show: '0',
type: '2',
url: '',
platform_key: 'career_data_analysis'
},
{ name: '数据营销实操', is_show: '0', type: '2', url: '', platform_key: 'data_marketing' }
]
})
......@@ -95,7 +107,10 @@ const checkApplyExpirationDate = (rule: any, value: any, callback: any) => {
callback(new Error('请选择报名截止日期'))
} else {
const [firstDate, secondDate] = form.dateRange || []
if (!dayjs(value).isBetween(firstDate, secondDate, 'date', '[]') || !dayjs(value).isBefore(dayjs(form.date), 'date')) {
if (
!dayjs(value).isBetween(firstDate, secondDate, 'date', '[]') ||
!dayjs(value).isBefore(dayjs(form.date), 'date')
) {
callback(new Error('请选择赛项周期内的日期,且必须早于正式比赛日期'))
}
callback()
......@@ -249,12 +264,18 @@ function handleDateRangeChange(value: any) {
const clientList = [
{ label: '商务数据分析师赛项', value: 'business_data_analyst' },
{ label: '全媒体运营师赛项', value: 'all_media_operator' }
{ label: '全媒体运营师赛项', value: 'all_media_operator' },
{ label: '网络主播赛项', value: 'network_anchor_competition' }
]
</script>
<template>
<el-dialog :title="title" :close-on-click-modal="false" align-center width="600px" @update:modelValue="value => $emit('update:modelValue', value)">
<el-dialog
:title="title"
:close-on-click-modal="false"
align-center
width="600px"
@update:modelValue="value => $emit('update:modelValue', value)">
<el-form ref="formRef" :model="form" :rules="rules" label-width="110px">
<el-form-item label="客户端标识" prop="client_id">
<el-select v-model="form.client_id" style="width: 100%" clearable>
......@@ -276,7 +297,11 @@ const clientList = [
</el-form-item>
<el-form-item label="技术支持单位" prop="technical_support_unit_id">
<el-select v-model="form.technical_support_unit_id" style="width: 100%">
<el-option v-for="item in technicalSupportUnitList" :key="item.id" :label="item.label" :value="item.id"></el-option>
<el-option
v-for="item in technicalSupportUnitList"
:key="item.id"
:label="item.label"
:value="item.id"></el-option>
</el-select>
</el-form-item>
<el-form-item label="赛项类型" prop="type">
......@@ -290,7 +315,12 @@ const clientList = [
</el-select>
</el-form-item>
<el-form-item label="赛项周期" prop="dateRange">
<el-date-picker type="daterange" range-separator="至" v-model="form.dateRange" style="width: 100%" @change="handleDateRangeChange" />
<el-date-picker
type="daterange"
range-separator="至"
v-model="form.dateRange"
style="width: 100%"
@change="handleDateRangeChange" />
</el-form-item>
<el-form-item label="正式比赛日期" prop="date">
<el-date-picker type="date" v-model="form.date" style="width: 100%" />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论