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