教育培训-平台资源库-课件资源管理(视频、资料)、课程管理

pull/1/head
duhang 2024-01-05 18:23:04 +08:00
parent bff8547433
commit b2d75a5b86
7 changed files with 811 additions and 0 deletions

View File

@ -75,6 +75,79 @@ export default [
}, },
], ],
}, },
{
path: "/platform_resource_library",
redirect: "/platform_resource_library/courseware",
meta: { title: "平台资源库", model: MODEL["2"] },
component: "children",
children: [
{
path: "/platform_resource_library/courseware",
redirect: "/platform_resource_library/courseware/video",
meta: { title: "课件资源管理" },
component: "children",
children: [
{
path: "/platform_resource_library/courseware/video",
meta: { title: "视频课件", isSubMenu: false },
component: "children",
children: [
{
path: "",
component: "platform_resource_library/courseware/video",
},
{
path: "/platform_resource_library/courseware/view",
meta: {
title: "课件习题",
activeMenu: "/platform_resource_library/courseware/video",
},
component: "platform_resource_library/courseware/view",
},
],
},
{
path: "/platform_resource_library/courseware/data",
meta: { title: "资料课件", isSubMenu: false },
component: "children",
children: [
{
path: "",
component: "platform_resource_library/courseware/data",
},
{
path: "/platform_resource_library/courseware/view",
meta: {
title: "课件习题",
activeMenu: "/platform_resource_library/courseware/data",
},
component: "platform_resource_library/courseware/view",
},
],
},
],
},
{
path: "/platform_resource_library/curriculum/list",
meta: { title: "课程管理", isSubMenu: false },
component: "children",
children: [
{
path: "",
component: "platform_resource_library/curriculum/list",
},
{
path: "/platform_resource_library/curriculum/view",
meta: {
title: "课程详情查看",
activeMenu: "/platform_resource_library/curriculum/list",
},
component: "platform_resource_library/curriculum/view",
},
],
},
],
},
{ {
path: "/confined_space", path: "/confined_space",
redirect: "/confined_space/job_data", redirect: "/confined_space/job_data",

View File

@ -0,0 +1,25 @@
import { post } from "@/request/axios.js";
export const getVideoCoursewareList = (params) =>
post("/platform/videocourseware/list", params); // 课件资源管理-视频课件列表
export const getDataCoursewareList = (params) =>
post("/platform/datacourseware/list", params); // 课件资源管理-资料课件列表
export const joinMyVideoCourseware = (params) =>
post("/platform/videocourseware/joinMyCourseware", params); // 课件资源管理-视频课件-添加
export const joinMyDataCourseware = (params) =>
post("/platform/datacourseware/joinMyCourseware", params); // 课件资源管理-资料课件-添加
export const getQuestionListByCoursewareIdAndType = (params) =>
post("/platform/question/list", params); // 课件资源管理-获取课件习题
export const getCurriculumList = (params) =>
post("/platform/curriculum/list", params); // 课程管理-获取课程列表
export const joinMyCurriculum = (params) =>
post("/platform/curriculum/joinMyCurriculum", params); // 课件资源管理-资料课件-添加
export const getCurriculumInfo = (params) =>
post("platform/curriculum/goEdit", params); // 课件资源管理-获取课程详情信息

View File

@ -0,0 +1,161 @@
<template>
<div>
<el-card>
<el-form
:model="searchForm"
label-width="130px"
@submit.prevent="fnResetPagination"
>
<el-row>
<el-col :span="6">
<el-form-item label="课程名称" prop="KEYWORDS">
<el-input v-model="searchForm.KEYWORDS" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="岗位培训类型" prop="POSTTYPE">
<layout-learning-train-type
v-model="searchForm.POSTTYPE"
type="post"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="课件状态" prop="STATE">
<el-select v-model="searchForm.STATE">
<el-option
v-for="item in data.courseStates"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px">
<el-button type="primary" native-type="submit">搜索</el-button>
<el-button native-type="reset" @click="fnResetPagination">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<layout-card>
<layout-table
:data="list"
@get-data="fnGetData"
v-model:pagination="pagination"
>
<el-table-column label="序号" width="60">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column
prop="COURSEWARENAME"
label="课件名称"
show-overflow-tooltip
/>
<el-table-column
prop="post_type_name"
label="岗位培训类型"
show-overflow-tooltip
/>
<el-table-column
show-overflow-tooltip
prop="train_type_name"
label="培训行业类型"
>
<template v-slot="{ row }">
<div v-if="row.CURRENCY === '1'"></div>
<div v-else>{{ row.train_type_name }}</div>
</template>
</el-table-column>
<el-table-column prop="teacherName" label="讲师名称" />
<el-table-column prop="CLASSHOUR" label="课件学时(分钟)" />
<el-table-column prop="CREATTIME" label="上传时间" />
<el-table-column prop="STATE" label="课件状态">
<template v-slot="{ row }">
<template v-if="row.STATE === 0">
<div>启用</div>
</template>
<template v-else-if="row.STATE === 1">
<div>禁用</div>
</template>
</template>
</el-table-column>
<el-table-column label="操作" width="130">
<template v-slot="{ row }">
<el-button
type="primary"
text
link
:disabled="row.recordID !== '--'"
@click="fnAdd(row.DATACOURSEWARE_ID)"
>
添加
</el-button>
<el-button
type="primary"
text
link
@click="
router.push({
path: '/platform_resource_library/courseware/view',
query: {
COURSE_ID: row.DATACOURSEWARE_ID, // ID
COURSE_TYPE: '2', // (1:2:)
},
})
"
>
课件习题
</el-button>
</template>
</el-table-column>
</layout-table>
</layout-card>
</div>
</template>
<script setup>
import LayoutCard from "@/components/card/index.vue";
import LayoutLearningTrainType from "@/components/learning_train_type/index.vue";
import {
getDataCoursewareList,
joinMyDataCourseware,
} from "@/request/platform_resource_library.js";
import useListData from "@/assets/js/useListData.js";
import { reactive } from "vue";
import { serialNumber } from "@/assets/js/utils.js";
import LayoutTable from "@/components/table/index.vue";
// import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
import { debounce } from "throttle-debounce";
import { ElMessage, ElMessageBox } from "element-plus";
import { useRouter } from "vue-router";
const router = useRouter();
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getDataCoursewareList);
const data = reactive({
courseStates: [
{ value: "0", label: "启用" },
{ value: "1", label: "禁用" },
],
});
// const buttonJurisdiction = await useButtonJurisdiction("courseware");
const fnAdd = debounce(1000, async (DATACOURSEWARE_ID) => {
await ElMessageBox.confirm("确定要添加吗?", { type: "warning" });
await joinMyDataCourseware({ COURSEWARE_ID: DATACOURSEWARE_ID });
ElMessage.success("添加成功");
fnResetPagination();
});
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,174 @@
<template>
<div>
<el-card>
<el-form
:model="searchForm"
label-width="130px"
@submit.prevent="fnResetPagination"
>
<el-row>
<el-col :span="6">
<el-form-item label="课程名称" prop="KEYWORDS">
<el-input v-model="searchForm.KEYWORDS" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="岗位培训类型" prop="POSTTYPE">
<layout-learning-train-type
v-model="searchForm.POSTTYPE"
type="post"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="课件状态" prop="STATE">
<el-select v-model="searchForm.STATE">
<el-option
v-for="item in data.courseStates"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px">
<el-button type="primary" native-type="submit">搜索</el-button>
<el-button native-type="reset" @click="fnResetPagination">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<layout-card>
<layout-table
:data="list"
@get-data="fnGetData"
v-model:pagination="pagination"
>
<el-table-column label="序号" width="60">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column
prop="COURSEWARENAME"
label="课件名称"
show-overflow-tooltip
/>
<el-table-column
prop="post_type_name"
label="岗位培训类型"
show-overflow-tooltip
/>
<el-table-column
show-overflow-tooltip
prop="train_type_name"
label="培训行业类型"
>
<template v-slot="{ row }">
<div v-if="row.CURRENCY === '1'"></div>
<div v-else>{{ row.train_type_name }}</div>
</template>
</el-table-column>
<el-table-column prop="teacherName" label="讲师名称" />
<el-table-column prop="CLASSHOUR" label="课件学时(分钟)" />
<el-table-column prop="CREATTIME" label="上传时间" />
<el-table-column prop="STATE" label="课件状态">
<template v-slot="{ row }">
<template v-if="row.STATE === 0">
<div>启用</div>
</template>
<template v-else-if="row.STATE === 1">
<div>禁用</div>
</template>
</template>
</el-table-column>
<el-table-column prop="CURRICULUM_ID_REMOTE" label="课件来源">
<template v-slot="{ row }">
<template v-if="row.CURRICULUM_ID_REMOTE">
<div>商城</div>
</template>
<template v-else>
<div>自传</div>
</template>
</template>
</el-table-column>
<el-table-column prop="NUMEXAMPLE" label="习题数" />
<el-table-column label="操作" width="130">
<template v-slot="{ row }">
<el-button
v-if="buttonJurisdiction.edit"
type="primary"
text
link
:disabled="row.recordID !== '--'"
@click="fnAdd(row.VIDEOCOURSEWARE_ID)"
>
添加
</el-button>
<el-button
v-if="buttonJurisdiction.edit"
type="primary"
text
link
@click="
router.push({
path: '/platform_resource_library/courseware/view',
query: {
COURSE_ID: row.VIDEOCOURSEWARE_ID, // ID
COURSE_TYPE: '1', // (1:2:)
},
})
"
>
课件习题
</el-button>
</template>
</el-table-column>
</layout-table>
</layout-card>
</div>
</template>
<script setup>
import LayoutCard from "@/components/card/index.vue";
import LayoutLearningTrainType from "@/components/learning_train_type/index.vue";
import {
getVideoCoursewareList,
joinMyVideoCourseware,
} from "@/request/platform_resource_library.js";
import useListData from "@/assets/js/useListData.js";
import { reactive } from "vue";
import { serialNumber } from "@/assets/js/utils.js";
import LayoutTable from "@/components/table/index.vue";
import { debounce } from "throttle-debounce";
// import useButtonJurisdiction from "@/assets/js/useButtonJurisdiction.js";
import { ElMessage, ElMessageBox } from "element-plus";
import { useRouter } from "vue-router";
const router = useRouter();
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getVideoCoursewareList);
const data = reactive({
courseStates: [
{ value: "0", label: "启用" },
{ value: "1", label: "禁用" },
],
});
// const buttonJurisdiction = await useButtonJurisdiction("courseware");
const fnAdd = debounce(1000, async (VIDEOCOURSEWARE_ID) => {
await ElMessageBox.confirm("确定要添加吗?", { type: "warning" });
await joinMyVideoCourseware({ COURSEWARE_ID: VIDEOCOURSEWARE_ID });
ElMessage.success("添加成功");
fnResetPagination();
});
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,125 @@
<template>
<div>
<el-card>
<el-form
:model="searchForm"
label-width="130px"
@submit.prevent="fnResetPaginationTransfer"
>
<el-row>
<el-col :span="6">
<el-form-item label="关键字搜索" prop="KEYWORDS">
<el-input v-model="searchForm.KEYWORDS" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px">
<el-button type="primary" native-type="submit">搜索</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<layout-card>
<layout-table
:data="list"
@get-data="fnGetDataTransfer"
v-model:pagination="pagination"
>
<el-table-column prop="QUESTIONNUMBER" label="题号" width="60" />
<el-table-column
prop="QUESTIONTYPE"
label="试题类型"
show-overflow-tooltip
width="80"
>
<template v-slot="{ row }">
{{ fnFormatterQuestionType(row) }}
</template>
</el-table-column>
<el-table-column
show-overflow-tooltip
prop="QUESTIONDRY"
label="题干"
align="left"
/>
<el-table-column
show-overflow-tooltip
prop="ANSWER"
label="答案"
width="55"
>
<template v-slot="{ row }">
<template v-if="row.QUESTIONTYPE === '3'">
<div v-if="row.ANSWER === 'A'"></div>
<div v-if="row.ANSWER === 'B'"></div>
</template>
<template v-else>
<div>{{ row.ANSWER }}</div>
</template>
</template>
</el-table-column>
</layout-table>
</layout-card>
</div>
</template>
<script setup>
import LayoutTable from "@/components/table/index.vue";
import LayoutCard from "@/components/card/index.vue";
import { getQuestionListByCoursewareIdAndType } from "@/request/platform_resource_library.js";
import useListData from "@/assets/js/useListData.js";
import { reactive } from "vue";
import { useRoute } from "vue-router";
const route = useRoute();
const { COURSE_ID, COURSE_TYPE } = route.query;
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getQuestionListByCoursewareIdAndType, {
otherParams: { COURSEWAREID: COURSE_ID, COURSEWARETYPE: COURSE_TYPE },
});
const data = reactive({
questionTypeOptions: [
{
value: "1",
label: "单选题",
},
{
value: "2",
label: "多选题",
},
{
value: "3",
label: "判断题",
},
],
});
const fnGetDataTransfer = async () => {
await fnGetData({
COURSEWAREID: COURSE_ID,
COURSEWARETYPE: COURSE_TYPE,
});
};
const fnResetPaginationTransfer = async () => {
await fnResetPagination({
COURSEWAREID: COURSE_ID,
COURSEWARETYPE: COURSE_TYPE,
});
};
const fnFormatterQuestionType = (row) => {
let label = "";
data.questionTypeOptions.forEach((option) => {
if (option.value === row.QUESTIONTYPE) {
label = option.label;
}
});
return label;
};
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,128 @@
<template>
<div>
<el-card>
<el-form
:model="searchForm"
label-width="130px"
@submit.prevent="fnResetPagination"
>
<el-row>
<el-col :span="6">
<el-form-item label="课程名称" prop="KEYWORDS">
<el-input v-model="searchForm.KEYWORDS" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="岗位培训类型" prop="POSTTYPE">
<layout-learning-train-type
v-model="searchForm.POSTTYPE"
type="post"
/>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label-width="10px">
<el-button type="primary" native-type="submit">搜索</el-button>
<el-button native-type="reset" @click="fnResetPagination">
重置
</el-button>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-card>
<layout-card>
<layout-table
:data="list"
@get-data="fnGetData"
v-model:pagination="pagination"
>
<el-table-column label="序号" width="60">
<template #default="{ $index }">
{{ serialNumber(pagination, $index) }}
</template>
</el-table-column>
<el-table-column
prop="CURRICULUMNAME"
label="课程名称"
show-overflow-tooltip
/>
<el-table-column
show-overflow-tooltip
prop="train_type_name"
label="培训行业类型"
>
<template v-slot="{ row }">
<div v-if="row.CURRENCY === '1'"></div>
<div v-else>{{ row.train_type_name }}</div>
</template>
</el-table-column>
<el-table-column
prop="post_type_name"
label="岗位培训类型"
show-overflow-tooltip
/>
<el-table-column prop="CLASSHOUR" label="学时(分钟)" />
<el-table-column prop="videoCount" label="视频课件数" />
<el-table-column prop="dataCount" label="资料课件数" />
<el-table-column label="操作" width="130">
<template v-slot="{ row }">
<el-button
type="primary"
text
link
:disabled="row.recordID !== '--'"
@click="fnAdd(row.CURRICULUM_ID)"
>
添加
</el-button>
<el-button
v-if="!row.COURSEPAPERS_ID"
type="primary"
text
link
@click="
router.push({
path: '/platform_resource_library/curriculum/view',
query: {
CURRICULUM_ID: row.CURRICULUM_ID, // ID
},
})
"
>
查看
</el-button>
</template>
</el-table-column>
</layout-table>
</layout-card>
</div>
</template>
<script setup>
import LayoutCard from "@/components/card/index.vue";
import LayoutLearningTrainType from "@/components/learning_train_type/index.vue";
import {
getCurriculumList,
joinMyCurriculum,
} from "@/request/platform_resource_library.js";
import useListData from "@/assets/js/useListData.js";
import { serialNumber } from "@/assets/js/utils.js";
import LayoutTable from "@/components/table/index.vue";
import { debounce } from "throttle-debounce";
import { ElMessage, ElMessageBox } from "element-plus";
import { useRouter } from "vue-router";
const router = useRouter();
const { list, pagination, searchForm, fnGetData, fnResetPagination } =
useListData(getCurriculumList);
const fnAdd = debounce(1000, async (CURRICULUM_ID) => {
await ElMessageBox.confirm("确定要添加吗?", { type: "warning" });
await joinMyCurriculum({ CURRICULUM_ID });
ElMessage.success("添加成功");
fnResetPagination();
});
</script>
<style scoped lang="scss"></style>

