提交 36b6c466 authored 作者: matian's avatar matian

Merge remote-tracking branch 'origin/master'

...@@ -80,24 +80,25 @@ const handlePrimary = () => { ...@@ -80,24 +80,25 @@ const handlePrimary = () => {
<el-button plain @click="handelRemove(row.id)">删除</el-button> <el-button plain @click="handelRemove(row.id)">删除</el-button>
</template> </template>
</AppList> </AppList>
<el-dialog v-model="dialogVisible" width="400px" title="添加讲师"> <el-dialog v-model="dialogVisible" width="400px" title="添加讲师" append-to-body>
<div style="display: flex; justify-content: center"> <el-form label-suffix=":" label-position="left">
讲师姓名: <el-form-item label="讲师姓名">
<el-select <el-select
v-model="selectList" v-model="selectList"
multiple multiple
filterable filterable
remote remote
placeholder="请输入讲师姓名" placeholder="请输入讲师姓名"
value-key="id" value-key="id"
:reserve-keyword="false" :reserve-keyword="false"
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
style="flex: 1" style="width: 100%"
> >
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" /> <el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
</el-select> </el-select>
</div> </el-form-item>
</el-form>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" @click="handlePrimary">确认</el-button> <el-button type="primary" @click="handlePrimary">确认</el-button>
......
...@@ -96,24 +96,25 @@ const handlePrimary = () => { ...@@ -96,24 +96,25 @@ const handlePrimary = () => {
<el-button plain @click="handleRemove(row.id)">删除</el-button> <el-button plain @click="handleRemove(row.id)">删除</el-button>
</template> </template>
</AppList> </AppList>
<el-dialog v-model="dialogVisible" width="400px" title="添加直播"> <el-dialog v-model="dialogVisible" width="400px" title="添加直播" append-to-body>
<div style="display: flex; justify-content: center"> <el-form label-suffix=":" label-position="left">
直播会议号: <el-form-item label="直播会议号">
<el-select <el-select
v-model="selectList" v-model="selectList"
multiple multiple
filterable filterable
remote remote
placeholder="会议主题或者会议code" placeholder="会议主题或者会议code"
value-key="id" value-key="id"
:reserve-keyword="false" :reserve-keyword="false"
:remote-method="remoteMethod" :remote-method="remoteMethod"
:loading="loading" :loading="loading"
style="flex: 1" style="width: 100%"
> >
<el-option v-for="item in options" :key="item.id" :label="item.subject" :value="item" /> <el-option v-for="item in options" :key="item.id" :label="item.subject" :value="item" />
</el-select> </el-select>
</div> </el-form-item>
</el-form>
<template #footer> <template #footer>
<span class="dialog-footer"> <span class="dialog-footer">
<el-button type="primary" @click="handlePrimary">确认</el-button> <el-button type="primary" @click="handlePrimary">确认</el-button>
......
...@@ -29,6 +29,10 @@ interface ICourseList { ...@@ -29,6 +29,10 @@ interface ICourseList {
label: string label: string
value: string value: string
} }
const ruleFormRef = $ref<FormInstance>()
const ruleFormRef2 = $ref<FormInstance>()
// 课程类型 // 课程类型
const courseType = computed<ICourseList[]>(() => { const courseType = computed<ICourseList[]>(() => {
return store.getMapValuesByKey('system_online_type') return store.getMapValuesByKey('system_online_type')
...@@ -83,7 +87,6 @@ const coverChange = (url: string) => { ...@@ -83,7 +87,6 @@ const coverChange = (url: string) => {
// 选择考试 // 选择考试
const changeExam = (data: any) => { const changeExam = (data: any) => {
console.log(data, 'data')
form.exam_id = JSON.parse(JSON.stringify(data)) form.exam_id = JSON.parse(JSON.stringify(data))
.map((item: any) => { .map((item: any) => {
return item.id return item.id
...@@ -114,11 +117,15 @@ watchEffect(() => { ...@@ -114,11 +117,15 @@ watchEffect(() => {
form.live_id = setDefaultData(form.meetings) form.live_id = setDefaultData(form.meetings)
}) })
watch(
() => form.lecturer_id,
() => {
ruleFormRef?.validateField('lecturer_id')
}
)
function setDefaultData(data: any[] = []) { function setDefaultData(data: any[] = []) {
return data.map((item: any) => item.id).join() return data.map((item: any) => item.id).join()
} }
const ruleFormRef = $ref<FormInstance>()
const ruleFormRef2 = $ref<FormInstance>()
// 提交 // 提交
function handleSubmit() { function handleSubmit() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论