Compare commits

..

No commits in common. 'd2712808e3bf5dd459736fa2424a98213d6310d2' and 'fd1011f3ca072f2290de863f5f0df0111fa1e0c9' have entirely different histories.

  1. 2
      src/utils/request.ts
  2. 88
      src/views/course/basicCourseInformation.vue

@ -11,7 +11,7 @@ const request = axios.create({
request.interceptors.request.use((config) => {
const userStore = useUserStore()
// 设置请求头设置token
config.headers.Authorization = `Bearer ${userStore.token}`
config.headers.token = userStore.token
return config
})
//响应拦截器

@ -2,15 +2,16 @@
import { ref, onMounted } from 'vue'
// import axios from 'axios'
import courseEdit from './components/courseEdit.vue'
import { Plus } from '@element-plus/icons-vue'
import { Plus, Search } 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 } from 'vue-router'
import { useRouter, useRoute } from 'vue-router'
const router = useRouter()
// const route = useRoute()
// console.log(route)
@ -164,12 +165,8 @@ 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">
@ -198,7 +195,7 @@ const CloseCouresNameChangeEvent = () => {
</el-form>
<div class="course">
<ul class="course_list">
<li @click="onAddCourse()" class="add_course">
<li @click="onAddCourse()">
<div class="plus">
<el-icon class="avatar-uploader-icon">
<Plus />
@ -228,36 +225,21 @@ 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"
:flog="flog"
></course-edit>
<course-edit ref="drawer" @success="onSuccess" @couresNameChange="couresNameChangeEvent"
@CloseCouresNameChange="CloseCouresNameChangeEvent" @creditChange="creditChangeEvent"
@classhoursChange="classhoursChangeEvent" @ClosecreditChange="ClosecreditChangeEvent"
@CloseclasshoursChange="CloseclasshoursChangeEvent" :flog="flog"></course-edit>
</div>
</div>
</template>
@ -303,6 +285,7 @@ const CloseCouresNameChangeEvent = () => {
}
.course {
// display: flex;
// flex: 0 0 25%;
// justify-content: space-between;
@ -340,9 +323,6 @@ const CloseCouresNameChangeEvent = () => {
margin-left: 30px;
margin-top: 10px;
font-weight: bold;
&:hover {
cursor: pointer;
}
}
img {
@ -365,6 +345,19 @@ 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 {
@ -385,36 +378,19 @@ const CloseCouresNameChangeEvent = () => {
.plus {
width: 100%;
height: 178px;
&:hover {
cursor: pointer;
}
// background-position: center center;
.el-icon.avatar-uploader-icon {
font-size: 50px;
font-size: 28px;
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>
Loading…
Cancel
Save