Compare commits

..

9 Commits

19 changed files with 6292 additions and 3652 deletions

View File

@@ -103,6 +103,14 @@ const getUsersByIds = function(ids) {
return ajax.postJson(baseURL,'/user/getUserMessageToDai',ids); return ajax.postJson(baseURL,'/user/getUserMessageToDai',ids);
} }
/**
* 根据关键字检索用户(创建人下拉)
* @param {string} keyword
*/
const selectUser = function(keyword = '') {
return ajax.postJson(baseURL,'/user/selectuser',{ keyword });
}
export default { export default {
userParentOrg, userParentOrg,
findOrgsByKeyword, findOrgsByKeyword,
@@ -116,5 +124,6 @@ export default {
getInAudienceIds, getInAudienceIds,
getUsersByIds, getUsersByIds,
updateUser, updateUser,
logout logout,
selectUser
} }

File diff suppressed because it is too large Load Diff

View File

@@ -102,6 +102,24 @@ const courseSearch=function(query){
const detailStudy = function(courseId,aid) { const detailStudy = function(courseId,aid) {
return ajax.get(`/xboe/m/course/portal/detail-study?courseId=${courseId}&aid=${aid}`); return ajax.get(`/xboe/m/course/portal/detail-study?courseId=${courseId}&aid=${aid}`);
} }
/**
* 课程学习进度的详细信息-分页
* @param {Object} data
*/
const detailStudyPage = function(data) {
return ajax.get(`/xboe/m/course/portal/detail-study-page?courseId=${data.courseId}&aid=${data.aid}&pageIndex=${data.pageIndex}&pageSize=${data.pageSize}`);
}
/**
* 资源学习情况列列表-分页
* @param {Object} data
*/
const pageListResource=function(data){
return ajax.post('/xboe/school/study/course/pagelist-resource',data);
}
export default { export default {
list, list,
pageList, pageList,
@@ -112,5 +130,7 @@ export default {
studyCounts, studyCounts,
courseSearch, courseSearch,
detailStudy, detailStudy,
detailPost detailPost,
detailStudyPage,
pageListResource
} }

View File

@@ -165,7 +165,7 @@ const appendStudyTime = function(data) {
* name: 学习人的姓名 * name: 学习人的姓名
*/ */
const studyRecords = function(data) { const studyRecords = function(data) {
return ajax.post('/xboe/school/study/course/pagelist',data); return ajax.post('/xboe/school/study/course/pagelistEx',data);
} }
/** /**
@@ -189,7 +189,7 @@ const studyContentRecords = function(data) {
} }
*/ */
const studyExport = function(data) { const studyExport = function(data) {
return ajax.post('/xboe/school/study/course/export',data); return ajax.post('/xboe/school/study/course/export',data, { responseType: 'blob' });
} }
/** /**
@@ -402,6 +402,31 @@ const findByIds=function (ids){
return ajax.postJson('/xboe/school/study/es/list-by-ids',ids); return ajax.postJson('/xboe/school/study/es/list-by-ids',ids);
} }
const exportSignup=function (data){
return ajax.post('/xboe/school/study/course/export-signup',data, { responseType: 'blob' });
}
// 作业导出
const exportHomework=function (data){
return ajax.post('/xboe/school/study/course/contents-homework-export',data, { responseType: 'blob' });
}
// 考试导出
const exportExam=function (data){
return ajax.post('/xboe/school/study/course/contents-exam-export',data, { responseType: 'blob' });
}
// 评估类型资源
const contentsAssess=function (data){
return ajax.post('/xboe/school/study/course/contents-assess',data);
}
// 考试类型资源
const contentsExam=function (data){
return ajax.post('/xboe/school/study/course/contents-exam',data);
}
export default { export default {
hasSignup, hasSignup,
signup, signup,
@@ -438,5 +463,10 @@ export default {
deleteSignUp, deleteSignUp,
ids, ids,
followIds, followIds,
studyIndexPost studyIndexPost,
exportSignup,
exportHomework,
exportExam,
contentsAssess,
contentsExam
} }

View File

@@ -0,0 +1,234 @@
<template>
<el-dialog
title="置顶排序"
:visible.sync="dialogVisible"
custom-class="g-dialog top-course-sorter-dialog"
width="820px"
:close-on-click-modal="false"
@closed="handleClosed"
append-to-body
>
<div class="top-course-sorter" v-loading="loading">
<div class="top-course-sorter__table" v-if="topList.length">
<div class="sorter-header">
<div class="header-cell header-cell--handle"></div>
<div class="header-cell header-cell--order">排序</div>
<div class="header-cell header-cell--name">课程名称</div>
<div class="header-cell header-cell--teacher">授课教师</div>
</div>
<div
class="sorter-row"
v-for="(item, index) in topList"
:key="item.id"
draggable="true"
@dragstart="handleDragStart(index, $event)"
@dragover.prevent
@drop="handleDrop(index)"
@dragend="handleDragEnd"
:class="{ 'is-dragging': draggingIndex === index }"
>
<div class="row-cell row-cell--handle">
<i class="el-icon-s-operation"></i>
</div>
<div class="row-cell row-cell--order">{{ index + 1 }}</div>
<div class="row-cell row-cell--name" :title="item.name">{{ item.name }}</div>
<div class="row-cell row-cell--teacher" :title="item.teacherName || '-'">
{{ item.teacherName || '-' }}
</div>
</div>
</div>
<el-empty v-else-if="!loading" description="暂无置顶课程"></el-empty>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" :disabled="!topList.length" :loading="saving" @click="handleSave">确定</el-button>
</span>
</el-dialog>
</template>
<script>
import apiCourse from '@/api/modules/course.js';
export default {
name: 'TopCourseSorter',
data() {
return {
dialogVisible: false,
loading: false,
saving: false,
topList: [],
draggingIndex: null,
};
},
methods: {
open() {
this.dialogVisible = true;
this.fetchTopList();
},
async fetchTopList() {
this.loading = true;
try {
const res = await apiCourse.fetchTopCourseList();
if (res.status === 200) {
this.topList = Array.isArray(res.result) ? [...res.result] : [];
} else {
this.$message.error(res.message || '获取置顶课程失败');
this.topList = [];
}
} catch (error) {
this.$message.error(error.message || '获取置顶课程失败');
this.topList = [];
} finally {
this.loading = false;
}
},
handleDragStart(index, event) {
this.draggingIndex = index;
if (event && event.dataTransfer) {
event.dataTransfer.effectAllowed = 'move';
event.dataTransfer.setData('text/plain', index);
}
},
handleDrop(targetIndex) {
if (this.draggingIndex === null || this.draggingIndex === targetIndex) {
return;
}
const movingItem = this.topList.splice(this.draggingIndex, 1)[0];
this.topList.splice(targetIndex, 0, movingItem);
this.draggingIndex = targetIndex;
},
handleDragEnd() {
this.draggingIndex = null;
},
async handleSave() {
if (!this.topList.length) {
this.$message.warning('暂无需要保存的排序');
return;
}
const payload = this.topList.map((item, index) => ({
id: item.id,
sortWeight: index,
}));
this.saving = true;
try {
const res = await apiCourse.updateTopCourseSort(payload);
if (res.status === 200) {
this.$message.success('排序更新成功');
this.$emit('sorted');
this.dialogVisible = false;
} else {
throw new Error(res.message || '排序更新失败');
}
} catch (error) {
this.$message.error(error.message || '排序更新失败');
} finally {
this.saving = false;
}
},
handleClosed() {
this.topList = [];
this.draggingIndex = null;
this.loading = false;
this.saving = false;
},
},
};
</script>
<style lang="scss" scoped>
.top-course-sorter {
min-height: 200px;
padding-top: 8px;
}
.top-course-sorter__table {
border: 1px solid #ebeef5;
border-radius: 6px;
overflow: hidden;
}
.sorter-header,
.sorter-row {
display: grid;
grid-template-columns: 60px 80px 1fr 160px;
align-items: center;
}
.sorter-header {
background-color: #f5f7fa;
height: 48px;
font-weight: 600;
color: #303133;
border-bottom: 1px solid #ebeef5;
}
.sorter-row {
min-height: 56px;
border-bottom: 1px solid #f2f6fc;
cursor: move;
transition: background-color 0.2s ease;
}
.sorter-row:last-child {
border-bottom: none;
}
.sorter-row:hover {
background-color: #f9fbff;
}
.sorter-row.is-dragging {
opacity: 0.7;
background-color: #ecf5ff;
}
.header-cell,
.row-cell {
padding: 0 16px;
display: flex;
align-items: center;
}
.header-cell--handle,
.row-cell--handle {
justify-content: center;
}
.header-cell--order,
.row-cell--order {
justify-content: flex-start;
}
.row-cell--name,
.row-cell--teacher {
color: #303133;
}
.row-cell--name {
font-weight: 500;
}
.row-cell--teacher {
color: #666;
}
.row-cell--handle i {
font-size: 20px;
color: #c0c4cc;
}
.dialog-footer {
text-align: right;
}
</style>

View File

@@ -897,7 +897,7 @@ export default {
} }
} else { } else {
//console.log(editData,'editData'); console.log(editData,'editData');
this.weikeReset = editData.id; this.weikeReset = editData.id;
this.onlineReset = editData.id; this.onlineReset = editData.id;
//console.log("编辑课程?"); //console.log("编辑课程?");

View File

@@ -414,6 +414,11 @@ export default {
if(meta.title == '添加受众' || meta.title == '查看受众'){ if(meta.title == '添加受众' || meta.title == '查看受众'){
meta.activeMenu = '/manage/ugroups' meta.activeMenu = '/manage/ugroups'
} }
if(route.path == '/course/coursemanage'){
console.log('进入课程管理');
meta.activeMenu = '/need/course'
}
if (meta.activeMenu) { if (meta.activeMenu) {
return meta.activeMenu; return meta.activeMenu;
} }

View File

@@ -29,6 +29,8 @@ export const pages=[
{title:'课程首页',path:'index',component:'course/Index',hidden:true}, {title:'课程首页',path:'index',component:'course/Index',hidden:true},
{title:'课程建设',path:'mylist',component:'course/TeacherList',hidden:true}, {title:'课程建设',path:'mylist',component:'course/TeacherList',hidden:true},
{title:'课程管理',path:'manage',component:'course/ManageList',hidden:false}, {title:'课程管理',path:'manage',component:'course/ManageList',hidden:false},
{title:'课程管理',path:'coursemanage',component:'course/CourseManage',hidden:true},
{title:'课程管理新版',path:'manage-remote',component:'course/ManageListRemote',hidden:false},
{title:'课程统计',path:'stat',component:'course/StatIndex',hidden:false}, {title:'课程统计',path:'stat',component:'course/StatIndex',hidden:false},
{title:'课件管理',path:'courseware',component:'course/Courseware',hidden:false}, {title:'课件管理',path:'courseware',component:'course/Courseware',hidden:false},
{title:'报名管理',path:'msignup',component:'study/ManageSignup',hidden:true}, {title:'报名管理',path:'msignup',component:'study/ManageSignup',hidden:true},
@@ -117,6 +119,7 @@ export const iframes=[
{title:'嵌入测试', path:'/iframe/index',hidden:false,component:'portal/iframe'}, {title:'嵌入测试', path:'/iframe/index',hidden:false,component:'portal/iframe'},
{title:'课件管理', path:'/iframe/course/coursewares',hidden:false,component:'course/Courseware'}, {title:'课件管理', path:'/iframe/course/coursewares',hidden:false,component:'course/Courseware'},
{title:'课程管理', path:'/iframe/course/manages',hidden:false,component:'course/ManageList'}, {title:'课程管理', path:'/iframe/course/manages',hidden:false,component:'course/ManageList'},
{title:'课程管理新版', path:'/iframe/course/manage-remote',hidden:false,component:'course/ManageListRemote'},
{title:'考试试题管理', path:'/iframe/exam/questions',hidden:false,component:'exam/Question'}, {title:'考试试题管理', path:'/iframe/exam/questions',hidden:false,component:'exam/Question'},
{title:'查看答卷', path:'/iframe/exam/viewanswer',hidden:false,component:'exam/viewAnswer'}, {title:'查看答卷', path:'/iframe/exam/viewanswer',hidden:false,component:'exam/viewAnswer'},
{title:'考试试卷管理', path:'/iframe/exam/papers',hidden:false,component:'exam/TestPaper'}, {title:'考试试卷管理', path:'/iframe/exam/papers',hidden:false,component:'exam/TestPaper'},

14
src/icons/svg/del.svg Normal file
View File

@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="11px" height="12px" viewBox="0 0 11 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>shanchu</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="icon" transform="translate(-436, -918)" fill="#FF1818" fill-rule="nonzero">
<g id="shanchu" transform="translate(436, 918)">
<path d="M10.4999537,3.19289906 L0.500046316,3.19289906 C0.223878361,3.19289906 0,2.97107081 0,2.6974318 C0,2.42379279 0.223878361,2.20196454 0.500046316,2.20196454 L10.4999537,2.20196454 C10.7761216,2.20196454 11,2.42379279 11,2.6974318 C11,2.97107081 10.7761216,3.19289906 10.4999537,3.19289906 Z" id="路径"></path>
<path d="M8.27763883,12 L2.72210644,12 C1.83281125,11.9990263 1.11214015,11.2849546 1.11115743,10.4038029 L1.11115743,2.6974318 C1.11115743,2.42379279 1.33503579,2.20196454 1.61120374,2.20196454 C1.8873717,2.20196454 2.11125006,2.42379279 2.11125006,2.6974318 L2.11125006,10.4038029 C2.11125006,10.738359 2.38496787,11.0095703 2.7226159,11.0095703 L8.2781483,11.0095703 C8.61579634,11.0095703 8.88951415,10.738359 8.88951415,10.4038029 L8.88951415,2.6974318 C8.88951415,2.42379279 9.11339251,2.20196454 9.38956046,2.20196454 C9.66572842,2.20196454 9.88960678,2.42379279 9.88960678,2.6974318 L9.88960678,10.4038029 C9.88862317,11.2853484 9.16733192,11.9995828 8.27763883,12 Z M7.72206011,3.19289906 C7.4459504,3.1927598 7.22215435,2.9710131 7.22201381,2.6974318 L7.22201381,1.59619712 C7.22201381,1.43553761 7.15760223,1.2814583 7.04294889,1.16785488 C6.92829555,1.05425145 6.77279226,0.990429712 6.61064795,0.990429715 L4.3890973,0.990429715 C4.05144927,0.990429715 3.77773146,1.26164102 3.77773146,1.59619712 L3.77773146,2.6974318 C3.77773146,2.97107081 3.5538531,3.19289906 3.27768515,3.19289906 C3.00151719,3.19289906 2.77763883,2.97107081 2.77763883,2.6974318 L2.77763883,1.59619712 C2.77862156,0.715045435 3.49929265,0.000973720991 4.38858784,0 L6.6109027,0 C7.50019788,0.000973727448 8.22086897,0.71504544 8.2218517,1.59619712 L8.2218517,2.6974318 C8.22171131,2.97091464 7.99807034,3.19262061 7.72206011,3.19289906 L7.72206011,3.19289906 Z" id="形状"></path>
<path d="M4.3890973,9.2475444 C4.11292935,9.2475444 3.88905099,9.02571608 3.88905099,8.75207707 L3.88905099,5.44938266 C3.88902352,5.27235111 3.9843258,5.10875556 4.13905195,5.02023193 C4.2937781,4.93170829 4.48441652,4.93170829 4.63914267,5.02023193 C4.79386882,5.10875556 4.8891711,5.27235111 4.88914369,5.44938266 L4.88914369,8.75207707 C4.88921124,8.88350369 4.83654966,9.00956666 4.74275812,9.10249932 C4.64896658,9.19543199 4.52173855,9.24761133 4.3890973,9.2475444 L4.3890973,9.2475444 Z" id="路径"></path>
<path d="M6.61115743,9.24754433 C6.33498947,9.24754433 6.11111111,9.02571608 6.11111111,8.75207707 L6.11111111,5.44938266 C6.11111111,5.17574365 6.33498947,4.9539154 6.61115743,4.9539154 C6.88732538,4.9539154 7.11120374,5.17574365 7.11120374,5.44938266 L7.11120374,8.75207707 C7.11120374,9.02571608 6.88732538,9.24754433 6.61115743,9.24754433 L6.61115743,9.24754433 Z" id="路径"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

11
src/icons/svg/detail.svg Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>chakan</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="icon" transform="translate(-326, -920)" fill="#4284F7" fill-rule="nonzero">
<g id="chakan" transform="translate(326, 920)">
<path d="M8.94642857,0 C9.61213393,0 10.1517857,0.539651786 10.1517857,1.20535714 L10.1517857,3.16071429 L11.0625,3.16071429 C11.5750848,3.16071429 11.9915893,3.57208929 11.9998661,4.08270536 L12,4.09821429 L12,10.7946429 C12,11.453692 11.4710759,11.989192 10.8145714,11.9998393 L10.7946429,12 L1.20535714,12 C0.546308036,12 0.0108080357,11.4710759 0.000160714286,10.8145714 L0,10.7946429 L0,4.09821429 C0,3.58562946 0.411375,3.169125 0.921991071,3.16084821 L0.9375,3.16071429 L1.84821429,3.16071429 L1.84821429,1.20535714 C1.84821429,0.546308036 2.37713839,0.0108080357 3.03364286,0.000160714286 L3.05357143,0 L8.94642857,0 Z M11.1964286,8.83928571 L0.803571429,8.83928571 L0.803571429,10.7946429 C0.803571429,11.0143259 0.979875,11.1928259 1.19871429,11.196375 L1.20535714,11.1964286 L10.7946429,11.1964286 C11.0143259,11.1964286 11.1928259,11.020125 11.1964286,10.8012857 L11.1964286,10.7946429 L11.1964286,8.83928571 Z M1.84821429,3.96428571 L0.9375,3.96428571 C0.864776786,3.96428571 0.805607143,4.02223661 0.803625,4.09446429 L0.803571429,4.09821429 L0.803571429,8.03571429 L1.84821429,8.03571429 L1.84821429,3.96428571 Z M11.0625,3.96428571 L10.1517857,3.96428571 L10.1517857,8.03571429 L11.1964286,8.03571429 L11.1964286,4.09821429 C11.1964286,4.02549107 11.1384777,3.96632143 11.06625,3.96433929 L11.0625,3.96428571 Z M8.95307143,0.803571429 L3.05357143,0.803571429 C2.83166518,0.803571429 2.65178571,0.983450893 2.65178571,1.20535714 L2.65178571,8.03571429 L9.34821429,8.03571429 L9.34821429,1.20535714 C9.34821429,0.985674107 9.17191071,0.807174107 8.95307143,0.803571429 Z M5.69866071,1.47321429 C7.1595,1.47321429 8.34375,2.65746429 8.34375,4.11830357 C8.34375,4.70375893 8.15354464,5.24479018 7.83155357,5.68297768 L8.65222768,6.50366518 C8.80913839,6.6605625 8.80913839,6.91495982 8.65222768,7.07187054 C8.49531696,7.22878125 8.24093304,7.22878125 8.08402232,7.07187054 L7.26333482,6.25119643 C6.82513393,6.5731875 6.28411607,6.76339286 5.69866071,6.76339286 C4.23782143,6.76339286 3.05357143,5.57914286 3.05357143,4.11830357 C3.05357143,2.65746429 4.23782143,1.47321429 5.69866071,1.47321429 Z M5.69866071,2.27678571 C4.68160714,2.27678571 3.85714286,3.10125 3.85714286,4.11830357 C3.85714286,5.13535714 4.68160714,5.95982143 5.69866071,5.95982143 C6.71571429,5.95982143 7.54017857,5.13535714 7.54017857,4.11830357 C7.54017857,3.10125 6.71571429,2.27678571 5.69866071,2.27678571 Z" id="形状"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

9
src/icons/svg/edit.svg Normal file
View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="10px" height="10px" viewBox="0 0 10 10" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>形状</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.4">
<g id="自定义考试_弹框2备份" transform="translate(-735, -435)" fill="#4284F7" fill-rule="nonzero">
<path d="M743.186667,436.766237 L741.615,435.165652 C741.398056,434.944783 741.046389,434.944783 740.829444,435.165652 L735.929444,440.155811 L735.102778,442.682575 C735.03591,442.885968 735.087729,443.110381 735.236598,443.262109 C735.385467,443.413836 735.605784,443.466786 735.805556,443.398849 L738.286667,442.556406 L743.186667,437.566813 C743.403546,437.345876 743.403546,436.987739 743.186667,436.766803 L743.186667,436.766237 Z M742.402222,437.166808 L737.884444,441.768278 L736.107778,442.374791 L736.705556,440.567698 L741.223889,435.966793 L742.402222,437.166808 L742.402222,437.166808 Z M735,444.151333 L745,444.151333 L745,445 L735,445 L735,444.151333 Z" id="形状"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

11
src/icons/svg/ercode.svg Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>erweima</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="icon" transform="translate(-258, -919)" fill="#4284F7" fill-rule="nonzero">
<g id="erweima" transform="translate(258, 919)">
<path d="M4,6.66666667 L1.33333333,6.66666667 C0.6,6.66666667 0,7.26666667 0,8 L0,10.6666667 C0,11.4 0.6,12 1.33333333,12 L4,12 C4.73333333,12 5.33333333,11.4 5.33333333,10.6666667 L5.33333333,8 C5.33333333,7.26666667 4.73333333,6.66666667 4,6.66666667 Z M4.44444444,10.6666667 C4.44444444,10.9111111 4.24444444,11.1111111 4,11.1111111 L1.33333333,11.1111111 C1.08888889,11.1111111 0.888888889,10.9111111 0.888888889,10.6666667 L0.888888889,8 C0.888888889,7.75555556 1.08888889,7.55555556 1.33333333,7.55555556 L4,7.55555556 C4.24444444,7.55555556 4.44444444,7.75555556 4.44444444,8 L4.44444444,10.6666667 Z M4,0 L1.33333333,0 C0.6,0 0,0.6 0,1.33333333 L0,4 C0,4.73333333 0.6,5.33333333 1.33333333,5.33333333 L4,5.33333333 C4.73333333,5.33333333 5.33333333,4.73333333 5.33333333,4 L5.33333333,1.33333333 C5.33333333,0.6 4.73333333,0 4,0 Z M4.44444444,4 C4.44444444,4.24444444 4.24444444,4.44444444 4,4.44444444 L1.33333333,4.44444444 C1.08888889,4.44444444 0.888888889,4.24444444 0.888888889,4 L0.888888889,1.33333333 C0.888888889,1.08888889 1.08888889,0.888888889 1.33333333,0.888888889 L4,0.888888889 C4.24444444,0.888888889 4.44444444,1.08888889 4.44444444,1.33333333 L4.44444444,4 Z M11.3333333,6.66666667 C11.0888889,6.66666667 10.8888889,6.86666667 10.8888889,7.11111111 L10.8888889,11.5555556 C10.8888889,11.8 11.0888889,12 11.3333333,12 C11.5777778,12 11.7777778,11.8 11.7777778,11.5555556 L11.7777778,7.11111111 C11.7777778,6.86666667 11.5777778,6.66666667 11.3333333,6.66666667 Z M10.6666667,0 L8,0 C7.26666667,0 6.66666667,0.6 6.66666667,1.33333333 L6.66666667,4 C6.66666667,4.73333333 7.26666667,5.33333333 8,5.33333333 L10.6666667,5.33333333 C11.4,5.33333333 12,4.73333333 12,4 L12,1.33333333 C12,0.6 11.4,0 10.6666667,0 Z M11.1111111,4 C11.1111111,4.24444444 10.9111111,4.44444444 10.6666667,4.44444444 L8,4.44444444 C7.75555556,4.44444444 7.55555556,4.24444444 7.55555556,4 L7.55555556,1.33333333 C7.55555556,1.08888889 7.75555556,0.888888889 8,0.888888889 L10.6666667,0.888888889 C10.9111111,0.888888889 11.1111111,1.08888889 11.1111111,1.33333333 L11.1111111,4 Z M7.33333333,7.33333333 C7.08888889,7.33333333 6.88888889,7.53333333 6.88888889,7.77777778 L6.88888889,11.5555556 C6.88888889,11.8 7.08888889,12 7.33333333,12 C7.57777778,12 7.77777778,11.8 7.77777778,11.5555556 L7.77777778,7.77777778 C7.77777778,7.53333333 7.57777778,7.33333333 7.33333333,7.33333333 Z M9.33333333,8.66666667 C9.08888889,8.66666667 8.88888889,8.86666667 8.88888889,9.11111111 L8.88888889,11.5555556 C8.88888889,11.8 9.08888889,12 9.33333333,12 C9.57777778,12 9.77777778,11.8 9.77777778,11.5555556 L9.77777778,9.11111111 C9.77777778,8.86666667 9.57777778,8.66666667 9.33333333,8.66666667 Z" id="形状"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

11
src/icons/svg/manage.svg Normal file
View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>guanli</title>
<g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="icon" transform="translate(-124, -920)" fill="#4284F7" fill-rule="nonzero">
<g id="guanli" transform="translate(124, 920)">
<path d="M4.49064449,5.50676379 L0.997920994,5.50676379 C0.449064449,5.50676379 0,5.05723205 0,4.50780437 L0,1.01144641 C0,0.462018737 0.449064449,0.0124869995 0.997920994,0.0124869995 L4.49064449,0.0124869995 C5.03950104,0.0124869995 5.48856549,0.462018737 5.48856549,1.01144641 L5.48856549,4.50780437 C5.48856549,5.05723205 5.03950104,5.50676379 4.49064449,5.50676379 Z M4.5347973,4.50780437 L4.5347973,5.00728409 L4.5347973,4.50780437 Z M0.997920994,1.01144641 L0.997920994,4.50780437 L4.49064449,4.50780437 L4.49064449,1.01144641 L0.997920994,1.01144641 Z M9.00623701,6.0062435 C8.75675676,6.0062435 8.53222453,5.90634756 8.35758836,5.73152966 L6.28690229,3.65868887 C6.11226612,3.48387098 6.01247401,3.25910511 6.01247401,3.00936525 C6.01247401,2.75962539 6.11226611,2.53485953 6.28690229,2.36004162 L8.35758836,0.26222685 C8.70686072,-0.0874089499 9.30561332,-0.0874089499 9.65488566,0.26222685 L11.7255717,2.36004162 C11.9002079,2.53485952 12,2.75962539 12,3.00936525 C12,3.25910511 11.9002079,3.48387097 11.7255717,3.65868887 L9.65488566,5.73152966 C9.48024949,5.90634755 9.25571726,6.0062435 9.00623701,6.0062435 L9.00623701,6.0062435 Z M7.06029106,3.00936525 L9.03118504,4.98231009 L10.977131,3.00936525 L9.00623701,1.03642041 L7.06029106,3.00936525 Z M4.49064449,12 L0.997920994,12 C0.449064449,12 0,11.5504683 0,11.0010406 L0,7.50468262 C0,6.95525495 0.449064449,6.50572321 0.997920994,6.50572321 L4.49064449,6.50572321 C5.03950104,6.50572321 5.48856549,6.95525495 5.48856549,7.50468262 L5.48856549,11.0010406 C5.48856549,11.5504683 5.03950104,12 4.49064449,12 Z M4.5347973,11.0010406 L4.5347973,11.5005203 L4.5347973,11.0010406 Z M0.997920994,7.50468262 L0.997920994,11.0010406 L4.49064449,11.0010406 L4.49064449,7.50468262 L0.997920994,7.50468262 Z M11.002079,12 L7.50935551,12 C6.96049896,12 6.51143451,11.5504683 6.51143451,11.0010406 L6.51143451,7.50468262 C6.51143451,6.95525495 6.96049896,6.50572321 7.50935551,6.50572321 L11.002079,6.50572321 C11.5509356,6.50572321 12,6.95525495 12,7.50468262 L12,11.0010406 C12,11.5504683 11.5509356,12 11.002079,12 Z M11.0462318,11.0010406 L11.0462318,11.5005203 L11.0462318,11.0010406 Z M7.50935551,7.50468262 L7.50935551,11.0010406 L11.002079,11.0010406 L11.002079,7.50468262 L7.50935551,7.50468262 Z" id="形状"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -8,30 +8,38 @@
</Remark> --> </Remark> -->
<div style="display: flex;justify-content:space-between;position: relative;"> <div style="display: flex;justify-content:space-between;position: relative;">
<div style="display: flex;justify-content: flex-start; padding: 12px 32px 10px 12px;"> <div style="display: flex;justify-content: flex-start; padding: 12px 32px 10px 12px;">
<!-- <div style="padding-left: 10px;"> <div style="margin-left:10px"><el-input :maxlength="50" v-model="params.name" placeholder="课程名称" clearable></el-input></div>
<el-select style="width: 120px;" v-model="params.type" clearable placeholder="课程类型">
<el-option label="全部" :value="null"></el-option>
<el-option label="微课" :value="10"></el-option>
<el-option label="在线课" :value="20"></el-option>
</el-select>
</div> -->
<div style="padding-left: 10px;"> <div style="padding-left: 10px;">
<el-select style="width: 120px;" v-model="params.status" clearable placeholder="状态"> <el-select style="width: 120px;" v-model="params.publish" clearable placeholder="发布状态">
<el-option label="全部" :value="null"></el-option> <!-- <el-option label="全部" :value="null"></el-option> -->
<el-option label="草稿" :value="1"></el-option> <el-option label="未发布" :value="false"></el-option>
<el-option label="待审核" :value="2"></el-option> <el-option label="已发布" :value="true"></el-option>
<el-option label="已审核" :value="5"></el-option>
</el-select> </el-select>
</div> </div>
<div style="margin-left:10px"><el-input v-model="params.keyword" placeholder="名称关键字" clearable></el-input></div> <div style="padding-left: 10px;">
<div style="padding-left: 10px;"><el-button type="primary" icon="el-icon-search" @click="findList()">搜索</el-button></div> <el-select style="width: 120px;" v-model="params.enabled" clearable placeholder="启停用状态">
<div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" type="primary" @click="reset">重置</el-button></div> <!-- <el-option label="全部" :value="null"></el-option> -->
<el-option label="停用" :value="false"></el-option>
<el-option label="启用" :value="true"></el-option>
</el-select>
</div>
<div style="padding-left: 10px;">
<el-select style="width: 120px;" v-model="params.status" clearable placeholder="审核状态">
<!-- <el-option label="全部" :value="null"></el-option> -->
<!-- <el-option label="无审核状态" :value="1"></el-option> -->
<el-option label="审核中" :value="2"></el-option>
<el-option label="审核驳回" :value="3"></el-option>
<el-option label="审核通过" :value="5"></el-option>
</el-select>
</div>
<div style="padding-left: 10px;"><el-button type="primary" icon="el-icon-search" @click="findList">查询</el-button></div>
<div style="padding: 0px 5px;"><el-button icon="el-icon-refresh-right" @click="reset">重置</el-button></div>
<div class="Create-coures"><el-button type="primary" @click="addNewCourse()" icon="el-icon-plus">新建课程</el-button></div> <div class="Create-coures"><el-button type="primary" @click="addNewCourse()" icon="el-icon-plus">新建课程</el-button></div>
</div> </div>
</div> </div>
<!--课程列表内容--> <!--课程列表内容-->
<div style=""> <div v-infinite-scroll="load" style="overflow:auto;height:1000px" infinite-scroll-distance="50" :infinite-scroll-immediate="false" :infinite-scroll-disabled="disabled">
<div class="uc-course" v-for="(item, idx) in couresList" :key="idx" @click="jumpRouter(item)"> <div class="uc-course" v-for="(item, idx) in couresList" :key="idx" @click="jumpRouter(item)">
<div class="uc-course-img" style="width: 212px;height:119px"> <div class="uc-course-img" style="width: 212px;height:119px">
<course-image :course="item"></course-image> <course-image :course="item"></course-image>
@@ -39,34 +47,27 @@
</div> </div>
<div class="uc-course-info"> <div class="uc-course-info">
<div class="uc-course-name"> <div class="uc-course-name">
<!-- <span class="uc-course-type1">{{courseType(item.type)}}</span> --> <el-tooltip class="item" effect="dark" :content="item.name" placement="top-start">
<span v-if="item.type == 10" class="uc-course-type1">录播</span> <span style="font-size:18px;color:#333">{{ item.name }}</span>
<span v-if="item.type == 20" class="uc-course-type1">录播</span> </el-tooltip>
<span class="caogao" v-if="item.status == 1">草稿</span>
<span class="daishenhe" v-if="item.status == 2">待审核</span>
<span class="weitongguo" v-if="item.status == 3">审核未通过</span>
<span class="yishenhe" v-if="item.status == 5">已审核</span>
<!-- <a :href="`${webBaseUrl}/course/detail?id=${item.id}`" target="_blank"> {{item.name}}</a> -->
<span style="font-size:18px;color:#333">{{ item.name }}</span>
</div> </div>
<div class="summary-item"> <div class="uc-course-item">
<div>{{ item.summary }}</div>
</div>
<div class="uc-course-text">
上次修改时间{{ item.sysUpdateTime }} 上次修改时间{{ item.sysUpdateTime }}
<span type="text" style="margin-left:10px;font-size:14px;cursor: pointer;color:#666" @click.stop="toExamine(item)">查看审核记录</span>
</div> </div>
</div> <div class="uc-course-item">
<div class="uc-course-btns" style="line-height: 30px;"> <div class="status-item">发布状态{{ item.published ? '发布' : '未发布' }}</div>
<el-link style="display:block" :underline="false" @click.stop="examine(item)" type="primary" v-if="item.status == 1" icon="el-icon-document-checked">提交审核</el-link> <div class="status-item">启停用状态{{ item.enabled ? '启用' : '停用' }}</div>
<el-link style="display:block" :underline="false" @click.stop="editCourse(item)" v-if="item.status == 3 || item.status == 4" type="primary" icon="el-icon-edit">编辑</el-link> <div class="status-item">审核状态<el-link :type="getStatusLabel(item.status).type" @click.stop="" :underline="false">{{getStatusLabel(item.status).label}}</el-link></div>
<el-link style="display:block" :underline="false" @click.stop="editCourse(item)" v-if="item.status == 1" type="primary" icon="el-icon-edit">去开发</el-link> </div>
<el-link style="display:block" :underline="false" @click.stop="delItem(item)" v-if="item.status == 1" type="danger" icon="el-icon-delete">删除</el-link> <div class="btn-container">
<el-link style="display:block" :underline="false" @click.stop="withdraw(item)" v-if="item.status == 2" type="info" icon="el-icon-delete">撤回</el-link> <el-link class="btn-item" v-for="(it, idx) in availableActions(item)" :key="idx" :underline="false" type="primary" @click.stop="it.handler(item)"><svg-icon style="margin-right: 5px;font-size:19px;padding-top: 4px;" :icon-class="it.icon"></svg-icon>{{it.label}}</el-link>
</div>
</div> </div>
</div> </div>
<p v-if="loading" class="page-tip">加载中...</p>
<p v-if="noMore" class="page-tip">没有更多了</p>
</div> </div>
<div v-if="couresList.length > 0" style="text-align: center; margin-top:57px;"> <!-- <div v-if="couresList.length > 0" style="text-align: center; margin-top:57px;">
<el-pagination <el-pagination
background background
@size-change="handleSizeChange" @size-change="handleSizeChange"
@@ -83,29 +84,62 @@
<div v-if="isSearh" class="zan-wu">没有查询到相关内容</div> <div v-if="isSearh" class="zan-wu">没有查询到相关内容</div>
<div v-else class="zan-wu">暂无数据</div> <div v-else class="zan-wu">暂无数据</div>
</div> </div>
</div> </div> -->
<div></div> <div></div>
<el-dialog title="二维码" :visible.sync="qrCodedialogVisible" width="900px" @close="closeCode" custom-class="g-dialog">
<div>
<el-form size="medium" label-width="100px">
<el-form-item label="二维码" >
<div id="qrcode" ref="qrcode" class="qrcode-img" @mouseenter="showDownloadButton = true" @mouseleave="showDownloadButton = false">
<div v-show="showDownloadButton" @click="downloadQrcode" class="downloadn-container">
<i class="el-icon-download" style="color: #409EFF;font-size:18px;margin-bottom:5px"></i>
<span>下载</span>
</div>
</div>
</el-form-item>
<el-form-item label="链接">
<el-input v-model="copyUrl" readonly class="input-with-select" id="text">
<el-button slot="append" @click="handleCopyUrl">复制</el-button>
</el-input>
</el-form-item>
<el-form-item label="">上述内容兼容PC端与移动端您可按需分享</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer"><el-button @click="closeCode"> </el-button></span>
</el-dialog>
<!-- TODO 修改展示字段 -->
<el-dialog title="审核记录" :visible.sync="dialogVisible" width="900px" custom-class="g-dialog"> <el-dialog title="审核记录" :visible.sync="dialogVisible" width="900px" custom-class="g-dialog">
<div> <div>
<el-table max-height="500" border :data="inviteTeacher" style="width: 100%;"> <el-table max-height="500" border :data="inviteTeacher" style="width: 100%;">
<el-table-column prop="sysCreateBy" label="姓名" width="180"></el-table-column> <el-table-column prop="type" label="审核类型">
<el-table-column prop="type" label="审核状态">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row.auditState ? '通过' : '不通过' }} {{ scope.row.auditState ? '通过' : '不通过' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="type" label="审核状态">
<template slot-scope="scope">
{{ auditEnum[scope.row.status] }}
</template>
</el-table-column>
<el-table-column prop="auditUser" label="审核人"></el-table-column>
<el-table-column prop="auditTime" label="审核结果"></el-table-column>
<el-table-column prop="auditTime" label="审核时间"></el-table-column> <el-table-column prop="auditTime" label="审核时间"></el-table-column>
<el-table-column prop="auditRemark" label="备注"></el-table-column> <el-table-column prop="auditRemark" label="审核意见"></el-table-column>
</el-table> </el-table>
</div> </div>
<span slot="footer" class="dialog-footer"><el-button @click="dialogVisible = false"> </el-button></span> <span slot="footer" class="dialog-footer"><el-button @click="dialogVisible = false"> </el-button></span>
</el-dialog> </el-dialog>
<course-form ref="courseForm" @submitSuccess="getList"></course-form> <course-form ref="courseForm" @submitSuccess="getNewList"></course-form>
</div> </div>
</template> </template>
<script> <script>
import QRCode from 'qrcodejs2';
import courseImage from '@/components/Course/courseImage.vue'; import courseImage from '@/components/Course/courseImage.vue';
import { mapGetters } from 'vuex'; import { mapGetters } from 'vuex';
import studyItem from '@/components/Course/studyItem.vue'; import studyItem from '@/components/Course/studyItem.vue';
@@ -116,11 +150,53 @@ import apiAudit from '@/api/system/audit.js';
import apiHRBP from '@/api/boe/HRBP.js'; import apiHRBP from '@/api/boe/HRBP.js';
import apiOrg from '@/api/system/organiza.js'; import apiOrg from '@/api/system/organiza.js';
import apiUserBasic from '@/api/boe/userbasic.js'; import apiUserBasic from '@/api/boe/userbasic.js';
// 状态权限映射
const STATUS_PERMISSIONS = {
// 未发布状态
unpublished: {
1: ['edit', 'delete'], // 无审核状态
2: ['auditRecord'], // 审核中'withdraw'
3: ['edit', 'delete', 'auditRecord'] // 审核驳回
},
// 已发布状态
published: {
enabled: {
1: ['edit', 'manage', 'auditRecord', 'qrcode'], //'offShelfApply', 'viewCurrent'
2: ['manage', 'auditRecord', 'qrcode'], // withdraw , 'viewCurrent'
3: ['edit', 'manage', 'auditRecord', 'qrcode'], //'offShelfApply', 'viewCurrent'
5: ['edit', 'manage', 'auditRecord', 'qrcode'] //'offShelfApply', 'viewCurrent'
},
disabled: {
// 所有状态在停用时操作一致
1: ['manage', 'auditRecord'], //, 'viewCurrent'
2: ['manage', 'auditRecord'], //, 'viewCurrent'
3: ['manage', 'auditRecord'], //, 'viewCurrent'
5: ['manage', 'auditRecord'] //, 'viewCurrent'
}
}
}
// 操作配置映射表
const ACTION_CONFIG = {
edit: { label: '编辑', handler: 'editCourse', icon: 'edit' },
manage: { label: '管理', handler: 'handleManage', icon: 'manage' },
// withdraw: { label: '撤回', handler: 'handleWithdraw' },
auditRecord: { label: '审核记录', handler: 'toExamine', icon: 'edit' },
qrcode: { label: '二维码', handler: 'handleQrcode', icon: 'ercode' },
// offShelfApply: { label: '下架申请', handler: 'handleOffShelfApply' },
// viewCurrent: { label: '查看当前版本', handler: 'handleViewCurrent', icon: 'detail' },
delete: { label: '删除', handler: 'delItem', icon: 'del' },
}
export default { export default {
name: 'ucStudyIndex', name: 'ucStudyIndex',
components: { studyItem, courseForm, courseImage }, components: { studyItem, courseForm, courseImage },
computed: { computed: {
...mapGetters(['userInfo']) ...mapGetters(['userInfo']),
disabled() {
return this.loading || this.noMore;
},
}, },
data() { data() {
@@ -130,17 +206,28 @@ export default {
courseType: courseType, courseType: courseType,
fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL, fileBaseUrl: process.env.VUE_APP_FILE_BASE_URL,
count: 0, count: 0,
params: { keyword: '', type: '', status: '', createUser: '', pageIndex: 1, pageSize: 10, sysCreateAid: '' }, params: { name: '', publish: '', status: '', enabled: '', pageIndex: 0, pageSize: 10 },
couresList: [], couresList: [],
flag: true, flag: true,
isSearh:false, isSearh:false,
qrCodedialogVisible: false,
copyUrl: '',
qrcodeImgUrl: '',
showDownloadButton: false, // 是否显示下载按钮
loading: false,
noMore: false,
auditEnum: {
1: '未审核',
2: '审核不通过',
9: '审核通过'
},
}; };
}, },
mounted() { mounted() {
if(this.$route.query && this.$route.query.open && this.$route.query.open == 'new') { if(this.$route.query && this.$route.query.open && this.$route.query.open == 'new') {
this.addNewCourse(); this.addNewCourse();
} }
this.getList(); // this.getList();
}, },
watch:{ watch:{
// '$route.query.open':function(val){ // '$route.query.open':function(val){
@@ -150,6 +237,126 @@ export default {
// } // }
}, },
methods: { methods: {
load() {
this.loading = true
this.params.pageIndex++
this.getList()
},
getNewList() {
this.couresList = [];
this.params.pageIndex = 1;
this.getList();
},
getStatusLabel(code) {
if (code == '1') {
return {type:'info',label:'-'}
} else if (code == '2') {
return {type:'warning',label:'审核中'}
} else if (code == '3') {
return {type:'danger',label:'审核驳回'}
} else if (code == '5') {
return {type:'success',label:'审核通过'}
}
},
// 获取可用的操作配置
availableActions(item) {
debugger
const { status, published, enabled } = item
let actionKeys = []
if (!published) {
// 未发布状态
actionKeys = STATUS_PERMISSIONS.unpublished[status] || []
} else {
// 已发布状态
const stateKey = enabled ? 'enabled' : 'disabled'
actionKeys = STATUS_PERMISSIONS.published[stateKey][status] || []
}
return actionKeys.map(key => ({
name: key,
label: ACTION_CONFIG[key].label,
handler: this[ACTION_CONFIG[key].handler],
icon: ACTION_CONFIG[key].icon
})).filter(Boolean)
},
handleManage(item) {
sessionStorage.setItem('courseDetail',JSON.stringify(item));
this.$router.push({ path: '/course/coursemanage' });
},
downloadQrcode() {
let img = document.getElementById("qrcode").getElementsByTagName("img")[0];
let canvas = document.createElement("canvas");
canvas.width = img.width;
canvas.height = img.height;
let ctx = canvas.getContext("2d");
ctx.drawImage(img, 0, 0);
let tempUrl = canvas.toDataURL("image/png");
// 创建a标签下载
let link = document.createElement('a'); //创建a标签
link.style.display = 'none'; //使其隐藏
link.download = tempUrl;
link.setAttribute('target', '_blank');
link.href = tempUrl; //赋予文件下载地址
link.setAttribute('download', '二维码.jpg'); //设置下载属性 以及文件名
document.body.appendChild(link); //a标签插至页面中
link.click(); //强制触发a标签事件
document.body.removeChild(link);
},
handleCopyUrl() {
document.getElementById("text").select()
document.execCommand("Copy")
this.$message.success("复制成功")
},
handleQrcode(row) {
this.qrCodedialogVisible = true;
let urlPre=window.location.protocol+'//'+window.location.host;
//动态的地址
//urlPre=urlPre+'/m?returnUrl='+urlPre+'/mobile/pages/login/loading?returnUrl=';
//固定的地址
// let returnUrl=urlPre+'/mobile/pages/login/loading?returnUrl=/pages/study/courseStudy?id='+row.id;
// let mobilePre=urlPre+'/m?returnUrl=';
// this.qrcodeImgUrl = mobilePre+encodeURIComponent(returnUrl);
// this.copyUrl=urlPre+this.webBaseUrl+'/course/studyindex?id='+row.id;
// if(row.type==20){
// this.copyUrl=urlPre+this.webBaseUrl+'/course/detail?id='+row.id;
// }
this.copyUrl = this.qrcodeImgUrl = process.env.VUE_APP_BOE_WEB_URL + '/systemapi/xboe/m/course/manage/redirectDetail?courseId=' + row.id
console.log('qrcodeImgUrl', this.qrcodeImgUrl)
console.log('webBaseUrl', this.webBaseUrl)
// 使用$nextTick确保数据渲染
this.$nextTick(() => {
this.crateQrcode();
});
},
// 生成二维码
crateQrcode() {
let qrcode = new QRCode('qrcode', {
width: 150,
height: 150, // 高度
text: this.qrcodeImgUrl // 二维码内容
// render: 'canvas' // 设置渲染方式(有两种方式 table和canvas默认是canvas
// background: '#f0f'
// foreground: '#ff0'
});
console.log('qrcode', qrcode)
},
// 关闭弹框,清除已经生成的二维码
closeCode() {
this.qrCodedialogVisible = false
// 逐个节点移除防止事件一起移除
let images = document.querySelectorAll('.qrcode-img img');
images.forEach(img => img.remove());
let canvas = document.querySelectorAll('.qrcode-img canvas');
canvas.forEach(canvas => canvas.remove());
},
// 撤回接口 // 撤回接口
withdraw(item) { withdraw(item) {
this.$confirm('此操作将撤回审核中的课程, 是否继续?', '提示', { this.$confirm('此操作将撤回审核中的课程, 是否继续?', '提示', {
@@ -165,7 +372,7 @@ export default {
type: 'success', type: 'success',
message: '撤回成功!' message: '撤回成功!'
}); });
this.getList(); this.getNewList();
} }
} }
}); });
@@ -178,17 +385,20 @@ export default {
}); });
}, },
reset() { reset() {
this.params.keyword = ''; this.params.name = ''
this.params.status = ''; this.params.publish = ''
this.params.type = ''; this.params.status = ''
this.params.enabled = ''
this.params.pageIndex = 1; this.params.pageIndex = 1;
this.getList(); // this.getList();
this.isSearh = false; this.isSearh = false;
}, },
toExamine(row) { toExamine(row) {
// this.detailType = row.type; // this.detailType = row.type;
this.dialogVisible = true; this.dialogVisible = true;
apiAudit.page(1, row.id).then(res => { apiCourse.auditCourseRecords({
courseId: row.id
}).then(res => {
if (res.status === 200) { if (res.status === 200) {
this.inviteTeacher = res.result; this.inviteTeacher = res.result;
} else { } else {
@@ -271,7 +481,8 @@ export default {
}) })
}, },
delItem(row) { delItem(row) {
this.$confirm('您确定要删除所选课程吗?', '删除提示', { console.log('delItem', row);
this.$confirm(`确认删除${row.name}吗?`, '删除提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
@@ -303,7 +514,9 @@ export default {
// this.$store.dispatch("userTrigger", event); // this.$store.dispatch("userTrigger", event);
// } // }
this.getList(); this.getNewList();
} else {
this.$message.success('操作失败!');
} }
} catch (error) { } catch (error) {
console.log(error); console.log(error);
@@ -339,36 +552,30 @@ export default {
} }
}, },
findList() { findList() {
this.params.pageIndex = 1;
this.isSearh = true; this.isSearh = true;
this.getList(); this.getNewList();
}, },
getList() { getList() {
this.params.aid = this.userInfo.aid; this.params.teacherId = this.userInfo.aid;
apiCourse.pageList(this.params).then(res => { apiCourse.courseList(this.params).then(res => {
this.loading = false;
if (res.status == 200) { if (res.status == 200) {
this.couresList = res.result.list; this.couresList = [...this.couresList, ...res.result.list];
this.count = res.result.count; this.count = res.result.count;
if (this.couresList.length >= this.count){
this.noMore = true;
}
} else { } else {
this.$message.error(res.message); this.$message.error(res.message);
} }
}); });
}, },
handleSizeChange(val) {
this.params.pageSize = val;
// this.params.pageIndex = 1;
this.getList();
},
handleCurrentChange(val) {
this.params.pageIndex = val;
this.getList();
},
addNewCourse() { addNewCourse() {
this.$refs.courseForm.initShow(); this.$refs.courseForm.initShow();
}, },
editCourse(row) { editCourse(row) {
console.log(row, 'editCourse');
this.$refs.courseForm.initShow(row); this.$refs.courseForm.initShow(row);
}, },
lastTabChange(tab, event) { lastTabChange(tab, event) {
@@ -379,6 +586,11 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.page-tip {
margin: 20px auto;
text-align: center;
font-size: 13px;
}
.list-wu{ .list-wu{
text-align: center; text-align: center;
margin: 40px; margin: 40px;
@@ -422,6 +634,35 @@ export default {
margin-top: 10px; margin-top: 10px;
margin-right: 40px; margin-right: 40px;
} }
.qrcode-img {
width: 150px;
height: 150px;
display: block;
position: relative;
.downloadn-container {
position: absolute;
width: 40px;
height: 45px;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
z-index: 99;
background: white;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
transition: all 0.3s ease;
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
cursor: pointer;
span {
color: #409EFF;
display: block;
font-size: 12px;
line-height: 12px;
}
}
}
.uc-course { .uc-course {
cursor: pointer; cursor: pointer;
display: flex; display: flex;
@@ -466,9 +707,25 @@ export default {
word-break:break-all; word-break:break-all;
// font-weight: 700; // font-weight: 700;
} }
.uc-course-text { .uc-course-item {
color: #666; color: #666;
margin-top: 28px; // margin-top: 4px;
font-size: 14px;
display: flex;
// flex-wrap: nowrap;
.status-item {
margin-right: 20px;
flex-shrink: 0;
}
}
.btn-container {
margin-top: 10px;
display: flex;
.btn-item {
margin-right: 20px;
}
} }
} }
.uc-course-btns { .uc-course-btns {

File diff suppressed because it is too large Load Diff

View File

@@ -2,7 +2,7 @@
<div id="couser-list-content" class="couser-list-content"> <div id="couser-list-content" class="couser-list-content">
<div class="course-banner"> <div class="course-banner">
<portal-header current="course" textColor="#fff" :keywords="keyword" @emitInput="emitInput" <portal-header current="course" textColor="#fff" :keywords="keyword" @emitInput="emitInput"
@showClass="showClass"></portal-header> @showClass="showClass"></portal-header>
</div> </div>
<div style="padding-top:30px"> <div style="padding-top:30px">
<div class="xcontent2"> <div class="xcontent2">
@@ -11,7 +11,7 @@
<span v-if="navTitle.length">></span> <span v-if="navTitle.length">></span>
<template v-if="navTitle.length"> <template v-if="navTitle.length">
<div class="oneTitle" v-for="(item, index) in navTitle" :key="item.id" <div class="oneTitle" v-for="(item, index) in navTitle" :key="item.id"
@click="handleOptionClick(item, index)"> @click="handleOptionClick(item, index)">
<span class="titleName">&nbsp;{{ item.name }}&nbsp;</span> <span class="titleName">&nbsp;{{ item.name }}&nbsp;</span>
<span v-if="index !== navTitle.length - 1">></span> <span v-if="index !== navTitle.length - 1">></span>
</div> </div>
@@ -39,25 +39,28 @@
:class="{ courseTwoActive: twoList.id == twoId || twoList.checked }" @mouseleave.stop="leaveIndex" :class="{ courseTwoActive: twoList.id == twoId || twoList.checked }" @mouseleave.stop="leaveIndex"
@mouseenter.stop="changeIndex(twoList.id)"> @mouseenter.stop="changeIndex(twoList.id)">
<!-- 三级分类 --> <!-- 三级分类 -->
<el-popover class="popover" popper-class='coursePopperClass' placement="right-start" width="536" <el-menu>
:disabled="!twoList.children.length" :open-delay="0" :close-delay="0" trigger="hover" <el-submenu :index="String(twoIndex)" v-if="twoList.children && twoList.children.length > 0">
:visible-arrow="false" @hide="leaveIndex" @show="changeIndex(twoList.id)" transition="none"> <template slot="title">
<div class="course-two-content" slot="reference">{{ <div class="course-two-content">
twoList.name }}</div>- {{ twoList.name }}
<!-- 内容 -->
<div class="course-three-box">
<div class="course-three-box-title">
{{ twoList.name }}
</div>
<div style="padding: 0 40px;display: flex;flex-wrap: wrap;">
<div :class="threeList.checked ? 'threeActive' : ''" v-for="threeList in twoList.children"
:key="threeList.id" @click.stop="handleOptionClick(threeList, 3, twoList.children)"
class="course-three">
<span>{{ threeList.name }}</span>
</div> </div>
</div> </template>
</div> <el-menu-item-group>
</el-popover> <div style="padding: 0 40px;display: flex;flex-wrap: wrap;">
<div :class="threeList.checked ? 'threeActive' : ''" v-for="threeList in twoList.children"
:key="threeList.id" @click.stop="handleOptionClick(threeList, 3, twoList.children)"
class="course-three">
<span>{{ threeList.name }}</span>
</div>
</div>
</el-menu-item-group>
</el-submenu>
<el-menu-item :index="String(twoIndex)" v-else>
<div slot="title" class="course-two-content"> {{ twoList.name }}</div>
</el-menu-item>
</el-menu>
<!-- </el-popover> -->
</div> </div>
</div> </div>
</div> </div>
@@ -459,6 +462,7 @@ export default {
}, },
data() { data() {
return { return {
menuActiveIndex: '-1', //无默认选中
hotTagsList: [], hotTagsList: [],
newData: false,//线上品牌系列隐藏 newData: false,//线上品牌系列隐藏
navTitle: [], navTitle: [],
@@ -1657,6 +1661,38 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.course-three-box-title{
font-size: 16px;
font-weight: 600;
height: 68px;
line-height: 80px;
background: linear-gradient(180deg, rgba(78,166,255,0.2) 0%,
rgba(78,166,255,0) 100%);padding-left: 40px;
}
.course-three{
border-radius: 6px;
border: 1px solid #C7CBD2;display: inline-block;
height: 30px;
line-height: 30px;
padding: 0 10px;
margin-right: 20px;
margin-bottom: 10px;
cursor: pointer;
color: rgb(48, 49, 51);
&:hover{
color: #387DF7;
border: 1px solid #387DF7 !important;
}
}
.threeActive{
color: #387DF7;
border: 1px solid #387DF7 !important;
}
.couser-list-content { .couser-list-content {
min-height: 110%; min-height: 110%;
} }
@@ -1717,10 +1753,29 @@ export default {
} }
} }
// 三级列表 // 三级列表
.course-list { .course-list {
background-color: #fff; background-color: #fff;
::v-deep .el-submenu__title, .el-menu-item {
height: 38px;
padding: 0 5px!important;
}
::v-deep .el-menu-item.is-active {
background-color: inherit;
color: inherit;
}
::v-deep .el-submenu__title {
background-color: inherit;
color: inherit;
}
.course-one { .course-one {
position: relative; position: relative;
@@ -1734,7 +1789,7 @@ export default {
// 二级的高亮 // 二级的高亮
.courseTwoActive { .courseTwoActive {
color: #387DF7; color: #387DF7 !important;
border-image: linear-gradient(90deg, rgba(47, 101, 236, 1), rgba(228, 236, 255, 1)) 1 1 !important; border-image: linear-gradient(90deg, rgba(47, 101, 236, 1), rgba(228, 236, 255, 1)) 1 1 !important;
} }

File diff suppressed because it is too large Load Diff