|
|
|
@ -2,16 +2,15 @@ |
|
|
|
|
import { ref, onMounted } from 'vue' |
|
|
|
|
// import axios from 'axios' |
|
|
|
|
import courseEdit from './components/courseEdit.vue' |
|
|
|
|
import { Plus, Search } from '@element-plus/icons-vue' |
|
|
|
|
import { Plus } from '@element-plus/icons-vue' |
|
|
|
|
import { |
|
|
|
|
getCourseListApi, |
|
|
|
|
deleteCourseApi, |
|
|
|
|
getCourseObjectApi, |
|
|
|
|
getTeacherListApi, |
|
|
|
|
} from '../../api/user/crouse' |
|
|
|
|
import { ElMessageBox, ElMessage } from 'element-plus' |
|
|
|
|
// import router from '@/router' |
|
|
|
|
import { useRouter, useRoute } from 'vue-router' |
|
|
|
|
import { useRouter } from 'vue-router' |
|
|
|
|
const router = useRouter() |
|
|
|
|
// const route = useRoute() |
|
|
|
|
// console.log(route) |
|
|
|
@ -165,8 +164,12 @@ const CloseCouresNameChangeEvent = () => { |
|
|
|
|
<el-form inline> |
|
|
|
|
<el-form-item label="课程教师:" class="short-form-item"> |
|
|
|
|
<el-select v-model="params.teacher"> |
|
|
|
|
<el-option v-for="teachers in teacherList" :key="teachers.username" :value="teachers.username" |
|
|
|
|
:label="teachers.name"></el-option> |
|
|
|
|
<el-option |
|
|
|
|
v-for="teachers in teacherList" |
|
|
|
|
:key="teachers.username" |
|
|
|
|
:value="teachers.username" |
|
|
|
|
:label="teachers.name" |
|
|
|
|
></el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="课程类别:" class="short-form-item"> |
|
|
|
@ -195,7 +198,7 @@ const CloseCouresNameChangeEvent = () => { |
|
|
|
|
</el-form> |
|
|
|
|
<div class="course"> |
|
|
|
|
<ul class="course_list"> |
|
|
|
|
<li @click="onAddCourse()"> |
|
|
|
|
<li @click="onAddCourse()" class="add_course"> |
|
|
|
|
<div class="plus"> |
|
|
|
|
<el-icon class="avatar-uploader-icon"> |
|
|
|
|
<Plus /> |
|
|
|
@ -225,21 +228,36 @@ const CloseCouresNameChangeEvent = () => { |
|
|
|
|
<el-icon class="del" @click="onDeleteCourse(item.id)"> |
|
|
|
|
<Delete /> |
|
|
|
|
</el-icon> |
|
|
|
|
<el-button class="object" round plain @click="onGetCourseObject(item.id)"> |
|
|
|
|
<el-button |
|
|
|
|
class="object" |
|
|
|
|
round |
|
|
|
|
plain |
|
|
|
|
@click="onGetCourseObject(item.id)" |
|
|
|
|
> |
|
|
|
|
查看课程目标 |
|
|
|
|
</el-button> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
<el-pagination v-model:current-page="params.pageNo" v-model:page-size="params.pageSize" |
|
|
|
|
:page-sizes="[2, 5, 7, 10]" :background="true" layout="jumper,total, sizes, prev, pager, next " :total="total" |
|
|
|
|
@size-change="handleSizeChange" @current-change="handleCurrentChange" |
|
|
|
|
style="margin-top: 10px; justify-content: center" /> |
|
|
|
|
<el-pagination |
|
|
|
|
v-model:current-page="params.pageNo" |
|
|
|
|
v-model:page-size="params.pageSize" |
|
|
|
|
:page-sizes="[2, 5, 7, 10]" |
|
|
|
|
:background="true" |
|
|
|
|
layout="jumper,total, sizes, prev, pager, next " |
|
|
|
|
:total="total" |
|
|
|
|
@size-change="handleSizeChange" |
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
style="margin-top: 10px; justify-content: center" |
|
|
|
|
/> |
|
|
|
|
</div> |
|
|
|
|
<course-edit ref="drawer" @success="onSuccess" @couresNameChange="couresNameChangeEvent" |
|
|
|
|
@CloseCouresNameChange="CloseCouresNameChangeEvent" @creditChange="creditChangeEvent" |
|
|
|
|
@classhoursChange="classhoursChangeEvent" @ClosecreditChange="ClosecreditChangeEvent" |
|
|
|
|
@CloseclasshoursChange="CloseclasshoursChangeEvent" :flog="flog"></course-edit> |
|
|
|
|
<course-edit |
|
|
|
|
ref="drawer" |
|
|
|
|
@success="onSuccess" |
|
|
|
|
@couresNameChange="couresNameChangeEvent" |
|
|
|
|
@CloseCouresNameChange="CloseCouresNameChangeEvent" |
|
|
|
|
:flog="flog" |
|
|
|
|
></course-edit> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
@ -285,7 +303,6 @@ const CloseCouresNameChangeEvent = () => { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.course { |
|
|
|
|
|
|
|
|
|
// display: flex; |
|
|
|
|
// flex: 0 0 25%; |
|
|
|
|
// justify-content: space-between; |
|
|
|
@ -323,6 +340,9 @@ const CloseCouresNameChangeEvent = () => { |
|
|
|
|
margin-left: 30px; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
font-weight: bold; |
|
|
|
|
&:hover { |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
img { |
|
|
|
@ -345,19 +365,6 @@ const CloseCouresNameChangeEvent = () => { |
|
|
|
|
color: #0052ff; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
h2 { |
|
|
|
|
font-family: Inter-Bold; |
|
|
|
|
color: #333; |
|
|
|
|
font-size: 24px; |
|
|
|
|
margin-left: 30px; |
|
|
|
|
margin-top: 10px; |
|
|
|
|
font-weight: bold; |
|
|
|
|
|
|
|
|
|
&:hover { |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.del { |
|
|
|
@ -378,19 +385,36 @@ const CloseCouresNameChangeEvent = () => { |
|
|
|
|
.plus { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 178px; |
|
|
|
|
&:hover { |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// background-position: center center; |
|
|
|
|
.el-icon.avatar-uploader-icon { |
|
|
|
|
font-size: 28px; |
|
|
|
|
font-size: 50px; |
|
|
|
|
color: #8c939d; |
|
|
|
|
width: 100%; |
|
|
|
|
height: 178px; |
|
|
|
|
margin-top: 20px; |
|
|
|
|
text-align: center; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.add_course { |
|
|
|
|
border: 2px dashed rgb(143, 139, 139); |
|
|
|
|
h2 { |
|
|
|
|
font-size: 40px; |
|
|
|
|
text-align: center; |
|
|
|
|
font-family: Inter-Bold; |
|
|
|
|
color: #535050; |
|
|
|
|
font-weight: bold; |
|
|
|
|
margin-top: 20px; |
|
|
|
|
&:hover { |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.short-form-item { |
|
|
|
|
width: 250px; |
|
|
|
|
margin-right: 65px; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
</style> |
|
|
|
|