zhuhao_dev #104

Merged
zhuhao merged 6 commits from zhuhao_dev into main 2024-08-07 15:51:13 +08:00
3 changed files with 144 additions and 7 deletions
Showing only changes of commit 9018abb673 - Show all commits

View File

@ -96,9 +96,9 @@ const hanleFileChange = (file) => {
return false return false
} }
// //
// B < KB < MB < GB // B < KB < MB < GB
// file.raw.size B // file.raw.size B
const fileSize = file.raw.size / 1024 / 1024 > 100 const fileSize = file.raw.size / 1024 / 1024 > 500
if (fileSize) { if (fileSize) {
ElMessage.error('文件大小错误! 请上传小于100M的文件!') ElMessage.error('文件大小错误! 请上传小于100M的文件!')
return false return false
@ -126,7 +126,7 @@ const checkFile = (item, file) => {
else{ else{
return false return false
} }
} }
// //

View File

@ -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="&nbsp;" 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>

View File

@ -3,12 +3,12 @@
<ChooseTextbook @change-book="nodeClick" @node-click="nodeClick" /> <ChooseTextbook @change-book="nodeClick" @node-click="nodeClick" />
<div class="page-right"> <div class="page-right">
<div class="header-top flex"> <div class="header-top flex">
<div class="textbook-img"> <div class="textbook-img" @click="navtoPdf">
<el-image style="width: 80px; height: 110px" :src="curBookImg" /> <el-image style="width: 80px; height: 110px" :src="curBookImg" />
</div> </div>
<div class="top-item"> <div class="top-item">
<el-button class="btn" @click="handleOutLink('standard')">课标研读</el-button> <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('gk')">高考研读</el-button>
<el-button class="btn" @click="handleOutLink('aiModel')">教学大模型</el-button> <el-button class="btn" @click="handleOutLink('aiModel')">教学大模型</el-button>
</div> </div>
@ -59,9 +59,11 @@
<uploadDialog v-model="isDialogOpen" @submit-file="submitFile" /> <uploadDialog v-model="isDialogOpen" @submit-file="submitFile" />
<SetHomework v-model="setDialog" :entpcourseid="entpcourseid" :row="row" @on-close="closeHomework" /> <SetHomework v-model="setDialog" :entpcourseid="entpcourseid" :row="row" @on-close="closeHomework" />
</div> </div>
<reserv ref="reservDialog"></reserv>
</template> </template>
<script setup> <script setup>
import { Check } from '@element-plus/icons-vue' import { Check } from '@element-plus/icons-vue'
import Reserv from '@/views/prepare/container/reserv.vue'
</script> </script>
<script> <script>
import ChooseTextbook from '@/components/choose-textbook/index.vue' import ChooseTextbook from '@/components/choose-textbook/index.vue'
@ -288,7 +290,7 @@ export default {
this.uploadData.textbookId = data.textBook.curBookId this.uploadData.textbookId = data.textBook.curBookId
this.initHomeWork() this.initHomeWork()
await this.asyncAllFile() await this.asyncAllFile()
}, },
async initHomeWork() { async initHomeWork() {
if (this.timerId) { if (this.timerId) {
@ -305,7 +307,7 @@ export default {
let { rows } = await this.getChapterId() let { rows } = await this.getChapterId()
this.entpcourseid = rows[0].id this.entpcourseid = rows[0].id
} }
// //
this.getHomeWorkList() this.getHomeWorkList()
} }
@ -331,6 +333,9 @@ export default {
cform.createblankfile = 'yes'; cform.createblankfile = 'yes';
return addEntpcourse(cform) return addEntpcourse(cform)
}, },
openReserv(){
// this.$refs['reservDialog'].openDialog()
},
// //
handleOutLink(key) { handleOutLink(key) {
if (key == 'homeWork') { if (key == 'homeWork') {
@ -528,6 +533,9 @@ export default {
overflow: hidden; overflow: hidden;
margin-right: 20px; margin-right: 20px;
z-index: 1; z-index: 1;
&:hover {
cursor: pointer;
}
} }
.top-item { .top-item {