complete CreateStart.vue feature
This commit is contained in:
parent
efb802ea26
commit
56e16265c6
@ -48,11 +48,12 @@ const handleCreateFrom = async (from: 'xlsx' | 'jwxt') => {
|
||||
tempCourseInfo.value = courseInfo.value!
|
||||
}
|
||||
} else if (from === 'jwxt') {
|
||||
console.log(1)
|
||||
ElMessage({ type: 'warning', message: '功能暂时不可用,敬请期待' })
|
||||
}
|
||||
}
|
||||
|
||||
const handleBack = () => router.back()
|
||||
|
||||
const handleFormReset = () => {
|
||||
tempCourseInfo.value = {
|
||||
campus: '',
|
||||
@ -64,13 +65,20 @@ const handleFormReset = () => {
|
||||
teacher: ''
|
||||
}
|
||||
}
|
||||
|
||||
const handleShowCopyBtn = () => {
|
||||
isShowCopyFrom.value = (!tempCourseInfo.value.master && tempCourseInfo.value.teacher) as boolean
|
||||
}
|
||||
|
||||
const handleCopyFromTeacher = () => {
|
||||
tempCourseInfo.value.master = tempCourseInfo.value.teacher
|
||||
isShowCopyFrom.value = false
|
||||
}
|
||||
|
||||
const handleSubmit = async () => {
|
||||
store.saveCourseInfo(tempCourseInfo.value)
|
||||
await router.push({ name: 'panel' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -125,14 +133,16 @@ const handleCopyFromTeacher = () => {
|
||||
</el-form-item>
|
||||
<div class="flex justify-end">
|
||||
<el-button @click="handleFormReset">重置</el-button>
|
||||
<el-button type="primary" :disabled="enableSubmit">下一步</el-button>
|
||||
<el-button type="primary" :disabled="enableSubmit" @click="handleSubmit"
|
||||
>下一步</el-button
|
||||
>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
<el-divider>或</el-divider>
|
||||
<div class="flex justify-center">
|
||||
<el-button @click="handleCreateFrom('xlsx')">从 Excel 中导入</el-button>
|
||||
<el-button disabled>从教务系统中导入</el-button>
|
||||
<el-button @click="handleCreateFrom('jwxt')">从 教务系统 中导入</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
Loading…
x
Reference in New Issue
Block a user