二期:预约课程修改
This commit is contained in:
parent
a55a662ce9
commit
9018abb673
|
@ -98,7 +98,7 @@ const hanleFileChange = (file) => {
|
|||
// 验证文件大小
|
||||
// B < KB < MB < GB
|
||||
// file.raw.size 单位是B
|
||||
const fileSize = file.raw.size / 1024 / 1024 > 100
|
||||
const fileSize = file.raw.size / 1024 / 1024 > 500
|
||||
if (fileSize) {
|
||||
ElMessage.error('文件大小错误! 请上传小于100M的文件!')
|
||||
return false
|
||||
|
|
|
@ -0,0 +1,129 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
v-model="centerDialogVisible"
|
||||
class="reserv-dialog"
|
||||
title="预约课程"
|
||||
destroy-on-close
|
||||
width="600"
|
||||
style="text-align: left"
|
||||
>
|
||||
<el-form :model="form" label-width="auto" style="max-width: 600px">
|
||||
<el-form-item label="课程名称">
|
||||
<el-input v-model="form.name" />
|
||||
</el-form-item>
|
||||
<el-form-item label="课程类型" prop="location">
|
||||
<el-segmented v-model="form.type" :block="false" :options="locationOptions" />
|
||||
</el-form-item>
|
||||
<el-form-item label=" " prop="location">
|
||||
<div>{{ locationMessage }}</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="上课时间">
|
||||
<el-col :span="6">
|
||||
<el-date-picker
|
||||
v-model="form.day"
|
||||
type="date"
|
||||
:editable="false"
|
||||
class="reserv-date-pick"
|
||||
placeholder="请选择日期"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :span="2" class="text-center">
|
||||
<span class="text-gray-500">-</span>
|
||||
</el-col>
|
||||
<el-col :span="11">
|
||||
<el-time-picker
|
||||
v-model="form.time"
|
||||
is-range
|
||||
:editable="false"
|
||||
format="HH:mm"
|
||||
class="reserv-time-pick"
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
/>
|
||||
</el-col>
|
||||
</el-form-item>
|
||||
<el-form-item label="授课对象">
|
||||
<el-radio-group v-model="form.resource">
|
||||
<el-radio v-for="(item, index) in classList" :key="index" :value="item.id">{{item.caption}}({{item.classstudentcount}})人</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="教室">
|
||||
<el-input v-model="form.classRoom" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="centerDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="centerDialogVisible = false"> 提交 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, defineExpose, onMounted, reactive, computed } from 'vue'
|
||||
import { listClassmain } from '@/api/classManage'
|
||||
import useUserStore from '@/store/modules/user'
|
||||
const userStore = useUserStore().user
|
||||
const centerDialogVisible = ref(false)
|
||||
const form = reactive({
|
||||
name: '',
|
||||
type: '常规课',
|
||||
delivery: false,
|
||||
day:'',
|
||||
time:'',
|
||||
resource: '',
|
||||
classRoom: ''
|
||||
})
|
||||
const locationOptions = [
|
||||
{
|
||||
label: '常规课',
|
||||
value: '常规课',
|
||||
disabled: false,
|
||||
message: '现场公屏授课,学生无需长时间打开平板上。'
|
||||
},
|
||||
{
|
||||
label: '公开课',
|
||||
value: '公开课',
|
||||
disabled: true,
|
||||
message: '现场公屏授课,学生需打开平开与老师进行互动,如点赞、互动作业。'
|
||||
},
|
||||
{
|
||||
label: '直播课',
|
||||
value: '直播课',
|
||||
disabled: true,
|
||||
message: '远程直播授课,学生需打开平开观看实时直播教学,并与老师进行互动。'
|
||||
}
|
||||
]
|
||||
const locationMessage = computed(() => {
|
||||
return locationOptions.find((item) => item.value === form.type).message
|
||||
})
|
||||
const openDialog = () => {
|
||||
centerDialogVisible.value = true
|
||||
}
|
||||
const closeDialog = () => {
|
||||
centerDialogVisible.value = false
|
||||
}
|
||||
const classList = ref([])
|
||||
onMounted(() => {
|
||||
listClassmain({ classuserid: userStore.userId, pageSize: 100, status: 'open' }).then(
|
||||
(response) => {
|
||||
classList.value = [...response.rows]
|
||||
}
|
||||
)
|
||||
})
|
||||
defineExpose({
|
||||
openDialog,
|
||||
closeDialog
|
||||
})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.reserv-date-pick) {
|
||||
width: 140px;
|
||||
}
|
||||
:deep(.reserv-time-pick) {
|
||||
width: 240px;
|
||||
}
|
||||
</style>
|
|
@ -3,12 +3,12 @@
|
|||
<ChooseTextbook @change-book="nodeClick" @node-click="nodeClick" />
|
||||
<div class="page-right">
|
||||
<div class="header-top flex">
|
||||
<div class="textbook-img">
|
||||
<div class="textbook-img" @click="navtoPdf">
|
||||
<el-image style="width: 80px; height: 110px" :src="curBookImg" />
|
||||
</div>
|
||||
<div class="top-item">
|
||||
<el-button class="btn" @click="handleOutLink('standard')">课标研读</el-button>
|
||||
<el-button class="btn" @click="navtoPdf">电子课本</el-button>
|
||||
<el-button class="btn" @click="openReserv">预约课程</el-button>
|
||||
<el-button class="btn" @click="handleOutLink('gk')">高考研读</el-button>
|
||||
<el-button class="btn" @click="handleOutLink('aiModel')">教学大模型</el-button>
|
||||
</div>
|
||||
|
@ -59,9 +59,11 @@
|
|||
<uploadDialog v-model="isDialogOpen" @submit-file="submitFile" />
|
||||
<SetHomework v-model="setDialog" :entpcourseid="entpcourseid" :row="row" @on-close="closeHomework" />
|
||||
</div>
|
||||
<reserv ref="reservDialog"></reserv>
|
||||
</template>
|
||||
<script setup>
|
||||
import { Check } from '@element-plus/icons-vue'
|
||||
import Reserv from '@/views/prepare/container/reserv.vue'
|
||||
</script>
|
||||
<script>
|
||||
import ChooseTextbook from '@/components/choose-textbook/index.vue'
|
||||
|
@ -331,6 +333,9 @@ export default {
|
|||
cform.createblankfile = 'yes';
|
||||
return addEntpcourse(cform)
|
||||
},
|
||||
openReserv(){
|
||||
// this.$refs['reservDialog'].openDialog()
|
||||
},
|
||||
// 打开外部链接
|
||||
handleOutLink(key) {
|
||||
if (key == 'homeWork') {
|
||||
|
@ -528,6 +533,9 @@ export default {
|
|||
overflow: hidden;
|
||||
margin-right: 20px;
|
||||
z-index: 1;
|
||||
&:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.top-item {
|
||||
|
|
Loading…
Reference in New Issue