|
@@ -43,13 +43,17 @@
|
|
|
color: '#333',
|
|
color: '#333',
|
|
|
}"
|
|
}"
|
|
|
:default-sort="{ prop: 'sort', order: 'ascending' }"
|
|
:default-sort="{ prop: 'sort', order: 'ascending' }"
|
|
|
|
|
+ lazy
|
|
|
|
|
+ :load="load"
|
|
|
|
|
+ row-key="keyId"
|
|
|
|
|
+ :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
|
|
>
|
|
>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
v-for="(item, index) in compayTypes(tableSetVideo)"
|
|
v-for="(item, index) in compayTypes(tableSetVideo)"
|
|
|
:width="item.width"
|
|
:width="item.width"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
:label="item.label"
|
|
:label="item.label"
|
|
|
- align="center"
|
|
|
|
|
|
|
+ :align="item.scope === 'typeNames' ? 'left' : 'center'"
|
|
|
:show-overflow-tooltip="true"
|
|
:show-overflow-tooltip="true"
|
|
|
header-align="center"
|
|
header-align="center"
|
|
|
:sortable="item.prop === 'sort'"
|
|
:sortable="item.prop === 'sort'"
|
|
@@ -73,6 +77,8 @@
|
|
|
? "章"
|
|
? "章"
|
|
|
: scope.row[item.prop] === 3
|
|
: scope.row[item.prop] === 3
|
|
|
? "节"
|
|
? "节"
|
|
|
|
|
+ : scope.row[item.prop] === 0
|
|
|
|
|
+ ? "课程"
|
|
|
: "未知"
|
|
: "未知"
|
|
|
}}</span>
|
|
}}</span>
|
|
|
<span v-else-if="item.scope === 'busin'">
|
|
<span v-else-if="item.scope === 'busin'">
|
|
@@ -87,16 +93,35 @@
|
|
|
: "未知"
|
|
: "未知"
|
|
|
}}
|
|
}}
|
|
|
</span>
|
|
</span>
|
|
|
- <div v-else-if="item.scope === 'inputs'">
|
|
|
|
|
- <el-input-number
|
|
|
|
|
- style="width: 50px"
|
|
|
|
|
- size="small"
|
|
|
|
|
- :controls="false"
|
|
|
|
|
- v-model="scope.row[item.prop]"
|
|
|
|
|
- controls-position="right"
|
|
|
|
|
- :min="0"
|
|
|
|
|
- ></el-input-number>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <span v-else-if="item.scope === 'typeNames'">
|
|
|
|
|
+ <span
|
|
|
|
|
+ v-if="scope.row['sectionType']"
|
|
|
|
|
+ style="color: green; margin-right: 10px"
|
|
|
|
|
+ >{{
|
|
|
|
|
+ scope.row["sectionType"] === 1
|
|
|
|
|
+ ? "[录播]"
|
|
|
|
|
+ : scope.row["sectionType"] === 2
|
|
|
|
|
+ ? "[直播]"
|
|
|
|
|
+ : scope.row["sectionType"] === 3
|
|
|
|
|
+ ? "[回放]"
|
|
|
|
|
+ : ""
|
|
|
|
|
+ }}</span
|
|
|
|
|
+ >
|
|
|
|
|
+
|
|
|
|
|
+ {{ scope.row[item.prop] }}
|
|
|
|
|
+ </span>
|
|
|
|
|
+ <span v-else-if="item.scope === 'inputs'">
|
|
|
|
|
+ <span v-if="item.scope === 'inputs' && scope.row['index']">
|
|
|
|
|
+ <el-input-number
|
|
|
|
|
+ style="width: 50px"
|
|
|
|
|
+ size="small"
|
|
|
|
|
+ :controls="false"
|
|
|
|
|
+ v-model="scope.row[item.prop]"
|
|
|
|
|
+ controls-position="right"
|
|
|
|
|
+ :min="0"
|
|
|
|
|
+ ></el-input-number>
|
|
|
|
|
+ </span>
|
|
|
|
|
+ </span>
|
|
|
<span v-else>{{ scope.row[item.prop] }}</span></template
|
|
<span v-else>{{ scope.row[item.prop] }}</span></template
|
|
|
>
|
|
>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -108,7 +133,18 @@
|
|
|
v-if="!submitStatusInfo"
|
|
v-if="!submitStatusInfo"
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" @click="delCourse(scope.row)">删除</el-button>
|
|
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ @click="delCourse(scope.row)"
|
|
|
|
|
+ v-if="scope.row.index"
|
|
|
|
|
+ >删除</el-button
|
|
|
|
|
+ >
|
|
|
|
|
+ <el-button
|
|
|
|
|
+ type="text"
|
|
|
|
|
+ v-if="scope.row.type === 3 && scope.row.sectionType !== 1"
|
|
|
|
|
+ @click="openShare(scope.row)"
|
|
|
|
|
+ >分享</el-button
|
|
|
|
|
+ >
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -124,6 +160,7 @@
|
|
|
:bfCourseId="bfCourseId"
|
|
:bfCourseId="bfCourseId"
|
|
|
/>
|
|
/>
|
|
|
<play-photo ref="playPhoto" @backData="backPlayPhotoData" />
|
|
<play-photo ref="playPhoto" @backData="backPlayPhotoData" />
|
|
|
|
|
+ <share ref="share" />
|
|
|
<every-day-study-num ref="everyDayStudyNum" @backData="backEveryDaySet" />
|
|
<every-day-study-num ref="everyDayStudyNum" @backData="backEveryDaySet" />
|
|
|
<handout-view ref="handoutView" @backData="backHandoutView" />
|
|
<handout-view ref="handoutView" @backData="backHandoutView" />
|
|
|
</div>
|
|
</div>
|
|
@@ -134,6 +171,7 @@ import poppleSet from "../../poppleSet.vue";
|
|
|
import courseCheck from "./courseCheck.vue";
|
|
import courseCheck from "./courseCheck.vue";
|
|
|
import moreListCheck from "./moreListCheck.vue";
|
|
import moreListCheck from "./moreListCheck.vue";
|
|
|
import playPhoto from "./playPhoto.vue";
|
|
import playPhoto from "./playPhoto.vue";
|
|
|
|
|
+import share from "./share.vue";
|
|
|
import everyDayStudyNum from "./everyDayStudyNum.vue";
|
|
import everyDayStudyNum from "./everyDayStudyNum.vue";
|
|
|
import handoutView from "./handoutView.vue";
|
|
import handoutView from "./handoutView.vue";
|
|
|
|
|
|
|
@@ -143,6 +181,7 @@ export default {
|
|
|
courseCheck,
|
|
courseCheck,
|
|
|
moreListCheck,
|
|
moreListCheck,
|
|
|
playPhoto,
|
|
playPhoto,
|
|
|
|
|
+ share,
|
|
|
everyDayStudyNum,
|
|
everyDayStudyNum,
|
|
|
handoutView,
|
|
handoutView,
|
|
|
},
|
|
},
|
|
@@ -152,9 +191,15 @@ export default {
|
|
|
tableSetVideo: [
|
|
tableSetVideo: [
|
|
|
{ label: "排序", prop: "sort", scope: "inputs", width: "100" },
|
|
{ label: "排序", prop: "sort", scope: "inputs", width: "100" },
|
|
|
{ label: "编码", prop: "code", width: "140" },
|
|
{ label: "编码", prop: "code", width: "140" },
|
|
|
- { label: "课程名称", prop: "courseName", width: "300", type: 1 },
|
|
|
|
|
- { label: "类型", prop: "type", width: "190", type: 2, scope: "type" },
|
|
|
|
|
- { label: "名称", prop: "menuName", width: "300", type: 2 },
|
|
|
|
|
|
|
+ // { label: "课程名称", prop: "courseName", width: "300", type: 1 },
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "名称",
|
|
|
|
|
+ prop: "menuName",
|
|
|
|
|
+ width: "300",
|
|
|
|
|
+ scope: "typeNames",
|
|
|
|
|
+ },
|
|
|
|
|
+ { label: "类型", prop: "type", width: "190", scope: "type" },
|
|
|
|
|
+ // { label: "名称", prop: "menuName", width: "300", type: 2 },
|
|
|
{ label: "科目", prop: "subjectName", width: "150", type: 1 },
|
|
{ label: "科目", prop: "subjectName", width: "150", type: 1 },
|
|
|
{ label: "专业", prop: "categoryName", type: 1 },
|
|
{ label: "专业", prop: "categoryName", type: 1 },
|
|
|
{ label: "院校", prop: "schoolName", width: "150", type: 1 },
|
|
{ label: "院校", prop: "schoolName", width: "150", type: 1 },
|
|
@@ -176,6 +221,7 @@ export default {
|
|
|
tableData: [],
|
|
tableData: [],
|
|
|
auditionList: [], //试听数据
|
|
auditionList: [], //试听数据
|
|
|
bfCourseId: 0,
|
|
bfCourseId: 0,
|
|
|
|
|
+ dialogVisible: false, //分享窗口
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -210,6 +256,62 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 打开分享窗口
|
|
|
|
|
+ */
|
|
|
|
|
+ openShare(rows) {
|
|
|
|
|
+ let goodsId = this.$route.query.id
|
|
|
|
|
+ this.$refs.share.openBox(rows,goodsId);
|
|
|
|
|
+ // this.$api.coursesectionwatchper().then((res) => {});
|
|
|
|
|
+ },
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 异步加载table数据
|
|
|
|
|
+ */
|
|
|
|
|
+ load(tree, treeNode, resolve) {
|
|
|
|
|
+ if (tree.type === 0) {
|
|
|
|
|
+ this.$api
|
|
|
|
|
+ .inquireCoursemenuListS({ courseId: tree.courseId })
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ res.rows.forEach((item) => {
|
|
|
|
|
+ if (item.type === 2) {
|
|
|
|
|
+ item.chapterId = item.menuId;
|
|
|
|
|
+ }
|
|
|
|
|
+ item.keyId = `${tree.courseId}-${item.menuId}`;
|
|
|
|
|
+ item.children = [];
|
|
|
|
|
+ item.courseId = tree.courseId;
|
|
|
|
|
+ item.hasChildren = item.type === 3 ? false : true;
|
|
|
|
|
+ });
|
|
|
|
|
+ return resolve(res.rows);
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (tree.type === 1) {
|
|
|
|
|
+ this.$api.inquireCourseListmodulechapter(tree.menuId).then((res) => {
|
|
|
|
|
+ res.data.forEach((item) => {
|
|
|
|
|
+ item.keyId = `${tree.courseId}-${tree.menuId}-${item.chapterId}`;
|
|
|
|
|
+ item.children = [];
|
|
|
|
|
+ item.type = 2;
|
|
|
|
|
+ item.menuName = item.name;
|
|
|
|
|
+ item.courseId = tree.courseId;
|
|
|
|
|
+ item.hasChildren = item.type === 3 ? false : true;
|
|
|
|
|
+ });
|
|
|
|
|
+ return resolve(res.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ } else if (tree.type === 2) {
|
|
|
|
|
+ this.$api
|
|
|
|
|
+ .inquireCoursechaptersectionlist(tree.chapterId)
|
|
|
|
|
+ .then((res) => {
|
|
|
|
|
+ res.data.forEach((item) => {
|
|
|
|
|
+ item.keyId = `${tree.courseId}-${tree.moduleId}-${tree.chapterId}-${item.sectionId}`;
|
|
|
|
|
+ item.children = [];
|
|
|
|
|
+ item.type = 3;
|
|
|
|
|
+ item.menuName = item.name;
|
|
|
|
|
+ item.hasChildren = false;
|
|
|
|
|
+ });
|
|
|
|
|
+ return resolve(res.data);
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return resolve([]);
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
/**
|
|
/**
|
|
|
* 获取初始课程列表
|
|
* 获取初始课程列表
|
|
|
*/
|
|
*/
|
|
@@ -223,6 +325,14 @@ export default {
|
|
|
});
|
|
});
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+ res.rows.forEach((item, index) => {
|
|
|
|
|
+ item.keyId = item.courseId + "";
|
|
|
|
|
+ item.children = [];
|
|
|
|
|
+ item.hasChildren = true;
|
|
|
|
|
+ item.type = 0;
|
|
|
|
|
+ item.menuName = item.courseName;
|
|
|
|
|
+ item.index = true;
|
|
|
|
|
+ });
|
|
|
this.tableData = res.rows;
|
|
this.tableData = res.rows;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
@@ -236,7 +346,16 @@ export default {
|
|
|
item.durationTime,
|
|
item.durationTime,
|
|
|
false
|
|
false
|
|
|
);
|
|
);
|
|
|
|
|
+ item.children = [];
|
|
|
|
|
+ item.hasChildren = item.type === 1 || item.type === 2 ? true : false;
|
|
|
item.name = item.menuName;
|
|
item.name = item.menuName;
|
|
|
|
|
+ item.index = true;
|
|
|
|
|
+ item.keyId = `${id}-${item.type === 1 ? item.menuId : 0}-${
|
|
|
|
|
+ item.type === 2 ? item.menuId : 0
|
|
|
|
|
+ }-${item.type === 3 ? item.menuId : 0}`;
|
|
|
|
|
+ item.moduleId = item.type === 1 ? item.menuId : 0;
|
|
|
|
|
+ item.chapterId = item.type === 2 ? item.menuId : 0;
|
|
|
|
|
+ item.sectionId = item.type === 3 ? item.menuId : 0;
|
|
|
});
|
|
});
|
|
|
this.tableData = res.rows;
|
|
this.tableData = res.rows;
|
|
|
});
|
|
});
|
|
@@ -246,7 +365,6 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
getBybusCourseAudition(audition) {
|
|
getBybusCourseAudition(audition) {
|
|
|
this.auditionList = audition;
|
|
this.auditionList = audition;
|
|
|
- console.log(audition);
|
|
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 点击添加函数
|
|
* 点击添加函数
|
|
@@ -277,6 +395,14 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
backVideoData(array) {
|
|
backVideoData(array) {
|
|
|
let copyData = JSON.parse(JSON.stringify(array));
|
|
let copyData = JSON.parse(JSON.stringify(array));
|
|
|
|
|
+ copyData.forEach((item) => {
|
|
|
|
|
+ item.keyId = item.courseId + "";
|
|
|
|
|
+ item.children = [];
|
|
|
|
|
+ item.hasChildren = true;
|
|
|
|
|
+ item.type = 0;
|
|
|
|
|
+ item.menuName = item.courseName;
|
|
|
|
|
+ item.index = true;
|
|
|
|
|
+ });
|
|
|
if (this.tableData.length) {
|
|
if (this.tableData.length) {
|
|
|
let maxIndex = 0;
|
|
let maxIndex = 0;
|
|
|
this.tableData.forEach((item) => {
|
|
this.tableData.forEach((item) => {
|
|
@@ -300,7 +426,7 @@ export default {
|
|
|
delCourse(item) {
|
|
delCourse(item) {
|
|
|
if (this.tableData[0].type) {
|
|
if (this.tableData[0].type) {
|
|
|
const FINDINDEX = this.tableData.findIndex((items) => {
|
|
const FINDINDEX = this.tableData.findIndex((items) => {
|
|
|
- return items.type === item.type && item.menuId === item.menuId;
|
|
|
|
|
|
|
+ return items.type === item.type && items.menuId === item.menuId;
|
|
|
});
|
|
});
|
|
|
this.tableData.splice(FINDINDEX, 1);
|
|
this.tableData.splice(FINDINDEX, 1);
|
|
|
this.auditionList = this.auditionList.filter((items) => {
|
|
this.auditionList = this.auditionList.filter((items) => {
|
|
@@ -347,6 +473,18 @@ export default {
|
|
|
*/
|
|
*/
|
|
|
backMoreListData(array) {
|
|
backMoreListData(array) {
|
|
|
let copyData = JSON.parse(JSON.stringify(array));
|
|
let copyData = JSON.parse(JSON.stringify(array));
|
|
|
|
|
+ copyData.forEach((item) => {
|
|
|
|
|
+ item.keyId = `${this.bfCourseId}-${item.type === 1 ? item.menuId : 0}-${
|
|
|
|
|
+ item.type === 2 ? item.menuId : 0
|
|
|
|
|
+ }-${item.type === 3 ? item.menuId : 0}`;
|
|
|
|
|
+ (item.courseId = this.bfCourseId),
|
|
|
|
|
+ (item.moduleId = item.type === 1 ? item.menuId : 0);
|
|
|
|
|
+ item.chapterId = item.type === 2 ? item.menuId : 0;
|
|
|
|
|
+ item.sectionId = item.type === 3 ? item.menuId : 0;
|
|
|
|
|
+ item.children = [];
|
|
|
|
|
+ item.hasChildren = item.type === 3 ? false : true;
|
|
|
|
|
+ item.index = true;
|
|
|
|
|
+ });
|
|
|
if (this.tableData.length) {
|
|
if (this.tableData.length) {
|
|
|
let maxIndex = 0;
|
|
let maxIndex = 0;
|
|
|
this.tableData.forEach((item) => {
|
|
this.tableData.forEach((item) => {
|