View File

@ -0,0 +1,125 @@
<template>
<layout-card>
<el-divider content-position="left">课程信息</el-divider>
<el-descriptions :column="1" border>
<el-descriptions-item label="课程名称">
{{ data.curriculumInfo.CURRICULUMNAME }}
</el-descriptions-item>
<el-descriptions-item label="培训行业类型">
{{
data.curriculumInfo.CURRENCY === "1"
? "通用"
: data.curriculumInfo.train_type_name
}}
</el-descriptions-item>
<el-descriptions-item label="岗位培训类型">
{{ data.curriculumInfo.post_type_name }}
</el-descriptions-item>
<el-descriptions-item label="课程图片">
<img
:src="FILE_URL + data.curriculumInfo.CAPTURE"
width="100"
height="100"
/>
</el-descriptions-item>
<el-descriptions-item label="课程介绍">
{{ data.curriculumInfo.CURRICULUMINTRODUCE }}
</el-descriptions-item>
</el-descriptions>
<template v-for="(chapter, index) in data.chapterList" :key="index">
<el-divider content-position="left">{{ data.NAME }}</el-divider>
<el-divider content-position="left">视频课件</el-divider>
<layout-table :data="chapter.xzVideoList" :showPagination="false">
<el-table-column
show-overflow-tooltip
prop="COURSEWARENAME"
label="视频课件名称"
/>
<el-table-column
show-overflow-tooltip
prop="post_type_name"
label="岗位培训类型"
/>
<el-table-column
show-overflow-tooltip
prop="train_type_name"
label="培训行业类型"
/>
<el-table-column show-overflow-tooltip prop="CLASSHOUR" label="学时" />
<el-table-column
show-overflow-tooltip
prop="COURSEWAREINTRODUCE"
label="课件描述"
/>
<el-table-column
show-overflow-tooltip
prop="teacherName"
label="讲师"
/>
</layout-table>
<el-divider content-position="left">资料课件</el-divider>
<layout-table :data="chapter.xzDataList" :showPagination="false">
<el-table-column
show-overflow-tooltip
prop="COURSEWARENAME"
label="视频课件名称"
/>
<el-table-column
show-overflow-tooltip
prop="post_type_name"
label="岗位培训类型"
/>
<el-table-column
show-overflow-tooltip
prop="train_type_name"
label="培训行业类型"
/>
<el-table-column show-overflow-tooltip prop="CLASSHOUR" label="学时" />
<el-table-column
show-overflow-tooltip
prop="COURSEWAREINTRODUCE"
label="课件描述"
/>
<el-table-column
show-overflow-tooltip
prop="teacherName"
label="讲师"
/>
</layout-table>
</template>
</layout-card>
</template>
<script setup>
import LayoutTable from "@/components/table/index.vue";
import { reactive } from "vue";
import { useRoute } from "vue-router";
import { getCurriculumInfo } from "@/request/platform_resource_library.js";
const FILE_URL = import.meta.env.VITE_FILE_URL;
const route = useRoute();
const { CURRICULUM_ID } = route.query;
const data = reactive({
curriculumInfo: {},
chapterList: [],
});
const fnGetCurriculumInfo = async () => {
const respData = await getCurriculumInfo({ CURRICULUM_ID });
if (respData) {
const curriculumInfo = respData.pd;
if (curriculumInfo) {
data.curriculumInfo = curriculumInfo;
}
const chapterList = respData.chapterList;
if (chapterList) {
data.chapterList = chapterList;
}
}
};
await fnGetCurriculumInfo();
</script>
<style scoped lang="scss"></style>